Player
Player copied to clipboard
New Event Commands (request them here!)
Currently there is space for 999 event commands in the range of 2000-2999.
There could be some basic grouping at least:
- Map related: 2000-2099
- Battle related: 2100 - 2199
- Language related: 2200-2299
Set Auto Battle Algorithm - One event command
- Arg0: The ID of the algorithm to use. -1 is "LDB default"
Value must be saved! (see #2331)
Change Language - One event command
Changes the language of the game
- Text parameter: Identifier of the language
Value must be saved!
Show Message (Plural aware) - Requires 3 new event commands
Proposed idea:
Lets say we have the message
ShowMessage "You found \v[1] piece of cheese"
ShowMessage_Cont "Tasty!"
and the source language has one plural form.
The result is with Plural Support:
PluralIndicator [Variable|VariableIndirect] [Forms]
ShowMessage "You found \v[1] piece of cheese"
ShowMessage_Cont "Tasty!"
PluralMessage "You found \v[1] pieces of cheese"
PluralMessage_Cont "Tasty!"
The Variable in PluralIndicator
is used to decide which message is shown. Forms
is automatically set by the editor: It contains the number of forms. When the project main language is changed this allows quick patching of all of them.
The Indicator
is generic enough to also allow it's use in e.g. ShowStringPic
see also https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
About the current ideas:
- Would it be useful to be able to set auto-battle algorithm per actor?
- There are some non-RM games that implement conditional messages through message codes (i.e. "Today is {\v[1]==1 ? his : her} birthday!"). Might work for plurals, though would need each developer to implement them properly.
Save/Load information Being able to read a savefile slot and store some of its properties as variables.
- Arg0: save ID. Can be a variable.
- Arg1-n: Variable IDs to store savefile data (party members, level/s, playtime, etc).
Take screenshot Stores a screenshot as image using a string as filename. Accepts a variable as part of the name, or adding a timestamp to the end of the name.
- Arg0: Base filename
- Arg1: Naming suffix. Modes: no suffix (just base name), variable (variable value as suffix), timestamp (timestamp added to the end)
- Arg2: Variable ID
It's easy say ideas, implementing them is another story... Anways, since this is just a brainstorm, I will say some good, bad, awful and "Oh man, shut up!" ideas.
Switches/variables related:
- Math evaluation (input-like parameter with a similar parser than messages i.e. \v[3]/cos(\v[5] ). It will be float based and the results must be casted to int ).
- Get Variable by Name (with \v[3] notation compatibility ).
Pictures related:
- Take screenshot (@omarinhcag 's idea is not bad, however, I was thinking it more like output to an Image ID rather than a file).
- Create image from data (You can specify an output Image ID and a range of variables to generate an RGB Image - advanced and VERY SLOW! but at the same time very powerful since you are converting Pictures into a framebuffer ).
- Rotate image (by a fixed value).
Audio related:
- Seek BGM / Memorize BGM position (taking memorize BGM to the next level... it can be complicated due to audio backends, specially MIDI one).
- Stop single sound (Stop all playing sound instances from a filename. With that you can even do a RPG Maker module tracker ;D ).
Event related:
- Check passability by coordinate (tasty for making engines like tactical ones or another).
- Spawn Event from Map (Map ID, input coordinates and output coordinates for current map).
- Get Event ID by Name (some werido will find this useful to find events for something I guess).
System related:
- Save/load savefile (parameter: Save ID).
- Get mouse/touch position (long history short. Output to 2 variables coordinates).
- Get extended input (Extending the input to backend capabilities ... you can use SDL at our side to this! )
- Call OS command (use with caution) (Options: wait until finish) - Can be used for custom interfaces, for not saying Steamworks (?) - DANGEROUS.
- Load raw file (loads a X file (\v[3] notation available) and outputs Y bytes to a variable starting from Z - DANGEROUS).
- Save raw file (outputs X bytes from a variable starting from Y to a Z file (\v[3] notation available) - DANGEROUS ).
- Change size of tile (grid): Maybe a custom value is very dangerous, but alternate among 3 sizes could be great.
- Conditional Branch "if event cannot move": An easy way to handle events that stop or cannot complete their movement routes.
- In swap event, I'd add the possibility to swap the main event (hero/player).
EDIT, new ones:
- Summon Event: Basically it brings an (or massive) event(s) to the current map from other map.
- Core events: Imagine that you have a series of events that you want to repeat in all maps (for example, the arrow of a bow in an action RPG, an event which identifies the ID of each map, your position...). In these cases you could mark the event as "core", so when you create a new map, core events are instantly generated with the new map (you can eliminate them after if you don't need them in that particular map).
- Set Move Route: It could be interesting use Vars like Switch ON/OFF. Besides, "Wait" command here could be adjustable (Wait: x0.0, x0.1, x0.2, etc).
This is a special request, as an enginner in RPG maker 2000 and RPG maker 2003.
I created lots of engines, like CMS, CBS, and ABS, and i always encountered a major problem, and its a "wait" proces to block all that is in progress... its a special "wait" comand or a "going into a pause like when you go to the default menu and all process in map STOPs"
lets try if i can explain correctly in english...
An option that you can stop all process (auto, parallel process etc...) forsefully like when you open the default menu, so you can do in that "event menu" a new engine to create a CMS, CBS whithout being anoyed whith the actual event process in the maps or comon events from BDD
For example, i do an ABS like my Soul Blazer engine, but of course, there are lot of "parallel proces" like enemies moving, atacking, animations etc,,, with the grafics moving and sounds, and if i call for an CMS engine, these process i can stop them, but not all... due to some factores to make the ABS working correctly
But meh... anyways, here are some command ideas.
Upgrading Commands:
Command: Control variables Desire: Get coordinate screen/map from Picture Explanation: A way to get the position X and Y from a ID Picture used in the game
Command: Show Picture and Move picture Desire: Get a new "position default" Explanation: A way to ignore the coordinates from the ID picture selected if only you want to change the color (or someting else) from that picture without worriying to know about their coordinates
Command: Show Picture and Move picture Desire: Additive, multiply, subtract etc... Explanation: Like in maniac patch, a way tu make a picture being Additive, Substract, Multiply etc...
Command: Show Picture and Move picture Desire: New wave effect Explanation: A way to customice better the wave effect, like changing to vertical to horizontal, number of waves, or something else...
Command: Show Picture and Move picture Desire: Skretching Explanation: A way to skretch a picture, for example, a picture of 16x16, to skretch it to 32x16, selecting the central point of skretching manually or by variables
Command: Display text setting Desire: More customization Explanation: 1º An option to reproduce a Sound when a character is shown (like in my Text engine) 2º An option to change Font from text, using a Font or a Picture preset 3º Changing the position of the message text Using coordinates or the 3 presets positions from default maker 4º Adding more lines, in Default, only 4 lines are shown, 5º Adding move scroll text options, like when you see traditional credits from a movie, that goes down to up.
Command: Call Event as a parallel process Desire: A Command to call an event like if it was a "paralell proces" Explanation: When you call for a comont event, you must wait for it to finish, with this option, you can call an common event, without waiting to be finished
New Commands:
Command: Change Individual Tile Desire: A Command to change indivually a Tileset from the map from X and Y coordinates with coordinates or preselected Explanation: In 2k and 2k3, you can chante a Tileset, but it affects all the same tiles in the map, with this command, you only change one tile on the map or with variables, for example, a tile from a rock, that is in the position in the coordinates 12X 15Y you change it for a hole, insted of changing all the rocks tile in the map.
Command: Mouse imput Desire: A way to activate or deactivate the use of the Mouse, using coordinates, images, sounds for clicking etc... Explanation: you can use the mouse, and the coordinates of the mouse are stored in variables X and Y
Command: Mode 7 view Desire: a Mode 7 view of a map or Picture Explanation: Like in some games in Snes, like Fzero, FF3, Terranigma etc... You can configure the angle of view, the central position and the deep, i think this would be more complicated to do hahaha
Command: Particle command Desire: a Particle command to do particle effects Eplanation: You can make particle effects with coordinates, configure number of particles, origin and destination coordinates, image to be used, sound to reproduce
Command: Pause BGM Desire: To pause a BGM and to continue reproduce in another time Explanation: Making a commando to save the position of the music, pause it, and you can continue reproduce it on another moment
Command: Show number Desire: A command to show numbers entered or by variable, and shown on X and Y position Explantion: Doing engines, theres a lot of events i must do to show numbers for my custom engines, with this command: 1º: you can show numbers from a variable using the font default or by picture 2º: you can select the position coordinates X Y manually or using variables 3º: If possible you can do a "show numbers" and a "move numbers" command, like the "show picture" and "move picture", to create some animation if desired
And this is an 2 EXTRA for the editor:
Problem 1º In the Commont Event page in the BDD, all common events ar listed to 0001 to 9999, so you must scroll a BIG list of 9999 comands, and it gets so annoying scrolling a bar to get to a specific common evento Solution: Make a different view of displaying common events like in bubblescharts or something else, that will help to arrange the lots of common events listed in a list form 0001 to 9999, with this, you can arrange better if a common event is from a CBS, CBS and other engines
Problem 2º In the sintax of a variable, the limites are 9999999 to -9999999 Solution: Make a nearly infinte number :)
Scene Push & Scene Pop
This one is complecated, needs lots of incompatible data format changes and no global state (!) but it solves one fundamental problem: Custom menus and battle systems are painful to implement:
When you have them on an extra map and you teleport to it then all event positions are reset when teleporting back (and you can abuse this type of menu to e.g. skip "On Touch" events by calling the menu while walking on thie tile).
The other solution is overlaying the Menu/Battle on top. Disadvantage: You can't use the map at all, must be entirely Picture based.
In both cases running events will cause chaos, you must somehow terminate and continue them.
For this I propose Scene Push/Pop.
Semantics:
The element on the top of the scene stack (not to be confused with the stack we use for Scenes in Player, when I talk about a stack here I mean a stack of Maps) is stored in the well-known fields of the LSD.
All parent maps are stored in such a way:
New field easyrpg_scenes
which is a list of EasyRpgMapState
with the following elements:
SaveSystem system;
SaveScreen screen;
std::vector<SavePicture> pictures;
SavePartyLocation party_location;
SaveVehicleLocation boat_location;
SaveVehicleLocation ship_location;
SaveVehicleLocation airship_location;
SaveInventory inventory;
std::vector<SaveTarget> targets;
SaveMapInfo map_info;
SavePanorama panorama;
SaveEventExecState foreground_event_execstate;
std::vector<SaveCommonEvent> common_events;
So is a copy of everything When the Scene Push happened except for std::vector<SaveActor> actors;
The pushed map starts with a completely empty state (from the database, as if you started a new game).
To be decided:
- Inheritance options to define which state is copied and which state is cleared from the parent (no reference support for simplicity)
- A "shared" option would make sense for Switches and Variables.
- "Parameter passing" upwards
- "Return values" downwards
When invoking Scene Pop the map returned to continues event execution right after the Scene Push command and implicitly does a Wait 0
(Map Refresh)
Scoped Variables and Switches
I don't know how exactly this would look, but I have (and probably alot of others do too) use cases for scoped variables and switches. In hh3 I have a very ugly and poor manual way to allocating a range of variables and calling common events to clear them
My use cases include:
- [ ] local variables that only exist for current running event
One way to implement this could be to use negative id numbers for this feature. This would allow all existing event commands which reference variables and switches integrate with the feature very easily.
The implementation would be a simple stack for each called event.
You would want either a command or some builtin functionality to the map, battle, and common event to declare the variables. This would allow editor to provide the necessary syntactic sugar to display the local variable names and also allow re-indexing if you change the local variable set.
For re-indexing, editor should warn you if any indirect variables are accessed as it can't guarantee that doesn't break.
- [ ] Parameter passing to call event commands
A simple extension to the previous. You would need to enhance the CallEvent command, or create another CallEvent command to support parameter passing.
Events should define up front what parameters they take, and the editor dialogue to call them requires you to assign either constants, pre-existing global variables, or pre-existing local variables.
Editor will need some way of checking for all call sites if you change an events parameters and give you a convenient report of where they all are so you can fix them.
- [ ] Map Groups - Local variables and switches which get reset when you exit a "dungeon"
I have this use case where I have a set of dungeon variables which are used for puzzles, traps, games without random encounters which place enemies etc.. which reset when you exit the dungeon. To save on RPG_RT variable space, I reuse the same reserved set for each dungeon and have carefully managed common events resetting them on enter /exit which is super painful and error prone to manage.
How you would implement this in practice is an open question. Here are some ideas.
First, you need to define what a "dungeon" or more generally a map group is.
A few options:
- Use the treemap heirarchy directly, and define a map as a "map group root", and so all children are in the same group.
- In the ldb, define a set of "map groups". Then, each map can specify which group it is a member of, or inherit from the parent. This requires more work to setup the mapping, but gives you maximum flexibility. Each map group could define the number and names of it's map group variables.
- Store the "map group" data within a map / LMU file. And have a ability for other maps to reference /inherit that group. I think I like this better than using the LDB.
Wherever the map group is defined, the map group object needs to define the number and names of it's local variables.
Next, we need to define what variables are "map group local" variables. This could again be some reserved negative range.
Once you have this, the teleport code can detect anytime you change map groups and reset all the map group variables for you.
I would also create event commands to do this reset explicitly, so you could for example choose to have the escape /teleport spell run this sequence or not.
- [ ] Local variables and switches which get reset anytime you change maps
A version of the above, without groups. Useful for map specific puzzles etc.. Could be implemented the same way as above
Possible variable mapping range, and how they might be saved.
Id | Purpose | Saved Where? |
---|---|---|
0 | Sentinel - invalid variable | N/A |
1 to INT_MAX | RPG_RT compatible Global variables | LDB as before |
-1 to -999999 | Call stack. -1 is the first local on your call stack, up to -N. You can specify -(N+1) to your the callers local variable (or 0) etc.. | SaveEventExecFrame::variables |
-1000000 to -1999999 | Map local variables | SaveSystem::map_variables |
-2000000 to -2999999 | Map group local variables | SaveSystem::map_group_variables |
Common Event run once per map
Like how you can use "Erase Event" to run map events once, I want to have common events that run some code everytime I change maps, but only once.
This could be done in a few ways
- [ ] Add a new "once per map" trigger type to common events
- [ ] Add a new feature "set switch on map changed", so that anytime you change maps a switch gets set. This can be then be used to trigger whatever events you like, or other things. This could also be combined with the "map groups" idea above to run event code whenever you "exit a dungeon"
I'm not a huge fan of "inband signalling". How about: For access most event commands already have a "value or variable" parameter to specify whether the value is constant or read through a variable. This could be extended to "indirect variable (\V[\V)", "local variable" etc.
For writing I would also prefer additional parameters or an entire new field "out_parameters". When empty: standard behaviour. (assume 0 - target is global switch/var) Otherwise: DBArray<uint8_t>[type1, type2, type3] (you need multiple out, look at e.g. "Get Event Location".
Would it be possible a conditional branch + batch function?
Like: @> Conditional Branch: Switch [0001...0003] is ON @> : Else @> : Branch End
Would it be possible a conditional branch + batch function? Like:
@> Conditional Branch: Switch [0001...0003] is ON @> : Else @> : Branch End
Looks like there's a interesting feature request here: Assign Switch value by reference (in editor you can only set ON, OFF or toogle, but not v[x] value, where x is a variable ID). You can do it with variables without much issue actually but not with switches.
In resume:
switch[a] = switch[v[x]]
Make hero/vehicle event editable.
I guess these are a Ev0000, and maybe it could be dangerous, but perhaps the left side (not the event command side when editing an event) could be interesting to editing by double click for more configs.
Animate event graphics when the graphic is obtained from the chipset. This could offer the possibility of having 16x16px events animated as a chara.
New command: Change parallax settings: A way to configure even better the settings of a parallax, to narly be like in pictures, but in parallax, that upgred could be grat to make better maps with scrollings, parallax only works under tiles, not above them, or make the "Show Pictures" setting, as a "parallax"
Here are some upgrades:
Set movement route When you select the event to move, a way to select it by Variable too
Set event location When you select the evento to change his location, manually or by variable, a way to select the event by Variable too.
Creating a Event When you create a new event, the ID is fixed automatically, a way to edit and change his ID number manually
- Picture movement with scroll&loop like panorama in map properties.
- Picture:Wave effect fix, if there's up or down scroll the effect speed go faster.
Extended "Branch Condition"
Imo this would be the most game changing feature that would completely simplify the engine :).
For now, branch conditions are like IF (VAR[x]) == (SOMETHING) THEN
.
VAR is a variable, SOMETHING can be a lot of things (level's actor, an event's id etc.).
Cons :
- It requires a lot of steps : you have to store something in VAR[x] and then make the branch condition: it requires 2 steps and a lot of "clicks"
- It requires to store a variable : you have to find a place for this variables, give it a name, remember this place etc. This is not useful because most of the time, the information is already somewhere in the engine, and moreover most of the time you won't share the information in different event/common event. Store the variable makes no sense.
- It's incompatible with "generic system" (generic code stored in common event), if you store/modify a variable, multiple events calling a common event cannot do that in parallel. That's in part why people want local variables.
My suggestion :
The idea is making possible Branch Condition like IF (SOMETHING) == (SOMETHING) THEN...
In the editor, you would just have to use the same "bottom section" in the "upper section".
Pros :
- It requires only one step : the code would be shorter, more readable and it would be way quicker (fewer "clicks") : a great quality of life feature.
- The end of the "where I store the variable, how I name it, damn my organisation is a nightmare, my obsessive-compulsive disorder is so triggered x__X"
- It would be compatible with generic code because you won't store variables used by several event at the same time. It would make local variables less needed.
- It doesn't seem to need a lot of extra work because I suppose that a lot of things are already in place.
Here is a quick mockup to better understand the idea, it use the Maniac Patch GUI (which is really great btw) :
Identify variables/switch by name
For now, you have to store variables/switch in a list. It's really stressful imo because you can easily dirty your variable lists, and you can also "forget" where a variable is stored.
The idea would be to identify variables by name. You would be able to continue using the list like before. But there would also be a name field to search a variable by name, with suggestion of existing variables. If the variable doesn't exist, the editor suggest to create it and find an empty space.
It would be compatible with old project with different variable with the same name (because they are still identified by id).
Pros :
- You won't have to worry about the order of your variables (which would be an enormous relief imo).
- Quicker to find a variable, more "human readable"
Cons :
- It would be risky to use a variable without naming it, as it could be used by the engine (but I suppose there are a lot of ways to avoid this problem).

Local variables
Local variables to an event, and the possibility to access it from other events/common events would also be very very very useful. I managed to make a system in rm2k3 with pointers in order to simulate local variables and it's reeeeeally a game changer, you can code fully generic code (a movable case, an interactive switch etc.) but it requires some tricks to understand how the engine work (ie. always call a common event initializing the pointer after any "pause") and it would be much better if this was native in the engine.
Zoom In/Out
Command that applies a zoom by predefined values (x1~x4). All map content (chipset, charset, pictures, panorama) is affected.
Get/Set Custom Game Data
Who doesn't know this issue: Your global variables are a mess and you want to store e.g. for your custom event based battle system some additional attributes for your actor and you have no idea how to recompile liblcf and Player.
The solution for this is Get/Set Custom Data
.
The chunk structure could be something like this:
ID 200: easyrpg_game_data:
- ID X:
- ID 1: Data type (1 = Bool / Switch, 2 = Variable / Integer, 3 = Text)
- ID 2: The actual data
The data can be predefined in the database tab.
Event command:
- Get Game Data:
- Object to get data from
- ID of Object
- Chunk (ID) to read
- Output location, gives engine error when type conversion fails
- Set Game Data:
- On first use the database data of the referenced object is copied over to the savegame
- Object whose data is set
- ID of Object that is set
- Chunk (ID) to write
- Data source (e.g. Switch or Variable). Chunk type is set based on the data source.
Extend "Movement Type" and "Set Move Route" when just refers to Player Event
Apart of a better IA for the movements approach and away, it would be great that the Editor can offer the possibility to select the specific event to approach or away (or those ones that just refer the Player event, as the screenshots below).
Improve Text Command
We already have done some proposal related with this, but more specific with text boxes:
In this case, the proposal is that apart of the text codes (speed, text pauses, etc), it could be great a code/option in editor for press key and show the text suddenly. Similar to Debug for read quickly the text, but in this case you can make the text with an specific speed, with its pauses, but if you press action key, all of that is ignored an the text appear suddenly (if this option was previously configured).
In a RPG Maker Discord was the discussion about a screenshot function. Though imo the better way to solve this is a "Create Picture" command that snapshots a rectangle of the screen. Could also get a layer filter. Plus a "Save Picture" command that writes it in the Save-directory (Game directory is read-only).
This in-memory pic must be somehow saved in a new savegame chunk (as a PNG image)
A "Set Player Movement Speed" command would be great, right now the workarounds seem a bit obtuse for what could probably be a much simpler slider box or something similar.
I played around with the Steam version of RM2K3 recently and while the new additions allow for more flexible and organized scripting there's one feature I'm still missing, requiring me to create a lot of "lookup tables" on my maps:
- To be able to store the Event ID of the currently running event into a variable. (It's possible to get the Map ID so why not the Event ID itself..)
- EDIT: Also, the current Event Page might be useful in some cases
This could be an useful extension to the Event portion of the Control Variables dialog.
Other than that (doesn't concern events), a great addition to the Player would be some sort of message history which collects all the dialog up to a certain size.
I played around with the Steam version of RM2K3 recently and while the new additions allow for more flexible and organized scripting there's one feature I'm still missing, requiring me to create a lot of "lookup tables" on my maps:
- To be able to store the Event ID of the currently running event into a variable. (It's possible to get the Map ID so why not the Event ID itself..)
- EDIT: Also, the current Event Page might be useful in some cases
This could be an useful extension to the Event portion of the Control Variables dialog.
Other than that (doesn't concern events), a great addition to the Player would be some sort of message history which collects all the dialog up to a certain size.
hello!
Actually, there is a comand called "get event ID" but it only works if the event is in a specified coordinates or coordinates by variables, and also, only works for the highest ID event in the case there are 2 events in the same coordinates, so yes... a "get id event and store" or being able to select more IDs by variables, and also the pages, coould be great :)
Thanks, I haven't known about the "Get Event ID" command but it sounds like it isn't suited for my purpose. (Nostalgia compels me to do some highly advanced stuff in rm2k3 which would probably be way easier to implement in any custom engine xD )
Some more ideas:
Log command
- Similar usage as ShowMessage but it will print all text to a specified log file if in TestPlay
- Plus the ability to print the interpreters current call stack
Alternatives to Wait for All Movement:
- Wait for [Current Event] Movement
- Wait for [Event X] Movement
- Wait for [Event(Variable X)] Movement
"Delete Save File [N]" single "Delete Save File [N] ~ [N]" batch "Delete Save File" All "Conditional Branch [If Save File [N] exists]"
A way to empty save files from the game, or take advantage as a mechanic in games.
Stop event movement when off screen
This would be a subcommand of Set Move Route, and would consist of stopping the movement of an event when the event is out of focus on the screen.
This would be useful when for example you want to simulate a free-fall event and you do not want to calculate the wait time needed to be displayed off the screen, simply ticking a check or applying this command would stop such a movement.
Set event transparency (Enable - Disable, or maybe change graphic to another one) This function it's inside Set movement, change graphic - to another one.
There's a similar option but only for your hero, not for an own event.
Transparency can be done in the same graphic picture, remembet, EasyRPG use alpha channel, so it works for EVERY chara, picture, battle animations, etc...
I wanna say,
- Switch/Variable with another page without event graphic - took various steps.
- Change movement > Set graphic (no way to change after choosing a graphic (space key usually open options)) (Some steps too)
- Remove Event (Can be like this, but only graphic remove)
Another thing, if you have an npc in 10x 10y and you use Remove event, the event remains there, can be a problem to make shooting systems, you have to move each event to another position.
Resolution settings, we still use 4:3 modes like 320x240, 640x480px But now we use 16:9 LCDs so can be good set a view mode displaying more tiles. Maybe: 480x 240 (map size, 30-15 tiles) Zoom x2, ,3 960x480 - 1920x960 Or 480x256 (For 1920x1080 can display with zoom 1920x1024) New games have to be made with this mode previously tested. Actually Rpg maker maniacs support change resolution reading values from rpg_rt.ini