Treasure Tables?

8 posts / 0 new
Last post
#1
Treasure Tables?

Could we get a guide as to how treasure tables actually work? The rules outlined in "Encounters" (from the mod documentation http://bluebottlegames.com/main/forum/10) doesn't seem to apply fully to them.

Especially overwriting tables with new information.

This is surprisingly complicated. To explore this, let's go over an example.

Cryo Start Room

This is the room which you start the game in, with some random shards. Let's look at the treasure table for this one.

<table name="treasuretable"> <column name="id">164</column> <column name="strName">cryo idle loot</column> <column name="aTreasures">0.0x0x1-1,86.6x1.0x5-9</column> <column name="bNested">0</column> <column name="bSuppress">0</column> <column name="bIdentify">0</column> </table>

What we are looking for is the "aTreasures" which tells us which items will be in there. How to parse this, though, is a bit tricky.

Let's first dissect the entry there, which is 0.0x0x1. This is the item id times the chance of appearance times the number of appearance. Let's delve into this.

1) Find the Item!

The first item in there has the ID of 0.0. As far as I can tell, only items have this kind of nomenclature. What this means, initially, is that we need to look for an item with the GroupID of 0, and SubgroupID of 0.

A quick search for "nGroupID">0 gives us..

<table name="itemtypes"> <column name="id">461</column> <column name="nGroupID">0</column> <column name="nSubgroupID">0</column> <column name="strName">blank</column> <column name="strDesc">blank</column> <column name="strDescAlt"></column> <column name="nCondID">1</column> <column name="vImageList">ItmVialYellow.png</column> <column name="vSpriteList"></column>

Okay! So we have some sort of a blank item with a Yellow Vial? That certainly doesn't match the start of cyro that we know. What blank item?

Fortunately, let's look again at the entry. What's the odd of appearance? 0. So it has a 0 percent chance of appearing.

No wonder we don't see it.

So let's look at the next item, which is 86.6x1.0x5-9!

2) Find the Shard!

A quick search for "nGroupID">86 gives us..well, quite a few things. But we finally find what is groupID of 86 and subgroup ID of 6.

<table name="itemtypes"> <column name="id">276</column> <column name="nGroupID">86</column> <column name="nSubgroupID">6</column> <column name="strName">small parts</column> <column name="strDesc">shard</column> <column name="strDescAlt"></column> <column name="nCondID">1</column> <column name="vImageList">ItmGlassShard.png</column> <column name="vSpriteList">20=CreItmSmBladeL.png,21=CreItmSmBladeR.png</column>

Does this match 86.6? You betcha. Let's finish parsing this:

86.6x1.0x5-9.

So we have an item id of 86.6, or glass shard. We have a 1.0 or 100% chance of that happening. And we have between 5-9 of them.

That's what we see in the beginning of the game. So it all matches up.

Additional Homework

Mod in a new shotgun to the start location! Hint, the item code is 60.8.

This is useful, but what about adding this as a MOD as opposed to editing the existing tables?
Do you need to use the "0:" code for the default, or will it know the defaults directly?

Eg. If I wanted to mod the existing cryo would the shards spawning change from

"86.6x1.0x5-9"

to

"0:86.6x1.0x5-9"

Now my question:

How do I choose to spawn items as "weathered" or in 100% condition?

You don't. The items given by standard TresureTables (lying around or found during scavenging) will always be weathered, while items given by the same Tables, but aquired from encounters, will be always 100%. Creatures always drop 100% items as well, but you can give them "Weathered Loadout" condition (ID 535) which will turn their stuff into degraded one.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

So in order to "weather" items from encounters, make the item "appear" in locations accessible to the player to automatically weather it?

Sorry mate, but I don't understand your question.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Assume that I wish to have my encounter create weathered treasure for my character.

1) Provide Treasure to player

This will always spawn it as 100% for the player.

2) Teleport the player to a hidden hex

In this hidden hex, I can have idle items laying around, and this will be automatically weathered?