I've found this script is incompatible with Victor's Fog script. ... well, "incompatible" isn't exactly the right word. It works, but it updates at a higher frequency than it should be, which causes it to "slide" around the screen at an accelerated rate. If I divide the ox/oy in the fog script by 2, the speed is okay, but the fogs stutter instead.
It leads me to wonder if the script is incorrectly assigning ox/oy.
A quick test in another project, and I'm pretty sure my planes are updating at a slightly faster rate than they should be. I'm not sure if it's the same rate, or what it is.
Altering the ox/oy in this script to be val.to_f/2 helped, but again I had some stuttering.
EDIT: It occurs to me now that altering the ox/oy definitions is actually the wrong way to approach this. While it might work for pan effects, one time setting gets thrown off if I divide it. What needs to be fixed is the update rate, but I don't see a way to deal with it.
I've tested several times and it seems to me that this script isn't compatible with Yanfly Engine Ace - Battle Engine Add-On: Enemy HP Bars(which needs Yanfly Engine Ace - Ace Battle Engine) even without any extra dlls. The hp bars just don't show at all.
Although this script's order in the list obviously doesn't matter here, I tired all the 3 orderings(top, middle, bottom) and nothing changed. I've also tried to set ANIMATE_HP_GAUGE as both true and false, but bothing changed again. (So actually I've tested 6 combinations lol)
The hp bars are implemented using a new class which is inherited from Viewport. The below method initialize the hp bar instances:
After briefly reading this script's Plane implementations, I tried to edit the below method from:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # bitmap # Get the tile bitmap of this instance of Plane. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- def bitmap @bitmap end
To:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # bitmap # Get the tile bitmap of this instance of Plane. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- def bitmap @sprite.bitmap end
And the HP bars come back.
With ANIMATE_HP_GAUGE as true, their displays are as if the enemies' hps constantly reducing per frame, the reduction begins from full hp to 0 hp, and then the hp "comes" back at full and get reduced again, causing an endless reduction-reset-to-full loop.
The below method implements ANIMATE_HP_GAUGE:
#-------------------------------------------------------------------------- # update #-------------------------------------------------------------------------- def update super self.visible = gauge_visible? @sprite.ox += 4 if YEA::BATTLE::ANIMATE_HP_GAUGE update_position update_gauge @visible_counter -= 1 end
With ANIMATE_HP_GAUGE as false, everything works fine.
I tried to fix the issues myself, but as my above attempt clearly failed, and I still only know little about Plane, I think I need help on this one
P.S.: My wild guess is that the issues have something to do with the below method of this script:
Code:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # bitmap= # Set the tile bitmap of this instance of Plane. # bmp : Bitmap #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- def bitmap=(bmp) error_disposed if disposed? if bmp.nil? @sprite.bitmap = nil return @bitmap = nil end w, h = vrect.width, vrect.height nw = bmp.width <= 100 ? 2 : 3 nh = bmp.height <= 100 ? 2 : 3 dx = [(w / bmp.width).ceil, 1].max * nw dy = [(h / bmp.height).ceil, 1].max * nh bw = dx * bmp.width bh = dy * bmp.height @bitmap = bmp key = [vrect.to_a, bmp.name] if Cache.has_plane?(key) @sprite.bitmap = Cache.plane(key) else @sprite.bitmap = Bitmap.new(bw, bh) dx.times do |x| dy.times do |y| @sprite.bitmap.blt(x * bmp.width, y * bmp.height, @bitmap, @bitmap.rect) end end Cache.add_plane(key, @sprite.bitmap) end end
I gess it is better to get an answer later than never...
but before, I will quote the first line of code
RGSS3Plane = Planethis mean than we can use the original Plane class like this : "RGSS3Plane.new"
So, to fix Yanfly Engine Ace - Battle Engine Add-On: Enemy HP Bars script (or any script than use old Plane class) simply replace all "Plane" to "RGSS3Plane" in these said scripts.
I've found this script is incompatible with Victor's Fog script. ... well, "incompatible" isn't exactly the right word. It works, but it updates at a higher frequency than it should be, which causes it to "slide" around the screen at an accelerated rate. If I divide the ox/oy in the fog script by 2, the speed is okay, but the fogs stutter instead.
It leads me to wonder if the script is incorrectly assigning ox/oy.
not exacly, if the fogs moves like a plane do, the speed is based on the bitmap size. This rewrite of the Plane class always set his bitmap to be at least 4 times bigger.
Unfortunately, doing what you wrote (using the old one instead of the new one) will kill the FPS yet again in the case of big planes.
I am using this script because of the huge FPS boost it provides.
I have no idea if those small HP bars of Yanfly will have any impact on FPS, but a battle background on a 1024x768 resolution in Theo's SBS will drop my FPS by ~30, which is a huge difference (45 with the new plane class, ~12 with the old one). Even thou it fixes the battle camera, using it is not worth the FPS drop for me.
Also, the last time I checked, a plane's bitmap is a simple empty bitmap with the size of the plane's viewport itself. That empty bitmap will get filled with the assigned picture, and the plane scrolls it after. I might be wrong thou, since I never actually used the old plane class, but I am pretty sure that is how the new one operates.
In the case of the new class, the bigger the viewport of the plane, the bigger will be it's bitmap's rect.
And the smaller the assigned picture, the bigger will be the performance cost in the case of planes with big viewports (like a full screen plane). So, it is better to have a bigger picture for your planes than a smaller one, at least with this new plane class.
Of course using the old Plane is suicidal in the case of big planes, but, in the case of Yanfly Enemy HP Bars case, the viewport size is below the 'standard' screen size. The old plane don't do much harm.
After taking a look to the HP bars script, I found why the bars dont show up : The bitmap is assigned to the plane then, after, draw the bars over it. The visible plane bitmap is never updated... So it display a big empty bitmap.
Here a quick patch
# This is a Compatibility Patch for FenixFyreX's Plane class rewrite and # Yanfly Battle Engine Add-On: Enemy HP Bars# By Azuma-01# check for the HP bar script and the Plane rewrite scriptsif ($imported||={})["YEA-EnemyHPBars"] && Object.const_defined?RGSS3Plane) class Enemy_HP_Gauge_Viewport #overwrite def create_gauge_sprites @sprite = Plane.new(self) dw = self.rect.width * 2 bmp=Bitmap.new(dw, self.rect.height) case @type when :back colour1 = Colour.text_colour(@battler.enemy.back_gauge_colour) colour2 = Colour.text_colour(@battler.enemy.back_gauge_colour) when :hp colour1 = Colour.text_colour(@battler.enemy.hp_gauge_colour1) colour2 = Colour.text_colour(@battler.enemy.hp_gauge_colour2) end dx = 0 dy = 0 dw = self.rect.width dh = self.rect.height @gauge_width = target_gauge_width bmp.gradient_fill_rect(dx, dy, dw, dh, colour1, colour2) bmp.gradient_fill_rect(dw, dy, dw, dh, colour2, colour1) @visible_counter = 0 @sprite.bitmap = bmp end endend
Also, with some digging here and there, I realised than the plane cache is mostly useless : the Spriteset_Map dispose all his parallax bitmap (line 212). Result => the cache hold a bunch of disposed bitmap...
A quick fix for every one :
# This is a Fix for FenixFyreX's Plane rewrite cache system# it prevent Spriteset_Map to dispose the parallax bitmap# if the bitmap is in the cache.# By Azuma-01if Object.const_defined?RGSS3Plane) class Spriteset_Map # overwrite def update_parallax if @parallax_name != $game_map.parallax_name @parallax_name = $game_map.parallax_name @parallax.bitmap.dispose if @parallax.bitmap && !Cache.plane_cache.value?(@parallax.bitmap) @parallax.bitmap = Cache.parallax(@parallax_name) Graphics.frame_reset end @parallax.ox = $game_map.parallax_ox(@parallax.bitmap) @parallax.oy = $game_map.parallax_oy(@parallax.bitmap) end endend
@Sixth : You should take a look to your Spriteset_Battle class and make sure than you do not dispose your plane bitmaps if they exists in the cache.
so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most.
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.