Trumbles data for OXP.

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
superbatprime
Dangerous
Dangerous
Posts: 120
Joined: Tue Oct 09, 2012 10:09 am
Location: Location, Location.

Trumbles data for OXP.

Post by superbatprime »

If (here comes the questions!) I wanted to mess with the Trumble stuff in the game files (for say, seeing how it's written and apply it to a small oxp) where would I find it?
I'm looking for the stuff that dictates how they reproduce once your ship is infested, how quickly they grow etc.
I'm not seeing any numbers in the config folder or the oolite_trumbles_mission script to handle this and am unsure where to look now.

Failing that here's more detail...

I'm making an equipment OXP, this item (which will be purchasable) will slow (but not by much) the rate of reproduction of Trumbles onboard the players ship.

So far I've gotten the item to work as a buyable -> equippable item in the outfitting screen (thanks to the relatively straightforward Beer Cooler OXP)... now I want it to actually do the stuff I want it to do.

God I hope that made some kind of sense. >.<
So then I says to him, I says "naw dude, Oolite ain't no Space Opera... Oolite is Space Rock and Roll!"
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Trumbles data for OXP.

Post by cim »

The Trumbles are managed by src/Core/OOTrumble.m (the "updateTrumble" function is the important one here) and the only thing which an OXP can directly do to Trumbles is add an extra one. Other properties are (intentionally) not OXP-editable.

You may nevertheless be able to find by looking at the source file indirect ways to slow their breeding.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Trumbles data for OXP.

Post by Diziet Sma »

Trumbles are a game-core feature. That means you'd need to look through the source code itself. If you're looking for the source for 1.76.1, try here. For trunk source, see the relevant development section of the BB for your platform.

Specifically, you're looking for the two files in olite-source-1.7x.x/src/Core/ - named OOTrumble.h and OOTrumble.m

Off the top of my head, I have no idea how much, if any, of the trumble workings are exposed to javascript, which is what OXPs use to mess with things.

Hopefully somebody more knowledgeable than I will be along soon, who can give you more info.

Edit: wups! ninja'd by cim. :lol:

2nd Edit: Congrats on taking the first steps to the dark side! Good luck with your OXP!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
superbatprime
Dangerous
Dangerous
Posts: 120
Joined: Tue Oct 09, 2012 10:09 am
Location: Location, Location.

Re: Trumbles data for OXP.

Post by superbatprime »

I think it's better to leave the core stuff alone then, as Cim said maybe indirect is the way to go.
The closest I've come to doing stuff like this is making skins in Minecraft lol... so yeah, no messing with the trunk for me.

I understand the idea behind locking down things like that (which is why I wanted to only affect their spawn rate very slightly, purely to add flavour to my oxp).

I'm also looking at other Trumble based oxps like Smiv's Jelly Babies and the Trumble Treats (which may be out of date?).
I learned the hard way how they reproduce (the little prakking thieves!) so I may approach it from that angle instead.
Or I may just add a whole new form of (relatively harmless) vermin as part of the oxp... which actually might be easier.

Back to the drawing board, this may end up getting bigger than I intended. :/
So then I says to him, I says "naw dude, Oolite ain't no Space Opera... Oolite is Space Rock and Roll!"
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Trumbles data for OXP.

Post by Eric Walch »

Diziet Sma wrote:
I have no idea how much, if any, of the trumble workings are exposed to javascript,
Very little is exposed. Trumbles is a very secret part of the code were the source already made it extra difficult to manipulate. The trumbles even have their own checksum in the saved game that detects manipulation. When you try to remove trumbles from a saved game, it will be detected and you will get them (some) back. So, giving JS a way to change stuff would be counter productive. The only thing JS allows is adding the first trumble, not removing any of them. :twisted:
User avatar
Rese249er
---- E L I T E ----
---- E L I T E ----
Posts: 647
Joined: Thu Jun 07, 2012 2:19 pm
Location: Well, I WAS in G3...

Re: Trumbles data for OXP.

Post by Rese249er »

Recreate the code for something new and market it as a new kind of pet! Just lower the rate somehow from the basic trumble rate.
Got all turned around, lost my nav connection... Where am I now?
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Trumbles data for OXP.

Post by Wildeblood »

superbatprime wrote:
I'm also looking at other Trumble based oxps like Smiv's Jelly Babies and the Trumble Treats (which may be out of date?).
I learned the hard way how they reproduce (the little prakking thieves!) so I may approach it from that angle instead.
Maybe have a look at Hypercargo. "Virtualizing" your cargo manifest as soon as you leave the trading screen would prevent any vermin munching on it, but would have the side-effect of making cargo not damageable, so any combat damage would always affect the equipment bay. (Hmm, there's an app for that side-effect: WEBS System.)
User avatar
Rese249er
---- E L I T E ----
---- E L I T E ----
Posts: 647
Joined: Thu Jun 07, 2012 2:19 pm
Location: Well, I WAS in G3...

Re: Trumbles data for OXP.

Post by Rese249er »

Wildeblood wrote:
...Hypercargo. "Virtualizing" your cargo manifest... would prevent any vermin munching on it... app for that side-effect: WEBS System.
Holy crap! I might get some trumbles on purpose to test that! I have both!
Got all turned around, lost my nav connection... Where am I now?
User avatar
Bugbear
---- E L I T E ----
---- E L I T E ----
Posts: 415
Joined: Sun Sep 17, 2006 1:30 am

Re: Trumbles data for OXP.

Post by Bugbear »

Hmm, sounds like you’re setting the stage for some unethical behaviour.

i.e. A trader comes into port infested with Trumbles. The Trumble Pest Controller will ‘gladly’ fumigate your ship for the princely sum of 1000Cr, however, the fumigation is not 100% effective so you’ll just have to keep coming back…

…at least until the player works out how to get rid of Trumbles themselves.

:twisted: :twisted: I wonder if it would be possible to script up an 'undeleteable' Trumble :twisted: :twisted:
Commander Bugbear
Cruising chart 5 in a Boa Class Criuser: Quantum Pelican I
Vigilante, trader, gems and precious metals hoarder.
Black Monks bothering performed at no extra charge.
Post Reply