Platy's Peculiar Pleasant Posh Python

Can change it to float instead of integer.
So path will show as 0.25 move.
Which means you need 4 moves to walk 1 tile on path, is that right?
 
Yeah, but you will have to change those modifications by techs as well

But then railroads and highways will now show as 0 so you still need a float
 
Do a simple test.

Code:
				bodyString = sDOM
		[COLOR="Red"]bodyString = sMap[/COLOR]
## Leader Unique DOM Map Specific ##

Add this line in to check what is sMap supposed to be.
Then use that to set up the TXT file.

Hey Platy. With this last line the game should work, less the DoM text, right? (shows part of the text needed in TXT). Seems the code don't work very well... if I go to Script(who works well), next exit the game, the DoM is read in Scenario (and crash when starts), but if I go in Scenario first goes to Bugdata error and no UI.


The solution could be something like:

Code:
if not ('.CivBeyondSwordWBSave' in CyMap().getMapScriptName()):
or
Code:
getMapName
From: http://civ4bug.sourceforge.net/PythonAPI/index.html
Others threads with similar problems: http://forums.civfanatics.com/showthread.php?t=356257
http://forums.civfanatics.com/showthread.php?t=362720
 
Got another little bug for you :

It doesnt show half of the improvements :
Spoiler :

missing : trade post, trade market, trade center, cottage, hamlet, village, town, plantation, camp and, well prolly alot more.

and a small suggestion :

how about using the face for Leaders, and the peace sign for Civics? The later looks a bit more like the ingame scroll (iirc)

edit : and the Golden Age for Concepts
 
Hey Platy. With this last line the game should work, less the DoM text, right? (shows part of the text needed in TXT). Seems the code don't work very well... if I go to Script(who works well), next exit the game, the DoM is read in Scenario (and crash when starts), but if I go in Scenario first goes to Bugdata error and no UI.


The solution could be something like:

Code:
if not ('.CivBeyondSwordWBSave' in CyMap().getMapScriptName()):
or
Code:
getMapName
From: http://civ4bug.sourceforge.net/PythonAPI/index.html
Others threads with similar problems: http://forums.civfanatics.com/showthread.php?t=356257
http://forums.civfanatics.com/showthread.php?t=362720

Not sure what you mean.
That code was added for you to confirm what is the name of the map in case you are unsure.
You do not need it in actual mod.

The latest one already truncated off the .whatever part behind, leaving just the map script name, as you see in Africa scenario.

Unless your map script has special characters like "." or "!" etc, it will work
 
@Vincent
Do those improvements pillaged into something like ruins?
 
Guess so. It automatically assumes that if it pillaged into something, that something can upgrade into it.
Forgot about ruins
 
Not sure what you mean.
That code was added for you to confirm what is the name of the map in case you are unsure.
You do not need it in actual mod.

The latest one already truncated off the .whatever part behind, leaving just the map script name, as you see in Africa scenario.

Unless your map script has special characters like "." or "!" etc, it will work

Sorry for my bad english. I understand the .whatever part behind, I think the problem with the scenario can be this "." special character (I have more than one dot in file name). I will test and post a feedback. Thanks for patience. :)
 
Platy, I don't know what can be happening. In my scenario this component isn't working.

It works when I load a script, but not when load a scenario. When I load a scenario the Dawn of Men screen don't appear, the game starts with a message: Bugdata load failed, loading now, and the UI don't appear too.

My filename now is: RI_Scenario_The_Crusades.CivBeyondSwordWBSave and in TXT file the text is this:
Code:
	<TEXT>
		<Tag>TXT_DOM_BRIAN_BORU_RI_Scenario_The_Crusades</Tag>
		<English>Crusades Scenario</English>
	</TEXT>

My first thought is that there might be an error in the called code of the map, as seen in other threads with a similar problem. You are the expert here, what might be happening?
 
Code:
## Leader Unique DOM Map Specific ##
		sLeader = gc.getLeaderHeadInfo(self.player.getLeaderType()).getType()[7:]
		sMap = str(gc.getMap().getMapScriptName())
		sMap.replace(" ", "_")
		if sMap.find(".") > -1:
			sMap = sMap[:sMap.find(".")]
		sDOM = localText.getText("TXT_DOM_" + sLeader + "_" + str(sMap), ())
		if sDOM.find("TXT_") == -1:
			bodyString = sDOM
		else:
			sDOM = localText.getText("TXT_DOM_" + sLeader, ())
			if sDOM.find("TXT_") == -1:
				bodyString = sDOM
		[B][COLOR="Red"]bodyString = sMap[/COLOR][/B]
## Leader Unique DOM Map Specific ##

Use this test version.
Start the scenario, and see what is displayed in the DOM.
That is the name of the map script after truncating off the .whateverWBsave
See if there are any weird characters or not or just take a screenshot.
 
Pesky Barbs

Features
1) Spawns irritating pesks around cities.
Does not spawn if team has stuff that kicks barbs out (BTS Great Wall)
2) Raging Barbarians increase difficulty by 1
3) Units spawned based on current Era
4) Number of Units and Promotions based on Difficulty
 
nope, its working :D

Since I dont go below zero (Highway is the fastest road, and it is 1 movementpoint (60/60).

Railroad looks faster to me than highway...
Highway is 60 Move/60 Flat
Railroad is 60 Move/6 Flat

Unit with 1 Move point can move 1 tile on highway but 10 tiles on railroad
 
Code:
## Leader Unique DOM Map Specific ##
		sLeader = gc.getLeaderHeadInfo(self.player.getLeaderType()).getType()[7:]
		sMap = str(gc.getMap().getMapScriptName())
		sMap.replace(" ", "_")
		if sMap.find(".") > -1:
			sMap = sMap[:sMap.find(".")]
		sDOM = localText.getText("TXT_DOM_" + sLeader + "_" + str(sMap), ())
		if sDOM.find("TXT_") == -1:
			bodyString = sDOM
		else:
			sDOM = localText.getText("TXT_DOM_" + sLeader, ())
			if sDOM.find("TXT_") == -1:
				bodyString = sDOM
		[B][COLOR="Red"]bodyString = sMap[/COLOR][/B]
## Leader Unique DOM Map Specific ##

Use this test version.
Start the scenario, and see what is displayed in the DOM.
That is the name of the map script after truncating off the .whateverWBsave
See if there are any weird characters or not or just take a screenshot.

Yes, I already test with this code, and did it again (re-merge) to confirm. Nothing is displayed in the DOM. Like the previous exemple, the DOM screen isn't appear, and the game start with error: Bugdata error. Loading now. The UI also not appear.

The screenshot:


Uploaded with ImageShack.us
 
Hmm that code is supposed to simply display the name of the map script in the DOM text box directly.

Try make a copy of your mod without BUG, and try with python exceptions enabled.
See if there is an error.
 
Hmm that code is supposed to simply display the name of the map script in the DOM text box directly.

Try make a copy of your mod without BUG, and try with python exceptions enabled.
See if there is an error.

I try with python exceptions enabled. No logs... make a copy without BUG, I don't know if I can because the mod is full of changes and others merges like k-mod, and this changes were not made by me. By the way, I'm just an apprentice ...

Is there another way I can explore?
 
Chances are, BUG is messing with it.
The other way is don't use the map script specific version.
Define a new Leader Type for the scenario version and use the original Leader specific version
 
Top Bottom