Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: FekLeyrTarg on December 20, 2013, 05:13:45 pm

Title: Idea: Texture replacement in Table
Post by: FekLeyrTarg on December 20, 2013, 05:13:45 pm
Hello guys and gals,
I've just come up with another idea.
I remembered that there is a mod for Star Trek: Bridge Commander, with which you can replace textures (like ship names and registries) on a ship without having duplicate models, saving lots of disc space. It's called the Skinning and Damaging tool.
And then I thought. Why not having something similar in Freespace?
My idea is, like BC's SDT, to put certain lines in a ship's table entry to replace textures. For example:

$Replace Textures:
     +texture1 to replace: Sathanas.dds
     +texture1 replacement: Sathanas_green.dds
     +texture2 to replace: ...
     +texture2 replacement: ...
     ......

Of course it would probably the best if FS2 would automatically replace the shine-, glow- and the other maps as well.

I think that if FS2 would have such a feature, we wouldn't have to have duplicate models with different textures and we would save a lot of disc space.

PS: If I made you curious about the SDT, you can inform youself about it there: http://bridgecommander.filefront.com/file/Skinning_and_Damaging_Tool_V20;30522
Title: Re: Idea: Texture replacement in Table
Post by: Kobrar44 on December 20, 2013, 05:48:20 pm
Well, there is that (http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Texture_Replace:) thing, but I have no experience with it.
Title: Re: Idea: Texture replacement in Table
Post by: mjn.mixael on December 20, 2013, 09:57:33 pm
It doesn't work.. and many have hoped for it to be fixed.
Title: Re: Idea: Texture replacement in Table
Post by: FekLeyrTarg on December 21, 2013, 12:06:34 am
Odd. Looks like I missed it when checking the Ships.tbl entry of the wiki. Good to know that it's there already even though it needs to be fixed.
Title: Re: Idea: Texture replacement in Table
Post by: niffiwan on December 21, 2013, 03:44:17 am
actually, if my memory is correct the cause of the issue was the misuse of a "memcpy" in FSO, and all the memcpy issues have been fixed recently so it might be worth another quick test to see if it's working now.
Title: Re: Idea: Texture replacement in Table
Post by: Kopachris on December 21, 2013, 04:09:27 am
And if that still doesn't work, there's always texture replacement available in FRED, iirc.  (Isn't that how we normally do Orion nameplates?)
Title: Re: Idea: Texture replacement in Table
Post by: Boomer20 on December 21, 2013, 04:26:39 pm
Would it be possible to implement the texture replacement with the team colours bar?
For example with the Orion, the nameplates are tabled and you use the drop down bar to select your desired nameplate.
Would this be possible or does the colours table only work with purely changing colours?
Just a thought
Title: Re: Idea: Texture replacement in Table
Post by: mjn.mixael on December 21, 2013, 04:39:02 pm
actually, if my memory is correct the cause of the issue was the misuse of a "memcpy" in FSO, and all the memcpy issues have been fixed recently so it might be worth another quick test to see if it's working now.

Nope, still not working.
Title: Re: Idea: Texture replacement in Table
Post by: Goober5000 on December 21, 2013, 04:45:10 pm
actually, if my memory is correct the cause of the issue was the misuse of a "memcpy" in FSO, and all the memcpy issues have been fixed recently so it might be worth another quick test to see if it's working now.

Good thinking.  I would have to track down Taylor's original patch though; it was never committed.
Title: Re: Idea: Texture replacement in Table
Post by: FekLeyrTarg on December 21, 2013, 07:26:00 pm
And if that still doesn't work, there's always texture replacement available in FRED, iirc.  (Isn't that how we normally do Orion nameplates?)
I also tried that one. I also doesn't seem to work.