EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
965 stars 183 forks source link

New Event Commands (request them here!) #2338

Open Ghabry opened 3 years ago

Ghabry commented 3 years ago

Currently there is space for 999 event commands in the range of 2000-2999.

There could be some basic grouping at least:


Set Auto Battle Algorithm - One event command

Value must be saved! (see #2331)


Change Language - One event command

Changes the language of the game

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

omarinhcag commented 3 years ago

About the current ideas:

elsemieni commented 3 years ago

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:

Pictures related:

Audio related:

Event related:

System related:

Br4ssman commented 3 years ago

EDIT, new ones:

Soeufans commented 3 years ago

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 :)

Ghabry commented 3 years ago

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:

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)

fmatthew5876 commented 3 years ago

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:

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.

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.

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:

  1. Use the treemap heirarchy directly, and define a map as a "map group root", and so all children are in the same group.
  2. 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.
  3. 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.

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 SaveSystem::variables
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

Ghabry commented 3 years ago

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[type1, type2, type3] (you need multiple out, look at e.g. "Get Event Location".

Br4ssman commented 3 years ago

Would it be possible a conditional branch + batch function? Like: @> Conditional Branch: Switch [0001...0003] is ON @> : Else @> : Branch End

elsemieni commented 3 years ago

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]]

Br4ssman commented 3 years ago

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.

Br4ssman commented 3 years ago

Animate event graphics when the graphic is obtained from the chipset. This could offer the possibility of having 16x16px events animated as a chara.

Soeufans commented 3 years ago

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

gadesx commented 3 years ago
BlisterB commented 3 years ago

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 :

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 :

Here is a quick mockup to better understand the idea, it use the Maniac Patch GUI (which is really great btw) :

Capture d’écran 2020-11-08 à 10 00 31
BlisterB commented 3 years ago

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 :

Cons :

Capture d’écran 2020-11-08 à 10 07 43

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.

Br4ssman commented 3 years ago

Zoom In/Out

Command that applies a zoom by predefined values (x1~x4). All map content (chipset, charset, pictures, panorama) is affected.

Ghabry commented 3 years ago

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:

Br4ssman commented 3 years ago

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).

imagen Capt

Br4ssman commented 3 years ago

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).

Ghabry commented 3 years ago

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)

troybonneau commented 2 years ago

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.

florianessl commented 2 years ago

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:

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.

Soeufans commented 2 years ago

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 :)

florianessl commented 2 years ago

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

Alternatives to Wait for All Movement:

Br4ssman commented 2 years ago

"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.

Br4ssman commented 2 years ago

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.

gadesx commented 2 years ago

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.

Soeufans commented 2 years ago

Transparency can be done in the same graphic picture, remembet, EasyRPG use alpha channel, so it works for EVERY chara, picture, battle animations, etc...

gadesx commented 2 years ago

I wanna say,

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.

gadesx commented 2 years ago

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

AlexKhayrullin commented 2 years ago

Maybe something could be done to add to handling player names, which are usable as generic strings. Something like this would allow creating more interesting user interfaces without using tons of pictures with nothing but text on them, and also implementing custom "name input" screens.

... and so on :)

I'd also suggest doing something for persisting data across save files, but it looks like people are alreaddy suggesting reading/writing files, so that would be redundant.

Br4ssman commented 2 years ago

Fog of War

I'm not clear if this should be a new addition in weather effects or a separate command, but it could be a good way to configure it (in transparency, colour, size, shape and range in tiles at which the fog will dissipate).

e.g: https://youtu.be/X0BzK80plRs

EDIT: Perhaps among other options would be what you choose to cover, from panoramas, tiles, charts and images to a choice of one or more.

Br4ssman commented 2 years ago

On the basis of the following proposal: https://github.com/EasyRPG/Player/issues/2720#issuecomment-1030252275

A command similar to Show Picture, but in this case for APNG.

jetrotal commented 2 years ago

Capture and Clone Other Events

Let's say I want to have a library of events that can be reused on multiple maps (E.g. a party that follows the player, or some placeble decoration items like in Animal Crossing).

Would be nice to have a command that reads an event from a map and places a copy of it on another map. With that we could have another command that stores the coordinates of the target event as a variable, in order to do the same copy-paste command dynamically.

joeythemarillfan commented 2 years ago

Calling javascript, or something like that. I really want to add Newgrounds Medals to my EasyRPG games.

Br4ssman commented 2 years ago

Expanding shake and move screen options

I don't think I've proposed this anywhere yet....

Shake screen: Maybe it could make the shaking also vertical or even combined (diagonal shaking).

Move screen: What is missing here is the use of variables for the movement and the search for an event by its XY coordinates.

Br4ssman commented 1 year ago

On-the-fly map growth

When loading maps, I don't know if this could be interesting for very large maps or a way to load a map design that could vary depending on the player's actions. We know that the maps have a minimum and maximum size (which we will see what it will be in the case of EasyRPG Editor), it would be to increase the map based on the limits.

Br4ssman commented 1 year ago

Destroy Event

Same functionality as "Erase Event" (in fact Erase event could be a configurable command), but the event is not recoverable if Player event change to other map and come back.

Br4ssman commented 1 year ago

Improving message codes

This proposal is directly related with message commands and Show String Picture (https://github.com/EasyRPG/Player/issues/2338#issuecomment-844694636) The aim would be to be able to use new the old message codes (and other new) or commands, allowing, for example, a slower text speed to be set but a keystroke to speed it up.

lumiscosity commented 11 months ago

Get amount of events on call stack

Would be nice for making custom crash handlers. It would output the current event call stack to a variable.

Br4ssman commented 10 months ago

Flip charset sprite

Something similar to flip picture of Maniac's Patch.

Br4ssman commented 6 months ago

Auto-initialise variables/switches

Imagine you want the player to enjoy an extra, special menu, whatever on the condition that he/she has finished the game once. It could be an alternative to do weird tricks with the saves that don't work properly with this idea.

Br4ssman commented 3 months ago

Reset switches and/or vars of current map

This would actually be an extension of the variable / switch setting commands.

lumiscosity commented 1 month ago

Actor Skill Switch Control

Takes an actor ID and a skill ID and sets a switch to ON or OFF depending on if the actor knows the skill or not. All values (actor ID, skill ID, switch ID) can be hard-coded or taken from a variable.

rohkea commented 1 week ago

Switch writing mode

Once we implement support for different text directions, I suggest having some command to switch the writing mode. It could be an event command with 1 parameter, with the following values:

Alternatively, this could be two separate settings (with CSS meanings of inline and block):

This can be useful for:

We also would need some way to specify the initial writing direction of the game (to make sure that the Title and Load Game screens have correct display). Maybe this could be done with a new LCF block, or with an setting in RPG_RT.ini.