Bug Reporting

EF, you mind posting the bit of offending code?

Sure. Here's the fixed version from SVN:

Code:
	<TEXT>
		<Tag>TXT_KEY_TRADE_ROUTE_HELP_BASE</Tag>
		<English>%s1 [ICON_COMMERCE]: Base profit</English>
		<French>%s1 [ICON_COMMERCE] : bénéfice de base</French>
		<German>%s1 [ICON_COMMERCE]: Basisprofit</German>
		<Italian>%s1 [ICON_COMMERCE]: profitto basilare</Italian>
		<Spanish>%s1 [ICON_COMMERCE]: Beneficio base</Spanish>
	</TEXT>
In the broken code, the "%s1"s were all changed to "%d1". The game formats the base profit (a floating point number) as a string like "1.50" and passes in the address of the resulting string to the text formatting engine.

"%s" tells the game to expect a string. "%d" tells it to expect an integer number. Well, the address of a string is just a large integer, so the engine was taking part of it and formatting it into a string ("%d").

I found it because I diffed the new version against the original BTS version so I could split out the additions. At that point I found changes to some of the XML entries which I didn't expect. It was really blind luck.
 
ah - I diffed that file today (actually, yesterday now) too and also saw those small differences - thus spurring me to suggest we have our own XML.
 
So far splitting out the hints seems to not cause any problems, but I don't know if the new hints still show up. The art definitions, however, don't work.

Also, I tried to get the GP Bar to show the percentages for the selected city, but it doesn't work. I cannot find a function that gets called specifically when a city is clicked on. Sure, the plot list buttons are redrawn, but that happens any time a unit is selected, too.
 
Okay, I'm inclined to revert all the non-hint changes in CIV4GameText_BTS.xml. A couple are grammatical (adding a "L'" option to a couple French translations that I don't have the knowledge to verify), but a few alter the substitution codes just like the trade base profit above. Since I don't know why they were altered, I say let's torch them.

@Alerum - There's a comment in there:

Code:
Moved hints from CIV4GameText_Strategy.xml to 
CIV4GameText_BTS.xml so they resize properly.
What exactly happens if they are in a separate XML file? Also, do you know where the non-hint changes came from? Did you copy the XML file from somewhere else? I don't remember if you made all the new hints or started from some other source.
 
The resizing test didn't work, but kept it that file anyway. IIRC there was 2 files I edited... I odn't remember if it was the Schema or not it's been so long. One would point to the hint number, the other would contain the actual hint. It didn't matter which file I put it in, the Stategy or the BTS one... in fact, the BTS would contain alot of stuff that was like random text. Either file I used, as long that the file that would point to the hint was done properly, it would pull it. I saw it being like this: The filenames didn't matter, consider all the XML as one large file, and the filenames were just a way for the programmer to find it easily. Does that make sense? In a hurry so can't describe what I mean very well. Either way, Ruff's suggestion of having our own XML is a wonderful idea.

As for the base profit thing, I don't remember changing anything that didn't contain HINTS in it's TXT field. It's different then in the base game?
 
@ruff:

If I hit Alt-L now in Revision 614 (it says I'm on 607, but I've copied all the 614 files) I get no popup asking me to log the game anymore. Is that intentional ?
 
·Imhotep·;6736187 said:
. . . in Revision 614 (it says I'm on 607, but I've copied all the 614 files) . . .

If you mean you got them directly from SVN, you won't see the real revision number in the options screen. Alerum updates a Python file with the revision number when he makes a release.

@Alerum - I haven't looked yet, but I'm willing to bet those non-hint changes were from a pre-3.13 version of BtS, assuming you introduced the hints before the 3.13 patch. The reason I think this is that when the patch came out, I only looked at the Python changes -- ignoring the new XML files -- because I didn't think we overwrote any XML files.

