Jump to content

Need help getting more settlement attacks


shatsnazzle

Recommended Posts

Try start attack manually Trigger Attack Button

Read the description carefully (especially about red color immediately)

 

I have used that one a lot it's so much fun! I just realized from your sig that you made it, awesome work :smile: I'm also using your More Attackers Get Off My Buildzone mod, it's very fun and the fast travel fix is awesome. As much as I love the trigger button, I want to also be able to experience more attacks during my ordinary play time. I love having a group attack me and my settlement while I'm minding my own business, forcing me to panic sprint to the siren, hop in the power armor etc and fight for my life :smile: I really wish getting those few numbers changed in the script wasn't such a huge task lol

Edited by shatsnazzle
Link to comment
Share on other sites

1. Install Edited WorkshopScript from UFO4P v.2.0.3 compiled in debug mode

2. Check Documents\My Games\Fallout4\Fallout4Custom.ini have:

[Archive]
bInvalidateOlderFiles=1
sResourceDataDirsFinal=
3. Enable Debug Logging

4. Start game. Wait/sleep 24 hours. Don't wait/sleep next 24 hours. Do something.

5. Profit

 

I recieved 13 attacks. Then became lazy.

 

In Documents\My Games\Fallout4\Logs\Script\User\Workshop.0.log You can see something like this:

[02/16/2018 - 08:02:23PM]  ------------------------------------------------------------------------------ 
[02/16/2018 - 08:02:23PM]  	Check for attack: [workshopscript < (0009B19D)>]
[02/16/2018 - 08:02:23PM]  ------------------------------------------------------------------------------ 
[02/16/2018 - 08:02:23PM]  	Days Since Last Attack=114
[02/16/2018 - 08:02:23PM]  	Starting stats:
[02/16/2018 - 08:02:23PM]  		population=4
[02/16/2018 - 08:02:23PM]  		food rating=39
[02/16/2018 - 08:02:23PM]  		water rating=13
[02/16/2018 - 08:02:23PM]  		total safety=80
[02/16/2018 - 08:02:23PM]  		safety per NPC=20
[02/16/2018 - 08:02:23PM]  	Attack chance:
[02/16/2018 - 08:02:23PM]  		base chance=0.050000
[02/16/2018 - 08:02:23PM]  		resources=+2.600000
[02/16/2018 - 08:02:23PM]  		safety=-0.800000
[02/16/2018 - 08:02:23PM]  		population=-0.080000
[02/16/2018 - 08:02:23PM]  		TOTAL=1.770000
[02/16/2018 - 08:02:23PM]  	Attack roll = 0.259682
[02/16/2018 - 08:02:23PM]  	Try Trigger Attack
and conduct diagnostics.

 

Settlements Workshop RefID can be found hire

"0009B19D" after "workshopscript" in log is Finch Farm

Link to comment
Share on other sites

 

