MGQ3 GC345's patch testing

Summary

 * Beta 13.02 is out. Please reupload if you have used the earlier versions.


 * Warning: if you have installed the new patch version - please use "Extras"/"Autosave Data" before continuing the story. "Load game" can cause glitches.


 * Warning: beta 11 have changed Ilias (1) entry conditions. You need 50 evaluations from 50 different Chapter 1 enemies. And the count is 0 by default. Sorry.


 * Beta 13 - the patch (0.txt and 2 system files), changes.txt and the test side story (Map). Unpack this archive in the main MGQ3 directory to apply the patch.


 * Beta 13.02 quickfix - fixes the spbtn command crash. Fixes the Beelzebubs fight crash if the difficulty is EX. Apply after the full beta 13.


 * To uninstall this patch - just delete/move 0.txt from the MGQ3 directory.

GC345 (talk) 05:19, October 19, 2016 (UTC)

Text output

 * You can use @, ~, \, @/ and / at the end of text lines in Spin-off text sections (warning: not in battle messages). "@" is the new line wait state, "@/" waits then continues in the same line, "~" starts a new line w/o a wait state, "/" just continues the same line w/o a wait state.  "\" forces the default new page wait state (may be useful if the text line ends to ~, @ or /).
 * Warning: "@/" and "/" may add 1 space because wait states are aligned to the full-width characters grid.


 * Warning: use "@", "~", "@/" and "/" with caution. You may break the 4-rows limit (3 rows for the battle itself) and the game will crash.

GC345 (talk) 13:27, August 17, 2016 (UTC)
 * The game automatically deletes all ending spaces (until a first letter or a wait state). The "test @    " and "test @" result is identical
 * The game automatically deletes 1 space before a wait state if it present. The "test \" and "test\" result is identical.

Effects

 * Old and new drawing commands ("bg", "sp" (5 variants), "sp2" (5 variants), "syasei" (5 variants), "syasei2", "sp_del", "sp2_del", "sp_del_multi", "vsp", "vsp2", "vsp_multi", "strsp", "win_set", "win_del", "win2_set", "win2_del") support plugin effects. Use 99 as the value. The syntax is ,99, ,.
 * You can use "1", "2", "3" and "4" as library name aliases:
 * 1 uses "system\breakup.dll/urb" - standard monster sealing.
 * 2 uses "system\breakup.dll/lrB" - angel sealing.
 * 3 uses "system\lngtwave.dll/vwi" - wave like Ilias in a dreams.
 * 4 uses "system\trvswave.dll/h" - Black Alice's wave.
 * Examples: 100="bg,bg045,99,1000,3", 100="sp_del,0,99,500,system\breakup.dll/lrB".


 * Warning: the start path is the main MGQ directory.


 * Old and new drawing commands support mask fade and mask crossfade effects. Use 15 or 18 as the value. The syntax is ,15, , for the mask fade and ,18, , for the mask crossfade.
 * Example: 100="sp_del,-698,18,3000,system\mask01.jpg".


 * Warning: the  start path is the MGQ directory. The game not adds the filename extension if the extension isn't present.


 * You can use all sp, sp2 and syasei variants with the different opacity. The default value is 255. To change the opacity - use the  ="change,opacity,X" command. Each sp, sp2 or syasei command resets the opacity value back to the default value (255). The "change,opacity,X" command works even before the "battle" command.
 * Warning: the "syasei2" command uses 1 opacity value for both sprites.


 * You can use the monocro_on command with any basic color. The new syntax is  ="monocro_on[, ]". #888888 is used by default (if the parameter is absent).
 * The flushout command draws the flushout effect. The syntax is  ="flushout, ".

Sprites

 * Sp_alpha, sp_leftup and sp_rightup commands. Are added because the "sp" command always uses the alpha transparency mode for NSA files and the default (leftup) transparency mode for custom files. These commands always use the defined mode (alpha, leftup, rightup). The syntax is identical to the "sp" command syntax ( =" ,,,,, [, [, ]]").
 * The sp_non_alpha command can use the "sp" command syntax to use the copy transparency mode always and use any  and  (the old syntax uses the copy transparency mode for NSA files and the default (leftup) transparency mode for custom files plus  and  are always 0). The old syntax ( ="sp_non_alpha,,, [, ]" with from 1 to 14) is still supported for the compatibility.
 * Sp2_non_alpha, sp2_alpha, sp2_leftup, sp2_rightup commands - same as above but for advanced sprites. The syntax is identical to the "sp2" command syntax.
 * 4 more variants of the "syasei" command. Syasei_non_alpha, syasei_alpha, syasei_leftup, syasei_rightup. Again the only difference is the transparency mode. The syntax is identical to the "syasei" command syntax.
 * The strsp command creates and draws a sprite from the given text line. The syntax:  ="strsp,,,<sprite_x>,<sprite_y>,<font_size>,<x_spacing>,, , [, [, [, ]]]".
 * <text_line> - it is what you want to convert to the sprite. Warning: if this line includes commas - put \ at the start and the end of the line.
 * <sprite_x>, <sprite_y> - coordinates of the sprite upper-left corner.
 * <font_size> - font height in pixels.
 * <x_spacing> - character interval (in pixels).
 * - font parameters. 0 - no shadow and no boldface, 1 - shadow and no boldface, 2 - boldface and no shadow, 3 - shadow and boldface.
 * - sprite color in the "#RRGGBB" format. You can use "white" as the "#FFFFFF" alias.
 * - optional, the sprite changes its color to this value if the sprite button is active.
 * , and - draw effect parameters. The default effect is 1 (instant draw).
 * Example: 100="strsp,\Yeah, right!\,0,0,20,0,3,#FF4444,white" creates red "Yeah, right!" text in the upper-left corner. The font size is 20 pixels. The text will change its color to white after you move cursor to it (if a button was linked with the spbtn command).


 * Vsp and vsp2 commands hide/show sprites/advanced sprites. The syntax:  =" ,<sprite_number>,0, [, [, ]]" to hide and  ="vsp,<sprite_number>,1, [,duration>[, ]]" to show a sprite.
 * The sp_del_multi command deletes several sprites at once. The syntax:  ="sp_del_multi,<start_number>,<end_number>, [, [, ]]".
 * The vsp_multi command hide/shows several sprites at once. The syntax:  ="vsp_multi,<start_number>,<end_number>,0[, [, [, ]]]" to hide and  ="vsp_multi,<start_number>,<end_number>,1[, [, [, ]]]" to show.
 * The move_sp command is the move command analog for non-advanced sprites. The syntax is  ="move_sp,<sprite_number>,<x_offset>,<y_offset>,<opacity_offset>,, ".

Support

 * Win2_del and win2_set commands. The 1st one deletes the story text window, the 2nd one - restores it. The syntax is  =" [, ,[ ,[ ]]]". The default effect is 1 (instant draw).
 * Win_set and win_del commands support all drawing effects. The default effect is 1 (instant draw). The syntax is similar to the win2_set syntax.
 * The element command supports artifical spirits. Use 5 for Zylphe, 6 for Gnomaren, 7 for Grandine and 8 for Gigamander.
 * The element command uses correct sprites for Spirits (similar to the main story).
 * The face command draws enemy sprites for the selected stance. This command supports multienemy battles and automatically reacts to some triggers (uses happy stance if a hero surrenders or hero HPs are very low etc). The syntax is  ="face, ", is 1 for normal, 2 for happy or 3 for sad stances. This command works only after the "battle" command.
 * Name, skillname, select and strsp commands automatically replace BELs to spaces.
 * Name and skillname commands automatically delete 1 ending space.
 * The cls_text command clears text in the text window. No arguments are needed.
 * Hide_text and show_text commands hide and shown the text window itself. No arguments are needed.
 * The delay command - same as the wait command but can be skipped with FF/click. The syntax is  ="delay, ".
 * Enemylife and enemykaihuku commands to damage/heal enemy. "Enemylife" flashes the default enemy sprite ("0") three times, prints "<hero_name> deals damage!" and actually changes enemy HPs/lifebar if the battle was started (after the "battle_st" command). "Enemykaihuku" prints "<enemy_name> recovered HP!" and actually changes enemy HPs/lifebar if the battle is on. The syntax:  ="enemylife, [, ]" and  ="enemykaihuku, [, ]".
 * If is absent - the exact value will be dealed/recovered. Otherwise the value will be random number between and.

