Drakous79 Posted December 16, 2012 Share Posted December 16, 2012 (edited) This :smile: Also Customizable Special Soldiers mod is up, to show distribution ways of UPK tweaks.Feel free to use enabled customization for special soldiers in your own mod packages.http://i.imgur.com/EmdrT.jpgI would be more happy, if Firaxis enabled at least armor deco/tint and helmet customization. Who knows, maybe they'll reconsider it.Zhang's and Annette's head is tied to achievements awarded for completing the final mission (Operation Avenger) with special soldiers. It must be the reason for disabling the customization. Or to keep special soldiers unique in appearance, but for that head, name, nickname and voice would be enough. Custom tags of heads in inis are ZhangSoldier and AnnetteSoldier. The same tags are used for bodies, so why not to tie achievements to bodies? Also those tags make heads unselectable at customization screen.Achievements are:Rising Dragon / Take your new ally into the final challenge.Saved to Savior / Have your newest ally volunteer for the most difficult duty.I recommend to save the game (or backup Ironman save) before doing the customization. Consider keeping soldier's race, head and voice, because you won't be able to select head 0 and voice 0 again.There are 2 or more ways how to enable such customization.Give the tag to existing asian soldier's head in DefaultContent.ini. This puts tags into conflict and customization is unlocked. Zhang's head stays at 0 position, while the conflicting head cannot be selected. So better would be to copy one of asian heads and give it new ID and the tag to avoid losing one selectable head. Also Zhang's head can be added without the tag. If I am right, this won't give you the achievement.UPK surgery described below.XComStrategyGame.upk, class XGStrategySoldier, function IsASpecialSoldier()function bool IsASpecialSoldier() { local name nmZhang, nmAnnette; nmZhang = 'ZhangSoldier'; nmAnnette = 'AnnetteSoldier'; // End:0x150 if(m_kSoldier.kAppearance.iHead == XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdFromTag(4, nmZhang) || m_kSoldier.kAppearance.iHead == XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdFromTag(4, nmAnnette)) { return true; } return false; }// Updated for the 3rd patch SF: 07 50 01 84 9A 35 AF FB FF FF 80 FA FF FF 00 00 35 B5 F9 FF FF 74 FA FF FF 00 00 01 EC 44 00 00 19 2E 95 FE FF FF 19 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 0A 00 3C FB FF FF 00 1B C4 0E 00 00 00 00 00 00 16 15 00 59 FC FF FF 00 1B C3 0E 00 00 00 00 00 00 24 04 00 35 45 00 00 16 16 18 91 00 9A 35 AF FB FF FF 80 FA FF FF 00 00 35 B5 F9 FF FF 74 FA FF FF 00 00 01 EC 44 00 00 19 2E 95 FE FF FF 19 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 0A 00 3C FB FF FF 00 1B C4 0E 00 00 00 00 00 00 16 15 00 59 FC FF FF 00 1B C3 0E 00 00 00 00 00 00 24 04 00 34 45 00 00 16 16 16 04 27 RW: 07 50 01 84 9A 35 AF FB FF FF 80 FA FF FF 00 00 35 B5 F9 FF FF 74 FA FF FF 00 00 01 EC 44 00 00 19 2E 95 FE FF FF 19 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 0A 00 3C FB FF FF 00 1B C4 0E 00 00 00 00 00 00 16 15 00 59 FC FF FF 00 1B C3 0E 00 00 00 00 00 00 24 04 00 35 45 00 00 16 16 18 91 00 9A 35 AF FB FF FF 80 FA FF FF 00 00 35 B5 F9 FF FF 74 FA FF FF 00 00 01 EC 44 00 00 19 2E 95 FE FF FF 19 12 20 FD FE FF FF 0A 00 3A FB FF FF 00 1C 91 FD FF FF 16 0A 00 3C FB FF FF 00 1B C4 0E 00 00 00 00 00 00 16 15 00 59 FC FF FF 00 1B C3 0E 00 00 00 00 00 00 24 04 00 34 45 00 00 16 16 16 04 28Change 04 27 near the end to 04 28, return false.Edit: Updated hex for the 3rd patch. Edited March 1, 2016 by Drakous79 Link to comment Share on other sites More sharing options...
PepprmintButler Posted December 16, 2012 Share Posted December 16, 2012 This is perfect. Pretty much everybody wanted that I think - I certainly did.Thank you.If I do make a mod I'll make sure to use that. Link to comment Share on other sites More sharing options...
Drakous79 Posted December 16, 2012 Author Share Posted December 16, 2012 Happy you like it! I wanted it too, because in carapace with blue clothes he looked like service man. Link to comment Share on other sites More sharing options...
twinj Posted December 21, 2012 Share Posted December 21, 2012 Found this while looking for smallest codes with jumps and simple if statements. Will this help? XComGame.XComCivilian function ApplyTemplate(name TemplateName) { local CivilianTemplate Template; local TAppearance Appearance; // End:0x29c if(XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetCivilianTemplate(TemplateName, Template)) { Appearance.iGender = m_kAppearance.iGender; Appearance.iHead = XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdFromTag(4, Template.HeadTag); Appearance.iBody = XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdFromTag(5, Template.BodyTag); Appearance.iHaircut = XComContentManager(class'Engine'.static.GetEngine().GetContentManager()).GetContentIdFromTag(6, Template.HairTag); // End:0x285 if(TemplateName == 'Zhang') { Appearance.iHairColor = 22; } SetAppearance(Appearance, true); } // End:0x29c else { } } Link to comment Share on other sites More sharing options...
Drakous79 Posted December 21, 2012 Author Share Posted December 21, 2012 It won't help, as it is for civilian Zhang, while we are ineterested in tag ZhangSoldier. But thanks for sharing, it's interesting how the script checks for his tag. Link to comment Share on other sites More sharing options...
Recommended Posts