Jump to content

Is this still supported?

Pending 1.1.5

Tater
Tater

Posted

I just installed this for the first time because I wanted to make the scientists on my server wear different skin sets.  I made two kits and added them to the config for the scientists and dwellers but they will not change to the kits I made.

Thanks!

 

  • Administrator
Steenamaroo

Posted

Hi,
Did you add the kits manually by editing the json? If so, are you sure the formatting was correct?
 

"Kits":["Kit One"]    // for a single kit

"Kits":["Kit One", "Kit Two", "Kit Three"]   // for multiple kits

If your formatting is correct be sure to save the config file then oxide.reload NPCKits in console,
then watch the console to make sure no errors are thrown.

 

If that's all correct and checks out, make sure that Enabled is set to true for these profiles.
If that's correct already, it may be that they are actually getting their kits, but the clothing isn't being added due to the presence of the hazmat suit.
Ensure that Wipe_Default_Clothing is set to true for those profiles.

Always reload the plugin after making any config file change.

Finally, it would be worth totally emptying your own inventory (all containers) then redeeming the kit in question,
to make sure it's definitely populated as you expect it to be.


If none of that gets you up and running, please let me know here.

Tater

Posted (edited)

Thanks for the response. I created the kits using the gui of the kits mod, which controls the formatting.  As for assigning the kits and enabling them, here is what I am doing for the scientists as an example:  I am setting enabled to "true" and then I am indicating which kit I want them to use. Every time I make the changes to the cfg and then reload the plugin, it wipes the changes I made and loads a default cfg back in.

"Scientist": {
      "enabled": True,
      "Kits": [Trooper],
      "Health": 100,
      "Weapon_Drop_Percent": 100,
      "Min_Weapon_Drop_Condition_Percent": 100,
      "Max_Weapon_Drop_Condition_Percent": 100,
      "Dropped_Weapon_Has_Ammo_Percent_Chance": 100,
      "Wipe_Default_Clothing": true,
      "Wipe_Default_Weapons": true,
      "Wipe_Main_Inventory_Percent": 100,
      "Wipe_Clothing_Percent": 100,
      "Wipe_Belt_Percent": 100,
      "Default_Rust_Loot_Percent": 100

Edited by Tater
Tater

Posted (edited)

I did try it with "" around the kit name, even though the kit name is only one word, but it still reverts the cfg back to default when I reload the plugin.

Edited by Tater
  • Administrator
Steenamaroo

Posted

     "enabled": True,
      "Kits": [Trooper],


True should have a lower case t, and Trooper should be "Trooper"

Change to this, and make sure all entires are corrected in the same way, then reload should be fine.

     "enabled": true,
      "Kits": ["Trooper"],

  • Administrator
Steenamaroo

Posted (edited)

FYI, I'm not sure if "Scientist" does anything.
I think it was a kind of catch-all for if I missed anything but, at present, I don't think I have.
It may affect npcs from plugins so, most likely, you probably don't want to use that particular category. 👍

Edited by Steenamaroo
Tater

Posted

I have tried "true" both ways (big T and little t) and Trooper with and without quotes.   I am using notepad++ as administrator.  No matter what, when I reload the plugin it resets the cfg back to default.

 

Thanks

Tater

Posted

Do I need to do with the server shut down?

Tater

Posted

I unloaded the plugin, then made a change, then reloaded.  This time I got an error in the console. 

NPCKits v1.1.5: Failed to load config file (is the config file corrupt?) (Unexpected character encountered while parsing
 value: T. Path 'CorpseTypes.CargoShip.Kits', line 85, position 15.)
[NPCKits] Config file issue detected. Please delete file, or check syntax and fix.
Failed to call hook 'Unload' on plugin 'NPCKits v1.1.5' (NullReferenceException: Object reference not set to an instance
 of an object)
  at Oxide.Plugins.NPCKits.Unload () [0x0003f] in <f8c92b8fbff24c109a73a2db14111020>:0
  at Oxide.Plugins.NPCKits.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0005b] in <f
8c92b8fbff24c109a73a2db14111020>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <
09575a60985045248bcb43b20faeeb99>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b
01571c99dce02>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b0157
Unloaded plugin NPCKits v1.1.5 by Steenamaroo
Loaded plugin NPCKits v1.1.5 by Steenamaroo

Tater

Posted (edited)

it's as if it's not finding the kit name in the kit data file.  Is this plugin supposed to have a user interface?

Edited by Tater
Tater

Posted (edited)

I was able to get it to work if I renamed the .cs extension to force unload the plugin - make the changes - rename the extension back to .cs to reload it.  Without doing this, it simply will not allow the change.

Edited by Tater
  • Administrator
Steenamaroo

Posted

Yeah, the plugin does have a UI for making changes and, as such, saves config upon unload,
so you can't make manual changes to the config file while the plugin is live - They'll get reverted as soon as you un/re load.

 

Unload plugin.

Fix all true/false capitals ts and fs,
Fix all formatting of Kits ["Like this"]  ["or", "like", "this"]

Load plugin.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.