 |
 |
 |
Battle Buddy, your HentaiVerse companion, How else does Chuck Norris play HentaiVerse? (current: v.2.1.8) |
|
Oct 6 2009, 21:11
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
Yeah, I noticed that too and made a relevant comment in the update thread.
|
|
|
Oct 7 2009, 00:24
|
Aarwyn
Lurker
Group: Recruits
Posts: 6
Joined: 31-December 08

|
I'm not sure if this is what bbgr was talking about, but I'm getting a very strange bug. A round will start fine, the monsters' stats will initialize properly with their hp/maxhp and resists, but then at some point during the round the hp/maxhp will change to NaN/undefined, and the resist list will disappear ([, ]). Attached is an example of when it happened most recently. You can see from the log that it was just after I killed something (this screenshot is from immediately after it happened).  Edit: Just realized that the round marker also disappears. I should also add that once I complete the round, the next round starts fine again. This post has been edited by Aarwyn: Oct 7 2009, 00:32
|
|
|
|
 |
|
Oct 7 2009, 01:04
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
Yes, that's the new issue. The script is re-initialized every time the page is reloaded -- the stats are saved only at the end of the round. So now that the log is getting truncated after 100 lines, that stuff (monster IDs for getting their HP and weaknesses, as well as tracking monsters killed, round numbers, and all actions) gets lost. A new method to parse the log and save the necessary info will need to be devised. Hopefully gillian will get on it soon since I don't know enough about Javascript to fix it myself.
|
|
|
|
 |
|
Oct 7 2009, 01:07
|
masquepiph
Group: Gold Star Club
Posts: 6,823
Joined: 23-February 07

|
QUOTE(cmal @ Oct 6 2009, 19:04)  Yes, that's the new issue. The script is re-initialized every time the page is reloaded -- the stats are saved only at the end of the round. So now that the log is getting truncated after 100 lines, that stuff (monster IDs for getting their HP and weaknesses, as well as tracking monsters killed, round numbers, and all actions) gets lost. A new method to parse the log and save the necessary info will need to be devised. Hopefully gillian will get on it soon since I don't know enough about Javascript to fix it myself.
Could you not simply add it to the cookie? I think you could also probably store the round number somewhere outside the main battle screen (since on my screen there's a lot of extra room), and then load the next round inside the the main div using ajax. Does that make any sense? I'll see if I can't come up with something after arenas tonight lol.
|
|
|
|
 |
|
Oct 7 2009, 01:11
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
The round number and MIDs could easily be stored in the cookie, but I don't know how that would affect cookie longevity (which is already an issue). As for the rest of the battle log I'm lacking in knowledge since I don't speak web (like I said before, I'm an EE not a CE/CP). I also don't want to muck around with it too much since I don't know what gillian's got in the works; he hasn't said anything yet about the changes this update made and Battle Buddy IS his creation and we're contributors.
|
|
|
|
 |
|
Oct 7 2009, 02:41
|
Aarwyn
Lurker
Group: Recruits
Posts: 6
Joined: 31-December 08

|
Doh, I should've figured that out. However, the mechanics for data persistence are already in the script. Could we just move all of the non-end-of-battle data out of the "if (isBattleOver())" block of the saveStats function? It'd effectively rewrite the cookie (_cache.save()) on every page refresh, but I think it'd work, at least until gillian comes up with something more elegant.
Edit: Hmm, sorry, didn't read that cookie longevity was a problem. It doesn't exceed 4kb in length, does it?
This post has been edited by Aarwyn: Oct 7 2009, 02:43
|
|
|
|
 |
|
Oct 7 2009, 03:00
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
The thing about saving to cache on every page load is that it won't be accurate, at least for the current method. What it does is it counts every instance of certain keywords on the page and increments variables. It does this on every page load. The only time it matters is when the battle is over. This is when all of the variables hold the "true" values, so they can be written to cache. A new method for parsing will probably have to be implemented if the current one can't be monkey-wrenched into submission with some minor changes.
|
|
|
|
 |
|
Oct 7 2009, 03:51
|
gillian
Group: Gold Star Club
Posts: 228
Joined: 20-December 08

|
Sorry for the lack of updates. Changes to the code are coming though, I have some free time tonight. Here's what I had in mind: - Find a way to persist the current battle's data, to fix any issues of 0.3.8. Will likely be stored in the Cookie. - provide a set tools to aid contributors, stuff like access battle info, decouple stats colouring/counting etc. I think people really understood the Cache object, and so I believe I'll probably objectify more of the code so that the "dirty work" is done behind the scene. Hope I can get most of it done today. It's just so hard to come home from a full day of coding (at work) and come home to remember what I was doing with BB code (IMG:[ invalid] style_emoticons/default/tongue.gif)
|
|
|
|
 |
|
Oct 7 2009, 07:07
|
gillian
Group: Gold Star Club
Posts: 228
Joined: 20-December 08

