Welcome to Rhye's and Fall of the Greek World (Revived again)

Okay I did a pull request, hopefully it works!
Israel's UHVs are complete. There is only one minor bug. For the founding of Judaism and Christianity goal, when Israel founds Judaism the goal changes to 'No', but it does switch to 'yes' once they also found Christianity.
Yes it worked, thanks! I've merged it and fixed the bug (at least according to my quick testing it no longer occurs). BTW, could you configure your editor to use tabs for indentation instead of spaces?

Israel spawns with the tech to found Judaism right? So the only way they wouldn't be the first is if someone before them focused monotheism really hard. That's something entirely outside of the Israel player's control, so it seems odd to have in a UHV...
Well I think I've seen Minoa founding Judaism a few times during pre-beta 2.0 development but that doesn't seem to occur anymore so I think we're good. Though far too often they still won't collapse, even with all these sea people the game spawns on Crete...
 
So, I've downloaded the latest development version from git.

And I can't play.

When I click on Play Scenario, 4400 BC

I get an error that said it failed to read the worldbuilder file and a python exception.

I am by no means a programmer or coder, so any help is much appreciated.
 
Ugh, that's bad. Could you upload your Python error log file from My Documents\My Games\Beyond The Sword\Logs\PythonErr.log?
 
Oh you know what, I think I know what the problem is. The mod's folder has to be called RFC-Greek-World, and github names the downloadable zip file RFC-Greek-World-master. Make sure your folder has the former name, otherwise the scenario parser won't be able to find the map file (and therefore won't load the game).
I guess I should create a better guide on how to download the development version, since the current instructions are quite unclear.
 
Working on Athens UHVs.

I'm getting the following error:
*************************************************************************
ERR: Python function onEvent failed, module CvEventInterface
Traceback (most recent call last):

File "CvEventInterface", line 23, in onEvent

File "CvEventManager", line 192, in handleEvent

File "CvEventManager", line 736, in onTechAcquired

File "Victory", line 668, in onTechAcquired

File "Victory", line 166, in getGoal

EOFError
**********************************************************************

It seems to occur as soon as I load any civ.
It seems weird as the Athens UHV I used was almost identical to the pre-existing Sumerian tech UHV.
The code changes I have made related to techs:
*********************************************************************************

def getAthensTechs(self, i):
scriptDict = pickle.loads(gc.getGame().getScriptData())
return scriptDict['lAthensTechs']

def setAthensTechs(self, i, iNewValue):
scriptDict = pickle.loads(gc.getGame().getScriptData())
scriptDict['lAthensTechs'] = iNewValue
gc.getGame().setScriptData(pickle.dumps(scriptDict))
*******************************************************************************************
#init script data
scriptDict = {
'lGoals': [[-1 for i in range(iNumCivs)] for j in range(iNumCivs)], #bluepotato: [[-1,-1,-1]]*con.iNumCivs would copy the same array over and over. see https://stackoverflow.com/questions/2397141/how-to-initialize-a-two-dimensional-array-in-python
'iEnslavedUnits': 0,
'lSumerianTechs': [-1, -1, -1],
'lAthensTechs': [-1, -1, -1],
'lWondersBuilt': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
'babyloniaKilledCivs': 0,
'hittiteKilledUnits': 0,
'mycenaeTombsBuilt': 0,
'AthensharborBuilt': 0,
'lReligionFounded': [-1, -1, -1, -1, -1, -1, -1],
'l2OutOf3': [False] * iNumCivs,
}
gc.getGame().setScriptData(pickle.dumps(scriptDict))
***********************************************************************************************
elif (civType == iAthens):
if (self.getGoal(iAthens, 0) == -1):
if (iTech == tech('drama')):
self.setAthensTechs(0, 1)
for iCiv in range(iNumPlayers):
if (iCiv != iPlayer):
if (gc.getTeam(gc.getPlayer(iCiv).getTeam()).isHasTech(iTech) == True):
self.setAthensTechs(0, 0)
elif (iTech == tech('democracy')):
self.setAthensTechs(1, 1)
for iCiv in range(iNumPlayers):
if (iCiv != iPlayer):
if (gc.getTeam(gc.getPlayer(iCiv).getTeam()).isHasTech(iTech) == True):
self.setAthensTechs(1, 0)
elif (iTech == tech('philosophy')):
self.setAthensTechs(2, 1)
for iCiv in range(iNumPlayers):
if (iCiv != iPlayer):
if (gc.getTeam(gc.getPlayer(iCiv).getTeam()).isHasTech(iTech) == True):
self.setAthensTechs(2, 0)
if (self.getAthensTechs(0) == 1 and self.getAthensTechs(1) == 1 and self.getAthensTechs(2) == 1):
self.setGoal(iAthens, 0, 1)
elif (self.getAthensTechs(0) == 0 or self.getAthensTechs(1) == 0 or self.getAthensTechs(2) == 0):
self.setGoal(iAthens, 0, 0)
 
Apparently that's also a problem with the Sumerian UHV. Strange that I haven't noticed earlier. On turn 0 onTechAcquired is called by the game before onGameStarted for some reason. As a workaround for now, adding
Code:
if iGameTurn == gc.getGame().getStartTurn(): return
after the iGameTurn = gc.getGame().getGameTurn() line in onTechAcquired should "fix" it.

Problem with this is that I think if you start with certain techs required for an UHV, they won't count. For now this doesn't really matter, anyways. A proper solution would be finding a better place to call initGlobals from, or just handling this from onTechAcquired.
 
Good news! 2 out of Athens 3 UHVs are functioning.
I'm only stuck on the 3rd UHV. Its not throwing up any errors, so I think its just not calling on the required function.
Here is the code, let me know if you have any ideas whats wrong with the code:

**************************************************************************************************************************************************************************************
def getWondersBuilt( self, iCiv ):
scriptDict = pickle.loads( gc.getGame().getScriptData() )
return scriptDict['lWondersBuilt'][iCiv]

def setWondersBuilt( self, iCiv, iNewValue ):
scriptDict = pickle.loads( gc.getGame().getScriptData() )
scriptDict['lWondersBuilt'][iCiv] = iNewValue
gc.getGame().setScriptData( pickle.dumps(scriptDict) )

**************************************************************************************************************************************************************************************
scriptDict = {
'lGoals': [[-1 for i in range(iNumCivs)] for j in range(iNumCivs)], #bluepotato: [[-1,-1,-1]]*con.iNumCivs would copy the same array over and over. see https://stackoverflow.com/questions/2397141/how-to-initialize-a-two-dimensional-array-in-python
'iEnslavedUnits': 0,
'lSumerianTechs': [-1, -1, -1],
'lAthensTechs': [-1, -1, -1],
'lWondersBuilt': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],

**************************************************************************************************************************************************************************************
elif civType == iAthens:
if self.getGoal(iAthens, 2) == -1 and iGameTurn > i671BC:
self.setGoal(iAthens, 2, 0)

elif civType == iAthens:
if self.getGoal(iAthens, 1) == -1 and iGameTurn > i671BC:
self.setGoal(iAthens, 1, 0)

**************************************************************************************************************************************************************************************
elif civType == iAthens:
if (self.getGoal(iAthens, 1) == -1):
if (iBuilding == building('Oracle') or iBuilding == building('Colossus') or iBuilding == building('Parthenon') or Building == building('Artemis')):
self.setWondersBuilt(iAthens, self.getWondersBuilt(iAthens) + 1)
if (self.getWondersBuilt(iAthens) == 4):
self.setGoal(iAthens, 1, 1)

*************************************************************************************************************************************************************************************
 
elif civType == iAthens:
if self.getGoal(iAthens, 2) == -1 and iGameTurn > i671BC:
self.setGoal(iAthens, 2, 0)

elif civType == iAthens:
if self.getGoal(iAthens, 1) == -1 and iGameTurn > i671BC:
self.setGoal(iAthens, 1, 0)
I'm not sure where this is, but it doesn't look right. You're essentially telling the game "do this if the civ type is Athens, but also isn't Athens" which makes no sense. Remove the second elif line and it should be fine.

Also, you're showing code related to UHV 2 (starting from 0, so 1). Are you sure you didn't accidentally mix up UHV 2 and 3? Otherwise it looks fine to me, but due to the facts that I'm currently on my phone and the forums mess up indentation (please post your code between CODE blocks next time so it's at least sort of preserved (insert->code)) I might be overlooking something obvious.
 
Still not working unfortunately.
Sorry, how do I post the code between code blocks?
I can also always just try a different UHV, or do a pull request as is (as the other UHVs are functioning).
 
On top of the message box, there are a few buttons. If you hover your mouse over one of them, it says "insert...". Click on it and a menu will appear in which you can select the code box.

Alternatively, you can manually type [ code ] xxx [ /code ]. (without the spaces. But I had to include spaces otherwise it would appear as the code box instead of the command word)
 
Okay, created a new pull request.
Athens UHV 1 = "Be the first to discover Drama, Democracy and Engineering". One minor error, if someone else develops the techs first, it only switches to 'no' once you have also researched the techs.
Athens UHV 2 = "Build the Oracle, the Parthenon, the Colossus and the Temple of Artemis by 450 BC" Not switching to 'yes' once they are built. It does switch to 'no' if they are not built in time.
Athens UHV 3 = "Build 7 harbors by 400 BC." Working bug free!
Text file additions:
Name for Minoan ship
Pedia for Baal priest.
 
Just merged your additions. I think I found the cause of the 2nd UHV not triggering, but haven't tested it yet. So it'd be appreciated if someone could confirm if it is working.
 
Just merged your additions. I think I found the cause of the 2nd UHV not triggering, but haven't tested it yet. So it'd be appreciated if someone could confirm if it is working.

The code wasn't working, but only due to a minor typo.

or Building == building('Artemis')):

There was an 'i' missing before building which caused an error message when the temple of Artemis was built. Once corrected the code worked perfectly. :thumbsup:
 
Sorry for the recent lack of updates, I haven't really had time or motivation to work on the mod for a while. Anyways, now that I'm back I've finally added a settler map editor to the WorldBuilder. It'll definitely be used soon, most settler maps I've checked so far are in a terrible shape (e.g. Egypt's core is everywhere but at the Nile).
 
I got a crash to desktop during autoplay loading a huns game from the 900 BC scenario. Here's the crash dump https://drive.google.com/drive/folders/18dofi4lfQcK5IQvFRtiV0mB1J45wyhZn?usp=sharing
Thanks for the report. Do you still happen to have an autosave from that autoplay? I'm not very proficient in reading 340MB windows crashdumps :crazyeye:

Also, is it intentional that Germanics no longer get units whenever they conquer a city?
I guess. The thing is, I still haven't quite figured out what to do with them and Huns, so right now they just work like the other civs. Except that I removed the Hunnic settler as an experiment... which as it turns out didn't change a thing, since Attila still either gets lost in the forests or is brutally destroyed by the Romans.
So I might just implement the old behavior for 2.0 then, to at least make them somewhat playable.
 
I don't have an autosave. I didn't realize they were generated during autoplay, so I started a different game and now it's been overridden
 
Is it intentional that Goths cannot build settlers? Between their core only being Germania and having no way to build more than their initial city in their core they are kindof screwed in terms of Expansion stability.

EDIT: The Huns also lack a core so if I were to instead start claiming cities I would be completely screwed as well
 
Last edited:
Top Bottom