Change the color of the shot

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Change the color of the shot

Post by RebelMarksman »

Good day! Tell me, how to change the color of the shot ? For example from blue to purple ? As far as I understand, in the file all_weap_inf_sniperrifle (odf) these settings are responsible for the color of the flash shot

FlashColor = "255 80 80 255"
FlashLength = 0.025
FlashLightColor = "92 136 250 100"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"

And in the file all_weap_inf_sniperrifle_ord for the color of the beam shot

LaserTexture = "bluelaser_d"
LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 150"
LightRadius = "4.0"

I am interested in, what features are responsible for the Central part of the flash, which should be white as well as for halo outbreaks of which must be of any color. And the same characteristics of the beam shot.

thank you in Advance for your answers!
Last edited by RebelMarksman on Tue Mar 27, 2012 4:13 pm, edited 1 time in total.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: Change the color of the shot

Post by sereja2 »

"Central part of the flash" is a tga, in this sample named "bluelaser_d". It can be edited with some paint editors (I am using Paint Shop Pro 7), and mixing with halo, (in this sample LaserGlowColor = "92 136 250 100") can be add many interesting color variations. But for this, you have to made your custom map, with custom sides first, of course...
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: Change the color of the shot

Post by RebelMarksman »

Thank You for your reply. I am now editing only стороны.Так how to build your own card doesn't yet understand. Tell me, how do I edit the halo, is it possible to do this in one of the programs to edit graphics ? Thank you in advance!
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: Change the color of the shot

Post by sereja2 »

No programs needed at all. If you can open your .odf file, you have text editor, and this is all you need. To change colour of the halo, you need change numbers "92 136 250 100". But for understanding what each of this numbers mean, you must have some paint editor, supported with RGB colour system. As I say before, I am using Paint Shop Pro 7, and dont know nothing about others. If you do not have paint editor, you can open zeroeditor, and press "color" in upper panel. In bottom appear "movers" with numbers. Use them, and choose color, what you like, remember the numbers, and tipe them in to your .odf file.
Led
Private Third Class
Posts: 54
Joined: Sat Sep 26, 2009 6:05 pm

Re: Change the color of the shot

Post by Led »

Here is a link to an online RGB color calculator. It may be useful to you:
http://drpeterjones.com/colorcalc/
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: Change the color of the shot

Post by RebelMarksman »

I have a few editors paint. As far as I understand, the first three "92 136 250 100" values are responsible for RGB colors. But fourth number ? Perhaps this is the luminosity ? Will be grateful for the answer. By the way, if you know, tell me where are the texture of the color of the shot ? For example bluelaser_d. In the folder SIDE/ALL/MSH I haven't found them.

Led thank you for the link, it's really useful site for the figures color.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Change the color of the shot

Post by AceMastermind »

The fourth value is the alpha (0-255)
Example:
LightColor = "R G B A"
=
LightColor = "92 136 250 150"

http://en.wikipedia.org/wiki/RGBA_color_space

bluelaser_d.tga is located here:
BFBuilder\Assets\Shipped Common Effects
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: Change the color of the shot

Post by RebelMarksman »

Thank You! With the change of halo I figured out. But how to compile a modified texture shot ? I changed the color of the texture of bluelaser_D and introduced the name of the texture in the odf file weapons. But when testing the battlefront it didn't make any changes.

Let me remind you, I change only sides and after the compilation, using only the file all.lvl
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: Change the color of the shot

Post by sereja2 »

Did you rename all your weapons .odf? You have to rename for example your rep_weap_inf_rifle_ord.odf to rep_weap_inf_rifle2_ord.odf. Then add this changings inside your rep_weap_inf_rifle.odf and rename it to rep_weap_inf_rifle2.odf. Then do the same with your rep_inf_trooper.odf. Don't forget finaly add all this changings inside your REQ files, and Mission LUA.
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: Change the color of the shot

Post by RebelMarksman »

Thank You. I don't quite understand how it can affect the compilation and the work of the texture. But will try. Another couple of questions.You are sure what need to rename ALL the odf files (including those which do not use this texture shot) ? And another question, if I kept a modified texture under a different name for example Bluelaser_2 (which would use only for the weapons which I change) do we need to do all of the above ? Thank you in advance.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: Change the color of the shot

Post by sereja2 »

Yes, I am sure you have to rename all your .odf, and laser texture. The sense of this renamings is next: when the game must munge your map, she mast choose which one of similar named files she must munge: your custom, or original. And she always choose original, as default. So, if you want make samthing new, you have to add new name for all ierarchy of your files.
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: Change the color of the shot

Post by RebelMarksman »

Unfortunately until haven't been able to change the texture of the shots in this way, because, after the change of the names of the soldiers in the lua files, they are not the locations. I decided this a change in the texture of which little is used orangelaser_d and the inclusion of its name in the configuration file.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: Change the color of the shot

Post by sereja2 »

Not sure, what you talking about: "they are not the locations". You mean, they are not appear at locations, or they are not localized?
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: Change the color of the shot

Post by RebelMarksman »

Apologize for bad English. I meant that soldiers whose name was modified are not loaded in the maps.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: Change the color of the shot

Post by sereja2 »

Possible reason: you forget add changed soldier name in REQ files or Mission LUA.

Here quick sample of lines to Mission LUA:

Code: Select all

ReadDataFile("dc:SIDE\\rebels.lvl", "all_inf_troopers");
next lines:

Code: Select all

AddUnitClass(ALL, "all_inf_trooper",10)
AddUnitClass(ALL, "all_inf_officer",2)
AddUnitClass(ALL, "all_inf_marksman2",1)
AddUnitClass(ALL, "all_inf_pilot2",2)
AddUnitClass(ALL, "all_droid_R2D23",1)
SetHeroClass(ALL, "all_inf_lukeskywalker2")
Here sample of lines to all_inf_troopers REQ:

Code: Select all

ucft
{
	REQN
	{
		"lvl"
		"all_inf_trooper"
		"all_inf_marksman2"
		"all_inf_pilot2"	
		"all_inf_lukeskywalker2"	
		"all_droid_R2D23"		
		"all_inf_officer"
	}
}
Here sample of lines to rebels REQ:

Code: Select all

ucft
{
	REQN
	{
		"lvl"
		"all_inf_troopers"
	}
    REQN
    {
        "model"
       "imp_1st_officer2"
    }
}
User avatar
RebelMarksman
Private Third Class
Posts: 55
Joined: Sun Feb 12, 2012 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 1
xbox live or psn: No gamertag set

Re: Change the color of the shot

Post by RebelMarksman »

Yes, really - I don't add new names to the req files. I did not understand-to-use tools BFBuilder for this purpose. Instead of them I use BattleBelkToolbox, Mission.lvl Builder tools. Could you tell me where to write the names of the soldiers except scripts/name location/lua ? Perhaps in a folder munged in the script and lvl files ?

Or the path to the files that i need to change the standard instruments. Thank You in advance.
sereja2
Command Sergeant Major
Command Sergeant Major
Posts: 253
Joined: Wed Aug 31, 2011 4:22 am
Projects :: Naboo Otoh Gunga
Games I'm Playing :: swbf 1
xbox live or psn: No gamertag set
Location: Ukraine

Re: Change the color of the shot

Post by sereja2 »

You can find rebels.REQ (name from sample) at next directory:
DataYourID/Sides/rebels (name from sample)
and all_inf_troopers.REQ (name from sample) at next directory:
DataYourID/Sides/rebels/REQ (name from sample).
You can edit REQ files, just like .odf, or Mission LUA with text editor.
Post Reply