Items tag

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

Looking at the wiki

Code: Select all

<Items>
    <Itemcount="1d12"item="&itEuropanIceVodka;" />
    <Table>
        <Nullchance="20"/>
        <Lookup chance="80" count="1d3" table="&trConsumables1;"/>
    </Table>
    <Table count="2">
        <Lookup chance="40" count="1"table="&trMajorItem2;"/>
        <Lookup chance="60" count="1"table="&trMajorItem3;"/>
    </Table>
</Items>
NOTE : I'm using 'item type' to mean specific type of item. e.g. 63 x Palladium Ore = one item type.

I'm not sure how to interpret all of that. For a start the count="2" on the second table - does that means you get two item types, each from either trMajorItem2 or trMajorItem3 depending on the RNG ?

I take it that you have a maximum of 6 different item types, and a minimum of 3 ?

Can you extract the original <items> data from a station object ? i.e. Suppose I wanted to look at a station and calculate what the minimum / maximum number of initial different item types were.
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

That table will produce:
- 1-12 Ice vodkas
{ - 20% chance of nil
- 80% chance of (1-3 entries in trConsumables1)
- 2 entries from:
{ - 40% chance (1 entry from trMajorItem2)
- 60% chance (1 entry from trMajorItem3)


The tables can be found in Transcendence.xml starting at line 5253:

trConsumables1 has the following criteria:

Code: Select all

<RandomItem
		criteria=			"fmut +Consumable; -Illegal; -Military"
		level=				"1"
		levelCurve=			"2"
		/>
There are tons of items that fit in there, so I won't go through them all, but once it picks a specific itemType (like Palladium) it will generate the 'average amount appearing' for that item (1d8 for palladium) and counts as 1 entry.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

Thanks, that's what I figured was likely - but what about my last question? Is the data in the <items> block accessible in some form after the station has been generated?

You can look at the station object and see that it has 5 Ice Vodkas, 2 Grade A Centauri Grain, 1 Megathere meat (or whatever) but can you tell anything about how those were generated?
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

I don't think so, you can try to infer by using objGetBuyPrice and objGetSellPrice.

objGetSellPrice will return the price the station sells an item (the player buys) or Nil if the station will not sell it.
- An ice farm returns nil for helium3 fuel rods
- A CW station returns 1650 for a dual recoilless cannon (whether it was generated by the station's <Items> table or the player sold it to the station)
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
Post Reply