January 23, 2019, 05:11:15 AM

Author Topic: Support for WCS by Tha Pwned  (Read 411 times)

Offline phixious

  • Level 1 Trained Beginner
  • *
  • Posts: 29
  • Country: us
  • <3 WCS :)
Support for WCS by Tha Pwned
« on: December 14, 2018, 08:50:46 PM »
I removed this from the announcement thread and moved it into its own thread here to try to make separation of support and announcement .

-- From old post --


So i am assuming that I just made a mistake somewhere but, i'm not using github to load content. modified the races.json file.. getting this error

Quote from: Console
=============================================================
L 12/13/2018 - 12:25:11: rcon from "192.223.25.172:41217": command "sp plugin list"
 
 
[SP] Loading plugin 'wcs'...

[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 194, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 76, in _load
self.module.load()
File "../addons/source-python/plugins/wcs/wcs.py", line 225, in load
race_manager.load_all()
File "../addons/source-python/plugins/wcs/core/modules/races/manager.py", line 179, in load_all
self._load_categories_and_values('races', config, RACE_PATH, RACE_PATH_ES)
File "../addons/source-python/plugins/wcs/core/modules/base.py", line 96, in _load_categories_and_values
for name in data[module]:

TypeError: list indices must be integers or slices, not str


[SP] Plugin 'wcs' was unable to be loaded.
L 12/13/2018 - 12:25:22: rcon from "192.223.25.172:41251": command "sp plugin load wcs"

Everything i have is straight from github downloads. Didn't modify anything excluding the races.json

Quote from: 'races.json"
{
    "categories": {
        "standard": [
            "undead_scourge",
            "human_alliance",
         "night_elves",
         "orcish_horde"
        ]
    },
    "races": [
        "undead_scourge",
      "human_alliance",
      "night_elves",
      "orcish_horde"
    ]
}

Edit: I am trying to get a proof of concept up and running for testing. My community asked for a mix of DZ and WCS or an RPG mod. I think that it could be really fun if it works with sv_allow_thirdperson (and some of the new sv_dz cvars stop crashing the server)... anyways, Is there somewhere that I can get a set of "default" items like claws of attack and xp book?

Edit 2: Tried to load fresh again and got this error going on now..

Quote from: console
sp plugin load wcs
[SP] Loading plugin 'wcs'...
 
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 194, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "../addons/source-python/plugins/wcs/wcs.py", line 121, in <module>
from .core.menus.build import _get_current_options # Just to load it
File "../addons/source-python/plugins/wcs/core/menus/build.py", line 84, in <module>
from ..players.entity import Player
File "../addons/source-python/plugins/wcs/core/players/entity.py", line 113, in <module>
privileges = json_load(inputfile)
File "../addons/source-python/Python3/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "../addons/source-python/Python3/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "../addons/source-python/Python3/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "../addons/source-python/Python3/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 51 column 5 (char 1601)
[SP] Plugin 'wcs' was unable to be loaded.

Offline Tha Pwned

  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 205
  • Country: dk
  • 5% coder, 85% derp, 10% herp
Re: Support for WCS by Tha Pwned
« Reply #1 on: December 17, 2018, 08:12:09 PM »
Sorry for the late response. Been quite busy with family.

So i am assuming that I just made a mistake somewhere but, i'm not using github to load content. modified the races.json file.. getting this error

Quote from: Console
=============================================================
L 12/13/2018 - 12:25:11: rcon from "192.223.25.172:41217": command "sp plugin list"
 
 
[SP] Loading plugin 'wcs'...

[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 194, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 76, in _load
self.module.load()
File "../addons/source-python/plugins/wcs/wcs.py", line 225, in load
race_manager.load_all()
File "../addons/source-python/plugins/wcs/core/modules/races/manager.py", line 179, in load_all
self._load_categories_and_values('races', config, RACE_PATH, RACE_PATH_ES)
File "../addons/source-python/plugins/wcs/core/modules/base.py", line 96, in _load_categories_and_values
for name in data[module]:

TypeError: list indices must be integers or slices, not str


[SP] Plugin 'wcs' was unable to be loaded.
L 12/13/2018 - 12:25:22: rcon from "192.223.25.172:41251": command "sp plugin load wcs"

Everything i have is straight from github downloads. Didn't modify anything excluding the races.json

Quote from: 'races.json"
{
    "categories": {
        "standard": [
            "undead_scourge",
            "human_alliance",
         "night_elves",
         "orcish_horde"
        ]
    },
    "races": [
        "undead_scourge",
      "human_alliance",
      "night_elves",
      "orcish_horde"
    ]
}
That exception should now be fixed. Thanks for reporting!

Edit: I am trying to get a proof of concept up and running for testing. My community asked for a mix of DZ and WCS or an RPG mod. I think that it could be really fun if it works with sv_allow_thirdperson (and some of the new sv_dz cvars stop crashing the server)... anyways, Is there somewhere that I can get a set of "default" items like claws of attack and xp book?

Edit 2: Tried to load fresh again and got this error going on now..

Quote from: console
sp plugin load wcs
[SP] Loading plugin 'wcs'...
 
[SP] Caught an Exception:
Traceback (most recent call last):
File "../addons/source-python/packages/source-python/plugins/command.py", line 162, in load_plugin
plugin = self.manager.load(plugin_name)
File "../addons/source-python/packages/source-python/plugins/manager.py", line 194, in load
plugin._load()
File "../addons/source-python/packages/source-python/plugins/instance.py", line 74, in _load
self.module = import_module(self.import_name)
File "../addons/source-python/plugins/wcs/wcs.py", line 121, in <module>
from .core.menus.build import _get_current_options # Just to load it
File "../addons/source-python/plugins/wcs/core/menus/build.py", line 84, in <module>
from ..players.entity import Player
File "../addons/source-python/plugins/wcs/core/players/entity.py", line 113, in <module>
privileges = json_load(inputfile)
File "../addons/source-python/Python3/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "../addons/source-python/Python3/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "../addons/source-python/Python3/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "../addons/source-python/Python3/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 51 column 5 (char 1601)
[SP] Plugin 'wcs' was unable to be loaded.
There appears to be an error in your privileges.json file on line 51. Seems like you might be using single quotes (') instead of double quotes (").
Quote from: La Muerte
17:44 - #La Muerte: FU whipe your ass so you hear better!
Quote from: La Muerte
13:41 - Muerte: what is it with you and I talking about asses in eachothers quotes?
13:41 - Muerte: ass buddies!
If you need help, got a question about Python, or just need to chat with a friendly guy, feel free to add me on Steam.

Offline phixious

  • Level 1 Trained Beginner
  • *
  • Posts: 29
  • Country: us
  • <3 WCS :)
Re: Support for WCS by Tha Pwned
« Reply #2 on: December 18, 2018, 02:58:45 PM »
found the problem in my privs.json

it was an extra "," after the last player's configuration (copy/paste + derp = error)

I'll update to the newest github and let you know how it goes.

Thanks for the help.