#author("2024-02-28T19:36:00+09:00","default:admin","admin")
#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 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 9999999 can be entered.

--''Random Number''
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''

//--''nth in the Party''
//The same settings as in "Cast Status" can be specified.
--''nth Status 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".

--''Event Status (For Cast-based Event)''
//If the event is a cast-based event, it references the status of the event. The statuses that can be referenced are as follows:
--''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

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

--''Map X Size''

--''Map Z Size''

--''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.

--''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)

--''Coordinate Information for Player''
The same settings as "Coordinate Information for This Event" can be specified.

--''Current Party Number''

--''Current Reserve Number''

--''Mouse Information''
Mouse Pointer X Coordinate, Mouse Pointer Y Coordinate, Left Click, Right Click, Center Click, Wheel Rotation

--''Elapsed Time from Previous Frame''

--''Player Operation Locked State (0=Unlocked)''

--''nth Parameter in the Inventory''
--''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''

--''Parameter for Item (for Item-base Only)''
If this event is an item-based event, you can get a parameter of the item.
--''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".

-''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.|


**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 (for Item-base Only)''
--''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   Edit Diff History Attach Copy Rename Reload   New Page list Search Recent changes   Help   RSS of recent changes