Development Thread

I'd much prefer to find other values that don't need translation. For example, leave it blank for "User Comment" and to get the default naming convention. Would that work and be clear enough?

Of course the hover text would say "Leave blank to use 'User Comment'" and "Leave blank to use the default naming convention" and "Leave blank to use the unit's normal name".
 
I'd much prefer to find other values that don't need translation. For example, leave it blank for "User Comment" and to get the default naming convention. Would that work and be clear enough?

Of course the hover text would say "Leave blank to use 'User Comment'" and "Leave blank to use the default naming convention" and "Leave blank to use the unit's normal name".

I agree, but for the "User Comment", if possible, I'll put there the player name... (it is already used for the default name of log file).

Speaking of this stuff...

a) Have you already changed the default path for log file to
...\My Games\Beyond the Sword\Autolog ?
I forgot to check :blush:

b) IMHO the default value for using the advanced era-related naming convention should be diabled, as it was previously.
 
I agree, but for the "User Comment", if possible, I'll put there the player name... (it is already used for the default name of log file).

Would it be acceptable to have blank for the value put in the user's name for the log entry? I think the file name should work the same. Instead of changing the option when the log file is opened using the default name, the option should remain blank.

Have you already changed the default path for log file to
...\My Games\Beyond the Sword\Autolog ?

This is going to take some serious though on where exactly all files should go and be looked for. I've gotten so many mixed reviews, and it's changed over time, that I'm just not sure where to put things.

I would greatly appreciate it if the team could decide where things should go, form a consensus, and tell me. These include:

BUG Mod - holds INI and help files.
Autolog

I guess those are it? Also, keep in mind we have to play nice with other mods. This has been the source of confusion for me. People want them in different places with different names depending on situations I cannot detect. :(

Sorry, I'm frustrated by this issue so I'm punting. :crazyeye: Your turn! :)

IMHO the default value for using the advanced era-related naming convention should be diabled, as it was previously.

It is False by default. Is this not working correctly?
 
I just realized that we have a minor information leak. The MA, and now the scoreboard, shows WHEOOH for AIs that you are at war with. But to see WHEOOH you have to enter trade talks with them, and this is impossible while they refuse to speak (start of a war).

Unfortunately, the C++ function AI_isWillingToTalk() is not exposed to Python, so there's no way to fix the problem short of removing the feature entirely. Is everyone okay with this minor leak? AFAICR, I've only seen one case in all my games where an AI was not WHEOOH during a war, so it will rarely leak information you couldn't safely assume yourself.

One fix would be to show any AI at war as WHEOOH. This would lose the extremely rare information that an AI was not WHEOOH during a war and they were willing to talk to you. It's an easy fix; what do you guys think?
 
I just realized that we have a minor information leak. The MA, and now the scoreboard, shows WHEOOH for AIs that you are at war with. But to see WHEOOH you have to enter trade talks with them, and this is impossible while they refuse to speak (start of a war).

Unfortunately, the C++ function AI_isWillingToTalk() is not exposed to Python, so there's no way to fix the problem short of removing the feature entirely. Is everyone okay with this minor leak? AFAICR, I've only seen one case in all my games where an AI was not WHEOOH during a war, so it will rarely leak information you couldn't safely assume yourself.

One fix would be to show any AI at war as WHEOOH. This would lose the extremely rare information that an AI was not WHEOOH during a war and they were willing to talk to you. It's an easy fix; what do you guys think?

I think that we can use a different icon in the WHEOH column for Civs at war, (maybe the "at war" icon itself).
The meaning of that icon will be: "this icon is at war. So probably it's WHEOH, but we have no way to check".
 
I think that we can use a different icon in the WHEOH column for Civs at war, (maybe the "at war" icon itself).

I would recommend against using the "at war" icon for two meanings because it could be confusing. You'd see the icon and might think you were at war with them when they're actually at war with someone else! I don't want to give anyone a heart attack. :p

Plus, when they are in a war, they are still mobilizing for war so it makes sense.
 
I'd much prefer to find other values that don't need translation. For example, leave it blank for "User Comment" and to get the default naming convention. Would that work and be clear enough?

Of course the hover text would say "Leave blank to use 'User Comment'" and "Leave blank to use the default naming convention" and "Leave blank to use the unit's normal name".

So, it's not possible? Or is it too much work? :D
I noticed that you use the translated entries from the XML for the comments in the different INI-files. So, why not translate that stuff for further convenience? :king:

