Big Infantry Units

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Big Infantry Units

Post by StuccoFresco »

Hello, I'm interested in making big infantry units without pikes for a mod.

I would be interested in knowing if there is a way to either:

1- remove the pikes from the pike keils; i tried deleting it from the DDS texture file, but the 3d object is still there and it becomes solid gray in the game

2- adapt another unit from another scenario. I found good infantry squares in the Dresden scenario, tried to import them in mine while changing the names of the files in UNITS folder and making an entry in the SQUAD file and in the TEXT1 file, but it doesn't work: the unit appears in the unit list but when deployed the model and textures are the same as Pike Squares.

I also tried to "overwrite" it over the Bill_and_bow model by renaming the relevant files, to no avail. How do I import unit 3d models and textures from scenarios?
Ubberdorc
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 31
Joined: Thu Aug 07, 2014 11:03 pm

Re: Big Infantry Units

Post by Ubberdorc »

I might be able to help this week. I have a theory I will try.
Cronos09
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 326
Joined: Thu Feb 22, 2018 4:28 pm

Re: Big Infantry Units

Post by Cronos09 »

StuccoFresco wrote: Mon Dec 02, 2019 1:02 am Hello, I'm interested in making big infantry units without pikes for a mod.

2- adapt another unit from another scenario. I found good infantry squares in the Dresden scenario, tried to import them in mine while changing the names of the files in UNITS folder and making an entry in the SQUAD file and in the TEXT1 file, but it doesn't work: the unit appears in the unit list but when deployed the model and textures are the same as Pike Squares.
Hi, I can only consult on point 2. I don't see that you copied the appropriate texture. If you did it, you have to assign this texture in the editor ('Unit Textures' button) for user-made battles.
I try to explain by example:
Eg, you would like to copy '2nd Brigade,Forty-Fourth Div.,XIV Corps' from Dresden scenario.
Find this name in TEXT1. This unit has IDS_UNITNAME96.
Find this ID (96) in SQUADS.csv. The unit has AssetFilename 'Swiss_Square'.
Copy SWISS_SQUARE.TXT and SWISS_SQUARE_0.S4F from ...\DRESDEN\DATA\BATTLE\UNITS\. Then copy the unit texture (you can see where it is in the editor) SWISS_SQUARE@.DDS from ...\DRESDEN\DATA\BATTLE\UNITTEXTURES\ECW_SCOTTISH\.
Change the three names as you like but in the same manner, add new strings to your SQUADS.csv and TEXT1.txt with your changes. In the editor you have to assign the appropriate texture (which you have copied) for user-made battles. For skirmish battles ARMYLIST.txt should be changed too.
Paul59
General - King Tiger
General - King Tiger
Posts: 3856
Joined: Tue Jul 21, 2015 11:26 pm

Re: Big Infantry Units

Post by Paul59 »

Without going into the details of the Desden scenario I would think that Cronos' explanation is spot on.

There are two ways that a modder can make the pikes disappear, either find the sections of code in the unit .s3f model that relate to the pikes and delete them. But for that you would need access to the .s3f versions of the unit models, which most people don't have, and even if you did it is a very fiddly job.

Or use an alpha channel in the texture to stop the pikes from showing in game. The original Dresden scenario designer probably used this method, so as Cronos said you need to use the modified textures. You can then modify the textures yourself, but retain the modded alpha layer.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

Cronos09 wrote: Mon Dec 02, 2019 8:08 am
StuccoFresco wrote: Mon Dec 02, 2019 1:02 am Hello, I'm interested in making big infantry units without pikes for a mod.

2- adapt another unit from another scenario. I found good infantry squares in the Dresden scenario, tried to import them in mine while changing the names of the files in UNITS folder and making an entry in the SQUAD file and in the TEXT1 file, but it doesn't work: the unit appears in the unit list but when deployed the model and textures are the same as Pike Squares.
Hi, I can only consult on point 2. I don't see that you copied the appropriate texture. If you did it, you have to assign this texture in the editor ('Unit Textures' button) for user-made battles.
I try to explain by example:
Eg, you would like to copy '2nd Brigade,Forty-Fourth Div.,XIV Corps' from Dresden scenario.
Find this name in TEXT1. This unit has IDS_UNITNAME96.
Find this ID (96) in SQUADS.csv. The unit has AssetFilename 'Swiss_Square'.
Copy SWISS_SQUARE.TXT and SWISS_SQUARE_0.S4F from ...\DRESDEN\DATA\BATTLE\UNITS\. Then copy the unit texture (you can see where it is in the editor) SWISS_SQUARE@.DDS from ...\DRESDEN\DATA\BATTLE\UNITTEXTURES\ECW_SCOTTISH\.
Change the three names as you like but in the same manner, add new strings to your SQUADS.csv and TEXT1.txt with your changes. In the editor you have to assign the appropriate texture (which you have copied) for user-made battles. For skirmish battles ARMYLIST.txt should be changed too.
I thought I've done all that, I'll check it again.
Ubberdorc
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 31
Joined: Thu Aug 07, 2014 11:03 pm

Re: Big Infantry Units

Post by Ubberdorc »

I agree with the above postings and that what I was going to try.
Skirmish mode pulls from the army list which texture folder to pull from and it uses the name of the asset file to decide what texture is used in the "army texture folder'.
Scenario editor pulls from the default texture listed in the asset file .s4f or .s3f and then you assign the texture from the editor itself. (this can be edited in the .s4f file using note++ as long as you understand the limitations)
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

It doesn't work.

I named the unit "Infantry_Square" in the Squad.csv file. I tried to make it use the Bill_and_Bow assetname. I put the right files renaming them Bill_and_Bow.txt and Bill_and_Bow_0.s4f in BATTLE/UNITS. I assigned the original texture to the same name in IW_ITalian folder.

The unit shows in the editor list, with correct numbers from the CSV file, but it's a pike square.
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

How does alpha channel works?
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

AHA! I GOT IT! I REMOVED THE PIKES!
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

Ok, I can modify the vanilla texture files but I'm completely at loss when it comes to making a new unit.

I tried simply duplicating the files of the vanilla Pike_Square assetname. So I went to base game BATTLE/UNITS and grabbed Pike_Square.txt and Pike_Square_0.s4f, copied them in the relevant BATTLE/UNITS folder of my campaign and renamed them Pike_Square2.txt and Pike_Square2_0.s4f. I added a new unit in the csv file, named "Infantry_Square" with assetname "Pike_Square2" and added the corresponding id name in the TEXT1.txt file.

I finally created a new texture file in BATTLE/UNITTEXTURES/IW_Italian by copying the base Pike_Square@ file, removing the pike textures and renaming it Pike_Square2@.

Ingame it doesn't work: i open the editor, the new unit it's there but its model is the vanilla pike square with italian textures, pikes and all.
Paul59
General - King Tiger
General - King Tiger
Posts: 3856
Joined: Tue Jul 21, 2015 11:26 pm

Re: Big Infantry Units

Post by Paul59 »

StuccoFresco wrote: Mon Dec 02, 2019 9:45 pm Ok, I can modify the vanilla texture files but I'm completely at loss when it comes to making a new unit.

I tried simply duplicating the files of the vanilla Pike_Square assetname. So I went to base game BATTLE/UNITS and grabbed Pike_Square.txt and Pike_Square_0.s4f, copied them in the relevant BATTLE/UNITS folder of my campaign and renamed them Pike_Square2.txt and Pike_Square2_0.s4f. I added a new unit in the csv file, named "Infantry_Square" with assetname "Pike_Square2" and added the corresponding id name in the TEXT1.txt file.

I finally created a new texture file in BATTLE/UNITTEXTURES/IW_Italian by copying the base Pike_Square@ file, removing the pike textures and renaming it Pike_Square2@.

Ingame it doesn't work: i open the editor, the new unit it's there but its model is the vanilla pike square with italian textures, pikes and all.
I would guess that you have not done this:

Open your new Pike_Square2_0.s4f in the Notepad++ program, and change the texture reference to your new texture. For this to work though, you have to keep the texture names exactly the same number of characters. So you cannot rename Pike_Square to Pike_Square2, it will not work. PikeSquare2 would work, as it has the same number of characters as the original texture. This only works in Notepad++ and other powerful text editors, if you try to use Wordpad or Notepad it won't work.

If you had access to the original .s3f files you would not have to bother with this technicality, you could name your textures anything you want.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

I have Notepad++ (it's invaluable to modders, expecially a Paradox games modder) so I'll try this evening, that might be the key to success. Thanks!
Cronos09
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 326
Joined: Thu Feb 22, 2018 4:28 pm

Re: Big Infantry Units

Post by Cronos09 »

I checked in practice. If I just transfer the model and texture to another scenario, then everything works fine. If I rename the 3 files, the editor does not see the texture. Changing its names in .s4f (with N++) does not help me. I my opinion, these files should not be renamed.
Paul59
General - King Tiger
General - King Tiger
Posts: 3856
Joined: Tue Jul 21, 2015 11:26 pm

Re: Big Infantry Units

Post by Paul59 »

Cronos09 wrote: Tue Dec 03, 2019 7:33 am I checked in practice. If I just transfer the model and texture to another scenario, then everything works fine. If I rename the 3 files, the editor does not see the texture. Changing its names in .s4f (with N++) does not help me. I my opinion, these files should not be renamed.

I change the texture names in .s4f files all the time, see my latest Battle Academy mod for example. If you keep the texture name length the same it should work.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Paul59
General - King Tiger
General - King Tiger
Posts: 3856
Joined: Tue Jul 21, 2015 11:26 pm

Re: Big Infantry Units

Post by Paul59 »

Some .s4f files can be a bit misleading to work with. For instance: the Battle Academy palm trees, when you open the file in Notepad++ the first texture reference you see is called Sherman.psd, but that is not the texture that the model uses! You have to keep scrolling a long way until you reach the actual texture (off the top of my head, I think it is called something like desert_leaves@.dds).

Maybe some of the P&S .s4f files might have a similar complication?
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Cronos09
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 326
Joined: Thu Feb 22, 2018 4:28 pm

Re: Big Infantry Units

Post by Cronos09 »

Paul59 wrote: Tue Dec 03, 2019 8:02 am I change the texture names in .s4f files all the time, see my latest Battle Academy mod for example. If you keep the texture name length the same it should work.
Sorry. I've tried to rename the files again, and this method works fine. I did not change the AssetFilename in SQUADS.csv for the previous time.
Last edited by Cronos09 on Tue Dec 03, 2019 5:59 pm, edited 1 time in total.
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

Can't wait to test it myself.
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

IT



WORKS


!
Odenathus
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 287
Joined: Sat Jun 27, 2009 10:02 pm

Re: Big Infantry Units

Post by Odenathus »

I don't know anything about sf4 models and alpha textures but if you just use paint.net (a free app) you can open - say - the Colonela in Unit Textures then simply erase the pikes, save it and you're there. Same with Keils, etc. You can see an example in Borodino, or most of the other Napoleonic battle scenarios.
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 641
Joined: Sun Feb 10, 2019 11:10 am

Re: Big Infantry Units

Post by StuccoFresco »

Oh, well, I suppose I can try it but making them invisible worked too. ^^
Post Reply

Return to “Modders Corner”