Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   King`s Bounty: Warriors of the North (http://forum.fulqrumpublishing.com/forumdisplay.php?f=206)
-   -   Bugfixes (http://forum.fulqrumpublishing.com/showthread.php?t=35494)

Csimbi 10-31-2012 10:10 PM

In addition, none of these LUA functions appear to work:
Game.MessageBox(...)
Game.InvokeMsgBox(...)
Game.Log(...)
Game.atom_getpar(...)
Plz fix.
Thank you!

Bhruic 10-31-2012 10:15 PM

Those are certainly all source code fixes, and as we don't have access, you'll have to wait for 1C to fix those (should they choose to). Better to report those in the Bugs thread.

camelotcrusade 11-01-2012 12:02 AM

Quote:

Originally Posted by Bhruic (Post 475169)
Critical Hits/Sense Weakness fix - If your hero didn't have the Sense Weakness skill, all critical hits on your units would trigger Sense Weakness (sounds backwards, I know)
In arena.lua, line 553:
Code:

if receiver_human and not receiver_glot then

if receiver_human and not receiver_glot and (skill_power("weakness_lore", 2) > 0) then


Hi - turns out I got a save right smack in front of the guy who casts Doom, so I just tested and the bug is still happening. Then I realized the zip file has addon_arena.lua, not arena.lua, so I didn't have the fix installed. So I went into the arena.lua file to mod it myself, but I don't quite understand how to do it. At 553 (and the next few after) it says:

Code:

      if receiver_human and not receiver_glot then
          kritProb = kritProb - skill_power("weakness_lore", 2)
          if kritProbRnd < kritProb then
            iskrit = false
            is_weakness_lore = true

Where do I make the changes? Am I adding that line you show right after it?

Zechnophobe 11-01-2012 12:02 AM

Quote:

Originally Posted by Bhruic (Post 475834)
That'd involve less steps, certainly. I think mine's slightly more elegant in that it requires less steps if you don't have Sense Weakness. Of course, I might be biased. ;)

Hmm, just for the sake of discussion...

I wasn't optimizing for speed, since that is no doubt a non-issue with something like this. More just for how clarity and ease of debugging. Calling in additional functions to do your logic like that makes the code slightly weightier. And then, any edit to an external source should generally be simple so as a diff is easy to understand. Seeing:

Code:

Blah blah < bleh bleh
Turn into

Code:

Blah blah >= bleh bleh
Is pretty clear what the problem was, and the solution for it.

Er, not that any of this really matters... I've just been doing code reviews at work recently and it has me thinking about Ivory Tower code production stuff.

Zechnophobe 11-01-2012 12:04 AM

Quote:

Originally Posted by camelotcrusade (Post 475861)
Hi - turns out I got a save right smack in front of the guy who casts Doom, so I just tested and the bug is still happening. Then I realized the zip file has addon_arena.lua, not arena.lua, so I didn't have the fix installed. So I went into the arena.lua file to mod it myself, but I don't quite understand how to do it. At 553 (and the next few after) it says:

Code:

      if receiver_human and not receiver_glot then
          kritProb = kritProb - skill_power("weakness_lore", 2)
          if kritProbRnd < kritProb then
            iskrit = false
            is_weakness_lore = true

Where do I make the changes? Am I adding that line you show right after it?

He is saying change:

Code:

if receiver_human and not receiver_glot then
to

Code:

if receiver_human and not receiver_glot and (skill_power("weakness_lore", 2) > 0) then

camelotcrusade 11-01-2012 12:12 AM

1 Attachment(s)
Lol, thanks. :) I'll try not to hurt myself making the change.

Edit: Aaand... it works! Wolves took the crit.

If anybody needs a crit tester save, you can use this one. Just talk to the berserker guy to fight him - he knows doom. What I have been doing is running the maiden out to grab the chest and then casting summon nature's ally in the hex in front of her. When it's the hero's turn he'll cast doom on the wolves and then his black knight will run up and smack them for a crit (or the sense weakness bug, if you don't put in the fix).

And you probably know this but the save goes in your my documents\my games\KBWoTN saves folder.

RCDOWN 11-01-2012 01:36 AM

Quote:

Originally Posted by Bhruic (Post 475219)
Well, rather than do that approach, I fixed the spell (mostly).

Tnx man, you saved the day! :)

Any hope to fix the famous battle crash using viking buffer troop?

QNk 11-01-2012 03:27 AM

Code:

      if receiver_human and not receiver_glot and (skill_power("weakness_lore", 2) > 0) then
          kritProb = kritProb - skill_power("weakness_lore", 2)
          if kritProbRnd < kritProb then
            iskrit = true
          else
            is_weakness_lore = true

Doesn't the iskrit check also need to be changed to true? What it's doing right now is if a crit is registered, it checks again against a kritProb modified by sense weakness. If iskrit = false, then the game would only register a crit if the random number was LOWER than the initial but HIGHER than the modified kritProb. Or did I misunderstand how the kritProbRnd < kritProb inequality work?

Bhruic 11-01-2012 09:12 AM

Quote:

Originally Posted by Zechnophobe (Post 475862)
Er, not that any of this really matters... I've just been doing code reviews at work recently and it has me thinking about Ivory Tower code production stuff.

lol, I know. I was being semi-facetious. Had I thought of doing it your way first, I would have stuck with that as being the simpler approach. Still, as both ways work equally well, I'm going to stick with the approach I took and call it "better"! ;) (even if it's not)

Bhruic 11-01-2012 09:14 AM

Quote:

Originally Posted by RCDOWN (Post 475894)
Tnx man, you saved the day! :)

Any hope to fix the famous battle crash using viking buffer troop?

That's the first I've heard of it. Do you have a save where I could witness it happening? Although there's a decent chance the crash is caused by the actual compiled code rather than a script, it's still worth a look.


All times are GMT. The time now is 01:29 PM.

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