Question Communication with Ark Mod

baylf2000

Member
Plugin Developer
Messages
52
Points
8
I'm working on a idea my mod where some communication between a plugin and the mod would be useful. I'm wondering if one of the experts here could offer some advice.

I'd like for my plugin to be able to access a string array in a simple Actor spawned somewhere by the mod, who's parent class is just Actor.

Is it possible to find that actor in a plugin, and access that array? In mod blueprints, I could use the "Get All Actors Of Class" node to get a reference to that actor. Is there something similar in the server api?

Many thanks for your help.
 
Advertisement

Official Game Server Partner

OwnProx

Moderator
Plugin Developer
Messages
714
Points
63
maybe you can hook ScriptCommand in your plugin and in your mod send data using ScriptCommand on AShooterPlayer controller i believe as far as i know this plus connection string is the only way you would need to add like a identifier to the string in the workshop mod not the syntax but as a example: ScriptCommand("MyScriptArray: " + arraydata)

then in your server side plugin in you ScriptCommand hook check from a string starting with MyScriptArray

i haven't actually done any of this but pretty sure its how its done.
 

baylf2000

Member
Plugin Developer
Messages
52
Points
8
maybe you can hook ScriptCommand in your plugin and in your mod send data using ScriptCommand on AShooterPlayer controller i believe as far as i know this plus connection string is the only way you would need to add like a identifier to the string in the workshop mod not the syntax but as a example: ScriptCommand("MyScriptArray: " + arraydata)

then in your server side plugin in you ScriptCommand hook check from a string starting with MyScriptArray

i haven't actually done any of this but pretty sure its how its done.
Thank you so much for the reply OwnProx :)

Yes I've seen it done with ScriptCommand, but I was hoping to find a better, more reliable, more efficient way. ScriptCommands in mods can sometimes be ignored in mods, which isn't ideal, and it would be nice to be able to pass natural datatypes other than strings.

Unfortunately I don't know enough about how DLL injection works to know how to access the class (Actor) created by my mod, or if that's even possible. I assume I would have to define that class somewhere in my plugin, with whatever variables are used in the mod class? I'm really not sure.

Any thoughts you might have would, as always, be very much appreciated.
 

OwnProx

Moderator
Plugin Developer
Messages
714
Points
63
We are unable to access the variables which a mod adds unfortunately because the information is not in the pdb file there is no structures for those alterations but sure if you make a structure it will be a type of AStructure or a dino ADinoCharacter for example it will use the base class's you can access these but it would be kinda horrible and require looping or getting the current actor your controller is looking it but even then you cant access variables the mod added only base ones that exist in these structures
 

baylf2000

Member
Plugin Developer
Messages
52
Points
8
OK, that makes sense. Thanks @OwnProx :) I guess I'll have to make do with ScriptCommands :)

I wonder if one day someone could make a plugin system for the dev kit itself that would let us add functionality to it as well. There are so many things I've love to be able add.
 
Top