Big Infantry Units
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Big Infantry Units
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?
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?
Re: Big Infantry Units
I might be able to help this week. I have a theory I will try.
Re: Big Infantry Units
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.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.
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.
Re: Big Infantry Units
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.
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.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
I thought I've done all that, I'll check it again.Cronos09 wrote: ↑Mon Dec 02, 2019 8:08 amHi, 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.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.
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.
Re: Big Infantry Units
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)
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)
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
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.
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.
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
How does alpha channel works?
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
AHA! I GOT IT! I REMOVED THE PIKES!
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
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 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.
Re: Big Infantry Units
I would guess that you have not done this: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.
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.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
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!
Re: Big Infantry Units
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.
Re: Big Infantry Units
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.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Re: Big Infantry Units
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?
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.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Re: Big Infantry Units
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.
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
Can't wait to test it myself.
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
IT
WORKS
!
WORKS
!
Re: Big Infantry Units
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.
-
- Sergeant Major - SdKfz 234/2 8Rad
- Posts: 641
- Joined: Sun Feb 10, 2019 11:10 am
Re: Big Infantry Units
Oh, well, I suppose I can try it but making them invisible worked too. ^^