Wim95 you are a master of settlement attack modding! Thank you for doing this! I installed this with NMM, it put the 2 loose files where expected: Fallout 4\Data\scripts\Source\User for workshopscript.psc and Fallout 4\Data\scripts for workshopscript.pex. The loose files must be working over the ones in UFO4P - main.bs2 in this instance since I got several attacks and it produced a log (I'm assuming the script must be getting used over the UFO4P - main.bs2 script in order to make its log). Here is my log:

 

 

[02/17/2018 - 08:14:44AM] Workshop log opened (PC-64)

[02/17/2018 - 08:14:44AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:14:44AM] Check for attack: [workshopscript < (000250FE)>]

[02/17/2018 - 08:14:44AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:14:44AM] Days Since Last Attack=5

[02/17/2018 - 08:14:44AM] Starting stats:

[02/17/2018 - 08:14:44AM] population=15

[02/17/2018 - 08:14:44AM] food rating=568

[02/17/2018 - 08:14:44AM] water rating=69

[02/17/2018 - 08:14:44AM] total safety=37

[02/17/2018 - 08:14:44AM] safety per NPC=2

[02/17/2018 - 08:14:44AM] Attack chance:

[02/17/2018 - 08:14:44AM] base chance=0.050000

[02/17/2018 - 08:14:44AM] resources=+31.850000

[02/17/2018 - 08:14:44AM] safety=-0.370000

[02/17/2018 - 08:14:44AM] population=-0.300000

[02/17/2018 - 08:14:44AM] TOTAL=31.230000

[02/17/2018 - 08:14:44AM] Attack roll = 0.167903

[02/17/2018 - 08:14:44AM] Try Trigger Attack

[02/17/2018 - 08:14:57AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:14:57AM] Check for attack: [workshopscript < (00066EB6)>]

[02/17/2018 - 08:14:57AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:14:57AM] attacks not allowed - no attack roll for [workshopscript < (00066EB6)>]

[02/17/2018 - 08:15:10AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:10AM] Check for attack: [DLC04:DLC04RedRocketWorkshopScript < (0600BCE7)>]

[02/17/2018 - 08:15:10AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:10AM] attacks on unowned workshop not allowed - no attack roll for [DLC04:DLC04RedRocketWorkshopScript < (0600BCE7)>]

[02/17/2018 - 08:15:14AM] [workshopscript < (001F0711)>] DailyUpdate: system busy, try again in 0.492512 game hours

[02/17/2018 - 08:15:14AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:14AM] Check for attack: [workshopscript < (06047DFB)>]

[02/17/2018 - 08:15:14AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:14AM] attacks not allowed - no attack roll for [workshopscript < (06047DFB)>]

[02/17/2018 - 08:15:36AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:36AM] Check for attack: [workshopscript < (001E81EA)>]

[02/17/2018 - 08:15:36AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:36AM] Days Since Last Attack=18

[02/17/2018 - 08:15:36AM] Starting stats:

[02/17/2018 - 08:15:36AM] population=3

[02/17/2018 - 08:15:36AM] food rating=1

[02/17/2018 - 08:15:36AM] water rating=2

[02/17/2018 - 08:15:36AM] total safety=0

[02/17/2018 - 08:15:36AM] safety per NPC=0

[02/17/2018 - 08:15:36AM] Attack chance:

[02/17/2018 - 08:15:36AM] base chance=0.050000

[02/17/2018 - 08:15:36AM] resources=+0.150000

[02/17/2018 - 08:15:36AM] safety=-0.000000

[02/17/2018 - 08:15:36AM] population=-0.060000

[02/17/2018 - 08:15:36AM] TOTAL=0.140000

[02/17/2018 - 08:15:36AM] Attack roll = 0.073648

[02/17/2018 - 08:15:36AM] Try Trigger Attack

[02/17/2018 - 08:15:44AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:44AM] Check for attack: [workshopscript < (000B3506)>]

[02/17/2018 - 08:15:44AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:44AM] attacks on unowned workshop not allowed - no attack roll for [workshopscript < (000B3506)>]

[02/17/2018 - 08:15:49AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:49AM] Check for attack: [workshopscript < (00161F4B)>]

[02/17/2018 - 08:15:49AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:49AM] attacks on unowned workshop not allowed - no attack roll for [workshopscript < (00161F4B)>]

[02/17/2018 - 08:15:53AM] [workshopscript < (00024A26)>] DailyUpdate: system busy, try again in 0.232305 game hours

[02/17/2018 - 08:15:53AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:53AM] Check for attack: [workshopscript < (0009B1AC)>]

[02/17/2018 - 08:15:53AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:53AM] Days Since Last Attack=1

[02/17/2018 - 08:15:53AM] Starting stats:

[02/17/2018 - 08:15:53AM] population=2

[02/17/2018 - 08:15:53AM] food rating=25

[02/17/2018 - 08:15:53AM] water rating=10

[02/17/2018 - 08:15:53AM] total safety=0

[02/17/2018 - 08:15:53AM] safety per NPC=0

[02/17/2018 - 08:15:53AM] Attack chance:

[02/17/2018 - 08:15:53AM] base chance=0.050000

[02/17/2018 - 08:15:53AM] resources=+1.750000

[02/17/2018 - 08:15:53AM] safety=-0.000000

[02/17/2018 - 08:15:53AM] population=-0.040000

[02/17/2018 - 08:15:53AM] TOTAL=1.760000

[02/17/2018 - 08:15:53AM] Attack roll = 0.974088

[02/17/2018 - 08:15:53AM] Try Trigger Attack

[02/17/2018 - 08:15:58AM] [workshopscript < (001654CF)>] DailyUpdate: system busy, try again in 0.254630 game hours

[02/17/2018 - 08:15:59AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:59AM] Check for attack: [workshopscript < (001654B8)>]

[02/17/2018 - 08:15:59AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:15:59AM] 0 population - no attack roll

[02/17/2018 - 08:16:16AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:16AM] Check for attack: [workshopscript < (0009B1BE)>]

[02/17/2018 - 08:16:16AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:16AM] Days Since Last Attack=9

[02/17/2018 - 08:16:16AM] Starting stats:

[02/17/2018 - 08:16:16AM] population=3

[02/17/2018 - 08:16:16AM] food rating=0

[02/17/2018 - 08:16:16AM] water rating=0

[02/17/2018 - 08:16:16AM] total safety=0

[02/17/2018 - 08:16:16AM] safety per NPC=0

[02/17/2018 - 08:16:16AM] Attack chance:

[02/17/2018 - 08:16:16AM] base chance=0.050000

[02/17/2018 - 08:16:16AM] resources=+0.000000

[02/17/2018 - 08:16:16AM] safety=-0.000000

[02/17/2018 - 08:16:16AM] population=-0.060000

[02/17/2018 - 08:16:16AM] TOTAL=0.050000

[02/17/2018 - 08:16:16AM] Attack roll = 0.038719

[02/17/2018 - 08:16:16AM] Try Trigger Attack

[02/17/2018 - 08:16:34AM] [workshopscript < (0009B1F1)>] DailyUpdate: system busy, try again in 0.788344 game hours

[02/17/2018 - 08:16:34AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:34AM] Check for attack: [workshopscript < (00024A26)>]

[02/17/2018 - 08:16:34AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:34AM] 0 population - no attack roll

[02/17/2018 - 08:16:43AM] [workshopscript < (001F0711)>] DailyUpdate: system busy, try again in 0.319734 game hours

[02/17/2018 - 08:16:43AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:43AM] Check for attack: [workshopscript < (001654CF)>]

[02/17/2018 - 08:16:43AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:43AM] 0 population - no attack roll

[02/17/2018 - 08:16:48AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:48AM] Check for attack: [workshopscript < (00164321)>]

[02/17/2018 - 08:16:48AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:48AM] attacks on unowned workshop not allowed - no attack roll for [workshopscript < (00164321)>]

[02/17/2018 - 08:16:56AM] [workshopscript < (0009B1D1)>] DailyUpdate: system busy, try again in 0.598858 game hours

[02/17/2018 - 08:16:56AM] [workshopscript < (00019956)>] SCAVENGING: +1

[02/17/2018 - 08:16:56AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:56AM] Check for attack: [workshopscript < (00019956)>]

[02/17/2018 - 08:16:56AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:16:56AM] attacks on unowned workshop not allowed - no attack roll for [workshopscript < (00019956)>]

[02/17/2018 - 08:17:52AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:17:52AM] Check for attack: [workshopscript < (001F0711)>]

[02/17/2018 - 08:17:52AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:17:52AM] 0 population - no attack roll

[02/17/2018 - 08:18:28AM] [workshopscript < (0009B197)>] DailyUpdate: system busy, try again in 0.537652 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (0009B1F1)>] DailyUpdate: system busy, try again in 0.701368 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (00135A90)>] DailyUpdate: system busy, try again in 0.771721 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (001654D5)>] DailyUpdate: system busy, try again in 0.730513 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (01000E4C)>] DailyUpdate: system busy, try again in 0.633382 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (0009B1DB)>] DailyUpdate: system busy, try again in 0.518049 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (0016D28E)>] DailyUpdate: system busy, try again in 0.906943 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (0302064C)>] DailyUpdate: system busy, try again in 0.866103 game hours

