Add a new texture for unit???

Post Reply
matlegob
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 182
Joined: Fri Jun 16, 2017 7:01 pm

Add a new texture for unit???

Post by matlegob »

Hello,

i like to ad new texture for the new unit that is in this post: http://www.slitherine.com/forum/viewtop ... 92&t=80278

First I like to ad a warband with pike for the Uisusparos kingetos: how can I do this?

Thank for your answer
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28310
Joined: Sun Dec 04, 2005 6:25 pm

Re: Add a new texture for unit???

Post by rbodleyscott »

matlegob wrote:Hello,

i like to ad new texture for the new unit that is in this post: http://www.slitherine.com/forum/viewtop ... 92&t=80278
To do this you would need to make a clone of the model under a different name and put the new name in the AssetFileName column (column S) in the squads.csv file. (The squads file in the mod uses the existing warband model under its normal name, so uses the same textures as the vanilla units.) The model is the _0.s4f file, the matching .txt file defines the animations used.

You put the cloned model in /Data/Battle/Units in the custom folder.

Then you would need to make textures matching the clone model's name. (Note that these would not work in the Editor without updating the texture references in the model - which I can give you a tool to do if you PM me with your email address. However, they will work in custom and campaign battles without editing the texture references).

The textures go in /Data/Battle/UnitTextures in the custom folder
First I like to add a warband with pike for the Uisusparos kingetos: how can I do this?
Do you want a warband that counts as having pikes - if so you can give them pikes instead of impact foot and swordsmen capability in the squads.csv file. PVentidiusBassus gave them Defensive Spearmen capability, so you would need to set that value to 0 and pikes to 100.

If you mean give the actual models pikes, well you would need to design a whole new model. I can't advise you how to do that because I have no idea myself how it is done.

If you are still interested after reading this, I can supply more details/answer more queries.
Richard Bodley Scott

Image
matlegob
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 182
Joined: Fri Jun 16, 2017 7:01 pm

Re: Add a new texture for unit???

Post by matlegob »

Thanks for your reply,

My wish it's to mod the texture in order to have warband holding a spear in place of the sword (I imagine also to modify the triair to turn them into barbarian style)

so I try it and I have a problem: the .s4f file seems to link the file to the original texture so the modification I made on the new texture file does not appear!

I try to modify the text in the .s4f file to link it with my new texture file but it does not waok: the texture is invisible and the game crash

Can you help me?
Patrick Ward
Slitherine
Slitherine
Posts: 1215
Joined: Thu Sep 04, 2014 2:49 pm
Location: A small island in the Outer Hebrides.

Re: Add a new texture for unit???

Post by Patrick Ward »

matlegob wrote:Thanks for your reply,

My wish it's to mod the texture in order to have warband holding a spear in place of the sword (I imagine also to modify the triair to turn them into barbarian style)

so I try it and I have a problem: the .s4f file seems to link the file to the original texture so the modification I made on the new texture file does not appear!

I try to modify the text in the .s4f file to link it with my new texture file but it does not waok: the texture is invisible and the game crash

Can you help me?

You won't be able to mod a texture to make it hold a spear instead of a sword. It's a model. If the original model doesn't contain a spear theres nothing you can do to the texture to magick into existence. You need to be able to edit the original model and then reanimate it (since all its animation will be for sword rather than spear). If you're very lucky the units animation may already include some spear animation, in which case you need to edit the txt file that matches the unit name. But what values you use would be guess work unless you can copy another unit txt file.

( the txt file tells the game what animations, range of frames, sound and visual effects to use for particular events and while some are fairly generic, many will have unique sets of animations )

In the editor, the s4f will use whatever file is named within the s4f itself.

In-game, the engine will look for a texture that matches the model name. So if you've just duplicated and renamed the .s4f you could easily end up with a model that shows one texture in the editor and completely different one (or non at all) in-game. To fix that you need the Archon model tool but I don't know about it's public availability yet. (if you can live with the ditor missmatch then its not much of an issue)

If in-game a texture shows as a kind of pixelated blue/green mess then its not finding the textures. Check the naming.
If a texture/model is completely invisible then it sounds more like you've got a black alpha in your basecolour texture or
maybe (and I'm not entirely sure it works this way but might be worth testing) .. you've got a @ on the texture name (which tells the engine this unit has transparency) but no alpha at all.
Last edited by Patrick Ward on Fri Nov 10, 2017 12:03 am, edited 3 times in total.
............................

Pat a Pixel Pusher

............................
matlegob
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 182
Joined: Fri Jun 16, 2017 7:01 pm

Re: Add a new texture for unit???

Post by matlegob »

Thanks for your reply, I will stop trying
Patrick Ward
Slitherine
Slitherine
Posts: 1215
Joined: Thu Sep 04, 2014 2:49 pm
Location: A small island in the Outer Hebrides.

Re: Add a new texture for unit???

Post by Patrick Ward »

matlegob wrote:Thanks for your reply, I will stop trying
You just need to pick the battles you can win :) We're currently looking at a new system for Mod integration that might make it easier to do things like texture editing

I'd suggest you either stick to modding textures, campaigns, army lists etc. or bite the bullet and download Blender and learn to model and animate.
............................

Pat a Pixel Pusher

............................
PVentidiusBassus
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 4
Joined: Wed Nov 01, 2017 8:30 pm

Re: Add a new texture for unit???

Post by PVentidiusBassus »

i don't know anything about texture modding, but, thureophoroi and thorakitai models have celtics shields and the good spear animation.
(some images here from the leuki troop)

Image

Image
matlegob
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 182
Joined: Fri Jun 16, 2017 7:01 pm

Re: Add a new texture for unit???

Post by matlegob »

Another question:

I see that 4 variants of the shield of imperial roman legionnaries are in the same army (1 different for each unit). Can we do the same thing with the warband texture variants?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28310
Joined: Sun Dec 04, 2005 6:25 pm

Re: Add a new texture for unit???

Post by rbodleyscott »

matlegob wrote:Another question:

I see that 4 variants of the shield of imperial roman legionnaries are in the same army (1 different for each unit). Can we do the same thing with the warband texture variants?
Yes, there can be up to 12 variant texture sheets for a unit type. The scripts automatically look for variant textures in the /Data/Battle/UnitTextures sub-folders labelled /texture1 /texture2 ... /texture11

They count how many variants there are (including those in the base folder) and assign the first half (rounded up) to side0 and the rest to side1.
Richard Bodley Scott

Image
jomni
Sengoku Jidai
Sengoku Jidai
Posts: 1394
Joined: Thu Dec 03, 2009 1:20 am

Re: Add a new texture for unit???

Post by jomni »

matlegob wrote:Thanks for your reply, I will stop trying
Alternatively, you use an existing model with spear then give then warband clothing.
Then change parameters in squads file.
Post Reply

Return to “Field of Glory II: Modding”