Shield effect color when laser hits

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

Shield effect color when laser hits

User avatar
Phoenix Leader
Rebel Alliance
Posts: 437
Joined: Wed Aug 08, 2018 2:20 pm

Post by Phoenix Leader » Thu Mar 28, 2019 4:56 am

I've noticed that while the Razor fighter fires blue lasers and the R-41 Starchaser fires yellow lasers, the laser cannon charge indicators are red for both fighters.
The shield effect when laser hits is red as well, regardless of the color of laser fire (red, blue or yellow); only green lasers produce a green shield effect on hit.
The same thing happens with ion cannons having the charge indicators blue even for purple ion cannons and the shield effect being blue for both the colors.
I don't know if this is a sort of graphical bug, or if it's intended, or if it's just an oversight cause the shield effect was not updated when the laser colors were.

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

Post by Darksaber » Thu Mar 28, 2019 6:22 am

It's not a bug, you can't change the laser indicators for individual craft, it's the same for the impact colors.

If your not keen on the new laser colors you can go through each craft *.ini file and remove all the [WeaponColor] info, if removed all laser colors will be back to there default Red, Green or Blue laser color.

Sorry but at present there is nothing that can be done about the laser indicators of impact color
“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: 3988
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Mar 31, 2019 6:51 pm

Hello,
I've found the offsets to modify to change the laser impact color and the offsets for the laser indicators.
I will update the weapon color hook.

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

Post by Darksaber » Sun Mar 31, 2019 6:56 pm

Beautiful, your a genius mate, so will that mean a separate dat file for each color
“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: 3988
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Mar 31, 2019 7:06 pm

No, setting the impact color doesn't require separate dat files.

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

Post by Darksaber » Sun Mar 31, 2019 7:21 pm

Brilliant, I think I know where you going with this :)
“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

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

Post by Bman » Mon Apr 01, 2019 1:33 am

Excellent. Only other choice I had was making all of the colored splash .dat files the same common image/color.... i.e. a fire ball for example for all colored lasers. Now I won't need it. Thanks Jeremy :-)
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

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

Post by JeremyaFr » Tue Apr 02, 2019 3:30 pm

Hello,
Here is something to test.

EDIT: LINK removed

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

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
WeaponColorXXX = color marking value
WeaponImpactColor_3100 = ARGB color
WeaponImpactColor_3200 = ARGB color
WeaponImpactColor_3300 = ARGB color
WeaponImpactColor_3400 = ARGB color
WeaponImpactColor_3500 = ARGB color
WeaponImpactColorXXX = ARGB color
EnergyBarColorLaserHigh = ARGB color
EnergyBarColorLaserLow = ARGB color
EnergyBarColorIonHigh = ARGB color
EnergyBarColorIonLow = ARGB 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.

The default impact colors are:
WeaponImpactColor_3100 = FF0000FF
WeaponImpactColor_3200 = FFFF0000
WeaponImpactColor_3300 = FF00FF00
WeaponImpactColor_3400 = FFFF00FF
WeaponImpactColor_3500 = FFFFFF00
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.

EnergyBarColorLaserHigh and EnergyBarColorLaserLow define the color of the laser energy bar.
EnergyBarColorIonHigh and EnergyBarColorIonLow define the color of the ion energy bar.
Last edited by JeremyaFr on Thu Apr 04, 2019 7:41 pm, edited 3 times in total.

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

Post by Darksaber » Tue Apr 02, 2019 8:07 pm

Ok tested using yellow lasers figured out the ARGB color using the engine glow thingy in optech lol, can't seem to find an online convertor :(

Anyhow used the xwing to test so no ions

Used
EnergyBarColorLaserHigh = FFFFD808
EnergyBarColorLaserLow = FF8C7808

the Energy bar seems to works fine :)

But I couldn't get the yellow impact color to work without editing the animation.dat images
WeaponImpactColor = FFFFFFFF
WeaponImpactColor280 = FFFFFF00
WeaponImpactColor281 = FFFFFF00

