Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,180 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

lgrahl

[V|REL] Script Hook V Python 3k

Recommended Posts

headscript

 

i kinda wanted to rewrite it from scratch using boost python, a AST parser and Python 2.7 with Cython

 

I respect your enthusiasm, but what would we gain from this approach?

 

less decentralization more centralization when i integrate it into my lua scripthook

Share this post


Link to post
Share on other sites
lgrahl

 

 

i kinda wanted to rewrite it from scratch using boost python, a AST parser and Python 2.7 with Cython

 

I respect your enthusiasm, but what would we gain from this approach?

 

less decentralization more centralization when i integrate it into my lua scripthook

 

 

Sorry, I really don't understand where this is going. Let me rephrase the question: What would your LUA script hook gain from this? Respectively, what would LUA scripters be able to do what they can't do now? Or do you just want to merge both languages into a single ASI plugin?

Share this post


Link to post
Share on other sites
headscript

 

 

 

i kinda wanted to rewrite it from scratch using boost python, a AST parser and Python 2.7 with Cython

 

I respect your enthusiasm, but what would we gain from this approach?

 

less decentralization more centralization when i integrate it into my lua scripthook

 

 

Sorry, I really don't understand where this is going. Let me rephrase the question: What would your LUA script hook gain from this? Respectively, what would LUA scripters be able to do what they can't do now? Or do you just want to merge both languages into a single ASI plugin?

 

Or do you just want to merge both languages into a single ASI plugin?

thats it and allowing interprocessing(lua to python python to lua)

Share this post


Link to post
Share on other sites
lgrahl

Or do you just want to merge both languages into a single ASI plugin?

 

thats it and allowing interprocessing(lua to python python to lua)

 

I agree that communication between these two languages would be an advantage. But, I believe this is something that would be really great for every kind of ASI plugin, not only for plugins that provide a wrapper to another language. And I don't believe that centralisation is the answer.

 

Therefore, I propose that we join efforts here and define an interface that allows communication between ASI plugins. This could be another plugin which just passes signals (messages) from a sender to a receiver, like Blinker. This would allow scripters to combine their scripts, communicate to each other, regardless of the language they chose.

Share this post


Link to post
Share on other sites
lgrahl

Alright guys, there have been a lot of changes in the last two days:

  • The two missing elements, the tick and the key event co-routines have been finally implemented
  • Higher level functions are available to avoid polling for common requirements (e.g. wait until the player ped exists)
  • The examples have been updated and new ones have been added to guide you on how to use these co-routines.
  • Reloading scripts is now done by pressing Ctrl+F12
  • Stopping scripts is now done by pressing Ctrl+Del

If you do start scripting, you will get to the point where you need to poll for a requirement (e.g. waiting until the player has a weapon or something). Please, add your poll function(s) into the gta.requires package and make a pull request with your changes, so the whole community benefits from it!

 

What does this mean? It means, we can release now! :) I'll post an update as soon as I've uploaded the plugin.

Share this post


Link to post
Share on other sites
lgrahl

I've updated the first posting. We are grateful for any kind of feedback and hope to see some of your scripts soon. :)

Share this post


Link to post
Share on other sites
lgrahl

Version 0.9.14 fixes a minor bug in the key event and has been updated to include the latest natives.
Reminder: Alex has just released a new Script Hook V version to support the "I'll Gotta Gains Update". Please, update your Script Hook V version if you haven't already.

Edited by lgrahl

Share this post


Link to post
Share on other sites
Klaus_Kleber

does this have an ingame reload function?

Share this post


Link to post
Share on other sites
lgrahl

does this have an ingame reload function?

Yes, press Ctrl+F12 in game to reload all scripts or Ctrl+Del to just stop them.

Edited by lgrahl

Share this post


Link to post
Share on other sites
lgrahl

I'm looking for someone who wants to continue the work on this project because I currently have no time to pursue it any further. If you are interested, please contact me via mail <[email protected]>. Cheers!

Edited by lgrahl

Share this post


Link to post
Share on other sites
lgrahl

