Calling Specific Enemies. Need assistance.

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
So, I am working on a custom battle system using events (I don't know how to script)..

I have it set up that I have 3 variables, one checks for the 1st Hero in the party, 2nd checks for the 2nd Hero in the Party and the 3rd checks for the 3rd hero in the party.

I want to also set up 3 variables checks the same only for monsters. 

I was hoping that I could just set in an event the what monsters I wanted to be in a specific battle seeing as I'm not using the 'troops', but I really have no idea how to do that.  I only know how to check specific Monster Troop's Health and all that stuff.
 

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
Thanks!  Unfortunately, I'm not convinced that that is what I am looking for regrettably.

either I didn't explain what I am after correctly, or this is in fact what I need and there is a lack of understanding on my part.  If it is the lack of understanding on my part I apologize.

I want to make an event on one of my maps where I say:

Variable 1 = A specific Enemy ID

Variable 2 = A specific Enemy ID

Variable 3 = A specific Enemy ID

then in the common event that says (for example):

if variable 1 = 1 then

     show picture 1 (which would be of a slime)

     show picture 2 (which would be the slime's Name)

     show picture 3 (which would be the slime's HP)

end

if variable 1 = 1 then

     show picture 1 (which would be of a goblin)

     show picture 2 (which would be the goblin's Name)

     show picture 3 (which would be the goblin's HP)

end

Then I'd do it again for the 3rd
 
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
Oh... I thought ur talking about putting specific monsters in battles...

How would you exactly determine which enemy to use?
 

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
I was hoping to do that using an event as well, unless I just perhaps have the enemies appear on the field rather than have random encounters.

Also, Unless I misunderstand something, I want to determine all that on my own on a dungeon to dungeon or battle to battle basis (unless I misunderstood your question)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
What is it exactly that you're having trouble with? You seem to have the logic all worked out. What can't you figure out?
 

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
I can't figure out how to actually make the variables work with the enemies the way I want it to.  I don't know to make a variable pull a number from an Enemy ID or how to check the number against an Enemy ID.

All I can figure out how to do is pull or check numbers against an enemy's stats (ie: HP, MHP, MP, MMP etc..) and even then it looks to me like they have to be in a troops for it to work and the party would have to be fighting against that troop for the variables to even work.

 
 
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
How is your battle system working? Maybe you should explain what the player will see, from the moment they encounter an enemy, rather than how you're trying to go about it. Presumably they would SEE the enemy on the map, which means you already know what sort of enemy it's going to be (and the name of the sprite that you use in the event graphic doesn't necessarily have anything to do with the id of the enemy).


If you are using evented battles, you probably should ignore everything in that battle group of event commands, because they only apply to the default (scripted) battle system, and yes, troops. For evented battles, you don't need to use troops at all.
 

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
So you check a variable to determine the enemy to show in a battle?

You can manipulate the script I linked for that I guess...
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I can't figure out how to actually make the variables work with the enemies the way I want it to.  I don't know to make a variable pull a number from an Enemy ID or how to check the number against an Enemy ID.

All I can figure out how to do is pull or check numbers against an enemy's stats (ie: HP, MHP, MP, MMP etc..) and even then it looks to me like they have to be in a troops for it to work and the party would have to be fighting against that troop for the variables to even work.
If I understand you right it seems like you are wanting to create your own variables with the game data for Enemy ID's.   There is probably a script command you can use to do this - but unfortunately I don't know it.  RPG Maker VX Ace is an amazing program.  But one of my gripes is they are scarce with the Game Data you can access from events and sometimes tracking down the right script command to find out specific game data can be difficult.  At least it was for me.

In the meantime though - you may could try using EnemyTransform under your Battle Event Commands as a work around.

For example:

If Variable1 = 1

Transform to Enemy1

If Variable1 = 2

Transform to Enemy2 ... an so on.

That might help you to establish a variable you can use to interact with specific enemies.  Sometimes I misunderstand posts so if this has nothing to do with what you were asking sorry and just ignore this.
 
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
He is using an evented battle system, not the default one, and Enemy Transform is only of use in the default/scripted battle system.
 

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
Then make an array that saves the enemy images so that you have a link between enemy ID and the images... or name the images as like Enemy1, Enemy2 etc...
 

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
Sorry for the delayed responses, I got some random errors on my PC that I didn't know how to fix and all the fixes on the net I found weren't helping, so I did a clean re-install of windows.

So basically, my battle system is as follows:

======================================
Picture a race, cars/people whatever start at their starting positions (in this case, this will be determined by the characters and monsters speed).  This is the turn order for the 1st turn. 

Each attack or skill used will either cost you or gain you a certain number of positions up or down. 

After all battlers (including monsters) have gone once, the battle system will them look at how many back or forward each player went and determine the turn order for the next turn.

Other than that, it is the same as any other turn based battle system.

What I need:

I want to be able use variables to look at the stats of various enemies from the enemies tab as well as their unit number and all that.  All I can find is to look at enemies within a troop and that I can only get to work if a battle is currently happening, which is not what I want.

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

I do have a work around or two now but it makes the job more of a chore than it would be if I could just look at the stats like I would like to.

 

BattleSystem_PartB.jpg

BattleSystem_Sample.png
 

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
Then make an array that saves the enemy images so that you have a link between enemy ID and the images... or name the images as like Enemy1, Enemy2 etc...
Then I think you can use the $game_enemies variable (or was it $data_enemies ?) to pick up the data about the specific enemies...

but take note that this will return the default values of the stats...

If you want to be able to modify those during the "Battle", I think you need to use variables and such...
 
Last edited by a moderator:

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
Then I think you can use the $game_enemies variable (or was it $data_enemies ?) to pick up the data about the specific enemies...

but take note that this will return the default values of the stats...

If you want to be able to modify those during the "Battle", I think you need to use variables and such...
Great thanks!  I'll try that :) .
 

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
btw, I saw an evented action battle system thread out here... you might wanna look at that and see how they managed the stats of the enemies
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
I've got a script made by Neon Black that shows pictures based on the value of a variable, extremely useful when eventing systems like this. Here it is:

Code:
##------# Picture Variables v1.0# Created by Neon Black at request of Celianna# Started 12.23.2012 - Completed 12.24.2012# For non-commercial use; commercial use at request only##------module CPmodule VPICS## Links variables to switches.  If the switch is turned off, the picture ## vanishes and will reset once turned back on.## Uses syntax "variable ID => switch ID,".VARIABLE_SWITCHES ={1 => 1,2 => 1,3 => 1,}## Viewport used by the pictures.  Viewport 0 will display under all map data.## Viewport 1 is the viewport used by map data, events, characters, etc.## Viewport 2 is used by weather and flashes and displays above the map.## Viewport 3 is above all other viewports.  If no viewport is defined, 3 is## used instead.  Uses syntax "variable ID => viewport ID,".PICTURE_VIEWPORT ={1 => 1,2 => 2,3 => 2,}## Adjusts the Z position of pictures in similar viewports.  Higher numbers will## display above lower numbers in the same viewport.  If no number is defined,## a value of 100 is used.  Uses syntax "variable ID => Z position,".PICTURE_Z ={1 => 1,2 => 101,3 => 100,}## Do not touch these lines.--Pictures ={} ##---------------##----------------------------## The following lines link pictures to variables.  To use, first add a line## "Pictures[ID] ={" without quotes where "ID" is the variable ID.  Afterwards## add the names of pictures to use when the variable is set to a particular## amount.  Uses syntax "number => 'picture name',".  Finally, enclose the## entire structure with a right bracket symbol '}'.Pictures[1] ={0 => nil,1 => "test1",2 => "test2",}Pictures[2] ={0 => nil,1 => "test1",2 => "test2",}Pictures[3] ={0 => nil,1 => "test1",2 => "test2",}## This section sets whether pictures are fixed to the map or fixed to the## screen.  A value of "true" fixes the picture to the map, while "false"## will fix it to the screen.  Uses syntax "variable ID => true/false,".FIX_MAP ={1 => true,2 => false,3 => false,}## Determines if the picture tints with the "Tint Screen" event command.  Note## that pictures set to viewport 1 will ALWAYS tint to the screen no matter## what this value is set to, and pictures in viewport 2 are affected by## such things as weather than "Flash Screen" commands.## Uses syntax "variable ID => true/false,".TINT_MAP ={1 => true,2 => false,3 => false,}##------------------------------------------------------------------------------## End of configuration settings.##------------------------------------------------------------------------------endend## Sets up variables for the system.  This allows them to be saved when the game## is saved.class Game_System  attr_accessor :vpics  attr_accessor :gpics  attr_accessor :picvarend## New class that holds the variable style picture.  This stores and allows## access to some additional information.class Game_VariablePic < Game_Picture  attr_accessor :num  attr_accessor :name  attr_reader :xo  attr_reader :yo    def initialize(num)    super(-1)  ## Changes the default blend type, sets the ID, sets the map set.    @blend_type = 0    @num = num    @xo = $game_map.display_x * 32    @yo = $game_map.display_y * 32  endend## New class that is used to actually display the picture.  Changes a bit## about how pictures work.class Sprite_VariablePic < Sprite_Picture  def initialize(num, viewport, picture)    @num = num  ## Stores the picture's number.    super(viewport, picture)  end    ## Allows the picture to be easily changed.  def change_value(id)    return self.dispose if id.nil?    name = CP::VPICS::Pictures[@num][id]    return self.dispose if name.nil?    @picture.name = name    update  end    ## Changes how the picture is updated to allow map scrolling.  def update_position    self.x = CP::VPICS::FIX_MAP[@num] ? -$game_map.display_x * 32 + @picture.xo : 0    self.y = CP::VPICS::FIX_MAP[@num] ? -$game_map.display_y * 32 + @picture.yo : 0    self.z = CP::VPICS::PICTURE_Z[@num] ? CP::VPICS::PICTURE_Z[@num] : 100  end    ## Allows the screen tone to update properly.  def update_other    self.opacity = @picture.opacity    self.blend_type = @picture.blend_type    self.angle = @picture.angle    self.tone.set(CP::VPICS::TINT_MAP[@num] ? $game_map.screen.tone : Tone.new)   endend## Modifies some methods on the map just for funnies.class Spriteset_Map  alias cp_vpic_update update  def update    cp_vpic_update    update_vpic  end    ## Holy sh-...  This sucker hangs on to picture and   def update_vpic    $game_system.vpics = {} if $game_system.vpics.nil?    $game_system.gpics = {} if $game_system.gpics.nil?    $game_system.picvar = {} if $game_system.picvar.nil?    CP::VPICS::Pictures.each do |id, pics|      next if id.nil?      if $game_switches[id]        next if $game_system.picvar[id] == $game_variables[id]        if $game_system.gpics[id].nil?          $game_system.gpics[id] = Game_VariablePic.new(id)        end        if $game_system.vpics[id].nil?          vp = CP::VPICS::PICTURE_VIEWPORT[id]          if vp < 1            port = nil          elsif vp == 1            port = @viewport1          elsif vp == 2            port = @viewport2          elsif vp >= 3            port = @viewport3          else            port = @viewport3          end          $game_system.vpics[id] = Sprite_VariablePic.new(id, port,                                                         $game_system.gpics[id])        end        $game_system.vpics[id].change_value($game_variables[id])      else        next unless $game_system.vpics[id]        $game_system.vpics[id].dispose        $game_system.vpics[id] = nil        $game_system.picvar[id] = nil        $game_system.gpics[id] = nil      end    end  end    ## Disposes the pictures.  alias cp_vpic_dispose dispose  def dispose    cp_vpic_dispose    dispose_vpic  end    ## Does what I said up there.  def dispose_vpic    return unless @vpics    @vpics.values do |array|      next if array.nil?      next if array[0].nil?      array[0].dispose    end  endend
 

Zechnophobe

Veteran
Veteran
Joined
Jul 17, 2013
Messages
93
Reaction score
2
First Language
English
Primarily Uses
Then I think you can use the $game_enemies variable (or was it $data_enemies ?) to pick up the data about the specific enemies...

but take note that this will return the default values of the stats...

If you want to be able to modify those during the "Battle", I think you need to use variables and such...
Just a note that makes things like this easy to remember. "game" variables are things that change (your party, your actors, etc). "Data" variables are things that don't (Class definitions, skill definitions, etc).
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top