You are mostly correct about the XML loading. It works as you say -- loading every XML file with game text -- but not apparently other objects (units, civs, buildings, art definitions, etc. That's where the modular loading comes into play.

I'm going to pull the hints out into their own file and delete the duplicate XML file. We'll have to make sure the new hints actually get displayed at some point. I have it that way locally already, but I've only seen old hints in the 10 or so times I've launched BtS while testing.
 
@EF:

Thanks for the clarification. Yes, I always pull BUG directly via TortoiseSVN. Btw, speaking of SVN - I'm currently trying to set up SVN for my web project and want to work with it via Eclipse. I'm rather lost though and as I've seen you mention that you work with Eclipse and SVN too - could you lend me a hand with this ?

Imhotep
 
·Imhotep·;6736187 said:
@ruff:

If I hit Alt-L now in Revision 614 (it says I'm on 607, but I've copied all the 614 files) I get no popup asking me to log the game anymore. Is that intentional ?
I sometimes manually update the revision number when I make an interum update.

In theory, Alt-L is only available if you have logging enabled. If you have it enabled and 'silent' off, then Alt-L is available. If you have it enabled and 'silent' on, then it isn't available.
 
@Imhotep - Yes, I use the Subclipse plugin from inside Eclipse to access SVN. It works great, though when I reinstalled my system this time, I wasn't able to commit from Subclipse until I first committed using TortoiseSVN. I haven't figured out why yet, but it works now. Just Google subclipse and follow the directions for installing it via Eclipse, or ask if you need help. If you already have your files stored in SVN, you just create a new project in Eclipse using the new SVN project wizard.
 
I'm going to pull the hints out into their own file and delete the duplicate XML file. We'll have to make sure the new hints actually get displayed at some point.

I have committed these changes to SVN.
 
I'm currently using the SVN-Version (624) of BUG and have two issues:

1. I can't close the options-screen of BUG. No matter where I put the mod into (the BTS-mod folder in "My Games" or the regular one, Customassets is renamed). With the official version (2.22), I'm having this issue only when I use the BTS-mod folder in "My Games".

2. When I use the arrows above the flag in the main-screen to scroll through my cities, the options- and civilopedia-button on the top right of the screen disappear.
 
I'm currently using the SVN-Version (624) of BUG and have two issues:

1. I can't close the options-screen of BUG. No matter where I put the mod into (the BTS-mod folder in "My Games" or the regular one, Customassets is renamed). With the official version (2.22), I'm having this issue only when I use the BTS-mod folder in "My Games".

2. When I use the arrows above the flag in the main-screen to scroll through my cities, the options- and civilopedia-button on the top right of the screen disappear.

Same here. Seems to screw up the ini-file as all the options are changed. Maybe it has something to do with the deletion of the NJAGCM file ?

Imhotep
 
1. I can't close the options-screen of BUG. No matter where I put the mod into (the BTS-mod folder in "My Games" or the regular one, Customassets is renamed). With the official version (2.22), I'm having this issue only when I use the BTS-mod folder in "My Games".

The options screen won't close if it cannot find the INI file at startup. I am making a fix for this issue but haven't had a chance to finish it yet. For now, put the "BUG Mod.ini" file in "My Games\Beyond the Sword". That should work as long as the game starts up fine, which it sounds like it is.

2. When I use the arrows above the flag in the main-screen to scroll through my cities, the options- and civilopedia-button on the top right of the screen disappear.

This is actually a normal part of the game. Those buttons disappear whenever you select a city by clicking on a city bar. Using the arrows has the same effect.
 
The options screen won't close if it cannot find the INI file at startup. I am making a fix for this issue but haven't had a chance to finish it yet. For now, put the "BUG Mod.ini" file in "My Games\Beyond the Sword". That should work as long as the game starts up fine, which it sounds like it is.

The game starts up fine, but unfortunately it didn't help to put the .ini into "My Games\Beyond the Sword". I still can't close the options-screen.

This is actually a normal part of the game. Those buttons disappear whenever you select a city by clicking on a city bar. Using the arrows has the same effect.

Oh, you're obviously right. :blush: Never noticed that, sorry.

btw: I make progress on the german translation. Although it's sometimes a bit tricky to cope with the available space. :crazyeye:
 
Actually, I commited the new CVPath.py file, so it should go into My Games\BUG Mod, with the AdvUnitRename.ini file, and the CusDomAdvisor folder.
 
I've just committed (version 627) a couple fixes for the INI fiasco.

1. It doesn't use the registry to determine the name "Beyond the Sword" any more. This will fix the problems related to Civ Gold and Complete. It now uses the name of the executable which conveniently contains the part I need.

2. If it cannot find the INI file, the game starts up, the default options are used, you cannot change any option values (not saved when the screen is closed), and it says "Cannot Find INI File" at the bottom of the first (General) tab on the BUG options screen . . . but you can close the screen now.

Please update and try this out.

@Doc - Don't worry too much about space as the screen can scroll. Are you using the latest from SVN so you can see your translations live? Sadly, XML is cached while the game runs, so you have to quit/restart Civ to see your changes.
 
Actually, I commited the new CVPath.py file, so it should go into My Games\BUG Mod, with the AdvUnitRename.ini file, and the CusDomAdvisor folder.

I clobbered that version for now. I found an easy way to get what I need without the registry, so we can revisit where we want the INIs to go. My main reason for leaving them in the "Beyond the Sword" folder is so people don't get surprised when they upgrade. I can still change it. I'm writing our own version of CvPath, specifically so I can tell the user when the INI isn't found and tell them where it's looking.
 
EmperorFool said:
[...]
@Doc - Don't worry too much about space as the screen can scroll. Are you using the latest from SVN so you can see your translations live? Sadly, XML is cached while the game runs, so you have to quit/restart Civ to see your changes.

I know. No on-the-fly editing. :D
The new version works great so far. :goodjob:
 
Back
Top Bottom