[mainline] Macro Additions
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
- Implementor37
- Posts: 121
- Joined: February 22nd, 2015, 12:41 am
- Location: The Internet
[mainline] Macro Additions
I just noticed that we have mainline {GOLD} and {INCOME} macros enabling a side's gold or income to be set based upon the difficulty level, but no macros to set a side's recruit list according to the difficulty level. In an attempt to remedy this, I wrote the following macros:
{RECRUIT} enables recruiting of units up to the given difficulty level, {RECRUIT_ONLY} only allows recruiting of the specific list.
ex:
{RECRUIT "unit1" "unit2" "unit3"} enables recruiting unit1 on EASY, unit1 and unit2 on NORMAL, and unit1, unit2, and unit3 on HARD.
{RECRUIT_ONLY "unit1" "unit2" "unit3"} enables recruiting unit1 on EASY, unit2 on NORMAL, and unit3 on HARD.
Note that the lists must be enclosed with quotes, and can contain comma-seperated lists of units. Enjoy!
Code: Select all
#define RECRUIT ELIST NLIST HLIST
#ifdef EASY
recruit={ELIST}
#endif
#ifdef NORMAL
recruit={ELIST} +"," + {NLIST}
#endif
#ifdef HARD
recruit={ELIST} + "," + {NLIST} + "," + {HLIST}
#endif
#enddef
#define RECRUIT_ONLY ELIST NLIST HLIST
#ifdef EASY
recruit={ELIST}
#endif
#ifdef NORMAL
recruit={NLIST}
#endif
#ifdef HARD
recruit={HLIST}
#endif
#enddef
ex:
{RECRUIT "unit1" "unit2" "unit3"} enables recruiting unit1 on EASY, unit1 and unit2 on NORMAL, and unit1, unit2, and unit3 on HARD.
{RECRUIT_ONLY "unit1" "unit2" "unit3"} enables recruiting unit1 on EASY, unit2 on NORMAL, and unit3 on HARD.
Note that the lists must be enclosed with quotes, and can contain comma-seperated lists of units. Enjoy!
Author of End of the Legion, available now on the 1.12 and 1.13 servers!
Supporter of the addition of the Aragwaithi into mainline.
Supporter of the addition of the Aragwaithi into mainline.
Re: [mainline] Macro Additions
we currently have QUANTITY macro which is like a generalization of the GOLD, INCOME macro, you can see that also those macros are implemented using QUANTITY:
This macro can also be used to set recruits for differnt difficulties:
Code: Select all
#define GOLD EASY_AMOUNT NORMAL_AMOUNT HARD_AMOUNT
# Macro which will let you say {GOLD x y z} to set
# starting gold depending on easy/medium/hard - x/y/z
{QUANTITY gold {EASY_AMOUNT} {NORMAL_AMOUNT} {HARD_AMOUNT}}
#enddef
Code: Select all
{QUANTITY recruit (Ruffian,Thief,Footpad) (Ruffian,Thug,Thief,Poacher) (Footpad,Thug,Thief,Poacher,Trapper)}
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Implementor37
- Posts: 121
- Joined: February 22nd, 2015, 12:41 am
- Location: The Internet
Re: [mainline] Macro Additions
Ah. So that's what {QUANTITY} does. Still, it the documentation doesn't contain any mention of possible quantities, including but not limited to gold, income, recruit, etc. Maybe just updating that with an appropriate list would be fine? Note that the definition of {QUANTITY} contains no mention of possible names, nor does it state that the name is simply replaced as {NAME}={<DIFFICULTY>_AMOUNT}... or even: might make it more accessible... currently nothing is very clear on how to do a recruit-list by difficulty-level macro using existing macros...
Code: Select all
#define RECRUIT EASY_LIST NORMAL_LIST HARD_LIST
{QUANTITY recruit {EASY_LIST} {NORMAL_LIST} {HARD_LIST}}
#enddef
Author of End of the Legion, available now on the 1.12 and 1.13 servers!
Supporter of the addition of the Aragwaithi into mainline.
Supporter of the addition of the Aragwaithi into mainline.