What Makes an Event or a Script?
ARPGM Events Scripts Eventing Scripting Game Control NPC Classes Characters Plants Growable Switches Variables subtypes types times seasons planting farming
This post, is a long long LONG one; I feel I have a lot to say. You can reap the benefits of my thinking, if you have the patience to read a bit...
I have already mentioned that Events are almost a must for the game-maker I am creating; and it also follows that Scripting control is a highly-desired feature by people using the Enterbrain products. But in part, I do wonder if this is because scripting is generally the only way to control or reconfigure the RGSS features, or because if the source code to RM were available, some of the scripters would be more apt to develop their features in the native language?
You see, because what I'm planning is, and will remain, an open-sourced project, I am considering leaving the engine uncompiled, so that "Scripters" can add in Java classes to support their additional features, and the end-user could compile their game, engine and additional scripts, to control the creation of the game without being quite so needy on a third-party scripting system. Ha; Java itself is the scripting language.
A brief note, and this is only fractional in my opinion, might be that game-makers would be required to use the JDK to compile the project before testing and game release, not just the JRE (or, at least, just ONE collaborator on their project have a JDK). Again, it's a minor point; but one I believe will be easy for the game-maker to come to terms with....
Theory: Example Events, and Potential Application.
On thinking of how to implement some of the eventing solutions that are possible, or even impossible, in current RPG Makers, I've come up with a few scenarios and examples, that I've been mulling over.
First, the types of variables. With the RPG Maker programs we have Switches and Variables, the latter of which are numbers. In using the Java language, I would prefer the variables to be more strongly-typed -- so, variables specifically typed as booleans, doubles, integers, longs, and even Strings.
Second, subclassing and subcategorizing events themselves by a type. I will keep a generic Event class as the parent of all other events; but I'd also categorize event-able objects as one or more of the following:
- A basic NPC, for characters on a map who are merely there to provide "flavor text"; on top of the baseline Event class, is added variables and controls for movement-pathing-routing, naming (first, last(maybe), nickname), money/value (heh, I see a lot of games coming out with Thief classes for utilizing this...), position-rank-title values (I had a thought about NPCs with actual authority),
- A Classed-NPC, for a subtype of the basic NPC where it makes sense to possibly have stats, useful for conditionally-branching event control based upon an independent stat value, in comparison with the player's own stats; race/racial traits and gender (both of these appear valid enough for supporting in the engine and editor, for all you wanting more control over classes and skills), character alignment-mood-morality-personality-reputation (maybe not so high priority on its own, but doable), NPCs susceptible to conditions, et cetera. Classed NPCs could theoretically also have weapons and armor, so that during town sieges they could "help" in its defense, although NPCs probably do not need experience and levels....
- Further Classed-NPC subtypes where it makes sense to further expand the possibilities; they should inherit all the aforementioned stats or properties mentioned above. Examples: Battler NPCs whose purpose is for combat, such as player-trainers and the like, but not necessarily like the random battlers encountered; Merchant NPCs who remember their own inventory, what's bought or sold, and the amounts of each in stock; and perhaps any other classed or class-able NPC subtype.
Third, is for events related to "farming" and crop-growth. This is traditionally done with some scripting and/or eventing and using plenty of global variables. How the crop is displayed (relative to its growth-stage) is one aspect that is traditionally done in the event pages and using the event's self-switches; but how to specify if a statically-places plot is planted with one type of seed over another, and controlling the hydration state, is yet a different problem. Thus, the reliance on so many global variables and switches alongside the scripts.
Eh, well, I do have a unique approach to "solve" or diminish this ... since I am the one who is taking the lead in making both editor and engine. Simply put, while I've decided to allow increasing the number of self-switches for events, I will also allow events to have "self-variables", to reduce dependence on global variables; I feel the "global variables" should truly be for values that are global to the game, quest states and whatnot. (Generically speaking, events already do contain self-variables, in that self-switches are merely a variable of a Boolean kind. But allowing the event instance to have access to its own numeric variables may keep the global stack of variables somewhat streamlined.)
Along with all the above-mentioned NPC event types, at least one subtype could be for Plantable and Growable events, with variables specifying the timer-based controls like first planting time, current crop type, current maturity, maximum age, etc. These plantable events don't even have to be single-planting events, either; they could be for perennial crops and plants that continue to produce, even through many seasons or even "years" in game. It just depends how intricate a planting/farming system is desireable.
And, I'm done for now. Didn't think I'd get to this point? Haha. Have a good day y'all...