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:
- Set the default value to blank.
- When inserting a user comment, if the value is blank, grab the user's nickname (same as above) and use it instead.
- 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.
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.
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.