|
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. |
#2
|
||||
|
||||
Update: Mod updated for Patch 5.
Other notes - In Patch 2, Last Hero was replaced with Stoneskin for the Skald talent "paean." I'm happy with this decision and no longer providing a mod to change it to dragon_slayer. In Patch 3, Avenging Angel was also added to "paean." Nice. If you want to replace Stonekin (or any other spell in the list for paean) yourself, you will need to do it once in lines 867-871 and twice in lines 945-955 for a total of 3 replacements (e.g., spell_stone_skin twice and spell_stone_skin_attack once). All of Bhuric's changes that I packaged into my last version were covered in Patch 2 (fixes for Archmage's shield and soothsayer ice storm). Song of Alfheim and Diversion FX Mod The attachment below includes includes the song of alfheim mod to make it only target you with beneficial buffs and enemies with curses, and the diversion animation mod which makes it look like stun instead. A readme is included, but in case you don't read it Bhuric deserves full credit for developing the code for the song of alfheim mod. Your location may vary but mine is in here: C:\Program Files (x86)\Steam\steamapps\common\King's Bounty - Warriors of the North\sessions\addon. The correct order to install these is: Start with Patched files first (e.g., clean out any LUA files in your addon folder), Install Bhruic fixes if they are available, then install my mods over top of them. Zech's language mod alters completely different files and can be installed at any time. Finally, I will be updating my attachment whenever Bhruic issues new versions of unit_special_attacks or addon_arena, or whenever there is a new official patch. Last edited by camelotcrusade; 02-02-2013 at 04:38 AM. Reason: Updating mod for Patch 5. |
#3
|
|||
|
|||
Well, rather than do that approach, I fixed the spell (mostly). It's actually not a bad spell, if you know you are going to finish combat soon.
Probably Dragonslayer would be better, but I'm trying to just do fixes with this, rather than outright game changes. |
#4
|
||||
|
||||
I'm so impressed you figured that out.
Do you know how to change the visual representation for the Distraction skill? It reminds me of Fit of Energy/Rally which makes you act not stop moving. If it were up to me, I'd change it to the Confusion effect (???) over their heads. |
#5
|
||||
|
||||
Quote:
I might break open the lua myself tonight and see if I can fix some of this stuff. God, is it possible someone could do a fan-made update to all the freaking tool tips? I'd literally climax in excitement at that. |
#6
|
|||
|
|||
Added fix for Archmage's Magic Shield spell. Amusingly the default version of it actually caused the unit it was cast on to do 50% less damage. So basically you were nerfing your own units by casting it on them.
|
#7
|
|||
|
|||
Quote:
Which skill is Distraction? Player skill or unit skill? |
#8
|
|||
|
|||
oh this is nice, thx a lot
Last edited by Hagbard; 10-30-2012 at 09:40 PM. |
#9
|
|||
|
|||
Quote:
I believe the tooltips are all just text based, so it should be possible to fix them, yes. Check the loc_ses.kfs file in sessions/addon (it's just a zip file). It contains all the .lng files, which seem to be plaintext |
#10
|
||||
|
||||
Diversions is a mind/spirit tree skill that says you have a 10/20/30% chance to make opponents lose their turn. I've been calling it the wrong thing this whole time, I better update my threads.
I will also make a note of the archmage fix in the bugs thread soon. And for the record I highly approve of you making only fixes not mods with these releases. I'm still gonna mod mine to use Dragonslayer, though. I feel it's not too strong (highly conditional as a random buff) but still useful. PS - more work for you Bhruic but if you colorized what code changed it would be extra awesome Last edited by camelotcrusade; 10-30-2012 at 10:03 PM. |
|
|