Author Topic: [XP] Timed Choices  (Read 2912 times)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2988
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
[XP] Timed Choices
« on: June 02, 2013, 03:27:29 AM »
Timed Choices
Authors: KK20
Version: 1.01
Type: Message Add-on
Key Term: Message Add-on

Introduction

You know the 'Show Choices' command that you can put in your events? Ever wanted to make it where the user is timed to make a decision? Look no further! This relatively small and simple script will do just that for you.

Features

  • 'Show Choices' can be timed for the player
  • Makes a nice little window to display the time remaining
  • Want to request some features? Post them here!

Screenshots

(click to show/hide)

Demo

None.

Script

(click to show/hide)

Instructions

Explained all in the script. Main script call is
Code: [Select]
$game_system.choices_timer = frames
Compatibility

- Fix for Ccoa's UMS v1.80 has been made as of v1.01
Might be incompatible with message systems (e.g. Ccoa, Hermes). This script should always be placed under those scripts. I aliased three methods in Window_Message so it should work most of the time. If you're not using any fancy messaging scripts, this should fit like a glove.

Credits and Thanks

  • KK20 - For realizing that he couldn't find a similar script to this despite having seen one before and getting off his lazy ass to write one himself

Author's Notes

Think a certain feature would be nice? Post away!
(click to show/hide)
« Last Edit: June 03, 2013, 10:16:33 PM by KK20 »



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline exile360

  • Awakened Visionist
  • **
  • Posts: 84
  • LV: 3
    • View Profile
Re: [XP] Timed Choices
« Reply #1 on: June 02, 2013, 01:49:57 PM »
Simple but cool idea! And if you implement the stuff you have planned, I can already see this being used for hacking minigames and such. Good work. :)

Offline Terv

  • Awakened Visionist
  • **
  • Posts: 83
  • LV: 14
    • View Profile
Re: [XP] Timed Choices
« Reply #2 on: June 02, 2013, 06:14:22 PM »
I was planning to script it myself but yours looks just decent, thanks :haha:

Feature request: display a bar instead of 4 digit timer so the player knows the time remaining out from the corner of his eye and without having to stop reading the choices.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2988
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Timed Choices
« Reply #3 on: June 03, 2013, 12:22:46 AM »
Thanks for the input!

Yeah, I had that idea of using a bar to represent the time. That kinda fell under 'Give the timer window more configurations' bit.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Terv

  • Awakened Visionist
  • **
  • Posts: 83
  • LV: 14
    • View Profile
Re: [XP] Timed Choices
« Reply #4 on: June 03, 2013, 07:45:03 PM »
Two last things; the script call in the instructions of the start post is incorrect. Your script is compatible with latest ccoa's UMS (v1.80), however not entirely:

(click to show/hide)
(click to show/hide)

Here's the project in case you're interested in fixing this: UMS180_TimedChoices.zip
« Last Edit: June 03, 2013, 07:47:32 PM by Terv »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2988
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Timed Choices
« Reply #5 on: June 03, 2013, 09:13:01 PM »
I think I see what the problem is, but I'll need to play with it a bit. Throwing the script call in between the Show Message and Show Choices disrupts the UMS. Basically, I have to make it so that when the choices window pops up, the timer does as well.

EDIT: Updated to v1.01. Fixed a couple other things in there as well. If you aren't using a custom message system, you won't notice the changes I made so you should still be good with v1.00.

If using Ccoa UMS, put the script call above the Show Message preceding Show Choices.
« Last Edit: June 03, 2013, 10:21:05 PM by KK20 »



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Terv

  • Awakened Visionist
  • **
  • Posts: 83
  • LV: 14
    • View Profile
Re: [XP] Timed Choices
« Reply #6 on: June 03, 2013, 11:40:22 PM »
Epic, thanks a bunch! I'm sure I'm not the only one profiting from UMS compatibility.

How about an optional parameter that determines what happens if time runs out? Currently the hovered choice is selected, but what about respecting the "When Cancel" setting? So you can do something special if the player is too slow.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2988
  • LV: 369
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Timed Choices
« Reply #7 on: June 03, 2013, 11:59:02 PM »
It's already in the plans. ;)

The way of how to go about it is still in the works. I'm not sure if doing a "Branch" for "When Cancel" and then making a script call that prevents the user from being able to cancel is the best way yet. Or if I just make a variable (say $game_temp.choice_timed_out) and then the user makes a Conditional Branch to see if that is set to true.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server