Space Engineers

Space Engineers

Not enough ratings
Faction Tracers
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Other
Tags: hud
File Size
Posted
Updated
254.053 KB
24 Oct, 2024 @ 10:23am
30 Oct, 2024 @ 12:59pm
8 Change Notes ( view )

Subscribe to download
Faction Tracers

Description
Allows you set colored tracers on a per faction basis.

Usage:
!FactionColor - Prints help text
!FactionColor [COMMAND]

Where COMMAND is:
help - prints help text
register TAG - Turns on colored tracers for the faction with the tag TAG
unregister TAG - Turns off colored tracers for the faction with the tag TAG
setdefault TAG COLOR - Sets a fixed default color for a faction
setdefault TAG clear - Clears the default color for a faction
set TAG COLOR - Sets a local color for a faction
set TAG clear - Clears the local color for a faction
flush - cleans the various lists of "dead" faction tags.
(If players changed the tag name or deleted a faction)
list - Lists all the currently registered factions and their colors

NOTES
register, unregister, and setdefault all require admin to use
flush will only clear the default color and registered lists if the user is an admin

COLOR is in HTML color format #RRGGBB
Tracer colors default to the background color of the faction icon if no default or local value is set.

For Single Player:
The list of registered factions is world specific.
The list of default faction colors is world specific.
The list of local colors is global for all worlds and servers.

On Dedicated Servers:
The list of registered factions is global for the world.
The list of default faction colors is global for the world.
The list of local colors is specific to a client.

This means that if you don't like the color you are seeing for a faction you can override it for yourself with the 'set' command. That color will only show for you so if you decide the pirates are hot pink but the server has them set a dull red don't be surprised if people are confused when you talk about incoming pink fire ;)

Your local overrides should persist between different worlds and servers so if you want the pirates to always be hot pink use the 'set' command to make it so.

KNOWN ISSUES
Not compatible with Weapon Core. It will crash the moment any entity shoots.
I highly doubt I'll be able to fix this just because of the nature of how I'm doing the per-faction colors.

FUTURE PLANS
I plan to add colors for both Hostile and Friendly entities that will be used if no faction is set for those.

Acknowledgements
Remaarn - Contributed some code clean up and a fix for a crash

Discord
Sign me up![discord.gg]

Tip Jar
Patreon[www.patreon.com]
Popular Discussions View All (1)
0
30 Apr @ 7:46pm
Crash after recent Fieldwork update
Dragon Fire 813
9 Comments
TheFool76  [author] 11 May @ 1:53pm 
I removed the extra log bits after copying them to reduce the clutter in the comments
Dragon Fire 813 30 Apr @ 3:22pm 
Why Steam do you do this to me
Dragon Fire 813 30 Apr @ 3:22pm 
Also I just noticed that the other 2 parts of the initial log I posted aren't there any more
Dragon Fire 813 30 Apr @ 12:51pm 
Same here up until a little bit ago. I will try to get the log and put in a discussion a little later
TheFool76  [author] 30 Apr @ 11:34am 
@Dragon Fire 813
I'd need more info such as what other mods you were running and the exact thing you were doing when the crash happened.

The mod ran fine when I tested it after the update.
Dragon Fire 813 30 Apr @ 11:00am 
I just had a crash involving your mod. Here is the log:
2025-04-30 12:55:24.312 - Thread: 1 -> var exception = System.IndexOutOfRangeException: Index was outside the bounds of the array.
at TF76.FactionTracers.FactionTracers.CheckProjectile(MyProjectileInfo& projectile, Int32 index)
at Sandbox.ModAPI.OnProjectileAddedRemoved.Invoke(MyProjectileInfo& projectile, Int32 index)
at Sandbox.Game.Weapons.MyProjectiles.AddInternal(MyWeaponDefinition weaponDefinition, MyProjectileAmmoDefinition ammoDefinition, Vector3D origin, Vector3 initialVelocity, Vector3 directionNormalized, MyEntity ownerEntity, MyEntity
Arara 7 Nov, 2024 @ 2:37am 
Got it. I'll be happy if it's successful. Again, nice mod! thank you!
TheFool76  [author] 6 Nov, 2024 @ 12:11am 
Those projectiles use a different system and act more like missiles instead of bullets so getting them to work is a bit more involved.
Arara 3 Nov, 2024 @ 3:41am 
Nice! Can this be applied to Artillery and Assault Cannons as well? How about rocket or railgun sabot?