you say this overrides the default impact color, sorry it doesn't seem too, the only way I could get it to work as I said was to de-saturate all the images so basically they are black and white in the Animation.dat 3100 to 3500 so that the color of the WeaponImpactColor would show through otherwise the color of the animation dat images was still showing, if this is the case and the I have to change the animation.dat image to black and white, then all opts will require a txt or ini file, otherwise the impact will be white.

Not sure what else you can do
“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
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Apr 03, 2019 12:31 am

Following the thread sequence of posts I laughed out loud.

Phoenix Leader asks for a thing.

Darksaber says thing is not possible at this time.

JeremyaFr pops in to say he figured out the thing.

I really belly laughed, while also not being surprised at JeremyaFr.
Image Image Image Image Image

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Wed Apr 03, 2019 1:13 am

To be fair, most of what we're even coming up with concept wise these days was for almost two decades entirely impossible to consider, never mind implement.

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Wed Apr 03, 2019 2:10 am

Trust me, I remember struggling with no-sfoil patches when I was in high school.
Image Image Image Image Image

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

Post by JeremyaFr » Wed Apr 03, 2019 4:22 pm

Darksaber wrote:
Tue Apr 02, 2019 8:07 pm
you say this overrides the default impact color, sorry it doesn't seem too, the only way I could get it to work as I said was to de-saturate all the images so basically they are black and white in the Animation.dat 3100 to 3500 so that the color of the WeaponImpactColor would show through otherwise the color of the animation dat images was still showing, if this is the case and the I have to change the animation.dat image to black and white, then all opts will require a txt or ini file, otherwise the impact will be white.
You are right. The color from the dat file still appears.
There is no need to add a txt or ini file for all the OPTs. I can modify the hook to set by default a color based on the weapon. So that the default color for rebel lasers will be red, the default color for imperial lasers will be green, the default color for ions will be blue, and so on.

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

Post by JeremyaFr » Wed Apr 03, 2019 4:51 pm

I've updated the hook.
I need help to define the default impact colors. I've set them to:
- ResData_Animations_3100 = 0xFF0000FF blue
- ResData_Animations_3200 = 0xFFFF0000 red
- ResData_Animations_3300 = 0xFF00FF00 green
- ResData_Animations_3400 = 0xFFFF00FF purple
- ResData_Animations_3500 = 0xFFFFFF00 yellow

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

Post by Darksaber » Wed Apr 03, 2019 5:50 pm

JeremyaFr wrote:
Wed Apr 03, 2019 4:51 pm
I've updated the hook.
I need help to define the default impact colors. I've set them to:
- ResData_Animations_3100 = 0xFF0000FF blue
- ResData_Animations_3200 = 0xFFFF0000 red
- ResData_Animations_3300 = 0xFF00FF00 green
- ResData_Animations_3400 = 0xFFFF00FF purple
- ResData_Animations_3500 = 0xFFFFFF00 yellow
That's correct

Just wondering though does this take into account that the rebel and Imp laser both have a red and Green FG

Green/Red = 0 Depending on Imp or Reb laser
Red/Green = 1 Depending on Imp or Reb laser
Purple = 2
Yellow = 3
LightBlue = 4
Blue = 5
RedPurple = 6
BluePurple = 7
Black = 8

Just wondering instead of having

WeaponImpactColorXXX = XXXXXXX

Is it possible to have something like

WeaponImpactColorXXX_3100 = XXXXXXXX
WeaponImpactColorXXX_3200 = XXXXXXXX
WeaponImpactColorXXX_3300 = XXXXXXXX
WeaponImpactColorXXX_3400 = XXXXXXXX
WeaponImpactColorXXX_3500 = XXXXXXXX

Then add two or three of more options
WeaponImpactColorXXX_3600 = XXXXXXX
WeaponImpactColorXXX_3700 = XXXXXXX
WeaponImpactColorXXX_3800 = XXXXXXX

So we could add some custom colors to the animation.dat???

Would this be possible??
“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: 3988
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Apr 03, 2019 6:21 pm

It doesn't take into account that the rebel and Imp laser both have a red and Green FG.

