ENDLESS™ Space is a turn-based 4X strategy game, covering the space colonization age in the ENDLESS™ Universe. You control every aspect of your civilization as you strive for galactic dominion.
But as was recently posted by a developer, they've changed some stuff so that galaxy generator mods don't work anymore. They were going to fix it, but only after Gamescom.
davea wrote: That seems way too complicated. What I did is only about 30 lines of code. For each player, start a list of adjacent systems. Visit all the systems on the adjacent list and compute the new distance from home. If the system hasn't been visited before, or the new distance is less, update the system with the new distance and add all its neighbors to the adjacent list. Repeat five times (stop after going 5 string jumps).
Now each system, has a list of the distance from each player. For each system, assign the point value of the system to the player who is closest, or assign part of the point value to multiple players in case of a near tie.
I want to calculate the minimum distance from a system to a player, your algorithm will not calculate the minimum distance in all cases. And I think now that a better criterium for stopping is the distance from the home planet, not the amount of jumps.
The last part of my post is just saving the results of this calculation so that they can be reused quickly and efficiently.
I don't want to debate too much about algorithms, we agree the goal is to calculate the minimum distance. My algorithm updates the distance whenever it finds a new minimum and re-analyzes the adjacent systems. As far as I know this is the optimal approach.
I can now calculate the scores of each player, but I'm wondering how to calculate if the map is imbalanced. I was thinking of using the standard deviation as a measure. Do you have any other ideas?
Edit: Standard deviation is implemented, now the balancing can decide if a galaxy is 'imbalanced'. If the galaxy is imbalanced however an Exception is thrown in the subsequent calls (outside of my code). So this should be fixed next.
I recommend to definitely eliminate galaxies where a player can only reach 3 planets or less due to small constellation size, regardless of any deviation.
For my implementation, I arbitrarily chose a fixed point threshold as "too weak" after reviewing some sample systems. I chose 50 points by my scale. Standard deviation sounds reasonable too; the only drawback is if every player's system is very poor, then standard deviation will "pass" and all the players will ragequit.
davea wrote: I recommend to definitely eliminate galaxies where a player can only reach 3 planets or less due to small constellation size, regardless of any deviation.
For my implementation, I arbitrarily chose a fixed point threshold as "too weak" after reviewing some sample systems. I chose 50 points by my scale. Standard deviation sounds reasonable too; the only drawback is if every player's system is very poor, then standard deviation will "pass" and all the players will ragequit.
1. What if these 3 systems are really good (tier 1 planets)? I wouldn't mind that.
2. If all players have a very poor start then the game is equal right? If they know the galaxy is balanced then they will know that other players are having the same difficulties.
One of the original examples that got the discussion going was a single planet constellation, that is, the only connections to the home planet were through wormholes. I think most players would ragequit on a one or two planet constellation, even if it was positively loaded with huge jungles. Three great systems is arguable. Maybe those would show up as low point values anyway, but I think some term for "tiny constellation" should be there.
davea wrote: One of the original examples that got the discussion going was a single planet constellation, that is, the only connections to the home planet were through wormholes. I think most players would ragequit on a one or two planet constellation, even if it was positively loaded with huge jungles. Three great systems is arguable. Maybe those would show up as low point values anyway, but I think some term for "tiny constellation" should be there.
I don't know why you would quit with a low system count. Less high scoring systems is usually better than many lower scoring systems.
I now integrated my scoring system with the galaxy generator and it now regenerates the galaxy with a new seed. When generating 10 galaxies of medium size this took 50538 milliseconds. Thus we can average this out to 5 seconds per galaxy. I think this is a reasonable number. Testing is required though, so I'm trying to get the generator work again with Endless Space, which isn't going well at the moment (see /#/endless-space/forum/37-modding/thread/15871-galaxy-generator-explained).
When I get it to work I will appreciate it if some people could do some test runs and give me feedback on if the generated galaxies are balanced.
That seems way too complicated. What I did is only about 30 lines of code. For each player, start a list of adjacent systems. Visit all the systems on the adjacent list and compute the new distance from home. If the system hasn't been visited before, or the new distance is less, update the system with the new distance and add all its neighbors to the adjacent list. Repeat five times (stop after going 5 string jumps).
Now each system, has a list of the distance from each player. For each system, assign the point value of the system to the player who is closest, or assign part of the point value to multiple players in case of a near tie.
I am immensely interested in this. I just took a 2 month break from ES because of my failed attempt at doing something similar to this (I'm not as dedicated a modder as you, to say the least!) and so I really hope this succeeds.
Just a question, though- how are point values for the balancing assigned? Some factions may take advantage of planets that are considered "poorer" moreso than others. For example, I created a faction using the point system that can, from the start of the game, settle any planet at only 25% FIDS cost. As well, they have the Sower bonus and a great deal of production bonuses and approval bonuses. As such, Lava planets would be ideal. Does this take that into account, somehow?
zetal911 wrote: I am immensely interested in this. I just took a 2 month break from ES because of my failed attempt at doing something similar to this (I'm not as dedicated a modder as you, to say the least!) and so I really hope this succeeds.
Just a question, though- how are point values for the balancing assigned? Some factions may take advantage of planets that are considered "poorer" moreso than others. For example, I created a faction using the point system that can, from the start of the game, settle any planet at only 25% FIDS cost. As well, they have the Sower bonus and a great deal of production bonuses and approval bonuses. As such, Lava planets would be ideal. Does this take that into account, somehow?
No, it does not at this moment. It could be implemented ofcourse, but I would like to have a basic working version to extend further ready first.
To implement this feature, there will have to be a bit of code that would change the value of a planet according to the race. Which is possible when you manually enter these values for each race. However, automatically generating the values will be tough if not too hard at the moment, because there is no reasonably simple extraction method of race abilities.
Oh agreed, getting the basic system up and running should definitely take precedence- but I don't think it hurts to plan ahead! Rather than doing it based on Race, I think it would be much more flexible to do it based on what attributes a race possesses, but from what you said it sounds like there isn't a way to check that? =( That...really stinks!
Well I think you have access to the GalaxyConfiguration.xml file in which the following could be defined:
[code]
GalaxyDisk
GalaxySizeMedium
4
BalancedAverage
GalaxyAgeNormal
GalaxyDensityHigh
StarConnectivityAverage
ConstellationNumberNone
ConstellationConnectivityAverage
ConstellationDistanceAverage
PlanetsPerSystemNormal
PlanetsSizeFactorNormal
ResourceRepartitionFactorNormal
[/code]
As you can see you have Traits with a String (i.e. TraitScience01Norm3). That doesn't mean your program knows what it means yet. You'll have to hardcode that if a race has a certain trait that it would be better for certain planets, lava planets for example.
But to be honest, I haven't looked into race modding so far. So I'm not really knowledgeable (yet) about this.
Calavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCanceldavea
Newcomer
davea
Newcomer
700g2g ptsReport comment
Why do you report davea?
Are you sure you want to block davea ?
BlockCancelAre you sure you want to unblock davea ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCanceldavea
Newcomer
davea
Newcomer
700g2g ptsReport comment
Why do you report davea?
Are you sure you want to block davea ?
BlockCancelAre you sure you want to unblock davea ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCanceldavea
Newcomer
davea
Newcomer
700g2g ptsReport comment
Why do you report davea?
Are you sure you want to block davea ?
BlockCancelAre you sure you want to unblock davea ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCancelseanw3
Newcomer
seanw3
Newcomer
100g2g ptsReport comment
Why do you report seanw3?
Are you sure you want to block seanw3 ?
BlockCancelAre you sure you want to unblock seanw3 ?
UnblockCanceldavea
Newcomer
davea
Newcomer
700g2g ptsReport comment
Why do you report davea?
Are you sure you want to block davea ?
BlockCancelAre you sure you want to unblock davea ?
UnblockCancelZuljah
Newcomer
Zuljah
Newcomer
7 200g2g ptsReport comment
Why do you report Zuljah?
Are you sure you want to block Zuljah ?
BlockCancelAre you sure you want to unblock Zuljah ?
UnblockCanceldavea
Newcomer
davea
Newcomer
700g2g ptsReport comment
Why do you report davea?
Are you sure you want to block davea ?
BlockCancelAre you sure you want to unblock davea ?
UnblockCancelthashepherd
Newcomer
thashepherd
Newcomer
100g2g ptsReport comment
Why do you report thashepherd?
Are you sure you want to block thashepherd ?
BlockCancelAre you sure you want to unblock thashepherd ?
UnblockCancelzetal911
Newcomer
zetal911
Newcomer
100g2g ptsReport comment
Why do you report zetal911?
Are you sure you want to block zetal911 ?
BlockCancelAre you sure you want to unblock zetal911 ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCancelzetal911
Newcomer
zetal911
Newcomer
100g2g ptsReport comment
Why do you report zetal911?
Are you sure you want to block zetal911 ?
BlockCancelAre you sure you want to unblock zetal911 ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCancelFireStorm
Newcomer
FireStorm
Newcomer
10 700g2g ptsReport comment
Why do you report FireStorm?
Are you sure you want to block FireStorm ?
BlockCancelAre you sure you want to unblock FireStorm ?
UnblockCancelCalavoow
Newcomer
Calavoow
Newcomer
100g2g ptsReport comment
Why do you report Calavoow?
Are you sure you want to block Calavoow ?
BlockCancelAre you sure you want to unblock Calavoow ?
UnblockCancel