Author Topic: [XP] Event Templates  (Read 4251 times)

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
[XP] Event Templates
« on: December 29, 2012, 11:22:45 PM »
Template Events
Authors: ThallionDarkshine
Version: 1.0
Type: Misc Add-on
Key Term: Misc Add-on

Introduction

You ever want to create lots of one event dynamically during the game? Well, this script allows you to create template events, which allow you to create many identical events, and all from one event.

Features

  • Easily create template events in the editor.
  • Create as many template events as you want.
  • Create events from templates at any position on the map.

Screenshots

They wouldn't really show much, just an event sitting on a map.

Demo

It's pretty easy to use, but I'll put up a demo if requested.

Script

(click to show/hide)

Instructions

In the script.

Compatibility

I don't think there will be any compatibility issues.

Credits and Thanks

  • ThallionDarkshine

Author's Notes

None
« Last Edit: December 01, 2014, 03:36:59 PM by ThallionDarkshine »

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Templates
« Reply #1 on: December 30, 2012, 02:02:57 AM »
Well butter mah biscuits. It's as if you read my mind. This is the exact kind of script I need to make my tree system :). Definitely going to use and credit. LEVEL++

Also thanks to you, I can now make my game ABS independent seeing as how I won't need an even generator from BABS or Mr.Mo's. I find it useful that they include this in the abs, but I think it's kinda dumb for me to install an abs to a game that has no fighting in it :P
« Last Edit: December 30, 2012, 02:04:42 AM by Zexion »

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Event Templates
« Reply #2 on: December 30, 2012, 02:09:57 AM »
How did you know my secret talent? 8-O
You're thinking of... Nothing. And yeah, having an abs simply for the purpose of event creation is pretty pointless. Glad to be of help!

Offline LiTTleDRAgo

  • Astral Trancist
  • *****
  • Posts: 841
  • LV: 514
  • Gender: Male
    • View Profile
    • ~
Re: [XP] Event Templates
« Reply #3 on: December 30, 2012, 03:38:09 AM »
level up   :)
btw is the event created by this script saved in save game?

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Event Templates
« Reply #4 on: December 30, 2012, 04:49:55 AM »
Yes, it's stored in Game_Map, which is Marshal.dumped in the save data.

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Templates
« Reply #5 on: December 30, 2012, 10:38:57 PM »
I haven't gotten a chance to try this out, so I was wondering... Say I generate the event on the map. Then that event triggers itself to change into another event. If I was to leave the map and come back would it restart the event, or would it just be like any other event?

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Event Templates
« Reply #6 on: December 30, 2012, 11:15:05 PM »
Right now, generated events do not stay on after you have left the map. However, that is the next feature that I will add to the script.

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Templates
« Reply #7 on: December 31, 2012, 03:32:46 AM »
Dang. Well I will be awaiting this update. Hope you end up doing it lol if not I am screwed-ish, but luckily I can put off the trees and flowers till the very end :D.

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Event Templates
« Reply #8 on: December 31, 2012, 05:19:48 AM »
Don't worry, I will do it. Probably expect an update tomorrow, maybe the day after that at latest.

Edit - And tomorrow turns into a month from now. Update to v1.0. Now you can choose whether to save the event when you create it.
« Last Edit: February 12, 2013, 03:11:05 PM by ThallionDarkshine »

Offline Zexion

  • Addicted to LoL
  • Chaos User
  • ******
  • Posts: 1511
  • LV: 69
  • Gender: Male
  • My anaconda don't...jk it does
    • View Profile
Re: [XP] Event Templates
« Reply #9 on: February 12, 2013, 08:40:08 PM »
:O you made me want to buy an sd card reader so i can install my rmxp again lol

Offline cessern

  • Total Beginner
  • Posts: 9
  • LV: 0
    • View Profile
Re: [XP] Event Templates
« Reply #10 on: December 01, 2014, 12:19:16 PM »
This didn't work for me. I've tried in both RPG maker XP 1.2 and 1.5, Under and above "Main".
Name of the event is: "<template>EV001". Script to call template is: "create_event_from_template(EV001,1,1)" Both times tested in a new project.
Under "Main" the error: "uninitialized constant Interpreter::EV001" When I use the script
Above "Main" the error: "undefined method 'event' for #<Game_Event:0x29335a0>" When I press "New Game"
This would be the perfect script for what I'm making now. Please help me.

Requesting a demo  :(
« Last Edit: December 01, 2014, 12:21:03 PM by cessern »

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Event Templates
« Reply #11 on: December 01, 2014, 01:36:05 PM »
You need to enclose the name of the event in quotation marks so the interpreter knows that it is a string rather than searching for a constant with that name. So you would call it like so:
Code: (rgss) [Select]
create_event_from_template("EV001",1,1)
Edit - Oh, and it should go above main.
« Last Edit: December 01, 2014, 01:37:53 PM by ThallionDarkshine »

Offline cessern

  • Total Beginner
  • Posts: 9
  • LV: 0
    • View Profile
Re: [XP] Event Templates
« Reply #12 on: December 01, 2014, 01:51:50 PM »
Ah sorry. My mistake.

I tried the script after adding " " around the name, and it still doesn't work. (Also put it above main)
The Error: "undefined method 'event' for #<Game_Event:0x29335a0>" comes up whenever I press new game.
I added this script to a whole new/clean project. Does this script need another script to work?
It says in the script that the template event will be automatically removed from the map when created, but nothing unordinary happens when I create those events. If you can't find my problem, then please create a demo. I've a much easier time finding errors with demos

Offline ThallionDarkshine

  • Ethereal Devastator
  • ****
  • Posts: 268
  • LV: 55
  • Gender: Male
    • View Profile
Re: [XP] Event Templates
« Reply #13 on: December 01, 2014, 03:37:57 PM »
Oops, I'm really sorry about that. I fixed the script, and if you have any more trouble with it I will upload a demo (I'm at school on a chrome book right now so i can't atm).

Offline cessern

  • Total Beginner
  • Posts: 9
  • LV: 0
    • View Profile
Re: [XP] Event Templates
« Reply #14 on: December 01, 2014, 03:50:42 PM »
No more trouble, the script works now. Thanks  :)