[MODCOMP] Mercenaries Mod

Fachy said:
I'm totally lost! Do they hire mercenaries or not??
Yes, they will hire mercenaries in depending on certain conditions.
 
Very cool.

Any news on your Composite mod? Is having the AI put mercs out for hire a planned feature?
 
The game does ignore the starting era I set in the config.ini:

Spoiler :

[Mercenaries Mod]

; Set Game Turn Mercenary Creation to true if mercenary creation should happen during the
; onBeginGameTurn method, false if it should happen during the onBeginPlayerTurn method
; Default value is true
Game Turn Mercenary Creation = true

; Change this if you want to increase the min number of mercenaries that will be added
; to the global mercenary pool each turn.
; Default value is 1
Min Mercenary Creation Count = 1

; Change this if you want to increase the max number of mercenaries that will be added
; to the global mercenary pool each turn.
; Default value is 5
Max Mercenary Creation Count = 3

; Set this to true if the max player era should be used to create mercenaries, false if
; the player's era should be used to create the mercenaries. The player's era will only
; be used if Game Turn Mercenary Creation is also set to false. This setting will be
; ignored if Era Appropriate Mercenaries is set to false.
; Default value is true
Max Player Game Era = false

; Set this to true if era appropriate mercenaries should be created, false if mercenaries
; from any era should be created. WARNING: If set to false there could be time traveling
; mercenaries from future eras appearing in the Ancient Era.
; Default value is true
Era Appropriate Mercenaries = true

; Change this to the era that mercenaries should be available in the game. The era used
; to determine the starting point depends on the value of Max Player Game Era. If Max
; Player Game Era is set to true then the era used to determine the starting point will
; be the max era from the active players in the game. If Max Player Game Era is set to
; false then the starting point will be the current era of the player during the
; onBeginPlayerTurn method call.
; Default value is ERA_ANCIENT
Starting Era = ERA_CLASSICAL

; Set Display Mercenary Manager On Begin Player Turn to true if the "Mercenary Manager"
; screen should be displayed at the beginning of every player turn.
; Default value is false
Display Mercenary Manager On Begin Player Turn = false

; Change this to increase or decrease the chance that a mercenary will get a promotion.
; The default value of 10 means that the mercenary has a 10% chance of getting one of
; their promotions.
; Default value is 10
Mercenary Promotion Chance = 10

; Change this to true to give mercenaries the prereq promotions when it is set to true
; and the mercenary is given a promotion with unmet prereqs. Mercenaries that can have
; combat 1 - 5 and were given combat 5 would automaticallly be given combat 1-4 if the
; value is set to true. WARNING: Setting this value to true will cause hire and
; maintenance costs to go up for mercenaries.
; Default value is true
Backfill Prereq Promotions = true

; Change this to either increase or decrease mercenary hiring costs. For example if
; mercenaries should cost 50% less then the value should be set to 0.5. If mercenaries
; should cost 50% more then the value should be set to 1.5.
; Default value is 0.8
Hire Cost Modifier = 0.8

; Change this to either increase or decrease mercenary maintenace costs. For example if
; mercenary maintenace should cost 50% less then the value should be set to 0.5. If
; mercenary maintenace should cost 50% more then the value should be set to 1.5.
; Default value is 1.0
Maintenance Cost Modifier = 1.0

; Change this to change the location where mercenaries should be placed when hired by
; players. Currently there are 3 static possible options plus one dynamic option. The
; three static options are:
; - Capital City
; - Civilization Edge
; - Random
; The "Civilization Edge" option will place hired mercenaries in the farthest city
; from the players capital city. The last possible value for the mercenary starting
; location is a comma separated list of building types. When set mercenaries will only
; start in a city with one or more of the specified buildings. The more buildings in
; the city, the bigger the chance that the mercenary will be placed there when they
; are hired by the player. An example of such a list is:
; BUILDING_PALACE,BUILDING_CASTLE,BUILDING_BARRACKS. When the mercenary starting
; location is set to this value then the starting location for hired mercenaries will
; be a random city containing one of the buildings specified. If a city cannot is not
; found with any of those buildings then the mercenary will be placed in a random
; city.
; Default value is Civilization Edge
Mercenary Starting Location = Random, BUILDING_TAVERN

