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
  #11  
Old 10-30-2012, 10:22 PM
Bhruic Bhruic is offline
Approved Member
 
Join Date: Oct 2012
Posts: 233
Default

Quote:
Originally Posted by camelotcrusade View Post
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
In addon_arena.lua:
Code:
Attack.atom_spawn(act, tend, "magic_diversion", Attack.angleto(act))
That's the line where it's displaying the animation for the diversion skill. You'll need to experiment with the available animations to see which one you want to replace it with.

Hmm, I'm not sure if the code tag supports colours, but I guess I can try it and see.

edit: If I'd looked at your first post, I'd have realized that it does.

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

That looks great, thanks for using those colors.

Okay so I hunted for the confused effect but then i realized since it only applies on the world map it might bug out if I used it in combat. So instead I found Stun, that would at least indicate "this unit isn't going to do anything this turn."

Here it is:

Code:
-- ***********************************************
-- * Stun
-- ***********************************************
function effect_stun_attack(target, pause, duration, log_message)
  --local target = Attack.get_target()
  if pause == nil then
    pause = 1
  end
  if target == nil then
    target = Attack.get_target()
  end
  if duration == nil then
    duration = tonumber(Logic.obj_par("effect_stun", "duration"))
  end
  if (Attack.act_ally(target) or Attack.act_enemy(target)) and not Attack.act_feature(target, "boss,pawn") then
    --local duration = tonumber(Attack.get_custom_param("duration"))
    duration = correct_spell_duration (duration, target, true)
    local inbonus = tonumber(Logic.obj_par("effect_stun", "inbonus"))
    local speedbonus = tonumber(Logic.obj_par("effect_stun", "speedbonus"))
--    local speed = Attack.act_get_par(target, "speed")

--    local change_speed = speed - speedbonus

    Attack.act_del_spell(target,"effect_stun")
    Attack.act_apply_spell_begin( target, "effect_stun", duration, false )
      Attack.act_apply_par_spell( "disreload", 10, 0, 0, duration, false)
      Attack.act_apply_par_spell( "disspec", 10, 0, 0, duration, false)
      Attack.act_apply_par_spell( "initiative", -inbonus, 0, 0, duration, false)
      Attack.act_apply_par_spell( "speed", -speedbonus , 0, 0, duration, false)
    Attack.act_apply_spell_end()
    Attack.atom_spawn(target, pause, "effect_stun", 0, true)

    -- log_message = -1 - íåò ëîãà, 0 - ïðèïèñûâàåì ê äàìàãó, 1 - âûâîäèì îòäåëüíîé ñòðîêîé
    if log_message == nil then
      log_message = 0
    end
    if log_message == 0 then
      Attack.act_damage_addlog(target, "add_blog_stun_")
    elseif log_message == 1 then
      if Attack.act_size(target) > 1 then
        Attack.log(pause, "add_blog_stun_2", "targets", blog_side_unit(target, 1))
      else
        Attack.log(pause, "add_blog_stun_1", "target",  blog_side_unit(target, 1))
      end
    end
  end

  return true
end
Any idea where the visual effect is in all that? I don't want the unit to actually be stunned, just look like while they are distracted.
Reply With Quote
  #13  
Old 10-30-2012, 11:04 PM
Zechnophobe's Avatar
Zechnophobe Zechnophobe is offline
Approved Member
 
Join Date: Nov 2009
Posts: 991
Default

Code:
    Attack.act_del_spell(target,"effect_stun")
    Attack.act_apply_spell_begin( target, "effect_stun", duration, false )
      Attack.act_apply_par_spell( "disreload", 10, 0, 0, duration, false)
      Attack.act_apply_par_spell( "disspec", 10, 0, 0, duration, false)
      Attack.act_apply_par_spell( "initiative", -inbonus, 0, 0, duration, false)
      Attack.act_apply_par_spell( "speed", -speedbonus , 0, 0, duration, false)
    Attack.act_apply_spell_end()
    Attack.atom_spawn(target, pause, "effect_stun", 0, true)