[...]
This is going to take some serious though on where exactly all files should go and be looked for. I've gotten so many mixed reviews, and it's changed over time, that I'm just not sure where to put things.

I would greatly appreciate it if the team could decide where things should go, form a consensus, and tell me. These include:

BUG Mod - holds INI and help files.
Autolog

I guess those are it? Also, keep in mind we have to play nice with other mods. This has been the source of confusion for me. People want them in different places with different names depending on situations I cannot detect. :(

Sorry, I'm frustrated by this issue so I'm punting. :crazyeye: Your turn! :)

Well, you know my opinion on this. I would prefer to have all folders of BUG Mod in one place, regardless of the installation method. That means:
Standard install -> all folders in "My Games\Beyond the Sword" (CustomAssets, BUG Mod, Autolog, PublicMaps)
Mod install -> all folders in "My Games\Beyond the Sword\Mods\BUG Mod" (Assets, BUG Mod, Autolog, PublicMaps)

Isn't it possible to let the mod search in different places for its folders and files? Or maybe if the mod recognizes each file path (which should be identical in all languages) it searches automatically in the corresponding folders for them.

It is False by default. Is this not working correctly?

It's always on when I start a game with a new version. :dunno:
 
So, it's not possible? Or is it too much work? :D
I noticed that you use the translated entries from the XML for the comments in the different INI-files.

Too much work for IMHO very little gain given that there's a decent solution that requires a trivial amount of work. I'd prefer to put my effort into more features.

Isn't it possible to let the mod search in different places for its folders and files?

This is what BUG does now. The problem arises when a folder (Autolog) doesn't exist yet. It currently uses the first location in its search path which is normally "My Games/BTS/BUG Mod" (if that folder exists).

To contrast, Alerum wants "BUG Mod" to be in "My Games/BTS" so that your settings can be shared among both CA and Mods installations (I agree), and he wants Autolog to be placed inside the "BUG Mod" folder (I disagree). Actually, I'm not 100% sure he wants it there. He may want it as a sibling.

Other mod makers want it like you have suggested. I can't make everybody happy unless everyone can agree on a single solution. :)

It's always on when I start a game with a new version. :dunno:

Can you please clarify? Are you saying that you turn it off, but when you do SVN Update it turns back on? Or only after an update and starting a new game? Do any other options get reverted like this?

If you delete "Unit Naming.ini", it will get regenerated with default values. What value do you get when trying this?
 
I just realized that we have a minor information leak. The MA, and now the scoreboard, shows WHEOOH for AIs that you are at war with. But to see WHEOOH you have to enter trade talks with them, and this is impossible while they refuse to speak (start of a war).
As far as I know, WHEOOHs means 'we are at war or planning for war'. I'd just leave it there, small leak and all.
 
Too much work for IMHO very little gain given that there's a decent solution that requires a trivial amount of work. I'd prefer to put my effort into more features.

That means, I have to start learning Python myself, although it's "too much work for IMHO very little gain". :D

This is what BUG does now. The problem arises when a folder (Autolog) doesn't exist yet. It currently uses the first location in its search path which is normally "My Games/BTS/BUG Mod" (if that folder exists).

To contrast, Alerum wants "BUG Mod" to be in "My Games/BTS" so that your settings can be shared among both CA and Mods installations (I agree), and he wants Autolog to be placed inside the "BUG Mod" folder (I disagree). Actually, I'm not 100% sure he wants it there. He may want it as a sibling.

Other mod makers want it like you have suggested. I can't make everybody happy unless everyone can agree on a single solution. :)
So why not provide an Autolog folder with the installation instead of waiting for BUG to generate one? If that's the only reason, the solution is easy.
Can you please clarify? Are you saying that you turn it off, but when you do SVN Update it turns back on? Or only after an update and starting a new game? Do any other options get reverted like this?

If you delete "Unit Naming.ini", it will get regenerated with default values. What value do you get when trying this?

Deleted the Unit Naming.ini. That's what I get:
 
Thinking about it more, I suppose the tiny leak is that you'd know the AI considers you such a small threat while fighting you that they'd be willing to be bribed into a war with someone else. I suppose in that case you're probably toast anyway. ;)

And it's only a leak while they refuse to talk to you.
 
Would it be acceptable to have blank for the value put in the user's name for the log entry? I think the file name should work the same. Instead of changing the option when the log file is opened using the default name, the option should remain blank.

