Skip to content

Button Maker

Ar3sgice edited this page Sep 24, 2020 · 6 revisions

Button Maker

https://ar3sgice.github.io/eudtools/Include/ButtonMaker.html

It is a tool that generates triggers to edit the command buttons.

How to use Button Maker

Edit each unit's buttons, then click Generate JSON.

After you have the JSON generated, click Generate Trigger.

Put the generated triggers in SCMDraft Trigger Editor to make it work.

In addition to buttons

You also have to modify Dat Requirements for the buttons to work, most of the case.

EUDTools and EUD Editor 3 Dat requirements do not seem to be compatible, so assuming everyone except me will be using both programs together (*), I wouldn't elaborate on how to use EUDTools's requirements editor.

Just use EUD Editor 3 for this. Always change to Always Use if you're not sure what to do.

Player, Conds, and Actions

Player and Conditions should be straightforward. Actions are added to the end of EUD Actions for cases you'd want to, for example, set Switch 143 to edit buttons and clear Switch 143 afterwards.

If you leave Player field empty, it will skip the trigger formatting process and output only EUD actions.

Offset

It should be a pointer that points to an empty region to fill the button data.

When you use this tool for two or more times, you should keep memory data distinct for button data to not conflict with each other.

It will tell you what the next offset will be after generating the triggers. You should remember or save the information somewhere.

Sorting

It sorts buttons based on their positions.

You should always sort your buttons. Sometimes (most times) buttons don't work or gets displayed in the wrong place if you don't sort them.

Redirecting

It sets one unit's buttons to another unit's. For example, choosing Terran Firebat and clicking Redirect will make the current unit use all buttons from Terran Firebat.

Click Cancel to remove the redirection.

You cannot edit the buttons if they are in redirected mode. Buttons will be highlighted in blue in this case.

Saving and Loading buttons

Save the JSON in a text editor. When you paste JSON in the JSON output area the data will get loaded.

Changing unit command buttons dynamically

You can set buttons for some unused units and use redirects.

Redirect triggers are only 2 lines, which can be inserted anywhere. They're always generated at the end of the triggers, pretty obvious.

Just remember that you need the other edits for this tool to know where the edited buttons are. If you set only redirects ("buttons" is empty in JSON), they will be redirected to the "original" buttons, not the edited ones.

Icon and String

These two differently colored words are links that open a reference page for icons and status strings.

Options in Add Button

Copy Current adds a button based on the current displayed parameters. You can select a button and use Copy Current to add it on another unit.

Basic Unit Commands adds 5 buttons including Move, Stop, Attack, Patrol and Hold Position.

Copy From copies all buttons from the target unit.

(*): I'm having a stronger assumption that no one else will ever use this, or read this tutorial.