0 of 0

File information

Last updated

Original upload

Created by

LarannKiar

Uploaded by

LarannKiar

Virus scan

Safe to use

Tags for this mod

About this mod

Console based debugger tool for Settlers.

Permissions and credits
About this tool:

First of all, it's not a mod. It's a debugger tool (a custom set of console commands) that can be used to debug (identify and possibly fix) NPC (mainly settler) errors.

This tool is designed especially for my recruitment mod series' (Recruit Virgil, Sierra Petrovita, etc.) recruitable characters but of course it works with any NPCs, both vanilla and mod added ones (which is not suprising considering that most of my recruitment mods allow players to recruit the "original" NPCs, not duplicates aside from some exceptions like Private Hart).

It can be configured to give feedback about function calls / display returned NPC data either in the form of a message box or print them directly as text to the Papyrus log (see SetDebugTypeIndex).


Why release a debugger tool:

Today, (on 2023.02.05., the day I wrote this description) I have about 30 recruitment mods with at least 45 named recruitable characters (plus the unlimited random encounter settlers and traders) on nexusmods. I decided to publish a debugger tool (which is actually pretty similar to the one I use) for these characters.

Even though I do my best to make my mods compatible with other settlement mods (especially with the "big titles"), occasional conflicts are inevitable. Either on the "record level" (e.g., Magnolia replacer) or "AI level" (e.g., "I have mod X that adds several quests for recruitable NPC Y and I can't assign Y."). So, I wanted to publish a tool that can easily identify conflicts and other possible errors. Of course, (while I know it is named "Settler Debugger"), later I decided to add many more features to it, such as the ability to manipulate the NPCs themselves.

Notes: the debugger isn't just for settlers, it can also edit/display many Actor-related data (which is applicable to all NPCs). For example, changing the essential and protected flags, refreshing the actor (3D reload [for the "brown face bug", animation glitches, etc.] with AI recalculation [if the NPC's being stuck on an obstacle]), force (instant) pathing to the AI target location, etc.


Request NPC Info:

[CQF SettlerDebugger IsWorkshopNPCScriptAttached RefID] ==> Returns [True] if NPC has WorkshopNPCScript.
  Example: [CQF SettlerDebugger IsWorkshopNPCScriptAttached 2F1F] would return [True] if Piper is considered to be a settler by the settlement system.
  Note: when another (non-recruitment) mod overrides the NPC's actor record, it usually clears the NPC's VMAD subrecord. This is where script data (e.g., commandability) is stored.
[CQF SettlerDebugger RequestFullInfo RefID] ==> Convenience function: returns instantly everything.

[CQF SettlerDebugger IsCommandable RefID] ==> Returns [True] if NPC is commandable in Workshop Mode.
[CQF SettlerDebugger IsMovable RefID] ==> Returns [True] if NPC is movable in Workshop Mode.
[CQF SettlerDebugger CanBeAssignedToSupplyLine RefID] ==> Returns [True] if NPC can be assigned to a Supply Line in Workshop Mode.
[CQF SettlerDebugger IsProvisioner RefID] ==> Returns [True] if NPC is a provisioner.
  Note: it also returns other provisioner data, like valid supply line-settlement linkage (NPC approached solution to identify broken Supply Lines).
[CQF SettlerDebugger GetAssignedSettlement RefID] ==> Returns the name of the settlement that NPC is assigned to.
[CQF SettlerDebugger HasAssignedSettlement RefID] ==> Returns [True] if NPC is assigned to (any) settlement.
[CQF SettlerDebugger GetLinkedWorkshopRef RefID] ==> Returns the name of the Workshop that NPC is linked to.
  Note: 'Workshop' is the workshop workbench of the settlement. Every settler is (should be) linked to the Workshop of their "home" settlement.
[CQF SettlerDebugger HasLinkedWorkshopRef RefID] ==> Returns [True] if NPC is linked to (any) Workshop.
[CQF SettlerDebugger IsProtected RefID] ==> Returns [True] if NPC is Protected (means only the Player can kill them).
[CQF SettlerDebugger IsEssential RefID] ==> Returns [True] if NPC is Essential (means not even the Player can kill them).
[CQF SettlerDebugger IsGuard RefID] ==> Returns [True] if NPC is a settlement guard.
[CQF SettlerDebugger IsWorker RefID] ==> Returns [True] if NPC is a settlement worker.
  Note: 'settlement worker' means the NPC is assigned to a workshop resource (work object, supply line and so on).
[CQF SettlerDebugger IsSynth RefID] ==> Returns [True] if NPC is a synth.
[CQF SettlerDebugger IsScavenger RefID] ==> Returns [True] if NPC is a scavenger.
[CQF SettlerDebugger IsWorking24Hours RefID] ==> Returns [True] if NPC is set to work 24/7.
  Note: some editor placed settlers (like the child Settler at Nordhagen Beach) have this flag. They don't sleep or have a break.
[CQF SettlerDebugger IsNewSettler RefID] ==> Returns [True] if NPC "have just heard your radio beacon and is new around" your settlement.
[CQF SettlerDebugger DoesCountForPopulation RefID] ==> Returns [True] if NPC counts in the settlement's population.
  Note: [False] usually causes the settler to "get unassigned" after a some in game days.
[CQF SettlerDebugger GetWNPCVendorInfo RefID] ==> Returns the vendor data in the form of two integer values: VendorType and VendorLevel.
  VendorType: 0=General. 1=Armor. 2=Weapon. 3=Bar. 4=Clinic. 5=Clothing. 6=Chems.
  VendorLevel: for example, '4' means 'Level 4 merchant'.
[CQF SettlerDebugger IsWNPCWorkshopStatusOn RefID] ==> Returns [True] if NPC's Workshop Status is on.
  Note: for example, active companions' workshop status is turned off (that's why they ignore "workshop commands" during travel).
[CQF SettlerDebugger GetWNPCWorkshopID RefID] ==> Returns WorkshopID (integer value) of NPC (can help with debugging in some cases).
  Note: a settler's WorkshopID must be equal to the one of their "home" settlement's for assignments to work properly.
[CQF SettlerDebugger LogCurrentAIPackage RefID] ==> Prints the NPC's current AI package to the Papyrus log.
  Note: first step of dealing with AI related mod conflicts is knowing what AI package the NPC is running on.
------------------------------------------------------------ "Request NPC Info" functions below were added in v1.2 ------------------------------------------------------------
[CQF SettlerDebugger LogWorkshopAssignedObjects RefID] ==> Prints the NPC's assigned workshop objects (bed, crops, etc.) to the Papyrus log.


Change NPC Data:


[CQF SettlerDebugger SetActorEssential RefID BooleanValue] ==> Sets NPC's "essential status" to BooleanValue.
  BooleanValue: can be '0' or '1', means 'False' or 'True'.

  Example: [CQF SettlerDebugger SetActorEssential 2F1F 0] would make Piper non-essential (in other words, it would clear the essential flag).
[CQF SettlerDebugger SetActorProtected RefID BooleanValue] ==> Sets NPC's "protected status" to BooleanValue.
  Example: [CQF SettlerDebugger SetActorEssential 39FE8 1] would make Old Man Stockton protected (making him unkillable by NPCs).
[CQF SettlerDebugger SetWNPCCommandable RefID BooleanValue] ==> Makes NPC commandable in Workshop Mode depending on BooleanValue.
[CQF SettlerDebugger SetWNPCMovable RefID BooleanValue] ==> Makes NPC movable in Workshop Mode depending on BooleanValue.
[CQF SettlerDebugger SetWNPCCanBeAssignedToSupplyLine RefID BooleanValue] ==> Makes NPC assignable to a Supply Line depending on BooleanValue.
[CQF SettlerDebugger SetWNPCSynth RefID BooleanValue] ==> Makes NPC a synth depending on BooleanValue.
[CQF SettlerDebugger SetWNPCScavenger RefID BooleanValue] ==> Makes NPC a scavenger depending on BooleanValue.
[CQF SettlerDebugger SetWNPCWorking24Hours RefID BooleanValue] ==> Makes NPC to work 24/7 depending on BooleanValue.
[CQF SettlerDebugger SetWNPCCountForPopulation RefID BooleanValue] ==> Makes the workshop system to ignore/count NPC in the settlement's population depending on BooleanValue.
[CQF SettlerDebugger SetWNPCWorkshopStatus RefID BooleanValue] ==> Turns on/off NPC's Workshop Status depending on BooleanValue.
[CQF SettlerDebugger AddWNPCToWorkshop RefID Workshop] ==> Assign ("Move") NPC to this Workshop.
  Note: 'Workshop' is the workshop workbench of the settlement. Parameter 'Workshop' accepts RefID as well. See example below.
  Example: [CQF SettlerDebugger AddWNPCToWorkshop 2F1F 250FE] would move Piper (her RefID=2F1F) to Sanctuary Hills (its Workshop's RefID=250FE).
[CQF SettlerDebugger AddWNPCToWorkshopByID RefID WorkshopID] ==> Assign ("Move") NPC to the Workshop with the specified WorkshopID.
  Note: settlements' Workshops have a unique WorkshopID (they're being designated at runtime).
  Example: [CQF SettlerDebugger AddWNPCToWorkshopByID 2F1F 3] would move Piper to the settlement whose Workshop's WorkshopID is '3'.
[CQF SettlerDebugger RemoveWNPCFromWorkshop RefID] ==> Casts out NPC from their "home" settlement.
------------------------------------------------------------ "Change NPC Data" functions below were added in v1.2 ------------------------------------------------------------
[CQF SettlerDebugger AssignWNPCToWObject RefID WorkshopObject] ==> Assigns NPC to WorkshopObject.
  Note: the 3D of the WorkshopObject needs to be loaded into the memory (so it must be loaded).
  Example: [CQF SettlerDebugger AssignWNPCToWObject 2F1F F61F2] would assign Piper to one of Mutfruit Plants at Graygarden.
[CQF SettlerDebugger OpenAssignmentMenu RefID MenuIndex] ==> Opens the AssignmentMenu given by MenuIndex for NPC.
  AssignmentMenu: this is the workshop assignment menu. Can be used to "Move" or assign a settler to a Supply Line.
  MenuIndex: 0=HomeSettlement. 1=ProvisionerEndSettlement. 2=ProvisionerStartSettlement+ProvisionerEndSettlement.
  Example: [CQF SettlerDebugger OpenAssignmentMenu 2F1F 1] would bring up the workshop assignment menu in "supply line mode".



Utility functions:

[CQF SettlerDebugger MoveToPackageTargetLocation RefID] ==> Teleports ("instant path") NPC to their "AI target location".
  Note: "AI target location" is the target spot where they're proceeding toward. Helps with the "settlers on the roof" bug.
[CQF SettlerDebugger RefreshActor RefID RequestEnableDisable] ==> "Refreshes" NPC.
  RequestEnableDisable: parameter to disable-enable NPC. Can be '0' (False) or '1' (True).
  Note: "Refresh" means 3D reload and AI evaluation (recalculation). (It does not clear any variables from the NPC so it's not recycleactor!).
[CQF SettlerDebugger SetDebugTypeIndex IndexValue] ==> Sets DebugTypeIndex to IndexValue. IndexValue can be '0' or '1'.
  IndexValue: 0=debugger displays data / gives feedback on message boxes. 1=debugger prints text directly to the Papyrus log.
[CQF SettlerDebugger DisplayDebugTypeIndex] ==> Returns the value of DebugTypeIndex.
[CQF SettlerDebugger ResetMod] ==> Resets the debugger tool.

------------------------------------------------------------ "Utility functions" below were added in v1.3 ------------------------------------------------------------
[CQF SettlerDebugger ResetActor RefID RequestEnableDisable ReassignToWorkshop] ==> "Resets" NPC.
  RequestEnableDisable: parameter to disable-enable NPC. Can be '0' (False) or '1' (True).
  DoNotReassignToWorkshop: parameter to skip workshop reassignment for NPC (since NPC gets removed from their settlement during the reset!). Can be '0' (False) or '1' (True). Tip: '0' means NPC gets reassigned to their settlement after the reset.
  Note: "Reset" means 3D reload, AI evaluation (recalculation) and recycling (in game added/modified actor-data will be lost). (Warning: it clears variables from the actor!).
  Example: [CQF SettlerDebugger ResetActor 2F1F 1 1] would reset Piper to her default state, disable-enable her in the process then reassign her to her settlement.
[CQF SettlerDebugger RefreshAllActorsWithinRadius Radius ProcessOnlySettlers RequestEnableDisable] ==> "Refreshes" all actors within Radius.
  Radius: origo is the player. Measured in Game Units (128 Game Units = 6 Feet or 1.8288 Meters).
  ProcessOnlySettlers: parameter to process only settlers (so not all actors) within Radius.
  RequestEnableDisable: parameter to disable-enable the actors. Can be '0' (False) or '1' (True).
  Example: [CQF SettlerDebugger RefreshAllActorsWithinRadius 5000 1 0] would refresh all settlers within 5000 game units to the player.



Requirements:

There are no "installation requirements" but displaying names in textual form ('Piper', 'Sanctuary Hills') require F4SE. If you don't have it, name data can't be shown (but everything else can be).