Program logic

 * Gotoline ( ="gotoline, ") and var_jumpline ( ="var_jumpline, ") commands jumps to the line in the same section. "Var_jumpline" (same as "var_jump") works only if %mon_labo_var_flag was set by the "var_cpa" command (the var_cpa equation was true).
 * The spbtn command. Uses sprite as a button and jumps to the linked story.ini section. The syntax is  ="spbtn,, ".
 * - the button will be linked to this sprite and will be used if you left click this sprite.
 * - the section name in story.ini.
 * you can use "lclk" and "rclk" as sprite numbers. As the result - the 2nd variant jumps to the defined section if you press the right mouse button. The 1st one will be used if you press the left mouse button and the cursor is not above any of defined sprite buttons.
 * The "spbtn" command finishes the current story.ini section, all strings except others "spbtn" commands will be ignored.


 * Spbtn automatically deletes text window. Use the "win2_set" command to return it.


 * Warning: you must have 1 non-empty command after the last spbtn. Or the game will freeze. The best way is to use the "end" command.


 * 10 more variables ("v10" - "v19") can be used with all "var_" commands.
 * The var_out2 command is the var_out analog. But the output uses half-width digits. Plus this command supports all 5 wait states (@, \, ~,@/ and /, similar to text strings). The syntax is  ="var_out2,<begin_text>, ,<end_text>" .
 * The var_dice2 command is the var_dice analog but the lowest value can be any value (var_out always uses 1). The syntax:  ="var_dice2, ,<lowest_value>,<highest_value>" .
 * The var_damage command gets the damage value from the standard damage subroutine of MGQ (applies hero level, enemy defence, Gnomaren and Grandine enemy defence bonus, then multiply to the random value between 0.9 and 1.1 and add 1 if the result was 0). Used for custom attacks/skills. The syntax is  ="var_damage, ,<base_factor>" .
 * The var_damage2 command is similar to the var_damage command but this command only apply Gnomaren/Grandine bonus and adds 1 if the result was 0. The syntax is  ="var_damage2, ,<base_factor>" .
 * Var_90110 gets a value and multiply it to the random number between 0.9 and 1.1. The syntax:  ="var_90110, [, ]" . If is absent then the command get the value as the source.

Game variables

 * The change command can be used to change some in-game values on-the-fly. Its syntax is  ="change,, [, ]". This command works only after the "battle" command except the ="change,opacity,X" variant.
 * Supported aliases:
 * "Kousan_anno1", "onedari_list1", "mogaku_anno1" - "mogaku_anno4", "mogaku_sel1" - "mogaku_sel5", "mogaku_dassyutu1, "mogaku_dassyutu2", "mogaku_earth_dassyutu1", "mogaku_earth_dassyutu2", "mogaku_kaisin1", "mogaku_kaisin2", and "tatie1" - "tatie4" - change associated battle section strings.
 * "Tatie1b" - "tatie3b", "tatie1c" - "tatie3c" and "tatie1d" - "tatie3d" are used for multienemy (multisprite) battles.
 * "Name" changes the current enemy name set by [data]\name= and [data]\short_name= keys.
 * "First_sel1" - "first_sel10" switch 10 boolean keys. The syntax is  ="change,first_selX" for activating the key and  ="change,first_selX,0" to reset it. These 10 keys are used in custom dialogues only.
 * All below aliaces can use v0-v19 as the source.
 * "Skilla1" - "skilla8", "skillb1" - "skillb4", "skillc1" - "skill4", "skilld1" - "skilld4", "skilltame0", "skillcounter0" and "skillcounter2" - "skillcounter5" changes the odds ("skill_kakuritu") for associated skill.
 * "Sinkou", "customattack", "customskill", "customguard" and "customwait" switch sections for triggers and customized attacks/skills/guard/wait. See below...
 * "Action" and "skill_sub" change the result of "commonattack", "commonattack1", "commonskill" and "commonskill1" commands. See customized attack/skills.
 * All below aliases can use "v0" - "v19" as the source and can be used as var_ld source.
 * "Monster_x", "monster_y", "tukix", "alice", "keigen", "earth_keigen", "kaihi", "alice_skill1"-"alice_skill3", "skill", "skill_wind", "skill_earth", "skill_aqua", "skill_fire" and "tikei" - change corresponding battle section values.
 * "Tekikazu", "monster_xb", "monster_xc", "monster_xd", "monster_yb", "monster_yc", "monster_yd" - change multienemy (multisprite) battles parameters.
 * "Counta1" - "counta8", "countb1" - "countb4", "countc1" - "countc4", "counttame0" and "countcounter0" sets colldowns for corresponding skills. You can't change the limit (set with the skill_count key) but you can change the current value.
 * "Henka1"-"henka3" changes HP levels for 3 HP traps.
 * "Mp", "mylife" and "enemylife" changes and prints hero MPs, HPs and enemy HPs. If the result value is below 0 or above the limit - it will be trimmed.


 * These 3 aliaces can be used with "+" or "-" methods. Example - 100="change,mp,5,+" adds 5 MPs, trims the value if it's above the maximum then draws the result.


 * "Kousoku" changes the bind level and draws bind sprite/bind icon. Can be used with the "0" method to supress drawing. Enemy will use skillb1-skillb4 with %kousoku=1, skillc1-skillc4 with %kousoku=2 and skilld1-skilld4 (constantly) with %kousoku=3.
 * "Status" changes hero status and draws the corresponding icons.
 * "Genmogaku", "kousoku_type", "kousoku_hp" and "abairitu" change bind attributes.
 * "Status_turn" and "poison" change status attacks attributes "on the fly".
 * "Wind", "wind_turn", "earth", "earth_turn", "aqua", "aqua_turn", "fire" and "fire_turn" changes active Spirits and turns to spirit canceling. If you want to change and draw spirit icons - use "change,wind/earch/aqua/fire, ,1" command. "Change,wind/earth/aqua/fire, ,2" uses the delayed draw.
 * "Counter".
 * "Kadora_damage". Now you can continue Quadruple Giga even if an enemy damages you. Or stop Quadruple Giga manually.
 * "Charge" controls the charged attack flag (the %bougyo_attack variable).
 * "Enemy_wind", "enemy_earth", "enemy_aqua" and "enemy_fire" control Artifical Spirits. Artifical Spirits icons aren't displayed, you must draw them manually.
 * "Kaihi_el" changes the value of hero's accuracy versus Zylphe. 0 - always miss, 100 - always hit.
 * "Damage_el" changes the multiplicator for hero's damage if Gnomaren or Grandine are active. 100 - no penalty, 0 - can't damage.
 * "Earth_el" changes the value for Zylphe damage penalty versus Gnome. 0 - no penalty, 100 - enemy attacks are nullified.
 * "Fire_el" changes the value for Grandine damage penalty versus Salamander. 0 - no penalty, 100 - all damage is nullified.


 * The var_ld command can use 2 more aliaces except above ones:
 * "Hit" is used for enemy attack linking. See below.
 * "Kousan" checks surrender/request level. Surrender sets %kousan=1, Requests set %kousan=2, overkill sets %kousan=3.

V0 - v19 as arguments

 * The last version can use v0 - v19 values as arguments for more commands. This feature is experimental.

GC345 (talk) 11:23, September 19, 2016 (UTC)

Enemy attacks

 * The vanilla game supports the maximum of 22 attacks and 4 attack queries: the unbinded query with 8 unbinded attacks ([skilla1] - [skilla8]), 2 bind queries with 4 bind attacks for each ([skillb1] - [skillb4] and [skillc1] - [skillc4]), the OHKO query with 4 attacks ([skilld1] - [skilld4]), 2 counterstance attacks ([skillcounter0] and [skillcounter1]) and 2 charged attacks ([skilltame0] and [skilltame1]).


 * The counterstance attacks query is added. It uses [skillcounter2] - [skillcounter5] skills. These skills can't be a binding skills (binding keys are ignored). "Skill_kakuritu=" and "skill_count=" keys are supported.
 * The [skilltame2] skill is added. If this skill is detected - it will be used if a charged attack misses.
 * Now the game supports unlimited number of skills for all 5 queries:
 * These skills must use the name format (with the [skill  ] section name for the skill body itself), must be "a", "b", "c", "d" or "counter", is any positive integer. Examples: [skilla9], [skillcounter10].
 * Warning: I repeat, "a", "b", "c", "d" or "counter" only. If you try to use another name format - it will stop a battle after the error message.


 * These skills not support "skill_kakuritu=" and "skill_count=" keys. You must use triggers, HP traps and followups to work with these skills (see below).
 * These skills aren't supported by the standard Request routine. Use the onedari_listX=", " keys to force the correct behavior.

GC345 (talk) 09:12, August 22, 2016 (UTC)

