This is Lua game mod for Forged Alliance Forever Galactic War
- Galactic War client - A FAF client capable of communicating with this server. Provides galaxy editor, testing and playing the Galactic War.
- Galactic War server - A Node.js WebSocket server for managing the universe state, core logic and set up games.
The game is set up by a very similar way as a ladder game. It doesn't open the normal game lobby where players could change anything, instead just shows the "Setting up Automatch" screen and everything happens in the background. Once all players are connected, the game starts.
This is the list of files for the GW mod to work. They need to be downloaded from the server into the correct folders:
init_gw.luaInit file of the mod placed in\binfolder.gw_mod.gwThe actual mod, placed in the\gamedatafolder. All folders and files from this repo packed into a.zipfile and renamed to.gw. The file extension is used by the init file to load only the files we need for the GW.gw_reinforcements.gwA Lua file with the in-game unit reinforcements that will be generated before every game. Again packed into.zipand renamed, placed in the\gamedatafolder. I will specify later what structure it needs to work...gw_scenario.gwGenerated maps's_scenario.luafile to be hooked for the reinforcements functionality. SeeEXAMPLE_MAP_scenario.lua.
To properly set up a GW game, several command line arguments needs to be provided at the game start by the FAF client.
- Common
/init init_gw.luaThe init file for the GW mod, in the\binfolder of the FAF game patch./players numberTotal number of players required to launch the game.
- Per player
/faction numberFaction of the player. Example:/faction 0for UEF./team numberNumber of the team, the player belong to./rank numberGW Rank of the player./startspot numberStarting position of the player.
The game uses the standard GPGNetSend() protocol to send information back to the server. It's used to imform about players dying, reinforcements being used, game end, etc...
GpgNetSend('UnitGroupCalled', armyIndex, groupId)When a group of units from the reinforcements is used.GpgNetSend('CommanderKilled', armyIndex, instigatorArmyIndex)When a commander is killed.GpgNetSend('GameResult', armyIndex, result)Army brain reporting a result. GW adds two new result typesrecallandautorecall. Example:GpgNetSend('GameResult', 1, 'recall -10').
Currently a very crude way for testing:
- Init file to load this mod with in-game unit reinforcements file.
- Edited map scenario.lua file that adds support armies.
ExtraArmies = "SUPPORT_1 SUPPORT_2"