Editing shipped maps

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
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Editing shipped maps

Post by skelltor »

i changed corasants to have more units and munged but cant find the file i need to replace the default map file with and dont know where it would be. This is my first time modding luas so any help would be great cuz i know next to nothing about it
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: maps

Post by genaral_mitch »

Go to assets\Scripts\cor\cor_era_mode and copy that script to data_xxx\common\scripts\XXX and rename that to XXX_era_mode then you should follow the tutorial "how to edit a shipped map".
RogueKnight
Space Ranger
Posts: 2512
Joined: Sat Nov 22, 2008 1:50 pm
Projects :: Life. Work.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: Washington, US

Re: maps

Post by RogueKnight »

Also read the documentation on .lua that comes with the modtools.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

from what i read i need to make a new world for every map i want to change right??
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Editing shipped maps

Post by genaral_mitch »

Yes.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

so let me c if i got this right make a new world then copy and past the default world instead of the new one how do i make it over write the one in the root of battle front 2??
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Editing shipped maps

Post by genaral_mitch »

In your .lua, which is the one you got from Coruscant but is now called ???c_con, scroll down past the memory pools and find this bit:

Code: Select all

ReadDataFile("cor\\cor1.lvl", "cor1_conquest")
and change it to

Code: Select all

    ReadDataFile("dc:???\\cor1.lvl", "cor1_conquest")
Then, it will work.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

um i tried editing dagobas lua i think i did every thing i am supossed to do but when i play it nothing is changed
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Editing shipped maps

Post by AQT »

Obviously you did something wrong. Describe the steps you went through and be specific. Also please type legibly. By not doing so, you are actually breaking the second site rule.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

oh sorry i dont have a spell check but i will try harder i made a new map abc i renamed the world 1 folder world 2 i copied the odf msh effects and world 1 from assests worlds dag i opened the bfx assests dag scripts opened the luas and copy and pasted them in abc/common/scripts/abc into the right lua i edited one of them to have a different hero did the dc: thing saved it then closed the folder munged it copied and replaced the dag/dag1 file with the one in data_abc/lvl_pc/abc i opened bf2modtools and ran both clone wars and bfx clone wars but no changes where made
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Editing shipped maps

Post by genaral_mitch »

genaral_mitch wrote:In your .lua, which is the one you got from Coruscant but is now called ???c_con, scroll down past the memory pools and find this bit:

Code: Select all

ReadDataFile("cor\\cor1.lvl", "cor1_conquest")
and change it to

Code: Select all

    ReadDataFile("dc:???\\cor1.lvl", "cor1_conquest")
Then, it will work.
You may have forgotten the dc.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

this is there will it work ? ReadDataFile("dc:ABC\\dag1.lvl", "dag1_conquest", "dag1_cw")
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Editing shipped maps

Post by genaral_mitch »

If that is indeed your problem.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

i mean is that the right line that should be there?
Coley
Sergeant Major
Sergeant Major
Posts: 249
Joined: Sun Aug 09, 2009 11:27 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: Germany

Re: Editing shipped maps

Post by Coley »

Did you read the thread in the faq exactly? I think there is everything to find you need to know about this topic.

EDIT
yes I think so but read above
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

ok so what i am doing is modding the lua on shipped maps but when i open battle front i get a ctd right after you see mustafar in the loding thing i used skys tutorial here http://www.gametoast.com/forums/viewtop ... 27&t=16616 would it help if i posted the lua and add me?
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Editing shipped maps

Post by genaral_mitch »

After looking in the era mod thread, I found your problem. You messed up your Addme.lua!!!! Either get an addme from a different map and change everything of that has a 3-letter name to your 3-letter name, or delete the map
Good thing you linked me to this :funny2:

EDIT: Oh, no what is this? Satan For A day?
Last edited by genaral_mitch on Tue Feb 16, 2010 7:59 pm, edited 1 time in total.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

lol :funny2: well u were trying to help :D

idk what to change here is the error log sev 3

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaScript.cpp(435)
Script file addme not found

here is the addme
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 = "XXX%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, mode_eli_g = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

--add my modes to the singleplayer map selection screen

AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_* = 1, mode_con_* = 1,} )

AddNewGameModes( mp_missionselect_listbox_contents, "myg1%s_%s", {era_* = 1, mode_con_* = 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("XXX","XXXg_con",4)
AddDownloadableContent("XXX","XXXc_con",4)
AddDownloadableContent("XXX","XXXg_eli",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\XXX\\data\\_LVL_PC\\core.lvl")
help please
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Editing shipped maps

Post by genaral_mitch »

Try a manual clean, it could help. By the way, is your map name XXX? It would help a little if you sent the real one your using.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Editing shipped maps

Post by skelltor »

yes it is xxx i made it that way to avoid any confusion on my part
Post Reply