A custom point manager

Is it possible to write a script that allows you to manage arbitrary "points" and allow users to create their own "points"?

For example, if you look around, you might find things like "skill points" or "ability points" or "tech points" or "job points" or whatever points that may be needed for certain systems.

And it's really easy for someone to say "I want to have a new set of points for a particular script"

Don't know how feasible the concept would be though, since points themselves aren't useful unless you hook them up to other logic that will use those points.

There's also the issue of the scope of these points. Some points are tracked for each actor, while others may be for the entire party, or throughout the entire game.

The idea would likely be used as a framework for other scripters.

Rather than having to write all of the methods needed to calculate and work with points (error-prone, lots of things to consider), this script will provide all of those, and the scripter just needs to define how the points are used, where they are drawn, etc.
Is there a reason why you can't use variables?

I think something like that, if you wanted to go with scripts, would be as simple as adding an attr_accessor with the variable name to the actors or party (or whatever) class, setting it to 0 in the init method, and let the user increment it or check its value via a script call. What you DO with them might require a little more work, but that might depend on its particular use.
I typically don't like to use $game_variables for any attributes that are stored in some object.

It is project-specific and makes the script less plug-n-play. Plus if you have multiple scripts that are adding new point systems and all adding them to variables, you'd have to carefully manage them.

Users can specify that a particular attribute should be stored in that variable, however.

It's like, would you store each actor's HP and MP in variables so that you can easily access them? Or perhaps their stats? Maybe exp?

But yes, the general idea is to just attr_accessor and do stuff with it. But when you start writing multiple point systems, it gets kind of redundant after awhile to type the same set of code again and again. But that's only after you figure out all of the places you need to consider, and this typically takes some time to accomplish.

If you consider that N.A.S.T.Y extra stats script for Ace (), it allows users to easily create stats by just typing in a name and then access them uniformly (actor.xstats.arbitrary_stat_name) without having to write all of the code to actually implement the stats.

Except this idea focuses on a more generic idea of points.
So you could attach a hash to each item you wanted to accumulate points, then the user can do something like this:

$game_actors[1].points["Ego"] += 1

So they could create whatever type of points they want and change it as they want. But the moment they want it to appear on a menu, they have to start customizing the menu scripts. Is that the sort of thing you're thinking?
That would be a basic idea.

These sort of things generally require users to have some scripting knowledge to make full use of.

Original thread: https://forums.rpgmakerweb.com/threads/a-custom-point-manager.3100/