(POTENTIAL) ♥ GUIDE - CREATE PLUGINS ♥ (POTENTIAL)

Messages
53
Likes
7
Points
8
Website
gamingogs.com
Thread starter #1
We have found a public guide created online and are simply just reposting the guide in hopes this guide will help inspire and bring in potential devs for ArkServerAPI.

You can call most of native ARK functions and read/change data members. However, it's not complete yet. Take a look at files in "include/API" folder to find out what is available.

Creating a plugin:
1) Create a new Visual Studio DLL x64 project.

2) Include "API" folder to your project.

API Overview:

Ark.h contains all API functions from ArkApi.dll.

1) Getting a pointer to UWorld:
UWorld* uWorld = Ark::GetWorld();
2) Getting a pointer to AShooterGameMode:
AShooterGameMode* aShooterGameMode = Ark::GetGameMode();
3) Adding a new chat command:
Ark::AddChatCommand("command name", &callback);
Example:
void ChatCmd(AShooterPlayerController* aShooterPlayerController, FString* message, int mode)
{
// do something here
}

Ark::AddChatCommand("/test", &ChatCmd);

4) Adding a new console command (only server admins may use it):

Ark::AddConsoleCommand("command name", &callback);
Example:

void ConsoleCmd(APlayerController* aPlayerController, FString* cmd, bool bWriteToLog)
{
// do something here
}

Ark::AddConsoleCommand("test", &ConsoleCmd);
5) Adding OnTick callback:

Ark::AddOnTickCallback(&callback);
Example:

void OnTick(float DeltaSeconds) // will be called every tick
{
// do something here
}

Ark::AddOnTickCallback(&OnTick);
6) Adding your own hooks. You need to declare hook using a macro first:

DECLARE_HOOK(HookName, returnType, argType1, argType2, ...);
Now you can enable it:
Ark::SetHook("className", "functionName", &Hook_HookName, reinterpret_cast<LPVOID*>(&HookName_original));
Note:
We did not create this guide, We only found it and posted it on the forums. We need inspiring devs to use it and create some awesome plugins. We are hiring inspiring devs and will invest hundreds if not thousands of dollars into you if you can help us create public/paid plugins. Contact me via direct message and let's discuss.
 

Michidu

Administrator
Staff member
Messages
483
Likes
289
Points
63
#2
Well, i wrote this guide for the first API version. The reason why it was removed is because it's outdated. However, it's not really a guide but just overview of a few API functions. Now, those functions have a small documentation directly in the code, so it's almost useless.
 
Messages
53
Likes
7
Points
8
Website
gamingogs.com
Thread starter #3
Well, i wrote this guide for the first API version. The reason why it was removed is because it's outdated. However, it's not really a guide but just overview of a few API functions. Now, those functions have a small documentation directly in the code, so it's almost useless.
Awesome to know, Yeah it didn't state which version or why it was removed. Good to know.