# Ditto's code: Code Ditto

**URL:** <https://feuniverse.us/t/dittos-code-code-ditto/27061>\
**Category:** Resources\
**Tags:** fe8\
**Created:** [September 4, 2024, 9:10pm UTC](https://feuniverse.us/t/dittos-code-code-ditto/27061 "2024-09-04T21:10:32Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![ditto](https://feuniverse.us/user_avatar/feuniverse.us/ditto/32/89529_2.png) [@ditto](https://feuniverse.us/u/ditto)\
**Post date:** [March 5, 2025, 5:43pm UTC](https://feuniverse.us/t/dittos-code-code-ditto/27061/18 "2025-03-05T17:43:14Z")

</div>

# Set Unit Status rewrite

Download: [Set Unit Stats](https://github.com/ditto-salsa/CodeArchive/tree/main/Regular%20Engine%20Hacks/SetUnitStats)  
Installation is as simple as `#include`ing the .lyn.event.

Does what it says on the tin, includes 2 event ASMCs:

`SetUnitStats` sets byte (in `s1`) of the desired unit’s (charID in `s2`, takes special inputs like (-1)) struct to a value (in `s3`).

`GetUnitStats` gets byte (in `s1`) of the desired unit’s (charID in `s2`, takes special inputs like (-1)) struct and returns it in `sC`.

Did this because I couldn’t be bothered trying to mangle 7743’s SetUnitStatus into my buildfile. Works for builder as well if any of those users are displeased with the weird restrictions on SetUnitStatus.

---

_[View the full topic](https://feuniverse.us/t/dittos-code-code-ditto/27061)._
