Hello Folks,
Today I had some fun implementing a method of specifying custom galaxy setups. In the old method, I only let you specify player home worlds. In this new method you have to specify every single star.
My plans are to use this same function to build a map editor. I might do it open source so some of you can help.
Here is the help file I wrote for the feature. Will be available to try as soon as Proteus is out!
You must proved a properly formatted JSON string, that contains an array of stars.
When you use this method to specify the starting Galaxy, all other Galaxy customisation options are ignored.
Each Star must provide the following properties
- uid - a unique integer > 0
- name - the stars name
- x - x pos
- y - y pos
- r - resource value (5-60)
- g - warpgate (0 or 1)
- e - pre-built economy
- i - pre-built economy
- s - pre-built economy
- st - pre-built ship strength
- puid - the uid of the owning player (optional)
- wh - the uid of a wormhole connection (optional)
Scale is 0.0625 / light year. Players will be able to jump 0.25 units at the start of the game. Range tech 3, 4 light years.
Each player in the game needs be be provided with at least one star, and when creating the game to run your custom galaxy, you must select the same number of players as you have built the custom galaxy for.
Below is a sample galaxy of 4 stars for 2 players
{"stars":[{"uid": 4, "name": "Star 0", "x": 0.25, "y": 0.25, "r": 50, "g": 0, "e": 3, "i": 2, "s": 1, "st": 100, "puid": 6, "wh": 1}, {"uid": 1, "name": "Star 1", "x": 0.25, "y": -0.25, "r": 50, "g": 0, "e": 3, "i": 2, "s": 1, "st": 50, "puid": 1}, {"uid": 2, "name": "Star 2", "x": -0.25, "y": -0.25, "r": 20, "g": 0, "e": 0, "i": 0, "s": 0, "st": 0}, {"uid": 3, "name": "Star 3", "x": -0.25, "y": 0.25, "r": 20, "g": 0, "e": 0, "i": 0, "s": 0, "st": 0, "puid": 0}]}
Note: Hand writing JSON strings can be difficult, and the game doesnāt provide any feedback about what might be wrong with your JSON so its best to use machine generated JSON.