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

Platy World Builder beta testing

Discussion in 'Bugs and Crashes' started by raxo2222, May 3, 2020.

  1. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,588
    Location:
    Poland
    We are testing latest version of Platyping worldbuilder.
    Currently it is being too buggy to be in SVN.
    At least it loads quickly

    Got python error when placing city
    Code:
    Traceback (most recent call last):
    
      File "CvScreensInterface", line 420, in leftMouseDown
    
      File "CvWorldBuilderScreen", line 1688, in leftMouseDown
    
      File "CvWorldBuilderScreen", line 428, in placeObject
    
      File "CvEventManager", line 2559, in onCityBuilt
    
    ValueError: need more than 1 value to unpack
    
    Clicked on gameoptions tab in WB
    Code:
    Traceback (most recent call last):
    
      File "CvScreensInterface", line 447, in handleInput
    
      File "CvWorldBuilderScreen", line 1811, in handleInput
    
      File "WBGameDataScreen", line 49, in interfaceScreen
    
      File "WBGameDataScreen", line 117, in placeStats
    
    ArgumentError: Python argument types in
        CyGame.getAIAutoPlay(CyGame)
    did not match C++ signature:
        getAIAutoPlay(class CyGame {lvalue}, int)
    ERR: Python function handleInput failed, module CvScreensInterface
    
    Diplomacy mode
    Code:
    Traceback (most recent call last):
    
      File "CvScreensInterface", line 343, in WorldBuilderDiplomacyModeCB
    
    NameError: global name 'WBDiplomacyScreen' is not defined
    ERR: Python function WorldBuilderDiplomacyModeCB failed, module CvScreensInterface
    
    Tried to edit city
    Code:
    Traceback (most recent call last):
      File "BugGameUtils", line 323, in callHandler
      File "WidgetUtil", line 129, in getWidgetHelp
      File "CvGameUtils", line 680, in getWidgetHelp
    AttributeError: 'CyPlayer' object has no attribute 'greatPeopleThreshold'
    
    Code:
    Traceback (most recent call last):
    
      File "CvScreensInterface", line 420, in leftMouseDown
    
      File "CvWorldBuilderScreen", line 1605, in leftMouseDown
    
      File "WBCityEditScreen", line 109, in interfaceScreen
    
      File "WBCityEditScreen", line 292, in placeProduction
    
    ArgumentError: Python argument types in
        CyCity.canTrain(CyCity, int, bool, bool)
    did not match C++ signature:
        canTrain(class CyCity {lvalue}, int, bool, bool, bool, bool)
    ERR: Python function leftMouseDown failed, module CvScreensInterface
     
    Last edited: May 3, 2020
  2. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,588
    Location:
    Poland
    Got error when clicking on game option within Game Options scree.
    Code:
    Traceback (most recent call last):
    
      File "CvScreensInterface", line 487, in handleInput
    
      File "WBGameDataScreen", line 334, in handleInput
    
      File "WBGameDataScreen", line 384, in checkOptions
    
    AttributeError: type object 'CvPythonExtensions.GameOptionTypes' has no attribute 'GAMEOPTION_ALWAYS_PEACE'
    ERR: Python function handleInput failed, module CvScreensInterface
    Switched to Corporation tab and got this error (same in Religion tab):
    Code:
    Traceback (most recent call last):
      File "BugGameUtils", line 323, in callHandler
      File "WidgetUtil", line 129, in getWidgetHelp
      File "CvGameUtils", line 707, in getWidgetHelp
    NameError: global name 'isLimitedWonderClass' is not defined
     
  3. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,934
    Location:
    Norway
    Ok, I think I've fixed all of these now.
     
    KaTiON_PT and raxo2222 like this.
  4. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,685
    Gender:
    Male
    Location:
    Las Vegas
    This is a truly great project you guys are undertaking! The really neat thing about it is that I can imagine that once complete, it we need to make a few adjustments to WB, we'll have the ability as a team to make those tweaks. That's always been a bit of a major limitation, for me at least.
     
  5. JosEPh_II

    JosEPh_II TBS WarLord

    Joined:
    Jun 20, 2007
    Messages:
    16,112
    Gender:
    Male
    Location:
    Western IL. cornfields
    Wow! :thumbsup:
     
  6. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,934
    Location:
    Norway
    Platys world builder - with tweaks - is now on the SVN.

    Any bugs related to the world builder should be reported in this thread.
     
    raxo2222 likes this.
  7. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,934
    Location:
    Norway
    Please delete your post in the SVN changelog thread.

    I don't think platy's world builder have that ability.
    Are those global define parameters even saved in the save file?
    I mean, was it enough to change it once in WB for a save for it to have the new value the next time you start the game and load that save?

    @MattCA you probably know something about this.
    Spoiler Are these variables saved in save file or always read from xml on each game startup? :
    Code:
    #define DO_FOR_EACH_INT_GLOBAL_DEFINE(DO) \
        DO(int, ADVANCED_START_SIGHT_RANGE) \
        DO(int, AI_SHOULDNT_MANAGE_PLOT_ASSIGNMENT) \
        DO(int, AT_WAR_CULTURE_ANGER_MODIFIER) \
        DO(int, BASE_OCCUPATION_TURNS) \
        DO(int, BUILDING_PRODUCTION_DECAY_PERCENT) \
        DO(int, BUILDING_PRODUCTION_DECAY_TIME) \
        DO(int, CAPITAL_TRADE_MODIFIER) \
        DO(int, CIRCUMNAVIGATE_FREE_MOVES) \
        DO(int, CITY_AIR_UNIT_CAPACITY) \
        DO(int, CITY_DEFENSE_DAMAGE_HEAL_RATE) \
    . . .
    . . .
    #define ADD_INT_TO_CONSTRUCTOR(dataType, VAR) \
        , m_##VAR(0)
        DO_FOR_EACH_INT_GLOBAL_DEFINE(ADD_INT_TO_CONSTRUCTOR)
    
    If changing these values is not persistent for a game then I see no reason to allow world builder to change them really.
    If that's the case then I would rather add a python debug mode hotkey that opens a popup where those values can be changed on the fly for debug purposes.
     
    Last edited: May 5, 2020
  8. MattCA

    MattCA Warlord

    Joined:
    Jan 25, 2019
    Messages:
    293
    Gender:
    Male
    I'm not 100% sure. I just copied what was there. I think it just gets saved to the old bts file cache. Wouldn't be hard to add that stuff to saves.

    What I added is just an easier way to add them to the dll. After adding one to the list, the required code will be written in CvGlobals the way they are currenly done when the code is compiled.

    I'd still like to try to give that file some tweaks so it doesn't look so intimidating.
    1. I was gonna have separate lists for any that need to be exposed to python, but when I wrote the macros it didn't work, so I'm gonna removing that bit that I started.
    2. I don't think I need that first parameter.
    3. I was thinking maybe I could use int for all the bool defines and forget about the bools so there would be one less list - but I think I changed my mind. I still gotta figure out if I want the bools to be getVAR_NAME() or isVAR_NAME().... anyone got a preference?
    4. I'd like to change the name of the file, or merge it into CvGlobals so that it's not so hidden.
     
  9. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,685
    Gender:
    Male
    Location:
    Las Vegas
    I'm not sure I have any opinions on this. Fascinated but not opinionated (for once).
     
  10. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,588
    Location:
    Poland
    Got assert when clicking on "Units+Cities" button in player mode.

    Also there are NPCs in that dropdown.
    Spoiler :

    Civ4BeyondSword 2020-05-10 10-17-55-28.png
     
  11. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    27,685
    Gender:
    Male
    Location:
    Las Vegas
    Shouldn't you be able to work with NPCs in worldbuilder?
     
  12. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,934
    Location:
    Norway
    Yeah, don't know if those asserts exist in vanilla or if platy doesn't care about asserts. It's a false positive as the python code relies on thopse asserts actually happening to work correctly.
    I'll look into finding a different way to code it.

    Edit: vanilla does have the same assert there, so platy probably never plays with an assert dll.
    He knows that GC.getPlayer(-1) returns None, and instead of doing a check before doing that call on wheter the index is -1 he does the check afterwards to check if the return value was None.
    I think so.
     
    Last edited: May 10, 2020
    raxo2222 likes this.
  13. miccal2000

    miccal2000 Chieftain

    Joined:
    Sep 6, 2006
    Messages:
    88
    Is anyone having the issue of not being able to get into WB from a brand new game created in SVN11171? I can get into it from an old game created on 11166, but on 11171 it just hangs during the loading process.

    I'm using a custom map, and I've used version numbers 12 and 13 at the top of the file.

    Any ideas, please? Thanks!
     
  14. miccal2000

    miccal2000 Chieftain

    Joined:
    Sep 6, 2006
    Messages:
    88
    Thanks!

    Let me add that using version 12 will not let the file load at all. V13 gives me the freeze.
     
  15. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    6,934
    Location:
    Norway
    World builder worked for me after starting a new game on a scenario I picked randomly from the scenario list.

    What map are you using?
     
  16. miccal2000

    miccal2000 Chieftain

    Joined:
    Sep 6, 2006
    Messages:
    88
    An edited version of Pit's world map, V4.3. I can upload it when I'm at my laptop.
     
  17. raxo2222

    raxo2222 Time Traveller

    Joined:
    Jun 10, 2011
    Messages:
    7,588
    Location:
    Poland
    I just changed version value to correct one and managed to load pit scenario.
    It also opened normally in worldbuilder too.
     
  18. miccal2000

    miccal2000 Chieftain

    Joined:
    Sep 6, 2006
    Messages:
    88
    OK, let me futz with it.

    Thanks!
     
  19. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    234
    Gender:
    Male
    Got this when trying to edit the city's name
     

    Attached Files:

  20. miccal2000

    miccal2000 Chieftain

    Joined:
    Sep 6, 2006
    Messages:
    88
    Question...is there a way to make minor civs into full civs in the WB, please?
     

Share This Page