Am I mistaking something?Solved

Hello there! :-D
So, I am checking the new update of your plugin and, so far, it looks really improved! The possibilities are really fun to play with!
I have a problem, though. I have deleted the previous plugin and the diseases files (as well as the json config file) and reuploaded everything. I updated the diseases files (the Diseases folder is populated with my Anthrax, Influenza, Rabies, Zika, Mosaic and the new Norovirus) but when I reload it to make all the diseases works, it happens something curious...

This is my json config:

{
  "Generate default disease (true/false)": false,
  "Loaded diseases on startup": [
    "Norovirus",
    "Anthrax",
    "Rabies",
    "Zika",
    "Mosaic",
    "Influenza"
  ],
  "Max number of infected entities": 100,
  "Disease name color in messages": "green",
  "Face covering items": [
    "mask.bandana",
    "burlap.headwrap",
    "clatter.helmet",
    "coffeecan.helmet",
    "heavy.plate.helmet",
    "hazmatsuit",
    "hazmatsuit.spacesuit",
    "metal.facemask",
    "halloween.surgeonsuit"
  ],
  "Show status chat messages": true,
  "Infections can spread in safe zones": true,
  "Broadcast disease death messages": true,
  "Broadcast outbreaks": true,
  "HUD indicator list": {
    "Anchor min": "0.9 0.6",
    "Anchor max": "0.985 0.9",
    "Entry height": 0.1,
    "Anchor min (image)": "0.04 0.1",
    "Anchor max (image)": "0.22 0.85",
    "Show image (requires ImageLibrary)": true
  }
}​

But when I upload it and reload the plugin, it keeps reverting to the default config file. It doesn't load the diseases (I can load them manually via /disease load command).
I've checked the syntax of the files (I use Visual Studio Code so it's a little bit easier) and the coherence of the names and everything seems fine.
It just doesn't hold the main config file.

So, am I doing something wrong here?

Just installing testing out and experiencing the exact same thing. I edited norovirus to my own disease reload loaded plug-in and config reset to default and added norovirus to data file again.

 

Again pulling this until this is sorted   ... disappointing.

 

 

im experiencing the same exact thing. 

 

the CFG file will revert to default all the time no matter what.

 

what i had to do, is go into the actual plugin and edit the cfg maker to load up my custom ones. it works fine now, but yeah youll have to edit the plugin at least until the dev fixes the thingy.

I'll take a look into this ASAP, sorry you guys are experiencing this issue.

liTXoIBSLK9MjHz.jpg LunaZE

go into the actual plugin and edit the cfg maker to load up my custom ones.

As a total ignorant... Where and how you make those changes??

I just pushed the fix for this guys, once again so for the incovenience, 2.1.0 is ready for download!

