-
Notifications
You must be signed in to change notification settings - Fork 0
Script calls User API
uAPI (ID 5) 🗺️
uAPI.resumeABS();
uAPI.pauseABS();uAPI.scriptAction(ACTION, CHAR, DELAY);
ACTION- Script action
CHAR- null, $gamePlayer, event object orthis(current Event) (OPTIONAL)
DELAY- delay before call in milliseconds (OPTIONAL)
Example: play Balloon animation 1 above this Event after 100ms delay -
uAPI.scriptAction("ba_1", this, 100);
Example: turn ON self switch A for event 18 -uAPI.scriptAction("ss_A_true_18");
uAPI.playExtraAnimation(X, Y, FILENAME, SE, OX, OY); // play extra animation in map point X, Y Extra animation - it's animation implemented by image separated by frames
It's same as <extraAnimation> ABS Skill parameter, read here for more details
Example:
uAPI.playExtraAnimation(10, 10, "MeteorRain(19,3)", "Thunder8")
uAPI.editUI(); // starts UI editor scene
uAPI.showUI();
uAPI.hideUI();
uAPI.resetUserUISettings(); // reset all UI settings (changed via Editor or Script calls) to defaults (from Plugin Parameters) uAPI.setSkillToPanel(ID, SLOT_SYMBOL);
uAPI.setItemToPanel(ID, SLOT_SYMBOL);
ID- it's skill or item ID from database
SLOT_SYMBOL- it's slot key (1,2 or E...)
For remove item, use 0 instead ID
Example: Remove any skill from Slot 5uAPI.setSkillToPanel(0, 5);
For add item\skill in any empty skill slot, not use any SLOT_SYMBOL (keep empty)
Example: Add item 10 in any empty slotuAPI.setItemToPanel(10);
uAPI.getSkillIdFromPanel(SLOT_SYMBOL); //return skill or item ID from skill slot, or 0 if slot is emptyuAPI.enableMapScroll();
uAPI.disableMapScroll();
uAPI.resetMapScroll(); // reset camera to centeruAPI.gainExpForEnemyDb( ENEMY_DB_ID, IS_SHOW_NOTIFY ); //get experience for enemy by his database ID
uAPI.gainExpForEnemyEv( EVENT_ID, IS_SHOW_NOTIFY ); //get experience for enemy by his Event ID on map (only for ABS events) IS_SHOW_NOTIFY - show popUp? true or false
Example:uAPI.gainExpForEnemyDb(10, true);
Exp (ID 14) 🗺️
uAPI.getEnemyByLabel( LABEL ); //return first Game_Event object from Map by matching label ABS parameter
uAPI.getEnemiesByLabel( LABEL ); //return all Game_Events objects (array) from Map by matching label ABS parameterExample:
uAPI.getEnemyByLabel("boss");// returns Game_Event object with enemy that have ABS parameter<label: boss>
uAPI.resetHpForEnemy( MAP_ID, EVENT_ID ); //reset stored HP for Event ID on MAP_ID
// EVENT_ID can be 0 - then for all events on MAP_ID
// MAP_ID can be 0 - then for all events on all maps (complete reset)Example:
uAPI.resetHpForEnemy(4);// reset stored HP value for ALL enemies on map with ID 4
uAPI.lastUsedSkill(); //return last used skill database object
uAPI.lastSkillUser(); // return last skill user, Character object (Event or Game_Player)
uAPI.lastUsedSkillTarget(); // return last used skill target, Character object (Event or Game_Player)<onHit:ce_4> and call this script calls via Common Event 4
You can show custom Pop Up's
uAPI.showPopUpOnChar(CHAR_ID, STYLE_ID, VALUE, IS_TEXT); // Show Pop Up Above Map Character (Event)STYLE_ID - style ID from Plugin Parameters ->
Pop Up Settings->Pop Up Tables. Can be null (default style)
IS_TEXT - show value as is, if IS_TEXT is true, in other case value will be Extended value
Example:
uAPI.showPopUpOnChar(10, null, 'test', true)// Show "Test" Pop Up above Event with ID 10
uAPI.showPopUpOnMap(X, Y, STYLE_ID, VALUE, IS_TEXT); // Show Pop Up Above Map Cell (X, Y)uAPI.showPopUpOnScreen(X, Y, STYLE_ID, VALUE, IS_TEXT); // Show Pop Up On Screen (X, Y - in pixels)uAPI.gainExpForParty(VALUE); //gain experience for party with PopUpuAPI.gainGoldForParty(VALUE); //gain gold for party with PopUpuAPI.gainHpForBattler(CHAR_ID, VALUE, IS_CRIT); //change enemy or character HP with PopUp textExample:
uAPI.gainHpForBattler(8, -10, false)// decrease HP by 10 for Enemy (event 8) and show's PopUp text above
uAPI.gainMpForBattler(CHAR_ID, VALUE, IS_CRIT); //change enemy or character MP with PopUp textuAPI.makePlayerDodge(IS_FORCE); //make player dodge action, if IS_FORCE `true` - without any checkExample:
uAPI.makePlayerDodge(false)// make player dodge action when it's ready (and can perform it)
