Changing the colour of your map name?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Recon Trooper
Command Sergeant Major
Command Sergeant Major
Posts: 285
Joined: Fri Sep 11, 2009 5:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Muhamid Ant Farm ???
Contact:

Changing the colour of your map name?

Post by Recon Trooper »

How do you change you map name colour? I've seen blue from the taris maps.
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Changing the colour of your map name?

Post by mswf »

It's in the documentation that came with the 1.3 patch. I can't tell you exactly where, since I haven't done it myself. (though blue is already used by BF0 and green by Dark Space, it's better to pick another one.)
Recon Trooper
Command Sergeant Major
Command Sergeant Major
Posts: 285
Joined: Fri Sep 11, 2009 5:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Muhamid Ant Farm ???
Contact:

Re: Changing the colour of your map name?

Post by Recon Trooper »

Its still kinda weird, i made it red but all it does is crash bf2.
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Changing the colour of your map name?

Post by mswf »

At which point? When you start BF2 or when you click on it, when you start the map etc.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Changing the colour of your map name?

Post by kinetosimpetus »

probably when it starts up, post the addme.lua please
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Changing the colour of your map name?

Post by [RDH]Zerted »

Yes, post the addme.lua and the debug log. If you don't know how to create the log, see the sticky FAQ topic. Also, I don't remember if I did it (I know I was thinking about doing it...), but the same color used for map selection might be banned from use as a standard map color.
Recon Trooper
Command Sergeant Major
Command Sergeant Major
Posts: 285
Joined: Fri Sep 11, 2009 5:36 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Muhamid Ant Farm ???
Contact:

Re: Changing the colour of your map name?

Post by Recon Trooper »

Hidden/Spoiler:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "DCF%s_%s", era_g = 1, mode_con_g = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("DCF","DCFg_con",4)
AddDownloadableContent("DCF","DCFc_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\DCF\\data\\_LVL_PC\\core.lvl")
Can someone edit it for me?
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Changing the colour of your map name?

Post by StarkillerMarek »

Yes, but it is so easy. Besides, the tutorial is in Program Files/Lucasarts/Star Wars Battlefront 2/Gamedata/v1.3 patch/docs/howtos, and is unimaginably easy to follow.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Changing the colour of your map name?

Post by genaral_mitch »

Ya, the same thing is happening to me. ill post my addme.lua.
Hidden/Spoiler:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = (red = 255, blue = 255, green = 255, { isModLevel = 1, mapluafile = "ACW%s_%s", era_c = 1, mode_assault_c = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("ACW","ACWc_Diet Dr. Pepper",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\ACW\\data\\_LVL_PC\\core.lvl")
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Changing the colour of your map name?

Post by StarkillerMarek »

You did not do it right, it should look like this { red = 255, green = 255, blue = 255, IsModLevel....
I'm not sure if thats the color you want though.

Edit: made a mistake with red, but it is fixed now...
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Changing the colour of your map name?

Post by genaral_mitch »

it's black right? so is the only thing wrong this: { ?
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Changing the colour of your map name?

Post by StarkillerMarek »

No, I tried this and it turned white for some dumb reason. You had it at the beginning in the wrong place.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Changing the colour of your map name?

Post by kinetosimpetus »

255,255,255 is white, black would be 0,0,0
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Changing the colour of your map name?

Post by mswf »

(use paint to select a colour and the values are in the order of R, G, B)
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Changing the colour of your map name?

Post by Fiodis »

Also, 255 is max.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Changing the colour of your map name?

Post by [RDH]Zerted »

sp_missionselect_listbox_contents[sp_n+1] = (red = 255, blue = 255, green = 255, { isModLevel = 1, mapluafile = "ACW%s_%s", era_c = 1, mode_assault_c = 1,}
should be
sp_missionselect_listbox_contents[sp_n+1] = {red = 255, blue = 255, green = 255, isModLevel = 1, mapluafile = "ACW%s_%s", era_c = 1, mode_assault_c = 1,}
The unclosed ( should have given you a munge error...
User avatar
StarkillerMarek
Rebel Colonel
Rebel Colonel
Posts: 611
Joined: Wed Aug 12, 2009 4:42 pm
Location: I may be back.

Re: Changing the colour of your map name?

Post by StarkillerMarek »

Make sure to put a space between the "{" and "red".
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Changing the colour of your map name?

Post by Frisbeetarian »

StarkillerMarek wrote:Make sure to put a space between the "{" and "red".
Unnecessary.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Changing the colour of your map name?

Post by genaral_mitch »

If it's unessesary, does it have to have no space?
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Changing the colour of your map name?

Post by kinetosimpetus »

no, otherwise he would have said "incorrect"
Post Reply