Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: individual militia
New feature: individual militia[message #345324]
|
Fri, 06 May 2016 17:32
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
As I've stated before, it would be neat if militia had a bit more personality, and one could be more interested in them apart from "Oh no, the equivalent of $75 is dead!" While I don't want militia to be full mercenaries, I want them to be at least a bit more. Militia profiles are a start, but I want more.
I've continued development, and am now releasing this. This feature does the following:
- For each militia created by training/PMC hiring/interrogation, a militia profile is created and stored internally. This defines their name, soldier class, gender, visuals, name etc..
- Every time militia is created in tactical/autoresolve, we use these profiles to recreate militia. To the player it looks as if militia are as persistent as named NPCs.
- We keep track of their kills/assists, and promote them if they've amassed enough 'promotion points' (how many is defined in the ini). Atm promotion happens automatically (more on that later).
- We keep track of any notable things that happened to them. So later on one can retrace what battles they played a part in in their service record.
- If militia move, their 'profile moves with them'. So your green recruits from Drassen can be among the battle-hardened elites that help you storm Meduna (provided they live that long).
- Different militia 'origins' (arulcan local/PMC mercenary/army defector) have a different name scheme, and different gender and skin colour distribution. This is defined in the new [b]MilitiaIndividual.xml[b]. Currently,
- arulcan locals are hispanic, and have a relatively high female ratio, an justification for that can be read here.
- PMC mercenary are russian-like. While the description I made for Kerberus potentially allows any nationality, I feel that having them immediately stand out from the locals would be good. Additionally, this lets me show off how men and women can also have different surnames.
Note that I am not fluent at all in russian. For all I know, the names/surnames I provided are written badly, so feel free to correct that, russian-speakers! I also have no clue about what most of those names mean, so if you ever wanted to sneak in the equivalent of 'hundred russian names that are really just code for genitals', this is your chance to fool me into doing so. - army defectors are german. Because I was tired of adding names in languages I have no grasp off, and because we are indeed bad guys.
You can also define different wages for each origin. It would be reasonable that a mercenary specifically hired by you gets a higher wage than some army scum you gang-pressed into switching sides. - (Optional): If militia lose health, we keep track of that. If we later recreate them, we create them with lower health (though they slowly heal over time). This will make the game harder - militia aren't magically restored to full health the minute the battle ends. In a subsequent attack, they will have lower health, meaning that a town with a fully-sized militia isn't quite the impenetratable fortress it used to be.
Additionally, if militia is wounded in tactical and you then resume that battle in autoresolve, militia will carry over these wounds. - There is a website, where you can see all your militia profiles:
There are a few filter options - you can filter for dead/alive/fired militia, filter by class, origin, and sector.
When you've successfully trained militia and do not yet have access to that website, Enrico will send you an Email about it. Makes sense, the dude doesn't do much, he can at least send us links to the internet. - By clicking on an entry, you can see the militia's file . First is personal data:
We store HP as a ratio, not as a fixed value (more on that later). Age is simply there for immersion, the only thing it has is that older mercs have a higher chance for white hair.
You can fire a militia here, you will be asked for confirmation. Note that this isn't possible if they are currently in combat. - Next tab is their service record:
Here you can see noteworthy entries of their career in your service: When and how they were recruited, what operations they took part in, when they were promoted, and how they left your service. Depending on what they did in battle, the text differs. Clicking on an operation will send you to that operation's campaign history webpage. - Final tab (currently) is the inventory:
If the militia is in the currently loaded sector (and thereby exists as a soldier), we can see their inventory here - though we cannot interact with it. - This feature is off by default. It can be activated at any time during the campaign (of couse I can't retroactively record their history). If militia is then created without a profile exisiting, a new one is created.
- Should this feature run as intended and be accepted by players, I plan to remove the militia part of enemy profiles.
This militia was wounded in combat (and got 2 kills). The image in the website equals the look in tactical.
Settings and xmls:
- Ja2_Options.ini:
[Individual Militia Settings]
;------------------------------------------------------------------------------------------------------------------------------
; Settings for individual militia
;
; If this feature is active, every time a militia is created by training/PMC hiring/interrogation, a small profile stores their
; - name
; - visuals
; - record of all battles they participated
; - kills and assists
; - health ratio
; - and a few other things
;
; Whenever a sector with militia is loaded, this data is used to recreate a militia. As a result, militia seem to be as persistent
; as your mercenaries (so it is possible to have a veteran militia which accompanied you in several battles).
;
; The data for the different militia origins (arulcan local/PMC mercenary/army defector) are defined in TableData/MilitiaIndividual.xml)
;------------------------------------------------------------------------------------------------------------------------------
; if TRUE this feature is on
INDIVIDUAL_MILITIA = FALSE
; For each kill, a militia gets 2 promotion points.
; For each assist, a militia gets 1 promotion point.
; Here we define how many promotion points a militia needs to be promoted.
; Values from 1 to 100.
INDIVIDUAL_MILITIA_PROMOTIONPOINTS_TO_REGULAR = 4
INDIVIDUAL_MILITIA_PROMOTIONPOINTS_TO_ELITE = 10
; If TRUE, the game remembers the health percentage of a militia the last time it was in tactical. This percentage is used the
; next time the militia is used in tactical. As a result militia will have lowered health for a while after being wounded.
; NOTE: THIS WILL MAKE THE GAME HARDER!!!
INDIVIDUAL_MILITIA_MANAGE_HEALTH = TRUE
; Every hour, militia health percentage rises by this percentage to simulate healing. Values from 0.0 to 100.0.
INDIVIDUAL_MILITIA_HOURLYHEALTHPERCENTAGEGAIN = 2.0
;******************************************************************************************************************************
;******************************************************************************************************************************
- Tabledata/MilitiaIndividual.xml:
<ORIGINDATA>
<!-- Arulcan locals: militia trained from the civilian population -->
<male_forename>Aaron</male_forename>
...
<male_surname>Correa</male_surname>
...
<female_forename>Fulca</female_forename>
...
<female_surname>Zayas</female_surname>
<chance_bodytype_REGMALE>20</chance_bodytype_REGMALE>
<chance_bodytype_BIGMALE>5</chance_bodytype_BIGMALE>
<chance_bodytype_STOCKYMALE>5</chance_bodytype_STOCKYMALE>
<chance_bodytype_REGFEMALE>70</chance_bodytype_REGFEMALE>
<chance_skin_PINKSKIN>10</chance_skin_PINKSKIN>
<chance_skin_TANSKIN>40</chance_skin_TANSKIN>
<chance_skin_DARKSKIN>30</chance_skin_DARKSKIN>
<chance_skin_BLACKSKIN>20</chance_skin_BLACKSKIN>
<dailycost_green>10</dailycost_green>
<dailycost_regular>20</dailycost_regular>
<dailycost_elite>30</dailycost_elite>
</ORIGINDATA>
A detailed description of what each tag does can be found at the start of the xml itself.
There are a few things from the concept that I have not (yet?) implemented:
- The stats and level of a militia/enemy/civilian are highly dependent on game progress, sector distance to the queen's palace and other factors. A militia created in Meduna with progress 100 vastly outclasses a militia created in Drassen with progress 5. If we want milita to carry over these stats, we have to essentially revamp the entire system, not only for militia, but for everyone. I do not want to do such a massive change right now.
- Manually outfitting militia with items. Managing the inventory of 64 mercs can already get tedious (even though I've made work easier for me by having their inventories as streamlined as possible). Additionally managing hundreds of militia... bah. Too much for me.
Additionally, the UI work required isn't exactly tiny, either. - Traits are closely interwoven with items. If we can't control what stats and items a militia gets, there is no point in deciding their traits.
- Apart from the money aspect, there isn't much reason to manually handle promotions instead of promoting militia asap. So this can't be set either.
Perhaps I will revisit the above decisions at some point - suggestions are always welcome. On the plus side, this feature is now much easier to use (some posters were wary of the amount of interaction this feature would require). In fact, you don't need to do any extra work (apart from turning the feature on in the ini): militia profiles will be created and managed automatically. The player can play just as usually. If INDIVIDUAL_MILITIA_MANAGE_HEALTH is on, the campaign will be a bit harder, but I think in a 'good' way (militia not instantly healing to full life). Those players that want more immersive militia will hopefully see this as beneficial, and ocassionally look at the website to check out how the little rascals are doing.
This feature does not break savegame compatibility.
This has been added to the trunk in r8202 and GameDir r2316. Using the new exe without the new GameDir will cause president Trump to make you his ambassador to Libya.
[Updated on: Fri, 06 May 2016 17:37]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
Re: New feature: individual militia[message #345327 is a reply to message #345326]
|
Fri, 06 May 2016 18:21
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Militia training is unchanged. If a militia is promoted by training, this is noted in their profile, and promotion points are increased according to the ini settings. Similar, if militia are created with a higher class than green, their initial points reflect that.
Otherwise, a militia gains promotion points by kills and assists - a kill is worth 2 points, an assist 1 point (this is unchanged).
The only notable change is that until now, promotion was somewhat chance-based - a militia had a chance to be promoted with fewer points. But until now, any points where lost after combat, so I think this change won't be unbalancing.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: New feature: individual militia[message #345603 is a reply to message #345592]
|
Fri, 20 May 2016 21:54
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
A bug introduced with this feature caused militia to disappear while moving around. This happened with mobile militia (ALLOW_MOBILE_MILITIA = TRUE), not those moved by strategic command. This has been fixed in r8227.
A small note: When adding this feature, I added a few error messages, like Possible error: Not enough individual militia found in MoveIndividualMilitiaProfiles. These appear whenever this feature encounters a situation that shouldn't happen. As this feature relies upon a sector having the same number of militia as militia profiles in a sector, this often happens when that isn't the case - which naturally happens if you load an older game that didn't have this feature (on) with an exe where it is now active.
In that case, loading a sector with militia causes Possible error: Not enough individual militia found in GetIdOfUnusedindividualMilitia to be played quite often, after which a militia profile is created and the issue is resolved. The other solution would be to magically create them on the entire map upon loading, which didn't seem right at the time.
So don't necessarily panic if this happens, depending on your old save, it is expected.
[Updated on: Fri, 20 May 2016 22:00]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: New feature: individual militia[message #345684 is a reply to message #345683]
|
Thu, 26 May 2016 11:49
|
|
3iff |
|
Messages:65
Registered:July 2001 Location: Birmingham, UK |
|
|
I considered those to be the culprits. It didn't help that I was checking the wrong files as I'd duplicated the old data folder for something and I ended up checking identical folders!!
I did have an old PressLogos file but it still crashed on me. I'll check again tonight and ensure I do get the right versions this time.
Thanks for the advice.
-------
Yes, that did the trick. Not sure how it didn't work before but it does now. Many thanks.
[Updated on: Fri, 27 May 2016 09:59] Report message to a moderator
|
Corporal
|
|
|
|
|
|
Re: New feature: individual militia[message #346121 is a reply to message #346120]
|
Wed, 06 July 2016 21:16
|
|
Elvis_A |
|
Messages:282
Registered:December 2012 Location: exUSSR |
|
|
most of the fore/surnames are good to use. Some of the names are not Russian however they are Slavik:
<male_forename>Borislav</male_forename>
<male_forename>Lubomir</male_forename>
etc.
Other (sur)names are non Slavik for example:
male_surname>Engelgardt</male_surname> Jewish/German
<male_surname>Aliyev</male_surname>
Funny thing is my surname is Aliyev (common surname in Azerbaijan Republic, exUSSR country) This surname is arabic in origin name Ali + yev (as soon as Russia invaded and captured Caucasus countries century ago, they changed surname forming in those countries, so that new surnames always end with -yev -ov -in, etc)
following names are the same(Hypocorisms):
<male_forename>Grigory</male_forename>
<male_forename>Grischa</male_forename>short form of Grigory (like Rob/Bob - Robert)
<male_forename>Petya</male_forename> short name for Pyotr
<male_forename>Pyotr</male_forename>
<female_forename>Maria</female_forename>
<female_forename>Masha</female_forename> short form of Maria
<female_forename>Nastja</female_forename> short form of Anastasiya
<female_forename>Natalia</female_forename>
<female_forename>Natasha</female_forename> Short form of Natalia
<female_forename>Tanya</female_forename> short form of Tatiana
<female_forename>Tatiana</female_forename>
Russia is multinational country, so it is ok to have mentioned names above since you can often see those (Georgian, Azeri, Slovenian, etc sur/names),
BUT i would remove names below:
<male_forename>Abid</male_forename> never heard
<male_forename>Abily</male_forename> same as above
<male_forename>Aburom</male_forename> //-//
<male_forename>Avda</male_forename>
<male_forename>Avim</male_forename>
<male_forename>Avit</male_forename>
<male_forename>Avksily</male_forename>
<male_forename>Darko</male_forename> i would change it to Danko, which may be used both as name and surname
<male_forename>Inal</male_forename>
<male_forename>Avtonom</male_forename>
<male_surname>Rodriguez</male_surname> I will definitely remove 3 of these
<male_surname>Rodriguez</male_surname>
<male_surname>Rodriguez</male_surname>
<female_forename>Abijah</female_forename>
<female_forename>Leda</female_forename>
<female_forename>Zenalda</female_forename> replace with Zinaida
<female_forename>Zora</female_forename>
<female_surname>Osborn</female_surname> Ozzie? ;)
<female_forename>Rachel</female_forename>
[Updated on: Wed, 06 July 2016 21:19] Report message to a moderator
|
Master Sergeant
|
|
|
Re: New feature: individual militia[message #346122 is a reply to message #346121]
|
Wed, 06 July 2016 21:36
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Thank you, this is very helpful. Could you tell me some replacements? The thing is, if names are removed, any existing militia with that name would end up not having a name at all, which is rather bad...
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
|
Re: New feature: individual militia[message #346273 is a reply to message #346271]
|
Sun, 17 July 2016 01:05
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Yeah, it's likely the update function only 'hits' them on full hour. Don't see the need to change that, as the display is cosmetics in that case. I think you could also force an immediate update by unloading the sector (not that there's any reason to, as said, cosmetics).
Assign mercs to heal? Hmm. That would work, but given the number of wounded militia... you could hire dozens of doctors to deal with militia then. Hmm. Perhaps for some game mode where we only train and heal them, without fighting ourselves? MASH gameplay?
You can use the equip militia feature for that. If I recall, when militia equip gear, elites always choose first, so they should get the best stuff.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
Re: New feature: individual militia[message #346284 is a reply to message #346273]
|
Sun, 17 July 2016 10:13
|
|
ratpaz |
|
Messages:137
Registered:April 2015 Location: Italy |
|
|
Flugente wrote on Sun, 17 July 2016 00:05
Assign mercs to heal? Hmm. That would work, but given the number of wounded militia... you could hire dozens of doctors to deal with militia then. Hmm. Perhaps for some game mode where we only train and heal them, without fighting ourselves? MASH gameplay?
It's just an idea, since we can heal mercs i wonder why we can't heal militia the same way
but instead of using dozens of doctors,
just as example, let's say the natural regeneration is 0.5 health/hour a single doctor can speed up the healing process by another 0.5 to 3 health/hour depending on his skills, and more doctors can do even better.
Yes this will make doctors much more important in a campaign, since we will need to have atleast a good doctor in every city we control, but there are a lots of doctors to hire from AIM/Mercs anyway...maybe also mines should produce a bit more to support this.
Report message to a moderator
|
Sergeant
|
|
|
Re: New feature: individual militia[message #346285 is a reply to message #346284]
|
Sun, 17 July 2016 12:19
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Hmm. Perhaps not a flat bonus, as one would then benefit obscenely from clustering all militia together, but that would be workable. Perhaps I can do that soonish. It would be the only new code required, mine income is in the ini anyway.
I guess with this one could really play as military advisors - only train, gear up and doctor the militia, and have one or 2 advisors per militia platoon to guide them. That would work.
What would really be the icing on the cake would be to have sevenfm's improved militia command in the trunk. That would boost this kind of play tremendously.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
Re: New feature: individual militia[message #346290 is a reply to message #346287]
|
Sun, 17 July 2016 17:45
|
|
ratpaz |
|
Messages:137
Registered:April 2015 Location: Italy |
|
|
Found few problems using 8266 on gamedir 2327 without any other mods:
1) I'm playing with militia_use_sector_equipment active
The main problem here is the fact that militia will always drop their equipment whenever i load a new sector.
So if i order militia to go in another sector they will leave all their equipment in the origin sector and move without nothing, unless first i load the sector where the militia reside and then order them to move. If this will have no conseguences, xcpt some tedious load of the sector before move the militia, it may have whenever i use radio operator skill "call reinforcements", i still haven't tested it but i belive it should result with the arrive of the reinforcements without equip.
2) It seems individual militia got problems hiring from Kerberus
I had 2 sectors full of trained militia in Drassen and all was working fine until i hired a elite militia from Kerberus, after 24 hours i got 2 new militia, the elite i ordered but also a green militia
consequently i got the error "not enough individual militia found in getidofunusedindividualmilitia" and that's what i got in the end:
Notice how the militia hired from Kerberus should be the elite one and not the "ghost" green like it appear on militia overview website.
The elite is there as well, but he result as not hired from Kerberus and is the one causing the error message.
3) I'm not sure if this have something to do with individual militia feature, but i made a full playtrough lately without this feature and all went fine, well to be onest i made that playtrough with a earlier version (8246), so sorry if i post this bug in the wrong place:
Like you can see, i can't hire militia on sector D15 Sam site it appear to be full, but i just conquired it and there are no militia in there.
also if i try to move the helicopter it appear like i never got the Sam site, all the map is full of danger zones.
Here are the savegames and .ini for problems 2 and 3:
https://www.mediafire.com/?25vx77ovb354h56
Edit: about problem 3 it seems it have nothing to do with individual militia feature after all, the problem was solved the moment i leave the sector and enter the sam site again. Still it is something need to be checked out.
[Updated on: Sun, 17 July 2016 18:18] Report message to a moderator
|
Sergeant
|
|
|
Re: New feature: individual militia[message #346302 is a reply to message #346290]
|
Tue, 19 July 2016 12:59
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
@ratpaz:
1. Sounds very, very odd. Can I also see that in your savegames?
2. + 3.: I'll check that later - keep in mind that it's best if the saves are from a point prior to the bugs happening (otherwise I can't determine how the bug happened).
@sevenfm:
1. See Brot's post, or see in code - see how loading of SOLDIERTYPE uses the savegame versions. We always pad 4-byte blocks, once you get used to it all the oddities in the save/load routines are easier to understand.
2. Absolutely fine by me, likely a problem for others - but if your new commands also use the old ones, there should be no problem. If militia don't immediately forget what we told them to, that seems like a definite plus.
3. Hmm. That could work - but wouldn't that be bad? I mean, if orders persist, and we ordered all militia to storm a building as the last command in the last battle in a sector, wouldn't that cause all of them to always run to that building whenever we load the sector again? In that case, resetting their orders (which we do by not having orders preload upon sector loading) seems reasonable.
I guess I need to better understand how your stuff works, because combining our features definitely has potential.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
|
Re: New feature: individual militia[message #346306 is a reply to message #346305]
|
Tue, 19 July 2016 20:37
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Eh. First of all, I can't fix 3. with this savegame. What should happen is that once you win in the sector, you are awarded control of the airspace. That obviously hasn't happened, but I cannot check why it didn't happen. Ideally I'd have savegame from before the battle has ended to see.
As to 2., something very odd is happening there. Did you somehow alter the map to contain jeeps and tanks?
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
Re: New feature: individual militia[message #346307 is a reply to message #346306]
|
Tue, 19 July 2016 20:51
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
I can't reproduce 1.. In D13, however, many items are in Father Walker's chest, which is inaccessible. As a result, the militia can barely grab anything there, but some it does, and moving gear along militia works fine on my end.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
Re: New feature: individual militia[message #346308 is a reply to message #346306]
|
Wed, 20 July 2016 07:46
|
|
ratpaz |
|
Messages:137
Registered:April 2015 Location: Italy |
|
|
Flugente wrote on Tue, 19 July 2016 19:37Eh. First of all, I can't fix 3. with this savegame. What should happen is that once you win in the sector, you are awarded control of the airspace. That obviously hasn't happened, but I cannot check why it didn't happen. Ideally I'd have savegame from before the battle has ended to see.
As to 2., something very odd is happening there. Did you somehow alter the map to contain jeeps and tanks?
Yeah, 3 need a prior savegame, luckily i had one, here it is:
http://www.mediafire.com/download/a3vhljnd3g2hi6h/SaveGame233.7z
I didn't alter any maps, only modified few .xml in tabledata directory, nothing extreme
In vehicles.xml, i modified the seat capacity of hummer from 6 to 10.
In mercsprofiles.xml made little tweaks
And lastly modified Difficultysettings.xml to make expert difficulty a bit harder.
As for 1, militia move with their gear but only if i load the sector where the militia reside first.
Soon i'm doing Drassen counter and will reinforce attached sector with radio operator skill, will see if they will arrive with no equip and eventually post the savegame.
Edit: It seems militia move with their gear correctly if i call reinforcments with radio operator skill or call reinforcments and play the battle, but not in autoresolve, where all militia always leave their gear on their original sector. If you say you can't reproduce it, i really don't know why this is happening into my game, maybe i should do a video where i show the problem.
[Updated on: Thu, 21 July 2016 17:05] Report message to a moderator
|
Sergeant
|
|
|
Goto Forum:
Current Time: Sat Nov 30 09:39:24 GMT+2 2024
Total time taken to generate the page: 0.03476 seconds
|