Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   King`s Bounty: Warriors of the North (http://forum.fulqrumpublishing.com/forumdisplay.php?f=206)
-   -   Skald, Pean skill workaround (http://forum.fulqrumpublishing.com/showthread.php?t=35444)

Rudi 10-29-2012 10:40 PM

Skald, Pean skill workaround
 
Hi everybody
after getting several crashes because of Skald Pean skill and finding out it's
the Last Hero buff which causes them, I tried to find a workaround.

For anyone interested, simply find the function: special_bless_song_attack()
in unit_special_attacks.lua (needs extraction) and comment two lines at the spell selection function (lines 946,947), it should look like this:
--elseif spell == "spell_last_hero" then
--spell_last_hero_attack(lvl, dmgts, cell)

this eliminates the Last Hero buff from applying but at least prevents Skalds from crashing your games.

Anybody with a better understanding of scripting feel free to post a cleaner solution while we're waiting for an appropriate fix (hopefully soon).

zjazd18 10-29-2012 10:46 PM

Sorry for being noob, but in what file. I'm stuck at one battle coz of constant crash, trying CCing skalds all rounds with fear but fight is too hard that way.

camelotcrusade 10-29-2012 10:53 PM

This is great. Last Hero as a random buff is no fun, imo, because it's not a good spell to use in a game where you want to minimize losses!

Are you able to upload a file that does which we can put inside our mods folder, rather than do these steps? It's safer for noobs like me.

SchDerGrosse 10-29-2012 11:08 PM

Same here.

"unit_special_attacks.lua (needs extraction) "

where is this file located? What does "needs extraction" mean? :/

Rudi 10-30-2012 07:32 AM

1 Attachment(s)
sorry if the instructions weren't clear; the file has to be extracted from ses.kfs
i'll upload mine so you can compare
just unpack in your sessions\addon folder to use

SchDerGrosse 10-30-2012 09:37 AM

Quote:

Originally Posted by Rudi (Post 474846)
sorry if the instructions weren't clear; the file has to be extracted from ses.kfs
i'll upload mine so you can compare
just unpack in your sessions\addon folder to use

Thank you Sir!

camelotcrusade 10-30-2012 02:23 PM

Yay, thank you. I'm actually going to try replacing the Last Hero with Dragon Slayer to see if it works... that way he'll at least have a 4th spell (and that one seems like what a bard should sing about!).

We are starting to need a collected Mods thread. Not it! Lol.

camelotcrusade 10-30-2012 03:15 PM

I am wondering if we can use this same file (unit_special_attacks.lua) to fix the Witch Hunter's "Magical Help" which right now always gives Dragon Slayer. It *might* be this section:

---------------
function special_magic_buff_attack()
Attack.act_aseq(0, "buff")
local dmgts = Attack.aseq_time(0, "x")

local tab_spells = {
{s = "dragon_slayer", prob = 0},
{s = "dark_knight", prob = 0},
{s = "light_knight", prob = 0},
{s = "divine_armor", prob = 0},
{s = "fire_breath", prob = 0},
{s = "haste", prob = 0},
{s = "stone_skin", prob = 0},
{s = "bless", prob = 0},
}
------------------

It actually goes on for a while, but if somebody who is better than I am at reading this code could look at it, maybe you can tell us what to tweak so "Magical Help" isn't always dragon slayer.

Puce Moose 10-30-2012 04:12 PM

Regarding the witch hunter's issue:

I tried editing the file and replacing the prob = 0 with prob = 5. That made no difference in game. I then tried moving the {s = "bless", prob = 0}, line above the {s = "dragon_slayer", prob = 0}, line.

After making that change, now my witch hunters always cast bless. It looks like the buff as it currently stands always casts the first buff in the list.

camelotcrusade 10-30-2012 04:21 PM

Quote:

Originally Posted by Puce Moose (Post 475086)
Regarding the witch hunter's issue:

I tried editing the file and replacing the prob = 0 with prob = 5. That made no difference in game. I then tried moving the {s = "bless", prob = 0}, line above the {s = "dragon_slayer", prob = 0}, line.

After making that change, now my witch hunters always cast bless. It looks like the buff as it currently stands always casts the first buff in the list.

So we could at least pick the spell we want, but it would be more fun if the random function worked. All those zeroes seems to indicate something is messed up. Did you see farther down where it says:

=============
acnt = table.getn(tab_spells)
for i = 1, acnt do
local spell_name = tab_spells[i].s
if Attack.act_is_spell(0, spell_name) then
tab_spells[i].prob = 0
else
tab_spells[i].prob = math.min(0, math.ceil(tab_spells[i].prob))
end
end

local spell = random_choice(tab_spells)
if spell.s == "dragon_slayer" then
spell_dragon_slayer_attack(2, dmgts, 0)
elseif spell.s == "dark_knight" then
spell_dark_knight_attack(2, dmgts, 0)
elseif spell.s == "light_knight" then
spell_light_knight_attack(2, dmgts, 0)
elseif spell.s == "divine_armor" then
spell_divine_armor_attack(2, dmgts, 0)
elseif spell.s == "fire_breath" then
spell_fire_breath_attack(2, dmgts, 0)
elseif spell.s == "haste" then
spell_haste_attack(2, dmgts, 0)
elseif spell.s == "stone_skin" then
spell_stone_skin_attack(2, dmgts, 0)
elseif spell.s == "bless" then
spell_bless_attack(2, dmgts, 0)
end

==========

Maybe the key is in there?


All times are GMT. The time now is 02:18 PM.

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