Mercenaries

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
12,781
Location
France
With this mod, you can hire mercenaries units from friend or allied City-States, the mercenaries units are cheaper to buy from a CS than from your build menu, but they won't heal alone and they gain no XP from combat.

screenshots :

Spoiler :
merc1_O22.jpg
merc2_C00.jpg
note: the CS leader icon mod is not included


download and installation instruction in the files database


Credits & thanx

- Onni for the "Creating UI mods with lua & xml" tutorial, especially the part on ContextPtr


Requested features :

my wishlist, should be added at some point :
- add AI support
- make a dynamic list of available units
- limit the number of hired units / turn
- make units cost higher when the player can't build theim

thread suggestions :
- hire just for a limited period but without health/XP penalty
- have just the XP penalty applied
- hiring allowed only from militaristic CS
- ownership flipping back if breaking diplo with the CS
- visual differenciation
- higher maintenance cost
- send mercs back to CS instead of disbanding them
- UI list management


Version history


v0.2 (Fev 09, 2011)
- fix typo in unit list
- add promotion to militaristic CS mercenaries
- append city state adjective to mercenary unit

v0.1 (Jan 28, 2011) :
- initial release



Comments and suggestions welcome :D
 
I took one short of the screenshots and realized you just made thousands of people very very very very very very happy.
 
"Hire mercenaries from another nation/city-state" good idea.

It would be good instead of not gaining XP or not healing alone, if instead we would only hire the units for a determined period of time and after they return to their respective country.

It's only my idea, your mod is good and I'll try it.

Le Marchand de boeufs
 
This is pretty snazzy. I think preventing healing might be a bit much considering the mercs are already cut off from instant heals (and other promotions- I really hate unpromoted units myself), but this is a biased opinion. :)
 
"Hire mercenaries from another nation/city-state" good idea.

It would be good instead of not gaining XP or not healing alone, if instead we would only hire the units for a determined period of time and after they return to their respective country.

It's only my idea, your mod is good and I'll try it.

Le Marchand de boeufs
I'm not sure if a determined period of time would be good for gameplay, imagine if you have many mercenaries units in your army, you must check if they'll still be near that strategic position the next turn or if they're going back home...

Or maybe a kind of contract then, with auto-renew feature if you have enough gold.

But I also want to keep it simple :D

This is pretty snazzy. I think preventing healing might be a bit much considering the mercs are already cut off from instant heals (and other promotions- I really hate unpromoted units myself), but this is a biased opinion. :)
Yep, maybe it's too much, I hadn't time to test it throughtfully in game, so feedback are welcome. But I don't want theim to be overpowered as they are cheap.
 
I like the no heal idea, but I do have one major concern:

Does this work with all types of City States? If so, I would suggest altering it so the feature is only available from Militaristic ones. As is, that CS type needs something that will cause players to want to use them.

On top of that, I would consider making it so that if you drop below friendly relations, all mercenaries from that CS change ownership back to the CS.
 
I like the no heal idea, but I do have one major concern:

Does this work with all types of City States? If so, I would suggest altering it so the feature is only available from Militaristic ones. As is, that CS type needs something that will cause players to want to use them.

On top of that, I would consider making it so that if you drop below friendly relations, all mercenaries from that CS change ownership back to the CS.

Well, I plan to give a bonus (like 2-3 strenght promotions) to units comming from militaristic CS.

As I see it, mercenaries have no nationality, but I'll think of something to do in that case. Maybe a slow health removal each turn to reflect desertion if we do not gain friendship back... and flipping ownership only in case of bad relation / war against the CS... yes, sound interesting (and will prevent exploit like attacking a cs with mercenary just hired from it...)
 
Nice. This would take some work, but could you make it so that the mercenaries are unique units? I think having map cues light different unit art, different flags, etc would add a lot to the mercenary concept. Especially if you see your enemy has specific mercs, then you could know he is being supplied by someone else.

Or, how mod-able is you mod? If other modders could go in and add unique units to the buy list using only xml that would be great. :)

Another idea would be to somehow make it so that the unit flag of the mercenary units is colored to reflect their origin. Yeah probably tons of flags needed, but it would work pretty well.
 
Nice. This would take some work, but could you make it so that the mercenaries are unique units? I think having map cues light different unit art, different flags, etc would add a lot to the mercenary concept. Especially if you see your enemy has specific mercs, then you could know he is being supplied by someone else.

Or, how mod-able is you mod? If other modders could go in and add unique units to the buy list using only xml that would be great. :)

Another idea would be to somehow make it so that the unit flag of the mercenary units is colored to reflect their origin. Yeah probably tons of flags needed, but it would work pretty well.

Yes, unique units could be done. You can already use it with my City States Unique Units mod, and when hiring a Pikeman from Vienne, you get a Landsknecht...

