-
Posts
765 -
Joined
-
Last visited
Everything posted by Drakous79
-
Got this figured out. Armor Tint 4, Entries[3], orange / grey: UDefaultProperty: NameIdx: 0x00000392 (Index) 0x00000000 (Numeric) -> None Entries[3]: Unsafe guess (it's a Property List): UDefaultPropertiesList: UDefaultProperty: NameIdx: 0x000003DE (Index) 0x00000000 (Numeric) -> Primary TypeIdx: 0x00000B02 (Index) 0x00000000 (Numeric) -> StructProperty PropertySize: 0x00000010 ArrayIdx: 0x00000000 InnerNameIdx: 0x00000340 (Index) 0x00000000 (Numeric) -> LinearColor LinearColor (R, G, B, A) = (0x3C42A9EE, 0x3E0B5D6B, 0x3EC1E1DB, 0x3F800000) = (0.0118813, 0.136099, 0.378676, 1) --- Look at this line: LinearColor (R, G, B, A) = (0x3C42A9EE, 0x3E0B5D6B, 0x3EC1E1DB, 0x3F800000) = (0.0118813, 0.136099, 0.378676, 1) and compare it to hex code for those 4 floats: DB E1 C1 3E 6B 5D 0B 3E EE A9 42 3C 00 00 80 3F // That would be (0x3EC1E1DB, 0x3E0B5D6B, 0x3C42A9EE, 0x3F800000) = (0.378676, 0.136099, 0.011881, 1) There are swapped R and B values in DeserializeAll and FindObjectEntry output. Corrected mod file for Entries[3]: But I can't trust myself moving 128 float values with a mouse.
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
Yes, seems there is more to it than simple multiply/divide by 255 formula. I spent an hour looking for the answer, but found nothing. The article was created by Peasly Wellbott :smile: I remember we tried some tricks in DefaultContent.ini in the past, but no idea the Wiki page existed until today.
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
Tried manually hex editing -1.0 (00 00 80 BF) and also all Cs and got white color. It's been a pleasure. Helped me as well to see it side by side with your text. Edit: Wanted to say, that 00 00 00 50 (8589934592.0) as shown on a picture in the article is insane :smile: Are you patching the correct relative offset? Just put back backup or verify game's cache with Steam. I changed alpha too, but the game runs ok. It had no effect on color tint as rdngmikey said.
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
You can just repeat REL_OFFSET. Setting the saturation is very crazy as far as I can tell. I've created simple mod file to see these values: <%f 1.0> <%f 0.5> <%f 1.0> <%f 1.0> // (R, G, B, A) <%f 2.0> <%f 0.5> <%f 2.0> <%f 1.0> // (R, G, B, A) <%f 3.0> <%f 0.5> <%f 3.0> <%f 1.0> // (R, G, B, A)Attaching mod file for tints 1-3 in the spoiler: And I am quite surprised what happened. The game accepted values greater than 255 and made them more shiny! It's crazy and confusing. For the black you want, I don't know how to persuade the game to make it more shiny at the moment. Edit: <%f 99.0> <%f 0.5> <%f 99.0> <%f 1.0>http://i.imgur.com/9v04wot.jpg
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
Cool. Search those bytes by decimal offset you used while patching and knowledge you learned. What do you mean by neon black trippy? Shiny black like Darth Vader's armor? Or shiny radioactive green?
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
Try to think of -1 as the code to UI compensation. Data in arrays start at position 0, while customization spinner starts at position 1. Spinner's position 0 is Standard. 0-31 ... armor tint array 1-32 ... armor tint spinnerWe can say UnitPalettes.ArmorTint.Entries[ X ] = Armor Tint X+1 Here's m_strNoArmorTint string defined. // XComStrategyGame.int m_strNoArmorTint=StandardAnd here is a conditional uing Armor Tint spinner's minimum of -1 to display the string. // XComStrategyGame.upk, XGCustomizeUI.UpdateMainMenu // If ArmorTintIndex < 0, write Standard, else compensate and write an integer. kOption.strHelp = "" $ (((GetArmorTintIndex()) < 0) ? m_strNoArmorTint : string((GetArmorTintIndex()) + 1));Data! Re-de-compensate!
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
In fact he did very nice job without any tools. All can be seen in the spoiler containing deserialized info wghost81 posted earlier. I will quote rdngmikey's first post. Corrected few typos in it. Original post is here. 01 00 00 00 - Previous Object Reference Correct. It is an array Entries containing values for all 32 armor tints. 28 02 00 00 00 00 00 00 - NameIdx Entries 22 00 00 00 00 00 00 00 - TypeIdx ArrayProperty 04 0D 00 00 - PropertySize 3332 00 00 00 00 - ArrayIdx 0 00 00 00 20 - NumElements 32 The container is an entry in the Entries array. For the primary color tint it is: DE 03 00 00 00 00 00 00 - NameIdx Primary 02 0B 00 00 00 00 00 00 - TypeIdx StructProperty 10 00 00 00 - PropertySize 16 00 00 00 00 - ArrayIdx 0 And for the secondary: 92 04 00 00 00 00 00 00 - NameIdx Secondary (the secondary color tint) 02 0B 00 00 00 00 00 00 - TypeIdx StructProperty 10 00 00 00 - PropertySize 16 00 00 00 00 - ArrayIdx 0 Correct. None closes current entry in the Entries array. 92 03 00 00 00 00 00 00 - NameIdx: None Each entry looks like: 40 03 00 00 00 00 00 00 - InnerNameIdx LinearColor RR RR RR RR GG GG GG GG BB BB BB BB AA AA AA AA - 16 bytes, 4 floats - R, G, B, Alpha So rdngmikey was tweaking floats for RGB values. And floats are written in little endian (backwards) so the last two bytes in each group of four bytes had the biggest influence. Good skill for finding stuff. --- Yes it can :smile: See the comment above REL_OFFSET. UPK_FILE=Startup.upk OBJECT=UnitPalettes.ArmorTint // Change REL_OFFSET to: 32 + (NUMBER_OF_ENTRY_TO_CHANGE * 104) // An example: 32+(3*104)=344 so it will be REL_OFFSET=344 // Basically it is formula for finding 0xDE03000000000000 offsets (in decimal). // Remember the array starts at Entries[0] so use values 0-31. It is customization screen number - 1. REL_OFFSET=32 [MODDED_CODE] <Primary> <StructProperty> <%u 0x00000010> <%u 0x00000000> <LinearColor> <%f 0.99> <%f 0.5> <%f 0.99> <%f 1.0> // (R, G, B, A) <Secondary> <StructProperty> <%u 0x00000010> <%u 0x00000000> <LinearColor> <%f 0.05> <%f 0.05> <%f 0.05> <%f 1.0> // (R, G, B, A) <None>
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
0xCCCCCCCC is defintely special. But also listed as Secondary color tint value, so it can mean "Hey engine, don't use this value". Or "Do something fantastic.".
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
Well, it is no mystery. Standard = colors in model's texture (DIF texture) defined in model's material instance constant as CMOD and CMODB. 32 options = 32 entries in an array, but the first entry in the array is marked 0. So you have 0, 1, 2, 3 ... 31 and it makes a total of 32 entries.
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
Very very nice! I've always wanted to know, where are colors stored. Touched this four months ago, found UnitPalettes in Startup.upk and used FindObjectEntry to see what is in the object. I'm sorry there was no time for posting, but happy you guys took care of it :smile: Damn time, wtb more of it or time compression please. Out of words, it is great to see the community rocks on! What is correct formula for float to RGB conversion in this case? round(float * 255) // float to RGB RGB / 255 // RGB to floatI am getting expected results with it, assuming 0.0 = RGB 0 and 1.0 = RGB 255. --- Where is the primary or the secondary color tint used is determined by model's material and texture. The primary color tint is used on weapons, bigger armor parts (chest / back plate, protective pads, partly belt, partly pants), MEC suit, hats and helmets. This is major color. The secondary color tint is used on smaller armor parts (usually covered with bigger parts, sometimes belt, partly pants) and hat / helmet parts (hat logos). It is not used on Titan, Ghost, Archangel, PSI, Gene Mod armor and MEC suit. This is minor color. --- XCOM uses SPC textures for a simulation of light's reflection and for armor/weapon color tinting. There are MaterialExpressionStaticSwitchParameter "Tinted?" and "2 Color Tinted?" entries within Master_Materials / CHH_Soldiers, but I am not sure, if these are needed to activate the color tint or not. There are also MaterialExpressionVectorParameter's descriptions: CMODA - Uses Alpha of SPC MapCMODB - Uses Blue Channel of SPC Map when Reflection is not activeMy initial observation is, that SPC texture's: Red channel contains a specular map.Green channel needs clarification. It may contain other special effects such as a glow.Blue channel contains Color Mod B data, the secondary color tint.Alpha channel contains Color Mod A data, the primary color tint.I've here an image of a lady wearing pink Kevlar armor with grey/black pants (changed by wghost's mod file). <%f 0.99> <%f 0.5> <%f 0.99> <%f 1.0> // (R, G, B, A) // R252 G127 B252As you can see, the alpha channel contains the primary color's opacity mask (how much of the color is seen ... white 100%, black 0%). http://i.imgur.com/IjYFdyV.jpg --- Btw there is something wrong with float values in the mod file. For an example Tint 4 should be yellow orange with grey pants, but it is blue with grey pants after applying new values. No idea what is wrong, but my 4 months old FindObjectEntry notes contain the same float values as you posted ghost girl.
- 64 replies
-
- armor tint
- tints
-
(and 3 more)
Tagged with:
-
Hi gingy888, it is all in the article Dubious linked. You can put those commands directly into DefaultInput.ini or to text file (name of the file is up to you). Commands you posted are for tactical layer, so an entry in the ini should look like: [XComGame.XComTacticalInput] .Bindings=(Name="F9", Command="GiveXP 100 | GivePsiXP 100")where commands are chained. Alternatively, every command can be bound to different key or all of them can go into text file: [XComGame.XComTacticalInput] .Bindings=(Name="F8", Command="exec MyBatchofCommands.txt")where MyBatchofCommands.txt contains: GiveXP 100 GivePsiXP 100--- Check out Multiple commands with onrelease - tactical layer and Exec command - tactical layer. --- Dubious, thank you for adding the tutorial and improving the article :smile:
-
Inserting textures back to .tfc - possible?
Drakous79 replied to Amphibious's topic in XCOM's Enemy Unknown
Thank you wghost. Great job finding working UDK version! Have you set Licensee bytes to Firaxis in newly created package? 3D models won't be easy. You can try to change skeletal mesh in 3DS Max, import it to UDK, export to new package and then swap it from new package to some existing one. Flag mesh on soldier model's back has its own texture positioned by UV coordinates in DefaultContent.ini. But seen portion of the texture (visibility mask or how to call it) is set by mesh's UVW map. My best shot at understanding it resulted in switching material, so soldier's armor was covered by flags :smile: Edit: Material swap. Flag's texture is all over the armor, while armor's texture is in flag's place. http://i.imgur.com/2gSQYXy.jpg Soldier_MaleKevlar_SF.upk, chh_lv1medmale_animset.Meshes.SM_Lv1MedMale 0x15aa - 4 bytes - 02 00 00 00 (how many materials; follows a list of materials) 0x15ae - 4 bytes - 70 01 00 00 (object list entry) 0x15b2 - 4 bytes - 71 01 00 00 (object list entry) // ExtractNameLists Index: 0x170 (368); Name: CHH_Lv1MedMale_MOD.Materials.MInst_Flags; Type: Core::Engine.MaterialInstanceConstant Index: 0x171 (369); Name: CHH_Lv1MedMale_MOD.Materials.MInst_Lv1MedMale1; Type: Core::Engine.MaterialInstanceConstantSwap 70 with 71. -
Inserting textures back to .tfc - possible?
Drakous79 replied to Amphibious's topic in XCOM's Enemy Unknown
I was bad boy leaving for too long, but the time flows like crazy :) Hope you are all well! You are right, uncompressed textures would eat too much resources. UDK progress? Very nice! Please can you point me to the correct forum thread? -
Inserting textures back to .tfc - possible?
Drakous79 replied to Amphibious's topic in XCOM's Enemy Unknown
Hi guys :smile: I've started to summarize all info few months ago, but failed to finish it in time. Will do my best to post it asap. Appending textures to TFC files bigger than 500 MB is not the best idea, because of an amount of data, that would have to be downloaded in a case of new patch. Better is to change TextureFileCacheName property from NameProperty to StrProperty. Such change results in new and custom TFC file with name limited to 3 characters. With an addition of new name into UPK's nametable, or using some existing entry, all is needed is to redirect NameProperty to new one. Another thing I haven't found out is, if TFC files can contain uncompressed textures and how to write such info into UPK files. I think used compression is LZO-1x. Hope my memory is right - please correct me, if not. Texture2D layout 4 bytes - unknown (0xffffffff for UI images) Next is a list of texture's properties written as a sequence of name table indexes followed by values. Please see Default properties on pages 14-17 of XCOM EU/EW UPK file format described by wghost81 (available in miscellaneous files of UPKUtils) for details. Let's look on an example: Weapon_Pistol_SF.upk, WP_PistolModern.Textures.T_PistolModern_DIF. SizeX=512 (width [pixels])SizeY=512 (height [pixels])OriginalSizeX=512 (width of source image [pixels])OriginalSizeY=512 (height of source image [pixels])Format=EPixelFormat.PF_DXT1 (format)TextureFileCacheName=Textures (name of texture file cache)MipTailBaseIdx=9FirstResourceMemMip=3LODGroup=TextureGroup.TEXTUREGROUP_Weapon (texture group the texture belongs to) SizeX=512 would be: 8 bytes - 2B 05 00 00 00 00 00 00 - SizeX (NameIdx; property name) 8 bytes - 1A 03 00 00 00 00 00 00 - IntProperty (TypeIdx; property type name) 4 bytes - 04 00 00 00 - 4 (PropertySize; property size in bytes) 4 bytes - 00 00 00 00 - 0 (ArrayIdx; zero for non-array types) 4 bytes - 00 02 00 00 - 256 (Value; Integer) After the list of texture's properties is ... ehm, here is the point, when I ran out of time :sad: but there should be 16 zero bytes and then this: UPK_Texture2D.pdf (Dropbox). Texture's footer contains texture's ID and some unknown bytes. 78 5F E4 54 C0 D0 09 42 9A 6B 4C 3C 30 D2 04 3D - ID, the same as seen in GlobalPersistentCookerData.upk 00 00 00 00 01 00 00 00 00 00 00 00 - unknown, but seems to be the same for all model textures I looked at. Btw I deleted GlobalPersistentCookerData.upk once and the game runs without it :smile: --- There is PCConsoleTOC.txt file containing file sizes. It may be important for game's memory management, but it may also serve for patching purposes. No progress made on this one. --- To create a texture, extract something made with Texmod, alter it, convert it to DDS (DXT1 or 5), delete DDS header (first 128 bytes), compress it with wghost's XCOMLZO (found in UPKUtils), put the result into custom TFC file and update its references in UPK :smile: Usually, all mipmaps 128 px and higher are stored in TFC. Lower resolutions are stored in UPK. Also as wghost mentioned, texture's info should be updated in all UPKs, because of game's cache. --- I know we should be able to shift TFC offsets and make snow maps or create additional armor decos with altered textures. -
The problem is this line: An Error occured during processing:Could not find the specified hex value for patch [ Read XComGame.upk from CookedPCConsole folder without size check ] Your XComGame.exe must be different somehow. You can edit Restart_Mission_in_Pause_Menu_EU_Install.xml and delete lines below: <PatchTarget> <TargetPath>Binaries\Win32\XComGame.exe</TargetPath> <IsUPKFile>false</IsUPKFile> <Patches> <PatchEntry> <Description>Read XComGame.upk from CookedPCConsole folder without size check </Description> <FindValue>78 63 6f 6d 67 61 6d 65 2e 75 70 6b</FindValue> <ReplaceValue>77 63 6f 6d 67 61 6d 65 2e 75 70 6b</ReplaceValue> </PatchEntry> </Patches> </PatchTarget> Save xml file and try to patch again. If patched successfully and the game crashes, you can download PatcherGUI from UPKUtils files section and use its xshape feature.
-
Hi MDDC, do you use Texmod? If yes, you should rename original executable back to XComGame.exe and try to patch again.
-
Hi, you can check UI Mod - Bigger Perk Tree thread. To have only one abduction site is easy. Bellow is a code for PatcherGUI, that can be downloaded from UPKUtils page. You can copy paste it into PatcherGUI (to the biggest textarea) and use Save as... button. The best is to place the file into PatcherGUI\Mods\ folder. MOD_NAME=Custom Number of Abduction Sites AUTHOR=Drakous79 DESCRIPTION=Sets number of abduction sites to specified value. 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's file or copy paste entire code into PatcherGUI (to the biggest textarea) and use Save as... button. The best is to place the file into PatcherGUI\Mods\ folder. * 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's file or copy paste entire code into PatcherGUI (to the biggest textarea) and use Save as... button. The best is to place the file into PatcherGUI\Mods\ folder. * Click Apply button. * Click XSHAPE button to update XComStrategyGame.upk hash. * Run the game and enjoy. Uninstallation -------------- * Simply change the number to 3 and install the mod again. * Or click Show log button, choose the mod, click Load uninstaller button and then Apply button. Don't forget XSHAPE for Enemy Unknown! * Or wipe all mods with Steam's feature Verify Integrity of Game Cache, that can be found in Library / XCOM: Enemy Unknown / Properties / Local Files. UPK_FILE=XComStrategyGame.upk OBJECT=XGStrategyAI.GetNumAbductionSites FIND_CODE=04 2C:END [MODDED_CODE] // _________________________________ // NUMBER OF ABDUCTION SITES <%b1> // change the number after %b (1-3) // _________________________________ { EOF }--- It is possible to increase the number to 4 or more, but XCOM's user interface isn't able to display more options than 3. It has been discussed here.
-
iecengod what isn't working? Have you tried the tutorial? You can use commands directly in place of "exec Strategy.txt".
-
Welcome to the forum NuclearAnt :) In EW, GivePsiGift command works on Loadout screen of a soldier.
-
Like the one who grenaded 3 ETs at once got promoted to heavy?
-
It is just an example. You can bind LowerPanic to F1 or some other key.
-
Hi dantay6, you can put this at the end of DefaultInput.ini: [Engine.PlayerInput] .Bindings=(Name="F12",Command="LowerPanic")Hit F12 and then check Situation Room.
-
Arc Thrower not available after mod
Drakous79 replied to flankengott's topic in XCOM's Enemy Unknown
The best may be to verify integrity of game cache with Steam and then slowly install mods. -
If anyone is interested, here is some info concerning hair spinner. DefaultContent.ini contains lines like: HairPackageInfo=(Id=11,ArchetypeName="Hair_FemHair_K.ARC_Hair_FemHair_K", Gender=eGender_Female) HairPackageInfo=(Id=17,ArchetypeName="Hair_MaleHair_D.ARC_Hair_MaleHair_D", Gender=eGender_Male) HairPackageInfo=(Id=200,ArchetypeName="Helmet_Kevlar0.KevlarHelmet0",bIsHelmet=true) HairPackageInfo=(Id=303,ArchetypeName="Helmet_Kevlar1.KevlarHelmet1",bIsHelmet=true) HairPackageInfo=(Id=403,ArchetypeName="Helmet_Kevlar2.KevlarHelmet2",bIsHelmet=true)Note Gender definitions. Those lines are added to HairPackageInfo array used by XComContentManager. HairPackageInfo(10)=(Id=11,Gender=EGender.eGender_Female,ArchetypeName="Hair_FemHair_K.ARC_Hair_FemHair_K") HairPackageInfo(14)=(Id=17,Gender=EGender.eGender_Male,ArchetypeName="Hair_MaleHair_D.ARC_Hair_MaleHair_D") HairPackageInfo(32)=(Id=200,bIsHelmet=true,ArchetypeName="Helmet_Kevlar0.KevlarHelmet0") HairPackageInfo(33)=(Id=303,bIsHelmet=true,ArchetypeName="Helmet_Kevlar1.KevlarHelmet1") HairPackageInfo(34)=(Id=403,bIsHelmet=true,ArchetypeName="Helmet_Kevlar2.KevlarHelmet2")--- When the game is creating UI spinners, it calls several functions. GetContentIds<snip> serves like a filter and IntersectContentIds builds the final array Hair(s). Btw I haven't see any values, that would help filtering hair by race. Another fact is males and females have the same ammount of hair options atm, otherwise the mod won't work the same for both genders. GetContentIdsForRace(6, byte(kSoldier.kAppearance.iRace), RaceHairs,, true); GetContentIdsForGender(6, byte(kSoldier.kAppearance.iGender), GenderHairs,, true); GetContentIdsForCharacter(6, 2, CharacterHairs,, true); IntersectContentIds(RaceHairs, GenderHairs, GenderRaceHairs); IntersectContentIds(GenderRaceHairs, CharacterHairs, Hairs);And in the end, there is one array looking like this (female example): Hairs[0]=1 // Hair_FemHair_A <snip> Hairs[16]=200 // Helmet_Kevlar0 Hairs[17]=303 // Helmet_Kevlar1 Hairs[18]=403 // Helmet_Kevlar2 <snip>This array is passed to Hair/Helmet spinner, but the spinner's UI range starts at 1. And because option 1 is no hair, the first hair from the array is listed as option 2. So there is -2 compensation needed, while setting values in XComGame.upk, XGCharacterGenerator.CreateTSoldier. kSoldier.kAppearance.iHaircut = Hairs[21 - 2]; // 21 in the game Code responsible for the spinner's UI string (current option) is set in XComStrategyGame.upk, XGCustomizeUI.UpdateMainMenu: kOption.strHelp = "" $ string((GetHairIndex()) + 2);And the spinner's true range is set in XcomStrategyGame.upk, XGCustomizeUI.AdvanceHair: NumHairs = m_kPawn.PossibleHairs.Length; CurIdx = GetHairIndex(); NewIdx = CurIdx + Dir; if(NewIdx < -1) // this one { NewIdx = NumHairs - 1; } if(NewIdx >= NumHairs) { NewIdx = -1; // and this one } NewHair = ((NewIdx > -1) ? m_kPawn.PossibleHairs[NewIdx] : -1); m_kPawn.SetHair(NewHair); <snip>-1 in this case should allow no hair option.
-
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.