Zorkaz Posted July 13, 2022 Share Posted July 13, 2022 Has someone found a way to decrease happiness with a workshopobject?I tried "WorkshopRatingHappiness -20" and "WorkshopBonusRatingHappiness -20" but to no avail Link to comment Share on other sites More sharing options...
RaidersClamoring Posted July 13, 2022 Share Posted July 13, 2022 I assume you are modifying Actor Value in which case you should add an "s" to the beginning. sWorkshopRatingHappiness.If directly trying to subtract doesn't work, how about trying: Actor player = Game.getPlayer()Float i = player.GetValue(sWorkshopRatingHappiness)Float x = 20.0 player.SetValue(sWorkshopRatingHappiness, (i - x)) ----- Although, this *should* work:Actor player = Game.getPlayer()Float i = player.GetValue(sWorkshopRatingHappiness) player.SetValue(sWorkshopRatingHappiness, (i -= 20)) Also, ConsoleUtil is a great F4SE plugin that lets you access the Console in various ways. If it still refuses to work, using this you can execute: (EDIT: some typos) ConsoleUtil.ExecuteCommand ("player.SetAV sWorkShopRatingHappiness " + (i - x))or ("player.ModAV sWorkShopRatingHappiness -" + x) Link to comment Share on other sites More sharing options...
hereami Posted July 13, 2022 Share Posted July 13, 2022 From my experience in general, AVs are troublesome with negatives, like you need Detrimental mgef and can't ADD negative modifier in OMODs. Maybe similar happens when workshop fetches a negative rating AV too and treats it as zero, even if tha's scripted processing? Just an assumption though. Link to comment Share on other sites More sharing options...
Zorkaz Posted July 13, 2022 Author Share Posted July 13, 2022 I'm using this on a workshop item. Sadly any script using actor values requires you to use an Actor. Hence a script can't directly alter the value on a workshop object. It does show that the workshop happiness is going down, with a down arrow. But the value still stays 80 as before Link to comment Share on other sites More sharing options...
SKKmods Posted July 13, 2022 Share Posted July 13, 2022 (6) The daily happiness change has a cap of 20% the desired change in value (WorkshopScript.happinessChangeMult). Example: it can take upto 17 WorkshopDailyUpdate cycle game days to slowly increase workshop happiness from base 50 to the capped 100 target. Link to comment Share on other sites More sharing options...
Zorkaz Posted July 13, 2022 Author Share Posted July 13, 2022 Understood. However I waited at least 5 days and nothing had changed in two testing workshops. Not even 1 point down, that's what worries me. Link to comment Share on other sites More sharing options...
LarannKiar Posted July 14, 2022 Share Posted July 14, 2022 (edited) I haven't examinated the happiness calculation that well but "WorkshopBonusRatingHappiness = - 20" should work. WorkshopScript: updateData.totalHappiness = updateData.totalHappiness + updateData.bonusHappiness The happiness calculation starts from line 958, WorkshopScript, function DailyUpdateConsumeResources. Did you try placing a lot of these "depressive" workshop objects? An interior workshop might be better for testing, especially if it has less resources. Edited July 14, 2022 by LarannKiar Link to comment Share on other sites More sharing options...
Zorkaz Posted July 14, 2022 Author Share Posted July 14, 2022 Only one per settlement, since I thought -20 should be a lot. I'll update this thread if it starts working Link to comment Share on other sites More sharing options...
Recommended Posts