Platy World Builder

1) Plot Yield
Modified Plot Yield is not so straightforward. There isn't a getExtraPlotYield(xxx) command, so what you see is actually tedious calculations based on terrain, subtracting improvement, etc.
Thus, saving it is a chore. I remembered attempting to modify plot yield on that save file before and it CTD, so chances are it is unlikely to happen.

2) City Leader Icon
Doable easily

3) End all players
Not sure if it is actually needed. If my game hang, I definitely want to know who is the culprit, so I will want to end each player one by one. Adding such a function is doable, just a matter of layout.

4) Mouseover
Doable easily

5) Wait/Fort/Finish Status
Adding another column is doable, which then makes the color coding unnecessary. If necessary, that page can be broken into 2 separate ones, for units and cities so that each can display more sortable data, such as population, culture level etc for cities.

Busy these few days, so wont happen too soon.
 
The plot thing could (not effectively, but would work) be worked around if it would be possible to change MP options while hosting a single player save in MP. Anyone know if this is possible? I for example tried to host my saved file, which would work if I would be able to use "take over AI" and add "simultaneously turns".
Sorry for off-topic but I'm desperate for this to work xD
 
Couldn't you allow custom plot yields not by keeping track of the extra yields, but by saving the total yields when saving and then when reading setting the plot's yields to zero before adding the custom value?

--------

I realize now that my Skip All Players button is not particularly useful, as players who have not yet had their turn have such things reset at the start of the turn anyway.

What is very useful is an easy way to identify which player's turn is currently in progress, as it would be that player's units which are the troublemakers.

It can be hard to glean that information even by reading the logs, as the repeated statements of the units stuck in a loop may be several pages down from the last mention of the player to which they belong and it can be easy to miss that when scrolling up.

I discovered that this is an easy feature to add, like so:
Code:
		screen.addDropDownBoxGFC("CurrentPlayer", 20, 20, screen.getXResolution()/5, WidgetTypes.WIDGET_GENERAL, -1, -1, FontTypes.GAME_FONT)
		for i in xrange(gc.getMAX_PLAYERS()):
			pPlayerX = gc.getPlayer(i)
			if pPlayerX.isEverAlive():
				sText = pPlayerX.getName()
				if not pPlayerX.isAlive():
					sText = "*" + sText
[COLOR="Red"]				if pPlayerX.isTurnActive():
					sText = "[" + sText + "]"[/COLOR]
				screen.addPullDownString("CurrentPlayer", sText, i, i, i == iPlayer)


--------

As I said I tried adding another Wait/Fort/Finish Status column, but couldn't get it to sort and so found it useless.
 
I figure I might as well upload my recent non-FfH2-related changes here.

This adds the leader icons for buildings, the "Skip Turn"/"Kill" mousovers, the brackets around the player's whose turn it is (on all player drop down menus), and my aesthetic rearrangement of the Units+Cities screen.

It also cleans up a lot of unnecessary white space from otherwise unaltered files; if you use these files as your basis for future versions then it would make the merger process much less annoying for me.
 
Version 4.13

1) Modified from Magister's version with minor fixes and changes. Removed Magister's comments not out of disrespect, but since I know you are gonna add your own FFH's changes, so easier for you to tell what is in original WB. Also, easier for me to identify new changes from you in future.

2) Added All/Team/Player to Religion and Corporation pages, as well as Leader Icons.
Now you can add a religion to all players' cities with a click.

3) All/Owner/Team in all pages changed to All/Team/Player as "Owner" does not make sense in some pages like Religion.
Also weird for Player to be in between 2 bigger groups.

4) Added a column for Wait/Fortify/Moved to Units + Cities List page.
Removed color coding, and use that for Selected item instead of bold, to be consistent with other pages.

Plot Yield will take some exploration, so I leave it till I am free.
 
Thanks platyping!

I was about to go to sleep, but just downloaded and started testing this version instead.

The first problem I noticed is that the color coding in the Units + Cities page is not updating when I select a different unit, which makes it more confusing than having no color coding at all.

