Weapon Color > Flightgroup color?

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

Weapon Color > Flightgroup color?

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

Post by Vince T » Wed May 06, 2020 5:23 pm

OK here's a thought I had while making the VSD. Right now we have a hook that enables us to assign laser colors on a per ship basis.
Could this hook be expanded so we could assign speciffic colors to individual Flightgroups?
Taking the VSD for example:
FG1 Imperial = Green Lasers
FG2 Crimson Command = Green Lasers
FG3 New Republic = Red Lasers
FG4 Old Republic = Blue Lasers
Would something like that be possible?

BTW, there aren't by chance any cyan lasers, are there?
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Wed May 06, 2020 5:32 pm

Nearest thing to cyan is fg5 or fg4 (which ever way you count from 0 or 1) it's a light blue
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Vince T » Wed May 06, 2020 6:24 pm

Ah light blue will do nicely. That part is more related to my Blue Phantom models. UPMF ship usually fire alight blue/cyan-ish shot.
Thx for the info.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed May 06, 2020 8:18 pm

Hello,
You can try that:

EDIT: link removed

Suppose that the craft is "FlightModels\[Model].opt".

To enable weapon switch based on IFF, set "WeaponSwitchBasedOnIff = 1" in "hook_weapon_color.cfg".
To disable it, set "WeaponSwitchBasedOnIff = 0".
The default value is "0".
You can override this value with a setting named "WeaponSwitchBasedOnIff" in the file named "FlightModels\[Model]WeaponColor.txt" or the section named "[WeaponColor]" in "FlightModels\[Model].ini".
Set "0" to disable or "1" to enable the feature or "-1" to use the global setting.
The default value is "-1".

To define the color, create a file named "FlightModels\[Model]WeaponColor.txt" or create a section named "[WeaponColor]" in "FlightModels\[Model].ini".
The format is:
WeaponColor = color marking value
WeaponColor_fgFG_ = color marking value
WeaponColorXXX = color marking value
WeaponColor_fgFG_XXX = color marking value
WeaponImpactColor_3100 = ARGB color
WeaponImpactColor_3200 = ARGB color
WeaponImpactColor_3300 = ARGB color
WeaponImpactColor_3400 = ARGB color
WeaponImpactColor_3500 = ARGB color
WeaponImpactColor_3100_fgFG_ = ARGB color
WeaponImpactColor_3200_fgFG_ = ARGB color
WeaponImpactColor_3300_fgFG_ = ARGB color
WeaponImpactColor_3400_fgFG_ = ARGB color
WeaponImpactColor_3500_fgFG_ = ARGB color
WeaponImpactColorXXX = ARGB color
WeaponImpactColor_fgFG_XXX = ARGB color
EnergyBarColorLaserHigh = ARGB color
EnergyBarColorLaserLow = ARGB color
EnergyBarColorIonHigh = ARGB color
EnergyBarColorIonLow = ARGB color
EnergyBarColorLaserHigh_fgFG_ = ARGB color
EnergyBarColorLaserLow_fgFG_ = ARGB color
EnergyBarColorIonHigh_fgFG_ = ARGB color
EnergyBarColorIonLow_fgFG_ = ARGB color
WeaponLightColor_fgFG_XXX = RGB color
WeaponLightColor_fgFG_XXX = RGB color

The format of the color is ARGB: FF000000 is black, FFFF0000 is red, FF00FF00 is green, FF0000FF is blue.

WeaponColor defines the default value used for all weapons.
XXX in WeaponColorXXX goes from 280 to 307. When present, this overrides the default value. You can define a different value for all weapons.
The default value is 0.

XXX in WeaponImpactColorXXX goes from 280 to 307. When present, this overrides the default impact color. If it is set to 0, the default value will be used. You can define a different impact color for all weapons.
The default impact colors are defined in "hook_weapon_color.cfg".

EnergyBarColorLaserHigh and EnergyBarColorLaserLow define the color of the laser energy bar.
EnergyBarColorIonHigh and EnergyBarColorIonLow define the color of the ion energy bar.

XXX in WeaponLightColorXXX goes from 280 to 307. When present, this overrides the default lighting effect color. If it is set to 0, the default value will be used. You can define a different light color for all weapons.
The default light colors are defined in "hook_weapon_color.cfg".

FG in _fgFG_ defines the flight group markings.
Last edited by JeremyaFr on Mon May 11, 2020 3:37 pm, edited 1 time in total.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Wed May 06, 2020 8:47 pm

Do flightgroups start at 0 or 1 ?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed May 06, 2020 8:54 pm

They start at 0.

evilmark
Cadet 2nd Class
Posts: 51
Joined: Tue Feb 05, 2019 12:43 am

Post by evilmark » Wed May 06, 2020 10:04 pm

That new hook works perfectly for me, I just put together an edited skirmish with an Old Republic VSD vs an Imperial VSD, and both are firing their correct color lasers. Thanks for all the great work you do Jeremya!

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon May 11, 2020 3:38 pm

UPDATE

Hello,
I've merged the changes from the WIP version into the stable version.

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

Post by Vince T » Tue May 12, 2020 7:06 am

Hey Jeremy, I'm having some trouble with the weapon colors.
I've updated to the newest version of the hook and also made sure I had the upgraded weapon OPTs, however, for the ship in question, the colors don't change.

Here's a except of the .ini file.
The ship is set up with 282 Empirelasers and 284 ion cannons
Maybe you can find something I overlooked? Or do I have a general problem and simply have to reinstall the game (again)?

Code: Select all

WeaponSoundBehavior = TieFighterWithIon

[WeaponColor]
WeaponColor = 8
WeaponColor282 = 8
WeaponColor283 = 8
WeaponColor284 = 2
WeaponColor285 = 2

WeaponImpactColor_3100 = 80C71585
WeaponImpactColor_3200 = BF000000
WeaponImpactColor_3300 = BF000000
WeaponImpactColor_3400 = 804A0080
WeaponImpactColor_3500 = BFFFE700

WeaponImpactColor282 = BF000000
WeaponImpactColor283 = BF000000
WeaponImpactColor284 = 80C71585
WeaponImpactColor285 = 80C71585

EnergyBarColorLaserHigh = FF000000
EnergyBarColorLaserLow = FF808080
EnergyBarColorIonHigh = FFDB1893
EnergyBarColorIonLow = FF961065

WeaponLightColor282 = 0
WeaponLightColor283 = 0
WeaponLightColor284 = 000000
WeaponLightColor285 = 000000
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Tue May 12, 2020 7:24 am

Still not showing?

I don't understand, you defiantly have all the latest hooks, you have the laser opts, which where already in the DSUCPv2.6 lol

The ship in question should be firing Black Lasers and Purple Ions, in my setup it does

It's a strange one
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Vince T » Tue May 12, 2020 7:26 am

Sounds like a reinstall ... meh!
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

Post Reply