BLACKWYVERN'S PROFILE

Search

Filter

[RMVXA] YEA - Learn Skill Engine - Notecard information incorrect. [And fix]

Well, I did some more testing, and I seem to have mistaken non-functionality for proper mechanics. Using the notecard's method, I couldn't get any learnable skill working, but when I used the brackets, they did.

However, since it was late, and I was getting annoyed with it, I didn't dig much deeper into it. With brackets, or no space, the command is NOT READ. So, if the skill is learnable, it'll learn with zero requisite skill. Once I had done testing where I removed skill x from the actors learned skill table while still using brackets, I realized my mistake.

This still leaves me back at square one though. How to get this code working, and where's Yanfly when you actually need him? XD;

EDIT

Regex is really, really, confusing.
But so is reading other people's code.

According to a few sources his Regex code is correct.. So now I'm just trying to find the bit that controls the scan for the existing skill.

[RMVXA] YEA - Learn Skill Engine - Notecard information incorrect. [And fix]

Haven't seen any threads about this one. So figured I'd post and help out.

In Yanfly's skill engine, the notecard functions in the help section read out as the following:

<learn require skill: x>
<learn cost: x jp>
<learn require level: x>
<learn require switch: x>

However, and this annoyed me for HOURS.. The code itself in the editor is read as:

<learn require skill:[x]>
<learn cost:[x]jp>
<learn require level:[x]>
<learn require switch:[x]>

EDIT:
And even then, the code still don't work. So. Yeah. May just be broke'd.

So, if you've ever run into problems with this mod, either change your note format, or remove the bracket thingies from lines 192 to 200. (Preferably just change your tagging. Removing brackets kinda breaks things. XD;

[RPGMVX-A] Unable to draw sprites during 'perform_battle_transition'

What I have posted /only/ resizes the battle transition image. Nothing else.

And, uh. Resizing non-default assets in photoshop is exactly the same distortion wise as resizing it in RMA. So.... Yeah.

However, I have expanded the code to include all battlebacks, and all backgrounds that come with Galv's menu system, with the option of randomizing battletransitions. Still don't have the actual transition effect where I'd like it, but eh. Not a big deal.

And to further clarify, minor rescalings, like the ones from default rez to 640x480 tend to work just fine. I'd worry if someone were trying to drop a 1080P image into it, but, then that one's on them.

[RPGMVX-A] Unable to draw sprites during 'perform_battle_transition'

author=Me
I'm working on something to fix the resolution of Battle Transitions, cuz I'm too lazy to be bothered resizing them all in photoshop.


As in, I'd much rather have a fix that I never have to worry about, then resizing every battletrans I get to the resolution I'll be using them at.

So far, despite the transition not being perfect, it'll upscale and downscale any image assigned as a battletrans automatically.

Read, and comprehend the post you're commenting on, before commenting on it.

[RPGMVX-A] Unable to draw sprites during 'perform_battle_transition'

The Bitmap command simply draws a graphics field which is plugged into the available space defined by Sprite. Doesn't actually mean it's using a bitmap.

The default battlescene is a png file, anyways.

In theory, everything -should- be working.. Using Yanfly's Debug Extension, and putting in the code in, as it is in the editor, properly displays, resizes, and clears the images. Just something about the PBT call.

As for pre-existing scripts, I spent many an hour trying to look into it, but quite honestly, it was inordinately difficult to just find a tutorial to do

Img = Sprite.new
Img.bitmap = Bitmap.new(Img.png)
Img.bitmap.stretch_blt(rect, source, oldrec)

so trying to find anything except battletrans randomizers.. Almost pushed me to giving up. Unfortunately, the aforementioned guides all use Graphics.transition, and Graphics.freeze, which do not support what I'm aiming to do with the bitmap resizing though.

-----------------------------------------------------------\Edit\

Found the problem. Apparently, there's a Graphics.freeze call in {Scene_Map < Scene_Base} (pre_battle_scene)

Migrated the code I had in PBT to PBS, and disabled the PBT call in (terminate).

The bitmap is now being displayed at the correct time, and size. I just now have to tweak the effect so that it can closely mimic Graphics.transition(). Might be a challenge, that.

-----------------------------------------------------------\Edit\

It isn't perfect, but it's close enough for me to move on for now. \o/
Just gotta add in the framework to allow for multiple battletrans now, since trying to simply add compatibility code for each different script out there is far more hassle than it's worth.

module Cache
  def self.btrans(filename)
    load_bitmap("Graphics/System/", filename)
  end
end

class Scene_Map < Scene_Base
  def terminate
    super
    SceneManager.snapshot_for_background
    dispose_spriteset
  end

  def pre_battle_scene
    Graphics.update
    @spriteset.dispose_characters
    BattleManager.save_bgm_and_bgs
    BattleManager.play_battle_bgm
    Sound.play_battle_start
    
    @BTrans_Name = "BattleStart"
    @FillBase = 20
    @FillLength = 60
    @Trans = Cache.btrans(@BTrans_Name)
    
    @BattleTrans = Sprite.new
    @BattleTrans.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    @BattleTrans.bitmap.stretch_blt($ScreenRez, @Trans, @Trans.rect)
    @BattleTrans.z = 0
    
    @Overlay = Sprite.new
    @Overlay.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    @Overlay.bitmap.fill_rect($ScreenRez,Color.new)
    @Overlay.z = 1
    
    @i=0
    @DeltaRate = (255-@FillBase)/@FillLength*2
    while(@i<@FillLength)
      @Overlay.bitmap.fill_rect($ScreenRez,Color.new(0,0,0,@DeltaRate*@i))
      Graphics.update
      @i+=1
    end
    
    @BattleTrans.bitmap.dispose
    @Overlay.bitmap.dispose
  end
end

[RPGMVX-A] Unable to draw sprites during 'perform_battle_transition'

Is there a hard-coded prevention of this, or am I simply doing something wrong?

I'm working on something to fix the resolution of Battle Transitions, cuz I'm too lazy to be bothered resizing them all in photoshop.. So, I'm taking the much more difficult route of learning how to code RGSS, and duplicating Graphics.transition() since apparently, you can't plug resized sprites/bitmaps into it.

... Starting to look like you can't plug bitmaps into PBT either though.

module Cache
  def self.btrans(filename)
    load_bitmap("Graphics/System/", filename)
  end
end

class Scene_Map < Scene_Base
  def perform_battle_transition
    @BTrans_Name = "BattleStart"
    @FillRate = 80
    @Trans = Cache.btrans(@BTrans_Name)
    
    @BattleTrans = Sprite.new
    @BattleTrans.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    @BattleTrans.bitmap.stretch_blt($ScreenRez, @Trans, @Trans.rect)
    @BattleTrans.z = 1
    
    @Overlay = Sprite.new
    @Overlay.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    @Overlay.bitmap.fill_rect($ScreenRez,Color.new(0,0,0,@FillRate))
    @Overlay.z = 0
    
    Graphics.fadeout(60)
    @BattleTrans.bitmap.dispose
    @Overlay.bitmap.dispose
  end
end
Pages: 1