Wow, thank you guys!
Sir Whiskers, I know easy mode does give more gold than normal, although I believe 3x is a bit much.. I may alter that setting (maybe 1.5-2x, or just leave it at 1x) regardless of anything else, since it seems excessive, unless I'm losing my entire army every battle. Still, I was mainly trying to change the contents of the chests themselves, because it's at a point where I don't even want to waste a few turns of battle and risk my troops suffering more damage and possibly lose someone trying to pull a chest that will pretty much always have some more useless gold (lol) in it.
Bucazaurus seems to have found it though; I didn't think that dragon chests were any different from chests generated anywhere else on the map, so I didn't think to check the pet files. Sure enough though, the same block of chest generation code is in there (minus the items, of course.) That said, I do recall at one point while I was trying to play with the boxes.lua file that I got some kind of sword from a chest my dragon dug up. I don't know how that was possible.
I notice that orcs.kfs also contains an addon_pet.lua file though, and it seems to have more lines of code in it, I assume for some new OotM stuff, so I'm porting your changes over to that file instead. I believe the changes should be the same regardless, but I would like to ask if you know how to decipher the numbers you are using. I have not yet tested it, but reading through the code, I see that you changed the values to K-15 instead.
If everything is set to K-15, wouldn't every item trigger at the same time with 15% chance? If it's picking a number, say 12, it would satisfy every single condition simultaneously.
Unless I'm misreading this code, and "K" gets modified while it simply goes down the list (for example, it rolls 36; 36-15=21 to fail first condition for runes; 21-15=6 fail second condition for crystals; 6-15<0 triggers third condition for scrolls.)
The last "scrolls" function (I assume this is for wanderer scrolls, since it doesn't have an additional sub-function to roll for quantity) you also changed the success condition to K < 96. What is the reasoning behind this change, and what does this do? This would mean that pretty much every number under 99 would return true for this function.
Finally, on the gold drop itself (I assume it goes to this last function if all other functions have failed to return true, which I'm thinking it won't because you set the wanderer function to act as a catch-all last resort?) then it will drop gold based on several multipliers, but I don't understand why the *7 is being overridden immediately by a roll for *1, *2 and *4. I'd assume a larger multiplier (in this case, *4) would be more gold, and by changing the numbers to R < 97 and 98, you drastically reduce the chances of *2 and *4 from occurring?
I'm sorry for all these questions, but I'm interested in figuring out the logic behind how this works so that I may fine tune the numbers more.
Nonetheless, thank you guys for all the help as it is. I appreciate any more clarification.
|