Custom dialogues

 * By default skill_selX/skill_annoX etc just define a text line which will be printed. You can't change the nametag, you can't use more than 2 text lines, you can only print text.


 * Custom dialogues just go to a section in story.ini when you can use almost all supported commands then return and continue to execute enemy attack.


 * To start the custom dialogue - use "!<section_name>" as the key value. The game goes to the [<section_name>] in current story.ini. After the custom dialogue ends the game continues the standard battle routine. The example: [skilla1]\skill_sel1="!12345" will execute all commands in the [12345] section in story.ini then continues the standard a1 enemy skill routine.


 * If you need to print something starting from "!" - use "!!".


 * You can start custom dialogues with these keys: skill_selX ([hero_skillX] and [skillX] sections), skill_annoX_X, skill_selxX, skill_selmissX, skill_sel_counter_midX, skill_sel_counter_endX, skill_anno_counter_midX, skill_anno_counter_endX, mogaku_dassyutu1, mogaku_earth_dassyutu1, mogaku_kaisin1, half_s1, kiki_s1, vic_sel1, vic_anno1, kousan1, skill_onedari1, skill_lose_start1, skill_lose_anno1, skill_lose_sel1, mogaku_annoX, mogaku_selX, skill_kousoku_anno0, skill_kousoku_anno, skill_kousoku_grandine, skill_status_anno, skill_status_mid, skill_status_end.


 * You can start a special version of custom dialogues with these keys: kousan_anno1, onedari_list1, skill_onedari_use, followup_instant, skill_aqua (not in the [ruka] section), skill_wind (not in the [ruka] section).


 * No custom dialogues support: hero_loseX_X, hero_lose_lvdrain, hero_lose_konran, hero_attackX, hero_kaisinX, hero_missX, hero_stbladeX, hero_mogaku_hitX, hero_mogakuX, hero_mogaku_winX, hero_mogaku_earthX, hero_mogaku_earth_winX, hero_unchargeX, hero_freedomX, hero_konran_X, hero_kikiX_X, skill_tikei, skill_wind_anno, skill_status_hit.


 * Warning: if you define 2 similar keys - custom dialogue will not start, just 2 text lines will be printed. You must define 1 or more than 2 keys. P.S. [Hero_skillX]\skill_selX is the exception, if 2 keys are defined - it just selects 1 of defined keys.


 * Custom dialogues work different for kousan_anno1 and onedari_list1 keys. After dialogue section is finished - the game returns to the hero's commands menu. This is used for special surrender/requests.


 * Custom dialogue in the skill_onedari_use key starts advanced request (see below).


 * Custom dialogue in the followup_instant key starts advanced linking (see below).


 * Custom dialogues in skill_aqua and skill_wind keys (in enemy attacks) start advanced evading (see below).


 * Custom dialogues can be HP traps (henkaX=) or triggers (sinkou_listX=) targets.


 * Customized attacks, skills, guards and waits ([customattackX], [customattackX]\listX, [customskillX]\skillX, [customguardX] and [customwaitX]) are custom dialogues too and use similar syntax.

GC345 (talk) 04:39, August 24, 2016 (UTC)

Custom dialogues commands

 * These commands: end, name, skillname, bg, sp, sp_non_alpha, sp_alpha, sp_leftup, sp_rightup, sp_del, sp_del_multi, face, vsp, vsp_multi, wait, delay, bgm, bgm_stop, se, se_stop, syasei, syasei_non_alpha, syasei_alpha, syasei_leftup, syasei_rightup, syasei2, syasei_clear, flash, monocro_on, monocro_off, quake, flushout, select, goto, gotoline, sp2, sp2_non_alpha, sp2_alpha, sp2_leftup, sp2_rightup, sp2_del, vsp2, move, move_sp, movie, element, var_ld, var_cal, var_cpa, var_out, var_out2, var_jump, var_jumpline, var_dice, var_dice2, var_90110, var_damage, var_damage2, damage, kaihuku, enemylife, enemykaihuku, change, strsp, cls_text, hide_text, show_text can be used w/o limitations. So you can't use win2_set, win_set, win2_del, win_del, restart, anten, battle, battle_st, overkill_end and spbtn.
 * First and second commands are used to change printed lines if the dialogue used more than once. The syntax is  ="first,, " and  ="second, , ". <Key> is the boolean switch number, from 1 to 10. The "first" command prints only if the switch isn't activated. The "second" command prints only if the switch was activated. To manipulate switches - use the "change,first_selX" command.
 * Jumpfirst ( ="jumpfirst,, ") and jumpfirstline ( ="jumpfirst, , ") commands are var_jump/var_jumpline analogs but use one of 10 boolean switches. These commands go to or line if the boolean key with the number isn't activated.
 * Warning: I repeat, jumps only if the key isn't activated.

GC345 (talk) 10:58, August 26, 2016 (UTC)
 * There are some commands (list1, commonattack, commonattack1, commonskill, commonskill1) used in customized hero attacks/skills only. See below.
 * The name command works differently for advanced enemy attacks linking. See below.
 * The execute command is used (differently) for advanced enemy attack linking, advanced requests, triggers, custom attacks, custom skills and custom wind/aqua evades. See below.
 * The finish command is used for advanced wind evades (to be more precise - multi-evades). See below.
 * And of course you can just print text. "@", "~", "\", "@/" and "/" wait states are supported.

Triggers

 * Triggers are used to customize enemy actions if something is happen. The game can start a custom dialog (then continue the standard query), force enemy skill (via followup) or end the battle if the trigger was activated.


 * To configure triggers use sinkou_listX keys in [sinkouX] sections:

[sinkou1] sinkou_list1=... sinkou_list2=... ... [sinkou2] sinkou_list1=... ...
 * Sinkou_list keys must use sequental numeration (sinkou_list1, sinkou_list2 etc) and are checked in this order. If the game can't find the next sinkou_list number the game stops reading and continues the standard battle routine. If the key is activated - the game again stops reading, executes this 1 key then continues the standard routine.


 * Use the ="change,sinkou,<section_number>" command to activate the [sinkou<section_number>] section. You can use ="change,sinkou,0" to disable triggers.


 * By default the game checks [sinkou1]/sinkou_list1 key and disables triggers if this key isn't defined.


 * The trigger keys syntax is sinkou_listX="<trigger_name>,, [,<new_section_number>]" or sinkoulistX="element, , , [,<new_section_number>]"


 * <Trigger_name>:
 * "Enemylife" and "enemylife2" - activates if enemy HPs are lower or equal of . Enemylife2 works only if hero isn't binded.
 * "Element" - uses different syntax. The parameter chooses spirits for the check. Same as for spirit canceling: 1 for Sylph, 2 for Gnome, 4 for Undine, 8 for Salamander. Then the game compute total sum of levels for choosed and active spirits. And if this sum is bigger of the trigger activates.


 * Examples: "sinkou_list1=element,1,0,a9" activates if Sylph ("1") was summoned with any level. And enemy uses skilla9. "Sinkou_list1=element,15,5,a9" is the analog of Alice 8th (final) Spirit Canceling - if %wind+%earth+%aqua+%fire>5.


 * "Mylife" - activates if hero HPs are lower than.
 * "Action" - each hero action/skill have corresponding value (stored in the %before_action variable). So enemy can react differently to player actions. The trigger is activated if %before_action=.


 * Possible values are:
 * "1" - normal attack.
 * "2" - critical attack.
 * "3" - miss.
 * "4" - Blade of Still Water.
 * "7" - unsuccessful Struggle (or attack in a standard bind).
 * "8" - successful Struggle.
 * "9" - attack in a "charged" bind.
 * "10" - attack in a "special" bind.
 * "35" - Word of Dispel: Omega Blaze.
 * "36" - Word of Dispel: Frost Ozma.
 * "37" - Word of Dispel: Monster Lord's Cruelty.
 * "51" - Guard.
 * "52" - Wait.
 * "53" - Surrender.
 * "54" - Requests.
 * "58" - Word of Dispel: Eyes of Recovery.
 * Action for others hero skills can be found in the "Customized hero skills" section.


 * "Turn" - activates if the turn number equals.
 * "Status" - activates if hero status equals.
 * These triggers are checked before enemy attacks. If you want to check after enemy attack - use "enemylife1", "enemylife3", "element1", "mylife1", "action1", "turn1" and "status1" triggers names. Again, "enemylife3" works only if hero isn't binded.
 * Warning: there are no post triggers after the counterstance end, successful Struggle (with or w/o Gnome) and successful escape from a "special" bind.


 * <Destination> can be the enemy attack name ("a1"-"a16", "b1"-"b8", "d1"-"d8", "counter0"-"counter5", "tame0", "tame1", see the "followup" key below). Or you can use a custom dialog link ("!<section_name>") to go to [<section_name>].


 * <New_section_number> changes the section value and loads correcponding section of triggers.


 * Warning: the "Request" command disables all triggers so if you need them in the request routine - force them with the "change,sinkou" command.

GC345 (talk) 03:54, July 21, 2016 (UTC)

