Hm, I not sure how to describe this error, it's more like... a bug or w/e... anywho. I've started on editing the battle scene for my game and I've changed the EXPGAUGESIZE along with the coordinates. (speaking of which, does anyone know how to make this bar appear thinner. It's bulkiness kinda clashes atm.) Anywho, whenever a PokéMon gains experience, instead of the bars increasing in length, it will jump backwards and end in a place shorter of the designated distance than where it started. However, when I enter a new battle the bar is at the place it should be (in other words, the blue is longer). Does anyone know what I'm missing that would cause this?
I vaguely recall having a problem like this way back when I fiddled with it in my game.
Ah, found it! In
PokeBattle_ActualScene, go find the def
pbEXPBar. In there are the following lines:
Code:
if exprange!=0
startexplevel=(tempexp1-startexp)*[COLOR=Red]128[/COLOR]/exprange
endexplevel=(tempexp2-startexp)*[COLOR=Red]128[/COLOR]/exprange
end
Replace those two numbers with
PokeBattle_Scene::EXPGAUGESIZE. That should solve it. It's an oversight on poccil's part.
As for the height of the EXP bar itself, the height (in pixels) is the red number in the line:
Code:
self.bitmap.fill_rect(@spritebaseX+expGaugeX,@spritebaseY+expGaugeY,self.exp,[COLOR=Red]4[/COLOR],PokeBattle_Scene::EXPCOLOR)
The method fill_rect uses the arguments "X-coordinate", "Y-coordinate", "width", "height" and "colour" in that order. Everything else is calculated or uses words, but the height uses a number, which may be why you overlooked it.
Oh, and also, in the same area, I've been playing around with the HP Gauge X and Y coordinates. It appears as though it edits both the enemy and player HP gauge and I can't fix one's location without messing up the other. Does anyone know if I've overlooked anything or what I need to do to fix this?
Both the player's and the enemy's boxes are constructed in the same way, so the HP gauge will appear in the same place on either. You haven't overlooked anything.
Immediately after the following lines (in the refresh part, where all this stuff is drawn), add something like the bit in red:
Code:
hpGaugeX=PokeBattle_Scene::HPGAUGE_X
hpGaugeY=PokeBattle_Scene::HPGAUGE_Y
[COLOR=Red]hpGaugeX+=42 if @battler.index==0 || @battler.index==2[/COLOR]
[COLOR=Red]hpGaugeY+=17 if @battler.index==0 || @battler.index==2[/COLOR]
This will move the bars around only for the player's Pokémon (the amount moved is 42 and 17 in the example above). Remember to also shift the HP numbers (125/211) and whatever else you want as well, using the same "if" clause.