r_rolo1
King of myself
Welll I gave a little look at the python ( I'm quite unskilled on it, but the training from other languages + the programmer comments help a lot ) and have some awnsers and questions....
First of all the disease mechanism: from what I understood the mechanism is working right as planned ( Spanish are carriers and never get sick, mesoamericans can get disease and spread it to both cities and units ( to avoid cheesy exploits ) ), but.....
The names are self explanatory....
EDIT Forget what I written before... I read the commented out part Instead I would try to reduce the Max_ _Infected turns to maybe half or less. Given that the infection spread is called every turn, 10 turns will make a high prob ( P.S Calculated it and the prob is of more than 89% of catching the disease if the 2 units/city to stay in the same tile for 10 turns, pretty high considering that there is no imunity ( natural or adquired ) to the disease ) of the unit/city to recatch the disease from the city/garrison even with 20% prob of catching the disease, unless you put the units away from the cities in quarantine ( maybe it was the intended idea? )
Seen this we can pass to the spawning mechanics....
First of all, the python is coded for this map in here... Using this mod as it is for other maps can give problems because the Spanish have defined spawning and landing spots ( written in map coordinates that I'll not give ) and I simply don't know what happens if you try to spawn a galleon on land or if you can't land in the defined spot.
First the spawn will only happen during a certain interval of time:
Don't worry with the 2nd line... it is commented out and it should had been used for testing. This means that the spawns will happen only at turn 50, 70, 100 or 130 . IMHO this far early... some ideas in here, pls?
More, the game has defined more than a spawn for the Spanish:
A big piece of code, but needed... every time that a spawn date isreached a wave is formed. We can only have 4 waves as defined before and this piece of code defines the composition. For those that aren't in the will of reading code ( most of you ):
1st spawn: 1 galleon with 2 explorers and a settler ( to be killed ASAP and spread disease? )
2nd spawn: 1 galleon with a explorer. a Conquistador and a settler
3rd and 4th spawn ( each one ): 1 galleon with 2 explorers and a settler and 2 galleons with a explorer. a Conquistador and a settler
My opinion is that the spawns are in completely wrong dates ( can someone say to me in each dates it is? ) and that the waves needs a redraw ( IMO the first waves should be more military and less settlers and the last ones the other way around... what is the point on sending settlers unescorted to a place were everyone is in war with you? ). Like I said before IMHO Spain should not start in war with everyone as well....
Well , I would like some discussion in this.... I'm not sure if modding this mod would bring legal issues ( after all it is copywrited material ) ,but atleast Firaxis could use some "encouragement" to change this , given that the mod is not that bad ( clearly needs fine tuning, but the core mechanics are OK )
P.S All of the above code is part of CvMesoamericaEvents.py file in MesoAmerica mod for Beyond The Sword, copywrited material from Firaxis, credited to Will Miller ( BTW nice coding )
First of all the disease mechanism: from what I understood the mechanism is working right as planned ( Spanish are carriers and never get sick, mesoamericans can get disease and spread it to both cities and units ( to avoid cheesy exploits ) ), but.....
Code:
# Constants
self.MAX_CITY_INFECTED_TURNS = 10
self.MAX_UNIT_INFECTED_TURNS = 10
self.INFECTION_FROM_INFECTED_PROBABILITY = 20
self.INFECTION_FROM_CARRIER_PROBABILITY = 15
#self.INFECTION_FROM_CARRIER_PROBABILITY = 100
#self.INFECTION_FROM_INFECTED_PROBABILITY = 100
EDIT Forget what I written before... I read the commented out part Instead I would try to reduce the Max_ _Infected turns to maybe half or less. Given that the infection spread is called every turn, 10 turns will make a high prob ( P.S Calculated it and the prob is of more than 89% of catching the disease if the 2 units/city to stay in the same tile for 10 turns, pretty high considering that there is no imunity ( natural or adquired ) to the disease ) of the unit/city to recatch the disease from the city/garrison even with 20% prob of catching the disease, unless you put the units away from the cities in quarantine ( maybe it was the intended idea? )
Seen this we can pass to the spawning mechanics....
First of all, the python is coded for this map in here... Using this mod as it is for other maps can give problems because the Spanish have defined spawning and landing spots ( written in map coordinates that I'll not give ) and I simply don't know what happens if you try to spawn a galleon on land or if you can't land in the defined spot.
First the spawn will only happen during a certain interval of time:
Code:
if (turn == 50 or turn == 70 or turn == 100 or turn == 130):
#if (turn == 3 or turn == 12 or turn == 24 or turn == 36):
self.__spawnSpanish()
More, the game has defined more than a spawn for the Spanish:
Code:
def __spawnSpanish(self):
'Spawns a wave of spanish units'
spanishPlayer = PyPlayer(SPANISH_PLAYER)
if (self.wave == 0):
print("Spawing wave 0")
spawnPlot = self.spawnPlots[0]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
elif (self.wave == 1):
print("Spawning wave 1")
spawnPlot = self.spawnPlots[0]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SPANISH_CONQUISTADOR'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
elif (self.wave == 2):
print("Spawning wave 2")
spawnPlot = self.spawnPlots[0]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SPANISH_CONQUISTADOR'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SPANISH_CONQUISTADOR'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
spawnPlot = self.spawnPlots[1]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
spawnPlot = self.spawnPlots[2]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
elif (self.wave == 3):
print("Spawning wave 3")
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SPANISH_CONQUISTADOR'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
spawnPlot = self.spawnPlots[1]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SPANISH_CONQUISTADOR'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
spawnPlot = self.spawnPlots[1]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
unitIDs = []
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_GALLEON'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_EXPLORER'), UnitAITypes.NO_UNITAI])
unitIDs.append([CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), 'UNIT_SETTLER'), UnitAITypes.NO_UNITAI])
spawnPlot = self.spawnPlots[2]
landingPlot = self.landingPlots[randomNumber(0, len(self.landingPlots) - 1) ]
self.__spawnWave(unitIDs, spawnPlot, landingPlot)
self.wave = self.wave + 1
1st spawn: 1 galleon with 2 explorers and a settler ( to be killed ASAP and spread disease? )
2nd spawn: 1 galleon with a explorer. a Conquistador and a settler
3rd and 4th spawn ( each one ): 1 galleon with 2 explorers and a settler and 2 galleons with a explorer. a Conquistador and a settler
My opinion is that the spawns are in completely wrong dates ( can someone say to me in each dates it is? ) and that the waves needs a redraw ( IMO the first waves should be more military and less settlers and the last ones the other way around... what is the point on sending settlers unescorted to a place were everyone is in war with you? ). Like I said before IMHO Spain should not start in war with everyone as well....
Well , I would like some discussion in this.... I'm not sure if modding this mod would bring legal issues ( after all it is copywrited material ) ,but atleast Firaxis could use some "encouragement" to change this , given that the mod is not that bad ( clearly needs fine tuning, but the core mechanics are OK )
P.S All of the above code is part of CvMesoamericaEvents.py file in MesoAmerica mod for Beyond The Sword, copywrited material from Firaxis, credited to Will Miller ( BTW nice coding )