PREXUS'S PROFILE
prexus
309
Search
Filter
RPG Maker VX Ace - Nugget Crash Course
author=Justicelord
My computer is only a few years old...
I'd check and make sure your video drivers are installed and up to date, and then check your monitor specifications. I think only the first or second generation of LCD monitors didn't support higher than 1024x780, and every monitor afterwards has.
If you are on something like a netbook, I could imagine it not supporting those resolutions but those kind of computers aren't designed for this sort of thing. They are designed for checking emails and stuff.
RPG Maker VX Ace - Nugget Crash Course
author=Justicelord
So is there anyway to run ace on a lower screen resolution? If not I've already lost and the plot I started working on is wasted.
If your screen can't exceed 1024x780 resolution, unfortunately you are running severely outdated hardware. I know you can't make the vxAce software run on a lower resolution, but there may be a work around. TouchFuzzy might know more about it.
More scripting questions (Ace)
author=equnax
Thanks again Prexus, this is immensely helpful. I think some of your examples got screwed up because of the square brackets, but I get the drift. Someone should sticky this post. It is a good overview and it might help others.
Yes they did. Sorry I wrote it and then went to bed without checking it over. I'll fix it with some code tags.
VXA Scripting Issue
I actually used <code Ruby> instead of <code ruby> (square brackets obv) which apparently isn't good enough. I figured it out later.
@hp_damage is for the pop-damage, not for actually changing the HP.
@hp_damage is for the pop-damage, not for actually changing the HP.
More scripting questions (Ace)
Look in the Game_Party script within the Script Editor.
Anything with 'def' infront of it is a callable function. The breakdown of a function is
def function_name(arguments)
In the Call Script command, you can reference any Game_Party function by using $game_party.function_name
and adding (arguments) if it requires arguments. These are usually described by what the arguments are called in the function. Things like "item_id", "number" etc.
vxAce uses actual RPG::Item/RPG::Weapon/RPG::Armor objects instead of just IDs for most of the functions, so lets take Game_Party#gain_item() for an example.
The function is defined like so:
item in this case is an RPG::Item or RPG::Weapon or RPG::Armor. To get this, the easiest way is: $data_items[id] or $data_weapons[id] or $data_armors[id] where id is the ID in the Database Editor (the number to the left of the entry in the list.)
amount is the amount of the item you wish to add. This number can also be a negative number if you wish to remove the item (or you can use the function lose_item)
include_equip is an additional flag which will let you remove items from the inventory, even if the item is equipped to someone. This is useful if you want to remove key items that the heroes might have equipped. This is false by default (as indicated by the = false following it;) which means you can either omit the argument entirely, or use the boolean term 'true' to let it remove items from the heroes equipped items.
As an example, here I am adding 10 of the 5th Item in the database:
Call Script:
or, here I am removing 40 of the 17th Armor in the database, including anything equipped.
Call Script:
You could also use
or
but if the line of code is split up into two lines in the Call Script field, it won't process properly.
Anything with 'def' infront of it is a callable function. The breakdown of a function is
def function_name(arguments)
In the Call Script command, you can reference any Game_Party function by using $game_party.function_name
and adding (arguments) if it requires arguments. These are usually described by what the arguments are called in the function. Things like "item_id", "number" etc.
vxAce uses actual RPG::Item/RPG::Weapon/RPG::Armor objects instead of just IDs for most of the functions, so lets take Game_Party#gain_item() for an example.
The function is defined like so:
def gain_item(item, amount, include_equip = false)
item in this case is an RPG::Item or RPG::Weapon or RPG::Armor. To get this, the easiest way is: $data_items[id] or $data_weapons[id] or $data_armors[id] where id is the ID in the Database Editor (the number to the left of the entry in the list.)
amount is the amount of the item you wish to add. This number can also be a negative number if you wish to remove the item (or you can use the function lose_item)
include_equip is an additional flag which will let you remove items from the inventory, even if the item is equipped to someone. This is useful if you want to remove key items that the heroes might have equipped. This is false by default (as indicated by the = false following it;) which means you can either omit the argument entirely, or use the boolean term 'true' to let it remove items from the heroes equipped items.
As an example, here I am adding 10 of the 5th Item in the database:
Call Script:
item = $data_items[5] $game_party.gain_item(item, 10)
or, here I am removing 40 of the 17th Armor in the database, including anything equipped.
Call Script:
item = $data_armors[17] $game_party.gain_item(item, -40, true)
You could also use
$game_party.gain_item($data_items[5], 10)
$game_party.gain_item($data_armors[17], -40, true)
VXA Scripting Issue
... NEVERMIND. Fuck I am stupid. The mistake is right fucking there -_-.
It's not a logic mistake, I just have the MP regen affected HP instead of MP, and it just happens to be a negating number so I don't see an effect change.
Thanks anyways, GRS. If you do see the code and see anything that I should be changing, let me know. <3
It's not a logic mistake, I just have the MP regen affected HP instead of MP, and it just happens to be a negating number so I don't see an effect change.
Thanks anyways, GRS. If you do see the code and see anything that I should be changing, let me know. <3
VXA Scripting Issue
Alright, I will post another issue I am having here in hopes you can give me a hand, GreatRedSpirit.
I'm currently running this code I made (with the notetag loading stuff 'borrowed' from Yanfly)
The code is working fine in all aspects, except the HP, MP, and TP aren't changing when the regenerate_hp/mp/tp functions are called.
I have Yanfly's Battle Engine installed so I can see Pop-ups, and the right values are being popped.
When I put
The first msgbox line prints "500" which is the correct initial HP
The second msgbox line prints "510" which is the correct HP after regen is applied (the notetag being used is <param hrg: +10>)
But the HP stat isn't adjusted in game, and when the regenerate_hp function is called again, it's 500 and 510 again (when it should be 510, 520)
Any help, GRS?
I'm currently running this code I made (with the notetag loading stuff 'borrowed' from Yanfly)
#============================================================================== # # ▼ Prexus Ace - Static Param Change # -- Last Updated: 2012.03.17 # -- Level: Normal # -- Requires: n/a # #============================================================================== $imported = {} if $imported.nil? $imported["PRX-StaticParamChange"] = true #============================================================================== # ▼ Updates # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # 2012.03.18 : Fixed Regen being affected as multiplier # 2012.03.17 : Initial draft finished # #============================================================================== # ▼ Introduction # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # This script adds functionality to 'Features' for static value increases. # It will allow you to have statistics changed by Actor, Class, Equipment, and # Status Effects be static values as opposed to percentages. # #============================================================================== # ▼ Instructions # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # To install this script, open up your script editor and copy/paste this script # to an open spot above Main. # # ----------------------------------------------------------------------------- # * Notetags # ----------------------------------------------------------------------------- # <param x: +y> # <param x: -y> # Add this notetag to an Actor, Class, Equipment, or Status Effect notetag and # replace x with one of the following parameters: # mhp (Max HP) # mmp (Max MP) # atk (Attack) # def (Defense) # mat (Magic Attack) # mdf (Magic Defense) # agi (Agility) # luk (Luck) # hrg (HP Regen) # mrg (MP Regen) # trg (TP Regen) # and replace y with any integer value. # You can have any number of these notetags for any number of parameter changes. # #============================================================================== # ▼ Compatibility # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # This script is made for RPG Maker VX Ace and designed to be as modular as # possible to avoid script conflicts. It is however possible that conflicts may # occur with other scripts that make changes/use of the Game_Actor class and its # parent classes (Game_Battler, Game_BattlerBase) # #============================================================================== module PRX module REGEXP module BASEITEM PARAM_MHP = /<(?:PARAM_MHP|param mhp):[ ]([\+\-]\d+)>/i PARAM_MMP = /<(?:PARAM_MMP|param mmp):[ ]([\+\-]\d+)>/i PARAM_ATK = /<(?:PARAM_ATK|param atk):[ ]([\+\-]\d+)>/i PARAM_DEF = /<(?:PARAM_DEF|param def):[ ]([\+\-]\d+)>/i PARAM_MAT = /<(?:PARAM_MAT|param mat):[ ]([\+\-]\d+)>/i PARAM_MDF = /<(?:PARAM_MDF|param mdf):[ ]([\+\-]\d+)>/i PARAM_AGI = /<(?:PARAM_AGI|param agi):[ ]([\+\-]\d+)>/i PARAM_LUK = /<(?:PARAM_LUK|param luk):[ ]([\+\-]\d+)>/i PARAM_HRG = /<(?:PARAM_HRG|param hrg):[ ]([\+\-]\d+)>/i PARAM_MRG = /<(?:PARAM_MRG|param mrg):[ ]([\+\-]\d+)>/i PARAM_TRG = /<(?:PARAM_TRG|param trg):[ ]([\+\-]\d+)>/i end # BASEITEM end # REGEXP end # PRX module DataManager #-------------------------------------------------------------------------- # alias method: load_database #-------------------------------------------------------------------------- class <<self; alias load_database_spc load_database; end def self.load_database load_database_spc load_notetags_spc end #-------------------------------------------------------------------------- # new method: load_notetags_spc #-------------------------------------------------------------------------- def self.load_notetags_spc groups = [$data_actors, $data_classes, $data_weapons, $data_armors, $data_states] for group in groups for obj in group next if obj.nil? obj.load_notetags_spc end end end end # DataManager class RPG::BaseItem #-------------------------------------------------------------------------- # public instance variables #-------------------------------------------------------------------------- attr_accessor :static_param #-------------------------------------------------------------------------- # common cache: load_notetags_spc #-------------------------------------------------------------------------- def load_notetags_spc @static_param = {} #--- self.note.split(/[\r\n]+/).each { |line| case line #--- when PRX::REGEXP::BASEITEM::PARAM_MHP @static_param[:MHP] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_MMP @static_param[:MMP] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_ATK @static_param[:ATK] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_DEF @static_param[:DEF] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_MAT @static_param[:MAT] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_MDF @static_param[:MDF] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_AGI @static_param[:AGI] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_LUK @static_param[:LUK] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_HRG @static_param[:HRG] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_MRG @static_param[:MRG] = $1.to_i when PRX::REGEXP::BASEITEM::PARAM_TRG @static_param[:TRG] = $1.to_i else next #--- end } # self.note.split end end # RPG::BaseItem class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ▼ combine exisiting param with static param change by id #-------------------------------------------------------------------------- def param(param_id) return super + static_param(param_id) end #-------------------------------------------------------------------------- # ▼ discover total static param change by id #-------------------------------------------------------------------------- def static_param(param_id) v = 0 case param_id when 0 # MHP feature_objects.each { |item| next unless item.static_param[:MHP]; v += item.static_param[:MHP]; } when 1 # MMP feature_objects.each { |item| next unless item.static_param[:MMP]; v += item.static_param[:MMP]; } when 2 # ATK feature_objects.each { |item| next unless item.static_param[:ATK]; v += item.static_param[:ATK]; } when 3 # DEF feature_objects.each { |item| next unless item.static_param[:DEF]; v += item.static_param[:DEF]; } when 4 # MAT feature_objects.each { |item| next unless item.static_param[:MAT]; v += item.static_param[:MAT]; } when 5 # MDF feature_objects.each { |item| next unless item.static_param[:MDF]; v += item.static_param[:MDF]; } when 6 # AGI feature_objects.each { |item| next unless item.static_param[:AGI]; v += item.static_param[:AGI]; } when 7 # LUK feature_objects.each { |item| next unless item.static_param[:LUK]; v += item.static_param[:LUK]; } end return v end #-------------------------------------------------------------------------- # ▼ discover total static xparam change by id #-------------------------------------------------------------------------- def static_xparam(xparam_id) v = 0 case xparam_id when 7 # HRG feature_objects.each { |item| next unless item.static_param[:HRG]; v += item.static_param[:HRG]; } when 8 # MRG feature_objects.each { |item| next unless item.static_param[:MRG]; v += item.static_param[:MRG]; } when 9 # TRG feature_objects.each { |item| next unless item.static_param[:TRG]; v += item.static_param[:TRG]; } end return v end #-------------------------------------------------------------------------- # ▼ Regenerate HP #-------------------------------------------------------------------------- def regenerate_hp super @result.hp_damage -= static_xparam(7) # HRG self.hp += static_xparam(7) # HRG end #-------------------------------------------------------------------------- # ▼ Regenerate MP #-------------------------------------------------------------------------- def regenerate_mp super @result.mp_damage -= static_xparam(8) # MRG self.hp += static_xparam(8) # MRG end #-------------------------------------------------------------------------- # ▼ Regenerate TP #-------------------------------------------------------------------------- def regenerate_tp super self.tp += static_xparam(9) # TRG end #-------------------------------------------------------------------------- # ▼ Regenerate all #-------------------------------------------------------------------------- def regenerate_all; super; end end # Game_Actor
The code is working fine in all aspects, except the HP, MP, and TP aren't changing when the regenerate_hp/mp/tp functions are called.
I have Yanfly's Battle Engine installed so I can see Pop-ups, and the right values are being popped.
When I put
#-------------------------------------------------------------------------- # ▼ Regenerate HP #-------------------------------------------------------------------------- def regenerate_hp super msgbox self.hp @result.hp_damage -= static_xparam(7) # HRG self.hp += static_xparam(7) # HRG msgbox self.hp end
The first msgbox line prints "500" which is the correct initial HP
The second msgbox line prints "510" which is the correct HP after regen is applied (the notetag being used is <param hrg: +10>)
But the HP stat isn't adjusted in game, and when the regenerate_hp function is called again, it's 500 and 510 again (when it should be 510, 520)
Any help, GRS?
RPG Maker VX Ace - Nugget Crash Course
author=Anaryuauthor=prexusWho said I'm competing? And if I were, I lost the last two anyway!
Wait, Anaryu is competing? Fuck.
I'm at a crossroads... abandon ship or step it the fuck up?
Was just kidding, mah man.
RPG Maker VX Ace - Nugget Crash Course
author=Anaryuauthor=kentonaI thought you weren't going to finish anyway? (which seems to be a plan for a lot of the entries...)
Just to be sporting, I gave the rest of you a day's headstart, and am only downloading the trial right now.
I hope you used your time wisely.
Wait, Anaryu is competing? Fuck.
I'm at a crossroads... abandon ship or step it the fuck up?