Games 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
yukisuna
Rebel Sergeant
Rebel Sergeant
Posts: 210
Joined: Wed Jan 28, 2009 5:50 am
Projects :: My new PC hates the Mod Tools
Games I'm Playing :: See Interests
xbox live or psn: Samura Yukisuna
Location: Stuck in a place full of happy happiness known as Steam.

Games Maps?

Post by yukisuna »

is it possible to use a shipped .lua file to make side-mods? (not making a new map, so the mission.lvl uses the games map's?


EDIT: 3# i were thinking mostly of mygeeto, but also about if it works... and what i meant with "mission.lvl uses the games map's" were if i could just make a mission.lvl that can replace the game's mission.lvl!
Last edited by yukisuna on Sat Jun 06, 2009 8:20 am, edited 1 time in total.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Games Maps?

Post by 501st_commander »

maybe,
but you will have to have all the sides they have or replace them with your own.
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: Games Maps?

Post by Teancum »

So basically you want to make a "map" that uses the shipped map, but your sides? Yeah, that's totally possible. I'm not at home now, but if I get a chance (packing for a big move this week) I'll try and help. It really only involves a few minor changes. What map are you wanting to use?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Games Maps?

Post by Frisbeetarian »

If you look at the top of every single addme.lua, you'll notice a function mentioned and described called AddNewGameModes. You use this function to tell the game to open up a slot an a preexisting map and then with the AddDownloadableContent function, you assign whatever your script name is to the map you wish it to be on. If you don't do the first part and only do the second, then a duplicate map will show up.

For example, I can create a new world called ABC. In data_ABC, I find the script ABCg_con.lua. Here, to make sure that things like death regions are included, copy the contents of the Lua file for whichever map and game mode you are trying to replicate into your Lua file. For example, copying Kamino, I take kam1g_con.lua, copy everything inside, and paste it on top of everything in ABCg_con.lua, deleting the original contents of ABCg_con.lua. Now I change the sides to whatever I want them to be in the Lua script. The last thing to change is the addme.lua which should look like this:

Code: Select all

AddNewGameModes(sp_missionselect_listbox_contents, "nab1%s_%s", {era_g = 1, mode_con2_g = 1})
AddNewGameModes(mp_missionselect_listbox_contents, "nab2%s_%s",	{era_g = 1, mode_con2_g = 1})

AddDownloadableContent("KAM1","ABCg_con",4)
This adds the mode to both single player and multi player. Notice I used the mode name "con2" since I don't want to overwrite (would it overwrite the original?) the original game mode. Now "con2" doesn't exist as a mode, so you'll want to make it a mode that does exist, or see Zerted's documentation for the 1.3 patch to make your own mode.

Mind you, I haven't checked this myself to make sure it works, but I'm fairly sure it's correct and not at my modding computer for the moment. If you're wondering, it's the same process that ARC_commander used to create BFX and if you care to search the site, you'll find his addme.lua posted somewhere.
Post Reply