Skins: I love the idea but ...help?

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.
Post Reply

Skins: I love the idea but ...help?

User avatar
Haakan
Cadet 2nd Class
Posts: 81
Joined: Sun Jul 14, 2019 1:36 am

Post by Haakan » Tue Jan 05, 2021 5:05 pm

Happy new year everybody and guys, XWAU team, you're awesome. We're about to consider official use of your work on Emperors Hammer I hope we use your work to fly our custom missions.


Alright. I liked very much the concept so JeremyaFr thanks for this!!!!

However...I'm trying to get this to work on a sample mission and I'm failing. I have so many questions... is there any chances we get a tutorial or something? I tried the sample texture on an XWing but didnt work...trying extracting a model's texture and editing it and still nothing. Please if anybody has the time to advise I'd be in debt. Thanks for your time!
Lt. Colonel A. Araujo
Commander, 7th SpecOps Squadron "Alpha"
Battlegroup I
Emperor's Hammer.

CMDR/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer/BGI

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7895
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Jan 06, 2021 10:28 pm

This is the best I can give you right now.
You need to edit the Mission INI or make a new txt file.

JeremyaFr wrote:
Fri Dec 25, 2020 7:38 pm
UPDATE

Hello,
I've updated the 32bpp hook.

There is a new feature: Skins.
With skins, you can customize the appearance of the 3d models.

Suppose that the craft is "FlightModels\[Model].opt".
To create a skin named "[Skin1]", create a folder named "FlightModels\Skins\[Model]\[Skin1]\".
To replace a texture, place it in the skins folder with the same name and dimensions of the original texture.
The supported image formats are bmp, png, jpg. Use the png format to get transparency.
See "Skins\XWing\Default\Tex00033.png" for an example for the vanilla X-Wing.

Suppose that the mission is "[MissionDir]\[Mission].tie".
To define a skin for a craft, create a file named "[MissionDir]\[Mission]_Skins.txt" or create a section named "[Skins]" in "[MissionDir]\[Mission].ini".
The format is
CraftOptName = SkinNameA, SkinNameB
CraftOptName_fg_# = SkinName1, SkinName2, SkinName3
# in CraftOptName_fg_# is an integer for the opt color marking index, starting at 0.
The default SkinName is "Default".
See "Skins.txt"
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
Haakan
Cadet 2nd Class
Posts: 81
Joined: Sun Jul 14, 2019 1:36 am

Post by Haakan » Fri Jan 08, 2021 2:58 am

alright let me try again and if it doesnt work, lets ask JeremyaFr. I can't wait to get those to work! :D
Lt. Colonel A. Araujo
Commander, 7th SpecOps Squadron "Alpha"
Battlegroup I
Emperor's Hammer.

CMDR/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer/BGI

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14052
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Fri Jan 08, 2021 7:40 am

OK here's a more hands-on demo:
I've made a test mission to test out my various custom opt remakes as well as new hook functions.

The focus here lies on the4 Principal--class Freighters, each having a different FG Color.
Skins1.jpg
The OPT itself has no FG colors, instead I've added a bunch of basic skins - red, gold, blue & green. Note that the Skins-folder must have the same exact name as the OPT itself.
The textures themselves don't need the OPT name in them. Basically the way they are displayed when you open the OPT in OPT Editor, so Skins\OPTName\TEX00***.png
Skins2.png
Now, to use the skins you need to call the respective OPT name in combination with the FGColor number, which is 0-basaed, i.e. counting up 0, 1, 2, 3... instead of 1, 2, 3, 4...

Code: Select all

;1b8m1Test.ini

[Skins]
PrincipalFreighter_fg_0 = Red
PrincipalFreighter_fg_1 = Gold
PrincipalFreighter_fg_2 = Blue
PrincipalFreighter_fg_3 = Green
[/codeu
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

Bman
Lieutenant Commander
Posts: 1170
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Fri Jan 08, 2021 9:37 pm

.
Last edited by Bman on Sat Jan 09, 2021 5:28 am, edited 1 time in total.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14052
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Fri Jan 08, 2021 11:29 pm

Bman wrote:
Fri Jan 08, 2021 9:37 pm
Edit: @Haakan, the above are the actual *.png files not subfolders.

Er no, those ARE subfolders containing the PNG files.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

Bman
Lieutenant Commander
Posts: 1170
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Jan 09, 2021 6:04 am

Ahh I thought so but then misread. So index FG 0 points to \Red subfolder "[Skins1]" which contains the *.png file(s) that dynamically replace default texture(s) baked into the model. Do you have just one default texture for each mesh/face group baked into the model ? That will reduce .opt sizes tremendously, and should improve performance, at least marginally. If more than 4 subfolders say up to 127 max will still require use of the xwa_hook_mission_tie. :-)
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14052
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sat Jan 09, 2021 9:48 am

Going forward yeah that's the plan. Like I said I'll be reworking the Victory SDs removing the FG colors from the OPT and converting them to skins,so the opt will only have default gray textures. This should cut down filesize from 70 to 17 MB.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

Post Reply