First I want to mention that when editing the base files you'll lose the changes Contra & my mods made. Which can result in stuff reverting to base game and breaking. Fixes like the cube or boss drops. In order to keep the changes we made you would have to convert the newest file probably my mod from cooked.txt to txt.
Oh absolutely. I'd have mentioned this, but considered it a given.
So just noting this for future reference. Tweaking any mod requires using the mod's own files, since that's where the mod's changes are. Applying changes to the base files and using those would effectively revert any change the mod made to that file - and since most changes span across multiple files, this would also break a bunch of connections.
how can I find the item I need and indicate its drop location and chance?
To find an item in items.txt, you may first need to look up its in-game name in the item strings (strings_items.xls). This is where item names are "translated"; eg, Hotshot is "FirebolterMk3 Unique 01", so you'd need to look for it under that name.
Once you do, you can follow the process I outlined above:
Generic drop settings (eg base item types, level ranges, rarity, and spawnability) are defined per item in items.txt. Drop tables and drop chances are determined in treasures.txt, and drop tables are assigned to monsters in monsters.txt. So you can:
- Pinpoint an item of choice in items.txt, and ensure it can drop
- Add said item to an existing or new treasure table in treasures.txt
- Assign this treasure table to an enemy of choice in monsters.txt
That's for designated boss/named enemy drops, of course. If you just want to make an item drop generally, you can set it up this way in items.txt.
In your case, it sounds like you want to assign a specific item to a specific enemy. You have two choices in this regard; either change the enemy's entire treasure table into a new one, including your new item, or add your new item to its existing treasure.
I'll assume you want to do the latter, so here I'll provide the example of wanting to add Hotshot to Shulgoth's loot.
- Find Hotshot's name in strings_items.xls. Here this is "FirebolterMk3 Unique 01".
- Find Shulgoth's name in strings_monsters.xls. Here this is "shulgoth", so it's easy to locate, but in other cases it may be different.
- Find "shulgoth" in monsters.txt, and look for the entry in its "treasure" column to find the name of its treasure. Here this is "boss_shulgoth".
- Find "boss_shulgoth" in treasures.txt.
Here you'll see treasures in "item" columns often split into sublines that read "tc:[name]". This is what you'll also need to do for drop chance customizability, so
- Find the next available "item" column in "boss_shulgoth" and write "tc:Hotshot" (or whatever name you prefer). This is the name of the new subline you'll create.
- In the "value" column next to it, use the number of times you want the treasure line to apply. This will usually be 1.
- Go to the end of the file, and create a new line with the name "Hotshot" in the "treasureclass" column. This is what your "tc:Hotshot" entry from above will pull.
- In your new line's "item1" column, insert "FirebolterMk3 Unique 01". In the "value1" column next to it, use 1.
- To adjust drop rates, find the column "nodrop" in your new line and put in your number of choice. The number you use will be how often it does NOT drop; so if you want drop chances of 5%, you need a "nodrop" value of 95.
- Fill in the rest of the fields of your new line, so they match existing lines. If you need any specialized settings, you can experiment with them over time.
This is the basic process, but it does require some care and attention. Look for patterns and precedents; if a bunch of fields have "false" set throughout the file, your new line likely needs that too. Type names carefully, and take the time to really grasp how these connections happen; it's very easy to make mistakes if you don't.