RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Verticle Battle Sprites?

0 Members and 2 Guests are viewing this topic.

***
Rep:
Level 82
We learn by living...
I'm trying to understand the battle screen better, and I noticed the characters displayed at the bottom of the screen are part of some array with the same coordinates and push/popped in and out of position, aligned to the left, somehow exploiting some unwritten X value for their width.

So battle right now displays something like
====================

__monster1, monster2__

fighter, wizard, thief, cleric
===================


I want to change the array of pictures displayed so its showing

====================

_______________fighter
_______________wizard
_______________thief
_______________cleric

====================


I think this is the script that needs to be edited:
Spoiler for:
def initialize
    # Make viewports
    @viewport1 = Viewport.new(0, 0, 640, 320) #enemies, weather
    @viewport2 = Viewport.new(0, 0, 640, 420) #actors (?,?, X,Y)
    @viewport3 = Viewport.new(0, 0, 640, 480) #
    @viewport4 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 101
    @viewport3.z = 200
    @viewport4.z = 5000
    # Make battleback sprite
    @battleback_sprite = Sprite.new(@viewport1)
    # Make enemy sprites
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
    end
    # Make actor sprites
    @actor_sprites = []
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))

but I can't figure out how to isolate the individual actors. If I could isolate them, I could make them go into front/rear positions for example. Enu's SBS is way too massive and loaded with extras. I just want to be able to change left-right display aligned bottom to top-bottom display aligned right.

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Ignore my last post. I think Game_Actor has your answer.

Code: [Select]
  #--------------------------------------------------------------------------
  # * 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 * 160 + 80
    else
      return 0
    end
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Y-Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    return 464
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Z-Coordinate
  #--------------------------------------------------------------------------
  def screen_z
    # Return after calculating z-coordinate by order of members in party
    if self.index != nil
      return 4 - self.index
    else
      return 0
    end
  end

« Last Edit: June 14, 2010, 04:46:36 PM by cozziekuns »

***
Rep:
Level 82
We learn by living...
This is what I've got so far. I created battle sprites based on the original map sprites (facing left) and it works perfectly.


Code: [Select]
#--------------------------------------------------------------------------
  # * 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 * 160 + 80 # edited out by Shin
      return 576
    else
      return 0
    end
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Y-Coordinate
  #--------------------------------------------------------------------------
  def screen_y
   # return 464 # edited out by Shin
    return self.index * 68 + 112
  end

Now I'd just like to figure out how to make their "front/middle/rear" position thing line up, but I think that's probably way more complicated, because each battle actor coordinate needs to be addressed separately.

Any ideas?

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
basically there is a loop that displays the party images based on their party position id and a starting position/formula.

I don't remember where it is, but it increases the Y, so you'd have to mess with it to modify X instead.

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Namkcor's suggestion would probably work.

You could also just check the actor's position using self.class.position, I guess.

***
Rep:
Level 82
We learn by living...
Namkcor's suggestion would probably work.

You could also just check the actor's position using self.class.position, I guess.

I've got to some how turn this line:

Code: [Select]
return 576

into this

Code: [Select]
return 576 - ($data_classes[actor.class_id].position * 25)

except it doesn't recognize 'actor' or 'position'


*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Read up on RPG::Actor and RPG::Class in the help file.

You should probably also run a full search (Ctrl+Shift+F) of position to see how it works. You should be able to figure the rest yourself.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
look into Window_BattleStatus

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

***
Rep:
Level 82
We learn by living...
look into Window_BattleStatus

Code: [Select]
  #--------------------------------------------------------------------------
  # * Get Battle Screen X-Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    # Return after calculating x-coordinate by order of members in party
    if self.index != nil
      #position definition is new, by Shintashi modified from roulette
    position = $data_classes[self.class_id].position
      # return self.index * 160 + 80 # edited out by Shintashi; num = distance to right
      return 576 - (position * -20)
    else
      return 0
    end
  end
 

Ok, so this works. Now depending on the character's position, front, center, or back, they will be closer or further away from the enemy.

Here's a screenshot

Spoiler for:


woot

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
Looks pretty cool, but your probably gonna want to align the monsters to the left, so it looks more natural. Anyways, looks like your well on your way.

BTW, do the animations work? I never really bothered to try it myself.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
glad it worked out for you.

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

***
Rep:
Level 82
We learn by living...
Looks pretty cool, but your probably gonna want to align the monsters to the left, so it looks more natural. Anyways, looks like your well on your way.

BTW, do the animations work? I never really bothered to try it myself.


I'll see what I can do to re-align the monsters.

edit:
in Game_Enemy around lines 208-215

Code: [Select]
#--------------------------------------------------------------------------
  # * Get Battle Screen X-Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    n = $data_troops[@troop_id].members[@member_index].x - 80
    return n
  end

the spell/attack animations work fine, but the characters themselves are just as static as the splash image versions of themselves. Getting them to move and switch between actions would be a whole new thing, and require tons of sprite editing.

I've got a "pray" sprite for the Paladin that could act as the model for spell casting, but I've got nothing in the way of attacking, like they do in FF I-VI.

I figure if a monster event can approach you and attack, you should be able to shoot at them before they get too close, so I've got some ideas for a hybrid battle system but I'm just beginning on learning either.
« Last Edit: June 15, 2010, 02:37:07 PM by shintashi »