[REL] Shared Systems for galactic war 1.2.4

Discussion in 'Released Mods' started by wondible, March 19, 2016.

  1. Quitch

    Quitch Post Master General

    Messages:
    5,496
    Likes Received:
    6,021
    Thanks for the fix, wondible. I think your GWAIO copy wasn't updated, which is why you couldn't find the stuff you were looking for. Both Bang Battle and isExplicit are defined within the mod. Certainly the systems.js file you were looking at at one point was not the current copy.

    While watching you work I thought of a couple of nice-to-have features for the mod, one of which allows the use of GW maps, while the other brings back the GW system size scaling.

    Feature Request 1 - Support for the Galactic War maps


    Currently you choose between Shared Systems or the GW maps, you can't have both.

    GW maps are currently defined in pa-easy.js, pa-normal.js, titans-easy.js, and titans-normal.js. Each file divides the systems into objects (2 for easy and 4 for normal) within an array, and currently only the first two objects of each array are used by the base game. I would define these groupings as small, medium, large, complex.

    Having 10 potential selections might be a bit much, so I'd suggest one of the following:
    1. Allow selection of each file in totality only - 4 selections
    2. Only use the normal files - 8 selections
    3. Only use the normal files, then treat them as two groups, normal systems & big systems (array objects 1 & 2, and 3 & 4).
    This would obviously also need a titans check against the API before trying to load titans content.

    Doing this would require support for fromRandomList.

    Feature Request 2 - Scale systems to distance

    Galactic War scales its maps according to distance. This is done by gw_galaxy.js through a function at the bottom of the file which returns the starGenerators array. It checks the Players array of its templates to see which groups of systems it should load. I would like SSGW to offer an option to enable this scaling in the handling of maps, placing them according to the number of players, where the system has a Players array (otherwise just scattering them randomly).

    I would recommend ignoring the vanilla formula for this. It manipulates the number such that the only possible outcomes are 2, 3, and 4, with the majority being 3. GWAIO meanwhile discards this and returns a number based purely on distance() through a shadow of gw_galaxy.js, as well as pa-normal.js and titans-normal.js to unlock the second half of each file's array.

    A key part of implementing this feature would be in deciding what you want scaling to mean, either through using the base game or GWAIO formula, or rolling your own. This would also need to decide how to use planets without a player count recommendation. Do they fill in the gaps when the desired size of system is unavailable? Do you simply take every system and chuck it in one big smallest to largest array and deploy them in order?

    Lot's of options.
    Last edited: August 15, 2020
  2. Quitch

    Quitch Post Master General

    Messages:
    5,496
    Likes Received:
    6,021
    The next release of GWAIO is going to break Shared Systems for Galactic War again, due to use of fromRandomList in the faction_cluster.js file. This isn't in the public release, but is available on the repo on the develop branch - https://github.com/Quitch/GW-AI-Overhaul

    EDIT: live as of 4.8.0
    Last edited: September 7, 2020
  3. wondible

    wondible Post Master General

    Messages:
    3,298
    Likes Received:
    2,089
    Shared Systems for Galactic War 1.2.3 - Partial support for fromRandomList, as used in Galactic War AI Overhaul
    Quitch likes this.
  4. wondible

    wondible Post Master General

    Messages:
    3,298
    Likes Received:
    2,089
    Shared Systems for Galactic War 1.2.4 - Add "Water World" to the list of broken systems

Share This Page