|
New update: v 2.1.8: added persistence for round and monster info (to compensate for 0.3.8's 100 log limit), however, stats are still skewed and have not been compensated for. community devs, do your thing! Download base Battle Buddy here [ dumpsandbox.appspot.com] http://dumpsandbox.appspot.com/bb/release/...e_buddy.user.js
|
|
|
Oct 7 2009, 07:08
|
Beryl
Group: Gold Star Club
Posts: 8,931
Joined: 25-May 06

|
Gillian, I have to tell you, you're awesome.
|
|
|
Oct 7 2009, 07:48
|
oumi11
Group: Members
Posts: 2,137
Joined: 2-April 08

|
Maybe it is just me but 2.1.8 doesn't save/show my battle stats. It keeps saying "No stats saved yet - play at least one round!" even after I've just beaten a round.
|
|
|
Oct 7 2009, 07:59
|
gillian
Group: Gold Star Club
Posts: 228
Joined: 20-December 08

|
QUOTE(oumi11 @ Oct 6 2009, 22:48)  Maybe it is just me but 2.1.8 doesn't save/show my battle stats. It keeps saying "No stats saved yet - play at least one round!" even after I've just beaten a round.
Were you using any other version before? There are so many cookies going around that the best thing to do is just clear cookies for hv.e-hentai.org Let me know if that fixes things
|
|
|
Oct 7 2009, 08:06
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
Cool beans. I'll try to get a quick fix for the round/mob persistence out for Enhanced ASAP but I can't guarantee 100% for it yet. Gotta take a look at what's changed between versions.
|
|
|
Oct 7 2009, 08:07
|
oumi11
Group: Members
Posts: 2,137
Joined: 2-April 08

|
Yeah. I had already done that.
#1) Uninstalled a previous battlebuddy #2) Cleared hv.e-hentai.org #3) Restarted firefox (just in case) #4) Installed 2.1.8
It just doesn't display.
|
|
|
Oct 7 2009, 08:14
|
gillian
Group: Gold Star Club
Posts: 228
Joined: 20-December 08

|
QUOTE(oumi11 @ Oct 6 2009, 23:07)  Yeah. I had already done that.
#1) Uninstalled a previous battlebuddy #2) Cleared hv.e-hentai.org #3) Restarted firefox (just in case) #4) Installed 2.1.8
It just doesn't display.
Ah, yeah, I had a debug variable set that prevented the saving of stats. Please reinstall Battle Buddy 2.1.8, and it should work.
|
|
|
Oct 7 2009, 09:01
|
hen_Z
Group: Members
Posts: 499
Joined: 31-August 09

|
If someone could enlighten me on how to get the number of current battle turn (y'know, the first number in every line), then I most likely will be able to make stats persist.
My idea: store stats in the cookie, on and every refresh parse only the current turn, and directly increase cookie'd stats.
|
|
|
|
 |
|
Oct 7 2009, 09:11
|
gillian
Group: Gold Star Club
Posts: 228
Joined: 20-December 08

|
QUOTE(hen_Z @ Oct 7 2009, 00:01)  If someone could enlighten me on how to get the number of current battle turn (y'know, the first number in every line), then I most likely will be able to make stats persist.
My idea: store stats in the cookie, on and every refresh parse only the current turn, and directly increase cookie'd stats.
If you look at the code, I've added a BBround object, which I've made to store all the information that should persist in that round. I have the logic to check if it's the first turn of the round (that's when I save the monster HPs and round number). You can add more properties into the BBround object, and copy the code and change it to check only the last turn. Cmal you should take a look as well, you probably have a good understanding of the code by now. Cheers This post has been edited by gillian: Oct 7 2009, 09:11
|
|
|
|
 |
|
Oct 7 2009, 09:13
|
grumpymal
Group: Gold Star Club
Posts: 10,923
Joined: 2-April 08

|
Okay ladies and gentlemen, here's Enhanced updated to match the new updates in the main script. Like the main script, the stats tracking are still borked. I just did a quick test run in an Hourly to make sure it was working without error, so if any bugs crawl out due to the difference merging, let me know so they can get the boot.
@gillian: I see you create a second temporary cookie for holding round info. I was actually thinking of doing the same thing as a temporary measure if you hadn't said anything about a quick update soon. I've still got a copy of the script version where I split off the item arrays for reference, so I knew it could be done and had already done it once.
@hen_Z: The only thing that comes to mind is looking at the log pane and comparing the turn numbers. If the turn number is the same, its still the same turn, so log this stat. If its less than, you're in the last turn so stop. Pretty sure this is possible since that's what some of the magic the script does is based on, just don't know how.
Edit: LOL, replies while I was typin' mah post. I saw what you had done gillian, so I was gonna investigate it some more later to see what I could get it to do.
This post has been edited by cmal: Oct 7 2009, 09:15
|
|
|
|
 |
|
Oct 7 2009, 22:00
|
oumi11
Group: Members
Posts: 2,137
Joined: 2-April 08

|
I'm sorry but what exactly is battle buddy enhanced and how do I use it?
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |
 |
 |
|