This tutorial assumes that:
Well this one is a bit more complicated than just adding a new art object or gem. We will need to edit two different files:
Under this section are all the coin units and their relative values. We need to add the following line after theunit cp;
pp
definition:
We will use "jp" as the abbreviate for "jade pieces." Save this file.unit jp = 50 gp;
Next, we need to open up the "treasure.bsk" file. Now, this is a rather
large file so we need to be careful not to edit something that we don't
want to change. Use your text editor and search for the first instance of
coin.cost
, then scroll down a little bit and look for this.
These are the descriptions and the names of the coins as they will appear. Remember that anything that you put in the quote will appear in the console box. We will be adding the lines:is "cp" then desc = "copper"; is "sp" then desc = "silver"; is "gp" then desc = "gold"; is "pp" then desc = "platinum"; default desc = "unknown";
after the platinum section so it will now look like this:is "jp" then desc = "jade";
So now you have added the value of the Jade pieces in the "units.bsk" file and we added the visual output translation. If we didn't add this then the console would list it as an unknown type which as you can see by the code is the default setting. But right now none of the treasure percentages are including jade pieces. We will need to change that in the "treasure.bsk" file as well. To accomplish this we will need to edit the encounter levels, which are the first 12 pages of this file. Decide what encounter levels that you want your new coins to be found at. I decide that I want it to be encountered at levels 19 to 30. You will notice that the Encounter level tables end at 20, since encounter levels 21 to 30 are the same as level 20, except for the number of major magic items they bestow. Thus, we only really need to change two sections to effect all 11 levels. Scroll down the top half of the file till you find this:is "cp" then desc = "copper"; is "sp" then desc = "silver"; is "gp" then desc = "gold"; is "pp" then desc = "platinum"; is "jp" then desc = "jade"; default desc = "unknown";
The numbers that you see in the "[ ]" are the weights for those items. The larger the number, the more likely it is to appear. "Null" means nothing will appear. The "magnitude" is the number of coins appearing. If you're bothering to edit the code of a treasure generator for a role playing game, you should already understand the numbers that follow the magnitude -- it's a dice specification.// Encounter Level 20 category cTrLevel20Coins [ 2] null [63] { .magnitude 4d8*1000 gp } [35] { .magnitude 4d10*100 pp } end
So we need to add our jade pieces, and we can do so as follows:
This means that I have a 8/108 (about 7.5%) chance of getting 2d10*10 jade pieces. Remember that we made them worth 50 gp each so we don't want to give a ton of them.category cTrLevel20Coins [ 2] null [63] { .magnitude 4d8*1000 gp } [35] { .magnitude 4d10*100 pp } [ 8] { .magnitude 2d10*10 jp } end
Now simply go back to the line starting with:
and edit those fields as you wish. Don't forget to compile the database afterwards, otherwise the changes will not take effect.// Encounter Level 19