PDA

View Full Version : Dynamically adjust Leadership of units


Ratatwisker
01-17-2012, 07:33 PM
Hi,

I'm currently trying to dynamically modify the leadership per unit of, say, trolls. To be more precise, I want the leadership of a specific unit to be as high as the hero's current leadership.

What I've already tried without success (leadership is a local variable initialised with the hero's leadership):
Attack.atom_setpar("troll","leadership",leadership) -- apparently this method does not exist
Attack.act_leadership(cell,leadership) -- this method also doesn't exist as it seems
Attack.act_attach_modificator(cell,"leadership","leadtroll_mod",leadership) -- has no visible effect

Is it even possible to do what I want? Any help is appreciated!

Regards

Fatt_Shade
01-19-2012, 06:27 PM
I`m not sure what you plan to do. So let say you have warrior 20th lvl with 15000 leadership, and want to make troll have same lds ???
If this is what you plan, i dont think it`s possible because hero lds isn`t only dependable on lvl, you have skill for lds ,medals, items . . . So how would it work if you place some item (marshals baton +1000 lds), and then replace it with some other item that doesn`t give lds. Troll lds then should change fast. Even bigger problem would be with mechanical blade that reduces hero lds by -10% . . .
Try checking how does item uho_orka ( -10% for orcs) item work and do it in reverse, so that units lds requirements depend on current hero lds. You can make unit lds connected with hero inventory and items she carry, but how to do it between unit lds and hero`s, i have no idea :-(

abdoi
01-17-2022, 12:32 PM
You can make unit lds connected with hero inventory and items she carry(

I've modded Priestess of blood sacrifice ability in KB:DS for target unit to not exceed max hero leadership.

But if the hero is wearing an item that reduces leadership req of say red dragons to 1600 instead of original 2000, then how to get the actual reduced leadership in LUA file?

This function "Attack.act_leadership(target)" doesn't get the new reduced value.

P.S. I know the last post is 9 years old but hopefully I get answer:roll:

Molder
01-17-2022, 07:30 PM
I've modded Priestess of blood sacrifice ability in KB:DS for target unit to not exceed max hero leadership.

But if the hero is wearing an item that reduces leadership req of say red dragons to 1600 instead of original 2000, then how to get the actual reduced leadership in LUA file?

This function "Attack.act_leadership(target)" doesn't get the new reduced value.

P.S. I know the last post is 9 years old but hopefully I get answer:roll:

Unfortunately, leadership can't be modified properly with any function. The only was is to get some discount with functions in file "special_params.txt". You have to write smth like "sp_lead_orc" and set some units as parameters with discount.

yohot
07-26-2023, 04:55 AM
Thanks for sharing! Players must think critically when starting with the weaver game (https://weavergame.net) and creatively eliminate some of the choices with each guess.

FireflyFury
11-05-2023, 01:40 PM
Ən əla rulet saytlarının sıyahısını almaq üçün bizə qoşulun və tərcih etdiyiniz saytı seçin. Bu saytı yoxlayın (https://onlinecasinoazerbaijan.org/ruletka-online).