|
Mods King's Bounty: Crossworlds Mods |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Dynamically adjust Leadership of units
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","l eadtroll_mod",leadership) -- has no visible effect Is it even possible to do what I want? Any help is appreciated! Regards |
#2
|
|||
|
|||
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 Last edited by Fatt_Shade; 01-19-2012 at 08:52 PM. |
#3
|
|||
|
|||
Quote:
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 |
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
Thanks for sharing! Players must think critically when starting with the weaver game and creatively eliminate some of the choices with each guess.
|
#6
|
|||
|
|||
Ə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.
|
#7
|
|||
|
|||
It sounds like you're trying to dynamically adjust unit leadership in a game engine or modding environment. Since your attempts with Attack.atom_setpar(), Attack.act_leadership(), and Attack.act_attach_modificator() haven't worked, it suggests that these methods aren't part of the API or scripting framework you're using.
Here are some possible steps to troubleshoot or find a solution: Check Documentation: Verify if there's an existing method or function in your game engine's API that handles unit stats directly. Some games have unique methods for modifying stats like leadership, attack power, etc. Alternative Functions: Try searching for alternative functions or hooks related to unit modification or stat adjustments. You might find something like Unit.set_leadership() or Hero.get_leadership() that you can leverage. Global vs. Local Variables: Ensure that the leadership variable is accessible where you're trying to use it. If it's being declared locally within a function, make sure it's properly passed to any method that needs it. Triggers/Events: Look into whether you can set up triggers or events that detect when the hero's leadership changes and dynamically adjust the leadership of the troll unit in response. Minecraft APK Modding Forums/Communities: If all else fails, modding communities or forums dedicated to the game or engine you're working with could be a valuable resource. Often, other developers or modders may have already encountered similar issues. If you can provide more specifics about the game or engine you're working with, I might be able to offer more targeted advice. |
|
|