Starbound

Starbound

评价数不足
Cosmetic Effects
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
37.873 KB
2024 年 2 月 21 日 下午 9:08
2024 年 2 月 22 日 上午 6:25
2 项改动说明 ( 查看 )

订阅以下载
Cosmetic Effects

描述
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 条留言
Anter583  [作者] 2024 年 10 月 9 日 下午 6:12 
It has a rather isolated design, incompatibilities are unlikely.
calamity 2024 年 10 月 9 日 下午 2:29 
is this FU compatible and also is it extended story compatible?
Boooo 2024 年 9 月 30 日 上午 4:33 
Yes, I opened starbound.config and adjusted the settings like

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

and cleared the error.
Anter583  [作者] 2024 年 9 月 29 日 下午 2:28 
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 2024 年 9 月 28 日 下午 11:53 
[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  [作者] 2024 年 7 月 18 日 上午 3:07 
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 2024 年 7 月 16 日 下午 12:29 
so how would i get one of these?
Anter583  [作者] 2024 年 2 月 26 日 下午 3:51 
It would work if i actually enclosed it in square brackets.

"statusEffectsC" : ["xenonglow"]
Anter583  [作者] 2024 年 2 月 26 日 下午 3:46 
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 2024 年 2 月 26 日 下午 2:07 
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: