`ds.toml` - ItsDeltin/Overwatch-Script-To-Workshop GitHub Wiki

Including a ds.toml file at the root of your project folder can allow developers to configure various aspects of an OSTW project.

The configuration values and their descriptions follow:

  • entry_point: Static entry point rather than the current file. (default unset)

  • reset_nonpersistent: If true, OSTW will not assume that all variables are zero by default. This can be used to save & load games by copying the current global variable set as actions.

  • paste_check_is_extended: Determines if the __loadPersist variable is placed in the extended collection. I strongly recommend leaving this to the default. (default false)

  • track_class_generations: Improves class references so that every type of invalid pointer can be detected at runtime. This will increase element count a little.

  • global_reference_validation: Checks class pointers when they are accessed. If the reference is invalid, the file and line of the OSTW code is logged to the inspector and the rule is aborted. By default this will only detect null or 0 references, but with track_class_generations enabled it will detect any type of invalid pointer. Increases element count by a lot.

  • reference_validation_type: Determines if the code generated by global_reference_validation is placed inline at every check or in a shared subroutine. Subroutine variant reduces element count from validation by 30%.

  • new_class_register_optimization: Code like a = new MyClass() will be optimized so that the a value which is already being overridden is used to assign to the heap, rather than creating a new register.

  • abort_on_error: If an invalid class reference is found when global_reference_validation is enabled, this determines if the rule should be aborted.

  • log_delete_reference_zero: Prints an error to the workshop log when you attempt to free up memory with a null class reference. (default false)

  • c_style_workshop_output: Uses the newer workshop syntax (Global.x = Global.a + Global.b ) instead of the old version (Set Global Variable(x, Global Variable(a), Global Variable(b))). (default false)

  • compile_miscellaneous_comments: Determines if ostw will add extra comments to the workshop output (ex. rule action count). (default true)

  • out_file: Writes the workshop output code to this file. (default unset)

  • optimize_output: Controls whether the output workshop code is optimized. (default true)

  • use_tabs_in_workshop_output (default false)

  • subroutine_stacks_are_extended: Determines if the ostw-generated workshop variables used to track a subroutine's outer class reference will be extended. (default false)