Page 1 of 1

New Here

Posted: Tue Jul 30, 2013 5:00 am
by Zawmbee
Hey everyone, Zawmbee here... I was a coder a long time ago for css, but now I just got outta the military and want to figure out the CSGO structure. As I can tell SourcePython is the only language used at the moment. However, I can not seem to find any tutorials to get me started or to help me understand SourcePython better. I have looked at some coding and see the similarities with ESP and have adapted a bit from it. Was wondering if anyone could give me a good place to help me learn better? Haven't found any tutorials, so would appreciate it in order to understand this language...

Thanks
- Zawmbee

Posted: Tue Jul 30, 2013 6:29 am
by satoon101
The project is still in Alpha, and anything can change at any given time. That being said, we have a decent amount of the current build documented in the wiki:
http://www.sourcepython.com/forumdisplay.php?37-Source-Python-Wiki

You can find that link along the top bar where it says "Wiki" for future reference.

Welcome to the forums!

Satoon

Posted: Tue Jul 30, 2013 11:42 am
by Omega_K2
Language is still python, so the only thing different is the API. If you still renember some ESP it might be worth looking at [book]EventScripts Equivalents[/book].

Actually you can still do quite a lot in SP, few major things are still missing at moment though like wraps for Vectors (used for entity positions), a libary for popups and stringtables (like for adding downloads). But at the same time it is possible to use it for a bunch of purposes already

Also you might want to check out [book]Building From Source[/book]; that way you can get the latest version with the most recent featureset and API.

Posted: Tue Jul 30, 2013 5:14 pm
by Zawmbee
So does this mean that SourcePython is still in testing for CSGO? Meaning if I coded something now, it probably wont work later?

Posted: Tue Jul 30, 2013 6:04 pm
by Omega_K2
Source.Python is undergoing active development, it is not "finished" yet and some features are missing, while some others are still heavily WIP (as such may change a lot - like dyncall/signature stuff, as you can see in the respoitory, there have been a lot of changes to it recently). It works on CS:S and CS:GO, and probably TF2, DOD:S and HL2DM (cause they have the same engine as CS:S afaik)

If you code something, it might require some reworking later to get it to work if the API changes, though I'm fairly certain that will require little rework as I don't see anything like a major rewrite happen (again). So basically, if anything, code now will only need some minor adjustments in later development stages. Often it is just a matter of "search & replace" if the API stuff changes.

I'll post an example later

Posted: Tue Jul 30, 2013 6:56 pm
by Zawmbee
Alright, appreciate it... and if anyone doesn't mind tutoring ;) appreciate that too :P

Posted: Tue Jul 30, 2013 8:53 pm
by Omega_K2
The most complex change so far in SP was the rewrite from CamelCase to under_score , so all it was was maily replacing methods with another.

A nice example to see how stuff evolved:

1. Original ES script http://addons.eventscripts.com/addons/view/pretty_status_list
2. Port to Source.Python before the rewrite: http://www.sourcepython.com/showthread.php?254-Pretty-Status-List-V-1-00-000-SVN
3. Version working with current Source.Python development version: https://german-slaughterhouse.de/svn/scripts-public/trunk/addons/source-python/pretty_status_list/pretty_status_list.py

I might add a small tutorial to the wiki soon on how to get started with Source.Python, but, as long you know python, it's not that different from ES.