Skill User Tracker

SuperMasterSword

That Guy You Dont Know
Veteran
Joined
Jun 28, 2014
Messages
117
Reaction score
48
First Language
Javascript
Primarily Uses
RMMV
I need a script to track who used what skill. Specifically, I would like it to set a variable so I can check with conditional branches, but I also need it to be able to both set the variable to what actor, or what position that person is in the party currently, not at the same time though, it would be one or the other.

It could work as a script call, or there could be a configuration section in the script, either way will work for me.

That's really all it has to do, from there I would just use a conditional branch and apply things, such as I want this one skill to give the user (not the target) a certain state.

I also want this other skill to only be usable if the character has a certain state inflicted (not with the previously-mentioned state), from there I was just going to have variations of the "force action" command to appropriately use a skill. (How is it works is the skill that shows up in the menu/actually usable only calls the common event, the common event then checks if the requirements are met and then forces them to use the actual damage-dealing skill, I know I could ask for a script for this second one but I figured I could get two done at once here, {also I wanted minimal scripts in this project, I was originally trying to make a game with the RTP/pre-made stuff as a beginning game but I figured it couldn't hurt to add a few original things}).

Now this has gone far besides the script's actual requirements but the guy said an example couldn't hurt, also since it's fairly general I hope others could find some way to use it for their projects. Or maybe it's already been made! In that case you can just link me to it please :D . This is probably obvious but I've seen the mistake made in other forums so I'll say it anyway. I would like this for XP.

Whether you make it for me or link me to it, either way thank you in advance.

EDIT: Actually you can add something more specific, for the first skill example (applying state to user), it was actually originally going to make the user invincible (only for that turn)(I thought I was going to have to settle for a state), so if you want to you could add that as an option in the script, I suppose that would require a configuration section in the script. But that part is completely optional (especially since it's very different from the original main purpose of (what I think should be) a fairly simple script)
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
If you use the damage formula, you could add states to the user via

a.add_state(STATE_ID);damage_formula

if you need to set it to a variable

$game_variables[iD]=a;damage_formula

now if you want the skill to only be usable when a state is present, you'd need a custom cost script for that. I'd suggest Yanfly's
 

SuperMasterSword

That Guy You Dont Know
Veteran
Joined
Jun 28, 2014
Messages
117
Reaction score
48
First Language
Javascript
Primarily Uses
RMMV
Thanks, but I might need more details. Like, can I just use this in an event script call, or (what I think you mean) put it the script where it calculates damage? Also, I'm using XP.
 

TheRiotInside

Extra Ordinaire
Veteran
Joined
Sep 3, 2012
Messages
270
Reaction score
123
First Language
English
Primarily Uses
For skills that apply a state to the user, there is an easy way out. If only one specific party member can use the skill, you can just call a Common Event on the skill page and have that Common Event add the state to the party member. If more than one party member can have access to the skill, then this won't really cut it.

I've used a few little script calls within Common Events to do some things with applying states. I only have the script call for applying states to the target of the current battle action, but with a bit of fiddling around, you could probably get it to affect the user instead:

battler = $scene.active_battlertgt = battler.current_action.target_indextgt =$game_troop.smooth_target_enemy(tgt)tgt.add_state(6)This call, if used in a Common Event that is called by a skill, will add state 6 to whoever the skill targets in battle. I'm not sure of the proper syntax, but if the target_index portion is changed to something more "caster" or "user" sounding, then it might work.

I'm not a scripter, so unfortunately I can't really provide a great answer. Hopefully this points you in the right direction at least. :)
 
Last edited by a moderator:

SuperMasterSword

That Guy You Dont Know
Veteran
Joined
Jun 28, 2014
Messages
117
Reaction score
48
First Language
Javascript
Primarily Uses
RMMV
I was trying to decide and I guess I'll just leave the first skill only usable by one actor. Which makes the first option possible. Luckily for me, though, I was planning on implementing the second option in another game, so I guess I'll get to that later. When I saw the "Force Action" command, I thought "Yay, I'll be able to actually make that skill real." When I saw it depended on you knowing which of the four actors the character currently was and I had wanted the player to be able to customize their party, meaning that actor could be any of the four in the party (or none) that dream was once again crushed.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
ah you're using XP... Hmmm... not sure, that was for Ace, to be used in the damage formula itself. sorry
 

TheRiotInside

Extra Ordinaire
Veteran
Joined
Sep 3, 2012
Messages
270
Reaction score
123
First Language
English
Primarily Uses
I was trying to decide and I guess I'll just leave the first skill only usable by one actor. Which makes the first option possible. Luckily for me, though, I was planning on implementing the second option in another game, so I guess I'll get to that later. When I saw the "Force Action" command, I thought "Yay, I'll be able to actually make that skill real." When I saw it depended on you knowing which of the four actors the character currently was and I had wanted the player to be able to customize their party, meaning that actor could be any of the four in the party (or none) that dream was once again crushed.
Yeah, I really wish that RMXP had better event options for battle actions and things like that. There are still some RMXP scripters poking around here, so maybe somebody knows of a fancy script call that will do what you're looking for.
 

SuperMasterSword

That Guy You Dont Know
Veteran
Joined
Jun 28, 2014
Messages
117
Reaction score
48
First Language
Javascript
Primarily Uses
RMMV
I see. Well thanks anyway.

EDIT: I figured it out myself, it's extremely basic, but hopefully I'm slowly but surely learning scripting?

Anyway I just got it by putting

if $game_party.actors[0].name == "Aluxes"  $game_variables[17] = 1And a bunch of elsifs for the rest. I shortened by making "A" stand for "Aluxes" and then made all the possibilities fit perfectly by using .id instead of .name

But thanks for at least trying to help, everyone.

DOUBLE EDIT: I can shorten it even more by putting the "if" stuff in the event conditional branch's script, subtracting the initial "if", so I don't even need a variable. At least for the actual skill.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top