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)
-   -   Bugfixes (http://forum.fulqrumpublishing.com/showthread.php?t=35494)

namad 10-31-2012 05:45 AM

1) the powerful raise ability is intentionally limited to the recent past... as a balancing factor... its still prolly op!

2) what does the witchhunter fix actually do? (I didn't know what was wrong with them before)


also... is 20intiative rune mages a bug? what should it be? is that fixable via lua? what was it in crossworlds? 20 seems like its gotta be a typo? 20 is prolly the max possible value or something?

MattCaspermeyer 10-31-2012 07:40 AM

I think this post covers this problem: http://forum.1cpublishing.eu/showthread.php?t=35519

Quote:

Originally Posted by camelotcrusade (Post 475429)
Up next - 1. Does anyone have ideas of where to even begin to fix the Crystal Collector bug? That one is really cramping my style. Yeah, I know I'm only missing out on a few points of intellect, but I know if I start spending my crystals it will be ages before I catch up.

The code you quote looks correct - do you mean you've tried 20 times or that you should have been successful 20 times (i.e. you've tried 200 times)? If you've tried 20 times, you should have (on average) got 2 potions twice, but there is no guarantee and so you may have just been unlucky. If you've tried 200 times, then there is definitely something wrong, although the code looks fine to me...

/C\/C\

Quote:

Originally Posted by camelotcrusade (Post 475429)
2. I've never seen my alchemist or my engineer mix more than one bottle when using their remix ability. Here's what the code says (line 3026, unit_special_attacks.lua):

Code:

-- ***********************************************
-- Ñîçäàíèå Çåëèé/Ãðàíàò (Àëõèìèê, Èíæåíåð)
-- ***********************************************
function special_craft_attack()
  local charge = 1
  if Attack.act_human(0) then
    if Attack.act_name(0) == "alchemist" then
      if Logic.hero_lu_item_on_body("alchemist_toolkit") then
        if 10 >= Game.CurLocRand(1, 100) then
          charge = charge + 1
        end
      end
    end
  end

  local animation = Attack.get_custom_param("animation")
  Attack.act_aseq(0, animation)
  local dmgts = Attack.aseq_time(0, "x")
  local name = Attack.get_custom_param("craft")
  local craft_name = "craft_"..name
  Attack.act_enable_attack(0, craft_name, false)
  Attack.act_enable_attack(0, name, true)
  Attack.act_charge(0, charge, name)

  local size = Attack.act_size(0)
  if Attack.act_size(0)> 2 then
    size = 2
  end
  Attack.log(0.5 + dmgts, "add_blog_chemistry_crafting_success_"..tostring(charge)..tostring(size), "name", blog_side_unit(0, 0), "special", charge)

  return true
end

I can see it looks like there is a 10% chance to do better than 1 bottle. Have I just been unlucky 20+ times or might there be something wrong here?


Bhruic 10-31-2012 07:50 AM

Quote:

