Starbound

Starbound

Not enough ratings
Cosmetic Effects
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
37.873 KB
21 Feb, 2024 @ 9:08pm
22 Feb, 2024 @ 6:25am
2 Change Notes ( view )

Subscribe to download
Cosmetic Effects

Description
Modding resource that allows clothing items to optionally apply status effects when placed in the player's cosmetic slots.

Uses the variables statusEffectsC, leveledStatusEffectsC and currentAugment/effectsC instead of the conventional ones, allowing items and augments to designate what effects will be applied in each slot type.

Primarily intended for cosmetic & utility effects, applying defensive stats will break the game's balance.


I would also advise against turning this mod into a second set of functional slots, as implementing this via scripted slots is less performance intesive and requires less manual work.


Note that this mod makes heavy use of inventory calls to function, to my knowledge there's no way to get around using them for this type of mod without blocking off the vanilla slots and making scriptable ones through a different UI.
Inventory calls are very performance intensive, primarily when the item that's being returned has a lot of custom parameters attached.

I have done what I can to minimize the performance impact, this mod monitors how long it takes to complete an update cycle and slows down its own update delta if it takes too long.
This is in addition to caching the item's config file.

This will not mitigate the occasional lagspike, but it should prevent this mod from turning SB into a slideshow if an item with a lot of custom data is worn.


Item IDs affected by this mod:
  • crayonblueback
  • crayongreenback
  • crayonorangeback
  • crayonpurpleback
  • crayonredback
  • crayonyellowback
  • foundryguardchest
17 Comments
Anter583  [author] 9 Oct, 2024 @ 6:12pm 
It has a rather isolated design, incompatibilities are unlikely.
calamity 9 Oct, 2024 @ 2:29pm 
is this FU compatible and also is it extended story compatible?
Boooo 30 Sep, 2024 @ 4:33am 
Yes, I opened starbound.config and adjusted the settings like

"scriptInstructionLimit" : 40000000,
"scriptInstructionMeasureInterval" : 2500,
"scriptRecursionLimit" : 50,

and cleared the error.
Anter583  [author] 29 Sep, 2024 @ 2:28pm 
I don't think it's related, from what I've tested, the worst this mod can cause is a stutter when you wear an item with a lot of custom data.

A script delta change of 3-4 is kind of common due to the mod trying to keep a 4x headroom.
Boooo 28 Sep, 2024 @ 11:53pm 
[14:45:33.869] [Warn] antr_cosmeticEffects > Update time overrun, setting own script delta to 3

I'm getting the above error with severe performance degradation in certain places (gic starting base). I think I need to optimize the code of the antr_cosmeticEffects.lua script.
Anter583  [author] 18 Jul, 2024 @ 3:07am 
Most of the items this mod and its addon edit are mostly cosmetic or utility related.

Unfortunately, the only way to tell if an item has cosmetic effects is to wear it, I haven't been able to add an indicator to display them, as it will likely conflict with tooltip mods.


I posted the full list of affected item IDs in the description of both this mod and the utility addon.
lemon 16 Jul, 2024 @ 12:29pm 
so how would i get one of these?
Anter583  [author] 26 Feb, 2024 @ 3:51pm 
It would work if i actually enclosed it in square brackets.

"statusEffectsC" : ["xenonglow"]
Anter583  [author] 26 Feb, 2024 @ 3:46pm 
Same way you would put a normal status effect on an item, only you would add an extra "C" to the end of the parameter, all effects will work but none will show up in the description box.

For example if you add the following parameter to a clothing's config it will apply the xenon lamp's effect only while in the cosmetic slot, this can be combined with the normal statusEffects to get it to work on both slots.

"statusEffectsC" : {"xenonglow"}


Also, sometimes it might take a bit for the effect to update due to the performance protection, the script resets back to max update speed if you change worlds or relog.
Nootuxious 26 Feb, 2024 @ 2:07pm 
can you give some examples of what cosmetic and utility effects are available for me to use on my clothing? i understand it a bit but idk what cosmetic effects and which certain utility you can use :bottle::waycrystal::pragmium::sapphire: