unitystation icon indicating copy to clipboard operation
unitystation copied to clipboard

The Character Attributes Plan

Open MaxIsJoe opened this issue 2 years ago • 0 comments

I've said I'll make a new issue explaining this rework more in depth, so here it is.

Note: As of early 2023, this rework has been put on hold. Other contributors may grab the torch and continue working on this, but as of right now; I do not feel like working on it,

Explaining

Purpose

Character Attributes is a generic system that defines what players and NPCs are, which allows UnityStation and future forks to freely create different designs for features and data in a modular, non-destructive and git-friendly way. Attributes are like tags that define what this player/NPC is and what kind of behaviors they should possess when they own an attribute.

Ease of use for designers, modding and forks

Not all forks in the future will follow the traditional /tg/ or unitystation occupation/antag system, Character Attributes allow everyone to design their forks easily without touching a lot of unitystation code that may cause merge conflicts in the future. With this fluid system, changing things is a matter of creating a character attribute prefab and (optionally) assigning custom behaviors to that attribute. Attribute behaviors are extremely modular and contained, people will be able to use pre-existing behaviors that we will create for them or create their own without worrying about any branches conflicting with each other. This will also allow us to even create character attributes that work with the addressables system, allowing for custom mods for servers in the future without having to re-build the game from scratch and redistribute builds on stationhub; which will also possibly allow us to make a steam workshop in the future.

Adminbus power and responsibilities

Some servers like Hippie Station used to have an entire dedicated playerbase around admins abusing SS13's extremely tunable systems from the admin tools that allow them to create a lot of extremely chaotic events that are not possible elsewhere. Character attributes will allow us to create entirely new mobs, antagonists and roles in the future at runtime. Just like on SS13.

But sometimes these things aren't just about having fun; Character Attributes will allow server owners to disable or adjust problematic behaviors that might cause game breaking bugs until the coffee drained engineers work out a fix for the next update. These tools will give admins finer control over the game to make the experience as smooth and as customizable as possible for everyone.

Note: a lot of functionality that SS13 has will not be implemented here until we have a proper admin ranking system

Cleaner code, Lesser bugs.

Behaviors are designed to hold one single generic responsibility, as a result; a lot of our code will be broken up into manageable sections that are easy to both maintain and develop for in the future. This is important for future forks and mods that require the ability to add new or adjusted functionality as explained before, and important for newcomers who might want to contribute to unitystation but might be thrown off by ugly code structures and practices. This will make debugging easier as well because of how easy it will be to pinpoint issues and will reduce the likelihood of bugs emerging from new PRs.

The Plan

The slow roll

  • [X] Figure out a way to spawn players with character attributes.
  • [X] Make Character attributes opt-in until the system is feature full and tested heavily on staging.
  • [ ] Recreate all the standard crew member roles to use character attributes.
  • [ ] Port over all on spawn systems to character attribute behaviors.
  • [ ] Allow CharacterSettings to hold CharacterAttributes
  • [ ] Add a test option for players spawning with a Blind Attribute and a Paranoid Attribute for testing.

Parity and Showcase

  • [ ] Make the role slot system make use of character attributes on characters so that we don't have infinite captains.
    • (optional) Figure out a way to make this system as flexible as possible for all kinds of roles, not just crew members.
  • [ ] Implement the quirk system to showcase the abilities of character attributes.
  • [ ] Ensure polish and 1 to 1 parity with the old systems.
  • [ ] Fix old issues that existed in the old code and make those fixes exclusive to character attributes only.

Note: if Bod's mind rework has gone far enough, add wheelchairs and paraplegic players with the new quirk system

Antags and Nuking old code.

  • [ ] Nuke old spawn code
  • [ ] Port all antagonists and their behaviors to the new character attribute system.
  • [ ] Ensure all systems and admin tools no longer use Occupation.

The Future.

  • [ ] Announce this major rework as done and ping people on discord to come play the game and test everything normally.
  • [ ] Discuss with other developers what to do about runtime attribute tools for admins and server owners.
  • [ ] Create a system that loads in character attributes and custom behaviors using the addressable system.
  • [ ] Showcase its use in fork projects like UnityMarines and UnityFallout.
  • [ ] Write extensive documentation about the character attributes system and the most important behaviors.

MaxIsJoe avatar Nov 12 '22 05:11 MaxIsJoe