[data]

 * The game uses type="0" and vic_effevt="0" if these keys aren't defined.
 * The vic_effevt="3" support is added. It replaces the "was/were defeated!" message to the "was/were chased away!" message.
 * The type="2" Replaces "was defeated/was chased away" to "were defeated/were chased away".
 * The query_new= key forces the new enemy skills order. See below.
 * The short_name= key is added. It's value used as the monster name after the battle starts. As the example - [data]\name="Archangel Ariel", [data]\short_name="Ariel", [data]\type="0". Then we have the "Archangel Ariel appears!" message at the battle start but "Ariel" as the nametag.
 * The game re-reads the [data]\name key before the victory routine.


 * BELs are autoreplaced to spaces in name= and shortname= keys.
 * The difficult= key is added. The syntax is diffficult="1". Sets the difficulty level to Hard. The only difference is 10% chance to fail a successful struggle.
 * The preemptive= key is added. The syntax is preemptive="<skill_alias>". <Skill_alias> can be "aX", "tame0", "counter0", X>0. Enemy uses [skill<skill_alias>] before hero's first turn.
 * Henka1=, henka2=, henka3= keys set 3 HP traps. See below.
 * Tekikazu=, tatie1b= - tatie3b=, tatie1c= - tatie3c=, tatie1d= - tatie3d=, monster_xb=, monster_xc=, monster_xd, monstery_b=, monster_yc=, monster_yd= keys are added for the multi-enemy (multi-sprite) battles support. See below.

[ruka]

 * BELs are autoreplaced to spaces in tht name= key.
 * You can use name="1" (in the [ruka] section) to play as Alice and name="2" - name="5" to play as Alma Elma/Tamamo/Erubetie/Granberia. Heavenly Knights have constant HPs/SPs maximums, Alice have the constant HPs maximum but SPs are level dependant.
 * The tukix= key works ok now.

[anno]

 * Kousan_anno1= and kousan_anno2= keys are added. Used when hero have surrendered. "Xxx completedly drops all resistance" is used by default.
 * If mogaku_anno1= - mogaku_anno4= keys aren't defined - there is no extra wait states in the struggle routine.
 * The mogaku_anno2= content is printed when you escape the normal bind w/o Gnome (was always "struggles intensely, and breaks free!"). Works for the main story batles too.

[hero_sel]

 * Hero_attack1 - hero_attack3 keys are used only with standard attack and self-damage (when confused). Hero_mogaku1 - hero_mogaku3 keys are used only when you try to break a bind w/o Gnome. New keys are added:
 * hero_kaisin1= - hero_kaisin3= - used with critical hits.
 * hero_miss1= - hero_miss3= - used if hero missed.
 * hero_stblade1= - hero_stblade3= - used for Blade of Still Water.
 * hero_mogaku_hit1= - hero_mogaku_hit3= - used if you try to attack in a standard bind.
 * hero_mogaku_win1= - hero_mogaku_win3= - used when hero breaks a standard bind w/o Gnome.
 * hero_mogaku_earth1= - hero_mogaku_earth3= - used if you try to break a bind with Gnome.
 * hero_mogaku_earth_win1= - hero_mogaku_earth_win3= - used if you break a bind with Gnome.
 * hero_uncharge1= - hero_uncharge3= - used when you break a special bind (kousoku_type=1).
 * hero_freedom1= - hero_freedom3= - used when you break a special bind (kousoku_type=2).
 * hero_konran4= - hero_konran6= keys are added, so now you can customize up to 6 confuse messages.
 * The game uses default messages if custom ones aren't defined in [hero_skillX] and [hero_sel] sections.
 * You can define not all 3 (or 6) custom messages, the game will use defined ones only.

[hero_skillX]

 * Customized hero announcements work always (even if you not define [ruka]/name).
 * Customized hero announcements work for all skills ("Meditation" ([hero_skill4]), "Quadruple Giga" ([hero_skill15]), "Flash Kill" ([hero_skill19]), Quad Spirit Summon ([hero_skill25])).
 * All 5 levels of Sylph and Undine use [hero_skill7] and [hero_skill10] now.
 * The skill_tikei= key was added in the [hero_skill5] section. Demon Skull Beheading is activated if this key is defined. Use "1", "2", "3", "4", "5" to select the predefined message or set the message completely.
 * 1 - " climbs the mast and jumps off from the top!"
 * 2 - " climbs a tree and jumps off from the top!"
 * 3 - " climbs onto the ceiling and jumps off!"
 * 4 - " climbs a pillar and jumps off from the top!"
 * 5 - " climbs a building and jumps off from the top!"

[onedari]
GC345 (talk) 14:01, August 28, 2016 (UTC)
 * You can use any enemy skill in the request menu (the old routine can use "a1" - "a8", "b1" - "b4", "c1" - "c4", "d1" - "d4", "tame1" and "counter1" only). Use the [onedari]\onedari_listX="<skill_name>,<skill_alias>" syntax. This method forces the [skill<skill_alias>]\skill_onedari_use= key.

Enemy attack queries

 * Original japan version and Rogue's patch use the very strange attack selection method:

rnd2 %ransu,1,100 if %ransu<=%tuika_skilla1 && %tuika_owaza_count1a>=%max_owaza_count1a && %tuika_skilla1>0 gosub *tuika_a1:goto *common_main sub %ransu,%tuika_skilla1 if %ransu<=%tuika_skilla2 && %tuika_owaza_count1b>=%max_owaza_count1b && %tuika_skilla2>0 gosub *tuika_a2:goto *common_main sub %ransu,%tuika_skilla2 if %ransu<=%tuika_skilla3 && %tuika_owaza_count1c>=%max_owaza_count1c && %tuika_skilla3>0 gosub *tuika_a3:goto *common_main sub %ransu,%tuika_skilla3 if %ransu<=%tuika_skilla4 && %tuika_owaza_count1d>=%max_owaza_count1d && %tuika_skilla4>0 gosub *tuika_a4:goto *common_main sub %ransu,%tuika_skilla4 ...
 * The first trouble - cooldowns use the >= equation. So - there is no difference between skill_count="0" and skill_count="1". And the game uses "once per <skill_count> turns" condition, not the "<skill_count> turns between repeats" one. Plus enemy attacks with cooldowns can be used in the 1st turn.


 * The second trouble - if a skill can't be executed because of the coodown - next skill chances are enlarged. The cause is - sub %ransu,tuika_skillXX command is executed always, even if a skill is cooldowned. And the effect is cumulative.


 * The third trouble - the counterstance cooldown (%tuika_owaza_count4b) increases after each turn. Story battles stop the increment if a hero is binded in this turn.


 * And the last one - cooldowns aren't resetted after you escape from a "special" bind.


 * [data]/query_new="2" forces the fixed enemy attacks query. It still uses the >= equation but skill chances are constant.


 * [data]/query_new="1" forces another query. It uses the > equation (same as story battles), constant skill chances and the enemy skills order is different. skillcount0, skilltame0, skilla1 - skilla8. After you escape from a special bind - cooldowns are resetted to 0. The last difference - normal and charged binds not set the bind length to 0 by default. If you not define skill_mogaku and skill_mogaku_earth - %genmogaku value not changes.


 * Query_new="1" is recommended.

GC345 (talk) 09:09, June 15, 2016 (UTC)

HP traps

 * You can use up to 3 "if enemy HPs are lower of value - do something once" triggers.


 * The syntax is henkaX=", [, ]" in the [data] section. HenkaX may be henka1, henka2 or henka3.
 * - enemy HPs. Warning - the condition is "lower of value" not "lower or equal of value".
 * - can be "a1"-"a16", "b1"-"b8", "c1"-"c8", "d1"-"d8", "tame0", "tame1", "counter0"-"counter5" or "win". The "win" target ends the battle with hero's victory. Plus you can use a custom dialog link ("!XXX") as the target.
 * can be "1" or "2". Mode 1 and 2 force the HP trap even if enemy HPs are 0 after your attack. Mode 2 not resets the HP trap, it will execute until you manually disable it (with the "change" command).
 * Warning: HP traps are active only if hero isn't binded. Use "enemylife"/"enemylife1" triggers if you need the check for a binded state.

<p style="font-weight:normal;">GC345 (talk) 13:26, April 7, 2016 (UTC)

