This script allows you to use placeholder graphics for your events. The appropriate graphics will be chosen automatically by the engine during the game.
This script is focused on actors and allows you to create placeholders based on an actor’s face or the actor’s character sprite. Faces are commonly used during event dialogue, while character sprites might be used on the map, either to reflect a member of the party, or perhaps an actor that is currently NOT a member of the party.
Placeholder graphics are useful in situations where the graphics that should be displayed are not determined when you designed the game. For example, depending on the choices that the player makes, the actor that they end up bringing to the final dungeon may be different for each player, and to provide a realistic cut-scene, you want to show the correct face in the messages. If different actors have different dialogues, then it would be better to simply create separate dialogue trees using conditional branches or otherwise, but if the only difference is visual, this is an option.
A placeholder is replaced based on the context defined by the placeholder itself. For example, if an event’s sprite is based on the actor that is currently the leader of the party, then we say the placeholder has a party context, and the engine will automatically grab the party leader and use its graphic for the event. On the other hand, you could have an event’s sprite based on whoever is actor 1, whose graphic may have been created using an in-game character generator.
Script: download here
In the script editor, place this script below Materials and above Main
Creating Placeholder Images
A placeholder image is just an image with a special filename. The general format for this filename is as follows
The PATTERN is a special sequence of characters that is used to tell the engine that this is a placeholder image (as opposed to a regular image).
The CONTEXT tells the engine how it will handle the placeholder.
The ID is a number and is related to the context.
Confusing? Read the next section for some examples.
This script supports several different placeholder contexts depending on what you need. You can see examples in the details below. All examples assume the pattern used is % (percent)
These placeholders will be replaced by an actor, based on the actor’s ID.
For example, if your filename is called “%actor3”, then this image will be replaced by actor 3’s image.
2. Party placeholders
These placeholders will be replaced by an actor in your party, based on the actor’s position.
For example, if your filename is called “%party2”, then this image will be replaced by the actor that is currently in the second position in the party.
3. Variable placeholders
These placeholders will be replaced by an actor, based on the value of the specified variable.
For example, if your filename is called “%variable5”, then this image will be replaced by the actor whose ID is stored in variable 5. The variable can be changed at any time, and the placeholder should change accordingly.
The Actual Image
The contents of the image is irrelevant. They are just used as visual representation while you are building your game. I would recommend using something that tells you immediately what the placeholder represents. For example, if I were using character placeholders based on party member index, I would specify the party and the index. Given that I might have a lot of other images, this makes it somewhere more obvious what it’s for:
Once you have created some placeholder images with the appropriate filenames, simply choose that as the image for your events or graphics. While it will display your placeholder image in the editor, the correct image will be displayed in the game.
Placeholder graphics are available for faces, such as those used in “Show Text” event commands:
You can also use them for character sprites, such as the graphics for event pages: