-
Posts
765 -
Joined
-
Last visited
Everything posted by Drakous79
-
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
Weapons seems to be handled as ActiveAttachments, so you would have to check in UpdateArmorMaterial, if an attachment is weapon's mesh and its archetype or name, before apllying a texture. I understand you and Johny don't want to bloat LW download too much. Maybe you could do some batch to duplicate files you need and then patch them, but I don't think people would mind 10-100 MB up, if you give them something so great like new stuff. Especially today, with fast internet, when are people used to download gigabyte patches for games like WoW or XCom. -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
Good job :smile: StringToName cast is very nice way how to do it. Consideing tfc, if there are 10 new textures (320 flags) for an example, correcting 40 offsets for higher res images is still feasible. I've tried DynamicLoadObject, but had to have something wrong, because the game freezed. I feeded the function with a string. // UISaveGame.ImageCheck mapImage = class'UIUtilities'.static.GetMapImagePackagePath(name(MapName)); mapTextureTest = Texture2D(DynamicLoadObject(mapImage, class'Texture2D')); // What I tried Flag = Texture2D(DynamicLoadObject("MECRailgun.Textures.MECLasegun_DIF", class'Texture2D')); -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
Now I am excited. Edit DefaultContent.ini, find this section and add our new package: [Content.MapContent] Map=$ALL Package=UICollection_Common Package=Weapon_MEC_LasegunThis will show new Lasegun texture in barracks! Aaand with this in UpdateFlagMaterial: Flag = Texture2D(FindObject("MECRailgun.Textures.MECLasegun_DIF", class'Texture2D')); MIC.SetTextureParameterValue('FlagTex', Flag);Lasegun texture from different package instead of normal flag texture. -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
So far one successful step done: // XComHumanPawn.UpdateFlagMaterial Flag = Texture2D(FindObject("Deco_Kevlar0_MOD.Textures.Deco_Kevlar0_SPC", class'Texture2D')); MIC.SetTextureParameterValue('FlagTex', Flag); Targeted normal texture in the same package. -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
To change too many files is just a little complication as long as the same data are patched into each file. If you know a game Star Wars: Knight of the Old Republic, it has Override folder and if a texture is placed in it, the texture changes everywhere. Modding made easy apart from what we have to do to change a texture :smile: Every armor and every deco has to be patched in two cases: Case 1: generic XCOM or UN logo - updated texture (possible)Case 2: enlarged set of flags - updated 3D model's UV coordinates (not so possible now)I should have few free days now so I can see to case 1. There is one black flag, that may be your placeholder Zyxpsilon. What I'd like is: Case 3: call new texture placed in new package via XComgame.XComHumanPawn.UpdateFlagMaterial function. MIC.SetTextureParameterValue('FlagTex', Texture2D'GEN_MaterialParents.Textures.Flags_DIF'); Seems like good solution, because there could be added many flags (like all countries). There would be 1 new file, and DefaultContent.ini and XComGame.upk altered. And textures could be changed via country tag and all UVs defined in DefaultContent.ini. // UpdateFlagMaterial if (Country == USA) { Texture = Flags01_DIF } if (Country == Whatever) { Texture = FlagsXX_DIF } // DefaultContent.ini Flags=(Country=eCountry_USA, U=0.0, V=0.0) Flags=(Country=eCountry_Whatever, U=0.0, V=0.0) But I am unable to target different texture in the same package. Maybe some more experienced coder could look into the matter. -
Soldier Gender Probability: How to change?
Drakous79 replied to ktchong's topic in XCOM's Enemy Unknown
Yeah, dark age :) -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
I'd like to add, that image data can be created manually. All you need are images of all sizes needed for the texture in dds format (DXT1 in Railgun case). It can be done with Photoshop and NVIDIA Texture Tools for Adobe Photoshop or MS DirectX SDK (June 2010). To use dds files with Unreal Engine, you have to strip dds header (first 128 bytes if I remember right). Just this step is enough for uncompressed mips. Compressed mips require usage of wghost's XComLZO, which is part of great UPKUtils. -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
Here's a walkthrough. At the end you can find link to tfc file and complete mod file. http://i.imgur.com/7QAMUn4.jpg Added alien face with bullets and some blue glow. 1. Texture extraction. Place umodel.exe and SDL.dll into XEW\XComGame\CookedPCConsole\, open command line to that location and run command: umodel -lzo -export -noanim Weapon_MEC_Railgun_SF.upkAn option -out=PATH can be used in the command above to store extracted content in a folder of your chose. New folder Weapon_MEC_Railgun_SF is created inside CookedPCConsole folder or at your chosen PATH. It contains Texture2D folder with all textures. 2. Changing the texture and importing it into UDK. Find MECRailgun_DIF.tga and copy (duplicate with new name) it to MECLasegun_DIF.tga. Edit and save. Start UDK. Click on Import button in Content Browser and select MECLasegun_DIF.tga. When import dialogue appears, enter your package name (I used MyPackage), tick Compression No Alpha and select LODGroup TEXTUREGROUP_Weapon. Compression Settings can stay on TC_Default. Click OK button. Next right click on your package and save it. 3. Cooking. To get proper TextureFileCache (tfc) data, the package has to be cooked. Edit UDKGame\Config\DefaultEngine.ini and add your package: [Engine.PackagesToAlwaysCook] +SeekFreePackage=MyPackageRun UnrealFrontend and click Cook / Cook Packages. Now go to UDKGame\CookedPC\ and grab MyPackage_SF.upk and Textures.tfc. 4. Custom TFC and mod creation. I will be using a term mip or mips (Wikipedia). A mip is an image in a sequence of textures called Mipmap. Mipmap is optimized collection of images that accompany main texture, intended to increase rendering speed, reduce stress on GPU and reduce aliasing artifacts. Each mip is progressively lower resolution representation of the same image (power of two smaller than the previous one). Also we used LODGroup TEXTUREGROUP_Weapon. In DefaultEngine.ini is specified that the biggest texture in this group is 1024 px. TEXTUREGROUP_Weapon=(MinLODSize=256,MaxLODSize=1024,LODBias=0,MinMagFilter=aniso,MipFilter=point)So, decompress your UDK created package and open it with HxD or UE Explorer. I used HxD with enabled option "Allow multiple program instances in HxD." in Extras / Options. I had MyPackage_SF.upk on left half of screen and Textures.tfc on right half of the screen. Search your upk for hex 0B 00 00 00 11 00 00 00 (11 mips stored, compressed mip follows) and you should land at the start where mips are defined: 0B 00 00 00 11 00 00 00 00 00 08 00 C1 69 04 00 84 05 C3 01 00 04 00 00 00 04 00 00 11 00 00 00 00 00 02 00 EC 3C 01 00 98 C8 C1 01 00 02 00 00 00 02 00 00 11 00 00 00 00 80 00 00 4E 5A 00 00 4A 6E C1 01 00 01 00 00 00 01 00 00 11 00 00 00 00 20 00 00 40 19 00 00 0A 55 C1 01 80 00 00 00 80 00 00 00 Mips follow a structure described in UPK_Texture2D.pdf (Dropbox). Compressed mip example: 11 00 00 00 - Compressed mip follows 00 00 08 00 - Uncompressed size C1 69 04 00 - Compressed size 84 05 C3 01 - TFC offset 00 04 00 00 - Width 1024 00 04 00 00 - Height 1024 In upk, mips are defined and stored from the biggest to the smallest. Also 1x1 and 2x2 mips are substituted with 4x4 mip. In tfc, mips are stored from the smallest to the biggest. Tfc file contains dds files stripped of their header and compressed with LZO-1x. Each mip starts with C1 83 2A 9E. In this case, there are 128x128, 256x256, 512x512 and 1024x1024 mips stored in Textures.tfc and it is time to copy them into new file. You need to locate tfc offset for 128x128 mip (don't forget it is written in little endian) and mark everything from the offset to the end of the file (CTRL+Shift+End). It can be done this way as long as only one texture was added to the tfc. Otherwise it is needed to mark data by offset and compressed size. Copy and paste the data into new file and save it as TestTextures.tfc or as you wish to XEW\XComGame\CookedPCConsole\. Now to create mod file to update new tfc compressed sizes and offsets and new tfc name. I am using PatcherGUI. For new tfc offsets, you can just search for C1 83 2A 9E and write them in little endian. For new compressed sizes, you can use data from UDK created package. Mod file - compressed images: Next update mod file with uncompressed data of mips smaller than 128x128 taken from UDK created package. Uncompressed mip example: 00 00 00 00 - Uncompressed image 08 00 00 00 - Uncompressed size 08 00 00 00 - Compressed size same as uncompressed size EF 13 00 00 - Absolute offset in upk pointing to byte after this 26 32 87 31 FF FF FF FF - Image data 04 00 00 00 - Width 04 00 00 00 - Height If I need to copy out the data, I place a cursor just before image data and mark a block equal to uncompressed size. Mod file - uncompressed images: 5. Game integration. Find Weapon_MEC_Railgun_SF.upk in XEW\XComGame\CookedPCConsole\ and copy (duplicate with new name) it to Weapon_MEC_Lasegun_SF.upk. Edit DefaultContent.ini and change: WeaponPackageInfo=(ItemType=eItem_Railgun,ArchetypeName="Weapon_MEC_Railgun.GD_MEC_Railgun") to WeaponPackageInfo=(ItemType=eItem_Railgun,ArchetypeName="Weapon_MEC_Lasegun.GD_MEC_Lasegun")Also find this section and add our new package: [Content.MapContent] Map=$ALL Package=UICollection_Common Package=Weapon_MEC_LasegunSave changes. Edit mod file and add few rename rules: RENAME=Weapon_MEC_Railgun:Weapon_MEC_Lasegun // Package name? RENAME=Weapon_MEC_Railgun_SF:Weapon_MEC_Lasegun_SF // File name? RENAME=GD_MEC_Railgun:GD_MEC_Lasegun // Archetype? RENAME=MECRailgun_DIF:MECLasegun_DIF // DIF texture, in case name matters for cash.Once finished, run the mod and check the gun in the game. 6. Final notes. In barracks there is Railgun texture, but in mission is Lasegun texture. In order to have correct texture in barracks, I think Lasegun texture should be inserted into StrategyResources_SF.upk too. The issue above is solved by adding the package to [Content.MapContent] section of DefaultContent.ini under Map=$ALL. --- TestTextures.tfc (zipped, Dropbox)Complete mod file: Edit: Added a note into 5. Game integration about adding the package to DC.ini [Content.MapContent] section under Map=$ALL. Stroked text in 6. Final notes. -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
Atm I have tfc done and smaller images data ready and creating a mod file to patch it. For flags I have been pounding around changing Texture parameter in MaterialExpressionTextureSampleParameter2D of CHH_Soldiers master material with scripts, but no joy. The idea is to swap textures somehow, because what part of texture is displayed (like 0,25 x 0,125 in vanilla) is defined by UV coordinates in 3D model mesh. -
Reskinning Step 1 : Duplicating game objects
Drakous79 replied to Amineri's topic in XCOM's Enemy Unknown
I can confirm it is possible. Will start working on it asap. -
Xcom EW LW french pass in English with TEXMOD
Drakous79 replied to fazer93's topic in XCOM's Enemy Unknown
TexMod is discarding all command line switches. In your case it may be -language switch. 1. Note a name of you renamed XComEW.exe (I am using XComEWReal.exe). 2. Create a batch file in XEW\Binaries\Win32\ folder. Name it as you want, for an example XComEWReal.bat, and edit it. It should contain: XComEWReal.exe -language=FRA3. Point TexMod to that file (Target application > Browse > Use dropdown menu to see all files > Select *.bat file you created. Hope it works for you. Edit 2016: If it doesn't work for you, you can try to change the language in DefaultEngine.ini + enable ini loading, as suggested later in this thread. -
I'd say easily. Please visit XCOM Interface and Gameplay Tweaks and under miscellaneous files you can find test version of Nationalities Expanded mod, which works with the latest Enemy Within version. The mod adds 7 countries and their flags to the game. Only con is we were not able to add new flags to tactical combat yet. Also you may want to download Soldier Nationality Probability to increase a probability of getting Turkish operatives.
-
XCOM EU Alien Weapons don't Self-Destruct
Drakous79 replied to Noobie2k7's topic in XCOM's Mod Ideas
A kill can be : 1. Normal kill A weapon self-destructs by game's design, when an alien is killed with bullet, laser, plasma weaponry, PSIonic power or melee attack. Not sure about flamethrower, as I've never used it.Affects only the weapon, not grenades.The weapon is turned into weapon fragments. 2. Explosive kill Happens when an alien is killed by explosives (rockets, grenades).Affects both the weapon (which self-destructs) and grenades.No weapon fragments. Now it depends what do you want to achieve. Explosive kill generates fragments. This one is doable.Disable self-destruct mechanism. Would have to solve, where to get weapon fragments. -
Need help with a mod to customize the "Heroes"
Drakous79 replied to thestoryteller01's topic in XCOM's Enemy Unknown
It's not easy. You can try: UE Explorer + UPKUtils (using pseudo code)Scripting with UDKUPKModder -
Need help with a mod to customize the "Heroes"
Drakous79 replied to thestoryteller01's topic in XCOM's Enemy Unknown
I think so. Also you would need to add more entries to: enum EEasterEggCharacter { eEEC_None, eEEC_Sid, eEEC_Ken, eEEC_Otto, eEEC_Joe, eEEC_Carter, eEEC_Chris, eEEC_MAX }; in XGCustomizeUI class and update function GetEasterEggChar(). -
Need help with a mod to customize the "Heroes"
Drakous79 replied to thestoryteller01's topic in XCOM's Enemy Unknown
I think you can define everything in XComStrategyGame.upk, class XGCustomizeUI, function CreateEasterEggCharacter: function CreateEasterEggCharacter(XGCustomizeUI.EEasterEggCharacter eChar) { local TInventory kLoadout; m_kSoldier.m_eEasterEggChar = eChar; m_kSoldier.m_kSoldier.kAppearance.iArmorDeco = -1; m_kSoldier.m_kSoldier.kAppearance.iArmorTint = -1; switch(eChar) { case 1: m_kSoldier.m_kSoldier.strNickName = SuperSoldierNickNames[0]; m_kSoldier.m_kSoldier.kAppearance.iGender = 1; m_kSoldier.m_kSoldier.kAppearance.iRace = 0; m_kSoldier.m_kSoldier.kAppearance.iHead = 107; m_kSoldier.m_kSoldier.kAppearance.iHaircut = -1; m_kSoldier.m_kSoldier.kAppearance.iFacialHair = -1; m_kSoldier.m_kSoldier.kAppearance.iSkinColor = 3; m_kSoldier.m_kSoldier.iCountry = 0; m_kSoldier.m_kSoldier.kAppearance.iFlag = 0; m_kSoldier.m_kSoldier.kAppearance.iLanguage = 0; m_kSoldier.m_kSoldier.kAppearance.iVoice = BARRACKS().m_kCharGen.GetNextMaleVoice(0, false); m_kSoldier.ClearPerks(); m_kSoldier.m_kSoldier.iRank = 7; m_kSoldier.SetSoldierClass(3); m_kSoldier.GivePerk(44); m_kSoldier.GivePerk(31); m_kSoldier.GivePerk(91); m_kSoldier.GivePerk(56); m_kSoldier.GivePerk(52); m_kSoldier.GivePerk(53); m_kSoldier.GivePerk(55); m_kSoldier.m_kChar.bHasPsiGift = true; m_kSoldier.m_bPsiTested = true; m_kSoldier.m_kSoldier.iPsiRank = 3; m_kSoldier.GivePerk(68); m_kSoldier.GivePerk(70); m_kSoldier.GivePerk(72); m_kSoldier.GivePerk(73); m_kSoldier.m_kChar.aStats[0] = 20; m_kSoldier.m_kChar.aStats[7] = 200; m_kSoldier.m_kChar.aStats[1] = 100; m_kSoldier.m_kChar.aStats[13] = 0; STORAGE().ReleaseLoadout(m_kSoldier); STORAGE().AddItem(65); STORAGE().AddItem(15); STORAGE().AddItem(13); kLoadout.iArmor = 65; kLoadout.iPistol = 13; TACTICAL().TInventoryLargeItemsSetItem(kLoadout, 0, 15); LOCKERS().ApplySoldierLoadout(m_kSoldier, kLoadout); break; <snip> -
Unfortunately. Would be easier, if we had some development kit from Firaxis.
-
Seems like extracted models with textures for unfolding, so real world replicas can be made (of paper or some other material).
-
Yes, nice idea :) and alot of work
-
Hi imolark, it is not separated texture. The logo is part of model textures sou you would have to edit a texture for every armor, armor deco, some hats/helmets, SHIV and jet. Around 70+ textures.
-
Very nice. Does the key work for escorted VIP too? I think it can be done in XComGame.XComTacticalInput.ActiveUnit_Moving.Key_K. Done it some time ago, but never released a mod. Hope these are the correct notes, what code to insert into Key_K. if((kActiveUnit.GetAction() == none) || !kActiveUnit.GetAction().IsA('XGAction_Fire')) { if (kActiveUnit.GetCharacter().IsA('XGCharacter_Civilian')) { kActiveUnit.PerformAbility(70); // eAbility_CivilianCover Outer.PlaySound(soundcue'MenuSelectCue', true); // this is UI click, not neccessary return true; } else { kActiveUnit.PerformAbility(27); // eAbility_TakeCover Outer.PlaySound(soundcue'MenuSelectCue', true); // this is UI click, not neccessary return true; } } Edit: Corrected the code.
-
Would be wicked of devs to put SF06 first, when we are used to count from 1. Well, you programmers count from 0 :smile: I assume packages are feeded to possible voices array in some logical order, as specified somewhere (native fn, ini). If I look on the chart, SM06 Ru should be listed as option 4 on customization screen. Edit: Just played female voices from EU and package numbers match those on customization screen in EW. Taking natural lazyness of mankind into an account, those voices were just ported to EW.
-
Here is a chart for voice packages in vanilla EW as quick reference, what language has voice package. Female voices SF01 to SF06 - En Fr Ge It Po Ru Sp Male voices SM01 - En Fr Ge It Po Ru Sp SM02 - __ Fr Ge It __ __ __ SM03 - En Fr __ It Po Ru Sp SM04 - En __ Ge __ Po Ru Sp SM05 - En __ __ It Po __ Sp SM06 - En Fr Ge __ Po Ru __ SM07 - En Fr Ge It Po Ru Sp SM08 - __ __ __ __ __ __ __ SM09 - __ Fr Ge It __ Ru Sp --- I've verified that SM01, 03-07 are the same as in Enemy Unknown. For an example EW SM03 = EU SM03. SM02, 08-09 voices could be reintroduced to EW or used for testing. Temporary DL for EU SM02 (5.5 MB, 539 ogg files). Edit: Just to clarify, how I verified it. Listened to "solid copy" and "yes commander" cues in ogg format extracted from EU and compared them to sample sounds heard on EW customization screen.
-
Stopping by to say thank you guys. You're doing great!
-
Oh my god :smile: This seems to be true for materials as well. Licensee 00 - default material used [0048.45] Log: Material CrapMat has outdated uniform expressions; regenerating. [0048.45] Log: Can't compile CrapMat with seekfree loading path on console, will attempt to use default material instead [0048.45] Warning: Warning, Failed to compile Material D79TestPackage.CrapMat for platform PC-D3D-SM3, Default Material will be used in game. Licensee 40 - the game crashes [0071.45] Critical: appError called: Material D79TestPackage.CrapMat: Serial size mismatch: Got 232, Expected 208