I have XY coordinates on a map. Is there someway to use those XY, let's say (3, 4) as an example, and check that tile for:
A. Any event.
B. If the tile is passable.
If there's not a simple, one way of doing it, does anyone know how to script this?
I want to check (theoretically 3,4) for tile impassibility and if an event is there. I've tried googling but to no avail. I'll keep searching but I figured I would ask here as well.
You could use '$game_map.passable?(x, y, d)' and '$game_map.event_id_xy(x, y)' to do what you want.
hi, is it possible to get the name of the skill an enemy uses during battle?
The current skill performed can be gotten with this:
@subject.current_action.item@subject = The user of the item.
That returns the current item used in battle, be it a skill or item, and can be used for enemies and actors alike.
So, just add a .name at the end and you get it's name.
I forgot to mention, you can call that in Scene_Battle only!
thank you very much! ^^
I was close to this, I only missed the ".item" in front of ".name" ... ^^"
and yes, I will use this only in Scene_Battle.
quick question, how would I go around making my damage formula's run a different formula based on the weapon type?
Check the weapon's type id on the damage formula...
so a simple if a.wtype_id.include?(x) ; Formula?
I believe its a property of the weapon... So it would be something like a.weapons[0].wtype_id == id
Is there a way to add files or information to $game_data? I want to put in an array or matrix (X rows by Y columns) with some info in it, to be accessed by code within the game. Preferably useable when I hit the "test game" button rather than having to export the whole thing every time I want to test (not sure if that'd be an issue or not).
Why not add it as a new accessor to $game_system?
Because I have no idea how 😛 I didn't know where to look, going through the game_system scripts I'm not finding anything that stands out to me... Wait never mind, am I correct in looking at the DataManager scripts for VXACE that I can do:
$data_whatever = load_data("Data/WhateverICallThis.rvdata2")And if so, am I correct to assume it goes in the "Load Normal Database" section with all the other $data_items and such?
And finally, all of the data visible is *.rvdata2, do you have a link for how to make files in that format?
Thanks for the answer, I had no idea where to even begin looking xD
You would have to write a script that creates the WhateverICallThis.rvdata2 file in the first place (this needs to be set up to create the file, but you can remove it when you distribute the program), and another script that defines its layout (check the help file - F1 - and Scripts to see how this is done for all the Items, Actors, etc - you'll need something similar).
Something like
class Game_Systemattr_acessor :myvarendNow you can use it as$game_system.myvar
Its also autosaved in thesl save file as its part of game system
Thanks to both of you! I had the hardest time figuring out why my *.txt file wouldn't read... turns out the *real* game file wasn't in the steam directory (I have the steam copy of VX Ace), nor in the user-documents directory... finally found it, though, and finally finagled around with google and the help file! Got it working. For anyone else who stumbles across this, here's my code:
Event 1 (event with "Script" stuff put in to activate when player touches it) splitting a text file into an array, then printing it in console and saving it:
test = File.foreach("Data/Evolutions.txt").map { |line| line.split('/') }print testsave_data(test, "Data/Evolve.rvdata2")Event 2 loading the Evolve.rvdata2 stuff, then printing it to console:
test = load_data("Data/Evolve.rvdata2")print testMission successful 😀
New question: Poking around in the help and script files, I'm confused as to where all the RPG::Stuff files/scripts are or how to edit them. For example, RPG::Skill is referenced in the script Game_Actor, and I can read the definitions in the F1 help file... but I can't figure out *where* those definitions are? Are they in the script editor, the data files... or someplace I can't access them at all? I have an idea of what to do, but am not sure where to put anything.
Example: $data_myarray is [[test, @id=2, @name=bob],[test2, @id=3, @name=claire]]
$data_myarray[x].name would use:
$data_myarray.name = $data_myarray[x][2]Thus $data_myarray[1].name would return the value "claire". Assuming I'm doing that right/acceptable, I have no idea where in the scripts to put this, or if I should be putting it in the $data_myarray file itself at the start.
Either click on the 'Script Editor' icon on the bar at the top of the editor screen, or press F11. Either brings up all the scripts. Default scripts come first, and below them is the place where custom scripts go.
They are "hidden" in the dll file, I guess.
But since you can read all of the RPG::Stuffs classes from the help files, you don't really need to directly see it in the editor itself.
Just enter the class and modify it how you want.
For example:
class RPG::Actor < RPG::BaseItem # do your stuffs here, like make new instance variables, # define new methods, or modify already existing ones.endIn order to initialize a starting value for a new instance variable in those classes, you should use the DataManager module's 'load_database' method.That is the safest way to add new instance variables there, in case you need those new instance variables in another class' initialize method too (for example, you might need a variable from RPG::Actor in the initialization of the Game_Actor class). Alias that method and call your new method (which you made in those RPG::Stuffs classes) on the selected classes after the alias.
You could always alias the initialize method of that class to create an initial value for the instance variables.. And just make them as attr_accessor then you can access them from outside calls..