Originally Posted by namad (Post 475444)
2) what does the witchhunter fix actually do? (I didn't know what was wrong with them before)

Their self-buff ability was limited to only giving them the Dragonslayer buff. With the fix, they are back to potentially getting any of the buffs in their repertoire.

Quote:

also... is 20intiative rune mages a bug? what should it be? is that fixable via lua? what was it in crossworlds? 20 seems like its gotta be a typo? 20 is prolly the max possible value or something?
It's hard to say if it's a bug or not, but it seems unlikely to be a typo (I doubt they intended to give them 2 initiative, and even 10 would seem high).

Bhruic 10-31-2012 07:57 AM

Quote:

Originally Posted by camelotcrusade (Post 475429)
2. I've never seen my alchemist or my engineer mix more than one bottle when using their remix ability. Here's what the code says (line 3026, unit_special_attacks.lua):

I can see it looks like there is a 10% chance to do better than 1 bottle. Have I just been unlucky 20+ times or might there be something wrong here?

To save space I didn't quote the code, but you can go back and look... What it actually is doing is checking if you've got the item "alchemist_toolkit" equipped on your character, and if you do, then you have a 10% chance of getting a second bottle. That's the only way it lists for that to take place.

I've never used Alchemists/Engineers in WotN, so I'm not sure if they are supposed to have the option to mix more than one without an item.

Bhruic 10-31-2012 08:46 AM

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

addon_arena.lua

original:
Code:

local tab_spell_select = {
    -- õîðîøèå çàêëû
    {s = "spell_dispell",      nf = "magic_immunitet,pawn,boss"},
    {s = "spell_haste",        nf = "magic_immunitet,pawn,boss"},
    {s = "spell_bless",        nf = "undead,magic_immunitet,pawn,boss"},
    {s = "spell_divine_armor",  nf = "undead,magic_immunitet,pawn,boss"},
    {s = "spell_reaction",      nf = "magic_immunitet,pawn,boss"},
    {s = "spell_gifts",        nf = "magic_immunitet,pawn,boss"},
    -- ïëîõèå çàêëû
    {s = "spell_defenseless",  nf = "magic_immunitet,pawn,boss"},
    {s = "spell_slow",          nf = "magic_immunitet,pawn,boss"},
    {s = "spell_magic_bondage", nf = "mind_immunitet,magic_immunitet,pawn,boss"},
    {s = "spell_pygmy",        nf = "magic_immunitet,pawn,boss"},
    {s = "spell_scare",        nf = "magic_immunitet,mind_immunitet,undead,pawn,boss"},
    {s = "spell_weakness",      nf = "undead,golem,plant,magic_immunitet,pawn,boss"},
    {s = "spell_crue_fate",    nf = "magic_immunitet,pawn,boss"}--[[,
    {s = "spell_ram",          nf = "magic_immunitet,pawn,boss,mech"}]]
  }
  local cast = {}
  local spell_count = table.getn(tab_spell_select)
  local acnt = Attack.act_count()
  local total_prob = 0
  for i = 1, spell_count do
    local spell = (tab_spell_select[i]).s
    local nfeatures = (tab_spell_select[i]).nf
    local tab_spell_targets = {}
    for j = 0, acnt-1 do
      if not Attack.act_feature(j, nfeatures) and Attack.act_takesdmg(j) then
        table.insert(tab_spell_targets, j) -- âûáîð áàçîâûõ öåëåé
      end
    end
    if table.getn(tab_spell_targets) > 0 then -- åñòü áàçîâûå öåëè
      local spell_lvl = Game.Random (1, 3) -- óðîâåíü çàêëà, êîòîðûé áóäåì þçàòü
      local applicable = Attack.build_spell_attack(spell, spell_lvl).applicable
      for i, t in ipairs (tab_spell_targets) do
        if applicable(t) then -- çàêë ïðèìåíèì íà ýòó öåëü
          local prob = 10
          total_prob = total_prob + prob
          table.insert(cast, {spell = spell, level = spell_lvl, target = t, prob = prob})
        end
      end
    end
  end

modified:
Code:

local tab_spell_select_positive = {
    -- õîðîøèå çàêëû
    {s = "spell_dispell",      nf = "magic_immunitet,pawn,boss"},
    {s = "spell_haste",        nf = "magic_immunitet,pawn,boss"},
    {s = "spell_bless",        nf = "undead,magic_immunitet,pawn,boss"},
    {s = "spell_divine_armor",  nf = "undead,magic_immunitet,pawn,boss"},
    {s = "spell_reaction",      nf = "magic_immunitet,pawn,boss"},
    {s = "spell_gifts",        nf = "magic_immunitet,pawn,boss"}
  }
  local tab_spell_select_negative = {

    -- ïëîõèå çàêëû
    {s = "spell_defenseless",  nf = "magic_immunitet,pawn,boss"},
    {s = "spell_slow",          nf = "magic_immunitet,pawn,boss"},
    {s = "spell_magic_bondage", nf = "mind_immunitet,magic_immunitet,pawn,boss"},
    {s = "spell_pygmy",        nf = "magic_immunitet,pawn,boss"},
    {s = "spell_scare",        nf = "magic_immunitet,mind_immunitet,undead,pawn,boss"},
    {s = "spell_weakness",      nf = "undead,golem,plant,magic_immunitet,pawn,boss"},
    {s = "spell_crue_fate",    nf = "magic_immunitet,pawn,boss"}--[[,
    {s = "spell_ram",          nf = "magic_immunitet,pawn,boss,mech"}]]
  }
  local cast = {}
  local acnt = Attack.act_count()
  local total_prob = 0
  local spell_count = table.getn(tab_spell_select_positive)
  for i = 1, spell_count do
    local spell = (tab_spell_select_positive[i]).s
    local nfeatures = (tab_spell_select_positive[i]).nf
    local tab_spell_targets = {}
    for j = 0, acnt-1 do
      if not Attack.act_feature(j, nfeatures) and Attack.act_takesdmg(j) and Attack.act_ally(j) then
        table.insert(tab_spell_targets, j) -- âûáîð áàçîâûõ öåëåé
      end
    end
    if table.getn(tab_spell_targets) > 0 then -- åñòü áàçîâûå öåëè
      local spell_lvl = Game.Random (1, 3) -- óðîâåíü çàêëà, êîòîðûé áóäåì þçàòü
      local applicable = Attack.build_spell_attack(spell, spell_lvl).applicable
      for i, t in ipairs (tab_spell_targets) do
        if applicable(t) then -- çàêë ïðèìåíèì íà ýòó öåëü
          local prob = 10
          total_prob = total_prob + prob
          table.insert(cast, {spell = spell, level = spell_lvl, target = t, prob = prob})
        end
      end
    end
  end
 
  spell_count = table.getn(tab_spell_select_negative)
  for i = 1, spell_count do
    local spell = (tab_spell_select_negative[i]).s
    local nfeatures = (tab_spell_select_negative[i]).nf
    local tab_spell_targets = {}
    for j = 0, acnt-1 do
      if not Attack.act_feature(j, nfeatures) and Attack.act_takesdmg(j) and Attack.act_enemy(j) then
        table.insert(tab_spell_targets, j) -- âûáîð áàçîâûõ öåëåé
      end
    end
    if table.getn(tab_spell_targets) > 0 then -- åñòü áàçîâûå öåëè
      local spell_lvl = Game.Random (1, 3) -- óðîâåíü çàêëà, êîòîðûé áóäåì þçàòü
      local applicable = Attack.build_spell_attack(spell, spell_lvl).applicable
      for i, t in ipairs (tab_spell_targets) do
        if applicable(t) then -- çàêë ïðèìåíèì íà ýòó öåëü
          local prob = 10
          total_prob = total_prob + prob
          table.insert(cast, {spell = spell, level = spell_lvl, target = t, prob = prob})
        end
      end
    end
  end


saroumana 10-31-2012 09:15 AM

Book of evil correction :

in spells_power.lua

Original

Quote:

function pwr_evilbook(level)
if tonumber(level) == 0 or level == nil then
level = Obj.spell_level()
if level == 0 then
level = 1
end
if Obj.where() == 6 and Obj.spell_level() ~= 0 then
level = level + 1
end
else
level = tonumber(level)
end

local level = tonumber("0" .. text_dec(Logic.obj_par("spell_evilbook", "level"), level))
local kill = tonumber("0" .. text_dec(Logic.obj_par("spell_evilbook", "kill"), level))
local creator_power = 1 + tonumber(skill_power2("creator", 1)/100)
creator_power = creator_power/2
local int_bonus = 1 + tonumber(Game.Config("spell_power_config/int_power"))*HInt()/100
local item_bonus = tonumber(Logic.hero_lu_item("sp_spell_demonologist ", "count")/100)
local bonus = math.floor(100*(creator_power + int_bonus)*int_bonus)

return bonus, level, kill
end
CHANGE

Quote:

function pwr_evilbook(level)
if tonumber(level) == 0 or level == nil then
level = Obj.spell_level()
if level == 0 then
level = 1
end
if Obj.where() == 6 and Obj.spell_level() ~= 0 then
level = level + 1
end
else
level = tonumber(level)
end

local level = tonumber("0" .. text_dec(Logic.obj_par("spell_evilbook", "level"), level))
local kill = tonumber("0" .. text_dec(Logic.obj_par("spell_evilbook", "kill"), level))
local creator_power = 1 + tonumber(skill_power2("creator", 1)/100)
creator_power = creator_power/2
local int_bonus = 1 + tonumber(Game.Config("spell_power_config/int_power"))*HInt()/100
local item_bonus = tonumber(Logic.hero_lu_item("sp_spell_demonologist ", "count")/100)
local bonus = math.floor(100*(creator_power + item_bonus)*int_bonus)

return bonus, level, kill
end

Bhruic 10-31-2012 09:30 AM

Nice find. Added that to the first post. Also added a fix for the Song of Svartalfheim.

pavar 10-31-2012 11:37 AM

Quote:

Originally Posted by Zechnophobe (Post 475233)
Last Stand is a fine spell when manually cast. Having it randomly cast on a stack sucks horribly though.

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.

I'm working on correcting the effing grammar (and the off-mark descriptions) on spells and skills. If you are willing to list the tooltips that need updating (what it says / what it should say), I would gladly dive in on it. Thanks to you guys I am able to play the game without having it crashing to the desktop every 2 minutes and I wouldn't know where to start to correct the bugs, but this is at my level :cool:

ikbenrichard 10-31-2012 01:19 PM

Great work. Big thnx !

camelotcrusade 10-31-2012 03:57 PM

Quote:

Originally Posted by Bhruic (Post 475474)
To save space I didn't quote the code, but you can go back and look... What it actually is doing is checking if you've got the item "alchemist_toolkit" equipped on your character, and if you do, then you have a 10% chance of getting a second bottle. That's the only way it lists for that to take place.

I've never used Alchemists/Engineers in WotN, so I'm not sure if they are supposed to have the option to mix more than one without an item.

I bet that is the problem - good find. I don't have that item so it's never creating 2 bottles. However, the description on remix clearly says "Create 1-2 charges of X." I guess they put that in as a catchall? Seems misleading if you ask me, especially since your chances of finding one specific item could be low.

Imo, it should always have that 10% chance and having the item (after all, it's a belt slot!) should give you an extra 10% chance. Either that or the description should say 1 item... but then it won't be accurate when you DO have that item. Aargh.

Thoughts?


All times are GMT. The time now is 09:41 AM.

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