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
  #1  
Old 05-21-2020, 10:24 PM
webfischi webfischi is offline
Approved Member
 
Join Date: Dec 2019
Posts: 10
Default Indefinite damage with mask of envy

It looks like I'm the first who was able to catch that bug. When you attack, the damage is indefinite (zero).

The code for this mask is in arena.lua line 859-884 and looks like this:

Code:
  -- маска Зависти
	if hero_item_count2("sp_bonus_level_damage", "count") > 0 then
		if attacker ~= nil and receiver ~= nil and damage > 0 then
			local atk_level = Attack.act_level(attacker)
			if Attack.act_feature(attaker,"pawn") then 
				atk_level = 3
				if Attack.act_feature(attaker,"boss") then
					atk_level = 5
				end
			end
			
			local rec_level = Attack.act_level(receiver)
			if Attack.act_feature(receiver,"pawn") then 
				rec_level = 3
				if Attack.act_feature(receiver,"boss") then
					rec_level = 5
				end
			end
			
			if atk_level > rec_level then
				damage = damage * (1 + (atk_level - rec_level) * hero_item_count2("sp_bonus_level_damage", "count")/100)
				addrage = addrage * (1 + (atk_level - rec_level) * hero_item_count2("sp_bonus_level_damage", "count")/100)
			end
			
		end
	end
Edit: After further investigation, the game doesn't get anything from the "damage" equation, I added a line that should set damage to 1 no matter what solution was calculated earlier, and the game still says 0, so I guess it is missing some kind of return value.

Last edited by webfischi; 05-24-2020 at 10:45 PM. Reason: removed idea
Reply With Quote
  #2  
Old 05-22-2020, 08:17 AM
Csimbi Csimbi is offline
Approved Member
 
Join Date: Dec 2008
Posts: 254
Default

Quote:
Originally Posted by webfischi View Post
It looks like I'm the first who was able to catch that bug. When you attack, the damage is indefinite (zero).
I would not say it's indefinite.
The damage never yields 0 (unless damage was <= 0 to begin with), but yes, it does yield 0 damage bonus in most cases.
Item allows wearer to hit weaker enemies with increased damage.
So, I think that's the idea.
That said, it looks ok to me.
Reply With Quote
  #3  
Old 05-24-2020, 11:11 PM
webfischi webfischi is offline
Approved Member
 
Join Date: Dec 2019
Posts: 10
Default

I'll add a savegame to try and investigate, because every attack in this example will be zero.
Attached Files
File Type: zip 1590025775.zip (1.69 MB, 4 views)
Reply With Quote
  #4  
Old 05-30-2020, 03:27 AM
webfischi webfischi is offline
Approved Member
 
Join Date: Dec 2019
Posts: 10
Default

Just found out how to enable dev mode with the Steam version, and the debugger seems to be unhappy with "nil" in line 861, so there is the main issue. Now I am pretty sure they never playtested the DLC when the game is screeming at me, that this is wrong.
Reply With Quote
  #5  
Old 06-03-2020, 05:39 AM
clim77 clim77 is offline
Approved Member
 
Join Date: Aug 2017
Posts: 1
Default

Quote:
Originally Posted by webfischi View Post
Just found out how to enable dev mode with the Steam version, and the debugger seems to be unhappy with "nil" in line 861, so there is the main issue. Now I am pretty sure they never playtested the DLC when the game is screeming at me, that this is wrong.
Hi, webfischi, can you explain how to enable dev mode, please? Thanks!
Reply With Quote
  #6  
Old 06-03-2020, 10:44 AM
Space Knight Space Knight is offline
Approved Member
 
Join Date: Aug 2017
Posts: 81
Default

Quote:
Originally Posted by clim77 View Post
Hi, webfischi, can you explain how to enable dev mode, please? Thanks!
So, first, make sure you have a shortcut to the game on your desktop. After that, right-click and press properties. After \kb.exe" section in Target, add " -dev", like this: \kb.exe" -dev (don't put comas after dev). Now, press Apply and then Ok. You can now play in dev mode by starting the game from the shortcut.
Reply With Quote
  #7  
Old 06-04-2020, 03:47 PM
webfischi webfischi is offline
Approved Member
 
Join Date: Dec 2019
Posts: 10
Default

Right click your King's Bounty game in your steam library, Properties, Set Launch Options and type "-dev" without quotes of course. This starts the game in dev mode not just from a short cut.
Reply With Quote
  #8  
Old 11-03-2020, 12:08 PM
zelurker zelurker is offline
Approved Member
 
Join Date: Jan 2014
Posts: 5
Default

I wouldn't have believed this topic was still active after so many years !
Now maybe it would be a good idea to have some kind of central repository for the fixes which can still be useful, like github although these kfs files would not be very convenient for git, but it's worth trying to setup something, most links in these pages are dead now, only the code directly displayed or the attached files are still usable...
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:41 AM.


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