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: Warriors of the North

King`s Bounty: Warriors of the North Next game in the award-winning King’s Bounty series

Reply
 
Thread Tools Display Modes
  #51  
Old 10-31-2012, 10:10 PM
Csimbi Csimbi is offline
Approved Member
 
Join Date: Dec 2008
Posts: 254
Default

In addition, none of these LUA functions appear to work:
Game.MessageBox(...)
Game.InvokeMsgBox(...)
Game.Log(...)
Game.atom_getpar(...)
Plz fix.
Thank you!
Reply With Quote
  #52  
Old 10-31-2012, 10:15 PM
Bhruic Bhruic is offline
Approved Member
 
Join Date: Oct 2012
Posts: 233
Default

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.
Reply With Quote
  #53  
Old 11-01-2012, 12:02 AM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

Quote:
Originally Posted by Bhruic View Post
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?
Reply With Quote
  #54  
Old 11-01-2012, 12:02 AM
Zechnophobe's Avatar
Zechnophobe Zechnophobe is offline
Approved Member
 
Join Date: Nov 2009
Posts: 991
Default

Quote:
Originally Posted by Bhruic View Post
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.
Reply With Quote
  #55  
Old 11-01-2012, 12:04 AM
Zechnophobe's Avatar
Zechnophobe Zechnophobe is offline
Approved Member
 
Join Date: Nov 2009
Posts: 991
Default

Quote:
Originally Posted by camelotcrusade View Post
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
Reply With Quote
  #56  
Old 11-01-2012, 12:12 AM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

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.
Attached Files
File Type: zip crit save.zip (1.15 MB, 60 views)

Last edited by camelotcrusade; 11-01-2012 at 12:25 AM.
Reply With Quote
  #57  
Old 11-01-2012, 01:36 AM
RCDOWN RCDOWN is offline
Approved Member
 
Join Date: Oct 2012
Location: Ardania
Posts: 44
Default

Quote:
Originally Posted by Bhruic View Post
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?
Reply With Quote
  #58  
Old 11-01-2012, 03:27 AM
QNk QNk is offline
Approved Member
 
Join Date: Apr 2010
Posts: 16
Default

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?
Reply With Quote
  #59  
Old 11-01-2012, 09:12 AM
Bhruic Bhruic is offline
Approved Member
 
Join Date: Oct 2012
Posts: 233
Default

Quote:
Originally Posted by Zechnophobe View Post
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)
Reply With Quote
  #60  
Old 11-01-2012, 09:14 AM
Bhruic Bhruic is offline
Approved Member
 
Join Date: Oct 2012
Posts: 233
Default

Quote:
Originally Posted by RCDOWN View Post
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.
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 04:08 AM.


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