Woo! I can't wait to see those new changes Smile

I hope some of my suggestions and requests have made it into the tokens files?
I think they're up to date with your fixes. It's possible I missed some, though.
Started the code for Battle Screen HP recovery. Thought I'd need to run the emulator, stop it after the HP bar was thrown up, and then get my coordinates from that. Had forgotten I could just get it from the program that generates it, so I'll be looking into that soon. Shouldn't take long to write the code for that and get it working so I can move on to other items.

Code:
If Tmin>0 and Z=1:Then:
ClrDraw:RecallPic Pic1:
If L1(1)=L1(2:Then:
Text(47,4,"HYPER POTION":Text(53,4,"INEFFECTIVE!":
prgmZWT:1->W:For(F,3,14:Line(3,F,90,F,0:End:End:
If L1(1)<L1(2):Then:
"rowSwap(ZNA"->Str0:0->theta:L1(43:prgmZCE:
Text(47,4,"USED HYPER POTION!":
L1(1)->X:L1(2)->V:
If V-X<200:Then:V-X->J:
If V-X>=200:200->J:X+J->|N:
While X!=|N:
min(|N,X+5)->X:
iPart((|E2(X/V)).25->K:
Line(65,25,65+K,25:
End:
For(F,4,14):Line(4,F,90,F,0):End
Text(47,4,Str9," GAINED":
Text(53,4,J," HP!":
prgmZWT:



End:
If (Tmin>0 and Z>1) or Tmin=0:Then:
"|LP"+sub("123456",Z,1)->Str7:
4->theta:"ZTMP3"->Str0:prgmZCE:
3->theta:prgmZCE:
Str7+"(1)"+sub(str9,1,1)+"X:"
+Str7+"(2)"+sub(Str9,1,1)+"V:
For(F,0,17:Line(0,F,94,F,0:End:"0ZBD":
prgmZRS:{94,0,3,27:prgmTEMP:prgmZC1:
If X=V:Then:
Text(47,4,"+sub(Str9,2,1)+"HYPER POTION"+sub(Str9,2,1)+":
Text(53.4."+sub(Str9,2,1)+"INEFFECTIVE!"+sub(Str9,2,1)+":
1.5"+sub(Str9,1,1)+"W:Return:
End:
If X<V:Then:
If V-X<200:V-X"+sub(Str9,1,1)+"J:
If V-X>=200:200"+sub(Str9,1,1)+"J:
X+J"+sub(Str9,1,1)+"|N:
Text(47,4,"+sub(Str9,2,1)+"USED HYPER POTION!"+sub(Str9,2,1)+":
While X!=|N:
min(|N,X+5)"+sub(Str9,1,1)+"X:
Text(7+21(Z!=4 and Z>1)+21(Z=3 or Z=6),(2+52(Z>3))+4(2-int(log(X))),X:
iPart((|E2(X/V)).25"+sub(Str9,1,1)+"K:
68-21(Z-3(Z>3))"+sub(Str9,1,1)+"I:
Line(2+52(Z>3),I,2+(52(Z>3))+K,I:
End:
X"+sub(Str9,1,1)+Str7+"(1):
For(F,4,14:Line(4,F,90,F,0:End:
0"+sub(Str9,1,1)+"theta:"+sub(Str9,2,1)+"ZPNA"+sub(Str9,2,1)+sub(Str9,1,1)+"Str0:"+
Str7+"(43):prgmZCE:
Text(47,4,"+Str9+","+sub(Str9,2,1)+" 'S HP INCREASED BY"+sub(Str9,2,1)+":
Text(53,4,J,"+sub(Str9,2,1)+" POINTS!"+sub(Str9,2,1)+":
prgmZWT:1"+sub(Str9,1,1)+"W:Return:End:End


What I have so far, getting close to being able to test it on calc/emulator.
I'm curious if SourceCoder + jsTIfied would help you iterate some of these tests faster when you don't have your calculator handy. Wink What's still to be done on this code that is preventing you from testing it out?
I have to make sure to set a few variables (Can't remember what they are off hand), make sure it looks like the code will run properly, and make it all be on one line so I can drop it into the appvar to test.

And I already have a ROM image set up for it with Wabbitemu, just a matter of updating the list file and dropping the list and appvar into the emulator.
I went on a bit of a trip yesterday, 4 hour drive time one way, so I took some time to work on the Hyper Potion item. Here's some screen shots.



The above screenshot was to show me the problem I was running into so I didn't keep getting distracted and forgetting and having to run it on the emulator. The problem ended up being a stray 'Then' command that was messing things up.

Then it popped up with this:



As you can see, messed up on the recalling of the name. I had typed in ZNA instead of ZPNA for the appvar for it to look at. Simple enough fix.

http://tifreakware.net/tifreak8x/pokemon/ss/battlehptestcase3.gif

This one was really long by mistake. Oops. Shows that I had forgotten to update the list with the new HP value. Silly me.



It works!



And to be sure it maxes out properly. Which it did.
Coding while driving, eh? That's pretty impressive multitasking! Wink Anyway, great job tracking down those three bugs and discovering that other features were working properly. Excelsior!
Haha, well, I was riding, Dad did the driving.

I still have to figure out why it's not working for the party pokemon. So much fun that is going to be.
That looks great! And it seems plenty speedy enough, which is always a concern of mine when it comes to animation in BASIC Smile
Thanks shaun! It was a bit of a concern for me as well, I'm just happy it moves along quickly enough. I'm sure it would be far more noticeable on a pokemon with less of an HPMax value. Smile

Code:
If Tmin>0 and Z=1:Then:ClrDraw:RecallPic Pic1:If L1(1)=L1(2):Then:Text(47,4,"HYPER POTION"):Text(53,4,"INEFFECTIVE!"):prgmZWT:1->W:For(F,3,14):Line(3,F,90,F,0):End:End:If L1(1)<L1(2):Then:"rowSwap(ZPNA"->Str0:0->theta:L1(43):prgmZCE:Text(47,4,"USED HYPER POTION!"):L1(1)->X:L1(2)->V:If V-X<200:V-X->J:If V-X>=200:200->J:X+J->|N:While X!=|N:min(|N,X+5)->X:iPart((|E2(X/V)).25->K:Line(65,25,65+K,25):End:For(F,4,14):Line(4,F,90,F,0):End:Text(47,4,Str9," GAINED"):Text(53,4,J," HP!"):X->L1(1):prgmZWT:For(F,4,14):Line(4,F,90,F,0):End:StorePic Pic1:DelVar Pic2:1.5->W:End:


If (Tmin>0 and Z>1) or Tmin=0:Then:"|LP"+sub("123456",Z,1)->Str7:4->theta:"ZTMP3"->Str0:prgmZCE:3->theta:prgmZCE:expr(Str7+"(1)")->X:expr(Str7+"(2)")->V:For(F,0,17:Line(0,F,94,F,0:End:"0ZBD":prgmZRS:{94,0,3,27:prgmTEMP:prgmZC1:If X=V:Then:Text(47,4,"+sub(Str9,2,1)+"HYPER POTION"+sub(Str9,2,1)+":Text(53.4."+sub(Str9,2,1)+"INEFFECTIVE!"+sub(Str9,2,1)+":1.5"+sub(Str9,1,1)+"W:Return:End:If X<V:Then:If V-X<200:V-X"+sub(Str9,1,1)+"J:If V-X>=200:200"+sub(Str9,1,1)+"J:X+J"+sub(Str9,1,1)+"|N:Text(47,4,"+sub(Str9,2,1)+"USED HYPER POTION!"+sub(Str9,2,1)+":While X!=|N:min(|N,X+5)"+sub(Str9,1,1)+"X:Text(7+21(Z!=4 and Z>1)+21(Z=3 or Z=6),(2+52(Z>3))+4(2-int(log(X))),X:iPart((|E2(X/V)).25"+sub(Str9,1,1)+"K:68-21(Z-3(Z>3))"+sub(Str9,1,1)+"I:Line(2+52(Z>3),I,2+(52(Z>3))+K,I:End:X"+sub(Str9,1,1)+Str7+"(1):X"+sub(Str9,1,1)+Str7+"(1):For(F,4,14:Line(4,F,90,F,0:End:0"+sub(Str9,1,1)+"theta:"+sub(Str9,2,1)+"ZPNA"+sub(Str9,2,1)+sub(Str9,1,1)+"Str0:"+Str7+"(43):prgmZCE:Text(47,4,"+Str9+","+sub(Str9,2,1)+" 'S HP INCREASED BY"+sub(Str9,2,1)+":Text(53,4,J,"+sub(Str9,2,1)+" POINTS!"+sub(Str9,2,1)+":prgmZWT:1"+sub(Str9,1,1)+"W"->Str9:1->theta:"ZTMP3"->Str0:prgmZCE:prgmZTMP3:6-theta:prgmZCE:End


The second segment of the code is where I'm currently having my issues with. I'll get around to cutting through the code as I have time over the course of the next few days.
It seems that the first segment of the code was partially causing my problems. I failed to add in the appropriate 'End' statement to finish off the first If Then. That has partially fixed my issues. I went from:



to where it now does this:



NOW it looks like the issues are within the second chunk of code.


Code:
If (Tmin>0 and Z>1) or Tmin=0:Then:
"|LP"+sub("123456",Z,1)->Str7:4->theta:
"ZTMP3"->Str0:prgmZCE:3->theta:prgmZCE
:expr(Str7+"(1)")->X:expr(Str7+"(2)")->V:
For(F,0,30:Line(0,F,94,F,0:End:
"0ZBD":prgmZRS:{94,0,3,27:prgmTEMP:prgmZC1:
"If X=V:Then:Text(47,4,"+sub(Str9,2,1)+"HYPER POTION"+sub(Str9,2,1)+":Text(53.4."+sub(Str9,2,1)+"INEFFECTIVE!"+sub(Str9,2,1)+":1.5"+sub(Str9,1,1)+"W:Return:End:If X<V:Then:If V-X<200:V-X"+sub(Str9,1,1)+"J:If V-X>=200:200"+sub(Str9,1,1)+"J:X+J"+sub(Str9,1,1)+"|N:Text(47,4,"+sub(Str9,2,1)+"USED HYPER POTION!"+sub(Str9,2,1)+":While X!=|N:min(|N,X+5)"+sub(Str9,1,1)+"X:Text(7+21(Z!=4 and Z>1)+21(Z=3 or Z=6),(2+52(Z>3))+4(2-int(log(X))),X:iPart((|E2(X/V)).25"+sub(Str9,1,1)+"K:68-21(Z-3(Z>3))"+sub(Str9,1,1)+"I:Line(2+52(Z>3),I,2+(52(Z>3))+K,I:End:X"+sub(Str9,1,1)+Str7+"(1):X"+sub(Str9,1,1)+Str7+"(1):For(F,4,14:Line(4,F,90,F,0:End:0"+sub(Str9,1,1)+"theta:"+sub(Str9,2,1)+"ZPNA"+sub(Str9,2,1)+sub(Str9,1,1)+"Str0:"+Str7+"(43):prgmZCE:Text(47,4,"+Str9+","+sub(Str9,2,1)+" 'S HP INCREASED BY"+sub(Str9,2,1)+":Text(53,4,J,"+sub(Str9,2,1)+" POINTS!"+sub(Str9,2,1)+":prgmZWT:1"+sub(Str9,1,1)+"W"->Str9:1->theta:"ZTMP3"->Str0:
prgmZCE:prgmZTMP3:6-theta:prgmZCE:End
is what I'm currently looking through to figure out where my errors are.
Hey Tifreak8x

I've given up Pokemon, but I'd like my sprites to go to good use if you want them.
I suppose I can take a look at them, but I can't make any promises on the using them, since I already have the 151 pokemon sprites done. I just have the NPCs left to complete.
tifreak8x wrote:
I suppose I can take a look at them, but I can't make any promises on the using them, since I already have the 151 pokemon sprites done. I just have the NPCs left to complete.


thats fine.

453 of them, all 151 pokemon, three frames apiece.

Made specifically for monochrome display, IMO they're way better than the game rips.

Code:
If Tmin>0 and Z=1:Then:ClrDraw:RecallPic Pic1:If L1(1)=L1(2:Then:Text(47,4,"HYPER POTION":Text(53,4,"INEFFECTIVE!":prgmZWT:1->W:For(F,3,14:Line(3,F,90,F,0:End:End:If L1(1)<L1(2:Then:"rowSwap(ZPNA"->Str0:0->theta:L1(43:prgmZCE:Text(47,4,"USED HYPER POTION!":L1(1)->X:L1(2)->V:If V-X<200:V-X->J:If V-X>=200:200->J:X+J->|N:While X!=|N:min(|N,X+5)->X:iPart((|E2(X/V)).25->K:Line(65,25,65+K,25:End:For(F,4,14:Line(4,F,90,F,0:End:Text(47,4,Str9," GAINED":Text(53,4,J," HP!":X->L1(1):prgmZWT:For(F,4,14:Line(4,F,90,F,0:End:StorePic Pic1:DelVar Pic2:1.5->W:End:End:If iPart(W)=1:Return:If (Tmin>0 and Z>1) or Tmin=0:Then:"|LP"+sub("123456",Z,1)->Str7:4->theta:"ZTMP3"->Str0:prgmZCE:3->theta:prgmZCE:expr(Str7+"(1)")->X:expr(Str7+"(2)")->V:"If X=V:Then:For(F,0,30:Line(0,F,94,F,0:End:"0ZBD":prgmZRS:{94,0,3,27:prgmTEMP:prgmZC1:Text(47,4,"+sub(Str9,2,1)+"HYPER POTION"+sub(Str9,2,1)+":Text(53.4."+sub(Str9,2,1)+"INEFFECTIVE!"+sub(Str9,2,1)+":1.5"+sub(Str9,1,1)+"W:Return:End:If X<V:Then:If V-X<200:V-X"+sub(Str9,1,1)+"J:If V-X>=200:200"+sub(Str9,1,1)+"J:X+J"+sub(Str9,1,1)+"|N:While X!=|N:min(|N,X+5)"+sub(Str9,1,1)+"X:Text(7+21(Z!=4 and Z>1)+21(Z=3 or Z=6),(2+52(Z>3))+4(2-int(log(X))),X:iPart((|E2(X/V)).25"+sub(Str9,1,1)+"K:68-21(Z-3(Z>3))"+sub(Str9,1,1)+"I:Line(2+52(Z>3),I,2+(52(Z>3))+K,I:End:X"+sub(Str9,1,1)+Str7+"(1):X"+sub(Str9,1,1)+Str7+"(1):For(F,4,14:Line(4,F,90,F,0:End:0"+sub(Str9,1,1)+"theta:"+sub(Str9,2,1)+"ZPNA"+sub(Str9,2,1)+sub(Str9,1,1)+"Str0:"+Str7+"(43):prgmZCE:For(F,0,30:Line(0,F,94,F,0:End:"0ZBD":prgmZRS:{94,0,3,27:prgmTEMP:prgmZC1:Text(47,4,"+sub(Str9,2,1)+"USED HYPER POTION!"+sub(Str9,2,1)+":Text(47,4,"+Str9+","+sub(Str9,2,1)+" 'S HP INCREASED BY"+sub(Str9,2,1)+":Text(53,4,J,"+sub(Str9,2,1)+" POINTS!"+sub(Str9,2,1)+":prgmZWT:1"+sub(Str9,1,1)+"W"->Str9:1->theta:"ZTMP3"->Str0:prgmZCE:prgmZTMP3:6-theta:prgmZCE:End


Latest rendition of the Hyper Potion code. I haven't tested this just yet. I had to move the code that creates the box to display text into two other places, because otherwise it was going to interfere with the bottom two, maybe even 4 boxes on restoring HP.

I think I still need to add the small code snippet to clear the box after it says 'Used Hyper Potion!' in the second code segment.
That should be three commands, a For, Line, and End, should it not? Smile
Yeah, essentially Smile

I just didn't do it this morning, and I have to remember which of the values I need, since I have 3 or 4 different box clearing routines.
So, attempted a test on my updated code. Got a 'ERR: DATA TYPE' and it stopped on "0ZBD"

Wait, what? :/

Programming sucks </3


Joking, of course
  
Page 3 of 14
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement