Is there any way I can mod Stainless Steel to make unit recruitment come from that settlements population?
Is there any way I can mod Stainless Steel to make unit recruitment come from that settlements population?
Here's a script I wrote for someone else.
http://www.twcenter.net/forums/showt...7#post11708627
The major limitation on it is that there are 4 classes of units (infantry, cavalry, siege, and ship) and all population deductions can only be a single number for the whole class. So for example, you could do it where all infantry deduct 150 population, all cavalry deduct 60 population, all ships deduct 60 population, and all siege deducts 40 population. But it could only be one fixed number for each class of unit. You couldn't do it where say, Urban Spear Militia would deduct 200 population while DFKs would only deduct 120 population.
Is there no way to copy the code from Rome? Also which txt file am I editing and will this work with my current saved game?
There is no code from Rome (at least no code available to people outside of Creative Assembly) that you can copy.
As for which file to edit, please read that thread before asking questions. I already explained it quite well there. If you have any other questions after reading through those posts, feel free to ask.
Edit: Also, no, it is not save game compatible.
Last edited by PapaRosario; August 19, 2012 at 09:06 PM.
Disregard. Missed the later post where you explained where to paste it.
So I found the text for Venice in campaign_script
monitor_event SettlementTurnEnd SettlementIsLocal
and SettlementName Venice
and GovernorInResidence
and GovernorAttribute Charm <= 9
set_counter nowc 1
end_monitor
monitor_event SettlementTurnEnd SettlementIsLocal
and SettlementName Venice
and GovernorInResidence
and GovernorAttribute Charm <= 4
set_counter nowc 2
end_monitor
monitor_event SettlementTurnEnd SettlementIsLocal
and SettlementName Venice
and not GovernorInResidence
set_counter nowc 2
end_monitor
I posted your script under it like so:
monitor_event SettlementTurnEnd SettlementIsLocal
and SettlementName Venice
and GovernorInResidence
and GovernorAttribute Charm <= 9
set_counter nowc 1
end_monitor
monitor_event SettlementTurnEnd SettlementIsLocal
and SettlementName Venice
and GovernorInResidence
and GovernorAttribute Charm <= 4
set_counter nowc 2
end_monitor
monitor_event SettlementTurnEnd SettlementIsLocal
and SettlementName Venice
and not GovernorInResidence
set_counter nowc 2
end_monitor
monitor_event UnitTrained SettlementName Venice
and TrainedUnitCategory infantry
console_command add_population Venice -150
end_monitor
monitor_event UnitTrained SettlementName Venice
and TrainedUnitCategory cavalry
console_command add_population Venice -60
end_monitor
monitor_event UnitTrained SettlementName Venice
and TrainedUnitCategory siege
console_command add_population Venice -40
end_monitor
monitor_event UnitTrained SettlementName Venice
and TrainedUnitCategory ship
console_command add_population Venice -75
end_monitor
But still nothing. Starting population was 4600. I turned taxes to VH with a bonus of 1.5%. I trained Urban Militia(-150) and a Galley(-75). Next turn population was at 4668. No pop loss from unit recruitment.
So I pasted the script for venice and tried it out, after posting it exactly like it was in the other forum, and tried it out but still nothing. What am I doing wrong?
Got it to work. Thank you paparosario. You just helped me get so much more enjoyment out of a mod I already love. With this pop mod, 4 turns per year, character aging adjusted to match and RR with grim reality, its time for a truly epic early campaign on vh/vh.
Your idea does not work completly due to game mechanics/limitations...
Settlements have a minimum population.
Right now it its 400 but it does not matter... if you have minimum population ( 400 or whatever you changed it into ) you will be able to recruit thousends of soldiers without a pop change.
It cannot go below that! ( You could try a negative minimum but... )
You cannot check the population number via script and prevent units from beeing recruited!
( I was searching the mod forum and did not find anything... correct me if I missed something )
If you put in a population increase after disbanding... you will get "full population" addition even if you only disband 1 guy.
Next and biggets "problem" will be:
The AI produces as many units as possible.
You will not see any AI settlement beeing upgraded ever. ( It would be possible in theory but I bet it will never happen )
Solving this is easy by adding
and FactionIsLocal
as a second condition.
Sorry for sounding a bit jerky but the AI not upgrading will kill your game!
Yeah, you can't get it exactly as it was in Rome, but I tried to get as close as possible. At least lowering your population to 400 will kill your tax income even though it won't prevent units from being recruited.
That's why I didn't include a population increase for disbanding. It would be too easy to accidentally (or not accidentally) exploit.
If you read the thread, I did offer to apply the decrease in population only to the player faction and not to the AI factions, but the guy who was asking for the script did not want that. But yes, it is very simple to add that in.
Last edited by PapaRosario; August 24, 2012 at 08:34 AM.