; Change this to true if hiring mercenaries should only be allowed if one or more of
; a player's civilization contains one or more of the buildings specified in the
; "Mercenary Starting Location" option. Oh did I forget to mention, if the "Mercenary
; Starting Location" option isn't set to a list of buildings players won't be able to
; hire any mercenaries.
; Default value is false
Require Starting Location Contain Buildings = true

; Change this to false to allow contracting out units outside of cities.
; Default value is true
Require City Unit Contract Creation = true

; Change this to increase or decrease the minimum number of promotions each mercenary
; should have when initially added to the global mercenary pool by the game.
; Default value is 1
Minimum Starting Mercenary Promotion Count = 1

; Change this number to increase or decrease the ratio between the number of
; mercenaries and units in the game. For instance setting the value to 10 means that
; there will be 10 mercenaries available in the game for every 100 units (a 1:10
; ratio). Setting the value to 4 means that there will be 4 mercenaries available in
; the game for every 100 units (a 1:25 ratio).
; Default value is 10
Ratio Mercenaries To Regulars = 10

; The max size of the global mercenary pool. No more mercenaries will be added by the
; game to the pool if the max number is reached. This feature does not disable the
; fire mercenary feature. This variable is used to control the load time for the
; "Mercenary Manager" screen.
; Default valus is 100
Max Global Mercenary Pool Size = 30

; Change this to false if mercenaries should be removed from the global mercenary pool
; at the beginning of the game turn. When set to true a number of mercenaries will
; wander away from the global mercenary pool. This is another variable used to control
; the load time for the "Mercenary Manager" screen.
; Default valus is true
Wanderlust Mercenaries = true

; Change this to increase the max number of mercenaries that may wander away from the
; global mercenary pool.
; Default valus is 3
Wanderlust Mercenaries Maximum = 3

; Change this to true if mercenary moves should be consumed when they are hired and
; added to the game.
; Default value is true
Consume Mercenary Moves On Hire = true

; Change this to true to delay the placement of hired mercenaries in player's cities
; by the amount indicated in "Mercenary Placement Delay Amount". The value set to
; "Consume Mercenary Moves On Hire" will be treated as if set to false if "Delay
; Mercenary Placement" is set to true.
; Default value is true
Delay Mercenary Placement = true

; Change this to increase or decrease the time that will be used to delay the placement
; of hired mercenaries.
; Default value is 3
Mercenary Placement Delay Amount = 3

; Change this to true if unit moves should be consumed when they return from being
; contracted out as mercenaries
; Default value is true
Consume Unit Moves On Return = true

; Change this to true to delay the return of contracted out units to player's cities
; by the amount indicated in "Unit Return Delay Amount". The value set to "Consume Unit
; Moves On Return" will be treated as if set to false if "Delay Mercenary Placement" is
; set to true.
; Default value is true
Delay Unit Return = true

; Change this to increase or decrease the time that will be used to delay the return
; of units contracted out as mercenaries.
; Default value is 3
Unit Return Delay Amount = 3

; Change this to false to supress the mercenary messages.
; Default value is true
Display Mercenary Messages = true

; Add any units that you don't want to have generated as a mercenary below. Basically
; use the unit type description. Here are some examples:
UNIT_WARRIOR = true
;UNIT_GREEK_PHALANX = true
;UNIT_MONGOL_KESHIK = true
UNIT_CHARIOT = true
;UNIT_HORSE_ARCHER = true
;UNIT_MALI_SKIRMISHER = true
;UNIT_PERSIA_IMMORTAL = true
UNIT_ARCHER = true
UNIT_SCOUT = true
; If the ; was removed for all of the unit type descriptions then those units would
; not be created as mercenaries.

