dhakti
RPG Maker-in-Training
Posts: 14
|
Post by dhakti on Nov 24, 2008 14:45:24 GMT -5
I couldn't find useful information on page conditions scripts on the search, and the start file is none too detailed, so how does one go about using these?
And while on a similar topic what can be done with start conditions as a page condition? Can you delay an events beginning until certain conditions are met with this?
thanks
|
|
|
Post by Dungeon Warden on Nov 24, 2008 22:36:26 GMT -5
Basically, you can create a script and connect it to the event so that certain complex conditions need to be met before the page activates. Page conditions allow for several conditions to be controlled for, but for complex things that require math or so other kind of special condition, a script is needed.
The script will likely need to be a system event in order to work. I can't remember and don't have time to check. It's easy enough to see what the slot asks for input.
The start conditions is a special condition that checks when the player tries to activate the event to see if they can. Therefore, if an event is activated by the Talk command, the script will check if the party can talk to the event.
For example, I believe that the boat has a start condition that prevents you from using the boat if you're not on a dock. This still allows the player to interact with the boat, but an error message will appear preventing you from using it.
A more useful example would be a case where everyone in town is frozen in time. Until you save the town, you can't talk to anyone. Once the town is saved, the condition will be met and you can talk to everyone. This allows you to use the same start condition for everyone in town and allows the towns people to act normally (possibly with several event pages) once time begins again.
It's rare that you'll ever use this but it's there if you need it.
|
|
dhakti
RPG Maker-in-Training
Posts: 14
|
Post by dhakti on Nov 29, 2008 17:17:34 GMT -5
Thanks. While playing around with var71 i was thinking of ways to use it beyond npc progressive conversations, library books and individual event flags and i was trying to make a strategy mini game where the player loads an event (var71) with a value and then sets it against a similar AI and then a motion script, battle fx, a math calculation to see who wins, resolution and reset. event var71, while it can be different for every event, seems to read off the current event to satisfy all page turns of all events on the map with that set as a page condition. Is there some way around this? And would the above scenario be a good place for a start condition script, (ready, set, go!)?
|
|
|
Post by Dungeon Warden on Nov 30, 2008 21:51:09 GMT -5
You can use Event : Event control : Change to switch to a different event and use that event's number.
I'm not really sure what you mean in your example. It sounds like it could all be done in a script. Conditions are mainly for changing the event itself to something different. For example, an event can be an object, a vehicle, or nothing at all. A start condition would be helpful, for example, in the case when the event could be a vehicle or something else but it requires a special condition for the player to use the event as a vehicle.
If you're doing something with variables based on the player's actions, you can do it all within a script.
|
|
dhakti
RPG Maker-in-Training
Posts: 14
|
Post by dhakti on Dec 3, 2008 13:21:53 GMT -5
thanks sorry for the clarity issues. I forgot that i was trying to make reuseable scripts, (maximal utility, minimum memory), and was basically trying to do every aspect of my game under that premise without really considering i was doing it that way. My plans within plans got in the way of my other plans. I was going to ask next "how does the game know which event i want moved?" when i realized that normally people create multiple events to accomplish their goals instead of some complicated scheme to save an event memory cost. Anyway... I was trying to refer to the fact that in an event, if one uses as a page condition that var71 > x, when ever that x is reached on any event with a var71 > x marker, all duplicate events with that condition, on that map, also get their page turned. I was wondering if it was something simple that could be done to limit the application of the page condition check to only the targeted event so that duplicate copies of the event don't get their page flipped.
Anyway i made this little set of scripts to make conversations and it seems like it would work great for treasure chests without using a flag (as long as it doesn't matter that they reset on leaving the map.)
common ev71+1 event info load data variable var 71 = var 71 + 1 event info save
Talk script event info load SB: sort variable var 71 Apply if number is 0 text "blah blah blah" or random treasure script call call [common ev71+1] event info save (It just seemed towork better if i did this again) SB to end...
I just reuses the reuseable variable 71 instead of flags. It worked so nicely i started to get carried away trying to figure out new uses and options. hope someone else finds it useful too.
Thanks
|
|
|
Post by Dungeon Warden on Dec 3, 2008 19:48:32 GMT -5
This only works if there is only one chest in an area. What if you wanted several chests in an area? Worst then that, a player could spend hours opening the same chest over and over again, building up their money and inventory.
One idea I had was to make 10 chests (flags 271-280) and have the contents change based on which dungeon the player is in. If you need more then ten chests in an area, you could raise this number but the important thing is that you would have more control on the contents of each chest this way.
Note that all the commands in the default chest script that check if the party members have room to take the item could all be put in one script and called whenever a chest is open. In fact, this script could be called any time the party gets anything. Just return a variable containing a reference number to the party member or the bag so that the chest script can give that member or the bag the item.
|
|
dhakti
RPG Maker-in-Training
Posts: 14
|
Post by dhakti on Dec 4, 2008 16:55:19 GMT -5
I haven't tried the above script on treasure chests but npc remember their individual v71 number until you leave the map. in my above script i have 'apply if 2, display text, call commonv71+1 SB to end, and then a no application that just says "..." after the third interaction with an npc they say "..." but other npc's calling on the same script, talk as though it was the first, or second, or third time depending on how many times you interact.
I figured it would work on treasures you cannot get back to or are of small value (random chests) basically an; apply if 2, "this is empty", temporary removal (maybe duplicate an opened null treasure chest first to make it look nice).
BTW i got the seed of the idea from your advanced FAQ DW. Thanks for the 'check if space' reminder, i forgot about that bit.
|
|
|
Post by Dungeon Warden on Dec 5, 2008 21:32:43 GMT -5
Yes, if it's something the party can't get to or a low value item (maybe an endless chest of healing portions in the first dungeon so if the player is having a hard time they can go back and get a potion anytime they use one).
Other once per area events could also use this.
Note, you could still use this idea with several variables, so you can have more then one event of this kind.
You're welcome about the "check for space" reminder. I notice that people who try to save space by making scripts shorter tend to leave this out, but you can just write the script once and call it every time the party gets something.
|
|