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 Go to next message
Flugente

 
Messages:3509
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:
    http://i.imgur.com/wi2jnUz.png
    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:
    http://i.imgur.com/WJ6Xn9l.png
    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:
    http://i.imgur.com/cdRJqqG.png
    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:
    http://i.imgur.com/USVual7.png
    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.
http://i.imgur.com/grPd5Kh.png
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

Captain

Re: New feature: individual militia[message #345326 is a reply to message #345324] Fri, 06 May 2016 18:00 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Nice! happy

How does this feature alter training? Does training now create promotion points to advance militia to regular and elite?



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New feature: individual militia[message #345327 is a reply to message #345326] Fri, 06 May 2016 18:21 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #345329 is a reply to message #345327] Fri, 06 May 2016 19:16 Go to previous messageGo to next message
killerpfiffi is currently offline killerpfiffi

 
Messages:22
Registered:December 2009
Location: Austria
I will love it! thumbs up

Report message to a moderator

Private 1st Class
Re: New feature: individual militia[message #345333 is a reply to message #345329] Fri, 06 May 2016 21:30 Go to previous messageGo to next message
Panzer is currently offline Panzer

 
Messages:89
Registered:February 2016
Location: Altis, Sometimes Tanoa
Would like to see expansion on that inventory bit. Maybe see it play along with the manual arming of militia.



I have no Wife, Children, or real Job. This also means I have 24 hours a day and 7 days a week to think of a rebuttal. You have been warned.

"I got another problem: I am being overrun by Dinosaur Nazis on Hoverboards!" -Ravenhugger

"Before you judge a man, walk a mile in his shoes. After that who cares? He's a mile away - and you've got his shoes!" - Unknown Criminal

Report message to a moderator

Corporal 1st Class
Re: New feature: individual militia[message #345345 is a reply to message #345333] Sat, 07 May 2016 15:58 Go to previous messageGo to next message
Nasenbaer is currently offline Nasenbaer

 
Messages:36
Registered:July 2013
Location: Germany
Wow!
very cool thing - thank you for creating this one!

Report message to a moderator

Private 1st Class
Re: New feature: individual militia[message #345365 is a reply to message #345345] Sun, 08 May 2016 13:02 Go to previous messageGo to next message
killerpfiffi is currently offline killerpfiffi

 
Messages:22
Registered:December 2009
Location: Austria
Looks like I am the new ambassador of Lybia... the fitting exe is not yet on Depri's OneDrive. Most recent exe right now is 8177.

Report message to a moderator

Private 1st Class
Re: New feature: individual militia[message #345367 is a reply to message #345365] Sun, 08 May 2016 13:57 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Well, no. The exe and the GameDir data will be in the next SCI, afaik Depri releases those on the 1st and 15th of a month.


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

Captain

Re: New feature: individual militia[message #345592 is a reply to message #345367] Fri, 20 May 2016 04:03 Go to previous messageGo to next message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
I tried this new feature, activated it in Ja2_Options.ini and as far as i trained some militia i got a message from Enrico and i can check a new website now "Militia overview" owever the website is blank
not yet implemented or i have to restart a new game?

Nvm it seems it is working now
cool feature!

[Updated on: Fri, 20 May 2016 04:09]

Report message to a moderator

Sergeant
Re: New feature: individual militia[message #345603 is a reply to message #345592] Fri, 20 May 2016 21:54 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #345612 is a reply to message #345603] Sat, 21 May 2016 21:47 Go to previous messageGo to next message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
I restarted a new game and i got that possible error message when i got Drassen counterattack (r8218 gamedir 2318)
they attached the mine sector in D13 where i had 20 militia and i had another 20 reinforcment from north (C13)
also after the battle there are militia that should not exist, since after the battle the survivers (9 militia) are all in the mine sector(d13) but in the militia overview website all the militia that reinforced the D13 sector from C13 appear like they are still all 20 there, when in reality there are noone left there.

[Updated on: Sat, 21 May 2016 21:49]

Report message to a moderator

Sergeant
Re: New feature: individual militia[message #345619 is a reply to message #345612] Sun, 22 May 2016 14:01 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Hmm. A savegame + ini from a state before the counterattack happens would be very helpful.


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

Captain

Re: New feature: individual militia[message #345620 is a reply to message #345619] Sun, 22 May 2016 14:35 Go to previous messageGo to next message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
I got saves just before and after the counter-attack
and for the .ini you mean JA2_Options.ini?

Report message to a moderator

Sergeant
Re: New feature: individual militia[message #345624 is a reply to message #345620] Sun, 22 May 2016 15:21 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Yes.


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

Captain

Re: New feature: individual militia[message #345638 is a reply to message #345624] Mon, 23 May 2016 01:51 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
I fixed a few bugs in r8229, additionally the fix from r8227 might have also improved things. I still have to test completely fighting the DCA from your save in tactical, at least in autoresolve it looks fine now.


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

Captain

Re: New feature: individual militia[message #345643 is a reply to message #345638] Mon, 23 May 2016 10:06 Go to previous messageGo to next message
3iff is currently offline 3iff

 
Messages:65
Registered:July 2001
Location: Birmingham, UK
Quote:
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.

I wondered why my mobile militia kept vanishing...now I know. I'll stop building them for now.

Report message to a moderator

Corporal
Re: New feature: individual militia[message #345650 is a reply to message #345643] Mon, 23 May 2016 14:51 Go to previous messageGo to next message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
I wish i was able to compile builds so i can test it again
Oh well, i will wait Depri's builds.

Report message to a moderator

Sergeant
Re: New feature: individual militia[message #345679 is a reply to message #345650] Wed, 25 May 2016 10:15 Go to previous messageGo to next message
3iff is currently offline 3iff

 
Messages:65
Registered:July 2001
Location: Birmingham, UK
When I try to look at the militia website, it 'loads' something then freezes. It then crashes back to the desktop. In the gamelog.log (I think) it gives an error message.

vobject.cpp, line 967

Bltvideoobjecttobuffer
Video object index is greater than the number of subimages.

I suspect a missing/modified file but everything from the latest SCI (8218) appears to be there.
I'll have a quick look at the source to see if I can work out what's happening but any clues would be helpful.

There are no problems if I don't try and look at the website page for the militia...but the game is on hold again as mobile militia are not playing properly...and I need them to deal with enemy patrols.

Report message to a moderator

Corporal
Re: New feature: individual militia[message #345683 is a reply to message #345679] Thu, 26 May 2016 02:59 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
The only files that could do that would be Data/Interface/SMFACES.STI and Data/Laptop/PressLogos.sti, 11 KB big. Be sure to check those.


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

Captain

Re: New feature: individual militia[message #345684 is a reply to message #345683] Thu, 26 May 2016 11:49 Go to previous messageGo to next message
3iff is currently offline 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 #345806 is a reply to message #345684] Fri, 03 June 2016 13:24 Go to previous messageGo to next message
Uriens is currently offline Uriens

 
Messages:346
Registered:July 2006
Thanks for doing this Flug, its a great feature. happy

Report message to a moderator

Master Sergeant
Re: New feature: individual militia[message #346119 is a reply to message #345806] Wed, 06 July 2016 20:03 Go to previous messageGo to next message
Elvis_A is currently offline Elvis_A

 
Messages:282
Registered:December 2012
Location: exUSSR
Hi comrades, I can help you with Russian language, please let me know where to look for

Report message to a moderator

Master Sergeant
Re: New feature: individual militia[message #346120 is a reply to message #346119] Wed, 06 July 2016 20:12 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Oh, very good. Date-1.13/TableData/MilitiaIndividual.xml has russian forenames/surnames used for PMC mercenaries (split for male and female names). You could check whether those names are reasonable (for all I know, they could be fantasy names).


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

Captain

light45.png  Re: New feature: individual militia[message #346121 is a reply to message #346120] Wed, 06 July 2016 21:16 Go to previous messageGo to next message
Elvis_A is currently offline 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 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #346124 is a reply to message #346122] Wed, 06 July 2016 22:45 Go to previous messageGo to next message
Elvis_A is currently offline Elvis_A

 
Messages:282
Registered:December 2012
Location: exUSSR
<male_forename>Abid</male_forename> Alexander
<male_forename>Abily</male_forename> Albert
<male_forename>Aburom</male_forename> Arkadiy
<male_forename>Avda</male_forename> Adam
<male_forename>Avim</male_forename> Aristarkh
<male_forename>Avit</male_forename> Avgust
<male_forename>Avksily</male_forename> Afanasy
<male_forename>Darko</male_forename> replace with Danko
<male_forename>Inal</male_forename> Innokentiy
<male_forename>Avtonom</male_forename> Artur
<male_surname>Rodriguez</male_surname> Rebrov
<male_surname>Rodriguez</male_surname> Rybak
<male_surname>Rodriguez</male_surname> Repin

<female_forename>Abijah</female_forename> Antonina
<female_forename>Leda</female_forename> Lida
<female_forename>Zenalda</female_forename> replace with Zinaida
<female_forename>Zora</female_forename> Zarina
<female_forename>Rachel</female_forename> Raisa
<female_surname>Osborn</female_surname> Oleynikova

Report message to a moderator

Master Sergeant
Re: New feature: individual militia[message #346130 is a reply to message #346124] Thu, 07 July 2016 20:11 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Thank you, committed in r2329.


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

Captain

Re: New feature: individual militia[message #346271 is a reply to message #346130] Sun, 17 July 2016 00:30 Go to previous messageGo to next message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
I'm testing this feature again lately
noticed only a minor bug so far, like if you do surgery on militia, the healing effect on the militia health will not show up immediatly, but after 1 hour have passed.

I wonder if it may be possible to assign mercs to heal militia, of course to compensate would be also appropriate to slow down natural health regeneration.
Also like you said it will be really tedious to manually full equip all militia, but sometime i wish i can give the best stuff to some elite militia, or atleast give them the best weapons and armors... they seems to choose items just randomly.

Report message to a moderator

Sergeant
Re: New feature: individual militia[message #346273 is a reply to message #346271] Sun, 17 July 2016 01:05 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #346284 is a reply to message #346273] Sun, 17 July 2016 10:13 Go to previous messageGo to next message
ratpaz is currently offline 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 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #346286 is a reply to message #346285] Sun, 17 July 2016 13:35 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
Flugente wrote on Sun, 17 July 2016 14:19
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.

There are some technical problems with integrating this feature into the main trunk:
1. It requires additional data for SOLDIERTYPE stored in savegame which will break savegame compatibility. I think there's a way to add new data without breaking it but I have no idea how it works. This is where I will need some help as I don't want to break something important.
2. This feature will replace old militia control completely, mostly because making interface with all menus and callback functions optional is too much work.
3. If you order militia to take some position, it will work until you unload sector or militia is promoted, in this case AI is created without any orders and at default position which was set for enemy team in editor. So to use this feature with full efficiency we'll need to find a way to create new/promoted militia at custom positions and keeping their custom orders and settings. Maybe individual militia feature could help with this.



Left this community.

Report message to a moderator

Lieutenant

Re: New feature: individual militia[message #346287 is a reply to message #346286] Sun, 17 July 2016 14:12 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
Number one is actually fairly simple:
1) Add a new #define in GameVersion.h and change "#define SAVE_GAME_VERSION *****" to your new entry
2) At the proper place in SOLDIERTYPE::Load do something like
if(guiCurrentSaveGameVersion >= YOUR_VERSION)
  {
     readYourValues(...)
  }
else
  {
    setSomeDefaults(...)
  }



Chat with us!
#bearpit on IRC
Discord
Get your latest 1.13 Builds
(Pls don't use my forum PMs for general game queries)

Report message to a moderator

Captain

Re: New feature: individual militia[message #346290 is a reply to message #346287] Sun, 17 July 2016 17:45 Go to previous messageGo to next message
ratpaz is currently offline 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:
https://s31.postimg.org/xe1nb6czb/JA2_8266_2016_07_17_08_25_31_67.jpg

https://s31.postimg.org/ijd1x03ef/JA2_8266_2016_07_17_08_25_45_64.jpg

https://s31.postimg.org/hict7vmev/JA2_8266_2016_07_17_08_25_57_06.jpg

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:

https://s31.postimg.org/fcnkae23r/JA2_8266_2016_07_17_15_21_57_68.jpg
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.
https://s31.postimg.org/6vo1zgxev/JA2_8266_2016_07_17_16_24_27_53.jpg



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 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #346304 is a reply to message #346302] Tue, 19 July 2016 14:01 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
@Flugente
Enemy soldiers are created at position that are defined in editor.
Militia soldiers also created at the same positions as far as I know.
The idea is to allow player to set some custom positions for militia:
- location
- default orders (stationary, onguard, etc)
- maybe some more options like define special positions for snipers, machinegunners or mortars

So, every time militia soldier is created, the game will first look at militia table, and only if it cannot find a good spot, it will look at default enemy table.

This will allow to set up militia defenses once and not do the same work every time sector is unloaded or militia is promoted.



Left this community.

Report message to a moderator

Lieutenant

Re: New feature: individual militia[message #346305 is a reply to message #346302] Tue, 19 July 2016 14:33 Go to previous messageGo to next message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
Flugente wrote on Tue, 19 July 2016 11:59
@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).


Both happens everytime
so should be reproduced anytime from my saves

Report message to a moderator

Sergeant
Re: New feature: individual militia[message #346306 is a reply to message #346305] Tue, 19 July 2016 20:37 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #346307 is a reply to message #346306] Tue, 19 July 2016 20:51 Go to previous messageGo to next message
Flugente

 
Messages:3509
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

Captain

Re: New feature: individual militia[message #346308 is a reply to message #346306] Wed, 20 July 2016 07:46 Go to previous messageGo to previous message
ratpaz is currently offline ratpaz

 
Messages:137
Registered:April 2015
Location: Italy
Flugente wrote on Tue, 19 July 2016 19:37
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?


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
Previous Topic: New feature: advanced repair/dirt system
Next Topic: New (unofficial) mercs: The Ryder twins (Mass Effect: Andromeda)
Goto Forum:
  


Current Time: Fri Apr 19 22:43:42 GMT+3 2024

Total time taken to generate the page: 0.02708 seconds