Kakis

Regular
Regular
Joined
Dec 20, 2018
Messages
34
Reaction score
2
First Language
English
Primarily Uses
RMMV
I've been using Modern Algebra's extra movement frames script but found issues when using Blackmorning's advanced animated menu script and Galv's shop menu script. Essentially, the problem is that since I have added extra frames using Modern Algebra's script, the animated sprites no longer match up to how it's supposed to function. For Blackmorning's script, whenever I try to load up the menu it causes my project to crash. And for Galv's script, it improperly shows the animated sprites when showing the parameters for equipping armour, weapons, etc. (Also to note, that I am using the four frame animation for the actors.)

So per request, I'd like a few changes to be included for Blackmorning and Galv's shop menu script, so that it can help support those changes. Thank you.
 

Roninator2

Gamer
Regular
Joined
May 22, 2016
Messages
5,242
Reaction score
1,571
First Language
English
Primarily Uses
RMVXA
You may need to provide a demo. Putting those three script in a test demo doesn't give any errors, unless I'm not doing something that is required.
 

Kakis

Regular
Regular
Joined
Dec 20, 2018
Messages
34
Reaction score
2
First Language
English
Primarily Uses
RMMV
You may need to provide a demo. Putting those three script in a test demo doesn't give any errors, unless I'm not doing something that is required.


Thank you for your time. I've included the demo here:

So when I use Blackmorning's menu script, it includes a walking sprite animation at the bottom of the menu. But due to changes, where actor1 uses the four animated sprite sheet, it causes this error whenever I try to load the menu.


The other issue I have is shown in Galv's shop menu script. Where the actors are shown at the bottom of the screen and you see double, instead of the usual walking animation.
 

Roninator2

Gamer
Regular
Joined
May 22, 2016
Messages
5,242
Reaction score
1,571
First Language
English
Primarily Uses
RMVXA
The first is an easy fix, but then you get to see all of the problems that you see in the shop scene
Moving the Extra Movement script to the top will let you load the menu but doesn't really fix the issue.

Add this below the Extra movement script in your list.
Ruby:
class Window_ShopStatus < Window_Base
  def draw_character(character_name, character_index, x, y, enabled)
    return unless character_name
    bitmap = Cache.character(character_name)
    sign = character_name[/^[\!\$]./]
    if sign && sign.include?('$') && character_name.include?('%')
      cw = bitmap.width / 4
      ch = bitmap.height / 4
    elsif sign && sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = character_index
    step = 0
    step = @walk if enabled
    src_rect = Rect.new((n%4*3+1+step)*cw, (n/4*4)*ch, cw, ch)
    contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
end
class Window_Base
  def ma_draw_emf_character(character_name, character_index, x, y, ani = false)
    return unless character_name
    if !ma_char_is_emf_sprite?(character_name)
      # Draw regular if there is no frame specification in the name
      maemf_drawcharct_3kq6(character_name, character_index, x, y, ani)
    else
      bitmap = Cache.character(character_name)
      frames = maemf_get_frames(character_name)
      cw, ch = maemf_calc_frame_size(character_name, bitmap, frames)
      n = character_index
      if ani == true
        @next_step ||= 0
        src_rect = Rect.new((n%4*frames[0]+@next_step)*cw, (n/4*4)*ch, cw, ch)
        @next_step += 1
        @next_step = 0 if @next_step > (frames.size - 2)
      else
        src_rect = Rect.new((n%4*frames[0]+frames[1])*cw, (n/4*4)*ch, cw, ch)
      end
      contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
    end
  end
end

This take the % symbol that is in the filename for the character sheet and specify if it is to use it.
You will notice that your character is not centered on the sheet properly once you play test in the shop. The menu doesn't seem to walk. Might be another thing to fix if you want that.
Fixed that now as well. I understand the intent of what Modern Algebra was doing but the code does not iterate through the numbers so I added in a variable to control that.
 

Kakis

Regular
Regular
Joined
Dec 20, 2018
Messages
34
Reaction score
2
First Language
English
Primarily Uses
RMMV
The first is an easy fix, but then you get to see all of the problems that you see in the shop scene
Moving the Extra Movement script to the top will let you load the menu but doesn't really fix the issue.

Add this below the Extra movement script in your list.
Ruby:
class Window_ShopStatus < Window_Base
  def draw_character(character_name, character_index, x, y, enabled)
    return unless character_name
    bitmap = Cache.character(character_name)
    sign = character_name[/^[\!\$]./]
    if sign && sign.include?('$') && character_name.include?('%')
      cw = bitmap.width / 4
      ch = bitmap.height / 4
    elsif sign && sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = character_index
    step = 0
    step = @walk if enabled
    src_rect = Rect.new((n%4*3+1+step)*cw, (n/4*4)*ch, cw, ch)
    contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
end
class Window_Base
  def ma_draw_emf_character(character_name, character_index, x, y, ani = false)
    return unless character_name
    if !ma_char_is_emf_sprite?(character_name)
      # Draw regular if there is no frame specification in the name
      maemf_drawcharct_3kq6(character_name, character_index, x, y, ani)
    else
      bitmap = Cache.character(character_name)
      frames = maemf_get_frames(character_name)
      cw, ch = maemf_calc_frame_size(character_name, bitmap, frames)
      n = character_index
      if ani == true
        @next_step ||= 0
        src_rect = Rect.new((n%4*frames[0]+@next_step)*cw, (n/4*4)*ch, cw, ch)
        @next_step += 1
        @next_step = 0 if @next_step > (frames.size - 2)
      else
        src_rect = Rect.new((n%4*frames[0]+frames[1])*cw, (n/4*4)*ch, cw, ch)
      end
      contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
    end
  end
end

This take the % symbol that is in the filename for the character sheet and specify if it is to use it.
You will notice that your character is not centered on the sheet properly once you play test in the shop. The menu doesn't seem to walk. Might be another thing to fix if you want that.
Fixed that now as well. I understand the intent of what Modern Algebra was doing but the code does not iterate through the numbers so I added in a variable to control that.
Thank you very much! Tested it and it worked fine for the menu and the Galv shop. But yeah, like you said the other issue is just the alignment of my sprite.
 

Latest Threads

Latest Profile Posts

Larvae.gif
They're larvae, not fightae, honest!
I've made a big emphasis on visually representing things to make the game as accessible as possible.

MP.png

Grimoires will consist of 5 - 10 pages of skills (still finalizing that max number)

Since each actor is able to take multiple actions per turn, each skill will cost 1-5 pages
This prevents more powerful skills from being uber spammed during an actors turn.
Cats are so easy. I noticed the gray one would never nap in the office while I worked, so I put a blanket on the spare chair in here and now she won't leave.
1701793108356.png
still work in progress, had not much time at the weekend^^
Oh deer! Have you checked my calendar today already? ;3
1701790624587.png

Forum statistics

Threads
136,773
Messages
1,269,748
Members
180,514
Latest member
Ikana
Top