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: The Legend > Mods

Mods Everything about mods

Reply
 
Thread Tools Display Modes
  #1  
Old 01-27-2013, 11:18 PM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 553
Lightbulb Try this...

Quote:
Originally Posted by Sir Whiskers View Post
Yep, the mod works now. Thanks.
Thank goodness!

Quote:
Originally Posted by Sir Whiskers View Post
I'm not sure the creature containers are working as intended. I modified the hero.txt file to add some to my start and none showed any variability (no twins, no different results). To further test, I tried:
1) after finding/buying several in Greenwort
2) after traveling to a new area on the first island

But the results didn't change.

Thorn Seed = Thorn Hunter (or Royal Thorn, if using multiple)
Dragonfly Egg = Fire Dragonfly
Spider Egg = Venomous Spider
Snake Egg = Snake
Coffin = Skeleton
Carved Coffin = Vampire
I've been getting variability, but can you do me a favor and add, say, 10 Spider Eggs and 10 Snake Eggs to your HERO.TXT and then start a new game and try to use them, but only 1 at a time and 1 after another.

So use only 1 egg at a time and let me know if it is the same every time.

I actually was using the code that they had setup for this, but there wasn't variability and so I changed it and it seemed like it was working, but I'm still using a part of the original code that doesn't quite seem totally random to me.

So try that, note that for twins the possibility is really low (3% for Dragons and 6% for Griffins).

/C\/C\
Reply With Quote
  #2  
Old 01-28-2013, 10:52 AM
Sir Whiskers Sir Whiskers is offline
Approved Member
 
Join Date: Dec 2008
Posts: 149
Default

Quote:
Originally Posted by MattCaspermeyer View Post
I've been getting variability, but can you do me a favor and add, say, 10 Spider Eggs and 10 Snake Eggs to your HERO.TXT and then start a new game and try to use them, but only 1 at a time and 1 after another.

So use only 1 egg at a time and let me know if it is the same every time.

I actually was using the code that they had setup for this, but there wasn't variability and so I changed it and it seemed like it was working, but I'm still using a part of the original code that doesn't quite seem totally random to me.

/C\/C\
I performed such testing in my first game and no variability/twins after using a couple hundred containers. However...

I started a new game and some of the containers gave different results (fire spiders, lake dragonflies). I started a third game, and again some containers gave different results (skeleton archers). But within a specific game, the results never varied.

So, it appears the random function is working fine when the game starts. I suspect it will also kick in whenever I find a container (not buy). That would match what I saw in AP/CW, where modifications to the Item_Monster file would not take until I found a container of the type I had modded. If that's the case, then I would guess that the random value is being saved in the game and not changing until certain trigger events.

I'll keep testing the containers at various points to see if they change within the same game and let you know.

Last edited by Sir Whiskers; 01-28-2013 at 10:56 AM.
Reply With Quote
  #3  
Old 01-28-2013, 03:34 PM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 553
Question Interesting...

Quote:
Originally Posted by Sir Whiskers View Post
I performed such testing in my first game and no variability/twins after using a couple hundred containers. However...
Right. You must either reacquire the container or restart.

Quote:
Originally Posted by Sir Whiskers View Post
I started a new game and some of the containers gave different results (fire spiders, lake dragonflies). I started a third game, and again some containers gave different results (skeleton archers). But within a specific game, the results never varied.
Hmmm... I've been experiencing different results here, but I was level 6 (unsure if that matters) after starting a new game with the new variants.

I used 22 Spider Eggs (1 at a time) and I was able to get each type of unit (although the percentages didn't appear to match the percentages that I have listed). I also got a pretty good split between Thorns and Thorn Warriors (biased towards Thorn Warriors) when I used 12 seeds individually. I only had 2 Skeleton Graves, but got one of each and 3 Vampire Coffins and 2 instances of Vampires and 1 of Ancient Vampires.

Quote:
Originally Posted by Sir Whiskers View Post
So, it appears the random function is working fine when the game starts. I suspect it will also kick in whenever I find a container (not buy). That would match what I saw in AP/CW, where modifications to the Item_Monster file would not take until I found a container of the type I had modded. If that's the case, then I would guess that the random value is being saved in the game and not changing until certain trigger events.
When I was testing initially in TL, buying the container reset the item's item parameter list and allowed the objuse_spawn_troop function to work on the new data therein. I'm not sure if they've changed this in AP/CW, but to me it shouldn't matter whether you pick one up or buy in TL.

Incidentally, if you don't restart a new game, and you use the item, the new item parameters will not show up when using the objuse_spawn_troop function. The item parameter data is only refreshed when reacquiring the item, hence why it doesn't work with a current save. Believe it or not, that function was already setup for random functions, but as you so astutely note it only changed with each new game (as they were using the Game.Mutate function which is a random function, but only for each game). There is another function, diap that is in LOGIC_HERO.LUA that is used for certain hero things and that's what objuse_spawn_troop is set up to use. The number I'm sending to diap is random (Game.Random( 1, total_prob)), but diap also uses Game.Mutate.

So therein may be the issue, I may try to use another of their built-in random selection functions as it seems that I need to work on this part of the code more.

Quote:
Originally Posted by Sir Whiskers View Post
I'll keep testing the containers at various points to see if they change within the same game and let you know.
Well that sounds great! I'll keep fiddling, too, and hopefully we'll get to the bottom of this!

/C\/C\
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 09:05 AM.


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