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

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. 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. 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

Sign in to follow this  
Krlos_Rokr

[Help] How to interconnect Scripts, Edit values from other Script.

Recommended Posts

Krlos_Rokr

Hi eveybody, i want to interconnect my scripts, like a main menu of my own scripts, so i can list all of them and open the interfaces buildin in each script.

 

I read a lot :panic: of GUID, ProcessAdress, COM connections, W/R memory blocks :monocle: , but i not get it in way to implement in Scripts, i'm not programer just a rockie in gta script developing, i did a few mods for IV and V. :facedesk:

 

I know it's posible cause in some oportunity i cross some words with Jnibs, he told me he was using GIUDs in IV to do this "Trick", in V he manage do it again, but unfurtanelly it has not be posible to talk with he again.

 

:r*: I apreciate some help, thanks!

Share this post


Link to post
Share on other sites
stillhere

Hi eveybody, i want to interconnect my scripts, like a main menu of my own scripts, so i can list all of them and open the interfaces buildin in each script.

Hi! I've been working on the same thing funny enough :lol: If you want to use it I'd be happy to share it, and if you want to make your own I can share the code too (it will be open source when released).

 

NHFF.png

 

Share this post


Link to post
Share on other sites
LeFix

.dll files have entry points, you could use them in order to have a remote control for you mods (I guess.)

If you want to share small samples of data in GTA V you should consider the DECORATOR namespace

Share this post


Link to post
Share on other sites
ikt

 

Hi eveybody, i want to interconnect my scripts, like a main menu of my own scripts, so i can list all of them and open the interfaces buildin in each script.

Hi! I've been working on the same thing funny enough :lol: If you want to use it I'd be happy to share it, and if you want to make your own I can share the code too (it will be open source when released).

 

NHFF.png

 

 

 

I've been considering making something similar but I took the easy route of using the decorator namespace like LeFix suggested. Can you explain the general architecture? I thought of making a library that could act as layer between mods, so everybody could compile against the lib to have access to it like with SHV. It does create a dependency to the new lib for mods though and they'd have to include a (possibly outdated) distribution or link to some external resource. Both aren't optimal. And I know if I make something, I'm definitely going to hate it some time later when I find a bug and need to update something like that.

Share this post


Link to post
Share on other sites
Krlos_Rokr

 

Hi eveybody, i want to interconnect my scripts, like a main menu of my own scripts, so i can list all of them and open the interfaces buildin in each script.

Hi! I've been working on the same thing funny enough :lol: If you want to use it I'd be happy to share it, and if you want to make your own I can share the code too (it will be open source when released).

 

NHFF.png

 

 

Thanks man that looks cool, will be nice when you share the code :)

Share this post


Link to post
Share on other sites
Krlos_Rokr

.dll files have entry points, you could use them in order to have a remote control for you mods (I guess.)

If you want to share small samples of data in GTA V you should consider the DECORATOR namespace

yeah i read about it dll generate an entry point when they start, bro can you please give us a small sample about DECORATOR?, i will a preciete that :).

 

 

 

Hi eveybody, i want to interconnect my scripts, like a main menu of my own scripts, so i can list all of them and open the interfaces buildin in each script.

Hi! I've been working on the same thing funny enough :lol: If you want to use it I'd be happy to share it, and if you want to make your own I can share the code too (it will be open source when released).

 

NHFF.png

 

 

 

I've been considering making something similar but I took the easy route of using the decorator namespace like LeFix suggested. Can you explain the general architecture? I thought of making a library that could act as layer between mods, so everybody could compile against the lib to have access to it like with SHV. It does create a dependency to the new lib for mods though and they'd have to include a (possibly outdated) distribution or link to some external resource. Both aren't optimal. And I know if I make something, I'm definitely going to hate it some time later when I find a bug and need to update something like that.

 

 

 

I'm developing a kind of interface for my scripts, so i'll have all on them in one keyborad button :D.

Basically a create two classes, one is the manager, and the other one is the client that will run in script.cb9c829eaae64.png86bc78663d324.png

 

Edited by Krlos_Rokr

Share this post


Link to post
Share on other sites
stillhere

