number of appearing items question

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

do the item count

Code: Select all

<Items>
			<Item count="20d6" item="&itDragonflyCartridge;"/>
overrides the number of appearing items in the itemtype?

Code: Select all

<ItemType UNID="&itDragonflyCartridge;"
			name=				"Dragonfly missile cartridge"
			level=				"4"
			value=				"25"
			mass=				"50"
			frequency=			"common"
		-->	numberAppearing=	"10d20"
If not, how does it work ?
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

I am assuming that is the case.

The numberAppearing value probably only affects <Randomitem> tags. I am not sure though.


EDIT: If you put

Code: Select all

<Items>
	<Item count="200d600" item="&itDragonflyCartridge;"/>
</Items>
you will end up with a lot of Dragonfly cartridges. Thus, the numberAppearing value is overidden in this case.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

thanks F50, but my idea was a little more complicated:
i have itemtypes with numberAppearing= "xxxx"

the itemtypes are inside a randomtable &trSomeName
each one has a number of Count = "yyyyy"

Code: Select all

<ItemTable UNID="&trTM7Ammo;"> <!--General table for the Taikon TM multitarget cannon (not anymore TM7) -->
	<Table>
		<Item chance="25" count="1d4"	item="&itTM3Warhead;" />
		<Item chance="25" count="1d4"	item="&itTM7Warhead;" />
		<Item chance="25" count="1d4"	item="&itTM10Warhead;" />
		<Item chance="25" count="1d4"	item="&itTMFWarhead;" />
	</Table>
</ItemTable>
then i want to call the randomtable in code using objAddRandomItems like:

Code: Select all

(objAddRandomItems ship &trTM7Ammo; (random 10 100))

how many warheads are going to appear ? xxxxx or yyyyy or 10-100 ?
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

My guess would be yyyyy multiplied by 10-100.

You will have to check for yourself by doing an <OnCreate> event in the playership:

Code: Select all

(objAddRandomItems gSource &trTM7Ammo; (random 10 100))
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

ok, I finished doing some tests with the random appearing items using tables or not:

Here I pasted some code from my tests, as reference:

Code: Select all

<ItemTable UNID="&trTM7Ammo;"> <!--General table for the Taikon TM multitarget cannon (not anymore TM7) -->
	<Table>
		<Item chance="25" count="4"	item="&itTM3Warhead;" />
		<Item chance="25" count="4"	item="&itTM7Warhead;" />
		<Item chance="25" count="4"	item="&itTM10Warhead;" />
		<Item chance="25" count="4"	item="&itTMFWarhead;" />
	</Table>
</ItemTable>

<Items>
<Lookup count="3" table="&trTM7Ammo;"/>
<Item count="1" item="&itTMFWarhead;"/>
</Items>
The lookup tag will create a number of items from the table (in this case 4 missiles), and the table will be called 3 times (count="3")

objAddRandomItems works in the same way:

Code: Select all

(objAddRandomItems gSource &trTM7Ammo; 3)
This line of code will call 3 times the table and create 4 missiles each time.

The item tag instead will create the number of items stated in the count variable, overriding the numberAppearing (as probably everybody know, of course)


I still don't know when the numberAppearing= "10d20" is used/called.
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Try the Charon Pirate Cache. I think the way it does it numberAppearing will be used.
Post Reply