daid / EmptyEpsilon

Open source bridge simulator. Build with the SeriousProton engine.
https://daid.github.io/EmptyEpsilon/
GNU General Public License v2.0
520 stars 173 forks source link

Spawn ships utility #2030

Closed Xansta closed 2 months ago

Xansta commented 8 months ago

Spawn ships utility features

The relative strength fleets create a fleet whose strength is measured relative to the player ships present. The default ratio is 1:1, but that can be configured: 1/4:1, 1/2:1, 1:1, 2:1, 3:1, 4:1, 5:1, 6:1, 7:1, 8:1. If a fleet that is eight times as strong as the players is insufficient, you can switch to a fixed strength fleet and set fixed values from between 50 and 2000 in increments of 50. The default fixed fleet strength is 250.

Configuration options for relative strength and fixed strength fleets

Configuration options for formation fleets

When spawning the formation, first specify the center of the formation with a click, then specify the target of the formation fleet.

How to use this utility is documented in the comments of the utility, but is also included here. First, you need to require the utility:

require("spawn_ships_scenario_utility.lua")

Then, you need a function named mainGMButtons called from init:

function init()
    mainGMButtons()
end
function mainGMButtons()
    clearGMFunctions()
    -- other GM functions can go here
    addGMFunction("+Spawn Ship(s)",spawnGMShips)
    -- other GM functions can go here
end