Warcraft-Source

Plugin => News => Source.Python Edition => Announcements => Topic started by: Predz on January 17, 2016, 08:53:11 AM

Title: Warcraft GO v0.3.3.beta
Post by: Predz on January 17, 2016, 08:53:11 AM
 
Warcraft GO v0.3.3.beta


Description:
    Warcraft GO Edition designed by Predz and Mahi. Built upon the Source.Python plugin to be a huge upgrade to the old versions of WCS, works for CS:S and CS:GO.

Requirements:
    Source.Python (http://build.affecta.net/job/Source.Python/lastSuccessfulBuild/) (Update fully due to the new Warcraft GO version uses a lot of the new features!)
    EasyPlayer Package (https://github.com/Mahi/EasyPlayer) (Update using the current git files, because Mahi is yet to put a Release with my fixes!)

Download:
    v0.3.3.beta Release (https://github.com/Warcraft-GO-Team/Warcraft-GO/releases/tag/v0.3.3-beta)

Installation:
    Drag all content from zip/rar into the csgo directory.
    Add "sp load wcgo" to your server.cfg or autoexec.cfg.
    If you're having problems, watch Mahi's video tutorial (http://warcraft-source.com/board/index.php?topic=17016) to make sure you did everything right before asking for more help.

Configuration:
    Edit the config.py file to your preferences.
    Add custom heroes/items into their respective folders.
    Customize hero categories, levels, etc.

Credits:
    Manifest for him coding the effects, and supplying my test servers.
    Satoon for helping with a lot of the changes, when Source Python changes their libraries.

Extra:
    If you don't want people to use them then add an underscore (_) to the beginning of the Python file's name.
    The "models" dictionary supplied with this version auto-precaches everything. So just retrieving the item from the dictionary is enough.

Change Log:
[Spoiler]
    v 0.3.3.beta
    - Changed delays in Warcraft GO to use the new Delay class in Source.Python
    - Added a new ability class method to allow construction of multiple abilities in heroes. May change method of how this is done at a later date.
    - Updated the menus and heroes to use a new meet_requirements class method. This allows you to use custom requirements for each hero. Return True for the Buy button to be enabled, and return False for the Buy button to be disabled.
    - Other minor fixes, but not needed to go in depth with these.

    v 0.3.1.beta
    - Changed config system to use Source.Python's ConfigManager.
    - Updated menus to use new translation system.
    - Removed unnecessary checking of basehandles.
    - Fixed a few messages.
    - Updated the core to use new Source.Python versions.

    v 0.3.0.beta
    - Added support translations (special thanks to @satoon101 for most of the work) as well as English and Finnish translations
    - Fixed all the XP and level displays where `max_level` was set to `None` and thus it would display `X/None` instead of just `X`
    - Improved ultimate checks so you can no longer ultimate when dead (and the current heroes prevent ultimating between rounds too)
    - **Loads** of bug fixes (huge thanks to the http://www.warcraft-source.com community) and other minor improvements, which can all be seen through the [commit history]

    v 0.2.2.beta
    - Beta (check Github for changes)

Why we skipped a version:
    Currently I have skipped a version because we should of really made a release when Satoon had kindly updated our config files. So therefore I felt it was right to leave a space where it should of been.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on January 17, 2016, 09:06:48 AM
A lot of new features have been added with this update so I thought it was best for me to show you how to use them. Python programmers will probably find this not very useful, as I have tried to take advantage of Python by using these methods of implementation.



Below is an example of how to use the new ability decorator. We have added 2 new hero events along with this update, which are "player_use" and "player_ability".

Code: [Select]
@Paladin.ability
class Holy_Light(Skill):
    'Heal yourself or ally upon ability.'

    ability = 1
    max_level = 8

    _msg_a = '>> \x04Devotion Aura: \x05{name} \x02cannot \x05be healed.'
    _msg_b = '>> \x04Devotion Aura: \x05Healed {name} for {heal} health.'
    _msg_c = '>> \x04Devotion Aura: \x05You were healed by {name}.'

    @property
    def _heal(self):
        return 20 + self.level * 5

    @cooldown(5)
    def player_use(self, player, **eargs):
        target = player.view_player
        if not target:
            target = player

        if target.health > 60:
            self.player_use.remaining_cooldown = 0
            SayText2(self._msg_a.format(name=target.name)).send(player.index)
        else:
            target.health += self._heal
            SayText2(self._msg_b.format(name=target.name, heal=self._heal)).send(player.index)
            if player.userid != target.userid:
                SayText2(self._msg_c.format(name=player.name)).send(target.index)


"player_use" is to be registered in a ability, and is called upon the player using the "ability 1/2/3/4/etc" client command. On being called only the player instance is supplied.

"player_ability" is to be registered in any skill. It is the same as "player_use" however is called when ever ANY ability is fired. The "player_ability" method will be called using a player instance and a ability instance, which allows you to get the abilities data as well.



We also added the ability to create independent hero requirements in this update. So you can now have a hero which works upon gold/totallevel/herolevel being satisfied.

Below is an example which would only allow players with the hero "Death Knight" above level 6, to buy the hero "Paladin".

Code: [Select]
class Paladin(Hero):
    'Holy warrior, empowered by the light.'

    max_level = 40
    category = 'DEFAULT'
    requirements = 'Get Death Knight to Level 6'

    @classmethod
    def meet_requirements(cls, player):
        if 'Death_Knight' in player.heroes:
            return player.heroes['Death_Knight'].level >= 6
        return False
Title: Re: Warcraft GO v0.3.3.beta
Post by: HANGOVER on January 17, 2016, 04:20:02 PM

excellent update only one error in the logs:
[Spoiler]
Code: [Select]
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\listeners\tick.py", line 54, in _tick
    self.pop(0).execute()
  File "..\addons\source-python\packages\source-python\listeners\tick.py", line 115, in execute
    return self.callback(*self.args, **self.kwargs)
  File "..\addons\source-python\packages\source-python\listeners\tick.py", line 399, in _execute
    self.callback(*self.args, **self.kwargs)
  File "..\addons\source-python\packages\source-python\menus\queue.py", line 238, in _radio_refresh
    queue._refresh()
  File "..\addons\source-python\packages\source-python\menus\queue.py", line 105, in _refresh
    menu._refresh(self._index)
  File "..\addons\source-python\packages\source-python\menus\base.py", line 92, in _refresh
    self._send(player_index)
  File "..\addons\source-python\packages\source-python\menus\radio.py", line 118, in _send
    ShowMenu(*self._build(player_index)).send(player_index)
  File "..\addons\source-python\packages\source-python\menus\base.py", line 102, in _build
    self.build_callback(self, player_index)
  File "..\addons\source-python\plugins\wcgo\menus\heroes.py", line 211, in _current_hero_menu_build
    player = wcgo.player.Player(index)
  File "..\addons\source-python\packages\custom\easyplayer\player.py", line 111, in __call__
    userid = userid_from_index(index)

ValueError: Conversion from "Index" (3) to "Userid" failed.


and when you add new heroes "Paladin", "Undead Scourge" is not loaded mod:
[Spoiler]
Code: [Select]
[SP] Caught an Exception:
Traceback (most recent call last):
  File "..\addons\source-python\packages\source-python\plugins\manager.py", line 77, in __missing__
    instance.globals['load']()
  File "..\addons\source-python\plugins\wcgo\wcgo.py", line 51, in load
    wcgo.utilities.import_modules(wcgo.heroes)
  File "..\addons\source-python\plugins\wcgo\heroes\hero.py", line 16, in <module>
    from listeners.tick import tick_delays

ImportError: cannot import name 'tick_delays'
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on January 17, 2016, 05:04:15 PM
Yeh I haven't updated the imports on Undead Scourge yet. I will fix them later :)

For the index errors. Those I honestly have no clue where they come from, and neither do Source.Python devs. But they dont cause any problems so shouldn't be a problem. :)
Title: Re: Warcraft GO v0.3.3.beta
Post by: Frogs on January 18, 2016, 02:05:47 PM
Hey !
Nice update ! :) Thanks you

I have a problem to load sp on my server (my host is MtxServ) :
Code: [Select]
[SP] Loading plugin 'wcgo'...
[SP] Caught an Exception:
Traceback (most recent call last):
File '../addons/source-python/packages/source-python/plugins/manager.py', line 71, in __missing__
instance = self.instance(plugin_name, self.base_import)
File '../addons/source-python/packages/source-python/plugins/instance.py', line 82, in __init__
self._plugin = import_module(import_name)
File '../addons/source-python/plugins/wcgo/wcgo.py', line 25, in
File '../addons/source-python/plugins/wcgo/database.py', line 4, in
import sqlite3
import wcgo.database
File '../addons/source-python/Python3/sqlite3/__init__.py', line 23, in
from sqlite3.dbapi2 import *
File '../addons/source-python/Python3/sqlite3/dbapi2.py', line 26, in
from _sqlite3 import *
ImportError: libsqlite3.so.0: cannot open shared object file: No such file or directory
[SP] Plugin 'wcgo' was unable to be loaded.

But locally on my computer, I don't have this problem.
So why it's not works on the server ?
Title: Re: Warcraft GO v0.3.3.beta
Post by: Ayuto on January 18, 2016, 03:22:05 PM
Try copying libsqlite3.so.0 from ../addons/source-python/Python3/plat-linux/ to your base directory (where srcds_linux is located).
Title: Re: Warcraft GO v0.3.3.beta
Post by: valerun on January 18, 2016, 04:10:55 PM
Mysql will support?
Title: Re: Warcraft GO v0.3.3.beta
Post by: Frogs on January 18, 2016, 04:51:58 PM
Quote
Try copying libsqlite3.so.0 from ../addons/source-python/Python3/plat-linux/ to your base directory (where srcds_linux is located).

It works ! Thanks you verymuch !
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on January 18, 2016, 05:19:14 PM
Adding MySQL support is rather easy however not on my priority list atm. If enough people would like the support for it then I will get to work on it hopefully later this week. Sorry but I have driving test and stuff tomorrow.
Title: Re: Warcraft GO v0.3.3.beta
Post by: garry on January 21, 2016, 07:58:35 AM
Need help with the translation into Russian?
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on January 21, 2016, 08:47:28 AM
Hiya garry. If you would like to do the russian translations, then feel free to put a pull request on Github for it. I am always for the community helping to update Warcraft GO, and would appreciate the translations :D
Title: Re: Warcraft GO v0.3.3.beta
Post by: zuzs980 on January 23, 2016, 02:40:27 PM
I am going to try to get this To work on my dedicated server from my computer and if i can get it to work ill be adding it to a live server to go along with my 1v1 server! Glad to see this mod is making a comeback, It was my favorite back in cSS.

EDIT:
Server Starts but the plugin wont load. Its a fresh installed dedicated server on my PC.


Code: [Select]
[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\plugins\manager.py', line 71, in __missing__
    instance = self.instance(plugin_name, self.base_import)
  File '..\addons\source-python\packages\source-python\plugins\instance.py', line 82, in __init__
    self._plugin = import_module(import_name)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 30, in <module>
    import wcgo.menus
  File '..\addons\source-python\plugins\wcgo\menus\__init__.py', line 4, in <module>
    from wcgo.menus.main import main_menu
  File '..\addons\source-python\plugins\wcgo\menus\main.py', line 10, in <module>
    import wcgo.player
  File '..\addons\source-python\plugins\wcgo\player.py', line 10, in <module>
    import easyplayer

ImportError: No module named 'easyplayer'


[SP] Plugin 'wcgo' was unable to be loaded.
exec: couldn't exec gamemode_casual_server.cfg
Commentary: Could not find commentary data file 'maps/de_dust2_commentary.txt'.
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Initializing Steam libraries for secure Internet server
Logging into Steam gameserver account with logon token 'D11AF41Cxxxxxxxxxxxxxxxxxxxxxxxx'
Connection to Steam servers successful.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Kami on January 23, 2016, 03:27:18 PM
You need the easyplayer module as stated in the first post :) There is a link to it too!
Title: Re: Warcraft GO v0.3.3.beta
Post by: zuzs980 on January 23, 2016, 08:10:25 PM
Maybe a dumb question...

But is there a List of Commands for this mod.
I cant find them in the files and all ive stumbled across is wcgo
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on January 24, 2016, 08:02:50 AM
The "wcgo" command is designed to access the main menu. At the moment there is no way to navigate straight to a submenu. However could be implemented easily.

If you go to the Source.Python website you will be able to see the way in which we can alter <Player> attributes to change the players stuff in game.

http://forums.sourcepython.com/ (http://forums.sourcepython.com/)

Code: [Select]
# Removes 20% of the player's speed.
<Player>.speed -= 0.2

# Adds 30HP to the player's health.
<Player>.health += 30
Title: Re: Warcraft GO v0.3.3.beta
Post by: zuzs980 on January 24, 2016, 02:12:00 PM
Okay cool! Ill look into it, im REALLY bad at coding so ill give it a shot
Title: Re: Warcraft GO v0.3.3.beta
Post by: Eareland on January 25, 2016, 04:13:50 PM
I'm not really around anymore, but nice to see that WC plugin is evolving, so, good job everyone involved in this project.  :D
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lodberg on February 18, 2016, 05:06:46 PM
This doesn't work for me, Would anyone be able to help?...
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on February 18, 2016, 05:59:23 PM
I am currently working on a entire new recode and so am using a lot of my time on that. I have most of the core re-written, hopefully should have something to show within a couple of days. When that time comes I will write a whole new installation method, because the new version will not be dependent on EasyPlayer.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lodberg on February 18, 2016, 06:05:18 PM
Okay homie, I hope it will be ready soon (y)
Title: Re: Warcraft GO v0.3.3.beta
Post by: valerun on February 19, 2016, 06:14:15 AM
When will is MySQL database?
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lodberg on February 20, 2016, 11:43:55 AM
Any suggestions why it doesn't load for me..
Title: Re: Warcraft GO v0.3.3.beta
Post by: Kami on February 20, 2016, 11:48:04 AM
There should be an error message when you try to load it, that would help.

But I think Source Python was updated some time ago and WCGO was not adapted to the changes made, so it could be that.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lodberg on February 20, 2016, 12:01:01 PM
[SP] Loading plugin 'wcgo'...
 
[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\plugins\manager.py', line 71, in __missing__
    instance = self.instance(plugin_name, self.base_import)
  File '..\addons\source-python\packages\source-python\plugins\instance.py', line 82, in __init__
    self._plugin = import_module(import_name)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 30, in <module>
    import wcgo.menus
  File '..\addons\source-python\plugins\wcgo\menus\__init__.py', line 4, in <module>
    from wcgo.menus.main import main_menu
  File '..\addons\source-python\plugins\wcgo\menus\main.py', line 10, in <module>
    import wcgo.player
  File '..\addons\source-python\plugins\wcgo\player.py', line 10, in <module>
    import easyplayer
 
ImportError: No module named 'easyplayer'



Please help me to fix this :s
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on February 20, 2016, 12:16:03 PM
Install EasyPlayer.  Link is in the requirements section in the first post of this thread.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lodberg on February 20, 2016, 12:27:32 PM
But i have it :s  http://prntscr.com/a5ro9s
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on February 20, 2016, 12:31:18 PM
You seemed to have installed it incorrectly.  Read the instructions on EasyPlayer's GitHub repository.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lodberg on February 20, 2016, 12:36:04 PM
I really have no idea what i do wrong :s


Can you explain to me what am i supposed to do now :s

I really dont understand "to install EasyPlayer on your server with Source.Python installed, simply drag and drop the addons folder into your game's directory (csgo, cstrike, tf2, etc.), and restart your game server. To use EasyPlayer in your plugins, simply import it using from easyplayer import EasyPlayer. You can now either subclass your own player class from it, or use it as-is in your code. You can also use from easyplayer import PlayerEffect to create custom player effects for your subclasses. You should study the easyplayer package's content to learn more about how PlayerEffect's work."


What am i supposed to do Oo
Title: Re: Warcraft GO v0.3.3.beta
Post by: Ayuto on February 20, 2016, 01:19:17 PM
Download EasyPlayer from Github using the "Download ZIP" button and then copy the "easyplayer" directory (that's a sub-directory of "EasyPlayer-master") to ../addons/source-python/packages/custom.
Title: Re: Warcraft GO v0.3.3.beta
Post by: nilford on March 07, 2016, 08:14:33 AM
This doesn't work for me, Would anyone be able to help?
Source.Python #281
EasyPlayer Last master
Code: [Select]
..........
VAC secure mode is activated.
bot_add
Game will not start until both teams have players.

[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\events\listener.py', line 92, in fire_game_event
    callback(game_event)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 115, in _save_data_on_spawn
    if event['teamnum'] in (2, 3):

KeyError: 'Key 'teamnum' does not exist.'



[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\events\listener.py', line 92, in fire_game_event
    callback(game_event)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 142, in _execute_spawn_message
    if event['teamnum'] in (2, 3):

KeyError: 'Key 'teamnum' does not exist.'



[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\events\listener.py', line 92, in fire_game_event
    callback(game_event)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 280, in _on_player_spawn
    if event['teamnum'] in (2, 3):

KeyError: 'Key 'teamnum' does not exist.'


Game will not start until both teams have players.
Dropped Scott from server (Kicked from server)
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on March 07, 2016, 11:18:07 AM
Which game did you install this on?  I know that error will occur on CS:S due to 'teamnum' not being an event variable in player_spawn.  This plugin is specifically designed for CS:GO, though I think that is the only issue I have seen so far for getting it to work on CS:S.
Title: Re: Warcraft GO v0.3.3.beta
Post by: nilford on March 07, 2016, 12:10:17 PM
I install on CS:S.
But
Quote
Warcraft GO Edition designed by Predz and Mahi. Built upon the Source.Python plugin to be a huge upgrade to the old versions of WCS, works for CS:S and CS:GO.
this can be fixed by yourself?
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on March 07, 2016, 03:29:21 PM
I created a pull request (https://github.com/Warcraft-GO-Team/Warcraft-GO/pull/19) that fixes the CS:S compatibility issues.  You can either wait till the changes are pulled or modify the wcgo.py file yourself with my changes.
Title: Re: Warcraft GO v0.3.3.beta
Post by: nilford on March 07, 2016, 11:34:05 PM
Now this error:
! Line numbers slightly shifted!
Code: [Select]
[SP] Caught an Exception:

Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\events\listener.py', line 92, in fire_game_event
    callback(game_event)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 291, in _on_player_spawn
    _execute_player_skills(event)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 208, in _execute_player_skills
    player.hero.execute_skills(event.get_name(), player=player, **eargs)

AttributeError: 'GameEvent' object has no attribute 'get_name'
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on March 08, 2016, 02:33:24 PM
That error is actually already fixed, they just haven't released a new version since then.  They also added my pull request to the repository.  Until they create a new release, you can always go to the repository's page and click the Download ZIP button to download the current master branch.
https://github.com/Warcraft-GO-Team/Warcraft-GO (https://github.com/Warcraft-GO-Team/Warcraft-GO)
Title: Re: Warcraft GO v0.3.3.beta
Post by: nilford on March 09, 2016, 02:09:11 AM
Thanks. But, here one else error. Attempts arise when the Use ultimate skill.
Code: [Select]
[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\commands\auth.py', line 65, in __call__
    return self.callback(*args)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 189, in _ultimate_say_command
    if player.team in (2, 3) and player.isdead is False:
  File '..\addons\source-python\packages\custom\easyplayer\player.py', line 151, in __getattr__
    return super().__getattr__(attr)
  File '..\addons\source-python\packages\source-python\entities\entity.py', line 98, in __getattr__
    raise AttributeError('Attribute '{0}' not found'.format(attr))

AttributeError: Attribute 'isdead' not found
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on March 09, 2016, 11:37:31 AM
Ah, that is a recent change in SP as well.  I will commit another pull request for this.
Title: Re: Warcraft GO v0.3.3.beta
Post by: nilford on March 09, 2016, 08:40:23 PM
I did the same as you are in the last commit https://github.com/satoon101/Warcraft-GO/commit/0c2d61e172670ec91768b7619fa7ac60860ad14a (https://github.com/satoon101/Warcraft-GO/commit/0c2d61e172670ec91768b7619fa7ac60860ad14a). Only  use it not only to the method of "_ability_say_command" but also to "_ultimate_say_command".
As a result of errors in the console about the "ultimate" do not appear, and the "ultimate" does not work, writes "Warcraft GO: Can not use ultimate whilst dead". That is "ultimate" team responds, but for some reason thinks I'm dead. In the method of "_ability_say_command", after your edits when you try to use the "ability" the following error:
Code: [Select]
[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\commands\auth.py', line 65, in __call__
    return self.callback(*args)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 160, in _ability_say_command
    ability_index = int(command.arg_string)

ValueError: invalid literal for int() with base 10: ''
Title: Re: Warcraft GO v0.3.3.beta
Post by: Shanyy on March 10, 2016, 09:42:16 AM
may i ask why i dont get xp for knife kills?

-edit

i have a zombie server where i want to implant wcgo, i was trying this out but when im zombie and i "kill" infect a non zombie i dont get xp?
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on March 15, 2016, 07:23:12 PM
I did the same as you are in the last commit https://github.com/satoon101/Warcraft-GO/commit/0c2d61e172670ec91768b7619fa7ac60860ad14a (https://github.com/satoon101/Warcraft-GO/commit/0c2d61e172670ec91768b7619fa7ac60860ad14a). Only  use it not only to the method of "_ability_say_command" but also to "_ultimate_say_command".
As a result of errors in the console about the "ultimate" do not appear, and the "ultimate" does not work, writes "Warcraft GO: Can not use ultimate whilst dead". That is "ultimate" team responds, but for some reason thinks I'm dead. In the method of "_ability_say_command", after your edits when you try to use the "ability" the following error:
Code: [Select]
[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\commands\auth.py', line 65, in __call__
    return self.callback(*args)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 160, in _ability_say_command
    ability_index = int(command.arg_string)

ValueError: invalid literal for int() with base 10: ''
What was input in chat or client console to cause this error?  It seems you have to pass exactly one argument to "ability" and it must be an integer.  Though, technically they should check for that in the code instead of raising this base error.

And the ultimate issue is my fault.  That was not the proper fix in the pull request.  I will update it to fix it correctly.
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on March 15, 2016, 07:25:33 PM
may i ask why i dont get xp for knife kills?

-edit

i have a zombie server where i want to implant wcgo, i was trying this out but when im zombie and i "kill" infect a non zombie i dont get xp?
Since I don't run a zombie server, I am not 100% sure why this would happen.  Does it actually "kill" the player or do they just become infected?  If it doesn't kill them, there's your answer.  It could be added in, but it would likely require changes to both the zombie plugin and WC:GO.  Which zombie plugin do you use, btw?
Title: Re: Warcraft GO v0.3.3.beta
Post by: nilford on March 16, 2016, 05:23:16 AM
What was input in chat or client console to cause this error?  It seems you have to pass exactly one argument to "ability" and it must be an integer.  Though, technically they should check for that in the code instead of raising this base error.
I just called the team "ability" in the console
Earlier in the WCS was 2 Skill:
1. ultimate - was summoned to the console "ultimate" command.
2. ability - was summoned to the console "ability" command.

now somehow differently ???
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on March 16, 2016, 09:10:30 AM
Hiya nilford. When we made the plugin we designed it to have infinite abilities so you must specify a number when using ability. This will allow the coder to set a ability to each number. If a number is used which doesn't exist then the system is preprogrammed to use the lowest numbered ability.

Code: [Select]
ability 1
## This will use an ability with its index attribute equal to 1

Code: [Select]
ability 6
## If an ability with index 6 doesn't exist it will automatically use the ability with the highest index

Sorry this was done by phone if there are any typos.  :(
Title: Re: Warcraft GO v0.3.3.beta
Post by: raweswag on March 23, 2016, 08:04:28 PM
I have a problem with making this work, eg when i do a command, it says in the console

"Tried to look up command say as if it were a variable."

and when i do "sp load wcgo" it says "sp" isn't a recognized command, please help.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Verixon on March 23, 2016, 09:48:27 PM
I have a problem with making this work, eg when i do a command, it says in the console

"Tried to look up command say as if it were a variable."

and when i do "sp load wcgo" it says "sp" isn't a recognized command, please help.

"Tried to look up command say as if it were a variable." is a harmless clientside bug that shows up if you use say or say_team

As for the "sp isn't a recognized command", make sure you installed SourcePython correctly. Here's a step by step tutorial to help you: http://build.affecta.net/job/Source.Python%20-%20Documentation/lastSuccessfulBuild/artifact/cstrike/addons/source-python/docs/source-python/build/general/installation.html (http://build.affecta.net/job/Source.Python%20-%20Documentation/lastSuccessfulBuild/artifact/cstrike/addons/source-python/docs/source-python/build/general/installation.html)
Title: Wcs
Post by: sanek958585 on May 10, 2016, 11:28:13 PM
Удачи мужики , я верю в вас.
Title: Re: Wcs
Post by: Verixon on May 12, 2016, 06:17:51 AM
Удачи мужики , я верю в вас.
This is an English forum, so please, write messages in English if you expect a response  :D
Title: Re: Warcraft GO v0.3.3.beta
Post by: HANGOVER on May 16, 2016, 01:27:13 PM
Удачи мужики , я верю в вас.
This is an English forum, so please, write messages in English if you expect a response  :D
He wrote: good luck guys, I believe in you.


It's something new versions not released...
Whether the new version will be released soon?
Title: Re: Warcraft GO v0.3.3.beta
Post by: Verixon on May 16, 2016, 09:43:35 PM
Quote
It's something new versions not released...
Whether the new version will be released soon?

Are you asking if the new Warcraft GO version will be released soon? I'm not sure about that since Predz has stopped developing the mod, but Mahi may still be developing. In the future, maybe somebody will make a new WCS and share with the community ;), or maybe Predz will return to developing WCGO.
Title: Re: Warcraft GO v0.3.3.beta
Post by: HANGOVER on May 18, 2016, 07:52:14 AM
sad  :-[
#PredzComeBack
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on May 18, 2016, 12:00:41 PM
Hangover I am still here, just lost my interest for the project sorry.  :-\

I have been working on other projects that are less specific at singling out players from servers. I feel that CSGO itself is a good game. Rather than changing CSGO into something else, it should be ellaborated upon to new gamemodes as such. But I will see how these new gamemodes I am working on go down with you all soon ;)

Just as a example of some of the stuff I have been doing. I was working on a replacement admin system for SourceMods server commands. Instead of server commands though I resulted in working on client commands with custom permission tags.

https://github.com/Predz/Client-Admin (https://github.com/Predz/Client-Admin)
Title: Re: Warcraft GO v0.3.3.beta
Post by: coty9090 on June 01, 2016, 08:53:40 PM
Am i supposed to edit easyplayer to run wcs? Haven't set up a WCS server since it ran off ES... I'm getting a few errors. Running on csgo.

Loaded plugins:
---------------------
0:   "Metamod:Source 1.10.7-dev"
1:   "Source.Python, (C) 2012-2016, Source Python Team."
---------------------

] rcon sp_version
"sp_version" = "344" notify                                                      - Source.Python version

] rcon sp load wcgo
[SP] Loading plugin 'wcgo'...
 
[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\plugins\manager.py', line 75, in __missing__
    instance = self.instance(plugin_name, self.base_import)
  File '..\addons\source-python\packages\source-python\plugins\instance.py', line 82, in __init__
    self._plugin = import_module(import_name)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 30, in <module>
    import wcgo.menus
  File '..\addons\source-python\plugins\wcgo\menus\__init__.py', line 4, in <module>
    from wcgo.menus.main import main_menu
  File '..\addons\source-python\plugins\wcgo\menus\main.py', line 10, in <module>
    import wcgo.player
  File '..\addons\source-python\plugins\wcgo\player.py', line 23, in <module>
    class Player(easyplayer.EasyPlayer):
 
AttributeError: module 'easyplayer' has no attribute 'EasyPlayer'
 
Title: Re: Warcraft GO v0.3.3.beta
Post by: Mahi on June 02, 2016, 06:56:07 AM
Am i supposed to edit easyplayer to run wcs? Haven't set up a WCS server since it ran off ES... I'm getting a few errors. Running on csgo.

Loaded plugins:
---------------------
0:   "Metamod:Source 1.10.7-dev"
1:   "Source.Python, (C) 2012-2016, Source Python Team."
---------------------

] rcon sp_version
"sp_version" = "344" notify                                                      - Source.Python version

] rcon sp load wcgo
[SP] Loading plugin 'wcgo'...
 
[SP] Caught an Exception:
Traceback (most recent call last):
  File '..\addons\source-python\packages\source-python\plugins\manager.py', line 75, in __missing__
    instance = self.instance(plugin_name, self.base_import)
  File '..\addons\source-python\packages\source-python\plugins\instance.py', line 82, in __init__
    self._plugin = import_module(import_name)
  File '..\addons\source-python\plugins\wcgo\wcgo.py', line 30, in <module>
    import wcgo.menus
  File '..\addons\source-python\plugins\wcgo\menus\__init__.py', line 4, in <module>
    from wcgo.menus.main import main_menu
  File '..\addons\source-python\plugins\wcgo\menus\main.py', line 10, in <module>
    import wcgo.player
  File '..\addons\source-python\plugins\wcgo\player.py', line 23, in <module>
    class Player(easyplayer.EasyPlayer):
 
AttributeError: module 'easyplayer' has no attribute 'EasyPlayer'
WC:GO is currently in an unusable state with the latest versions of SP and EasyPlayer. You could try downloading an older version of EasyPlayer (v1.4 should do (https://github.com/Mahi/EasyPlayer/releases/tag/v1.4)) and run WC:GO with that. I'm going to recode WC:GO after I figure out the best way to solve certain issues, but I can't promise when it's going to happen due to having to spend my weeks serving my obligatory military service.
Title: Re: Warcraft GO v0.3.3.beta
Post by: coty9090 on June 02, 2016, 06:02:59 PM
Thanks for the link and update! It's loading now although i haven't tested anything or added any heroes yet.

*EDIT*

I see what you mean...

Only the menu's work and loading up DemonHunter lags the server horribly.

Hope to see progress on wcgo. This mod is so nostalgic!

Good luck, and hopefully not too much of a pain in the ass to fix up. haha
Title: Re: Warcraft GO v0.3.3.beta
Post by: Mahi on June 03, 2016, 02:20:39 AM
May I see the DemonHunter?
Title: Re: Warcraft GO v0.3.3.beta
Post by: coty9090 on June 15, 2016, 08:04:49 PM
Demon Hunter is from Predz. Used the OP code.

http://warcraft-source.com/board/index.php?topic=17032.0
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on June 21, 2016, 09:21:56 AM
As Josh says in one of the comments, my way of establishing double jump is rather server intensive to be honest. So a server lacking in hardware may suffer a little. I will update my heroes at some point soon, as I have been on holiday for the last month, and now have gained a bit of motivation towards the project again. I apologise to everyone about my lack of interest in the project, however everyone who knows me, knows that my mind wonders easily to different projects. :D
Title: Re: Warcraft GO v0.3.3.beta
Post by: Dagger on August 02, 2016, 06:58:39 AM
Is there any CSS Plugins that still works?
Title: Re: Warcraft GO v0.3.3.beta
Post by: darkyy on August 03, 2016, 10:49:21 PM
Is there any CSS Plugins that still works?

http://warcraft-source.com/board/index.php?action=tpmod;dl
Title: Re: Warcraft GO v0.3.3.beta
Post by: 4dmin on October 30, 2016, 01:51:28 AM
Guys, is this still stable for latest CS:GO version?
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on October 30, 2016, 09:41:00 PM
Heya, Me and Mahi are yet to post this fully, but we recoded the entire project again. We are both happier with this version, and I currently run a server with a few heroes and some complex skills. Unfortunately I cannot populate my server because I lack to community to do so. :( So I have not been creating any new content for it for a while. IP address is below for you. Add me on steam if you wish to try it out with some players.

wcgo.verygames.net:27015

https://github.com/Mahi/Warcraft-SP (https://github.com/Mahi/Warcraft-SP)

http://steamcommunity.com/profiles/76561198200706498/ (http://steamcommunity.com/profiles/76561198200706498/)
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on October 30, 2016, 09:44:44 PM
Here is a hero I coded a while ago. This will not work with the most recent Warcraft-SP because of the callback decorator changes. However this will show you some of the more complex heroes on the server. :)

Contains 4 unique skills:

Skill 1 - Increased stealth. Fully stealthed when stood still.
Skill 2 - Marks a random enemy for death. You deal more damage to this player. (ABILITY)
Skill 3 - Poisons enemies you damage. Can kill the player (will use your current weapon if available).
Skill 4 - Teleport through an object. Press on a wall and appear on the other side. (This skill is not perfectly coded and you can get stuck sometimes. Just use your commen sense not to teleport into fckin ceilings...) (ULTIMATE)

Code: [Select]
from random import randint
from time import time

from colors import Color
from mathlib import Vector
from engines.trace import engine_trace
from engines.trace import ContentMasks
from engines.trace import GameTrace
from engines.trace import Ray
from engines.trace import TraceFilterSimple
from entities.entity import Entity
from events import Event
from filters.players import PlayerIter
from listeners.tick import Delay
from messages import SayText2
from players.constants import PlayerButtons

from ..entities import Hero
from ..entities import Skill, callback

class Night_Elf_Hunter(Hero):
    'Night elves are impressive marksman of the Elune forest.'

    max_level = 40
    required_level = 50


@Night_Elf_Hunter.skill
class Shadowmeld(Skill):
    'Decreased visibility to enemies. Fully stealthed when stood still.'

    max_level = 8

    _is_invis = False

    _movement_buttons = (PlayerButtons.FORWARD,
        PlayerButtons.MOVELEFT,
        PlayerButtons.MOVERIGHT,
        PlayerButtons.LEFT,
        PlayerButtons.RIGHT,
        PlayerButtons.BACK)

    @property
    def _invis(self):
        return 255 - (self.level * 15)

    @callback('player_death', 'player_spawn')
    def _on_player_death(self, victim, **eargs):
        color = victim.color
        color.a = 255
        victim.color = color

    @callback('player_run_command')
    def _on_player_run_command(self, player, usercmd, **eargs):
        for button in self._movement_buttons:
            if usercmd.buttons & button:
                if self._is_invis:
                    color = player.color
                    color.a = self._invis
                    player.color = color

                    self._is_invis = False
                return

        if not self._is_invis:
            color = player.color
            color.a = 0
            player.color = color

            self._is_invis = True

@Night_Elf_Hunter.skill
class Hunters_Mark(Skill):
    'Mark a random enemy, and deal extra damage to him.'

    max_level = 8

    _effect = None
    _target = None

    _msg_a = '>> \x04Hunter\'s Mark: \x05{player} has \x02marked \x05{enemy} for \x02death!'

    @property
    def _multiplier(self):
        return 1.2 + (self.level * 0.1)

    def _kill_effect(self, effect):
        if not effect.basehandle.is_valid():
            return
        effect.call_input('Kill')

    @callback('player_spawn', 'player_upgrade_skill')
    def _on_player_spawn(self, player, **eargs):
        self._target = None
        self._cooldown = True

    @callback('round_end')
    def _on_round_end(self, player, **eargs):
        self._effect = None

    @callback('player_pre_attack')
    def _on_player_pre_attack(self, attacker, victim, info, **eargs):
        if self._target and self._target.userid == victim.userid:
            info.damage *= self._multiplier

    @callback('player_kill')
    def _on_player_kill(self, attacker, victim, **eargs):
        if self._target and self._target.index == victim.index:
            self._effect = None
            self._target = None

    @callback('player_ability')
    def _on_player_ability(self, player, number, **eargs):
        if self._cooldown:
            targets = []
            for target in PlayerIter():
                if player.team != target.team and not target.playerinfo.is_dead():
                    targets.append(target)

            if len(targets) == 0:
                return

            index = randint(1, len(targets)) - 1
            target = targets[index]
            self._target = target

            SayText2(self._msg_a.format(player=player.name, enemy=target.name)).send()

            # EFFECT

            if self._effect:
                self._kill_effect(self._effect)

            self._effect = effect = Entity.create('env_smokestack')

            location = target.origin
            location.z += 96
            effect.teleport(location, None, None)
            effect.base_spread = 24
            effect.spread_speed = 0
            effect.start_size = 7
            effect.end_size = 7
            effect.jet_length = 10
            effect.angles = Vector(90, 90, 90)
            effect.rate = 60
            effect.speed = 40
            effect.twist = 720
            effect.render_mode = 18
            effect.render_amt = 100
            effect.render_color = Color(255, 255, 3)
            effect.add_output('SmokeMaterial Effects/Redflare.vmt')
            effect.turn_on()
            effect.set_parent(target.pointer, -1)

            self._cooldown = False
            self._delay = Delay(10, self.__setattr__, '_cooldown', True)
        else:
            SayText2(
                '~ \x02Hunter\'s Mark \x01is on \x05cooldown for {} seconds.'.format(
                    int(self._delay.exec_time-time()))
                ).send(player.index)

@Night_Elf_Hunter.skill
class Serpent_Sting(Skill):
    'A chance for every target you injure to be poisoned.'

    max_level = 4

    _msg_a = '+ \x04Serpent Sting: \x04Poisoned \x01{name} for 6 seconds.'
    _poisoned = set()

    @property
    def _poison_damage(self):
        return 1 + self.level

    @property
    def _poison_chance(self):
        return 16 + (2 * self.level)

    def _kill_effect(self, effect):
        if not effect.basehandle.is_valid():
            return
        effect.call_input('Kill')

    @callback('player_attack')
    def _on_player_attack(self, attacker, victim, **eargs):
        if randint(1, 100) > self._poison_chance or victim.userid in self._poisoned:
            return
           
        self._poisoned.add(victim.userid)

        for index in attacker.weapon_indexes():
            break

        Delay(0.5, victim.take_damage, self._poison_damage, attacker_index=attacker.index, weapon_index=index)
        Delay(1, victim.take_damage, self._poison_damage, attacker_index=attacker.index, weapon_index=index)
        Delay(2, victim.take_damage, self._poison_damage, attacker_index=attacker.index, weapon_index=index)
        Delay(3, victim.take_damage, self._poison_damage, attacker_index=attacker.index, weapon_index=index)
        Delay(4.5, victim.take_damage, self._poison_damage, attacker_index=attacker.index, weapon_index=index)
        Delay(7, victim.take_damage, self._poison_damage, attacker_index=attacker.index, weapon_index=index)
        Delay(7, self._poisoned.discard, victim.userid)

        SayText2(self._msg_a.format(name=victim.name)).send(attacker.index)

        # EFFECT

        effect = Entity.create('env_smokestack')

        location = victim.origin
        location.z += 48

        effect.teleport(location, None, None)
        effect.base_spread = 12
        effect.spread_speed = 0
        effect.start_size = 3
        effect.end_size = 2
        effect.jet_length = 10
        effect.angles = Vector(90, 90, 90)
        effect.rate = 60
        effect.speed = 40
        effect.twist = 0
        effect.render_mode = 18
        effect.render_amt = 100
        effect.render_color = Color(0, 255, 0)
        effect.add_output('SmokeMaterial Effects/Redflare.vmt')
        effect.turn_on()
        effect.set_parent(victim.pointer, -1)

        Delay(7, self._kill_effect, effect)


@Night_Elf_Hunter.skill
class Wisp_Spirit(Skill):
    'Turn into a wisp to pass through walls. Ultimate.\nPress on a wall to activate.'

    max_level = 8

    def _get_trace(self, start, end, mask, index, trace):
        engine_trace.trace_ray(Ray(start, end),
            ContentMasks.ALL, TraceFilterSimple((index, )), trace)
        return trace

    @callback('player_spawn')
    def _on_player_spawn_reset(self, player, **eargs):
        self.cooldowns['ultimate'] = 4

    @callback('player_ultimate')
    def _on_player_ultimate(self, player, **eargs):
        _cooldown = self.cooldowns['ultimate']
        if _cooldown <= 0:
            origin = player.eye_location
            view_vector = player.view_vector
            view_trace = self._get_trace(
                        origin, origin + view_vector * 10000, ContentMasks.ALL, player.index,
                        GameTrace()
                        )
            if view_trace.did_hit_world():
                wall = view_trace.end_position

            if origin.get_distance(wall) > 200:
                SayText2('~ \x01You \x02must \x01be \x05closer \x01to a \x05wall.'
                    ).send(player.index)
                return

            teleport_vector = None

            for i in range(1, 4):
                tmp_vector = wall + view_vector * (100 * i)
                tmp_trace = self._get_trace(
                            tmp_vector, wall, ContentMasks.ALL, player.index,
                            GameTrace()
                            )
                if tmp_trace.did_hit_world():
                    teleport_vector = tmp_trace.end_position + view_vector * 80
                    break

            if not teleport_vector:
                SayText2('~ \x01You \x02cannot \x0bteleport \x01through this \x05wall.'
                    ).send(player.index)
                return

            teleport_vector.z -= 40

            safety_vector1 = safety_vector2 = teleport_vector
            safety_vector1.z += 80
            safety_vector1.x += 20
            safety_vector1.y -= 20
            safety_vector2.x -= 40
            safety_vector2.y += 40

            safety = self._get_trace(
                        safety_vector1, safety_vector2, ContentMasks.ALL, player.index,
                        GameTrace()
                        )

            if safety.did_hit_world():
                SayText2('~ \x02Cannot \x0bteleport \x04due to obstruction.'
                    ).send(player.index)
                return

            if engine_trace.is_point_outside_of_world(teleport_vector):
                SayText2('~ \x01You \x02cannot \0bteleport \x01out of the map!'
                    ).send(player.index)
                return

            player.teleport(teleport_vector, None, None)
            self.cooldowns['ultimate'] = 10
        else:
            SayText2('~ \x0bWisp Walk \x01is on \x05cooldown for {} seconds.'.format(
                    int(_cooldown))
                ).send(player.index)
Title: Re: Warcraft GO v0.3.3.beta
Post by: Akiro on February 22, 2017, 04:04:25 PM

I have some problems with the installation


Code: [Select]
02/22/2017 - 16:58:28 > Выполнена команда: sp plugin load wcgo
[SP] Loading plugin 'wcgo'...

[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 193, 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\wcgo\wcgo.py", line 24, in <module>
    import wcgo.configs as cfg
  File "..\addons\source-python\plugins\wcgo\configs.py", line 8, in <module>
    from wcgo.info import info
  File "..\addons\source-python\plugins\wcgo\info.py", line 8, in <module>
    info = PluginInfo()

TypeError: __init__() missing 1 required positional argument: 'name'


[SP] Plugin 'wcgo' was unable to be loaded.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Existenz on February 26, 2017, 09:32:04 AM
Hey !

Try to use one of new versions of Warcraft Go :
 - https://github.com/Mahi/Warcraft-SP
 - https://github.com/Predz/SP-Warcraft-Mod

You must modify heroes to use it with this versions.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Joao on March 12, 2017, 06:16:46 AM
This mod had potentional. Too bad it requires programming skills (even it just a little) to make heroes.

I wish we had the same WCS as in CS:S (eventscripts). Makes me sad that will never happen.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Kami on March 12, 2017, 09:58:15 PM
The problem is, that those people capable of doing it are still too stubborn to just do it ;D

I released a somewhat similar version of WCS for Source Python some time ago, not sure if it even runs anymore, but you could give it a try:

http://warcraft-source.com/board/index.php?topic=17089.msg120556#msg120556 (http://warcraft-source.com/board/index.php?topic=17089.msg120556#msg120556)

Title: Re: Warcraft GO v0.3.3.beta
Post by: Akiro on March 14, 2017, 11:34:54 PM
I think that the Warctaft GO are already not compatible with new versions of Source.Python. All my attempts to install the mod using a different combination of versions did not succeed. Maybe some people can upload working version of server? Or just "resource" and "addons" folders? (CS: Source not CS:GO)
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on March 15, 2017, 09:56:53 AM
Akiro you are welcome to use my new version ;) https://github.com/Predz/SP-Warcraft-Mod (https://github.com/Predz/SP-Warcraft-Mod)

It has MySQL support as well for those looking for it.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Akiro on March 17, 2017, 01:12:11 PM
Tried. Can you tell me what's wrong?


Code: [Select]
[SP] Loading plugin 'warcraft'...

[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 193, 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\warcraft\warcraft.py", line 13, in <module>
    from .heroes import *
  File "..\addons\source-python\plugins\warcraft\heroes\extensions.py", line 25
    def _on_pre_attack(self, player, take_damage_info, **kwargs):
                                                                ^

IndentationError: unindent does not match any outer indentation level


[SP] Plugin 'warcraft' was unable to be loaded.


Server is clean. Nothing installed exсept Source.Python v559 & EasyPlayer v2.0.1
Title: Re: Warcraft GO v0.3.3.beta
Post by: Existenz on March 17, 2017, 08:40:51 PM
Hey !
This error due to bad identation, sometimes 4 sometimes 8 spaces so just reindent all to file to 4 spaces.
Title: Re: Warcraft GO v0.3.3.beta
Post by: satoon101 on March 18, 2017, 02:47:34 AM
It's actually tabs, not 8 spaces.  I have created a pull request to fix this issue.  Once it's pulled, you can download the new version and try to load it again.
https://github.com/Predz/SP-Warcraft-Mod/pull/19
Title: Re: Warcraft GO v0.3.3.beta
Post by: Akiro on March 18, 2017, 09:50:56 AM
Kami's version of mod

Code: [Select]
[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 193, 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 42, in <module>
    from wcs import commands
  File "..\addons\source-python\plugins\wcs\commands.py", line 16, in <module>
    from effects import temp_entities

ImportError: cannot import name 'temp_entities'


[SP] Plugin 'wcs' was unable to be loaded.
03/18/2017 - 10:46:35 > Выполнена команда: sp plugin load rotd
[SP] Loading plugin 'rotd'...
test

[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 193, 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\rotd\rotd.py", line 12, in load
    races = wcs.wcs.racedb.getAll().keys()

AttributeError: module 'wcs' has no attribute 'wcs'


[SP] Plugin 'rotd' was unable to be loaded.


es_commands installed successfully
Title: Re: Warcraft GO v0.3.3.beta
Post by: Existenz on March 18, 2017, 10:33:43 AM
I think you don't have  the great version of sp to run Kami's mod.

Code: [Select]
from effects import temp_entities

is replaced by

Code: [Select]
from effects.base import TempEntity

in new version of Sp if I'm not mistaken. So you must change all effects. So maybe check in orginal post of Kami if he specifies a Sourcepython version.

And for the Rotd just disable it. It's not a mandatory plugin.
Title: Re: Warcraft GO v0.3.3.beta
Post by: fini on July 18, 2017, 05:03:06 AM
Hello, I followed the instructions on how to install wcgo, I did everything right, but when I start the server the wcs mod does not work, can anyone help me? sorry for my English.
 :-\ :-\
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 18, 2017, 10:57:12 AM
Hey, you should try my most recent version. I don't think there are any current problems but if there are just tell me and I will fix them. I am currently working on a extensions file to go into the Git which will include a lot of ready made skills. All people will need to do is subclass the skill they want to use and change the name, description and the property values :)

https://github.com/Predz/SP-Warcraft-Mod

EXAMPLE:

Code: [Select]
## ------------------------------
## ON SPAWN SKILLS
## ------------------------------

class spawnSpeed(Skill):
'Movement speed increased upon spawning.'
max_level = 8

@property
def addition(self):
return 0.1 + (self.level * 0.05)

@events('player_spawn')
def _on_spawn(self, player, **kwargs):
player.speed += self.addition

class spawnHealth(Skill):
'Increased health upon spawning.'
max_level = 8

@property
def addition(self):
return 10 + (self.level * 5)

@events('player_spawn')
def _on_spawn(self, player, **kwargs):
player.health += self.addition

class spawnGravity(Skill):
'Decrease your gravity when spawned.'
max_level = 8

@property
def percentage(self):
'The percentage of gravity that will still affect the player.'
return 1 - (0.08 * self.level)

@events('player_spawn')
def _on_spawn_set_gravity(self, player, **kwargs):
'Called upon the player spawning.'
player.gravity = self.percentage

@events('player_death')
def _on_death_reset_gravity(self, player, **kwargs):
'Called upon the player dying.'
player.gravity = 1.0

USAGE:

Code: [Select]
## TEST HERO

from . import Hero
from .extensions import spawnGravity, spawnSpeed

class Undead(Hero):
    name = 'Undead Scourge'

@Undead.skill
class Unholy(spawnSpeed):
    name = 'Unholy Aura'

    @property
    def addition(self):
        return 0.2 + (self.level * 0.05)

@Undead.skill
class Levitation(spawnGravity):
    name = 'Levitation'
Title: Re: Warcraft GO v0.3.3.beta
Post by: fini on July 18, 2017, 04:59:12 PM
helloo,
I actually did everything right, I think ... I installed Source.Python by putting its folders in csgo, I installed the EasyPlayer Package and I installed wcgo in its latest version and I put "sp load wcgo" in server.cfg and autoexec.cfg , But anyway wcg does not appear on the server, it's like I did not have anything installed, does it help me? what should I do?
Sorry for my english...
 :'( :'( :'(
Title: Re: Warcraft GO v0.3.3.beta
Post by: DHack on July 18, 2017, 09:07:33 PM
Hi Predz,

I loaded your updated version. Here is the error I'm getting, probably the error fini is getting.

I fixed it and successfully loaded the plugin. I haven't tried loading and races or even joining the server yet. I will let you know if I have any more problems when I test.

Code: [Select]
[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 193, 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\warcraft\warcraft.py", line 16, in <module>
    from .menus import *
  File "..\addons\source-python\plugins\warcraft\menus.py", line 70
    name = player_data[2]
                        ^

IndentationError: unindent does not match any outer indentation level


[SP] Plugin 'warcraft' was unable to be loaded.

Regards,
DHack
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 18, 2017, 11:26:45 PM
Hi Predz,

I loaded your updated version. Here is the error I'm getting, probably the error fini is getting.

I fixed it and successfully loaded the plugin. I haven't tried loading and races or even joining the server yet. I will let you know if I have any more problems when I test.

Code: [Select]
[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 193, 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\warcraft\warcraft.py", line 16, in <module>
    from .menus import *
  File "..\addons\source-python\plugins\warcraft\menus.py", line 70
    name = player_data[2]
                        ^

IndentationError: unindent does not match any outer indentation level


[SP] Plugin 'warcraft' was unable to be loaded.

Regards,
DHack

Thanks DHack, I havent updated the repo in a while and I must of screwed up my Sublime some how. Updated it now :)

helloo,
I actually did everything right, I think ... I installed Source.Python by putting its folders in csgo, I installed the EasyPlayer Package and I installed wcgo in its latest version and I put "sp load wcgo" in server.cfg and autoexec.cfg , But anyway wcg does not appear on the server, it's like I did not have anything installed, does it help me? what should I do?
Sorry for my english...
 :'( :'( :'(

fini try using the more updated version I showed above :)

I have also added a few nice skills for people to play with. I plan to update this with more skills to give people the ability to create their own races easier. :)

https://github.com/Predz/SP-Warcraft-Mod/blob/56474b08d848766f962031369cb3bbaf3c667680/addons/source-python/plugins/warcraft/heroes/extensions.py
Title: Re: Warcraft GO v0.3.3.beta
Post by: DHack on July 19, 2017, 12:00:33 AM
Thanks for the update Predz.

While I was testing my server would crash on mapchange (I couldnt capture any errors). I'm on windows server 2012 if that makes a difference.

I'll try this updated version.

Also it looks like there isn't an ultimate function coded yet. Do you think you can add that with an example?

Are you currently the only active person working on this? It seems like this is the only working version. Is there a plan to make this the current supported version? I'm willing to help develop the addon with you if needed!

Sorry for so many questions . I really appreciate the work you have do. 

Regards,
:DHack
Title: Re: Warcraft GO v0.3.3.beta
Post by: DHack on July 19, 2017, 12:53:33 AM
Attached is my sqlite database after the crash (I added .txt for the sake of uploading it here). I suspect there is something with the saving of the sqlite. I will be installing a server on my local machine tonight to see if I can find any errors.

Also here is the end of my console.log  I dont think there are any clues in it.

Code: [Select]
ConVarRef weapon_cleanup_on_round_restart doesn't point to an existing ConVar
weapon_max_before_cleanup - 0
weapon_recoil_scale - 2.0
weapon_reticle_knife_show - 0
ff_damage_reduction_grenade - 0.25
ff_damage_reduction_grenade_self - 1
ff_damage_reduction_other - 0.25
mp_friendlyfire - 0
mp_warmuptime - 30
mp_warmuptime_all_players_connected - 0
Executing dedicated server config file
exec: couldn't exec server.cfg
L 07/18/2017 - 17:32:57: server_cvar: "cash_player_bomb_defused" "200"
L 07/18/2017 - 17:32:57: server_cvar: "cash_player_bomb_planted" "200"
L 07/18/2017 - 17:32:57: server_cvar: "cash_player_interact_with_hostage" "300"
L 07/18/2017 - 17:32:57: server_cvar: "cash_player_killed_enemy_default" "200"
L 07/18/2017 - 17:32:57: server_cvar: "cash_player_killed_enemy_factor" "0.5"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_elimination_bomb_map" "2700"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_elimination_hostage_map_t" "2000"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_elimination_hostage_map_ct" "2300"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_loser_bonus" "2400"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_loser_bonus_consecutive_rounds" "0"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_planted_bomb_but_defused" "200"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_terrorist_win_bomb" "2700"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_win_by_defusing_bomb" "2700"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_win_by_hostage_rescue" "3000"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_win_by_time_running_out_hostage" "2000"
L 07/18/2017 - 17:32:57: server_cvar: "cash_team_win_by_time_running_out_bomb" "2700"
L 07/18/2017 - 17:32:57: server_cvar: "mp_freezetime" "5"
L 07/18/2017 - 17:32:57: server_cvar: "mp_friendlyfire" "1"
L 07/18/2017 - 17:32:57: server_cvar: "mp_maxrounds" "15"
L 07/18/2017 - 17:32:57: server_cvar: "mp_roundtime" "3"
L 07/18/2017 - 17:32:57: server_cvar: "mp_roundtime_hostage" "2"
L 07/18/2017 - 17:32:57: server_cvar: "mp_roundtime_defuse" "2.25"
L 07/18/2017 - 17:32:57: server_cvar: "mp_timelimit" "0"
exec: couldn't exec gamemode_casual_server.cfg
Commentary: Could not find commentary data file 'maps/de_mirage_commentary.txt'.
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Error parsing BotProfile.db - unknown attribute 'Rank'
Unknown command "sm_flood_time"
Unknown command "sm_reserve_type"
Unknown command "sm_reserved_slots"
Unknown command "sm_hide_slots"
Unknown command "sm_chat_mode"
Unknown command "sm_timeleft_interval"
Unknown command "sm_trigger_show"
L 07/18/2017 - 17:32:58: World triggered "Round_Start"
PutClientInServer: no info_player_start on level

Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 20, 2017, 12:06:39 AM
Thanks for the update Predz.

While I was testing my server would crash on mapchange (I couldnt capture any errors). I'm on windows server 2012 if that makes a difference.

I'll try this updated version.

Also it looks like there isn't an ultimate function coded yet. Do you think you can add that with an example?
Regards,
:DHack

I thought about this ultimate bit for a second, and realised that I have implemented but in a much better way xD

Inside warcraft/heroes/__init__.py (https://github.com/Predz/SP-Warcraft-Mod/blob/master/addons/source-python/plugins/warcraft/heroes/__init__.py) there are 2 main used decorators. events (https://github.com/Predz/SP-Warcraft-Mod/blob/master/addons/source-python/plugins/warcraft/heroes/__init__.py#L242) and clientcommands (https://github.com/Predz/SP-Warcraft-Mod/blob/master/addons/source-python/plugins/warcraft/heroes/__init__.py#L228)

Using clientcommands works the exact same way an ultimate does. However allows for infinite binds rather than spefically just +ultimate.

EXAMPLE:

Code: [Select]
@Test.skill
class UltimateSkill(Skill):
    name = 'Test Client Command Skill'

    @clientcommands('+ultimate')
    def _on_ultimate_command(self, player, **kwargs):
    ## Do stuff...

Now someone can just bind a key to +ultimate
Title: Re: Warcraft GO v0.3.3.beta
Post by: DHack on July 20, 2017, 05:57:51 PM
Thats pretty awesome Predz! I didnt know you can do that with whats already created. This also give the use for ability 1&2.

Regarding the crash.. Have you had a chance to run this version on your local machine to verify the crash? I really would like to know if its my machines/version of SP causing it.

Its happening on the second map change.

How to reproduce:
1. Start Server
2. Load warcraft
3. Join Server
4. Finish map or rcon changelevel
5. Crash

If I leave the server and then changelevel it doesn't crash.

Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 21, 2017, 12:03:58 AM
Just knowing that it is caused by a player being on the server limits it to only a few things, so I should be able to find the problem quite easily :) Thanks again!
Title: Re: Warcraft GO v0.3.3.beta
Post by: DHack on July 21, 2017, 05:11:40 AM
Just knowing that it is caused by a player being on the server limits it to only a few things, so I should be able to find the problem quite easily :) Thanks again!

I really hope so! I want to start making classes but getting discouraged because of the crash.

If there is anything I can do to help, let me know.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 23, 2017, 02:18:36 AM
Sorry I am taking my time DHack... I am on holiday until Monday again :D

Just so you know I am not doing fuck all, this is 1 of the skills I have coded xD

Code: [Select]
class Explosion(Skill):
'Explode upon event!'
event_name = 'player_pre_death'
max_level = 8

@property
def damage(self):
return 20 * self.level

@property
def max_distance(self):
return 300 + (30 * self.level)

def _iter_through_players_near(self, vector, max_distance):
for player in players:
if player.origin.get_distance(vector) <= max_distance:
yield player

@events(Explosion.event_name)
def _on_event(self, player, **kwargs):
location = player.origin
for other in self._iter_through_players_near(location, self.max_distance):
other.take_damage(self.damage, attacker=player, weapon=player.active_weapon)
Title: Re: Warcraft GO v0.3.3.beta
Post by: phixious on July 24, 2017, 07:12:05 PM
Glad to see there is still progress happening Predz.

I can confirm some for DHack that the crash only occurs when a player is on the server and the map changes btw. It also appears to be happening prior to logging on the next map starting. The SP log is empty when the crash happens.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 27, 2017, 02:04:30 PM
I have fixed the problem now after having a bit of time to think about what is wrong. Had completely forgotten that upon map change the player data will change and so we need to retrieve their data again. Thanks to the SourcePython team for supplying an easy fix in the players.dictionary (https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/players/dictionary.py) module!

https://github.com/Predz/SP-Warcraft-Mod/commit/8d2bacf9014088660557c3be7b3964506ad3c9b3

I can now get back to working on this skill extensions file I want to release for you all :)
Title: Re: Warcraft GO v0.3.3.beta
Post by: DHack on July 27, 2017, 03:13:24 PM
Great work Predz!

Would it make sense to have a feature where you can have separate files for skills? This way if someone make/releases  custom skills they don't have to paste them into the same script and potentially break something?

I have more request for the mod, if you dont mind me making a list.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 27, 2017, 03:18:01 PM
Great work Predz!

Would it make sense to have a feature where you can have separate files for skills? This way if someone make/releases  custom skills they don't have to paste them into the same script and potentially break something?

I have more request for the mod, if you dont mind me making a list.

You can already do this as I have shown in my Undead Scourge example. Just create a new python file and then import directly into any hero file you wish. You could store your files inside a folder named "skills" if you really wish. You just do this inside the hero file instead:

Code: [Select]
from ..skills import <Skill>
And inside the skill file:

Code: [Select]
from .heroes import Skill
Just never import from the heroes folder back into your new skill files because you will cause a cyclical import and then it wont run...

The below is my Undead Scourge example:

https://github.com/Predz/SP-Warcraft-Mod/blob/master/addons/source-python/plugins/warcraft/heroes/undead.py#L4

https://github.com/Predz/SP-Warcraft-Mod/blob/master/addons/source-python/plugins/warcraft/heroes/extensions.py#L73
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 27, 2017, 03:24:07 PM
I have implemented a few more experience events to the current git. Hope this is helpful to everyone :)

https://github.com/Predz/SP-Warcraft-Mod/commit/e8480376f918762847d029af7ea0d7ddea5b0107
https://github.com/Predz/SP-Warcraft-Mod/commit/ae3ec92e78bb6fa28a264d0b2a93e0e3906ee409
Title: Re: Warcraft GO v0.3.3.beta
Post by: phixious on July 28, 2017, 01:33:09 PM
I'll have this up and testing tonight to validate the map changes and new XP events.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Xoide on July 29, 2017, 03:05:33 AM
Hello i am getting this "error" when try to load the wcgo mod.   :o

sp plugin load wcgo
[SP] Loading plugin 'wcgo'...

[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 193, 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\wcgo\wcgo.py", line 24, in <module>
    import wcgo.configs as cfg
  File "..\addons\source-python\plugins\wcgo\configs.py", line 8, in <module>
    from wcgo.info import info
  File "..\addons\source-python\plugins\wcgo\info.py", line 8, in <module>
    info = PluginInfo()

TypeError: __init__() missing 1 required positional argument: 'name'
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 29, 2017, 09:48:01 AM
Hey this is because I have moved the code to another git repository. Try using the git from the post below:
https://github.com/Predz/SP-Warcraft-Mod
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 29, 2017, 10:37:16 AM
Have just made an update to the core which allows reloading in game. Thanks to Mahi for the suggestion!

https://github.com/Predz/SP-Warcraft-Mod/commit/cdc4b608fef676367874dd4b6f685ed5a74d8401
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 29, 2017, 02:39:40 PM
Implemented the Player Information menus :)

https://github.com/Predz/SP-Warcraft-Mod/commit/1b5223661b3b3de79ffd3e74293ea0e3beb5206c
Title: Re: Warcraft GO v0.3.3.beta
Post by: Xoide on July 29, 2017, 02:40:59 PM
Thank you very much. I am totally new to this and wwant to learn to program this kind of things but did not know where to start until now  ::)
Title: Re: Warcraft GO v0.3.3.beta
Post by: phixious on July 29, 2017, 04:28:09 PM
So far so good Predz. All the new xp events seem to be working without any issues.

My only request at this point would be having some debug settings in skills so we can validate each time they trigger and the event that triggered it. I can pull the main log if we just had a debug flag that would output what triggered and the time I believe.

It should be good for helping people design new skills and balance them.

If this is already existing, let me know how to utilize it because I am obviously missing something.

 ;D
Title: Re: Warcraft GO v0.3.3.beta
Post by: Xoide on July 29, 2017, 08:27:37 PM
Can´t really wrap my head around this.. But where do i start to configure races and is there some guide to code the races in python etc. Thanks in advance.  8)
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lysergsyredietylamid on July 30, 2017, 01:10:40 AM
Hey guys!

I'm an oldschool AMX mod X scripter who are familiar with lots of stuff but just where do I create the .py and or .txt files with the new characters/heroes?
And how do the server recognize the new heroes with the new skills and so on?

Is it separate .py files or can i create everything in one .py file or .txt file in "\addons\source-python\plugins\warcraft\heroes"?

I see lots of stuff about adding stuff into races.ini but there are no races.ini in that "v0.3.3.beta Release" as far as i can tell and that confuses the hell out of me.

Best regards!
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 30, 2017, 09:12:17 AM
Hey guys!

I'm an oldschool AMX mod X scripter who are familiar with lots of stuff but just where do I create the .py and or .txt files with the new characters/heroes?
And how do the server recognize the new heroes with the new skills and so on?

Is it separate .py files or can i create everything in one .py file or .txt file in "\addons\source-python\plugins\warcraft\heroes"?

I see lots of stuff about adding stuff into races.ini but there are no races.ini in that "v0.3.3.beta Release" as far as i can tell and that confuses the hell out of me.

Best regards!

Hi, I have progressed to use a new git repository so I don't think the current release on that repo works. Use this repository instead as it is the most recently updated :)

https://github.com/Predz/SP-Warcraft-Mod

As for the heroes. Any files inside the "/warcraft/heroes" directory is imported by the plugin. However that does not denote that your heroes must be in files inside that folder. As long as you import the <Hero> class and subclass it, you are then creating a new hero. The only requirement is that the file is loaded.

As for multiple heroes in 1 file. You may create however many you like! I prefer to split them up for better readability.

Sorry again as the documentation for this version is very lacking at the moment :( I will do my best to balance creating documentation and features from now on :P
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 30, 2017, 09:19:20 AM
So far so good Predz. All the new xp events seem to be working without any issues.

My only request at this point would be having some debug settings in skills so we can validate each time they trigger and the event that triggered it. I can pull the main log if we just had a debug flag that would output what triggered and the time I believe.

It should be good for helping people design new skills and balance them.

If this is already existing, let me know how to utilize it because I am obviously missing something.

 ;D

https://github.com/Predz/SP-Warcraft-Mod/commit/bb22fc9450fa6a4bc35468397df47ea36bc4610b

Hope this is the sort of thing you are after :)

I want to handle all of the logging inside the main python code. I think I may add another level to logging as well as 1, and 2. Currently 1 prints to a debug.log file and 2 will print to console. I think I will add a 3 which will print to console including the list of arguments supplied to the call. What do you think?
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lysergsyredietylamid on July 30, 2017, 09:27:15 PM
Hey guys!

I'm an oldschool AMX mod X scripter who are familiar with lots of stuff but just where do I create the .py and or .txt files with the new characters/heroes?
And how do the server recognize the new heroes with the new skills and so on?

Is it separate .py files or can i create everything in one .py file or .txt file in "\addons\source-python\plugins\warcraft\heroes"?

I see lots of stuff about adding stuff into races.ini but there are no races.ini in that "v0.3.3.beta Release" as far as i can tell and that confuses the hell out of me.

Best regards!

Hi, I have progressed to use a new git repository so I don't think the current release on that repo works. Use this repository instead as it is the most recently updated :)

https://github.com/Predz/SP-Warcraft-Mod

As for the heroes. Any files inside the "/warcraft/heroes" directory is imported by the plugin. However that does not denote that your heroes must be in files inside that folder. As long as you import the <Hero> class and subclass it, you are then creating a new hero. The only requirement is that the file is loaded.

As for multiple heroes in 1 file. You may create however many you like! I prefer to split them up for better readability.

Sorry again as the documentation for this version is very lacking at the moment :( I will do my best to balance creating documentation and features from now on :P


Thank you!
Still don't really understand where it loads from if I for example would write


Code: [Select]
## TEST

from . import Hero
from .extensions import attackLifesteal, spawnInvisPercent, spawnSpeed

class Test(Hero):
    name = 'Test'

@Undead.skill
class Unholy(spawnSpeed):
    name = 'Unholy Aura'

    @property
    def addition(self):
        return 0.2 + (self.level * 0.05)

@Test.skill
class spawnInvisPercent(Skill)
name = 'Test Invizz'

@Undead.skill
class Vampiric(attackLifesteal):
    name = 'Vampiric Aura'
If i change @Undead.skill to @Test.skill as I've tried above with one new skill it won't load the server with a couple of errors.
So where do i find what to write to the specific skill?

To be 100% clear,

@Test.skill
class spawnInvisPercent(Skill)
   name = 'Test Invizz'

Cause that needs to match with some line that I have no idea where to find.

As this line,

@Undead.skill
class Unholy(spawnSpeed):
    name = 'Unholy Aura'

It works fine cause it knows the @Undead.skill and loads it correctly.

Best regards :)
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 30, 2017, 09:58:43 PM
Ah took me a while to get what you were doing wrong x)

Because you are removing the Undead <Hero> subclass, the config doesn't find the hero to assign as default. Change WARCRAFT_DEFAULT_HERO in your config.py and that should remove the errors.

Your code is right, however it will cause errors if you assign a default hero that doesn't exist.



On the other hand your use of spawnInvisPercent is wrong :s

You put your inheritance inside the brackets ;)

Code: [Select]
from .extensions import spawnInvisPercent

@Test.skill
class NewSkill(spawnInvisPercent):
    name = 'Blah Blah Blah'



Add me on steam if you want a better explaination :)

http://steamcommunity.com/profiles/76561198200706498/
Title: Re: Warcraft GO v0.3.3.beta
Post by: DHack on July 31, 2017, 01:43:30 AM
Hey Predz,

I think it would be a good idea to give your version a number and start a new thread for it. So its easier for people to find this working version and not go in loops of sending the same link.

I have an update to your skills that Im going to upload soon. The updates include "additional damage" and adding properties to certain skills to only work with specific weapons.

I wanted to ask if you can show an example of how we can do some sort of loop every second. So if I want a skill to activate and then every second it lowers health or something like that.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Existenz on July 31, 2017, 10:58:26 AM
Hey :)

You can also create a new skill without using extension :

Code: [Select]
@Iron_Man.skill
class Tough_Armor(Skill):
    name = 'Tough Armor'
    description = 'Evade shot.'
    max_level = 6

    @property
    def _chance(self):
        return 5 * self.level - 5

    @events('player_pre_victim')
    def _on_player_pre_victim(self, attacker, victim, take_damage_info, **eargs):
        if randint(1, 100) > self._chance or self.level == 0:
            return

        take_damage_info.damage = 0

Title: Re: Warcraft GO v0.3.3.beta
Post by: phixious on July 31, 2017, 01:15:37 PM
That looks great Predz. Thanks.

I think that keeping the logging as far forward as possible is probably the most reliable way to get the data without additional manipulations, so I would tend to agree that it should stay in the main python code.

Logging all arguments with debug mode 3 sounds like it will make things much easier to track down and trap issues a lot better for people attempting to make complex skills or skill chains where each skill can manipulate another.


Question for anyone more knowledgeable about CSGO engine: I know a lot of stuff has changed from source but is there a way to "lock" users to only using a knife now without losing their other weapons? Also, has anyone figured out the default model alpha issue or does Invisibility still going to require custom models?

Thanks for all the hard work Predz.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on July 31, 2017, 01:32:21 PM
That looks great Predz. Thanks.

I think that keeping the logging as far forward as possible is probably the most reliable way to get the data without additional manipulations, so I would tend to agree that it should stay in the main python code.

Logging all arguments with debug mode 3 sounds like it will make things much easier to track down and trap issues a lot better for people attempting to make complex skills or skill chains where each skill can manipulate another.


Question for anyone more knowledgeable about CSGO engine: I know a lot of stuff has changed from source but is there a way to "lock" users to only using a knife now without losing their other weapons? Also, has anyone figured out the default model alpha issue or does Invisibility still going to require custom models?

Thanks for all the hard work Predz.

Locking a person to their knife should be doable with the following virtual function (https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/data/source-python/entities/csgo/CBaseCombatCharacter.ini#L7), I think. Would take a lot of playing with to make it work perfectly though. That function is called upon someone scrolling through their weapons. Hope that help :)

As for invisibility. Player invisibility now works thanks to valve fixing shit by adding a new CVAR. Just set "sv_disable_immunity_alpha" to 1 in your server.cfg and that will now allow alpha to be given to a player.
Title: Re: Warcraft GO v0.3.3.beta
Post by: phixious on July 31, 2017, 02:25:42 PM
Alright. Thanks for the info and quick reply.
Title: Re: Warcraft GO v0.3.3.beta
Post by: Existenz on July 31, 2017, 07:40:30 PM
But invisibility doesn't work on weapons for the moment :(
Title: Re: Warcraft GO v0.3.3.beta
Post by: Lysergsyredietylamid on August 02, 2017, 05:11:56 PM
Hey man!
Still can't really wrap my head around this.

Code: [Select]
  File "..\addons\source-python\plugins\warcraft\heroes\test.py", line 17, in <module>
    @Test.skill

AttributeError: type object 'Test' has no attribute 'skill'

In server console when i type

Code: [Select]
@Test.skill
class Evajzon(victimEvasion):
name = 'Avaiosion'
'Given a chance to avoid incoming attacks.'
max_level = 8

@property
def chance(self):
'The chance in which you will evade damage.'
return 16 + (self.level * 2)

And if I like before with the Undead.py file change @Undead.skill I get this

Code: [Select]
  File "..\addons\source-python\plugins\warcraft\heroes\undead.py", line 22, in <module>
    @Undeaddd.skill

NameError: name 'Undeaddd' is not defined

It looks for names to point to or something. Cause @Test.skill does not work whilst @Undead.skill works fine but just @Undead.skill, not a single letter more or less then it gives errors.

Where do I define or add names?  ???
Title: Re: Warcraft GO v0.3.3.beta
Post by: Existenz on August 03, 2017, 10:06:15 AM
Hey

Put this following test.py in heroes folder.

Code: [Select]
# test.py

from . import Hero
from .extensions import victimEvasion

class Test(Hero):
    name = 'Test'

@Test.skill
class Evajzon(victimEvasion):
        'Given a chance to avoid incoming attacks.'
name = 'Avaiosion'
max_level = 8

@property
def chance(self):
'The chance in which you will evade damage.'
return 16 + (self.level * 2)


Not tested but i think it must work :)
Title: Re: Warcraft GO v0.3.3.beta
Post by: Xoide on August 13, 2017, 01:52:12 PM
Hello! I dont know if this is allowed but i want to ask anyways, just remove my comment if it's not allowed.
I have been on an warcraft modded server with all there functions and races skills etc working and i'm wondering if they are running source.python, sourcemod or eventscripts, can't really get a straight answer from them and that's why i'm asking here. The servers name are  WCS | CEGamer.com. Reason why i'm asking is there are more explanations about where to start configuring sourcemod, haven't looked at ES due to there will be no updates to it but i hope i can get some answers or someone who is willing to learn me some about where to start. I know some basics but i'm not good at programming at all and i'm very intrested in learning new things. Have a nice day everyone!
Title: Re: Warcraft GO v0.3.3.beta
Post by: Predz on August 14, 2017, 10:27:19 PM
Hiya Xiode. Now I believe Joshtrav runs those servers as he was able to show this code when I was coding some more complex stuff. Shown beneath.

Instead of doing a trace you can just check the player flags for 1<<0 (flag for being on ground)

You can look at what we run for it, in case it may simplify your code - been running it for a couple years now with no issues.

Code: [Select]
    for userid in player_airjump_reg:
        jumpkey = userid.getButtons() & 2
        if last_jumpkey.get(userid, 0) != jumpkey:
            last_jumpkey[userid] = jumpkey
            if jumpkey:
                if not userid.onGround() and not userid.getProp("m_nWaterLevel"):
                    sm.fireEvent("player_airjump", {"userid": userid})

From looking at the layout of that code, I think he may of been using a combination of SourceMod and SourcePython. Also I think maybe an old version of SP before all the modules were reworked. However someone may correct if I am wrong.

But to answer your question, they are not running any of my code that I know of. But from the code supplied by Joshtrav a while ago, all I can assume is that they run some abomination of SP+SM ;)
Title: Re: Warcraft GO v0.3.3.beta
Post by: joshtrav on September 16, 2017, 04:40:10 AM
At http://www.cegamer.com we run SourceMod with a custom extension that ports SM's natives to Python 3.2.2

From there its really just a long time of trial and error to get things the way they are.  We often share and help other servers when diagnosing crashes, but our software isn't a "cookie cutter" setup.  Such that someone new to coding, or even relatively intermediate would be able to jump into.

There is very little in the way of documentation and 100s of imports.  We have custom coded everything, not just WCS.  The admin, the interfaces, console interaction, links to our website's API, etc.
Title: Re: Warcraft GO v0.3.3.beta
Post by: farmor on October 15, 2017, 04:07:09 PM
i got this error in my console: https://imgur.com/a/3Z1wo

I am running on windows server 2012, source python, CSGO, STEAM.
How can i FIX THIS?