Syddo

Villager
Member
Joined
Nov 3, 2020
Messages
15
Reaction score
2
First Language
Italian
Primarily Uses
RMXP
Hi, I tried exhuming MrMo's ABS. Apart from the ABS system, it allows the player setting certain keys with learned skills.
I wanted to use a Script Call to set automatically these hotkeys, without the player possibility to choose, but I don't know how.
I guess the answer's in the og script itself, but I can't understand ruby... Could you kindly tell what to do? :dizzy:

def update_skill
mrmo_moabs_scene_skill_update_skill
#Get all the keys
for key in @actor.skill_keys.keys
next if key.nil?
#Check is the the key is pressed
next if !Input.trigger?(key)
next if hot_key_has_value?(@skill_window.skill.id)
$game_system.se_play($data_system.decision_se)
#Record Skill
@actor.skill_keys[key] = @skill_window.skill.id
@skill_window.active = false
@shk_window.active = @shk_window.visible = true
end
end
#--------------------------------------------------------------------------
# * Check if any other hotkey has this.
#--------------------------------------------------------------------------
def hot_key_has_value?(id)
@actor.skill_keys.each {|key, value|
if value == id
@actor.skill_keys[key] = nil
end
}
return false
end
#--------------------------------------------------------------------------
# * Frame Update Skill Hot Key
#--------------------------------------------------------------------------
def update_shk
#Return if Enter isn't pressed
return if !Input.trigger?(Input::C)
#Play decision
$game_system.se_play($data_system.decision_se)
@shk_window.active = @shk_window.visible = false
@skill_window.active = true
$scene = Scene_Skill.new(@actor_index)
end
end
 

Syddo

Villager
Member
Joined
Nov 3, 2020
Messages
15
Reaction score
2
First Language
Italian
Primarily Uses
RMXP
Sure, thanks for answering!
Here is where I found it, but here you can read the script without downloading it, although apart from the main script there are a few more.
In fact, I think the script makes use of Aleworks Input Module, which I can't find on google, but if you need it I can copy it here as 'spoiler'.
 

Syddo

Villager
Member
Joined
Nov 3, 2020
Messages
15
Reaction score
2
First Language
Italian
Primarily Uses
RMXP
Hi, the ABS Ultimate version should be a modified version of the one I linked, changed by DerVVulfman, I didn't think I'd needed those addons, but I'll give it a look. Still, that doesn't answer my question, so I still need help! :kaoswt:
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
378
Reaction score
148
First Language
English
Primarily Uses
RMXP
Looks like all you do is
Code:
$ABS.skill_keys[key] = skill_id
where 'key' is a valid input value, which you define in the configuration:
Code:
SKILL_KEYS = {Input::Numberkeys[0] => 0,
              Input::Numberkeys[1] => 0,
              Input::Numberkeys[2] => 0,
              Input::Numberkeys[3] => 0,
              Input::Numberkeys[4] => 0,
              Input::Numberkeys[5] => 0,
              Input::Numberkeys[6] => 0,
              Input::Numberkeys[7] => 0,
              Input::Numberkeys[8] => 0,
              Input::Numberkeys[9] => 0,
              Input::Letters["A"] => 0,
              }
 

Syddo

Villager
Member
Joined
Nov 3, 2020
Messages
15
Reaction score
2
First Language
Italian
Primarily Uses
RMXP
Looks like all you do is
Code:
$ABS.skill_keys[key] = skill_id
I see, thank you. So I should call a script like
Code:
$ABS.skill_keys[Input::Letters["Q"] => 0] = 1
?
Cause it doesn't seem to work... :kaoswt: Also, what I needed was setting to the hotkeys a skill already learned, and not from the database, could this be possible?
I mean, putting a certain skill_id would take a precise skill from the database, not (whichever) skill that the hero already has... Right...?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
378
Reaction score
148
First Language
English
Primarily Uses
RMXP
Code:
$ABS.skill_keys[Input::Letters["Q"]] = 1
Also, best to explain what "doesn't seem to work" is for future cases; share the error message you receive as that is more helpful for others to work with.

And yes, it's up to you to determine how to use this script call. Obviously this was never intended as there's no documentation on it. Thus, it is you who holds all the responsibility on how it's used--that means assigning a skill whether the player knows it or not.

You'll have to explain your use-case more if you want a more specific answer.
 

Latest Threads

Latest Posts

Latest Profile Posts

Bengawan Solo with fantasy style arrangement. :D
So I just got my computer back (Was posting stuff on my phone) But now my dang monitor's broken! I'll need to get a new one, which means... JOBS! Yaaay... When I get a new monitor, I'll post picture of one of my RPGMMV projects.
Wish me luck... :kaodes:
Had to clean up disk space because Windows Updates was having my primaries' disk space for breakfast, lunch and dinner. I guess the clean up thingy doesn't work or something because there were 15gigs of old update files in it.
Monday morning, and the sudden message: Hey, can you set up a full second lesson about pixel art till tomorrow?

Forum statistics

Threads
115,890
Messages
1,093,753
Members
151,138
Latest member
SouthernGamer
Top