1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

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

Discussion in 'Rhye's and Fall of the Greek World' started by bluepotato, Jan 18, 2020.

Tags:
  1. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    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?

    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...
     
  2. EdmundIronside

    EdmundIronside Prince

    Joined:
    Jun 27, 2017
    Messages:
    476
    Gender:
    Male
    Location:
    Grand Rapids, MI.
    Sure, I can do that.
     
    bluepotato likes this.
  3. ChineseWarlord

    ChineseWarlord Prince

    Joined:
    Nov 6, 2012
    Messages:
    484
    Location:
    Why should you care?
    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.
     
  4. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    Ugh, that's bad. Could you upload your Python error log file from My Documents\My Games\Beyond The Sword\Logs\PythonErr.log?
     
  5. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    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.
     
  6. EdmundIronside

    EdmundIronside Prince

    Joined:
    Jun 27, 2017
    Messages:
    476
    Gender:
    Male
    Location:
    Grand Rapids, MI.
    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)
     
    stillblackadder likes this.
  7. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    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.
     
    EdmundIronside likes this.
  8. EdmundIronside

    EdmundIronside Prince

    Joined:
    Jun 27, 2017
    Messages:
    476
    Gender:
    Male
    Location:
    Grand Rapids, MI.
    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)

    *************************************************************************************************************************************************************************************
     
  9. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    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.
     
  10. EdmundIronside

    EdmundIronside Prince

    Joined:
    Jun 27, 2017
    Messages:
    476
    Gender:
    Male
    Location:
    Grand Rapids, MI.
    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).
     
  11. merijn_v1

    merijn_v1 Black Belt

    Joined:
    Dec 29, 2008
    Messages:
    5,795
    Location:
    The city of the original vlaai
    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)
     
    EdmundIronside and bluepotato like this.
  12. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    Definitely do a pull request first, I'll fix the third one then.
     
    EdmundIronside likes this.
  13. EdmundIronside

    EdmundIronside Prince

    Joined:
    Jun 27, 2017
    Messages:
    476
    Gender:
    Male
    Location:
    Grand Rapids, MI.
    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.
     
    stillblackadder likes this.
  14. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    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.
     
    EdmundIronside likes this.
  15. EdmundIronside

    EdmundIronside Prince

    Joined:
    Jun 27, 2017
    Messages:
    476
    Gender:
    Male
    Location:
    Grand Rapids, MI.
    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:
     
    bluepotato likes this.
  16. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    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).
     
  17. DuskTreader

    DuskTreader Chieftain

    Joined:
    Mar 25, 2018
    Messages:
    65
  18. bluepotato

    bluepotato Warlord

    Joined:
    Dec 11, 2018
    Messages:
    215
    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:

    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.
     
  19. DuskTreader

    DuskTreader Chieftain

    Joined:
    Mar 25, 2018
    Messages:
    65
    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
     
  20. DuskTreader

    DuskTreader Chieftain

    Joined:
    Mar 25, 2018
    Messages:
    65
    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: Aug 8, 2020

Share This Page