Basics of Comment Tags

Hi I need help. I can't seem to figure out how to use comment tags.

Can someone show me the basics by showing how to make this simple example:

1. In an event comment add the tag "<Charisma: 17>"
2. Events will now have a new variable called "charisma", and this particular event will have it set at 17.
You don't add these into event comments, you add them into the note field.
Screenshot_127.png


I have made a video about notetags.
If you were talking about comment tags: they are typically used to give an event different values based on the active page. There's no shortcut of which I'm aware: you'll have to scan the event's command list for Comment commands, then parse the contents of each command in search of the appropriate notetag. Here's an example designed for use in a Script command:
Spoiler: Example
Code:
var RX = /<tag:\s*(\d+)>/;    // regular expression for <tag: X> (+integer X)
var ev = this.character(0);   // this event
var res = ev.list().filter(function(c) {
  return c.code === 108;      // get comments (command 108, cf rpg_objects.js)
}).map(function(c) {
  var match = RX.exec(c.parameters[0]);
  return match ? match[1] : '';  // digit match or empty string
}).filter(function(c) {
  return !!c;                    // filter out empty strings
})[0] || '';                     // return first entry or empty string
ev.tag = parseInt(res, 10) || 0; // assign retrieved value as a property
For use in a plugin you'd probably want to replace the ev var with a this reference and insert the comment-parsing code in an alias of the setupPage method of Game_Event or something like that~

Original thread: https://forums.rpgmakerweb.com/threads/basics-of-comment-tags.115308/