#1
|
|||
|
|||
add stats at levelup
anyone know how to add mana and rage at levelup?
for attack, defense, intellect, it works by adding this line into logic_hero.lua after Levelup.add( 0, "leadership", leadership*(level)) Levelup.add( 0, "attack", 1) but i tried that for mana and rage, and it did not add mana or rage at levelup anyone know how to change that? thanks |
#2
|
|||
|
|||
You might try...
Ancentre:
You might try looking at the skills that add rage and mana - I think it is SKILLS.LUA. These add it permanently and so that should be a good example. Good luck! Matt |
#3
|
|||
|
|||
it works!!! thanks matt
i took a look at the skill.lua
and i found local cur_rage=Logic.hero_lu_item("rage","limit") local cur_mana=Logic.hero_lu_item("mana","limit") Logic.hero_lu_item("rage","limit",cur_rage+bonus) Logic.hero_lu_item("mana","limit",cur_mana+bonus) so i took those lines and pasted local cur_rage=Logic.hero_lu_item("rage","limit") local cur_mana=Logic.hero_lu_item("mana","limit") under the levelup function and Logic.hero_lu_item("rage","limit",cur_rage+1) Logic.hero_lu_item("mana","limit",cur_mana+1) under if level<50 now, it adds 1 mana and rage everytime i levelup thank you very much matt |
#4
|
|||
|
|||
I too would like to know how to do this? Which file/folder is it in?
|
#5
|
|||
|
|||
its in hero.lua
just add the 4 lines of code under if level < 50 i think it might be 51 now, instead of 50 after the patching should work, havent checked back in a while so gl |
#6
|
|||
|
|||
sorry made a mistake its in
logic_hero.lua local cur_rage=Logic.hero_lu_item("rage","limit") local cur_mana=Logic.hero_lu_item("mana","limit") Logic.hero_lu_item("rage","limit",cur_rage+1) Logic.hero_lu_item("mana","limit",cur_mana+1) add the above four lines under function calc_levelup() this should give u +1 to max mana and rage at lv up |
|
|