Changing map title and description

Started by CrazyGentleman, January 23, 2017, 12:37:32 AM

Previous topic - Next topic
Hello,

I have recently been working on a map, but I would like to change the map title and description. How is this done? Is there also an easy way to change the 3 letters without creating a completely new map and copying that over?

Thanks in advance,

CrazyGentleman
"The truth is of highest importance, and only with the truth can one move forward."

I'm not sure how to change it in Battlefront 2 but in Battlefront 1 the map name is changed in "addme.lua".

Find "local newEntry" and change "showstr = "MOD MAP 1"" to your new map name.



So I tried what you suggested, but apparently the addme.lua looks like an automatic script of some sorts. Not sure if I'm suppose to fiddle with that. Also couldn't find "local newEntry" in the file.
"The truth is of highest importance, and only with the truth can one move forward."

January 26, 2017, 09:31:39 AM #3 Last Edit: January 26, 2017, 09:34:30 AM by swgaming1015
Are you looking in the right addme.lua? The path should be: DataModName/addme/addme.lua

Use a program like Notepad ++ to open it and you should see the line:

local newEntry = { mapluafile = "MOD", showstr = "ModName", side_c = 1, side_a = 1, dnldable = 1, }

If you change the "mapluafile = "MOD", showstr = "ModName"" names and munge you should see the results in game. Just to be clear, this is for Battlefront 1. I'm not sure if this works for Battlefront 2.

I think he is trying to change the name of already munged map.Munged maps have also addme.script file which is different from addme.lua due the fact they are already munged.

Quote from: Ginev on February 05, 2017, 01:40:22 AM
I think he is trying to change the name of already munged map.Munged maps have also addme.script file which is different from addme.lua due the fact they are already munged.

No, apologies for not being clear enough. I made my own map, and I'm just trying to change it's map name and description and I'm possibly blind I can't find it. Here's the addme.lua content:

--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 = "HCW%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("HCW","HCWg_con",4)
AddDownloadableContent("HCW","HCWc_con",4)

-- all done
newEntry = nil
n = nil

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


I really can't figure this out.

Thanks in advance,

CrazyGentleman
"The truth is of highest importance, and only with the truth can one move forward."

It looks like your three letter name is HCW.  (see end of file). 

It may not be really easy to change it without making a new map, because I believe that this shows up in a lot of paths and req files.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet