Garry's Mod

Garry's Mod

36 ratings
forceAlign - Star Wars: Force Alignment
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
49.556 KB
2 May, 2021 @ 2:48am
7 May, 2021 @ 2:49pm
3 Change Notes ( view )

Subscribe to download
forceAlign - Star Wars: Force Alignment

Description
forceAlign is a powerful and versatile system for tracking various point values tied to players. It's primary functionality is, of course, simulating the force alignment system from Star Wars: The Old Republic.

Want to see this in action? Join my development server!
IP: 147.135.121.227:27019



▬▬▬▬▬▬▬▬▬▬▬▬ About ▬▬▬▬▬▬▬▬▬▬▬▬
The intention of this addon is to encourage developers to integrate it into various gameplay elements of StarWarsRP servers, most notably to modify the functionality of force powers.
    Imagine Force Lightning that only works when you invest into the dark side, and having your damage output scale with your alignment.

    Imagine Force Heal turning into Force Drain/Vampire when you fall to the dark side.

    Imagine being able to tap into the dark side momentarily to change the functionality of your force powers.

The possibilities are endless with this system, and I hope it helps servers add more depth to force powers as a whole! Not only does forceAlign track light side and dark side points, it can create and track virtually any custom values you want! Add crew skills to your server, karma, whatever you can think of! Need to network only some of them? No problem!
Why make new get/set functions for new features when you can just have forceAlign manage and store new point values for you? forceAlign is your all-in-one lib for player float management!

If you don't have a capable developer to properly implement this, but wish to have such features added to your server, feel free to commission me for custom forcepowers on your favorite lightsaber system!

If you are a capable developer, there is extensive documentation provided in the config to make all your force visions come true!

If you have any trouble or confusion implementing this addon, or have suggestions for the future of this addon, don't be afraid to contact me through discord![discord.gg]

I have plans for expansion and improvement of this system in the future, including module hotloading and eventually direct forcepower controls. However, I've intentionally left these features out for the initial release of this addon because I have used them and still found far greater benefit to manually coding forcepowers with these tools in mind, and I want the community to at least make an effort to do the same before I make things too easy.


▬▬▬▬▬▬▬▬▬▬▬▬ Usage ▬▬▬▬▬▬▬▬▬▬▬▬
By default, there are a few ways to earn points:
  • Killing NPCs will earn you 10 points (by default) towards the side your switch is aligned to.
  • Killing players with the opposite alignment earns you 20 points (by default) towards the side you're aligned to.
  • There are a few entities available (mostly for testing) that can give you points as well.

To check all of your total point values, type "!alignment" in chat. It will put a fancy icon with the values for light/dark side points in the top right, and any other custom point values will be printed in chat if they are above 0.

To change your alignment switch, type "!alignswitch" in chat.
Alternatively, you can change the switch by simply clicking on the side you wish to change to on the hud itself.
(you can enable your mouse via the context menu (C by default), F3, or opening any other derma menu)


▬▬▬▬▬▬▬▬▬▬▬ Features ▬▬▬▬▬▬▬▬▬▬▬

The Alignment Switch
The cooldown for the alignment switch can be configured anywhere from seconds to days. It's good to have a little bit of a cooldown to prevent spam, but depending on usage you might want the switch to control allegiance and have it be a week out or something.

Sith Eyes
If your switch is set to the dark side, and your alignment is below a certain threshold, your playermodel's eyes will change to sith eyes, assuming the model has separated eye materials to swap out. Different sith eye materials can be applied to donators by adding their SteamID to the config. This feature, like every other part of this addon, can be configured and toggled off separately.
(sith eye material featured is from the Darth Malgus playermodel)

Reaching Max Alignment
If you reach max alignment on either end of the spectrum, you will earn a very subtle halo effect of either red or very light blue. This (and everything else you can imagine) is configurable, and designed to look different from the halo effects used in common force powers.
Reaching max points on one side can mean a few different things depending on configuration. By default, it will reset your points on the opposite side to 0 to allow you to achieve max alignment as well. Alternatively, you could have it set both sides to 0 when you max one of them out.

Falling Alignment
When you earn points that cause your alignment to drop (gaining light side points while aligned to the dark side or vice versa), 50% of those points you earned (by default) will be subtracted from whichever side you're alignment is balanced towards. This causes you to "fall" towards the center more easily, and can vastly extend playability. This, like everything else, can be configured and toggled.

Job Relations
  • Restrict certain jobs behind point thresholds!
  • Set certain jobs to have static, unchanging point values!
  • Default the alignment switch depending on job!
  • Restrict the entire system behind certain jobs!

... and more!
There are tons of additional features throughout the config, just unpack this and throw it in your server. The only thing you need in your workshop collection is the content in Required Items. Unless you choose to reskin or hide UI elements, which is also easily configurable.


▬▬▬▬▬▬▬▬▬▬▬ Some Math ▬▬▬▬▬▬▬▬▬▬▬
Just like in SW:TOR, your alignment is calculated as:
(Light Side points) - (Dark Side points)

This means a dark side alignment will always be a negative number. Alignment tiers are also implemented to break up thousands of points into smaller brackets that can be calculated with instead of all those big scary numbers. Just like in SW:TOR, the default tier thresholds for each side (+/-) are:
  1. 1000
  2. 2000
  3. 4000
  4. 6750
  5. 10000

So Light IV requires your alignment to be at or above 6750, and Dark II requires it to be below 2000.
(Sooner or later I'll get around to adding a notification for the player when you pass a threshold)

Of course, just like everything else in this addon, it is all heavily configurable. Documentation on everything can also be found in the config.


▬▬▬▬▬▬▬▬▬▬▬▬ Credits ▬▬▬▬▬▬▬▬▬▬▬▬

Map featured is rp_vardos_v2 by FallenLogic

Thanks to Raiden for ripping the materials from SW:TOR for me
Reward notification gradients were custom made by me

All SW:TOR assets © Electronic Arts and/or BioWare and/or Disney



▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Join my development discord for commissions, purchasable addons, lua lessons, coding help, and more![discord.gg]
https://discord.gg/svY4AdSEtm
7 Comments
Dank  [author] 5 Jul, 2023 @ 9:21pm 
It's not feasible to modify forcepowers externally, you have to modify them yourself using the tools this addon provides.
B1TTERSWEET 5 Jul, 2023 @ 9:02pm 
so does this work with lscs?
Dank  [author] 21 Mar, 2023 @ 8:34am 
I did rewrite the code you made lol all that's left is the materials
S E G U F I X 21 Mar, 2023 @ 3:48am 
I've also made some dev on it, not only ripped materials xD
Mochi 13 Jun, 2021 @ 7:59am 
Will try this on my server! Looks promising!
Patrick the Legendary 9 May, 2021 @ 12:54am 
stop the darkness
Cren 4 May, 2021 @ 5:38am 
So much possibilities!