Announcement

Collapse
No announcement yet.

Final Frontier Map Editing?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Final Frontier Map Editing?

    Is it possible to create my own maps for the Final Frontier mod? If so, what do I need to do differently from regular maps?
    Those who live by the sword...get shot by those who live by the gun.

  • #2
    Yes it is possible. You can create a World Builder Save just like with a normal game. However, in order to get specific planet types to show up in each Star System you have to tell the game to do so specifically with the Python code. Here's something I posted over at CFC in response to a similar question:

    Customizing what planets are what is done in the Python. As you've noted, the WB Save only stores the location of Star Systems, not their composition.

    A CvSystem object is not created automatically simply because there's a System feature placed on the map. These will need to be initialized manually with the CvFinalFrontierEvents.addSystem() function (probably in onGameStart()). You'll want to define a CvSystem object, then pass it into that function to add it to the game's array of Systems.

    To set up a Star System's planet you have to call the CvSystem.addPlanet() function (once you've made/acquired the Star System object you want to modify, of course). This is where you'll determine a planet's type, size, etc.

    If you want an example of how things are done, look at CvFinalFrontierEvents.onGameStart(), line 105. Here the game takes the map data and creates a CvSystem object for every System feature it finds. It then goes into CvSolarSystem.createRandomSystem(), where the System and planets are actually made.

    If you want to use a System later (unnecessary for map creation, but could be useful if you want to do other things), to look up a CvSystem there are a couple functions in CvFinalFrontierEvents.py that can be used. "getSystem" returns a CvSystem based on the ID of the system (good for looping through all the systems in the game). "getSystemAt" allows you to pass in an X and a Y to find a System at a particular plot (when you know one is already there).

    Let me know if you have any questions.

    Comment


    • #3
      Is it possible to just place a System and let the program randomly assign the planets to it?
      Those who live by the sword...get shot by those who live by the gun.

      Comment


      • #4
        Yes, you can do that in the World Builder without messing with any code. Just place Solar System features where you want them, save out the WB Save and when you load it again the program will randomly assign planets to it.

        Jon

        Comment

        Working...
        X