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 10-30-2012, 07:32 AM
Rudi Rudi is offline
Approved Member
 
Join Date: Dec 2009
Posts: 9
Default

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
Attached Files
File Type: zip unit_special_attacks.zip (44.3 KB, 360 views)
Reply With Quote
  #2  
Old 10-30-2012, 09:37 AM
SchDerGrosse SchDerGrosse is offline
Registered Member
 
Join Date: Oct 2012
Posts: 11
Default

Quote:
Originally Posted by Rudi View Post
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!
Reply With Quote
  #3  
Old 10-30-2012, 02:23 PM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

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.

Last edited by camelotcrusade; 10-30-2012 at 03:34 PM.
Reply With Quote
  #4  
Old 10-30-2012, 03:15 PM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

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.

Last edited by camelotcrusade; 10-30-2012 at 03:33 PM.
Reply With Quote
  #5  
Old 10-30-2012, 04:12 PM
Puce Moose Puce Moose is offline
Approved Member
 
Join Date: Feb 2010
Posts: 45
Default

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.
Reply With Quote
  #6  
Old 10-30-2012, 04:21 PM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

Quote:
Originally Posted by Puce Moose View Post
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?
Reply With Quote
  #7  
Old 10-30-2012, 04:44 PM
Rudi Rudi is offline
Approved Member
 
Join Date: Dec 2009
Posts: 9
Post

I think that somewhere along the line it overwrites the probabilities calculated with 0 so the script takes the first from the table which is dragon hunter, when I take hold of some witch hunters I'll try to find where exactly. My first guess is that it's the first if in:
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

if someone could comment the 3 lines starting with if and do some testing it'd be great. Cause I'd like to finish the game at least once before digging in code
Reply With Quote
  #8  
Old 10-31-2012, 07:51 AM
BB Shockwave BB Shockwave is offline
Approved Member
 
Join Date: Jan 2009
Posts: 635
Default

I seriously wonder why they even bothered to bring back Last hero at all, when AP eliminated this spell. It is the epytome of uselessness. So much, that for The Legend, I used this spell to mod myself an "Animated Dead" spell in it's place that I could use to resurrect my undead troops.
Reply With Quote
  #9  
Old 10-10-2013, 08:50 PM
pcrevue pcrevue is offline
Registered Member
 
Join Date: Oct 2013
Posts: 1
Default

Try changing the probability to 1 which is 100% in maths. (There is no probability of 5)
Reply With Quote
  #10  
Old 10-31-2012, 07:53 AM
BB Shockwave BB Shockwave is offline
Approved Member
 
Join Date: Jan 2009
Posts: 635
Default

Quote:
Originally Posted by camelotcrusade View Post
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.
Witch Hunters work fine in AP/Crossworlds, so anyone thought of checking their programmed abilities there?
Reply With Quote
Reply


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:01 AM.


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