New account registration is temporarily disabled.

TDS'S PROFILE

Ofblowman telefagus pentaculus benterpinize farntormian criscodophin nectoglabbit frontonian smectarufus foninax trickendance trinnoctor pontalifanarian trudinox nolicanisis.
Silver Heart
A short game with a simple ontological story.

Search

Filter

Custom Action AI (Enemy Skill use AI)

Retry Battle

Exactly the same reason I had to create this script.

And you would think that saving would be a priority and if you fail you would accept your failure, but people are too used to hand holding nowadays and don't expect or want consequences for their actions or lack of actions (and of course they also don't want games to be "easy" or boring either).

How do i stop Defense and Agility and Luck doing anything on, Ace

I'm pretty sure luck doesn't affect critical rate at all since there is already a stat for it. It mainly affects the rate at which status effects are applied.

As for the agility of the user affecting the actions, this should prevent it.

#==============================================================================
# ** Game_Action
#------------------------------------------------------------------------------
#  This class handles battle actions. This class is used within the
# Game_Battler class.
#==============================================================================

class Game_Action
  #--------------------------------------------------------------------------
  # * Calculate Action Speed
  #--------------------------------------------------------------------------
  def speed
#~     speed = subject.agi + rand(5 + subject.agi / 4)
    speed += item.speed if item
    speed += subject.atk_speed if attack?
    speed
  end
end

One question..do you Rift? :)

Yes, I oculusionally rift from time to time.

How do i stop Defense and Agility and Luck doing anything on, Ace

I think that as long as you remove it from the formula used, the parameter will not affect the results.

For example this is the default formula for attacks (Skill ID 1 ):

a.atk * 4 - b.def * 2


Just change it to remove the def part.

Like so:

a.atk * 4

How to expose higher difficulty to players?

author=Milennin
Depending on how many characters, skills and items that are, and the depth of your combat system, that could be an instant turn-off if a player is faced with hundreds of options right at the start of the game. Even more-so if your game uses an advanced combat system with all sorts of unusual terms or abbreviations.


Of course, that feels like it should be implied or at least expected that you can't really just give someone hundreds of choices when they start off and on top of that with a complex battle system and expect them to make sense of everything at once.

The battle system I created is a very simple one that doesn't even require the player to input commands and the characters act by themselves and you just essentially nudge them along and use items or change the skills they can use. This means that your job is essentially to keep them alive rather than killing everything.

As for the items, you have access to all the healing items (6) and some food (3) and about 20 skills for roughly 30+ items/skills in the game, which should be a small enough for most people to keep track of or at least easily compare the pros and cons of using them.

How to expose higher difficulty to players?

I just went with the idea that the player should have access to everything and all enemies should always have a pretty good chance of defeating the player throughout the whole game.

By giving the player access to all items from the start and all skills when a new character joins it forces them to choose the most efficient ones to use while in different areas. For example, people often go for the best strongest skills when they obtain them and with no MP they are really tempting to use, but when the skill takes as long to cast as the whole is long then you really have to think whether to use skills with shorter cast times to hit more or wait for the stronger ones which you may not get to use if the enemies are too weak and die too fast.

Also the enemies, no matter what their level is will almost always cause constant damage to the player. This means that even when you return to a previous area the fights still cost you resources.

I could keep babbling on, but the main idea is to give the player everything and see if they can manage it properly and keep their party alive by making the normal RPG rules of "better skills/items = better results" into something that could defeat the player.

[RMVXAce Script Request] - Events trigger when near other events

Glad to see it worked for you. I like the idea of the game and the gameplay mechanic (Already made a few levels myself), so let me know if it's a serious project and I could probably do a few more scripts from the video like the ability to undo moves and an event cloner (All boxes are clones of a single event, so you only need to change one instead of all of them when editing.)

[RMVXAce Script Request] - Events trigger when near other events

I knew I forgot to mention something. Just use a different ID for containers, instead of :box_contact call it something else. Like :green_contact, :blue_contact. That is the ID that is going to be searched for when you push the event.

You can also have multiple event containers per event, in case you want to make a box that makes both :green_contact and :blue_contact disappear.

[RMVXAce Script Request] - Events trigger when near other events

author=Ratty524
YES What is that!? O_o


What happens when I mix forum script request reading with a giant slushy and Star Sailor/Dream Theater music.

I like to call it "Event Containers". It allows you create small segments of event code within an event to run at will rather than using running the whole event.

I'm not that good with events so you will probably be able to use it better, but here is the event code I use.



The important part is what is between the conditional branch "Script: set_container_commands(:box_contact)". :box_contact is going to be the ID of the commands inside that conditional branch and when called it will run everything inside the conditional branch.

The "run_cross_contact_event_containers(c)" is the script call that will check within a cross formation to see if there are any events and then it runs the :box_contact container code within it.

Let me know if the explanation is not clear and I'll see if I can make a demo.

Here is the script:

#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class handles events. Functions include event page switching via
# condition determinants and running parallel process events. Used within the
# Game_Map class.
#==============================================================================

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------  
  attr_reader :command_container_list               # Commands Container List
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------  
  alias tds_event_container_command_list_game_event_setup_page_settings setup_page_settings  
  alias tds_event_container_command_list_game_event_clear_page_settings clear_page_settings  
  alias tds_event_container_command_list_game_event_update              update
  #--------------------------------------------------------------------------
  # * Set Up Event Page Settings
  #--------------------------------------------------------------------------
  def setup_page_settings(*args, &block)
    # Set Container Interpreter to nil
    @container_interpreter = nil    
    # Run Original Method
    tds_event_container_command_list_game_event_setup_page_settings(*args, &block)    
    # Initialize Page Container command List
    @page.init_container_command_list    
  end
  #--------------------------------------------------------------------------
  # * Clear Event Page Settings
  #--------------------------------------------------------------------------
  def clear_page_settings(*args, &block)
    # Run Original Method
    tds_event_container_command_list_game_event_clear_page_settings(*args, &block)
    # Set Container Interpreter to nil
    @container_interpreter = nil    
  end  
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(*args, &block)
    # Update Container Interpreter
    update_container_interpreter
    # Run Original Method
    tds_event_container_command_list_game_event_update(*args, &block)
  end
  #--------------------------------------------------------------------------
  # * Determine if Event has container
  #     name : container command name (As a symbol)
  #--------------------------------------------------------------------------
  def has_container?(name) 
    # Return false if page is nil
    return false if @page.nil?    
    return @page.container_command_list.has_key?(name)
  end
  #--------------------------------------------------------------------------
  # * Determine if Event Container Interpreter is running
  #--------------------------------------------------------------------------
  def container_interpreter_running? ; !@container_interpreter.nil? end
  #--------------------------------------------------------------------------
  # * Run Container Command
  #     name : container command name (As a symbol)
  #--------------------------------------------------------------------------
  def run_container_command(name)    
    # Return if Page is nil
    return if @page.nil?
    # Get Container Command List
    list = @page.container_command_list[name]
    # Return if list is nil
    return if list.nil?
    # Create & Setup Container Interpreter
    @container_interpreter = Game_Interpreter.new ; @container_interpreter.setup(list, @event.id)
  end
  #--------------------------------------------------------------------------
  # * Update Container Interpreter
  #--------------------------------------------------------------------------
  def update_container_interpreter
    # Return if Container Interpreter is nil
    return if @container_interpreter.nil?
    # Update Container Interpreter
    @container_interpreter.update
    # Set Container Interpreter to nil if Container Interpreter is not running
    @container_interpreter = nil if !@container_interpreter.nil? and !@container_interpreter.running?
  end
end


#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
#  An interpreter for executing event commands. This class is used within the
# Game_Map, Game_Troop, and Game_Event classes.
#==============================================================================

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Set Container Commands (Only here to prevents running errors)
  #--------------------------------------------------------------------------
  def set_container_commands(name = :new_page) ; end
  #--------------------------------------------------------------------------
  # * Determine if running event can be pushed forward
  #--------------------------------------------------------------------------
  def can_push_forward?(id = @event_id)
    # Get Even Running Interpreter
    event = get_character(@event_id)
    # Check if Passable
    return event.passable?(event.x, event.y, $game_player.direction)
  end
  #--------------------------------------------------------------------------
  # * Run Event Containers at cross position
  #--------------------------------------------------------------------------
  def run_cross_contact_event_containers(container, wait = true)
    # Get Even Running Interpreter
    event = get_character(@event_id)
    # Create Cross Array
    cross = []
    cross << [event.x, event.y - 1] ; cross << [event.x, event.y + 1]    
    cross << [event.x - 1, event.y] ; cross << [event.x + 1, event.y]
    # Get Cross Events Array
    events = $game_map.events_cross_xy(cross) 
    # Delete Events that do not have container
    events.delete_if {|e| !e.has_container?(container) }
    events << event if events.size > 0
    events.each {|e| e.run_container_command(container)}
    # If Wait flag is true
    if wait
      # Wait until events are done running interpreter
      self.wait(1) while events.any? {|e| e.container_interpreter_running?}
    end
  end
end
  

#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles maps. It includes scrolling and passage determination
# functions. The instance of this class is referenced by $game_map.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Get Array of Events at the Designated Cross Coordinates
  #--------------------------------------------------------------------------
  def events_cross_xy(cross) ; events.values.select {|event| cross.any? {|c| event.pos?(*c)} }  end
end


#==============================================================================
# ** RPG::Event::Page
#------------------------------------------------------------------------------
#  The data class for the event page.
#==============================================================================

class RPG::Event::Page
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------  
  attr_accessor :container_command_list
  #--------------------------------------------------------------------------
  # * Initialize Container Command List
  #--------------------------------------------------------------------------
  def init_container_command_list
    # If Container Command list is nil
    if @container_command_list.nil?
      # Initialize Container Command List
      @container_command_list = {}
      # List Name
      list_name = nil
      # Go Through Commands in list
      @list.each {|c| 
        # If Command Code is 111 (Condtional Branch) and it's a script check
        if c.code == 111 and c.parameters.at(0) == 12
          # Match Text for List Name
          c.parameters.at(1)[/set_container_commands\((.+)\)/i]
          # Set List Name if not nil
          list_name = $1[1..-1].to_sym if !$1.nil?
          # Create Container Command List Array for List Name
          @container_command_list[list_name] = [] if !list_name.nil?
          next if !list_name.nil?
        end
        # Add command to list if List Name is not nil
        @container_command_list[list_name] << c if !list_name.nil?        
        # Set List Name to nil If at the end of container
        list_name = nil if c.code == 412 and c.indent == 0
      }
    end
  end  
end


Let me know if it works out for you and if you want anything changed.

Have a nice day.