Skillbar and Keymap
Skillbar and Configuration
> Skillbar is the small vertical bar you see on the right side of the screen, above the game logs. You can configure your skillbar through Code. Changes you make are saved and persisted for your Character, on your system locally.
set_skillbar("1","2","3","4","5","X","Y");
set_skillbar(["1","2","3","4","5","X","Y"]);
Keymap and Configuration
> Keymap is for mapping keypresses to skills, abilities and actions. Similar to the skillbar, you can change your keymap from Code, and the changes are persisted locally.
map_key("1","use_hp");
map_key("2","snippet","say('Woohoo')");
map_key("X","supershot");
unmap_key("X");
reset_mappings(); <- DEFAULTS THINGS
show_json(G.skills); <- CLICK TO RUN!
Mappable Keys
Snippets
> Snippets are small code pieces that are either evaluated inside your own Code, or on a blank runner if your Code isn't running.
map_key("Q","snippet","smart_move('winterland')"); <- CLICK TO TEST!
Mapping Items
> Items can be mapped manually to keys, or by dragging and dropping an item to a key slot. Pressing that key, activates, uses or equips the item.
map_key("SPACE",{"name":"stand0","type":"item"});
Map New Keys
> You can map to unmapped keys by including the `keycode` argument in your mappings. You can learn keycodes from:
keycode.info
map_key("DOT",{"name":"pure_eval","code":"ping()",keycode:190});
Advanced Usages
> You can override game's default keymappings, add new functionalities to keypresses using the "pure_eval" skill, unlike "snippet", "pure_eval" runs Javascript code inside the game window, so be careful using "pure_eval". You can change any rendered icon to one of your choosing. Ps. There's a list of icons in: G.skills.snippet.skins
//Example code that overrides ESC