Also note, after looking into it I found that for the property "Spread distance" each 1 value is approximately equal to 1/4 a foundation instead of 1.0 = 4ft (which isn't true). So I updated that property name accordingly to be "Spread distance (4.0 = 1 foundation)".

Make sure to update your disease files to reflect this change!

Hello!
The new distance system is A LOT more intuitive and easy to visualize! I still have a problem though.
It seems that the plugin just load the first disease config it reads in the json config.

  "Loaded diseases on startup": [
    "Norovirus-21",
    "Anthrax",
    "Influenza",
    "Mosaic",
    "Rabies",
    "Zika"​
Now it only load "Norovirus-21" no matter what. It is impossible to load any other disease config, it gives no message at all and if I try to invoke /disease load Rabies (for istance) it doesn' load. I've checked that "Disease name" match with the actual file name and they all do.

Here you will find my Norovirus-21 and my Rabies files, maybe I made some mistake there I cannot figure out...

{
  "Disease name": "Rabies",
  "Description": "Moderately contagious disease that causes vomit and fever. It is caused by eating infected meat or close contact with animals. Can be mitigated whit bandages and cured with syringes",
  "Min time immune after recovery (seconds)": 180,
  "Max time immune after recovery (seconds)": 600,
  "Min time infected (seconds)": 1200,
  "Max time infected (seconds)": 4800,
  "Min time between symptoms (seconds)": 5,
  "Max time between symptoms (seconds)": 60,
  "Spread distance (4.0 = 1 foundation)": 8.0,
  "Spread chance with mask (0-100)": 5.0,
  "Spread chance without mask (0-100)": 75.0,
  "Symptom damage effects": [
    {
      "Stat name": "health",
      "Min damage": 10.0,
      "Max damage": 20.0
    },
    {
        "Stat name": "temperature",
        "Min damage": 20.0,
        "Max damage": 50.0
      },
    {
      "Stat name": "calories",
      "Min damage": 10.0,
      "Max damage": 50.0
    },
    {
      "Stat name": "hydration",
      "Min damage": 5.0,
      "Max damage": 10.0
    }
  ],
  "Items that cause infection on consumption": [
    {
      "Infection chance on consumption (0-100)": 10.0,
      "Short prefab name": "chicken.raw"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "chicken.spoiled"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "wolfmeat.raw"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "meat.boar"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "horsemeat.raw"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "fish.raw"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "bearmeat"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "deermeat.raw"
    },
    {
      "Infection chance on consumption (0-100)": 10.0,
      "Short prefab name": "humanmeat.raw"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "humanmeat.spoiled"
    }
  ],
  "Items that cure on consumption": [
    {
      "Cure chance on consumption (0-100)": 50.0,
      "Short prefab name": "syringe.medical"
    }
  ],
  "Items that reduce infection time on consumption": [
    {
        "Min infection time decreased (seconds)": 5,
        "Max infection time decreased (seconds)": 10,
        "Delay between reusing treament (seconds)": 10,
        "Short prefab name": "bandage"
    }
  ],
  "Entities that cause infection on hit": [
    {
      "Short prefab name": "boar",
      "Infection chance on hit (0-100)": 2.0
    },
    {
        "Short prefab name": "horse",
        "Infection chance on hit (0-100)": 2.0
      },
    {
      "Short prefab name": "stag",
      "Infection chance on hit (0-100)": 50.0
    },
    {
      "Short prefab name": "testridablehorse",
      "Infection chance on hit (0-100)": 2.0
    },
    {
      "Short prefab name": "wolf",
      "Infection chance on hit (0-100)": 2.0
    },
    {
      "Short prefab name": "bear",
      "Infection chance on hit (0-100)": 2.0
    },
    {
      "Short prefab name": "player",
      "Infection chance on hit (0-100)": 50.0
    }
  ],
  "Random outbreak settings": {
    "Outbreaks enabled": true,
    "Outbreak chance (0-100)": 50.0,
    "Time interval (seconds)": 300,
    "Only outbreak on players with the following stats": [
      {
        "Stat name": "health",
        "Min value": 0.0,
        "Max value": 90.0
      }
    ]
  },
  "Symptom effects": [
    {
      "Asset path": "assets/bundled/prefabs/fx/gestures/drink_vomit.prefab",
      "Local only": false
    },
    {
      "Asset path": "assets/bundled/prefabs/fx/water/midair_splash.prefab",
      "Local only": false
    },
    {
      "Asset path": "assets/prefabs/weapons/cake/effects/strike_screenshake.prefab",
      "Local only": true
    }
  ],
  "Symptom screen effects": [
    {
      "Sprite asset path": "assets/content/ui/overlay_poisoned.png",
      "Opacity (0-1.0)": 1.0,
      "Duration (seconds)": 1.0,
      "Fade out (seconds)": 1.0,
      "Material asset path (optional)": ""
    }
  ],
  "Version": {
    "Major": 2,
    "Minor": 0,
    "Patch": 0
  }
}​
{
  "Disease name": "Norovirus-21",
  "Description": "Highly contagious disease that causes vomitting and is caused by eating rotten food. Can be treated with tea and cured with pills.",
  "Min time immune after recovery (seconds)": 180,
  "Max time immune after recovery (seconds)": 600,
  "Min time infected (seconds)": 1200,
  "Max time infected (seconds)": 2400,
  "Min time between symptoms (seconds)": 5,
  "Max time between symptoms (seconds)": 45,
  "Spread distance (4.0 = 1 foundation)": 4.0,
  "Spread chance with mask (0-100)": 0.0,
  "Spread chance without mask (0-100)": 85.0,
  "Symptom damage effects": [
    {
      "Stat name": "health",
      "Min damage": 1.0,
      "Max damage": 5.0
    },
    {
      "Stat name": "calories",
      "Min damage": 100.0,
      "Max damage": 125.0
    },
    {
      "Stat name": "hydration",
      "Min damage": 50.0,
      "Max damage": 85.0
    }
  ],
  "Items that cause infection on consumption": [
    {
      "Infection chance on consumption (0-100)": 10.0,
      "Short prefab name": "chicken.raw"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "chicken.spoiled"
    },
    {
      "Infection chance on consumption (0-100)": 10.0,
      "Short prefab name": "humanmeat.raw"
    },
    {
      "Infection chance on consumption (0-100)": 85.0,
      "Short prefab name": "humanmeat.spoiled"
    }
  ],
  "Items that cure on consumption": [
    {
      "Cure chance on consumption (0-100)": 50.0,
      "Short prefab name": "antiradpills"
    }
  ],
  "Items that reduce infection time on consumption": [
    {
      "Min infection time decreased (seconds)": 5,
      "Max infection time decreased (seconds)": 10,
      "Delay between reusing treament (seconds)": 10,
      "Short prefab name": "healingtea"
    },
    {
      "Min infection time decreased (seconds)": 10,
      "Max infection time decreased (seconds)": 40,
      "Delay between reusing treament (seconds)": 40,
      "Short prefab name": "healingtea.advanced"
    },
    {
      "Min infection time decreased (seconds)": 40,
      "Max infection time decreased (seconds)": 160,
      "Delay between reusing treament (seconds)": 160,
      "Short prefab name": "healingtea.pure"
    }
  ],
  "Entities that cause infection on hit": [
    {
      "Short prefab name": "boar",
      "Infection chance on hit (0-100)": 5.0
    }
  ],
  "Random outbreak settings": {
    "Outbreaks enabled": true,
    "Outbreak chance (0-100)": 25.0,
    "Time interval (seconds)": 300,
    "Only outbreak on players with the following stats": [
      {
        "Stat name": "health",
        "Min value": 0.0,
        "Max value": 50.0
      }
    ]
  },
  "Symptom effects": [
    {
      "Asset path": "assets/bundled/prefabs/fx/gestures/drink_vomit.prefab",
      "Local only": false
    },
    {
      "Asset path": "assets/bundled/prefabs/fx/water/midair_splash.prefab",
      "Local only": false
    },
    {
      "Asset path": "assets/prefabs/weapons/cake/effects/strike_screenshake.prefab",
      "Local only": true
    }
  ],
  "Symptom screen effects": [
    {
      "Sprite asset path": "assets/content/ui/overlay_poisoned.png",
      "Opacity (0-1.0)": 1.0,
      "Duration (seconds)": 1.0,
      "Fade out (seconds)": 1.0,
      "Material asset path (optional)": ""
    }
  ],
  "Version": {
    "Major": 2,
    "Minor": 1,
    "Patch": 0
  }
}
This is the config file:
{
  "Generate default disease (true/false)": false,
  "Loaded diseases on startup": [
    "Rabies",
    "Norovirus-21",
    "Anthrax",
    "Influenza",
    "Mosaic",
    "Zika"
  ],
  "Max number of infected entities": 100,
  "Disease name color in messages": "green",
  "Face covering items": [
    "mask.bandana",
    "burlap.headwrap",
    "clatter.helmet",
    "coffeecan.helmet",
    "heavy.plate.helmet",
    "hazmatsuit",
    "hazmatsuit.spacesuit",
    "metal.facemask",
    "halloween.surgeonsuit"
  ],
  "Show status chat messages": true,
  "Infections can spread in safe zones": true,
  "Broadcast disease death messages": true,
  "Broadcast outbreaks": true,
  "HUD indicator list": {
    "Anchor min": "0.9 0.6",
    "Anchor max": "0.985 0.9",
    "Entry height": 0.1,
    "Anchor min (image)": "0.04 0.1",
    "Anchor max (image)": "0.22 0.85",
    "Show image (requires ImageLibrary)": true
  }
}​
In the meanwhile, thanks for your quick update! :-)

I'll put these files in and test them out real quick, one thing I notice though is that in your Rabies file, the version is out of date. It is set to 2.0.0, but needs to be 2.1.0. These numbers refer to Major.Minor.Patch, and the code is setup to reject and disease file in which the Major and Minor numbers aren't up to date (it cares less about Patch).

So I'll test these out to see if theres any other problems, but make sure you update the Version in the file and maybe that will fix it! :)



Merged post

Just ran the files, both seem to load once you update the version. Try it out :)

Eh, now that you pointed out, ALL my disease files have the same wrong release number, thing that I just correct and, as you confirmed, they all work charmingly! Thanks so much! :-D

(and yeah, I don't know if I already said that but moving the diseases on GitHub is a good idea...)



Merged post

Hello there!
Is it possible to add diseases to your diseases.md on GitHub?
Locked automatically