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: Armored Princess > Mods

Mods Armored Princess mods

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2010, 08:05 PM
saroumana saroumana is offline
Approved Member
 
Join Date: Jan 2010
Posts: 87
Default

You need a script attack.

In this script,you'll read the burn value, and after you'll add a burning effect.

local target = Attack.get_target()
local burn_rnd=tonumber(Attack.get_custom_param("burn"))
if burn_rnd<=burn then
effect_burn_attack(target,1,3,nil,0)
end

The param for effect_burn_attack are : (target, pause, duration, log_message, attacker)
Reply With Quote
  #2  
Old 03-15-2010, 10:01 PM
N3MES1S N3MES1S is offline
Approved Member
 
Join Date: Nov 2009
Posts: 241
Default

i tried the script, but nothing happens. Maybe i need a "callcells" script? i dont know wat is the purpose of the callcells script. I tried to take a look at the phoenix code, but phoenix doesnt have any script.. i really dont understand the way this game is made.. any ideas?
Reply With Quote
  #3  
Old 03-16-2010, 05:23 PM
Der Wanderer Der Wanderer is offline
Registered Member
 
Join Date: Mar 2010
Posts: 11
Default

what you need is the following line in the main part of your troops description
posthitmaster=features_burn
However, I never managed to have multiple effects and assume in order to have them you need a script that combines them. I'm actually not sure as my coding skill are next to inexistent if this is even possible, since they would occupy the same variables (and I'm unsure if you can simply add additional ones).

The army of light seems to have multiple effects e.g. the firemage has BURN and HOLY. From the script it appears though as if he has EITHER burn (on any race but the undead and demons) OR holy (on undead and demons).

Last edited by Der Wanderer; 03-16-2010 at 05:29 PM.
Reply With Quote
  #4  
Old 03-16-2010, 08:21 PM
saroumana saroumana is offline
Approved Member
 
Join Date: Jan 2010
Posts: 87
Default

If you use posthitmaster, it will be used for every attack of this unit.

In your unit, you should have :

gladiatorbreath {
class=scripted
script_attack=special_gladiatorbreath_attack
script_calccells=calccells_all_enemy
hinthead=ig_gladiator_breath_head
hint=ig_gladiator_breath_hint
reload=4
dontusenearenemy=1
up=0
friendly_fire=1
base_attack=0
ad_factor=1
picture=ba1_doublestrike_
picture_small=ba1_doublestrike_small.png
options=disablerush,used_if_damaged
anim_attack=special
damage {
physical=41,60
fire=30,50
}
custom_params {
burn=70
shock=50
nomiss=1
}
}

And now you must create special_gladiatorbreath_attack. inside it, for burning, you'll use that :


local target = Attack.get_target()
local burn_rnd=tonumber(Attack.get_custom_param("burn"))
if burn_rnd<=burn then
effect_burn_attack(target,1,3,nil,0)
end

After you'll may be have to apply damage to the unit.
Reply With Quote
  #5  
Old 03-16-2010, 09:14 PM
N3MES1S N3MES1S is offline
Approved Member
 
Join Date: Nov 2009
Posts: 241
Default

Quote:
Originally Posted by saroumana View Post
If you use posthitmaster, it will be used for every attack of this unit.

In your unit, you should have :

gladiatorbreath {
class=scripted
script_attack=special_gladiatorbreath_attack
script_calccells=calccells_all_enemy
hinthead=ig_gladiator_breath_head
hint=ig_gladiator_breath_hint
reload=4
dontusenearenemy=1
up=0
friendly_fire=1
base_attack=0
ad_factor=1
picture=ba1_doublestrike_
picture_small=ba1_doublestrike_small.png
options=disablerush,used_if_damaged
anim_attack=special
damage {
physical=41,60
fire=30,50
}
custom_params {
burn=70
shock=50
nomiss=1
}
}

And now you must create special_gladiatorbreath_attack. inside it, for burning, you'll use that :


local target = Attack.get_target()
local burn_rnd=tonumber(Attack.get_custom_param("burn"))
if burn_rnd<=burn then
effect_burn_attack(target,1,3,nil,0)
end

After you'll may be have to apply damage to the unit.

Thx, but thats exactly the same code i had (except for the calccells script calling, but i dont want to make all the enemy cells available, only the nearly ones, like the circle attack, but i tried , and it doesnt work). When i push the icon skill, appears a waiting clock (instead the sword icon that indicates who wants to attack) and i cant do nothing, only to press the right mouse button to cancel (Almost it doesnt crash ). Thats the problem i am having long time ago, and thats my confusion. If i change the attack class from scripted to moveattack, it works, but i cant apply the burn effect (must be scripted zz). I really dont know wth is wrong -.-. I tried with some scripts from firemage, and other fire creatures, but always the same result.

And the posthitmaster parameter i think is for making the normal attacks to burn on every attack, i dont want that -.-

Last edited by N3MES1S; 03-16-2010 at 09:29 PM.
Reply With Quote
  #6  
Old 03-20-2010, 07:34 AM
saroumana saroumana is offline
Approved Member
 
Join Date: Jan 2010
Posts: 87
Default

Post your mod here, we could try to check what is blocking.
Reply With Quote
  #7  
Old 03-20-2010, 10:16 AM
N3MES1S N3MES1S is offline
Approved Member
 
Join Date: Nov 2009
Posts: 241
Default

Thx, but its finished now. -.-

The final mod is called Maelstrom, is a level 5 human unit, based on the knight model. For using on the army of light mod (i shoulda changed to army of the dark, but knights model doesnt fit well on the dark side lol).

He has fire inmunity, high magic resistance, natural fire damage, and the basics steel armor and dragon slayer from knight.

Special habilities:

1. Classic knight circle attack (but with a chance for burning 1 or more targets).
2. Maelstrom strike, like circle attack, but doing a bit more damage and only hits 1 target but knocks him back (and chance for burning).
3. Maelstrom Execution, a single dragon slayer hit, but dealing extreme physical damage and burning the target.

Of course, still have the dragonslayer special attack, but doing more damage.

All the normal attacks also has fire damage.

All the hits and special ones can burn the target (Maelstroms are natural fire damage units).

1000 hit points.

The special habilities recharges fast, so the unit can be funny to use on the battlefield.

Is a bit overpowered unit, but its intended for use on hard-impossible modes, and cost a lot leadership (4500). Still i need to improve some things, like the message blogs (i dont know how it works) but i can say its 99.9 % finished (textures are still not the final ones, it was just a test but are almost fine). I will write a post on the main page when i take screenshots.

Thx for the helping guys.

Last edited by N3MES1S; 03-20-2010 at 12:15 PM.
Reply With Quote
  #8  
Old 03-16-2010, 09:39 PM
N3MES1S N3MES1S is offline
Approved Member
 
Join Date: Nov 2009
Posts: 241
Default

Quote:
Originally Posted by Der Wanderer View Post
what you need is the following line in the main part of your troops description
posthitmaster=features_burn
However, I never managed to have multiple effects and assume in order to have them you need a script that combines them. I'm actually not sure as my coding skill are next to inexistent if this is even possible, since they would occupy the same variables (and I'm unsure if you can simply add additional ones).

The army of light seems to have multiple effects e.g. the firemage has BURN and HOLY. From the script it appears though as if he has EITHER burn (on any race but the undead and demons) OR holy (on undead and demons).
The problem is that a spell burn effects and a move burn effects are completely different, and the code is different. I tried to adapt the fireball or fire arrow code , but with no result.
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 03:16 PM.


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