Thank you for your help, I greatly appreciate it!
Script Call Support Boards
RPG Maker VXAce SupportTry to explore and tinker with Ace. It will save you a lot of trouble. There's a great big deal of things you can do without script calls.
However, here is a list of Ace script calls that has been very vital to me.
However, here is a list of Ace script calls that has been very vital to me.
So I'm using a script I found online that adds an odometer style of health to the game. It works great and all up until I decide that I want multiple enemies and multiple party members.
Here's the scenario: I have two party members named 1 and 2. They've come across two enemies named A and B. I decide that I want 1 to attack A and 2 to attack B. However, 1 strikes A and A fades away. The game then appears to freeze. The music still plays, and I can still use F1 and such to open up those menus, but the battle is just...stuck.
Under normal circumstances, I would message the creator about this issue, but he seems to no longer support it.
Sorry if this isn't the right area for this.
Edit: I now have a very large sneaking suspicion that this is the wrong area for this. If someone wouldn't mind pointing me in the right direction as to where I would go for help with this issue, that'd be great.
Here's the scenario: I have two party members named 1 and 2. They've come across two enemies named A and B. I decide that I want 1 to attack A and 2 to attack B. However, 1 strikes A and A fades away. The game then appears to freeze. The music still plays, and I can still use F1 and such to open up those menus, but the battle is just...stuck.
Spoiler
Code:
#==============================================================================
# ** Earthbound-Ish Odometer Roll
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 17, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script attempts to emulate the battle system of the Earthbound/Mother
# series; most notably Earthbound and Earthbound 2 (Mother 2 and 3). This
# certain addon addresses the infamous HP/MP scrolling system that made battles
# that much more intense.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials. Edit the modules to your liking.
#==============================================================================
# Graphics:
#------------------------------------------------------------------------------
# You must have two Odometer pictures in your Graphics/System folder. One of
# them must be named "Odometer_HP", and the other one must be named
# "Odometer_MP". Obviously, they represent the odometer for HP and MP values,
# respectively
#==============================================================================
#==============================================================================
# ** Cozziekuns
#==============================================================================
module Cozziekuns
module Earthboundish
Odometer_Roll_Speed = 5 # Smaller speeds are faster than larger speeds.
end
end
include Cozziekuns
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor
attr_accessor :odometer_hp
attr_accessor :odometer_mp
alias coz_ebisohd_gmactr_setup setup
def setup(actor_id, *args)
coz_ebisohd_gmactr_setup(actor_id, *args)
@odometer_hp = 0
@odometer_mp = 0
end
alias coz_ebishod_gmactr_execute_damage execute_damage
def execute_damage(user, *args)
if $game_party.in_battle
on_damage(@result.hp_damage) if @result.hp_damage > 0
@odometer_hp += @result.hp_damage
@odometer_mp += @result.mp_damage
user.hp += @result.hp_drain
user.mp += @result.mp_drain
else
coz_ebishod_gmactr_execute_damage(user, *args)
end
end
[:hp, :mp].each { |stat|
alias_method("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, "item_effect_recover_#{stat}".to_sym)
define_method("item_effect_recover_#{stat}".to_sym) { |user, item, effect|
if $game_party.in_battle
value = (send("m#{stat}".to_sym) * effect.value1 + effect.value2) * rec
value *= user.pha if item.is_a?(RPG::Item)
value = value.to_i
@result.send("#{stat}_damage=".to_sym, @result.send("#{stat}_damage".to_sym) - value)
@result.success = true
send("odometer_#{stat}=".to_sym, send("odometer_#{stat}".to_sym) - value)
else
send("coz_ebishod_gmactr_item_effect_recover_#{stat}".to_sym, user, item, effect)
end
}
}
end
#==============================================================================
# ** Game_Enemy
#==============================================================================
class Game_Enemy
def execute_damage(user)
on_damage(@result.hp_damage) if @result.hp_damage > 0
self.hp -= @result.hp_damage
self.mp -= @result.mp_damage
user.odometer_hp -= @result.hp_drain
user.odometer_mp -= @result.mp_drain
end
end
#==============================================================================
# ** Window_BattleStatus
#==============================================================================
class Window_BattleStatus
def refresh_hpmp(actor, index)
rect = item_rect(index)
if gauge_area_rect(index) == item_rect(index)
rect.y += line_height * 2
rect.height -= line_height * 2
contents.clear_rect(rect)
else
contents.clear_rect(gauge_area_rect(index))
end
draw_gauge_area(gauge_area_rect(index), actor)
end
[:hp, :mp].each { |stat|
define_method("draw_actor_#{stat}".to_sym) { |actor, x, y, width|
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab.send("#{stat}_a"))
od_x = x + contents.text_size(Vocab.send("#{stat}_a")).width + 4
actor_hp = actor.send("#{stat}".to_sym)
actor_od_hp = actor.send("odometer_#{stat}".to_sym)
draw_odometer(od_x, y, stat, actor_hp, actor_od_hp)
}
}
def draw_odometer(x, y, type, value, od_value)
bitmap = Cache.system("Odometer_#{type.upcase}")
places = [1000, 100, 10, 1]
od_ary = value.to_s.split("").collect { |str| str.to_i }
(3 - od_ary.size).times { od_ary.unshift(0) }
od_ary.each_index { |i|
src_y = (9 - od_ary[i]) * 20
if (od_ary.join.to_i) % places[i] == 0 and od_value != 0
src_y += 20 / Earthboundish::Odometer_Roll_Speed * (Graphics.frame_count % Earthboundish::Odometer_Roll_Speed)
end
contents.blt(x + i * 24, y + 2, bitmap, Rect.new(0, src_y, 24, 20))
}
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
alias coz_ebishod_scbtl_update_basic update_basic
def update_basic(*args)
coz_ebishod_scbtl_update_basic(*args)
update_odometer
end
def update_odometer
$game_party.members.each { |actor|
if actor.odometer_hp != 0 or actor.odometer_mp != 0
if actor.odometer_hp != 0 and Graphics.frame_count % Earthboundish::Odometer_Roll_Speed == 0
damage = actor.odometer_hp > 0 ? 1 : - 1
actor.hp -= damage
actor.odometer_hp -= damage
end
if actor.odometer_mp != 0 and Graphics.frame_count % Earthboundish::Odometer_Roll_Speed == 0
damage = actor.odometer_mp > 0 ? 1 : - 1
actor.mp -= damage
actor.odometer_mp -= damage
end
@status_window.refresh_hpmp(actor, actor.index)
end
}
end
end
Under normal circumstances, I would message the creator about this issue, but he seems to no longer support it.
Sorry if this isn't the right area for this.
Edit: I now have a very large sneaking suspicion that this is the wrong area for this. If someone wouldn't mind pointing me in the right direction as to where I would go for help with this issue, that'd be great.
I cannot for the life of me get this to work in a conditional branch:
if ($game_variables[57] / 3) == 1; end
I could do this without a conditional branch script call, but I feel it'd be far more efficient than doing it manually.
The idea is that every turn, I'm increasing variable 57 by 1. Then, I divide it by 3, and if it gives me a whole integer, I know that 3 turns have passed. It's a turn counter. However, before I figure out how to compare it to an array of numbers, I need it to actually go off at all. I have a text event setup in the "else" option of the branch, that prints the current value of $game_variables[57]. On turn 3, it is 3. However, I also know that 3 divided by 3 is, in fact, 1, as I went to elementary school.
What in the world am I messing up?
if ($game_variables[57] / 3) == 1; end
I could do this without a conditional branch script call, but I feel it'd be far more efficient than doing it manually.
The idea is that every turn, I'm increasing variable 57 by 1. Then, I divide it by 3, and if it gives me a whole integer, I know that 3 turns have passed. It's a turn counter. However, before I figure out how to compare it to an array of numbers, I need it to actually go off at all. I have a text event setup in the "else" option of the branch, that prints the current value of $game_variables[57]. On turn 3, it is 3. However, I also know that 3 divided by 3 is, in fact, 1, as I went to elementary school.
What in the world am I messing up?
I personally like to set up instance variables for stuff like this, so it doesn't confuse the system. You create, name, and set a instance variable's value, as the name implies, for this instance only. These variables are script specific, unless you you do some other stuff I'm not going to get in to lol. Anyway back to the point.
@turn_counter = $game_variables[57]
@integer = @turn_counter / 3
if
@integer == 1
else
end
This give you flexibility.
Whenever this script is called, it sets the values again, making it precise Even more so if it is constantly updated. You could make it run itself again is for instance @integer doesn't equal 1, creating a loop until the condition is fulfilled. You could simply use the 'loop' tag, but I digress, just some ideas.
I mean the big downside to doing things this way, is that I'd then need to use script calls for the various branches, which I wanted to avoid, as it seems a tad unnecessary. However, as an alternative method, it's definitely noteworthy. 🙂
Ah, I think I found Your problem. You said you are printing the value of the variable on the 3ed turn and it's coming up 3? Well that's to be expected, since you haven't actually changed its value. In your conditional you say:
if ($game.variables[57] \ 3) == 1
Your asking if the variable, divided by 3, equals 1. Your not actually making the variable have a value of 1, so it'll still return a 3 when prompted.
if ($game.variables[57] \ 3) == 1
Your asking if the variable, divided by 3, equals 1. Your not actually making the variable have a value of 1, so it'll still return a 3 when prompted.
So, the full event is:
Conditional branch: that equation
show text "it works"
else
print variable value
end
To my understanding, that would ask if the value of v[57]/3 == 1, and then if so, show text "it works," else print variable value. So, on turn 3, it *should* print text. It never does.
Hiya. The script call list doesn't include Force Action, so I can't use it to use a skill.
What's the script call to check if an event is touching a region ID?
I know the one for player, but not how to check for an event.
I know the one for player, but not how to check for an event.
If you want to find the region ID of an event, you will need these calls.
As for the setup...
# Returns the Region ID of the Event.
$game_map.region_id($game_map.events[event_id].x, $game_map.events[event_id].y)
Where event_id is of course the ID of the event who's position is being checked.
If you want to use this in a conditional branch, store the resulting value in one of the global variables.
Code:
$game_map.region_id(x, y)
$game_map.events[event_id].x
$game_map.events[event_id].y
As for the setup...
# Returns the Region ID of the Event.
$game_map.region_id($game_map.events[event_id].x, $game_map.events[event_id].y)
Where event_id is of course the ID of the event who's position is being checked.
If you want to use this in a conditional branch, store the resulting value in one of the global variables.
Code:
$game_variables[ID] = $game_map.region_id($game_map.events[event_id].x, $game_map.events[event_id].y)
I use this script call:
screen.pictures[4].move(0, 500, (Math::cos(screen.pictures[4].x / 20) * 30) + 200, 100, 100, 255, 0, 240)
The math is okay, I get no errors. However, instead of having an animation that looks like the y=cos(x)+a graph. I get a move animation like this y=x+a, which is basically just a straight line.
The only alternative I have found, is by having a "Show Picture" command like this:
screen.pictures[4].show("particles/[Scroll]BlueCore", 0, (screen.pictures[4].x + 2), ((Math::cos(screen.pictures[4].x / 20) * 30) + 200), 100, 100, 255, 1)
wait(1)
running constantly. Of course, the end result is very, very laggy.
Any ideas?
Thank you.
screen.pictures[4].move(0, 500, (Math::cos(screen.pictures[4].x / 20) * 30) + 200, 100, 100, 255, 0, 240)
The math is okay, I get no errors. However, instead of having an animation that looks like the y=cos(x)+a graph. I get a move animation like this y=x+a, which is basically just a straight line.
The only alternative I have found, is by having a "Show Picture" command like this:
screen.pictures[4].show("particles/[Scroll]BlueCore", 0, (screen.pictures[4].x + 2), ((Math::cos(screen.pictures[4].x / 20) * 30) + 200), 100, 100, 255, 1)
wait(1)
running constantly. Of course, the end result is very, very laggy.
Any ideas?
Thank you.
Did you try just using Math.cos instead of Math::cos? I say that because Math.rand() works.
It was because the Move Picture command just read the original :y value and performed it for the rest of the 240 frames. Found an alternative that's smoother and not laggy at all.
Someone mind telling me what's causing the error in the picture attached?
It occurs when I enter a certain room on the map, one with about 10 different icon comments (<mouse exitu Living Room> etc).
I'm using Amaranth's Super Simple Mouse Script For Ace and I have modified the Script slightly because I inserted new icons into IconSet.
Here is my version of the script, more specifically lines 108 to 111.
Thanks.
EDIT: After typing this out, I immediately checked all of my comments to ensure there were no spelling errors. I narrowed it down to the area it kept crashing in (a small closet) and realized my mistake. I typo'd <mouse ezit Main Hall> in the comments. It must have been crashing after I hovered my mouse over it because it could not recognize the icon command.
I'll leave my question here just in case other's experience a similar issue.

