ASharpPen / Valheim.CustomRaids

The Unlicense
5 stars 5 forks source link

Beneficial events blocked by player structures #42

Open FractusNine opened 3 years ago

FractusNine commented 3 years ago

Hi ASharpPen, thank you for the bugfixes on Faction -- I'm now working on balancing those faction battles, and plan to share them on NexusMods soon! I've also been working on some beneficial events as well, and ran into another quirk. I set up some events to spawn items in a small ring around the player. See example below -- works fine out in the wild, but when the event triggers near a base, nothing spawns. I'd guess this is due to the "don't spawn near player built structures" check . . . would it be possible to bypass that check for certain events? Not sure how hard that is, so I figured I'd ask. Thanks!!

Example Event ``` # ====================== # ====================== # Blessing_Mushroom [Blessing_Mushroom] Name = Blessing_Mushroom Enabled = true Random = true Biomes = Meadows,Blackforest Duration = 12 StartMessage = The sky seems to crack open for a moment ... EndMessage = A sign from Heimdallr ... \nThe gods look favorably on you today NearBaseOnly = false NotRequiredGlobalKeys = RequiredGlobalKeys = RequireOneOfGlobalKeys = PauseIfNoPlayerInArea = false ForceEnvironment = GoblinKing ForceMusic = morning ConditionWorldAgeDaysMin = 0 ConditionWorldAgeDaysMax = 0 CanStartDuringDay = true CanStartDuringNight = true Faction = RaidFrequency = 47 RaidChance = 5 ConditionDistanceToCenterMin = 0 ConditionDistanceToCenterMax = 0 [Blessing_Mushroom.0] Name = Blessing_Mushroom0 PrefabName = Mushroom Enabled = true MaxSpawned = 30 SpawnInterval = 40 SpawnChancePerInterval = 100 GroupSizeMin = 1 GroupSizeMax = 1 MinLevel = 1 MaxLevel = 1 HuntPlayer = false SpawnDistance = 1 SpawnRadiusMin = 8 SpawnRadiusMax = 9 GroupRadius = 1 GroundOffset = 0 RequiredGlobalKey = RequiredEnvironments = SpawnAtNight = true SpawnAtDay = true AltitudeMin = -1 AltitudeMax = 1000 TerrainTiltMin = 0 TerrainTiltMax = 66 InForest = true OutsideForest = true OceanDepthMin = 0 OceanDepthMax = 0 Faction = [Blessing_Mushroom.1] Name = Blessing_Mushroom1 PrefabName = vfx_stonegolem_wakeup Enabled = true MaxSpawned = 20 SpawnInterval = 40 SpawnChancePerInterval = 100 GroupSizeMin = 1 GroupSizeMax = 1 MinLevel = 1 MaxLevel = 1 HuntPlayer = false SpawnDistance = 1 SpawnRadiusMin = 8 SpawnRadiusMax = 10 GroupRadius = 1 GroundOffset = -0.5 RequiredGlobalKey = RequiredEnvironments = SpawnAtNight = true SpawnAtDay = true AltitudeMin = -1 AltitudeMax = 1000 TerrainTiltMin = 0 TerrainTiltMax = 90 InForest = true OutsideForest = true OceanDepthMin = 0 OceanDepthMax = 0 Faction = [Blessing_Mushroom.2] Name = Blessing_Mushroom2 PrefabName = fx_eikthyr_stomp Enabled = true MaxSpawned = 1 SpawnInterval = 40 SpawnChancePerInterval = 100 GroupSizeMin = 1 GroupSizeMax = 1 MinLevel = 1 MaxLevel = 1 HuntPlayer = false SpawnDistance = 1 SpawnRadiusMin = 1 SpawnRadiusMax = 1 GroupRadius = 1 GroundOffset = 24 RequiredGlobalKey = RequiredEnvironments = SpawnAtNight = true SpawnAtDay = true AltitudeMin = -1 AltitudeMax = 1000 TerrainTiltMin = 0 TerrainTiltMax = 90 InForest = true OutsideForest = true OceanDepthMin = 0 OceanDepthMax = 0 Faction = [Blessing_Mushroom.3] Name = Blessing_Mushroom3 PrefabName = sfx_lootspawn Enabled = true MaxSpawned = 2 SpawnInterval = 40 SpawnChancePerInterval = 100 GroupSizeMin = 1 GroupSizeMax = 1 MinLevel = 1 MaxLevel = 1 HuntPlayer = false SpawnDistance = 2 SpawnRadiusMin = 8 SpawnRadiusMax = 9 GroupRadius = 1 GroundOffset = -0.5 RequiredGlobalKey = RequiredEnvironments = SpawnAtNight = true SpawnAtDay = true AltitudeMin = -1 AltitudeMax = 1000 TerrainTiltMin = 0 TerrainTiltMax = 90 InForest = true OutsideForest = true OceanDepthMin = 0 OceanDepthMax = 0 Faction = ```

Edit: Or alternately, maybe "dont run events near base?"

ASharpPen commented 3 years ago

Hm... It should be possible to set up. It's gonna have to wait in line for a few other projects though.

FractusNine commented 3 years ago

Sounds good, thanks for considering it!