[mainline] Macro Additions

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
User avatar
Implementor37
Posts: 121
Joined: February 22nd, 2015, 12:41 am
Location: The Internet

[mainline] Macro Additions

Post by Implementor37 »

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. :augh: In an attempt to remedy this, I wrote the following macros: :whistle:

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
{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!
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.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: [mainline] Macro Additions

Post by gfgtdf »

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:

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
This macro can also be used to set recruits for differnt difficulties:

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.
User avatar
Implementor37
Posts: 121
Joined: February 22nd, 2015, 12:41 am
Location: The Internet

Re: [mainline] Macro Additions

Post by Implementor37 »

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:

Code: Select all

#define RECRUIT EASY_LIST NORMAL_LIST HARD_LIST
 {QUANTITY recruit {EASY_LIST} {NORMAL_LIST} {HARD_LIST}}
#enddef
might make it more accessible... currently nothing is very clear on how to do a recruit-list by difficulty-level macro using existing macros...
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.
Post Reply