It occurs when I enter a certain room on the map, one with about 10 different icon comments (<mouse exitu Living Room> etc).
I'm using Amaranth's Super Simple Mouse Script For Ace and I have modified the Script slightly because I inserted new icons into IconSet.
Here is my version of the script, more specifically lines 108 to 111.
Thanks.
EDIT: After typing this out, I immediately checked all of my comments to ensure there were no spelling errors. I narrowed it down to the area it kept crashing in (a small closet) and realized my mistake. I typo'd <mouse ezit Main Hall> in the comments. It must have been crashing after I hovered my mouse over it because it could not recognize the icon command.
I'll leave my question here just in case other's experience a similar issue.

$game_player.reserve_transfer(map_id, x, y, direction)
How do i change if its dark fade, white fade or no fade? Its standard dark fade with this Script snippet.
You would realy help me out with this.
How do i change if its dark fade, white fade or no fade? Its standard dark fade with this Script snippet.
You would realy help me out with this.
@Bex fade_type is what you are looking for :
Code:
# Normal
$game_temp.fade_type = 0
# White Fade-Out
$game_temp.fade_type = 1
# Instant
$game_temp.fade_type = 2
Thank you.
I have another Question:
load_data("Data/Map001.rvdata2").events[1].x
This works fine, it Loads the Data of Map 1 even if iam on another Map and returns me the x map position of that Event.
load_data("Data/Map001.rvdata2").events[1].direction
This one doesnt work. Does direction even exist or how to call it in this special case?
load_data("Data/Map001.rvdata2").events[1].x
This works fine, it Loads the Data of Map 1 even if iam on another Map and returns me the x map position of that Event.
load_data("Data/Map001.rvdata2").events[1].direction
This one doesnt work. Does direction even exist or how to call it in this special case?
The event hasn't been processed yet, so you are dealing with raw RPG::Event data. The following should grab the default direction the event will be facing once it is processed (if the graphic to be used is on the first event page) :
Code:
load_data("Data/Map001.rvdata2").events[1].pages[0].graphic.direction
Original thread: https://forums.rpgmakerweb.com/threads/script-call-support-boards.25767/