BUFFY-3.19.002 Public Beta (Released!)

Status
Not open for further replies.
I think I changed this as I viewed logging the header when nothing needed to be logged as a bug. I should have added it to the changelog for sure, and I completely forgot I had done it. I was just doing routine code cleanup while working on something else, and it caught my attention.
What did you actually change to 'break' it?
 
The change I made in mid-September was to have changes to the log file name and path take effect immediately by logging to the new file right away instead of making the user stop/start logging. While doing that I also made it so that it waits until it gets an actual log entry to open() and write() the header. I did this because Civ4 triggers a change event for each character you type in the path/file option fields. This would produce a string of log files containing just the heading whenever you changed the name. Ugly!

I never thought someone was depending on that empty heading. I wonder if there's a better way to solve the current "problem." What is the problem? Do you want a heading each time you start/load a game? Really? Is it perhaps that you want a better way to know that logging is on? How about a message on screen when logging starts?

Logging to autolog.txt​

This seems like much better, immediate feedback than spamming the log file.
 
IIRC - you get feedback if you uncheck the 'silent' option. I put in the 'silent' option to suppress the feedback.
 
I thought you changed the Start Silently option so that it starts the logging automatically. If you uncheck it, you need to hit ALT + L to start the logger each time you start/load a game. Or does it start automatically as long as it is Enabled?

I also think it would be a great thing to have the name of the log be stored in the saved game, but that's a whole different can of worms.
 
I'm not sure - let me check the code and let you know.

isSilent ...
if FALSE, you get an on screen message that the logger started
if FALSE, custom entries are mirrored to the screen
if TRUE and you hit Alt-L, logging starts with the default name (if FALSE, asks you for the name)
if TRUE and logging is enabled, starts automatically

So, if isSilent is FALSE and logging is enabled, then you need to hit Alt-L to start the logger.

My question for later is ... what does 'enabled' do? Because it looks like you can turn it on even if it is disabled.
 
I remember discussing this way back when, and your summary matches my recollection of that time: it is confusing. Here's how I would design it:

Enabled

If unchecked, the entire logging system is disabled. ALT + L does nothing. No log is started. Nothing happens.

Start Automatically

Starts logging when a game is started/loaded. If unchecked, you must use ALT + L.

Must be careful to stop logging when a new game is started/loaded and this option is off. If on, must make sure to pick up correct file name for the new game.

Silent (unnecessary in my view)

If checked, suppress the "logging started" message. I don't think any user entries should be sent to the screen. You just typed it in, why bother putting it on screen. But if this option exists, it should probably control that display as well.

File Name

We need separate options to control the name of the log file. I can't see any use in having a static file name such as "autolog.txt". Instead, I would suggest a) storing the filename in the saved game and b) adding a dropdown with choices on how to name the log file initially: 1. player name, 2. leader + civ (or something like the MapFinder uses which combines a lot of the game settings), 3. custom (asks user upon starting).
 
I remember discussing this way back when, and your summary matches my recollection of that time: it is confusing. Here's how I would design it:

Enabled

If unchecked, the entire logging system is disabled. ALT + L does nothing. No log is started. Nothing happens.

Start Automatically

Starts logging when a game is started/loaded. If unchecked, you must use ALT + L.

Must be careful to stop logging when a new game is started/loaded and this option is off. If on, must make sure to pick up correct file name for the new game.

Silent (unnecessary in my view)

If checked, suppress the "logging started" message. I don't think any user entries should be sent to the screen. You just typed it in, why bother putting it on screen. But if this option exists, it should probably control that display as well.

File Name

We need separate options to control the name of the log file. I can't see any use in having a static file name such as "autolog.txt". Instead, I would suggest a) storing the filename in the saved game and b) adding a dropdown with choices on how to name the log file initially: 1. player name, 2. leader + civ (or something like the MapFinder uses which combines a lot of the game settings), 3. custom (asks user upon starting).

I'll throw in my two cents worth: the Enabled, Start Automatically and Silent functions as you describe make perfect sense and are actually how I thought they currently worked. Default conditions shold be to have all three checked, IMO.

Also IMO, having the autolog file naming options as you described would be great, especially if you're playing two BTS games at once (e.g., playing the next Succession Game and also playing the current BOTM in between your SG turn sets). The HOF-1.74.004 Mod has a pop-up window at the start of a new or loaded saved game asking for the name of the file, with the default being "autolog.txt". Would it be possible to have a similar pop-up window for BUFFY having the dropdown choices you described? :please:
 
File Name

We need separate options to control the name of the log file. I can't see any use in having a static file name such as "autolog.txt". Instead, I would suggest a) storing the filename in the saved game and b) adding a dropdown with choices on how to name the log file initially: 1. player name, 2. leader + civ (or something like the MapFinder uses which combines a lot of the game settings), 3. custom (asks user upon starting).

