Quantcast

Jump to content

» «
Photo

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

7 replies to this topic
Krlos_Rokr
  • Krlos_Rokr

    Player Hater

  • Members
  • Joined: 05 Apr 2014
  • Colombia

#1

Posted 17 April 2017 - 04:21 PM

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!


stillhere
  • stillhere

    A guy

  • Members
  • Joined: 06 Jun 2006
  • Canada

#2

Posted 18 April 2017 - 08:00 AM

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).

Spoiler

  • ikt and Krlos_Rokr like this

LeFix
  • LeFix

    Burning Tube Man

  • Members
  • Joined: 13 Jul 2015
  • Germany

#3

Posted 22 April 2017 - 08:47 PM

.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

  • Krlos_Rokr likes this

ikt
  • ikt

    _

  • Members
  • Joined: 02 Oct 2006
  • None

#4

Posted 23 April 2017 - 12:40 PM

 

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).

Spoiler

 

 

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.

  • Krlos_Rokr likes this

Krlos_Rokr
  • Krlos_Rokr

    Player Hater

  • Members
  • Joined: 05 Apr 2014
  • Colombia

#5

Posted 23 April 2017 - 01:25 PM

 

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).

Spoiler

 

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


Krlos_Rokr
  • Krlos_Rokr

    Player Hater

  • Members
  • Joined: 05 Apr 2014
  • Colombia

#6

Posted 23 April 2017 - 01:47 PM Edited by Krlos_Rokr, 23 April 2017 - 01:49 PM.

.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).

Spoiler

 

 

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

 

  • stillhere likes this

stillhere
  • stillhere

    A guy

  • Members
  • Joined: 06 Jun 2006
  • Canada

#7

Posted 23 April 2017 - 04:42 PM Edited by stillhere, 23 April 2017 - 04:50 PM.

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/L...ommunicatorMenu

 

 

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!

  • ikt and Krlos_Rokr like this

Krlos_Rokr
  • Krlos_Rokr

    Player Hater

  • Members
  • Joined: 05 Apr 2014
  • Colombia

#8

Posted 24 April 2017 - 08:55 PM

 

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/L...ommunicatorMenu

 

 

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

  • stillhere likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users