Algo de mais específico em relação ao problema? Não tenho a mínima ideia em relação a coisas relacionadas com cenários.
About Unique DOM:
Civ description may change based on language chosen.
I suggest just use the leader type version.
Is possible a version that leader type can distinguish what scenario is it?
Code:
<TEXT>
<Tag>TXT_DOM_GENERIC_BRIAN_BORU</Tag>
<English>The sun rises on the year 4000 BC. (...)</English>
</TEXT>
<TEXT>
<Tag>TXT_DOM_SCENARIO1_BRIAN_BORU</Tag>
<English>A tangled web of old rivalries (...)</English>
</TEXT>
@Cruel
Should be able to, just never play around with scenarios before

Where are the data kept so I can do some testings
Unique DOM Update
Both Civ and Leader versions now vary with map chosen.
If there isn't a specific map version of that leader, the generic leader/civ text is used.
If there isn't a specific leader/civ text, the generic DOM text is used.
The sMAP works with CivBeyondSwordWBSave files too? Or just Scripts?
Code:
sMap = gc.getMap().getMapScriptName()
Can there be space in the file name?
Showed to me: Bugdata not load. Loading now... (and no interface...)
Well, too bad, can't test with any of the BTS ones since they all came with "_" instead of " "
Try the new one, see if it works.
If map name is "I am happy"
Text file should be TXT_DOM_ALEXANDER_I_am_happy
Humm no... same Bugdata message, and when I try again (without reload the mod) the game and Visual Studio crash also with message win32 exception in Civ4BeyondSword.exe - 6476
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.
Thanks. Done and tested with Africa Scenario.
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
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
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?
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
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
Checked after about BUG date, was a very complicated way that BUG invented to store the information and not have the slightest notion of how to handle since it uses a series of index.
More information:
From another thread:
I have investigated that some more and yes, it is a problem but luckily not as much as I thought at first because it is only used in the problematic manner in very few cases.
That is probably why that bug was not discovered earlier (it already is in this way in RevolutionDCM).
The problem is that there is SdToolKit, which is rewritten in BUG to be based on BugData. That script reads the ScriptData of the game object into a Python data structure on load and only pickles and writes it back right before saving.
Then there is SdToolKitCustom which is based on the original SdToolKit and pickles/depickles on every access. So if you write something in the game object ScriptData with SdToolKitCustom then that gets lost on the next presave event.
Luckily most of the access to SdToolKitCustom is done by Revolution on the player object ScriptData which is not touched by BugData.
I guess I will merge the two SdToolKit APIs and make sure the issue is caught there.
I fixed that back then by merging the two variants of SdToolKit that were present, check revision 3171.
Revision 3171 - C2C
Fixed bug with wrong icon for civs that do not like you.
Added airport icon and added all civ attitude icons to symbol list.
Merged SdToolKitCustom into SdToolKit and based all global/game serialization on BugData.
Fixed some bugs in BugData (did that ever work? Can't exclude though that I read some of it wrong).
/trunk/Assets/CvGameCoreDLL.dll
/trunk/Assets/Python/Screens/CvMainInterface.py
/trunk/Sources/CvEnums.h
/trunk/Assets/res/Fonts/GameFont.tga
/trunk/Assets/res/Fonts/GameFont_75.tga
/trunk/Assets/Python/Revolution/Gameready/StartAsMinors.py
/trunk/Sources/CyEnumsInterface.cpp
/trunk/Assets/Python/Revolution/Gameready/DynamicCivNames.py
/trunk/Assets/Python/Revolution/Development/Tester.py
/trunk/Assets/Python/Revolution/Gameready/AIAutoPlay.py
/trunk/Assets/Python/Revolution/Gameready/BarbarianCiv.py
/trunk/Assets/Python/Revolution/Gameready/Revolt.py
/trunk/Assets/Python/Revolution/Gameready/Revolution.py
/trunk/Assets/Python/Revolution/RevBuildingsUtils.py
/trunk/Assets/Python/Revolution/RevCivicsUtils.py
/trunk/Assets/Python/Revolution/RevData.py
/trunk/Assets/Python/Revolution/RevEvents.py
/trunk/Assets/Python/Revolution/RevTraitsUtils.py
/trunk/Assets/Python/Revolution/RevUtils.py
/trunk/Assets/Python/BUG/BugData.py
/trunk/Assets/Python/Contrib/SdToolKit.py
/trunk/Assets/Python/Screens/CvMainInterfaceATOM.py
/trunk/Assets/Python/SdToolKitCustom.py
I replace some files, made ​​some changes and came to the conclusion that I know nothing of programming.
