Yep - I think it's in Control Variables - Other/Game Data.
Ruby/RGSSx questions that don't deserve their own thread
RGSSx Script SupportAh, well that was silly of me. The command works just fine, it was the event I made, as a whole, which was at fault.
I feel stupid now 😛
I feel stupid now 😛
How might I go about re-ordering the equip options in both the equip menu and status menu? Say I wanted to have it ordered:
Weapon
Body
Head
Shield
Accessory
Weapon
Body
Head
Shield
Accessory
@ Perpetual Drunk:
Check out Yanfly's ACE Equip Engine.
http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/ace-equip-engine/
It can do that and more with very little know-how needed.
_____________________________
For my project, I've worked out a very elaborate 'training' common event for learning skills. The problem is that I need to write to a variable on level ups and I have no idea how to even begin doing this. I imagine I need to edit the level up script, but... Seriously, I'm quite clueless when it comes to programming in general.
So what I need specifically is for every even level (2, 4, etc.) for an actor-specific variable to be increased by one. IE, actor 3 turns level 6 and so Variable33 gets +1'd, and then later actor 5 turns level 6 so variable 36 gets +1'd.
Any assistance would be greatly appreciated!
Check out Yanfly's ACE Equip Engine.
http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/ace-equip-engine/
It can do that and more with very little know-how needed.
_____________________________
For my project, I've worked out a very elaborate 'training' common event for learning skills. The problem is that I need to write to a variable on level ups and I have no idea how to even begin doing this. I imagine I need to edit the level up script, but... Seriously, I'm quite clueless when it comes to programming in general.
So what I need specifically is for every even level (2, 4, etc.) for an actor-specific variable to be increased by one. IE, actor 3 turns level 6 and so Variable33 gets +1'd, and then later actor 5 turns level 6 so variable 36 gets +1'd.
Any assistance would be greatly appreciated!
How would I write a formula to check if an actor has a specific state,
I've seen things like IF self.hp = 123
I have attempted using IF self.states[13] = true
and many variations of the above line, but I'm honestly just guessing. Any help would be greatly appreciated!
I've seen things like IF self.hp = 123
I have attempted using IF self.states[13] = true
and many variations of the above line, but I'm honestly just guessing. Any help would be greatly appreciated!
where are you doing this?
also, equality operator is ==, = is for setting things
also, equality operator is ==, = is for setting things
actor.states is an array of $data.states
@states is an array of state ids. It is not an array of true/false values where you use the state id as an index, as you've done.
As Engr. Shana says, it will depend on where you're calling it from.
You could do actor.state?(13) which will return true if the state is inflicted, and false otherwise.
@states is an array of state ids. It is not an array of true/false values where you use the state id as an index, as you've done.
As Engr. Shana says, it will depend on where you're calling it from.
You could do actor.state?(13) which will return true if the state is inflicted, and false otherwise.
Thanks Engr. Shana and Shaz,
To answer your questions I was writing the formula in a note tag for Yami's Battle Symphony and Yanfly's Skill Cost Manager.
Shaz, your explanation of how the @states variable works helped a lot. I am going to try actor.state?(13) and see what happens.
Again, thank you both so much, it's really appreciated! 😀
Edit: (About 2 Mins. Later) Worked Perfectly, you guys rock!!!
To answer your questions I was writing the formula in a note tag for Yami's Battle Symphony and Yanfly's Skill Cost Manager.
Shaz, your explanation of how the @states variable works helped a lot. I am going to try actor.state?(13) and see what happens.
Again, thank you both so much, it's really appreciated! 😀
Edit: (About 2 Mins. Later) Worked Perfectly, you guys rock!!!
Two scripts of mine seem to be in conflict and even with the help message, I can't figure out what to do! If anyone could help, I'd be really grateful. 😉
I'm running Estriole's Enemy Position script (3.1) and Molegato's Custom Battle Status (1.2) and the two don't seem to want to get along. When both scripts are running, I get this message:
View attachment 11356
Any help anyone could give would be much appreciated! 😉
I'm running Estriole's Enemy Position script (3.1) and Molegato's Custom Battle Status (1.2) and the two don't seem to want to get along. When both scripts are running, I get this message:
View attachment 11356
Both scripts work fine and with every other script. It's just together that this happens. I'm not really sure what it's trying to tell me! Something to do with drawing icons, so I tried to deactivate them in the CBS, but it didn't work.
Any help anyone could give would be much appreciated! 😉
Ask that on a new thread on Script Support since it's about specific scripts 🙂
Will do! Sorry about that, I didn't want to clutter the main forum with it. :|
There's a RGSSx Script Support forum JUST for problems with existing scripts. THIS thread is more for scripting issues that AREN'T due to existing scripts, or compatiblities between existing scripts - it's usually expected that things posted here will be simple questions that don't require a lot of research or back-and-forth. Problems with existing scripts, especially multiple scripts working together (or not), often DO require more investigation and Q&A, so deserve their own threads 🙂
I don't really know how to read RGSS3 syntax (or anything, really), so I'm stumped here.
I want to change the check for when the substitute flag fires. Rather than having the target's MHP / 4, I want to have the substituter cover if the target's HP is less than the substituter's.
I found the following code:
#-------------------------------------------------------------------------- # * Check Substitute Condition #-------------------------------------------------------------------------- def check_substitute(target, item) target.hp < target.mhp / 4 && (!item || !item.certain?) endI tried to change "target.mhp / 4" to "item.hp" and a couple of other variations of that, but I can't figure it out. Anyone so kind as to point out the obvious to me?
EDIT:: Oh, potentially important info: it's in "Scene_Battle" under "Scenes."
I want to change the check for when the substitute flag fires. Rather than having the target's MHP / 4, I want to have the substituter cover if the target's HP is less than the substituter's.
I found the following code:
#-------------------------------------------------------------------------- # * Check Substitute Condition #-------------------------------------------------------------------------- def check_substitute(target, item) target.hp < target.mhp / 4 && (!item || !item.certain?) endI tried to change "target.mhp / 4" to "item.hp" and a couple of other variations of that, but I can't figure it out. Anyone so kind as to point out the obvious to me?
EDIT:: Oh, potentially important info: it's in "Scene_Battle" under "Scenes."
In the custom formula box for an actor skill I'm using a.hide, and later a.appear. I feared that while the hide effect was on the actor wouldn't gain EXP if the battle ends, due to common problems from earlier RM engines, and sure enough if the actor is hidden and the battle ends there is no exp gain - is there a possible fix for this? I was looking to be cheap and just throw in a a common event to force a .appear action but I can't seem to get any to work with Yanfly's Victory Aftermath, so I'm wondering if there's an easier way to do this.
Either way thanks, and hope I put this in the right place~
Either way thanks, and hope I put this in the right place~
@TSED:
def check_substitute(target, item) substitute = target.friends_unit.substitute_battler substitute && target.hp < substitute.hp && (!item || !item.certain?) endThe method doesn't know who is doing the substituting by default. So you need to look them up (target.friends_unit.substitute_battler) and make sure they exist (the substitute in the second line).@bitmapterror: By default, on_battle_end makes all the battlers appear anyway, so the victory screen must be happening before that. You could add a call to the process_victory method of BattleManager to make all the actors appear. Something like:
Completely untested.
def check_substitute(target, item) substitute = target.friends_unit.substitute_battler substitute && target.hp < substitute.hp && (!item || !item.certain?) endThe method doesn't know who is doing the substituting by default. So you need to look them up (target.friends_unit.substitute_battler) and make sure they exist (the substitute in the second line).@bitmapterror: By default, on_battle_end makes all the battlers appear anyway, so the victory screen must be happening before that. You could add a call to the process_victory method of BattleManager to make all the actors appear. Something like:
Code:
for member in $game_party.members member.appearend
Works like a charm! Thank you muchly!
First off, thanks for the reply!
I'm either adding it to the wrong place, or it doesn't work. There aren't any errors, it just doesn't do anything. Hidden actors remain hidden and are only returned after the process_victory. The aftermath script overwrites parts of BattleManager including process_victory, so I tried putting it there, in various spots, and again no errors but nothing happens.
That little bit of code though gave me a few ideas of what to look for/try, so thanks very much again. I'll continue playing.
Just a quick question about Victor's MP Levels script (found Here). Can some cast an eye on it and tell me whether if/then statements be used in the growth formula (lines 180-185)? I'm having trouble getting it to work.
Yes you can. If you're having trouble, you're probably entering your conditions incorrectly. Show us a screenshot, or copy and paste (don't retype, as you could have a typo in your original version that you don't reproduce, or you could make a typo when posting it here, and both would make it difficult to help you).
Et voila!
View attachment 11413
Thanks in advance to anyone who can help. It might be pretty easy but I've been awake along time so I'm not exactly going full speed in my head. >_>
View attachment 11413
Thanks in advance to anyone who can help. It might be pretty easy but I've been awake along time so I'm not exactly going full speed in my head. >_>
Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/