Platy World Builder

This WB-mod is great! I especially like that I can just add a new civilization in the WB. But eh, that's exactly the thing I don't know how to do. Of course I read the first post, but could you tell me what criteria have to be met exactly before you can start adding players? When I select a civ + leader and click New Player it doesn't do anything.
 
After you select civ and player, it only adds player into the game.
Of course you have to add units and cities yourself
 
After you select civ and player, it only adds player into the game.
Of course you have to add units and cities yourself

Well, that's the problem, I can't select the new player in any of the menus (buildings/units for example). And with that I mean that I can't see the new player anywhere too in the menus! It's just that nothing happens when I click create new player. Oh and I have 50 players allowed in the DLL so there's definitely place for more players.

I merged it with BUG, but the merging was very simple, I can't see how I could have done anything wrong with that - one file that BUG hadn't edited and the CvScreens was really simple to merge because it was all commented.
 
Not sure what went wrong with yours.

Screenshot 1:
Selected Hammu as new player

Screenshot 2:
After selection, automatically go to this screen, where I can add units/buildings for Hammu directly

Screenshot 3:
Or I can edit an existing city and assign to Hammu

Which part is not working for you?
 

Attachments

  • Civ4ScreenShot0002.JPG
    Civ4ScreenShot0002.JPG
    171.2 KB · Views: 146
  • Civ4ScreenShot0003.JPG
    Civ4ScreenShot0003.JPG
    177 KB · Views: 207
  • Civ4ScreenShot0004.JPG
    Civ4ScreenShot0004.JPG
    162.1 KB · Views: 197
Not sure what went wrong with yours.

Screenshot 1:
Selected Hammu as new player

Screenshot 2:
After selection, automatically go to this screen, where I can add units/buildings for Hammu directly

Screenshot 3:
Or I can edit an existing city and assign to Hammu

Which part is not working for you?

It's in between screenshot 1 & 2 that it goes wrong: after selecting Hammurabi as new player, it doesn't automatically go to the next screen. His name also doesn't show up in any other screens, like editing an existing city and assigning it to him.

When I click to create a new player, nothing actually happens, it acts as if I hadn't clicked it.
 
I can add a Player and immediately after I click, see the new Player in every menu of the WB. If I give him a settler, the new Civ/Player will develop as any other one.

Since my Mod does not use the two modified Python files, I just replaced the ones in BtS directly, so that Platy's WB works for unmodded BtS and for my Mod.

It might be unrelated but are you using it with Revolution DCM?
 
I am guessing it may also be due to the 50 Civ DLL.
Try it as the standalone version, see if it works for you as intended, then test it in any other mod without the 50 Civ DLL or simply merge it into your mod without the 50 Civ DLL

See if it works when it is pure python.
 
Tested: it works fine with the BtS 50 Civs dll.

Edit: now tested (merged CvScreensInterface.py) with BUG Mod 4.4: it works.
 
I can add a Player and immediately after I click, see the new Player in every menu of the WB. If I give him a settler, the new Civ/Player will develop as any other one.

Since my Mod does not use the two modified Python files, I just replaced the ones in BtS directly, so that Platy's WB works for unmodded BtS and for my Mod.

It might be unrelated but are you using it with Revolution DCM?

Thanks for testing and the help (both of you), adding a player worked with a 'clean' mod indeed.

So it has to be affected by Revolution DCM as you suggested - that's why I mentioned BUG, because that's the component that changes the CvScreensInterface.
Now I think of it, I was stupid to say BUG instead of RevDCM, because Revolutions has python files too, not only BUG. Sorry:(

What could be the problem? Maybe Revolutions uses something else than the barbarian-system to add new players to the game, and that messes it up with this type of creating a new player?
 
Test 3 with RevolutionDCM: failed.

This is the Python error reported. :scan:

Could the Golden Python give an alternate solution? :)

Edit: in the SDK, bool is bSetAlive. Then the solution might be simple: add Platy's CvWorldBuilderScreen.py to Python/Screens folder of RevDCM, edit line 1411 as follows:

CyGame().addPlayer(i, self.m_iNewLeaderType, self.m_iNewCivilization, True)

It works! :)
 
Means they mess with the SDK to change addPlayer(XXX) to take in one more argument lol.
 
in lieu of releasing two separate versions, what might be worth a shot is having a try catch:

Code:
try:
    CyGame().addPlayer(i, self.m_iNewLeaderType, self.m_iNewCivilization)
except ArguementException:
    CyGame().addPlayer(i, self.m_iNewLeaderType, self.m_iNewCivilization, True)

:p

try it out and let me know if that is suitable
 
I won't bother lol.
Since this is a mod component, I can only release it compatible with vanilla BTS.
I can't possibly download every single mod to see if the SDK modified any other python function to take in more/less arguments.

As such, it is up to the modders merging mods, since those authors of mods that mess with SDK, will/should know what functions they change, rather than me downloading them to see if they change any :D

Furthermore, god knows what the boolean in this case is supposed to test.
How will I know what True or False gonna affect all the other codes of the Rev mod :D
 
Test 3 with RevolutionDCM: failed.

This is the Python error reported. :scan:

Could the Golden Python give an alternate solution? :)

Edit: in the SDK, bool is bSetAlive. Then the solution might be simple: add Platy's CvWorldBuilderScreen.py to Python/Screens folder of RevDCM, edit line 1411 as follows:

CyGame().addPlayer(i, self.m_iNewLeaderType, self.m_iNewCivilization, True)

It works! :)

Worked indeed, thanks a lot!:) The WorldBuilder is so much better now.
 
Update

Not much new features.
Just a revision of the interface.



Added Civ Description beside Player Name, easier to identify when playing in no restriction mode.
Removed the "Dead" for dead players, simply identify them with a "*" in front



Separated from Player Data, Team Data and Game Data.
Add Units by Category, Add New Player are now here



1) Instead of a popup in the middle of the screen, you now choose it in similar fashion as the rest.
2) Traits Descriptions shorten to simply the short description similar to what you get in custom game selection screen
3) Add New Player function totally hidden when game is full. You won't even get to see it in the above game commands selection.

New Feature:


Just for you to end your boring game if you only select Time Victory and... it is getting too boring.
Also for you to test your victory movies.

So far I find this WB useful mainly to test new stuff, pretty easy when I wanna test new effects of projects for instance by simply setting current production to that project and adjust production to finished.
Rather than the old style, had to add 10000 Great Engineers to join city and finish a project...

@Ferocca
Congrats :goodjob:
 
perhaps you should use the try catch to inform the user that the adding of the player failed? have

try: ...

except ArguementException: #do a popup!
 
If I do for one function code, I will have to do for all 99999 others.
Because how will I know which python code is ammended by SDK of other mod
Thus, add a try catch for every single python code?
 
don't need to.

what you need to do is surround large (changed) blocks of code with a try catch. not one for every function call :p or just put one in for the addPlayer for the moment. Not much added work

if you get an argument exception catch it and tell the user via popup that the new player function failed. further explain that it could be caused by another mod and tell them to ask the developers to have a look so that it can be fixed by the individual. This way at least the users won't be in the dark as why it isn't working like ferocca was

You can't really expect to be able to create popups for each individual type of call to give the user very specific answers but you can at least inform them of the problem. Unless they keep the exceptions on they would never know
 
If python exceptions are enabled, you get an error message anyway.

Ferocca didn't enable it, so was kept in the dark.
Else, he would get the error like isenchine did.
 
Top Bottom