prune1 Posted March 6, 2014 Share Posted March 6, 2014 Wasn't sure where to post this, but is it possible, perhaps with some ini file even, to change the default appearance/armor color of soldiers? I like to have my soldiers all look the same, I have no wish to change their gender either way, or race etc, but I like them all to wear the same helmet and color scheme for example, and it's very annoying to do this each time manually. So is there any way to make this easier? Link to comment Share on other sites More sharing options...
dubiousintent Posted March 7, 2014 Share Posted March 7, 2014 Have you looked into DefaultLoadouts.ini? I believe that is your answer. Wiki article is 'DefaultLoadouts.ini - XCOM:EU 2012'. -Dubious- Link to comment Share on other sites More sharing options...
prune1 Posted March 7, 2014 Author Share Posted March 7, 2014 I read the article and looked into the file, but I'm at a loss as to what to change. That's for loadouts and not customization options as far as I can tell?... Link to comment Share on other sites More sharing options...
dubiousintent Posted March 8, 2014 Share Posted March 8, 2014 (edited) Read the thread 'Unlock all Decorative Armors for all Armors'. It goes into the entries to be changed in DefaultContent.ini to enable the decos, which should in turn tell you what you want to alter in Loadouts. Loadouts are what determine the default gear. If you want customization of that, then you have to make the change to what armor Loadout has the soldiers wearing. As is often the case with XCOM, more than one file has to be edited to get what you want. In this case, you are entering territory no one else has documented, so that would be a useful wiki article when you get done. (I'll be happy to help with that at the time.) BTW: In case you aren't aware, XComContent.ini is the 'My files' copy of DefaultContent.ini used by DLC content. Update 'Default' and it will automatically update the 'XCom' file when the DLC is played. -Dubious- Edited March 8, 2014 by dubiousintent Link to comment Share on other sites More sharing options...
Krazyguy75 Posted March 8, 2014 Share Posted March 8, 2014 I don't know if you can change the default color outside of editing a upk, cause I've always seen it being default "XCOM Yellow" (which BTW, should totally be a crayola color). Also, same thing for default helmets. Link to comment Share on other sites More sharing options...
Drakous79 Posted March 8, 2014 Share Posted March 8, 2014 (edited) Soldier's initial appearance can be set in XComGame.upk, XGCharacterGenerator.CreateTSoldier. We already touched this topic in Cybernetic Warfare Mod - ideas and planning thread, point 2. Helmets for everybody! Especially for starting and hired soldiers. With new shiny armor tint! Hex changed, but process is the same. Helmets have to be filled into an array by GetContentIds calls and a loop clearing helmets from the array has to be disabled. Then it takes 2 new lines before calling return kSoldier: kSoldier.kAppearance.iHaircut = Hairs[X]; kSoldier.kAppearance.iArmorTint = X;Where X is your desired number. I am calling the array Hair, because Hairs is just plain wrong. Below is mod file for PatcherGUI 2.3 (and higher) and XCOM Enemy Within. Just save it to text file and feed it to PatcherGUI. You can change numbers to your liking. DESCRIPTION=Sets default helmet and armor tint to specified value. UPK_FILE=XComGame.upk OBJECT=XGCharacterGenerator.CreateTSoldier:AUTO REL_OFFSET=0x28 [MODDED_HEX] { Header - virtual size } 8B 0F 00 00 { Header - physical size } 16 0A 00 00 { Add helmets to Hair array by setting bAllowHelmets=true (the last 4A to 27) in three GetContentIds calls bellow. } { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForRace(6, byte(kSoldier.kAppearance.iRace), RaceHairs,, true) } FIND_HEX=00 E0 B9 00 00 4A 4A 16 [MODDED_HEX] 00 E0 B9 00 00 4A 27 16 { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForGender(6, byte(kSoldier.kAppearance.iGender), GenderHairs,, true) } FIND_HEX=00 E1 B9 00 00 4A 4A 16 [MODDED_HEX] 00 E1 B9 00 00 4A 27 16 { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForCharacter(6, 2, CharacterHairs,, true) } FIND_HEX=00 DE B9 00 00 4A 4A 16 [MODDED_HEX] 00 DE B9 00 00 4A 27 16 { Skip a loop clearing helmets from Hair array. } { if(Idx >= 0) ... if(Hairs[Idx] >= 200) } FIND_HEX=07 51 09 [MODDED_HEX] 06 { Set custom numbers. } { return kSoldier } FIND_HEX=04 00 E7 B9 00 00 [MODDED_HEX] { kSoldier.kAppearance.iHaircut = Hairs[number] } 0F 35 80 0F 00 00 84 0F 00 00 00 00 35 8E 0F 00 00 99 0F 00 00 00 01 00 E7 B9 00 00 10 2C 13 { Number you see on customization screen - 2 converted to hexadecimal (21 - 2 = 19 decimal = 13 hexadecimal). } 00 DD B9 00 00 { kSoldier.kAppearance.iArmorTint = [number] } 0F 35 73 0F 00 00 84 0F 00 00 00 00 35 8E 0F 00 00 99 0F 00 00 00 01 00 E7 B9 00 00 2C 09 { Number you see on customization screen - 1 converted to hexadecimal. } { return kSoldier, ReturnValue and EOS } 04 00 E7 B9 00 00 04 3A E8 B9 00 00 53 { EOF } Edited March 1, 2016 by Drakous79 Link to comment Share on other sites More sharing options...
dubiousintent Posted March 9, 2014 Share Posted March 9, 2014 Created an initial version of the 'Initial soldier appearance - XCOM:EU 2012' article incorporating the above. -Dubious- Link to comment Share on other sites More sharing options...
prune1 Posted March 10, 2014 Author Share Posted March 10, 2014 Soldier's initial appearance can be set in XComGame.upk, XGCharacterGenerator.CreateTSoldier. We already touched this topic in Cybernetic Warfare Mod - ideas and planning thread, point 2. Helmets for everybody! Especially for starting and hired soldiers. With new shiny armor tint! Hex changed, but process is the same. Helmets have to be filled into an array by GetContentIds calls and a loop clearing helmets from the array has to be disabled. Then it takes 2 new lines before calling return kSoldier: kSoldier.kAppearance.iHaircut = Hairs[X]; kSoldier.kAppearance.iArmorTint = X;Where X is your desired number. I am calling the array Hair, because Hairs is just plain wrong. Bellow is mod file for PatcherGUI 2.3 (and higher) and XCOM Enemy Within. Just save it to text file and feed it to PatcherGUI. You can change numbers to your liking. DESCRIPTION=Sets default helmet and armor tint to specified value. UPK_FILE=XComGame.upk OBJECT=XGCharacterGenerator.CreateTSoldier:AUTO REL_OFFSET=0x28 [MODDED_HEX] { Header - virtual size } 8B 0F 00 00 { Header - physical size } 16 0A 00 00 { Add helmets to Hair array by setting bAllowHelmets=true (the last 4A to 27) in three GetContentIds calls bellow. } { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForRace(6, byte(kSoldier.kAppearance.iRace), RaceHairs,, true) } FIND_HEX=00 E0 B9 00 00 4A 4A 16 [MODDED_HEX] 00 E0 B9 00 00 4A 27 16 { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForGender(6, byte(kSoldier.kAppearance.iGender), GenderHairs,, true) } FIND_HEX=00 E1 B9 00 00 4A 4A 16 [MODDED_HEX] 00 E1 B9 00 00 4A 27 16 { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForCharacter(6, 2, CharacterHairs,, true) } FIND_HEX=00 DE B9 00 00 4A 4A 16 [MODDED_HEX] 00 DE B9 00 00 4A 27 16 { Skip a loop clearing helmets from Hair array. } { if(Idx >= 0) ... if(Hairs[Idx] >= 200) } FIND_HEX=07 51 09 [MODDED_HEX] 06 { Set custom numbers. } { return kSoldier } FIND_HEX=04 00 E7 B9 00 00 [MODDED_HEX] { kSoldier.kAppearance.iHaircut = Hairs[number] } 0F 35 80 0F 00 00 84 0F 00 00 00 00 35 8E 0F 00 00 99 0F 00 00 00 01 00 E7 B9 00 00 10 2C 13 { Number you see on customization screen - 2 converted to hexadecimal (21 - 2 = 19 decimal = 13 hexadecimal). } 00 DD B9 00 00 { kSoldier.kAppearance.iArmorTint = [number] } 0F 35 73 0F 00 00 84 0F 00 00 00 00 35 8E 0F 00 00 99 0F 00 00 00 01 00 E7 B9 00 00 2C 09 { Number you see on customization screen - 1 converted to hexadecimal. } { return kSoldier, ReturnValue and EOS } 04 00 E7 B9 00 00 04 3A E8 B9 00 00 53 { EOF } Thank you! That's brilliant. Will try it later, but it sounds right - also it is clearly not something I would have managed being little more than a layman when it comes to modding. I didn't know how to break it to Dubious earlier that he might be holding on a looong time for me to form my own solution based on his info, and to thus provide the necessary text for an eventual wiki entry....so you helped out there too! I suppose you could code something up that allows such fixed settings for all the customization options? Personally I need nothing more, but it might be something others want (literally firing up the cloning vats...at least I can pretend my soldiers look different under the helmets!). Many thanks once again. Link to comment Share on other sites More sharing options...
Drakous79 Posted March 11, 2014 Share Posted March 11, 2014 (edited) Thank you Dubious :smile: I suppose you could code something up that allows such fixed settings for all the customization options? Personally I need nothing more, but it might be something others want (literally firing up the cloning vats...at least I can pretend my soldiers look different under the helmets!). Many thanks once again. Glad I could help. tested it with the latest patch and it works. It could be coded for more settings, but I think people like to customize by themselves. When I play, I usually customize only soldiers, that survive for some time :smile: and only their nickname, armor tint and helmet. What I'd really like is separated tint for weapons and armor. Edited March 11, 2014 by Drakous79 Link to comment Share on other sites More sharing options...
Drakous79 Posted April 5, 2014 Share Posted April 5, 2014 (edited) I have updated the mod file for use with PatcherGUI 3.1 (many thanks Wasteland Ghost) and higher. It uses new and shiny pseudo code (patch resistence) and it works with Enemy Unknown after uncommenting certain part of the code. Just EU needs updated hash/disabled hash check of XComGame.upk. The math is done by the mod so you can use the same number as is seen on customization screen. MOD_NAME=Default Helmet and Armor Tint AUTHOR=Drakous79 DESCRIPTION=Sets default helmet and armor tint to specified value. Use PatcherGUI or PatchUPK 3.1 and higher. This mod works with both Enemy Within and Enemy Unknown. Enemy Within Installation ------------------------- * Start PatcherGUI. * Click the 1st Browse button and navigate to <Steam install path>\XCom-Enemy-Unknown\XEW and confirm. * Click the 2nd Browse button and select this mod file. * Click Apply button, run the game and enjoy. Enemy Unknown Installation -------------------------- * Start PatcherGUI. * Click the 1st Browse button and navigate to <Steam install path>\XCom-Enemy-Unknown and confirm. * Click the 2nd Browse button and select this mod file. * Comment signs // are used to comment parts of code. Uncomment 4 lines after "Enemy Unknown memory and serial size (DISABLED)". * Click Save and then Apply button. * Update XComGame.upk hash by any means (XSHAPE, XCOMModHelper, edit XComGame.exe). You can check out an article on Nexus Wiki: http://wiki.tesnexus.com/index.php/Basic_Guide_to_installing_mods#Disabling_Hash_checks * Run the game and enjoy. UPK_FILE=XComGame.upk OBJECT=XGCharacterGenerator.CreateTSoldier:AUTO // *** Correct memory and serial script size in function's header. *** // *** Enemy Within memory and serial size (ENABLED) *** REL_OFFSET=0x28 [MODDED_HEX] 92 0F 00 00 16 0A 00 00 // *** Enemy Unknown memory and serial size (DISABLED); uncomment next 4 lines to enable *** // REL_OFFSET=0x28 // [MODDED_HEX] // 15 0C 00 00 // F1 07 00 00 // *** Add helmets to Hair(s) array by setting bAllowHelmets=true (the last 4A to 27) in three GetContentIds calls below. *** { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForRace(6, byte(kSoldier.kAppearance.iRace), RaceHairs,, true) } FIND_CODE=00 <.RaceHairs> 4A 4A 16 [MODDED_CODE] 00 <.RaceHairs> 4A 27 16 { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForGender(6, byte(kSoldier.kAppearance.iGender), GenderHairs,, true) } FIND_CODE=00 <.GenderHairs> 4A 4A 16 [MODDED_CODE] 00 <.GenderHairs> 4A 27 16 { XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdsForCharacter(6, 2, CharacterHairs,, true) } FIND_CODE=00 <.CharacterHairs> 4A 4A 16 [MODDED_CODE] 00 <.CharacterHairs> 4A 27 16 // *** Skip a loop clearing helmets from Hair(s) array. *** { Idx = Hairs.Length - 1 ... if(Idx >= 0) } FIND_CODE=0F 00 <.Idx> 93 36 00 <.Hairs> 26 16 07 [MODDED_CODE] 0F 00 <.Idx> 93 36 00 <.Hairs> 26 16 06 // *** Set custom numbers. *** FIND_CODE=16 04 00 <.kSoldier> [MODDED_CODE] 16 { kSoldier.kAppearance.iHaircut = Hairs[number-2] } 0F 35 <XGTacticalGameCoreNativeBase.TAppearance.iHaircut> <XGTacticalGameCoreNativeBase.TAppearance> 00 00 35 <XGTacticalGameCoreNativeBase.TSoldier.kAppearance> <XGTacticalGameCoreNativeBase.TSoldier> 00 01 00 <.kSoldier> 10 93 2C // _________________________________ // DEFAULT HAIR/HELMET <%b21> // change the number after %b // _________________________________ 2C 02 16 00 <.Hairs> { kSoldier.kAppearance.iArmorTint = [number-1] } 0F 35 <XGTacticalGameCoreNativeBase.TAppearance.iArmorTint> <XGTacticalGameCoreNativeBase.TAppearance> 00 00 35 <XGTacticalGameCoreNativeBase.TSoldier.kAppearance> <XGTacticalGameCoreNativeBase.TSoldier> 00 01 00 <.kSoldier> 93 2C // _________________________________ // DEFAULT ARMOR TINT <%b10> // change the number after %b // _________________________________ 26 16 { return kSoldier } 04 00 <.kSoldier> { EOF } Edited March 1, 2016 by Drakous79 Link to comment Share on other sites More sharing options...
Recommended Posts