[02/17/2018 - 08:18:28AM] [workshopscript < (00054BAE)>] DailyUpdate: system busy, try again in 0.903064 game hours

[02/17/2018 - 08:18:28AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:18:28AM] Check for attack: [workshopscript < (0009B1D1)>]

[02/17/2018 - 08:18:28AM] ------------------------------------------------------------------------------

[02/17/2018 - 08:18:28AM] Days Since Last Attack=9

[02/17/2018 - 08:18:28AM] Starting stats:

[02/17/2018 - 08:18:28AM] population=2

[02/17/2018 - 08:18:28AM] food rating=2

[02/17/2018 - 08:18:28AM] water rating=8

[02/17/2018 - 08:18:28AM] total safety=0

[02/17/2018 - 08:18:28AM] safety per NPC=0

[02/17/2018 - 08:18:28AM] Attack chance:

[02/17/2018 - 08:18:28AM] base chance=0.050000

[02/17/2018 - 08:18:28AM] resources=+0.500000

[02/17/2018 - 08:18:28AM] safety=-0.000000

[02/17/2018 - 08:18:28AM] population=-0.040000

[02/17/2018 - 08:18:28AM] TOTAL=0.510000

[02/17/2018 - 08:18:28AM] Attack roll = 0.634163

[02/17/2018 - 08:19:19AM] [workshopscript < (0009B19D)>] DailyUpdate: system busy, try again in 0.800388 game hours

 

 

 

