Page 1 of 1

Mapname - Orange(purple) to white

Posted: Fri Apr 11, 2008 9:48 am
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)

Re: Mapname - Orange(purple) to white

Posted: Fri Apr 11, 2008 1:52 pm
by Teancum
You can take the line out entirely actually.

Re: Mapname - Orange(purple) to white

Posted: Fri Apr 11, 2008 1:59 pm
by Aman/Pinguin
Ha! I knew it! You already knew how to do that! xD

Re: Mapname - Orange(purple) to white

Posted: Fri Apr 11, 2008 2:04 pm
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.

Re: Mapname - Orange(purple) to white

Posted: Fri Apr 11, 2008 5:51 pm
by ryukaji
So you cant chose a color?

Re: Mapname - Orange(purple) to white

Posted: Fri Apr 11, 2008 5:59 pm
by MandeRek
Good point! When is it orange our purple? and can you chose a color? That would be sweet :)

Re: Mapname - Orange(purple) to white

Posted: Fri Apr 11, 2008 6:21 pm
by Aman/Pinguin
Orange is default, purple is because of Zerted's shell...maybe he knows?

Re: Mapname - Orange(purple) to white

Posted: Sat Apr 12, 2008 2:47 pm
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.

Re: Mapname - Orange(purple) to white

Posted: Sun Apr 13, 2008 7:12 am
by Caleb1117
I was wondering how those +123 mod extra maps, where white.

Neat find.

Re: Mapname - Orange(purple) to white

Posted: Mon Apr 14, 2008 10:51 pm
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:

Re: Mapname - Orange(purple) to white

Posted: Mon Apr 14, 2008 11:16 pm
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.

Re: Mapname - Orange(purple) to white

Posted: Mon Apr 14, 2008 11:28 pm
by tnt_1992
i did that and it is still orange

Re: Mapname - Orange(purple) to white

Posted: Mon Apr 14, 2008 11:40 pm
by woner11
Post your changes. :yes:

Re: Mapname - Orange(purple) to white

Posted: Mon Apr 14, 2008 11:51 pm
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

Re: Mapname - Orange(purple) to white

Posted: Tue Apr 15, 2008 8:20 am
by Aman/Pinguin
What took you out? Don't take that whole line out, only this:

Code: Select all

isModLevel = 1

Re: Mapname - Orange(purple) to white

Posted: Tue Apr 15, 2008 8:22 am
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
.