Display Popup Action

From Pummel Party Mod Documentation
Revision as of 22:59, 3 August 2023 by RBAdmin (talk | contribs)
Jump to navigation Jump to search

NOTICE: This content is planned for a future update. Everything on this page is subject to change or may not be added at all.

The Disaply Popup action in the Action Editor.

An action to display a popup window during a player's turn that they must interact with.

Should be used on a Board Space Event Component. Can only be used in Board Mods.

A preview is shown within the action editor to give a rough idea of what the popup will look like in-game. This preview is only a guide, make sure to view it in play mode to ensure the text displays as expected.

The buttons shown on the popup consist of the close button and 0, 1, 2, 3 or 4 choice buttons. The close button is always free to use and will simply close the popup. it can be disabled if you want to force the player to make a choice. The choice buttons can be used to run a set of actions when selected. They can be made to cost some resources to press. If the player doesn't have enough of the selected resource, they are unable to select the button. Choice buttons can also be free to press.

A choice button cannot be made to cost two types of resources to press. Only a single type of resource can be set as the cost of each button, but multiple of that same resource can be added. Eg. A button can't be made to cost 1 trophy and 1 key, but it can be made to cost 5 keys.

When a choice button is given a cost, an image of the currency (keys, health, trophy, etc) is shown beside the button text with an amount shown in the bottom corner. Eg if a button costs 10 keys to press, it will show the keys icon with a small "x10" text in the bottom corner. When an item is required to press a choice button, the icon for that specific item is shown.

Customisation

The popup can be customised in various ways to suit the custom board. Attributes that can be set include: - The title of the popup - The description/content of the popup - The square speaker image on the popup - Whether to show the close button or not - The text on the close button - The number of other buttons to display (up to 4) - The text on the other buttons - The cost to press the other buttons - The small image icon that appears on each of the other buttons

Property Description
Title/Speaker Name The text shown along the top of the popup. Use this to represent the title of the popup, or the name of the speaker if it's meant to represent a dialogue box.
Body Text The text shown within the main area of the popup. use this to explain something to the player.
Speaker Icon A texture representing the speaker or some other information related to the popup. The texture is shown in a square area so it should be a square image.
Choice buttons The number of buttons the player is shown (in addition to the close button if enabled).
Choice # Label The text to display on the button. Keep this text short as there isn't much room.
Cost of Choice # The weapon fires discrete hitscan projectiles.
None The player is free to select this button. It will always be enabled.
Key The player must have and spend some number of keys to select this button.
Cost (Key) The cost in keys to select this button.
Health The player must have and spend some number of health points to select this button.
Cost (Health) How much HP to remove from the player when they press this button.
Item The player must have and spend some number of a given item to select this button.
Item Cost The specific item that the player must pay to press this button.
Cost (Item) How many of the chosen item must be spent to press this button.
Trophy The player must have and spend trophies to select this button.
Cost (Trophy) The cost in trophies to select this button.
Show Close Button Whether or not to use the close button on this popup.
Close Button Text The text to display on the close button. Examples would be things like "Close", "Cancel", "No thanks", etc depending on the context of the popup.

Actions

Each button can be given a set of actions to run when the player selects it. More Display Popup actions can be added to each button to create a simple, one-way dialogue tree.

If a popup is opened within a set of actions, the actions after the Display Popup Action will wait until the popup is closed before they are run.