Creating a new era or mode....

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
[SBF]ATATFIGHTR
Chief Warrant Officer
Chief Warrant Officer
Posts: 338
Joined: Sun Mar 12, 2006 12:22 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: The US, in the state of UTAH

Creating a new era or mode....

Post by [SBF]ATATFIGHTR »

Hey, I need to know....

Is it possible to create a new era alond with GCW and CW?

How do you create a custom mode for a map?
User avatar
authraw
1st Lieutenant
1st Lieutenant
Posts: 445
Joined: Mon Jun 26, 2006 3:45 pm

Re: Creating a new era or mode....

Post by authraw »

I don't know if you can create new eras, but check the ZeroEditor_GameModes.doc (in BF2_Modtools/documentation) for a tutorial on how to add new game modes.
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: Creating a new era or mode....

Post by [RDH]Zerted »

You can create a new era if you want to mess around with the shell code. Bf1 pack's shell has a bunch of new game modes. If you want to use one of those, just add the mode to your map like you would a regular mode.
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: Creating a new era or mode....

Post by MandeRek »

[RDH]Zerted wrote:You can create a new era if you want to mess around with the shell code. Bf1 pack's shell has a bunch of new game modes. If you want to use one of those, just add the mode to your map like you would a regular mode.

Just add the mode? Are the assets of them?
User avatar
authraw
1st Lieutenant
1st Lieutenant
Posts: 445
Joined: Mon Jun 26, 2006 3:45 pm

Re: Creating a new era or mode....

Post by authraw »

[RDH]Zerted wrote:You can create a new era if you want to mess around with the shell code.
So, wait, you can create new eras? Can that be shipped with a map, or would you have to replace some game files to do that?

Why has nobody implemented a KOTOR era yet?
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: Creating a new era or mode....

Post by Teancum »

Yeah, look in /shell/scripts. Everything you need to create a new era is in there. Zerted and I worked on it for awhile, but in the end we (or at least I) didn't think it was worth the research.
User avatar
authraw
1st Lieutenant
1st Lieutenant
Posts: 445
Joined: Mon Jun 26, 2006 3:45 pm

Re: Creating a new era or mode....

Post by authraw »

Say, it wouldn't be so easy as just modifying this function from ifs_missionselect.lua, would it?

Code: Select all

-- Helper function. For a destination item (previously created w/
-- CreateItem), fills it in with data, which may be nil (==blank it)
function MissionSelectListboxR_PopulateItem(Dest,Data)
	if(Data) then
		local DisplayUStr,iSource = missionlist_GetLocalizedMapName(Data.Map)
		IFText_fnSetUString(Dest.map,DisplayUStr)

		-- set the icon texture
		if (Data.SideChar == "g") then
			IFImage_fnSetTexture(Dest.icon1,"imp_icon")
			IFImage_fnSetTexture(Dest.icon2,"all_icon")
			IFObj_fnSetVis(Dest.icon1,1)
			IFObj_fnSetVis(Dest.icon2,1)
		elseif (Data.SideChar == "c") then
			IFImage_fnSetTexture(Dest.icon1,"rep_icon")
			IFImage_fnSetTexture(Dest.icon2,"cis_icon")
			IFObj_fnSetVis(Dest.icon1,1)
			IFObj_fnSetVis(Dest.icon2,1)
		elseif (Data.SideChar == "k") then --I, authraw, added this section
			IFImage_fnSetTexture(Dest.icon1,"oldrep_icon")
			IFImage_fnSetTexture(Dest.icon2,"sith_icon")
			IFObj_fnSetVis(Dest.icon1,1)
			IFObj_fnSetVis(Dest.icon2,1)
		else
			IFObj_fnSetVis(Dest.icon1,nil)
			IFObj_fnSetVis(Dest.icon2,nil)
		end		
	end

	-- Turn on/off depending on whether data's there or not
	IFObj_fnSetVis(Dest,Data)
end
There has to be more to it than that, right?

EDIT: Oh, wait--it looks like missionlist.lua is going to need extensive editing, too. :shock: I'll have to look at it more some other time.
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: Creating a new era or mode....

Post by MandeRek »

You also have to load the new modes, like ABCa_con (where a stands for authraw era)

OffTopic; if you get this working there might be a new era called after you :P
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: Creating a new era or mode....

Post by [RDH]Zerted »

You have to change the era check in a lot more places than that. Everywhere something is done with an era, the check is hard coded to 'c' or 'g'. I don't have close to enough time to go through and replace all those checks. I haven't even gotten the next FakeConsole out yet, and I've been on/off that for the past half a year.

If you are going to spend the time to add another era, you might as well make another Lua with the functions to do the check. Point all the game's era checks to that Lua. Make the functions in that Lua generalized. Doing this would allow you to use any era (any single character). Theres no point in just hard coding in one more era when you can dynamically do them all.

You can always create a new mode/era and load that map through the command line or admin commands, but if you want it displayed in the map selection menu you have to edit the shell.
User avatar
authraw
1st Lieutenant
1st Lieutenant
Posts: 445
Joined: Mon Jun 26, 2006 3:45 pm

Re: Creating a new era or mode....

Post by authraw »

If I were to make a bunch of modifications to the shell, could I include that in my map's folder? It sounds like I would have to replace game files...

If I replaced game files, a modification to the shell would end up being incompatible with the Conversion Pack, wouldn't it?
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: Creating a new era or mode....

Post by MandeRek »

Yes i think it would... Note that I'm only M'Rek and that i was not involved in the Convo Pack (why god isn't my name on that credits list?)
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Creating a new era or mode....

Post by DarthD.U.C.K. »

the convo pack will still work, if you edit the convopacks lvls
Post Reply