Page 1 of 1
Can you add different soldier class for a conquest side mod?
Posted: Mon Oct 12, 2009 4:31 am
by Recon Trooper
I know you can add extra class in maps, but what about the stock conquest side mods?
Re: Can you add different soldier class for a conquest side mod?
Posted: Mon Oct 12, 2009 9:53 am
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.
Re: Can you add different soldier class for a conquest side mod?
Posted: Mon Oct 12, 2009 11:32 am
by Frisbeetarian
Couldn't you just use the AddNewGameModes() command in a new addme script to just override the stock single player map?
Re: Can you add different soldier class for a conquest side mod?
Posted: Mon Oct 12, 2009 1:33 pm
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.
Re: Can you add different soldier class for a conquest side mod?
Posted: Mon Oct 12, 2009 2:03 pm
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.
Re: Can you add different soldier class for a conquest side mod?
Posted: Mon Oct 12, 2009 3:31 pm
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.