Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   Mods (http://forum.fulqrumpublishing.com/forumdisplay.php?f=187)
-   -   add stats at levelup (http://forum.fulqrumpublishing.com/showthread.php?t=17428)

Ancentre 11-23-2010 09:06 PM

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

MattCaspermeyer 11-27-2010 08:04 PM

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

Ancentre 11-28-2010 12:04 AM

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

jawnTEM 04-24-2011 03:13 AM

I too would like to know how to do this? Which file/folder is it in?

Ancentre 12-30-2011 10:31 PM

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

Ancentre 01-01-2012 12:26 AM

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


All times are GMT. The time now is 04:00 AM.

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