It would probably be better if there were some mouseover to help identify what each of the new the Wait/Fortify/Moved icons represents.

If I click on one of those new icons, then the unit gets deselected. The map disappears as does the link above it, but I can still use the link in the drop down menu to go to the unit screen. There are python errors due to no unit with an ID of -1 existing, which causes most of the screen not to load.


The link on the Plot Data page that should go to the Units + Cities list page does not do anything. It seems that I overlooked this bit of code, as most of the changes in WBPlotScreen.py were FfH2 specific.
Spoiler :
Code:
		elif inputClass.getFunctionName() == "CurrentPage":
			iIndex = screen.getPullDownData("CurrentPage", screen.getSelectedPullDownID("CurrentPage"))
			if iIndex == 1:
				WBEventScreen.WBEventScreen().interfaceScreen(pPlot)
			elif iIndex == 2:
				WBPlayerScreen.WBPlayerScreen().interfaceScreen(pPlot.getOwner())
			elif iIndex == 3:
				WBTeamScreen.WBTeamScreen().interfaceScreen(pPlot.getTeam())
			elif iIndex == 4:
				if pPlot.isCity():
					WBCityEditScreen.WBCityEditScreen(CvPlatyBuilderScreen.CvWorldBuilderScreen()).interfaceScreen(pPlot.getPlotCity())
			elif iIndex == 5:
				pUnit = pPlot.getUnit(0)
				if pUnit:
					WBUnitScreen.WBUnitScreen(CvPlatyBuilderScreen.CvWorldBuilderScreen()).interfaceScreen(pUnit)

#Magister Start
			elif iIndex == 6:
				if pPlot.isCity():
					WBPlayerUnits.WBPlayerUnits().interfaceScreen(pPlot.getPlotCity().getOwner())
				else:
					pUnit = pPlot.getUnit(0)
					if pUnit:
						WBPlayerUnits.WBPlayerUnits().interfaceScreen(pUnit.getOwner())
					elif pPlot.isOwned():
						WBPlayerUnits.WBPlayerUnits().interfaceScreen(pPlot.getOwner())
#Magister Stop
			elif iIndex == 11:
				iPlayer = pPlot.getOwner()
				if iPlayer == -1:
					iPlayer = CyGame().getActivePlayer()
				WBInfoScreen.WBInfoScreen().interfaceScreen(iPlayer)
 
Version 4.13b

Diplomacy:
1) No longer able to change war status between Master and Vassals.
Irritating when i wanna declare war on all others and end up declaring war on my vassals too.

2) Fix a bug with changing attitude. Free vassals are supposed to be permanently friendly, not capitulated ones.
 
Im new to modding civ 4 and i just downloaded this mod. Am i suppose to have something alongside this mod? Cause when i use it my UI disapears and in the world builder i have 2 empty blue boxes.
 
Unless you are not using BTS 3.19 patch, I don't see this issue with others.
 
Unless you are not using BTS 3.19 patch, I don't see this issue with others.

Remember when i was mentioning i was noob to the civ 4 modding, i forgot to mention i was also a noob to the game. Played more than enough civ 5 but never played civ 4. I seemed to have selected the vanilla game instead of the beyond the sword one which was up to date.

So yeah it works now...
 
Hi am new to modding/making new scenarios. I have figured out how to edit XML pretty well, and do somethings with making new graphics for leaderheads/units/buildings etc. My question is, does this world builder allow you to create anything new or purely just manipulate what already exists in your game? Can it be used to create new techs etc? I am getting the impression it doesn't allow for that but it looks great and would be awesome if it did. Am I wrong?
 
Hey Platy, I've come across some instability on the Units+Cities page when it comes to Barbarians. Firstly, opening the page for one player and then using the dropdown to switch to the Barbarian player will cause a CTD. Secondly, if you kill a Barbarian unit, then close the page, reopening it will also cause a CTD. I'm not sure if this happens with non-Barbarian players too, but I can reproduce it every time with them.
 
I have not had any such instability with the Units + Cities page in my version.