I fear that I've not understood you here... :blush:
Just to be clear, my proposal was to put in the box for user comments, instead of the default text which is there now, the player's name, as default text displayed in that box and that can be changed in the same way in which now the default text can be changed.
I've not understood well your proposal, instead.

This is going to take some serious though on where exactly all files should go and be looked for. I've gotten so many mixed reviews, and it's changed over time, that I'm just not sure where to put things.

If I'm not wrong, we have already discussed and agreeded on this. :blush:
Anyway, we can discuss again, no problem :)

I would greatly appreciate it if the team could decide where things should go, form a consensus, and tell me. These include:

BUG Mod - holds INI and help files.
Autolog

I guess those are it? Also, keep in mind we have to play nice with other mods. This has been the source of confusion for me. People want them in different places with different names depending on situations I cannot detect. :(

Sorry, I'm frustrated by this issue so I'm punting. :crazyeye: Your turn! :)

About the autolog files, IMHO they should be Inside an 'Autolog' folder which should be, directly or undirectly, inside the My Games\BtS folder.
Given this two things, I have no problem if you guys prefer to put this Autolog folder directly inside the BtS folder or in some other subfolder (like BUG Mod or similar). My opinion is that it should be in the same place in which the game places the "Log" folder.
And please remember that here we are speaking only of the default path, each player can change it as he likes, so the modder needs are a bit out of question here, IMHO.


It is False by default. Is this not working correctly?

The checkbox in the option screen now is selected by default (a new BUG install show it selected), I don't know if the real option is also enabled by default.
 
That means, I have to start learning Python myself, although it's "too much work for IMHO very little gain". :D

Yay, another student! :) I actually think you'd have much to gain by learning Python, but I'm a coder so don't mind me. :p

So why not provide an Autolog folder with the installation instead of waiting for BUG to generate one? If that's the only reason, the solution is easy.

Now you're thinking like a (lazy) coder! :goodjob: We still need to agree on a location, but this would work great.

Deleted the Unit Naming.ini. That's what I get:
[broken defaults]

Crikey, how'd I miss that? All checkbox defaults were ignored and forced to on. :eek: This is now fixed and in SVN.
 
Just to be clear, my proposal was to put in the box for user comments, instead of the default text which is there now, the player's name, as default text displayed in that box and that can be changed in the same way in which now the default text can be changed.

I like this, but it would require Python work to make defaults non-static. Right now the default for each option is specified in the mod's <mod>.xml file. They are static, i.e. fixed text that doesn't depend on any other values.

The above would require writing Python to be able to specify in XML a function to be run by BUG. Now, this is possible. One way would be to allow something like this:

Code:
[B]<mod>.xml:[/B]

<option id="CommentPrefix" defaultModule="autolog" defaultFunction="getCommentPrefix" .../>

[B]autolog.py:[/B]
def getCommentPrefix():
    return CyUserProfile().getProfileName()  # return user's nickname

This wouldn't be too hard to do given that I already have the code to handle dynamic function calling. It's just a matter of priorities.

The easy solution that I (poorly) described above is this:

  1. Set the default value to blank.
  2. When inserting a user comment, if the value is blank, grab the user's nickname (same as above) and use it instead.
  3. If the value is not blank, insert whatever it contains.
The advantage to this is that when they change their nickname in the game, they don't also have to change the Autolog option. The disadvantage is that the option will start blank and they'll have to hover over it to learn that their name will be used instead.

Also, to allow a blank prefix, we have to add some other special value (like we have DEFAULT now). Would anyone want a comment without a prefix? I don't know; I don't use Autolog.

This solution would take 15 minutes. The complex solution would take an hour to code (two?) and another hour to test thoroughly. These are conservative estimates. Maybe it would take only one hour total?

However, in that 1-3 hours I could add some other feature that might be more desired, like the WHEOOH in the scoreboard. My time isn't infinite, so choosing one feature means not getting another feature.

If I'm not wrong, we have already discussed and agreeded on this. :blush:

You are not wrong, but we never wrote it down, I remember all the possibilities we came up with, and the consensus changed with 3.0. I think I coded up the agreement we had, but honestly I didn't pay enough attention to remember the decision -- just enough to code it up. :blush:

Right now BUG puts its "BUG Mod" folder into "My Games/BTS". As long as the user doesn't move it, the Autolog folder will get created inside it.

