How does it determine what type of pod to generate?

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

Moderators: winston, another_commander

Post Reply
Illuminaughty
Average
Average
Posts: 11
Joined: Sun Apr 11, 2010 9:51 pm

How does it determine what type of pod to generate?

Post by Illuminaughty »

Where is the code that determines the frequency of the different types of cargo pods?

I have to adjust the frequency of cracked and jamming cargo pods in my Pods OXP (Thargoid's Pods OXP, but it's on my computer now). I love the fact that there's all these cool types of pods, and I'd even add an alternate script for an exploding pod that says pirates booby trapped it or something, but currently the exploding and jamming pods are appearing so frequently that I've totally stopped scooping pods unless they're bulk containers. The cost of fuel scoop repairs far exceeds any income I get from selling scooped cargo. And if I'm doing a UPS mission I have to be very careful to scoop the escape capsules before the cargo or my scoops will break and I'll have to let the pirates get away (or run them over depending on how infuriating it is for the scoops to break at that particular moment).

Thanks in advance for pointing me in anything even resembling the right direction.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

If you look in the shipdata.plist file within the Pods OXP, you'll see the entity definitions for each of the pods. In the roles line for each there is something like roles = "cargopod(0.01) pods_jampod"; (that example for the jamming pod).

The (0.01) is the weighting of a pod occurring compared to a standard pod. So if you want the pod less frequently, reduce the number towards zero, or if more frequently then increase it (number above 1 are allowed).

For the 1.74 version I've tweaked the numbers again, but it's up to the individual how much they want each. I tried to make a balanced OXP (that gave bad stuff as well as good), but some people seemed to refer only nicer stuff on occasions.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Inside Pods.oxp you find a folder named Config. Inside that there is a text-file called shipdata.plist. Open that with the editor of your choice (note: don't choose Notepad, because it is evil!).

It contains the definitions of each type of pods. The interesting part for you is the line

Code: Select all

        roles = "cargopod(0.1) pods_explodingpod";

here from the exploding pod which destroys your fuel scoops as an example. The interesting part is the number in brackets behind the word "cargopod". Rule: the lower the number, the rarer the pod. So, in this case, reducing it from 0.1 to 0.05 or 0.02 will bring the number of times you have to replace your fuel scoops considerably down.

After you modified all numbers to you liking, you have to save the altered shipdata.plist. When you fire up Oolite afterwards, make sure to press SHIFT and hold it until you see the words "Loading ship data ...". Voilà! :)
BlackKnight
Dangerous
Dangerous
Posts: 70
Joined: Thu May 15, 2008 5:45 pm

Post by BlackKnight »

Thargoid wrote:
but some people seemed to refer only nicer stuff on occasions.
Hey! I resemble that remark! :shock:

As one of those who asked for the chances of losing my scoops EVERY :evil: . DARN :evil: . JUMP :evil: . to be reduced after suffering crackerjack pods almost every time I scooped - especially since, as with Illuminaughty, it seemed to happen most often while on UPS cargo-hunting missions - I take umbrage at your insinuating I want everything handed to me on a plate.


If you want your umbrage back, it's in that little ticking cargopod in the corner. But don't worry, there's only a 1-in-10 chance it'll explode....

(And is it just me, or do other people have the "problem" where the first pod you pick up gives you a random cargo, but then everything else you scoop in that system is exactly the same - I don't mind too much when this gives me Computers in a Poor Agricultural system, but I mostly seem to get Food or Textiles... :( )
You really want to know what's gonna happen, Ambassador? Boom. Boom boom. Boom, boom, boom, boom, boom. BOOM!
Post Reply