Character Info Toolbox

I'm working on some Glaciest stuff which I intend to finish before I update.

Yea Bale! I was about 5% into a thought about adding a possible Walford tracker, but I have a feeling you will finish before I do.
 
In the hover text for effects, effects that give +ML are showing "<span class=modml>ML</span> X" (without quotes, with the value replacing X). Otherwise that's looking great.
 
modifyPage includes this section for version checking:
Code:
	//Check for updates (once a day)
	if(vars["chit.checkversion"]=="true" && svn_exists("mafiachit")) {
		if(get_property("_svnUpdated") == "false" && !svn_at_head("mafiachit")) {
			if(get_property("_chitChecked") != "true")
				print("Character Info Toolbox has become outdated. It is recommended that you update it from SVN...", "red");
			bakeUpdate(svn_info("mafiachit").revision, "Revision ", svn_info("mafiachit").last_changed_rev);
			set_property("_chitChecked", "true");
		}
	}

This means that if chit.checkversion is true, svn_at_head() will be run on every refresh of the charpane (not just once per day as the comment would indicate). This can cause pretty lengthy delays. Is that intended behaviour?
 
I am seeing Walford quest at 0%, with the following properties :
questECoBucket(user, now 'unstarted', default unstarted)
walfordBucketItem(user, now '', default )
walfordBucketProgress(user, now '0', default 0)
_walfordQuestStartedToday(user, now 'true', default false)

This is correct for having started and completed the quest. You are not checking quest status. I'd recommend checking just questECoBucket != "unstarted".
 
modifyPage includes this section for version checking:
Code:
	//Check for updates (once a day)
	if(vars["chit.checkversion"]=="true" && svn_exists("mafiachit")) {
		if(get_property("_svnUpdated") == "false" && !svn_at_head("mafiachit")) {
			if(get_property("_chitChecked") != "true")
				print("Character Info Toolbox has become outdated. It is recommended that you update it from SVN...", "red");
			bakeUpdate(svn_info("mafiachit").revision, "Revision ", svn_info("mafiachit").last_changed_rev);
			set_property("_chitChecked", "true");
		}
	}

This means that if chit.checkversion is true, svn_at_head() will be run on every refresh of the charpane (not just once per day as the comment would indicate). This can cause pretty lengthy delays. Is that intended behaviour?

Sure, that block of code will run every time. And generally it will exit as soon as it finds that _svnUpdated is true, so nothing should be slow. Sourceforge issues could slow things down though.
 
I am seeing Walford quest at 0%, with the following properties :
questECoBucket(user, now 'unstarted', default unstarted)
walfordBucketItem(user, now '', default )
walfordBucketProgress(user, now '0', default 0)
_walfordQuestStartedToday(user, now 'true', default false)

This is correct for having started and completed the quest. You are not checking quest status. I'd recommend checking just questECoBucket != "unstarted".

I might have missed something in the other thread when I brought up the issue. The quest is now being set to unstarted when it is completed, instead of finished?
 
Sure, that block of code will run every time. And generally it will exit as soon as it finds that _svnUpdated is true, so nothing should be slow. Sourceforge issues could slow things down though.

AFAIC see, _svnUpdated is only set when a full update happens. So if I don't have update on login enabled, and forget to "svn update", then CHIT *will* call svn_at_head with each charpane update ...

And if I open relay browser fast enough, it will also run at least once before svn update finishes.
 
I might have missed something in the other thread when I brought up the issue. The quest is now being set to unstarted when it is completed, instead of finished?
Yes, because it isn't ever really finished, never appears in the finished tab. I just didn't do it right first time.
Taking quest sets _walfordQuestStartedToday to true, as you can only start one a day, but can finish two. It also sets walfordBucketItem as the item to get, and questECoBucket to started. walfordBucketProgress is set to 0.
Then equipping bucket sets questECoBucket to step1.
Filling bucket increments walfordBucketProgress (hopefully it is catching it all now), and when it get to 100 or more, sets questECoBucket to step2.
Handing in quest sets questECoBucket to unstarted, walfordBucketProgress to 0 and walfordBucketItem to blank.
 
One Walford Suggestion - It would be great to turn the "Walford" text another color (red maybe) if the bucket was NOT equipped, and green if the collection was at 100%.

Like this:
PHP:
void addWalfordBucket(buffer result) {
	if(have_equipped($item[Walford's bucket]) || to_boolean(get_property("_walfordQuestStartedToday"))) {
		int current = get_property("walfordBucketProgress").to_int();
		result.append('<tr><td class="label"><a href="place.php?whichplace=airport_cold&action=glac_walrus" target="mainpane">');
		if (current==100) {
			result.append('<span style=color:green>Walford</span>');
		} else if (!have_equipped($item[Walford's bucket])) {
			result.append('<span style=color:red>Walford</span>');
		} else {
			result.append('Walford');
		}
		result.append('</a></td>');
		result.append('<td class="info"><a href="place.php?whichplace=airport_cold&action=glac_walrus" target="mainpane">');
		result.append(current);
		result.append(' % </a></td>');
		if(to_boolean(vars["chit.stats.showbars"])) {
			result.append('<td class="progress"><div class="progressbox" title="');
			result.append(current);
			result.append('% full of ');
			result.append(get_property("walfordBucketItem"));
			result.append('"><a href="place.php?whichplace=airport_cold&action=glac_walrus" target="mainpane"><div class="progressbar" style="width:');
			result.append(current);
			result.append('%"></div></a></div></td>');
		}
		result.append('</tr>');
	}
}
 
AFAIC see, _svnUpdated is only set when a full update happens. So if I don't have update on login enabled, and forget to "svn update", then CHIT *will* call svn_at_head with each charpane update ...
Like xKiv says, _svnUpdated is not set to true by that block running, so svn_at_head() is run on every refresh.
Yeah, makes sense to check both _chitChecked and _svnUpdated. I don't have a general-purpose fix in mind.


I think that a better solution might be...

PHP:
	if(vars["chit.checkversion"]=="true" && svn_exists("mafiachit") && get_property("_svnUpdated") == "false") {
		if(get_property("_chitSVNatHead").length() == 0)
			set_property("_chitSVNatHead", svn_at_head("mafiachit"));
		if(get_property("_chitSVNatHead") == "false") {
			if(get_property("_chitChecked") != "true")
				print("Character Info Toolbox has become outdated. It is recommended that you update it from SVN...", "red");
			bakeUpdate(svn_info("mafiachit").revision, "Revision ", svn_info("mafiachit").last_changed_rev);
			set_property("_chitChecked", "true");
		}
	}
 
I decided to push that fix. Anyone having a problem should update so that it can stop being slow when it checks if you updated. I hadn't realized until now that it would be doing that every single time.

This is not perfect since now the check version brick won't go away unless you do a fulls svn update. Urgh. I'll think about that. Of course the brick can be disabled, but this is a huge problem the way it was.

Edit: Ah. Solved that last issue. It was simplicity itself. This should be completely fixed now.
 
Last edited:
Hooray! Whatever you did today fixed the slow sidebar load. Thanks!

Am I supposed to always be seeing Walford on the side? How do I hide it? I don't see a var for showing it.
 
Am I supposed to always be seeing Walford on the side? How do I hide it? I don't see a var for showing it.

At the moment you should see it if you started the quest this day. I'll make it more specific later when I have the time to look into it better.
 
Back
Top