I may add XML config later, for now it's simply a matter of editing this array in "MercDefines.lua" :

Spoiler :
Code:
g_MercList = { 
	[ANCIENT] = { Merc1 = "UNIT_WARRIOR", Merc2 = "UNIT_SPEARMAN", Merc3 = "UNIT_CHARIOT_ARCHER",},
	[CLASSICAL] = { Merc1 = "UNIT_ARCHER", Merc2 = "UNIT_SWORDSMAN", Merc3 ="UNIT_HORSEMAN",},
	[MEDIEVAL] = { Merc1 = "UNIT_ARCHER", Merc2 = "UNIT_PIKEMAN", Merc3 = "UNIT_SWORDSMAN",},
	[RENAISSANCE] = { Merc1 = "UNIT_CROSSBOWMAN", Merc2 = "UNIT_MUSKETMAN", Merc3 = "UNIT_LANCIER",},
	[INDUSTRIAL] = { Merc1 = "UNIT_INFANTRY", Merc2 = "UNIT_CAVALRY", Merc3 = "UNIT_LANCIER",},
	[MODERN] = { Merc1 = "UNIT_PARATROOPER", Merc2 = "UNIT_MECHANIZED_INFANTRY", Merc3 = false},
	[FUTURE] = { Merc1 = "UNIT_PARATROOPER", Merc2 = "UNIT_MECHANIZED_INFANTRY", Merc3 = false },
}

About differenciation, for next version, I may add the City of origin in the unit name...
 
Interesting concept, given me some ideas that I thought I'd throw in the ring to see what you think.
Is it possible to give them a gpt cost in addition to normal unit maintenance? They could then be given a lower initial hiring cost but cost you a hell of a lot more in the long run, allowing you to hire them in a pinch when you really need a strong military but if you have too many for too long they'll eventually bankrupt you and split. Maybe increase the gpt cost as they level up.
Possibly replace the delete unit button with a cancel contract button which returns control of them to the CS you bought them from (if that's doable).
For management purposes what about including a in the CS dialogue a list of mercenaries you've hired from a specific CS
 
Love the mod so far. Also think some of the suggested changes would be great, but whatever changes you make i think you should make sure it stays modular with other larger mods so that it can be used in conjunction with them.
 
Interesting concept, given me some ideas that I thought I'd throw in the ring to see what you think.
Is it possible to give them a gpt cost in addition to normal unit maintenance? They could then be given a lower initial hiring cost but cost you a hell of a lot more in the long run, allowing you to hire them in a pinch when you really need a strong military but if you have too many for too long they'll eventually bankrupt you and split. Maybe increase the gpt cost as they level up.
Possibly replace the delete unit button with a cancel contract button which returns control of them to the CS you bought them from (if that's doable).
For management purposes what about including a in the CS dialogue a list of mercenaries you've hired from a specific CS
maintenance was on my feature list at start, but would have nedded new units for mercs, wich can be done, but would limit the customization choices... since, I've thought of simply duplicating most units entry in the DB to a mercs version with higher maintenance, so it may be added if nerfing is needed.

Love the mod so far. Also think some of the suggested changes would be great, but whatever changes you make i think you should make sure it stays modular with other larger mods so that it can be used in conjunction with them.

yeah, I'll try to keep it that way, in fact, most of the creation time of this mod was taken to understand Onni tutorial (which is great btw, my learning skill were the problem here :D ) so that I could add the CS menu without editing the CityStateDiploPopup files...
 
maybe instead of adding maintenance which might not jive completely with other mods, you could give them a 'promotion' lowering their strength by one. That way it would take the strength value from whatever other mods might be in use and make the bought units a bit less effective. That would reflect their usually being less dedicated to the civ they are fighting for, etc while being modular to each mod. I know that maintenance in balance combined is raised a lot already for instance so a higher maintenance cost might not really even be higher then existing for some ppl.

Just food for thought
 
I haven't really looked into this particular area of modding so I don't know if this is technically feasible, but couldn't you give merc units a 'promotion' that made them cost X gpt?
 
Yay! I would also like it if there were unique mercenaries for the era the city was active on world stage

i.e. for CS Lhasa have Iron Troop mercenaries for medieval and Gurkha for Industrial/Rennaisance.
 
This looks like a great mod, one thing I would love to see is to disable the purchasing of units from the build menu completely, so that if you need a quick army and have a good supply of gold getting mercs is the only solution.
 
You misspelled UNIT_LANCER as UNIT_LANCIER in the MercDefines
 
You misspelled UNIT_LANCER as UNIT_LANCIER in the MercDefines

thanks, v2 uploaded here !

change :


v0.2 (Fev 09, 2011)
- fix typo in unit list
- add bonus promotion to militaristic CS mercenaries
- append city state adjective to mercenary unit
 
Back
Top Bottom