Author Topic: Is there a way to color parts of a weapon in one file?  (Read 2743 times)

[Yes I make weapons too; they used to be the first I ever made before cars]

I'm working on reviving my old LaserTag weapon pack that I made, but never released, and wanted to try something new for once.

I got the model for the first gun of the pack, and there are certain parts that are colored to show which team the player is on.

Instead of having to export multiple versions of varying colors (I.E Red, Blue, Green, Etc.) like I did in the past, is there a way to simplify all of these into one? Counting the trail/projectile it makes, and if possible, reducing datablock limit?

I think Filipe and Electrk's Storm Weapons pack does kind what you've been asking...

you have to create new datablocks per color

you can just make multiple folders with the same dts and textures in each of them, but change the color of the textures accordingly. have the datablocks reference said .dts's in each folder.

do what swollow said. just make the color texture transparent (not the material) and it should take on the colorshift color.
« Last Edit: November 11, 2016, 03:13:54 AM by Conan »

you can just make multiple folders with the same dts and textures in each of them, but change the color of the textures accordingly. have the datablocks reference said .dts's in each folder.
or just use color shifts
and eliminate the issue of people without download textures not seeing the differences

or just use color shifts
and eliminate the issue of people without download textures not seeing the differences
you have to create new datablocks per color

So basically I could make different colors with one model, but in-code have multiple colors via separate datablocks?

If that's the case I might just do this, and make separate addon zip files rather than having a palookey of datablocks into one--making the original (Say red for example) a required addon since it includes the model?

So basically I could make different colors with one model, but in-code have multiple colors via separate datablocks?

If that's the case I might just do this, and make separate addon zip files rather than having a palookey of datablocks into one--making the original (Say red for example) a required addon since it includes the model?
i wouldnt split it up into multiple mods - 4 colors serve most purposes and it shouldnt take a huge number of datablocks. but yes, that would work

i wouldnt split it up into multiple mods - 4 colors serve most purposes and it shouldnt take a huge number of datablocks. but yes, that would work
My old pack consisted of Red, Blue, Green, Yellow, Purple, Cyan, and White. That's why I asked.

I think what I might do, is make white the base addon file, and then you can get the extra colors for your preference.

Just put all in one pack. You can have 8192 datablocks on a server, it's no problem.

I understand that, but there might be people who just want certain colors rather than just having some unused colors from one pack.

Thanks for the help nonetheless; this helped a lot.

I understand that, but there might be people who just want certain colors rather than just having some unused colors from one pack.

Thanks for the help nonetheless; this helped a lot.
If they don't want the color then they won't actually spawn it in-game. You should package them all in one file, and the host can choose which weapon he wants to actually use on the server.

If they don't want the color then they won't actually spawn it in-game. You should package them all in one file, and the host can choose which weapon he wants to actually use on the server.
Alrighty then I will do that.

Would it be okay to separate by weapon type? Such as a Semi-Auto pistol with all the colors be in one pack, whilist a machine gun be in a different pack?

I'm rather serious about not consuming datablocks here.

you can probably just make it an rtb pref that requires restart; have a checkbox to enable x color. in the server.cs just have it check the prefs for which colors to enable.

Alrighty then I will do that.

Would it be okay to separate by weapon type? Such as a Semi-Auto pistol with all the colors be in one pack, whilist a machine gun be in a different pack?

I'm rather serious about not consuming datablocks here.
It's better to do a for loop and eval all the datablocks. It's better than making 20+ seperate cs files for each one.

You don't need to eval datablocks. They can be created in a function.