Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [Solved] Problems with Omegazion's Roguelike BattleSystem, More like a bug-fixing request
Helios
post Apr 5 2011, 06:05 AM
Post #1


Level 4
Group Icon

Group: Member
Posts: 54
Type: None
RM Skill: Undisclosed




Original script:
http://www.rpgrevolution.com/forums/index....showtopic=26314

Just found some bugs in this system that I'm currently using, and looks like Omegazion is not around anymore...

...So, is there anyone who can help me resolve this? Thanks in advance.

The particular bugs are:

1. Skill setup in the quickbar is not saved. When I load a saved game, the quickbar is empty and I have to re-assign everything again.
2. If a skill is put in the quickbar, then removed from character (by event or remove "equipment with skill"), the skill remain in quickbar and can still be used.

This post has been edited by Helios: Jun 8 2011, 09:07 AM


__________________________
ERROR: NO ERROR DETECTED
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Apr 12 2011, 03:29 AM
Post #2


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




This should solve both problems. Be sure to paste it below all ORBS scripts.
Clicky
CODE
class Game_System
  attr_accessor :orbs_hotkeys
  alias_method(:krx_orbs_fix_init, :initialize) unless $@
  def initialize
    krx_orbs_fix_init
    @orbs_hotkeys = []
  end
end

class Scene_Skill
  
  def update_skill_selection
    if @actor_index == 0
      for i in 1..(ORBS::NUMBER_OF_HOTKEYS)
        if Input.trigger?(Input::Numbers[i]) and (not @skill_window.skill.nil?) and
          (@skill_window.skill.occasion != 3)
          Sound.play_decision
          ORBS.hotkey_objects[i - 1] = @skill_window.skill
          @help_window.set_text(sprintf(ORBS::HOTKEY_SET_MESSAGE, i))
          30.times do
            Graphics.update
            Input.update
          end
          $game_system.orbs_hotkeys = ORBS.hotkey_objects.clone
          return
        end
      end
    end
    $game_system.orbs_hotkeys = ORBS.hotkey_objects.clone
    oz_rbs_hk_update_skill_select
  end
  
end

class << ORBS
  attr_accessor   :hotkey_objects
end
  
class Scene_File
  
  def read_save_data(file)
    oz_rbs_read_sav_dat(file)
    $game_members = Marshal.load(file)
    ORBS.hotkey_objects = $game_system.orbs_hotkeys.clone
  end
end

class Game_Player

  alias_method(:krx_orbs_fix_gp_update, :update)
  def update
    krx_orbs_fix_gp_update
    hks = []
    ORBS.hotkey_objects.each_index {|i|
      if ORBS.hotkey_objects[i] == nil
        hks[i] = nil
      elsif self.battler.skill_learn?(ORBS.hotkey_objects[i])
        hks[i] = ORBS.hotkey_objects[i]
      end
    }
    if ORBS.hotkey_objects != hks
      ORBS.hotkey_objects = hks.clone
    end
  end
end


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Helios
post Apr 12 2011, 05:14 PM
Post #3


Level 4
Group Icon

Group: Member
Posts: 54
Type: None
RM Skill: Undisclosed




Work like a charm! Thank you soooo much Kread-EX! pinch.gif

PS: I've also found and fixed a tiny bug my self...
Line 2499 should be
when 6 ; x, y = y , -x

PS.2:
An other bug which I have no clue.

According to the readme:
QUOTE
+---------------+
| set_direction |
+---------------+

Set the direction where the target character faces at.

Arguments:
1. Target - the character that will move it's sprite
0 - the user
1 - the character at the target tile
2 and above - the character at the the projectile tile n (for example,
3 will target projectile number 3, explained at command projectile_fire)
2. Direction - The direction to face.
-1 - Turn 90 Right
0 - Turn Back
1 - Turn 90 Left
2 - Down
4 - Left
6 - Right
8 - Up
10 - The user's direction
11 - character at target tile's direction
12+ - target at projectile(n - 10)'s direction (12 - proj.#2, 13 - proj.#3)