Version 0.10.16 switches over to Python 3.5.0 and has been updated to include the latest natives. In addition, a UI module has been added which is in a very early state (but doesn't interfere with existing scripts, so no worries here).

 

I'm still desperately looking for contributers who want to continue the work on this project because I currently have very limited time. If you are interested, please make pull requests on the official GitHub project page or contact me via mail <[email protected]>. Cheers!

Share this post


Link to post
Share on other sites
JGam3r

I already posted it in the comment section of the mod on GTA5-mods.com but I still have a problem while trying to get the mod to work like it should.

 

I want to create some mods for GTA using python but the Script Hook V Python 3k does not work. Native trainer and OpenIV work normal. I tried the wanted.py and vehicle_color.py to test if the mod works.
Can someone help me pls?

 

LOG(asi-loader):
// GTA V ASI LOADER (build May 2 2015)
// © Alexander Blade 2015
LIB: "C:\WINDOWS\system32\dinput8.dll" => 00007FFCCC430000
API: "DirectInput8Create" => 00007FFCCC43A570
API: "DllCanUnloadNow" => 00007FFCCC44BBA0
API: "DllGetClassObject" => 00007FFCCC44BC70
API: "DllRegisterServer" => 00007FFCCC4560A0
API: "DllUnregisterServer" => 00007FFCCC456430
LOADER: Loading *.asi plugins
ASI: Loading "D:\games\steam\steamapps\common\Grand Theft Auto V\NativeTrainer.asi"
"NativeTrainer.asi" => 00007FFCCE720000
ASI: Loading "D:\games\steam\steamapps\common\Grand Theft Auto V\OpenIV.asi"
"OpenIV.asi" => 00007FFCD4500000
ASI: Loading "D:\games\steam\steamapps\common\Grand Theft Auto V\scripthookvpy3k.asi"
"scripthookvpy3k.asi" failed to load
LOADER: Finished loading *.asi plugins

 

thx in advance

JGam3r

 

Share this post


Link to post
Share on other sites
lgrahl

I already posted it in the comment section of the mod on GTA5-mods.com but I still have a problem while trying to get the mod to work like it should.

 

I want to create some mods for GTA using python but the Script Hook V Python 3k does not work. Native trainer and OpenIV work normal. I tried the wanted.py and vehicle_color.py to test if the mod works.

Can someone help me pls?

 

LOG(asi-loader):

// GTA V ASI LOADER (build May 2 2015)

// © Alexander Blade 2015

LIB: "C:\WINDOWS\system32\dinput8.dll" => 00007FFCCC430000

API: "DirectInput8Create" => 00007FFCCC43A570

API: "DllCanUnloadNow" => 00007FFCCC44BBA0

API: "DllGetClassObject" => 00007FFCCC44BC70

API: "DllRegisterServer" => 00007FFCCC4560A0

API: "DllUnregisterServer" => 00007FFCCC456430

LOADER: Loading *.asi plugins

ASI: Loading "D:\games\steam\steamapps\common\Grand Theft Auto V\NativeTrainer.asi"

"NativeTrainer.asi" => 00007FFCCE720000

ASI: Loading "D:\games\steam\steamapps\common\Grand Theft Auto V\OpenIV.asi"

"OpenIV.asi" => 00007FFCD4500000

ASI: Loading "D:\games\steam\steamapps\common\Grand Theft Auto V\scripthookvpy3k.asi"

"scripthookvpy3k.asi" failed to load

LOADER: Finished loading *.asi plugins

 

thx in advance

JGam3r

 

 

Have you downloaded and installed Python 3 from the URL of the first posting? Have you built the Python Script Hook yourself or have you just downloaded the plugin? Also, any Python log files you could post here?

Share this post


Link to post
Share on other sites
JGam3r

 

Have you downloaded and installed Python 3 from the URL of the first posting? Have you built the Python Script Hook yourself or have you just downloaded the plugin? Also, any Python log files you could post here?

 

Yes I installed python 3.5 from the link you posted.

I just downloaded the finished plugin and the log files don't even exist... or do I need to create those manually?

 

best regards

JGam3r

Share this post


Link to post
Share on other sites
lgrahl

The log files will be created automatically. I will have a look at it soon.

Share this post


Link to post
Share on other sites
lgrahl

I've had a look at it and it works fine for me. Have you changed any settings during the Python 3 installation process?

 

I'll upload a new version soon.

Share this post


Link to post
Share on other sites
JGam3r

Thx for the reply lGrahl

 

No I haven't changed any setting but I haven't got access to my computer till next week because I'm on vacation. I'll see if it helps reinstalling it when I am back home

 

 

JGam3r

Share this post


Link to post
Share on other sites
dominikandreas

Unfortunately this project doesn't seem to work any longer, I suspect the reason is that both GTAV and ScriphookV have been updated. I tried to compile the solution myself with a newer version of scripthook, but unfortunately lots of functions can't be found.

 

Am I just doing something wrong or have there been really so many changes to the native api? Really appreciate your work and would love if you could help out somehow.

Share this post


Link to post
Share on other sites
lgrahl

Yeah, I'd love to come back to this but I'm really busy and it's unlikely I will have time for this any time soon (with that I mean many months, if not years). The .NET script hook is just way more popular and I don't believe we can catch up with them in terms of utility functions, stability, etc. which would be a requirement for higher popularity. One has to understand that I need to work on other projects I can make a living out of.

 

In general, however, this project has demonstrated that scripts can run concurrently in Python without the complexity added by multi-threading (although it is of course still possible to do that when really needed). Hopefully, the more popular script hooks come back to this idea.

 

Edit: Oh, and of course the built-in dependency management. That is really, really neat! To other script hook devs: Copy that!

Edited by lgrahl

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.