Party Approval (MV/MZ)
Party Approval 1.5ATT_Turan
Introduction
I've always enjoyed how the approval system in BioWare and similar RPGs felt immersive, like the party members were real people reacting to my choices and actions. So this has been sitting around in my head for a while and I finally just dove into it.
I have tested the basic functionality, please let me know if you encounter any errors. I will consider making compatibility patches if the other plugin is free to use (or one I own, such as a Yanfly product) and unobfuscated. Otherwise, other authors are free to modify this code to make it compatible with theirs so long as I am still credited.
Spoiler: FeaturesThis plugin provides the basis for an approval system between the protagonist and any actors in the game. Each actor has an approval which starts at 0 and can be modified positively or negatively at any time.
Changing approval also causes an accompanying window to pop up, notifying the player of incurring that actor's good (or poor) graces. This window does not interfere with other on-screen functionality.
Spoiler: Screenshots
https://forums.rpgmakerweb.com/attachments/approval2-gif.277058/
Spoiler: How to UseAll of this plugin's functionality is via plugin commands and script calls.
Spoiler: Plugin CommandsActorApproval <actor> <amount>
ActorApproval <actor ID> <amount>
This modifies the indicated actor's approval by the specified amount and produces a notification using the approval (if amount is positive) or disapproval (if negative) plugin parameters below.
If the actor's name is used, the spelling must match the database entry, and it will use the first actor to match.
Examples:
ActorApproval Therese 5
ActorApproval 2 -3
GetApproval <variable ID> <actor>
GetApproval <variable ID> <actor ID>
This stores an actor's current approval value into the specified game variable. It can be used with either the actor's ID or name, see above for caveats on using the name.
Spoiler: Script CallsTUR.ActorApproval()
This functions as the plugin command above, but can be called from places which only accept script (such as eval notetags).
Note that if using an actor's name, it must be enclosed in quotations.
Examples:
TUR.ActorApproval(["Therese", 5]);
TUR.ActorApproval();
TUR.AdjustApproval(actorId, amount)
This functions as above, but does not produce a notification. This allows you to adjust approval silently if necessary. Note that the actor's name can not be used as an argument here.
$gameSystem.approvals[]
This system array stores actor's approval values. You can access it direcly by providing the actor's ID as the index to set, modify, or retrieve their approval. This circumvents the Approval Eval notetag above.
Note that approval values are undefined until modified by any of the above functions or plugin commands.
Spoiler: NotetagsActor notetag
Code:
<Approval Eval>
code
</Approval Eval>
JavaScript code in this notetag will be executed any time the actor's approval is modified by a plugin command or script call. This might be used to interface with other relationship systems, activate face cutins, etc.
Provided variables:
user - the current actor
value - the amount approval is being modified by
approval - the actor's current approval
Actor notetag
Code:
<ApprovalColor1: color code>
<ApprovalColor2: color code>
<DisapprovalColor1: color code>
<DisapprovalColor2: color code>
These tags can be used to override the default colors for the approval notifications as defined in the plugin parameters. All tags can be used independently - any colors not defined on the actor will use the default values.
Example: Code:
<ApprovalColor2: rgba(0, 0, 0, 0.8)>
Terms and Credits
Free for non-commercial and commercial use. Credit ATT_Turan.
本贴来自国际rpgmaker官方论坛作者:ATT_Turan处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/party-approval-mv-mz.161300/
页:
[1]