Multi-enemy (multi-sprite) battles

 * By default the game uses the sprite number 0 (700) for the enemy. There are 4 stances for the enemy (defined with [data]\tatie1-[data]\tatie4 keys) and 2 coordinated (defined with [data]\monster_x and [data]\monster_y).


 * But the main story supports up to 4 sprites. Some examples are: Angel Soldiers fight, Akaname fight etc.


 * I have added this feature to my patch.


 * To use this feature - define the tekikazu key in the [data]section. Tekikazu="2" uses 2 sprites (0 and 2), tekikazu="3" uses 3 sprites (0, 2 and 4) and tekikazu="4" uses all 4 sprites (0, 2, 4 and 6).


 * Then you must define 3 stances and 2 coordinates for the corresponding sprite with [data] section keys:
 * Tatie1b, tatie2b, tatie3b, monster_xb and monster_yb define normal/happy/sad resource and coordinates of the upper-left corner for the 2nd enemy sprite.
 * Tatie1c, tatie2c, tatie3c, monster_xc and monster_yc for the 3rd.
 * Tatie1d, tatie2d, tatie3d, monster_xd and monster_yd for the 4th.
 * The game will automatically draws all enemy sprites at the battle start and will change all sprites if happy/sad stance was used.


 * You can change all above keys with the "change" command.


 * Warning: the binding stance (tatie4) not have the multi-enemy support so you must process it manually.


 * Warning: the win effect will be used only on the 1st enemy sprite (0). If you want to seal/chase away multiple enemy sprites - use custom dialogue for the [sel]\vic_sel1 key and add "sp_del,X,0" commands for the corresponding enemy sprite.

GC345 (talk) 15:49, April 8, 2016 (UTC)

