• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Platy World Builder beta testing

raxo2222

Time Traveller
Joined
Jun 10, 2011
Messages
9,778
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:
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
 
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.
 
Wow! :thumbsup:
 
how do you adjust the food consumption and parameters in the new world builder?
ggm
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:
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.
 
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.
I'm not sure I have any opinions on this. Fascinated but not opinionated (for once).
 
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

 
Got assert when clicking on "Units+Cities" button in player mode.
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.
Shouldn't you be able to work with NPCs in worldbuilder?
I think so.
 
Last edited:
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!
 
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!
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?
 
An edited version of Pit's world map, V4.3. I can upload it when I'm at my laptop.
I just changed version value to correct one and managed to load pit scenario.
It also opened normally in worldbuilder too.
 
Got this when trying to edit the city's name
 

Attachments

  • upload_2020-5-22_14-1-31.png
    upload_2020-5-22_14-1-31.png
    566.2 KB · Views: 193
Back
Top Bottom