SpawnConfig

Change values of the different spawners

Total Downloads: 2,220 - First Release: Dec 27, 2015 - Last Update: Jun 27, 2016

5/5, 7 likes
  1. I am trying to add the Kanga in to the SpawnConfig
    i added what i thought would be right and put it in with the Roach and Goat
    This is what it lookes like
    Code:
    "KangaSpawner": {
      "ChildToSelf": true,
      "SecondsPerSpawn": 60.0,
      "SpawnedLimit": 50,
      "Spawns":  {
      "Position": "2218.0 27.5 2043.8",
      "Range": 45.4
      },
      {
      "Position": "2850.5 16.9 2043.8",
      "Range": 14.39
      },
      {
      "Position": "282.4 3.9 996.7",
      "Range": 10.17
      },
      {
      "Position": "2133.2 15.4 3306.2",
      "Range": 38.18
      },
      {
      "Position": "2370.1 15.7 3269.2",
      "Range": 11.0
      },
      {
      "Position": "1714.2 32.3 2744.8",
      "Range": 20.8
      },
      {
      "Position": "-644.3 16.6 3058.7",
      "Range": 29.5
      },
      {
      "Position": "-2599.1 11.8 99.9",
      "Range": 11.6
      }
      ],
      "Objects": [
      "Kanga"
      ],
      "Offset": "0 0 0",
      "InitialWaitTime": 60.0,
      "MinimumSpawnCount": 10
      }
    I guess im looking for what its called to spawn the Kanga.

    Sorry to pester, and ty for any help given.
     
    Last edited by a moderator: Oct 6, 2016
  2. Well i have tried adding the Kanga every way that i can think of and ended it with the .json file here.
    Sadly not spawning any kangas. I was fairly sure i had it as i got it, when it reloaded with no errors in console.
    This is on the custom map Terra Nova. Im also not sure what the diamond spawner is at the top but it has always been there.
     

    Attached Files:

  3. How to control wheater ?
     
  4. You can't. It used to be controlled by spawners for the first few months, back then we could change it with spawnconfig, but then they changed the way the weather works in the game and it no longer is adjustable with this plugin.
     
  5. So basically, whenever I have used /reload SpawnConfig after making changes to spawns, one of the following happens

    - Spawns get duplicated (even respawning gets duplicated) and overload the AI server
    - Spawns cease to respawn all together
    - It works perfectly fine

    I was wondering if any of you have found a trick to successfully updating and reloading SpawnConfig with minimal risks to breaking the spawns.
     
  6. How i find cellid?
     
  7. long cell = ConstructionUtilities.GetCell(Vector3);
     
  8. This does not match the digits of the plugin settings. There are very different numbers:c
     
  9. Plugin not working for me :/
    oxide: latest
    config: default
    LootConfig: 1.0.4 hurtworld
    Code:
    [SpawnConfig] Incorrect config version(0/0)
    [SpawnConfig] Created new config
    [SpawnConfig] Config load failed: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path 'MultiSpawners.RoachSpawner.Spawns[0].Position', line 16, position 52.
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.PopulateVector3 (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.ReadJson (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue, Newtonsoft.Json.JsonSerializer serializer) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable (Newtonsoft.Json.JsonConverter converter, Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00000] in <filename unknown>:0
    Failed to call hook 'OnServerInitialized' on plugin 'SpawnConfig v1.0.4' (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.SpawnConfig.UpdateSpawns () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.SpawnConfig.OnServerInitialized () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.SpawnConfig.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
           
     
    Last edited by a moderator: Aug 23, 2017
  10. Code:
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable (Newtonsoft.Json.JsonConverter converter, Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.ReadJson (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue, Newtonsoft.Json.JsonSerializer serializer) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.PopulateVector3 (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x00000] in <filename unknown>:0
    16:41 [Info] [SpawnConfig] Config load failed: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path 'MultiSpawners.RoachSpawner.Offset', line 196, position 19.
    
     
  11. @Wulf@Nogrod
    Update !
     
  12. Yes, the plugin needs to be updated @Nogrod @Wulf

    Code:
    [Info] [SpawnConfig] Config load failed: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path 'MultiSpawners.RoachSpawner.Spawns[0].Position', line 11, position 52.
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.PopulateVector3 (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.ReadJson (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue, Newtonsoft.Json.JsonSerializer serializer) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable (Newtonsoft.Json.JsonConverter converter, Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00000] in <filename unknown>:0
     
  13. I am forwarding this on behalf of several admins, who have updated to the most recent version of oxide. I have not updated in a while myself, so I have not gotten this yet... and will be reluctant to update until this is fixed.

    Code:
    22:54 [Info] [SpawnConfig] Config load failed: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path 'MultiSpawners.RoachSpawner.Spawns[0].Position', line 16, position 52.
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.PopulateVector3 (Newtonsoft.Json.JsonReader reader) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Converters.VectorConverter.ReadJson (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue, Newtonsoft.Json.JsonSerializer serializer) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable (Newtonsoft.Json.JsonConverter converter, Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00000] in <filename unknown>:0
    22:54 [Error] Failed to call hook 'OnServerInitialized' on plugin 'SpawnConf
    

    It seems that every admin I have spoke to with the most recent version of oxide has this problem.
     
  14. Wulf

    Wulf Community Admin

    Oxide has not change anything related to JSON, the error is with the plugin.
     
  15. Sorry man. The reason I thought it was oxide was because this plugin continued working after the last V1 hurtworld update, but not after a recent oxide update. From what I can tell the plugin has not needed an update for quite a while, and functioned flawlessly for all until recently.
     
  16. Wulf

    Wulf Community Admin

    The error is basically stating that something in the config is not the expected type.
     
  17. Any idea why this might change w/o an update? And why it would still work for me and some admins, while for some others not even a fresh install of it works? I reinstalled my server about 1.5 months ago so even my install of the plugin is fairly fresh. Maybe something on the devs' end that messing it up on certain server OS?

    We are stumped on it. Been trying to help them find the issue but it just is weird. Also some other new issues have arisen on Linux servers, but mine is Windows and have not had the same problems.
     
  18. Wulf

    Wulf Community Admin

    The plugin updates the config based on game changes, so that'd be the only thing I can think of. The way this plugin handles is all done by it, not Oxide.
     
  19. Well I figured out what is probably the problem. For some reason it is formatting the JSON like this for them

    https://i.imgur.com/8C7kSl9.png