Yes,
Instead of using "WeaponImpactColorXXX = ARGB", I can use "WeaponImpactColorXXX = RRRR" where RRRR define which animation to use (3100, 3200, 3300, 3400, 3500). I think that adding new animations is possible. It needs to be tested.

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

Post by Darksaber » Wed Apr 03, 2019 6:37 pm

I think that would be a better option, theoretically you should be able to use any number between 3100 and 3999 in the animation.dat, I've been through all the dat file and no other dat uses those numbers

But actually we only need 3100 to 3900 :)

4000 is used by the Debris.dat
“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: 3988
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Apr 03, 2019 7:38 pm

:( Setting a new animation consumes an object slot (3100 to 3500 corresponds, not in order, to slots 551 to 555). So adding additional impact animation don't work. :(

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

Post by Darksaber » Wed Apr 03, 2019 8:35 pm

Bugger :(

Going back to my original idea then

is it possible use 280 to 307 but also link the separate dat images, and stlll able to apply an ARGB color
WeaponImpactColorXXX_3100 = XXXXXXXX
WeaponImpactColorXXX_3200 = XXXXXXXX
WeaponImpactColorXXX_3300 = XXXXXXXX
WeaponImpactColorXXX_3400 = XXXXXXXX
WeaponImpactColorXXX_3500 = XXXXXXXX

Default impact color = 0

Example
WeaponImpactColor280_3100 = 0 (Blue)
WeaponImpactColor281_3100 = XXXXXXXX (use ARGB color to use a Darker 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
JeremyaFr
XWAU Member
Posts: 3988
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 04, 2019 4:18 pm

I've updated the hook.
Now you can define the default color for animation 3100 to 3500.

WeaponImpactColor_3100 = ARGB color
WeaponImpactColor_3200 = ARGB color
WeaponImpactColor_3300 = ARGB color
WeaponImpactColor_3400 = ARGB color
WeaponImpactColor_3500 = ARGB color
WeaponImpactColorXXX = ARGB color

The default impact colors are:
WeaponImpactColor_3100 = FF0000FF
WeaponImpactColor_3200 = FFFF0000
WeaponImpactColor_3300 = FF00FF00
WeaponImpactColor_3400 = FFFF00FF
WeaponImpactColor_3500 = FFFFFF00
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.

To help getting the color hex values, here is a tool:
https://github.com/JeremyAnsel/ColorHex ... ses/latest
Last edited by JeremyaFr on Sat Apr 06, 2019 12:24 pm, edited 1 time in total.

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

Post by JeremyaFr » Thu Apr 04, 2019 4:49 pm

Here is a modified version of the original ANIMATIONS.DAT file:
EDIT: The file is in the weapon color hook zip.
Last edited by JeremyaFr on Sat Apr 06, 2019 12:25 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 » Thu Apr 04, 2019 6:57 pm

You never cease to amaze me, Thanks so much :)

I've come across a problem with the missile impacts they shouldn't work in the same way as the lasers, when hit with a missile it should be an explosion as it does with in a vanilla game

Introduce the updated color hook, and the missiles have an impact color instead of the explosion

Missile impact with old color hook or vanilla game
flightscreen2.jpg
Missile impact with the NEW color Hook
flightscreen3.jpg
I think you should only be able change the laser slots 280 to 285, 288, 289, 297, 301 to 305 and 307

and disable the others like
All the missiles/torps slot 286, 287, 291, 292, 293, 294, 295, 296, should always be an explosion
flares, chaff? and cluster 298, 299, 300 not sure if these have or should have an impact color
Death star 306 as this should always be green, and I'm not sure what the impact is
You do not have the required permissions to view the files attached to this post.
“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
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Apr 04, 2019 6:58 pm

I should of said I tested all the missiles without the hook and they all have an explosion

with the new hook, all the missile have an impact color :(
“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: 3988
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 04, 2019 7:43 pm

I think I've fixed the explosion.
EDIT: link removed
Last edited by JeremyaFr on Sat Apr 06, 2019 12:27 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 » Thu Apr 04, 2019 7:55 pm

Cheers mate :) I'll take a look :)
“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

Post Reply