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: Crossworlds > Mods

Mods King's Bounty: Crossworlds Mods

Reply
 
Thread Tools Display Modes
  #1  
Old 01-17-2012, 08:33 PM
Ratatwisker Ratatwisker is offline
Registered Member
 
Join Date: Jun 2009
Posts: 2
Default 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
Reply With Quote
  #2  
Old 01-19-2012, 07:27 PM
Fatt_Shade Fatt_Shade is offline
Approved Member
 
Join Date: Nov 2010
Location: Serbia
Posts: 837
Default

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.
Reply With Quote
  #3  
Old 01-17-2022, 01:32 PM
abdoi abdoi is offline
Approved Member
 
Join Date: Sep 2009
Posts: 14
Default

Quote:
Originally Posted by Fatt_Shade View Post
You can make unit lds connected with hero inventory and items she carry(
I've modded Priestess of blood sacrifice ability in KBS 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
Reply With Quote
  #4  
Old 01-17-2022, 08:30 PM
Molder Molder is offline
Approved Member
 
Join Date: Nov 2021
Posts: 40
Default

Quote:
Originally Posted by abdoi View Post
I've modded Priestess of blood sacrifice ability in KBS 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
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.
Reply With Quote
  #5  
Old 07-26-2023, 05:55 AM
yohot yohot is offline
Registered Member
 
Join Date: Jul 2023
Posts: 1
Default

Thanks for sharing! Players must think critically when starting with the weaver game and creatively eliminate some of the choices with each guess.
Reply With Quote
  #6  
Old 11-05-2023, 02:40 PM
FireflyFury FireflyFury is offline
Registered Member
 
Join Date: Nov 2023
Posts: 1
Default

Ə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.
Reply With Quote
  #7  
Old 09-03-2024, 06:01 AM
Michellepfeiffer Michellepfeiffer is offline
Approved Member
 
Join Date: Aug 2023
Posts: 2
Default

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.
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 12:25 AM.


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