-
Notifications
You must be signed in to change notification settings - Fork 1
/
Fallout_4_Power_Grid.txt
74 lines (58 loc) · 5.39 KB
/
Fallout_4_Power_Grid.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Fallout 4 Power Grid Notes:
All power connectors, generators, lamps, and splines placed in the CK require the workshop to have a "Power Grid" table filled with all the power connections for the workshop. This table cannot be created in-game by script placed objects (only player placed) thus we need to create it in the mod itself to work. This file serves as my notes on how I have found the power grid system to work and all it's requirements.
"Reference" is an Object Reference that exists in a Cell.
"Power Reference" is a placed power connector, consumer, generator, terminal, etc.
"Spline Reference" is a placed "Bendable Spline" (BNDS) between the connectors of two different Power References.
Fallout 4 CK Spline Tutorial:
https://www.youtube.com/watch?v=9HyruGEFNEk
"Workshop Reference" is the reference that hosts the "Power Grid" and all Power References must link to it with keyword WorkshopItemKeyword [KYWD:00054BA6].
"Base Form" is the activator, light, terminal, etc of the Reference.
"Spline Connection" is a field (only viewable in xEdit) on Power References and Spline References. All Spline Connections refer to a set of one Spline Reference and two Power References and represent a bi-directional connection between the Power References through the Spline Reference.
"Power Grid" is a field (only viewable in xEdit) on the Workshop Reference.
This contains all the "Power Connections" ([Power Grid\Connections]) for the Workshop and the "Nodes" are considered bi-directional through an optional "Line".
What Power Reference is what Node does not matter but that Node pair will only exist once in the entire Power Grid.
Wired connections will have the Line set to the Spline Reference for the connection.
If a connection is wireless or through a snap point, it will still have a Power Connection but it will have no Line (NULL - Null Reference [00000000]).
What an object is and how it works is based primarily on keywords, actor values.
Power Reference Requirements:
+ Base Form can be any type allowed that supports Keywords and/or Actor Values
+ Must be persistent
+ Linked References:
To Workshop Reference with keyword WorkshopItemKeyword [KYWD:00054BA6]
+ Wired Connection Requirements (for pre-wired Power References):
+ CK:
A Spline Reference between the connectors of two different Power References
+ xEdit:
One Spline Connection is required for each Spline Reference connecting to this Power Reference.
Spline Reference Requirements:
+ Base Form can only be Bendable Spline (Default workshop wire: BlackWireSpline01 [BNDS:0001D971])
+ Must be persistent
+ Linked References:
To Workshop Reference with keyword WorkshopItemKeyword [KYWD:00054BA6]
+ xEdit:
All Spline References should have one Spline Connection to each of the two Power References they connect.
It does not matter which Power Reference is which Spline Connection.
Base Form Requirements and Options:
+ Any Form type allowed that supports Keywords and/or Actor Values
+ Keyword[s] (Field: KWDA - Keywords):
BlockPlayerActivation [KYWD:001CD02B] - For non switchable activators and or player interactable furniture
WorkshopCanBePowered [KYWD:0003037E] - For consumers, some connectors (eg, the large vanilla power pylon)
WorkshopPowerConnection [KYWD:00054BA4] - For wired connections
WorkshopStartPoweredOn [KYWD:0004455B] - For on/off switchable objects
WorkshopStartUnpoweredOff [KYWD:0004455C] - For on/off switchable objects
WorkshopSwitchActivatorKeyword [KYWD:001690A4] - For on/off switchable objects
+ Actor Values (Field: PRPS - Properties):
PowerGenerated [AVIF:0000032E] - Any positive value, this makes these References power generators
PowerRadiation [AVIF:0000032F] - Any positive value, this controls the wireless transmission range for wireless consumers
PowerRequired [AVIF:00000330] - Any positive value, this is the amount of power required for consumers
WorkshopCanBePoweredAV [AVIF:0024A03A] - ?, only used by VaultTec DLC for vault pieces
WorkshopSnapTransmitsPower [AVIF:00000354] - 1.0, this controls whether the object makes power connections through snap points
Workshop Reference Requirements:
+ Must be persistent
+ Linked References:
All Power and Spline References should link to the Workshop Reference with keyword WorkshopItemKeyword [KYWD:00054BA6]
+ xEdit:
A Power Grid
Additional notes (need to be confirmed):
+ Power References with Actor Values will not automatically update the Power Grid status without changing their animation. This is because setting an ActorValue does not automatically trigger re-evaluation of the Power Grid while an animation state change does. If you want to dynamically alter the Actor Values on a Power Reference you need to change their animation state after you update the values. The simplest way to trigger the Power Grid re-evaluation via animation state changes is to call SetOpen() on the Power Reference. You don't need to actually change the state (ie, you can set it to open when it's already open) nor does the NIF itself require any animations (ie, it doesn't even need "open", "close" or, transition animations).
+ This is confirmed working, SS2 uses this method to update the output of the municipal power pole and update the workshop workbench