Thanks man that looks cool, will be nice when you share the code :)

I haven't released it yet but I plan to soon, so here's the source :D

https://github.com/LfxB/ScriptCommunicatorMenu

 

 

I've been considering making something similar but I took the easy route of using the decorator namespace like LeFix suggested. Can you explain the general architecture? I thought of making a library that could act as layer between mods, so everybody could compile against the lib to have access to it like with SHV. It does create a dependency to the new lib for mods though and they'd have to include a (possibly outdated) distribution or link to some external resource. Both aren't optimal. And I know if I make something, I'm definitely going to hate it some time later when I find a bug and need to update something like that.

I haven't documented my source well (yet :/ ), but basically:

I use the EventWaitHandle class to create system events. Each event name should match an accompanying *.scmod file in the scripts folder, which should be provided by the script that wants to appear on the menu (see the Example project).

The Script Communicator Menu will search for all the *.scmod files in the scripts folder and add them to the menu, each with their own EventWaitHandle object. When an item in the menu is selected, the event will be signaled/triggered, and the script that receives the event will execute whatever block of code they want.

 

This should also work with C++ scripts! The menu only searches the scripts folder though, so maybe I should change that..

 

I've included a simple helper class that makes it a bit easier to use in C#, should be easily translated?

For users that want to use it to trigger their own menus, I've included an option to block the Script Comm. menu from triggering (ex: while another menu is open) until the script unblocks it. Though, if a script blocks it and never unblocks it, general users would think it's the fault of the Script Comm. menu rather than the creator of the other script lol

 

I don't really know the limitations of this method. Maybe it won't work at all on non-admin/limited user accounts.

Also, there is no actual "communicating" in terms of sharing variables and whatnot, just event signaling really :(

But the one pro I like about it is that any script that wants to use this does not need to reference anything, it just needs to supply the *.scmod file(s) and wait for the event(s) to trigger, and the ScriptCommunicatorMenu handles the rest.

 

Sorry if I did not explain it well!

Edited by stillhere

Share this post


Link to post
Share on other sites
Krlos_Rokr

 

Thanks man that looks cool, will be nice when you share the code :)

I haven't released it yet but I plan to soon, so here's the source :D

https://github.com/LfxB/ScriptCommunicatorMenu

 

 

I've been considering making something similar but I took the easy route of using the decorator namespace like LeFix suggested. Can you explain the general architecture? I thought of making a library that could act as layer between mods, so everybody could compile against the lib to have access to it like with SHV. It does create a dependency to the new lib for mods though and they'd have to include a (possibly outdated) distribution or link to some external resource. Both aren't optimal. And I know if I make something, I'm definitely going to hate it some time later when I find a bug and need to update something like that.

I haven't documented my source well (yet :/ ), but basically:

I use the EventWaitHandle class to create system events. Each event name should match an accompanying *.scmod file in the scripts folder, which should be provided by the script that wants to appear on the menu (see the Example project).

The Script Communicator Menu will search for all the *.scmod files in the scripts folder and add them to the menu, each with their own EventWaitHandle object. When an item in the menu is selected, the event will be signaled/triggered, and the script that receives the event will execute whatever block of code they want.

 

This should also work with C++ scripts! The menu only searches the scripts folder though, so maybe I should change that..

 

I've included a simple helper class that makes it a bit easier to use in C#, should be easily translated?

For users that want to use it to trigger their own menus, I've included an option to block the Script Comm. menu from triggering (ex: while another menu is open) until the script unblocks it. Though, if a script blocks it and never unblocks it, general users would think it's the fault of the Script Comm. menu rather than the creator of the other script lol

 

I don't really know the limitations of this method. Maybe it won't work at all on non-admin/limited user accounts.

Also, there is no actual "communicating" in terms of sharing variables and whatnot, just event signaling really :(

But the one pro I like about it is that any script that wants to use this does not need to reference anything, it just needs to supply the *.scmod file(s) and wait for the event(s) to trigger, and the ScriptCommunicatorMenu handles the rest.

 

Sorry if I did not explain it well!

 

thanks bro, yeah i get the idea, i'll take a look :D

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
Sign in to follow this  

×

Important Information

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