Some questions and feedbacks :<

All other Source.Python topics and issues.
User avatar
iiya
Junior Member
Posts: 3
Joined: Sat Jul 07, 2012 2:01 pm
Location: Dreamland

Some questions and feedbacks :<

Postby iiya » Mon Jul 09, 2012 10:08 pm

hi~
i have some questions about this project:

- will there be somewhat of a system for C++ addons to expose functionality? (like sourcemods extensions) - i think this would be nice even in a basic form because i think this was a problem in eventscripts.. i mean, DIY worked okay for SPE, but if there was many other addons it wouldn't be very cute i think.
- is there a reason this is a VSP and not using mm:s?


and a suggestion; i think it would be cool to expose engine functionality in some kind of generic way such that it would be easy to support multiple scripting engines in the future (even if you plan not too, others will have the option in the future - i think this maybe why the sourcemod python extension didn't mature). although i know it's currently heading against this method, i just thought to put it out there.

and finally, i have some feedbacks for you which you can feel free to ignore or not, since i know it's very early and you probably know about these issues (and some of them might even by my fault XD):

- the NODEFAULTLIB cmake configurations seem to be reversed (ignores libcmtd on release which i had to change to libcmt in order to compile and vice-versa), though i'm not too well versed on these conflicts.
- there's a few missing #ifs for SOURCE_ENGINE<3 builds (GetLaunchOptions, Get/SetUint64), and a link with interfaces.lib which shouldn't be necessary on <3 builds
- it seems like addons can be loaded multiple times? or at least very weird things happen when making mistakes like this, including crashes and sometimes an inability to reload addons
- it seems you need to explicitly make global almost every reference within an addon (including imports and functions), otherwise you get a name error (ie. script below demonstrates what i had to do to get it working)

Syntax: Select all

###############################################################################
## EventScripts3 Test

import engine as _engine
import random
engine = None

def load():
global engine, _engine
engine = _engine.GetEngine()
print('** Hihi~ from test.py @ ES3 :3 **')

def unload():
print('** Ciao~ from test.py @ ES3 :3 **')

def player_say(event):
global set_gravity, random
print('** Player say from test.py @ ES3 :3 **')
if not event.IsEmpty('text') and not event.IsEmpty('userid'):
text = event.GetString('text')
if text == '.gravity':
set_gravity(random.randint(100, 800))
else:
print('Player (%s) :: \'say\' :: %s' % (event.GetInt('userid'),
text))

def set_gravity(n):
global engine
engine.ServerCommand('sv_gravity %s\n' % n)
engine.ServerExecute()

###############################################################################

anyway, i'm excited for this project! and i'm glad you are using a good build system, this will hopefully releive people of making many manual edits to makefiles to get things compiling :) ciao~
your-name-here
Developer
Posts: 168
Joined: Sat Jul 07, 2012 1:58 am

Postby your-name-here » Mon Jul 09, 2012 11:07 pm

iiya wrote:hi~
i have some questions about this project:

- will there be somewhat of a system for C++ addons to expose functionality? (like sourcemods extensions) - i think this would be nice even in a basic form because i think this was a problem in eventscripts.. i mean, DIY worked okay for SPE, but if there was many other addons it wouldn't be very cute i think.

Welcome to the forums! Yes, an extension framework is planned. However, I'd like to get the actual core functionality of the addon up first before I work on an extension system.
iiya wrote:
- is there a reason this is a VSP and not using mm:s?


I'm not against an MM:S version, but I don't know why I'd use it when VSP works just fine. I'm not doing virtual table hooking with this plugin, which makes MM:S useless.

iiya wrote:
and a suggestion; i think it would be cool to expose engine functionality in some kind of generic way such that it would be easy to support multiple scripting engines in the future (even if you plan not too, others will have the option in the future - i think this maybe why the sourcemod python extension didn't mature). although i know it's currently heading against this method, i just thought to put it out there.


That would be pretty cool, but I think that's outside the scope of what I personally want to do with this plugin. I made it open source for this exact reason. I hope the extension system will allow others to make this kind of change.

iiya wrote:
and finally, i have some feedbacks for you which you can feel free to ignore or not, since i know it's very early and you probably know about these issues (and some of them might even by my fault XD):

- the NODEFAULTLIB cmake configurations seem to be reversed (ignores libcmtd on release which i had to change to libcmt in order to compile and vice-versa), though i'm not too well versed on these conflicts.
- there's a few missing #ifs for SOURCE_ENGINE<3 builds (GetLaunchOptions, Get/SetUint64), and a link with interfaces.lib which shouldn't be necessary on <3 builds
- it seems like addons can be loaded multiple times? or at least very weird things happen when making mistakes like this, including crashes and sometimes an inability to reload addons
- it seems you need to explicitly make global almost every reference within an addon (including imports and functions), otherwise you get a name error (ie. script below demonstrates what i had to do to get it working)


#1. Yes, it should be ignoring libcmtd on release. That is a debug runtime library. It has no place in a release build.
#2. This plugin does not support any engine other than CS:GO for the current time being, though I appreciate you letting me know I am missing some #ifs.
#3. Thanks for letting me know. Because the plugin is in its very early stages, I don't have load checking in place.
#4. I have this issue too and I don't understand why it is occurring. I am looking into this and will hopefully have a fix soon.

Thanks for the feedback! :)

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 7 guests