Page 1 of 1

Trumbles data for OXP.

Posted: Wed Oct 31, 2012 12:23 pm
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. >.<

Re: Trumbles data for OXP.

Posted: Wed Oct 31, 2012 12:43 pm
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.

Re: Trumbles data for OXP.

Posted: Wed Oct 31, 2012 12:47 pm
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!

Re: Trumbles data for OXP.

Posted: Wed Oct 31, 2012 2:01 pm
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. :/

Re: Trumbles data for OXP.

Posted: Wed Oct 31, 2012 8:20 pm
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:

Re: Trumbles data for OXP.

Posted: Wed Oct 31, 2012 9:38 pm
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.

Re: Trumbles data for OXP.

Posted: Wed Oct 31, 2012 11:07 pm
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.)

Re: Trumbles data for OXP.

Posted: Wed Oct 31, 2012 11:36 pm
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!

Re: Trumbles data for OXP.

Posted: Thu Nov 01, 2012 11:32 am
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: