Page 1 of 1

Changing the colour of your map name?

Posted: Fri Sep 25, 2009 6:23 am
by Recon Trooper
How do you change you map name colour? I've seen blue from the taris maps.

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 6:24 am
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.)

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 6:33 am
by Recon Trooper
Its still kinda weird, i made it red but all it does is crash bf2.

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 6:37 am
by mswf
At which point? When you start BF2 or when you click on it, when you start the map etc.

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 8:36 am
by kinetosimpetus
probably when it starts up, post the addme.lua please

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 9:45 am
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.

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 7:49 pm
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?

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 8:20 pm
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.

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 8:23 pm
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")

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 8:25 pm
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...

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 9:26 pm
by genaral_mitch
it's black right? so is the only thing wrong this: { ?

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 10:35 pm
by StarkillerMarek
No, I tried this and it turned white for some dumb reason. You had it at the beginning in the wrong place.

Re: Changing the colour of your map name?

Posted: Fri Sep 25, 2009 10:51 pm
by kinetosimpetus
255,255,255 is white, black would be 0,0,0

Re: Changing the colour of your map name?

Posted: Sat Sep 26, 2009 5:08 am
by mswf
(use paint to select a colour and the values are in the order of R, G, B)

Re: Changing the colour of your map name?

Posted: Sat Sep 26, 2009 11:27 am
by Fiodis
Also, 255 is max.

Re: Changing the colour of your map name?

Posted: Sat Sep 26, 2009 12:49 pm
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...

Re: Changing the colour of your map name?

Posted: Sat Sep 26, 2009 12:52 pm
by StarkillerMarek
Make sure to put a space between the "{" and "red".

Re: Changing the colour of your map name?

Posted: Sat Sep 26, 2009 2:35 pm
by Frisbeetarian
StarkillerMarek wrote:Make sure to put a space between the "{" and "red".
Unnecessary.

Re: Changing the colour of your map name?

Posted: Sat Sep 26, 2009 8:54 pm
by genaral_mitch
If it's unessesary, does it have to have no space?

Re: Changing the colour of your map name?

Posted: Sat Sep 26, 2009 9:48 pm
by kinetosimpetus
no, otherwise he would have said "incorrect"