Converting campaign to conquest for dedicated server manager

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
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Converting campaign to conquest for dedicated server manager

Post by AnthonyBF2 »

At the time I can setup about 7 or 8 campaign levels that work fully functional on the dedicated server (black bag ops server, not in-game dedicated)

Now, while it is fun to play those, I want to change the general gameplay regular campaign into simple conquest.

I can remove all the objective script lua, codes, etc. So it loads only an empty map, with all the objects used for that level.

I want to ask if anyone can slap some code together where if all the CPs are detected under 1 team's ownership, the map will end. It doesn't have to say victory or defeat for what ever team, map should just end.

On Coruscant Knightfall there are 6 visible CPs, if all belong to 1 team that is when map will end.

I can't just add the conquest scripting (etc AddCommandpost) because this will not match the player's data who joins.
How ever I can add regular scripts in dedicated server sided, and they work for anyone who join(been using Zerted's teleport code for a while)

Thanks.
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: Converting campaign to conquest for dedicated server man

Post by [RDH]Zerted »

You want something like (not real code):

Code: Select all

OnCommandPostCapture(
    function(cp)
        if GetObjectTeam(cp1) == 1 and GetObjectTeam(cp2) == 1 and GetObjectTeam(cp3) == 1 then
            MissionVictory({1})
        end
    end
)
I forget if it's MissionVictory(1), MissionVictory{1}, or MissionVictory({1}). All are valid Lua code. Look in one of the objective scripts to see which one they use.
Post Reply