Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Linked Variables
- Original author: Shaz
- Original date: November 11, 2015
- Source thread: https://forums.rpgmakerweb.com/threads/linked-variables.50134/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)
Summary
Linked Variables 2015.11.11 by Shaz Introduction
Archived First Post
Linked Variables
2015.11.11
by Shaz
Introduction
This plugin allows you to link variables to commands, so the command is evaluated and returned as the value of the variable. This allows you to use a variable in a conditional branch rather than a script call, or perhaps a series of commands to obtain a value and then check if it meets the condition (for example, "what is the region code of the tile where the player is standing?", which would take 3 event commands plus the conditional branch).
How to use
Add to your plugins folder (file name is not important, but I use LinkedVariables.js). There are no parameters to set.
You can either modify the script to add all the commands you want to link to variables, or you can set them up via plugin commands. Plugin commands remove the need to edit scripts, but mean the commands will be saved in each save file, and therefore could be manipulated by the player.
To set up links via the script, locate this section and add your commands in the appropriate format (the example below results in the party leader's HP being available through variable 1) - the example is commented out, but obviously you would not have comments on your lines:
To set up links via a plugin command, enter the plugin command in the appropriate format:
Plugin
Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Notes
- this may not be reliable when used as a condition on an event page, as the conditions are only checked when a map refresh is requested. Only some actions that happen in a game cause this kind of refresh.
Feel free to post the kind of information you want to link to a variable below, and whether you'd like to link it in the script or via a plugin command, and I (and others) will tell you the appropriate command to use.
2015.11.11
by Shaz
Introduction
This plugin allows you to link variables to commands, so the command is evaluated and returned as the value of the variable. This allows you to use a variable in a conditional branch rather than a script call, or perhaps a series of commands to obtain a value and then check if it meets the condition (for example, "what is the region code of the tile where the player is standing?", which would take 3 event commands plus the conditional branch).
How to use
Add to your plugins folder (file name is not important, but I use LinkedVariables.js). There are no parameters to set.
You can either modify the script to add all the commands you want to link to variables, or you can set them up via plugin commands. Plugin commands remove the need to edit scripts, but mean the commands will be saved in each save file, and therefore could be manipulated by the player.
To set up links via the script, locate this section and add your commands in the appropriate format (the example below results in the party leader's HP being available through variable 1) - the example is commented out, but obviously you would not have comments on your lines:
Code:
//===========================================================================
// Add variable commands here to build with the game rather than in save file
// eg:
// variableLinks[1] = '$gameParty.leader().hp'
//===========================================================================
Code:
LinkVariable 1 $gameParty.leader().hp
Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Notes
- this may not be reliable when used as a condition on an event page, as the conditions are only checked when a map refresh is requested. Only some actions that happen in a game cause this kind of refresh.
Feel free to post the kind of information you want to link to a variable below, and whether you'd like to link it in the script or via a plugin command, and I (and others) will tell you the appropriate command to use.
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
Credit - Shaz Terms - free for use in commercial games
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...