Reading an Events Comments

nathanlink169

Game Dev by Career, no idea what I'm doing
Veteran
Joined
Aug 15, 2013
Messages
59
Reaction score
22
First Language
English
Primarily Uses
RMMV
Hi all,

This is a feature I've seen in previous RPG Makers, and am not certain if it's possible with MV.

Long story short: I have an event. That event has comments in it that I'm trying to read. These comments will be used to determine certain behaviour of my script.

Long story not-quite-as-short-but-still-short: I'm working on a Vision Cone script. Certain NPC's will need to have Vision Cones, and certain NPC's will not need them. I would ideally like to use comments to set these values up. The reason I would like to use comments (rather than the Note section) is in case the current Active Event Page changes, I would also like the settings to change.

Is it possible to read comments from the current events page in Javascript code?
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
497
Reaction score
193
First Language
thai
Primarily Uses
RMMV
try digin on this
sorry that I can only provide sample
I myself still learn the basic
and don't touch the comment reading yet...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,143
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
Take a look at what I did here:


You just have to find someone who has a plugin that uses event comments, and see how they handled it. I think it's a good approach to search for them at the time the event page changes, rather than at the time you want to check, because that's the only time the info is going to change, and doing it with each check could lead to performance issues, especially if it's a long event.
 

nathanlink169

Game Dev by Career, no idea what I'm doing
Veteran
Joined
Aug 15, 2013
Messages
59
Reaction score
22
First Language
English
Primarily Uses
RMMV
Take a look at what I did here:


You just have to find someone who has a plugin that uses event comments, and see how they handled it. I think it's a good approach to search for them at the time the event page changes, rather than at the time you want to check, because that's the only time the info is going to change, and doing it with each check could lead to performance issues, especially if it's a long event.
Thanks Shaz, that was exactly what I was looking for. I did have a bit of a peek around for script that use event comments, but they don't tend to be advertised by the fact that they use comments, moreso their behaviour, so they were difficult to find. I appreciate you pointing me in the right direction!
 

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

Latest Profile Posts

A mousefolk sprite I made, I think I did good.
Discovering math. functions for damage formulas was one of the greatest things for me.
It's very useful for balancing skills to work in a variety of possible circumstances.
For example if you have a skill that is supposed to work for both mages and warriors:
Code:
Math.max(a.atk * 2 - b.def, a.mat * 2 - b.mdf)
SpaceX: First-ever successful (manned) commercial spaceflight!! In these terrible and self-sabotaging times for the world, that's a ray of excitement and hope I needed badly.
GameDevJohn wrote on whtdragon's profile.
Hey I used you bunny and cat spritesheet for a game jam game. Thanks so much! You have really beautiful stuff here. I'll credit you at https://gamedevjohn.itch.io/bunny-boy

Forum statistics

Threads
98,018
Messages
948,575
Members
129,276
Latest member
abhikhurana
Top