; Add any of the promotions you below that shouldn't be given to mercenaries when
; they are generated. Basically use the promotion type descriptions. Here are some
; examples:
PROMOTION_MORALE1 = true
PROMOTION_MORALE2 = true
PROMOTION_MORALE3 = true

; If the ; was removed for all of the promotion type descriptions then those
; promotions would not be given to mercenaries at all.


Did I set up anything wrong? Sorry seems I'm just stupid with this.:(
 
Ploeperpengel said:
The game does ignore the starting era I set in the config.ini

Did I set up anything wrong? Sorry seems I'm just stupid with this.:(

When you say ignore what do you mean? Do you mean that you can still use the alt-m key?

What part of the mod is ignoring the starting era info?
 
zulu9812 said:
Is v0.8 still on the go?

Yep. I'm still working on it :D
 
TheLopez said:
When you say ignore what do you mean? Do you mean that you can still use the alt-m key?

What part of the mod is ignoring the starting era info?
The mercmod just works from the beginning of the game. I thought it would start later if I set the starting era differently- misunderstood something?
 
I just started a game with just the merc mod I set the starting era to classical and the only thing that worked was pressing alt-m. I couldn't hire out mercenaries from the main screen and the mercenary manager button wasn't on the main screen either.
 
Strange. Could you check another time with the WH? Maybe something was implemented wrong here I really can't figure that out. I get the screen and can hire and fire at will no matter what the starting era is:confused: (could be the current version uploaded has still ancient era set, you would have to change that for testing)
Sorry for all this requesting, hope to pay you back your effort soon after release with another model or two.
 
Ploeperpengel said:
Strange. Could you check another time with the WH? Maybe something was implemented wrong here I really can't figure that out. I get the screen and can hire and fire at will no matter what the starting era is:confused: (could be the current version uploaded has still ancient era set, you would have to change that for testing)
Sorry for all this requesting, hope to pay you back your effort soon after release with another model or two.

Ah, no wonder, I thought you were talking the regular stand-alone mercenaries mod. I'll check it out first chance I get.
 
I've experienced the problem that Ploe's been talking about. Caesium and I (mostly Caesium) found part of the reason when trying to debug the UnitAllegiance mod. Not sure if he ever followed up on it. It was causing an OOS error.

The problem was that the python module would somtimes be loaded before the XML files would be. Thus, when gc.getInfoTypeForString("ERA_ANCIENT") is being called, since the XML files have not yet being loaded, the value is being set to the default -1. Sometimes the value gets set correctly because the python module isn't being loaded until after the fact, or because it has being reloaded after the fact. This was causing OOS problems with Caesium because there would be one computer that would have the items loaded correctly (because they had played a game earlier, I'm guessing), and one that didn't.

Edit: Seems the mercenary mod will change that value during load time using the ini config, where as the Warhammer never does. So, it's apparent that the first setting of g_iStartingEra wouldn't work. However, just know that anyone with a debug build is going to get error messages for those things.

I wonder if it's just a directory structure thing losing the ini file in the mess, and preventing some mods from not changing it from the value of -1 to the new value that should be found in the ini file.

Yup, I think that might have been it. Is there an error message that pops up if the ini file can't be read? I bet it would solve a bunch of problems, and since the gc.getInfoTypeForString()'s set globally at the top of the files don't ever get used, and will in fact throw assertion errors, it's probably best to make them some default value, or else someone might think to change that rather than the ini file.

Edit2: In the case of Warhammer, this was because of the CvModName.py file not having the correct value in it.
 
Gerikes said:
Edit2: In the case of Warhammer, this was because of the CvModName.py file not having the correct value in it.

Thanks Gerikes, well Ploe, there's your answer.
 
Not yet. I want to finish up on the new version of the merc mod and then I'll update the merc mod to work in Warlords.
 
Rhye said:
2 questions:


1. Does the mod in its current state work with Warlords?
No, it won't work since there are several files that have had their schema change in warlords...

Rhye said:
2. Is there any way to disable it on discovery of a certain tech?
No but I will add it to the feature request list for v0.8.
 
Back
Top Bottom