If the user moves this folder, BUG will look in the install folder, in the Mods folder (if it's installed as a mod) and finally in "My Games" itself. It will always create new folders such as Autolog in the first location where it found BUG Mod, but it will look for files and folders in every "BUG Mod" folder which it can find.

The checkbox in the option screen now is selected by default (a new BUG install show it selected), I don't know if the real option is also enabled by default.

Yes, the option had the correct default, but BUG was not handling True/False option defaults correctly. It does now.
 
I would recommend against using the "at war" icon for two meanings because it could be confusing. You'd see the icon and might think you were at war with them when they're actually at war with someone else! I don't want to give anyone a heart attack. :p

Plus, when they are in a war, they are still mobilizing for war so it makes sense.

Yes, you are right :)
 
@EF

Thanks, as usual, for the explanations. :)

About using the UserName for the default pre-comment text, the only thing that it's not so clear to me is why that coding is needed for putting the player name in that box and not for using it for the default name of the log file...
but wait, now that you have fixed that default values bug, see that now the username is not anymore the default name for the log file, now there is an ugly :P 'default.txt' ... so my question is now a bit meaningless... :blush: (edit)
Anyway, from a practical point of view, your proposed solution is good enough for me :)

About the Autolog location, thinking about it more, I can see pluses in both locations, so it's ok anyway.

And now a question: suppose that I want to save my options to avoid to have them resetted to defaults each time I install a new version of BUG from SVN (I don't like some of the new default values, but it's only a matter of personal choices)... is it ok if I save the ini files generated by BUG when I change the default values, and if I then paste these files inside the BUG Mod folder of a new BUG installation?
 
About using the UserName for the default pre-comment text, the only thing that it's not so clear to me is why that coding is needed for putting the player name in that box and not for using it for the default name of the log file...

Because the file name has a separate checkbox "Use default file name". When Autolog opens the log file, it first checks that setting. If it is on, it grabs the player's name and sets the "file name" option to match. So there is no default value in operation with the file name. It uses one option to choose whether or not to overwrite another option with the user's name plus ".txt".

I would prefer to make both options (file name and prefix) work the same way: leave blank to get a default value. Another option would be something like this:

Comment Prefix:
  • Your name
  • Leader name
  • "User Comment" <-- translated, of course
  • Other: ____________ <-- type in a custom value
I just want to know that what I'm adding has real value. Since I don't use Autolog, I cannot easily assess its usefulness.

but wait, now that you have fixed that default values bug, see that now the username is not anymore the default name for the log file, now there is an ugly :P 'default.txt' .

Odd, I deleted Autolog.txt to get a new one generated. The INI shows "autolog.txt" for the file name, but I have default file name checked as well (default). The options screen doesn't show me the file name setting. :confused:

@Ruff - Any ideas?

About the Autolog location, thinking about it more, I can see pluses in both locations, so it's ok anyway.

My preference is that any data created by the user or BUG on the user's behalf (settings and Autolog) be stored outside the BUG folders. This way the user doesn't lose anything when they uninstall/reinstall BUG (update). But I think the uninstaller leaves files that it didn't create itself, so what we have should work too.

Regarding saving your options, you can manage the INI files yourself if you want. BUG will only create them if they don't already exist. Just copy them from the old install to the new one, or simply don't uninstall first.

To keep up to date in SVN, you can checkout BUG directly to your BTS folder. Since BUG no longer has the INI files in SVN, they won't be touched when doing an update.
 
but wait, now that you have fixed that default values bug, see that now the username is not anymore the default name for the log file, now there is an ugly :P 'default.txt' ... so my question is now a bit meaningless... :blush: (edit)

Odd, I deleted Autolog.txt to get a new one generated. The INI shows "autolog.txt" for the file name, but I have default file name checked as well (default). The options screen doesn't show me the file name setting. :confused:

@Ruff - Any ideas?
No. I'll grab the latest copy of BUG and see if I can reproduce the issue.

Re trying to put in translated "User Comments:" ... I don't really understand why the big fuss about making this change in line with the language as this is an INPUT BOX and the user can change it.

@EF - the logger is almost 100% SG related and I have typically only ever seen 2 variants for the user prefix ...

1) the user nick (ie "Ruff_Hi: Stupid AI robbed me blind")
2) the default when the user forgot to change it
 
@EF - the logger is almost 100% SG related and I have typically only ever seen 2 variants for the user prefix ...

1) the user nick (ie "Ruff_Hi: Stupid AI robbed me blind")
2) the default when the user forgot to change it

Given this, I say we go with my suggestion of defaulting it to blank and when it's left blank, the code uses the user's nick.
 
Back
Top Bottom