I have a few questions:

1.) Is "Attack roll" the total probability that the settlement will get hit or is this the game's actual roll of the "dice" and the value it landed on?

 

2.) Are the values listed in my very first post the only ones needed to change in the script in order to change the probability and frequency of a settlement attack or did I miss some values?

 

; attack chance formula

float attackChanceBase = 0.05 const

float attackChanceResourceMult = 0.05 const

float attackChanceSafetyMult = 0.01 const

float attackChancePopulationMult = 0.02 const

float minDaysSinceLastAttack = 1.0 const ; minimum days before another attack can be rolled for

 

 

3.) How would I go about compiling the UOF4P's workshopscript.psc into a .pex if I ever wanted to alter those values or if an update for UOF4P came out that changed workshopscript? When I tried to compile it in Creation Kit it failed with this message:

 

 

Papyrus Compiler Version 2.8.0.4 for Fallout 4

Copyright © ZeniMax Media. All rights reserved.

Starting 1 compile threads for 1 files...

Compiling "WorkshopScript.psc"...

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(448,16): UFO4P_ResetCurrentWorkshop is not a function or does not exist

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(467,99): PermanentActorsAliveAndPresent is not a function or does not exist

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(571,93): UFO4P_AttackRunning is not a property on script workshopparentscript or one of its parents

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(891,93): UFO4P_IsWorkshopLoaded is not a function or does not exist

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(929,17): ResetHappinessPUBLIC is not a function or does not exist

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(972,55): CreateActor_DailyUpdate is not a function or does not exist

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(972,21): type mismatch while assigning to a workshopnpcscript (cast missing or types unrelated)

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(985,40): CreateActor_DailyUpdate is not a function or does not exist

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(985,12): type mismatch while assigning to a actor (cast missing or types unrelated)

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(1678,54): UFO4P_IsWorkshopLoaded is not a function or does not exist

X:\SteamLibrary\SteamApps\common\Fallout 4\Data\Scripts\Source\User\WorkshopScript.psc(1678,90): cannot compare a void to a bool (cast missing or types unrelated)

No output generated for WorkshopScript.psc, compilation failed.

 

Batch compile of 1 files finished. 0 succeeded, 1 failed.

Failed on WorkshopScript.psc

 

 

 

If helping me compile this is outside the scope of a few posts or you'd rather direct me elsewhere I understand completely.

 

Thank you so much wim95! And thank you so much to everyone else for your help!

Edited by shatsnazzle
Link to comment
Share on other sites

1) "Attack roll" a random number from 0.0 to 1.0, is determined each day on a new one, during daily update.

If "Attack roll" < "TOTAL", then "Try Trigger Attack"

2) Yes, only these.

3) Additionally copy WorkshopParentScript.psc and put it next to WorkshopScript.psc (...\Source\User\ folder). Both from UFO4P - that's important. No need to compile WorkshopParentScript.psc

Link to comment
Share on other sites

1) "Attack roll" a random number from 0.0 to 1.0, is determined each day on a new one, during daily update.

If "Attack roll" < "TOTAL", then "Try Trigger Attack"

2) Yes, only these.

3) Additionally copy WorkshopParentScript.psc and put it next to WorkshopScript.psc (...\Source\User\ folder). Both from UFO4P - that's important. No need to compile WorkshopParentScript.psc

 

It compiled perfectly! Thank you for answering my questions and thank you again for all your help!!! :) I can declare this thread officially solved!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...