Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Contract
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    2. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    3. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    4. Bugs*

    1. Grand Theft Auto Series

      1. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    6. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

[V|REL] Script Hook V Python 3k


lgrahl
 Share

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

Link to comment
Share on other sites

 

 

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?

Link to comment
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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 4 months later...

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
Link to comment
Share on other sites

  • 2 weeks later...

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!

Link to comment
Share on other sites

  • 2 months later...

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

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...
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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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