Canrecruiter that still pays upkeep, how to ?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Canrecruiter that still pays upkeep, how to ?
Is there any way to make an silver crown unit keep paying its value in upkeep ?
Re: Canrecruiter that still pays upkeep, how to ?
The silver crowns are paying upkeep by default, as far as I know.
At first I thought you might be able to use the upkeep keyword from [unit], but apparently for canrecruiters it does not matter what it is set to, they will always have no upkeep.
At first I thought you might be able to use the upkeep keyword from [unit], but apparently for canrecruiters it does not matter what it is set to, they will always have no upkeep.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Canrecruiter that still pays upkeep, how to ?
Silver crowns, a.k.a {IS_HERO} will still pay upkeep.
And canrecruit=yes will never pay upkeep. As far as I know
What you could do, is have a new turn event sub the gold from the side. Something like this:
And canrecruit=yes will never pay upkeep. As far as I know
What you could do, is have a new turn event sub the gold from the side. Something like this:
Code: Select all
[event]
name=new turn
first_time_only=no
[store_unit]
# store the guy for his level
variable=guy
kill=no
[/store_unit]
[gold]
side=$guy.side
add=-$guy.level
[/gold]
{CLEAR_VARIABLE guy}
[/event]
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: Canrecruiter that still pays upkeep, how to ?
Right, i can use that. One possible issue would be to filter out the original leader as dont want the goldcrown to pay upkeep.
I have required this for im reworking the extra recruiters in my era to be not specific units anymore.
When an level 1 unit is of eligible type to become an faction leader, upon advancing to level 2 it doubles as an extra recruiter. And when those level up to 3 they can recruit their level 2 form, but only when recruiting through that unit. The level 2 unit recruited this way does not become an recruiter itself. Somewhat similar to Ogre Battle.
Another question i have is it possible that when a side has lost goldcrown it immediately loses. Or if sudden death victory condition is not possible, can it be made so that when a side has lost its original leader all silver crowns get demoted to canrecruit=no.
I have required this for im reworking the extra recruiters in my era to be not specific units anymore.
When an level 1 unit is of eligible type to become an faction leader, upon advancing to level 2 it doubles as an extra recruiter. And when those level up to 3 they can recruit their level 2 form, but only when recruiting through that unit. The level 2 unit recruited this way does not become an recruiter itself. Somewhat similar to Ogre Battle.
Another question i have is it possible that when a side has lost goldcrown it immediately loses. Or if sudden death victory condition is not possible, can it be made so that when a side has lost its original leader all silver crowns get demoted to canrecruit=no.
- Pentarctagon
- Project Manager
- Posts: 5565
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Canrecruiter that still pays upkeep, how to ?
Would [endlevel] fit?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Canrecruiter that still pays upkeep, how to ?
The upkeep is now fixed, thanks. Since only leader can get heroic used filter for trait to single him out.
Using the filter for trait from above i can easily write an simple trigger that will set every recruiter else of that side to canrecruit=no at time of leader death, probably triggered as an last breath.
Code: Select all
#define UPKEEP_FIXER
[event]
name=side turn end
first_time_only=no
[store_unit]
[filter]
canrecruit=yes
[not]
[filter_wml]
[modifications]
[trait]
id=heroicleader
[/trait]
[or]
[trait]
id=loyal
[/trait]
[/or]
[/modifications]
[/filter_wml]
[/not]
[/filter]
variable=guy
kill=no
[/store_unit]
[gold]
side=$guy.side
amount=-$guy.level
[/gold]
{CLEAR_VARIABLE guy}
[/event]
#enddef