Behavior Manager

If you liked this item, please rate it up on Steam Workshop page.

Author: newman55

Last revision: 10 Sep, 2023 at 09:18 UTC

File size: 6.14 KB

On Steam Workshop

Description:

Helps update behavior for units and blueprints.

8 functions

  1. Save this behavior to the library
  2. Load behavior from the library for selected units with the same behavior name or id and start
  3. Load behavior from the library for all units with the same behavior name or id and start
  4. Load behavior from the library for all blueprints with the same behavior name or id
  5. Copy this behavior to all units with the same behavior name or id
  6. Copy this behavior to all blueprints with the same behavior name or id
  7. Go to next unit with the same behavior name or id
  8. Assign ID to this behavior and to all in the library if possible. First add @ to the end of the behavior name

First, the mod can save and load a behavior from the library by searching for the behavior’s name.
Second, the mod can save and load a behavior from the library by searching for the behavior’s ID, ignoring the name.

The search depends on which unit is selected. If it has an id, it searches only by id, if not, then by name.

In order to create ID, you need to open the library and add @ to the end of the behavior name (before that, the behavior name of the unit and of the library must match). Select a unit with the same behavior name and in the behavior manager click the Assign ID button. After that, click the Load All button and the behavior along with the id will be copied to the unit (ID will be part of the name in the form example@1234). From now on, the component will know exactly where to look for its behavior. To skip the prediction window, hold down the shift key.

Demonstration

The advantage of searching by id is that it eliminates duplication by name and you can change the name and it won’t break the binding between behaviors.

For the correct use mod, it is desirable to pre-exclude duplicate behavior names in the library.