Growing small, growing steady?

General discussion for off-topic subjects.
stinkyfax
Junior Member
Posts: 4
Joined: Tue Aug 04, 2015 2:07 pm

Growing small, growing steady?

Postby stinkyfax » Tue Aug 04, 2015 2:27 pm

Hello Everyone,

I would love to join your small and warm community and have fun doing some code on Source Python.

A little about me:
I have been actively working on WCS races in its early life, made few modifications to WCS core, then moved on to SourceMod as ES performance was appealingly unacceptable for my ambitions.
Later came up with a WoW mod for CS:S, was rather a popular and profitable server, a year ago it's population died though.
So, I gave up on game addons development, partly because I had little faith in CS:GO, and that SourcePawn was something I no longer wanted to use due to its syntax and limits.

I actually heard about you when Muerte mentioned you in a super-secret-close-alpha, I think he's been helping with a design of a forum? Well, I've been watching you from time to time... stalking like a creeper.
So, lately I've been enjoying CS:GO, and decided to give 'modding' another go, this time - in a sane language - Python.

My only concern, is that there is not enough 'human power' to compete in functionality against SourcePawn. I am especially worried, whether the functionality of SDKHooks available? If not, what is your official statement/plan on it?

You guys, are amazing - in what you are doing. I hope you do not mind having me here?


P.S. As I understand, documentation is of no availability yet, do you mind if I will annoy you from time to time asking how to do that or this?
P.S.S. It's extra cool to see old fellas like Predz and Malina :)

With love and passion,
Stinkyfax :)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Aug 04, 2015 3:05 pm

Welcome!!

We do have some documentation done, but it is still a work in progress. You can get to it by the Wiki link in the forum's top bar.

As far as SDKHooks, we have had Pre/Post hooks for dynamic and virtual functions for quite some time. Many of the entity based hooks are added to our Entity implementation. Since PlayerEntity and WeaponEntity both inherit from Entity, they have those capabilities, too. Just look through the entities data to see if what you are looking to do is already implemented.

We use the ServerClass names to add the attributes in the data files to the instances of the Entity classes. For instance, players have the following ServerClasses:

  • CCSBot - obviously only bots carry this ServerClass
  • CCSPlayer
  • CBasePlayer
  • CBaseCombatCharacter
  • CBaseFlex
  • CBaseAnimatingOverlay
  • CBaseAnimating
  • CBaseEntity

We combine the files of the base directory with the ones from the current engine's directory and the current game's directory. So, look through all three to find out what is available for a given ServerClass. To find out what ServerClasses a specific entity carries, use the following:

Syntax: Select all

from entities.entity import Entity
from filters.entities import EntityIter

# This finds all ServerClasses for the hostage_entity entity type
for entity in EntityIter('hostage_entity', return_types='entity'):
break
else:
entity = Entity.create('hostage_entity')

for server_class in entity.server_classes:
print(server_class.__name__)


The above will print out:

  • CHostage
  • CBaseCombatCharacter
  • CBaseFlex
  • CBaseAnimatingOverlay
  • CBaseAnimating
  • CBaseEntity

And we certainly welcome any and all questions you might have.
Image
stonedegg
Senior Member
Posts: 141
Joined: Sun Aug 12, 2012 11:45 am

Postby stonedegg » Tue Aug 04, 2015 3:19 pm

Welcome!

Surely not all classes and functions from the source engine are exported yet to be easily used in a script, but with some tricks and workarounds pretty much everything you can do in SM is possible in SP too.
The API for prehooks and posthooks is very nice and easy to use, search in the forums/wiki and you will probably find what you are looking for.
And just ask if you want to know anything, the devs are very nice and always try to help.

Return to “Whatever”

Who is online

Users browsing this forum: No registered users and 22 guests