|
King`s Bounty: Warriors of the North Next game in the award-winning King’s Bounty series |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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] 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 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) In visa.lua, line 170: Code:
local bonus, penalty = pwr_visa_svartalfheim() local gold, bonus, penalty = pwr_visa_svartalfheim() In arena.lua, line 553: Code:
if kritProbRnd > kritProb then if kritProbRnd >= kritProb then 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 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 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) 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) 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 in unit_features_master.lua, line 1469: Code:
if not not hitbacking then if not hitbacking then 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 in addon_pet.lua, line 79: Code:
Attack.done_timeshift(Attack.aseq_time(0)) --Attack.done_timeshift(Attack.aseq_time(0)) 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) 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 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 04:37 PM. |
|
|