Jump to content
Tsukihime

Scene Interpreter

Recommended Posts

This script allows you to execute common events in the current scene. For example, by default, if you use an item that executes a common event from the item menu, the menu will close and you will be taken to the map scene where the event will be executed.

 

With the scene interpreter, you can execute the common events right in the menu scene.

 

Furthermore, the scene interpreter allows you to create all sorts of complex behaviour such as switching between scenes or executing custom logic without having to do any scripting yourself. Previously, any of these mechanics would need to be scripted. Now, all you need is a common event to handle all of it.

 

scene_Interpreter1.jpg

  

Download

 

Get it at Hime Works!

Edited by Tsukihime

Share this post


Link to post
Share on other sites

That's cause the only scenes where you would actually call common events is the skill scene and the item scene lol

Of course if you are using scripts that activate common events in other places this script would make it easier to do as well.

Share this post


Link to post
Share on other sites

when i use this script. there's something wrong happened.

i create a common event:

show message "abc"

move route jump

show message "123"

 

then in script i use

$game_temp.reserve_common_event(id)

SceneManager.return

 

then i goes to scene map. and it only show message "abc". ignoring other two event command. (it got stop on move route)

when i'm not using this script it works okay.

 

second thing....

since you add interpreter in the scene base. i try using

@interpreter.dosomemethod

but it give me fiber error. :D.

is there a way to call method i define in Game_Interpreter?

Share this post


Link to post
Share on other sites

It is the interpreter updating that is causing the problem.

I have not isolated the issue, but my current theory is that it simply reads all of the commands before it changes to the map scene.

 

The reason why the text shows up is because the show text command queues up some text in the message object, and that gets shown cause it's still around until you show them.

 

I am not sure about your second issue. What are you trying to do, and why are you trying to call interpreter methods directly? That sounds questionable.

Share this post


Link to post
Share on other sites

Is there a simple edit to exclude this from affecting common events in battle? I use an ATB system, and for some reason, this script ignores Wait functions when common events are run so the battle keeps progressing, e.g. the enemies keep attacking in between common event animations and dialogues with wait. Outside of the battle, everything is fine.

Share this post


Link to post
Share on other sites

the error occur when i want to call method inside class Game_Interpreter

 

class Game_Interpreter
   def call_common_event(id)
      @params[0] = id
      command_117
   end
end

when using event command - script call. it works fine :D.

but how to use that method inside another script.

Share this post


Link to post
Share on other sites

I don't know but I can't even get your thing to run because @params is nil. I am not testing it with this script included, but that shouldn't matter. You should create a separate thread because this is not related to the script.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

nevermind got it work.

using:

@interpreter.setup($data_common_events[id].list)

 

using that. most common event command works in my created scene.

the not working command:

PAGE 1 - scrolling message not working.

PAGE 2 - Character TAB, Movement TAB - ALL not working

 

and any event command that change the scene executed but end the common event (but it's alright)

thanks for this script hime :D.

Share this post


Link to post
Share on other sites

Ok, I have a question.

I want to make an item that when used from item menu would show a picture, then return to the item menu.

So I make a common event like this:

 

nfL3yic.png

 

And make an item that calls it.

And apparently it runs as intended except the picture is not visible. I understand it's being shown BELOW the item menu or something?

So I need to either find a way to show the picture ABOVE the item menu or temporarily hide the item menu while the picture is shown, and I don't have any idea how to achieve either.

Any help?

Share this post


Link to post
Share on other sites

Ok, I have a question.

I want to make an item that when used from item menu would show a picture, then return to the item menu.

So I make a common event like this:

 

nfL3yic.png

 

And make an item that calls it.

And apparently it runs as intended except the picture is not visible. I understand it's being shown BELOW the item menu or something?

So I need to either find a way to show the picture ABOVE the item menu or temporarily hide the item menu while the picture is shown, and I don't have any idea how to achieve either.

Any help?

This script does not support pictures or other screen effects.

An add-on is in development.

Share this post


Link to post
Share on other sites

This is a must have script for a lot of reasons, especially for ABS. Took me a while to realize how useful this is. This will prevent events from colliding if the player decides to use an item that runs a common event during, say, a boss fight in an ABS, or a parallel process cutscene.

 

Excellent!!

Share this post


Link to post
Share on other sites

For command windows, I do not have a general solution due to the way window selection works in general.

 

Patches may need to be made as needed.

 

I've added a patch for yanfly's menu engine to the download list on the blog.

Share this post


Link to post
Share on other sites

I've discovered a strange issue.

 

If a common event that does NOT have <run scene: current> is called from the use of an item (therefore returning to the map scene), and that common event contains a wait command, the event will stop processing at the wait and no further commands will be executed. This seems to also include anything with "wait for completion" checked.

Edited by AeghtyAteKees

Share this post


Link to post
Share on other sites

I think i found a bug too. When you call an event that changes a stat (say, remove 1 HP), it doesn't refresh properly, it's always 1 step back (and when you leave the menu and open again, it's properly displayed now).

 

Here's a demo: http://puu.sh/kVKlS/6791692c00.rar

Use the potion (it adds +1 max HP without script and remove 1 HP with script call).

 

 

 

 

(and AeghtyAteKees, i don't think there was an issue with that).

Edited by Fynmorph

Share this post


Link to post
Share on other sites

When showing a choice window within the item scene, the cursor controls both the choice window and the item list, which looks weird and is rather annoying. When selecting the choice in the choice window, the selected item back in the item list is not selected/activated (as is desired), so it's not as if the cursor is actually controlling both windows, correct?

 

EDIT: I apologize; I just now saw the comment at the top of this page saying command windows are buggy. Is there maybe a way to pause the item scene completely or deactivate the item list window while I'm working with the common event? Would that also freeze the common event?

Edited by AeghtyAteKees

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×