O.load BetterScarecrows Error while compiling BetterScarecrows: There is no argument given that corresponds to the required parameter 'maxRange' of 'BasePathFinder.GetBestRoamPosition(BaseNavigator, Vector3, Vector3, float, float)' | Line: 488, Pos: 61Fixed

Just a heads up

o.load BetterScarecrows

Error while compiling BetterScarecrows: There is no argument given that corresponds to the required parameter 'maxRange' of 'BasePathFinder.GetBestRoamPosition(BaseNavigator, Vector3, Vector3, float, float)' | Line: 488, Pos: 61​

same error here:
BetterScarecrows - Failed to compile: There is no argument given that corresponds to the required parameter 'maxRange' of 'BasePathFinder.GetBestRoamPosition(BaseNavigator, Vector3, Vector3, float, float)' | Line: 488, Pos: 61

⚠️ I'm not a plugin developer, I have not fully tested this and this may break other stuff but it made the plugin load for me.

 

1. Open BetterScarecrow.cs

2. Go to line 488

3. Replace this:

bestRoamPosition = brain.PathFinder.GetBestRoamPosition(brain.Navigator, brain.Events.Memory.Position.Get(4), 20f, 100f);

with this:

bestRoamPosition = brain.PathFinder.GetBestRoamPosition(brain.Navigator, Vector3.zero, brain.Events.Memory.Position.Get(4), 20f, 100f);

 

Hey Kenny, thanks for that fix. I did some quick checks and the scarecrows seem to be behaving. I also added a bug report to the authors github page so hopefully we'll get an official fix.

Hi,

I'm gonna fix this. Thanks @dualarrow for the Github ping, as the Umod one doesn't work.



Merged post

It's fixed.

Evening- what size structures will trigger the scarecrow spawning around it? 

Hi @davidnb77, to trigger the spawn you need to set the scarecrowpopulation convar (it's the amount of scarecrow per km²).

I'm not sure if structure size matters for them to spawn. They will around structures of all size and around roads.

Thank you for the response! I have the config file set to override convars and used the settings that came in the default config. Based on what you said, I should be fine. They are spawning, just wondering if they would start spawning around my base with regularity or just random spawns around the map. Thanks again 

Locked automatically