Reposting here from here (https://forums.civfanatics.com/threads/extramodmod.486227/page-73#post-15904402) as suggested
Hey guys,
I've been asked to look at this (I haven't played with this yet, busy coding & playing my own MOD) but I hear it's working very very well in multiplayer ! Great to hear !
The question asked -
on the map WorldOfErebus, starting distances between players are often too small.
As anyone encountered this issue and look at solving this? It'd be good if anyone can share his changes here...
Having a look myself :
The traditional 'assignStartingPlot' function calls the custom-made 'SetStartingPlots' (line 5559)
Code:
def assignStartingPlots():
gc = CyGlobalContext()
gameMap = CyMap()
iPlayers = gc.getGame().countCivPlayersEverAlive()
spf.SetStartingPlots()
return
'SetStartingPlots' just really decide which players gets which but doesn't decide where exactly besides calling FindStartingPlot in the class Starting Area (line 5670)
It defines areas cleanly and sets how many players can have each area (
this is a factor)
Code:
for startingArea in chosenStartingAreas:
for i in range(startingArea.idealNumberOfPlayers):
startingArea.playerList.append(shuffledPlayers[0])
del shuffledPlayers[0]
startingArea.FindStartingPlots()
The class 'StartingArea' (line 5718) defines all of it.
It creates a list of all acceptable plots with the function 'CalculatePlotList' (line 5736)
Then it will do 'FindStartingPlot' sort all the plots and put them in 'BestPlot'
Since it does a loop for each player (line 5896)
Code:
for n in range(numPlayers):
I'm thinking you can maybe put a negative value for proximity to a starting plot already decided (line 5968 AND 6021)
Am not sure if it can be defined at this stage but I think if you fill in a list with already decided startingPlots then it should work
Code:
#Suggestion
#value -= proximityToOtherStartingPlot
valueMod = northMod * westMod * edgeMod
value *= valueMod
if value > bestValue:
bestValue = int(value)
bestSpot = m
Anyone already had or willing to look at this?
Unfortunately FFH2 doesn't work on my current PC so any pointer for my friends would be super welcome.