Save-Point
Event Comment Conditionals - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+--- Thread: Event Comment Conditionals (/thread-5548.html)



Event Comment Conditionals - ixfuru - 08-04-2015

Event Comment Conditionals
Version: 1.0

Introduction
This script creates new conditions for event pages.  In other words, you can have pages that change based on things like gold amount, weapon equipped, even actor parameters.

Features
  • use event comments to create new page conditions
  • conditions based on party gold amount
  • conditions based on party member having weapon or armor equipped
  • conditions based on having member of a specific class in party
  • conditions based on a number of a specific item
  • conditions based on a member being in a given state
  • conditions based on Ixfuru's Time script hours

Screenshots
[Image: UCp2Btd.png]

Script
"script"

Instructions
Plenty of instructions inside the script!   But basically, you have to use an event's 'Comment' option on a new page and then use one of the following tags inside the comment in order to set the page's condition:
(Make sure you include the '<>' arrows in the comment tag!)

Tags
Code:
<cc_wpn weapon_id>
replace the 'weapon_id' with the ID of the weapon someone in the party requires

Code:
<cc_arm armor_id>
replace the 'armor_id' with the ID of the armor someone in the party requires

Code:
<cc_stt state_id>
replace the 'state_id' with the ID of the state someone in the party must be under

Code:
<cc_par par_id, par_amount>
In this tag, it will only check the leader of the party!
Simply, replace the 'par_id' with one of the following values to determine which parameter you want to base the condition from:

0 : ATK
1 : DEF
2 : MAT
3 : MDF
4 : AGI
5 : LUK
6 : MHP
7 : MMP
8 : EXP

Then, replace 'par_amount' with the value the given parameter should be equal to or above in order to activate the condition.

Code:
<cc_g gold_amount>
replace the 'gold_amount' with the amount of gold the party should have in order to activate the page

Code:
<cc_in item_id, item_number>
replace the 'item_id' with the ID of the item the party must have; replace the 'item_number' with the amount of the given item the party should have

Code:
<cc_cid class_id>
replace the 'class_id' with the ID of the class that a party member must be

The following two only work with Ixfuru's Time System!
[code<cc_hr before_after, hour>
Here, you can set the 'before_after' with either a one or a zero.  One signifies that the hour must be after the 'hour' value.  While zero signifies that the hour must be fore the 'hour' value.
Replace the 'hour' with the hour it must be before or after.

Code:
<cc_sch lo_hour, hi_hour>
In this tag, you are able to activate an event's page based on whether or not the hour of the $time system is between the
value you place at 'lo_hour' and the value you place at 'hi_hour'.

Compatibility
This script only aliases one method, so it should be compatible with just about anything.  If you find something that it doesn't work with, let me know.

Author's Notes
This is another one of those, 'I needed it, so I scripted it' script.  I set out to just script a comment conditional based on my time system for a project I was making, but ended up adding a bunch of stuff to it just for fun.

Terms and Conditions
You must credit me if you use this script even if it is modified by you or someone else.
In non-commercial games, it's free to use.  For commercial projects, I would just like a free copy and the credit!
Don't claim this is your script because it isn't!
And lastly, if you want to post the script on another site, you must have my permission first.


RE: Event Comment Conditionals - kyonides - 08-05-2015

I think there are "new" conditions that are quite old indeed unless they disappear in VX Ace like the ones for gold or equipped weapon or armor or the actor being affected by a specific state.


RE: Event Comment Conditionals - ixfuru - 08-05-2015

Well, I'm not exactly sure what you mean, Fox. In VX Ace, (and VX for that matter), as you can see in the screenshot, there are no page conditions for these things. Only for switches, variables, self-switches, actor in party and item in inventory. You can create a 'conditional branch' with some of this stuff, or a combination of variable set for item number and such. But it will not activate the page on its own. That's what this script does. I should probably add to it one day and add more conditions.

I was just digging around in the RM-friendly scripts I wrote to see which ones I could share with the community and came across this one. The truth is, I haven't worked on a true Rpg in quite some time. I was just going through the scripts I've written and wanted to share some from Ace, (even though most of what I do is in VX). Most of the time, I just script game-specific stuff. :) When I do that, the scripts I write are of little use to most folks because they run off each other and often bypass the RM default scripts completely.

Anyway, I appreciate you checking out the script.


RE: Event Comment Conditionals - JayRay - 08-05-2015

Very nice! I like the idea.

I think what kyonides was saying was that was that a page could be a parallel event that has a conditional branch that would activate the steps in the event if certain conditions were met, and otherwise be a 'lifeless event'

All in all though, I like the idea of not being able to action event an event unless STR is above X amount... Can't move a boulder if you've got the upperbody strength of a 4th grade P.E. dropout.