enemy rows?

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
I'm using Yanfly Engine Ace and the Yanfly Visual Battlers scripts. I have it set up with the hero party on the right side of the screen, facing the monster troops on the left.

Thing is, when you are attacking the enemy, the first choice is always the monster the farthest to the left, which makes it seem like you are targeting the one in the back first.

How can I set it up so that Monster A is towards the right, ie, the "front row"?

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/visual-battlers/
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Please add links to the scripts.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Enemy battlers in yanfly's engine is still done using the editor's troop tab. visual battler script is only for actor battlers. So arrange your enemies accordingly. Enemy A will be the first enemy you put in that troop and so on.
 
Last edited by a moderator:

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
Sorry! Can't believe I forgot the links. Derp!

@Engr: I tried that, and, okay, Monster A *is* on the right, nearest the party, but the leftmost enemy is still the first one targeted, making it look like the enemy in the back is being hit first.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Might be yanfly's... I tested it in default scripts where I put

Enemy A: Slime

Enemy B: Slime

Enemy C: Spider

Positioning was

Spider Slime Slime

Then when I choose a target, Slime A is still the first one to be selected so it's following the Enemy Order...

EDIT: Checked your link, Yanfly's Engine did change the selection order as per his screenshots.

Find this in Yanfly's Battle Engine

Code:
 #--------------------------------------------------------------------------  # overwrite method: make_item_list  #--------------------------------------------------------------------------  def make_item_list    @data = $game_troop.alive_members    @data.sort! { |a,b| a.screen_x <=> b.screen_x }  end
and comment it out or delete it if you want
 
Last edited by a moderator:

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
Commenting it out is putting those pound signs in front of the line, yes?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
no... comment is # signs...

it will be

Code:
#def make_item_list   #@data = $game_troop.alive_members   #@data.sort! { |a,b| a.screen_x <=> b.screen_x }  #end
 
Last edited by a moderator:

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
Yeah, that's what I said. Putting the pound signs in front of the line.

I'm thinking in pre-Twitter terms, where # was known as the pound sign.
 

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
no... comment is # signs...

it will be

#def make_item_list #@data = $game_troop.alive_members #@data.sort! { |a,b| a.screen_x <=> b.screen_x } #end
DUDE. A) Engr, you are awesome for always helping, and thank you so much.B ) I tried commenting it out, and just got an error.

C) so, after some tweaking with that passage you highlighted, I got this:

Code:
#def make_item_list   #@data = $game_troop.alive_members   #@data.sort! { |a,b| b.screen_x <=> a.screen_x }  #end
Swapping the a.screen and b.screen did the trick!
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
That's is totally weird, it's commented so the game wouldn't even be reading those lines anyways so deleting or swapping things shouldn't even matter...
 
Last edited by a moderator:

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
I don't pretend to understand it, but it worked.

Pressing the Right key moves the selection to the left and vice versa, but you at least target the nearest enemy first.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Which is weird, because if a line is commented it shouldn't be checked by the game anymore. Meaning it practically doesn't exist anymore.

Like I could do this and the game won't care

Code:
#def make_item_list   #@data = $game_troop.alive_members what alive? XD   #@data.sortasdasdas! { |a,b,x,y,z| b.screen_x <=> a.screen_x and I'm out of my mind}  #end
Maybe you have a script that parses comments?
 

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,276
Reaction score
570
First Language
english
Primarily Uses
Uhhhh, maybe..? I really don't know.

I am using several scripts, but those are the only two which alter battle scenes. I think.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

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. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
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.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top