I have found some cases where I get python errors that don't seem to matter much, but not a crash. It seems they can be fixed by adding this red line within def setUnitTable(self):
Code:
		(loopUnit, iter) = pPlayer.firstUnit(False)
		while(loopUnit):
			[COLOR="Red"]if loopUnit.isNone():continue[/COLOR]
			iRow = screen.appendTableRow("WBUnitList")


I recently had a request to add a function to kill/skip all units of the same unit type. I went ahead and implemented this for my modmod, and did the same for unit combat and domain while I was at it. I'm thinking of also adding units on the same plot, in the same area, and of the same unit AI type.

(I had to put the code for these buttons under placeUnitMap rather than interfaceScreen, but they seem to work fine. I also had to shift the map over to the right instead of centering it to make room for text explaining to what units each button would apply.)

You are of course welcome to borrow that code with you if you are interested, once I've tested it a bit more and released it.


I also just added the ability to change a unit's Fortify Turns. It seems like such a basic thing that you'd want it in your version too, but when I searched the API found pUnit.getFortifyTurns() listed but not pUnit.setFortifyTurns(). The latter function might have been exposed by Kael only for FfH2, in which case it is no use to you.
 
Hmm, might look into it when I have time, cause I already uninstalled Civ IV since not much requests nowadays.

Xyth, perhaps you can test it out in plain WB to see if the problem occurs as well, or just in your HR mod?

@Magister
You might be wary of using continue in a while loop. I tried it out before in other mod comps. It will cause a infinite loop hang, if it happens to continue at the final iteration. (Last unit/city)

@Fortify
SetFortifyTurns is definitely not available.
 
Code:
It looks like I have another problem with the WB, more specifically with the file CvWBDesc.py.

I'm trying to set a Scenario with a Team 16 a vassal of Team 15. So in Team 16, I write "VassalOfTeam=15".

In game, the contrary happens and 15 is a vassal of 16. When I go to the WB and write the file as such, I see that the game added a "VassalOfTeam=16" to the Team 15 (which corresponds to the wrong situation - I then discarded these changes).

I then changed the CvWBDesc file in def applyInitialItems to replace the "Team" stuff with the original BtS version and now the vassal is expressed correctly.

Could you please have a look at it and tell us what you think? Thank you! :)

PS/Edit:

Same declaration for both:
Code:
					pTeam = gc.getTeam(iTeamLoop)
					pWBTeam = self.teamsDesc[iTeamLoop]

but:

Original BtS version:
Code:
					for vassalTeam in self.teamsDesc[iTeamLoop].bVassalOfTeamList:
						gc.getTeam(vassalTeam).assignVassal(iTeamLoop, true)

Your version:
Code:
			for item in pWBTeam.bVassalOfTeamList:
				pTeam.assignVassal(item, true)

It's the second line which is problematic, as the Team in your version is the Team of "iTeamLoop" and it is different than the Team of "vassalTeam" or "item".

Solution:
Code:
gc.getTeam(item).assignVassal(iTeamLoop, true)

It looks like it is an isolated case in the function.
 
I have another problem with the CvWBDesc.py file.

It's about the "StateReligionBuilding=" derived from the Organized Religion Civic and the "CoastalTradeRoute=" from the Great Lighthouse (there might be other ones).

It looks like the values are cumulated if you write a WBS file from within the WB.

For example, my "StateReligionBuilding=25" became "StateReligionBuilding=50" and
my "CoastalTradeRoute=2" became "CoastalTradeRoute=4".

I believe that you added this information. I wonder if it is useful when the game will apply them anyway if the Civic is applied or if the Wonder exists and is not obsoleted.
 
Fixed the one for vassals.
As for the other one, didn't test it out yet.

There are various other new such functions for users to add SRB or CTR to certain teams even if they are not running certain civics.
 
Thanks.

Still, I think that the WBS file should only contain information that will influence the launching of a game and that such modifiers (SRB, CTR) should not come out of this file. They should come from an identifiable process in game and ideally should be documented.
 
Top Bottom