Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[resolved]Draw battlers behind skill + item screens

I wasn't able to find anything about this, so sorry if it's been covered before. I'm using a very basic method (RPG Advocate's) to show battlers above the status screen. I can't seem to find a way to show the battlers behind the skill and item screens, however. Could someone please tell me how this can be done? Thank you.
 
I'm sorry. I can't help, and I doubt anyone can without any code. Anyhow, I simply must point out... wow, RPG Advocate... that's really old school. You know, he was one of many who popularized Enterbrain's RPG Maker in the Western hemishpere. He even made his own translation of RPG Maker 2000 and helped translate RPG Maker XP. I can still remember when Phylomortis 2 came out. Only a rocket scientist could decipher that game. It was widely unpopular. He was also planning a sequel for RPG Maker XP, Phylomortis: Avant Garde, which was never released. Last I heard of him, he was having some gambling problems, and had to shut down http://www.phylomortis.com, which was an awesome site at the time being.
 
The code is basically all default stuff. I'm using Paradog's ATB, but that doesn't change the item or skill windows at all. The only other battle-related code is the above-mentioned battler changes, which are as follows (in Game_Actor)

Code:
  #--------------------------------------------------------------------------

  # * Get Battle Screen X-Coordinate

  #--------------------------------------------------------------------------

  def screen_x

    # Return after calculating x-coordinate by order of members in party

    if self.index != nil

      return self.index * 100 + 360

    else

      return 0

    end

  end

  #--------------------------------------------------------------------------

  # * Get Battle Screen Y-Coordinate

  #--------------------------------------------------------------------------

  def screen_y

    if self.index == 0

      return 320

    else

      return 270

    end

  end

(The game only allows for two characters)

And it was a sad day to see Phylomortis go away, although I remember Advocate getting a little full of himself in the last few years he was with the RMing community. I think he and Gaming World didn't see eye to eye as well, and I affiliated with them most strongly at the time. Still, the Wayback Machine exists, so there you go.
 
Okay, your terminology confused me a lot here... what you want to do is draw battlers on the battle screen, however have them have the right z-level in order to not cover the skill and item windows when they come up... correct?
In that case, the code you posted has nothing to do with it :p Not to mention it's a little ineffective... with editing it just a little, you could easily draw as many people as you want, not only two...

Either way, what you need to do to solve your problem is set the z-level. You do this as follows:
Code:
sprite.z = 1000

Now, I don't know what the skill window's z-level is, and probably you don't know either. Even if anyone would, it's smarter to draw it relative to it, in case you'll change the skill window's z-level later on. That's done best in Scene_Battle, where you can reference both objects easily, done like that:
Code:
@battler.z = @skill_window.z - 1

Now, this only includes the skill window. Normally you can assume that the skill and item window have the same z-level... but with increasing numbers of cheap scripts around the community, you never know... so, let's make sure:
Code:
@battler.z = (@skill_window.z - @item_window.z).abs - 1
 
Well, I found it. Go figure changing [ @viewport2.z = 101] in spriteset_battle to 100 would fix it forever. Thank you for pointing me in the right direction, BlueScope. I didn't know for a fact that the z-coordinate was what I wanted to change there, and I wasn't willing to mess around with it without knowing. Good thing, too, as I likely would have ruled it out entirely when the obvious thing didn't work.
 
Hah, actually... yeah, that might do it, depending in which viewport they're drawn in. I'm afraid I have no idea about stuff like that, so sorry for the comparatively heavy instructions... glad I got you to where you wanted to get though ^^
Now all you need to do is put a [resolved] in your title ;o
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top