[RMVX ACE] IS IT POSSIBLE TO CHANGE WHAT SKILL US USED AS THE DEFAULT ATTACK?
Posts
Pages:
1
Hey there again RMNers, you beautyful people! Enough flattery, is it possible to alter what skill the game perceives as the "Deafult attack" one? It says in the skill list that the first skill will always be used when the normal attack command is selected. Is there a way to change what the game perceives as the default attack through script calls?
Thanks in advance for any help. I wish you a nice day!
Thanks in advance for any help. I wish you a nice day!
You can check out Yanfly's script, which alters the attack ID.
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/weapon-attack-replace/
From what I've seen in the script library, Game_BattlerBase line 708 has what you're looking for.
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/weapon-attack-replace/
From what I've seen in the script library, Game_BattlerBase line 708 has what you're looking for.
Thanks Kaneshon, I found the specified line, but I'm still pretty green to Ruby, I only know how to alter variables with script calls, how would I be able to change that line with a script call?
Thanks Kaneshon! Although I just found the solution on my own by accident, I'm an absolute idiot, made an unecessary help thread. T.T
That being said, I will be able to use what I learned in this thread in another project, so, thanks a lot! You truly are a master of VX Ace engine!
Have a wonderful day Kaneshon! Savior of all scripting newbs!
That being said, I will be able to use what I learned in this thread in another project, so, thanks a lot! You truly are a master of VX Ace engine!
Have a wonderful day Kaneshon! Savior of all scripting newbs!
Hi there Kaneshon, although I had no need for it, I tried out the code you proposed and it's not working, as in the game crashes.
I gives me the following error message:
Script 'Game_Interpreter' line 1411: NoMethodError ocurred
undefined method 'attack_skill_id' for nil:NilClass
So, as far as I undertsand Ruby, it says that 'attack_skill_id' is not defined, it can't be altered.
I gives me the following error message:
Script 'Game_Interpreter' line 1411: NoMethodError ocurred
undefined method 'attack_skill_id' for nil:NilClass
So, as far as I undertsand Ruby, it says that 'attack_skill_id' is not defined, it can't be altered.
Oh, also Hime's script, here, makes it so you can use a notetag to change the default attack skill, e.g put the notetag on a state, so Attack becomes FIRE ATTACK when that state is applied, stuff like that!
Would that be easier?
Would that be easier?
author=OzzyTheOne
Hi there Kaneshon, although I had no need for it, I tried out the code you proposed and it's not working, as in the game crashes.
I gives me the following error message:
Script 'Game_Interpreter' line 1411: NoMethodError ocurred
undefined method 'attack_skill_id' for nil:NilClass
So, as far as I undertsand Ruby, it says that 'attack_skill_id' is not defined, it can't be altered.
I see the the problem. Game_BattlerBase is the class that contains the attack_skill_id function, but, there is no "$game_battlerbase" global variable. What you could do, is something like...
class Game_Actor < Game_Battler
def attack_skill_id
return 49
end
end
...this, or replace the "49" with whatever skill ID you want the default attack to be. This will alter the default attack on the player character's end. For a more universal effect, it would be "class Game_BattlerBase" instead.
*Edit: Though, as far as enemies are concerned, the "default attack ID" deal can be largely ignored. To be fair, the database absolutely sets skill #1 as the default skill when making a new enemy/skill. However, that can easily be reprogrammed to be anything on the skill-list.
author=Kloe
Oh, also Hime's script, here, makes it so you can use a notetag to change the default attack skill, e.g put the notetag on a state, so Attack becomes FIRE ATTACK when that state is applied, stuff like that!
Would that be easier?
Sadly no, but thanks for the offer!
author=Marrend
I see the the problem. Game_BattlerBase is the class that contains the attack_skill_id function, but, there is no "$game_battlerbase" global variable. What you could do, is something like...
class Game_Actor < Game_Battler
def attack_skill_id
return 49
end
end
...this, or replace the "49" with whatever skill ID you want the default attack to be. This will alter the default attack on the player character's end. For a more universal effect, it would be "class Game_BattlerBase" instead.
And no, still not working. I did forget to mention this before, I am using Yanflys battle script.
I've been derping quite a bit lately.
Anyway, if it's this script that Kaneshon linked to earlier (if not, weeeeeelp), it looks like it's done via inserting a note-tag of "<attack skill: x>", where "x" is replaced by the ID of the skill that's being used for the Attack command.
There's three places that the script describes where to place that note-tag. One is in the Actor tab so that specific actors can have defined attacks. Another is in the Class tab so that a group of actors would have similar attacks. The other is the Weapons tab as that specific weapons can have signature attacks (or something like that). Does that help?
Anyway, if it's this script that Kaneshon linked to earlier (if not, weeeeeelp), it looks like it's done via inserting a note-tag of "<attack skill: x>", where "x" is replaced by the ID of the skill that's being used for the Attack command.
There's three places that the script describes where to place that note-tag. One is in the Actor tab so that specific actors can have defined attacks. Another is in the Class tab so that a group of actors would have similar attacks. The other is the Weapons tab as that specific weapons can have signature attacks (or something like that). Does that help?
You're right Marrend, that script that Kaneshon linked will most probably be the solution to my problem. Thank you all for helping!
EDIT: I'm quite the dummy, a simpler solution has appeared and I just feel bad for wasting your guys' time. This help thread really was unecessary T.T
EDIT: I'm quite the dummy, a simpler solution has appeared and I just feel bad for wasting your guys' time. This help thread really was unecessary T.T
Pages:
1















