Can you add different soldier class for a conquest side mod?

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
Recon Trooper
Command Sergeant Major
Command Sergeant Major
Posts: 285
Joined: Fri Sep 11, 2009 5:36 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: Muhamid Ant Farm ???
Contact:

Can you add different soldier class for a conquest side mod?

Post by Recon Trooper »

I know you can add extra class in maps, but what about the stock conquest side mods?
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: Can you add different soldier class for a conquest side mod?

Post by Teancum »

Not unless you modify mission.lvl, which breaks multiplayer compatibility when someone tries to go online and play. I don't recommend it. You can, however just add a new mode and do it that way.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Can you add different soldier class for a conquest side mod?

Post by Frisbeetarian »

Couldn't you just use the AddNewGameModes() command in a new addme script to just override the stock single player map?
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: Can you add different soldier class for a conquest side mod?

Post by Teancum »

Possibly, but you'd still run into multiplayer errors since a custom mode is overriding the original. The server would be running the original, but the client machine is running a modded version.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Can you add different soldier class for a conquest side mod?

Post by Frisbeetarian »

Without testing on my end, I can't completely understand how the AddNewGameModes() function works, and indeed might have been totally off in my previous post.

Regardless, one could also just include if statements that check for multiplayer and only changes the Lua if it's in single player.
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: Can you add different soldier class for a conquest side mod?

Post by [RDH]Zerted »

You can do it with v1.3's custom user scripts. You would still be able to join any server. However, if you hosted a server and spawned one of the extra units, all of the connected clients would crash as they didn't load that unit's data file. It would be easy enough to put a check into the user script that if you were the host of a MP game, it wouldn't read in the extra unit and thus there wouldn't be any risk of crashing the clients.

If you ever saw a server using the 'Spawn as Locals' user script, it does almost exactly that. It adds the local units as new units to the main teams. This allows the server to spawn any human as a local unit. Since the local units are already loaded by the mission, the clients don't crash.
Post Reply