Full path support for resources

 * There were 2 methods to link a resourse file in the game. The 1st was "resource name only", the 2nd - "file name with the extension".


 * Both have flaws. The 1st one uses fixed locations (se\ for sound files, bgm\ for music etc). As the example - you can't use standard icons, effects etc (effect\ and system\), you can't use NSA voices (voices\).


 * The 2nd one can use files only in the current story.ini directory. So if you have several battles - you must copy resources to all subfolders.


 * Now the 2nd method is updated:
 * Use "\" to force the search point to the main game directory. Example - ="se,1,\voice\alice1_01.ogg" plays this .ogg from the .NSA voice directory.
 * Use "." to force the search point to the main story.ini directory. So if your Spin-off have subfolders (like Cecil's Quest) - you can store all resources in 1 folder.


 * Example - you have the main directory Test with 2 subfolder for battles (Test\Fight1 and Test\Fight2). Each have a separate story.ini. And you want to load the file bg001.bmp from the Test folder when you have started the first fight. Use ="bg,.bg001.bmp,10,500"


 * This feature was added for these keys: "tatie1"-"tatie4", "haikei", "music", "skill_se1"-"skill_se9", "skill_ct1", "skill_ct1_1"-"skill_ct1_9", "skill_ct2", "skill_bukkake".


 * This feature was added to these commands: "bg", "sp", "sp_non_alpha", "sp_alpha", "sp_leftup", "sp_rightup", "bgm", "se", "syasei", "syasei_non_alpha", "syasei_alpha", "syasei_leftup", "syasei_rightup", "syasei2", "sp2", "sp2_non_alpha", "sp2_alpha", "sp2_leftup", "sp2_rightup".


 * Plus now all keys are independent. As the example you can use the "name only" method for the "tatie1" key and the "name with extension" method for "tatie2" key simultaneously.

GC345 (talk) 08:08, April 8, 2016 (UTC)

General

 * You can define up to 12 skill_selX=/skill_annoY_X= variants. [Skillcounter0], [skilltame0] still use the old limit (from 1 to 3). [Skilltame1] (if the charged attack missed and [skilltame2] isn't defined) still use the old limit. Skill_selxX still use the old limit.
 * You can define up to 9 hits in any attack. Use skill_anno4_Y= - skill_anno9_Y=, skill_se4= - skill_se9=, skill_damage4_1= - skill_damage9_1= and skill_damage4_2= - skill_damage9_2= keys. The game checks the skill_damageY_1= value for 2nd and later hits and apply the hit only if this key is defined.
 * Miltihit attacks can stop right after hero's HPs will reach 0 (by default all hits are executed then the game starts a hero's lose sequence). Use the skill_multilose="1" key.
 * The skill_damage_mode= key defines damage effect/animation and armor piercing mode. The syntax is skill_damage_mode=" ".
 * "0" and "1" use standard damage effects (the damage.ogg sound, horizontal shaking).
 * "2" and "3" use heavy damage effects (the damage2.ogg sound, short shaking, Goblin Girl's "Earth Crashing Goblin" as the example).
 * "4" and "5" use critical damage effects (the ikazuti.ogg sound, long shaking, Ilias' "Judgement Tap" as the example).
 * "1", "3" and "5" ignore Gnome, guarding, "Water Wall", level draining and Salamander's bonus versus Grandine.
 * Each hit can show a different frame if you want. Keys are skill_ct1_1= - skill_ct1_9=. The syntax is same as for the skill_ct1= key. Frames use coordinates from skill_ctx= and skill_cty keys=. If you add ,0 to this command the frame will not be drawn (effect 0).
 * By default all frames are removed after an enemy skill ends. If you want to make the frame constant - use the skill_ct_stay="1" key.
 * By default the skilltag is removed after an eenmy skill ends. If you want to make the skilltag comstant - use the skill_name_stay="1" key.
 * If the skill_kousoku_anno0= key isn't defined - there are no wait states now.
 * Status attacks (except gradual petrification) are used only if hero's status is clear. If hero is affected already - the game tries to select another skill from the current query.
 * OHKO skills can't be status attacks.
 * A counter ([skillcounter1]) and a successful charged attack ([skilltame1] w/o Guard) ignore skill_aqua= and skill_wind= completedly (always hit).
 * Enemy healing (skill_kouka="7"), spirit canceling (skill_kouka="8") and AS summoning (skill_kouka="9") ignore skill_aqua= and skill_wind= completedly (always hit).

Customized evades

 * You can use custom dialogues for both skill_aqua= and skill_wind= keys. This will start a customized evade routine. You will have the full control to evade chances and to evade routine effects. See below.


 * "No miss" enemy attacks (a counterattack, charged attacks, enemy healing, spirit canceling, AS summoning) ignore this feature.

Skill_kouka

 * Enemy healing is added. Use skill_kouka="7". Only 1 hit. The enemy heals the random HPs value between skill_damage1_1= and skill_damage1_2= values. The skill_anno2_X= content will be printed after the heal. These skills can't be countered, "Daystar" not works. P.S. You can use this to add enemy passive skills (set skill_damage1_1 and skill_damage1_2 to "0" or not define these keys).
 * Spirit canceling is added. Use skill_kouka="8". Only 1 hit. Skill_damage1_1= defines targeted spirits. 1 is for Sylph, 2 - for Gnome, 4 for Undine and 8 for Salamander. So if you want to dispel all 4 spirits - use skill_damage1_1="15". The skill_anno2_X= content will be printed after the cancel hits. Spirits canceling can't be countered, "Daystar" not reacts to this attack.
 * The artifical spirits support is added. Use skill_kouka="9". Only 1 hit. Skill_damage1_1= defines the spitit and the duration of a summon (skilldamage1_1="<spirit_alias>, ). <Spirit_alias> is 1 for Zylphe, 2 for Gnomaren, 3 for Grandine and 4 for Gigamander. <Spirit_alias> 0 unsummon all artifical spirits. See below.

Skill_count

 * By default all cooldowns are resetted after hero struggled successefully from a bind or after a bad status ends. Now you can use two more options:
 * use ,1 after the cooldown value to disable cooldown resetting.
 * use ,2 after the cooldown value to reset this cooldown only if a bind was started with this skill.
 * Examples: skill_count="9,2" - this cooldown resets only if this skill is a binding skill and the bind was successeful.


 * If all attacks in a query are cooldowned - enemy will pass 1 turn (needs [data]/query_new="1").

Normal, drain and level drain attacks

 * You can force Sylph/Fallen Angel Dance to evade each hit of a multi-hit attack. To force this - use the skill_multiwind="1" key. Chances and the evasion announcement are constant for all hits.
 * The skill_kouka_changeX= key switches the hit type on-the-fly. Use skill_kouka_changeX="1" to switch to the drain attack and skill_kouka_changeX="6" to switch to the level drain attack. Anothers values set the attack type to normal attacks.
 * Warning - this evade don't breaks followup/followup_always/followup_instant query.

Status attacks

 * Skill_status_hit=, skill_status_anno=, skill_status_mid= and skill_status_end= keys are added. Skill_status_anno=/skill_status_hit= define announcement/hero's message after the status attack hits. Skill_status_mid= is used when hero pass turn because of the status. Skill_status_end= is used when the status is timed out or (for skill_status="6" or "8") when hero completely petrifies.
 * The game uses default values for above keys if these keys aren't defined. Use the " " value to supress the output completedly.
 * You can use @ (new line wait state) and ~ (new line) with skill_status_mid= and skill_status_end= keys. This setting overrides the default new page wait state.
 * The petrification status attack can be used now. Use skill_status="6". See below.
 * The gradual petrification status attack support is added. Use skill_status="8". See below.
 * The poison status attack support is added. Use skill_status="9". See below.

Binding attacks

 * You can define the hero's attack strength when a "special" bind is active. Use skill_mogaku_abairitu= key. The default value is 80.
 * If you use the new battle query (query_new="1") - the game not sets the %genmogaku value to 0 automatically. So if you need the "1-try" struggle - you must define skill_mogaku= or skill_mogaku_earth= keys.

Requests and losing

 * If you use the skill_rukalose="0" key (or this key isn't defined) - there is no hero's messages before bukkake. The skill_rukalose="5" key is similar but it uses the skill_rukalose=4 behavior (no bukkake, "surrenders..." replaces "was defeated...").
 * 2 more keys are used when the hero loses: skill_lose_start1= and skill_lose_start2=. They are printed with the enemy nametag before a bukkake.
 * Multiple rape scenes are supported. Use the skill_lose_scene=" " key. If this key is defined the game go to the [lose ] section after the hero loses.
 * The skill_onedari_use= key overloads the standard Request routine and executes 1 unbinded enemy attack if you have selected this skill as the request. The syntax is skill_onedari_use="aX".
 * You can use the advanced Request scripting if you set a custom dialog as the skill_onedari_use target. See below.

___

 * [Skillcounter2]-[skillcounter5] have the skill_counter_tatie= key. This key defines the counterstance sprite. The defined value will be loaded to all 4 stances (normal, happy, sad and bind) but you can change them later with the "change,tatieX" command. After the counterstance ends - the game will reload "tatie1"-"tatie4" values from the [data] section.
 * The skill_message_mode= key controls skill_selX, skill_selxX, hero_kiki1_X, hero_kiki2_X, kiki_sX and half_sX messages. The syntax is skill_message_mode=" [, ]".
 * <Value1> controls skill_selX, hero_kikiX_Y, kiki_sX and half_sX displaying:
 * "0" (default) - all messages are always displayed.
 * "1" - no messages when hero HPs are below 50% or 20% of max HPs.
 * "2" - same as "0" but skill_selxX messages are ignored in the request mode.
 * "3" - same as "1" plus no skill_selxX in the request mode.
 * <Value2> controls skill_selX displaying:
 * "0" (default) - all messages are always displayed.
 * "1" - no skill_selX messages in the request mode.
 * "2" and "3" are used by [skillcounter0] only, are similar to "0" and "1" and supress skill_sel_counter_endX= displaying in the request mode.

GC345 (talk) 09:36, October 25, 2016 (UTC)
 * Followup=/followup_guard=/followup_counter=/followup_always= keys are used to chain enemy attacks. See below.
 * The Followup_instant= key is used to execute several enemy attacks in the same turn. See attack linking.
 * The Skill_finish= key is used to add the finisher to attack. If hero HPs are low - the enemy will execute this finisher. See attack linking.

Petrification and gradual petrification

 * There are 2 types of petrification in the game.


 * The first type ("delayed") starts the countdown, lower the countdown each turn and petrifies a hero after the countdown ends. Used by Medusa in the main story. To use this attack in spin-off battle - set skill_souka="2" and skill_status="6". Skill_status_turn1/2 sets the coundown value in turns.


 * The 2nd type ("gradual" or "partial") petrifies a hero after several hits. Use skill_kouka="2" and skill_status="8". Skill_status_turn1/2 sets number of hits before a complete petrification. Next hit not set this value but lower it per 1. And when the value is 0 - the hero petrifies completely and can't use any commands.  Used by Chimera Medullahan and Basilisk.


 * If you use skill_status_turn1="0" and skill_status_turn2="0" or not define these keys - the petrification is instant for both variants.


 * These 2 statuses use skill_status_mid and skill_status_end keys differently. The skill_status_end key is used once when the hero petrifies fully. Skill_status_mid is used each turn after this.


 * "Petrified" trigger works for both variants.


 * "Eyes of Recovery" heals both variants of petrification.

GC345 (talk) 10:31, February 29, 2016 (UTC)

Poison

 * Skill_kouka="2" and skill_status="9".


 * After each enemy turn a hero will be hit by the poison damage. The default damage factor is 1/20 from hero's maximum HPs. You can set the value with the skill_status_abairitu key or the "change,poison" command. The damage value is random between 90%-110% of the damage factor.


 * If the poison damage triggers half_s1/2 or kiki_s1/2 messages - the game checks the skill_message_mode key for the attack which started the poison status.


 * If the poison damage kills a hero - the game uses the skill_rukalose key and others defeat routine keys from the same skill.


 * You can override both keys if you define them in the [poison] section.

GC345 (talk) 13:06, April 11, 2016 (UTC)

Artifical Spirits

 * Unbinded attacks (both normal ([skillaX], X>0) and counterstance ([skillcounterY], Y>1)) only.


 * Only 1 artifical spirit can be active. So if you summon another one - the first one will vanish automatically.


 * The skill_damage1_1= key select the spirit to summon amd sets the summon duration. The syntax is skill_damage1_1=", ". <Spirit> is "1" or "wind" for Zylphe, 2 or "earth" for Gnomaren, "3" or "aqua" for Grandine and "4" or "fire" for Gnomaren. "0" or "off" unsummons all artifical spirits.


 * <Duration> not counts the summon itself. So if you use skill_damage1_1="1,2" - the enemy attacks 2 turns before the summon will stop. Binds stops the count too.


 * The skill_anno2_1= key is printed after the summon itself. Others skill_damageX_X and skill_annoX_X keys are ignored.


 * P.S. Zylphe, Grandine and Gnomaren summons change evade rates automatically for [skillaX] (X>0) and [skillcounterY] (Y>1) enemy attacks if skill_kouka is from 0 to 6 (normal, drain, status, binding and level drain attacks). These attacks are referenced as "AS group" below.

Zylphe

 * Changes the accuracy of hero's normal attacks. The accuracy value is controlled by the %kaihi_el variable (0 - the attack misses always, 100 - the attack hits always). The default value (set by the Zylphe summon itself) is 50. Use the "change,kaihi_el,X" command to set a different value. "Devastating Gale", "Fallen Angel Dance: Gale" and all versions of "Serene Mind" ignore this effect and hit always.
 * "Serene Mind" B, C, D and E evade chances are lowered to 5% for "AS group" enemy attacks. If you need the different value - use a customized water guard.
 * Extra hits. See below.
 * Gnome summons (except "Strength of the Earth") lowers an enemy attacks damage. The value is controlled by the %earth_keigen_el variable (0 - no penalty, 100 - all damage is nullified). The default value (set by the Zylphe summon itself) is 70. Use the "change,earth_el,X" command to set a different value. Armor piercing attacks ignore this effect.

Gnomaren

 * Enemy binds are inescapable even with Gnome.
 * Hero's gamage is reduced (for normal attacks, skills and "Word of Dispel" skills). The multiplier is controlled by the %damage_keigen_el variable (0 - you can't damage an enemy at all, 100 - full damage). The default value (set by the Gnomaren summon itself) is 50. Use the "change,damage_el,X" command to change.
 * Wind evade chances are changed automatically for affected enemy attacks (see above). 100% for status and binding attacks and 80% for normal, drain and level drain attacks. If you need different chances - use a customized wind guard.

Grandine

 * Extra hits (see below).
 * Hero's gamage is reduced (for normal attacks, skills and "Word of Dispel" skills). The multiplier is controlled by the %damage_keigen_el variable (0 - you can't damage an enemy at all, 100 - full damage). The default value (set by the Grandine summon itself) is 70. Use the "change,damage_el,X" command to change.
 * Salamander summons (except "Blade of Fire") lowers an enemy attacks damage. The value is controlled by the %fire_keigen_el variable (0 - no penalty, 100 - all damage is nullified). The default value (set by the Grandine Summon) is 30. Use the "change,fire_el,X" command to set a different value. Armor piercing attacks ignore this effect.
 * Salamander summons (except "Blade of Fire") prevent binds. Binding attack can hit and damage bit the bind itself fails (similar to Elimination: Stroke). The skill_kousoku_grandine= key is printed after this fail.

Gigamander

 * Extra hits (see below).
 * The 100% damage bonus for enemy attacks. Use the skill_gigamander_bonus="1" key. Armor-piercing attacks (skill_damage_mode="1" etc) ignore this.
 * The main story uses this bonus for physical attacks only (to be more precise - for Knightroid's physical attack only), you can use the bonus for any non-armor-piercing skill.


 * "Serene Mind" B, C, D and E set evade rates to 100% automatically for "AS group" enemy skills. If you need a different behavior - use a customized water guard.

Extra hits

 * You can add extra hits to all enemy attacks except [skillcounter0] and [skilltame0]. They will be used only if Zylphe, Grandine or Gnomaren are active. The maximum number of hits per attack is still 9.
 * Use skill_extrahits_start="<X>" key to stop the standard variant of enemy multihit attack. If there is no active ASs - the game not uses a hit with bigger numbers.
 * Use skill_extrahits_end_wind="<X>", skill_extrahits_end_aqua="<X>" and skill_extrahits_end_fire="<X>" keys to stop the attack if the corresponding AS is active. Again, the attack not use hits with bigger numbers if the corresponding spirit is active.
 * The attack still ends if the skill_damageX_1= key isn't defined.
 * Example - if you need the attack with the 1 hit w/o ASs, 2 hits with Grandine and 3 hits with Zylphe and Gigamanger:

... skill_extrahits_start="1" skill_extrahits_end_aqua="2" skill_damage1_1="200" skill_damage2_1="200" skill_damage3_1="200" ...
 * P.S. The main story uses the behavior below for an extra hits: No extra hits for status and binding attacks, no extra hits for armor-piercing attacks, Zylphe adds extra hits for unbinded and binded attacks, Grandine and Gigamander add extra hits for unbinded attacks only. Please use the similar behavior.


 * P.S.S. The main story always uses the +2 hits pattern for Zylphe. Grandine uses 1+1 and 3+2 patterns (because the counter for this summon is Guard). Gigamander uses 1+2, 2+2, 2+3, 3+2 and 3+3 patterns. Please use the similar behavior.

GC345 (talk) 16:47, September 6, 2016 (UTC)

Enemy attacks linking

 * With keys below you can link enemy attacks in queries.


 * Followup key is the basic link. The syntax is followup=" ". Possible values for :
 * counter1-counter5 if the enemy is in counterstance.
 * a1-a16, tame0, tame1, counter0, counter1 if not binded.
 * b1-b8 for the 1st bind query.
 * c1-c8 for the 2nd bind query.
 * d1-d8 for the OHKOs query.
 * win.
 * The "win" skill finishes the battle by hero's victory.


 * Followup_guard and followup_counter - same syntax and targets as "followup" but are applied only if the enemy attack was evaded/countered.
 * Followup_always key is the "3-in-1" followup. Enemy uses defined skill in normal conditions and if the attack was evaded or was countered with "Daystar". If the "followup_always" key is defined - "followup", "foloowup_guard" and "followup_counter" keys are ignored.
 * Warning: followup_always not works if hero is in OHKO query. So - [skilld1]-[skilld8] and all skills with skill_kouka="5" ignore this key completely.

GC345 (talk) 19:46, April 9, 2016 (UTC)
 * Followup_instant key links attacks in the same turn so enemy will attack twice/trice etc. Evasion and Daystar can break this chain. Warning - if the 1st attack is passive/healing (skill_kouka="7") or spirit canceling (skill_kouka=8) - Daystar remains active and can counter the 2nd attack. If this key is defined - the "followup" key is ignored, the "followup_always" key is used only after evasion/Daystar.
 * Skill_finish links 2 skills in the same turn too. The syntax is different: skill_finish="<HPs>, ". The is executed only if hero's HPs are below the <HPs> value. If you use skill_multihit="1" - this condition will be checked after each hit.

Advanced enemy attacks linking

 * You may use the special version of custom dialogues with the followup_instant key. This feature was added for the multi-enemy battles mostly.


 * To start the advanced link - use followup_instant="! " then define needed commands in the [ ] section.


 * Supported commands:
 * Var_ld, var_cpa, var_cal, var_jumpline, var_dice, gotoline are same as in the main story and custom dialogues. They are used to choose what enemy skill you need to link. See the example below.
 * Name temporaly changes the current enemy name. The name is remembered at the followup_instant start and is restored at the start of each turn. The syntax is standard - ="name, ".
 * End stops the script and continues the standard enemy attack query.
 * Execute. The syntax is ="execute, ". Stops the script and starts the [skill ] attack. There is no limitations for but the standard method (aX, bX, cX, dX, counterX) is recommended. You even can link the skill to ifself.
 * To control the recursion there is 1 method. Each "execute" command adds 1 to the special variable %hit, the "end" command reset the %hit value to 0. This variable can be readed with the var_ld command and then you may manually end the script if this variable is too big.

Example:

[skilla1] skill_kouka="7" skill_kakuritu="20" skill_sel1="Uuu...Aaa..." skill_sel2="Thirst...Heal..." skill_sel3="Man...Energy..." skill_anno1_1="Zombie Girl A slowly shambles toward Luka!" skill_message_mode="1" followup_instant="!query1" [query1] 100="var_cpa,v19,<,3" 101="var_jumpline,103" 102="end" 103="name,Zombie Girl B" 104="var_dice,v18,30" 105="var_cpa,v18,<,11" 106="var_jumpline,110" 107="var_cpa,v18,<,21" 108="var_jumpline,111" 109="execute,a11" 110="execute,a9" 111="execute,a10"


 * The v19 variable stores the battle stage (1 for 3 zombie girls, 2 for 2 zombie girls, 3 for the last zombie).
 * The line 100 checks if v19<3, jumps to the line 104 if the check is true (line 101) or end the script if there is only 1 enemy left.
 * The line 103 changes the name to Zombie Girl B so all linked attacks will use this name.
 * Lines 104-108 randomly select 1 skill from 3, lines 109-111 execure the selected skill.

Recursion example: [skilla1] ... followup_instant="!query1" [query1] 100="var_ld,v19,hit" 101="var_cpa,v19,>,0" 102="var_jumpline,104" 103="execute,a1" 104="end"
 * The skill will be used twice.

GC345 (talk) 12:12, July 6, 2016 (UTC)

Advanced Request scripting

 * The default Request routine in Spin-offs isn't very effective. There are many flaws (for the OHKO query mostly).


 * Now you have the advanced control for which skills in which order will be executed. For different conditions.


 * To start a script - just use the a custom dialogue link for the skill_onedari_use key. Skill_onedari_use="! " transmits controls to the [ ] section.


 * Supported commands are:
 * Var_ld, var_cpa, var_cal, var_jumpline, var_dice, gotoline are standard.
 * End finishes the script and returns controls to the main enemy attacks routine.
 * Execute. The syntax is ="execute,<skill_name>". This command executes the enemy attack in the [<skill_name>] section and continues the script. Plus the 1st execute command run the standard Request preparations (disables all spirits, stops Serene Mind A, prints skill_onedari1 and skill_onedari2 content etc).


 * Warning: there are 2 standard Request preparations in the game. The main difference is the bind status, the 1st routine always breaks the bind. To force this routine - use ="execute,a " command as the 1st execute. In other words if the 1st skill in the Request script starts from "a" then the bind will be stopped. All others skills not breaks the bind.


 * Warning: you must stop each script branch with the "end" command or with the gotoline command to the previous string.


 * Warning: the name of the "execute" target may be anything, the game just checks the counterstance presence (and uses the standard [counter2]-[counter5] routine if the enemy is in the counterstance) then checks the bind level and uses standard unbinded/standard bind/OHKO routines.


 * Currently you can't execute counter start/counter end and charged attack preparations properly ( ="execute,counter0" and ="execute,tame0" will not break the bind and will be processed as unbinded skulls). I will fix this later.

Example: [skilla4] skill_name="Mount" ... [skillb1] skillname="Goblin Insertion" ... [skilld1] skill_name="Goblin Tighten" ... [onused1] 100="var_ld,v18,kousoku" 101="var_cpa,v18,=,0" 102="var_jumpline,106" 103="var_cpa,v19,=,1" 104="var_jumpline,107" 105="gotoline,108" 106="execute,a4" 107="execute,b1" 108="execute,d1" 109="gotoline,108"
 * The standard routine always breaks the bind, then executes "Mount", "Goblin Insertion" and "Goblin Tighten".


 * This routine checks the bind level and executes [skilla4] - [skillb1] - [skilld1] continuously if hero is unbinded (lines 100-102, then 106-109). Or skips [skilla4] and starts from "Goblin Insertion" of hero is already binded (lines 103, 104). Or even starts from [skilld1] (the line 105).


 * The v19 variable is used to differ bind levels in the same query. [Skilla4] sets v19=1, [skillb1] sets v19=2. I have used "change" commands in skill_selx1 custom dialogues.

GC345 (talk) 07:55, April 12, 2016 (UTC)

Custom hero's attacks

 * You can now redirect the standard hero's attack to any custom dialogue. And then make anything you want with an enemy. :)


 * Use the "change,customattack, " command. It redirects normall attack to the [customattack ] section. After the "end" command the battle continues.


 * You can use all custom dialogue commands (sprites, sounds, change variables, print text).


 * There are 3 more commands:
 * Commonattack ( ="commonattack") and commonattack1 ( ="commonattack1") execute the standard hero's attack ("Blade of Still Water" if Undine level 2 or 3 is active, 2 hits if Sylph level 3 is active, always critical if Gnome level 3 is active etc). "Commonattack1" not prints hero's messages and not changes SPs.


 * You can control the result with the "change,action" commands. If you set the action before commonattack/commonattack1 - the result isn't random:


 * "change,action,1" forces normal attack.
 * "change,action,2" forces critical hit.
 * "change,action,3" forces miss.
 * "change,action,4" forces "Blade of still Water".
 * "change,action,-3" uses the standard hero's attack but it always hits, no misses.
 * Plus you can disable the attack sound and the damage routine with the "change,skill_sub,1" command. It's used for enemy evades and custom damage values.


 * List1 - starts the attack list. The syntax is ="listX,<attack_name>[,<section_name>]".


 * After the game finds the "list1" command in the [customattackX] section - it ignores all others keys except "list2"-"list8". And after the "end" command the attack list with founded values will be executed. You can choose one of attacks then the game goes to the <section_name> section. Or you can use right-click to return to the main hero actions menu.


 * If <section_name> is absent - the standard hero's attack will be used.
 * Warning: the game still uses the standard "end of hero's attack" routine after a custom attack. So - you will go to the win routine if enemy HPs are 0 and will go to the enemy counter routine if enemy counter is active and the attack result isn't miss (%before_action=3) or "Magic Concentration" (%before_action=59). To change this - use HP traps with the ",1" or ",2" parameter and the "change,action,3" command.

GC345 (talk) 19:51, April 9, 2016 (UTC)

Custom hero's skills

 * Same as for custom hero's attacks - you activate this feature with the "change" command. Use ="change,customskill,<section_number>". After this the game will analyze the [customskill<section_number>] section before you execute any skill.


 * Possible [customskillX] keys are:
 * skillX. The syntax is skillX="<section_name>". Redirects the associated skill to the <section_name> section. You can use all custom dialogues commands.
 * skillXname (skillXname="<new_name>") - replaces the standard skill name in the Skill menu to.


 * Warning: this command affects the Skill menu only. The skill itself still uses the default nametag. You must overload the skill or use the skillXtag= key to change this.


 * skillXmp (skillXmp=" ") - replaces the standard SP cost in the Skill menu to this.


 * Warning: this value affects the skills menu only. (Can you execute the skill or it's grayed). The skill itself still changes SPs per the default value. You must overload the skill or use the "customskill1" command to change this.


 * skillXoff (skillXoff="1") - not shows the skill entry.


 * skillXtag (skillXtag="<new_name>") - replaces the standard skill plate to <new_name>. This key not works for overloaded skills but works for commonskill/commonskill1 commands.


 * Warning: beta 11 have separated angelic and normal spirit summons. Now there are skill8d/10d/14d for skill_earth/aqua/fire="4" and skill8e/10e/14e for skill_earth/aqua/fire="5" (similar to Sylph summons). Slill8b/8d, skill8c/8e and skill14c/14e are identical. Skill10c/10e and skill14b/14d are identical except the SP cost. Skill10d is the "Serene Mind C" variant after Undine is returned (similar to skill7d).


 * Warning: beta 11 have changed skill18 ("Serene Mind" C) behavior. It always use gray icon and needs/sets "action"=60. After you got Undine back - the game uses skill10d now. So if you have used sinkou_listX="action,45,..." to intercept this skill - please replace it to sinkou_listX="action,60,...". Same for the action1 trigger.


 * SkillX can be skill1 ("Demon Decapitation", 21), skill2 ("Flail Wildly", 41), skill3 ("Thunder Thrust", 22), skill4 ("Meditation", 42), skill5 ("Demon Skull Beheading", 23), skill6 ("Death Sword Chaos Star", 24), skill7 ("Wind Protection", 43, skill02=0 or 1), skill7b ("Playful Wind", 43, skill02=2), skill7c ("Devastating Gale", 43, skill02=3),  skill7d ("Fallen Angel Dance" B, 43, skill02=4), skill7e ("Fallen Angel Dance: Gale", 43, skill02=5),  skill8 ("Strength of the Earth", 44, skill03=0 or 1), skill8b ("Breath of the Earth" A, 44, skill03=2), skill8c ("Wild Lands" A, 44, skill03=3),  skill8d ("Breath of the Earth" D, 44, skill03=4), skill8c ("Wild Lands" B, 44, skill03=5),  skill10 ("Water Wall", 45, skill04=1), skill10b ("Serene Mind" A, 45, skill04=2), skill10c ("Serene Mind" B, 45, skill04=3, 4 SPs),  skill10d ("Serene Mind" D, 45, skill04=4), skill10e ("Serene Mind" E, 45, skill04=5, 2 SPs),  skill11 ("Lightning Sword Flash", 25), skill12 ("Earth Rumbling Decapitation", 26), skill13 ("Serene Demon Sword", 27), skill14 ("Blade of Flame", 46, skill05=0 or 1), skill14b ("Hellfire Sword" A, 46, skill05=2, 2 SPs), skill14c ("Purgatory Flame" A, 46, skill05=3),  skill14d ("Hellfire Sword" B, 46, skill05=4, 4 SPs), skill14e ("Purgatory Flame" B, 46, skill05=5),  skill15 ("Quadruple Giga" preparation, 47), skill15d ("Quadruple Giga", 28), skill16 ("Vaporizing Rebellion Sword", 29), skill17 ("Edging", 55), skill18 ("Serene Mind" C, 60), skill19 ("Flash Kill", 30), skill20 ("Ninefold Rakshasa", 31), skill21 ("Heavenly Demon Revival", 32), skill22 ("Magic Concentration", 59), skill22x (Daystar), skill23 ("Fallen Angel Dance" A, 56), skill24 ("Element Spica", 34), skill25 ("Quad Spirit Summon", 57).


 * You can use the commonskill and commonskill1 commands in the custom skill body. It executes 1 standard skill. You control the skill choice with "change,action" and "change,skill_wind/skill_earth/skill_aqua/skill_fire" commands. Action values are listed above after the skill name. Daystar can't be summoned by this method. Customskill1 not prints hero's messages and not changes SPs (similar to the commonattack1 command).
 * You can use the "change,skill_sub,1" command to suppress skill hit sound and damage routine. This is used for enemy evades/defence/custom damage (similar to custom attacks).

Example: if you want to execute Blade of Flame in a place of Purgatory Flame (Angelic skill menu):

[data] ... skill="22" skill_fire="5" ... [story] ... XXX="battle_st" ... YYY="change,customskill,1" ... ZZZ="battle" [customskill1] skill14e="newpurgatoryflame" skill14ename="Blade of Flame - 2" skill14emp="2" [newpurgatoryflame] 100="name,Luka" 101="Salamander, lend me your power...!" 102="name," 103="change,mp,2,-" 104="change,action,46" 105="change,skill_fire,1" 106="commonskill1" 107="change,skill_fire,5" 108="end" Example: make "Quad Spirits Summon" with different name, different SPs cost and 5 turns for Salamander:

[customskill1] skill25="unity" skill25name="Heinrich's Unity - 1" skill25mp="1" skill25tag="Heinrich's Unity" [unity] 100="name,Luka" 101="Here we go, everyone!" 102="name" 103="change,mp,1,-" 104="change,action,57" 105="commonskill1" 106="change,fire_turn,5" 107="end"

Example: show only Salamander summon, disable Sylph, Gnome and Undine (angelic skills after the Seal is removed):

[customskill1] skill7eoff="1" skill8eoff="1" skill10eoff="1"

Example: make an enemy invinsible to skill (Demon Decapitation):

[customskill1] skill1="newdecap" [newdecap] 100="change,action,21" 101="skill_sub,1" 102="commonskill" 103="se,2,earth3" 104="delay,90" 105="But enemy takes no damage!" 106="end"

GC345 (talk) 17:39, August 15, 2016 (UTC)

Custom Guard and Wait

 * These 2 commands can be overloaded similar to Attack and Skill.


 * Use the ="change,customguard, " command to use the [guard ] section as the Guard command routine. Use ="change,customwait, " to use the [wait ] section as the Wait command routine. "Change,customguard,0" and "change,customwait,0" return to default routines.


 * Any guard routine still sets the corresponding variable. So the non-armor-piercing damage is halved and charge attacks are avoided.

GC345 (talk) 19:48, April 9, 2016 (UTC)

Compatibility

 * There are some old keys that will be removed later and must be avoided/replaced.
 * ignoredef= and skill_ignoredef= are skill_message_mode= analogs.
 * mogaku_anno1=, mogaku_anno2=, mogaku_anno3=, mogaku_anno4=, mogaku_sel1=, mogaku_sel2=, mogaku_sel3=, mogaku_sel4=, mogaku_sel5=, mogaku_dassyutu1=, mogaku_dassyutu2=, mogaku_earth_dassyutu1=, mogaku_earth_dassyutu2=, mogaku_kaisin1= and mogaku_kaisin2= keys change corresponding messages for bind skills.

GC345 (talk) 08:30, May 3, 2016 (UTC)'