Mapname - Orange(purple) to white

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
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Mapname - Orange(purple) to white

Post by Aman/Pinguin »

RepSharpshooter and me just found out how to change the color of the Mod-Map names, maybe teancum or someone else already found it, but im going to post it anyways, maybe they didn't. :P
It's easy:

Just go to your addme.lua and change this line:

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1
to

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 0
and Voilà!

Image

(Take a look at Rhen Var)
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Mapname - Orange(purple) to white

Post by Teancum »

You can take the line out entirely actually.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Mapname - Orange(purple) to white

Post by Aman/Pinguin »

Ha! I knew it! You already knew how to do that! xD
wazmol
High General
High General
Posts: 892
Joined: Sat Sep 02, 2006 6:47 pm
Projects :: Thinking...
Games I'm Playing :: Black Ops
Location: London
Contact:

Re: Mapname - Orange(purple) to white

Post by wazmol »

thats actually pretty cool, for some reason i knew Tean' would know that, he always does lol. Plus he has been working with massive amounts of maps and addme.lua's.

Still not a bad find.
ryukaji
Major
Major
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Mapname - Orange(purple) to white

Post by ryukaji »

So you cant chose a color?
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Mapname - Orange(purple) to white

Post by MandeRek »

Good point! When is it orange our purple? and can you chose a color? That would be sweet :)
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Mapname - Orange(purple) to white

Post by Aman/Pinguin »

Orange is default, purple is because of Zerted's shell...maybe he knows?
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: Mapname - Orange(purple) to white

Post by [RDH]Zerted »

If I remember correctly, the shell's source code included with the mod tools didn't have any coloring for the maps. My first attempt at adding colors created the purple/white, then Teancum took that code and corrected it for orange and red. The uncompleted era shell does have supporting for setting your map to any color (if you've noticed the pictures my maps have been yellow, blue, and green), but a quick (and small) poll on random XFire uses came to the conclusion that letting everyone use their own colors might be a bad idea. I'm not going to remove the color support, but at the moment I'm keeping it as an undocumented feature.

I strongly recommend leaving in the isModLevel. Its used by the shell code to handle things differently for mod maps then from the retail maps. Currently, the preview videos use the 'is downloadable' variable, but I might be changing it to use isModLevel or something else.

Anything put in that table is readable by the shell and kept with the map. If anyone has any ideas for some useful variables to add, let me know. For example, the pack could use "isSWBF1Pack = 1", then there could be a button in the map selection screen to only show the pack's map. However, there is limited space in the map selection screen so it is unlikely I would make such a button (unless everyone wants it). Think of ideas similar like that.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Mapname - Orange(purple) to white

Post by Caleb1117 »

I was wondering how those +123 mod extra maps, where white.

Neat find.
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

Re: Mapname - Orange(purple) to white

Post by tnt_1992 »

help me with this it made my game crash so could you tall me what all i need to change or take out. :oops:
Fingerfood
Sith
Sith
Posts: 1262
Joined: Fri Nov 30, 2007 9:40 pm

Re: Mapname - Orange(purple) to white

Post by Fingerfood »

tnt_1992 wrote:help me with this it made my game crash so could you tall me what all i need to change or take out. :oops:
What exactly do you need help with? You go to whichever world you want white's data_***/addme/addme.lua and change the line

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1
to

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 0
Or take the whole line out altogether.
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

Re: Mapname - Orange(purple) to white

Post by tnt_1992 »

i did that and it is still orange
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Mapname - Orange(purple) to white

Post by woner11 »

Post your changes. :yes:
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

Re: Mapname - Orange(purple) to white

Post by tnt_1992 »

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 = 0, mapluafile = "DAN%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_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("DAN","DANg_con",4)
AddDownloadableContent("DAN","DANc_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\DAN\\data\\_LVL_PC\\core.lvl")

i changed sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1

to sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 0

but it was still orange so i took it out and it made the entire game chrash at the very first loading screen
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Mapname - Orange(purple) to white

Post by Aman/Pinguin »

What took you out? Don't take that whole line out, only this:

Code: Select all

isModLevel = 1
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Mapname - Orange(purple) to white

Post by FragMe! »

The simple answer to this (and also your crash topic whcih is asking the same thing), is put the original line back in and remunge the your map.

To quote Zerted
I strongly recommend leaving in the isModLevel. Its used by the shell code to handle things differently for mod maps then from the retail maps
.
Post Reply