#author("2022-07-08T09:00:13+00:00","","")
#author("2024-03-22T15:00:54+09:00","default:admin","admin")
*Variable Boxes (assignment and calculation), String Variables (assignment and text input) [#f69b33ac]
>

#contents

**Variable Box Assignment and Calculation [#mc171edc]
Assign a value to a numeric variable that has been specified in a specified manner.

#ref(Variable_Box_Assignment_and_Calculation.png)
#br

-''Variable Box Number''
Specify the variable box to be used.

--''Variable Box Type''
---''Value''
The value to be used can be specified between -9999999 and 99999999.
The value to be used can be specified between -9999999 and 9999999.

---''Text''
Used to specify a string variable.

---''Local Value''
Used to specify a local variable.

-''Array Variable''
Used to specify an array variable.

--''Pointer''
Specify a pointer to be specified from an integer or variable box.

-''Value''
Assign an integer between the specified values in the following manner

--''Overwrite by Value''
Assign a value.

--''Add a Random Number (0 to Value)''
Add a random number from the range of 0 to the specified number.

--''Add''
Add the value.

--''Subtract''
Subtract the value.

--''Multiply''
Multiply the value.

--''Divide''
Divide by the value.


**Advanced Variable Box Operation [#l3c6db7f]
Assign the specified parameter to a numeric variable in the specified manner.
-''About the (Deprecated) indication on some options for the operation''
--These are recommended options to be operated using the following event panels that have been added with the Bakin update.
---[[Obtain Cast Status:https://rpgbakin.com/pukiwiki_en/?Statuses#o45931f7]]
---[[Change Cast Status:https://rpgbakin.com/pukiwiki_en/?Statuses#gc32eaf9]]
---[[Obtain Item Parameter:https://rpgbakin.com/pukiwiki_en/?Statuses#m5875706]]

--It is acceptable to use those options that have been marked (Deprecated) in projects created up to the current version (Ver. 1.8.0.5).
--However, please note that these options may become non-selectable in the future.
Also, in the future, even if the number of obtainable values increases, they will not be added to the (Deprecated) options. We recommend using other event panels for this purpose.

#ref(Advanced_Variable_Box_Operation.png)
#br

-''To what?''
Specify the variable box to be used.

-''What?''
Specify the parameter to be assigned by selecting one of the following

--''Fixed Value''
An integer from 0 to 99999999 can be entered.
An integer from 0 to 9999999 can be entered.

--''Random Number''
Any integer from -99999999 (minimum) to 99999999 (maximum) can be entered.
Any integer from -9999999 (minimum) to 9999999 (maximum) can be entered.

--''Variable Box''
Specify the variable box to be used.
Refer to the value in the assigned variable box.

--''Money in Possession''
Refer to the current money in possession.

--''Number of Items Possessed''
Refer to the number of the specified item in the possession.

--''Cast Status''
--''Total Cast Status:(Deprecated)''
Refer to various statuses of the specified cast. The statuses that can be referenced are as follows
---''LV''
---''Current HP''
---''Current MP''
---''Maximum HP''
---''Maximum MP''
---''Current HP(%)''
---''Current MP(%)''
---''Attack Power''
---''Magical Power''
---''Defense Power''
---''Accuracy''
---''Evasion Rate''
---''Agility''
---''EXP''
---''State Changes''
---''Class Level''
---''Subclass Level''
---''nth in the Party''

--''Total Status of the nth in the Party:(Deprecated)''
You can refer to the entries without "nth in the Party" from the entries that can be referred to in "Cast Status".

--''Total Event Status (Cast Event):(Deprecated)''
If the specified event is a cast-based event, its status is referenced. The statuses that can be referenced are as follows:

---''Current HP''
---''Current MP''
---''Maximum HP''
---''Maximum MP''
---''Current HP(%)''
---''Current MP(%)''
---''Attack Power''
---''Magical Power''
---''Defense Power''
---''Accuracy''
---''Evasion Rate''
---''Agility''
---''EXP''
---''G''

--''Current Time''
---''Year''
---''Month''
---''Day''
---''Day of the Week''
---''Hour''
---''Minute''
---''Second''
Year, Month, Day, Day of the Week, Hour, Minute, Second

--''Play Time''
---''Hour''
---''Minute''
---''Second''
Hour, Minute, Second

--''Map X Size''

--''Map Z Size''
---''Operation Key''
 上・下・左・右・決定・キャンセル・ダッシュ・カメラ上回転・カメラ下回転・カメラ左回転・カメラ右回転・カメラズームイン・カメラズームアウト・カメラリセット
--''このイベントの座標情報''
 X座標・Y座標(高さ)・Z座標・向き・画面上のX座標・画面上のY座標・X回転・Y回転・Z回転
--''プレイヤーの座標情報''
 X座標・Y座標(高さ)・Z座標・向き・画面上のX座標・画面上のY座標・X回転・Y回転・Z回転
--''現在のパーティー人数''
--''マウス情報''
 マウスポインタX座標・マウスポインタY座標・左クリック・中央クリック・右クリック・ホイール回転

-''どうする''
--''代入する''
パラメータを代入します。
--''足す''
パラメータを加算します。
--''引く''
パラメータを減算します。
--''掛ける''
パラメータを乗算します。
--''割る''
パラメータを除算します。
--''割った余りを代入する''
パラメータを除算したあまりを代入します。
--''小数点以下を切り捨てて代入''
パラメータの小数点以下を切り捨てて代入します。
--''Map ID''
The map ID can be specified in the Map Editor > Map Settings palette > Basic tab.
The map ID for each map is also listed on the Map List palette.

**文字列変数への代入 [#mfec5fc1]
文字列変数に文字列を指定の方法で代入します。
--''Operation Key''
Up, Down, Left, Right, Decision, Cancel, Dash, Camera: Rotate Up, Camera: Rotate Down, Camera: Rotate Left, Camera: Rotate Right, Camera: Zoom In, Camera: Zoom Out, Camera: Reset, Up (Repeat), Down (Repeat), Left (Repeat), Right (Repeat), Menu, Jump, Action 1, Action 2, Action 3, Up (Analog), Down (Analog), Left (Analog), Right (Analog), Camera: Rotate Up (Analog), Camera: Rotate Down (Analog), Camera: Rotate Left (Analog), Camera: Rotate Right (Analog), Camera: Zoom In (Analog), Camera: Zoom Out (Analog)
#br
//(Analog), if the gamepad supports analog input, you can get the strength of the input as a decimal from 0 to 1. 
//If digital input is made with a device such as a keyboard or directional keypad, you will get a value of 0 or 1. 

-''文字列変数の番号''
使用する変数ボックスを設定します。
--- (Repeat) is a special input type that is 1 at the moment it is pressed and after 0.5 seconds of holding it down, and 0 otherwise.
It is best used for menus, etc.
--- (Analog), if the gamepad supports analog input, you can get the strength of the input as a decimal number between 0 and 1.
If digital input is made with a device such as a keyboard or directional keys, you will get a value of 0 or 1.
--- For other options, a value of "1" is obtained while the button is pressed, "2" at the moment it is pressed, and "-1" at the moment it is released.

-''文字列''
代入する文字列を設定します。
--''Camera Settings''
X Rotation, Y Rotation, Angle of View, Distance, X Coordinate, Y Coordinate (Elevation), Z Coordinate

-''文字列の代入方法''
--''上書き''
文字列を上書きして代入します。
--''先頭に追加''
文字列を先頭に追加します。
--''最後尾に追加''
文字列を最後尾に追加します。
--''Coordinate Information for This Event''
X Coordinate, Y Coordinate (Elevation), Z Coordinate, X Coordinate on the Screen, Y Coordinate on the Screen, X Rotation, Y Rotation (Orientation), Z Rotation, Orientation/4 Direction (U: 0, D: 1, L: 2, R: 3)

**文字列入力 [#sb107799]
文字列を入力するパネルを開きます。入力した文字列は、文字列変数に代入されます。
--''Coordinate Information for Player''
The same settings as "Coordinate Information for This Event" can be specified.

-''文字列変数の番号''
使用する変数ボックスを設定します。
--''Current Party Number''

-''入力画面に表示する文字''
入力画面に表示する文字をカスタマイズします。
--''Current Reserve Number''

-''入力可能な最大文字数''
0~65536の間で入力可能な最大文字数を設定します。
--''Mouse Information''
Mouse Pointer X Coordinate, Mouse Pointer Y Coordinate, Left Click, Right Click, Center Click, Wheel Rotation

-''ウィンドウ表示位置''
ウィンドウの表示位置を設定します。
--''Elapsed Time from Previous Frame''

**複雑な文字列変数の操作 [#b3836211]
文字列変数に指定のパラメータを指定の方法で代入します。
--''Player Operation Locked State (0=Unlocked)''

-''何に''
使用する変数ボックスを設定します。
--''nth Parameter in the Inventory:(Deprecated)''
The parameters that can be obtained are as follows:
---''Consumables Specified''
---''Weapons Specified''
---''Armors Specified''
---''Enhanceable''
---''Equipped Part Number''
---''Level''
---''Price''
---''Original Price''
---''Attack Range''
---''Original Attack Range''
---''Attribute Attack Power''
---''Original Attribute Attack Power''
---''Critical Rate''
---''Original Critical Rate''
---''Max Damage/Recovery Amount''
---''Original Max Damage/Recovery Amount''
---''HP Recovery Amount''
---''Original HP Recovery Amount''
---''HP Recovery Rate''
---''Original HP Recovery Rate''
---''MP Recovery Amount''
---''Original MP Recovery Amount''
---''MP Recovery Rate''
---''Original MP Recovery Rate''
---''Maximum HP''
---''Original Maximum HP''
---''Maximum MP''
---''Original Maximum MP''
---''Attack Power''
---''Original Attack Power''
---''Defense Power''
---''Original Defense Power''
---''Magical Power''
---''Original Magical Power''
---''Agility''
---''Original Agility''
---''Accuracy''
---''Original Accuracy''
---''Evasion Rate''
---''Original Evasion Rate''

-''何を''
使用する内容を設定します。
--''文字列変数の内容''
使用する変数ボックスを設定します。
--''現在のマップ名''
現在のマップ名を使用します。
--''キャストのステータス''
指定したキャストのキャストの名前・職業・副業・武器名・腕防具名・頭防具名・体防具名・装飾品名1・装飾品名2のいずれかを設定します。
-''どうする''
--''上書き''
文字列を上書きして代入します。
--''先頭に追加''
文字列を先頭に追加します。
--''最後尾に追加''
文字列を最後尾に追加します。
--''Parameter for Item (Item Event):(Deprecated)''
If this event is an item event, you can get a parameter of the item.
The parameters that can be obtained are the same as those in "nth Parameter in the Inventory".

**文字列の置き換え [#y55c5809]
指定した変数ボックス内の文字列変数Aを文字列Bに置き換えます。
-''Do what?''
|''Assign''|Assign the obtained value to the variable box.|
|''Addition''|Add the obtained value to the value of the variable box.|
|''Subtraction''|Subtract the obtained value from the value of the variable box.|
|''Multiplication''|Multiply the value of the variable box by the obtained value.|
|''Division''|Divide the value of the variable box by the obtained value.|
|''Assign Remainder of Division''|Divide the value of the variable box by the obtained value and assign the remainder.|
|''Assign with Decimals Rounded Down''|Assign the obtained value with the decimal point rounded down.|

**地形の情報を取得 [#n35206fa]
プレイヤーまたはイベントの現在位置か、変数ボックスで指定した座標の地形情報を取得します。

-''プレイヤーの現在位置で指定''
プレイヤーの現在位置の地形情報を取得します。
**Assign to String Variable [#qd711866]
Assign a string to a string variable in the specified manner.

-''イベントの現在位置で指定''
イベントの現在位置の地形情報を取得します。
#ref(Assign_to_String_Variable.png)
#br

-''変数ボックスで指定''
変数ボックス内の数値を座標として使用して、その座標の地形情報を取得します。
-''String Variable Number''
Specify the variable box to be used.

-''地形のリソース名''
地形で使用されているリソース名を文字列変数として取得します。
-''String''
Specify the string to be assigned.

-''地形の高さ''
地形の高さを変数ボックスに取得します。
-''String Assigning Methods''
--''Overwrite''
Overwrite and assign a string.
--''Add to Beginning''
Add the string to the beginning.
--''Add to End''
Add the string to the end.

**Input String Variable [#i1f7b5df]
Open a panel for entering strings. The string the player enter is assigned to a string variable.
The layout when using this event panel, including the size and position of the text input panel, can be created in the Layout Tool > Input String screen.

#ref(Input_String_Variable.png)
#br

-''String Variable Number''
Specify the variable box to be used.

-''Text to be Displayed on the Input Screen''
//Customize the text displayed on the input screen.
The letters to be displayed in the input panel can be specified.
Text input panels can be created by specifying the special format \inputstrings for a text panel in the Layout Tool > "Input String" screen.
Please refer to the "Help" tab for information on how to display the decision button, the tab switching button, etc.
Up to four tabs can be set.
This allows you to use tab 1 in lowercase, tab 2 in uppercase, and so on.

-''Max Number of Letters to be Entered''
Specify the maximum number of letters that can be entered between 0 and 65536.

-''Window Display Position''
//Specify the window display position.
You can specify the position of the Input String Window.
The position is determined according to the "special coordinate specification tag" specified in the container's properties in the Layout Tool > Input String screen.
Please refer to the default layout on the same screen.

-''Use Physical Keyboard''
Allows direct input of strings from the keyboard during event execution.
When this function is turned on, it is no longer necessary to use the text panel with the special format \inputstrings in the Layout Tool > "Input String" screen.

**Advanced String Variable Operation [#u7283f16]
Assign a specified parameter to a string variable in a specified manner.

#ref(Advanced_String_Variable_Operation.png)
#br

-''To what?''
Specify the variable box to be used.

-''What?''
Specify the content to be used.
--''String Variable Box''
Specify the variable box to be used.

--''Current Map Name''
Use the current map name.

--''Cast Status''
Specify the following for the specified cast member: cast name, class, subclass, weapon name, arm armor name, headgear name, body armor name, accessory name 1, accessory name 2.

--''nth Status in the Party''
The same settings as in "Cast Status" can be specified.

--''This Event's Name''
The name of the event itself can be obtained.

--''Name of Shooting Source''
The name of the event from which this event was generated can be obtained.

--''nth Parameter in the Inventory''
The parameters that can be obtained are as follows:
---''Name''
---''Attack Attribute''
---''Parts''

--''Parameter for Item (Item Event)''
If this event is an item-based event (specified in Database > Items), you can retrieve a parameter for the item.
The parameters that can be obtained are the same as those in "nth Parameter in the Inventory".

--''Name of the Last Item Obtained''

-''Do what?''
--''Overwrite''
Overwrite and assign a string.

--''Add to Beginning''
Add the string to the beginning.

--''Add to End''
Add the string to the end.

**String Replacement [#ide9f511]
Replaces string variable A in the specified variable box with string B.

#ref(String_Replacement.png)
#br

**Obtain Terrain Information [#p89c594a]
Obtain terrain information for the current position of the player or event or for the coordinates specified in the variable box.

#ref(Obtain _Terrain_Information.png)
#br

-''Specify by Player's Current Position''
Obtain terrain information for the player's current location.

-''Specify by Event's Current Position''
Obtain terrain information for the current location of the event.

-''Specify with Variable Boxes''
Use the value in the variable box as the coordinate to get the terrain information for that coordinate.

-''Terrain Resource Name''
Obtain the name of the resource used in the terrain as a string variable.

-''Terrain Elevation''
Obtain the elevation of the terrain in the variable box.

**Obtain Cast Status [#of6ea6d0]
Please read the [[Statuses > Obtain Cast Status:https://rpgbakin.com/pukiwiki_en/?Statuses#o45931f7]] section for more information.

**Obtain Item Parameter [#i0ba78a2]
Please read the [[Statuses > Obtain Item Parameter:https://rpgbakin.com/pukiwiki_en/?Statuses#m5875706]] section for more information.


Front page   New Page list Search Recent changes   Help   RSS of recent changes