Not 100% sure without poking it, but the 'atom_spawn' could be an animation effect, though I'm not sure about the arguments. I'd be fairly certain though that the 'pause' variable is telling it to not let you continue to make orders while it's in effect. It just occurred to me that applying that argument to more effects would speed up combat a lot. Like, how Celestial guards (the things royal griffens spawn) remove debuffs on them without halting you from making actions.

I wouldn't mind a few longer than normal spell effects if they'd just queue up as I played. Hmm.
Reply With Quote
  #14  
Old 10-30-2012, 11:08 PM
Bhruic Bhruic is offline
Approved Member
 
Join Date: Oct 2012
Posts: 233
Default

Quote:
Originally Posted by camelotcrusade View Post
Any idea where the visual effect is in all that? I don't want the unit to actually be stunned, just look like while they are distracted.
Code:
    Attack.atom_spawn(target, pause, "effect_stun", 0, true)
As Zechnophobe says, that's the line. I'm not sure if you can just copy and replace it with the other line, or if you'll need to modify it at all, but you can experiment and find out.
Reply With Quote
  #15  
Old 10-30-2012, 11:37 PM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

Omg you guys, it worked! I feel like a super modder now...

All I had to do was replace "magic_diversion" with "effect_stun." Worked great. No pause or anything, it just made the noise, showed the stun effect and the Skeleton lost his action points. Try it out if you want.

Manual Method

In addon_arena.lua, line 1010. Replace:

Code:
Attack.atom_spawn(act, tend, "magic_diversion", Attack.angleto(act))
with

Code:
Attack.atom_spawn(act, tend, "effect_stun", Attack.angleto(act))
Update: The attachment which replaces the "Fit of Energy/Rally" graphic with the "Stun" swirling stars effect has been consolidated into my other mods here.

Last edited by camelotcrusade; 11-05-2012 at 08:30 PM. Reason: Removed attachment and put in redirect.
Reply With Quote
  #16  
Old 10-31-2012, 12:11 AM
Zechnophobe's Avatar
Zechnophobe Zechnophobe is offline
Approved Member
 
Join Date: Nov 2009
Posts: 991
Default

High five team! (not like I did anything)

This is, by the way, why being a software developer can sometimes make you feel like a freaking wizard. You mere mortals and your inability to change graphical effects? Hah! You disgust me.
Reply With Quote
  #17  
Old 10-31-2012, 02:26 AM
MattCaspermeyer MattCaspermeyer is offline
Approved Member
 
Join Date: Aug 2010
Posts: 553
Exclamation Great Job - Don't Forget the LUA Library

Hey, great job guys!

As a modder, it is neat to see people changing the game for the better.

Don't forget, though, about the LUA library mentioned here:

http://forum.1cpublishing.eu/showpos...97&postcount=4

You'll need to use a translater to convert the text to English unless you understand Russion (Google seems to work okay), but you should be able to discern the input arguments from there.

Also feel free to ask me if the LUA library doesn't answer your questions since I've dabbled (and am dabbling) in the LUA library quite a bit...

/C\/C\
Reply With Quote
  #18  
Old 10-31-2012, 04:18 AM
Loopy Loopy is offline
Approved Member
 
Join Date: Mar 2011
Posts: 71
Default

Warrior Maidens have two broken abilities.

Call of Valhalla seems to not work at all or only work 1 round in the past, and with multiple stacks of maidens it almost never works past the first time.

Gift of Odin seems to not work at all.
Reply With Quote
  #19  
Old 10-31-2012, 04:34 AM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

Quote:
Originally Posted by MattCaspermeyer View Post
Hey, great job guys!

As a modder, it is neat to see people changing the game for the better.

Don't forget, though, about the LUA library mentioned here:

http://forum.1cpublishing.eu/showpos...97&postcount=4

You'll need to use a translater to convert the text to English unless you understand Russion (Google seems to work okay), but you should be able to discern the input arguments from there.

Also feel free to ask me if the LUA library doesn't answer your questions since I've dabbled (and am dabbling) in the LUA library quite a bit...

/C\/C\
Cool, thanks for the link!
@Loopy, both of those are documented in the bug thread along with explanations. Check it out.
Reply With Quote
  #20  
Old 10-31-2012, 05:30 AM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

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.

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?

Last edited by camelotcrusade; 10-31-2012 at 06:03 AM.
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 02:44 PM.


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