kinggath / workshopframework Goto Github PK
View Code? Open in Web Editor NEWRedesign of the FO4 Workshop Scripts
Redesign of the FO4 Workshop Scripts
Allow other mods to intercept and negate the default attack. This will allow them to use their own formula for deciding if an attack occurs, or just creating their own attack instead.
Important to educate folks on the way the attack system works as it's actually on a delay, where TriggerAttack essentially just cues up an attack for some number of game hours later.
I've tried to get in touch a couple of other ways but I found this project here which might be better. Sorry, not being impatient just seeing progressively better contact options :)
I'm looking to get a feature added to WSF to address the problem with room bounds @kinggath posted about here:
https://forums.nexusmods.com/index.php?/topic/6183538-baffled-i-am-haunted-by-invisible-objects-at-internal-settlements/page-5
I'm building an interior settlement in the CK & this bug has killed it.
I'm having CK compiler issues so I'm hoping something can be incorporated into WSF possibly as an MCM option to perform the disable / enable workaround, presumably as a manual MCM option or detecting the player being in workshop mode in an interior cell.
Do note though I've seen an issue where if this is done while the item is highlighted in workshop mode the placed object will appear but have no collision. The object will need disabled & re-enabled outside of workshop mode to fix this. I need to do more testing but as long as the item isn't highlighted it appeared to work fine.
I currently use WSF & WS+.]
Settlers assigned to a vanilla crop don't get autoassigned to a bunch of other crops correctly.
User is claiming Northland Diggers used to deposit things into the workbench, but isn't any longer. My experience with that mod is that you always had to manually harvest things.
Confirm either way and if it is a compatibility issue, look into a fix.
Possibly even a manual assignment feature?
Going to use the Issues tracker as kind of a Developer forum for this mod.
Feel free to post suggestions, as well as bugs. Things like new features you'd like to see this make possible, or if you see something really foolish in my code - i definitely want to resolve it!
Provisioners, Pack Brahmin, and Caravan Guards were retaining their names after reassignment due to a missing "Clears Name When Removed" flag on the aliases in the Workshop Parent quest. (Bug #19653)
Trying to figure out why the WorkshopEnemyFaction was also altered.
By default, the "basic resource consumption" setting allows settlers to only consume two things: everything in the WSFW_VanillaBuildableCrops
FormID list and Purified Water. The former is very easy to patch for mods that change crop outputs, but the latter requires an override of the WSFW_ProductionManager
quest record itself, which is far from ideal.
In my example, I need to replace WaterPurified
with WaterDirty
, and I would really appreciate being able to do this through a FormID list change. This would also allow the user to expand what's considered to be a basic water resource - for example, making both purified and dirty water eligible for consumption.
For example, allow things such as a container that pulls food and drinks
This can be anything like a final reorder after all the changes other mods do to the menus. If hiding menus is impossible then perhaps reordering will be good enough.
Perhaps we can forego inter-level reorganization and go with same level reorganization.
I guess, making WF specific keywords for menus would help in reorganization in addition to the current ones. I don't know, you will figure out something.
In future, it can be enhanced with profiles for specific settlements or characters.
We've tested SS2 extensively and it works pretty well in Fallout 4 VR The only issue we're having is the workshop framework is displaying a version warning and sometimes causing F4VR to lock up to start-up. We wanted to ask if there will be a way of either compiling a VR specific version or allow an override so the warning never appears.
XX007AFB - WSFW_ProductionManager, WSFW's production management quest script, has caps coded in the quest script's parameters.
Changing this to point at the vanilla leveled list (0010C846 - WorskhopProduceVendorIncome) would improve WSFW's goal of transparency with other mods (Horizon). Any mod could change that one vanilla leveled list to change income and not be required to override WSFW's quest script.
I had already reported this on discord, but I figured it would be easier to track here. Thanks!
Or rather, an option to turn off its affect on happiness. The shelter mechanic is very buggy and rarely reflects the reality of the settlement.
This mod is being listed as open source on Nexus, but I donβt see what open source license is being used for it.
Is this declared somewhere that Iβm missing?
Allow mods to register an ini setting change that would kick in every time the game loaded.
UFO4P rewrote several signatures instead of creating internal versions and calling those. Fix this.
Currently, we are storing PowerRequired as a secondary WSFW_PowerRequired AV that can be looked up if PowerRequired returns 0 when fetched remotely.
Unfortunately, our secondary AV is also coming up as zero sometimes. We need to switch to a script property that only gets updated either deliberately (ie. some mod calls a function to modify it, such as SS2 when a plot upgrades), or it can be updated during a resource recalc only if the settlement is loaded.
Simple enough.
Not all settlements are created equal, so having one hard limit for every settlement does not really work, and having to manually turn off the radio might be too late, not to mention you might be questing too far away to bother.
I know there's an unemplyed settlers limit as well, but again, it's probably too late by the time this one becomes relevant.
Limiting population to the number of beds means the player can easily control how much they want to grow each specific settlement, and also plan it ahead of time.
A settlement with little space like hangman's alley will remain small unless the player deliberately wants to cram it full of bunk beds.
WorkshopFramework/Scripts/Source/User/WorkshopFramework/Library/UtilityFunctions.psc
Lines 1173 to 1197 in 1c84937
return ReturnIndexes
?The code appears to be intended to increment WorkshopRatingPopulationUnassigned by one.
Instead, it looks like it is setting it to one. I think the author meant to use ModValue instead of SetValue?
; update workshop rating - increment unassigned actors total
theActor.SetValue(WorkshopRatings[WorkshopRatingPopulationUnassigned].resourceValue, 1)
The changelogs haven't been updated since December.
The purpose of this is to remove the need to patch the new settler records. Since Horizon removes most of their inventory.
When you are away from a settlement that has unassigned resource objects, when you query for that resource type (ie. Food, Water, Defense, Beds, Power), it will return the total unassigned resource value times negative one, all assigned resources are ignored!
So for example, let's say a settlement has 13 assigned food worth of items, and 18 unassigned food items, when querying the settlement workshop for its food value remotely, it will return -18, rather than 13.
Could we account for this somehow? Otherwise, not only is the pipboy data wrong, but other systems remotely querying for this info are probably getting bad information.
Something very simple:
Function RegisterMenuSpecial(Formlist TargetMenu, Form InjectKeywordOrFormlist)
WorkshopMenuInjection mi = new WorkshopMenuInjection
mi.TargetMenu = TargetMenu
mi.InjectKeywordOrFormlist= InjectKeywordOrFormlist
RegisterMenu(mi)
EndFunction
(the function name is a placeholder, I can't think of anything good right now)
This way, you could do this:
ScriptObject smmMain = Game.GetFormFromFile(0x1143E, "WorkshopFramework.esm")
if(smmMain)
Var args = new Var[2]
args[0] = myTargetMenu
args[1] = myInjectMenu
smmMain.callFunction("RegisterMenuSpecial", args)
endif
These are the ones I found so far in my playthrough (updated to 2.0.2c)
concord door flipped (behind Nick). Main road comming from Red Rocket π
another one, looking at the museum
and another, just next to the museum
another on the street next to the fellon's
another in front of the workhouse
I'll post more if any pops up.
The DoorManager assumes a WorkshopID is set in it's HandlePlayerEnteredSettlement, in it's usage in bDoorRegistrationInProgress and bDoorRegistrationCompleted. This fails in Home Plate, and other mod-added playerhome-like workshops.
A simple solution would be to return right out of HandlePlayerEnteredSettlement, if no WorkshopID is found.
Alternatively, the workshop in question could be flagged with keywords or AVs, when the registration is in progress or completed. Don't know how to reset it, though, the way it currently happens with the iTimerID_CleanupDoorRegistration atm
Steps to reproduce:
Without WSFW. both food and water is added into workshop. Tested with only WSFW ( and F4SE) active.
I set up my water farm as I usually do and only got 9 Purified Water multiple times, no there are absolutely no other "Aid" items in my workbench, that all gets stored elsewhere (I'm experienced at water farming)
I have 160 water production, and 5 settlers (The default sanctuary settlers from concord/the minutemen), I have no other settlements linked to sanctuary either
I've seen this issue brought up elsewhere:
https://simsettlements.com/site/index.php?threads/bug-workshop-framework-seems-to-screw-with-surplus-resources.9934/
I have the latest version of workshop framework installed
The reason I installed it is because before I was trying out sim settlements 2 but decided it wasn't for me at the moment so I started a new game with it uninstalled and forgot to uninstall workshop framework (I assume it's unsafe to uninstall)
Add support for some settlements to be excluded from Claim All Workshops. Settlements like HQ in SS2 and the virtual settlements in the CC mods should not be getting claimed by this tool.
Note: Fallrim tools shows the save as completely 'clean' (I think).
Just started a new game with minimal set of mods, got back to Red Rocket after first Concord quest, saved the game and boom CTD on trying to load it from clean start. Pretty sure it is caused by 'using' the Workshop (in RR) for the first time!?
A few days ago I updated 'Workshop Framework' from 1.2.0d to 2.0.1a (Seemed like a good idea at the time). It would appear that 2.0.1a corrupts something after using the workshop for the first time!
Update: Ok apparently NOT the reason! Just trying again with old 1.2 version and had 2 more saves that won't load. Thought first one might be cause I used workshop early but confirmed that this was not the case with second save def. Before using workshop. I am at a loss now. Seems almost completely random and with no real rhyme or reason??!! ^%$^$%!
Update/thought: Could this be something to do with MO2 / Steam or even Windows Combos (or even Nvidia 2070). I may also try validating Fallout 4 files in Steam!? It is also NOT consistent, next save after problem one - works ok!?? So it is not even a specific mod! In fact may have nothing to do with mods at all!?
Update (10/07): After some extensive testing I think I have identified at least one Mod causing problems. Sods law says that it of course one that I didn't want to go without. Mod in question is 'Better Settlers' and I will pursue problem thru Nexus!
This is most likely a UFO4P issue, but since WSFW is forwarding the fixes, I'll bring it to your attention.
WorkshopFramework/Scripts/Source/User/WorkshopObjectScript.psc
Lines 1036 to 1074 in 60524f6
ObjectReference myDamageHelperLinkedRef = myDamageHelperRef.GetLinkedRef()
if myDamageHelperLinkedRef && myDamageHelperLinkedRef == self
return
else
WorkshopParent.wsTrace(self + " UFO4P_ValidateDamageHelperRef - myDamageHelperRef not linked to me; relinking")
myDamageHelperRef.SetLinkedRef(self)
endIf
if myDamageHelperRef
is none, this will try to set a linked ref and later in the code, a new one will be spawned leaving myDamageHelperRef orphaned and enabled.
To me, it should be:
ObjectReference myDamageHelperLinkedRef = myDamageHelperRef.GetLinkedRef()
if myDamageHelperLinkedRef
if myDamageHelperLinkedRef != self
WorkshopParent.wsTrace(self + " UFO4P_ValidateDamageHelperRef - myDamageHelperRef not linked to me; relinking")
myDamageHelperRef.SetLinkedRef(self)
endif
return
endIf
when log in i get message that one or more mod are over writing Workshop Framework and that i can get the fix file
from Workshop Framework on nexus, the Workshop Framework Script Override or us the auto sorter on vortex load up my save and there is the message still so tell me please how to fix this
For old hands, the tutorial at the beginning is basically screen spam. Add a tool in MCM/holotape to shut down the workshop tutorial quest that controls those messages
How do you import a WSFW export file into a workshop? It says there are no available plans to import. I'm curious, why if WSFW exports a file, why can't it see the same file on Import? Speaking as a very experience (decades) programmer.......
Hi, I recently downloaded workshop framework and sim settlements 2 and both the mods do not stay enabled. I also used vortex and it show that the mods are enabled but not in the game mods menu. But other mods are working fine. I have the version 1.10.138, I'm gonna update to 1.10.16 and see.
Currently Workshop Framework always uses either 10 or 10 + charisma for the settler maximum and as far as I could tell there is no way to change that. Would it be possible to respect the iWorkshopSettlerPopulationMax setting (so if iWorkshopSettlerPopulationMax=15 then the maximum would be either 15 or 15+charisma) or if that is not possible at least add a slider to set the maximum base population.
In some contexts it makes sense to take things from the phantom vendor and that counts as your selection. In some other contexts it makes sense to give things to the phantom vendor and that counts as your "selection".
In NPCManager
AddNewActorToWorkshop
it does not check for (WSFW_Setting_AutoAssign_Beds.GetValueInt() == 1) as Bool
before calling TryToAssignBeds
WorkshopFramework/Scripts/Source/User/WorkshopFramework/NPCManager.psc
Lines 690 to 693 in affc4fa
if(iNewWorkshopID == iCurrentWorkshopID && (WSFW_Setting_AutoAssign_Beds.GetValueInt() == 1) as Bool)
WorkshopParent.TryToAssignBeds(akWorkshopRef)
endif
Wim95 reported this here:
https://simsettlements.com/site/index.php?threads/auto-assignment-still-happening-after-disabling-in-mcm.17775/post-127801
In quite a few of my games I have encountered some glitch where CurrentDraws
is set to a negative number. (unable to determine if it is WSFW or SS2) This maxes out the build limit gauge and you are no longer able to build. The adjust build limit function does not fix this.
So my suggestion is to add some code and a message here. (unless there is a better place to put this check)
WorkshopFramework/Scripts/Source/User/WorkshopFramework/MainQuest.psc
Lines 406 to 408 in affc4fa
elseif(iChoice == 2)
; build limits
CheckWorkshopCurrentAVs(akWorkshopRef)
PresentIncreaseLimitsMenu(akWorkshopRef)
Function CheckWorkshopCurrentAVs(Workshopscript akWorkshopRef)
; check workshop current draws and triangles for negative values
ActorValue WorkshopCurrentDrawsAV = WorkshopParent.WorkshopCurrentDraws
ActorValue WorkshopCurrentTrianglesAV = WorkshopParent.WorkshopCurrentTriangles
float fCurrentDraws = akWorkshopRef.GetValue(WorkshopCurrentDrawsAV)
float fCurrentTris = akWorkshopRef.GetValue(WorkshopCurrentTrianglesAV)
if ( fCurrentDraws >= 0.0 || fCurrentTris >= 0.0 )
; values are good
return
endif
; show new message saying either player has a build limit adjusting mod or something glitched. If they have a build limit adjusting mod, remove it and start a new game.
; 0 = do nothing
; 1 = fix errors
int iMenuSelection = NewMessageCurrentAVError.Show()
if ( iMenuSelection == 0 )
return
endif
; code to fix currentDraws / currentTris being negative
if ( fCurrentDraws < 0 )
; reset AV
akWorkshopRef.SetValue(WorkshopCurrentDrawsAV, 0.0)
endif
if ( fCurrentTris < 0 )
; reset AV
akWorkshopRef.SetValue(WorkshopCurrentTrianglesAV, 0.0)
endif
EndFunction
Or would it be better just to quietly fix the error and omit the message?
Things like the sorting containers need the Transfer Settlements Ignore keyword added.
As title says, looks like the wrong actor value is used here.
Now that the DailyUpdate hits all settlements very quickly, the attacks can all happen at the same time. Move the attacks out of the DailyUpdate loop and spread them out around the day.
In the base game, settlers could only consume certain food and water. We had switched this to allow them to consume anything, due to the way the injection code will allow mods to override the default food/water.
Instead of automatically doing that, set it up to default to use the WorkshopConsumeFood/WorkshopConsumeWater keywords, and give the player/mods an option to switch to using ObjectTypeFood/ObjectTypeWater.
As title states. The build limit in Sanctuary is resetting to 100% when loading a save. I have tested 200%, 300% and 400% and it resets back to 100% when loading any save. Not happening on fast travel.
I have rolled back to 2.2.1a and the issue does not occur there.
There is no reason to edit the vanilla records! You can just use GetFormFromFile to load up the new properties you need instead of editing any of the quests!
Heya,
I'm investigating an issue, and I think the problem is that the WSFW is detecting FreshFacials (or Orphans of the Commonwealth), and not running injection.
Both of these mods updated recently, and now include patches that take advantage of the injection framework. I'm assuming that the override you setup is actually preventing these patches from working properly.
Since WSFW is editing workshop scripts, it could also address some issues with the settlement registration process.
The primary entry point could be ReinitializeLocationsPUBLIC, since this is where the Workshops array is modified, and it returns bool.
These extra checks could be done before actually modifying the arrays:
Special case:
Edit: this function isn't returning false on failure. But, if it never adds the workshop to the array and never subscribes to the events, it should work.
In this Function on WorkshopScript
WorkshopFramework/Scripts/Source/User/WorkshopScript.psc
Lines 2018 to 2039 in affc4fa
if(WSFW_Setting_CapMaxNPCsByBedCount.GetValue() == 1)
iMaxNPCs = GetBaseValue(Beds) as Int
endif
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.