Syntax:

"ACTION_NAME" => ["set_direction", target, direction],

Example:

"TURN_BACK_USER" => ["set_direction", 0, 0],


The first 3 direction arguments, "-1, 0, 1" works fine.

When set to 2,4,6,8, like:
"FACE_UP" => ["set_direction", 1, 8],
Return "NoMethodError" at line 1004. "Undefined method `' for nil:NilClass"

When set to 10, like:
"FACE_SAME_AS_USER" => ["set_direction", 1, 10],
Return "ArgumentError" at line 2537. "Wrong number of arguments(4 for 1)"


However this is not a major issue as this function can be completely ignored without affecting gameplay.
So if you don't have time, feel free to ignore this post sweat.gif


__________________________
ERROR: NO ERROR DETECTED
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Apr 13 2011, 12:42 AM
Post #4


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




QUOTE
When set to 10, like:
"FACE_SAME_AS_USER" => ["set_direction", 1, 10],
Return "ArgumentError" at line 2537. "Wrong number of arguments(4 for 1)"

For this problem, check this at the line 2537-2538:
CODE
      _coords = evaluate_coords_to_use(@args[1] - 10,
        #@user, @target_tile, @projectiles])
And replace simply by this:
CODE
      _coords = evaluate_coords_to_use(@args[1] - 10)
It works normally after. I don't foresee any reason why it should cause other problems - the method needs an integer, and an array was provided instead, hence the error.

QUOTE
When set to 2,4,6,8, like:
"FACE_UP" => ["set_direction", 1, 8],
Return "NoMethodError" at line 1004. "Undefined method `' for nil:NilClass"

Line 2548, here:
CODE
else; target.set_direction(@args[2])
Replace the 2 with a 1.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Helios
post Apr 13 2011, 06:12 PM
Post #5


Level 4
Group Icon

Group: Member
Posts: 54
Type: None
RM Skill: Undisclosed




Yes that fixed the problem laugh.gif I doubt if he tested all the functions... Anyway, thank you again Kread-EX, you are a great help!

============================================================================
Update: New bug found?

When trying to remove member from the party regardless if ORBS is active or not,
Line 2246
RGSS Error: disposed sprite

==============================================================================
Update: Again, new bug...

Line 2544, No method error
undefined method `rbs_char_obj' for #<ORBS::CharObj:0xf953d8>

I figured out this was caused by enemies running into each other.

Example: the crash will happen in 1 or 2 turns.



UPDATE:
At last I found the cause of this bug. The enemy here in this sample have a skill which cause target to turn towards himself. If this skill hits the target, nothing goes wrong. But if the skill is used when no target is in range...the error occurs cuz there's no target to turn therefore the action sequence cannot proceed. Character using this skill towards nothing result in the same error. Basically any action that cause target to change facing will crash when they miss.

This post has been edited by Helios: Jun 6 2011, 08:09 PM


__________________________
ERROR: NO ERROR DETECTED
Go to the top of the page
 
+Quote Post
   
Helios
post Jun 6 2011, 08:30 PM
Post #6


Level 4
Group Icon

Group: Member
Posts: 54
Type: None
RM Skill: Undisclosed




Damn that last bug really puzzled me for some time.

Now there's only one bug, the game crash when member is removed from party.


__________________________
ERROR: NO ERROR DETECTED
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Jun 8 2011, 07:51 AM
Post #7


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Line 2246, replace this:
CODE
@character_sprite.opacity = op unless @character_sprite.nil?

with this:
CODE
unless @character_sprite.nil? || @character_sprite.disposed?
    @character_sprite.opacity = op
end


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Helios
post Jun 8 2011, 09:06 AM
Post #8


Level 4
Group Icon

Group: Member
Posts: 54
Type: None
RM Skill: Undisclosed




Great, now I could focus on making the game. Much thanks Kread-EX! Couldn't have done it without you! pinch.gif


__________________________
ERROR: NO ERROR DETECTED
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 05:30 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker