How to create new armor patterns ?

For technical discussions and help
Post Reply
plasman
Posts: 15
Joined: Wed Feb 24, 2016 8:00 am

How to create new armor patterns ?

Post by plasman »

Greetings to the community,

I’m doing my first baby steps into the wonderfull world of X-com 2 modding and I have some (basic) questions regarding new armor patterns creation for the game.

I’m trying to make some (not so) original patterns for the game. I’ve watched UseYourIlusions video tutorial on You Tube a dozen times and followed his instructions step by step. But unfortunately it doesn’t work for me.

The mod builds up and debugs flawlessly (that’s a good start at least) but the new patterns I’ve made simply do no show up in the armor pattern menu when I create a new character in the characters pool.

Here is how I created my (non working) mod :

Using Modbuddy I created 3 folders (Config, Localization and Content) in my new project (which is simply called « Plasman »)
In the Config folder I created an .ini file called XcomContent.ini with the following syntax

[XComGame.X2BodyPartTemplateManager]
+BodyPartTemplateConfig=(PartType="Patterns", TemplateName="Bark", ArchetypeName="PlasmanText.Bark", bCanUseOnCivilian=false, bVeteran=true)
+BodyPartTemplateConfig=(PartType="Patterns", TemplateName="Brush", ArchetypeName="PlasmanText.Brush", bCanUseOnCivilian=false, bVeteran=true)
+BodyPartTemplateConfig=(PartType="Patterns", TemplateName="Giraffe", ArchetypeName="PlasmanText.Giraffe", bCanUseOnCivilian=false, bVeteran=true)

Notes : Bark, Brush and Giraffe are the name of the templates.

Then I created an .int file called XComGame.int in the Localization folder as follows :

[Bark X2BodyPartTemplate] DisplayName="Bark"
[Brush X2BodyPartTemplate] DisplayName="Brush"
[Giraffe X2BodyPartTemplate] DisplayName="Giraffe"

These lines are (as far as I know) supposed to make the Bark, Brush and Giraffe pattern options appear in the armor patterns menu.

Then I created a .upk file called PlasmanTex.upk using the editor’s tools. Creating a template for each pattern (called Bark, Brush and Giraffe). Importing 256x256 .png textures (taking great care of setting the LOD group to « character »). Attaching them to each template (by copying/pasting the address of each texture into the properties of the template). Then I saved PlasmanTex.upk into the proper Content folder. Used Modbuddy to add it. Used the build up menu, and then did the debugging.

No error but no patterns either. At least my « mod » is harmless to the game :D

My main suspect is the .int file, since the options for my new patterns do not even show up in the menu. Maybe I made some syntax mistakes.

All the help/advises I could get would be welcome. Thanks in advance folks. :)
plasman
Posts: 15
Joined: Wed Feb 24, 2016 8:00 am

Re: How to create new armor patterns ?

Post by plasman »

OK in the meantime I did some reverse engineering with a mod I downloaded and noticed that
+ValidPartTypes=Patterns
was missing in my config file (it was also missing in the tutorial btw)
I tried debugging again (after having saved/re-build the project) but without success: my patterns still don't want appear in the armor pattern menu.

I checked the .int file and its format seems OK.

So a guess the problem might come from the .upk file ???
plasman
Posts: 15
Joined: Wed Feb 24, 2016 8:00 am

Re: How to create new armor patterns ?

Post by plasman »

A little update regarding my struggle against the X-Com2 SDK:

I rechecked everything, I've redone the .upk file entirely
Copying the archetype files, renaming them, importing the .png files again (setting the LOD group to Character), copying their addresses into the clipboard to paste them into the properties of the archetypes, saving the .upk file into the Content folder then importing it with Modbuddy. Rebuilding the project etc…It's still not functioning. Now I am at a loss to understand why it doesn't want to work properly.

Having taken a look at Capnbubs' nice tutorial (which doesn't deal with camo patterns, but which is quite useful regarding ini files syntax) I've noticed he added ARC_ before the name of the template in his ini config file:

which mean

ArchetypeName="CapnbubsAccessories.ARC_Hat_Capnbubs_Beret_M"

instead of

ArchetypeName="CapnbubsAccessories.Hat_Capnbubs_Beret_M"

CapnbubsAccessories being the name of the package and Hat_Capnbubs_Beret_M the name of the archetype

I will try to do the same by changing

+BodyPartTemplateConfig=(PartType="Patterns", TemplateName="Bark", ArchetypeName="PlasmanText.Bark"

into

+BodyPartTemplateConfig=(PartType="Patterns", TemplateName="Bark", ArchetypeName="PlasmanText.ARC_Bark"
plasman
Posts: 15
Joined: Wed Feb 24, 2016 8:00 am

Re: How to create new armor patterns ?

Post by plasman »

Well, OK, of course it didn't work. I feel a strong urge to just give up.
But I will keep on searching on the internet for examples for camo pattern mods in order to find out, what's wrong with mine.
Amineri

Re: How to create new armor patterns ?

Post by Amineri »

Persistence is the key to success :)

Even when modding EU/EW, there were things that I only figured out how to do after many months. I think maybe it's just the nature of programming in general ...

A couple of notes :
1) The "ARC_" prefix is just a naming convention, used to help denote what is an archetype. It's not something that's required.
2) Over on Nexus some people have reported that their upks don't save properly if they don't have a project actually open in ModBuddy when they open Unreal Editor. I hadn't noticed it myself, but it may be trying out
3) I haven't messed with patterns much, but they look pretty simple -- a upk with an XComPatternsContent Archetype, linking to a 256x256 res texture. Set up in XComContent as you'd done. Last piece might be setting up localization file in XComGame.int :

Code: Select all

[Camo_Digital X2BodyPartTemplate]
DisplayName="Digital"
If you don't define this, it will default to "", which could be why it's not displaying in-game.
plasman
Posts: 15
Joined: Wed Feb 24, 2016 8:00 am

Re: How to create new armor patterns ?

Post by plasman »

Thanks very much for your reply :)

2) I always keep ModBuddy open so I guess this isn't the issue

3) I agree with you on the fact that the problem might come from the .int file.
I rewrote the file as follows
[Camo_Bark X2BodyPartTemplate]
DisplayName="Bark"
[Camo_Brush X2BodyPartTemplate]
DisplayName="Brush"
[Camo_Giraffe X2BodyPartTemplate]
DisplayName="Giraffe"
That was in case Camo_ was a prefix needed before the name of the pattern's template

The original one was
[Bark X2BodyPartTemplate] DisplayName="Bark"
[Brush X2BodyPartTemplate] DisplayName="Brush"
[Giraffe X2BodyPartTemplate] DisplayName="Giraffe"
Bark, Brush and Giraffe being the names of the patterns templates

Unfortunately it doesn't work.

I even tried putting a + before each line, it doesn't work either. :(
plasman
Posts: 15
Joined: Wed Feb 24, 2016 8:00 am

Re: How to create new armor patterns ?

Post by plasman »

Hi folks,

I eventually managed to solve my problem. I still don't know what was going wrong but after having retyped the .ini file several times (actually quite a lot if times) it finally worked.

I take this opportunity to let you know I've released my first (very small) mod for X-Com2.

This mod introduces 3 new fantasy (although inspired by real life ones) armor patterns

"Bark Pat" is intended to mimic tree bark

"Brush Pat" is inspired from brush stroke patterns such as the British Desert DPM

"Giraffe Pat", is...well, self explanatory I guess.

If you want to give it a try here is the Steam Workshop link: https://steamcommunity.com/sharedfiles/ ... =645436984

I hope you'll enjoy.

Thanks to you again Amineri for your help and thanks to UseYourIllusions and Marvie for their nice armor patterns modding tutorials.
Post Reply