My logging filename is always autolog.txt. This is another place where your changes caused me some grief. BUFFY-3.19.002 has a static filename of <Player Name>.txt and not autolog.txt as I expected. I had to disable the default filename option and enter the expected Path which was initialized to the empty string.

Perhaps, the default Path is what ought to be in the Path text box rather than the empty string. Alternatively, the empty string could be interpreted as the current directory which might be the Mod's installation directory.

I really don't care that the filename is static or dynamic as long as I'm forced to set it at most once after installing a new Mod. Actually, is there some way to import settings from BUFFY-3.19.001 into BUFFY-3.19.002? It was a bit of a pain to use the BUFFY GUI to set things up in BUFFY-3.19.002 the way I had them in BUFFY-3.19.001.

Setting the autolog filename to be the same as the Map-Finder filename used to originally start the Game might be useful, assuming that name is tucked away somewhere that is accessible in the Game Save file. Now that would be useful, since one would never have to enter any filename ever; Just enable logging and play! In this case the autolog file should probably be saved in the same directory as the Game Save file so that they are less likely to be separated. I would change the extension from txt to log to avoid conflict with MapFinder's use of the txt extension.

Sun Tzu Wu
 
You can always copy the UserSettings folder from one mod to another. I thought that an empty path set it to the Autolog folder in the mod's folder and an empty file name set it to autolog.txt.
 
You can always copy the UserSettings folder from one mod to another.

Maybe the install script could ask the User whether they want to do this and then the script could "copy the UserSettings folder from one mod to another". It would presumably do so with more precision and faster than any normal User of the Mod could do it themselves.

Sun Tzu Wu
 
Better would be to have BUFFY install the original UserSettings folder to My Games \ Beyond the Sword \ BUFFY \ UserSettings so it would be shared across all installations of BUFFY.
 
Oh? No, in that case you should have seen a cyan 1 in the scoreboard (2 if that visible city wasn't their capital). It should never be blank because it can always assume a capital. Could you email/PM me a save please?
Silly question of the day, how can I attach a file to a PM? Or to a server email?
I hadn't considered religious visibility. How does that show up in the game?
You see the city and it's surroundings illuminated, just as if you had a unit in the city.

I also didn't consider trade routes. Can you have a trade route to a city that you haven't revealed? My guess is no, and I don't need to consider them, but I'm not sure.
Yes, you can, sometimes I have had traderoutes to cities of a civ I hadn't seen any city from or not the capital. They have had to explore your land and you must be close to see their cities, in my experience.
 
You see the city and it's surroundings illuminated, just as if you had a unit in the city.
I don't think that this is correct for BtS (I think it was correct for Vanilla and Warlords). My understanding for BtS is that city visibility is 100% driven via espionage points (EPs). Having you religion in the city reduces the number of EPs required.
 
Keep in mind that the city list only requires a city to be revealed on the map; you don't need to actively see it via a unit or EPs.

I suppose I could work in the cities revealed by trade routes.
 
Just realized that my EP screen is revealing hidden information. It shows revealed cities (as per normal) but also puts in cities that you haven't seen (not active, so no mission information is shown). However, it shouldn't show them if you cannot talk to the AI. Is there a neat little EF style function that tells me if the AI will talk? Guess I should check the score board code ... or somewhere else (any suggestion gladly used).
 
Does the normal screen hide the cities? I don't see how they could since that function isn't exposed.

In any case, if you want to hide the cities you want PlayerUtil.canSeeCityList() IIRC. The function name is definitely right, but it may be in a different module. If that returns False, you'll have to check if each city is revealed to the active team.
 
the vanilla EP screen only shows cities where the player can see the plot. The BUG version shows all of the cities but shows '-- New York --' if the plot isn't revealed.
 
Another facet of the bug described by ruff:

The "Top 5 Cities/Wonders" screen shows that an enemy is building a wonder, if you have enough EP to investigate the city where it's being built.

However, it does this even when you haven't revealed the city.

Note: you must have revealed the city, not just the plot, in vanilla BtS.
 
hmm - are you sure? Here is the code ...
Code:
if (self.pActiveTeam.isHasMet(iPlayerTeam)
and self.pActivePlayer.canDoEspionageMission(self.iInvestigateCityMission, pCity.getOwner(), pCity.plot(), -1)):
	self.aaWondersBeingBuilt_BUG.append([iProjectLoop,pPlayer.getCivilizationShortDescription(0), pCity, iPlayerLoop])
I would have thought that the 'canDoEspionageMission' part would take care of the 'city revealed' part. If not, then we should be able to add a ...

CyCity.isRevealed(TeamType eIndex, BOOL bDebug)

... that should catch it. Do you have a save that illustrates this?
 
Status
Not open for further replies.
Back
Top Bottom