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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-30-2012, 06:43 PM
Bhruic Bhruic is offline
Approved Member
 
Join Date: Oct 2012
Posts: 233
Default Bugfixes

Downloads offline while investigating latest patch

This thread is dedicated to those bugs that can be fixed by modifying Lua files. For those who know what they are doing, the bug fixes will be listed, but there'll also be a corresponding file to download to enjoy the fixes for the less technically inclined. To save space, changes are included in the same code box, the original first, the modified version second.

For those who are just downloading the file, I'm listing the time of file update at the end of this post, so you can check if it's changed since you last downloaded it.

Diplomacy fix - Diplomacy would only work if the enemy you were attacking had less units than your max leadership, and then could grant you more units than you should be able to take
In skills.lua, line 383:
Code:
local can_join = math.floor(hero_lead/Logic.cp_leadship(atom)) -count

local can_join = math.floor(hero_lead/Logic.cp_leadship(atom)) - hero[atom]
Archmage's Magic Shield fix - The Magic Shield reduced the target units outgoing damage rather than their incoming damage
In unit_special_attacks.lua, line 2199:
Code:
if Attack.act_is_spellattacker, "special_magic_shield") then

if Attack.act_is_spell(receiver, "special_magic_shield") then
Alfheim fix - the Alfheim edda is supposed to only cast beneficial spells on allies and harmful spells on enemies, but it was casting both types on any units
see post #25 for details


The above change is not currently included in the attached zip file

Book of Evil fix (thanks saroumana) - This spell was grossly overpowered
In spells_power.lua, line 1365:
Code:
local bonus = math.floor(100*(creator_power + int_bonus)*int_bonus)

local bonus = math.floor(100*(creator_power + item_bonus)*int_bonus)
Song of Svartalfaheim fix - Was giving too much initiative
In visa.lua, line 170:
Code:
local bonus, penalty = pwr_visa_svartalfheim()

local gold, bonus, penalty = pwr_visa_svartalfheim()
Sense Weakness fix - Sense Weakness gets 1% less chance to apply than it should
In arena.lua, line 553:
Code:
if kritProbRnd > kritProb then

if kritProbRnd >= kritProb then
Spell/Rage crits fix - Criticals were not being applied to either spells or rage attacks
in arena.lua, starting line 880:
insert the following code (in red):
Code:
      end
	else
	  if iskrit then -- íà êðèòàõ
        sdmg = -sdmg * krit
        if receiver_human then
          item_bonus_on_krit(attacker)
        end
      end
    end
    -- Óìåíèÿ Ìàðîäåðà
    if attacker_human and killed>0 and 1000==10 then
Shield of Rage fix (thanks mahey) - Granted the reverse percentage chance of removing a spell (ie, at 10%, it actually had a 90% chance of removal)
in addon_arena.lua, line 1265:
Code:
if (rage_shield_i < Game.Random(1, 100)) then

if (rage_shield_i >= Game.Random(1, 100)) then
Calm Rage fix - The spell could attempt to calm more rage than you currently possessed, resulting in loss of total rage amount
in spells_power.lua, line 990:
Code:
local rage_can_give = math.ceil(mana_can_get/convert_mod)

local rage_can_give = math.floor(mana_can_get/convert_mod)
Soothsayer Ice Storm fix - The freeze effect of Ice Storm would only (and excessively) target the center unit
in unit_special_attacks.lua, line 1190:
Code:
effect_freeze_attack(target, dmgts+dmgts1+1, duration, 0)

effect_freeze_attack(cell, dmgts+dmgts1+1, duration, 0)
Edda fix (thanks Chro) - Edda power wasn't getting calculated properly
in visa_power_hint.lua:
Search and replace, find all instances of "skald_edda", replace with "edda_skald" (should be 9 changes made)

Fear (partial?) fix - Some units are able to use their special abilities when feared - this fix applies to Slingers and Catapults
in arena.lua, line 3700:
Code:
if h > max_hazard then
	max_hazard = h
	target = act
	prob = k * (1 + hit_count*0.5)
end

if h > max_hazard then
	if (mover.spells.spell_scare or mover.spells.effect_fear) then
		if (mover.level >= act.level) then
			max_hazard = h
			target = act
			prob = k * (1 + hit_count*0.5)
		end
	else
		max_hazard = h
		target = act
		prob = k * (1 + hit_count*0.5)
	end
end
Trolls Pacify fix - Pacify was not taking effect
in unit_features_master.lua, line 1469:
Code:
if not not hitbacking then

if not hitbacking then
Ice Prison/Hilda's Arrows fix - Any unit with Ice Prison on it would be destroyed and replaced with an orb if hit with Hilda's Arrows (a nice exploit to be sure )
in addon_pet.lua, line 192:
Code:
everebody_dies = (Attack.act_damage( cell, ignore_posthitmaster ))
if everebody_dies then

everebody_dies = (Attack.act_damage( cell, ignore_posthitmaster ))
if Attack.act_is_spell(cell, "spell_ice_prison") then
	everebody_dies = false
end
if everebody_dies then
Mista's Lightning fix - If an enemy moved before you used this ability, your current unit would lose its turn, and the lightning wouldn't proc for that round
in addon_pet.lua, line 79:
Code:
Attack.done_timeshift(Attack.aseq_time(0))

--Attack.done_timeshift(Attack.aseq_time(0))
Ice Dragon death fix - Ice Dragons were causing crashes when they died
in unit_features_ondamage.lua, line 307:
Code:
if initsize == 1 then
  Attack.log(dmgts, "add_blog_ice_dragon_death_1", "name","   "..blog_side_unit(0), "special", mana_count)
else
  Attack.log(dmgts, "add_blog_ice_dragon_death_2", "name","   "..blog_side_unit(0), "special", mana_count)

if initsize == 1 then
  Attack.log(dmgts, "add_blog_ice_dragon_death_1", "name","   "..blog_side_unit(0), "special", manaval)
else
  Attack.log(dmgts, "add_blog_ice_dragon_death_2", "name","   "..blog_side_unit(0), "special", manaval)
Highterant fix - Highterants had a buggy egg-laying routine
see post #153 for details

Various warning fixes - Main unit special abilities (such as the Skald's curse song or the Royal Griffin's Heavenly Guard) would have their warnings pop up when under AI control
in unit_special_attacks.lua
there are multiple spots where the change needs to be made, I'm giving a single example here, but you can find all of them by doing a search for Game.InvokeMsgBox("warning" and cycling through them. Most work just like this example:
Code:
Game.InvokeMsgBox("warning", "<label=sw_default>")
Attack.log_label("null")

if not Attack.is_computer_move() then
	Game.InvokeMsgBox("warning", "<label=sw_default>")
	Attack.log_label("null")
end
Blizzard fix - The Blizzard spell wasn't freezing units properly
in spells.lua, line 6100:
Code:
effect_freeze_attack(cell_found, t_shift, 3, nil, 1)

effect_freeze_attack(cell, t_shift, 3, nil, 1)
___
If you download the zip file, you need to extra the files in the sessions\addon subfolder off your main WotN installation.

File updated Nov 7, 3:56 pm (local time)

Last edited by Bhruic; 11-09-2012 at 03:37 PM.
Reply With Quote
 


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 05:20 PM.


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