Event Notetags

Beregon

Veteran
Veteran
Joined
Aug 25, 2020
Messages
97
Reaction score
60
First Language
Czech
Primarily Uses
RMMZ
Is it possible for a script to read something written in the Note field of an event? Say, for use in Conditional Branches. I know that it's possible to do so with the Database objects like Actors and Skills, but Events on map don't seem to have the Meta property.
 

Jennavieve

Veteran
Veteran
Joined
Oct 21, 2020
Messages
84
Reaction score
75
First Language
English
Primarily Uses
RMMZ
As far as I can tell, events don't have a "note" section like maps and other things. But there is an option to add a comment and you can put a <comment tag> in those which basically functions like a notetag.
 

Beregon

Veteran
Veteran
Joined
Aug 25, 2020
Messages
97
Reaction score
60
First Language
Czech
Primarily Uses
RMMZ
As far as I can tell, events don't have a "note" section like maps and other things. But there is an option to add a comment and you can put a <comment tag> in those which basically functions like a notetag.
Hmm, Events have a section next to the Name field that is called Note, but it seems that they function differently from the Map/Database note fields.

Basically, to make it clearer just what I'm asking:

For database objects, you can write something in the Note field of an actor like:

Code:
<fame:12>
You can then make an event with a conditional branch, that looks like:

Code:
if ($dataActors[1].meta.fame >= '12') {
Show Text: Wow, you are so famous!
} else {
Show Text: Umm, who are you?
}
The game would then evaluate the notetag of the Actor with Id 1 and if his 'Fame' was 12 or more, it would should the first text box, if not, it would show the second text box.

Basically, I want to know if it's possible to do something similar when you write the notetag in the Note field of a map Event, with just script calls. I've tried things like:

Code:
$gameMap.event(5).fame == '12';

$gameMap.event(5).meta.fame == '12';

$gameMap.event(5).note.fame == '12';

All of them lead to an error 'Cannot read property 'fame' of undefined. So it seems it doesn't work similar to the database objects (which isn't surprising, honestly) or I am going about this the wrong way. I can't find anything in the code or debug console that would lead me to a property I can access that would store this information, so I'm wondering if this is possible?
 

Jennavieve

Veteran
Veteran
Joined
Oct 21, 2020
Messages
84
Reaction score
75
First Language
English
Primarily Uses
RMMZ
Hmm, Events have a section next to the Name field that is called Note, but it seems that they function differently from the Map/Database note fields.
You're right. The box is so small I never actually noticed it before.

Basically, I want to know if it's possible to do something similar when you write the notetag in the Note field of a map Event, with just script calls. I've tried things like:

Code:
$gameMap.event(5).fame == '12';

$gameMap.event(5).meta.fame == '12';

$gameMap.event(5).note.fame == '12';
I'm not very good with the coding end of things but it does seem like the note box in events doesn't perform the same way as other things. I think that's why they allow comment tags. Try just putting your tag in a comment in the event and see if that works. If not, hopefully somebody more javascript savvy can help you figure it out.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,107
Reaction score
1,517
First Language
EN
Primarily Uses
RMMZ
:kaohi: $gameMap.event(x) gets the Game_Event instance of event ID x, i.e. the event data that is expected to change during gameplay (location, facing, image, etc).

To get the map data associated with a Game_Event, including its note and meta properties, use the event method, e.g.
JavaScript:
$gameMap.event(5).event().meta.fame
 

Beregon

Veteran
Veteran
Joined
Aug 25, 2020
Messages
97
Reaction score
60
First Language
Czech
Primarily Uses
RMMZ
:kaohi: $gameMap.event(x) gets the Game_Event instance of event ID x, i.e. the event data that is expected to change during gameplay (location, facing, image, etc).

To get the map data associated with a Game_Event, including its note and meta properties, use the event method, e.g.
JavaScript:
$gameMap.event(5).event().meta.fame
Ah, ok, figured it was something like this. Thanks a lot, it works now!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Latest Threads

Latest Posts

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,194
Members
137,773
Latest member
Kirakirna
Top