Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > King's Bounty > King's Bounty: Armored Princess > Mods

Mods Armored Princess mods

Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2011, 03:18 PM
DarkScythe DarkScythe is offline
Registered Member
 
Join Date: Jan 2011
Posts: 13
Default

Thanks for the information, bucazaurus.

I think there may be a mistake with your assumption though, but then I'm also making assumptions. It would help if someone more experienced with this code could step in to clarify a few things.

Quote:
Originally Posted by bucazaurus View Post
To be honest with you , i had no idea what i did. I saw your post and decided to experiment . My logic behind the numbers was that the game rolls a number ranging from 0 to 100 to decide what the reward will be...

if r < 97 then (...so only if the number rolled is higher then 97 the gold will be generated with that amount .) This says if "r" is less than "97" so it should give gold if it rolls 0-96, I think.
Boxgen.parcount( "money", "*1" ) -- ãåíåðèì äåíåã Mini

Another example.
K = K - 15 (any number below this will generate gold) I believe this should also be the opposite; The next line states if K is less than zero (negative) then it rolls to determine what "r" should be.
if K < 0 then
local r = Boxgen.rnd(100)

if r < 20 then (if the number rolled is between 15 and 20 you get 3 crystals) I think this would be from 0-19, since it's looking for "r" to be less than 20.
Boxgen.parcount( "crystals", "3" )
elseif r < 50 then (if number is between 20 and 50 you get 5 crystals)
Boxgen.parcount( "crystals", "5" )
elseif r < 65 then (and so on )
Boxgen.parcount( "crystals", "10" )

Again , this is how i thought the system works. It might be wrong , but it seems is working.
That said, your tip about looking in the pet files was definitely key.
I spent yesterday testing and trying different values, but I think I've found a balance.

addon_pet.lua definitely alters the chests dug up by the dragon's "treasure searcher" ability, but does not affect chests that already appear on the battlefield when you begin sometimes.

These "pre-existing" chests are modified by boxes.lua that I was working with before it seems. I tested this by, again, setting the "items" chance to 100%, then found a battle with a chest in it. Without my modification, it yielded some gold. After I added the modified file, it instead gave me a "silver rapier" sword. I restarted the battle a few times and it always gave me that one sword.

I have not found the file that modifies the chests that are scattered about the world/adventure map, but I think this is OK because I'm not looking to change those. The chests on the world map are almost always guarded by armies, and those actually make sense to have a lot of gold, since they're being protected.

With that, I went ahead and modified all the "battlefield" chests to give what I feel is a better representation of what these chests should have, while trying not to affect the balance too much. Still, this is a deviation from vanilla, so there WILL be a change in game balance regardless.

From a previous post on these forums,
Quote:
You can get artifacts only from pre-existing chests on the battlefield. Those have the following chances:
- Gold (76%)
- Random scroll (15%)
- Crystals (5%)
- 1 random rune (3%)
- 1 wanderers' scroll (1%)
- random item (1%) - level of the item is based on the difficulty of the battlefield

Chests dug up by the dragon give:
- Gold (72%)
- Random scroll (15%)
- Crystals (5%)
- 1 random rune (5%)
- 1 wanderers' scroll (3%)
I've modified the chances to the following so far:

Quote:
Dragon's chests:
25% for 3 Runes
30% chance of crystals [15% for 3, 40% for 5, 30% for 10, 15% for 15]
15% random scroll [50% for 1, 30% for 2, 20% for 3]
20% wanderer scroll
10% gold [10% "mini" amount, 50% "small", 40% "average"]

Battlefield chests:
25% random item
20% for 5 runes
15% chance of crystals [20% for 5, 50% for 8, 30% for 10]
10% random scroll [same sub-percentages as dragon's]
20% wanderer scroll
10% gold [same sub-percentages as dragon's]
These percentages are based on my assumption of how the code is working, of course. From my bit of playtesting, it seems to be working out well, I'm getting gold still, but much less often than before, and I'm always now interested in digging to see what I find.

The chances are increased quite a bit in some cases, but my reasoning is as follows:
Lower chance of gold means you no longer assume every chest will be gold anyway and stop trying to dig for them (when you have 1mil gold, getting more gold is kind of annoying) but when it does come up with gold, it should be a decent amount. This also means the gold-filled chests scattered around the map are much more valuable.

The next logical thing to hoarde in a chest besides gold, are jewels; in this case, magic crystals and runes. I'm still working out the best numbers for them, but as it's a buried treasure chest, I felt it should be a little more than what you can find lying around on the map in the open. The battlefield chests have more runes (and I may give it more crystals and lower the dragon's chest's crystals instead) because those are random and you cannot dig for them or force them to appear, so there should be a bigger incentive to rush for them. After that, the wanderer scrolls are more valuable than regular spell scrolls, so I increased their chances slightly.

I may eventually copy the code in to randomize the runes you get from 2-4 or 5 maybe, but I'm still testing everything right now.

Sorry for the lengthy rant, but thanks again for helping me out; I appreciate it.

I've attached what I have so far. If anyone tries it out, please let me know what you think. I'm too new to the game to tell what unforeseen consequences this could have.

Thanks!
Attached Files
File Type: zip Modified Treasure Chests-Beta1.zip (8.4 KB, 415 views)
Reply With Quote
  #2  
Old 01-20-2011, 07:42 PM
MaroonMaurader MaroonMaurader is offline
Approved Member
 
Join Date: Jan 2010
Posts: 91
Default

Yeah, that code will work as you described. I think I posted a while ago asking if anyone knew how to get the game logic to check (from in the post-battle screen; in arena.lua iirc) what level your dragon treasure ability was at. My thought at the time was to modify the post-battle logic to act as if you had used the dig ability to dig up all available chests, while modifying the dragon ability script to pretend that there were no treasure chests available to dig up.
1. Give you 3 randomly selected pet-dragon chest rewards. Relatively easy modification of the script.
2. Give the pet dragon the appropriate experience. Would have been tricky - I'm not sure if the dragon can be given exp out of battle, so I might have had to give up on this idea or find an alternate workaround (e.g., give the experience at the start of the battle, or the start of round 1).
3. Increment the "rage used" counter for medals and statistics appropriately based on your skill level.

A minor cheat, but a big time-saver. Problem was I never got off ground zero, because I never could figure out (and nobody else filled me in) how to check dragon skill levels. If you happen to figure that out in digging around (aha...ha...ha...), let me know.
Reply With Quote
  #3  
Old 01-22-2011, 05:39 AM
DarkScythe DarkScythe is offline
Registered Member
 
Join Date: Jan 2011
Posts: 13
Default

That sounds incredibly complicated for what appears to be very little gain aside from some laziness in battle. That said, I'll try to poke around a bit and see if I can dig up anything related to that.
Reply With Quote
  #4  
Old 09-10-2011, 10:25 AM
shinjiikuri shinjiikuri is offline
Approved Member
 
Join Date: May 2010
Posts: 10
Default

Any chance of this mod being adapted for crossworlds?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.