Guild icon
Ark Server Api
── ( General | Chat ) ── / 【💬】ɢʟᴏʙᴀʟ-ɢᴇɴᴇʀᴀʟ
Rogue Leader joined the server. 11/17/2018 8:19 PM
Trippn joined the server. 11/17/2018 8:23 PM
OG | F()()FighT3r joined the server. 11/17/2018 8:23 PM
Discord.Me joined the server. 11/17/2018 8:45 PM
MEE6 joined the server. 11/17/2018 8:58 PM
CygnusX1 joined the server. 11/18/2018 12:49 AM
Noita joined the server. 11/18/2018 12:50 AM
Avatar
Rogue Leader 11/18/2018 12:51 AM
Hey guys!
Avatar
Rogue Leader 11/18/2018 12:51 AM
@GSH | MrOwlSky has set us up a discord to help us get a little more organized on the plugin development front.
12:53 AM
I'll be working on getting some basic tutorials up to help people get started with making their own plugins here soon. If you know any one else who's interested, shoot them an invite, whether they are a beginner or experienced.
Avatar
Yesss please. I'd love to learn. Still not as good with C++ but i may or may not catch on quick
12:53 AM
especially with some of the projects I have in store.
Avatar
Rogue Leader 11/18/2018 12:55 AM
I'm not that great at C++ either. Most of my experience is in Java and web dev stuff so it's new to me. I've been largely working off of the available source code from Michidu and OwnProxs work.
12:56 AM
I'm gonna try to get both of them in here to vet the tutorials/examples and it never hurts to have a peer review your work.
12:56 AM
Just gonna have to work on some discord guidelines so we don't have people "stealing" IP from other posters.
12:56 AM
Any ideas on that would be welcome
Avatar
Javascript here :)
1:04 AM
And ip stealing? Through discord? That's be hard. Very hard.
1:05 AM
Oh, int. Property haha. I was like wewh if we have people on that skill level in here yikes hahaha
Avatar
Rogue Leader 11/18/2018 1:38 AM
Lol yea, basically something that says if you share something here, it's for public use. So sharing a portion or all of your code is basically permission for others to use it.
1:38 AM
Same for ideas, etc..
Michidu joined the server. 11/18/2018 7:10 AM
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 joined the server. 11/18/2018 8:22 AM
Avatar
Hey @GSH | MrOwlSky thank you for inviting me, the idea sounds nice!
Avatar
GSH | MrOwlSky 11/18/2018 9:10 PM
Very welcome! @facundo It was @Rogue Leader idea. Figured it'd be a great place to promote ArkServerAPI and to learn how to make plugins while having an official discord dedicated to it.
💛 1
Avatar
hey peeps
Avatar
GSH | MrOwlSky 11/20/2018 6:20 PM
Hey
6:20 PM
Welcome to discord 😃
Avatar
thanks for inviting me !
💃 1
6:23 PM
where do i post a tutorial if i make one ?
Avatar
GSH | MrOwlSky 11/20/2018 6:23 PM
#【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ
Avatar
would be happy to make a tutorial on how to set up visual studio for dll coding
Avatar
GSH | MrOwlSky 11/20/2018 6:23 PM
Or if you do a video tutorial post in #deleted-channel
Avatar
ill try my best once i get home 😃
👍 1
Avatar
Nice initiative and Hello Everyone 🙂
Avatar
GSH | MrOwlSky 11/20/2018 7:46 PM
Hey @Foppa 😃
Avatar
Nice work on the discord, neat setup! @GSH | MrOwlSky 😃
Avatar
GSH | MrOwlSky 11/20/2018 7:48 PM
Thanks! Shoutout to Mitch and Rogue on bringing the vision together. Yeah I think it'll be a great place for people to come.
Avatar
Cool!
🎀 1
Avatar
sorry been bery busy today i'll work on the tutorial on Thursday
👍 1
9:07 PM
i can publish a basic text tutorial atm though
Avatar
I wish I could stop playing 76 long enough to really dive into the project 😦
Avatar
i've published a guide on getting visual studio ready for the compilation of basic plugins !
Avatar
GSH | MrOwlSky 11/20/2018 9:33 PM
You oughta do a google docs so you can update it on the fly and keeep real time updates. (edited)
Avatar
you mean google docs or drive ?
Avatar
GSH | MrOwlSky 11/20/2018 9:33 PM
Yeah docs
Avatar
lemme see
9:34 PM
damn it does not keep pictures or formatting...
Avatar
GSH | MrOwlSky 11/20/2018 9:34 PM
It use's it's own formating but you can still put pictures in the document.
Avatar
Rogue Leader 11/20/2018 9:36 PM
You should actually use git if you want other people to change it ;) (edited)
Avatar
alright check it out now
Avatar
Rogue Leader 11/20/2018 9:56 PM
Maybe expand that to include which default files to delete, and how to import the libraries in the code in the main cpp file
9:56 PM
Otherwise, really good
9:57 PM
There are some other small changes you may have to make in the config depending on which c++ classes you use, but those are a little more advanced. (edited)
Avatar
Git is ♥
Avatar
Rogue Leader 11/21/2018 3:39 AM
I couldn't find an easy way to track docx files in git. Thinking about turning the text based tutorials into markdowns (edited)
Avatar
That's what I would do.
Avatar
hi is there a way to iD the weapon a player is using ?
11:05 AM
there is a bugged flamethrower from a mod on my server and i'm trying to prevent its structure damage but currently this does not work
Avatar
from KillFeed, might help you KillerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); (edited)
Avatar
oh wow i scouted its source but did not find that
2:26 PM
thanks !
Avatar
just check everything for nullptr
Avatar
eeh, where have the tutorial channels gone to?
Avatar
they're locked
Avatar
alright i added that code from KillFeed but got this crash (https://pastebin.com/sRUD8vq7) i did not modify the code much so its probably a NullPTR related crash ?
Avatar
show me a snippet of the code (edited)
7:07 AM
Suggestion: make a suggestions channel and also make a channel for links such as githubs so we can direct link our projects on github just so theirs a nice place where people can go to see all links
7:07 AM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
7:07 AM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
here is what i'm trying to get to work
9:09 AM
i want to basically id the flmathrower being used so i can prevent the damage from it
Avatar
Your code is pretty flawed because, you don't null check enough stuff, or even type check event instigator to make sure its a character Your Server would crash if a dino attacks a structure or a player riding one attacks it or even a player with no weapon in his hands or even a grenade hits it yeah you had about 4 possible crash's (edited)
9:46 AM
float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this && EventInstigator && !EventInstigator->IsLocalController() && EventInstigator->IsA(AShooterPlayerController::StaticClass())) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (WeaponName.Contains(L"Flamethrower")) return 0; } } APrimalStructure_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } (edited)
Avatar
you need something like that ^^
Avatar
@OwnProx you should be able to lint with C++ or CPP after``` (edited)
Avatar
ah i tried c++
Avatar
CPP Will work then
Avatar
maybe cause low case (edited)
Avatar
float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser)
10:05 AM
yep cpp
10:05 AM
@WETBATMAN Answer is above, scroll up (edited)
10:06 AM
also this is the wrong section keep it to #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ 😃 my bad too i guess general is for non plugin related stuff (edited)
Avatar
also id like to add AShooterController or APrimalDinoAIController or AAIController or APlayerController all use AController as a base class meaning that many functions you hook may use different types under the class of AController thus you type check it to know at this point if it is a character or a dino ect (edited)
10:19 AM
you can see this by browsing Actor.h file in ArkApi Source
Avatar
anyone know how to make a command for players like /suicide that will damage the player but ignore the damage if they're not on a dino (so as not to kill the dino instead of the player)
Avatar
Guess it's possible to take a look on the Improved Commands plugin and develop it from there.
Avatar
Rogue Leader 11/24/2018 4:31 AM
@OwnProx How have you guys gone about handling contributions to your public repos? Has anyone other than you and @Michidu been involved on those? (edited)
Avatar
you mean like as in adding extra stuff to our public sources ?, because you can clone from github, then you can upload it to your own then when you make a change you can make a pull request against my github which will show me all the changes you did and give me the option to apply it
3:14 PM
or did i get the wrong idea about what you mean?
Avatar
Rogue Leader 11/24/2018 3:36 PM
In the past when I've worked with a group on public project, I added them as contributors to my repository and just protected my master branch by making it where the only way to write to it is through pull request approval, or as the repo owner.
3:36 PM
I was just curious if you guys added each other as direct contributors to your repos or had done like you said (edited)
3:38 PM
I've never contributed to a repo without having the ability to push new branches to it (edited)
Avatar
Michidu is added as a contributor to my github
6:25 AM
but im not added on his but that does not limit me from passing updates via github to him, you simply would fork one of either of our projects (can be located at top right of github) then you would makes your changes and commit to your own github, then simply head to mine or Michidu's then under where you see the commit's count you will see New pull request click that and it will allow you to select a source to compare against and it will then notify either me or michidu of your edits
6:27 AM
anyone can made a programming contribution we more then welcome it
Avatar
@Michidu whats the new arkapi update, security fix ?
Avatar
fixes one exploit
Avatar
from client side or ? (edited)
Avatar
well, from players possibly 😃
Avatar
hmm i better update it soon 😄
Avatar
yeah i found it earlier today highly recommended to upgrade but i highly dout anyone will exploit it on you as they would need to know a few things first, even the most popular servers have not been effected by this it was never made public (edited)
Avatar
Does the plugins.unload and plugins.load work with RCON or is it only through console ingame that it will work?
Avatar
only console as far as i know
Avatar
only ingame
2:28 PM
but you can just enable AutomaticPluginReloading
2:28 PM
in Ark Api's config.json
2:29 PM
enable that
2:29 PM
then simply rename your new dll to MyDllName.dll.ArkApi
2:29 PM
and move it to the location of the old dll in the plugins folder
2:30 PM
and it will automatically load the new dll
2:30 PM
you can just change vs settings output path and make it apply .ArkApi to the dll name
2:30 PM
so it simply detects the new dll after build and loads it
2:30 PM
without any copy and pasting required
Avatar
Rogue Leader 11/27/2018 2:39 PM
Does that automatically unload the old one too?
Avatar
yes, it does
Avatar
Rogue Leader 11/27/2018 2:43 PM
That is awesome. My ass has been rebooting servers nonstop.
Avatar
yeah we need someone to write documentations for the api haha
Avatar
GSH | MrOwlSky 11/27/2018 5:37 PM
That's epic lol I didn't even know about that @OwnProx
5:37 PM
Documentations would be godsent
Avatar
Rogue Leader 11/27/2018 6:51 PM
Good luck to the poor soul that documents tens of thousands of functions and variables
Avatar
GSH | MrOwlSky 11/27/2018 7:16 PM
lol
Avatar
Sooo.. if I have a plugin and I do plugins.unload from ingame... i should be able to replace the dll and update it with another right ?
10:11 AM
Without having o restart the server.
Avatar
only if plugin supports the unloading
Avatar
Could you let me know in detail what do you mean by supports the unloading? I'm assuming it is referring to this. BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); <---------------------------------- break; } return TRUE; }
Avatar
that should be it unless you're adding additional chat commands or such
Avatar
yes, you need to remove all commands/hooks in the Unload function
Avatar
Strange. Let me share the code of that part. What ever I try, in game I get the unloaded message.. but I still can't replace the dll because it gives error as in being in use.
10:32 AM
void Load() { Log::Get().Init("MyPlugin"); LoadConfiguration(); MyPluginDatabase::InitDatabase(); ArkApi::GetHooks().SetHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer, &AShooterGameMode_HandleNewPlayer_original); ArkApi::GetCommands().AddChatCommand("/myplugin", &MyPluginFunction); } void Unload() { ArkApi::GetHooks().DisableHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer); ArkApi::GetCommands().RemoveChatCommand("/myplugin"); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); break; } return TRUE; }
10:32 AM
Anything wrong here ?
Avatar
looks fine
10:33 AM
are you sure it says that plugin was unloaded?
Avatar
Yup.
10:34 AM
Avatar
what in console?
Avatar
Let me grab the console as well
10:37 AM
11/28/18 09:02 [API][info] Loaded plugin - myplugin 11/28/18 09:03 [API][info] Unloaded plugin - myplugin 11/28/18 09:04 [API][info] Loaded plugin - myplugin
Avatar
how it says loaded after?
10:39 AM
did you enable auto reloading maybe?
Avatar
Automatic loading is false.. and that is the last lines in the log "settings":{ "AutomaticPluginReloading":false, "AutomaticPluginReloadSeconds":5, "SaveWorldBeforePluginReload":true },
Avatar
weird, there is no way it can automatically load after unloading 😃
Avatar
That you meant.. .I loaded first -> tested overwrite -> failed -> unloaded -> tested overwrite -> failed -> loaded again -> tested overwrite -> failed
Avatar
ah, hm i will try it again. But you should be able to replace/remove dll after unloading
Avatar
Thanx, I'll try some other means as well... maybe something is locking up those files once the game is running. Also, if it may help... after I unload it and got the unloaded message, i still can use the registered command.
Avatar
and they works?
Avatar
Yeah, I unload the plugin, gets unloaded message in game and in console..and I still can write /myplugin and get the function as if no unloading happened.
Avatar
then it indeed not unloaded somehow
Avatar
Any way I can troubleshoot to confirm if it is indeed unloading or not?
Avatar
it's not. Weird, in my test unloading worked. Do you use api v 2.9?
Avatar
did you try to unload some other plugin?
Avatar
That I haven't tried. I only have 2 at the moment. ExtendedRCON and this. Let me try the extendedRcon
Avatar
Ok, this is strange. I have API 2.9 and ExtendedRCON + MyPlugin only on this server. I tested first to get tribe log to check if ExtendedRCON was working and it was working ok. So I did a plugins.unload ExtendedRCON and it responds by saying its not loaded. I loaded it and it reported loaded, and unloaded it which said unloaded, but still can use the commands. 11/28/18 11:29 [API][warning] (ArkApi::PluginManager::UnloadPluginCmd) Plugin extendedrcon is not loaded 11/28/18 11:31 [API][info] Loaded plugin - extendedrcon 11/28/18 11:34 [API][info] Unloaded plugin - extendedrcon
Avatar
maybe case matters? I don't remember it. [API][info] Unloaded plugin - ExtendedRcon
Avatar
yes case does matter
12:53 PM
when i unload my plugin i type its name exactly as shown on the plugin folder/DLL name
Avatar
Hmm... Let me try
Avatar
Yeah, case does seem to matter when loading and unloading. But if we type in the wrong case, shouldn't the API return it as plugin not found or something? Maybe that's why I'm having the confusion.
Avatar
C++ itself is case sensitive so it would make sense for the load/unload function to be case sensitive itself
Avatar
It is. But how it is now, you can load the same plugin with the wrong case even after it has already been loaded.
Avatar
is there any possible way to force handcuffs onto myself 😄
Avatar
I'll handcuff you @WETBATMAN 😉
Avatar
hehe
Avatar
but yeah if you need me to log on to your test server I can
Avatar
you have a few spare mins ?
Avatar
i'll just spin up rdp from work ^ useless bit of information and now i'm questioning why I stated it. Short answer: Yes (edited)
5:26 PM
ye let me remove mods from it so you connect shortly
5:27 PM
89.232.32.23:27017
5:27 PM
will be up shortly
Avatar
sure let me know
Avatar
its online
5:37 PM
otw
Avatar
aight lets do this
Avatar
@Raptross because when you load the dll it uses windows file system and windows supports lower case when selecting a file it will still detect it if it was fully named in uppercase and you searched for it in lower case and well when the plugin is added to the plugins array in the api it grabs the name from the dll thus storing it in the array with lower and upper case characters dependant on the folder you placed it / plugin name so when you call the unload command it looks that array looking for a exact match to the plugin name you typed aka case sensitive sure there could of been a tolower to convert both to lowercase while checking but its a bit pointless (edited)
10:01 PM
also not sure why unloading is not working try with a blank plugin with nothing but a single hook in it or something to better determine
Avatar
Yeah, it works now. Case was all that was mattering. When I used unload, i used all lower and it was saying it wasn't loaded. So i loaded it again with lower case and unloaded it again with the same lower case. Which actually still left the real one with the proper casing intact. That was where I was getting confused. Thanx all for helping me figure this out.
Avatar
@Michidu / @OwnProx Since loading and unloading is through the game console only, any idea of having that function brought into the RCON ? Would be very easy for admins who run clusters, so that they don't have to hop on to each one separately to update plugins when required.
👍 5
😲 1
Avatar
i +1 this
Avatar
yeah indeed, by rcon would be nice. But when you are building a plugin i can understand that you don't need it. But for example now when i'm about to upgrade 10 servers with plugins.
5:01 PM
It can be nice to avoid restarting all the servers
5:01 PM
But it's a nice to have feature (edited)
5:01 PM
😉
Avatar
Another thought i had is to make the config files more in the database. if it would be possible. So plugins can share config files and you only need to update on one place. I know when i wrote with Delphi and that application connected to the database and looked in a WSF storage in the database after it's config file. Quite neat.
5:16 PM
Maybe it's a little bit overkill..
Avatar
NO SUCH THING BROTHER!
5:17 PM
>Says the node dev don't listen to me we're masochists I totally store settings in dbs at times though cause why not 😃 and i'm lazy (edited)
Avatar
Rogue Leader 11/30/2018 5:18 PM
if we use MongoDB, you could literally just upload the current config files
Avatar
Rogue Leader 11/30/2018 5:18 PM
and they'd keep their jdon format
Avatar
Yeah, i have 10 Servers atm. I know it's quite much just copy paste. But yeah i gives a backup as well. if the server goes down the config is still "there" and you only need to reinstall the server with plugins and point the plugins to the database again.
Avatar
Rogue Leader 11/30/2018 5:18 PM
How hard in mongo to use on the client side?
5:18 PM
I've never set it up :/ (edited)
Avatar
not hard at all if you're using linux as your db server
5:19 PM
MS is kindof annoying
Avatar
MySQL can handle any files if im not totally wrong.
Avatar
Rogue Leader 11/30/2018 5:19 PM
that's true, but can you query parts of a json without having to hard code it in? (edited)
Avatar
Don't understand the question
Avatar
Rogue Leader 11/30/2018 5:20 PM
if you store a json file in mysql, you'll still have to pull the who line and parse it right?
5:21 PM
in mongo, you just query the part you want without pulling it all
Avatar
Ah, no you need to have the whole file
5:21 PM
unless we totally remake the whole setup of the API and plugins. So it checks for tables of configs instead (edited)
Avatar
Rogue Leader 11/30/2018 5:23 PM
well currently, using the api from scratch, you can get the config data any way you want.
5:24 PM
there's no built in json file parsing or db connecting
5:24 PM
all of that has to be added in
5:24 PM
so technically you could implement any db and config storage that you want
5:25 PM
Basically you can make that for individual plugins (edited)
Avatar
Yes we do so, but on MySql
Avatar
Rogue Leader 11/30/2018 5:25 PM
Most of the examples ive seen use a json parser and a sqlite db but sqlite has too many limitations
5:26 PM
My main plugin is struggling because it uses sqlite and more than one process writing to it breaks it
Avatar
Yes, that's why everyone should focus more on MySQL instead.
5:27 PM
i mean Sqlite is good when it comes to small sized servers.
5:27 PM
it's simple and it does what it's suppose to do.
Avatar
Yes because of this i wrote own Clusterchat to MySQL and then migrate the other plugins to MySQL
Avatar
But when it comes to much traffic it can't handle it.
Avatar
is there no way to check if another process is writing to the db and then appropriately decide to write or not based on that ?
Avatar
Rogue Leader 11/30/2018 5:28 PM
you can catch the error and potentially cache the query for later
5:28 PM
but if your plugin critically depends on the db data then you will run into issues will stale data
Avatar
You did @Toma ? Care to share it on the Api site?
Avatar
Rogue Leader 11/30/2018 5:29 PM
there are a few examples with mysql in them on michidus and Ownproxs githubs (edited)
Avatar
Yes i have learn enough from this examples to do the mysql stuff, but if i would share it, i must build it more standard way, because to much stuff tailored to our cluster
Avatar
i will take a look on the ARK Cross Server Chat plugin and see if can update it
Avatar
Rogue Leader 11/30/2018 5:33 PM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
And i didn't want to piss of ownprox who has a clusterchat already on api site
Avatar
Rogue Leader 11/30/2018 5:33 PM
permissions can use mysql (edited)
Avatar
Yes permissions is a good starting point
Avatar
permissions has a horrible wrapper
5:34 PM
for mysql sadly
5:35 PM
its all i could, the best wrapper lol
Avatar
Rogue Leader 11/30/2018 5:35 PM
Do you have an example of a good wrapper?
Avatar
you have to write a header for selects i think
5:35 PM
haha
5:35 PM
that was the best i could find
5:35 PM
well if it works it works!
Avatar
you'd have to direct communicate with mysql lib / write your own wrapper
5:35 PM
if you want a better one sadly
5:36 PM
or find a better one than i did
Avatar
Rogue Leader 11/30/2018 5:36 PM
What about MySQL Connector?
5:36 PM
It's examples look pretty easy and straightfoward
Avatar
that's what i meant by the mysql lib
5:36 PM
but sucks without a wrapper
5:37 PM
looks quite basic to me
Avatar
thats why i used a wrapper
5:37 PM
that supported c++ 11
5:38 PM
but yeah using the lib should be easier
5:38 PM
atleast then you get direct select query's
5:39 PM
other than that ugly arse wrapper i found you dont write select query's
5:39 PM
lol
5:39 PM
you have to write a class for the select
5:39 PM
its weird
Avatar
there there
Avatar
i guess the best reason we use sql lite is because its more portable
Avatar
i understand that
Avatar
no server setup required but saying that mysql is better
Avatar
i think its a good way to use the connector, because the wrapper in Permission has errors in current VS2017 Build
Avatar
you can fix those errors btw its a simple fix
Avatar
Not much errors but, yeas
Avatar
but it ruins prepared statements apparently
Avatar
Rogue Leader 11/30/2018 5:45 PM
LOL
Avatar
jep i did fix it :)
Avatar
but the rest works haha
Avatar
Rogue Leader 11/30/2018 5:45 PM
That's some dedication to be using prepared statements with plugins 😛
Avatar
they dont
5:45 PM
haha
Avatar
But i wished to not used these wrapper :D
Avatar
its why permissions still works using it
Avatar
Rogue Leader 11/30/2018 5:45 PM
I guess if you wrote it specifically for your cluster then maybe
Avatar
yeah its horrible
5:46 PM
worst mysql wrapper ever
Avatar
i have began to port my own plugins to connector, but not complete yet
Avatar
could'nt find a better one sadly
5:46 PM
yeah its better for sure to just use mysql lib directly (edited)
Avatar
yep much better, and i'm familar with sql, so mysql isn't to bad
Avatar
yeah its pretty much the same just a few differences in query syntax
5:49 PM
i actually found a place selling
5:49 PM
Intel Core i9-7900X (max. 20x 4,3 GHz)
Avatar
Rogue Leader 11/30/2018 5:49 PM
yea, sql is fairly universal across databases
5:49 PM
Intel Core i7-8086K (max. 12x 5,0 Ghz)
5:49 PM
and
5:49 PM
Intel Core-i9 7920X (max. 24x 4,3 Ghz)
Avatar
it's not that bad, once you make a class, requests look pretty good
Avatar
yeah its just making the class
5:49 PM
that sucks, it is a good wrapper
5:50 PM
but requires a lot of work to do selects
5:50 PM
well copy and paste / edit you gotta write the db structure in a class for the select i think
Avatar
Yes but if you handle much tables it is a pain
Avatar
i found a place renting out these i9's
5:51 PM
from below 120 euro a month
Avatar
i think
5:53 PM
thats the wrapper i used lol
5:53 PM
just from a different link
5:53 PM
and not the github page
5:54 PM
nah its not
5:54 PM
mysql++ mirror. Contribute to rpetrich/mysqlpp development by creating an account on GitHub.
5:54 PM
looks messy though
5:54 PM
and very unorganised
Avatar
Rogue Leader 11/30/2018 5:54 PM
That hasn't been touched in 4 years, i was looking at it
Avatar
is that ryan petrich ?
5:55 PM
woah it is
Avatar
A C++ wrapper for mysql meant to be used in combination with sqlpp11. - rbock/sqlpp11-connector-mysql
5:55 PM
this is the wrapper what is used in permissions (edited)
Avatar
Rogue Leader 11/30/2018 5:56 PM
I don't see prepared statement like abilities in this one, or whatever you would call replacing ?'s
Avatar
few more examples here
5:57 PM
A type safe SQL template library for C++. Contribute to rbock/sqlpp11 development by creating an account on GitHub.
5:57 PM
but doesnt show off prepared statements
5:57 PM
but the wrapper defiantly has support for it
5:58 PM
its horrible to compile though
5:58 PM
you need to use cmake
Avatar
Rogue Leader 11/30/2018 5:58 PM
why do programmers make everything so complicated 😛
5:58 PM
All these C era devs overcomplicating their code
6:00 PM
I wonder how hard it would be to implement the arkapi lib with c#
Avatar
very
6:00 PM
would have to write c++ hooks
6:01 PM
that calls a custom made interface class
6:01 PM
that invokes c# methods
Avatar
adding basic functions might not be that hard, but probably not worth it
Avatar
meaning function / hooks would have to be pre made c++ side and referenced from a c# class
Avatar
i don't think it's worth to do this in C#
Avatar
Rogue Leader 11/30/2018 6:02 PM
There are tools that can use the api source code to generate a wrapper
Avatar
its not worth it at all because youd have to port the headers too
6:02 PM
and c# is a slower language
6:03 PM
but i did start doing it its just a lof of effort
6:03 PM
i like michidu's chaiscript he started
6:03 PM
it seemed to have more support / easier to implement
6:04 PM
not for me personally but for people who dont know c++
6:04 PM
but not sure if he plans on adding it as plugin
Avatar
ChaiScript is much easier but it would still be very limited and the binary size was becoming huge
6:07 PM
however, the modern c++ is close to c# in terms of simplicity 😃
Avatar
yeah they defiantly made a lot of stuff easier to achieve
6:10 PM
how much do you all think i can over clock a i9
6:11 PM
before burning out my host's motherboard
6:11 PM
lol
6:11 PM
4.2?
6:11 PM
it can go to 5.8 apparently but it wont have water cooling so don't want to risk that high
Avatar
i mean the i7 8700k can go up to 5.2 or something
6:12 PM
so the i9 would hit 6.0 i'm pretty sure
Avatar
why do you want to oc is my question LOL
Avatar
the one im getting has 10 cores
6:13 PM
faster clock speed
Avatar
gotta get a water cooler for my i7 8700k
6:13 PM
fucker is running pretty hot
Avatar
8700k runs so hot 😛
Avatar
thats why
Avatar
yeah but why, like if you're going to risk burning your stuff up quicker, why do it unless you NEEEEEd to oh well
Avatar
im renting it
Avatar
doesnt bother me if i burn it out
6:13 PM
or not
Avatar
turn that bitch up then
6:14 PM
😄
Avatar
still waiting on it to arrive
6:14 PM
can't wait
Avatar
doubt you can burn the cpu out that easily 😄
Avatar
Intel Core i9-7900X (max. 20x 4,3 GHz)
6:14 PM
Ständig wechselndes Sortiment an Dedicated Rootserver Sonderangeboten zu extrem günstigen Preisen bei active-servers, wahlweise mit Linux oder Windows.
6:14 PM
im a ovh customer
Avatar
imgonnaspawnarkwithchildprocessinnode
Avatar
running my servers on my i5 4460 not only was i gaming on that cpu before i put it in my server build
Avatar
but thought id give it ago
Avatar
but i have some shitty psu attached
Avatar
checkout that site i linked
Avatar
my cpu fan failed to spin for some reason (edited)
Avatar
have some amazing deals
Avatar
so i just plugged it into sys fan and maxed out its speed 🤷
Avatar
Intel Core i7-8086K (max. 12x 5,0 Ghz)
6:15 PM
they offer that
6:15 PM
but i wanted more cores
Avatar
isnt less cores + higher ghz better ?
Avatar
6 servers on 1 dedi you see
Avatar
do what i did, get a t1 drop and turn your garage into a smokehouse
Avatar
not when you run 6 servers
6:16 PM
on 1 dedi
Avatar
If you want as many servers on one host you need more cores ofc 😛
Avatar
can't do that my internet already recieves 2x dc a day
6:16 PM
haha
6:17 PM
i would love to host my own hardware
Avatar
ya that's why you need a t1 drop, it will run you alot but hey
Avatar
its like 10k
6:17 PM
+ here
Avatar
yikes wtf
Avatar
to get the road dug up
6:17 PM
and get a fiber line put in
Avatar
oh yeah i live in the heart of ATL so
6:17 PM
... sorry
Avatar
otherwise im stuck with 50 mbps download
Avatar
Atlanta
Avatar
and 12 mbps upload
Avatar
haha
Avatar
lol i host with 50mb up/down
Avatar
damn that not much Ownprox 😛
Avatar
12 mbps could host me 400 players
Avatar
i host with 1000/1000 😛
Avatar
but at least my internet is stable it never drops
Avatar
lucky
6:19 PM
i have always just paid a monthly fee to a datacenter
Avatar
@Foppa do you demark fiber then eth or full fiber LAN as well
Avatar
nah man before this i had satelite
Avatar
and thinking about colocation
Avatar
it had less than 1 mb down
Avatar
i have tried to talk with the ISP to get more dedicated fiber from them, but they only that for companies 😦
6:19 PM
i have fiber end to end
Avatar
why would you need more bandwidth ?
Avatar
@Noita
Avatar
i mean 1000/1000 is good but yeah end user 1k is...
Avatar
@Foppa living the dream
6:20 PM
lol
Avatar
yeah haha
Avatar
Sweden in general have quite high quality fiber
Avatar
well @WETBATMAN it's mroe so that like, consumer net =/= business drops
6:20 PM
business generally means if the world is getting bombed, still won't go down otherwise they will bend over for you
6:20 PM
where as with consumer, "Who cares that your netflix lagged for .3 seconds"
Avatar
no i was asking why would you need more than 1k for arks ervers
6:21 PM
😄
Avatar
no i have to much
6:21 PM
i could lower down my speed
Avatar
Yeah i was saying idk if he's asking for more, just the quality haha
Avatar
i actually got delayed on my dedicated server order because they dont have nvme drive's in stock and they had the cheeck to ask if i wanted ssd;s instead
6:21 PM
guess black friday did them over
Avatar
lol
Avatar
i was like hell no ill wait
Avatar
but yeah isp's are shitty people in general
Avatar
for the nvme drives thank you
Avatar
colors
Avatar
called them to assign me a static ip and the tech support dude told me only he could open the ports
Avatar
haha yeah, that's shitty
Avatar
not only did he spend 30 min opening all of my ports he did it incorrectly 🤦
Avatar
hahah
Avatar
yeah as you might have guessed i can open the ports myself
Avatar
you had to call to get ports open..?
6:23 PM
Ok good lOL
6:23 PM
cause some isps have been like that before....
Avatar
the tech support dude was thinking so
Avatar
@WETBATMAN where are you from?
Avatar
How do i unload a plugin again?
Avatar
i guess thats why i like datacenters no port forwarding required
Avatar
he also proceeded to tell me that with the static ip my open ports would only work on lan 😄
Avatar
cheat plugins.unload pluginname
Avatar
@WETBATMAN my heart please
Avatar
i'm from Georgia
Avatar
no more
Avatar
and cheat plugins.load pluginname
6:24 PM
to load one
Avatar
oh and to add insult to injury he even assigned the ip wrong leaving me without internet for 2 hours
Avatar
i never really understood why internet charges you for a static ip
6:25 PM
when a dynamic one is like free antiddos
6:25 PM
lol
Avatar
casue we're running out of ipv4's
Avatar
they have to have multiple people on 1 ip
Avatar
that and capital
Avatar
the regular user does not care
Avatar
and that's a lie pretty much now since NAT exists
Avatar
i mean they could just super but
Avatar
but if everyone had a static ip we would not have enough ip addresses to cover everyone...
Avatar
ah yeah i had a nat host b4
6:26 PM
was cheap as hell
Avatar
well ofc that and more money 🤑
Avatar
they could, and usually just super
Avatar
good though
6:26 PM
only had 20 ports on ipv4
Avatar
ehh i hope the world moves to ipv6 faster
Avatar
i dont
Avatar
i have 5 IP Adresses to my Fiber converter 😛
Avatar
can you imagine remembering
6:26 PM
your dedi;s ip address
6:27 PM
if its ipv6 (edited)
6:27 PM
rip
Avatar
i mean for remote connection away from home haha
Avatar
hahaha 😦
Avatar
most of my labs in college forced ipv6
6:27 PM
LOL
Avatar
you could just make it a website address
Avatar
atleast someones using it
Avatar
dopeark.com:27015
6:28 PM
something like that
Avatar
i swear they offer like 50 free ipv6
6:28 PM
with dedi's
6:28 PM
now a days
6:28 PM
just to encourage you to use them
Avatar
why would you need that much unless you're scraping combos or something 😄
Avatar
our first class went over so much ipv4 shit, every class after that for that course was ipv6 induced
6:28 PM
my brain when
Avatar
idk i guess they have too many ipv6's
Avatar
i used to know the amount by heart
6:29 PM
then i started coding because no one hires network engineers anymore
6:29 PM
fucking sdn's
Avatar
I think every IP-TV in sweden now days use IPv6
Avatar
i dont think all countrys support ipv6 yet either
Avatar
france is the leading country in ipv6 support i think
Avatar
America is like "Hmm maybe thinkingLol "
6:30 PM
nah, it's China
6:30 PM
they've been on ipv6 since ipv6
Avatar
well thats good atleast
6:30 PM
otherwise it would take us 6 hours to get a ip
Avatar
i guess thats why we had dial up
6:31 PM
hahahaa
6:31 PM
china was using ipv4
6:31 PM
just kidding
Avatar
yeah china has been v6 for a looonnnggg while. You won't find a v4 that isn't translated/stupified for compatibility reasons (edited)
6:32 PM
none of that halfbreed shit either. Pretty sure it's v6 native no v4 hybrid like most of the ones you'll find everywhere else (edited)
Avatar
pretty cool i just still have how long v6 is
6:33 PM
prefer v4
Avatar
i think it was 46 sextillion or something
Avatar
https://www.vyncke.org/ipv6status/compare.php?metric=p&countries=se Sweden have almost all population with ipv6 😛
Statistics about IPv6 deployment in different countries for several countries.
6:33 PM
wtf
6:33 PM
didn't know that
Avatar
damn
Avatar
Oh shit, i was wrong 😮
6:35 PM
sweden op, moving (edited)
Avatar
when i finally get my i9 ill yet you all know if the provider is any good
6:35 PM
after a month
6:35 PM
as their's only 2 places renting them out
6:35 PM
as far as i can find 2 German company's (edited)
6:36 PM
they offer this too: AMD Epyc 7401P (max. 48x 2,8 Ghz)
6:36 PM
pefect for anyone opening a ark server hosting company (edited)
Avatar
i still run some ark servers with 4790k CPU. Tried run a very heavy server on a 8700k didn't notice any big differences tho 😦
Avatar
how many servers per dedi?
Avatar
oh really
6:37 PM
that is awesome
Avatar
i used to have 4x 4790's
Avatar
i plan on getting an i7 4709k myself
Avatar
That's cause 4790k is disgustingly overpowered
Avatar
how how much ram do you have ?
Avatar
for each 1 of my servers
Avatar
4790k is nice
6:37 PM
32gb
Avatar
soyoustart?
Avatar
no (edited)
6:38 PM
i host all my server home
Avatar
oh yeah i forgot
Avatar
I need to buy a new mobo for my 4790k so i can start hosting on it
Avatar
you have 1000/1000
Avatar
cause atm it's doing nothing lol
Avatar
4790k Can be easy clocked to 4.5ghz and even more if you have good one
Avatar
a 100 euros a month
Avatar
worth a i9 (edited)
Avatar
i ran mine at 4.8 for like... 2 years, mostly uptime since i was playing bdo during that time
6:39 PM
kept my room nice and toasty
Avatar
nice
Avatar
gpu died before the processor did
6:39 PM
lol
Avatar
i wounder how much i can clock my 8700 to
6:39 PM
Avatar
only reason i have to upgrade is to have support for more memory.
Avatar
dont really need to haha
Avatar
i am a hardcore intel boy but i wanted to try(and didn't want to spend LOL) the new amd processors
6:40 PM
idk what to think but i can tell they ain't intel LOL
Avatar
i dislike ryzen
6:40 PM
i tried it with windows server
Avatar
Oh yeah nope
Avatar
seemed to have compatibility issues
Avatar
in that case nope
Avatar
damn i have 32gb as well
Avatar
kernal power failure
Avatar
Intel is stable as fuck.
Avatar
winserve requires intel thanks
Avatar
hmm that is very nice i was afraid my machine would be too weak with the 4790k
Avatar
oh on my ark host i have 64 gb ram
Avatar
and AMD goes even hotter if i'm not confusing it with something else.
Avatar
nah dude, run that shit down the street
Avatar
my personal pc has 16gb
Avatar
4790k is a beast, trust me
Avatar
Epyc's
6:41 PM
are looking sexy
6:41 PM
imagine if they got higher clock
Avatar
Yeah have 3 dedicated servers with 4790k
Avatar
AMD officially unveils new EPYC™ model i.e. 7601 server processor which comes with 32 cores, 64 threads, and eight DDR4-2666 memory channels with a memory bandwidth of 341 GB/s. It also features great performance on high-performance computing tasks, DBMS and Analytics. Lear...
6:42 PM
and you can dual socket these
Avatar
can you imagine 64 cores and 128 threads
6:42 PM
6:43 PM
then you look at my servers
Avatar
128 CORES 256 THREADS
Avatar
and its not even peak
6:43 PM
hahah
Avatar
wait does ark server even multicore?
6:43 PM
not very well
Avatar
impressed
Avatar
though
6:43 PM
not surprised then
Avatar
networking seems single
Avatar
they should fix that
6:43 PM
yikes wtf
6:43 PM
LOL
Avatar
only when it hits full on the first core i think
6:43 PM
so the true answer is no
6:43 PM
they are not parallel programming, they are load balancing
Avatar
my server keeper i made apply's cpu affinity
6:44 PM
automatically
Avatar
not really the load on my servers is equal
Avatar
across cores that is
Avatar
like i set my process's
6:44 PM
to run
Avatar
on specific cores
6:44 PM
so the other servers can't effect each other
Avatar
yeah done that as well
6:44 PM
ark runs much better with specified cores
Avatar
yeah really helps
Avatar
no shared resources == no conflicts
Avatar
eggactly
Avatar
no need for ecc to kick in lol
Avatar
hmmm wondering if i should do that aswell
6:45 PM
yes
6:45 PM
you should
Avatar
@WETBATMAN you should
Avatar
but my cpu atm is only a 4 core so 🤷
Avatar
how many servers?
Avatar
set 2 core each
Avatar
two for each!!
Avatar
you will be able to handle more players
Avatar
inc runs better with 2 each
Avatar
with less lagg
6:45 PM
instead of 4 shared
Avatar
hmm let me do that
Avatar
you can do that without restart
Avatar
so just set 2 random cores per server process ?
Avatar
^ hackers
6:46 PM
god dammit
Avatar
2 different cores
6:46 PM
per process
6:46 PM
threads*
Avatar
yeah but does it keep the settings after restarting ?
Avatar
are you using ASM?
Avatar
yes i am
Avatar
i added that feature to my server keeper
Avatar
then i can be saved there
6:46 PM
for every time it's starts
Avatar
@OwnProx does your serverkeeper use IPC or the api itself? 🤔
Avatar
but for currently running servers you do it under taskmanager
Avatar
found it (edited)
Avatar
it watch's the process but also use's query port
Avatar
very nice
Avatar
and if a query does not have info returned
6:47 PM
in 4 mins
6:47 PM
it acts as if it's crashed
6:47 PM
and kills the process
Avatar
i need that.
Avatar
for those msg box popups
Avatar
yeah i was thinking of trying that, does the ark exe normal stdio?
Avatar
tried to fix that with my alarm system
Avatar
i just use c# and launched a process and watched it
6:48 PM
i dont use stdio or know if it supports it
Avatar
and then i save the pid
6:48 PM
in registery
6:48 PM
of each server
6:48 PM
so i can load that at my keeper startup
Avatar
do i keep all cores enabled ?
Avatar
and locate the already running process's
Avatar
in ark settings ?
Avatar
so i can close and open my server keeper
6:49 PM
and leave my servers open
6:49 PM
haha
6:49 PM
it detects them
Avatar
yeah cause like, ASM is cool but i kinda want to make my own because i'm an asshole and need things to fill my freetime
Avatar
and doesnt use like 10 copys
6:49 PM
of ark server files (edited)
6:49 PM
just 1 copy
6:49 PM
that's pretty legit wtf
Avatar
yeah i was just going to spawn them as children
Avatar
yeah AltSaveDirectory
6:50 PM
is offered
6:50 PM
as a arg
Avatar
i have been wondering if that save performance as well..
Avatar
i have different save timers
6:50 PM
one server at 20 mins
6:50 PM
other
6:50 PM
22
Avatar
makes sense
6:50 PM
26
6:50 PM
ect
Avatar
yeah but i mean if you win performance out of doing that. (edited)
Avatar
also i could use my other nvme drive
6:51 PM
you can set path
6:51 PM
so i could split my save folder on 2 drives
Avatar
well theoretically you do win performance because the save will always try to max out the current drive to save as quickly as possible
Avatar
im interested in intel optane
6:52 PM
wounder how how much effect it will do on save process
6:52 PM
its like a cache
Avatar
i have tested with two evo 970 nvme in a raid-0. quite disappointed of the result.
Avatar
with fast memory access to ram
6:52 PM
ah sad
6:52 PM
apparently it gives like 30%
6:52 PM
perf increase
Avatar
not even that
6:52 PM
like 5 or 10
Avatar
can show the benchmark
Avatar
can't win at everything intel
6:53 PM
feelsbad
Avatar
it was Samsung 😉
Avatar
what read did you get on raid 0
6:53 PM
like 5k?
Avatar
yo peeps with the core affinity being set do i still have to use --useallcores ?
Avatar
i was hoping for 5k
Avatar
nice
6:53 PM
i get 3k
6:53 PM
on my non raid m.2
6:53 PM
Avatar
wow the server ping already seems lower
6:54 PM
might be placebo though haha
Avatar
Here i did a softraid
Avatar
not bad at all
6:55 PM
did you try this with ark?
Avatar
what are you using for softraid ? (edited)
Avatar
windows built-in
6:55 PM
here is with hardware-raid
Avatar
for your server ?
6:55 PM
6:55 PM
there
6:56 PM
i test it with my own pc first
Avatar
im curious on what its like for save lagg
6:56 PM
haha
Avatar
nothing ? 😄
Avatar
i get like 1-2 seconds (edited)
6:56 PM
but id prefer none
6:56 PM
haha
Avatar
wait do motherboards for 4790k's even support nvme's ?
6:56 PM
unless pci converter (edited)
Avatar
my own pc has better stuff
Avatar
but you'll loose speed
Avatar
yeah my own gaming rig has better stuff too but wondering what i should use for the server
6:57 PM
right now i have a kingston ssd
Avatar
im using m.2 drives
Avatar
i would say samsungs evo ssd's are the best (edited)
Avatar
from ovh
Avatar
yeah but like if i were to get a second ssd is it worth it to soft raid them ?
Avatar
Dedicated servers delivered in 120s with no setup fees. SSD disks, 256 IPs with no monthly fee, anti-DDoS and private vRack network.
6:58 PM
is my spec's
6:58 PM
currently
Avatar
or just get a bigger capacity ssd for plain storage
Avatar
Yes it does!
6:58 PM
but if your server crash
6:58 PM
you fail both disks
Avatar
depends on what raid
6:58 PM
you apply
Avatar
raid 0 ofc 😄
Avatar
and then yeah
Avatar
well a raid0 is always a risk
Avatar
1 ssds goes rip
6:59 PM
always do auto backups
Avatar
both die
Avatar
it's better to do a hardware raid0 tbh
Avatar
yeah i always back my saves up to my hdd
Avatar
if you need to move to another server you don't need to reinstall everything
Avatar
wait can it stripe the data on the fly with a hardware raid 0 ?
6:59 PM
that's not possible
Avatar
yeah so it will still be needed to reformat both disks
Avatar
exactly
Avatar
fuck that 😄
7:00 PM
the performance improvement wont be that much imo to consider re installing everything
7:01 PM
+ one drive dies date gets fucked
Avatar
i have 2 servers with 4ssds with raid0 for 2 years now 🙏 🙏 🙏 🙏 🙏
Avatar
just dont get power surges
7:01 PM
lost 2 ssd's
7:01 PM
in under 6 months
7:01 PM
due to them
7:01 PM
now i have surge protectors
Avatar
dunno about surges but i have outages at my house sometimes
Avatar
get surge protectors
7:02 PM
you could be risking your ssd's
Avatar
outages
Avatar
everytime that happends
7:02 PM
does your lights flicker?
Avatar
when the power gets cut to the whole neghbourhood
Avatar
before the power goes ?
Avatar
no but sometimes they shut the power down for maintenance and stuff
Avatar
i have stable electricity i hope 😄
Avatar
surge protector was only like 10 euros
Avatar
was about to get a UPS but nah
Avatar
yeah that works too
Avatar
mine is pretty stable too its just when its super windy or rainy they shut the power down just in case 😄 (edited)
Avatar
they have built in surge protectors in ups's
7:03 PM
had one before but battery life sucks
7:03 PM
they last like 10 mins
Avatar
it does and they costs like hell
Avatar
yeah i spent 120 on one
7:04 PM
was not very good
Avatar
yeah i dont justify buying one
Avatar
but it was powering my home pc
7:04 PM
a dedicated server is 4x less watts
Avatar
+ my router is not in the same room as my server so if the internet goes out safe shutdown wont happen anyway 😄
Avatar
just buy a surge protected extension lead if your worried
Avatar
Here we go again 😄
Avatar
its what i did and been safe since
Avatar
me ?
7:05 PM
lol if i was worried i would not have a shitty 5 year old psu that can barely handle my fans in my server
Avatar
heat can effect performance too
Avatar
(yes i know it can kill the disks if it finally dies)
7:06 PM
this cpu is so cool though
7:06 PM
like for real
Avatar
makes cpu cycle slower (edited)
Avatar
i booted my pc without my cpu fan and it started
7:06 PM
that is legit how cold this cpu runs
Avatar
i troubles with keeping the heat down on my 8700k :/
Avatar
you actually did that
7:07 PM
hahahaha
Avatar
need to run my fans on max all the time
Avatar
i have a water cooling on my 8700
Avatar
if i didnt boot the bios first i would probably not have noticed it was unplugged in the first place
Avatar
think i need to replace the cooling paste
7:07 PM
i have water cooling too
Avatar
i bought a paste pad
7:07 PM
they seem more effective
7:07 PM
than apply thermal paste manually
Avatar
oh never heard of it
Avatar
buying a thermal pad
7:07 PM
its like a paste precut
7:08 PM
and u just pop it in place
Avatar
arctic silver ftw !!! (edited)
Avatar
no way!!
Avatar
nah its all about thermal pads now
7:08 PM
soo easy
7:08 PM
no mess
Avatar
Noctua NT-H1
7:08 PM
is the best
Avatar
@OwnProx i need to get that
7:08 PM
few examples
7:09 PM
yeah its what i got on my water cooling
7:09 PM
works well
Avatar
i wish ark took advantage of installed gpu's
Avatar
have my gtx 550 just laying in there 😄
Avatar
here is my pc idle... at 50 you mean for rendering and stuff?
Avatar
Heads up. ARK Update 1.3Gb
Avatar
no the 8700
7:10 PM
gets hot
7:10 PM
even idling
7:10 PM
well i have my fans on silent
7:10 PM
if i turn them up i can get it down to like 30 c
Avatar
1.3 gb
7:10 PM
fuck
Avatar
i usally could put on my on silent
7:11 PM
now i just can't
Avatar
my server ssd is bout to fill up 😄
Avatar
oh shit yours aint on silent
7:11 PM
and at 50c
7:11 PM
damn
Avatar
no look at the speed
Avatar
aaaaaaaaa
Avatar
hahahahah aw 😄
Avatar
haha
7:11 PM
7:11 PM
gutted dude
Avatar
its 800 mb
Avatar
only my pump
Avatar
did you lie 🤔
Avatar
is pumping none of my fans are even spinning
Avatar
i lied
Avatar
liar 😦
Avatar
sorry 😦
7:12 PM
i need to fix my cpu
7:12 PM
with new thermal paste
Avatar
what water cooling you got ?
7:12 PM
i got that corsair i50 or something
7:13 PM
the cheap one with 1 fan / radiator
Avatar
1 149 kr. Exceptionell värmeavledning för överklockning av processorer. En 280mm radiator med dubbla SP140L PWM-fläktar erbjuder exceptionell värmeavledning som du behöver för överklockning av processorerHydro Series H110i är en extremt allt-i-ett CPU vattenkylning f...
Avatar
oh boi you got the big gun
Avatar
you have 2 fans
Avatar
With new fans
Avatar
and still yours is that hot
Avatar
that are suppose to be even better
Avatar
oh yeah my fans dieing
7:13 PM
i can hear it
Avatar
which they where...
Avatar
i already regreased it
7:13 PM
the bearings
Avatar
i torture my fans by setting them so low they barely spin
Avatar
yeah the original fans started to sound bad. like quite instantly so i changed them
Avatar
sometimes my fan falls off
7:14 PM
its bearings
7:14 PM
lol
Avatar
hahahaha
Avatar
at least you didint boot your system without the cpu fan 😄
Avatar
thats what i have
7:14 PM
well yeah thats scary batman
Avatar
its just plain weird
Avatar
i wouldnt want to fry 250 quid cpu
Avatar
Basically the same, i just have the big brother of that
Avatar
haha
Avatar
how can it boot without cpu fan
7:15 PM
how is it able to run so cool ?
7:15 PM
did it break or something 😄
7:15 PM
it takes about seconds for it to overheat without cooling
Avatar
never chips run hotter than older ones (edited)
7:15 PM
so you might of just been lucky batman
Avatar
yeah overclock that shit! you have rly good one
Avatar
dude it was literally sitting in the bios at 44 Celsius
Avatar
thats fuck all
7:16 PM
thats normal idle heat
Avatar
yes thats my point
7:16 PM
without the cpu fan
Avatar
70-90 is like under a heavy load
7:16 PM
yeah thats strange
7:16 PM
i guess (edited)
Avatar
here is the server i'm running with the same CPU
Avatar
soo much cooler
7:17 PM
haha
Avatar
that things chunky
Avatar
hahaha yeah
7:17 PM
hate it.
7:18 PM
but it does a good damn job
Avatar
yeah
7:18 PM
almost as good as water cooling it seems
Avatar
yeah two 140 fans
Avatar
i remember when i got a 140
7:19 PM
instead of a 120
7:19 PM
for the back of my pc
7:19 PM
i just bodged it their for like 5 months
7:19 PM
and left the side off
7:19 PM
casue it dint fit anymore lol
Avatar
yeah some memory can't be used with this cooler
Avatar
do you all think the i7 4790k would be able to handle 4 extremely modded servers ?
Avatar
yes but it will start to show lagg
7:20 PM
when you start getting a lot of players
7:20 PM
20-30 per server
Avatar
No i have runned a super modded server with 100x rates
7:20 PM
on a 8700k
Avatar
yeah i'm running similar
Avatar
id say 70-100 players youd notice lagg
Avatar
with SkiesOfNasca the server rates are maxed out but the player frames are like 20-30 (edited)
Avatar
depends on rates though
Avatar
need to find a good deal on 1
Avatar
my servers are 4x rates
Avatar
as they're not manufactured anymore
Avatar
and get wiped like every 4-6 months
Avatar
i wipe mine every month
Avatar
then it should be totaly fine
7:22 PM
no worries at all.
Avatar
i actually went 14 months
7:22 PM
hosting save data
Avatar
it can start lagging when you have over 100k structures and 3000 dinos on the server
7:22 PM
but i think that's just ark in a nutschell
Avatar
well yea
7:22 PM
actually i had someone just make a small cage
7:22 PM
lock penguins inside
7:22 PM
and start breeding
7:23 PM
and the breeding timers are significantly faster on my server
7:23 PM
so the cage went on for 2-3 days
7:23 PM
and eventually it lagged the server to hell
Avatar
well ark try to handle it the best they can
Avatar
like we're talking official server level of lag
Avatar
they dont do npc updates unless a player iss near
Avatar
255 ping all the time
7:24 PM
no but the thing is it does not show on the cpu at all
Avatar
so wildlife doesnt get updates unless a player is near
7:24 PM
now you can imagine 100 ppl across the map
7:24 PM
and now imagine how many dinos need updates
Avatar
like the cpu was still running under 50% so i didn't suspect anything until a player reported that to me
Avatar
movement updates ect
Avatar
Here is my high rated server with 100x and primal fear and SkiesOfNasca
7:24 PM
with 4790k
Avatar
1.6 percent
Avatar
Clocked at 4.2Ghz
Avatar
wow
7:25 PM
just released a update
Avatar
anything sexi?
Avatar
my servers take up 30-35 % when there are a decent amount of players online (edited)
7:25 PM
idk i can see it here
7:25 PM
my server keeper updated all my servers
7:25 PM
i was wondering why my player count dropped haha (edited)
7:26 PM
and noticed the update
Avatar
Corrupt Dinos now deal more damage to Tek Shields
7:26 PM
just what we need
7:28 PM
Connection Reduced disconnects
7:28 PM
best release notes ever
7:29 PM
damn they must really want to sell this cpu
7:29 PM
had the deal going on from like September 😄
7:29 PM
u can get the 8700k
7:29 PM
for that price
7:29 PM
cheaper infact
7:29 PM
go for the 8700k instead
Avatar
i would have to swap everything in my system
Avatar
ah gutted
Avatar
ye considering i just purchased ram 😄
Avatar
well i can sell you one and i upgrade to 8700k 😄
7:30 PM
300$
Avatar
its sad you can't dual socket
Avatar
i7's (edited)
Avatar
i mean if its in good condition and stuff i'd consider it 😄
Avatar
would be sick having 2x 4790's
7:31 PM
or 6970's
7:31 PM
I don't ship stuff, to lazy
7:31 PM
😄
Avatar
eh
Avatar
i want to try the Thread Ripper
7:31 PM
tbh
Avatar
do you know how much time shipping takes to my area ?
7:32 PM
it's at least a 3 week wait
Avatar
but i like that Intel has diched their hyperthreading
7:32 PM
oh that's crap
Avatar
because almost nothing ships directly in here so i have to ship it to the usa first and then ship it here
Avatar
well i think the thread ripper would support dual socket
Avatar
meanwhile here it's sold-out like instantly on release
Avatar
well if you want dual sockets
7:33 PM
you need to check the other chipsets
Avatar
AMD unveils the first 32 core processor ever which features 12nm architecture and based on X399 platform to become world's most powerful desktop processor.
7:33 PM

of CPU Cores

32

of Threads

64 Base Clock 3GHz Max Boost Clock 4.2GHz
Avatar
i mean this cpu overclocked would do good too
Avatar
the i7 4790k
Avatar
that cpu
7:34 PM
thread ripper is getting nice
Avatar
it was always nice but they're lacking optimiation
Avatar
nah amd is not there yet
Avatar
thats the problem with intel and amd
7:35 PM
always in a race
7:35 PM
to release the newest technology before fully tested / optimized
Avatar
yeah
7:35 PM
that is the race with anything tbh
Avatar
like the i9's
7:35 PM
were dodgy
7:35 PM
when they first came out
7:36 PM
compatibility issues with motherboards they were suppose to be compatible with
Avatar
remember when intel fucked up and gave the wrong firmware to manufacturers ?
Avatar
pretty sure they patched it in firmware updates
Avatar
and people were able to overclock non k cpus 😄
Avatar
That's so freaking annoying.
Avatar
nice did not hear about it pretty mad though
Avatar
that they have a locked version of the same cpu
Avatar
i wonder how my i9 host will be haha
Avatar
well its not like they're the same build quality
Avatar
they are not?
Avatar
non k variants have lower dye quality so they overclock lower
7:38 PM
but yeah they're just locked versions of the same chip
Avatar
they did the same with my rx 480
7:39 PM
a lot were released as 4gb edition
7:39 PM
but could be unlocked to 8gb
7:39 PM
by a few modifications
Avatar
wut
7:39 PM
so you literally could download more ram 😄
Avatar
yeah they released one with 4gb
7:40 PM
and sold one with 8gb
7:40 PM
turns out both were the same card
7:40 PM
Consumers have reported success flashing VBIOS from sold 4GB retail samples, resulting in 8GB cards. Let's talk about why AMD's shipping of “locked” cards makes sense, risks, and how to perform the procedure. -
7:40 PM
this is the same situation like they do
7:40 PM
with some cpu's
7:40 PM
just add limits
7:41 PM
lol
Avatar
I'm going to host ark on a quantum computer
7:46 PM
fuck it
Avatar
I am kind of needing a little help with C++ vectors this time. Trying to make a score plugin for our server. But since I am no c++ expert, maybe one of you can help me to achieve this. struct TribeScore { uint64 PlayerSteamID; uint64 PlayerTribeID; int Score; TribeScore(uint64 PlayerSteamID, uint64 PlayerTribeID, int Score) : PlayerSteamID(PlayerSteamID), PlayerTribeID(PlayerTribeID), Score(Score) {} }; typedef std::vector<TribeScore> TribeScoreA; TribeScoreA TribeScoreData; I have this which loads up from a file at first. I want to get which player has the highest score of a certain tribe. Kind of like: void GetTribeBestScorer(uint64 tribeID) Do correct me if anything above is not how it is usually done.
Avatar
you would get better performance if you use std::unordered_map
7:15 AM
struct TribeScore { TribeScore(uint64 PlayerSteamID, int Score) : PlayerSteamID(PlayerSteamID), Score(Score) { } uint64 PlayerSteamID; int Score; }; std::unordered_map<uint64, std::vector<TribeScore>> TribeScoreData; uint64 GetTribeBestScorer(uint64 tribeID) { auto& tribe_scores = TribeScoreData[tribeID]; const auto result = std::max_element(tribe_scores.begin(), tribe_scores.end(), [](const TribeScore& a, const TribeScore& b) { return a.Score < b.Score; }); return result != tribe_scores.end() ? result->PlayerSteamID : 0; } (edited)
7:18 AM
tribe id should be of type unsigned though
Avatar
Great, thanx
9:54 AM
Also, I want your opinion on something. DB driven Plugin. How would you keep your db in sync with a world save? For example, the world saves. But after some time before the next save it crashed. So when you restart and put it back online, the game will load from the last save but the db will be a little forward in time. What are your ideas to have this tacked? (edited)
Avatar
Anyone here that can help me with a server crash issue? https://gyazo.com/1b740a0df41c8907de5ec013c28a309f (edited)
Avatar
Looks like you need to save db only when world is being saved, can hook save function
10:34 AM
@Remi probably caused by some mod which does something with crafting
Avatar
@Michidu Like when loading - load all the db data to memory and for every save hook, write them back to db or like wise ?
11:02 AM
Or maybe for every save hook, copy the db to the saved folder... and during load, detect it and load from there
Avatar
It should work too. Or you can use transactions.
Avatar
Which do you think is more safe and better?
Avatar
Rogue Leader 12/1/2018 2:22 PM
I keep all my data in structures and only write to the db on world saves
2:22 PM
And load it all on server boot
2:22 PM
However edits to my db don't take effect if the server is running
Avatar
looks like a good way. My idea was bad.
2:41 PM
but maybe you can also just backup DB on world save and load backuped version on server start up
Avatar
you all know of a good way to sync banned players across servers ?
Avatar
with a centralized db
Avatar
yeah but how do you share it between servers
Avatar
yeah i thought about that after i said it
7:34 PM
LOL
Avatar
also is there a way to get a dino's id
8:40 PM
trying to get arkbot to identify annunaki/Primal Fear baby dinos but i have no idea which format they use for babies
Avatar
just _child after path?
8:52 PM
and to sync bans use Syncthing
8:53 PM
@WETBATMAN
Avatar
ye annunaki had a different one
8:53 PM
they used _baby
8:53 PM
haha
8:54 PM
https://syncthing.net/ what does this do ?
Avatar
...syncthings? 😄
Avatar
just copy the banlist accross multiple servers ?
Avatar
for example, yes (edited)
Avatar
or ?
Avatar
anything you want 😃
Avatar
so its a file linking tool basically ?
Avatar
Basically you setup folder to sync to other places
8:55 PM
No
8:55 PM
it copies files when changes are being made
Avatar
i assume it can do this with single files ?
8:56 PM
and on the same machine ?
Avatar
you need to setup filters.
8:56 PM
Well the main purpose with syncthing is to sync folders
8:57 PM
so if you only want one file you need to setup a filter.
8:57 PM
Though. I don't know if it's possible on the same machine
Avatar
hmmm
8:58 PM
maybe microsoft synctoy
8:58 PM
although i have no idea if that can even do filters
8:58 PM
or sync a file
Avatar
there is several options out there
Avatar
yeah just looking for one that syncs across one machine
Avatar
GSH | MrOwlSky 12/2/2018 9:29 PM
If you use ASM just use a single banlist
Avatar
am i retarded or does it only support sharing from a url ?
Avatar
The ARK: Survival Evolved dedicated server has a wide variety of configuration options that control its behavior and adjust many aspects of the game. These are options that can only be set at server startup. Most options can be specified on the command line when launching the...
Avatar
yeah but then i would have to host my own txt banlist no ?
Avatar
i guess 😛
Avatar
GSH | MrOwlSky 12/3/2018 11:57 PM
Yeah would have to setup ur own url and use the same url for all asm paths
Avatar
Hey! I have a question, I'm trying to buy a PC for my servers. Would you recommend me a i7 8700k or a 9700k?
Avatar
9700k if you have the money
7:06 PM
imao 8700k isn't that impressive.
7:10 PM
Atleast when it comes to ark
Avatar
@Foppa what "cheap" motherboard do you recommend me for 9700k?
Avatar
you can stay with z370 series. There is small differences between z370 and z390
8:10 PM
I use this one: ASUS PRIME Z370-P II
8:10 PM
It's stable and have everything you need.
Avatar
Awesome, thanks!
Avatar
Trying to achieve the following, only steam id all I have. Is there anyway to get the position of that player, while not online? Also, anyway to get the AController of such a player (while not online)?
6:42 PM
good question
6:43 PM
spontaneously, no
Avatar
@Foppa are you still using the dll?
3:05 AM
i ran it for 8 hours on a test server saving each 4 seconds
3:05 AM
it failed to save 5 times out of like 1000
3:06 AM
and caused no corruption of any sort
3:06 AM
seems to be working fine
3:06 AM
how about for you?
3:07 AM
3:07 AM
anyways it'll be a plugin soon
3:07 AM
i managed to catch a null reference if one was thrown in SaveWorld
3:08 AM
using seh, that's why i can run SaveWorld on another thread
3:08 AM
if anyone wants to try it before Michidu approves it: https://github.com/ownprox/ArkServerApi/tree/master/Async%20SaveWorld
Plugins for Michidu Ark Server API: https://github.com/Michidu/ARK-Server-API/ - ownprox/ArkServerApi
Avatar
I had 0 issues so far!
Avatar
thats amazing
3:59 AM
and very weird too
3:59 AM
but also good
4:00 AM
i got about 5 failed saves
4:00 AM
in 1000 saves
4:00 AM
they dint corrupt or anything
4:00 AM
and the next save worked
4:00 AM
just i was saving every 2-4 seconds
4:00 AM
so i ran 8 hours of insane saving in a populated area of dino's dying
4:01 AM
it does work a treat though you don't notice server lagg during saves now
Avatar
Indeed!
4:06 AM
i will install this on all my servers, Amazing job! 😄
4:08 AM
I don't think someone will ever have a fail. Mostly ppl save between 15 and 30 min i think
Avatar
even if one save does fail it will try again
4:21 AM
at next save timer
4:21 AM
i managed to catch any exception caused
Avatar
maybe add a if fail retry?
Avatar
ill think about it later
4:21 AM
lets see how often it fails first
4:21 AM
if its like barely ever
4:22 AM
theres no point i guess
4:22 AM
but yeah certainly can rerun the save thread
4:22 AM
if a exception was caught
Avatar
just for the insurance! ^^
Avatar
well i just dont want to cause a loop
4:22 AM
of threads retrying to save
4:22 AM
haha
Avatar
hehe true
Avatar
so i guess ill have to give it like 2-3 retry's
4:23 AM
simple int counter
Avatar
If fail, wait 5 seconds, retry (edited)
Avatar
let me know how often you get fails
4:23 AM
then ill decide weather to do that or not
4:24 AM
maybe you wont get any
4:24 AM
i ran it for 8 hours it did like 1000 saves
4:24 AM
and i was saving each 4 seconds
4:24 AM
and only had 5 fails
Avatar
Not a single error so far.
Avatar
i was spam saving haha
Avatar
though, i have pretty fast disk as well
Avatar
in a popular dino area where dinos were dying
4:25 AM
im using m.2
Avatar
4x Raided ssd's
Avatar
raid 0?
Avatar
what speed you getting ?
Avatar
2000 ish
Avatar
like 2500 read
4:26 AM
ah
4:26 AM
can't run benchmarks now tho 😛
Avatar
i guess its quite good with small files
Avatar
compared to my m.2
4:26 AM
it might actually win
4:26 AM
in small file transfer
4:26 AM
your 4x raid may
Avatar
well it's like a load share between 4
4:27 AM
so i think.... it's better
Avatar
well say u had 4 bytes
4:27 AM
it would save 1 byte
4:27 AM
to each hd
4:27 AM
and repeat
4:27 AM
so your data is split into 4 parts
4:27 AM
thats why if 1 drive fails the rest are useless and need a wipe
Avatar
i got a dedi at home
4:28 AM
bought it recently
4:28 AM
put 2 ssd's in it
4:28 AM
sadly the hot plate
4:28 AM
is limited to 2.5 gbps (edited)
4:28 AM
so im like getting 0.7 speed of 1 ssd
4:28 AM
from 2x ssd in raid 0
4:28 AM
lol
4:29 AM
im waiting on a pcie card and a m.2 to show up
4:29 AM
and ill just whack 4x 15k sas drives in the caddy bay's
4:29 AM
2.5"
Avatar
and use those as save backups
4:30 AM
just incase my m.2 ever dies which would be unlikely
4:30 AM
they are better than ssd in life
4:30 AM
For sale is this high spec HP Proliant DL360 G7 1U Server. The server has passed all HP diagnostics. 48 GB DDR3 RAM (12 x 4GB MODULES). The server will be supplied with a power cable. NO OPTICAL DRIVE INSTALLED. | eBay!
4:30 AM
^^ i grabbed this for a pve cluster
4:31 AM
clock is low but supports 2x x5690's which are 3.57 ghz base (edited)
Avatar
that's decent
Avatar
and really really cheap
4:31 AM
lol
4:31 AM
4:31 AM
thats how my m.2 performs
4:31 AM
i wonder how 2x m.2 in raid 0 would be
4:32 AM
omg
4:32 AM
there
4:32 AM
i have it
4:32 AM
it's useless
Avatar
thats 2x m.2?
Avatar
Quite disappointed tbh
4:33 AM
yes
4:33 AM
brand new
Avatar
but are they the pro samsung ?
4:33 AM
because that one is good
4:33 AM
no
4:33 AM
i got something like taht
4:33 AM
but not that
4:33 AM
i paid 250
4:33 AM
for mine
Avatar
that's the same i think
Avatar
207.49 x 1 - Samsung 960 PRO Polaris 512GB M.2 2280 PCI-e 3.0 x4 NVMe Solid State Drive Sub-Total: 207.49 Shipping: 7.25 VAT: 42.95 Total: 257.69
4:34 AM
i recon you could easily get
4:35 AM
4k read and 3.5k write
4:35 AM
with 2 of these
4:35 AM
nice
4:35 AM
thats just 1
4:35 AM
no raid
4:35 AM
took that test from my own pc
4:36 AM
ah weirdly
4:36 AM
i got the 960
Avatar
This is the exactly the one i got
4:36 AM
Samsung 970 EVO Series MZ-V7E500BW 500GB Solid State-disk (SSD) - visar egenskaper. Det finns även priser från 43 butiker, 4 omdömen och 1 recension. Jämför Solid State-diskar (SSD) sida vid sida.
Avatar
Samsung 960 PRO Polaris 512GB M.2 2280 PCI-e 3.0 x4 NVMe
4:36 AM
yeah yours should be better (edited)
4:36 AM
you have the 970
4:36 AM
so why is x2 of them bad?
4:36 AM
is it your motherboard ?
Avatar
must be
4:37 AM
ASUS ROG Z370 ATX gaming motherboard with advanced cooling, Aura Sync, SupremeFX, dual M.2, Intel LAN and USB 3.1 for 8th Gen Coffee Lake.
Avatar
£116.67 x 1 - B Grade Asus ROG Strix Z370-H Gaming Intel Z370 (Socket 1151) DDR4 ATX
Avatar
this is my motherboard
4:37 AM
lol
4:37 AM
its almost the same as mine
Avatar
thats weird
4:38 AM
we basically have the same m.2 and motherboard
4:38 AM
lol
4:38 AM
just different versions
4:38 AM
lol
4:38 AM
thats sad i thought 2 m.2s would be better
4:38 AM
atleast i know not to rush into getting a 2nd one
Avatar
i have tried raided them differently.
4:39 AM
both by bios
4:39 AM
and in windows
Avatar
i guess there is no hardware raid (edited)
4:39 AM
for m.2's yet
Avatar
There is
4:39 AM
they use the same as regular SSD's
Avatar
i mean a actual pcie card
Avatar
same controller atleast
Avatar
or something
4:39 AM
ah
4:39 AM
isnt that soft raid?
4:40 AM
though
4:40 AM
that's hardware raid
Avatar
cause i know i have hardware raid in my dedi
4:40 AM
but i thought if i was to do raid on my pc i may need to either use soft raid or buy hardware
4:41 AM
maybe
4:41 AM
it's cause my controller is overloaded
4:41 AM
hahahah
4:41 AM
i have 3 raids
4:41 AM
1 SSD Raid = 2st Samsung Evo 850 250gb 2 Regular Disk Raid = 2 shit disks for large storage 3 M2 Raid = 2st Samsung Evo 970 500gb (edited)
4:41 AM
haha
4:43 AM
Time to get some sleep, GN!
Avatar
yeah perhaps have a good night
4:52 AM
or maybe its limited to a certain speed per port (edited)
4:52 AM
like my dedicated server's sas hot plate lol
Avatar
what would be the best way to have a domain name instead of server ip
Avatar
you can't
10:31 AM
ark does not resolve dns names
10:32 AM
unless they added it within the last 6 months
10:32 AM
i tried it a while back with a no-ip
10:32 AM
ark can't get the ip from it
10:32 AM
direct connection with the ip was working but dns was not
Avatar
that is pretty sad
Avatar
extremely for people without static ip's
Avatar
considering my isp can just switch my outbound ip at any time 😄
Avatar
wanna know the worse part
10:33 AM
each time your ip does change
10:33 AM
it can take up to 24 hours for your server to show up
10:33 AM
in the list afterwards
Avatar
AWESOME
10:34 AM
eh might as well try it anyway
Avatar
also if people have it favorited
Avatar
since i'm renting a godaddy domain
Avatar
i think it loses that too
Avatar
well yeah
Avatar
yeah just create a new a name and point it at your ip
10:34 AM
in the dns section
Avatar
yup
10:34 AM
gonna set up a subdomain
Avatar
or do that in cloudflare
10:34 AM
if you pointed name servers their already
Avatar
is cloudflare a better option ?
Avatar
well i use it to protect my site but it wont protect your server
10:35 AM
if anyone does a ping test
10:35 AM
on your sub domain it will return your ip
Avatar
hmm might as well try it with godaddy first
10:35 AM
to see if it works
Avatar
exacly
Avatar
alright gonna do that later
10:36 AM
thx
Avatar
if u start ark up
11:00 AM
with the argument
11:00 AM
+connect ip:port
11:00 AM
directly start the exe with that arg
11:00 AM
it will join to your server
11:01 AM
just make a bat file
Avatar
well yea but the thing is i want to make it so players still have my server in their favorites incase it resets
Avatar
ArkApi Creator Tool V1.2 Overview: this tool allows you to quickly generate hooks for in game server functions saving you a lot of time of having to lookup the argument's / structure's / class's manually. Features: On the fly c++ hook generation by selecting a function Auto...
12:22 PM
1.2 released
12:22 PM
fixed search bug now it will generate hooks properly
Avatar
wait a sec
12:48 PM
i already have a domain pointing to my server machine since i host my website from it
12:49 PM
so in theory if i use dopeark.com:27015 it will find it ?
1:32 PM
that's how it works
Avatar
hmm
1:41 PM
cant get it to work 😄
1:42 PM
made a subdomain @ server.dopeark.com
1:42 PM
and cannot find it by server.dopeark.com:27015
Avatar
you need to wait
1:42 PM
so the dns records are updated
1:42 PM
can take up to 24h
1:43 PM
test it after some hours
Avatar
alright
1:53 PM
will try after some time (edited)
Avatar
@OwnProx I don't have static ip and when it changes it takes 1 minute to show up in the list
Avatar
damn that must be a pain to move the whole playerbase though
6:03 PM
best way to host a txt file for a shared banlist ?
Avatar
also side question, which orp mod do you all use because i’ve used 2 so far and both seem to be pretty broken
Avatar
i dont actually know if ark refresh's the banlist url btw (edited)
6:39 PM
it might just read it 1 time at startup
Avatar
so the best solution still is to manually go over every server and send the ban command ? (edited)
Avatar
or make your own banlist / httprequest (edited)
6:40 PM
and find where ark stores banned players
6:40 PM
and compare
6:40 PM
and add any that are missing
Avatar
yeah but i was asking that how would i host a txt file 😃
Avatar
or maybe you can find the function thats used to get the data from the existing one
6:41 PM
on a webserver
6:41 PM
but problem is ingame ban
6:41 PM
would not write to the text file
6:41 PM
so youd manually have to add steam ids to it
Avatar
yeah it would have to manually updated
6:42 PM
hmm at least any file linking tool
6:42 PM
that works on the same machine ?
6:42 PM
i only know of microsoft synctoy
Avatar
you want to sync the banlist?
Avatar
ye
Avatar
cause that wont work either
6:42 PM
its only loaded at startup
6:43 PM
and then saved every time a new ban is added
6:43 PM
i think
6:43 PM
not 100% sure but thats how id do it
6:43 PM
you can try ban yourself
6:43 PM
copy the banlist to another server
6:43 PM
and see if your banned there too
6:43 PM
without restarting the server
6:44 PM
while its running then you know if it will work
Avatar
yeah not near my gaming pc till tomorrow noon haha
6:44 PM
btw @OwnProx you use any orp mod ?
Avatar
Not related to ArkServerAPI, but thought I'd ask. What RCON tool/software do you guys use ?
Avatar
Arkon
6:47 PM
ark server manager has a great rcon tool too but i wish it could be used without ark server manager itself 😃
6:54 PM
is quite good
Avatar
GSH | MrOwlSky 12/8/2018 6:58 PM
We been using the ASM rcon over on our side works good for us
Avatar
Thanx. I use ARKon as well. But I get now and then disconnects. I like the ASM RCON, but sadly no way to run it without ASM itself.
Avatar
Chuck Norris 12/8/2018 7:09 PM
hi
Avatar
yeah i noticed Arkon loses connection too sometimes
Avatar
GSH | MrOwlSky 12/8/2018 7:35 PM
Heard the battlemetrics RCON tool is amazing
Avatar
I want to send a notification to all online players meeting a certain criteria every 15mins. I see the use of ArkApi::GetCommands().AddOnTimerCallback() in ArkShop plugin. Any other methods ?
Avatar
not worth paying 10$ imo
Avatar
Hey all o/
8:19 PM
@Rogue Leader would it be possible for you to update the source code on github for the killfeed? It's an old version on there vs release. We wanted to do more work on it if that's ok
Avatar
Rogue Leader 12/8/2018 8:26 PM
I'm not the author of that code.
Avatar
@OwnProx & @Michidu are the developers you want for that @SirShaw
Avatar
Oh shit I tagged the wrong person lol
9:55 PM
I'm sorry
9:55 PM
@OwnProx
Avatar
Don't know what happened, I typed ownprox haha. Again, I'm sorry
Avatar
Anyone getting this spam in your Discord?
3:16 AM
Avatar
no even in my spam channel i dont have that crap
Avatar
@WETBATMAN LoadBannedList()
9:07 AM
in
9:07 AM
AShooterGameMode
9:07 AM
9:07 AM
just found it scrolling through this lol
9:08 AM
maybe when you call LoadBannedList() maybe it loads it from the url to
9:08 AM
no idea
9:10 AM
ah i looked the function up
9:10 AM
looked at the source code it only loads the file
9:41 AM
well i found it
9:42 AM
9:43 AM
and they do support refreshing
9:43 AM
if your ark server is official haha
Avatar
GSH | MrOwlSky 12/9/2018 1:50 PM
@Kamio We also were effected by that same troll.
2:24 PM
use something like this bot to automute users that spam
2:24 PM
i have links to other discords disabled with that bot on my discord server
2:25 PM
so if someone shares another discord link the bot hides it and mutes the user
Avatar
mee6 can does the same thing i guess and btw hello there👋
Avatar
mee6 has such a feature too ?
2:42 PM
hi btw
Avatar
Hey guys. Need a quick help. In the APrimalStructure_TakeDamage, how do you define if the structure is a player's own structure or it belongs to a tribes? As in whether a tribes structure or not. (edited)
Avatar
Rogue Leader 12/10/2018 5:35 PM
All structures have a tribe ID
5:35 PM
even solo non tribed player structures
Avatar
How to differentiate, that is where I'm having issues.
Avatar
i believe player id is a little shorter than the tribe one but need to check it
5:48 PM
but in Structure case, you can do it: int ownerPlayerId = _this->OwningPlayerIDField(); if (ownerPlayerId == 0) // Owner is tribe (edited)
Avatar
I already have that part. But that logic goes wrong in the following scenario.
  • A player joins server
  • Places a structure
  • Then makes a tribe
Now, when I debug that structure has a ownerPlayerIDField, but still is also a tribe structure. DEBUG: Hook_APrimalStructure_TakeDamage - damageReceiverPlayerID: 564558341
Avatar
hm, maybe you can use GetSteamIDForPlayerID, so if it return 0 then it's a tribe
Avatar
Yeah, that is a logic I can use it. Going to test it...
Avatar
Rogue Leader 12/10/2018 6:24 PM
I have a more logic oriented question for any experienced dev. I have a total of 10 booleans that can be set in a config file, and in my code I need to be able to compare those 10 config booleans to values retrieved in a hook. The problem I'm running into is that I can't think of an easy way to make the logic simple, vs compariong every single possible combination of config boolean states. e.g: Some of my config values: bool RequiresNotFollowing; bool RequiresPassiveFlee; bool RequiresIgnoreWhistle; bool RequiresNeutered; My inner hook variables: int following; bool passiveflee; bool ignorewhistle; bool neutered; (edited)
Avatar
but you need to do something different for every combination? Like if (RequiresNotFollowing && following) Do1(); (edited)
Avatar
Rogue Leader 12/10/2018 6:56 PM
I want the same result in the hook if the config options that are true are also true in the hook.
6:56 PM
Or at least their conditions met
Avatar
like that ? :) if ((RequiresNotFollowing && following) && (RequiresPassiveFlee && passiveflee) && (...)) Do1();
7:05 PM
ah, i got you, it won't work
Avatar
Rogue Leader 12/10/2018 7:08 PM
So like, it's hard to explain. If something in the config is set to true, I need to check its corresponding hook variable too, if all variables in the hook match what is true in the config, then do something. If a config variable is false, then ignore its corresponding hook variable value (edited)
7:09 PM
But any combination of the config variables can be set to true or false.
Avatar
bool config[10]; bool hook[10]; for (int i = 0; i < 10; ++i) { if (config[i] && !hook[i]) return false; }
Avatar
Rogue Leader 12/10/2018 7:13 PM
Damn! That just might work!
7:13 PM
Thank You! I'll test it out here soon.
Avatar
Rogue Leader 12/10/2018 9:45 PM
Another Question!: Is there a more efficient way of getting structures within a radius of a dino than looping through every structure on the map? //check for enemy structures nearby TArray<AActor*> AllStructures; UGameplayStatics::GetAllActorsOfClass(reinterpret_cast<UObject*> (ArkApi::GetApiUtils().GetWorld()), APrimalStructure::GetPrivateStaticClass(), &AllStructures); for (AActor* StructureActor : AllStructures) { if (StructureActor) { if (StructureActor->TargetingTeamField() > 0 && _this->TargetingTeamField() != StructureActor->TargetingTeamField()) { APrimalStructure* Structure = static_cast<APrimalStructure*>(StructureActor); if (FVector::Distance(_this->RootComponentField()->RelativeLocationField(), Structure->RootComponentField()->RelativeLocationField()) <= DinoPassiveProtection::MinimumEnemyStructureDistance) { isNotNearEnemyStructures = false; break; } else { isNotNearEnemyStructures = true; } } } }
Avatar
How about using the method used in ArkHomes. Functions GetNearbyStructuresCount, IsEnemyStructureNear and IsEnemyStructureNear uses such a method.
10:40 PM
@Rogue Leader
Avatar
Rogue Leader 12/10/2018 10:50 PM
Thanks! I'll look at that!
10:51 PM
@Michidu How's this look?//build config array bool configConditions[] = { DinoPassiveProtection::RequiresNotFollowing, DinoPassiveProtection::RequiresPassiveFlee, DinoPassiveProtection::RequiresIgnoreWhistle, DinoPassiveProtection::RequiresNeutered, DinoPassiveProtection::RequiresNoRider, DinoPassiveProtection::RequiresNoInventory, DinoPassiveProtection::RequiresNoNearbyEnemyStructures, true }; //build hook vars array bool hookActuals[] = { isNotFollowing, (isPassiveAggressive && isPassiveFlee), isIgnoringWhistles, isNeutered, hasNoRider, hasNoInventory, isNotNearEnemyStructures, isHealthAboveMin }; for (int i = 0; i < 8 ; ++i) { if (configConditions[i] && !hookActuals[i]) return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
Avatar
ye, it looks great
Avatar
personally id use bitwise but its more complex to setup
Avatar
Rogue Leader 12/11/2018 11:53 PM
Any idea why this evaluates to true even when literally standing on an enemy structure? DinoPassiveProtection::MinimumEnemyStructureDistance is set to 10.0//check for enemy structures nearby TArray<AActor*> AllStructures; UGameplayStatics::GetAllActorsOfClass(reinterpret_cast<UObject*> (ArkApi::GetApiUtils().GetWorld()), APrimalStructure::GetPrivateStaticClass(), &AllStructures); for (AActor* StructureActor : AllStructures) { if (StructureActor) { if (StructureActor->TargetingTeamField() > 0 && _this->TargetingTeamField() != StructureActor->TargetingTeamField()) { APrimalStructure* Structure = static_cast<APrimalStructure*>(StructureActor); if (FVector::Distance(_this->RootComponentField()->RelativeLocationField(), Structure->RootComponentField()->RelativeLocationField()) <= DinoPassiveProtection::MinimumEnemyStructureDistance) { isNotNearEnemyStructures = false; break; } else { isNotNearEnemyStructures = true; } } } } (edited)
Avatar
Rogue Leader 12/12/2018 12:12 AM
Nevermind, it appears a foundation away is actually about 300 units of whatever that is. So 10 is always under it lmao (edited)
12:13 AM
So i just multiplied whatever is in the config by 300 so its about x amount of foundations away
Avatar
What is the best hook to use for when a player has joined the server as a total new player? And I want to send a notification to that player just after he spawns but with a small delay (so as to make sure he doesn't miss it). What method do you best suggest ?
Avatar
Rogue Leader 12/12/2018 5:09 AM
There's a handlenewplayer function. I think you can an example in arkshop or point rewards
5:11 AM
It doesn't particularly ONLY handle a new player, but it handles every player connecting to the server. Then you can query your db to see if they exist in it to determine if they are new.
Avatar
Rogue Leader 12/12/2018 7:26 AM
@Michidu Is it possible to add support for longer version numbers? I noticed when the version number in PluginInfo is 1.45, the api logs it as 1.5 in the console
Avatar
Anyone have got any code / suggestions to control the Gachas. They can literally give you high end stuff without much hassle.
12:37 PM
limit its crafting skill ^
Avatar
Thanx @WETBATMAN
6:12 PM
v1.4 Released Fixed structures that were not added because they had sub structures in them, Such as UWorld (edited)
Avatar
@OwnProx I'm trying to have your plugin Cross Server Chat setup on our cluster. But somehow, I'm not able to get it to work. Could you help out? 2 Servers, one is Rag and other is Extinction. Both configs have the same CrossChatKey, CrossChatMapNameInclude and CrossChatMapNameOverride is blank to use default map name. Each config RconServers has one entry of the other server RCON_IP:RCON_PORT I don't get any errors and it's not being transmitted to the other server as well.
Avatar
you running both servers kn the same machine ?
Avatar
Yeah, same machine.
Avatar
use localhost
5:06 PM
instead of putting in the real server ip just put in localhost and the rcon port
Avatar
@Rogue Leader yo you here?
Avatar
Rogue Leader 12/15/2018 8:35 PM
Yea I'm in this discord
8:35 PM
@Natsu r u there
8:35 PM
@Natsu
8:36 PM
let me pm you a question
Avatar
ty (edited)
Avatar
Rogue Leader 12/17/2018 10:19 PM
Looks like you need to convert your second argument from an FString to a std::string (edited)
Avatar
@Michidu it seems your paypal does not seems to work... i can't buy paid plugin 😉
Avatar
Deleted User 12/18/2018 3:39 PM
Hi, does anyone know which class or function I can look at to prevent c4 from being placed?
Avatar
it might be just paypal problems..
4:19 PM
@Deleted User you need structure placement hook
Avatar
@OwnProx why does your hook generator need admin permissions 😄
Avatar
Deleted User 12/18/2018 4:38 PM
@Michidu Thanks!
Avatar
it does not require me to run it as admin btw
4:53 PM
and i have uac on default options
4:53 PM
maybe right click it and properties and check if its blocked and unblock it (edited)
4:53 PM
might make it not require it
4:53 PM
i just remember when i downloaded some exe's / dlls from sites they get auto blocked in properties tab (edited)
4:54 PM
maybe its why its requiring admin
4:54 PM
i dont actually know dont have this issue
Avatar
WoolyPenguin 12/19/2018 7:28 PM
hook generator doesnt ask me for admin permission
Avatar
how does selling plugins work? i am going to quit hosting my ark server and want to sell my things 😃
Avatar
Deleted User 12/20/2018 12:28 PM
@Natsu it depend on if you want to make a private sell and support it on the forum or sell them as private plugins
12:28 PM
If it to sell multiplies copies on the forum well the best way is to secure your plugins using HWID
Avatar
one plugin req's a powershell script tough
12:29 PM
so that will be harder
Avatar
Deleted User 12/20/2018 12:30 PM
Send me a privave message with a list of your plugins i can be interest
Avatar
why a plugin would even require a powershell script?
Avatar
because ark-server api is crap
Avatar
why?
Avatar
i can list multiple reasons but i will keep it to myself i prob just release it all for free soon
Avatar
Probably not related to the API part, but just thought of asking. Ever after the last Ark update, my players are getting items with high boost quality. For example, my daily rewards plugin has min 5 and max 10 and it hardly spawns armors pieces above 500+ armor. But now even quality 5 is giving armor pieces with 600+ armor. Any reason why this maybe happening?
Avatar
Rogue Leader 12/20/2018 7:15 PM
@Natsu sharing the issues will help improve it.
7:17 PM
But you shouldn't need a PowerShell script. You could just add a command to the plugin that does whatever it does.
Avatar
@Rogue Leader its Ark-server api not arkapi :p
8:16 PM
so yes powershell script is needed
Avatar
Deleted User 12/20/2018 8:19 PM
he's using the power shell to communicate with Ark-servers website api
Avatar
Deleted User 12/20/2018 8:20 PM
Baiscly the plugins is working on the game part and the power sheel on the web part and both of them are communicating together
8:20 PM
if im not wrong
8:20 PM
xD
Avatar
ya i use a powrshell script for the communication but like i said i think il prob release it all into the public since i am done hosting
Avatar
Deleted User 12/20/2018 8:21 PM
why do you stop by the way ?
Avatar
Deleted User 12/20/2018 8:22 PM
wtf how can you get bored from ark admin problems lmao ?
8:23 PM
its like a new story every hour
Avatar
oh i dont do problems xD
8:23 PM
haha
8:23 PM
everything is automated
Avatar
Deleted User 12/20/2018 8:23 PM
Come on you dont have any drama toxic people or anything on your servers xD ?
Avatar
ofc but i have a trash talk channel for that and i mute them other wise
Avatar
Deleted User 12/20/2018 8:23 PM
how mush player average you have ?
Avatar
now? 0
8:23 PM
xD
Avatar
Deleted User 12/20/2018 8:23 PM
your record
Avatar
Deleted User 12/20/2018 8:24 PM
oh ok i see
8:24 PM
with 60 is quit calm yeah
8:25 PM
Dont give up ark is a good game and possibilites are unlimited
8:25 PM
just find your self a new goal
Avatar
na i am quite busy with work and dont need any fun in hosting anymore
8:26 PM
i dont play ark anymore at all and even if i did i never played on my server
Avatar
Deleted User 12/20/2018 8:27 PM
I see well good luck for the rest
Avatar
i can also release my mod >.>
Avatar
Deleted User 12/20/2018 8:29 PM
You have private mods ?
8:29 PM
ark UI for the shop
8:29 PM
so you dont need to use commands for all engrams and the shop
Avatar
WoolyPenguin 12/21/2018 8:46 PM
that's sweet natsu 😃
Avatar
Deleted User 12/21/2018 9:22 PM
he already leaved the discord xD
Avatar
Anyone have any tutorials or any key steps you can share, on how to accomplish the plugin sharing method. Don't know what it is called, but it is the function where you open your plugin for other plugins to use it. Like the shop plugin where you can use it on other plugins just by referring it. I'm having a little difficulty in understanding how it is done. Thanx in advance.
Avatar
WoolyPenguin 12/22/2018 3:14 PM
i think you can find an example of that in the arkshop
3:15 PM
ownprox added that to shop for his event plugin
Avatar
well setting up a tlas
6:59 PM
server was fun
6:59 PM
jk
6:59 PM
but i now have 4 regions running next to each other haha
6:59 PM
a5 - a7 and b6
Avatar
Deleted User 12/24/2018 7:47 PM
@OwnProx i managed to get a 2x2 working
7:47 PM
xD
Avatar
i used the 15x15
7:50 PM
lol
7:51 PM
i can add more servers as needed then
7:52 PM
i just dint configure all ips / servers lol
7:52 PM
just setup 4 of em
Avatar
Deleted User 12/24/2018 8:20 PM
Lol you have a 500core cpu or what
Avatar
are we gonna see atlas api ?
9:11 PM
😃
9:14 PM
merry Christmas to you all btw
Avatar
you too and everyone else
9:30 PM
no maticha i left the rest default wc ips it works fine and just shows my servers
Avatar
is atlas as much of a resource hog as ark ?
Avatar
Deleted User 12/24/2018 10:13 PM
@WETBATMAN yeah
10:13 PM
and merry christmas to everyone too
Avatar
damn no atlas for me 😕
Avatar
Deleted User 12/24/2018 11:18 PM
For the moment you dont miss anything lol
Avatar
Rogue Leader 12/25/2018 12:20 AM
We are already having 40 man battles on our little island (edited)
Avatar
Rogue Leader 12/25/2018 5:17 PM
Nice!
Avatar
GSH | MrOwlSky 12/25/2018 5:26 PM
Look at that sexy thing :P @Michidu
5:14 PM
my atlas servers are getting quite full (edited)
5:14 PM
hahaha
5:15 PM
last 3 are atlas
Avatar
tf
Avatar
i already dumped atlas headers
Avatar
man it’s quite popular (edited)
Avatar
send them to michidu
5:15 PM
to help with the new api
5:15 PM
cant wait for it
Avatar
oh so we’re gonna see atlas api ?
5:16 PM
very soon
Avatar
btw are you running atlas on the same machine ?
5:16 PM
all 3
5:16 PM
on a i7 4900
Avatar
whats the ram usage per server
5:16 PM
o rly
Avatar
2-3gb
5:16 PM
it was using 60% cpu
Avatar
damn thats nothing
Avatar
with no players
5:16 PM
now its still using the same amount
Avatar
eh 60% cpu is shit
Avatar
with players
5:17 PM
its like the players did not effect the usage
5:17 PM
each server idles at 20%
Avatar
hmm how many ark severs do you run on that machine ?
Avatar
i guess thats from all the usage
5:17 PM
i dont host any ark servers on that machine
5:17 PM
its just for atlas
Avatar
sad
Avatar
i host 3 atlas servers on a i7 4900
Avatar
i dont have a spare machine to build haha
Avatar
6 ark servers on a i7 7700k 5ghz oced
5:18 PM
6 ark pve servers on a dual xeon x5560
Avatar
ye but i’m hosting from home
Avatar
my xeon is at home
5:18 PM
the 7700 is ovh
Avatar
every time i rented a server i got bored and ditched it 😃
Avatar
and the 4900 soyoustart
5:19 PM
i got 25% off
5:19 PM
recurring discount
5:19 PM
christmas discount
5:19 PM
Rent a So you Start server to host your online games! Get high performance for popular games like Minecraft, Garry's Mod, CS:GO, Rust, and much more. Up to 64 GB RAM, SSD 480 GB
5:19 PM
just got a 32 gb
Avatar
cool
Avatar
hmm i gotta upgrade my ark rig first
Avatar
btw i meant all servers idled at 68%
5:20 PM
they were when noone was online
Avatar
oh that makes sense
Avatar
so its gone up 1-2%
5:20 PM
in 3 days
Avatar
so how is atlas
Avatar
its mainly the npcs using this much
5:20 PM
i think
Avatar
have you played it yet ?
Avatar
ofcourse
5:20 PM
its good
Avatar
GSH | MrOwlSky 12/27/2018 5:20 PM
We're doing 9 servers on ours and CPU is capped out lol
5:20 PM
For atlas
Avatar
just annoying
Avatar
man i was on vacation this week and havent had a chance to touch it
5:21 PM
i’m at the airport atm
Avatar
GSH | MrOwlSky 12/27/2018 5:21 PM
Should get it @WETBATMAN
Avatar
GSH | MrOwlSky 12/27/2018 5:21 PM
Very fun game
Avatar
i know what you mean
5:21 PM
hahaha
Avatar
GSH | MrOwlSky 12/27/2018 5:21 PM
My CPU is 100% lol
Avatar
your host 9 atlas?
Avatar
GSH | MrOwlSky 12/27/2018 5:21 PM
3x3 grid 9 servers
Avatar
you can put the server fps down
5:21 PM
you know
5:21 PM
to make them use less cpu
Avatar
GSH | MrOwlSky 12/27/2018 5:21 PM
and it runs great but the box is CPU maxed
Avatar
per server
5:21 PM
capp there fps
Avatar
GSH | MrOwlSky 12/27/2018 5:22 PM
How?
Avatar
GSH | MrOwlSky 12/27/2018 5:22 PM
[/script/onlinesubsystemutils.ipnetdriver] NetServerMaxTickRate=15 I added that
5:23 PM
Avatar
in enggine
5:23 PM
[/script/engine.renderersettings] t.maxfps=20 (edited)
5:23 PM
maybe it helps
5:23 PM
and maybe nerf some npc spawns
Avatar
GSH | MrOwlSky 12/27/2018 5:23 PM
does max fps block max fps in game for players?
Avatar
theres soo many on atlas
5:23 PM
no
5:23 PM
server side fps
Avatar
GSH | MrOwlSky 12/27/2018 5:23 PM
Gotcha yeah let me add that
5:24 PM
How do we nerf NPCs?
Avatar
i guess like ark
5:24 PM
not sure
5:24 PM
some of my servers have like
5:24 PM
200 horse's
5:24 PM
running around on the beachl
5:24 PM
lol
5:24 PM
more even
Avatar
GSH | MrOwlSky 12/27/2018 5:24 PM
goodness
Avatar
lol
Avatar
its full of npc's
Avatar
you guys ever heard of annunaki squid overspawn ?
Avatar
too many
Avatar
they spawn hundreads in one spot
Avatar
you meanat rag?
5:25 PM
mean*
5:25 PM
i had many complains
Avatar
any server with annunaki
Avatar
of squids killing people
5:25 PM
oh no
5:25 PM
i dint have mods
5:25 PM
but at one point the spawns were high
5:25 PM
for squids
5:26 PM
i had soo many complaints of ppl dieing to them
Avatar
thing is you lower squids then something else overspawns
Avatar
Deleted User 12/27/2018 6:44 PM
6:44 PM
484 player online (edited)
Avatar
GSH | MrOwlSky 12/27/2018 7:44 PM
How is ur CPU so low? @Deleted User
Avatar
Deleted User 12/27/2018 8:00 PM
i have no clue xD
Avatar
atlas
9:12 PM
doesnt seem to effect cpu with players as much as ark does
9:12 PM
where are you renting your ryzen 7?
9:12 PM
last one i rented got kernal power failures
9:12 PM
each time cpu was at 80%
9:12 PM
and crashed the os
9:12 PM
at ovh
Avatar
Deleted User 12/27/2018 9:13 PM
This one is running smooth as fuck xD
9:13 PM
even better than my i7 8700k
9:13 PM
i think im going to move all my machines to ryzen
9:14 PM
And Atlas saves are so smooth too
9:14 PM
you dont even feel them
Avatar
its from ovh?
10:16 PM
Unsere AMD Premium Server basieren auf den Neusten AMD Technologien. So stehen Ihnen die AMD Ryzen CPUs der Generation 5 und 7 sowie die AMD ThreadRipper CPUs in unseren Mietserver / Rootserver Angeboten zur Konfiguration zur Verfügung.
10:16 PM
AMD Ryzen TR 1950X CPU: 3,4 Ghz - 16 Cores / 32 Threads
10:16 PM
i want to get this
10:17 PM
can you imagine how many altas servers
10:17 PM
we can run with this
10:17 PM
lol
10:17 PM
atleast 8-16 (edited)
10:19 PM
also @Deleted User you need to upgrade that to 64 gb ram badly
10:19 PM
all those servers will easily eat away at your free ram
Avatar
Deleted User 12/27/2018 10:20 PM
i can updrade it when ever i want
10:20 PM
but im saving money xD
10:20 PM
dont need more atm
Avatar
where did u buy it?
Avatar
Deleted User 12/27/2018 10:24 PM
A gernman compagny
10:24 PM
Myloc
Avatar
ah yeah used them before
10:25 PM
sub company of srvdiscor / webtopia
Avatar
Deleted User 12/27/2018 10:25 PM
yeah
Avatar
did you pay for windows ?
10:26 PM
or use resue mode
10:26 PM
haha
Avatar
Deleted User 12/27/2018 10:26 PM
Kvm
10:26 PM
i dont pay windows xD
Avatar
i thought kvm is optional
10:26 PM
you have to pay
10:26 PM
for it
Avatar
Deleted User 12/27/2018 10:26 PM
I asked them for one for free
10:26 PM
cried a little on the phoine
10:26 PM
and thats it
Avatar
oh nice
Avatar
Deleted User 12/27/2018 10:26 PM
xD
Avatar
i think i can install windows by rescue mode
10:27 PM
anyway w/o kvm
10:27 PM
its just harder haha
Avatar
Deleted User 12/27/2018 10:27 PM
yeah there is probably a solution
Avatar
im soon to setup
10:29 PM
remote servers hahaa
10:30 PM
using a the redis db remotely
10:30 PM
should be fun
10:30 PM
i got a friend who has a dedi at his house i can use
10:30 PM
with semi decent internet
10:30 PM
so im gonna link that to my already running atlas servers
10:30 PM
hopefully it goes well
10:30 PM
using the database remotely lol
Avatar
lmao why does atlas cost 6$ for me
Avatar
Deleted User 12/27/2018 11:03 PM
@OwnProx im going to the same soon with redis i want to use linux version of redis and try to link it with my atlas server
11:03 PM
cause i need master and slave on the db
11:03 PM
to try something
Avatar
what is the real install size for atlas ?
Avatar
client or server?
Avatar
client
Avatar
@Deleted User good idea dint think of using linux to host my db
11:11 PM
like
11:11 PM
96gb
Avatar
damn bro i have to sacrifice my hashcat wordlists ;d
Avatar
Deleted User 12/28/2018 3:56 PM
Are there any ark devs here?
3:56 PM
I have a question about their game
Avatar
i wish we could get stuff added to the game for the api then haha server sided gui drawing for instance
4:47 PM
believe if they were here theyed be getting request's haha
Avatar
Deleted User 12/28/2018 5:21 PM
Me i would ask them to sell the company to a real one xD with real devs
Avatar
Rogue Leader 12/28/2018 5:44 PM
Maybe they just bought it from someone then published it
9:28 PM
people are still joining
9:28 PM
ffs
Avatar
Already converting all my plugins to work for atlas
12:18 AM
we should see a Api for both ark and atlas
Avatar
GSH | MrOwlSky 12/29/2018 1:53 AM
Looking sexy
Avatar
if anyone wants / needs it
2:15 AM
2:18 AM
2:19 AM
ill add the updating feature later am tired and yeah it says ark i ported my ark manager over hahaha need to change those strings (edited)
2:19 AM
it can boot your servers when they crash
Avatar
Right click -> Add Server
2:32 AM
to add one
Avatar
Rogue Leader 12/29/2018 2:34 AM
Has Mich released the API publicly yet?
Avatar
no, i guess today sometime (edited)
Avatar
Ty @OwnProx for sharing!
Avatar
Deleted User 12/29/2018 11:17 AM
@OwnProx i was reading it and im already tired lmao
Avatar
just a quick heads up if you're running s+ on your server remove the tek mutator as it allows you to breed dinos without a gender even if you have that .ini option disabled...
Avatar
Deleted User 12/29/2018 11:36 AM
yes there is one
11:36 AM
wait
11:38 AM
MutatorModeBlacklist : AllowBreeding
11:38 AM
@WETBATMAN
11:38 AM
on my server its working
11:38 AM
people cant breed
Avatar
if you pulse once you can switch really quick
12:03 PM
so pulse with something like gender switch and while its doing that if you're really quick you can switch to allow breeding and it will work
Avatar
@OwnProx
2:04 PM
turns out domain redirecting works!
Avatar
ahh you mean nat loopback?
6:03 PM
try that with atlas hahaa
Avatar
no its an A name redirect
6:04 PM
perfect for me since i do have a static ip but it can change
8:09 PM
seems like people are going back to ark
8:09 PM
last 3 are atlas haha
Avatar
@OwnProx Add to PM
10:06 PM
10:06 PM
here's my server monitor it will beep if your servers go down add your servers to Servers.conf
10:06 PM
edit that file with any text editor NotePad++ is a good one
10:06 PM
it uses query ports
10:07 PM
and if you press esc on the program it stores it here
10:07 PM
10:45 PM
Atlas Server Manager source code
10:46 PM
needs some more tlc though haha. (edited)
Avatar
GSH | MrOwlSky 12/30/2018 2:16 AM
Epic stuff
6:47 AM
able to rcon multiple servers at the same time 😃 defined in the text file (edited)
7:00 AM
Avatar
@OwnProx / @Michidu How about bringing RCON function to load and unload plugins to ArkServerAPI. Would be very helpful, plus could use the above RCON tool by OwnProx on our Ark clusters as well.
Avatar
Deleted User 12/30/2018 2:23 PM
it coming soon i think
Avatar
yes, added to the new version
👍 1
Avatar
Deleted User 12/30/2018 2:27 PM
Avatar
All blueprint paths for atlas
Avatar
new ver of Atlas BPS:
12:27 AM
12:27 AM
have not tested
2:27 AM
if anyones got any suggestions of notices any typo's lemme know
Avatar
hey everyone, i just want to wish you all a happy new year let this year be like no other for us and anyone else
9:24 PM
friends
9:24 PM
@everyone
Avatar
thanks you too have a good one everyone
9:52 PM
Atlas api was released
9:52 PM
btw
9:52 PM
+ source code
9:52 PM
at forum
Avatar
Deleted User 12/31/2018 10:04 PM
Happy new year to all of you
10:07 PM
There is new year for me to its just another random one lmao
Fire 1
Avatar
Hello, i'm trying to compile ArkShop to Atlas i think i have all good, I've removed the Kits from the plugin and i'm now trying to find this that i belive it is a Hook from Atlas so i came here to ask for help. https://i.imgur.com/tdyGiy4.png
11:36 PM
@deleted-role @deleted-role
Avatar
maybe post the whole piece of code that's giving you issues ?
Avatar
is that file
12.88 KB
11:40 PM
i'm new at this btw
Avatar
post to pastebin its easier to see the code that way...
Avatar
#include "AtlasShop.h" (edited)
Avatar
that was named arkshop.h
Avatar
did you change the actual name of the dependency fine ?
Avatar
yeah
11:43 PM
i've changed
11:43 PM
i changed both file name and inside the file itself
Avatar
you removed the kit side of the plugin ye ?
11:47 PM
something in there
11:47 PM
i belive that there are too many arguments
Avatar
player_controller->GiveItem(&out_items, &fblueprint, default_amount, quality, force_blueprint, false, 0);
Avatar
as it says
Avatar
well see default_amount is a kit sided check
Avatar
oh rigth
11:48 PM
so i just need to remove it ?
Avatar
well if you're not using kits
Avatar
it still has too many arguments 😦
Avatar
hmm not sure sorry haven't messed around with arkshop's source
Avatar
thanks anyways
Avatar
@Michidu or @OwnProx might be able to help you
11:51 PM
start removing arguments that are related to kits and eventually you will get there 😄
11:52 PM
is force_blueprint still underlined with red ?
Avatar
Rogue Leader 12/31/2018 11:53 PM
You'll have to look at the header file that has the original function in it and see what parameters it takes
11:54 PM
Specifically the function GiveItem() in the AShooterPlayerContoller class
11:54 PM
I think in the arkapi it was in Actors.h
Avatar
@Rogue Leader the header file from the kits ?
Avatar
no from api's public folder
Avatar
yeah but now i have two of them.. Atlas one and ARK one ?
11:57 PM
wich one i have to check ?
Avatar
well you're porting for atals so check the atlas one
11:58 PM
//bool GiveItem(FString * blueprintPath, int quantityOverride, float qualityOverride, bool bForceBlueprint) { return NativeCall<bool, FString *, int, float, bool>(this, "AShooterPlayerController.GiveItem", blueprintPath, quantityOverride, qualityOverride, bForceBlueprint); } //bool GiveItem(FString * blueprintPath, int quantityOverride, float qualityOverride, bool bForceBlueprint) { return NativeCall<bool, FString *, int, float, bool>(this, "AShooterPlayerController.GiveItem", blueprintPath, quantityOverride, qualityOverride, bForceBlueprint); }
11:58 PM
this seems to be ark's GiveItem function
Avatar
Rogue Leader 1/1/2019 12:00 AM
The ArkAPI files won't work with atlas, so you'll have to use the atlas api files if you're writing an atlas plugin
Avatar
its literally like 3-4 functions that changed
12:01 AM
porting old plugins is easy
Avatar
by what i can understand its right
Avatar
you want to be spoon feed
12:01 AM
player_controller->GiveItem(&fblueprint, default_amount, quality, force_blueprint);
12:02 AM
theres a spoon
12:02 AM
enjoy 😃
Avatar
he took out kits though so wont default_amount break it ?
Avatar
Deleted User 1/1/2019 12:03 AM
Item has also a default amount
Avatar
im sure he can fix his own arguments
12:03 AM
lol
12:03 AM
when he sees the compiler error
Avatar
Deleted User 1/1/2019 12:03 AM
if im not wrong
Avatar
fair enough
12:04 AM
dont think so as defaultAmount is the config option in kits
12:05 AM
Avatar
Deleted User 1/1/2019 12:05 AM
Oh
12:06 AM
Me ill just wait dont have enough IQ
12:06 AM
i loose more IQ each new year
Avatar
how do u know it was a kit?
12:08 AM
that i copied my example from
12:08 AM
cause it wasnt
12:08 AM
Avatar
Deleted User 1/1/2019 12:08 AM
See omg
12:08 AM
i still have enough Iq
12:08 AM
IQ
12:09 AM
Im happy didn't lost too mush this year xD
Avatar
no i said that @birotes. mentioned he stripped the kit part and i was thinking that Default_amount is just a variable name for the kit config
Avatar
yeah he is right
12:09 AM
cause i found it on Kits Header
12:10 AM
i will just share it to you guys since i don't even have a Atlas Server yet 😃 u guys can test it 😃
12:10 AM
the Kits i removed cause wasn't working
Avatar
it does work
12:10 AM
well in my port of shop atleast (edited)
12:11 AM
ported shop 2 days ago
Avatar
yeah i'm just dumb 😃 (edited)
12:11 AM
my first port and my first time at c++
Avatar
you're not dumb lol we all gotta start somwhere
Avatar
I'm on basics of C
12:11 AM
taking programming course i'm at C loops
12:11 AM
😃
Avatar
but i want you to fix it yourself (edited)
12:12 AM
to learn 😃
Avatar
i will
12:12 AM
try out with kits
12:12 AM
i will fix
Avatar
i'm no expert in this stuff either but i try to improve myself
12:12 AM
have nothing to do until there
12:12 AM
i started making this
12:12 AM
btw
Avatar
i know
12:12 AM
it was helpful
Avatar
yeah i saw @OwnProx
Avatar
also @OwnProx Check PM i need to talk with you about something else
Avatar
!bsk193Today at 23:07 i will check that
12:13 AM
i dint get a msg ?
12:13 AM
since then
Avatar
oh boy i bought a used i7 4790k
12:15 AM
hope it does well with server hosting
12:16 AM
😛
Avatar
Happy new year😍
Avatar
happy new year to you too @Foppa
Avatar
Deleted User 1/1/2019 12:23 AM
12:23 AM
im gonna take this in 2 days
12:23 AM
Home i will succed to overclock that shit to more than 5.0
Avatar
that's for a server ?
Avatar
Deleted User 1/1/2019 12:24 AM
yes
Avatar
holy shit my dude
Avatar
Deleted User 1/1/2019 12:25 AM
Im planning on buying 2 or 3 like this one this year
12:25 AM
but i start with this one to test if its enough or if i need to go on bigger
Avatar
bigger ?
Avatar
Deleted User 1/1/2019 12:26 AM
Right now im testing a 1700x and it hosting 8 atlas server
Avatar
what the fuck my dude you want a nasa supercomputer at home ?
Avatar
Deleted User 1/1/2019 12:26 AM
I have 18 server xD
Avatar
ark ?
Avatar
Deleted User 1/1/2019 12:26 AM
6 ark 12 atlas
12:27 AM
i need to reduce the money that i pay each month to rent machines
Avatar
rackservice.org has some nice deals
12:27 AM
Wholesale Internet, Kansas City's premier internet services provider.
12:27 AM
same with this site but its always sold out 😄
Avatar
Deleted User 1/1/2019 12:27 AM
i already have good deals xD
12:27 AM
i dont want to rent anymore
Avatar
yeah man hosting from home rocks
12:28 AM
except when your isp decides to randomly cut your internet connection when you're on vacation
Avatar
Deleted User 1/1/2019 12:28 AM
I have 2 x 1gigs
12:28 AM
from 2 different Isp
12:28 AM
and Unlimited 4Go
Avatar
lmao i had 40 mb and they decided to cut the internet when i was on vacation
12:29 AM
and they had the audacity to request for me to restart the router
12:29 AM
when i was on vacation
12:29 AM
...
Avatar
Deleted User 1/1/2019 12:30 AM
It been 2 years that i have my lines
12:30 AM
never got any problem
Avatar
fastest i have in my country is 100mb
Avatar
Deleted User 1/1/2019 12:31 AM
next year i will be able to take 10Gigs
12:31 AM
using my company name
12:31 AM
lmao
Avatar
well good luck with your servers man
12:32 AM
i'm fucking tired gonna get some sleep
Avatar
Deleted User 1/1/2019 12:32 AM
On the worste case i keep it for me lmap
Avatar
lel
12:33 AM
i had a 1 gigabit rented before and it downloaded ark in like 1 min
12:33 AM
imagine 10gb
12:33 AM
...
Avatar
Deleted User 1/1/2019 12:33 AM
I need 10gigs to play monecraft 0ping lmao
Avatar
or host it at your own pc
Avatar
Deleted User 1/1/2019 12:34 AM
I think 10gigs its useless
12:34 AM
But if its cheap why not
12:34 AM
I pay 24euro for 1gigs atm
Avatar
im paying like 30
12:34 AM
for 60 mbits down
12:35 AM
12 mbits up
Avatar
Deleted User 1/1/2019 12:35 AM
Symitrique line for ever
Avatar
Deleted User 1/1/2019 12:35 AM
Yeah its working good
Avatar
i had about 60 earlier
12:36 AM
overall players connected to my home network
12:36 AM
12:36 AM
then i have this running my redist server remotely
12:36 AM
at soyoustart
Avatar
Deleted User 1/1/2019 12:37 AM
I hate soyoustart
Avatar
its nice cheap dedi's
12:38 AM
setup fee's suck
12:38 AM
it was better b4 them
Avatar
Deleted User 1/1/2019 12:39 AM
I brought a new ryzen 1700x
12:39 AM
I will receiv it in 2 days lool
Avatar
nice
Avatar
Deleted User 1/1/2019 12:39 AM
Fast delevery
Avatar
free kvm?
Avatar
Deleted User 1/1/2019 12:39 AM
Not this time lmao
12:39 AM
I will use rescue mod
Avatar
ah yeah maybe a sys / ovh made gzip
12:43 AM
windows archieve (edited)
12:44 AM
will work
Avatar
@Deleted User are all dedicated servers at Webtropia 2 days delivery time ?
Avatar
Deleted User 1/1/2019 12:44 AM
No
12:44 AM
Its holidays lol
Avatar
A donation, either small or big, is very much appreciated and will go towards the development of up to date and new Windows Templates. Below are the download links including the commands to install…
12:44 AM
else you may have to use good old qemu to install the os (edited)
Avatar
okay
Avatar
but those archieved joodle gzips are nice
12:47 AM
save soo much time
Avatar
Deleted User 1/1/2019 9:31 AM
thanks for the link lmao
Avatar
@OwnProx if i change my cpu does advanced chat have to be reactivated ?
Avatar
Deleted User 1/1/2019 9:50 AM
yes i think
9:51 AM
THE CPU will probably change your HWID
Avatar
i hope its attached to the motherboard
Avatar
Deleted User 1/1/2019 12:55 PM
Its probably attacked to the CPU MOTHERBOARD and RAM
Avatar
nah i swapped ram before and it didnt change the id
1:02 PM
proper hwid's are only motherboard or motherboard + cpu
Avatar
Deleted User 1/1/2019 1:03 PM
my bad
1:03 PM
ram cant be use
1:04 PM
Avatar
what's that 😛
Avatar
Deleted User 1/1/2019 1:32 PM
Its a tool that allowed to lock dll and stuff
1:32 PM
with HWID
Avatar
wait dont you have to actually add hwid detection into your plugin ?
Avatar
Deleted User 1/1/2019 1:35 PM
You can add it in the code or use a tool that do it
1:35 PM
But it both case you will need to add a HWID generator in the plugin code
1:35 PM
so people can get it and give it to you
Avatar
what if you hook the plugin and force the hwid 🤔
Avatar
Deleted User 1/1/2019 1:43 PM
Im not a pro on does things
1:44 PM
But this tools is very secure
Avatar
it cant be
1:44 PM
you're checking hwid offline
1:44 PM
(for plugins that is)
Avatar
Deleted User 1/1/2019 1:48 PM
Here is the pro
1:48 PM
he will explain to you
1:48 PM
xD
Avatar
You would need to hook multiple functions and reverse hwid generating algorithm, so it's not that easy. However, plugins protected by DRM system like that are not allowed on the forum.
Avatar
yeah but would hooking the function that unloads the plugin if its not activated and replacing it with a function that happens when its activated work ?
Avatar
If you talk about Themida, then it adds its own checks (loader), so no, hooking unload function would do nothing because dll is not even fully loaded at that point. (edited)
Avatar
right
1:56 PM
but for example
1:56 PM
i know my hwid already
1:56 PM
and i try to hook the function detecting the hwid
1:57 PM
ah nvm had something in my mind
Avatar
there are many functions which can be used to build hwid
2:00 PM
dont think you can know your hwid, because it depends on how you generate it
Avatar
plugins print it 😄
Avatar
if you know how exactly plugin generates it, you can do something 😃
Avatar
no i was saying like i know the hwid one of my plugins generates
2:01 PM
not like i know my systems hwid 😄
2:01 PM
ofc that can vary depending on the detection algorithm
2:02 PM
so if you get your hands on the hwid generation mechanism you can inject into it (edited)
Avatar
sure you can
Avatar
yeah but can arkapi hook into other plugins ?
Avatar
they are running inside one memory space, so yeah
Avatar
is hooking plugin functions the same as ark functions ?
Avatar
not really, even if you got a pdb from plugin, you would need to modify hooking class anyway..
Avatar
so this is the hard way basically 😄
Avatar
it's not very hard if you can find a needed function
Avatar
so if the dll is decompiled to some degree it gets easy ?
Avatar
yeah
Avatar
time to learn IDA i guess...
Avatar
do you want to crack or protect something? 😄
Avatar
just dicking around 😄
Avatar
Advanced chat no dout
3:00 PM
hahaha
3:01 PM
look its already been attempted a guy failed, and i agree with Michidu its not hard to bypass i did not actually spend time preventing it
3:01 PM
but if you have no reversing knowledge, no point trying
3:02 PM
id suggest downloading examples and reverse engineering guides and learn the basics before trying to crack something you have no idea about haha
Avatar
Deleted User 1/1/2019 3:04 PM
i suggest payinbg 15 dollar easy pizy
3:04 PM
xD
Avatar
naw its not advanced chat 😄
3:32 PM
learning with actually accomplishing something is better though
3:32 PM
@OwnProx so will swapping the cpu change the hwid ?
Avatar
dont think so
3:34 PM
cause im 95% sure i authed u under hwid1
3:34 PM
it doesnt use cpu
Avatar
wait does it have to match both or just one ?
Avatar
Deleted User 1/1/2019 3:35 PM
@OwnProx check private messages
Avatar
Anyone was able to get the Permissions plugin working on Atlas ?
Avatar
Deleted User 1/2/2019 8:58 AM
any new thing ?
8:58 AM
Oh updates
Avatar
i wish ark server manager could restart servers if they crashed 😦
Avatar
Deleted User 1/2/2019 9:26 AM
he can
9:26 AM
if you know how to make the crash dialog close auto
9:27 AM
If the restart if shutdown on asm is activated
9:28 AM
it will restart the server
9:28 AM
but if the crashdialog still open asm dont detect the server as off
Avatar
yeah that's the problem 😄
Avatar
Deleted User 1/2/2019 9:41 AM
you can create a script to kill them
Avatar
yea i've heard ownprox has a script that queries the server and kills it if it does not respond
Avatar
Deleted User 1/2/2019 9:52 AM
Dunno about ownprox to be honest
9:52 AM
but he probably have even better than that xD
Avatar
i have been working on that too (edited)
1:27 PM
You can trigger a restart
1:27 PM
by a check trough rcon
1:27 PM
but yeah basically as you wrote about ownprox script
Avatar
yeah but the thing is rcon isnt a reliable source
1:30 PM
it drops connection
1:32 PM
best way to check would be to query the server
1:32 PM
like steam does
Avatar
Deleted User 1/2/2019 1:35 PM
He shared that
Avatar
Deleted User 1/2/2019 2:36 PM
@OwnProx im testing the rescue mod lol
Avatar
what are you attempting to do 😄
Avatar
Deleted User 1/2/2019 2:47 PM
Installing windows 10 on a server lmao
Avatar
lol
2:47 PM
dont forget to turn windows updates off for good
Avatar
Deleted User 1/2/2019 2:48 PM
I just want to install windows 10 cause i dont want to pay a KVM
2:48 PM
this way i will be able to overclock the cpu without access to the bios
2:48 PM
xD
Avatar
wait is that a rented server ?
Avatar
Deleted User 1/2/2019 2:54 PM
yes xD
2:54 PM
if it was at home i will install windows easy pizzy xD
Avatar
@Michidu I see that you have updated the API to API v3.0, specially targeted to Atlas. Is this now safe and stable for Ark usage ?
Avatar
yes, just voterewards won't work for now
Avatar
@OwnProx i think the teleportation in DeathMatch is broken some players receive the items but never get teleported and some win the deathmatch and get stuck in the arena
Avatar
weird because i actually added a distance check to make sure they were teled
Avatar
i have my deathmatch spawn points set to the boss arena
10:09 AM
could that mess with anything ?
Avatar
@Michidu Tried to build v3.0, but getting errors. Creating library ArkApi\Ark Server API\x64\Release\ArkApi.lib and object ArkApi\Ark Server API\x64\Release\ArkApi.exp Requests.obj : error LNK2001: unresolved external symbol __imp_curl_multi_remove_handle Requests.obj : error LNK2001: unresolved external symbol __imp_curl_multi_add_handle Requests.obj : error LNK2001: unresolved external symbol __imp_curl_global_init Requests.obj : error LNK2001: unresolved external symbol __imp_curl_multi_info_read Requests.obj : error LNK2001: unresolved external symbol __imp_curl_global_cleanup Requests.obj : error LNK2001: unresolved external symbol __imp_curl_easy_init Requests.obj : error LNK2001: unresolved external symbol __imp_curl_multi_init Requests.obj : error LNK2001: unresolved external symbol __imp_curl_easy_cleanup Requests.obj : error LNK2001: unresolved external symbol __imp_curl_easy_setopt Requests.obj : error LNK2001: unresolved external symbol __imp_curl_multi_perform ArkApi\Ark Server API\x64\Release\version.dll : fatal error LNK1120: 10 unresolved externals
Avatar
do you have libs folder too?
Avatar
Yup
Avatar
and did you choose Ark or Atlas configuration?
Avatar
Ark
11:35 AM
wait... let me try that again...
11:42 AM
Succeeded, I cloned the repo again and worked. But with a lot of warnings on libcurl.lib side. libcurl.lib(asyn-thread.obj) : warning LNK4099: PDB 'libcurl.pdb' was not found with 'libcurl.lib(asyn-thread.obj)' or at 'ArkApi\Ark Server API\x64\Ark\libcurl.pdb'; linking object as if no debug info libcurl.lib(base64.obj) : warning LNK4099: PDB 'libcurl.pdb' was not found with 'libcurl.lib(base64.obj)' or at 'ArkApi\Ark Server API\x64\Ark\libcurl.pdb'; linking object as if no debug info libcurl.lib(conncache.obj) : warning LNK4099: PDB 'libcurl.pdb' was not found with 'libcurl.lib(conncache.obj)' or at 'ArkApi\Ark Server API\x64\Ark\libcurl.pdb'; linking object as if no debug info libcurl.lib(connect.obj) : warning LNK4099: PDB 'libcurl.pdb' was not found with 'libcurl.lib(connect.obj)' or at 'ArkApi\Ark Server API\x64\Ark\libcurl.pdb'; linking object as if no debug info libcurl.lib(content_encoding.obj) : warning LNK4099: PDB 'libcurl.pdb' was not found with 'libcurl.lib(content_encoding.obj)' or at 'ArkApi\Ark Server API\x64\Ark\libcurl.pdb'; linking object as if no debug info Should these be an issue?
Avatar
Cool, thanx
Avatar
Deployed v3.0 on one of my clusters. Running smooth so far no errors. Really handy the rcon unload and load of plugins. Thanks @Michidu @OwnProx
👌 1
Avatar
is there a way to find the list of spawners a map uses from game files ?
Avatar
Deleted User 1/3/2019 9:57 PM
spawners ?
Avatar
This page holds the list of Spawn Entry Class names for the official maps (i.e.: The Island, The Center, Scorched Earth, Ragnarok, and Procedurally Generated ARKs). These values can be used in the Server Configuration to change the spawn behavior of a server using the configu...
Avatar
Deleted User 1/3/2019 10:01 PM
Oh
Avatar
anyone actually tried setting severs up behind AnyCast?
5:29 AM
would be very interesting to try
5:29 AM
i mean game servers not http
5:30 AM
i cant setup a anycast in 3 world locations and then setup a open vpn service to tunnel data to a remote server
Avatar
Whats the code / function to get the exact of the RCON command listplayers through API ? Can't seem to find any, or I'm looking with the wrong keywords. (edited)
Avatar
you want to call listplayers from api?
Avatar
damn this i74790k is a beast
5:41 PM
although i think my temps are a bit high
5:42 PM
i have the corsair h60i or whatever, its just a one fan radiator
5:42 PM
60 Celsius at 40% load
Avatar
Deleted User 1/4/2019 6:50 PM
60° at 40% ?
Avatar
ye
6:51 PM
nvm it seems to be holding that temp regardless of load
Avatar
Deleted User 1/4/2019 6:53 PM
did you try a cpu stresser ?
Avatar
no i ran the servers straight away 😄
6:54 PM
i think the pump broke or something
6:56 PM
hmm the fan is still moving warm air so the pump is working at least
Avatar
Deleted User 1/4/2019 6:57 PM
the 4790k is a beast on overclock
6:57 PM
in my eyes is one of the best intel cpu
Avatar
i haven't even overclocked it ;d
6:58 PM
how much higher did you go ?
Avatar
Deleted User 1/4/2019 7:00 PM
4.9
Avatar
damn
7:00 PM
that's almost + 1ghz
7:00 PM
nice
Avatar
Deleted User 1/4/2019 7:00 PM
Im receiving my ryzen 2700x in 4 days
7:01 PM
and i will try to overclock it to 5.2 at least
7:01 PM
if i can
Avatar
good luck 😛
Avatar
Deleted User 1/4/2019 7:02 PM
this bastard are sending me the case and the power supllay tomorrow
7:02 PM
and the rest in 4 days
7:02 PM
an empty case woaw im happy
Avatar
lol
7:03 PM
do you know how much time it takes me to ship something to Georgia ?
7:03 PM
2 weeks at least
7:03 PM
most of the time shit takes 3-4
Avatar
Deleted User 1/4/2019 7:04 PM
Bro i paid 45euro for the delivery and it was suposed to be a 24hours delivery
7:04 PM
so im upset lmao
7:04 PM
and the worste part is that its only at 165km from home
7:05 PM
so they dont need 7 years
Avatar
@Michidu I want my own listplayers version on a plugin, with extra details. I just need to know how it is getting it's data.
Avatar
try looping const auto& player_controllers = GetWorld()->PlayerControllerListField(); for (TWeakObjectPtr<APlayerController> player_controller : player_controllers) { AShooterPlayerController* shooter_pc = static_cast<AShooterPlayerController*>(player_controller.Get()); }
Avatar
Anyway to run a console / rcon command within APIs? Trying to interract with a mod which has rcon and console commands.
Avatar
player->ConsoleCommand(..)
Avatar
any "fix" for the db locked error ?
Avatar
use mysql
Avatar
for existing plugins ?
11:22 AM
i see arkshop throw that error often
Avatar
ark shop doesn't support mysql yet unfortunately atlas shop does however
Avatar
any plans for mysql for arkshop?
Avatar
actually yes
Avatar
cool, thank you!
11:31 AM
@Michidu will it cause any issues if a plugin contains no hooks ?
Avatar
what do you mean?
Avatar
code looks fine
Avatar
alright thx
11:38 AM
i cant seem to post a resource in ark server api
11:38 AM
it only shows me atlas
Avatar
Deleted User 1/5/2019 12:07 PM
Yeah me too xD
Avatar
rip 😛
Avatar
try now @WETBATMAN
Avatar
only lets me post to paid plugins
12:15 PM
and now
Avatar
yea not it works
12:15 PM
thx
Avatar
would it be possibly to query steam's api from a plugin ?
Avatar
yes, why not
Avatar
i think i have an idea on how to stop players using family shared accounts
12:34 PM
to avoid bans
Avatar
Deleted User 1/5/2019 12:35 PM
Me i use
12:35 PM
steam account lifel ess than 30 days = kick player
Avatar
yeah but look
12:36 PM
12:36 PM
steam can provide the original owners steamID
12:36 PM
so theoretically if we store banned players in a database and query steam for family shared accounts for the original owner we can stop people avoiding bans
Avatar
Deleted User 1/5/2019 12:42 PM
That why i use ban sync
12:42 PM
xD
12:42 PM
Basicly if someone with a banned steam on any of my server try to log on another it will ban him again
12:43 PM
Even people that i banned from ark if they log on my atlas server
12:43 PM
they get banned
Avatar
how do you sync up the banlist
Avatar
Deleted User 1/5/2019 12:43 PM
Battlemetric
Avatar
-_-
Avatar
Deleted User 1/5/2019 12:43 PM
You can also use a banlist web
Avatar
yeah that's what i thought
Avatar
Deleted User 1/5/2019 12:43 PM
and sync it with all servers
Avatar
what my idea is more than just bansync
Avatar
Deleted User 1/5/2019 12:44 PM
i was using a banlist on web at the begging
Avatar
you see it can trace the original owner of the family shared accounts
Avatar
Deleted User 1/5/2019 12:44 PM
but battlemetric is so usefull so now i cant remove it xD
Avatar
what did you set up the web banlist with ?
Avatar
Deleted User 1/5/2019 12:48 PM
Just a txt file on my web host
12:48 PM
and put the link on ASM
Avatar
you didnt host from the same machine ?
Avatar
Deleted User 1/5/2019 12:58 PM
if you have a webserver on your machine
12:58 PM
yes you can
Avatar
i do have a domain but just for dns redirecting
12:58 PM
so i assume i'd have to host the banlist on my machine
Avatar
Deleted User 1/5/2019 12:59 PM
On your machine or on a external host
12:59 PM
if you can acces to it using an url
12:59 PM
its good
Avatar
@Michidu player->ConsoleCommand(..) How would I accomplish this using an RCON command method. As in, I want to use a console command when I issue an rcon command in a plugin. (edited)
Avatar
you need a player to execute console command, can get a first one world->GetFirstPlayerController() and then you can call ConsoleCommand from him.
Avatar
@Michidu Got that part working, but I'm not getting an output into the result. The result is always blank for me, no matter what the command I have. auto player_controller = ArkApi::GetApiUtils().GetWorld()->GetFirstPlayerController(); player_controller->ConsoleCommand(&result, &fcommand, true);
Avatar
result doesn't seem to work, you can ignore it
11:05 AM
you might want to check if player_controller is nullptr
Avatar
Ok, thanx
Avatar
@Michidu is your VoteRewards plugin open source ?
2:24 PM
cant seem to find it on github
Avatar
no, but ownprox should be working on a new open source one
Avatar
any other examples on making an api call ?
Avatar
you mean http request?
Avatar
ye
2:26 PM
like how you request the list of voters from ark-servers.net
2:27 PM
weird, there were more examples before, lol
2:28 PM
ah here
Avatar
yes this seems more in depth
2:29 PM
thx
2:30 PM
noob question but how do i move the settings of one project to another one in visual studio
2:30 PM
so i dont have to specify all the arkapi paths
Avatar
maybe it would be better to just copy them? :) only 2 paths
2:33 PM
you can copy project files but then you would need to change project name inside of them
Avatar
yeah then its better just to start fresh 😛
2:39 PM
which hook class is used for disconnecting a player ?
Avatar
AShooterGameMode_Logout
Avatar
DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController *); (edited)
2:41 PM
?
Avatar
DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController*);
2:42 PM
yes
Avatar
what is the best db type to use if i want to share it across servers ? (edited)
Avatar
mysql
Avatar
alright
2:46 PM
autoprot uses that right ?
Avatar
autoprot?
Avatar
nvm it uses sqlite
2:47 PM
Contribute to Lkados/AutoProtSource development by creating an account on GitHub.
2:50 PM
what is the best way to return data from an api call
2:50 PM
json, vdf or xml ?
Avatar
from http request? 😃
2:53 PM
it can return the original owners steam id if the account is family shared
2:53 PM
{"response":{"lender_steamid":"0"}}
Avatar
json should be the easiest to read
Avatar
return looks like this
2:59 PM
3:00 PM
where does this request go ?
Avatar
in some function
Avatar
so say i want to disconnect a user if their steam id is in a db
3:05 PM
if i make a function which gets the id of player on connection
3:05 PM
it should go in there ?
Avatar
most likely
Avatar
AShooterGameMode_HandleNewPlayer
5:02 PM
this only works if the players is connecting for the first time ye ?
Avatar
for all players that are connecting ?
Avatar
yes
Avatar
ah cool just what i need
5:20 PM
also is there a way to make it so a stock Rcon command executes a plugin function
5:20 PM
like for example if you use BanPlayer steamid
5:20 PM
it writes that id to a db ?
Avatar
it should write id somewhere
Avatar
the default command writes the id into a banlist in the win64 folder
5:25 PM
but is there a way to get that id and write it into my plugins db aswell ?
Avatar
i guess its just a txt file, you can read it
Avatar
so the better option would be to read that file instead of getting the id from the command ?
Avatar
you can hook it too, yeah
Avatar
hook the command ?
Avatar
BanPlayer
5:31 PM
should be a function
Avatar
ahhh
5:31 PM
right
5:31 PM
so every time its executed it returns the banned id or ?
Avatar
should have as argument 😃
Avatar
void BanPlayer(FString PlayerSteamName) { NativeCall<void, FString>(this, "UShooterCheatManager.BanPlayer", PlayerSteamName); }
5:32 PM
right
5:32 PM
PlayerSteamName
5:32 PM
that should be it ye ?
5:32 PM
or is that the actual name not the id ?
Avatar
its a SteamName
5:33 PM
are you sure it uses steam id?
Avatar
i guess its steam id then
5:35 PM
they have wrong name 😃
5:36 PM
but try it
Avatar
yeah i looked through all BanPlayer function in actor.h
5:36 PM
5:36 PM
all of them have PlayerSteamName
5:38 PM
what is the difference between ServerBanPlayer and BanPlayer
Avatar
just different classes maybe
5:40 PM
ServerBanPlayer calls BanPlayer anyway
Avatar
hmm
5:42 PM
DECLARE_HOOK(AShooterGameMode_HandleNewPlayer_Implementation, bool, AShooterGameMode*, AShooterPlayerController *, UPrimalPlayerData *, AShooterCharacter *, bool);
5:42 PM
is this the correct hook for HandleNewPlayer ?
Avatar
its in shop plugin
Avatar
alright
5:46 PM
so get the steamid from BanPlayer
5:46 PM
write it to db
5:47 PM
then check the db when a player connects
5:47 PM
if family sharer's steam id is in db
5:47 PM
use AShooterGameMode_Logout ?
Avatar
better use Kick
5:49 PM
actually in your case i guess its better to read ban list file 😃
5:49 PM
and should be easier
Avatar
is a db even needed in that case ?
Avatar
since all banned id's are stored there
5:49 PM
yee
5:49 PM
cool
5:50 PM
but how do you read an external file
Avatar
just use fstream
5:50 PM
you can read any file
Avatar
hmm so if i dont even need a db
5:58 PM
which hooks do i need
5:59 PM
HandleNewPlayer And KickPlayer ?
Avatar
only HandleNewPlayer
Avatar
hmm arkshop does not have unload ?
Avatar
no 😄
Avatar
shouldn't the unload function be the same as load one ?
6:07 PM
6:07 PM
unload gives me too many arguments
6:08 PM
6:08 PM
is this fine ?
Avatar
yes
Avatar
alright no now read the banlist
6:14 PM
do i input the file with the path or ?
Avatar
can be relative path
6:24 PM
something like this ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/6/2019 6:24 PM
Hey, if you want to read the banned players you even could use ArkApi::GetApiUtils().GetShooterGameMode()->BannedMapField(); and every time you ban a player it automatically get saved 😄
Avatar
wow its that easy ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/6/2019 6:25 PM
I mean.. the function is avail hehe 😄
Avatar
ye but how would i check that to see if a certain steam id is in there
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/6/2019 6:36 PM
const auto banned = ArkApi::GetApiUtils().GetShooterGameMode()->BannedMapField(); for (const auto currentEntry : banned) { if(currentEntry.Value == FString(steamId)) { // Do something } }
Avatar
retarded question
6:39 PM
do i use currentEntry for whatever i want to check the banned id's against ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/6/2019 6:40 PM
currentEntry.Key would be PlayerName currentEntry.Value would be the SteamId
6:41 PM
It literally just iterates over the BannedMapField
Avatar
if (currentEntry.Value == FString(steamId)) { // Do something }
6:42 PM
ye but what is this then its just reading the id from that function ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/6/2019 6:42 PM
Its getting the steamId from the map and compares it with another steamid 😄
6:42 PM
I tought you wanted to check if a player is banned or not 😄
Avatar
what i want to do is to obtain the parent account's steam id if the account is family shared
6:43 PM
and then if that parent id is banned the family shared account should be kicked
6:45 PM
6:46 PM
steam has an api for this
6:46 PM
{"response":{"lender_steamid":"0"}}
6:46 PM
this is the response
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/6/2019 6:47 PM
did you already used the nlohman library to parse it? or even created a function for getting lender_steamId? (edited)
Avatar
no lol i wish i knew that much
6:47 PM
😛
Avatar
nlohmann::json Json = Response; if (int LenderSteamID; (LenderSteamID = Json["response"].value("lender_steamid", 0)) != 0) { //LenderSteamID } (edited)
6:18 AM
you might have to treat it as a string though perhaps, dependant if json will parse the "lender_steamid":"0" as a int or not cba to check (edited)
Avatar
Hey guys. I'm trying to have any tribe that has our protection applied, have double harvest or custom value on harvest rate. What hook would I need to be in to make this happen? (edited)
Avatar
Apologies for the n00b question but with Rust I could examine the Assmbly_csharp.dll to understand game functions and where hooks might reside. How would one do the same with Atlas? Also can UI be pushed from a server side plugin and to that end must UI be developed in UE or can it be done strictly in VS? Thanks!
Avatar
@Absolut You can use IDA, but it's not as easy as in Rust. UI possibilities are limited, you can't do much from a plugin, however some people managed to combine mods with plugins.
Avatar
@Michidu Thanks! Ill look into IDA and no worries on UI. Ill take baby steps 😃
Avatar
Is there a way to export a copy of the deconstructed code? Thinking $500 for a license might not be appropriate at this time 😃
Avatar
actually more than 500$, but you can find leaked IDA Pro 7.0 😉
9:39 AM
but i guess API headers should be enough to start with
Avatar
Ya that would be awesome. Ill keep a lookout for a download
11:43 AM
how do i place the steamid i get into a URL ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/8/2019 11:52 AM
Well, first replace the current steamId you've put in hardcoded to "{}" - Its a placeholder for a variable you're replacing. Then use it like the following; FString URL = FString::Format("YourFullStringHere", steamId);
Avatar
FString URL = FString::Format("http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key=whateversteamid={}&appid_playing=346110&format=json", steam_id);
11:58 AM
like this ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/8/2019 12:09 PM
I guess there is a & missing between your key and the steamId parameter but yea 😄
Avatar
just inserted a placeholer when i copied the text here because it has my steam api key 😛
12:12 PM
but how does this url get inserted into the GET function
Avatar
API 3.0 has a better requests library btw 😃
Avatar
what's changed ?
Avatar
based on Curl
12:13 PM
and interface should be better
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/8/2019 12:15 PM
after chaning API version you can try using ToString() function from FString 😄
12:21 PM
like this or am i retarded ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/8/2019 12:22 PM
I would use URL.ToString() instead of putting a string with ToString() in it 😄
Avatar
API & GetCallBack Are still undefined though
Avatar
it's just a callback function which you need to define 😉
12:26 PM
wiki has an example
Avatar
wow we can even grab the ip of a player
12:31 PM
interesting...
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/8/2019 12:31 PM
Try it and you'll get the SteamID of the player 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/8/2019 12:31 PM
I tried to do it haha
Avatar
ye i'm trying to ban if the family shared account is banned thought ip would be a nice addition 😛
Avatar
i think @OwnProx fixed it 😃 (edited)
Avatar
but then i'd have to do db management which i know nothing about
Avatar
GetCallBack will return the steam id already ye ?
12:40 PM
so now its time to parse it ?
12:45 PM
Avatar
it looks a bit weird also first argument to CreateGetRequest is url
Avatar
just To.String ?
Avatar
just url 😃
Avatar
right...
Avatar
anything inside quotes is a string btw
Avatar
ah
12:54 PM
thx
12:54 PM
so now in theory
12:54 PM
void GetCallback(bool Success, std::string Result) { Log::GetLog()->info("LenderSteamID: {}", Result); }
12:54 PM
this
12:54 PM
should return
12:54 PM
{"response":{"lender_steamid":"0"}}
12:54 PM
this ?
Avatar
Result should be it, yeah
Avatar
then i use what ownprox posted to parse it ?
12:56 PM
nlohmann::json Json = Result; if (int LenderSteamID; (LenderSteamID = Json["response"].value("lender_steamid", 0)) != 0) { //LenderSteamID }
Avatar
json = nlohmann::json::parse(Result);
12:57 PM
maybe it will work too 😃
Avatar
Result undefined
12:59 PM
you have another way of doing it dont you 😛
1:00 PM
oh my bad
1:00 PM
it was somewhere else lol
1:00 PM
{ Log::GetLog()->info("LenderSteamID: {}", Result); nlohmann::json Json = nlohmann::json::parse(Result); if (int LenderSteamID; (LenderSteamID = Json["response"].value("lender_steamid", 0)) != 0) { //LenderSteamID } } API::Requests::Get().CreateGetRequest("URL", &GetCallback);
1:02 PM
now can i get the banned list with const auto banned = ArkApi::GetApiUtils().GetShooterGameMode()->BannedMapField(); and match it against the id we're obtaining from the steam api ?
1:02 PM
or would it be better to read from the Banlist and match it that way ?
Avatar
btw when i said "url" i meant that actual url, not just the word 'url' 😃
Avatar
yeah but i need to place the steam id into the url to obtain the the LenderID
1:04 PM
so i cant place the actual url into there because it would always return the same result 😛
Avatar
you can use fmt::format
1:05 PM
like fmt::format("someurl.com?steamid={}", steamid")
1:06 PM
it will paste steamid instead of {}
Avatar
all of that goes into CreateGetRequest or before that
Avatar
instead of "URL"
Avatar
ahh
1:14 PM
void GetCallback(bool Success, std::string Result) { Log::GetLog()->info("LenderSteamID: {}", Result); nlohmann::json Json = nlohmann::json::parse(Result); if (int LenderSteamID; (LenderSteamID = Json["response"].value("lender_steamid", 0)) != 0) { //LenderSteamID } } API::Requests::Get().CreateGetRequest("fmt::format("http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key=86B1steamid={}&appid_playing=346110&format=json", "steam_id")", &GetCallback); (edited)
Avatar
remove those quotes already 😃
1:17 PM
fmt::format should be a function, not a string
Avatar
void GetCallback(bool Success, std::string Result) { Log::GetLog()->info("LenderSteamID: {}", Result); nlohmann::json Json = nlohmann::json::parse(Result); if (int LenderSteamID; (LenderSteamID = Json["response"].value("lender_steamid", 0)) != 0) { //LenderSteamID } } API::Requests::Get().CreateGetRequest(fmt::format("http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key=F2D86B1steamid={}&appid_playing=346110&format=json", "steam_id"), &GetCallback); } (edited)
Avatar
almost, steam_id and not "steam_id"
Avatar
alright now matching the id happens here ?
1:41 PM
Avatar
looks alright
1:42 PM
ye
1:45 PM
?
Avatar
currententry undefined
Avatar
const auto banned = ArkApi::GetApiUtils().GetShooterGameMode()->BannedMapField();
1:52 PM
does this return a list ?
Avatar
yes
Avatar
line by line Banned Players ye ?
Avatar
i guess so, it's a map
Avatar
so what's the best way to go about this extract the list line by line and match it line by line ?
Avatar
you need to iterate over it
Avatar
how would i do that
1:59 PM
ifstream ?
Avatar
for (auto& Elem : FruitMap) { FPlatformMisc::LocalPrint( *FString::Printf( TEXT("(%d, \"%s\")\n"), Elem.Key, *Elem.Value ) ); }
2:08 PM
i need something like this ?
Avatar
something, yea
Avatar
where does that even print data from
2:22 PM
if i change FruitMap to BannedMap will it work ?
Avatar
it's a first step for sure 😉
Avatar
TEXT("(%d, \"%s\")\n"),
2:26 PM
is this a regex ?
Avatar
wait this is printf
2:32 PM
oh boi i'm retarded
2:34 PM
what if i use contains though
2:35 PM
bool bHas7 = FruitMap.Contains(7); bool bHas8 = FruitMap.Contains(8); // bHas7 == true // bHas8 == false
2:35 PM
something like this
Avatar
try, not sure if this map version supports it though
Avatar
what is better to use Find or Contains ?
Avatar
Contains
2:41 PM
something like this
2:41 PM
?
Avatar
i dont think this map will ever contain lender_steamid
Avatar
?
2:43 PM
if the player was banned before ?
2:47 PM
2:47 PM
?
Avatar
have you disabled warnings in VS? The syntax is very wrong
Avatar
i think i disabled something ye
2:53 PM
where do i enable that
2:54 PM
i think i disabled intelisense at some point
Avatar
likely
Avatar
hmm just checked and its enabled
3:03 PM
weird
3:10 PM
3:11 PM
i think i'm missing a ; somewhere and it isn't checking properly
Avatar
you also cant have nested functions
Avatar
wait where do i have a nested function
Avatar
GetCallback
3:15 PM
its inside another one
3:17 PM
this one ?
Avatar
yes
Avatar
wait how is it nested
Avatar
one function inside another
Avatar
but i took it from the example 😛
Avatar
you just pasted it in wrong place
Avatar
here ?
3:33 PM
//Steam API Request void GetCallback(bool Success, std::string Result) API::Requests::Get().CreateGetRequest(fmt::format("http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key=B1steamid={}&appid_playing=346110&format=json", steam_id), &GetCallback);
Avatar
is GetCallback empty now?:)
Avatar
doesn't it have to go above the GetLog ?
Avatar
functions can't be inside each other
Avatar
still not heh
3:41 PM
i would write it but currently a little busy
Avatar
is it still inside another function or what ?
Avatar
yeah
3:42 PM
you can even see red lines, it's errors
Avatar
damn bro i cant even copy & paste code
Avatar
is there any way to like debug plugins
3:55 PM
pretty sure advanced chat performs a worldsave every time someone types something
Avatar
write to prox 😃
4:00 PM
4:00 PM
rip
Avatar
@OwnProx lol
Avatar
lmao it lags so bad
4:01 PM
like you type something and suddenly you're on the other side of the map
Avatar
typing became more entertaining at least
4:02 PM
its a gamble 😛
Avatar
@Michidu / @OwnProx Server down? https://ark-server-api.com/ I'm getting service unavailable.
Avatar
currently yes
Avatar
Ok
Avatar
damn i've pasted this GetCallback everywhere and it still tells me that local function definitions are not allowed 😦
Avatar
you need to paste it only in one place 😉
6:51 PM
and it shouldn't be inside other function
Avatar
well ye i mean i've tried pasting it everywhere 😄
Avatar
lol
Avatar
my {} are also fucked so that could be contributing to the issue aswell 😛
Avatar
how your current full code looks like
Avatar
it still inside lol
6:59 PM
why 7 in bHas btw? 😃
Avatar
isnt that just the name ?
7:00 PM
or does 7 have to be replaced by Lender_ID
Avatar
no, its fine heh
7:01 PM
you need to move func before bool Hook_AShooterGameMode_HandleNewPlayer
Avatar
local function definitions are illegal
Avatar
it wouldn't be local
7:04 PM
Avatar
no body
Avatar
{ void GetCallback(bool Success, std::string Result) }
7:07 PM
?
Avatar
no heh
Avatar
what is the body for then 😛
Avatar
Rogue Leader 1/8/2019 9:22 PM
The last pastebin needs a ; after the Void GetCallback line
9:23 PM
I believe you still have to define what that function does though. Currently you're only telling your program that there will be one with that name and signiture, but not what it does.
Avatar
API::Requests::Get().CreateGetRequest(fmt::format("http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key=162F2D86B1steamid={}&appid_playing=346110&format=json", steam_id), &GetCallback);
9:38 PM
isnt this the definition of GetCallBack ?
Avatar
Hey @here I've funded an issue on Gitcoin looking for devs to get it done. I'm buried in another project for at least four months ... I will be adding more bounties in the upcoming weeks. Let's work together and make open source awesome. https://gitcoin.co/issue/ark-mod/ArkBot/86/2074
Apologies posting here, please close once you have reviewed. I know little about this language, but do you think this could be forked and adapted to run with Atlas, if only the discord bot element for updating/restarting servers? are there any plans to ..
Avatar
i can vouch for this project ^^
10:21 PM
hope we can get some devs on this i doubt i can do anything for it 😛
Avatar
Anyone mind sharing the process for setting up a workspace in VS for Ark/Atlas coding
Avatar
sure i have a tutorial for that
Avatar
@WETBATMAN Thanks!
Avatar
no problem
10:38 PM
welcome to the community!
Avatar
I’ll record a YT on how to setup VS and Arkbot tomorrow
12:46 AM
May as well record how to set it up
Avatar
Ya I realized my issue was that I dont have the "not public" version of AtlasAPI. So I dont have the uncompiled files to load into VS.
1:10 AM
Beyond that ^^ @WETBATMAN instructions were great!
Avatar
GSH | MrOwlSky 1/9/2019 3:09 AM
@MindDragon what is that?
Avatar
MindDragon 1/9/2019 3:25 AM
I will record a YouTube video on how to setup Visual Studio and ArkBot from Github tomorrow.
3:26 AM
there is a great Google docs but sometimes videos (pictures) are 1,000 words +
3:26 AM
Also Atlas
Avatar
Rogue Leader 1/9/2019 3:26 AM
What is Arkbot?
Avatar
MindDragon 1/9/2019 3:26 AM
ARK Survival Evolved application that monitors and extracts data from local ARK servers and exposes this data through a Web App, Web API and Discord Bot. Provides important functions to players: di...
3:27 AM
I'm a maintainer on there and funding mods for it -- currently wanting a mod to port it to Atlas
Avatar
Thought of asking how you guys are hosting your Ark servers. Hosting per server? VPS and configure servers yourself? Another way?
Avatar
me personally i have a system built at home
8:25 AM
@GSH | MrOwlSky @Rogue Leader arkbot is a program that allows us to pull data from Ark’s savefile and display it to players on a website
8:25 AM
as such players can log into the site and view their stats/tribe log/ imprinting timers/generator fuel/crops and more
8:26 AM
check out my example http://dopeark.com
9:46 AM
Im at 1 step from it lmao
9:46 AM
Just waiting for the 2 tera Nvme today
Avatar
congrats boiiii
Avatar
Deleted User 1/9/2019 9:50 AM
First amd config for me
9:50 AM
i was like a dumb ass when i didn't found my second gpu
9:50 AM
i just went to buy a new one this morning lmao
9:55 AM
9:55 AM
Nvme raid
9:55 AM
wtfff
Avatar
@OwnProx PLEASE fix AdvancedChat 😦
Avatar
Deleted User 1/9/2019 4:11 PM
@WETBATMAN ark one or atlas one ?
Avatar
ark
4:12 PM
it makes all servers in the crosschat autosave every time someone sends a message
4:12 PM
causing insane lag and rubberbanding
Avatar
Deleted User 1/9/2019 4:14 PM
Oh i dont have this problem
Avatar
wtf man why do some people have this and some dont (edited)
4:17 PM
how many servers in your crosschat ?
Avatar
Deleted User 1/9/2019 4:22 PM
I was having the same problem at the begging
4:22 PM
and one day after a server restart it just stoped lmao
Avatar
please tell me how you fixed it its driving me crazy
4:23 PM
because all those world saves already rack up the cpu usage and then arkot reloads all data and maxes the cpu out lol
Avatar
Deleted User 1/9/2019 4:39 PM
I didn't fixed it lmao
4:39 PM
it stoped alone
Avatar
ughhh
4:51 PM
you must have changed something 😛 (edited)
Avatar
Cross Server Chat support for ARK Survival Evolved servers. - ark-mod/ArkCrossServerChat
5:44 PM
is there any way to make this CrossServerChat support unicode ?
5:45 PM
advanced chat just lags too much
Avatar
MindDragon 1/9/2019 6:00 PM
Are there any developers on here interested in being paid for work?
6:01 PM
@Raptross I have a datacenter with gigabit uplinks and I bought and built a TR 1950X with 64gb of RAM and 2x M.2 drives
6:02 PM
I don't recommend shared hosting with ARK or ATLAS... The code is soooo bloaty.
6:11 PM
does this need to be changed for message unicode support ?
Avatar
damn cant even recompile it, needs an older sdk i think
Avatar
@OwnProx have mercy on our ssd's and fix AdvancedChat 😛
Avatar
ToUTF8
2:18 AM
exists already in the api btw (edited)
2:18 AM
also blame ark there rcon sucks
2:18 AM
its nothing to do with advanced chat
2:18 AM
its arks rcon keeps dropping connections ect
2:19 AM
also it doesnt use hard drive at all
2:19 AM
so its not effecting your ssd's lol
2:19 AM
well actually reading more of what you said if it really is saving each time then yeah it is
2:20 AM
but i did not programme anywhere in advanced chat to support saving lol
2:20 AM
it has no option to save the world so idk how the hell your worlds are saving on each message as it don't make sense to me
Avatar
@WETBATMAN Why don't you unload it and see if it is saving or not. That will help isolate if it is with reference to that plug-in or not.
Avatar
Yeah it happened the first day for us too, the multiple saves, but stopped.
Avatar
strange shit maybe the rcon is calling a save for some reason lol its certainly not my plugin i dont call save world from it, im going to move away from using rcon in upcoming updates obviously still keep that option there but i would rather host ports instead of using ones already existing seems they have perf issues (edited)
Avatar
i know it is advanced chat because when i set up my extinction server i didnt load advanced chat on it because to cluster it i would have to restart all the other servers with advanced chat
8:02 AM
also @OwnProx check your advanced chat discord sever i posted screenshots that show that worldsves match the time a message is posted
8:03 AM
8:03 AM
8:04 AM
8:06 AM
as you can see arkbot reloads sever data on ALL servers when a crosschat message is sent
8:06 AM
arkbot only reloads data if it detects the savefile got updated
Avatar
@WETBATMAN The lag can come from the Arkbot as well if you are running it on the same machine as the arkservers.
Avatar
that is the consequence of all the servers saving at once 😛
9:48 AM
i have them set to save sequentially
9:49 AM
but when people type in chat all servers save and yea that causes a lot of lag because then arkbot has to refresh all servers at once
Avatar
Have you verified it ? by actually looking at the save file. I know sometimes arkbot just do a refresh of the file even though it hasn't been a worldsave.
Avatar
yes i have verified it
9:50 AM
savefile gets updated and then arkbot starts the data pull
Avatar
so ...basically you have a bad ring of fire here 😛
Avatar
yes exactly 😛
Avatar
it does not even make any sense
9:52 AM
why would a crosschat message force a worldsave (edited)
Avatar
oh well, weird. Have you tried disabled the RCON xChat and use the separate plugin instead?
Avatar
the problem is i have a lot of russian speakers so i need unicode support
Avatar
Features display a users chat message across multiple ark servers Unicode Support Local & Remote Server Support a lot more efficient than competitors using sqllite database Description make sure you configure this properly enabling your rcon...
Avatar
hmmm
Avatar
Should be exactly the same code as in the Advance Chat.
Avatar
will the admin and donator tags work with that though
Avatar
Deleted User 1/10/2019 9:54 AM
No
Avatar
Deleted User 1/10/2019 9:54 AM
They will not be cross map
Avatar
damn
9:54 AM
still very weird
9:54 AM
some people have this and some dont
9:55 AM
so it has to be some variable i have wrong or something 😦
Avatar
how often do you do a world save?
Avatar
13 15 17 19 21
Avatar
Hello! Is it the Dino passive protection working fine? It’s not working at all for me
9:59 AM
^ this is the discord you're looking for
Avatar
Thank you 😃
Avatar
is there a way to debug the functions called when a chat message gets sent or something
Avatar
@Michidu i have multiple API keys in the voterewards plugin so if i vote on one server then hop into another it claims the reward twice
Avatar
@WETBATMAN Report that on the forum
3:40 PM
any way to recompile this plugin
3:40 PM
giving me endless errors
Avatar
after removing AdvancedChat Crosschat 😮
Avatar
i'm going to lose my mind
4:17 PM
ITS STILL AUTOSAVING
Avatar
nvm right now the lag seems to be gone
Avatar
N00b question here... so sorry! I am not seeing any errors in my solution until I try to compile. I am then told AtlasApi.lib cannot be opened. If I change it to ArkApi (which I wouldnt want to) it gives the same error.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:05 PM
Have you set the additional library path in VS?
Avatar
indeed
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:06 PM
And in that folder there is a "AtlasApi.lib" located, right?
Avatar
whats funny is neither ArkApi or AtlasApi.lib are in that folder. They are both in the "out_lib" folder.
9:07 PM
So I tried adding a second reference
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:08 PM
Thats why I tought - I remember you switched to new api version 😄
Avatar
wait now i'm confused too, are you supposed to include the lib folder or the out_lib folder 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:09 PM
With the new version its the out_lib folder 😄 lib folder in new one is used for compiling API itself 😄 (edited)
Avatar
@Absolut sorry looks like i was wrong
Avatar
copy
9:11 PM
New errors, ill fiddle before bothering everyone
9:11 PM
Thanks!
Avatar
i'll plug my own question meanwhile
9:12 PM
9:12 PM
get this error when compiling crossserverchat
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:13 PM
Change the Windows SKD Version. Its located in the General section of your project settings
Avatar
and where do i get this specific version of the sdk downloaded ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:14 PM
You already got it I guess 😄
Avatar
says it was not found
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:14 PM
even in your project settings?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:15 PM
Yea - the second option "Windows SDK Version"
9:15 PM
change that one to whatever you've installed
9:15 PM
its getting copied with the .sln file I think
Avatar
change the one in the project sln file to the one i have ? (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:17 PM
Just change it in that window lol
9:17 PM
Avatar
yeah i've changed that already and it says it wasn't found (edited)
9:18 PM
if i change it to the latest one
9:18 PM
it says it needs the one before that
9:18 PM
if i change it to the one it requests it tells me it wasn't found
9:19 PM
oh nvm
9:19 PM
i'm retarded
9:19 PM
ignore all that
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:20 PM
So it was just about switching?
Avatar
yes
9:31 PM
how would i include this file in the project (edited)
9:31 PM
i added the include folder to the C++ section
9:31 PM
what is the path for this supposed to be
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:32 PM
you can simply add that folder to the include folder in your visual studio project 😄
9:32 PM
and #include the header
Avatar
noob question but where is the include folder
9:35 PM
just paste it into the root of the project ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:36 PM
Its located in Project Settings --> C/C++ --> General and called Additional Includedirectories (edited)
Avatar
ye i added the whole include folder in there
9:36 PM
so now just include it by the name ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:37 PM
use #include "sqlite/sqlite_modern_cpp.h" (edited)
Avatar
says it cannot open the file
9:39 PM
even thought i have the include folder in there
9:43 PM
managed to include it by just selecting the sqlite folder
Avatar
fixed the include stuff but now get errors like these
9:54 PM
9:55 PM
i guess the source is borked or did i do something wrong on my end ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:55 PM
Source Code would be great 😄
Avatar
Cross Server Chat support for ARK Survival Evolved servers. - ark-mod/ArkCrossServerChat
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 9:56 PM
Ah.. you just want to compile it 1:1 ?
Avatar
ye for now
9:59 PM
i wanted to see if i could add unicode support
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:03 PM
Where did you got the ArkPluginLibrary.lib from? Even the whole Library?
Avatar
Shared library for all my ARK Server API plugins. Contribute to ark-mod/ArkPluginLibrary development by creating an account on GitHub.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:07 PM
lmao.. searched for it everywhere on his git
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:20 PM
He was using an older version of the API... some things have changed now...
10:21 PM
Also got the errors. I would need to fix the whole code for helping you 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:21 PM
mostly its just a double brace ()() - I think you can figgure it out on your own 😄
Avatar
damn i wish i knew C++ to the point where i could fix this 😦
10:22 PM
some stuff has the error that it cannot be used before its initialized
Avatar
wait does removing one brace actually fix it or will it compile broken ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:30 PM
depends on what the compiler said; I just opend the project and browse trought it for a little
10:30 PM
But yea.. if you're adding a braces to much it can "destroy" your code 😄
Avatar
well it has a lot more issues
10:31 PM
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:32 PM
The part in utils.cpp worked fine for me
10:32 PM
Have you set the C++ 17 standard already in your project? (edited)
Avatar
ye
10:33 PM
nothing is actually underlined in that file its a compiler issue
10:33 PM
oh actually nvm
10:33 PM
some stuff is actually underlined
10:34 PM
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:34 PM
told you 😄
10:34 PM
just the ()()
10:35 PM
remove one of them
Avatar
oh here too
10:35 PM
didn't notice
10:37 PM
hmm it cant find a file in ARKPluginLibray
10:37 PM
10:39 PM
hmm this file does not seem to exist
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/10/2019 10:42 PM
As long as the .lib is not downloadable you'll need to open the ARKPluginLibray fix it first and then generate a static Library from it to later include it into your current project
Avatar
i think its looking for the now called ArkApi.lib
10:43 PM
as its a linker issue
10:45 PM
there are too many issues in this project for me to fix 😦
Avatar
I have found that when the HandleNewPlayer is called the AShooterPlayerController isnt usually setup yet (sleeping or in a "dead" state). I had similiar issues in rust and was able to add a 5 second timer, then call the function again. So it would loop until the player disconnects or the controller is valid. How would one add a timer for a few seconds then call a function afterwards within C++? bool Hook_AShooterGameMode_HandleNewPlayer(AShooterPlayerController * NewPlayer, UPrimalPlayerData * PlayerData, AShooterCharacter * PlayerCharacter, bool bIsFromLogin) { AShooterGameMode_HandleNewPlayer_original(NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); Log::GetLog()->info("Handle New Player: Called"); if (NewPlayer != nullptr) { Log::GetLog()->info("Handle New Player: Not Null"); if (ArkApi::IApiUtils::IsPlayerDead(NewPlayer) || ArkApi::IApiUtils::IsRidingDino(NewPlayer)) { Wait 5 seconds ----> Hook_AShooterGameMode_HandleNewPlayer(variables again....) return false; } UnlockEngrams(NewPlayer); return true; } return false; } (edited)
Avatar
Rogue Leader 1/11/2019 12:10 AM
Wouldn't that lock up the server for 5 seconds?
12:11 AM
You can create some struct that tracks online players and just run a timer that does what you need it to if they are alive and haven't been modified yet.
12:12 AM
There's an example of a decent struct for online players and a timer in NPP
Avatar
Reminder: Paid Project is available! Get paid for your work https://gitcoin.co/issue/ark-mod/ArkBot/86/2074
Apologies posting here, please close once you have reviewed. I know little about this language, but do you think this could be forked and adapted to run with Atlas, if only the discord bot element for updating/restarting servers? are there any plans to ..
12:39 AM
the bounty has been increased!
Avatar
ill be moving the bounty over to issue #88
12:51 AM
Features ARK Survival Evolved application that monitors and extracts data from local ARK servers and exposes this data through a Web App, Web API and Discord Bot. Provides important functions to pl...
12:51 AM
So it will be more clear
Avatar
@Rogue Leader Thanks Ill look at it! For now I am still trying to tighten up my logic via chat command then Ill seek to automate it with the HandleNewPlayer hook. Though while I have you if you could help me I'd really appreciate it! I am trying to force player level to 51, give appropriate skill points to spend, and unlock all engrams. I have no issue setting the player level to 51 manually and unlocking all engrams but the "skill points" portion is wonky. (edited)
12:53 AM
It would be amazing to see what happens on the hook UPrimalCharacterStatusComponent.ServerApplyLevelUp. I can than maybe reverse engineer the process
12:54 AM
Then I could do this which should level the player more naturally and keep the points in sync with the actual level (not to mention the xp would be correct). int currentLvel = char_component->GetCharacterLevel(); if (currentLvel < 51) { //Log::GetLog()->info("Unlock Engrams: Below Level 51"); //char_component->BaseCharacterLevelField() = 51; for (int i = currentLvel; i < 51; i++) { float neededEXP = char_component->GetExperienceRequiredForNextLevelUp(); char_component->AddExperience(neededEXP, false, EXPType::XP_SPECIAL, false); char_component->ServerApplyLevelUp(EPrimalCharacterStatusValue::MAX, player_controller); } player_controller->GiveEngrams(true); ArkApi::GetApiUtils().SendChatMessage(player_controller, "Absolut Gaming: ", "You have been promoted to Level 51!"); }
Avatar
Two more things about the bounty.
12:59 AM
1) It is open to any developer and if a little more is needed, we may be able to get a few other contributors
12:59 AM
2) I am writing an article about it in Forbes.com ... If you want your name out there, this is the time to do it.
12:59 AM
Features ARK Survival Evolved application that monitors and extracts data from local ARK servers and exposes this data through a Web App, Web API and Discord Bot. Provides important functions to pl...
Avatar
disregard my comment. I am deliberately making it harder then it needs to be. Thanks!
Avatar
@Absolut theres another hook you can use
2:53 AM
that actually applys when the player has logged in
2:54 AM
void Hook_AShooterGameMode_StartNewShooterPlayer(AShooterGameMode* _this, APlayerController* new_player, bool force_create_new_player_data, bool is_from_login, FPrimalPlayerCharacterConfigStruct* char_config, UPrimalPlayerData* ark_player_data) (edited)
2:54 AM
it could be after the handle player hook not sure, i know michidu uses this one with a 5 sec timer to then show the player a message << make sure you if check the char pointer after timer has passed (edited)
2:55 AM
plus if you #inclue "Timer.h"
2:55 AM
you got a hole timer class under
2:55 AM
API::Timer::Get().
2:56 AM
use std::bind if you want to pass arguments to your timer callback (edited)
2:58 AM
@WETBATMAN replace all ArkApi.lib with AtlasApi.lib in your project also replace all /ARK/Ark.h with /Atlas/Atlas.h (edited)
2:59 AM
set you lib include path to c:/pathToApi/x64/Atlas/
3:00 AM
also it doesnt really matter much about coverting that old cross chat im making a new one soon not using rcon
3:01 AM
rcon is just bad apparently well ark / atlas implementation of it
Avatar
@OwnProx thanks! I was starting to mess with the timer. Ill keep trying 😃
Avatar
yeah its cool
3:01 AM
std::bind(Callbackfunc, Arg1, Arg2)
3:02 AM
oh never mind you dont need bind (edited)
3:02 AM
he added a template
3:02 AM
API::Timer::Get().DelayExecute(&TimerCallBack, 10, Arg1, Arg2, ... so on
3:02 AM
when i was testing this class he dint have a template then haha
Avatar
this leveling process is kicking my butt
3:03 AM
I thought I was good but the damn exp stays at level 1. So players keep leveling
Avatar
why dont u just add xp
3:03 AM
instead of looping
Avatar
I tried, it didnt work properly
Avatar
just add 1 amount of xp
3:04 AM
ofcourse it does
3:04 AM
a admin command exists for it
3:04 AM
you can just use that
Avatar
for (int i = currentLvel; i < 51; i++) { float neededEXP = char_component->GetExperienceRequiredForNextLevelUp(); char_component->AddExperience(neededEXP, false, EXPType::XP_SPECIAL, false); char_component->ServerApplyLevelUp(EPrimalCharacterStatusValue::MAX, player_controller); }
Avatar
just use the cheat manager class
3:04 AM
UShooterCheatManager* cheatManager = static_cast<UShooterCheatManager*>(OtherPlayer->CheatManagerField()); if (cheatManager) { } (edited)
3:05 AM
cheatManager->AddExperience(345345435, false, true);
3:06 AM
oh apparently you can do this too
3:06 AM
OtherPlayer->AddExperience(345345435, false, true);
3:06 AM
without cheatmanager class
3:07 AM
int currentLvel = char_component->GetCharacterLevel(); if (currentLvel < 51) {
3:07 AM
is a bad idea
Avatar
Ya I tried that.
Avatar
because if they get the xp
3:07 AM
and dont apply the level
3:07 AM
they will get additional xp
3:07 AM
at login
3:07 AM
you want to check there current xp not level
Avatar
Im trying to forgot clicking 51 times. I just want to give them 51, 51 points to spend in traits, and unlock all engrams.
3:08 AM
I can then set EXP at 999999999 so they never level again. Or make a hook so on level it returns nothing
3:08 AM
forgo*
Avatar
michidu made a plugin that unlocks all engrams
Avatar
Ya that was my template
3:08 AM
I have the engrams thats easy
3:09 AM
that may be why it doesnt work
3:09 AM
the cheat manager ver calls
3:09 AM
UPrimalCharacterStatusComponent (edited)
Avatar
@OwnProx its cool. Dont waste anymore time.
Avatar
if you try the cheap manager AddExperience
Avatar
The only frustrating part is having to stop/start my server to replace the plugin file
Avatar
it should work
3:09 AM
you dont have to do that
3:09 AM
lol
Avatar
AddExp works fine, that isnt the issue
3:09 AM
plugin.unload "myplugin" unloads but file is still locked
3:10 AM
might be a server host issue
Avatar
cheat plugins.unload <PluginName>
3:10 AM
because you did not unload your hooks
3:10 AM
/ commands
3:10 AM
on unload
Avatar
they are in the unload
Avatar
you may of forgot something
3:10 AM
or named one of them wrongly
3:10 AM
i have about 16 plugins
3:10 AM
they all runtime unload
Avatar
ya mine unload
3:10 AM
just cant delete file or replace it
3:10 AM
says locked
Avatar
i can replace them too
Avatar
might be server host, not sure
Avatar
do you use sql lite?
3:11 AM
did u close that connection?
Avatar
anyway,thanks for the help. I just need to get IDA. Without game functionality insight it is hard to code.
3:11 AM
Dont waste your time on me. Thanks man!
Avatar
if you dont close sqllite its likely why
3:12 AM
depends if your plugin is using a db or not hahaha
3:12 AM
its cool dude im bored and dont see it as a waste
3:12 AM
maybe what i teach you gets passed on to others you never know
3:12 AM
then its not a waste
3:13 AM
but i can imagine how bad it would be having to close the server each test
3:14 AM
also i wrote 90% of my plugins without help from ida but your not wrong it does help to see how stuff's used (edited)
Avatar
It’s nice to see what is called and in what order from default behavior. Like player clicks a trait button which consumes a skill point etc. makes it easier to duplicate the process so it isn’t clunky and brut forced
Avatar
yeah and you can run the server exe in debug mode adding break points to certain functions you think relate to something
3:19 AM
then go ingame do that action then when one of your bp's are called you know its that one
3:19 AM
it helps in stuff like that for sure plus you can see all the local variable values
3:20 AM
/ array data ect
3:20 AM
everything really
3:20 AM
i havent actually used ida in this way yet running the server executable live and doing bp's i normally find what i need anyway in less time than starting a server up
Avatar
@OwnProx i want to compile it for ark not atlas 😃
Avatar
@WETBATMAN i have been working now for a long time on Tobias legacy. Converting basically Improved commands to work. But it is a mess. And the ArkPluginLibrary that he use needs updates as well.
Avatar
that is pretty sad
Avatar
And as 𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 said you need to convert lot's of double ()() since the today API won't work with the code with the currently build.
Avatar
yes i did that but some stuff still gives a compiler error
9:57 AM
it looks like the legacy api was very different
Avatar
it was
9:59 AM
I got some of his code working. And some actually to be compiled completely but that don't do anything lol (edited)
Avatar
For storing some player information via steamid what is the best approach? Looks like SQLite is supported (seeing an example in ArkShop), or can I simply create a data.json and store it there?
3:27 AM
Seeing as config is a json I figured I could just create a json file. Probably small amounts of data. Probably a list of strings and maybe a few other things
Avatar
I am leaning towards read and writing to a json. Read json and use , write back to json on unload of plugin. I see the read and use example in ArkShop which makes a ton of sense. I do not see any example of catching if the file doesnt exist and creating it on the server file system. Is there support for this and if so can someone point me to an example?
4:18 AM
To give an example: void Load() { Log::Get().Init("ArkShop"); try { ReadConfig(); } catch (const std::exception& error) { Log::GetLog()->error(error.what()); throw; } ^^ that is ArkShop.. I'd want to reference a default "config" and write it to file instead of throw; is this ^^ possible?
Avatar
Rogue Leader 1/12/2019 5:07 AM
Sqlite and reading/writing to a file have a lot of limitations if you have multiple servers or lots of queries at one time.
Avatar
ReadConfig throws if file doesn't exists, you can do something else in the catch block instead of rethrow. Or you can just check if file exists using std::filesystem::exists.
Avatar
Regardless, can one write data to a file if the file doesn’t exist to begin with?
Avatar
fstream can automatically create files if you add fstream::out flag
Avatar
Thanks!
Avatar
std::fstream file(config_path, fstream::out);
Avatar
@Rogue Leader I really appreciate that insight, I am focused on replicating what I know so I can get a foundation and then begin to grow beyond. That being said, your point is something I didn't consider which is a bit absurd considering a core functionality of Atlas is multi-server integration (even if it is virtual boxes on a single piece of hardware or multi units sharing storage). I will be interested to see how others will handle passing active player data across servers to maintain running storage. (edited)
8:06 AM
or maybe, you write to storage on server change, and grab the data back once the player loads into the new server.
8:07 AM
Maybe that begs the idea of leveraging web hooks and storing the data off machine and writing on server disconnect and read on server connect.
8:07 AM
I dunno.. 😃
Avatar
Rogue Leader 1/12/2019 9:18 AM
If it's not a ridiculous amount of data, you could store it in a file, load it up into a struct on server boot, then use what's in the struct(memory) and then write it back to the file on world saves or shutdowns. But again you would have issues with clusters all writing to the same file at the same time. Not sure how atlas handles it though, with each map grid saving or the Game as a whole saving. as I haven't worked with it yet.
Avatar
@Absolut what sort of data are you saving / is it per player that joins ? if it is maybe use sqllite / mysql you can look at permissions it has a Interface so it can either run off of mysql or sqllite
6:14 AM
completely down to the users choice
6:14 AM
thats if your storing quite a bit of data its wise to use such things
Avatar
Not really sure yet, just dabbling. Thanks 😃
Avatar
damn adrian you beat me to my plugin 😕
3:37 PM
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 could you post the source for it i'm extremely interested 😛 (edited)
Avatar
Anyone able to assist in getting to the master item list? @atlas I see the MasterItemListField function on the UPrimalGameData class but I cant seem to get to it. I traced it back to the PrimalGameDataField() function under UPrimalGlobals. UPrimalGlobals appears to be obtainable from GameSingletonField() on the UEngine class. But this all seems rather crazy....
Avatar
Disregard. I think this is all to difficult for me. I thought I could learn but I am clearly not there yet. Thanks everyone for the time!
Avatar
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Is that an unlock all engrams plugin? @Michidu
Avatar
Do you think that if I I make minor changes it would work on atlas?
4:17 PM
however, i'm not sure if engrams in atlas are same
Avatar
if atlas has engrams, it should work 😃
Avatar
01/14/19 20:46 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted 01/14/19 20:51 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted 01/14/19 20:56 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted 01/14/19 21:17 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted 01/14/19 21:22 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted 01/14/19 21:27 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted 01/14/19 21:32 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted 01/14/19 21:37 [ArkShop][error] (d:\programs\ark\plugins\arkshop\arkshop\private\points.cpp ArkShop::Points::GetPoints) Unexpected DB error not all rows extracted
6:53 PM
@Michidu what's this
Avatar
i guess you use sqlite db with multiple servers
Avatar
i do
6:56 PM
5 of them 😛
Avatar
that why 😃
Avatar
so certain players points/kits are corrupted ?
6:57 PM
well non accesable ?
7:00 PM
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 mind giving me the source for your AntiFamilyShare i'm really interested in how you did it 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:05 PM
You really wanna see all these virus? 😄
Avatar
virus ?
Avatar
no, it may happen randomly
7:07 PM
just 2 servers access one db at the same time
Avatar
so its failing to read ye ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:09 PM
Yea.. im stealing all your data you'd provide on the config and send it to steam
7:09 PM
like a trojan.. lol
Avatar
read or write
Avatar
;p
7:21 PM
oh no my child porn /s (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:23 PM
wtf.. lol
Avatar
shh dont worry about it
7:25 PM
ehh i guess that is a no for source code 🤷
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:25 PM
just wait lol
7:30 PM
I just wish there would be a way without crashing the server to deny a PreLogin
Avatar
nah its cool
7:31 PM
my server has 17 mods so you have to wait a solid 10-15 min to try to connect and then get kicked lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:31 PM
lol
7:31 PM
17 mods you'd say? 😄
Avatar
yes
7:31 PM
2 of them being core mods 😛
7:34 PM
hmm did you compile this with API 2.9 ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:34 PM
yy
Avatar
damn your code is so clean lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:37 PM
the bigger the project the messy it gets.. lol
7:37 PM
if you got some projects with 3000 lines of code for a single plugin you probably can do it cleaner
Avatar
i would not know lol
7:38 PM
i can barely write 2 lines 😦
Avatar
Deleted User 1/14/2019 7:50 PM
@WETBATMAN i can barely write 2 words xD
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:54 PM
wrong order btw
7:54 PM
lol
Avatar
no lol its meant to be that way
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 7:55 PM
Im pretty sure its false order
Avatar
order is correct 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/14/2019 8:00 PM
well
8:01 PM
rip
Avatar
Deleted User 1/14/2019 8:11 PM
I think is my brain there is no light
8:11 PM
its all black
8:11 PM
Dark matter
Avatar
Does ATLAS Rcon not support Chinese?
Avatar
i have been using Permissions with an sqlite db should i switch to mysql ?
Avatar
Deleted User 1/15/2019 9:14 AM
Switch to mysql for everything xD
Avatar
ye but how do i migrate my existing db to it
Avatar
whats better to use for hosting a mysql db on localhost xampp or the official mysql installer from mysql.com ?
Avatar
Deleted User 1/15/2019 10:51 AM
mysql server
10:51 AM
and the migrate i used the dumbest way every copy past lines lmao
10:51 AM
with db browser
10:51 AM
you can export a db file to mysql
10:51 AM
or cvs
10:52 AM
and use Navicat after that to import it on your new mysql db
Avatar
uhh issue is my Permissions db is 1400lines +
10:52 AM
so line by line is not a good idea 😛
10:53 AM
this is the one i need ?
Avatar
Deleted User 1/15/2019 10:54 AM
wait Ownprox send it to me and showed mee wich one to install 1s
10:55 AM
Custom installation
10:55 AM
and select c++ connector mysql server 64bit and workbench x86
Avatar
cool
10:56 AM
yeah that was the one i already have it downloaded 😛
Avatar
Deleted User 1/15/2019 10:56 AM
With mysql
10:56 AM
even does db erros of arkshop
10:56 AM
disappear normally
10:56 AM
if you have arkshop with mysql of corse
Avatar
yea
10:59 AM
i need the 64 bit C++ connector ye ?
Avatar
Deleted User 1/15/2019 10:59 AM
yes
Avatar
anything i need to change in networking ?
Avatar
Deleted User 1/15/2019 11:01 AM
No nothing
Avatar
i heard it needs legacy authentication
Avatar
Deleted User 1/15/2019 11:02 AM
only your user if you want to allowed remote connection
11:02 AM
im not using legacy and it working fine
Avatar
any users to add or just use the root user ?
Avatar
permissions cant connect to the db throws error 1114 (edited)
Avatar
Deleted User 1/15/2019 11:44 AM
Dont write Mysql
11:44 AM
just mysql
11:44 AM
no Caps
Avatar
yeah i did that
11:46 AM
11:46 AM
maybe its because i dont have a db called ArkDB ?
11:47 AM
yep that was the case
11:48 AM
now i somehow have to move my entire db to here...
11:51 AM
btw permissions seems to only be able to connect to legacy authentication
11:55 AM
best way to export sqlite to CSV ?
11:56 AM
nvm sqlite browser has this feature 😛
11:57 AM
wait wth its exporting steamID corrupted
Avatar
Deleted User 1/15/2019 12:03 PM
Well you need to create the db
12:03 PM
the plugins only create the tables
Avatar
yeah i got it to connect
12:04 PM
now i have to export my old db and import it into here
12:04 PM
csv export didint work it corrupted the steamID's
12:04 PM
json export was recognized but it exported 0 columns for some reason
Avatar
Deleted User 1/15/2019 12:08 PM
Do like me
12:08 PM
Copy past xD
12:09 PM
bruh
12:10 PM
imma break my fingers if i do this by hand
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:11 PM
just export it as .sql file..
Avatar
Deleted User 1/15/2019 12:12 PM
@WETBATMAN Lmao i got the same problem when i was doing it and none worked
12:12 PM
so i just create the empty like and copy past the data into them
Avatar
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRANSACTION' at line 1
12:14 PM
well shit
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:14 PM
while exporting or importing?
Avatar
importing
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:15 PM
Then remove the following;
12:15 PM
BEGIN TRANSACTION; COMMIT;
12:15 PM
First Line and last line
12:15 PM
Its created due a bigger SQL Statement
12:16 PM
but it might be another keyword in some other SQL's.. lol
12:16 PM
been using MariaDB
Avatar
removed those and still throws and error
12:18 PM
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AUTOINCREMENT, `SteamId` integer DEFAULT 0, `Groups` text DEFAULT 'Default,' C' at line 2
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:18 PM
But not at "Transaction" command I guess 😄
Avatar
yea lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:18 PM
weird.. then create the table on your own and remove that one.. lol
Avatar
why tf is it not importing from json its correct
Avatar
Deleted User 1/15/2019 12:19 PM
It will not work
12:19 PM
no matter the export way that you will use from db browser
12:19 PM
it will not work
Avatar
why lol its not some magical database
12:21 PM
i dont feel like typing 1900 lines by hand lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:23 PM
For me it worked
12:23 PM
In MariaDB atleast 😄
12:23 PM
12:24 PM
why does it export steam id like this
12:24 PM
number too long ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:24 PM
You might need to tell your excel to format it right 😄
12:24 PM
currently its taking it as a number
Avatar
you're genious
12:27 PM
damn cant save it into csv like this
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:27 PM
use .sql file its the cleaner way to do it.. lol (edited)
Avatar
does not seem to export it
12:28 PM
or import
12:28 PM
i mean
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:29 PM
how does your "Import" looks like? 😄
12:29 PM
anything i need to change here ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:29 PM
just use "Select ALL" button
12:29 PM
and then click okay 😄
Avatar
yeah i did that the last time and it failed upon importing
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:30 PM
send me that file via pm then 😄
12:32 PM
how does your import looks like still
12:33 PM
syntax is errored out
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:34 PM
Yea but how do you import?
12:34 PM
via shell?
Avatar
mysql server import feature
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:35 PM
how does that looks like? 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:37 PM
Ah.. remove first and last line again
12:37 PM
forgot it lol
12:37 PM
still shows an error here
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:38 PM
AUTOINCREMENT doesn't seem to be supported
12:38 PM
1 sec 😄
12:38 PM
try using AUTO_INCREMENT
Avatar
good script to convert db here https://stackoverflow.com/a/1067151
I found this Perl script while migrating my SQLite database to mysql I was wondering (since I don't know Perl) how could one rewrite this in Python? Bonus points for the shortest (code) answer :)...
Avatar
oh shit that might have worked
12:39 PM
please import
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:40 PM
Its caused by; You had a SQL3 file 😄
Avatar
ughhh
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:40 PM
Now you want to have it into MySQL - some keywords are different (edited)
Avatar
still not importing
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:40 PM
new error? 😄
Avatar
ERROR 1101 (42000) at line 1: BLOB, TEXT, GEOMETRY or JSON column 'Groups' can't have a default value
12:41 PM
yeah 😛
12:42 PM
@Michidu how is that script even used lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:42 PM
Its a Phyton script 😄
Avatar
yes, it takes sqlite dump
Avatar
it has to be in the same folder ?
Avatar
its better, you can run it like so script.py sqlitedump.sql > fixed.sql
12:44 PM
from cmd
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:44 PM
In general; It would do the work you're currently doing manually 😄
Avatar
let my try it
12:47 PM
damn it exported a 0kb file
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:48 PM
sounds good
Avatar
yeah lol who needs the data anyway
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:48 PM
mv google /dev/null
Avatar
is my python install borked or something
Avatar
probably you did something wrong
Avatar
fuck me i pasted it inside notepad++ and forgot to save the text
12:51 PM
damn i'm retarded
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:51 PM
Avatar
ERROR 1273 (HY000) at line 1: Unknown collation: 'NOCASE'
12:53 PM
even after the script 😮
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:53 PM
remove COLLATE NOCASE
Avatar
now it says groups cant have a default value
12:55 PM
i think i'm close
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:57 PM
Since you already got the big part.. do it manually
12:57 PM
its just 4-5 lines 😄
Avatar
ERROR 1062 (23000) at line 6: Duplicate entry '1' for key 'PRIMARY'
12:57 PM
says its duplicated but i cant find anything that is duped (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 12:58 PM
Happy that im using MariaDB.. lol
Avatar
Deleted User 1/15/2019 1:00 PM
@WETBATMAN Use copy past and stop loosing time lmao
Avatar
bro
1:00 PM
its 1900 lines
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 1:00 PM
no
1:00 PM
You already came to the permission part
1:00 PM
Do the rest manually lol
Avatar
Deleted User 1/15/2019 1:00 PM
i have 12k line xD
1:01 PM
its fast
1:01 PM
it take 2minutes to copy past 10k line
Avatar
how tf does it take 2 min 😛
1:02 PM
what the fuck is it complaining about its all correct
1:04 PM
i'm gonna cry
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 1:07 PM
`CREATE TABLE IF NOT EXISTS `Players` (`Id`integer NOT NULL PRIMARY KEY AUTO_INCREMENT,`SteamId`integer DEFAULT 0,`Groups`text);` `CREATE TABLE IF NOT EXISTS `Groups` (`Id`integer NOT NULL PRIMARY KEY AUTO_INCREMENT,`GroupName`text NOT NULL,`Permissions` text);` (edited)
1:07 PM
Use these before inserting
1:08 PM
and remove the CREATE TABLE command from your SQL file. It will work then 😄 (edited)
Avatar
got as far as to import the db
1:38 PM
but now i get this
1:38 PM
1:38 PM
and the plugin only lists 2 groups when there should be 3
2:09 PM
FUCK
2:09 PM
YEAAAAAAAAH
2:10 PM
finally moved this fucking database
2:15 PM
thx @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 it looks like the groups created in mysql have different names and that is why it didnt work
Avatar
MariaDB ❤
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 2:40 PM
Yea.. Foppa knows what is good
Avatar
cant wait to do all this again with arkshop ❤
Avatar
ummm
3:17 PM
does mysql take some time to update or what ?
3:17 PM
cant revoke permissions for one of my groups
3:34 PM
umm
Avatar
i cant seem to be able to revoke a permission or delete a group now that its mysql
4:07 PM
4:07 PM
although my setup seems correct
4:07 PM
tried both rcon and ingame
4:08 PM
tested it before and added an admins permission to the admin group and that worked fine
Avatar
i can add any group/permission but cant delete any
Avatar
you do it via commands?
Avatar
yes
4:36 PM
tried both rcon and ingame
Avatar
any errors in console then? (edited)
4:38 PM
reports success but the group is never removed
4:38 PM
Avatar
it's not a console though
Avatar
have tried from console too does the same thing
Avatar
server console i mean
Avatar
if you wish i can go ingame try it again and screenshot it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/15/2019 4:40 PM
He means the actual console - the black window opening on startup 😄 (edited)
Avatar
ah right
4:42 PM
nothing
4:44 PM
4:44 PM
i even had this moderator group removed in the sqlite file and it did not show up when i did permissions.listgroups
4:45 PM
but when i converted db now it appers
Avatar
that weird, only this one doesn't work?
Avatar
only removal of groups does not work
Avatar
maybe something happened in the converting process
Avatar
i tried to add a test group just now which worked fine
4:45 PM
but i cannot remove it
4:46 PM
adding permissions also works fine
Avatar
well.. does the account for your api user to write?
Avatar
yes its root
4:46 PM
Well that's weird then.
Avatar
also i made the plugin create the tables first before i moved them
4:47 PM
so i doubt anything is corrupted
Avatar
Deleted User 1/15/2019 4:47 PM
@WETBATMAN try this go to User and privileges and Root
4:47 PM
Change Limit to host matching
4:47 PM
change from localhost
4:47 PM
to %
Avatar
but it has write permission when i added the test group it was immediately updated
Avatar
Yeah that should be done if you want the account to have 0% security 😃
Avatar
Deleted User 1/15/2019 4:48 PM
its just the remote connection
Avatar
it's all connections
Avatar
Deleted User 1/15/2019 4:48 PM
All connection with the good password
Avatar
Anyway, do you run your mysql on the same machines as the servers?
Avatar
yes i do
Avatar
change localhost -> 127.0.0.1
Avatar
does that do anything ?
Avatar
even though localhost should works
Avatar
it does it writes to db
Avatar
Have you tried before the actually migration?
Avatar
i created a test group and it was immediately written into the db
4:50 PM
but i cannot remove it
Avatar
Deleted User 1/15/2019 4:50 PM
when you go cheat Permissions.ListGroups
4:50 PM
it give you the list of existing groups ?
Avatar
yes
Avatar
Deleted User 1/15/2019 4:51 PM
so it can read and write on the db
4:51 PM
Oo
4:51 PM
look
4:51 PM
i run the command to remove it
4:51 PM
plugin reports success
4:51 PM
but the group still exists
Avatar
hehe i know why
4:51 PM
but i have a work around for ya
Avatar
why tho ?
Avatar
well work around: DELETE FROM PermissionGroups WHERE Id = <ID OF YOUR GROUP> (edited)
4:54 PM
Since it's mysql 😃 i don't see the needs to have the commands 😛
Avatar
i dont actually care about those groups its just i was wondering if this would compromise anything else
Avatar
i will try in my test system
Avatar
Deleted User 1/15/2019 4:56 PM
@WETBATMAN are you using Navicat ?
Avatar
nop
Avatar
Deleted User 1/15/2019 4:57 PM
Well dumb ass way xD use navicat to connect to your db go to the groups table right lcick delete the record
4:57 PM
click
4:57 PM
xD
Avatar
*drop all tables
Avatar
It doesn't remove for me either 😃
Avatar
Deleted User 1/15/2019 5:01 PM
lol let me test too
5:03 PM
it work for me
Avatar
@Michidu I'm not sure if it should be a ? sign in this section. should be something connect to the FString "group" { db_.execute(fmt::format("DELETE FROM PermissionGroups WHERE GroupName = '?';", group.ToString())); }
Avatar
? is fine here
5:13 PM
but it doesn't give any errors
Avatar
@Foppa you use legacy auth or the other one ?
5:17 PM
because i could not get it to connect with the normal one i had to install it under legacy
5:21 PM
what do you use for sql management i use MySQL workbench and its kinda unintuitive
Avatar
Well im not using the Microsoft distribution. I have a clean MySQL on linux 😃
👍 1
Avatar
hmm 😛
Avatar
So i only do queries
Avatar
so to delete a group i only run the commands ?
5:26 PM
DELETE FROM PermissionGroups WHERE Id = <ID OF YOUR GROUP>
Avatar
but what about if any players were in that group ?
Avatar
Just make a select first to get th id of the group
5:26 PM
should be 5
Avatar
Yes correct
5:27 PM
Well yeah if there is members you needs to remove them from the group first
Avatar
but there does not seem to be a command which returns which players are in that group 😦
5:31 PM
5:31 PM
i see some steam id's arent in any group
5:32 PM
could permissions be failing to add them ?
5:33 PM
something is up here all those entries are new players
5:33 PM
(connected after i switched to mysql)
5:33 PM
and they arent placed in any group
Avatar
Deleted User 1/15/2019 5:37 PM
I think that your db have something wrong with the export
5:37 PM
Also if you are using public permissions from the forum you need to add default to groups in player table
Avatar
default groups exist already
5:38 PM
it automatically creates admins and Default
Avatar
Deleted User 1/15/2019 5:38 PM
No not on playergroups table
5:39 PM
In players table the groups colum should have default group as a default value
5:39 PM
PermissionGroup colum
Avatar
where to check that
Avatar
Deleted User 1/15/2019 5:40 PM
In the table settings
5:40 PM
That why i told you to use navicat
5:41 PM
settings look like this
Avatar
Deleted User 1/15/2019 5:42 PM
Default expression
5:42 PM
Should be default
Avatar
PermissionGroups Default = Default ?
Avatar
Deleted User 1/15/2019 5:42 PM
Yes
5:42 PM
This way each time a player is created in the db
5:42 PM
He got default group auto
Avatar
is it just Default or Default,
Avatar
Deleted User 1/15/2019 5:43 PM
The secoond one if my memory is good
5:44 PM
Its been ling time that i setup everything to use mysql
5:44 PM
I think it Default,
Avatar
any other settings i'm missing maybe ?
Avatar
Deleted User 1/15/2019 5:46 PM
I dont think so im not using permissions from the forum so im not sure
Avatar
what do you mean not from the forum 😛
Avatar
Deleted User 1/15/2019 5:47 PM
My permissions was edited
Avatar
hmm wondering if i missed something else and that is why it cant remove the group
Avatar
Deleted User 1/15/2019 5:48 PM
I think your db was corrupted during the export
Avatar
no the data is fine
5:48 PM
one thing that i think can be missing is the default rules and stuff like that
Avatar
Deleted User 1/15/2019 5:48 PM
The data are not fine
5:49 PM
All your player have permissionsGroup colum empty
Avatar
not all
5:49 PM
some of them
5:49 PM
i fixed it right now by adding default, to them
5:50 PM
now that the rule is set it will add them auto
Avatar
Deleted User 1/15/2019 5:50 PM
Thzy should all have at least default group
Avatar
yea the default thing was not set
5:50 PM
and i know why
5:50 PM
okay so Groups has Default=Default,
5:50 PM
SteamID=0
5:51 PM
ID cant be null
5:51 PM
that should be all the rules
5:55 PM
any difference between INTG and BIGINTG ? (edited)
Avatar
does collate nocase have to be enabled in mysql or is it already default behavior ?
Avatar
@Deleted User can you please screenshot the settings of your tables and send them ?
Avatar
Deleted User 1/15/2019 6:36 PM
I send you that when im home
6:36 PM
But me i have the same table for shop and permissions
Avatar
all good
6:37 PM
i just wanna see the format is stores them in
Avatar
Deleted User 1/15/2019 6:39 PM
I send you that in 30min max
Avatar
Deleted User 1/15/2019 7:08 PM
@WETBATMAN
Avatar
can you also send permission groups ?
Avatar
Deleted User 1/15/2019 7:12 PM
Avatar
thx
Avatar
Deleted User 1/15/2019 7:13 PM
you'r welcome
Avatar
looking at the db settings i have everything correct now
7:39 PM
except maybe indexes ?
7:45 PM
alright adding/removing players from groups works
7:46 PM
the only thing that still does not work is removing aa group 😦
Avatar
Deleted User 1/15/2019 7:53 PM
thats weird
Avatar
yea my settings are correct now and i confirmed it adds new players correctly
7:54 PM
foppa has that too so i guess its just a bug (edited)
Avatar
@Kamio has this issue too so yea its a bug
Avatar
@WETBATMAN @Deleted User The Default group don't need to be added on players. Everyone has it built-in. If you want to remove a group manually from all players: UPDATE Players SET PermissionGroups = '' WHERE PermissionGroups LIKE "%<YOURGROUP>%"; Though it's not 100% perfect. if some has the group and something else they will loose the other groups. But i yeah it's something that could be for use.
Avatar
Deleted User 1/16/2019 7:40 AM
The default crash should be add to the table cause when the plugin create it, it dont give a default value to that column (edited)
Avatar
no my issue was that the default value was not set at all and because of this new players did not get placed into any group at all
Avatar
Deleted User 1/16/2019 7:54 AM
Yeah it was the same for me
Avatar
any decent ammo pool or alike mods ??
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/16/2019 11:50 AM
Damn... M2 these days
Avatar
is there anything related to json that should be unloaded if the plugin is unloaded ?
12:44 PM
12:44 PM
or is only a load function necessary
Avatar
you dont need to do anything with json in unload function
1:23 PM
about to compile but says function overloaded
Avatar
looks like function defination and declaration are different
Avatar
weird i used hook generator from ownprox
Avatar
check them
Avatar
damn wtf i had 4 errors restarted visual studio and now i have 6 😦
1:50 PM
restarted again and now 2 errors ? 😄
Avatar
don't restart it anymore just in case 😃
Avatar
yeah lol
1:51 PM
for some reason it was complaining that TargettingTeamField was not found in AActor
Avatar
its still here
Avatar
i think i know what is causing this
1:53 PM
bool Hook_APrimalDinoCharacter_CancelCurrentAttack(APrimalDinoCharacter* _this, bool bStopCurrentAttackAnim, float AttackAnimBlendOutTime, AController* EventInstigator, AShooterPlayerController* player_controller)
1:54 PM
i added the EventInstigator and Player_controler
1:54 PM
or is that not allowed ?
Avatar
added? you cant add anything to hooks
Avatar
how else can declare AShooterPlayerController as player_controller ?
Avatar
you mean you added names? It's fine as long as you don't add new arguments 😃
1:57 PM
how it looks in hook generator?
1:57 PM
i think it does it for you
Avatar
bool Hook_APrimalDinoCharacter_CancelCurrentAttack(APrimalDinoCharacter* _this, bool bStopCurrentAttackAnim, float AttackAnimBlendOutTime)
1:57 PM
this is the original one
Avatar
show full output, including declare hook
Avatar
DECLARE_HOOK(APrimalDinoCharacter_CancelCurrentAttack, bool, APrimalDinoCharacter*, bool, float); bool Hook_APrimalDinoCharacter_CancelCurrentAttack(APrimalDinoCharacter* _this, bool bStopCurrentAttackAnim, float AttackAnimBlendOutTime) { return APrimalDinoCharacter_CancelCurrentAttack_original(_this, bStopCurrentAttackAnim, AttackAnimBlendOutTime); } ArkApi::GetHooks().SetHook("APrimalDinoCharacter.CancelCurrentAttack", &Hook_APrimalDinoCharacter_CancelCurrentAttack, &APrimalDinoCharacter_CancelCurrentAttack_original); ArkApi::GetHooks().DisableHook("APrimalDinoCharacter.CancelCurrentAttack", &Hook_APrimalDinoCharacter_CancelCurrentAttack);
1:58 PM
wait i have to add it to the first hook too no ?
Avatar
i don't see EventInstigator or player here 😃
1:59 PM
means it's not here
1:59 PM
and of course you can't just add them
Avatar
aw damn
2:00 PM
2:00 PM
how else do i declare names for those ?
2:01 PM
or i cant use event instigator entirely ?
Avatar
you have only dino here
2:02 PM
you can get something from dino if you need
Avatar
so instead of event instigator something dino related ? (edited)
Avatar
what you are trying to do?
Avatar
block secondary attack if a dragon is near enemy structures
Avatar
block dino attack?
Avatar
yea secondary attack
2:04 PM
its fire breath and goes through walls
Avatar
so you need to disable dragon attacks if he is near enemy buildings
Avatar
yes
2:05 PM
preferably only one (edited)
2:05 PM
it has 2 attacks
2:05 PM
bite and fire breath
Avatar
this hook won't help you, probably it's better to hook aprimalstructure_takedamage instead. Then check if attacker is dragon
2:07 PM
probably you can get damage type too but i haven't tried to do it yet
Avatar
What is the ATLAS RCON socket message encoding?
Avatar
yeah but due to my other plugin dragons cant damage structures so i assume that hook wont activate ?
Avatar
modify your other plugin then
2:09 PM
default encoding is ASCII probably
Avatar
but why is there no other way to detect if its a dragon ?
Avatar
this one probably the easiest
Avatar
but tamed dragons dont damage metal anyways so it still wont activate ?
Avatar
it can if your lucky, depends on hook order
Avatar
what is different about doing it this way though
Avatar
hooking CancelCurrentAttack? it won't work at all
Avatar
what do you mean
Avatar
that it won't work for your task 😃
Avatar
does it only work for players then or what ?
Avatar
this function can be called only when attack is already being canceled (edited)
2:15 PM
DECLARE_HOOK(APrimalDinoCharacter_CanAttack, bool, APrimalDinoCharacter*, int);
2:15 PM
what about this one ?
Avatar
might work if you can find dino target
Avatar
just check if its near enemy structures ?
2:16 PM
took code from you arkhomes 😛
Avatar
ASCII doesn't support Chinese, right?
Avatar
dont think so that's why we had unicode rcon
2:21 PM
for ark
Avatar
I use C # for socket to receive messages, Chinese is always? ? ?
2:23 PM
Maybe I should see the source code for ark rcon?
Avatar
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
thank you
Avatar
does dll main have to be removed from the projects source files or am i doing something wrong
Avatar
you need to have only one dllmain
Avatar
yea it said it was already defined in the main .cpp file
4:30 PM
if i cant add it to the hook how should i declare EventInstigator & player_controller; ? (edited)
Avatar
You dont have them
Avatar
like not use them at all ?
Avatar
As i said you can use this hook only if you can find Dino target from the Dino himself
Avatar
CanAttack or Cancel Attack ?
Avatar
how should i go about it first see if its a dragon and then check what its attacking ?
Avatar
yes, there should be target variable
Avatar
attack index ?
Avatar
its an int
Avatar
damn i cant even see any plugins that use target detection
Avatar
no one use it
5:55 PM
any other way to go about this ?
Avatar
takedamage hook
Avatar
but as you said it sometimes works and sometimes does not 😛
Avatar
because of your other plugin
Avatar
yeah but it does not damage metal anyway so the outcome will be the same
Avatar
dragons dont damage metal
5:58 PM
only stone
Avatar
how it affects you?
Avatar
if my plugin is interacting with this one by making them not damage any structure wont the outcome be the same ?
Avatar
modify your other plugin or disable it heh
Avatar
what interacts with the current plugin dragons not being able to damage something or the same hook interacting with this one ?
6:03 PM
doesnt the dragon need to actually damage the structure to activate this hook ?
Avatar
so that's what i'm telling you 😛
6:03 PM
they dont damage metal without ANY plugins
Avatar
that what you need to do i thought - "disable dragon attacks if he is near enemy buildings" if dragon can't attack metal, it's fine i guess 😃 (edited)
Avatar
i want to disable the attack because their flame has a terrible hitbox and it kills everything THROUGH the wall
6:06 PM
not that it damages the structure itself
Avatar
possible, the hook will be called on other stuctures if they are damaged and not metal
Avatar
flame does not break any structures
6:08 PM
only bite
6:08 PM
unless its wild 😛
Avatar
takedamage called for every damage
Avatar
is there no way to integrate the check from arkhomes though
6:09 PM
my other plugin is finally working fine i dont want to break it for this
Avatar
you can try to hook deal damage function instead (not sure how exactly it called)
Avatar
+ it can be abused by placing something near the dragon and it will not attack anymore 😛
6:10 PM
which class is it
6:10 PM
AAactor ?
Avatar
dino
Avatar
APrimalDinoCharacter ?
Avatar
maybe, you actually need to find such function
6:12 PM
it's just an idea 😃
Avatar
maybe hook something like deal damage ?
6:13 PM
or a function that triggers an attack ?
6:13 PM
then check if its a dragon ?
6:13 PM
DECLARE_HOOK(APrimalDinoCharacter_DoAttack, bool, APrimalDinoCharacter*, int, bool, bool); ?
Avatar
that what i suggested 😃
6:13 PM
yes, try
Avatar
whoops misread it
6:16 PM
bool Hook_APrimalDinoCharacter_DoAttack(APrimalDinoCharacter* _this, int AttackIndex, bool bSetCurrentAttack, bool bInterruptCurrentAttack)
6:16 PM
so i can only use whatever is in this Bool ?
6:24 PM
?
Avatar
good start
Avatar
i ripped some code from arkhomes about enemy structure detection but i dont know how to define player_controller
6:26 PM
in a statement here
6:26 PM
since i can only use whatever is in that bool
Avatar
looks like need to get target again
Avatar
-_-
6:30 PM
attack index is used for that ?
Avatar
detection code needs to be something with APrimalDinoCharacter ?
Avatar
damn i wish there was at least a template or something about this dont even know where to start 😦
Avatar
Rogue Leader 1/16/2019 7:32 PM
You can use dpp as a template.
7:33 PM
It has the ability to check for enemy structures in a radius.
7:34 PM
Then you can use the takedamage hook to stop damage if it's from a dragon near an enemy structure.
7:34 PM
As for checking which attack it is, idk. You can debug and see if damagecauser or eventinstigator changes based on the attack.
Avatar
i used enemy structure detection from michidu's code but it relies on AShooterPlayerController
7:37 PM
bool Hook_APrimalDinoCharacter_DoAttack(APrimalDinoCharacter* _this, int AttackIndex, bool bSetCurrentAttack, bool bInterruptCurrentAttack)
7:37 PM
this hook only has APrimalDinoCharacter
Avatar
Rogue Leader 1/16/2019 7:37 PM
Do you know what that hook does?
Avatar
not entirely sure
7:38 PM
probably triggers upon an attack being casted
Avatar
Rogue Leader 1/16/2019 7:39 PM
It's probably just the function that allows the AI to determine whether to retaliate an attack
7:39 PM
But idk, it's signature isn't descriptive enough
7:41 PM
I'd recommend using aprimaldinocharacter and ashooterplayercontroller takedamage hooks instead.
7:42 PM
And if a dino or player takes damage from a dragon that is near an enemy structure then negate it.
7:42 PM
Then work on figuring out how to determine what attack was used if possible.
7:43 PM
It would just render dragons useless near enemy structures. (edited)
Avatar
so both hooks have to be used ye ?
7:44 PM
one for players and one for dinos ?
Avatar
Rogue Leader 1/16/2019 7:46 PM
Yea if you're trying to stop damage to both
7:47 PM
And they would be identical except for signatures for the return statements and function signatures
Avatar
UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, _this->RootComponentField()->RelativeLocationField(), static_cast<float>((DinoPassiveProtection::MinimumEnemyStructureDistanceInFoundations * 300)), &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors); for (const auto& actor : new_actors) { APrimalStructure* structure = static_cast<APrimalStructure*>(actor); //Log::GetLog()->warn(FVector::Distance(_this->RootComponentField()->RelativeLocationField(), actor->RootComponentField()->RelativeLocationField())); if (structure->TargetingTeamField() != _this->TargetingTeamField()) { isNotNearEnemyStructures = false; break; } else { isNotNearEnemyStructures = true; } }
8:00 PM
this is the enemy structure detection code ye ?
Avatar
bool IsEnemyStructureNear(AShooterPlayerController* player_controller, int radius) { UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, ArkApi::IApiUtils::GetPosition(player_controller), static_cast<float>(radius), &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors); for (const auto& actor : new_actors) { APrimalStructure* structure = static_cast<APrimalStructure*>(actor); if (structure->TargetingTeamField() != player_controller->TargetingTeamField()) return true; } return false; }
8:13 PM
i'm using this atm
8:43 PM
run into the same issue cant declare player_controller
Avatar
Rogue Leader 1/16/2019 9:54 PM
Mine doesn't use one
Avatar
what exactly is changed in API 3.0's requests ?
3:24 PM
the wiki does not seem to be updated
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 have you converted AntiFamilyShare to api 3.0 yet? std::string apiKey = config["APIKey"]; API::Requests::Get().CreateGetRequest(fmt::format("http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key={}&steamid={}&appid_playing=346110&format=json", apiKey, steamId), std::function<void > & isPlayingSharedGame); i have something like this but i'm retarded and cant get it to work
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 5:14 PM
I haven't converted it to API version 3.0 since no one really seems to be using the newer version of the API yet
5:14 PM
ownprox is but he's using std::bind which is useless in this case i think
Avatar
which is not true ^^
5:15 PM
requests in wiki were already updated btw
Avatar
bool CreateGetRequest(const std::string& url, const std::function<void(bool, std::string)>& callback);
5:16 PM
this is the one in the wiki
5:16 PM
Api::Requests::CreateGetRequest(std::string& url, const std::function<void(bool, std::string)>& isPlayingSharedGame);
5:16 PM
and this is the one adrian is using
5:16 PM
but with api 3.0 it fails to compile
5:17 PM
std::string = type name is not allowed
5:17 PM
in examples you can find updated one
Avatar
yeah this one
5:20 PM
so does it have to contain the full url now ?
5:20 PM
std::string does not seem to work
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 5:24 PM
What does your code currently looks like?
Avatar
API::Requests::Get().CreateGetRequest(fmt::format( "http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key={}&steamid={}&appid_playing=346110&format=json", apiKey, steamId), std::bind(& isPlayingSharedGame);
Avatar
bool CreateGetRequest(const std::string& url, const std::function<void(bool, std::string)>& callback);
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 5:26 PM
fmt::format is giving you a std::wstring btw
Avatar
its still this
5:26 PM
lol are you updating it now 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 5:27 PM
Nope not today
5:27 PM
lol
5:27 PM
but im trying to help you
Avatar
no i asked michidu
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 5:27 PM
oh sorry
5:27 PM
lmao
Avatar
site had a line with Pointer to requests and now its gone 😛 (edited)
Avatar
yea, but it still was correct 😄
Avatar
API::Requests::Get().CreateGetRequest(std::string& url, const std::function<void(bool, std::string)>& isPlayingSharedGame);
5:28 PM
still does not work if it is correct
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 😃
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 5:30 PM
He doesn't want my help 😦
Avatar
if only the pointer is changed it should work now 😛
Avatar
i'm sure he wants 😉
5:31 PM
lel
Avatar
no one saw it (edited)
Avatar
i did XD
5:32 PM
5:33 PM
when you dont have discord nitro so you have to use png's
5:33 PM
🤷
5:33 PM
anyway so is it just the pointer that was changed ?
Avatar
no, wiki was always correct. I just removed pointer section because it useless and incorrect 😃
5:34 PM
since it wasn't even a pointer
Avatar
so whats the change in requests from 2.9 to 3.0 (if any) ? (edited)
Avatar
3.0 uses curl
5:37 PM
so requests were completely rewritten 😃
Avatar
but if the wiki was always correct than this request should be correct too
5:44 PM
tf
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 6:07 PM
You may still need to include Request.h but thats the updated code:
6:07 PM
void Hook_AShooterGameMode_PreLogin(AShooterGameMode* _this, FString* Options, FString* Address, TSharedPtr<FUniqueNetId, 0>* UniqueId, FString* authToken, FString* ErrorMessage) { const uint64 steamId = static_cast<FUniqueNetIdSteam*>(UniqueId->Get())->UniqueNetId; std::string apiKey = config["APIKey"]; FString url = FString::Format( "http://api.steampowered.com/IPlayerService/IsPlayingSharedGame/v0001/?key={}&steamid={}&appid_playing=346110&format=json", apiKey, steamId); API::Requests::Get().CreateGetRequest(url.ToString(), [steamId](bool success, std::string response) { isPlayingSharedGame(success, response, steamId); }); AShooterGameMode_PreLogin_original(_this, Options, Address, UniqueId, authToken, ErrorMessage); }
💯 1
6:07 PM
void isPlayingSharedGame(bool success, std::string response, uint64 steamId) { if (success) { if (!response.empty() && !response.find("Forbidden")) { nlohmann::json parsedResponse = nlohmann::json::parse(response); const uint64 lenderSteamId = std::stoull( static_cast<std::string>(parsedResponse["response"]["lender_steamid"]), nullptr); if (lenderSteamId != 0) { if (!VectorContains(steamId)) { familysharing.push_back(steamId); } } } else { Log::GetLog()->warn("Please check your config for a valid API Key"); } } else { Log::GetLog()->warn("API Limit reached(100.000 per 24h) / Steam API down"); } }
Avatar
so what exactly was causing it not to compile with api 3 ?
6:08 PM
and thanks for posting the source ofc
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 6:09 PM
Like Michidu said; Version 3.0 brought us a new library called CURL (you might know it from linux).. ofc the usage of the library is different
Avatar
hmm getting a linker error
6:14 PM
nvm i think i have DLLMAIN twice
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 6:14 PM
again? haha 😄
Avatar
yeah that was the case 😛
6:15 PM
thank you!
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 6:15 PM
you're welcome 😃
6:22 PM
hmm weird
Avatar
probably you dont have dllmain at all now 😄
6:22 PM
isnt this supposed to be it ?
Avatar
looks so
Avatar
its in the main source
Avatar
Deleted User 1/17/2019 6:24 PM
Never mind
Avatar
look at my screenshot it says API 3.0 😛
Avatar
Deleted User 1/17/2019 6:24 PM
I just saw 3.0
6:25 PM
6:26 PM
I was using copy past and replace files to update the api
6:26 PM
But didn't want to update until i deleted all files and unziped the api again
Avatar
so what's this error attributed to ?
Avatar
Deleted User 1/17/2019 7:28 PM
For me it was the fact that i was not using the last api version for you i dont know
7:28 PM
xD
Avatar
try to compile with new library maybe
Avatar
ARK-Server-API-master\out_lib
7:41 PM
i have this set in the linker
7:41 PM
api 3.0
Avatar
Deleted User 1/17/2019 9:04 PM
@WETBATMAN
9:04 PM
Lmaooo
9:05 PM
what are you trying to compile 😛
Avatar
Deleted User 1/17/2019 9:05 PM
My lootbox xD
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 9:06 PM
Seems like you included 2 different header
9:06 PM
Maybe 1 from old 1 new or New Atlas and New Ark
Avatar
Deleted User 1/17/2019 9:06 PM
Oh
9:07 PM
i didn't remove the ark headers
9:07 PM
lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 9:07 PM
😄
Avatar
Deleted User 1/17/2019 9:07 PM
lmaooo 200IQ
9:11 PM
Fuck it taked me 500hours to compile with ark api
9:11 PM
now i will need 1k hour to compile with atlas
9:11 PM
lol
Avatar
any idea what this entry point issue is ?
9:12 PM
old version of AntiFamilySharing throws the same error with new api
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 9:13 PM
Which version of API are you using?
Avatar
3.0
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/17/2019 9:13 PM
Old is compatible with 2.9 - if you trying to run it with 3.0 idk what would happen.. lel
Avatar
yeah that's the thing it throws the same error with 3.0 api
9:14 PM
same with this new source you posted
Avatar
Deleted User 1/17/2019 9:20 PM
Ok im looking for IQ to buy if you found an ebay annoucement of someone selling IQ
Avatar
float Hook_APrimalDinoCharacter_TakeDamage(APrimalDinoCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { ACharacter* character = EventInstigator->CharacterField(); const int enemy_min_distance = AntiFireBreath::config["General"]["EnemyStructureMinDistance"]; if (character != nullptr && character && character->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) { APrimalDinoCharacter* dino = static_cast<APrimalDinoCharacter*>(character); FString descr; dino->GetDinoDescriptiveName(&descr); if (descr.Contains(L"Dragon") || descr.Contains(L"Raphus") || descr.Contains(L"Primordius")) return 0; } return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
1:10 PM
would something like this make the target not take damage ?
1:10 PM
if attacker is a dragon ?
Avatar
it indeed does prevent a dragon from dealing damage to anything but if something else hits the target it crashes the server 😛
Avatar
it would prevent other dinos getting damage (edited)
Avatar
yeah i got that part to finally work
1:52 PM
{ return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
1:52 PM
i forgot this LOL
1:53 PM
now onto enemy structure detection...
3:38 PM
wtf
Avatar
Deleted User 1/18/2019 3:41 PM
lmao
Avatar
damn i cant get this enemy structure detection to work 😦
3:42 PM
either everything takes damage or nothing 😛
4:06 PM
my enemy structure detection code looks like this
4:06 PM
but it does not seem to work as i cant damage any dino regardless if its near an enemy foundation or not (edited)
4:06 PM
what am i doing wrong ?
Avatar
Rogue Leader 1/18/2019 5:11 PM
You need a return statement after your for loop
Avatar
will return 0 not do ?
Avatar
Rogue Leader 1/18/2019 5:12 PM
And one after your first if block
Avatar
Rogue Leader 1/18/2019 5:13 PM
You need a return statement at every point of your logic where there is an end (edited)
Avatar
this is what it looks like right now
Avatar
Rogue Leader 1/18/2019 5:14 PM
Mentally run through all the possibilities in your logic. Is there a return statement at all the ends?
Avatar
well first detection is if its an event instigator
Avatar
Rogue Leader 1/18/2019 5:14 PM
If certain if conditions do not pass, does it still hit a return statement?
5:15 PM
Remember, you are intercepting the original function call, so if you do not tell your hook to return to it once your hook determines it's not needed it will do nothing.
Avatar
hmm interesting
5:16 PM
so for every IF statement there needs to be a return one
5:16 PM
?
Avatar
Rogue Leader 1/18/2019 5:17 PM
Not necessarily. There needs to be a return at every logical end of your logic though. (edited)
Avatar
i assume its not required for stuff like if (EventInstigator && EventInstigator->CharacterField()) ?
Avatar
Rogue Leader 1/18/2019 5:18 PM
What happens if your second if block doesn't execute?
Avatar
second block ?
5:19 PM
the structure detection ?
Avatar
Rogue Leader 1/18/2019 5:19 PM
if(something){----this is a block---}
Avatar
if (EventInstigator && EventInstigator->CharacterField()) { ACharacter* character = EventInstigator->CharacterField(); if (character != nullptr && character && character->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) { APrimalDinoCharacter* dino = static_cast<APrimalDinoCharacter*>(character); FString descr; dino->GetDinoDescriptiveName(&descr); if (descr.Contains(L"Direwolf") || descr.Contains(L"Wyvern") || descr.Contains(L"Broodmother")) { UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, EventInstigator->RootComponentField()->RelativeLocationField(), static_cast<float>((AntiFireBreath::MinimumEnemyStructureDistanceInFoundations * 300)), &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors); for (const auto& actor : new_actors) { APrimalStructure* structure = static_cast<APrimalStructure*>(actor); Log::GetLog()->warn(FVector::Distance(_this->RootComponentField()->RelativeLocationField(), actor->RootComponentField()->RelativeLocationField())); if (structure->TargetingTeamField() != _this->TargetingTeamField()) { return 0; } else { return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } } } } }
5:20 PM
well if it does not execute i would assume nothing happens
Avatar
Rogue Leader 1/18/2019 5:22 PM
Does it return anything if it doesn't execute?
5:22 PM
I can't match up the braces well on mobile.
5:23 PM
5:23 PM
well it checks if it indeed is a dino
Avatar
Rogue Leader 1/18/2019 5:27 PM
Your structure detection has errors in it
5:27 PM
You are checking if the attacked dinos tribe matches the structure
Avatar
switch to damage causer instead of _this ?
Avatar
Rogue Leader 1/18/2019 5:29 PM
Or event instigator
5:29 PM
Idk which will be the dino that's attacking (edited)
Avatar
yeah it should be eventinstigator
5:30 PM
if (structure->TargetingTeamField() !=EventInstigator->TargetingTeamField())
5:30 PM
something like this ye ?
Avatar
Rogue Leader 1/18/2019 5:31 PM
Yea
5:32 PM
But remove the else
5:32 PM
Otherwise it will only check a single structure then return 0 or original
Avatar
hmm i have some returns missing i assume because i loaded this build and i cant damage ANY dino
Avatar
Rogue Leader 1/18/2019 5:36 PM
Correct
5:37 PM
Follow your code logically. Make sure that every situation/flow of logic has a return it will reach.
5:37 PM
That's dev 101.
Avatar
how do i go about returning the original value
5:37 PM
return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser);
5:37 PM
just this ?
Avatar
Rogue Leader 1/18/2019 5:37 PM
Yup
Avatar
does it need else {return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
5:38 PM
or just return it without that where its necessary ?
Avatar
Rogue Leader 1/18/2019 5:39 PM
Shouldn't need an else.
5:39 PM
It may be as simple as putting it after your first if blocks closing brace (edited)
Avatar
tried that and it blocked all dmg 😛
5:39 PM
putting it after the second one allows all dmg
Avatar
Rogue Leader 1/18/2019 5:40 PM
Your structure logic was broken then
5:40 PM
So all results before you fixed it were wrong (edited)
Avatar
i got it to display the distance in the console once but it did not actually prevent the dmg
5:41 PM
then i tossed shit around in the code and now it does not even do that
Avatar
maybe @GSH | MrOwlSky ?
Avatar
damn whatever i do and wherever i place the return statement it just does not work
Avatar
GSH | MrOwlSky 1/18/2019 6:29 PM
@NameIdeas
Avatar
Good Morning ^_^, looking over the API stuff
Avatar
good morning
Avatar
Deleted User 1/18/2019 7:03 PM
Good evening
Avatar
GSH | MrOwlSky 1/18/2019 7:56 PM
Good morning @NEP_PROP
Avatar
ImmutableLambda 1/18/2019 7:57 PM
Hey all. I'm just trying to get the basic DLL building and am running into a set of build errors: 1>dllmain.cpp 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(24): error C2039: '_InterlockedIncrement64': is not a member of '`global namespace'' 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(24): error C3861: '_InterlockedIncrement64': identifier not found 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(48): error C2039: '_InterlockedDecrement64': is not a member of '`global namespace'' 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(48): error C3861: '_InterlockedDecrement64': identifier not found 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(72): error C2039: '_InterlockedExchangeAdd64': is not a member of '`global namespace'' 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(72): error C3861: '_InterlockedExchangeAdd64': identifier not found 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(95): error C2039: '_InterlockedExchange64': is not a member of '`global namespace'' 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(95): error C3861: '_InterlockedExchange64': identifier not found 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(112): error C2039: '_InterlockedExchange64': is not a member of '`global namespace'' 1>d:\wf\arkmodding\ark-server-api\version\core\public\api\ue\windows\windowsplatformatomics.h(112): error C3861: '_InterlockedExchange64': identifier not found
7:57 PM
Wondering if this is just something I'm doing wrong.
Avatar
ImmutableLambda 1/18/2019 8:27 PM
Nvm
Avatar
probably VS was outdated or you didn't enable c++ 17 support
Avatar
ImmutableLambda 1/18/2019 8:28 PM
Nah its actually even dumber
8:29 PM
But I figured it out after looking at intrin0.h
9:15 PM
damn what is wrong with this hook i've tried everything (it compiles fine but all dinos still take damage when it should prevent dmg near enemy structures)
Avatar
Rogue Leader 1/18/2019 10:19 PM
Put a bunch of the log warnings in every block to see where it's getting stopped at and print out the variables you are checking
Avatar
thing is its printing out both the distance from foundation AND the name of the attacker
10:20 PM
i'm lost 😛
Avatar
Rogue Leader 1/18/2019 10:22 PM
Print out the tribe ids and you're minimum distance too
10:23 PM
Maybe the calculation for foundation distance is weird
10:23 PM
Mine was based on tests on the island, so it may vary from map to map
Avatar
nop
10:23 PM
when i hit this therizino far from any foundations it does not print out the distance (edited)
10:24 PM
tribe id check works because i can damage wild dinos just fine
10:24 PM
i can damage the dinos by hand too
10:24 PM
that means dino check also works
10:26 PM
it looks like its failing somwhere in the attacker tag check
10:26 PM
cant damage this enemy dino with any other dino
10:30 PM
OH SHIT
10:30 PM
i think i got it
10:31 PM
@Rogue Leader you were right there were not enough return statements
10:32 PM
10:32 PM
seems to work now (edited)
Avatar
Rogue Leader 1/18/2019 10:32 PM
That else statement is still gonna cause issues
10:33 PM
It will return normal damage if the first structure in the list is from the attacking tribe
Avatar
which one
10:33 PM
the one under the structure check ?
Avatar
Rogue Leader 1/18/2019 10:34 PM
You ONLY want to break out of that for loop if it finds a structure that isn't an attacking structure
Avatar
so i add a break before that Else statement ?
10:35 PM
you had one but i think i removed it trying to make it work 😛
Avatar
Rogue Leader 1/18/2019 10:35 PM
no, just remove it
Avatar
without that else it does not work
Avatar
Rogue Leader 1/18/2019 10:35 PM
a return is basically a break statement out of a function but with a value
Avatar
without this else statement one of the checks gets broken
10:36 PM
wait let me test again
Avatar
Rogue Leader 1/18/2019 10:36 PM
you're game will also crash if eventinstagator is null because there is no return in that case
Avatar
Deleted User 1/18/2019 10:37 PM
24hours of negative IQ
Avatar
nvm it seems to work without that else statement
10:37 PM
wait i thought i had a nullpointer check
10:37 PM
if (_this->TargetingTeamField() > 10000 && character != nullptr && character && character->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) ?
Avatar
Rogue Leader 1/18/2019 10:38 PM
you only tell it what to do if it's not null, but not if it is null
10:39 PM
if (EventInstigator && EventInstigator->CharacterField()) { //Do the things } return original; //if EventInstigator = NULL
Avatar
if (EventInstigator=nullptr) { return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
10:39 PM
this ?
Avatar
ImmutableLambda 1/18/2019 10:39 PM
==
10:39 PM
can also do if (!EventInstigator)
Avatar
whoops you're right
Avatar
Rogue Leader 1/18/2019 10:40 PM
if (EventInstigator && EventInstigator->CharacterField()) { //Do the things } return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser);
10:40 PM
no need to check if it's null again. Youre first if already did that
Avatar
so just add a return if its null
10:41 PM
return original
Avatar
Rogue Leader 1/18/2019 10:41 PM
just add a return after the first if block ends
Avatar
all tests passed 😛
10:43 PM
for APrimalCharacter its the same thing ?
10:43 PM
to prevent dmg ?
Avatar
ImmutableLambda 1/18/2019 10:43 PM
If it works for the dino character
Avatar
well it seems to
10:43 PM
😄
10:44 PM
alright now that this is working
10:44 PM
how the fuck do i identify which attack the dragon is using 😛
Avatar
hmm AshooterCharacter Take damage seems to be a bit different
11:03 PM
wild dinos cant damage me and the console reports they're near a structure when they're not
11:08 PM
nvm it kinda works
11:14 PM
everything seems to work
11:14 PM
now i have to figure out a method of detecting only fire breath to block it
Avatar
ImmutableLambda 1/19/2019 12:10 AM
y'all tend to rent a VPS out or something as a test server for dev?
Avatar
Rogue Leader 1/19/2019 12:14 AM
I boot up a vm with a dev edition of windows and use ark server manager
Avatar
ImmutableLambda 1/19/2019 12:16 AM
Not sure if that'd help because I'm not sure whether the issue is that the game & server are clashing or if my PC just can't run both
12:19 AM
might as well try it
Avatar
Rogue Leader 1/19/2019 12:24 AM
Game and server won't clash. Server download is significantly smaller as well
Avatar
ImmutableLambda 1/19/2019 12:25 AM
I dunno its been stuck on trying to read a file for a long time.
Avatar
Rogue Leader 1/19/2019 12:25 AM
I'd recommend using ASM and then forwarding your ports. Just need like 16 gb of ram (edited)
Avatar
ImmutableLambda 1/19/2019 12:26 AM
I attach and pause it so I can see where its at in initialization, parrallel stacks shows all threads waiting except the one trying to load
Avatar
Rogue Leader 1/19/2019 12:26 AM
Sorry, accidentally deleted that trying to edit my message on mobile
Avatar
ImmutableLambda 1/19/2019 12:26 AM
Can't see the filename tho, optimized away. No idea if its making progress but its been like 45 min
12:27 AM
Could compile CoreUObject in that time.
Avatar
Rogue Leader 1/19/2019 12:27 AM
If you're using a HDD it can take over 10 minutes.
12:27 AM
Youre having trouble booting up the server itself?
Avatar
ImmutableLambda 1/19/2019 12:27 AM
Mhmm
12:28 AM
earlier I had the server ready to go and the game wouldn't start. Wouldn't even try. (edited)
12:28 AM
I'm essentially just trying to get a hello world running
Avatar
ImmutableLambda 1/19/2019 12:36 AM
At least I can "race" win install vs ark server init
Avatar
GSH | MrOwlSky 1/19/2019 5:49 AM
Anyone know MySQL Workbench good?
5:49 AM
Got a simple bug I can't wrap my head around on
Avatar
well i have a separate machine built at my house hosting all the live servers so if i need a test environment i just spin a testserver up on that machine
Avatar
GetDamageInstigator(AController * InstigatedBy, UDamageType * DamageType)
11:46 AM
can something like this be used to determine which attack the player is using ?
Avatar
in your hook DamageEvent probably has info about attack type
Avatar
can i log it straight into the console or do i have to initialize it first ?
Avatar
what do you mean with 'initialize' ?
Avatar
i mean how can i log what it outputs into the console
Avatar
you can output only more basic types
Avatar
hmm
Avatar
Deleted User 1/19/2019 6:58 PM
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
6:58 PM
48hours later
Avatar
the best feeling 😛
Avatar
Deleted User 1/19/2019 7:01 PM
nevermind
7:01 PM
i still have another one
Avatar
worst feeling 😛
Avatar
Deleted User 1/19/2019 7:05 PM
it been 48hours
7:05 PM
that im trying
7:05 PM
xD
Avatar
i'm legit going to lose my mind
10:35 AM
finally got some parts of this plugin to work
10:35 AM
didnt change anything
10:35 AM
start testserver
10:35 AM
nothing works
10:35 AM
-_-
Avatar
so when it worked? 😃
Avatar
prevented a dino/player near his own structures taking damage from a dragon
10:39 AM
literally the only thing i did was swap the api version 😛 (edited)
10:40 AM
now i can dmg anything near enemy structures (edited)
Avatar
try older version heh
Avatar
how your code looks?
Avatar
hm, it looks ok actually
Avatar
yea that's what i'm saying (edited)
Avatar
bUseBPDoHarvestAttack why do you need it?
Avatar
i tried to use to maybe see if it was using its special or main attack
11:30 AM
want to only block special if possible
Avatar
maybe you need to remove this check
Avatar
tried without that
11:31 AM
also currently i only had it in APrimalCharacter_TakeDamage (edited)
11:31 AM
so it would not affect dinos
Avatar
also
11:44 AM
OwnProx told me there is a current attack detection function in ark
11:44 AM
but it does not exist in the api
11:44 AM
Avatar
yeah i think it is but i also gave you many other funcs (edited)
11:53 AM
char GetCurrentAttackIndex() { return NativeCall<char>(this, "APrimalDinoAIController.GetCurrentAttackIndex"); }
11:53 AM
may be what u need
11:54 AM
or
11:54 AM
char& CurrentAttackIndexField() { return *GetNativePointerField<char*>(this, "APrimalDinoCharacter.CurrentAttackIndex"); } char& LastAttackIndexField() { return *GetNativePointerField<char*>(this, "APrimalDinoCharacter.LastAttackIndex"); } (edited)
Avatar
Rogue Leader 1/20/2019 10:52 PM
Is it possible to get all possible .ini options for Atlas from the API?
Avatar
they are hard coded in AShooterGameMode::InitGame (edited)
12:10 PM
maybe you can hook functions like GetBoolOptionIni and get options from here
1:47 PM
Always cause the server to crash
1:48 PM
Fatal error! VERSION: 15.21 KERNELBASE.dll!UnknownFunction (0x00007ffbc8e668d8) + 0 bytes [UnknownFile:0] AtlasShop.dll!UnknownFunction (0x00007ffb9b309402) + 0 bytes [UnknownFile:0] AtlasShop.dll!UnknownFunction (0x00007ffb9b3077a7) + 0 bytes [UnknownFile:0] AtlasShop.dll!UnknownFunction (0x00007ffb9b1e4392) + 0 bytes [UnknownFile:0] AtlasShop.dll!UnknownFunction (0x00007ffb9b2a3907) + 0 bytes [UnknownFile:0] VERSION.dll!AtlasApi::Hook_AGameState_DefaultTimer() (0x00007ffb9c296752) + 80 bytes [f:\github\ark-server-api\version\core\private\atlas\hooksimpl.cpp:136] ShooterGameServer.exe!FTimerManager::Tick() (0x00007ff68d4ebb3a) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\timermanager.cpp:1087] ShooterGameServer.exe!UWorld::Tick() (0x00007ff68d38f12d) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\leveltick.cpp:1321] ShooterGameServer.exe!UGameEngine::Tick() (0x00007ff68d32f3a2) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\gameengine.cpp:1181] ShooterGameServer.exe!FEngineLoop::Tick() (0x00007ff68befcd7b) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\launch\private\launchengineloop.cpp:2449] ShooterGameServer.exe!GuardedMain() (0x00007ff68bef7c1d) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\launch\private\launch.cpp:140] ShooterGameServer.exe!GuardedMainWrapper() (0x00007ff68bef7c7a) + 5 bytes [h:\yarkupdatelivereal\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] ShooterGameServer.exe!WinMain() (0x00007ff68befd66a) + 17 bytes [h:\yarkupdatelivereal\engine\source\runtime\launch\private\windows\launchwindows.cpp:209] ShooterGameServer.exe!__tmainCRTStartup() (0x00007ff68e1e478d) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] KERNEL32.DLL!UnknownFunction (0x00007ffbcb55168d) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ffbcba94629) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ffbcba94629) + 0 bytes [UnknownFile:0]
Avatar
Mustacila 🐢 1/21/2019 9:20 PM
Hey guys, is there any hook function that triggers when a player logs out ?
Avatar
@unclema it's your config, however this is not a plugins support discord 😃 (edited)
9:52 AM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Mustacila 🐢 1/22/2019 10:31 AM
Okey sorry 😄 and thank you it worked
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 could you add customizable kick messages into AntiFamilySharing or maybe open source it on github 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/22/2019 1:47 PM
Kick messages dont even work atm.. lol
Avatar
that's weird cause one player told me about seeing the message
1:52 PM
but i run the copy ownprox gave me 😛
Avatar
Rogue Leader 1/22/2019 5:31 PM
@OwnProx How does Atlas differ from Ark in the way it handles grids? Is it one .exe that runs all grids or seperate .exes for each grid?
Avatar
seperate .exes 😃
Avatar
Rogue Leader 1/22/2019 5:39 PM
how are you guys handling the players crossing from grid to grid? a database?
Avatar
same as in ark actually, a db for plugins
Avatar
Rogue Leader 1/22/2019 5:42 PM
and a plugin installed on each server?
5:42 PM
so basically Atlas is just an Ark cluster?
Avatar
yeah, correct
5:43 PM
advanced cluster probably
Avatar
Rogue Leader 1/22/2019 5:43 PM
How drastic were the API class and function changes? (edited)
Avatar
atlas is an older version of ark, only a few new classes
5:45 PM
i haven't noticed any big changes
Avatar
is it possible to fake player count ? 😄
Avatar
yes ownprox’s old ping limiter did that
Avatar
Deleted User 1/22/2019 7:09 PM
Yes
7:09 PM
You can false everything xD
Avatar
(as a bug)
7:10 PM
i would assume if you hook the logout function you can fake the playercount
Avatar
Deleted User 1/22/2019 7:10 PM
Its the bad way to do it
7:10 PM
since if you have a shop + cluster
7:10 PM
players will get the point in all maps
7:10 PM
even if they log off
7:11 PM
you know of a better way ? haha
Avatar
Deleted User 1/22/2019 7:11 PM
You can use Query to false connection
7:11 PM
To create even fake steam and stuff
Avatar
pretty sad that most big server owners do that
Avatar
Deleted User 1/22/2019 7:11 PM
I dont think that people do that
7:11 PM
there is someone that im suspecting
7:11 PM
but im not sure
7:12 PM
so never accuse anyone
Avatar
go look at some servers on akrservers.net
7:12 PM
there are people connected for 70-80 hours
Avatar
Deleted User 1/22/2019 7:12 PM
Its the ping limiter
Avatar
how is that not faked 😃
7:12 PM
yes exactly
Avatar
Deleted User 1/22/2019 7:12 PM
I made most of server that was using ping limiter to cheat
7:12 PM
banned from battlemetric
7:13 PM
xD
Avatar
servers are even being accused of it and admins are bad at lying
Avatar
Deleted User 1/22/2019 7:14 PM
Ofc people will always denie
Avatar
has anyone elses server been timing out recently
7:22 PM
for some reason all of my cluster's crash with !!HANG DETECTED!!
Avatar
@Michidu Alternative Commands seems to be broken on api 3.0
Avatar
You should never fake player count. It's a shame for who ever does that.
Avatar
many do that unfortunately...
Avatar
pretty sure not many can do it
Avatar
Deleted User 1/23/2019 1:53 PM
A lot do it with ping limiter
Avatar
That's a real shame. (edited)
Avatar
Deleted User 1/23/2019 2:38 PM
Yeah i think the same but i also think that some people dont give a fuck about shame and stuff
Avatar
@WETBATMAN probably it's because of new spam prevention 😄
Avatar
api side ?
Avatar
Deleted User 1/23/2019 3:50 PM
yes
Avatar
anything i can do or it requires a plugin side fix
Avatar
you can remove anti spam from api
Avatar
config thing ?
4:08 PM
or would i have to recompile it
Avatar
recompile
4:10 PM
how does anti spam even work it hides commands that dont do anything from the chat ?
Avatar
if messages were sent too often
Avatar
any plans to fix alternative commands though ?
Avatar
soon :) will have to do changes in api anyway
Avatar
ah okay
4:14 PM
thank you!
Avatar
Plugin will automatically restart your server when it crashed. It will also attempt to save the world after the crash (no rollbacks anymore). Notice: Make sure you do a regular backups if you want to use save world function. Configuration: {...
5:41 PM
damn this plugin looks lit
5:42 PM
so its fully safe if we have saveworld at false ?
Avatar
yeah, if you don't want to participate in the experiment 😄
Avatar
i would but i back my server up every 3 days 😛
5:46 PM
what's the worst that can happen worldsave gets corrupt ?
Avatar
yeah, however it shouldn't happen
Avatar
if you were to rate it on a percentage scale what percent would you give it 😛
5:48 PM
alright whatever ill set it to true
5:48 PM
its x100 anyway
Avatar
50% - will happen or not, lol (edited)
Avatar
ehh
5:50 PM
i assume it only triggers if the server gets that popup crash ?
Avatar
yeah
Avatar
alright cool
5:50 PM
ill set it to true
Avatar
source code is available 😃
Avatar
ayyyyy
6:07 PM
shop with mysql
6:41 PM
this is what we need to add to convert to new mysql shop ?
Avatar
Deleted User 1/23/2019 6:41 PM
Same config as atlas
6:42 PM
And use mysql true
Avatar
never used atlas shop 😄
Avatar
Deleted User 1/23/2019 6:42 PM
Oh
Avatar
yea ofc just wanted to see if this was all i needed
6:42 PM
ahh the db converting nightmare begins again...
Avatar
Deleted User 1/23/2019 6:43 PM
Its easy pizzy xD
6:44 PM
Sometimes dumb idea are the fast lol
6:44 PM
Earlier i was looking for all ini option for atlas
6:44 PM
And i find out that there is a files that i can just open with visual studio and get them
6:45 PM
some can be "decompiled" with IDA
Avatar
which files you can open with visual studio but not with notepad? 😃
Avatar
300 IQ 😛
Avatar
Deleted User 1/23/2019 6:48 PM
Well what ever you use to open it, the things is to found the file to open lol
Avatar
does arkshop not create mysql tables immediately ?
Avatar
Deleted User 1/23/2019 6:50 PM
Dunno for the forum one
Avatar
seems a bit overkill to load VS just to open text file heh
6:51 PM
it does
Avatar
Deleted User 1/23/2019 6:51 PM
Visual code i mean
6:51 PM
Not microsoft visual studio lol
Avatar
i loaded arkshop with mysql and no tables were created
6:51 PM
same user with just a different schema name
Avatar
never used that but seems like they are similar and both developed by microsoft
Avatar
ignore all that i'm retarded
6:53 PM
forgot to set usemysql to true
6:53 PM
lol
Avatar
Deleted User 1/23/2019 6:54 PM
Well visual code is good for json files its detect errors
6:54 PM
I start using it for 1 week now and it help when you have a half brain
Avatar
any recommendations for porting an existing arkshop db to mysql
Avatar
Deleted User 1/23/2019 6:55 PM
Copy past xD
6:55 PM
Thats what i did when i switched to mysql on ark
Avatar
is total spent a new thing in mysql db ?
Avatar
Deleted User 1/23/2019 6:56 PM
Yes
Avatar
its not working yet lol
Avatar
obviously i cant transfer the columns for that so will it cause any issues ?
Avatar
Deleted User 1/23/2019 6:57 PM
I was going to say it xD
6:57 PM
No since its not working the colum stay empty
Avatar
i could move sqlite db to mysql just by using dump function and then using that python script
Avatar
that python script left some errors in the permissions db for me
6:59 PM
what are you dumping it with sqlite browser ?
7:08 PM
because when i dump them and try to restore it i get errors like those
7:08 PM
and need to manually set default values and what not later
Avatar
yeah, sqlite browser
7:10 PM
copy paste table creation query from the plugin itself also (edited)
7:10 PM
then it should be fine
Avatar
into the DB file ?
Avatar
dump -> fix with script -> replace table creation part
Avatar
where do i find those though
7:11 PM
source code ?
Avatar
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
"Id INT NOT NULL AUTO_INCREMENT," "SteamId BIGINT(11) NOT NULL DEFAULT 0," "Kits VARCHAR(256) NOT NULL DEFAULT '{}'," "Points INT DEFAULT 0," "TotalSpent INT DEFAULT 0," "PRIMARY KEY(Id)," "UNIQUE INDEX SteamId_UNIQUE (SteamId ASC)); ");
7:12 PM
just this ye ?
Avatar
it's not a valid sql query
7:13 PM
full one
7:13 PM
it starting at line #17
7:13 PM
you need to remove those " of course also
Avatar
CREATE TABLE IF NOT EXISTS ArkShopPlayers (" "Id INT NOT NULL AUTO_INCREMENT," "SteamId BIGINT(11) NOT NULL DEFAULT 0," "Kits VARCHAR(256) NOT NULL DEFAULT '{}'," "Points INT DEFAULT 0," "TotalSpent INT DEFAULT 0," "PRIMARY KEY(Id)," "UNIQUE INDEX SteamId_UNIQUE (SteamId ASC));
7:13 PM
?
Avatar
dont need "
Avatar
ye
7:15 PM
Avatar
seems good
Avatar
is players named ArkShopPlayers though now
7:15 PM
in mysql
Avatar
ah shit so i need to change the insertion code aswell
Avatar
you can import as is and rename table after
7:17 PM
replaced all players with Arkshoplayers
Avatar
should be good
Avatar
how can i do monday to thursday, 10 to 22 pvp and weekend full pvp ?
Avatar
Rogue Leader 1/23/2019 10:08 PM
@Michidu I'm trying to make an atlas plugin that checks if a ship is anchored, but I can't find any functions for APrimalRaft to do anything with it.
10:09 PM
just a struct
Avatar
Deleted User 1/23/2019 10:09 PM
i was looking for the same
10:10 PM
Dunno if its possible since boat are just structure i think
Avatar
Rogue Leader 1/23/2019 10:10 PM
I know the planks are structures, but the ship frame itself looks to be a APrimalRaft
10:11 PM
APrimalRaft *ship = _this->GetAttachedToShip();
10:11 PM
I'm trying that, but you can't do anything with a raft but check if it's null
Avatar
Deleted User 1/23/2019 10:11 PM
bool& bNoAnchoringField() { return GetNativePointerField<bool>(this, "AShooterGameState.bNoAnchoring"); }
10:11 PM
Dunno if that have something to do with Anchor lol
Avatar
Rogue Leader 1/23/2019 10:12 PM
that's probably a flag on the terrain that stops people from anchoring in that spot
Avatar
Deleted User 1/23/2019 10:12 PM
Maybe its more easier to do it this way
10:12 PM
if your boat is close to a flag
10:12 PM
its protected
10:13 PM
but can be abused by players
Avatar
Rogue Leader 1/23/2019 10:13 PM
I'm just trying to protect ships that are in their own territory
Avatar
Deleted User 1/23/2019 10:14 PM
Yeah me too
10:14 PM
or at least was thinking about how to make it possible
Avatar
Rogue Leader 1/23/2019 10:15 PM
Getting a ton of complaints on unofficials of people just using oil jars and flame arrows to sink every anchored ship they see
Avatar
Deleted User 1/23/2019 10:15 PM
yeah
10:15 PM
i have the same
10:15 PM
every day a lot of people lost their ship like that
Avatar
Rogue Leader 1/23/2019 10:18 PM
this is all the results for "anchor" in the api source
Avatar
Deleted User 1/23/2019 10:19 PM
The first ones seems to give and state to anchored ships no ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/23/2019 10:26 PM
struct APrimalRaft : APrimalDinoCharacter { // Functions bool IsAnchored() { return NativeCall<bool>(this, "APrimalRaft.IsAnchored"); } static UClass * GetPrivateStaticClass() { return NativeCall<UClass *>(nullptr, "APrimalRaft.GetPrivateStaticClass"); } static UClass * StaticClass() { return NativeCall<UClass *>(nullptr, "APrimalRaft.StaticClass"); } };
10:26 PM
Should be anything you'd need 😄
10:26 PM
besides the fact that you'll need to add APrimalRaft to your config.json of your API
Avatar
Deleted User 1/23/2019 10:27 PM
this will work also for other ships not only raft ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/23/2019 10:28 PM
All bigger ships seems to be APrimalRaft too (edited)
Avatar
Rogue Leader 1/23/2019 10:28 PM
where did you find that?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/23/2019 10:28 PM
I created it only for you.. lol
10:28 PM
Its not in the API currently - but you can use it (edited)
Avatar
Rogue Leader 1/23/2019 10:29 PM
what would you use to check if it's in it's tribes claimed territory? (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/23/2019 10:29 PM
To determinate if the ship is in a ClaimFlag zone?
Avatar
Rogue Leader 1/23/2019 10:30 PM
that it's tribe owns
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/23/2019 10:32 PM
You would need to specify a certain radius to check
10:33 PM
IsInLandClaimedFlagRadius GetLandClaim From APrimalStructureClaimFlag might help you
10:35 PM
otherwhise you could use UKismetSystemLibrary::SphereOverlapActors_NEW to check a certain radius from the location of the ship (edited)
Avatar
Rogue Leader 1/23/2019 10:36 PM
meh, i'd be in the same boat. There aren't functions in the api for claim flags yet either
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/23/2019 10:36 PM
I added them today
10:37 PM
use new version 😄 edit: (you might need to compile the newest version on your own since Michidu haven't compiled it yet) (edited)
Avatar
Rogue Leader 1/23/2019 11:07 PM
Can someone test this out for me? I don't have an Atlas server set up yet xD
11:10 PM
That should only give protection when a ship is in the radius of their own claim flag
11:10 PM
But idk if it lets planks and containers on the ship be damaged (edited)
Avatar
yikes, totally would but not home and game server not set up at my new place 😦
11:25 PM
if no one does by the time I get home I will, i need to start streaming again anyway 😒
Avatar
@Rogue Leader sorry got home and was getting raided lmao
Avatar
@OwnProx I have been testing out your latest VoteReward plugin and there is still some issues with it. If you try to use the claim command it will try but feels like the command just timeouts and do nothing. But if you leave it like that it looks like a memory leak and overtime it will result in a crash. But if you execute the command again right after or as soon as possible it will check again and it looks like it's working. Note: When you have voted and try to claim it can't find the vote. (edited)
Avatar
if you type the vote command the 2nd time it works
Avatar
Weird, it doesn't give me anything.
Avatar
btw does your server crash with an error message or just dissapear ?
12:08 PM
i had mine just randomly shut off
12:08 PM
no error message
Avatar
I got one crashstack on my live server. But i haven't got any crash on the test server yet. (edited)
12:10 PM
on my test server i only have one server in the config to narrow down the issue.
12:11 PM
Okay, now it did. It just took sometime
Avatar
crash message ?
Avatar
(i got the claim)
Avatar
ahh
Avatar
But basically this where the issue is.
Avatar
hmm weird
12:14 PM
i dont have that
12:14 PM
but i only have arkservers.net in my config
Avatar
how many servers ?
Avatar
well on my test 1. On my live server 10
Avatar
i have 5 in my config and the only issue i’ve noticed is that sometimes it wont grant you the vote immediately after you vote
12:17 PM
so you have to try again after a while
Avatar
I seen several in forum have the same issue
12:18 PM
😮
Avatar
you aren't supposed to have duplicate entries in the sqlite arkshop db right ? 😛
Avatar
you should never have duplicate entries
Avatar
damn my sqlite db was messed up 😄
Avatar
how did you manage to get that? 😄
Avatar
no idea tbh 😄
12:42 PM
it was always throwing the error that the db was locked
12:43 PM
anyway i removed all the duplicates when i moved to mysql
12:43 PM
oh shit, i forgot it's lunch time
12:43 PM
bye!
Avatar
have a nice meal lol
12:43 PM
😮
Avatar
hahah ty
Avatar
@WETBATMAN have you tried auto restart plugin already? 😃
Avatar
yea i'm running with it set to true 😛
12:47 PM
haven't had any crashes lately though
Avatar
ah, that's bad, lol
12:47 PM
cmon dont jinx me
Avatar
haha
Avatar
uhh if it would help i can cause a crash on my testserver and check
Avatar
thanks, but intended crashes are not very interesting 😃
Avatar
damn this is so cool it was able to catch and restart it
1:00 PM
worldsave was successful (edited)
1:01 PM
used vote rewards and tried to give myself points without arkshop so i think this is a pretty realistic crash scenario
Avatar
good 😃
Avatar
this is a really cool project
Avatar
unfortunately, if server would just close, plugins can't detect it
1:04 PM
only if from another server instance 😃
Avatar
so at least one server needs to always be up ? (edited)
Avatar
that isnt really a big issue btw if the server closes most server managers can detect that and restart it
1:31 PM
ASM does at least
Avatar
Hm why asm cant detect other crashes then?
Avatar
Deleted User 1/24/2019 1:50 PM
Asm work just fine to restart any type of crash
1:50 PM
just need to use -NoCrashDialog (edited)
1:51 PM
and asm will restart the server auto when it time to check for atuo update
Avatar
wth really ?
3:04 PM
i mean this plugin is faster so whatever
3:09 PM
but yea if there is a crash dialog it sees the server as online as fails to restart it
Avatar
Deleted User 1/24/2019 3:09 PM
yes since if the crash dialog stay open it dont kill the processor of the server
3:09 PM
so asm continu to see it as online and dont restart it
Avatar
yep
Avatar
Well the thing with just claim two time works....for ppl who have the patience. When ppl heard about the workaround they started to spam it. And all my servers crashed related to the Vote Reward plugin lol
5:18 PM
So i need to rollback to API 2.9 😦
Avatar
damn isnt there spam prevention in api 3.0 ?
Avatar
Well it's not enough. They claim command should have a timeout of 10 seconds or maybe 5 seconds to prevent this.
Avatar
why didn’t you just raise the timer between commands though
5:34 PM
pretty sure ownprox’s vote rewards had that in the config
Avatar
No, only a 30s delay between you execute the command
5:34 PM
And this:; "VoteDelayHours": 24,
Avatar
oh
Avatar
But that's not what i mean. What i mean is, if the command or the request takes more than 5 seconds it should drop the request instead of hanging in the memory and print failed to request or something 😛
Avatar
Deleted User 1/24/2019 5:36 PM
"AntiSpamSeconds":"2",
5:36 PM
add this to your advancechat config
5:36 PM
if you are using the last version
Avatar
Still won't solve the issue (edited)
Avatar
Deleted User 1/24/2019 5:36 PM
well it will prevent player from sending command for 10second
5:36 PM
if you put spam at 10 second
Avatar
It needs to be atleast 30seconds. Then ppl can't chat 😛
5:37 PM
if we are going to use that option
5:37 PM
or maybe it's only for commands?
Avatar
Deleted User 1/24/2019 5:38 PM
no its for all sadly
Avatar
its open source so you could recompile it with a bigger delay
5:38 PM
maybe even make the delay a json option
Avatar
Deleted User 1/24/2019 5:39 PM
Or yeah do as Wetbatman said and add code to check time between command
5:39 PM
but since Voterewards dont have anti command spam good luck
5:39 PM
i dont have c++ knowlege to help you with that xD
Avatar
i guess i will try
Avatar
PlayerData[player->LinkedPlayerIDField()].NextVoteTime[VoteSiteIndex] = nNow + 30;
5:41 PM
this is probably what you have to change
5:41 PM
+ 30
Avatar
hmm.. the problem isn't that delay though
6:11 PM
problem is if they do it like this 1. try claiming -- Wait to long -- 2. try again -- still not working -- And then leave it like that. Result will be server crash. But if they would do like this: 1. try claiming -- wait 30s -- 2. try again -- reward claimed --
6:13 PM
one min delay
6:14 PM
it probably cant go trough all 10 servers in 30 secs
6:14 PM
and gets stuck
Avatar
Rogue Leader 1/24/2019 6:31 PM
VERSION: 15.67 ShooterGameServer.exe!compress2() (0x00007ff7f61b100b) + 0 bytes [UnknownFile:0] ParkedShipProtection.dll!UnknownFunction (0x00007ffcfea88e2c) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UGameplayStatics::ApplyDamage() (0x00007ff7f7755d9d) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\gameplaystatics.cpp:393] ShooterGameServer.exe!APrimalStructureShipHull::ApplyPlankDecayDamageInterval() (0x00007ff7f66def25) + 0 bytes [h:\yarkupdatelivereal\projects\shootergame\source\shootergame\private\primalstructureshiphull.cpp:195] ShooterGameServer.exe!APrimalStructureShipHull::TickHull() (0x00007ff7f66e86d2) + 0 bytes [h:\yarkupdatelivereal\projects\shootergame\source\shootergame\private\primalstructureshiphull.cpp:1250] ShooterGameServer.exe!APrimalRaft::Tick() (0x00007ff7f6622fd8) + 0 bytes [h:\yarkupdatelivereal\projects\shootergame\source\shootergame\private\primalraft.cpp:855] ShooterGameServer.exe!AActor::TickActor() (0x00007ff7f76acbbe) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\actor.cpp:775] ShooterGameServer.exe!FActorTickFunction::ExecuteTick() (0x00007ff7f7693d7a) + 27 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\actor.cpp:150] ShooterGameServer.exe!FTickTaskManager::StartFrame() (0x00007ff7f7940383) + 41 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\ticktaskmanager.cpp:871] ShooterGameServer.exe!UWorld::Tick() (0x00007ff7f77e3595) + 24 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\leveltick.cpp:1209] ShooterGameServer.exe!UGameEngine::Tick() (0x00007ff7f77846c2) + 0 bytes [h:\yarkupdatelivereal\engine\source\runtime\engine\private\gameengine.cpp:1181]
6:31 PM
Any idea why it's saying my function is unknown?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/24/2019 6:33 PM
Have you compiled a pdb file too?
Avatar
Rogue Leader 1/24/2019 6:54 PM
I think it does by default. Does it need to be deployed with the dll when testing?
Avatar
Rogue Leader 1/24/2019 6:57 PM
Just in the plugin folder?
Avatar
ye
6:57 PM
i believe visual studio can open it for debugging purposes (edited)
Avatar
Rogue Leader 1/24/2019 6:58 PM
Crazy. I never knew. When I tested locally it must have known where the pdb was
Avatar
yes if you try decompiling a DLL with IDA you can see that it asks you for that PDB file
6:58 PM
its hardcoded into the DLL i think
Avatar
Deleted User 1/24/2019 7:05 PM
If you compile the plugin it create a pdb next to the ddl you just put dll + pdb in the plugins folder
7:05 PM
and if it crash
7:05 PM
you will get a windows screen asking you if you want to debug it
7:05 PM
if you have MVS in the machine where you are making tests
Avatar
yeah something like that
Avatar
Rogue Leader 1/24/2019 7:13 PM
I never deployed the pdb with the dll on my dev server and it always showed the plugin functions without debugging
7:14 PM
So I'm assuming the location of the pdb is hardcored into the dll so it finds it when running on the same machine
Avatar
yes it is
Avatar
Rogue Leader 1/24/2019 7:18 PM
Can we get the hooks and properties for APrimalShipHull and APrimalRaft added to the all? @Michidu
7:18 PM
Or can someone walk me through adding those myself?
7:19 PM
I've never used IDA
Avatar
if you get IDA pro its relatively easy to use 😄 (edited)
7:22 PM
you need to find a leaked one though
Avatar
I been trying to figure out how to give a player temporary god on login for 30s now for couple days. Any tips? 😛 (edited)
Avatar
Yeah, i need to add them
7:39 PM
Have you got a hook already?
Avatar
if you are asking me, yes 😃
Avatar
you're doing this so they can read the server UI ? 😄
7:40 PM
hang on
Avatar
i would love to lock out my players for a few seconds so they can read the ui 😄
Avatar
NewPlayer->God
7:41 PM
Basically 😛
7:41 PM
or something else
7:42 PM
the idea is to prevent players from damage when they login
Avatar
yea
7:43 PM
i would also like to prevent them from making any input for some time so they take the time to read the server info haha
Avatar
Rogue Leader 1/24/2019 7:43 PM
Is it for all players when they log in or just new players on the server?
Avatar
Hmm... that's could be copied from the home plugin, i think (edited)
Avatar
With 3.0 you can use timer to do it
Avatar
yeah i saw it in ArkHomes
Avatar
@Rogue Leader All players that just connected
Avatar
Rogue Leader 1/24/2019 7:45 PM
Even those that spawn in their bases?
Avatar
is there any way to identify if a player is connecting for the first time without creating a db ?
Avatar
Deleted User 1/24/2019 7:45 PM
yes
Avatar
Well for a start yes, i want to make it as simple as possible.
Avatar
Deleted User 1/24/2019 11:25 PM
OMMMMG the dragon on atlas are so brokennnn
Avatar
@Michidu just had a real crash on one of my servers and the worldsave still seems to be intact
👌 1
Avatar
does AprimalDinoCharacterTakeDamage also work for torpor ? (edited)
Avatar
Rogue Leader 1/25/2019 5:10 PM
any idea why this would cause crashing in Atlas? UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, _this->RootComponentField()->RelativeLocationField(), 10000, &types, APrimalStructureClaimFlag::GetPrivateStaticClass(), &actors_ignore, &new_actors);
5:12 PM
I'm using @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰's update to the source recompiled
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/25/2019 5:12 PM
What’s the stracktrace?
5:18 PM
this is line 29 UKismetSystemLibrary::SphereOverlapActors_NEW(world, _this->RootComponentField()->RelativeLocationField(),
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/25/2019 5:18 PM
What is “_this”
Avatar
Rogue Leader 1/25/2019 5:19 PM
APrimalDinoCharacter
5:19 PM
Here's the whole function: float Hook_APrimalDinoCharacter_TakeDamage(APrimalDinoCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsShip()) { //check for Friendly Claim Flags nearby UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, _this->RootComponentField()->RelativeLocationField(), 10000, &types, APrimalStructureClaimFlag::GetPrivateStaticClass(), &actors_ignore, &new_actors); for (const auto& actor : new_actors) { APrimalStructureClaimFlag* claimFlag = static_cast<APrimalStructureClaimFlag*>(actor); //Log::GetLog()->warn(FVector::Distance(_this->RootComponentField()->RelativeLocationField(), actor->RootComponentField()->RelativeLocationField())); if (claimFlag->TargetingTeamField() == _this->TargetingTeamField()) { if (FVector::Distance(_this->RootComponentField()->RelativeLocationField(), claimFlag->RootComponentField()->RelativeLocationField()) <= claimFlag->LandClaimRadiusField()) { return APrimalDinoCharacter_TakeDamage_original(_this, 0, DamageEvent, EventInstigator, DamageCauser); } } } } return APrimalDinoCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/25/2019 5:22 PM
Check if RootComponent is nullptr
Avatar
how would i send a message to a player ?
Avatar
SendChatMessage
Avatar
yeah but notification ?
Avatar
SendNotification 😄
Avatar
ArkApi::GetApiUtils().SendNotification ?
6:33 PM
this ?
Avatar
does it require getting the steam id ?
Avatar
Deleted User 1/25/2019 6:34 PM
nothing i said nothing
6:34 PM
lmao
Avatar
it basically says everything in function comment 😃
6:35 PM
explaining args a bit
Avatar
Deleted User 1/25/2019 6:36 PM
ArkApi::GetApiUtils().SendChatMessage(player_controller, *get_formatted_message("prefix"), "Hello my name is bobo");
Avatar
ye, but wrong function 😄
Avatar
Deleted User 1/25/2019 6:37 PM
Hahaha
6:37 PM
Im bad as this shit but if that can help him
6:37 PM
ArkApi::GetApiUtils().SendNotification(player, { 1,0.549f,0,1 }, 1.6f, 4, nullptr, *FString(message));
6:38 PM
this one is your's @Michidu non ? (edited)
Avatar
possibly
Avatar
getting this
Avatar
you need ashooterplayercontroller*
Avatar
in the hook ?
Avatar
in SendNotification
6:54 PM
how is it undefined 😮
Avatar
why do you think its undefined?
Avatar
because it says identifier "player" is undefined 😄
Avatar
maybe duplicate
Avatar
nope
Avatar
change name anyway
Avatar
still undefined 😄
7:01 PM
on both the line where its redded out and the one after it
Avatar
well, of course it's undefined
7:02 PM
because it's inside if block
7:04 PM
aaaaaa
7:05 PM
Avatar
ehh.. 1) you can't magically convert steam_id to player 2) you probably forgot {} after 'if'
Avatar
says AShooterPlayerController is incompatible with parameter AController
7:09 PM
but it compiled fine ?
Avatar
then it's fine 😃
Avatar
lets test i guess
7:10 PM
damn it actually works
7:10 PM
thank you!
Avatar
Rogue Leader 1/25/2019 7:46 PM
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 RootComponent is not a nullptr (edited)
Avatar
is AshooterCharacter both dino/player or just player ?
Avatar
damn wtf i always thought it was a player but it prevents damage to dinos too by hooking that function
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/25/2019 8:10 PM
I guess RelativeLocationField is also not null? 😄
Avatar
Rogue Leader 1/25/2019 8:16 PM
APrimalStructureClaimFlag::GetPrivateStaticClass();
8:16 PM
That's what is crashing it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 1/25/2019 8:17 PM
Use StaticClassField then
8:17 PM
or smth like this its getting called 😄
Avatar
Rogue Leader 1/25/2019 8:19 PM
APrimalStructureClaimFlag::StaticClass() instead?
Avatar
Rogue Leader 1/25/2019 8:57 PM
StaticClass doesn't work as an alternative. It just doesn't find anything (edited)
Avatar
Rogue Leader 1/25/2019 9:28 PM
Claim flags aren't being registered as APrimal Structures either
9:29 PM
I compiled and used the latest source code of the api
Avatar
Deleted User 1/25/2019 9:31 PM
Flags are weird
9:31 PM
since they are not count as a structures
9:31 PM
Cheat destroymytarget dont destroy them either
9:32 PM
so i think their are in a new classe
Avatar
Rogue Leader 1/25/2019 9:39 PM
According to the API they are a inherit from classes that inherit from APrimalStructure
Avatar
Deleted User 1/25/2019 9:41 PM
You know i was thinking
9:41 PM
and protecting anchored ships can be a bad idea
9:41 PM
people can just build a wall of sloop
9:41 PM
anchor them
9:41 PM
and they have an invincible defense
Avatar
Rogue Leader 1/25/2019 9:52 PM
npcs can be killed and it would only protect the hull, planks, and deck, not the structures or chests (edited)
Avatar
Rogue Leader 1/25/2019 10:27 PM
I must not be compiling the api correctly. I added the APrimalRaft struct that @Michidu Sent me, recompiled using the "Atlas" configuration, then updated my plugin with the new .lib and moved the new version.dll and .pdb to the binary folder
10:28 PM
And it's still crashing on some Flag and raft functions
10:32 PM
if (_this->GetAttachedToShip()) { if (_this->GetAttachedToShip()->IsAnchored()) {
10:32 PM
Crashing on _this->GetAttachedToShip()->IsAnchored()
10:36 PM
I forgot to add APrimalRaft to the config. Recompiling now to see if that fixes it (edited)
Avatar
Rogue Leader 1/25/2019 10:43 PM
that didn't work
Avatar
You might need to add structure to config
Avatar
Rogue Leader 1/26/2019 6:23 AM
I added all the structs and enums that intellisense caught. (edited)
Avatar
to api config i mean
Avatar
Rogue Leader 1/26/2019 6:29 AM
I didn't do that lol. I'll try it tomorrow if I work on it
Avatar
Rogue Leader 1/26/2019 6:41 AM
If someone finds out how to get nearby claim flags and their tribe ids, let me know. I messed around with the sphere search with primal structures and had to bump the radius to a laggy amount just to get everything on the ship deck and it didn't catch claim flags.
Avatar
@Michidu will ark adverts parse /n as another line in the notification config ?
Avatar
yes, it should (edited)
Avatar
thx
Avatar
does anyone have a tip for me which program to use to convert 4 sqllite dbs into a mysql database?
Avatar
sqlite browser -> export as .sql -> https://stackoverflow.com/questions/1067060/translating-perl-to-python/1067151#1067151 (run it through this script) -> finally edit the .sql file and add the table creation query from the plugin source
I found this Perl script while migrating my SQLite database to mysql I was wondering (since I don't know Perl) how could one rewrite this in Python? Bonus points for the shortest (code) answer :)...
Avatar
@Michidu Can i connect the ark shop and atlas shop to the same msql database so they can share the points? Currently no, because of different table names. But i will add a support for it. when I try updating the mod today it didn't launch with the server and I could not force...
Avatar
assuming the 4 db’s have unique (non duplicate) entries importing all of them into the same schema should do it
Avatar
Thanks :)
Avatar
i have the problem that the server have mini lags because the permission database may be too large, what can i do?
Avatar
how do you know its permissions ? (edited)
7:43 PM
also how many entries do you have ?
Avatar
to notice lags from db you would need to have millions of players
Avatar
ok the problem was because i have two server machines and the request to the another machines where the database run takes to long to respond
Avatar
Rogue Leader 1/28/2019 8:13 PM
You could update the db path to something like a local Google or one drive folder, that way they should sync up changes across both servers.
8:13 PM
Don't know what would happen if both were updated at the same time tho
Avatar
oh sounds great thanks 😃
Avatar
mysqlcheck -o --all-databases
11:16 PM
Can be used if you want to optimize the database.
11:16 PM
but i strongly recommend to take a backup before executing.
11:17 PM
Or dump the database and truncate the database and import the dump (edited)
11:18 PM
wanted to just share some info, that's all 😃
Avatar
WoolyPenguin 1/31/2019 1:05 AM
can i find the atlas api source anywhere?
Avatar
Rogue Leader 1/31/2019 1:17 AM
It's the same source as the Ark api
1:17 AM
Just has it's own build config in vs and separate folders for Atlas unique classes, structs, and enums
1:19 AM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
1:20 AM
They have it so the Ark and Atlas aspects are separate, but the UE stuff and additional files they share.
1:20 AM
Depending on what build configuration you compile with, it generates the AtlasApi.lib and version.dll or ArkApi.lib and version.dll (edited)
1:22 AM
You can choose "Ark", "Atlas", or "Release" (not sure if Release has a use or if it's just a left over artifact tho)
Avatar
@Michidu permissions isn't able to list groups with the latest update
12:46 PM
nothing in the console
Avatar
@Michidu permissions appears to have some db issue because i can add players to a group from one server but cant from others
Avatar
Rogue Leader 1/31/2019 10:12 PM
I could use some help adding classes to the API. I added APrimalRaft, but everytime i use the IsAnchored() function i get a crash
10:13 PM
I'm pretty sure I added all the missing structs to the config
Avatar
Rogue Leader 2/1/2019 12:19 AM
@Michidu @OwnProx @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰
Avatar
GSH | MrOwlSky 2/1/2019 1:59 AM
Can confirm this is a bug, Happening for GOG aswell. @WETBATMAN
Avatar
GSH | MrOwlSky 2/1/2019 2:42 AM
Side note, Has anyone got the AtlasAdverts working for them? It just spams my chat when I try to add it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/1/2019 6:03 AM
What is the exact stacktrace you‘d get?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/1/2019 6:41 AM
6:41 AM
SPOILER
Image attachment
6:43 AM
Sorry for marking it as spoiler - wanted to try out this feature.. lol As you can see the function doesn't seems to be corrupted :D void debugCommand(AShooterPlayerController* sender, FString* message, EChatSendMode::Type) { TArray<AActor*> actorsInSphere; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(ArkApi::GetApiUtils().GetWorld(), sender->DefaultActorLocationField(), 1000, &types, nullptr, &actors_ignore, &actorsInSphere); for(AActor* current: actorsInSphere) { if(current->IsA(APrimalRaft::StaticClass())) { ArkApi::GetApiUtils().SendChatMessageToAll("DEBUG", "Found a ship!"); auto* ship = static_cast<APrimalRaft*>(current); if(ship && ship->IsAnchored()) { ArkApi::GetApiUtils().SendChatMessageToAll("DEBUG", "which is anchored!"); } } } } (edited)
6:45 AM
Since I haven't compiled the API version 1.5 for myself yet - I added the following on my own Project: struct APrimalRaft : APrimalDinoCharacter { static UClass * StaticClass() { return NativeCall<UClass *>(nullptr, "APrimalRaft.StaticClass"); } bool IsAnchored() { return NativeCall<bool>(this, "APrimalRaft.IsAnchored"); } };
6:46 AM
You can easly do that since APrimalRaft is already forwarded from the API - you just need to add the "APrimalRaft", to your config.json located in Win64 folder
Avatar
Rogue Leader 2/1/2019 3:12 PM
Oh man. I think I may have figured it out. I did everything but move the config to the win64 folder....
Avatar
Rogue Leader 2/1/2019 4:02 PM
updating the config file still crashed it. I'm gonna go back the the current released version and see if that works
4:08 PM
4:12 PM
#include <Api/Atlas/Atlas.h> #pragma comment(lib, "AtlasApi.lib") DECLARE_HOOK(APrimalStructure_TakeDamage, float, APrimalStructure*, float, FDamageEvent*, AController*, AActor*); struct APrimalRaft : APrimalDinoCharacter { // Functions bool IsAnchored() { return NativeCall<bool>(this, "APrimalRaft.IsAnchored"); } static UClass * GetPrivateStaticClass() { return NativeCall<UClass *>(nullptr, "APrimalRaft.GetPrivateStaticClass"); } static UClass * StaticClass() { return NativeCall<UClass *>(nullptr, "APrimalRaft.StaticClass"); } }; float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->GetAttachedToShip()) { if(_this->GetAttachedToShip()->IsAnchored()) { FString descr; _this->GetHumanReadableName(&descr); if (descr.Contains(L"plank") || descr.Contains(L"deck") || descr.Contains(L"hull")) { Log::GetLog()->warn("{}", descr.ToString()); Log::GetLog()->warn("{} took no damage!", descr.ToString()); return APrimalStructure_TakeDamage_original(_this, 0, DamageEvent, EventInstigator, DamageCauser); } } } return APrimalStructure_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } (edited)
4:12 PM
void Load() { Log::Get().Init("ParkedShipProtection"); ArkApi::GetHooks().SetHook("APrimalStructure.TakeDamage", &Hook_APrimalStructure_TakeDamage, &APrimalStructure_TakeDamage_original); } void Unload() { ArkApi::GetHooks().DisableHook("APrimalStructure.TakeDamage", &Hook_APrimalStructure_TakeDamage); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); break; } return TRUE; } (edited)
4:14 PM
this would have been line 22 if(_this->GetAttachedToShip()->IsAnchored())
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/1/2019 4:15 PM
maybe even the function GetAttachedToShip is broken
4:15 PM
or its not attached 😄
Avatar
Rogue Leader 2/1/2019 4:18 PM
Maybe it's the ceilings causing the crashes then
4:19 PM
I'll rearrange so it checks if it's a plank/deck/hull first
Avatar
Rogue Leader 2/1/2019 4:27 PM
IsAttachedToShipInWetDock() IsAttachedToShipInDryDock() Anyone know the difference in a wet and dry dock?
Avatar
maybe wet is slippy ┐('~`)┌
Avatar
Rogue Leader 2/1/2019 4:47 PM
Lol
4:48 PM
I guess GetAttachedToShip is broken. It works by itself, but trying to use any functions from it causes a crash
4:49 PM
Would that be an api issue or a game issue?
Avatar
only if signature was updated
4:52 PM
i will try to update dump
Avatar
nah, this function still seems to be same
Avatar
@WETBATMAN ListGroups seems to work for me
Avatar
hmm it has trouble adding too
7:19 PM
like one of my servers can exec the command but the other one says its wrong
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/1/2019 7:42 PM
@Rogue Leader
Avatar
Rogue Leader 2/1/2019 9:27 PM
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 weird, why would it work on yours but not mine? I was testing by shooting a schooner with a cannon.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/1/2019 9:28 PM
Havent tried that lol (edited)
9:28 PM
I hit a smithy placed on a raft.. lol
9:28 PM
With a spear ofc😅
Avatar
@Rogue Leader Any chance you figured out the APrimalStructureClaimFlag::GetPrivateStaticClass() issue? I'm running into similar crashes with the newest version from Github.
Avatar
Rogue Leader 2/2/2019 6:07 AM
Nah, I had to quit using the class
Avatar
Hey all. How can I find out how much time the player spent in the game? For all game sessions
Avatar
battlemetrics 😄
Avatar
@WETBATMAN Is this possible only by requests to the battlemetrics? Is it possible to do it directly through the Ark/Atlas API?
Avatar
i dont know honestly i doubt the game keeps that kind of data
9:47 PM
it probably keeps the playtime per savefile but i doubt it keeps total
Avatar
Ok, thanks
Avatar
game probably doesn't keep such info, only if you would start writing it to the db
8:54 AM
small notice for those who interested, now api has an option to dump all structures and you don't need to manually add them to the config
Avatar
are you adding GetCurrentAttackInfo to the api yet 😃
Avatar
Added structs UDamageType & FDinoAttackInfo Added Field AttackInfosField() Added Function GetCurrentAttackInfo()
Avatar
if i want to forcibly kill a player do i use the suicide function from ark api or should i hook a function ?
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 i'm pretty sure you have a typo in your AntiFamilysharing plugin because it refuses to load the config
6:30 PM
that might explain why someone was complaining that it didn;t work 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 6:30 PM
lol?
6:31 PM
{ "APIKey": "Censored", "KickMessage": "Family Shared Accounts Are Not Allowed on DopeArk, Please Connect With A Different Account!", "Whitelist": [] }
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 6:32 PM
not reading any values on startup
Avatar
so that error code is ok or what ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 6:34 PM
No its totally not 😄
6:34 PM
Seems like I uploaded the ATLAS version for ARK too q.q
6:34 PM
Thanks for telling me
6:36 PM
damn my servers are just starting can you post it here real quick
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 6:36 PM
I already updated it on forum
Avatar
thx
6:43 PM
is the new permissions plugin working for anyone ?
6:43 PM
i had to downgrade because it isnt placing players into groups properly
6:43 PM
and also cant list groups
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 pretty sure antifamilysharing causes a crash now
7:03 PM
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 7:25 PM
Sorry about that.. Im jumping from project to project.. Update is avail now (edited)
Avatar
no problem
7:26 PM
glad you fixed it until many people upgraded 😄 (edited)
7:30 PM
btw will loading the plugin after the server started work properly ?
7:34 PM
ye looks like it works
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 7:45 PM
My plugins always do 😄
Avatar
quick question if i want to detect a knocked out player can i use event instigator for that ?
7:47 PM
or detect a player that has handcuffs on ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 7:47 PM
You mean a unconscious one?
Avatar
yeah
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 7:47 PM
I mean you could read torpor stats probably 😄
Avatar
yeah but i mean with event instigator can i catch when the player got knocked out ?
7:49 PM
want to start a timer when a player gets knocked out and then auto kill them when the timer hits 0
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 7:50 PM
APrimalCharacter::IsConscious() might help 😄 (edited)
Avatar
so no event instigator or any trigger is required ?
7:51 PM
void AutoKill(AShooterPlayerController* AttackerShooterController, FString* message, int mode) { if (!AttackerShooterController || !AttackerShooterController->PlayerStateField() || !AttackerShooterController->GetPlayerCharacter() || AttackerShooterController->GetPlayerCharacter()->IsDead() || !AttackerShooterController->GetPlayerCharacter()->IsConscious() || AttackerShooterController->GetPlayerCharacter()->IsSitting(false)) return; if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (WeaponName.Contains(L"Handcuffs")) return; } if (!ArkApi::GetApiUtils().IsRidingDino(AttackerShooterController)) AttackerShooterController->GetPlayerCharacter()->Suicide(); }
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 7:51 PM
I think to check on TakeDamage is a good idea.. couldn't really quickly find a function to hook on
Avatar
hmm what about handcuffs though
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 7:53 PM
If you check for consciousness you also can check for handcuffs 😄
Avatar
yea but ArkApi has this if (!ArkApi::GetApiUtils().IsRidingDino(AttackerShooterController)) AttackerShooterController->GetPlayerCharacter()->Suicide();
7:54 PM
cant this be used to kill the player aswell ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 8:02 PM
For checking if player is riding on a dino? lol
Avatar
no lol i mean AttackerShooterController->GetPlayerCharacter()->Suicide();
8:03 PM
this part 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 8:03 PM
AShooterPlayerController::ServerSuicide_Implementation is the one im using.. don't know about suicide of Character 😄
Avatar
hmm
8:04 PM
i use it for my suicide command and it works but i'm wondering if it will work on offline players aswell
Avatar
any examples on returning a custom value with a hook ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/3/2019 10:06 PM
What do you mean with a "custom value" ? It really depends on the function you've hooked (edited)
Avatar
with APrimalCharacterTakeDamage for example, is it possible to modify the damage value if certain conditions are met ?
Avatar
GSH | MrOwlSky 2/4/2019 7:09 AM
Congrats on staff @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 Fire
Avatar
@WETBATMAN should be yes 😃
Avatar
the only plugin that does that i think is orp and its private 😃
7:12 AM
any other examples ?
Avatar
you just need to modify return value, depending on your condition (edited)
Avatar
yeah but how to get the current dmg value
7:15 AM
from damage event ?
Avatar
you mean this func APrimalCharacter::TakeDamage ?
7:18 AM
actually it has damage as argument and you need to modify this one
Avatar
if (EventInstigator && EventInstigator->CharacterField()) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (_this->IsA(APlayerController::StaticClass()) && WeaponName.Contains(L"Armor Piercing")); return Damage * 0.10; } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
1:01 PM
so will something like this work ?
1:01 PM
return damage * 0.10 ?
Avatar
should
1:05 PM
probably you dont need to modify the return value, but instead you need to modify Damage variable and call original function
Avatar
Damage = Damage * 0.10;
1:27 PM
what like this ?
Avatar
yes
Avatar
Hello all I am trying to compile Lootboxes from the site however it did not create a plugininfo or a config file is there a tutorial on how to do this?
4:58 PM
!rank Plugin Dev
Avatar
it wont, just copy config
4:59 PM
plugininfo is optional
Avatar
it has been probably 10 years since I have coded so I am really rusty but I want to learn how to make Plugins so I am trying to get Lootboxes to work on our atlas server but want to compile it myself.
5:02 PM
I dont know exactly what you mean by just copy config though sorry
Avatar
released plugin comes with config already (edited)
5:03 PM
they are not needed for compilation as well (edited)
Avatar
ok let me check
5:07 PM
I see ok thanks very much
5:08 PM
we got it to load but it said that requires newer api version so I think that is server side
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 5:13 PM
You might need to adjust the needed API Version in PluginInfo.json
Avatar
where do I get the PluginInfo.Json and Config.Json I did a search in LootBoxes but its not there at all
Avatar
should be on forum, where you download plugin
Avatar
ok thanks very much
5:22 PM
Quick one last questions the lootboxes is working fine now but its looking to use arkapi not atlasapi is there a way of learning how to switch it over? or is that a lot of coding to change it
Avatar
you can start by changing ark headers to atlas
Avatar
Ok thank you
Avatar
error C2011: 'EXPType::Type': 'enum' type redefinition
5:35 PM
that is the error I get when changing the headers over to api\atlas\atlas.h
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 5:35 PM
Look trough all from project coming header files
5:36 PM
one of them might include other version again
Avatar
Deleted User 2/4/2019 5:38 PM
@Joker if you dont have the Atlas shop libs and header dont even loose your time
Avatar
so what I have done is when I first got lootboxes he put a video up for compiling it and had a library and includes with the video
Avatar
Deleted User 2/4/2019 5:39 PM
The libs and stuff on the video are for ark not atlas
Avatar
ok so I need the atlas shop so that I can use the libraries and headers from it?
Avatar
Deleted User 2/4/2019 5:40 PM
Since the lootbox are using points
5:40 PM
2 Choice Remove the point option
5:40 PM
or Get the atlas shop headers and libs
5:40 PM
for the rest the plugin is using the api header and they are availible on michidu github (edited)
Avatar
ok thank you very much I am going to start from scratch I think I see what to do thank you very much for all the help
5:43 PM
even with the atlas shop it was compiled how would you get the libs and header from it if its compiled
Avatar
Deleted User 2/4/2019 5:43 PM
You cant
Avatar
ok so what your saying is I cant get the libs and headers from atlas shop at all or from anywhere else?
Avatar
Deleted User 2/4/2019 5:44 PM
Well only @Michidu have atlas shop libs and header
5:44 PM
So he's the only one who can give them or not to you
Avatar
ok so in order to get the required files to make lootboxes work for atlas I would have to get them from Michibu or rewrite them?
Avatar
Deleted User 2/4/2019 5:46 PM
So you will need to get them from michidu or make your own atlas shop
5:46 PM
Or just remove points from lootbox
Avatar
ok thank you
Avatar
Cannot open include file: '../../json.hpp': No such file or directory that is what I am getting however the Json.hpp is in the include files folder where it is being directed
Avatar
Is there anyone that can help me with this?
Avatar
you sure you set up the project correctly
6:50 PM
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (EventInstigator && EventInstigator->CharacterField()) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (_this->IsA(APlayerController::StaticClass()) && WeaponName.Contains(L"Armor Piercing")); Damage = Damage * 0.10; }return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } }
6:51 PM
@Michidu is this correct or does the original function have to be returned 2 times
Avatar
Yes i set it up completely but ill look at what you sent thank you
Avatar
_this->IsA(APlayerController::StaticClass())
8:00 PM
why does this not work to detect if AprimalCharacter is a player ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 8:02 PM
APlayerController is not any close to a APrimalCharacter
Avatar
hmm
8:03 PM
anything else that can be used for player detection ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 8:04 PM
Where exactly
Avatar
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (EventInstigator && _this->IsA(APlayerController::StaticClass())) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (WeaponName.Contains(L"Armor Piercing")); Log::GetLog()->warn("Weapon Name: {}", WeaponName.ToString()); Damage = Damage * 0.10; } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
8:05 PM
got the multiplier to work but having trouble detecting if its a player or not
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 8:09 PM
you could use GetOwnerController
8:09 PM
should give you the Controller of the player if he is online
8:09 PM
you might need to check that
Avatar
if (_this->GetOwnerController && WeaponName.Contains(L"Armor Piercing"));
8:16 PM
this ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 8:18 PM
checks if the OwnerController is currently avail / online.. yea 😄
Avatar
should it be in the first if where it checks for event instigator or the second one where it checks for gun name ?
8:19 PM
or does it not matter
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 8:21 PM
_this does not have anything in common with EventInstigator besides that event.. 😄
Avatar
event instigator should be the attacker and _this should be the target
8:23 PM
or is DamageCauser better to use ?
Avatar
fatal error C1083: Cannot open include file: '../../json.hpp': No such file or directory I am still getting this error and completely rebuilt the project and everything
8:31 PM
still the same issue and the json.hpp is in the root library golder
8:31 PM
folder
Avatar
the new api has the json.hpp in the include folder so you might have to change the path in the project
Avatar
Are there hooks for player Login and Logout?
Avatar
I have changed the include folder path in the project
Avatar
yes there are @DevCPP
Avatar
Entering the game/leaving the game*
Avatar
no i mean in the actuall cpp file @Joker
Avatar
ok the ../../ means the root file correct or am I missing something
Avatar
#include <json.hpp>
8:33 PM
this i what i use in my project
8:33 PM
Avatar
@WETBATMAN What hooks? Or how can I find any info about this?
Avatar
@WETBATMAN Thanks very much
Avatar
_this->GetOwnerController what arguments should i provide for this
8:43 PM
c:\users\avtoj\source\repos\apbalancer\apbalancer\apbalancer.cpp(23): warning C4551: function call missing argument list (edited)
Avatar
I did that and it fixed it but wow the errors that came out was insane
8:52 PM
Its almost like its all wrote wrong completely
Avatar
is it set to release and x64 ?
Avatar
what are you trying to compile ?
Avatar
Lootboxes
Avatar
for atlas ?
8:56 PM
or ark ?
Avatar
I changed all the headers to atlas header
Avatar
you dont have the atlasshop files though 😄
Avatar
Deleted User 2/4/2019 8:56 PM
i already told him
Avatar
the lib file from atlasshop is a dependency for compiling lootbox
8:57 PM
it wont compile without it
8:57 PM
that is unless you strip out anything related to points completely
Avatar
Deleted User 2/4/2019 8:57 PM
the header too as point.h
Avatar
yeah that too
Avatar
So the files from the donation one doesnt work am i correct
Avatar
-_-
Avatar
And im trying to remove the point really its not needed
Avatar
files there are already compiled
Avatar
Deleted User 2/4/2019 8:58 PM
that one is the compiled dll not the source files
Avatar
you need the source variant
8:58 PM
unless you're any good at reverse engineering you're out of luck 😄
Avatar
What im saying is our server is running atlas shop so i dont need the point system
8:58 PM
I use to be just dont see doing that as an ootion
8:59 PM
Kinda dishonest
Avatar
then strip out anything related to shop and if you do it correctly it should compile
Avatar
I thought i did maybe i missed something
8:59 PM
Honestly we just want it to where we can use our points from atlas shop to get random blueprints
Avatar
you said your whole project was red so you probably removed something other than the shop too
Avatar
Deleted User 2/4/2019 9:00 PM
To make it clear even me the one for who does lootbox was created i didn't get the atlas shop source and was forced to create mine
9:00 PM
some people are afraid that if i got them i will share lootbox for atlas too
9:00 PM
So atm just forget about lootbox for atlas if you dont have good knowledge on c++
Avatar
How about no
Avatar
nah dont tax the guy 😄
Avatar
Deleted User 2/4/2019 9:01 PM
xD
9:01 PM
Its aj oke but seriously
Avatar
with enough tinkering the can achieve what he wants
Avatar
Deleted User 2/4/2019 9:01 PM
the best way its to remove the points part
Avatar
I mean if your going to talk like that get lost your not worth my time
Avatar
considering points are of no use for him
9:01 PM
@Joker woah knock off that tone
9:02 PM
if not for @Deleted User you would not have lootbox at all
Avatar
I didnt start it at all
9:02 PM
And someone else would have created it
9:02 PM
And not being hateful at all just being truthful
Avatar
yes ofc someone else would have created it but would he share it to the public ?
9:03 PM
think about it 😛 (edited)
Avatar
Prob to be honest
Avatar
Deleted User 2/4/2019 9:03 PM
Lootbox for ark exist since almost 3 years bro
Avatar
I know this
Avatar
Deleted User 2/4/2019 9:03 PM
so why in 3 years no one made ap ublic one ?
9:03 PM
xD
9:03 PM
public (edited)
Avatar
ye well the public one exists for like not even a year 😄
9:03 PM
and on top of that its completely free
Avatar
Whatever you all say sad you let people come in here and troll people but hey whatever floats your boat
Avatar
Deleted User 2/4/2019 9:04 PM
No one is trolling you
9:04 PM
we gived you the solution more than ones
Avatar
lol ?
9:04 PM
who do you see trolling here 😄
Avatar
MATICHA//طماطم: So atm just forget about lootbox for atlas if you dont have good knowledge on c++
Avatar
@Deleted User clearly told you that unless you want to spend days writing your own atlas shop it would be close to impossible to get lootbox to work with points
Avatar
lets see how this works people get in to looking to learn another way to use c++ and you let this thing walk over top of people because he thinks he is better then others
Avatar
Deleted User 2/4/2019 9:06 PM
Bro im not even a c++ dev xD
Avatar
dude what even are you going on about 😄
Avatar
have a wonderful day and enjoy whatever you all do
Avatar
well that was weird
Avatar
Deleted User 2/4/2019 9:07 PM
I was going to give him my shop and lootbox for atlas but well fuck me if i share anythings else
9:07 PM
I will just shut my mouth up
Avatar
Look I completely understand I am asking some really stupid questions to guys that have coded for awhile now
Avatar
nothing is stupid
9:09 PM
i ask stupid questions daily
9:09 PM
that's why we have this group
9:09 PM
so people with more knowledge and experience can help
Avatar
I learned C++ back in 2010 so getting back into it wow its insane. its just someone basically making me feel like im worthless kinda got to me really bad
Avatar
Deleted User 2/4/2019 9:10 PM
@Joker im not even a dev or anything like that im just the guy who paid a guy to make does lootbox
9:10 PM
i was just honest with you
9:10 PM
Even me i was forced to make my own shop to make lootbox working with atlas
Avatar
Yeah well I may have taken it wrong and for that im sorry
Avatar
no one said anything remotely similar to you, the point being made was that unless you're really good at C++ and and want to spend days writing a new atlas shop getting lootbox to work with points was a waste of time
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 9:11 PM
How about asking Michidu for the lib and the header files? 😄
Avatar
Deleted User 2/4/2019 9:11 PM
i told him that too xD
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 9:11 PM
No need to develop already existing stuff 😄
Avatar
i assume as the plugin is donator only and in beta they wont be published
Avatar
yes he did but to be honest I dont need the points so by what I am understanding no point in the files from the atlas shp'
9:12 PM
shop
Avatar
Deleted User 2/4/2019 9:12 PM
For my part when i asked for headers never got theù
9:12 PM
them
9:12 PM
xD
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 9:13 PM
Its totally up to him anyway 😃
Avatar
Deleted User 2/4/2019 9:13 PM
Thats what i said to the guy
9:13 PM
I know that some other got them
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/4/2019 9:14 PM
Yea but I think Nova has mentioned for the third time now that he isn't even interested in integrating Shop Points into his LootBox plugin (edited)
Avatar
Yeah I understand that so Wetbatman you was right I removed too much now that atlas shop was removed all I get was ../../json.hpp erro
9:14 PM
error
Avatar
Deleted User 2/4/2019 9:15 PM
And we told him for 10 time that he cant just get ride of the point part
Avatar
fixed that now
Avatar
Deleted User 2/4/2019 9:15 PM
and he will not need to shop source anymore
Avatar
Yeah we have went through that I think 3 times now but the issue is when I fix the Json.hpp error then its like the coding is all wrong
9:16 PM
am I allowed to paste errors in here or is there another way of doing it?
Avatar
Deleted User 2/4/2019 9:16 PM
yes your allowed
Avatar
maybe pastebin the project or something
Avatar
pastebin the whole project or just the error?
Avatar
if its a small snippet of code just paste it here
Avatar
Deleted User 2/4/2019 9:19 PM
If you want to get ride of the points
Avatar
yes I do
9:19 PM
did I miss something
Avatar
Deleted User 2/4/2019 9:19 PM
// RCONCommand int RCONRolls = LootBoxes::config["LootBoxes"][lootbox->ToString()]["RCONCommands"]["Count"]; for (int i = 0; i < RCONRolls; i++) { const nlohmann::json itemArray = LootBoxes::config["LootBoxes"][lootbox->ToString()]; auto itemIter = itemArray.find("RCONCommands"); const nlohmann::basic_json<> item = itemIter.value(); auto possibleCommands = item.value("PossibleCommands", nlohmann::json::array()); int size = possibleCommands.size(); std::random_device rd; std::mt19937 eng(rd()); std::uniform_int_distribution<> rand(0, size - 1); nlohmann::json selectedCommand = possibleCommands.at(rand(eng)); std::string command = selectedCommand["Command"]; int MinPointsShop = selectedCommand["MinPointShop"]; int MaxPointsShop = selectedCommand["MaxPointShop"]; std::uniform_int_distribution<> points(MinPointsShop, MaxPointsShop); int shoppoints = points(eng); uint64 steamId = ArkApi::GetApiUtils().GetSteamIdFromController(sender); // Use the ArkShop API to add points ArkShop::Points::AddPoints(shoppoints, steamId); }
9:19 PM
check this
9:23 PM
RandomRewards.cpp
Avatar
now if I remove randomrewards.cpp and .h then that means they wont be able to use points to buy random patterns am I right?
Avatar
Deleted User 2/4/2019 9:24 PM
No no no
9:24 PM
xD
9:24 PM
You need to remove only the part using points
Avatar
Even the MinPointShop/MaxPointShop
9:25 PM
pretty much anything that says points remove it
9:25 PM
Yes I am questioning even myself if that was a stupid question
Avatar
Deleted User 2/4/2019 9:26 PM
std::string command = selectedCommand["Command"]; int MinPointsShop = selectedCommand["MinPointShop"]; int MaxPointsShop = selectedCommand["MaxPointShop"]; std::uniform_int_distribution<> points(MinPointsShop, MaxPointsShop); int shoppoints = points(eng); uint64 steamId = ArkApi::GetApiUtils().GetSteamIdFromController(sender); // Use the ArkShop API to add points ArkShop::Points::AddPoints(shoppoints, steamId);
9:26 PM
You will find nothing saying
9:26 PM
"Hello if you want to remove point cut here"
Avatar
you dont say
9:27 PM
talking like that is what made the issue before if you want to help dont try being a smart ass
Avatar
Deleted User 2/4/2019 9:27 PM
Bro shut the fuck up
9:27 PM
Why the fuck am i even bodering answering to you
9:28 PM
cya
Avatar
yeah well fuck you too
Avatar
Deleted User 2/4/2019 9:28 PM
Avatar
you know im so sorry your life is so terrible you think you have to act better then everyone
9:29 PM
but have a wonderful day or not idgaf
Avatar
GSH | MrOwlSky 2/4/2019 9:34 PM
Y'all chill out
Avatar
I was being nice even said i was sorry for blowing up the first time but now two messages that im a moron nah
Avatar
this conversation is getting spicy
Avatar
Deleted User 2/4/2019 9:36 PM
@Joker Maybe i was rude or something but it wasn't my goal
Avatar
almost too spicy
Avatar
Deleted User 2/4/2019 9:37 PM
I never said something to hurt you or anything
9:37 PM
i was really trying to help you
9:37 PM
but my knowledge on c++ its limited
Avatar
And i was thankful for that you taking time out of your day to help me
Avatar
Deleted User 2/4/2019 9:37 PM
If i was having the knowledge to remove that part of the plugins ill do it for you
9:38 PM
but i just answer with what i have
9:38 PM
the only thing that i know is that the part of the plugins that need to be removed
9:38 PM
some is on the randomreward.cpp
Avatar
I dont want anyone to do it for me just thought someone would have some insight on what was pointing to atlasshop so I could stop it
Avatar
Deleted User 2/4/2019 9:39 PM
std::string command = selectedCommand["Command"]; int MinPointsShop = selectedCommand["MinPointShop"]; int MaxPointsShop = selectedCommand["MaxPointShop"]; std::uniform_int_distribution<> points(MinPointsShop, MaxPointsShop); int shoppoints = points(eng); uint64 steamId = ArkApi::GetApiUtils().GetSteamIdFromController(sender); // Use the ArkShop API to add points ArkShop::Points::AddPoints(shoppoints, steamId);
9:39 PM
the Bold part is using the shop per example
9:40 PM
MinPointShop/MaxPointShop : also need to be removed from the source and the config
Avatar
Ok ty
Avatar
Deleted User 2/4/2019 9:43 PM
you'r welcome
Avatar
Rogue Leader 2/4/2019 11:13 PM
Just a gentle reminder that cursing at other members is a no-no. Nova has been booted for his behavior and everyone else name calling gets a warning and a slap on the wrist.
Avatar
maticha had .lib, it was more than enough to use shop 😃
Avatar
Deleted User 2/5/2019 1:07 PM
at the beginning i was also looking for the points.h
1:08 PM
im a bad example since i dont even try to boder my self learning anything about c++ anymore
1:08 PM
too complicated for my little brain
Avatar
its really not tbh
1:16 PM
i mean i'm still a n00b but the language itself is pretty logical
Avatar
Deleted User 2/5/2019 1:18 PM
yeah it depent on people me im still fighting just with icludes from time to time didn't even tried to change codes yet
1:18 PM
well i did one time on a easy plugins thats all xD
Avatar
DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController *); DECLARE_HOOK(AShooterGameMode_PostLogin, void, AShooterGameMode*, APlayerController *); Can i use these hooks for detect player entering/leaving the game?
Avatar
yeah
Avatar
Ok, thanks
Avatar
Rogue Leader 2/5/2019 7:19 PM
@deleted-role any updates on when the newer Atlas classes will be added to the API?
7:19 PM
I still haven't been able to get claim flag detection working
7:20 PM
Or detecting what ship a structure is attached to.
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 7:24 PM
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 7:24 PM
Wasn't it that problem ? 😄
Avatar
GSH | MrOwlSky 2/5/2019 7:24 PM
Haven't found them myself yet either.
Avatar
Rogue Leader 2/5/2019 7:42 PM
No, it still crashed on larger ships and when checking if anchored
7:42 PM
Also crashed using cannons and fire arrows
Avatar
what classes you need?
Avatar
any other way to check if APrimalCharacter is a player instead of a dino besides GetOwnerController ? (edited)
Avatar
GetOwnerController doesn't check it btw
7:56 PM
but AShooterPlayerController can't be a dino 😃
7:56 PM
and GetOwnerController is broken in game
Avatar
shit i messed up typing that
7:57 PM
i mean this APrimalCharacter
Avatar
IsA can check it
Avatar
IsA(AShooterPlayerController::GetPrivateStaticClass()) ?
Avatar
yes
Avatar
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (EventInstigator && EventInstigator->CharacterField()) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { APlayerController descr; FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (_this->IsA(AShooterPlayerController::GetPrivateStaticClass()) && WeaponName.Contains(L"Armor Piercing")); Log::GetLog()->warn("Weapon Name: {}", WeaponName.ToString()); Damage = Damage * 0.10; } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
8:03 PM
do you think its better to implement that check in the first IF or the second ? (edited)
Avatar
your IF is weird 😃
8:04 PM
no body
Avatar
if (EventInstigator && EventInstigator->CharacterField())
8:05 PM
this one ?
Avatar
if (_this->IsA(AShooterPlayerController::GetPrivateStaticClass()) && WeaponName.Contains(L"Armor Piercing"));
Avatar
hmm the plugin worked though but the player check was broken
8:07 PM
obviously now that you pointed out that GetOwnerController does not work 😄
Avatar
because your IF doesn't have body 😄
Avatar
oh lol now i see what you mean
8:08 PM
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (EventInstigator && EventInstigator->CharacterField()) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { APlayerController descr; FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (_this->IsA(AShooterPlayerController::GetPrivateStaticClass()) && WeaponName.Contains(L"Armor Piercing")); { Log::GetLog()->warn("Weapon Name: {}", WeaponName.ToString()); Damage = Damage * 0.10; } } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser);
Avatar
almost, dont need ;
Avatar
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (EventInstigator && EventInstigator->CharacterField()) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { APlayerController descr; FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (_this->IsA(AShooterPlayerController::GetPrivateStaticClass()) && WeaponName.Contains(L"Armor Piercing")) { Log::GetLog()->warn("Weapon Name: {}", WeaponName.ToString()); Damage = Damage * 0.10; } } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
Avatar
seems good
Avatar
yeah have some leftover stuff
8:10 PM
like APlayerController descr;
8:10 PM
alright compiled fine
8:10 PM
testing time 😄
8:10 PM
thx again @Michidu
Avatar
Rogue Leader 2/5/2019 9:45 PM
@Michidu, the classes for ships, hulls, planks, etc. Basically anything ship or claim flag related.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 9:49 PM
ClaimFlag struct is already implemented APrimalRaft struct is missing
Avatar
Rogue Leader 2/5/2019 10:07 PM
Some of the claim flag functions were crashing.
10:08 PM
Trying to get the ownernamefield was giving me a crash
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 10:08 PM
If the function itself is corrupted you can't do anything 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 10:17 PM
seems like Michidu already added a few more structs including many Raft components
Avatar
Rogue Leader 2/5/2019 10:23 PM
With the ownernamefield being a parent class function, it shouldn't cause a crash in only one subclass though, right?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 10:24 PM
depends if they used virtual modifier internally I guess 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 10:57 PM
btw; I just tested your code again with a "Shooner" + canons
10:57 PM
same result 😄
10:59 PM
Avatar
Rogue Leader 2/5/2019 11:07 PM
Is it possible that I broke my .pdb file?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/5/2019 11:13 PM
honest; I don't have a clue whats wrong 😄
11:13 PM
Maybe try a clean installation
Avatar
Deleted User 2/6/2019 12:57 AM
Does anyone have a few minutes to lend a hand? I have the source code and required library for lootboxes for atlas but need help to compile them together and make them work on atlas. I'm just new to this scene. (edited)
Avatar
GSH | MrOwlSky 2/6/2019 2:37 AM
Welcome to the community! I'm sure someone is willing to help you. If you want the source code kept private reach out to the plugin devs and ranked members on discord.
Avatar
What's the process for getting the Plugin Dev role? "!rank Plugin Dev" from #【💌】ʜᴇʟᴘꜰᴜʟ-ʟɪɴᴋꜱ hasn't worked for me in #【🚩】ʙᴏᴛ-ꜱᴘᴀᴍ channel
Avatar
seems like someone gave it to you @Zachar543 😃
5:59 AM
@Rogue Leader i think most classes were added already, if you compile api from github, you can use new "DumpAll' option
Avatar
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (EventInstigator && EventInstigator->CharacterField()) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(EventInstigator); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { FString WeaponName; AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); if (_this->IsA(AShooterPlayerController::GetPrivateStaticClass()) && WeaponName.Contains(L"Armor Piercing")) { Log::GetLog()->warn("Weapon Name: {}", WeaponName.ToString()); Damage = Damage * 0.10; } } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
9:03 PM
for some reason this works without _this->IsA(AShooterPlayerController::GetPrivateStaticClass()) (edited)
9:03 PM
but not with
Avatar
check if its AShooterCharacter instead (edited)
Avatar
yeah that worked...
Avatar
what is the TargettingTeamField for wild dinos ?
Avatar
Rogue Leader 2/7/2019 9:30 PM
Tribe id. It's probably 0 for wild dinos
9:30 PM
Same for world structures
Avatar
its equal to that yea ?
9:37 PM
it being 0 does not appear to work
9:37 PM
if (_this->IsA(APrimalDinoCharacter::GetPrivateStaticClass()) && _this->TargetingTeamField() == 0)
9:37 PM
using this
9:41 PM
_this->IsA(APrimalDinoCharacter::GetPrivateStaticClass()) && _this->TargetingTeamField() < 10000
9:41 PM
this works
Avatar
Rogue Leader 2/7/2019 9:41 PM
^
Avatar
it looks like anything wild has the id below 10000
Avatar
Rogue Leader 2/7/2019 9:41 PM
Was just about to say try that
Avatar
gr8 my plugin is complete time to post it 😄
Avatar
hope it gets approved soon (edited)
9:54 PM
my first "big" project 😄
Avatar
Nice job!! 😄
Avatar
great work @WETBATMAN
Avatar
thanks for approving it 😄
Avatar
if you wanna improve it one day, load weapon names from config 😃 (edited)
Avatar
let the user set the weapon names you mean ?
Avatar
yea
Avatar
yeah that is an idea i had but didn't find a good way to do that yet 😄
Avatar
hmm both sword and tek sword contain Sword in their name
10:34 AM
is there a way to differentiate between them ?
Avatar
check full name?
10:39 AM
😄
Avatar
is there something like DoesNotContain ? (edited)
Avatar
!Contain() 😃
Avatar
if (_this != nullptr && WeaponName.Contains(L"Sword") != WeaponName.Contains(L"Tek Sword"))
11:04 AM
i think this also works
Avatar
why not check full name instead?
Avatar
both end with sword
Avatar
that's the point of full comparison, they will be different
Avatar
StartsWith is that check ?
11:06 AM
equals i think
Avatar
yeah but the weapons have tier names in their name
11:07 AM
so with equals it will check for something named "Primitive Sword"
11:07 AM
or "Apprentice Sword"
Avatar
maybe start/endwith then
Avatar
yeah that's the thing 😄
11:08 AM
they end with the same thing and start with the same thing 😛
11:08 AM
+StartsWith would have to sort through tier names again
11:12 AM
it seems to work fine like this
11:12 AM
going to update it now
11:18 AM
submitted the fix to the forum
Avatar
great 😃
12:59 PM
enemy structure detection seems to not function when i'm on a dino
12:59 PM
12:59 PM
this is what happens when i whistle my dino to attack
12:59 PM
12:59 PM
this happens if i ride the dino
1:00 PM
if i whistle to attack plugin works fine and damage is prevented
1:00 PM
if i'm on a dino it does not work
1:29 PM
this appears to work
Avatar
dino->bUseBPDoHarvestAttack()()
2:27 PM
this does not work, any other alternatives in the current api or should i compile the new one for the AttackInfo ?
2:28 PM
(want to identify if a dino is using secondary or primary attack)
Avatar
Rogue Leader 2/8/2019 3:49 PM
dino->bUseBPDoHarvestAttack()() will just return if a dino can use a harvest attack. It's not a hook on a function
Avatar
Rogue Leader 2/8/2019 4:07 PM
You could try hooking on the APrimalDinoCharacter->DoAttack() function and see if AttackIndex changes based on which attack is used.
4:07 PM
If it does you can use that hook instead to just stop the attack if they are too close to an enemy structure (edited)
Avatar
@OwnProx added attack info to the api so ill try compiling it and using that
4:35 PM
because it can be called in TakeDamage
5:02 PM
does attack infos require a new hook ?
Avatar
damn no EventInstigator with DoAttack so no notifications 😦
Avatar
i think i broke my brain trying to log attack index
5:54 PM
how do i log it ?
6:19 PM
what am i doing wrong 😄
Avatar
this isn't looking right huehuehue
11:36 PM
😛
Avatar
@WETBATMAN Clean and rebuild the solution. I find that Visual Studio sometimes gets confused and leaves old errors marks around (edited)
11:37 PM
Rebuilding normally fixes it for me
Avatar
tried that but does not work 😄
8:58 AM
Avatar
What's "_this" in your screenshot?
Avatar
APrimalDinoCharacter* _this,
Avatar
anyone knows how attack index is used
12:41 PM
or how to log it ?
12:41 PM
bool Hook_APrimalDinoCharacter_DoAttack(APrimalDinoCharacter* _this, int AttackIndex, bool bSetCurrentAttack, bool bInterruptCurrentAttack)
12:41 PM
from this hook
Avatar
Rogue Leader 2/9/2019 3:26 PM
Log::GetLog()->warn("Attack Index: {}", AttackIndex); (edited)
Avatar
wait you can simply log attack index like that ?
5:03 PM
will try out once i’m near my pc
5:03 PM
thanks ❤️
Avatar
Is anyone using AShooterPlayerController->ClientChatMessage() or ArkApi::SendChatMessage() and getting an unexpected tab character before the message? (edited)
7:14 PM
It doesn't happen with normal chat sent by players, but does when ClientChatMessage is used in a plugin. It's not in the message, so I'm not sure where it's coming from (edited)
7:16 PM
Example: The "Test: Test" has a tab character after the colon that I'm not trying to add
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/9/2019 7:16 PM
For me it looks like a gab caused by the Icon
Avatar
Yeah... I thought so as well, but I tried adding the same icon and it's still a bit off. I'm suspecting that it's a tab character since the spacing varies based on the width of the text before the colon
Avatar
Hmm... I'm not sure how I fixed it, but it's working better now. The next problem is that the first <RichColor> tag in a message cause a space
Avatar
it's probably how game interprets it
4:38 PM
will a check like this work ?
Avatar
Rogue Leader 2/10/2019 5:16 PM
I would put parenthesis around all the contains (edited)
5:17 PM
Some languages would evaluate that in such a way that it would always fail unless it was a Direwolf
5:17 PM
But idk about C++
Avatar
yeah i just added it to my final if statement and i worked
5:18 PM
also it required == not =
5:18 PM
thanks @Rogue Leader
Avatar
Rogue Leader 2/10/2019 5:19 PM
== is the comparison operator while = is the assignment operator (edited)
Avatar
how would i go about HWID locking a plugin 😛
Avatar
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass())) { if (!_this->IsDead() && !_this->IsConscious() && _this != nullptr) { _this->Suicide(); } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
11:49 AM
hmm any other way to kill a player ?
11:50 AM
Suicide() times the server out and it crashes 😄
Avatar
I believe the issue is the player dieing in the hook (I had similar issues with dinos). You could try calling the original function earlier or add the player to a list and go through it later.
Avatar
shouldn't !_this->IsDead() check weather the player is alive before executing the suicide function ?
Avatar
bool meetsrequirements; float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsDead() && !_this->IsConscious()) { meetsrequirements = true; } else { meetsrequirements = false; } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } void AutoKill(AShooterPlayerController* AttackerShooterController, FString* message, int mode) { if (meetsrequirements=true) AttackerShooterController->GetPlayerCharacter()->Suicide(); }
3:36 PM
maybe this will work 🤷
Avatar
instead of killing someone in TakeDamage function (which can result to calling die() 2 times), set Damage variable high.
Avatar
so basically kill them with high damage 😄
3:39 PM
hmm that could work
3:39 PM
yeah but what if incoming damage is torpor
Avatar
might still work 😄
Avatar
wouldn't checking !_this->IsDead()
3:42 PM
before killing the player prevent it from being called 2 times ?
3:42 PM
only if you dont call orig function
Avatar
yeah but returning it here is necessary isnt it ?
Avatar
actually no
Avatar
hmmm
3:54 PM
let me try without the original function then
3:54 PM
because otherwise it crashed the server 😄
Avatar
without the original function it breaks damage 😄
5:15 PM
characters dont take any dmg now
5:17 PM
setting the dmg really high worked lol
5:55 PM
hmm starting a thread like this doesn't work ?
Avatar
it's very weird..
Avatar
yes indeed 😄
6:01 PM
couldn't get the api timer to work
Avatar
with timer it will be same
6:02 PM
do you really want to change function argument in new thread
Avatar
can the thread be started after the new damage value is set ?
Avatar
but what for?
Avatar
want to kill the player after he/she has been unconscious for a certain amount of time
Avatar
you will have to use suicide in new thread (but timer is better)
Avatar
the template i found on the wiki didnt work
6:11 PM
API was redded out
Avatar
Out of interest, what are you trying to accomplish? Depending on what you are trying to do, there may be a simpler way. (edited)
Avatar
basically on my server there is this creature that hits you torping you out in one hit and never losses aggro so you just lay there unconscious untill an admin kills you
6:37 PM
so i want to make a timer that waits 3 min for example and then kills the player
Avatar
hmm how would i use suicide in a new thread
7:47 PM
7:47 PM
the Damage = Damage * 10000 cant be outside of that can it ?
Avatar
I told you that you need to use suicide here, damage doesnt make any sense
Avatar
i did and it crashed my server
8:07 PM
every time i got knocked out
8:07 PM
will that not happen with a started thread or ?
Avatar
Not necesary, make sure player is not dead
Avatar
!_this->IsDead()
8:09 PM
i did
8:09 PM
and it still crashed
8:12 PM
8:12 PM
so like this ?
Avatar
Rogue Leader 2/11/2019 8:35 PM
Why not take your first example and just return 0 right after the suicide?
8:36 PM
Stops the hook from calling the original take damage on a dead player.
8:37 PM
Meh, Michs solution is better
8:38 PM
But you're also gonna have to keep track of it a player got knocked out, then 3 mins later got knocked out by something again
8:38 PM
Other wise your timer will kill them if they happen to get knocked out a second or third time at the 3 minute mark
8:39 PM
By a player lol
Avatar
oh that is a pretty good point 😄
8:39 PM
hmm how would i reset the timer if they woke up though
Avatar
Rogue Leader 2/11/2019 8:40 PM
You'd have to have the timer check if they are conscious every few ticks (edited)
8:40 PM
If they are, then cancel it
8:40 PM
If they aren't, continue till it hits 3 mins
8:40 PM
Then kill them
Avatar
that can be done with a thread aswel or would an api timer be needed in that case (edited)
Avatar
Rogue Leader 2/11/2019 8:43 PM
I haven't worked with threads, but it's possible
8:46 PM
Maybe just keep checking if the player is unconscious and not dead every few seconds. If they wake up or die, break out(if you can?) If not continue checking till suicide time
8:46 PM
I'm not sure what cleanup if any is required for a thread either. (edited)
Avatar
i dont think i can use a break; here
9:27 PM
and i also have no idea how to make a check that runs every x seconds 😃
9:28 PM
more research is needed i guess 😆
Avatar
Probably best to avoid threads unless you are really sure you need them. If you create a thread in the wrong place (e.g. the methods called on initialization), you can very easily cause a deadlock. I could be wrong, but I wouldn't count on any of the API methods (within the UE code) being thread-safe. (edited)
11:48 AM
damn i cant even get the API timer to work and i'm talking about threads and shit here
11:48 AM
😛
Avatar
how your callback looks?
Avatar
there is none 😛
Avatar
how it should work then? 😃
Avatar
how should i make the callback
11:56 AM
😄
Avatar
its a function
Avatar
callback needs to be the suicide function i want to use ?
Avatar
no, you can call suicide in callback
11:58 AM
if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsDead() && !_this->IsConscious()) { API::Timer::Get().DelayExecute(&_this->Suicide, 10); } }
11:58 AM
like this ?
12:00 PM
>c:\users\avtoj\source\repos\autokill\autokill\autokill.cpp(15): error C3083: 'Timer': the symbol to the left of a '::' must be a type 1>c:\users\avtoj\source\repos\autokill\autokill\autokill.cpp(15): error C2039: 'Get': is not a member of 'API' 1>c:\users\avtoj\desktop\arkserver\ark-server-api-master\version\core\public\tools.h(36): note: see declaration of 'API' 1>c:\users\avtoj\source\repos\autokill\autokill\autokill.cpp(15): error C3861: 'Get': identifier not found 1>c:\users\avtoj\source\repos\autokill\autokill\autokill.cpp(15): error C2276: '&': illegal operation on bound member function expression
12:00 PM
timer seems to be always redded out
Avatar
no, you still need own function for callback
12:01 PM
like in wiki example
Avatar
void TimerCallBack(int arg1, int arg2) { Log::GetLog()->info("CallBack Executed Args: {}, {}", arg1, arg2); }
12:02 PM
something like this ?
Avatar
yes just other args probably
Avatar
yeah
12:05 PM
even with the default template Timer is still redded out 😄
Avatar
did you include it
Avatar
i didnt
12:08 PM
lol
12:08 PM
yeah not its not redded out
12:10 PM
void TimerCallBack(int arg1, int arg2)
12:10 PM
in here i need to use APrimalCharacter * _this ?
Avatar
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsDead() && !_this->IsConscious()) { API::Timer::Get().DelayExecute(&TimerCallBack, 10); } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } void TimerCallBack(APrimalCharacter* _this) { _this->Suicide(); }
12:20 PM
TimerCallBack : undeclared identifier
Avatar
because it's below
Avatar
c:\users\avtoj\desktop\arkserver\ark-server-api-master\version\core\public\timer.h(31): error C2664: 'void API::Timer::DelayExecuteInternal(const std::function<void (void)> &,int)': cannot convert argument 1 from 'std::_Binder<std::_Unforced,void (__cdecl *const &)(APrimalCharacter *)>' to 'const std::function<void (void)> &' 1>c:\users\avtoj\desktop\arkserver\ark-server-api-master\version\core\public\timer.h(30): note: Reason: cannot convert from 'std::_Binder<std::_Unforced,void (__cdecl *const &)(APrimalCharacter *)>' to 'const std::function<void (void)>' 1>c:\users\avtoj\desktop\arkserver\ark-server-api-master\version\core\public\timer.h(30): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called 1>c:\users\avtoj\source\repos\autokill\autokill\autokill.cpp(19): note: see reference to function template instantiation 'void API::Timer::DelayExecute<void(__cdecl *)(APrimalCharacter *),>(const Func &,int)' being compiled
12:24 PM
void TimerCallBack(APrimalCharacter* _this) { _this->Suicide(); } float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsDead() && !_this->IsConscious()) { API::Timer::Get().DelayExecute(&TimerCallBack, 10); } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
12:26 PM
was missing _this in the timer
12:27 PM
void TimerCallBack(APrimalCharacter* _this) { _this->Suicide(); } float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsDead() && !_this->IsConscious()) { API::Timer::Get().DelayExecute(&TimerCallBack, 10,_this); } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
12:27 PM
i hope it works now 😄
Avatar
looks good
Avatar
btw can an IF check be called with a timer ?
Avatar
want to check if a player is unconscious every few seconds
12:37 PM
if not break the loop
12:38 PM
as @Rogue Leader mentioned it could lead them to being killed if the timer completes and the player gets knocked out twice
Rogue Leader 2/12/2019 1:32 PM
Avatar
@Michidu is there any documentation for integrating permissions into a plugin ?
5:26 PM
want to check if a player in certain permissions groups and if not add him to a group
6:07 PM
@Michidu would something like this work ?
Avatar
yea, thats all
Avatar
dumb question how to check if its true 😄
Avatar
you already do
6:13 PM
it returns bool
Avatar
so if a player is in this group the rest of the IF statement runs ?
Avatar
ah ok
6:17 PM
so if i place ! before then it would only run if its false ye ?
6:18 PM
if not in group
Avatar
yeah
6:18 PM
thanks ❤
Avatar
TeamSelector.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) bool __cdecl Permissions::IsPlayerInGroup(unsigned __int64,class FString const &)" (__imp_?IsPlayerInGroup@Permissions@@YA_N_KAEBVFString@@@Z) 1>TeamSelector.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __cdecl Permissions::AddPlayerToGroup(unsigned __int64,class FString const &)" (__imp_?AddPlayerToGroup@Permissions@@YA?AV?$optional@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@_KAEBVFString@@@Z) 1>C:\Users\avtoj\source\repos\TeamSelector\x64\Release\TeamSelector.dll : fatal error LNK1120: 2 unresolved externals
6:54 PM
what's this ?
6:55 PM
can i not load a permission name from config ?
Avatar
you need permissions.lib
Avatar
i have it in the linker
6:56 PM
or do i need to include it too ?
6:57 PM
yeah probably shouldn't have asked that 😄
6:57 PM
that was it thanks again
7:41 PM
getting this crash
7:41 PM
can a name of a permission group not be in the unicode format in the config ?
7:41 PM
or can commands not be in unicode ?
Avatar
does sending a notification to a player not work unless you hook something ?
8:36 PM
No, its smth else
Avatar
i'm having issues loading commands and other Fstrings from the config
8:36 PM
it cant read them
8:37 PM
tried to use GetText from your ArkShop
8:37 PM
TeamSelector.obj : error LNK2001: unresolved external symbol "class FString __cdecl TeamSelector::GetText(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?GetText@TeamSelector@@YA?AVFString@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 1>C:\Users\avtoj\source\repos\TeamSelector\x64\Release\TeamSelector.dll : fatal error LNK1120: 1 unresolved externals
8:37 PM
but got this
Avatar
sometimes i cannot comprehend the level of my stupidity
8:50 PM
i fucking forgot to load the config in the Load Function
Avatar
What does error 1114 mean? When loading plugin
Avatar
It happens for many reasons. It's a pseudo generic error code that something went wrong when loading the DLL. Check if there were any exceptions thrown in your DLL_PROCESS_ATTACH code
12:02 AM
If you didn't write the plugin or didn't change anything in the code, check that the config file isn't malformed
Avatar
Thanks, I'll try catch exceptions in DLL_PROCESS_ATTACH
Avatar
Rogue Leader 2/13/2019 12:13 AM
Most of the time it's been a config error. If you used one double check that your config is correct and all your variables that pull from it are correct
12:14 AM
Could be a misspelling somewhere, an invalid type being loaded, the config file may not be the correct encoding and so on. (edited)
Avatar
Either way, logging is your friend 🙂
Avatar
Yes, it's my first own plugin 😃
Avatar
Nice 🙂
Avatar
Has anyone tried to use threads in plugins? I want to do broadcasting messages to players by timer and wrote simple class that starts new thread and should be broadcast messages. But plugin is stucks when creating thread void Broadcaster::StartBroadcasting() { m_is_working = true; m_thread.reset(new std::thread(&Broadcaster::m_InternalFunc, this)); // Stucks here } This code is works well in other console project
Avatar
use the api timer
12:38 PM
it has a feature for a repeating function
Avatar
Ok, I'll try it. Thanks
12:45 PM
Are there any way to stop/pause timer? Function uses config's data and maybe need to reload it. So need to pause timer to update shared data. Or protect data but I think this a bad way to protect json object
Avatar
hmm maybe you could add the custom function in the unload function
1:17 PM
take a look at ArkShop plugin it has quite a few of its own functions that it unloads (edited)
Avatar
I am using API timer, but plugin still stucks... At RecurringExecute point
Avatar
what do you mean 'stucks'?
Avatar
Plugins loading stops when try to load my plugin. Without any messages or errors
Avatar
then you do something wrong in RecurringExecute, keep in mind that it doesn't start a new thread
Avatar
A pass true for async argument
8:44 AM
If look at source code - RecurringExecute should start new thread and detach from it. Or I did not understand something?
8:48 AM
I tried log debug message at start of thread function and message did not display. Seems execution thread do not enter into function
Avatar
ye, right then
8:51 AM
so how it looks?
Avatar
how would i forcibly unload a plugin?, if the HWID does not match for example
Avatar
crash it 😃
Avatar
any way to actually deny plugin loading on startup 😄
Avatar
just dont load commands/hooks and return false in dllmain
Avatar
@Michidu Log::GetLog()->info("Before start timer"); // This executes API::Timer::Get().RecurringExecute([]() { Log::GetLog()->info("Entering into timer func"); // This doesn't execute if(shutdown_process == true) { return; } TArray<uint64> players = database->GetPlayerIDs(); Log::GetLog()->info("After request to DB"); TArray<Rank> ranks = config.BuildRankList(); for(const auto steam_id : players) { if(auto* player_controller = ArkApi::GetApiUtils().FindPlayerFromSteamId(steam_id); player_controller != nullptr) { TArray<FString> player_groups = Permissions::GetPlayerGroups(steam_id); uint64 total_play_time = (realtime_cache->GetPlayTime(steam_id) + database->GetPlayTime(steam_id)) / 60; for(const auto& rank : ranks) { if(total_play_time >= rank.cost && !player_groups.Contains(FString(rank.name.c_str()))) { ArkApi::GetApiUtils().SendChatMessage(player_controller, config.GetMessageText("Sender"), *config.GetMessageText("BroadcastMessage")); break; } } } } }, config.GetBroadcastInterval(), -1, true); database it's wrapper for daotk::mysql::connection protected by mutex realtime_cache it's simple storage for online players. Also protected by mutex Nothing executes here and plugin loading stops. If i comment RecurringExecute then works fine.
Avatar
are you sure config.GetBroadcastInterval() works?
Avatar
Should works inline uint64 GetBroadcastInterval() const { std::lock_guard<std::mutex> guard(m_mutex); return (static_cast<uint64>(m_config["General"]["BroadcastInterval"]) * static_cast<uint64>(60)); }
11:12 AM
Config is correct
Avatar
still you might want to check it
Avatar
Ok, I'll check it. But this works fine std::cout << (static_cast<unsigned long long>(config["General"]["BroadcastInterval"]) * static_cast<unsigned long long>(60)) << std::endl;
11:26 AM
Are there any plugins to look at that use API's Timer? I did not found those
11:30 AM
you dont execute it at dllmain?
Avatar
I am trying latest code (with std::cout) into another executable project, because I have not a server. Just check getting value from json
Avatar
what do you mean in another executable ?
11:33 AM
not even a game?
Avatar
This not in a game std::cout << (static_cast<unsigned long long>(config["General"]["BroadcastInterval"]) * static_cast<unsigned long long>(60)) << std::endl; RecurringExecute, of course, in the game
11:37 AM
I know precisely that config readed successfully at call RecurringExecute
Avatar
try w/o async
Avatar
Ok, I'll try it, thanks. I had been the same problem when tried to do it just by std::thread
Avatar
dont do it in dllmain
Avatar
What do you mean? dllmain calls Initialize() and Initialize() calls RecurringExecute()
12:07 PM
Do you mean do it by a command, but not when loading dll? (edited)
Avatar
at plugin load most game functions are not initialized, so it might be the reason (edited)
Avatar
It seems that when a thread is created from within DllMain upon DLL_PROCESS_ATTACH it won't begin until all dll's have been loaded. Since I need to make sure the thread runs before I continue, I ge...
12:24 PM
This is probably the problem
12:26 PM
I'll try it in the evening
Avatar
Does your mysql library create a connection pool? If so, it may be trying to create threads, which can cause a deadlock in Dllmain.
Avatar
Mysql loaded successfully and works without timer
Avatar
I have a few plugins that needed threads, and I had to use the Windows API CreateThread to prevent the deadlock.
Avatar
I use daotk library and I create one connection and protect it by mutex
12:41 PM
Hm.. Thanks, will keep in mind
Avatar
thanks for the mentor role ! 😄
Avatar
Rogue Leader 2/14/2019 5:15 PM
😘
Avatar
GSH | MrOwlSky 2/14/2019 7:34 PM
Anyone know what this is and how to fix it? https://pastebin.com/rjefEtxD Atlas Server Manager Crash report, Ownprox been afk for a bit.
Avatar
@Michidu can you make PluginServerManager log the crash into a file maybe ?, because it seems that i get no crash reports anymore in the logs 😄 (edited)
Avatar
@GSH | MrOwlSky When does that error happen? Was a server process running at the time or does it happen when it would have started a new server process? (edited)
1:31 AM
Actually, based on the stack trace, it looks like it's attempting to close a process that it didn't start
1:35 AM
A advanced monitoring tool for atlas, that supports automatic updating... - ownprox/Atlas-Server-Manager
Avatar
GSH | MrOwlSky 2/15/2019 2:16 AM
Hmm, Happened when I try adding new server to program
Avatar
how do i run a console command through the API ?
6:30 PM
or is there a function for wiping wild dinos ?
Avatar
Do you have access to a player instance?
6:58 PM
If you do, and only want to run the wild dino wipe on some player event, you could force them to run it
6:59 PM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
not really i want to run it on a timer
7:05 PM
so i think CMD execution would be better
Avatar
What's the plan? I would suggest avoiding doing frequent wild dino wipes as they seem to stall the server for a bit while it happens.
Avatar
not for me someone requested this from me 😄
Avatar
WC ends up doing them on server startup for that exact reason
Avatar
he said ark server manager does not work for them
7:10 PM
so my plan was to trigger a warning message first then worldsave wait 20 seconds and then do the dinowipe
Avatar
Using that method on a running server may work, but you may end up having to schedule it in some way and do it on the next server startup. (edited)
7:14 PM
We try to avoid using the wild dino command on our running servers as it tends to end in a large enough lag spike that it's difficult to justify.
7:15 PM
It may still be a bit laggy, but you could find all APrimalDinoCharacter objects on the map, check the TargetingTeamId to find if it's wild, and delete any that are wild
Avatar
no way to call a console command though ?
Avatar
Not sure. I believe most of the commands outside of RCON expect a player context
Avatar
hmm
7:18 PM
maybe call an rcon command then 😄
Avatar
If it comes to it, avoid using Suicide() on a ton of things at once. It ends in a horrifying and laggy graveyard of bodies
7:20 PM
I've had success using both of these where _this is a dino: _this->bDestroyOnStasis().Set(true); _this->Destroy(false, true);
Avatar
nah if there is no good way to call a console command i'll probably tell the dude that its better to just wipes dinos on startup 😄
7:21 PM
destroying them manually will cause more lag i think
Avatar
It could, but you could also customize it in a way that allows you to go through the dinos far more slowly to prevent any lag spike
7:23 PM
Adding them all to a list of some sort, and only delete a number of them per some time period could let you prevent the lag spike entirely
7:24 PM
I've definitely had to deal with something similar for a private dino/structure decay plugin
Avatar
at that point it would be easier to fix ark server managers dino wipe for them 😄
Avatar
It seems to work for us
Avatar
me too but for the person who requested this plugin from me it didn't
7:27 PM
i just wipe dinos on startup
7:27 PM
best way ^
Avatar
Definitely
Avatar
can mysql be used to push data to servers
8:22 PM
instead of them querying for it
Avatar
Not really. Database are really more for querying
8:41 PM
I've been creating a lot of plugins using Message Brokers like RabbitMQ or Redis' pubsub feature (edited)
8:42 PM
It's an option, but not straight forward
8:42 PM
What do you want to push? You may be able to get away with RCON commands (edited)
Avatar
something like mysql crosschat 😄
Avatar
There have been a few of those with varying up and down sides. There was one that still sort of works where it uses a shared sqlite database and windows messaging to tell the other servers to look at the database for new messages
8:52 PM
OwnProx has one that uses RCON
Avatar
yeah i currently use that one
8:52 PM
with the sqlite databse
8:52 PM
the RCON one lags like hell
Avatar
You'd like mine then 🙂 It emulates in-game chat (looks like messages from normal players) with quite a bit of configuration options in the message format, but I haven't released it publicly due to the extra setup required (edited)
Avatar
damn that sounds cool 😄
Avatar
That "extra setup" is a RabbitMQ instance that someone would have to maintain. I use it for a few other things, so it's worth it, but it would be interesting to try to couch people through that setup
Avatar
one more question 😄
8:58 PM
can the API timer be somehow stopped ?
8:59 PM
for example if i use a WHILE statement to check if a player is knocked out
8:59 PM
dont want the player to get killed if conscious
Avatar
I haven't used it yet. What's the call look like to set it up?
Avatar
havent fully set it up yet tbh
9:00 PM
but currently i had something where an if statement checked if a player was unconscious
9:00 PM
then started a timer
9:01 PM
the timer then checked if the player was unconscious again before suiciding the player
Avatar
I would suggest avoiding long running while loops unless you can be sure it won't stall the main thread
Avatar
hmm
Avatar
For the most part, you should do as little as possible in any hooks or non-async chunks of code
9:03 PM
If you stall the main thread, everything stops
Avatar
hmm i only check if the player is alive and unconscious though
Avatar
Most of the hooks are going to be called from the main thread, and the server is trying to push 30 iterations of that main thread per second. To maintain that, you may only have a few milliseconds to complete what you're doing and let it continue if you don't want to cause lag.
9:05 PM
What's your code look like?
Avatar
void TimerCallBack(APrimalCharacter* _this) { _this->Suicide(); } float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsDead() && !_this->IsConscious()) { API::Timer::Get().DelayExecute(&TimerCallBack, 10,_this); } } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
9:07 PM
something like this currently
9:07 PM
but yeah you're right this will probably have to be asynced
9:07 PM
because this like this it hangs the server
Avatar
It's going to take some more work, but you can do that without dealing with async. It may be a bit of a shift in approach, though. Treat things far more like they're event driven.
9:11 PM
Take a look and see if there are any hooks you could use to know exactly when a player went unconscious or became conscious.
Avatar
i dont think there is anything besides take damage
9:13 PM
i tried to hook IsConscious but that just caused a server crash 😄
Avatar
You can hook/detour almost anything 🙂
Avatar
as it says too many connections 😄 (edited)
Avatar
GSH | MrOwlSky 2/15/2019 10:24 PM
Yeah but how do I fix if I can't connect to it to begin with
Avatar
Lean how to update the max_connections setting in MySQL.
I have an issue with SQLSTATE[08004] [1040] Too many connections on a Windows Server 2008 r2. Now I'm trying to increase the max_connections (the default value is 151). In the the MySQL 5.6 root ...
10:24 PM
You'll have to edit some variables in my.ini
10:25 PM
You could also shutdown something that's using it
Avatar
GSH | MrOwlSky 2/15/2019 10:25 PM
We got couple hundred atlas and ark servers all connected to it. Tried shutting some down didn't help
10:25 PM
Tried launching CMD tool and it crashes
10:25 PM
Any idea where the my.ini is located folder wise?
Avatar
Sounds like it may be in different places depending on the version installed
10:27 PM
Do you have MySQL or MariaDB folders in Program files?
10:28 PM
Something in MySQL Server folder?
10:29 PM
That or a data folder inside that
Avatar
GSH | MrOwlSky 2/15/2019 10:29 PM
Do you know the folder path?
Avatar
Looks like there are several places it could be, and it will use defaults if it can't find a matching file in one of the folders: https://dev.mysql.com/doc/refman/8.0/en/option-files.html
10:31 PM
Do you have mysql set up as a window service?
Avatar
GSH | MrOwlSky 2/15/2019 10:32 PM
Not sure it's installed on a windows OS
Avatar
Do you have a my.ini or my.cnf in C:/ or C:/Windows?
10:38 PM
Unless you can get a connection long enough to update the max connections using SQL, you're going to have to restart the mysql server to apply any config changes. I'm not sure what you're using it for, but restarting the mysql server will drop all connections and could crash anything that's not set up to handle that (edited)
Avatar
GSH | MrOwlSky 2/15/2019 10:38 PM
How do I restart it?
Avatar
It's probably a windows Service
Avatar
GSH | MrOwlSky 2/15/2019 10:39 PM
I got in
10:39 PM
Where do I update it at
Avatar
How many connections do you expect?
Avatar
GSH | MrOwlSky 2/15/2019 10:39 PM
500+
Avatar
Ooof... That's quite the cluster lol
Avatar
GSH | MrOwlSky 2/15/2019 10:40 PM
😉
Avatar
One sec
Avatar
Deleted User 2/15/2019 10:40 PM
How many machines you are using ?
10:40 PM
By connection he dont mean then umber of player that you will have
10:40 PM
but how many client will be connected to the mysql server i think
Avatar
GSH | MrOwlSky 2/15/2019 10:40 PM
Each machine is not a connection
10:41 PM
Connections are based off how many servers/connections are running on the machine.
Avatar
When atlas gets involved, each section of the map is likely at least one connection
Avatar
GSH | MrOwlSky 2/15/2019 10:41 PM
^
Avatar
Something like this:
10:41 PM
SET GLOBAL max_connections = 550;
Avatar
GSH | MrOwlSky 2/15/2019 10:42 PM
Where do I add that?
Avatar
Deleted User 2/15/2019 10:42 PM
Avatar
GSH | MrOwlSky 2/15/2019 10:42 PM
That's already set to 0
10:42 PM
Still having the issue
Avatar
I'm guessing it's the global max connections of the whole mysql server
10:43 PM
You can try dropping that into the text editor that had "SELECT * FROM atlas_rankup.players;" in your screenshot
Avatar
Deleted User 2/15/2019 10:43 PM
I have no connection problem i just showed him the screen on where he can change maximum connection
Avatar
That's the per-account limit. There's also a whole-instance limit that seems to be the limiting factor here
Avatar
GSH | MrOwlSky 2/15/2019 10:44 PM
You don't run a large cluster for Atlas either though. Your connections wouldn't be maxed anyway. Default is 100. Account limit is set to 0 but still hitting a limit. @Deleted User
Avatar
Deleted User 2/15/2019 10:44 PM
10:44 PM
You can also change file option here
10:45 PM
if you dont know where to found your my.ini
10:45 PM
and Even with 50 maps it dont change anything
10:45 PM
Each ip = a connection to the server
Avatar
Uhhh.. not necessarily
Avatar
Deleted User 2/15/2019 10:46 PM
maybe im wrong that what i undertod from the time that im using it
Avatar
I can create a pooled connection from one ARK process that creates 500 connections. It wouldn't be a good idea, but it's certainly doable
2256_ITNSL_Yang_MAGA_fingerguns 1
10:47 PM
If you replace the "SELECT *" thing with: SET GLOBAL max_connections = 550;
Avatar
GSH | MrOwlSky 2/15/2019 10:47 PM
Would this work? @Zachar543
Avatar
That looks right
10:47 PM
Is there a button to apply it or do they expect you to restart?
Avatar
GSH | MrOwlSky 2/15/2019 10:47 PM
Yeah applied it, So far so good.
Avatar
I mostly deal with Postgres, so trying to scrap together pieces of info from the internet and my limited use of MySQL 🙂
Avatar
GSH | MrOwlSky 2/15/2019 10:48 PM
You da man, @Zachar543 Much love and respect. 🔥 Yeah, Used MySQL couple years back when running MC servers but never got into configuration for it.
Avatar
No problem. Happy to help where I can
Fire 1
Avatar
GSH | MrOwlSky 2/15/2019 10:55 PM
Just to confirm that did work, Rebooted Atlas server and it allowed it to load/connect to permission mysql database. Assuming people will be running into that issue into the future. I'll get with @Michidu once I get our atlas servers setup and going smoothly and see if we can get some discord updates/guides for atlas and api to help people like that. See if he'd be willing to create a role for community helpers who would be willing to post in a guides only channel that could help and benefit the community via discord.
Avatar
Out of interest, how large is your Atlas map? Official's 15x15 is only a 225 processes
Avatar
GSH | MrOwlSky 2/15/2019 11:07 PM
Sorry was working on servers
11:07 PM
We run a 8x8 atlas map. Alongside other Atlas servers. We run multiple video game servers outside of ark/atlas all have been very successful.
Avatar
does anyone here use PluginServerManager ?
7:50 PM
if so do you get .crashstack files in the logs anymore ?
Avatar
GSH | MrOwlSky 2/16/2019 8:30 PM
I haven't used it
Avatar
its pretty sweet but its so fast i cant peek at my crash logs anymore haha
8:32 PM
and i dont get .crashstack files anymore for some reason
Avatar
GSH | MrOwlSky 2/16/2019 8:32 PM
lol, yeah no clue.
Avatar
any way to get the count of lands a tribe/player has claimed in atlas
7:45 PM
searched around Actor.h but couldn't find a function for it
7:47 PM
the flags i mean
Avatar
Take a look at APrimalStructureClaimFlag. Last I tried, though, APrimalStructureClaimFlag::GetPrivateStaticClass() causes a crash.
8:29 PM
If you only want the flags for that specific section of the map, that should work, otherwise, you'll have to find a way to get that out of the Redis instance (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/17/2019 8:32 PM
APrimalStructureClaimFlag::GetPrivateStaticClass() sometimes causes the server to crash I agree - but not any time. Have you added the APrimalStructureClaimFlag to your config.json of the API?
Avatar
I hadn't no. I only had an hour or so to work on it, so didn't get far
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/17/2019 8:34 PM
I guess there also is another option to obtain the Class of those objects.. don't really remember the name of the field but something like StaticClassField
Avatar
hmm so getting it from redis appear to be the only way ?
Avatar
This was several days to a week ago. APrimalStructureClaimFlag had just been added to github
Avatar
only want to get the count of flags/land claims for tribe (edited)
Avatar
Yep, got that part of it. The approach may be different if you want to know about all claim flags on all of the connected map sections (the whole grid) rather than just the current cell
Avatar
damn never worked with redis
8:40 PM
do i have to use a pointer to it ?
Avatar
I haven't dug too much, but there are likely API methods that will let you get all claim flags
Avatar
yeah but api methods can only get the flags per instance no ?
8:42 PM
per map
Avatar
It could go either way. Each server has access to read and write from Redis, so they definitely have something that will get you the list, but it may not be a simple "get all claim flags for tribe"
Avatar
yeah so right now redis is the best way
Avatar
I would argue trying to go around Atlas will be much more difficult
8:47 PM
The claim flag format in Redis is interesting to say the least
Avatar
hmm i cant think of a way to get the global flag count otherwise
Avatar
Try to find any existing API methods
8:49 PM
Re use them as much as you can 🙂
8:49 PM
And hopefully let Atlas deal with it's own odd binary format
8:50 PM
yeah i think i should write the actual hook first
8:50 PM
hopefully i can at least find a method to block a land claim first
8:51 PM
then figure out how to get the flag count 😄
Avatar
Hmm... Did the newest commit (from 16 days ago) revert the APrimalStructureClaimFlag PR? The struct appears to be gone now (edited)
Avatar
are flags and lands referred to as something else in the API or am i just dumb 😄 (edited)
4:50 PM
cant find a function for calming land
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 Yeah, I saw that. It looks like a few commits after PR 27 was merged, your changes to version/Core/Public/API/Atlas/PrimalStructure.h were overwritten.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/18/2019 5:00 PM
You can still copy the code of it then
5:00 PM
and use it 😄
Avatar
Sounds good, thanks. Just wanted to make sure someone was aware
Avatar
Rogue Leader 2/18/2019 8:43 PM
We still need an official copy of the api for end users as well. Any plans on pulling the rest of the atlas classes into the official API soon?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/18/2019 8:44 PM
you don't need those structs.. most of them are not even in the .dll file
8:44 PM
The version.dll only contains structs which have been used from APIUtils for example.. anything else is redundant and will be removed from compiler at compiling time
Avatar
Rogue Leader 2/18/2019 8:48 PM
So the version.dll doesn't need to be swapped up when the api is updated locally?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/18/2019 8:48 PM
depends on the change 😄
Avatar
it doesn't require update when you only add new structs
2:24 PM
is there anything different for sending notifications in atlas ?
Avatar
it's same, what error?
Avatar
is there any way to cancel the api DelayedExecute timer ?
Avatar
only if you manually add it
6:47 PM
hm, there must be something wrong with your types
Avatar
yeah trying to convert a plugin 😛
6:48 PM
my timer callback looks like this
6:48 PM
void TimerCallBack(APrimalCharacter* _this, AShooterPlayerController * target) { while (!_this->IsConscious() && !_this->IsDead()) { AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(target); AShooterPlayerController* player = (AShooterPlayerController*)target; uint64 steamId = ArkApi::GetApiUtils().GetSteamIdFromController(player); player->GetPlayerCharacter()->Suicide(); } } (edited)
6:48 PM
and my hook looks like this
6:48 PM
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { AShooterPlayerController* target = _this->GetCharacterController(); if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { API::Timer::Get().DelayExecute(&TimerCallBack, 10, _this, target); } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
6:48 PM
but i cant seem to initialize AShooterPlayerController in the hook
6:50 PM
i suspect that using _this->Suicide() causes the server to hang becase it wipes all APrimalCharacters instead of the player currently knocked out (edited)
Avatar
i dont think you need to use while 😃
Avatar
want to check if a player is unconscious every few seconds and if not cancel the timer (edited)
Avatar
that not how it works
7:01 PM
DelayExecute will execute functin once after specified amount of time (edited)
Avatar
so no way to cancel it ?
Avatar
cancel what? 😃 it will be executed only once anyway
Avatar
not what i mean
7:02 PM
when a player gets knocked out i want to start the timer
7:02 PM
but if they wake up BEFORE it finishes i want to cancel the timer (edited)
7:03 PM
because otherwise if the player wakes up and then gets knocked out again it will kill them anyway
Avatar
check if he is in not IsConscious in TakeDamage
Avatar
i already do
Avatar
well i did 😄
7:07 PM
but that will only check it twice no ?
7:07 PM
when the player first gets knocked out and during delay execute
Avatar
and that what you need? remember that DelayExecute executes once (edited)
Avatar
i need to check if the player is unconscious during the timer run
7:09 PM
if the player wakes up during the timer cancel the timer
7:09 PM
is that possible with the API timer ? (edited)
Avatar
you did it better now
7:11 PM
only thing you need to change is add IsConscious check and replace 'while' with 'if'
Avatar
hmm alright will try that
7:11 PM
but i cant even get the core of the plugin to work
7:11 PM
_this->Suicide() completely locks up the server and client
Avatar
i dont think you even need to start timer if player is conscious
7:12 PM
i think while does it, not suicide
Avatar
no i tried it without the timer at first and it completely locked up too
Avatar
without while? 😃
Avatar
yes
Avatar
hm it always worked fine
Avatar
loat Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) if(!_this->IsConscious() && !_this->IsDead()) { _this -> Suicide(); } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } (edited)
7:14 PM
hook looked like this and it locked up
7:14 PM
no other plugins loaded
Avatar
dont call orig function after suicide
7:15 PM
actually maybe you cant call suicide in takedamage hook at all
7:15 PM
i think i told you that it better to change dmg instead 😃
Avatar
without original function it breaks damage 😄
7:16 PM
i tried it with multiplied dmg but then i cant use the timer
Avatar
dont call only after suicide
Avatar
as you said multiplied dmg in timer makes no sense 😛
Avatar
with timer suicide will work fine anyway
7:17 PM
if player is not dead
Avatar
yeah i will check that in the timer too but right now i cant get suicide to work 😄
Avatar
because you always do it incorrectly 😄
7:18 PM
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsConscious() && !_this->IsDead) { _this->Suicide(); } }return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
7:19 PM
looks like this right now
7:19 PM
just testing for suicide 😄
7:19 PM
anything incorrect here ?
Avatar
its correct but wont work 😃
Avatar
what do you mean ?
Avatar
you call takedamage after suicide again
Avatar
so it needs to be called before ?
Avatar
you dont need to call it if you do suicide
Avatar
so no orig function or what ?
Avatar
if suicide then no
Avatar
so it needs to be returned before ?
7:33 PM
or just not returned if the suicide command succeeds
Avatar
nvm i'm repeating myself lol
Avatar
bool suicide; float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass()) && _this != nullptr) { if (!_this->IsConscious() && !_this->IsDead()) { _this->Suicide(); suicide = true; } else { suicide = false; } } if (suicide == false) { return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } }
8:38 PM
using this the server still hangs 😄
8:38 PM
it crashes actually
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 2/20/2019 8:40 PM
check != nullptr before
Avatar
bool suicide; float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this != nullptr) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass())) { if (!_this->IsConscious() && !_this->IsDead()) { _this->Suicide(); suicide = true; } else { suicide = false; } } } if (suicide == false) { return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); } }
8:41 PM
you mean like this ?
8:48 PM
still crashes
8:48 PM
no crash message or anything though server just exits 😄
Avatar
return 0 instead
5:57 AM
if it doesnt work, then you cant use suicide inside takedamage
Avatar
i tried returning 0 before i tried the current method and it still hanged
8:00 AM
hmm any other hook to detect an unconscious player ?
Avatar
you can use delayexecute 😃
Avatar
Anyone have tips on how to minimize lag on my servers? For example the lag Spikes that make the ping go from lets say 30 to 100 and then back down.
Avatar
start by checking if its network related first 😄
Avatar
I've swapped hosts like 1000 times so im sure its not xD
Avatar
your question is very general if you dont give more info identifying the cause is close to impossible 😄
Avatar
GSH | MrOwlSky 2/21/2019 7:56 PM
Hundreds of different factors can cause lag.
Avatar
exactly
Avatar
Anyone here that can help with Massive memory leak, the point that it doesnt stop and just keeps on going until it reaches 100% memory usage and servers crash (edited)
Avatar
GSH | MrOwlSky 2/22/2019 7:10 PM
For what
7:16 PM
Once the server reaches a certain amount of players it starts to leak 50 - 200 mb a second until it reaches full
Avatar
GSH | MrOwlSky 2/22/2019 7:25 PM
If you got time to call and screenshare I can look into it for you
Avatar
i had the same issue last week
10:41 AM
someone had shot on a boat with a minigun turret, the cpu hit the maximum and 10-20 seconds the server was down
Avatar
i think we should update the FAQ for the forum
6:43 PM
there are too many repeated questions posted
Avatar
WoolyPenguin 2/26/2019 1:42 AM
does anyone know how to fetch server information in atlas like grid x y ?
Avatar
How to set dino gender to specific when u spawn it with ArkApi::GetApiUtils().SpawnDino, anyone know?
Avatar
scuzzykidd 3/1/2019 3:37 PM
okay, have my first task i want to accomplish but not sure if its better as a plugin or a mod and wanted community feedback.
3:37 PM
i want to auto neuter certain dinos upon taming.
Avatar
Rogue Leader 3/1/2019 3:58 PM
A plugin could just run on a timer that set all dinos of that type to neutered.
Avatar
scuzzykidd 3/1/2019 4:20 PM
🤔 a forever looped timer doesn’t degrade performance?
4:22 PM
I’ll give it a whirl and see what happens when it executes the command on all dinos every 5 min.
Avatar
@Nice try changing 'bIsFemale'
Avatar
can the api be used to allow structure placement where they cannot be placed ?
4:40 PM
such as allowing water pipes to be placed anywhere and be irrigated ?
Avatar
@scuzzykidd no, it won't degrade performance if done right however, choosing between plugin and a mod is a personal preference in this case. If you like laggy dev kit, go for it 😃
4:41 PM
the only way i know is hooking IsAllowedToBuild
Avatar
i found a function for IsUnderWater
4:41 PM
not sure if placing a pipe checks for that though...
4:42 PM
btw any example on getting structure name ?
Avatar
not bp?
Avatar
yeah that could work too i guess 😄
Avatar
in structure limiit
Avatar
thx
Avatar
what do i need to return for you to be able to build ?
4:56 PM
return 1; ?
Avatar
211
Avatar
return 211 ?
Avatar
yes
Avatar
holy shit why is the hitbox for irrigation pipes so tiny
5:38 PM
i think its better to dig through game files to find a path for it lmao
Avatar
int Hook_APrimalStructure_IsAllowedToBuild(APrimalStructure* _this, APlayerController* PC, FVector AtLocation, FRotator AtRotation, FPlacementData* OutPlacementData, bool bDontAdjustForMaxRange, FRotator PlayerViewRotation, bool bFinalPlacement) { const FString path_name = GetBlueprint(_this); if (bFinalPlacement && PC != nullptr) { if (path_name.ToString() == "Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Structures/Pipes/PrimalItemStructure_StonePipeIntake'") { return 211; } } return APrimalStructure_IsAllowedToBuild_original(_this, PC, AtLocation, AtRotation, OutPlacementData, bDontAdjustForMaxRange, PlayerViewRotation, bFinalPlacement); }
5:48 PM
hmm with this it still says it needs water
5:48 PM
i assume i need to set the requirement for water to false somehow ?
Avatar
Rogue Leader 3/1/2019 10:56 PM
It's probably not something the API can do since the requirement to be in water would be in the blueprint and not in the server code.
10:57 PM
You could consider using Structures Plus (S+) on your server. You can set their water pipes to not need a water source
Avatar
holy shit s+ has that option ?
11:00 PM
never noticed it lol
Avatar
Rogue Leader 3/1/2019 11:02 PM
AllowIntakeToPlaceWithoutWater=true
11:03 PM
under [StructuresPlus] in gameusersettings.ini
Avatar
yeah just found it lol
11:08 PM
thank you!
Avatar
do Destroy() and Suicide() just not work in APrimalCharacterTakeDamage ?
12:32 PM
both crash the server for me
Avatar
you still trying to call them? 😃
Avatar
yeah 😛
Avatar
it wont work
Avatar
even with the timer ?
Avatar
with timer will
Avatar
with timer nothing happens 😄
Avatar
then smth wrong heh
Avatar
i think timer works though because when i unloaded the plugin during the timer run it crashed on a timer function 😄
7:02 PM
@Michidu is it normal for the PluginServerManager so trigger so much ? 😄 (edited)
Avatar
lol, it might to do something with Discord Integrator had one more report about it
Avatar
yeah i'm with the dev in discord fixing it RN
7:06 PM
what's funny though is that it didn't corrupt the save file lol
Avatar
lucky 😄
Avatar
very lucky this time indeed
Avatar
Deleted User 3/4/2019 10:17 PM
What are we supposed to do if we purchased a plugin but never received it from the author ?
Avatar
GSH | MrOwlSky 3/4/2019 11:16 PM
Who @Deleted User
Avatar
Deleted User 3/4/2019 11:17 PM
ownprox
Avatar
GSH | MrOwlSky 3/4/2019 11:17 PM
What did you buy?
Avatar
Deleted User 3/4/2019 11:17 PM
advanced chat
Avatar
GSH | MrOwlSky 3/4/2019 11:17 PM
He's been crazy busy in real life
Avatar
Deleted User 3/4/2019 11:18 PM
No worries - i don't want to drag him through the mud, i know things get hectic. Just been on a manhunt since i bought it.
11:18 PM
Just not sure how to get in touch with him as i've tried the site, his discord, his dm, etc.
Avatar
GSH | MrOwlSky 3/4/2019 11:19 PM
Try contacting him on discord and let him know you brought it. Yeah he's busy with some personal stuff so he's not ignoring you or anything.
11:19 PM
@OwnProx ^
Avatar
Deleted User 3/4/2019 11:21 PM
tyvm
2256_ITNSL_Yang_MAGA_fingerguns 1
Avatar
Deleted User 3/5/2019 2:20 PM
Still nothing @GSH | MrOwlSky
Avatar
GSH | MrOwlSky 3/5/2019 6:57 PM
Nothing we can do. Have to wait on him @Deleted User
Avatar
Deleted User 3/5/2019 7:02 PM
S'all good - i'm just going to open a paypal ticket as i went ahead and bought the other discord plugin. I really appreciate all of your help yesterday.
Avatar
actually you should wait a bit because on Friday me an ownprox were working on some plugin we never finished 😄
7:04 PM
just wait a bit for him to come online
👍 1
Avatar
Rogue Leader 3/6/2019 7:47 PM
@here are there any Git masters or VSTS/ADO power users in here?
12:42 PM
i get this every time i try to build a plugin that requires sqlite db
12:42 PM
although i have the sqlite folder included
12:42 PM
Avatar
need to add cpp to project
Avatar
how ? 😛
Avatar
as any cpp file 😃
12:47 PM
so it would compile
12:47 PM
need to add those ?
Avatar
those too
12:49 PM
and sqlite3.c
Avatar
included those
12:49 PM
but it says cant find sqlite3.h
Avatar
.h to include directories
Avatar
damn wtf now it cant find the .json
12:51 PM
isn't it included in the API now ?
12:53 PM
wtf how did it find errors in the json.hpp file
1:02 PM
how does the json.hpp file have errors wtf
Avatar
you might need correct include order
1:23 PM
because of sqlite, look in other plugin
Avatar
hmm weird i included everything just like it was in the source code of this plugin
1:24 PM
just changed the json.hpp include (edited)
1:24 PM
in the code
Avatar
what plugin?
Avatar
LootBox
Avatar
ah, dont know about it json is not included with it?
Avatar
it had a path that looked like
1:26 PM
../../../json.hpp
1:26 PM
i changed it to “json.hpp”
Avatar
try other json version maybe
Avatar
yeah will do when i’m near my pc again 😃
Avatar
ya I came here because I am trying to modify LootBox myself and am getting a crap ton of errors for finding json.hpp and SQLiteCpp/Database.h
Avatar
cannot open file 'ArkApi.lib'
2:56 AM
I cant find this anywhere and its the most recent error when trying to compile
Avatar
nm I got it all figured out
Avatar
Directories
Avatar
no I just couldn't find it... its in out_lib didn't know that
3:16 AM
is there a list of what each error code means?
Avatar
Are you getting either 1114 or 126?
Avatar
ah gotcha well I figured it out it was 126
Avatar
um, which channel can I hire someone to do my ark shop?
Avatar
are you serious right now ?
7:21 PM
man people are lazy as fuck
7:23 PM
hey there is alot of creatures and im new to it
Avatar
this is a dev discord not copy and paste a json file discord
Avatar
ah so where can I find someone to help me with the config for the ark shop
Avatar
there are examples for the default config
7:24 PM
take them and adjust for your needs
7:25 PM
how do I combine multiple items
7:25 PM
like structures and stuff like that
Avatar
you mean multiple items in one shop item ?
Avatar
yes like a kit
Avatar
add the blueprint multiple times
7:26 PM
or configure the amount
Avatar
Radiant just make a spreadsheet to do it. It's so easy w a few formulas
9:34 PM
Also, does anyone else have an issue with vc++ 2017 not picking up AtlasApi namespace? I have out_lib set as one of the additional lib directories
Avatar
GSH | MrOwlSky 3/9/2019 9:35 PM
I've created two new channels to help out with that. @. #【🔶】ᴊꜱᴏɴ-ᴛᴜᴛꜱ #deleted-channel
9:36 PM
i hired someone
Avatar
@Haragon did you include the api public folder aswell ?
Avatar
I have it under additional include directories
Avatar
you hired someone to write you a json config ?
9:39 PM
that is quite something
9:39 PM
anyway your public folder has to be included in the c++ section
Avatar
Yeah that's where I have it. I have out_lib set in Linker
Avatar
seems correct
9:40 PM
set language standard to 2017 ?
9:40 PM
should be in c++ language
Avatar
Yeah it's one of those things. Tinker til it works. Yeah I believe so, I followed a mix of an img ownprox posted and some Google doc that floats around the forum
Avatar
yeah that google doc was posted by me 😆
Avatar
I thought so lol
Avatar
so is your project set to release and x64 ?
Avatar
I think I have it on debug
9:42 PM
But x64 yes
Avatar
has to be release
9:42 PM
and x64
Avatar
Ah I guess that's what makes it look at the public folder?
9:43 PM
I'll have to finaggle with it here in a few. I'll let you know how it goes. I believe we're working on the same thing lol
Avatar
you and me ? 😃
Avatar
Yeah. I couldn't get it to pick up AtlasApi either so I just disabled the points part. But if I just needed to be set to release I should be able to enable it
9:44 PM
AtlasShop
9:44 PM
Not api lol
Avatar
GSH | MrOwlSky 3/9/2019 9:44 PM
Gave you role @Haragon long time no see. Glad to see you around.
Avatar
Hey hey thanks. It's good to be here. Been busy messing with rack servers. Atlas will do that to ya haha...
5856_haHAAA 1
Avatar
you trying to compile an existing project or starting from scratch
Avatar
Sort of a spiritual successor I guess lol
Avatar
hehe
Avatar
Hmm, yeah still not recognizing the AtlasApi namespace
Avatar
wait, is the namespace for AtlasApi, ArkApi?
Avatar
@WETBATMAN got it all working... now to try and convert to mysql
Avatar
actually, sqlite works for me but i am using a shared network drive from hyper v host to all my guest vms
Avatar
i pulled the json.hpp from ShopRewards but its still giving me errors 😄
4:54 PM
and for some reason the json.hpp file itself has errors
Avatar
Remove the std:: from those
5:09 PM
In json. Hpp
5:10 PM
It's some issue with different cpp versions treating that type differently
Avatar
nah that just results in more issues lol (edited)
Avatar
worked for me anyways
5:31 PM
what is your error code
Avatar
Severity Code Description Project File Line Suppression State Error C2039 '_snprintf': is not a member of 'std' LootBoxes c:\users\avtoj\desktop\arkserver\ark-server-api-master\version\core\public\json.hpp 11146
Avatar
ok, so forgive me here bc i am a bit of a c++ noob, but from what i can see snprintf gets changed to _snprintf when you use std:: namespace, but if you change it it will compile and read json
5:34 PM
1 sec
Avatar
yeah but how does it error out in the json.hpp file 😄
5:35 PM
which i pulled from another plugin
Avatar
i'm not sure tbh but if you google it people are having that issue with json.hpp in general
5:37 PM
I'm getting the error "snprintf is not a member of std" in jsoncpp.cpp, line 3969. I fixed this by removing the "std::". I was using the latest Android NDK. It might be part...
Avatar
so, lines 11141 and 11147: change if ((codepoint <= 0x1F) or (ensure_ascii and (codepoint >= 0x7F))) { if (codepoint <= 0xFFFF) { std::snprintf(string_buffer.data() + bytes, 7, "\\u%04x", static_cast<uint16_t>(codepoint)); bytes += 6; } else { std::snprintf(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x", static_cast<uint16_t>(0xD7C0 + (codepoint >> 10)), static_cast<uint16_t>(0xDC00 + (codepoint & 0x3FF))); bytes += 12; } } to if ((codepoint <= 0x1F) or (ensure_ascii and (codepoint >= 0x7F))) { if (codepoint <= 0xFFFF) { snprintf(string_buffer.data() + bytes, 7, "\\u%04x", static_cast<uint16_t>(codepoint)); bytes += 6; } else { snprintf(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x", static_cast<uint16_t>(0xD7C0 + (codepoint >> 10)), static_cast<uint16_t>(0xDC00 + (codepoint & 0x3FF))); bytes += 12; } } (edited)
Avatar
nah its something else i think
5:49 PM
line 11140 isn't related to sprintf at all 😄
Avatar
hrm. well im sure youll figure it out lol. getting this thing to work is a pain
Avatar
it's just annoying because the json file is valid just throws errors in this project
Avatar
I may have mysql working....... did a lot of patchwork w/ atlasshop but it compiled w/o errors. testing it now
Avatar
mysql for what ?
8:41 PM
lootbox ?:D
Avatar
damn wtf i could not even get it to compile because of this stupid json error
8:44 PM
wtf
Avatar
literally all i did there was made sure my reference was right and removed the std::
8:47 PM
is there a proper way to debug these other than compile and test??
Avatar
nop
8:49 PM
how does you json include look like
8:49 PM
#include "json.hpp"
8:49 PM
like this ?
9:01 PM
what is error 1114 again?
Avatar
config
9:02 PM
if you're connecting to mysql it means it cant connect to it
Avatar
hm sqlite and mysql both give the code
Avatar
its a config issue then
Avatar
now its complaining about std::swap lol
9:36 PM
lmao wtf does this thing want 😄 (edited)
9:43 PM
ahh finally lol
9:43 PM
managed to build it
Avatar
it is a pain lol. trying to get mysql working is frustrating me
Avatar
after basically rewriting everything I have mysql working 😃
2:31 AM
only thing I cant figure out is how to get it to create the db initially. if i create it manually it creates the table but it wont create it if it doesnt exist. not sure if theres even a way to do that
Avatar
Now to add the fun features 😎
Avatar
no plugin creates the schema 😃
4:11 AM
you have to do that yourself
Avatar
Gotcha, then I probably could have been finished like 3 hrs ago XD
Avatar
hehe
Avatar
what is the going price for a semi-simple plugin? (edited)
Avatar
you selling or buying 😃
Avatar
buying lol
Avatar
hehe
Avatar
dont have much to sell most of my "work" is modifications of others
Avatar
well what do you need
11:59 AM
post it here if not me someone will help you for sure
Avatar
would rather explain as little as possible but lets say a modified version of the points shop in a way
Avatar
depends on what you want to modify 😃
Avatar
its hard to explain without giving it all away
Avatar
Hmm with regard to timed rewards, possible shop purchases or adding totally new functionality like web integration?
Avatar
Timed rewards
Avatar
It may be hard to get a solid number out of anyone without sharing more about what's involved. Depending on what it is, semi-simple could end up being a week of effort and testing. (edited)
Avatar
ya I figured if someone was interested they could PM me and I could go from there
4:44 AM
I just dont wanna post it on here
Avatar
Timed rewarded can be configured to give anything from points, items, to lootboxes. Suggest you learn it as it is very sweet function 😉
Avatar
Is there something special I need to do to use a hook that is also used by another plugin?
Avatar
getting error code 126 when i try
Avatar
no many plugins can use the same hook
7:49 AM
its something else
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/14/2019 12:02 PM
Tom, what are your dependencies 😄 ?
Avatar
Well I'm trying to hook handle new player. I have atlas.h included and I'm using AtlasApi.lib
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/14/2019 1:42 PM
what does your PluginInfo.json looks like?
Avatar
Not home right now but it's pretty normal. I have minApi at like 1.0
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/14/2019 1:43 PM
And the dependencies? Anything changed?
Avatar
No they're vanilla
1:44 PM
I'll have to hop in here when I'm messing with it tonight. I feel like I'm super close
1:45 PM
I'm also actually using handlenewplayer_implementation instead of handle new player because that's what's in the hook generator lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/14/2019 1:49 PM
but I mean 126 is not really about hooking ATLAS internal stuff - more that you're missing a module on startup..
Avatar
Oh really? Good to know. I'll have to give those another look.
2:04 PM
I am pulling in atlas shop, permissions and the api as far as libs. Is that error with regard to includes or libs? Or can it be either
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/14/2019 2:07 PM
Yea it is the error I guess 😄
2:10 PM
First you want to make sure that those dependencies are specified in your "Delay Loaded DLL" (located under Linker section) since plugins getting loaded in order of the alphabet. In addition you might want to specify them in the PluginInfo.json's Dependencies section 😃 (edited)
Avatar
Good to know. Thanks! What's the format for plugininfo.Json? Dont think I've seen dependencies there before
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/14/2019 2:34 PM
{ "FullName":"PluginName", "Description":"Does things", "Version":1.0, "MinApiVersion":1.0, "Dependencies": [ "ArkShop" ] }
Avatar
PluginInfo.json is mostly for releasing plugin, so, for example, users won't forget to update api or install needed dependencies. Otherwise it doesn't do anything.
Avatar
Gotcha. It's probably something in my dependencies in VC++ then. I have the 3 dirs for the 3 libs that I am using in the linker AdditionalLibraryDirectories though. But I may have missed a section
5:57 PM
Also, what's the general process for validating a HWID, make an HTTP request to a stored list?
Avatar
mysql server will probably work best
6:19 PM
just hardcode the ip of your mysql server into the plugin
Avatar
True that. Derp. Ty for the help guys
Avatar
For delay loaded dlls, i put the actual dll names of the dependencies? or the dll name of my project
Avatar
Scratch that - Worked like a charm. Thanks @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰
Avatar
is there some kind of limit to json config files? I get an 1114 error when I load too big of a file it seems
Avatar
There is none. Use exception handler to see error (edited)
Avatar
new update broke APrimalCharacterTakeDamage hook
10:08 PM
none of the plugins with it load
10:09 PM
and ones that manage to get loaded crash the server upon startup
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/15/2019 10:09 PM
ARK / ATLAS ?
Avatar
ARK
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/15/2019 10:09 PM
Are you sure? lol
10:12 PM
pvp-protection fails to load completely and my plugin causes a startup crash
10:12 PM
which has never happened before
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/15/2019 10:12 PM
Gonna take a look at this 😃
Avatar
a lot of plugins use that hook so this can go south pretty fast 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/15/2019 10:14 PM
OriginBegone.dll is that your plugin? (edited)
Avatar
yes
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/15/2019 10:15 PM
could you send me the full implementation of the hook via pm?
Avatar
sure
Avatar
Not sure the best place to put this, but if you own ARK servers, DO NOT install the 293.105 update that just came out (edited)
12:50 AM
Our smallest servers are now attempting to grab over 100GB of RAM (edited)
12:51 AM
Looks like a few major groups (one that applied the update) are already going offline: https://ark-servers.net/
Find the best ARK servers with our multiplayer server list.
Avatar
GSH | MrOwlSky 3/16/2019 1:09 AM
Yeah GOG servers are being effected by that update too
Avatar
It may be ArkAPI
1:14 AM
Testing a few things, but after removing the ArkAPI from one of the servers, it's completely fine at the moment.
1:14 AM
Since the new ark update, all plugins don't work anymore
Avatar
Yeah... It's ARK API. For what ever reason, having it installed causes a rather fast memory leak that appears to be based on how many plugins you have. Running with only the permissions plugin causes ~60GB of commit charge in under a minute
1:38 AM
ARK API v3.0 helps greatly with the memory, but people are reporting it ends up crashes after a few minutes (edited)
Avatar
Rogue Leader 3/16/2019 1:56 AM
@Michidu can you tag us here if there is an update to the API?
Avatar
If anyone wasn't already on 3.0, update to that first. See if it helps as much as it did for us
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/16/2019 1:59 AM
I guess Michidu is already sleeping😅 There might be an Ark update coming out in the next few hours... if thats not the case ARKServerAPI will be updated and we will announce a new version
2:01 AM
And also; I‘ve read a few forum posts in that crashing thread.. I got API version 3.0 running and worked fine for me and my plugins.. so maybe you really need to change the version if you haven‘t yet
Avatar
No issues here on v3.0 and 293.105
Avatar
GSH | MrOwlSky 3/16/2019 3:44 AM
I'm on 3.0 and still having issues
3:44 AM
Ark update broke something
Avatar
3.0 and not seeing crashes atm myself
Avatar
We're not having as extreme memory issues or crashes, but people are getting disconnected in mass every few hours. (edited)
4:07 AM
The server stays up and people can immediately rejoin, which is interesting...
4:07 AM
Not network issues as we have 4 other maps on this machine that weren't effected (edited)
Avatar
API should be updated, need to update affected plugins.
7:53 AM
there are quite a lot of changes (mostly they changed function order), so it hard to see real changes 😃 (edited)
Avatar
I noticed an infrequent reoccurring crash on one of my servers from the free autoprot plugin
Avatar
Use npp instead, not likely someone will update old auto prot
Avatar
the memory leak is real 😄
Avatar
hmm i replaced StaticClass() with GetPrivateStaticClass() in every plugin i had and it's running stable now
Avatar
no leak anymore?
Avatar
no it's normal memory usage
1:11 PM
and no crashes yet
1:12 PM
1:12 PM
btw
1:12 PM
you know what this does ?
1:12 PM
UpdatedItem
1:12 PM
i set it to false to recompile event manager
1:12 PM
i assume it controls if the items get a cooldown in the obelisk upload ?
Avatar
it should update item info, if you change item stats for example
Avatar
ah
1:15 PM
so false here is correct i think
1:17 PM
aight i fixed all the new path related crashes
1:17 PM
but still getting my old crash
1:17 PM
fml
Avatar
remove mod if you can
Avatar
it will wipe all dinos/structures 😄
1:21 PM
i think it's VIP
1:21 PM
talking with the dev now
Avatar
not sure if something was even updated or it just staticclass
Avatar
it's just that i think
1:31 PM
i replaced it in every open source plugin and it does not crash
1:32 PM
well it does not crash with that error anymore 😄
Avatar
i think only one plugin had it from my plugins 😃
1:33 PM
ATLAS version of EtendedRcon has it (edited)
1:35 PM
oh and ShopRewards
Avatar
i dont think atlas affected?
Avatar
might not be
1:39 PM
just pointed that out 😄
Avatar
hmm i noticed ShopRewards no longer prints that it's disabled rewards for people in event manager
Avatar
does ShopRewards handle disabling rewards for event manager or is it done by the API ?
Avatar
@Michidu i think there's something going on with the new ark update
2:53 PM
because even with old shop rewards and deathmatch it does not display the message that rewards for event manager are disabled
Avatar
it never did it 😃
Avatar
03/06/19 08:01 [ShopRewards][warning] Event Manager Detected - Disabling Player rewards for people in EventManager!
3:30 PM
always printed this
Avatar
i dont know, its not from my rewards lol
Avatar
wut ? 😄
Avatar
maybe you use custom
Avatar
no i got it from the forum
Avatar
weird lol
3:31 PM
there is no such feature
Avatar
where tf did this come from then
3:33 PM
lol
3:33 PM
i also checked in event manager and it's not that doing it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/16/2019 3:33 PM
3:33 PM
lol
Avatar
omg is that the new api release ?
3:33 PM
running it rn
Avatar
Only the best 0 byte exe files 🙂
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/16/2019 3:34 PM
yea
3:34 PM
optimized.. lol
Avatar
lol
Avatar
now i'm confused lol what ShopRewards did i have 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/16/2019 3:36 PM
Just optimized code.. lol
Avatar
oh god
3:36 PM
"optimised" 😄
Avatar
anyone know a function which reloads the banlist from URL ?
Avatar
@WETBATMAN Not sure about manually triggering the banlist to reload, but if you use the Ban List URL method and host a text file somewhere, the server will make a request to the URL every minute to refresh the list.
Avatar
oh really
4:59 PM
that is super useful
4:59 PM
i'll just start hosting my own ban list then 😄
Avatar
When I set mine up, I remember it being fairly picky. It's 1 steam id per line, and I believe it requires that the URL end with a .txt extension.
Avatar
yeah it has to be exactly like the official one
Avatar
What can I throw to cause a plugin not to load? Or should I just use return in the load method
Avatar
Unload()
5:19 PM
i think 😄
5:20 PM
or dont load anything until licensee is verified
Avatar
so like during hwid check, if it fails right now i just return, works fine but the plugin is "loaded" still
Avatar
return 0 in dllmain
5:20 PM
you have to return 0 in dllmain for it to unload
Avatar
sorry I am not too familiar with c++, learning as i go, is that what I return from the load method?
5:22 PM
this is dllmain
Avatar
oh derp. should i run my hwid check there?
5:22 PM
call it i should say
Avatar
I think if any exception happens in the DLL_PROCESS_ATTACH and isn't caught, it will fail to load with error 1114 (edited)
Avatar
would this work? or do i need to throw my own exception
5:24 PM
Avatar
you can always crash the server if the hwid isn't in the list 😄
Avatar
hahaha
Avatar
but i guess if its online authentication that would suck if your mysql server went down lol
Avatar
i was thinking about encrypting the hwid and sending a keyfile as well
5:25 PM
as a fallback
5:25 PM
bc i am self hosting my sql server
Avatar
i messed around with HWID myself but could never get it to work 😄
Avatar
i can show you my implementation
5:27 PM
it works just trying to find the best way to let em down lightly
5:27 PM
actually its riddled with logging queries and console logs for debugging 😆
Avatar
It looks like returning false should work
Avatar
well if you dont mind that would be awesome 😄
Avatar
Probably best to have a log message as well, though
Avatar
OK. well bear with me because i am not exactly privy to c++ best practices so i am still iterating
Avatar
so am i 😄
5:28 PM
i'm no expert at c++
Avatar
i found this online, had to do some wizardry with types to get it lined up
Avatar
Hopefully you aren't connecting directly to your database from the person's server 🙂
Avatar
std::string getHWID() { HW_PROFILE_INFO hwProfileInfo; std::string hwid; Log::GetLog()->error("getting hwid"); if (GetCurrentHwProfile(&hwProfileInfo)) { //Fhwid = hwProfileInfo.szHwProfileGuid; std::wstring Whwid(hwProfileInfo.szHwProfileGuid); // your new String std::string Shwid(Whwid.begin(), Whwid.end()); hwid = Shwid; } else hwid = "ERROR_CANT_RETRIEVE_HWID_VALUES"; //intentionally longer than the column allows - see if this is breakable or ok //make sure field in logging table allows for longer length to record these instances- LEN is 31 so go with 32 hwid.erase(std::remove(hwid.begin(), hwid.end(), '{'), hwid.end()); hwid.erase(std::remove(hwid.begin(), hwid.end(), '}'), hwid.end()); hwid.erase(std::remove(hwid.begin(), hwid.end(), '-'), hwid.end()); std::transform(hwid.begin(), hwid.end(), hwid.begin(), ::toupper); Log::GetLog()->error("returning hwid >" + hwid + "<"); return hwid; }
5:29 PM
I am currently, is that bad practice? I am using a severely limited mysql user
Avatar
It's not usually a great idea
5:29 PM
Either way
Avatar
whats the alternative?
Avatar
Some middleware web service would be the "normal" way
5:29 PM
That way your database doesn't need to be open to the internet as well
Avatar
right on. maybe i will host something once i get my R710 running
5:30 PM
could probably do it in laravel in like 5 secs... i did want to automate the process somehow using paypal invoice and hwid for auth, and allow them to change hwid if they change hardware
Avatar
You'd be surprised how many bot nets are scanning for common database ports, and will automatically attempt known exploits if it finds a server listening
Avatar
some devs store the HWID in the dll itself
5:31 PM
actually most do that 😄
Avatar
not a terrible idea but requires i compile it for them all the time 😆
Avatar
Yeah... that's a lot of work lol
Avatar
plus, its one time payment but id be obligated to do hwid updates forever
5:32 PM
im obsessed with automating stuff though so ill probably overdo it
Avatar
Same. Sometimes the automation is the fun part lol
Avatar
i have to hold myself back at work
5:33 PM
i work outside of dev, in ecommerce, so you can see a ton of room for automation... but you make your job easier the job duties just grow and grow
5:34 PM
i could do my job 5 hours a week from my couch... but i go to an office and milk 40. oh well
Avatar
you got this to print the HWID ?
Avatar
it should return hwid
Avatar
you use it in DLLMAIN or the load function ? 😄
Avatar
well i just use it to get the current, i print it if they are not verified
5:51 PM
i am trying now to call the actual check from dllmain, but it gives me 1114 if i put anything in there
5:51 PM
but it works fine from load
Avatar
it gave me 1114 from both haha 😄
Avatar
maybe because i am using error() for logging out of laziness
Avatar
You could do the entire plugin in that DllMain method if you really wanted to. Just make sure you don't use something you haven't initialized yet (like Log::GetLog()).
Avatar
nah that just means it will be red 😄
5:51 PM
that would be what i am using haha
5:52 PM
can i just init my log in dllmain or is there a better way to do this
5:53 PM
can you see where the 1114 is coming from wetbatman
Avatar
it hangs for a bit and then throws that
Avatar
i'll put logs in it to see where it hangs
Avatar
ya, could be an include i forgot to mention but im not sure
Avatar
Yeah, just make sure Log::Get().Init() is called before you try to use Log::GetLog(). Having Load() as it's own method is really only an organization/cleanliness thing. How it's being used in most plugins, there's nothing special vs putting all the code in DllMain
Avatar
goootcha. will give it a shot. TY
Avatar
it's probably an include
5:55 PM
i think hardware profile needs it's own include
5:56 PM
#include <windows.h> #include <stdio.h>
5:56 PM
you have these 2 included ?
Avatar
i didnt need those for some reason
5:56 PM
but they could be included in something else, im not sure
5:56 PM
try it with those
Avatar
nah still 1114
5:57 PM
i'm retarded probably doing something wrong
Avatar
can you see if its an issue with the variable types
5:58 PM
i had so much issue dealing with that wchar_t lol
6:04 PM
OK I have it working in dllmain, except it doesnt like that i declare my hook but never define it
Avatar
nah i think i'm retarded 😄
6:05 PM
when you made it print hwid you just called getHWID() in load ?
Avatar
i call getHWID as a param for the checkHWID call
6:06 PM
not sure of the exact verbage
6:06 PM
gethwid just returns the str, you have to verify it how you see fit
Avatar
yeah ofc but i cant even get it to print 😄
Avatar
it does not log anything from there either
6:07 PM
nothing from the IF or the ELSE statement
Avatar
i get so ate up with it i just throw logs after every line lol
6:08 PM
hate not having a proper debugger
6:08 PM
or not knowing how to use it if there is one lol
6:10 PM
oh i see the issue, i think it runs unload() if you return false in dll_process_attach, where i am removing my hook but i never added it because it is in load
Avatar
C++ isn't where most of my experience is (mostly Java & C#), so I would be interested if there's a way to attach a debugger and get detailed info out. I was able to attach VS 2017's debugger to a local ARK server, but the info I could actually see at break points was unhelpful to say the least. (edited)
Avatar
it would be amazing to debug it in real time
6:12 PM
i mean i have a decent process now, i have a 1x1 with the 1 small isle on it, i compile -> run a move script -> start server. only have my plugin and dependencies and a shit ton of logs
6:16 PM
so i take this
6:16 PM
6:16 PM
and call it like this
6:16 PM
anything incorrect ?
Avatar
std::string currenthwid = getHWID();
6:17 PM
then you need to check currenthwid against your sql server or whatever implementation you have and make sure its there. if its not print it to console so they can send it to you
Avatar
yeah IK
6:18 PM
better get it to print first lmao
Avatar
you can hard code it like they said, then you would just do something like std::string licensedhwid = "whatever they send you"
Avatar
ah shit still unload
Avatar
yea, you just have to use gethwid to set the value of a std::string
6:18 PM
then you can print that str or you could just call it in your log statement if you wanted
Avatar
it's already being printed in this code though 😄
Avatar
some of those i threw in from before i had it printing properly. if it has shit grammar it was meant for me :p you dont necessarily have to print it if they pass license check
6:21 PM
i see what you are saying
Avatar
yeah but it does not even load rn so all that has to be done after 😄
Avatar
so what is printing between > < or is it not even getting that far
Avatar
nah its failing to load with 1114
6:21 PM
i dont even have a config file for this plugin or anything 😄
Avatar
it may be due to the return type
6:21 PM
try just setting a str to getHWID, it will still run the method
Avatar
uhh what 😄
Avatar
instead of ... { getHWID(); ... use ... { std::string currenthwid = getHWID(); ...
6:24 PM
since getHWID isnt a void method
6:25 PM
dont know if it matters, but if its not running the method somethings up lol
6:25 PM
or you could do a try catch and see what that tells you
Avatar
setting it like that causes more issues lmao
Avatar
what does it say once you do that
Avatar
getHWID is undefined
Avatar
well that has me stumped bc you defined it lol
Avatar
damn 😄
6:30 PM
how'd you get this to work lol
Avatar
i dunno haha hardest part was getting it to a std::string lol
6:31 PM
im testing it
6:34 PM
6:34 PM
Avatar
it shouldnt be telling you it is undefined lol that is strange
Avatar
is the bottom screenshot from your load function or from the getHWID function ?
Avatar
i called that from load
Avatar
alright now i'm legit confused
6:39 PM
because it still unloads with 1114 😄
Avatar
without even giving you a value?
6:40 PM
throw a log right before and right after it, if neither of those fire its something else
Avatar
just fyi, GetCurrentHwProfile only returns ID stored in registry, so one can bypass such check only by editing registry 😃
Avatar
you just shattered my entire world, @Michidu
6:48 PM
which value is best used for licensing/verification?
Avatar
probably an id of some part
6:50 PM
like cpu
Avatar
the proper way would be to get cpu id/disk id/other devices and combine them, maybe even hash after
6:50 PM
ye
Avatar
gotcha. well thats good, i only have to change how i am generating the id 😆
6:50 PM
ty for the tip
Avatar
and i still have to get it to load 😄
Avatar
well, honestly just scratch everything i said bc thats not a reliable id anyways
6:52 PM
but, for the sake of learning it is always good to brute force your way through those problems lol
Avatar
it's not hwid generation i'm concerned about
6:53 PM
but why it does not load 😄
6:53 PM
6:53 PM
Avatar
works w/o hwid call?
Avatar
yes
Avatar
it might be because you call it from DllMain or just function has errors
Avatar
"unresolved external symbol" any obvious cause of this issue?
Avatar
Did it just start suddenly without a clear cause?
Avatar
i am testing an md5 script
Avatar
how else are you supposed to call hwid check if its not dllmain 😃
7:05 PM
it works for @Haragon though that’s what weirded me out haha
Avatar
You could do it at the top of your Load(), change Load() to return a bool, and change DDL main to do something like: "return Load();"
Avatar
if you call it in dllmain you need Log::Get().Init("YOUR_PLUGIN"); there instead of in load
7:05 PM
otherwise any logging will error it out
Avatar
i have that
Avatar
^ I'm guessing that's the cause
Avatar
i see your issue right now
Avatar
yeah, you write log before calling Init But the problem with dllmain is that not all libraries might be loaded at that time
Avatar
yea, move 3rd line of your load to 1st
7:07 PM
so whats your recommendation michidu? wait till server starts and then check ?
Avatar
if you call a library that isnt loaded you wont get that far :p
7:08 PM
youll know. for hwid check you arent really relying on any api dependencies so it should be ok
Avatar
just GetCurrentHwProfileA is from Advapi32.dll
7:10 PM
which might be loaded or not
Avatar
hrm, all i can say is it works for me but i cant say for sure that it wont cause problems
Avatar
which function gets called when server fully starts ?
Avatar
hookable function?
Avatar
yes
Avatar
good question heh, let me check out the hooker generator
Avatar
InitWorld isn’t it ?
Avatar
initworld is called during startup
Avatar
InitWorld yeah
Avatar
oh is that on full startup ?
Avatar
"You should never perform the following tasks from within DllMain: Call the registry functions. These functions are implemented in Advapi32.dll." https://docs.microsoft.com/en-us/windows/desktop/dlls/dynamic-link-library-best-practices
Avatar
or just when you launch the server
Avatar
InitWorld is not full server start up but its goot place to do checks
Avatar
i guess if your plugin name starts with something above advapi32 it might not be loaded
Avatar
"within dllmain" meaning not in any method directly called from it as well, right?
Avatar
can a plugin be unloaded during init world ?
Avatar
yeah, as it would be same 😃
Avatar
that sounds so unorthodox but i think you could just call load() within your hook
Avatar
Wanted to add some clarification 🙂
Avatar
hook init world check hwid and unload the plugin if it does not match
Avatar
you can unload plugin at any point
Avatar
oh unload, yeah, that sounds more plausible than loading one during initworld 😆
7:14 PM
read that wrong lol
7:14 PM
that is not a bad idea either
Avatar
yeah but if it loads during startup isn’t it already in memory ?
Avatar
sort of but you would have to do some serious work to bypass that id think
Avatar
so can it be decompiled like this is what i’m asking
Avatar
unless you can override a hook
Avatar
It being in memory is kind of irrelevant. You gave them the DLL 🙂
Avatar
anything can be decompiled but the info isnt super useful
Avatar
Just don't let it do anything
Avatar
that’s actually a pretty good method too 😃
Avatar
This also doesn't stop anyone that knows what they're doing and has enough time from bypassing your authentication
Avatar
check for hwid before every function of the plugin
Avatar
oh yikes that might get a little resource intensive if you have a lot of people
Avatar
honestly it can be cracked easily but i guess its enough for a plugin 😄
Avatar
Yeah...
Avatar
my opinion is that
Avatar
i dont see piracy being a huge issue w/ the api but always good to be safe
Avatar
if someone knows how to decompile this shit
7:17 PM
they would not be buying it from you regardless 😃
Avatar
if someone doesnt have a couple bucks to buy it, and they spend their time doing that they may as well have bought it
7:17 PM
lol
Avatar
with that kind of knowledge they’re better off writing it themselves
Avatar
true that
Avatar
Assuming the plugin isn't 100s of dollars, it's unlikely to be worth their time lol
Avatar
like if your whole security relies on Free Library (unload plugin) then one can just hook freelibrary 😃
Avatar
😮 its like whack a mole!
Avatar
It always is
Avatar
indeed
7:19 PM
im just out here trying to learn c++ and maybe dump on my student loans a little bit lol, but i find this stuff interesting anyways so im stuck till i have a decent implementation haha
Avatar
@Michidu This may be a simple question, but my C++ knowledge is limited. I see references to "Plugin_Init" and "Plugin_Unload" in PluginManager.cpp, but I haven't been able to get ArkAPI to find these methods if they do exist in my plugin. Any chance you know of any examples of those being used in another plugin?
7:21 PM
I have some threading logic that would be good to clean up before FreeLibrary is called
Avatar
it's actually nice functions (someone added them, not me), you need to export them from plugin
7:23 PM
__declspec(dllexport)
Avatar
havent checked out pluginmanager, what all can it do?
Avatar
That's just the source file that handles loading and unloading of plugins in the API
Avatar
i think it would be better to call Plugin_Init from InitWorld hook
7:24 PM
possibly i need to change it in api 😃
Avatar
When I first started setting up some of this threading, I ran into deadlocks due to LoadLibrary having the loader lock, so I have a bit of a workaround that I'm hoping to clean up
Avatar
yeah, Plugin_Init solves deadlock but not other issues of dllmain as of now
Avatar
Thanks, I'll try a few things and see what I can figure out
Avatar
StaticClass() needs to be updated within the api itself too?
Avatar
most classes have GetPrivateStaticClass, which you need to use
Avatar
UObject does not have his function?
Avatar
hmm how is unloading mid startup done ?
7:40 PM
void Unload(); std::string getHWID() { HW_PROFILE_INFO hwProfileInfo; std::string hwid; Log::GetLog()->error("getting hwid"); if (GetCurrentHwProfile(&hwProfileInfo)) { //Fhwid = hwProfileInfo.szHwProfileGuid; std::wstring Whwid(hwProfileInfo.szHwProfileGuid); // your new String std::string Shwid(Whwid.begin(), Whwid.end()); hwid = Shwid; } else hwid = "ERROR_CANT_RETRIEVE_HWID_VALUES"; //intentionally longer than the column allows - see if this is breakable or ok //make sure field in logging table allows for longer length to record these instances- LEN is 31 so go with 32 hwid.erase(std::remove(hwid.begin(), hwid.end(), '{'), hwid.end()); hwid.erase(std::remove(hwid.begin(), hwid.end(), '}'), hwid.end()); hwid.erase(std::remove(hwid.begin(), hwid.end(), '-'), hwid.end()); std::transform(hwid.begin(), hwid.end(), hwid.begin(), ::toupper); Log::GetLog()->error("Your HWID >" + hwid + "<"); Unload(); return hwid; }
7:41 PM
i did this
7:41 PM
7:41 PM
but it resulted in this 😄
Avatar
you are calling unload but continuing to load the plugin lol
Avatar
You're likely calling Unload() where you're trying to remove hooks that you haven't created yet
Avatar
yeah, i had to set an auth bool and only remove the hook if it is false
Avatar
yeah but you're still calling unload or there's a better way ?
Avatar
@Mr.Salt Actually, im not sure, sometimes you need to add this func manually, but i didn't look why StaticClass even crashes yet..
Avatar
@Michidu was saying that might not be a good idea because unload itself can be hooked
Avatar
yeah i know just trying to get my check system working before i move to authenticating on InitWorld (edited)
Avatar
i havent moved to using unload yet, trying to lock down a hwid before i tackle that
Avatar
you have to take steps its easier to debug 😄
Avatar
i cant get hashing right atm
Avatar
it's fine for a plugin i guess :) or you can just crash whole ark heh
Avatar
lmao 😄
Avatar
It's easy enough on accident lol
Avatar
just call StaticClass() 😛
Avatar
That's mean lol
Avatar
Hook_UWorld_InitWorld
7:52 PM
so this one is for world initialization ?
7:53 PM
i guess if you stop InitWorld if hwid is wrong, server wont load well too 😄
Avatar
lmao
7:54 PM
that's kinda funny 😄
Avatar
but why someone would use unregistered dll, right? 😃
7:55 PM
best security = no security
Avatar
it's actually provides better security than FreeLibrary i think 😃
Avatar
UObject* object = Globals::StaticLoadObject(UObject::StaticClass(), nullptr, blueprint, nullptr, 0, 0, true); that is the statement that crashes it since the last ark update ....
Avatar
or combine
7:57 PM
oh, i will look at it a bit later
7:57 PM
actually, it weird that StaticClass stopped working..
Avatar
wait is a String wrong for hwid ?
8:00 PM
because when i try to do hwid == myhwid it says its out of range
Avatar
how you do it?
Avatar
std::string getHWID() { HW_PROFILE_INFO hwProfileInfo; std::string hwid; Log::GetLog()->error("getting hwid"); if (GetCurrentHwProfile(&hwProfileInfo)) { //Fhwid = hwProfileInfo.szHwProfileGuid; std::wstring Whwid(hwProfileInfo.szHwProfileGuid); // your new String std::string Shwid(Whwid.begin(), Whwid.end()); hwid = Shwid; } else hwid = "ERROR_CANT_RETRIEVE_HWID_VALUES"; //intentionally longer than the column allows - see if this is breakable or ok //make sure field in logging table allows for longer length to record these instances- LEN is 31 so go with 32 hwid.erase(std::remove(hwid.begin(), hwid.end(), '{'), hwid.end()); hwid.erase(std::remove(hwid.begin(), hwid.end(), '}'), hwid.end()); hwid.erase(std::remove(hwid.begin(), hwid.end(), '-'), hwid.end()); std::transform(hwid.begin(), hwid.end(), hwid.begin(), ::toupper); Log::GetLog()->error("Your HWID >" + hwid + "<"); if (hwid == whatever) { Log::GetLog()->error("HWID check passed!"); } return hwid; }
8:02 PM
i have my real hwid instead of whatever ofc 😄
Avatar
dont mess with unicode if you use std::string mostly anyway GetCurrentHwProfileA will get you ansi string, so you dont need wstring
Avatar
so it should be just string ?
Avatar
nah does not work with just string
Avatar
i guess you did it wrong :) when you use GetCurrentHwProfileA, you need to use HW_PROFILE_INFOA as well (instead of HW_PROFILE_INFO)
8:06 PM
this way you wont have std::wstring
8:06 PM
and dont need to conver wide to ansi string
Avatar
it still says floating constant out of range
Avatar
i got it to work
8:11 PM
1 sec
8:11 PM
HW_PROFILE_INFOA hwProfileInfo; std::string hwid; if (GetCurrentHwProfileA(&hwProfileInfo)) { std::string Shwid(hwProfileInfo.szHwProfileGuid); hwid = Shwid; } (edited)
8:12 PM
Not sure if thats the best way to manipulate the string but it did output my hwid
8:14 PM
Also, "shwid" should be a word.
Avatar
how do you check HWID against something
8:17 PM
with shwid ?
Avatar
no i made shwid up
Avatar
it's correct @Haragon 😃
Avatar
which is @Michidu ?
Avatar
yeah but it says its out of range when checking HWID against a string that it generated
Avatar
im not sure about string comparison in cpp
Avatar
hwid code heh probably you dont even need Shwid
Avatar
look for and _Equals method
Avatar
== is overloaded for strings, so it should be fine
Avatar
how is it out of range if it generated this string 😄 (edited)
Avatar
how exactly you compare it?
Avatar
if (hwid ==myhwid) { Log::GetLog()->error("HWID check passed!"); }
Avatar
@Haragon it basically says that can't find md5 function (no definition)
Avatar
are they both std::string ?
8:21 PM
gotcha. i will mess with it a bit then
Avatar
nah i just typed myhwid in
8:21 PM
in the code its my actual hwid
8:21 PM
like the text it generated
Avatar
try setting it like this beforehand
8:22 PM
std::string myhwid = "ASDF1234ETC"; and compare hwid and myhwid
Avatar
btw maybe you didn't include md5.cpp to project
Avatar
omfg
Avatar
i have md5.cpp and md5.h in my includes and included md5.h
Avatar
i'm retarded
8:23 PM
i forgot ""
8:23 PM
thatll do it
Avatar
.cpp should go directly to project so it can be compiled
8:23 PM
not includes
Avatar
lmao
8:24 PM
thank you man
8:25 PM
its always something so small lol, here i am refactoring stuff and i just needed to add the file...
8:28 PM
i love to struggle my way through this stuff, its the only way i learn, but i cant help but laugh sometimes at the small stuff one can overlook 😆
Avatar
man, there really isnt a great way to capture hdd/cpu/nic ids eh?
Avatar
i would say just get hwid profile and hash it or something
Avatar
For all of us that have servers with Hot Swap HDD bays, don't restrict it that hard
Avatar
someone could still theoretically sell copies and just give out their hwids
Avatar
HDDs die and have to be replaced
Avatar
thats true. im just trying to find a good way that is least likely to be abused
Avatar
This may be worth testing, but I wonder how VMs are handled
Avatar
ive been thinking about that as well, and how i could handle vm licensing
8:53 PM
i was thinking 1 license grants you 1 host and 4 vms or something
Avatar
I guess what I mean is depending on how the Hypervisor handles that, you may not be able to tell
Avatar
yeah. ive only ever used hyper-v, thats what I run my atlas servers with. 4x VMs running 4 grids each
Avatar
Try cloning a VM a few times and see if the HWID changes
Avatar
hmm yeah, the vdisk file should contain emulated hardware info
8:55 PM
i know cloning in hyper v you use an identical copy of the vmdk file
8:55 PM
so its possible it could be spoofed anyways, making hdd id not the best option
8:55 PM
cpuid, but what about vcpus?
8:55 PM
freaking rabbit hole
Avatar
At what point is it not worth it? lol
Avatar
right, i am thinking now what i can do... i mean my plugin is done id like to clean up the config a bit but this is pretty much my last thing to do
Avatar
do you unload it by calling Unload() because i haven't had much luck with that 😄
Avatar
Nope
8:57 PM
Well... sort of
Avatar
nah i only ever did return 0 from dllmain... then i got in to this tar pit of hardware IDs lol
8:58 PM
that should work though, theoretically
Avatar
Unload() doesn't do anything more than what you put in the method
Avatar
true
Avatar
It also doesn't need to be name Unload if you really don't want it to
Avatar
yeah i know
Avatar
you need to use the plugin_manager that mich was talking about maybe
Avatar
how'd you return 0 in dllmain ?
Avatar
ah right 😄
Avatar
and is_authorized is set globally to false by default, again, not sure if thats the best way to do it lol
Avatar
A bool that prevents the plugin from really doing anything, or just remove the hooks/prevent the hooks from being added are probably the easiest ways (edited)
Avatar
this is all i needed is_authorized for, since even if it works properly otherwise it will throw a failed to find hook error
9:02 PM
9:03 PM
which tells me unload is run via DllMain which I assume is called by plugin_manager if a plugin fails to fully load
Avatar
wait a sec
9:04 PM
my noob brain is having a trouble understanding here (edited)
Avatar
The name of that variable is misleading lol
Avatar
what do you do with (!checkHwid....
9:04 PM
in dllmain
Avatar
im off on a tangent sorry lol. how is it misleading? :p
9:05 PM
checkHWID returns a bool true for licensed false for unlicensed, it takes a str that comes from getHWID() (this could just be set in checkhwid really...) and so it checks that bool and just kicks a return FALSE if they arent authorized. it fails with a 1114 but thats better imo than it loading and then just being empty
Avatar
At a glance, the name makes me think you're going to remove all the hooks if their HWID is good
Avatar
that also makes me wonder, the WMIC hwid we were using before, would that change when you make hardware changes or is it set on install?
Avatar
Without seeing the other logic you posted, that's what it looks like
Avatar
yes, thats the only time i want to unload the hooks, as if they are unauthorized the hooks wont be loaded
9:08 PM
so itll try to unload a hook that i never set
9:08 PM
but i still want to remove it if its unloaded for a licensed user
9:08 PM
hmm i set my bool in getHWID but it always seems to unload 😄
Avatar
where are you declaring Authenticated? idk if it matters but you could try making your bool in your if FALSE instead of false
Avatar
It's a preference thing, but seeing "if (someBool == false)" bugs me more than it should lol
Avatar
have it like this
Avatar
so, i dont know if the == operator works b/w a std::string and a char[] array (thats what will be on the right of the ==)
9:11 PM
right above the if, set std::string yourhwid = "ASDF"; and then compare hwid and yourhwid
Avatar
that's not it
9:12 PM
the actual hwid check worked before
9:12 PM
unload did not
Avatar
im just taking shots in the dark lol
Avatar
now it just fails to load 😄
9:12 PM
doesn't print HWID or anything
Avatar
where is bool Authenticated first declared
Avatar
just before getHWID
Avatar
can you ss it
9:14 PM
DLLMAIN all all the way down 😄
Avatar
Log::Get().Init() still being called early enough?
Avatar
it's the first thing in load
Avatar
dllmain comes before load as it calls load
9:15 PM
so you are logging w/o the log object existing
Avatar
hmm
9:15 PM
i cant call Load() in dllmain can i ?
Avatar
here is where i put it
9:16 PM
Avatar
first that is
Avatar
load is intended to be called from dllmain
9:16 PM
at least thats my understanding
Avatar
You have to call it somewhere or it won't every get called 🙂
Avatar
i meant first 😄
9:16 PM
like before the hwid check
Avatar
you could but then you arent able to stop plugin loading by returning false
Avatar
ohh this is spicy
Avatar
well actually, that might work bc after load dllmain continues
Avatar
i think it works 😄
Avatar
just be mindful of anything you call in load, as not everything is loaded during dllmain
9:20 PM
any one know if hwProfileInfo.szHwProfileGuid is changed whenever hardware is changed? i kind of want to use it in my hash w/ some other stuff but dont want to screw over people with hot swap bays
9:22 PM
also @Zachar543 what kind of server hardware you running?
Avatar
I rent one of OVH's game-64 machines for ARK and I collocate an old 1U Supermicro machine that has 32GB of RAM and a Xeon E3-1271 v3 for anything that isn't directly an ARK server (database & webapps) (edited)
9:27 PM
Working through the process of selecting hardware for a new machine to replace the rental.
Avatar
nice. i bought an R610 with 2x X5690s and 64gb on ebay, seems to run atlas well with just me on it... thing is loud as hell though so I am swapping the procs in to an R710
9:28 PM
ARK I run on a dell 9020 with 16gb and an i7 4790
9:29 PM
its probably more work than its worth but i hate to rent stuff
Avatar
I would be interested to know what some of the larger clusters in here use. After you get to the point where 30-60 GB of RAM is not enough, it quickly becomes not worth renting
Avatar
i have the same CPU as you 😄
Avatar
4790?
Avatar
yeah
Avatar
its a great proc
Avatar
runs 5 servers like a champ
9:30 PM
i also host from home
Avatar
yeah, mine runs 4 ark and my atlas test server without much issue
9:30 PM
i do have to stagger my ark restarts
9:30 PM
but thats only since i added the 4th
Avatar
because of ram i assume ?
Avatar
i have 32 so it really isn't an issue 😄
Avatar
How much RAM do each of your ARK servers use?
Avatar
4-5
Avatar
want to put 24 or 32gb in it (9020 supports 32) but i cant justify buying 32gb non ecc
9:31 PM
yea, ragnarok 4-5 anything else 3-4
Avatar
actually rn its around 3-4
Avatar
lol... Resist increasing limits (tames/structures) like we did
9:31 PM
Our largest server eats 10GB
9:31 PM
At least
Avatar
i upped them some but i didnt go crazy, i think 2k tames and a little extra structures
Avatar
2k server wide?
Avatar
but the structuresinrender i lowered a bit, as well as set my server fps at 15 for ark
Avatar
How many per tribe?
Avatar
2k per tribe
9:32 PM
i dont know if i have a server wide limit lol... but i run pretty low pop
Avatar
... 2k per tribe?
9:32 PM
Oh no lol
Avatar
lol it was for me tbh, i was doing some ridiculous stuff with breeding
Avatar
Yeah... change that before getting larger
Avatar
i have it set to something extremely high
9:33 PM
too
9:33 PM
but i wipe it every month
9:33 PM
so it's not really a big deal
9:33 PM
its x100 anyway
Avatar
i dont have the heart to wipe man, some of my players really enjoy their setup
9:33 PM
i run 25x
9:33 PM
so thats why i started the 4th... dropped server fps on my original 3 to 15 and started a fresh cluster
Avatar
i have x100 annunaki + primal fear and many other mods so it gets boring if not wiped for a long time
Avatar
Our's is at 250 per tribe (5k server limit), and I've seen a lot of other servers have it much lower at something like 50
Avatar
but i did have to turn autodemolish to about 30 days, that keeps it somewhat tidy
9:34 PM
maybe it is 2k server limit
9:34 PM
theres no way i hatched 2k rexes, i just remember hitting the limit where my eggs hatched in to nothing so i upped it lol
Avatar
Do you find any issues with lowering the tickrate to 15 for ARK?
Avatar
it was a long time ago, since dec i had been completely sucked in by atlas... on official, til I wasnt, then I started really getting stuff going for atlas dedicated
Avatar
I was doing that for Atlas, but wasn't sure I wanted to try it with ARK
Avatar
i have heard no complaints
9:35 PM
atlas i do 20
Avatar
you can lower the tickrate ?
Avatar
Yeah
Avatar
its in engine.ini
Avatar
For Atlas, it does wonders for the CPU usage
Avatar
[/script/onlinesubsystemutils.ipnetdriver] NetServerMaxTickRate=20 LanServerMaxTickRate=20
9:36 PM
put that in engine.ini and set to whatever you want, i have heard below 15 it gets wonky, i havent really played on my ark servers since i dropped to 15 but playing atlas @ 20 feels no different
9:36 PM
change both numbers btw, not sure if it matters
Avatar
I don't believe you need the Lan one
Avatar
and yes i was never worried about cpu until atlas
9:37 PM
i laid out my grids super carefully too, although some have 2 pve islands because i didnt want to stick one in every other grid
9:38 PM
i hope they change the pve quest and let you set the # of stones you want to use
9:38 PM
3-5 stones would be great for a 4x4
Avatar
Aren't they planning to add another powerstone quest?
9:38 PM
A second one
Avatar
tbh since i started getting mine together i havent followed much other than any new game/gus.ini params
9:39 PM
if they do, they need to make it easier to config the quests
9:39 PM
its stupid now but the ServerGridEditorWIP fork gets the job done
Avatar
Honestly, some of the changes they're planning for the next major update really feel like they're going to make it much more difficult to run a "small" (less than 5x5) map
Avatar
why's that?
Avatar
Not sure if I just read it wrong, but the claim flags rework sounds like a few companies will own the whole map if it's too small
9:40 PM
How many islands do you have?
Avatar
i think the claim system is a dope idea, but they really need to sit down and figure out the best way to go about it
9:40 PM
on 4x4.... let me check one of my many spreadsheets
Avatar
We had a 3x3 with the most minimal yet complete (all resources and power stones) setup we could make, and it was taking more memory than your machine lol.
Avatar
57 including all pve islands and more than a few cays connecting some of the smaller islands in to little archiepelago type things
9:42 PM
hmm
9:43 PM
i basically heavily modified the 3x3 on the krookedskull guide to a 4x4, added in a few missing resources and adjusted ship paths
Avatar
How much memory are your largest and smallest grids taking?
Avatar
ohh its not up atm, still waiting on paste for proc swaps, but when i run it the biggest sit just over 6gb
9:43 PM
keep in mind im the only one thats ever been on it
9:44 PM
worst comes to worst i will still have the r610, but it will have 2 2.93ghz X5670s in it and 28gb ram
9:44 PM
48**
Avatar
Okay, I was going to say that we had less than half that number of islands in a 3x3 and we weren't getting away with less than 20GB
Avatar
this shit has me reading sysadmin tutorials and stuff 😑
9:45 PM
hmm, well there is a lot to keep in mind, im sure you know, but like distance b/w islands and stuff
9:45 PM
i notice that the merchant/ghost ships pull my servers out of paging as well, which annoys me but whateer
9:46 PM
do you use multiple disco's per island?
9:47 PM
i also tried to stick to the templated biomes, although i did a bit of mixing b.w high/low desert and tundra/polar
Avatar
The Islands (mostly the stuff on them) seems to be the primary driver for the minimum RAM requirements. From what I was seeing in testing, 8 islands between a 3x3 was only a small amount more RAM than fitting all 8 islands into a 1x1.
Avatar
my empty test grid uses about 1gb so that makes sense
9:48 PM
also @WETBATMAN you can check that your tick rate is set properly in game by using setcheatplayer true
9:48 PM
forgot to mention that
Avatar
its at 30 then
Avatar
Yeah, it defaults to 30
Avatar
i think they run 20 on officials, cant remember
9:49 PM
but yea itll do 30 without a setting for it
Avatar
well tbh servers aren't stressing my cpu that much so might as well leave it at 30
Avatar
yea, its not huge i just lowered mine as a sort of alternative to wiping
9:50 PM
double points on the new server, carry over your points etc
9:50 PM
trying to motivate people off those, lots of good memories but they are bloated as hell
9:51 PM
running servers can be kind of sad lol, all my old regulars have come and gone but they were solid people
Avatar
I try to avoid wipes as much as possible, so our longest running map is nearly a year and a half old at this point
Avatar
yeah mine have been up since about august. how do you have your auto decay/destroy set up?
9:55 PM
hard to find a happy medium between the irregulars losing their bases and the map getting cluttered up
Avatar
For the most part, we have it set to 1x and try to keep the decay times for most things above a week
Avatar
yea, problem is it goes waay up for metal/tek vs thatch lol
Avatar
The auto destroy option is on as well, so we don't need to go around and clean it up manually
9:57 PM
Yeah... and S+ has a few structures that either have no decay timer (beds) or something stupid like 30 to 60 days
Avatar
yeah i like that, those settings confuse me tho, so auto destroy interval, does that start after decay runs out, or does it start at the same time as the decay interval
9:58 PM
because i have always just kind of messed with it until it didnt do anything crazy
Avatar
I'm actually not certain how it ends up being. It seems like the auto-destroy happens the moment you could have manually destroyed it, but I'm not sure
10:01 PM
I can tell you that the structures "decay" by not loading in when someone gets close enough to them
Avatar
yea, i had it on for a while but i had some people lose big bases bc they were playing atlas 😆
10:04 PM
well that and i had auto unclaim on, some dude had an absolute field day on my server lol, he had a vault of element, crazy bred dinos, all just walking along and found them
Avatar
At some point, you just have to deal with a low auto-decay so there's anywhere for new players to build
10:05 PM
We ended up having some drama when a regular spent just one day too long off the server, their dinos unclaimed, and a whole swarm of people were there waiting for the timer
Avatar
yea, that's people for ya though
10:06 PM
esp in a game like this... i had to like kindly tell the guy that lost a ton of stuff, its a pvp server and the auto unclaim was like 45 days.... cant blame the guy that did it really
Avatar
After they refused to give the stuff back at the request of the regular, I wrote a plugin that prevents the dino claim button and just lets them delete at the next server reboot
Avatar
thats smart
10:06 PM
so you cant trade tames at all though?
10:07 PM
or can you hook the auto unclaim function
10:07 PM
i should really take a few hrs and study the hook generator
Avatar
On the other hand, letting people do major raids just pushes new players right to the end game and there's suddenly not much left to do.
10:08 PM
It only prevents it if they would have been deleted at the next reboot anyway
10:08 PM
So you can unclaim without issues
Avatar
oh, do they get some sort of bool for that? the dino
Avatar
It's complicated lol
10:08 PM
Took a long time to find how best to do it, and sadly it's not that easy.
Avatar
go figure haha. thats cool though. i dont really know the best way to sort of research what i can and cant do
Avatar
You can figure it out using the "TimeSinceAllyInRange" and comparing it to the current world time
Avatar
gotcha, so you have to make sure your unclaim time matches up
Avatar
Yeah. There's a default time and you can adjust using the multipliers that people set on the server
Avatar
right. and i suppose you can pull those multipliers in the api? based on the fact that its done in weekendrates
Avatar
WeekendRates is a good example, but you have to pick the right setting. I haven't looked at that code in a while, but I recall there being a few and only one was correct
Avatar
yeah it doesnt hit everything, and it doesnt factor in the base 2x increase etc etc. idk if the atlas one even has treasuregoldmultiplier in it
10:12 PM
it works ok though
10:13 PM
thats neat though, the amount you can do with the api is just nuts
Avatar
There's a ton you can do. The hard part is finding how and where to hook 🙂
Avatar
indeed
Avatar
I love atlas. I am like finished with this plugin, go to go over all the in game stuff a little more and - unable to query server for invite lol
11:00 PM
had to update. . .
Avatar
Rogue Leader 3/17/2019 3:20 AM
@Michidu Did the changes in the last Ark patch make any sense? Was it some kind of optimization?
Avatar
it seems like functions are arranged in alphabetical order now (mostly at least), so maybe they did some refactoring 😃
Avatar
hmm i've set up a custom banlist on localhost but i can't see the game trying to make any requests to it
8:10 AM
nothing in the connection log
8:10 AM
does it not support localhost as the address or something ?
Avatar
ItHoly{Николай} 3/17/2019 8:50 AM
Hello! I registered Hook_UPrimalInventoryComponent_AddItem, the information about the addition comes, but it is not clear how the item got into inventory (harvesting or ..). Also theItemInfo-> ItemQuantityField () is less by 1 than actually received. (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/17/2019 10:36 AM
This problem also occured on one of my recent plugins.. Seems like the AddItem functions increment the ItemQuantity - no matter what...
Avatar
ItHoly{Николай} 3/17/2019 10:48 AM
And where to get information about the reason for calling AddItem?harvesting or looting
Avatar
ItHoly{Николай} 3/17/2019 11:19 AM
Where better to look then to collect statistics on the extracted materials of players?
Avatar
i dont think that such info is even passed to AddItem, probably you need to hook harveset/loot to differentiate those events
2:33 PM
this way you can gather statistic too @WETBATMAN check that your banlist is accessible 😃
Avatar
i actually forgot http:// before localhost
Avatar
ItHoly{Николай} 3/17/2019 2:41 PM
I can not find a suitable Hook. Can you tell me?
Avatar
A program for determining computer information using WMIC and C++ (Windows only) - tlewiscpp/SystemInfo
4:19 PM
@Haragon this could be useful for you 😄
Avatar
Rogue Leader 3/17/2019 10:56 PM
Is there an alternative to using GetDescriptiveName? Apparently some structures don't have one so it will crash if it's called.
10:57 PM
For primal structures*
Avatar
@WETBATMAN ty, i think i have a really good system figured out. problem is, my timed reward stopped working and crashes the server now. cant figure out why
12:41 AM
gave it a good few hours, worked fine for like 30 intervals as of yesterday and i made no changes. think im calling it for today lol
Avatar
@Rogue Leader you can directly use DescriptiveNameField
Avatar
Does anyone know what server hosts are best to use for ArkAPI?
Avatar
nothing beats dedicated 😃
Avatar
Medicalmischief 3/19/2019 7:18 AM
What happened to the #coding-tutorial channel?
Avatar
it’s still there you need permission to view it though
Avatar
Deleted User 3/19/2019 12:04 PM
Anyone running a high rates server 100x-1000x that I can contact that would be willing to share some of the setup to keep things balanced?
Avatar
ItHoly{Николай} 3/19/2019 7:20 PM
nlohmann::json::parse - crash on parse std::string
Avatar
then your config is wrong, use exceptions to handle errors
Avatar
ItHoly{Николай} 3/19/2019 7:28 PM
the string is not from the config, it is the response of the service, here is the string itself: {"error":{"error_code":5,"error_msg":"User authorization failed: no access_token passed.","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"messages.send"},{"key":"а$""р","value":""}]}}
7:34 PM
hm.... {"key":"а$""р","value":""} (edited)
Avatar
and this json is wrong anyway, you should use exceptions to prevent random crashes
Avatar
@Deleted User I run 25x, what kind of stuff are you looking to balance?
Avatar
ItHoly{Николай} 3/19/2019 7:41 PM
So I do, I wanted to make everything beautiful
Avatar
Deleted User 3/20/2019 3:50 PM
@Tom i was more trying to find out how much to bump turrets and dino hp etc since I've only ever ran servers from 3x-10x rates but started playing on high rates and they are fun, but low rate settings won't be balanced on a server with 100x-1000x
Avatar
i have x100 annunaki + primal fear lol 😄
3:50 PM
pvp
Avatar
Deleted User 3/20/2019 3:51 PM
Is annunaki a lot different from the vanilla game?
Avatar
yes...
3:52 PM
dragons break metal and such 😄
3:52 PM
thankfully plugins are here for the rescue
Avatar
Deleted User 3/20/2019 3:53 PM
Yeah the ark api is a god send
3:54 PM
Anyway I'll keep scouring the net, maybe someone put something up on pastebin once upon a time
Avatar
for what 😄
3:55 PM
look the best config one can create is on their own with loads of testing
Avatar
Deleted User 3/20/2019 3:59 PM
Yeah i get that, but i just want a base template to start from, on a high rate server the game is much different from low rates, on low rates you get inherent defense through the sheer amount of resources someone is required to raid you, on a server where farming isn't a requirement anymore you gotta keep things balanced using other means - or do i have it completely wrong?
Avatar
not really
4:01 PM
that is the point of high rates 😄
4:01 PM
faster pvp
4:01 PM
you do get more resources quicker to build bases but ofc you also get resources quicker for raiding
Avatar
Deleted User 3/20/2019 4:02 PM
So you reckon I'll be fine leaving turrets and per level multipliers at their defaults and just upping farming rates?
4:02 PM
Just increase weight ofc
Avatar
i would suggest setting some sort of a turret limit but yeah
4:02 PM
also set some kinds of limits on dino breeding
4:03 PM
had a tribe leave a penguin farm on my server that auto breeded and it lagged it to hell
Avatar
Deleted User 3/20/2019 4:03 PM
Yeah gonna set dino limits per tribe
Avatar
worst part was cpu wan't even that stressed so it took me a while to figure that one out 😄
Avatar
Deleted User 3/20/2019 4:04 PM
Ok cool, thanks @WETBATMAN I really appreciate
Avatar
again you might and probably will have to tweak some stuff exactly to your liking but yeah
Avatar
Deleted User 3/20/2019 4:06 PM
Yeah going to take a lot of testing
4:06 PM
But been playing on faster pvp servers and they're a lot of fun
Avatar
certainly
Avatar
Deleted User 3/20/2019 4:06 PM
It becomes a game of pure warfare and less "role playing"
Avatar
in my opinion ark is simply not designed to play with low rates 😄
Avatar
Medicalmischief 3/20/2019 4:07 PM
How often do you wipe on a 100x?
Avatar
there is simply too much stuff you can lose
Avatar
Deleted User 3/20/2019 4:07 PM
Once a month probably
Avatar
and too much stuff that can go wrong
4:07 PM
i wipe mine once a month
4:07 PM
faster pvp is where it's at
4:07 PM
its much more fun and more forgiving
Avatar
Medicalmischief 3/20/2019 4:07 PM
How populated is it?
Avatar
my cluster is not really for a lot of people
Avatar
Deleted User 3/20/2019 4:08 PM
Yeah getting full wiped on low rates is more than most people can handle, they stop playing simply because of the effort involved in starting up
Avatar
so not really populated 😄
Avatar
Deleted User 3/20/2019 4:09 PM
On high rates it dont matter
4:09 PM
Avenge your enemies using the free base from the shop 😂
Avatar
although get ready for DDos attacks from salty players 😄
Avatar
Deleted User 3/20/2019 4:09 PM
Yup and meshers seem to frequent those too
4:10 PM
But got 2 guys that will help me admin the thing
Avatar
that's cool
4:10 PM
😄
Avatar
Medicalmischief 3/20/2019 4:10 PM
Extinction is full of holes.....
Avatar
all maps are...
Avatar
Deleted User 3/20/2019 4:10 PM
You can mesh on any map
Avatar
that's why in my opinion ark is shit at low rates
Avatar
Deleted User 3/20/2019 4:10 PM
And YouTube has taught everyone how
Avatar
because you can get wiped by meshers or die due to bugs at any moment
4:11 PM
and its certainly not fun if you spent several days farming shit up
Avatar
Medicalmischief 3/20/2019 4:11 PM
There is alot of places you can just walk under the mesh
Avatar
Deleted User 3/20/2019 4:12 PM
The two toughest places to raid are proper cave bases and underwater
4:13 PM
Caves most common mesh targets because of it
1:29 AM
Avatar
i think memory leaks are still present
7:59 AM
when i start all my servers together they crash anything else 😄
7:59 AM
with memory related error codes
Avatar
FString result; FString command = FString::Format(L"ScriptCommand tcsar addarctotal steamid={} points={}", SteamID, Points); player->ConsoleCommand(&result, &command, true);
5:36 PM
executing an api command correct like this ?
Avatar
looks good
Avatar
it hangs the server though
Avatar
maybe bad scrptcommand
Avatar
works fine without this though
7:21 PM
maybe i implemented it wrong or something
Avatar
calling function looks good
Avatar
i had a bunch of junk code in there
7:59 PM
cleaned it up and worked like a charm
8:03 PM
i think Wildcard reverted the StaticClass change
Avatar
possibly 😃
Avatar
Rogue Leader 3/21/2019 8:06 PM
Lol they were a few days too late
Avatar
i wonder if they had to do it because of plugins lol
Avatar
meh maybe it caused another crash
8:07 PM
wtf is this beef on the forum though 😄 (edited)
Avatar
┐('~`)┌
Avatar
i still don't understand how he says you need to manually test every plugin 😄
Avatar
i do basic checks before approving (including checking for malicious code)
Avatar
yeah but this dude says you have to check the mechanics aswell
8:10 PM
anyway whatever i guess
Avatar
some crashes are hard to spot 😄
Avatar
yes ofc i don't know what this guy's problem is
Avatar
Medicalmischief 3/21/2019 8:34 PM
There is 2 types of people... those who whine and bitch and moan and those who try to learn to fix it themselves.... I dont know jack shit about coding a plugin but this crashing stuff has got me wanting to learn about it... just have ALOT to learn hahaha
Avatar
which plugins are still crashing for you though? (edited)
Avatar
shop sometimes
Avatar
Medicalmischief 3/21/2019 8:37 PM
Kill feed was for me
Avatar
you might want to try the latest ark update, which apparently, reverted changes
8:38 PM
shop update should be tomorrow
Avatar
i'm already updated to it
Avatar
i said to @Medicalmischief 😃
Avatar
oh whoops
Avatar
shop has other problem (edited)
Avatar
Medicalmischief 3/21/2019 8:46 PM
What's causing shop to crash? It seems to be working fine for me...?
Avatar
mysql disconnect most likely
Avatar
Medicalmischief 3/21/2019 8:47 PM
Ah I dont use that
Avatar
Medicalmischief 3/21/2019 8:55 PM
With the shop, can I put a permission on any shop item? Or is there a way to add a seperate donor shop?
Avatar
i'm pretty sure you can restrict items to certain permission groups
Avatar
Medicalmischief 3/21/2019 8:57 PM
I've seen it in the kits, just havent tried with a normal shop item
Avatar
Rogue Leader 3/21/2019 11:47 PM
We should all collaborate on a big plugin
Avatar
Got anything in mind? The idea is the hardest part for me, and most of the plugins I make come out of necessity.
Avatar
Rogue Leader 3/22/2019 3:10 AM
We could do an achievements plugin. One, it'd be a ton of shit that could be implemented. Two, it would be a great example to draw from for tracking progress and learning to capture all types of events
Avatar
Medicalmischief 3/22/2019 3:22 AM
Like the "RPS" paid plugin?
Avatar
Rogue Leader 3/22/2019 3:26 AM
Similar, but more broad
3:26 AM
Making boss kills, high level stat breeding, large number of pve and PvP kills (edited)
3:27 AM
Placing a large amount of tek structures
3:28 AM
Ascension
3:28 AM
But definitely not quest based
3:35 AM
Rps is pretty interesting though. Giving stat multipliers based on in game progression sounds neat
Avatar
theres definitely a ton you could do
3:59 AM
but yeah for me as well its writers block when trying to think of a new plugin unless i need it
Avatar
GSH | MrOwlSky 3/22/2019 4:08 AM
That'd be epic @Rogue Leader
Avatar
Rogue Leader 3/22/2019 4:31 AM
Should be easy to set up to collaborate easily too. We can keep it simple at first with no configs, just PoC hooks. Main cpp file to load and unload the dll and hooks, then a seperate file for each hook implementation. That way everyone can sort of have their own isolated file to work in and we'd be able to resolve merge conflicts more easily if several of us are working on it.
4:32 AM
And I'm very experienced with managing a project through Git so I can set up the proper branch policies to protect functional code and make merging pull requests to the main code easier.
4:33 AM
Who was our plugin/mod guy who created the GUI Mod for his plugin?
Avatar
GSH | MrOwlSky 3/22/2019 5:51 AM
I'd kill for someone to remake @OwnProx program. He's been on vacation so it's been needing some major updates.
7:38 AM
when starting multiple servers at the same time i always get memory errors like this from other programs
Avatar
weird, server doesn't interact with other programs 😄
Avatar
weird as fuck
7:42 AM
i opened my remote desktop connection right now
7:42 AM
and 1 server was started twice somehow
7:43 AM
ark server manager and XAMPP crashed with memory errors like that
Avatar
you have apache on your server?
Avatar
yes
7:45 AM
for sharing the banlist and etc...
Avatar
maybe not enough memory?
Avatar
dont think so out of 32 gb max it uses while all are starting is 27-28
Avatar
I said screw it and wrote some simple bat scripts to do basic management - havent tested it fully as my server is not released yet (Spent a ton of money and time on it and now ATLAS seems dead...) but it works until Ownprox is able to give his program the love it needs
Avatar
Medicalmischief 3/22/2019 3:02 PM
What program are you talkin about?
Avatar
I assume they are talking about Ownprox's Atlas Server Manager
Avatar
nah those are ark servers
Avatar
also @WETBATMAN are you starting them with varying priority in windows?
Avatar
all of them are on high 😄
Avatar
It could be that xampp doesn't understand why it is starved for resources (since starting multiple will likely eat up a ton of your memory bandwidth) and that could be why it crashes. you could maybe start them on normal and have a script to change their priority after a couple mins
3:18 PM
Or alternatively whatever is crashing try setting it to the same priority as your ark servers
3:19 PM
because i typically only use priority other than normal if i need to page down a server asap... so it definitely changes what is available to the process
Avatar
nah it wrecks havoc on anything not just xampp 😄
3:21 PM
ark server manager also crashes some servers launch twice and stuff like that 😄
3:21 PM
ArkBot also crashes
Avatar
oh wow thats a little odd. I definitely notice ASM gets bulkier over time.... It takes a few minutes for me to save any changes I make in the GUI
3:25 PM
thats after running my servers for about 8months now with it
Avatar
i assume it's memory leak
Avatar
yea, sometimes ASM gets up to 200-300mb... i ususall just restart it
Avatar
Rogue Leader 3/22/2019 4:15 PM
I'm currently working on getting the ARKApi libs and headers into a NuGet Package to try and make project management a little easier
Avatar
Rogue Leader 3/22/2019 4:54 PM
Can someone clone this down and attempt to build it without editing the config? I want to see if it will automatically pull the nuget package down and link it on build: https://github.com/barnwellrd/Achievements
Ark-API Plugin for tracking customized achievements in Ark - barnwellrd/Achievements
4:54 PM
and without editing the project files/paths
4:55 PM
Clone> open .sln file> build
Avatar
@WETBATMAN 27-28 out of 32 GB is easily in the range where your going to see out of memory crashed. I've been trying to keep our machines under 75% as the windows memory manager starts to much more aggressively push things to the slow, disk-based page file.
Avatar
-_-
Avatar
Your getting into the range where it really starts to panic 🙂
5:00 PM
Where "just kill the process" is an option
5:01 PM
Especially with the very fast ramp in memory usage on startup of each ARK server
Avatar
Rogue Leader 3/22/2019 5:48 PM
Can someone try to clone and build that repo now. I've updated it so it should work (edited)
Avatar
how much is a page file supposed to take up ?
Avatar
@Rogue Leader it worked
5:57 PM
there is no determined size, depends on your ram usage
Avatar
it's 11 gb for some reason 😄
Avatar
Rogue Leader 3/22/2019 6:19 PM
They said in the patch notes that the last update fixed a memory leak in Trikes. No telling what other memory leaks they accidentally added
6:20 PM
@Michidu Thanks for checking! I'm working on a way to standardize collaboration projects
Avatar
idk what it is but it's really bad 😄
6:20 PM
never had issues starting multiple servers before
Avatar
Rogue Leader 3/22/2019 6:20 PM
Maybe you've got some bad memory cells
Avatar
my uptime is 31 days so might be 😄
Avatar
if you have a newer dell machine theres usually a built in diag you can test it with, or something like memtest86... are you running server hardware AKA using ecc ram?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/22/2019 8:37 PM
What should ECC RAM have todo with it? 😄
Avatar
Eh I dunno. Just thinking about every option :p
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 9:51 AM
But anyway ECC RAM doesn't fix such "RAM Leaks" you're searching for.. it may correct a bit of a byte cell.. not randomly access them and fill 😛
Avatar
i started them sequentially and it kinda worked
9:51 AM
no more memory leak
9:51 AM
however idk what i should do for auto updates
9:52 AM
since servers start at the same time for auto update 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 9:52 AM
are you using the binaries from a shared folder or what is the problem with it?
Avatar
with what ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 9:53 AM
You just said you dont know what you should do about auto updates 😄
Avatar
no i mean when ark server manager does auto updates it shuts all servers down at the same time
9:54 AM
and starts them at the same time 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 9:54 AM
ahhh - I got you
9:54 AM
Yea.. if the startup at the same time is the problem.. then idk too haha
9:55 AM
If there would be a .bat file in background you could just delay it.. but I assuming you're using an application for managing your servers (edited)
Avatar
yeah Ark Server Manager
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 9:56 AM
Haven't really used such applications for my servers I had a year ago.. so can't really tell you whats possible 😄
Avatar
something could probably be done it has to use some script or a task for actions
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 9:57 AM
Yep.. that was the idea behind the batch file
Avatar
aaaaaa i still can't download AutoDecay
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 10:11 AM
@Michidu do something.. lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 12:20 PM
Could one of the Native Americans give me some information about their understanding of the 24 hour clock? Just if its common there (I know you got 12h AM/PM)
Avatar
i update 4 servers at once w/ no problem. So "access violation" is a ram leak?
3:47 PM
by native do you mean like indigenous or just someone in the US lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 3:47 PM
just someone in the US.. lol
3:47 PM
and please not currently on vacation or smth.. xD
Avatar
i mean we call it 'military time' most places bc thats the only place its really used
3:47 PM
but i mean people can read the time from it lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 3:48 PM
So all people from the US should be able to use the 24h format? lol
Avatar
i'd hope so 😛 i do usually have to do the math in my head but that may just be me 😅
3:49 PM
is this something for admins or players
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 3:49 PM
Admins.. 😄
Avatar
oh then yea they will be used to seeing it elsewhere anyways
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/23/2019 3:50 PM
okay, thanks hehe 😄
Avatar
np np
Avatar
is there a way to debug ark crashes
11:15 PM
this one is plaguing my servers after a mod updated but the devs of the mod deny it has any connection to it 😄
11:15 PM
however multiple other people also reported this crash even without any plugins at all
11:17 PM
also i can't remove the mod to test as it's a core mod and will delete dinos/structures associated with it 😄 (Primal Fear)
Avatar
attach debugger, .dmp file
Avatar
Hey all. How can I know whether dino is tamed or he is wild dino? And how know who him owner if dino is tamed?
Avatar
if (_this->TargetingTeamField() > 10000)
1:52 PM
this is tamed
1:52 PM
if (_this->TargetingTeamField() < 10000)
1:52 PM
this is wild
1:52 PM
APrimalDinoCharacter* _this
1:53 PM
as for the owner you can probably get the tribe ID
Avatar
TargetingTeamField - is it tribe ID?
Avatar
i think so
Avatar
Hmm... player maybe not in the tribe and have tamed dino, how to know the owner?) I don't see methods similar to what is needed
Avatar
they always have tribe ID regardless of if they're in a tribe or not
Avatar
Will be trying, thanks very much )
Avatar
Contribute to barnwellrd/New-Player-Protection development by creating an account on GitHub.
2:06 PM
you can also check this to see how NewPlayerProtection gets tribe ID
Avatar
I saw this plugin but it does nothing with dinos
Avatar
bool Hook_APrimalDinoCharacter_DoAttack(APrimalDinoCharacter* _this, int AttackIndex, bool bSetCurrentAttack, bool bInterruptCurrentAttack) { if (_this && _this != nullptr) { if (_this->TargetingTeamField() > 10000) { APrimalDinoCharacter* dino = static_cast<APrimalDinoCharacter*>(_this); FString descr; dino->GetDinoDescriptiveName(&descr); //Log::GetLog()->warn("Attack Index: {}", AttackIndex); //Log::GetLog()->warn(descr.ToString()); if (descr.Contains(L"Primordius") || descr.Contains(L"Raphus") || descr.Contains(L"Dragon")) { UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, _this->RootComponentField()->RelativeLocationField(), static_cast<float>((AntiFireBreath::MinimumEnemyStructureDistanceInFoundations * 300)), &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors); for (const auto& actor : new_actors) { APrimalStructure* structure = static_cast<APrimalStructure*>(actor); //Log::GetLog()->warn(FVector::Distance(_this->RootComponentField()->RelativeLocationField(), actor->RootComponentField()->RelativeLocationField())); if (AttackIndex == 1 && structure->TargetingTeamField() != _this->TargetingTeamField()) { return 0; } } } } } return APrimalDinoCharacter_DoAttack_original(_this, AttackIndex, bSetCurrentAttack, bInterruptCurrentAttack); }
2:18 PM
this is a check to see if a tamed dino is near enemy structures
2:18 PM
might help you 😄
Avatar
Im willing to pay
1:57 AM
if anyone
1:58 AM
is willing to do my arkshop for me (edited)
Avatar
Hmm so I am thinking about a better way to manage an ATLAS grid.... Would it make sense to have "remotes" on each machine/VM that talk over a web API or something to a "Main" manager that would function similarly to ASM?
Avatar
anyone that shares their banlist with a webserver here ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 3:56 PM
Im currently thinking about an plugin which allows you to ban people serverwide.. but there might be server admins banning a few people just for no reason
3:57 PM
would be cool to limit it somehow
3:57 PM
Because maybe then people take the game a bit more serious so less salty kids out there
4:00 PM
Maybe do it with points to avoid that
4:00 PM
if 5 admins ban them --> global ban (from any server using this plugin) (edited)
Avatar
yeah but the reason i asked was because when i started sharing the banlist with XAMPP that's when my memory leak issues seem to have started haha
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:02 PM
yea but I mean.. we could create a global database where the plugin can your server with a unique key or something
4:02 PM
In Minecraft there is something called "McBans" (https://www.mcbans.com/)
Avatar
Not a bad idea. Would need different criteria... Have some people that blatantly break rules around PVP... Some that join and just spam the N word.... Hackers, cheaters etc. But that could be a great system.
4:23 PM
i'm in lol 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:23 PM
haha
Avatar
Those people are useful though, they make great examples
Avatar
they glitched a teleporter into ground and called it "in mesh teleporter"
4:25 PM
like wtf am i supposed to tell them
Avatar
That sounds like an instaban
4:26 PM
meshing is bad enough on officials lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:26 PM
Well - Im gonna create the plugin - starting today 😃
Avatar
Where do you plan on having the central DB?
4:28 PM
Could maybe make it configurable - IE there is a default that most would use but if people want to be more strict or somethign they can create their own DB and point it there
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:28 PM
IE?
Avatar
just means like for example
4:28 PM
sorry lol
4:29 PM
but that way it could work for what wetbatman is using xampp for
4:29 PM
or maybe a way to subscribe to multiple
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:29 PM
I would create a global database anyway; but you can decide if you want include other server's bans
Avatar
yea, that sounds awesome man
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:30 PM
no need for creating a database only for synchronizing the database over cluster
Avatar
maybe even choose which 'reasons' to enforce bans on - if you dont mind rule breakers you can let those banned for that come through
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:31 PM
Yea would be a cool idea too 😄
Avatar
I think it will be a great plugin 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 4:31 PM
will buy a VPS on OVH for latency reasons 😄
Avatar
Are anyone know a hook for catch player leaving from tribe? I have a hook for catch joining players (I think so 😃 ) Hook_AShooterPlayerState_AddToTribe, but I can't find hook for leaving
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 5:34 PM
AShooterPlayerState.ServerRequestLeaveTribe_Implementation 😄
Avatar
What means ServerRequest prefix?) Does it have any special meaning unlike the others?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 5:37 PM
Haven't really thought about that to be honest 😄
Avatar
Ok, thanks)
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 If you find a way to have a custom disconnect message when someone that is banned tries to join, let me know. I tried that at one point, but didn't get too far at the time. Using the ban list URL setting gets you a message like "You are globally banned", with no way to specify a reason or time until it lifts.
Avatar
I think ping limiter has a custom message but I could be wrong
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 10:42 PM
My AntiFamilysharing also got one 😄
10:43 PM
just wait for my plugin.. 😄
Avatar
Is the goal to replicate McBans (including the server & player reputation systems)?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 11:04 PM
The goal is not to fully replicate McBans - the goal is to have something like McBans available for ARK / ATLAS
11:05 PM
because the system behind of it is pretty cool
Avatar
Agreed
11:05 PM
Unless you can find a better way to do it, you may need some sort of server reputation system to prevent people abusing it super hard
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 11:07 PM
Jup - not making a reputation system like they got
11:07 PM
but something like TotalBans
11:08 PM
so multiple bans on multiple server will result into not able to join any server (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/25/2019 11:17 PM
if any of you guys got a good idea how to balance it and make it useable for any kind of server just tell me 😄
Avatar
Rogue Leader 3/25/2019 11:34 PM
That would be really hard to implement without abuse. Anyone could boot a server or use the code to connect to the database and add bans to a player
11:34 PM
Unless you mean implementing on a single cluster
Avatar
Honestly, MCBans is a decent example. I think they worked out most of the issues
Avatar
hi there
9:16 AM
So , I have created my first plugin in as a test, using the example code from the site
9:17 AM
I can compile and Load the plugin successfully(or at least that is what the server reports in chat)
9:17 AM
but when i try to use the command /test no response
9:19 AM
I checked the log files as well and dont see anything
9:20 AM
sorry, ill move it to #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ
Avatar
my memory leak issues seem to be gone after i restarted my machine lol
Avatar
Restart only frees memory but not fix leaks heh
Avatar
@Zachar543 ArkApi::GetApiUtils().GetShooterGameMode()->KickPlayerController(shooter_pc, &KickReason); takes AShooterPlayerController and FString
Avatar
yeah but i heard it sometimes does not display the reason
Avatar
@Haragon I got that far, but do you use any specific hooks when someone joins and they are already banned? Or do you just kick them on join?
Avatar
i’m pretty sure you can only kick players after they join
4:45 PM
denying a connection crashes the server as far as i know
Avatar
Yeah... that's part of the problem. That means you need to not actually ban anyone, and rely on the plugin to kick them after they are all the way in. Otherwise, they never get that far
Avatar
yeah
4:46 PM
maybe make the plugin read the banlist ?
Avatar
I was hoping to use the ban list, but it prevents the join way before someone is completely in. I was just wondering if anyone was able to customize the message players get when they are on the ban list already. It's possible that the server just sends an id or status of some kind and the the client translates it to the message
Avatar
ah understood
4:49 PM
then yeah probably not using the banlist would be a better idea
4:49 PM
maybe switch to a different ban system completely ?
4:49 PM
like one based on mysql 😃
Avatar
Ultimately, my ban list is generated from a database (with support for temp bans). Though, the question is still how to disconnect someone that is already banned with a custom message without letting them all the way in 🙂
Avatar
Why don't you wanna hook player joined and then check steamid vs db - > kick
Avatar
because if someone is banned the game kicks them before they make it so far that the api can get their steam id
Avatar
^ That
Avatar
banned via banlist or banned via your method
6:30 PM
using both would prevent you from sending messages to people banned via the banlist functionality... you could integrate said list in to your method and do all of the filtering/banning on player join
6:31 PM
and just ignore the banlist itself
6:32 PM
at least that sounds right in my head, but i very well might be missing some information lol
Avatar
Oh yea, this is a rabbit hole for sure. So many functions I want to see the actual source for.... Side note, anyone know anything about AShooterGameMode::GetDynamicConfig() ? Looks like it loads config over HTTP?
Avatar
Yeah thats what they said on the wiki
6:51 PM
Suppose to load the latest from official site (edited)
Avatar
is that a config option in the game itself?
6:53 PM
wondering if you could point it to a different URL... might be super helpful for atlas
Avatar
Not sure sorry, was briefly reading over it lastnight
Avatar
no worries, just saw the function and got curious
Avatar
what is this.... i do nothing happens in runtime lol (edited)
6:58 PM
Avatar
config error it looks like
Avatar
Valid JSON and it run before 😄
6:59 PM
weired
Avatar
valid json doesnt always mean it will run, depends on the code of the plugin and how it interprets the json
7:00 PM
you can send me your config if you want
Avatar
ok i solve it i copy the config from another server
Avatar
GSH | MrOwlSky 3/27/2019 3:53 AM
1114 could be MySQL error
3:53 AM
Anytime i get the 1114 it's always database
Avatar
Medicalmischief 3/27/2019 4:52 PM
Does anyone know if the permissions work for shop items, or just kits?
Avatar
both i think
Avatar
Medicalmischief 3/27/2019 4:58 PM
I tried last night and couldn't get it working...
4:59 PM
Would it be possible to add another shop like "/donor" through the json or would it need deeper modifications
Avatar
Use permissions, Mich has a guide on the shops on how to do it. It’s much cleaner. Vip Kits will need a permission, then you will need to create a group and grant permission to the group.
Avatar
Medicalmischief 3/27/2019 6:49 PM
I have the kits with perms, was looking for a donor shop possibly
Avatar
twitch.tv/arkitektum 3/28/2019 3:08 PM
Dear devs, Someone knows what happend here?
3:08 PM
3:08 PM
i don´t do nothing, and sudenly this fatal error appears on one of my server 😦
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/28/2019 3:10 PM
Seems like your server is starting up and loading content of an inventory but right there it got a corrupted item.. somehow.. lol
3:11 PM
Does this crash occur right on / after startup?
Avatar
twitch.tv/arkitektum 3/28/2019 3:14 PM
after startup
3:14 PM
plugins are ok
3:15 PM
that´s why i don´t know what it is 😦
3:16 PM
Maybe i need to do a backup
3:16 PM
?
Avatar
you had to do it earlier actually
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/28/2019 3:24 PM
restore a backup would be a better idea 😄
3:25 PM
but save the SaveGame + Players and send it to me (edited)
3:25 PM
I wanna analyze it.. lol
Avatar
twitch.tv/arkitektum 3/28/2019 6:42 PM
shit sorry, i delete all the save folder...
6:43 PM
but yea, it was something with this folder, because now it work (edited)
6:43 PM
probably because i have 12 mods too xD
Avatar
that’s pretty weird lol i have 15 mods 2 of which are core and i’ve never had a corrupted save file 😃
Avatar
twitch.tv/arkitektum 3/28/2019 7:25 PM
A doubt of the plugin Arkshop, is there any way to put an object that can only be purchased by a certain "permission group", like vip?
7:26 PM
Because i need, to put a command, that can buy only certains groups
7:26 PM
but i can´t put commands on kits... 😦
Avatar
twitch.tv/arkitektum 3/28/2019 7:37 PM
Now only can be like this
7:38 PM
But it is possible to do something like this? (edited)
7:41 PM
not only for Exp command, for all command types and objects of the Arkshop? god @Michidu?
Avatar
Yes you can
Avatar
Medicalmischief 3/28/2019 11:13 PM
Does it have to go first?
Avatar
twitch.tv/arkitektum 3/28/2019 11:29 PM
@Fosh Can i do it now? because i try and don´t work (edited)
Avatar
Add it under Description
11:30 PM
It shouldnt matter where it goes,
Avatar
twitch.tv/arkitektum 3/28/2019 11:52 PM
@Fosh na, don´t work men, i put the "Permissions": under the "Description": and i can buy the command even if i´m not vip
Avatar
Do /group in game
12:01 AM
What are your groups you're in
Avatar
twitch.tv/arkitektum 3/29/2019 12:19 AM
i can buy Exp with this configuration, even if in game i have other permission, different to the permission of the configuration file. (edited)
12:20 AM
So, don´t work
Avatar
What i mean is, if your permission "arkitekto" is an admin group they recieve all permissions regardless. Remove yourself from that group
Avatar
twitch.tv/arkitektum 3/29/2019 12:42 AM
"arkitekto" is not an admin group, it´s other vip group.
12:43 AM
my admin group it´s "admins"
Avatar
Have you set that permission to a group?
Avatar
try "Permission":
Avatar
twitch.tv/arkitektum 3/29/2019 2:30 AM
The same
2:31 AM
don´t work
Avatar
Just checked the Code, there is no permission check for shopItems, just for the kits.
Avatar
twitch.tv/arkitektum 3/29/2019 9:16 AM
So @Michidu it´s possible to do this?
Avatar
Medicalmischief 3/29/2019 9:21 AM
It would be cool if you could add a VIP shop that worked off a different code, like /VIP
Avatar
anybody know of someway to change an actors breeding interval? I know of MatingIntervalMultiplierField() in GameMode but am looking for something similar in Actor.h to no avail
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/29/2019 8:34 PM
Do you want to set the "Breeding Interval" of a certain Dino?
Avatar
You could possibly hook APrimalDinoCharacter::DoMate if you are trying to affect a specific actor
Avatar
isn't DoMate run when dinos are already mating 😄 ?
Avatar
APrimalDinoCharacter::SetNextAllowedMatingTime looks like it may be where the interval is used to calculate the next mate time
Avatar
i think that can be pretty abused
Avatar
yes @WETBATMAN but depending on what hes trying to do he could keep his own timer and return if the timer isnt up. But it wouldn't be very elegant
Avatar
because it does not recalculate the time until it expires
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 yes
9:01 PM
the recalculating time until expired is fine
Avatar
APrimalDinoCharacter::UpdateNextAllowedMatingTime takes a long double(fromTime), this may be something you could do ... hook DoMate call domate_original() call updatenextallowedmatingtime
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/29/2019 9:01 PM
Then I guess Tom already gave you a good example how to do it 😄
Avatar
both void
9:02 PM
but i dont know exactly what "fromTime" is, you would have to play with it
9:02 PM
i assume a unix timestamp, but not sure if it is interval in ms or a new time to allow mating
Avatar
essentially I am trying to modify how SafeZones works to make it so I can setup a zone where you can breed quickly I do not wanna update the timer as that would allow people to go in and get it updated then go out to breed elsewhere. I could try and increase breed times if outside the zone and decrease when inside but that requires checks that would eat up resources
Avatar
maybe log it 😄
Avatar
hmm i dont think there is a "canMate" bool you can override but you could re-set the interval if they leave the zone
Avatar
instead of modifying SafeZones use it's public functions and create a sperate plugin for changing breeding timers
Avatar
my guess is that updatenextallowedmatingtime is run at the end of DoMate
Avatar
I am not skilled enough in C++ to start a project from scratch
9:04 PM
its easier for me to modify safezones for my purposes
Avatar
its not as hard as you think, just a headache getting your dependencies right. but if safezones gives you a good starting point then i suppose save yourself some time. I just ended up making a plugin template that I go off of
Avatar
it's simpler to only have to work with your stuff instead of figuring out if it's your code or SafeZones causing it 😉
Avatar
speaking of public functions, is there a solid way to get someones Shop kit qty without accessing the arkshop table?
9:06 PM
Doesnt seem to be a public function that returns kit amount
9:06 PM
wanted to add kit trading to AdvancedKits
Avatar
if it's not in the public functions probably won't work
Avatar
yea, changekitamount will set amount=0 and return true if the new amt is <= 0
9:07 PM
so i cant use the return from that
Avatar
btw wetbatman did you ever update the lootboxes to include mysql?
Avatar
nah Tom did it 😄
9:08 PM
i got busy with some other stuff 😛
Avatar
wait is tom the guy who made the LootBoxPlus?
Avatar
yeh
Avatar
I just said screw it, that whole plugin was a mess, so I just gutted it and started from mysql
Avatar
tom you need to add weightings
Avatar
the rng logic isnt great in the old one, it seeds the rng for each roll
9:09 PM
yes, it is coming as a part of my next big patch, will probably be a 2.0 type of thing - trying to figure how to do it and keep it performant
Avatar
ya I did something different for it myself and it works okay
9:09 PM
but I am sure it can be improved upon
9:10 PM
my idea has weighting for each item
Avatar
bc i dont want to generate a new JSON array every time a box is opened etc... i think I will have some sory of system where i use only the index from the original array as new array elements and loop through that
9:11 PM
so i can add 10x elements of index 1, etc etc, then do logic on that
9:11 PM
if you use the config sheet it lets you set weights, but all its doing is adding duplicate entries
Avatar
no I do it for each item
9:11 PM
and ya I do mine the same way sadly
Avatar
w/ json?
Avatar
gimme a sec and pardon the mess
Avatar
so Tom you essentially remade the plugin ? 😛
Avatar
i mean i am picturing a new json array, 2 nested loops etc. i -guess- you could do it on config init/reload
9:13 PM
yes, im only seeding once... seeding multiple times is bad news
Avatar
well I don't really know C++
9:14 PM
did the best I could with what I had
Avatar
c++ can be enigmatic
9:15 PM
hey, i mean that seems like it should work just fine tbh
9:16 PM
I will say, the hardest thing for me is keeping my pointers and references right
9:16 PM
but considering were mostly working with existing data ive only ever had a problem once, and that was w/ advanced kits
9:23 PM
also @Vysse you could declare randomitem and pass a ref to it & "possibleXYZ" to a function so you only need it once. not necessary but little things to get you more familiar with the language
9:24 PM
although I think if I went the json array route, i would have a func that builds the new array for me and just call that in Load() and ReloadConfig()
9:25 PM
that way you cut down on the logic running when they do /box
Avatar
one thing I am thinking of doing is making it one long list of items instead of separated by type and then I could pick an item at random based off of a number array instead (edited)
9:25 PM
I figure loading the json into memory like that is bad
Avatar
that is basically what im doing with lbp 2.0, i am going to add weights, and lootgroups which will replace the "Item, "Dino" etc
Avatar
I will buy that shit if you do that... the only thing I was missing was weightings
Avatar
It may be, i cant say one way or the other honestly
9:26 PM
haha hey i tend to go on these binges with this stuff so expect it soon....
Avatar
well json is a bit larger then numbers so I would imagine loading each item more then once like that is bad
Avatar
mhm, thats why i was going to try to just have an array of array indices
9:27 PM
repeat the index instead of the entire entry
Avatar
I need certain plugins to make this server idea I wanna do a reality but don't have the skills to do it all and it sucks
Avatar
just keep practicing
9:27 PM
you can compile plugins, which puts you ahead of most people
Avatar
ya I know just hard to manage when I have a full time job
Avatar
& obviously knwo your way around C syntax
9:28 PM
same
Avatar
eh not entirely I am a good googler
Avatar
arent we all 😂
Avatar
and I have learned VB.Net in the past and PHP which is scripting
9:28 PM
so I know programming logic
Avatar
php makes me want to vomit unless its inside a framework
Avatar
and can kinda read code even if I don't fully understand it
9:29 PM
which is why I am better at modifying then making from scratch
Avatar
mhm, you just gotta modify, modify, modify, keep getting stuck on stupid stuff then figuring it out and eventually you have enough to make your way around building your own plugin. the life of an autodidact
9:34 PM
btw @Vysse what kind of server idea do you have?
9:34 PM
if you dont mind me asking
Avatar
top secrets stuff
Avatar
Medicalmischief 3/29/2019 9:44 PM
Sounds like he wants to turn ark into crisis 4
Avatar
Heh no worries, was just curious. I love thinking outside of the box on this kinda stuff. There's enough sandbox there that you can really do some really interesting things
Avatar
@Vysse do you notice a dip in server framerate when opening lootboxes using your plugin?
Avatar
Medicalmischief 3/30/2019 3:25 AM
what is ya'lls server framerates?
Avatar
I'd love for it to always be 30, but our busiest map is currently 25-30 with occasional dips
3:43 AM
Something like this (0.1s bars; lighter is min vs max):
Avatar
Medicalmischief 3/30/2019 4:02 AM
how do you see that?
Avatar
Custom plugin with a web interface
4:05 AM
Oh, also: What kind of stats did you want for current ARK servers? It didn't take as long this time to set this back up:
Avatar
Medicalmischief 3/30/2019 4:08 AM
thats cool, how many people play on your server?
Avatar
20-60 at once, and a few hundred unique people per day
4:10 AM
Here are some stats by map based on the Steam server list (not just my server) (edited)
Avatar
Medicalmischief 3/30/2019 4:10 AM
whats the specs on your server?
Avatar
We rent a few GAME-64 machines from OVH: https://www.ovh.com/world/dedicated-servers/game/1901mc02.xml, but the goal is to bit the bullet, buy some decent server hardware, and colo instead
Avatar
Medicalmischief 3/30/2019 4:17 AM
how many servers do you run?
Avatar
Medicalmischief 3/30/2019 4:18 AM
any tips on boosting framerates?
Avatar
Outside of upgrading to a higher clock speed CPU, reducing settings like tribe tame limits/structures in range, or reducing mod counts can make a huge difference. (edited)
Avatar
Medicalmischief 3/30/2019 4:21 AM
Avatar
What's your CPU usage look like (per core)?
Avatar
Medicalmischief 3/30/2019 4:25 AM
Avatar
I'm jealous of your 24 threads 🙂
4:27 AM
There are a few in there that look pretty busy
Avatar
Medicalmischief 3/30/2019 4:27 AM
im jealous of your 25 frames lol we are getting like 10.... on some maps its like 4
Avatar
ARK (and most game servers) are still largely single threaded, so per-core performance becomes quite important.
Avatar
Medicalmischief 3/30/2019 4:28 AM
there is about 80 people on the cluster atm
4:30 AM
we have tried to even the loads throughout all cores
Avatar
Honestly, you won't be able to spread the load out in this case. The issue is that most of ARK's processing happens in a single thread, so it cannot be split between CPU cores. If it needs more than the core it's currently running on, it will start to slow down. (edited)
Avatar
Medicalmischief 3/30/2019 4:35 AM
so, it needs higher clockspeeds?
Avatar
Pretty much, but the newer generation CPUs will do better than older CPUs with the same clock speed.
4:37 AM
The CPU we're using is currently running at 4.7 GHz
4:39 AM
Even with that, our two biggest maps cause some similar graphs:
4:41 AM
At some point, hardware doesn't exist to solve this problem and your only options are to reduce settings or attempt to split a large map into two smaller ones. (edited)
Avatar
Medicalmischief 3/30/2019 4:42 AM
so if i gave all the servers 1 core, would i see reduced performance?
Avatar
I believe so, yeah. There are some tasks that happen in other threads that Windows can put on another core, but the vast majority is going to be stuck to one core.
4:44 AM
I tend to avoid setting core affinity, as I find Windows does a good enough job managing that in most cases I've run into.
Avatar
Medicalmischief 3/30/2019 4:59 AM
what do you have your max structures in range set to? if you dont mind me askin
Avatar
Are your servers PVP or PVE?
Avatar
Medicalmischief 3/30/2019 5:01 AM
pvp
Avatar
Our max structures is set to 5k, but we only have PVE servers at the moment (edited)
Avatar
@twitch.tv/arkitektum yes, it shouldnt be hard to add. However you can do pretty much same with kits
Avatar
Hey there, I have recently started with api development and my C++ is very rusty. If I wanted hook into a an Event how would i go about doing that? Like if an item is added to inventory or uploaded to OB
10:47 AM
I have set up a few commands that I would like to use and setup some hooks
10:48 AM
but not sure where to start for events or if its even possible through the api
Avatar
UPrimalInventoryComponent::AddItem
Avatar
Not sure what to do with that yet, but ill have a play.... thank you
10:53 AM
😉
Avatar
you add items with that 😄 (edited)
Avatar
you can hook it
Avatar
so Instead of ArkApi::GetHooks().SetHook("APrimalCharacter.ServerUploadCharacter",detour, original); something like this? ArkApi::GetHooks().SetHook("UPrimalInventoryComponent.AddItem",detour, original); (edited)
Avatar
ok I got it 😃
11:17 AM
thanks
Avatar
its right, but you also need correct hook function defination (edited)
Avatar
yeah I got that in already.
11:44 AM
geeeeeez.....I finaly get it
11:45 AM
sometimes the penny have to drop twice 😆
Avatar
so for sending a messge it requires AShooterPlayerController, but in my case I only have APlayerController
12:14 PM
how would I get the AShooterPlayerController since its derived from APlayerController
Avatar
just cast
Avatar
@Michidu are you sure that I can take the offline player's data by AShooterGameMode? I hooked AShooterGameMode.LoadWorld, do original call and then trying to get steam ids and tribes auto steam_ids = _this->SteamIdsField(); steam_ids are empty Maybe I hooked wrong method?
Avatar
Hook LoadFromFile for players, server loads all players on start up
12:21 PM
but you didnt need to hook anything to access AShooterGameMode
Avatar
Ok, thanks
Avatar
After LoadFromFile was called fields are also empty
Avatar
i meant if you hook UPrimalPlayerData::LoadFromFile, you can access UPrimalPlayerData after the function finished exectution
Avatar
This hook does not exists, at least in the Hooker Creator tool
Avatar
you can hook any function with the api but some of them are not in the hook creator ofc 😃
Avatar
I checked out this point. The UPrimalPlayerData structure in the api also does not contain this method (edited)
Avatar
what's the general process for hooking another plugin
Avatar
Do you mean how to use Permissions, ArkShop and so forth?
Avatar
yea, I need to hook a few functions in Arkshop
4:39 PM
Help
Avatar
  • get the static lib of the ArkShop
  • include the Public folder of ArkShop to your project (Project Properties -> VC++ Directories -> Include Directories)
  • link .lib library of ArkShop (Project Properties -> VC++ Directories -> Library Directories)
  • add ArkShop.dll to the Delay Loaded DLLs list (Project Properties -> Linker -> Input -> Delay Loaded DLLs)
This way you can call ArkShop functions in your plugins
5:01 PM
Probably you need to use #pragma comment(lib, "ArkShop.lib") in your code
Avatar
^^^
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/30/2019 5:32 PM
@Josef Where is the "onlineSups" defined?
Avatar
@DevCPP you can still hook it even if its not in api, however what exactly info you need from offline players?
Avatar
@Josef Is that Java? There's some context missing here 🙂
Avatar
@DevCPP TY, wasnt sure if I needed to do anything extra
Avatar
@Haragon hooking unexported functions is not that easy though
Avatar
hrm. yeah I want to attempt to hook useKit and changeKitAmount
Avatar
bool Hook_UPrimalPlayerData_LoadFromFile(UPrimalPlayerData* _this, FString* filename) { Log::GetLog()->warn("Hook_UPrimalPlayerData_LoadFromFile was called"); bool result = UPrimalPlayerData_LoadFromFile_original(_this, filename); if(_this) { Log::GetLog()->warn("Hook_UPrimalPlayerData_LoadFromFile _this valid, name {}", _this->MyDataField()->PlayerNameField().ToString()); Log::GetLog()->warn("Hook_UPrimalPlayerData_LoadFromFile _this valid, tribe_id {}", _this->MyDataField()->TribeIDField()); Log::GetLog()->warn("Hook_UPrimalPlayerData_LoadFromFile _this valid, level {}", _this->MyDataField()->MyPersistentCharacterStatsField()->CharacterStatusComponent_HighestExtraCharacterLevelField()); FUniqueNetIdSteam* steam = static_cast<FUniqueNetIdSteam*>(_this->MyDataField()->UniqueIDField().UniqueNetId.Get()); if(steam) { Log::GetLog()->warn("Hook_UPrimalPlayerData_LoadFromFile _this valid, steam_id {}", steam->UniqueNetId); } } return result; } @Michidu I want to get:
  • All SteamID's
  • Levels of all players
  • All tribes with tribemates of each tribe
The code above works but player level is a 0
Avatar
only level is 0?
Avatar
And tribe id, but my players is not in a tribe
5:44 PM
I just create player on the server
5:44 PM
Name is valid, and steam id is valid too
Avatar
does the API support changing buff/debuff stats ?
5:45 PM
this modded quetz on my server does extreme bleed damage which is applied as a debuff 😛
Avatar
i don't know if there are other ways to get offline players besides reading save files
5:56 PM
it has some code related to buffs but i never tried it, probably you can somehow
Avatar
I was looking @ buffs as well.... Don't see any hookable functions but it looksl ike they may be stored in a field..... is there any reference of buff class names?
Avatar
Rogue Leader 3/30/2019 6:14 PM
Anytime I've ever tried to get an offline or dead player's level, I've gotten zero as a result.
Avatar
I know the info is available via the save file, but dont know if accessing that would play nice w/ the API
Avatar
i think one of the plugins on the forum parses the savefile
6:27 PM
it's NameControll i believe
Avatar
Save file directly?)
Avatar
yeah i think
Avatar
Maybe so, but source code closed)
Avatar
well yeah ofc 😄
Avatar
And I have no idea how to parse files by hand )
Avatar
you can look into how ArkBot does it
7:00 PM
although it's mostly in c#
Avatar
this might help you, is in java though
7:00 PM
Tools to work with the binary files of ark. Extract information, manipulate them or write them from scratch. - Qowyn/ark-tools
Avatar
Library for reading ARK Survival Evolved savegame files using C#. - ark-mod/ArkSavegameToolkitNet
7:00 PM
ARK Survival Evolved application that monitors and extracts data from local ARK servers and exposes this data through a Web App, Web API and Discord Bot. Provides important functions to players: di...
Avatar
I'll look at this, thanks
Avatar
someone know why the Hooker Creator tool is no longer available?
8:23 PM
@Mr.Salt
Avatar
thanks 😚
Avatar
Any time someone attaches an exe, I always want to attach this as a joke:
Avatar
just 0 bytes is too obvious
Avatar
Yeah, the goal is that it's obvious, though. It's also acts as a bit of a "don't trust random DLL/EXE files" PSA.
Avatar
but would be funnier if it were an actual program 😉
Avatar
oof the framerate for my server seems to be dipping under 10 sometimes even when the cpu is barely at 50%
Avatar
@WETBATMAN 50% overall or under 50% on every core? (edited)
Avatar
it's 50% overall
8:52 PM
but the 2 cores allocated to that server aren't maxed out
Avatar
Okay, that's what I was going to ask next
Avatar
actually one of them is close but not maxed 😄
Avatar
How close?
Avatar
The tickrate for my servers tends to start dropping when around 75% of the core is used, but I have seen times where the tickrate is just low even without high CPU usage.
8:55 PM
Plugins that cause the thread to wait and don't do much themselves cause that pretty easily.
Avatar
i hope that's not one of my plugins lol
8:56 PM
Avatar
I see the third graph is similar lol
Avatar
this is what the usage for my other servers looks like and players were't complaining about that one
Avatar
witch map ?
Avatar
ragnarok is the one framerate is low on
Avatar
Honestly, a stable 10-15 shouldn't be noticeable. Drops to zero are likely what people will notice more than anything
Avatar
the last graph is the center
8:58 PM
but what i've noticed is that squids overspawn like crazy on ragnarok for some reason
8:58 PM
that might be the partial cause 😛
8:59 PM
so what's the general 'no no's in terms of plugin performance
8:59 PM
i have some pretty simple plugins in use i want to make sure they aren't the cause 😄
Avatar
If I had to give one major thing, it would be this: When inside a hook, do as little work (time-wise) as possible and let the hook continue. Nearly all of the hooks are going to hold up the main thread, and to maintain 30 FPS, you're competing with the rest of the ARK logic for about ~33ms worth of processing time.
9:09 PM
I try to avoid using things like blocking network/database calls in hooks unless they're extremely low latency and fast. Trying to query a database server that's somewhere else on the internet is going cause problems. (edited)
Avatar
makes sense
9:18 PM
i'm not doing any complex stuff in my plugins so it should be fine 😛
Avatar
DECLARE_HOOK(AShooterPlayerController_GiveItem, bool, AShooterPlayerController, TArray<UPrimalItem *> *, FString *, int, float, bool, bool, float); bool Hook_AShooterPlayerController_GiveItem(AShooterPlayerController _this, TArray<UPrimalItem> outItems, FString* blueprintPath, int quantityOverride, float qualityOverride, bool bForceBlueprint, bool bAutoEquip, float MinRandomQuality) { return AShooterPlayerController_GiveItem_original(_this, outItems, blueprintPath, quantityOverride, qualityOverride, bForceBlueprint, bAutoEquip, MinRandomQuality); } I tried to get fixed quality items by modifying MinRandom Quality to Quality Override. OverrideOfficialDifficulty= 1.000 000 000 is available, butOverrideOfficialDifficulty = 5.000 000 000 fails. So why? (edited)
Avatar
what do you mean fails? and why it's 5.000 000 000
Avatar
Know anyone signatures of functions which perform saving data of players/tribes into a file? I want to hook them I know only LoadFromFile signatures
Avatar
AShooterGameMode::SaveTribeData
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 3/31/2019 7:58 PM
The World’s First AI Assistant for Gaming. Only from NVIDIA.
Avatar
Today and tomorrow are good days to not take anything seriously 🙂
Avatar
heh
Avatar
twitch.tv/arkitektum 4/1/2019 8:01 PM
Shit, my servers, close without error... someone have this problem??
Avatar
that can be a lot of things 😄
Avatar
@Michidu i finally got PluginCrashManager to corrupt a save lol
10:43 PM
server restarted and a lot of structures were gone
10:43 PM
luckily i had a backup 😛
Avatar
@WETBATMAN happened to one of mine a few weeks ago. Like half structures disappeared but the server was still up
12:58 AM
not still up, i meant to say it still ran
Avatar
@Michidu I've solved that by setting MinRandomQuality = FLT_MAX.
Avatar
twitch.tv/arkitektum 4/3/2019 6:39 PM
Someone knows if it´s exist a command that reset your stats, or your dino stats?
Avatar
Any way to prevent commands from outputting to chat without disabling command logging?
Avatar
console commands you mean?
Avatar
((APlayerController*)_this)->ConsoleCommand(result,Command,false);
9:22 AM
@Haragon call a console command like this
9:23 AM
it won’t log to chat
Avatar
What is the difference between TArray<FItemNetInfo>* and TArray<FItemNetInfo>
9:33 AM
seems like if you iterate through TArray<FItemNetInfo>* it gives you TArray<FItemNetInfo> for each element
9:35 AM
So what I am trying to get is FItemNetID from FItemNetInfo in TArray<FItemNetInfo>*
9:37 AM
so far this what I have for (int i = 0; i < AddedItems->Num(); i++) { auto itemArray = AddedItems[i]; for (int x = 0; x < itemArray.Num(); x++) { int index; auto itemNetID = itemArray[x].ItemIDField(); auto item =_this->FindItem(&itemNetID, false, false, &index); FString itemName; item->NameField().ToString(&itemName); Log::GetLog()->warn("Item name: {}", itemName.ToString()); } } (edited)
Avatar
first one is the pointer to TArray
9:42 AM
you can use range-for loop for (auto item : *AddedItems) { .... } if AddedItems is pointer to TArray (edited)
Avatar
you know which function is called on complete server start ?
9:44 AM
i tried to hook InitGame but it did the check on InitWorld anyway
Avatar
what do you mean 'did the check'?
Avatar
i want to do my HWID check on complete server start
9:46 AM
and when i hooked InitGame it ran the check on InitWorld
Avatar
how it could, lol
Avatar
wait i'll screenshot it 😄
9:48 AM
9:48 AM
void Hook_AShooterGameMode_InitGame(AShooterGameMode* a_shooter_game_mode, FString* map_name, FString* options, FString* error_message) { OldAuth(); AShooterGameMode_InitGame_original(a_shooter_game_mode, map_name, options, error_message); }
Avatar
what it should show though?
9:49 AM
it was called after InitWorld
Avatar
hmm
9:49 AM
you know how tebex loads the async server
9:49 AM
on complete start
9:49 AM
oh wait
9:50 AM
if (ArkApi::GetApiUtils().GetStatus() == ArkApi::ServerStatus::Ready)
9:50 AM
what if i just do this 😄
Avatar
you could call Auth after InitGame_original
Avatar
ahh
9:52 AM
yeah that does it
9:52 AM
thank you
9:52 AM
if (ArkApi::GetApiUtils().GetStatus() == ArkApi::ServerStatus::Ready) { OldAuth(); }
9:52 AM
i still added this
9:52 AM
in DLLmain though
9:53 AM
in case someone loads it on runtime haha
Avatar
good point
Avatar
how do I convert from FItemNetID to FItemNetID* which I believe is a parameter type (edited)
10:07 AM
auto item = _this->FindItem(itemNetID, false, false, &index);
10:08 AM
it complains that it requires FItemNetID parameter type
Avatar
&itemNetID 😃
Avatar
yeah I had that but it kept failing
10:09 AM
ok thank you
10:09 AM
ill put it back
Avatar
show more code
Avatar
for (auto netInfoItem : *AddedItems) { int index; auto itemNetID = netInfoItem.ItemIDField(); auto item = _this->FindItem(&itemNetID, false, false, &index); if (item != nullptr) { FString itemName; item->NameField().ToString(&itemName); Log::GetLog()->warn("Item name: {}", itemName.ToString()); if (!itemName.IsEmpty() && itemName.ToLower().Contains("cryopod")) { Log::GetLog()->warn("Item Transfer blocked: {}", itemName.ToString()); auto controller = _this->GetOwnerController(); ArkApi::GetApiUtils().SendServerMessage(controller, FColorList::Red, L"CryoPod transfer not allowed !"); Success = false; } } }
Avatar
how you got AddedItems?
Avatar
void Hook_UPrimalInventoryComponent_OnArkTributeItemsAdded(UPrimalInventoryComponent* _this, bool Success, TArray<FItemNetInfo>* AddedItems) { if(AddedItems->Num() > 0) { for (auto netInfoItem : *AddedItems) { int index; auto itemNetID = netInfoItem.ItemIDField(); auto item = _this->FindItem(&itemNetID, false, false, &index); if (item != nullptr) { FString itemName; item->NameField().ToString(&itemName); Log::GetLog()->warn("Item name: {}", itemName.ToString()); if (!itemName.IsEmpty() && itemName.ToLower().Contains("cryopod")) { Log::GetLog()->warn("Item Transfer blocked: {}", itemName.ToString()); auto controller = _this->GetOwnerController(); ArkApi::GetApiUtils().SendServerMessage(controller, FColorList::Red, L"CryoPod transfer not allowed !"); Success = false; } } } } UPrimalInventoryComponent_OnArkTributeItemsAdded_original(_this, Success, AddedItems); }
10:13 AM
. The one beneath is my first one to stop items and it works, but it hangs until ark transfer times out (edited)
10:13 AM
bool Hook_UPrimalInventoryComponent_ServerAddToArkTributeInventory(UPrimalInventoryComponent* _this, FItemNetID* itemID, TArray<unsigned __int64> SteamItemUserIds, FItemNetInfo* AlternateItemInfo) { FString inventoryName; _this->GetInventoryName(&inventoryName, false); if(!inventoryName.IsEmpty()) Log::GetLog()->warn("-----Inventory Name: {}", inventoryName.ToString()); int index; auto item = _this->FindItem(itemID, false, false, &index); FString itemName; item->NameField().ToString(&itemName); if (!itemName.IsEmpty()) Log::GetLog()->warn("----Item Name : {} ", itemName.ToString()); if (!itemName.IsEmpty() && itemName.ToLower().Contains("cryopod")) { Log::GetLog()->warn("Item Transfer blocked: {}", itemName.ToString()); auto controller = _this->GetOwnerController(); ArkApi::GetApiUtils().SendServerMessage(controller, FColorList::Red, L"CryoPod transfer not allowed !"); return false; } return UPrimalInventoryComponent_ServerAddToArkTributeInventory_original(_this, itemID, SteamItemUserIds , AlternateItemInfo); }
Avatar
well, FindItem looks fine
10:15 AM
probably something else
Avatar
why it doesn't work ArkApi::GetApiUtils().GetShooterGameMode()->bOverideStructurePlatformPreventionField() = false; (edited)
Avatar
void Unload() { VM_START if (authed == true) { ArkApi::GetHooks().DisableHook(XorStr("APrimalStructure.TakeDamage"), &Hook_APrimalStructure_TakeDamage); ArkApi::GetHooks().DisableHook(XorStr("AShooterGameMode.InitGame"), &Hook_AShooterGameMode_InitGame); } VM_END }
1:21 PM
when using themida
1:21 PM
is adding VM_START and VM_END enough ?
1:21 PM
or does anything else have to be added to the source
Avatar
If you want to release it, packers are not allowed anyway :)
Avatar
not releasing this one 😄
Avatar
Then you can Just use them ida hwid protection
Avatar
themida does not have HWID
1:51 PM
that's another program from that company
Avatar
Win License ye
1:51 PM
Almost same thing anyway
Avatar
btw is virtualizing a hook not possible ?
1:52 PM
because themida tells me there is no ending point
Avatar
Should be possible
Avatar
when i add VM_START and VM_END in the source
Avatar
Maybe wrong place
Avatar
tried it 2 different ways 😛
Avatar
Why protecting it anyway lol
Avatar
why not 😄
Avatar
If your not gonna release it
Avatar
i call the HWID function in that hook
1:53 PM
so i want to virtualize it
1:54 PM
btw are plugins with themida not allowed even if author sends you the source code ?
Avatar
They will trigger almost all antiviruses until you bought themida
Avatar
yeh but i didn't trip my windows defender
1:55 PM
i doubt anyone uses a custom antivirus 😄
Avatar
Win defender will detect it too after some time
Avatar
hmm
1:56 PM
the virtualisation or even if you just pack it
Avatar
if you change some default settings
1:57 PM
like vm count
1:57 PM
it will avoid win detection
Avatar
Themida will watermark binary anyway
Avatar
over time 😃
1:58 PM
cause it changes the finger print used by scanners
1:58 PM
its a little trick i used to do
Avatar
No, cuz i guess he use leaked themida license lol
Avatar
change vm amount to 2 instead of 1
1:58 PM
oh right then yeah
1:58 PM
it will be detected over time yes
Avatar
yeah ofc paying for themida for just plugins is overkill 😄
1:59 PM
but i'm not planning on releasing this one anyway
Avatar
michidu owns it ask him very nicely / pay him maybe
Avatar
just wanted to see how it's done haha
Avatar
he will pack your plugin for u
1:59 PM
i dint read full convo btw jumped in late
Avatar
yeh lol
1:59 PM
anyway
1:59 PM
void Hook_AShooterGameMode_InitGame(AShooterGameMode* a_shooter_game_mode, FString* map_name, FString* options, FString* error_message) { VM_START AShooterGameMode_InitGame_original(a_shooter_game_mode, map_name, options, error_message); OldAuth(); VM_END }
2:00 PM
void Hook_AShooterGameMode_InitGame(AShooterGameMode* a_shooter_game_mode, FString* map_name, FString* options, FString* error_message) { AShooterGameMode_InitGame_original(a_shooter_game_mode, map_name, options, error_message); VM_START OldAuth(); VM_END }
2:00 PM
both trigger an error in themida
Avatar
just remove the hook
2:00 PM
call OldAuth
2:00 PM
from winmain
2:00 PM
problem solved
Avatar
nah i'll leave this hook unprotected then 😄
2:00 PM
it's already overkill protection 😄
Avatar
no that ruins the protection
2:00 PM
now people know where to jmp to
2:00 PM
cause the call is not macroed
Avatar
michidu says it's possible in hook i think
Avatar
you dont need this hook though
2:01 PM
its 100% unneeded
Avatar
i like it this way 😛
Avatar
your trying to fix something that doesnt even need to be added
2:01 PM
and im telling you this way is ruining your security
2:01 PM
even more
2:01 PM
your using my hole auth system
2:01 PM
why not take the advice
2:02 PM
atleast u can macro the call in winmain haha
2:02 PM
anyway gtg now ill be back in a bit
2:02 PM
if i could figure out how to virtualize the hook it would be better 😛
2:03 PM
but if themida will trip windows defender anyway
2:03 PM
i kinda don't see the point
Avatar
void CallMe() { VM_START OldAuth(); VM_END }
2:03 PM
call CallMe();
2:03 PM
from the hook
2:03 PM
but its really not needed lol
2:04 PM
this way will work i guess cause u dont have the VM macros in the hook itself
2:05 PM
it will be good enough to stop most people lol
2:05 PM
not michidu though (edited)
Avatar
Why would you virtualize call though, need to virtualize function itself
Avatar
he could still bypass it easily
2:05 PM
he did lol
2:05 PM
both are virtualized
Avatar
nop it still says it's missing the end
Avatar
ah dont worry about it then
Avatar
Virtualizing call is almost useless though
Avatar
he can also just call it from Winmain
2:06 PM
and not even use this hook
2:06 PM
that hes trying lol
2:06 PM
he doesnt need this hook
2:07 PM
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { VM_START Log::Get().Init("NoAnunnaki"); switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: if (ArkApi::GetApiUtils().GetStatus() == ArkApi::ServerStatus::Ready) { OldAuth(); } ArkApi::GetHooks().SetHook(XorStr("AShooterGameMode.InitGame"), &Hook_AShooterGameMode_InitGame, &AShooterGameMode_InitGame_original); break; case DLL_PROCESS_DETACH: Unload(); break; } VM_END return TRUE; }
2:07 PM
to
2:07 PM
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { VM_START Log::Get().Init("NoAnunnaki"); switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: OldAuth(); break; case DLL_PROCESS_DETACH: Unload(); break; } VM_END return TRUE; }
2:07 PM
would be fine but yeah u dont really need to macro it
2:07 PM
but if u want to make it more confusing sure why not
2:08 PM
OldAuth applys his hooks which are within vm's anyway
2:08 PM
so his plugin will still function w/o the need of this hook
2:08 PM
but yeah it is weird u cant do a vm in a hook
2:08 PM
i dont see why it shouldnt work (edited)
2:09 PM
well shit lol
Avatar
change vm process count
2:09 PM
to 2
2:09 PM
it will drop
Avatar
yeah i gotta go now
2:10 PM
will do later
Avatar
More av will detect it soon
Avatar
but yeah cracked vers are mostly detected
2:10 PM
u can fiddle with them to get it below 1-3 detections though
2:11 PM
but maybe in a few months that detection rate goes up
2:11 PM
after many users use it
2:11 PM
i notice this a lot with packing stuff
Avatar
With leaked i dont think you can heh
Avatar
i couldnt really tell you last time i used leaked was 2017
2:11 PM
used it for a year
2:12 PM
on a game that had 120+ players daily but yeah i had some false positives too
2:12 PM
3-6
2:12 PM
but sometimes it went up
2:12 PM
and id have to repack and change settings (edited)
Avatar
Even with license i had a few false positive heh
Avatar
so now i can imagine its worse
2:12 PM
also all cracked themida's are bypassed, and documented on how to do so (edited)
Avatar
You will be fine only if you sign dll also
Avatar
new themida is good
Avatar
3.0?
Avatar
public free cracked ones are already bypassed
2:14 PM
but im pretty sure anytime anyone bypasses themida's macro's they update to make it harder (edited)
Avatar
VM is very hard to devirtualize
2:14 PM
Even for cracked
Avatar
yeah i can imagine they store in encrypted memory and use some polymorph code to generate runtime decryption
2:15 PM
but they may even have parts of decyption spread out across different memory regions just for 1 functions
2:15 PM
i can imagine they encrypt it to the max lol
2:16 PM
ive looked at assembly of vmed functions
Avatar
Encryption is not same as VM though
Avatar
yeah
2:17 PM
but i guess they just run code in there own virtualized section then
2:17 PM
which can only process there vms
Avatar
what do you mean sign dll btw
Avatar
to the rest of the app the code is rubbish
2:17 PM
but the vm can read it
Avatar
Multiple VM, its being used actually
Avatar
yeah u can also choose what ones too
2:19 PM
its pretty nice
2:19 PM
if im right i dont rememeber u can choose like tiger ect
2:19 PM
depending on how virtualized u want your code
Avatar
You can choose vm
Avatar
but i think default options in that section is the best for speed / security
2:20 PM
i used it a long time ago been meaning to by it
2:20 PM
its handy to own
Avatar
so basically what has come out of this is that leaked ones are useless 😃
Avatar
might just get the vm section though 😃
2:20 PM
99 euros
Avatar
what does the full themida cost ?
Avatar
200
2:21 PM
they arent useless
2:21 PM
they are still very very hard to bypass
Avatar
for this use case
2:21 PM
i mean
Avatar
i can't do it myself
2:21 PM
maybe if i found full info on how i can
2:21 PM
but its a lot of effort (edited)
Avatar
yeah but if the plugin gets detected on runtime it’s no good 😃 (edited)
Avatar
i had no idea u was using a cracked version
2:22 PM
till you said
2:22 PM
how was i suppose to know haha
2:22 PM
remember i told u about the alerts
Avatar
lmao no it’s still cool
2:23 PM
at least now i know how to do it in the future
Avatar
No one crack plugins, so you r fine for now heh
Avatar
its cause i showed him
Avatar
ownprox should we tell him ? 😃
Avatar
how easy it was to crack his
2:24 PM
lol
2:24 PM
he was storing strings in memory though
2:24 PM
of the hwid
2:24 PM
so i helped him secure it more
2:24 PM
then he wanted to go all out
2:24 PM
and get themida to lol
Avatar
But no one bother with it anyway lol
Avatar
u could use hex editor
2:24 PM
or cheat engine
Avatar
true yea but it’s scary easy 😃
Avatar
it was that easy
Avatar
lol
2:25 PM
Most plugins are easy to crack
Avatar
yeah write the hooks
2:25 PM
that wernt wrote
2:25 PM
lol
Avatar
yes i’ve told agito to protect strings
2:25 PM
because i could swap his hwid with mine
2:25 PM
and the plugin would load
Avatar
haha
Avatar
gave them that xor class
Avatar
i did
Avatar
i meant i gave u it which ended up to him but yeah
2:26 PM
its nice
2:26 PM
he told me he doesn’t care 😆
Avatar
good news is im not gonna use it lol
2:26 PM
or leak it
2:27 PM
atleast its better now lol
2:27 PM
hes welcome to use what i gave u too btw
2:28 PM
like the hole hwid method / auth funcs
Avatar
well i guess i’ll just use it without themida for now then haha
2:31 PM
it’s decent enough
Avatar
i am anyway
2:31 PM
in that case keep your hook
Avatar
yup
Avatar
What means EventInstigator and DamageCauser in hook ***_TakeDamage() ?
6:58 PM
I need to determine is the attacker either player or dino
Avatar
EventInstigator is probably what you're looking for
7:01 PM
if (EventInstigator && EventInstigator->CharacterField()) { ACharacter* character = EventInstigator->CharacterField(); if (character != nullptr && character && character->IsA(APrimalDinoCharacter::GetPrivateStaticClass()))
Avatar
twitch.tv/arkitektum 4/4/2019 7:17 PM
ark update... i have scare 😦 (edited)
Avatar
Thanks @WETBATMAN btw, why you write character != nullptr && character? This is the same things in C++
Avatar
yeah i know 😛
7:21 PM
noticed that just now
Avatar
anyone here use OVH for ddos protection ?
8:08 PM
if so what are your recommendations for setting up firewall rules ? 😄
Avatar
We have it set up, but hadn't needed it until 2-3 days ago
Avatar
you have any firewall rules in it ?
Avatar
Their web interface is interesting to say the least. We have a few set to allow ARK traffic, and to block almost everything else.
Avatar
yeah that
8:35 PM
they have a very weird permissions setup
8:36 PM
so what permissions do you give your ark ports ?
Avatar
We have mitigation set to "permanent", but it's not obvious what that changes since you still get an email like this saying they started mitigating an attack:
Avatar
which number ?
8:36 PM
yeah i got that message too but the machine still went offline
8:36 PM
it was for a few mins but it still did
Avatar
Their normal firewall rules or the "game firewall" thing they offer for the GAME-32 and 64 machines?
8:39 PM
Also, do you have Mitigation set to auto or permanent?
Avatar
mitigation only
8:41 PM
i don't have game firewall btw
8:41 PM
i have my home machine connected to their VPS
Avatar
So you're routing all your game traffic through a VPS for the DDoS protection?
Avatar
yup
8:42 PM
my bare home network took a hit once
8:43 PM
it knocked everything offline
8:43 PM
after that i learned my lesson and switched to dynamic ip with a VPS 😄
Avatar
Not sure, then. The attack that triggered the email above was 2.1Gbps for 10-15 minutes, but I wasn't online at the time to see if there were any noticeable lag from it.
Avatar
GSH | MrOwlSky 4/6/2019 10:46 PM
So question, Anyone know how to route OVH VPS for DDOS protection on home box?
Avatar
you still haven't got it to work ? 😦
Avatar
GSH | MrOwlSky 4/6/2019 10:47 PM
Nope
Avatar
drop iptables
10:47 PM
rest of your setup is correct
10:47 PM
just drop all iptables and enter them again
Avatar
GSH | MrOwlSky 4/6/2019 10:47 PM
Tried didn't work
Avatar
hmm
10:48 PM
In this guide you will learn how to setup an OpenVPN server with port forwarding/open ports for clients.
10:48 PM
well this is the exact tutorial i followed and got it to work
Avatar
GSH | MrOwlSky 4/6/2019 11:02 PM
Can you voice again today?
Avatar
yeah why not
11:03 PM
😄
11:04 PM
playing something rn will be back a bit later
Avatar
Hi just want to know how to fix my unofficial PC sessions not showing up
Avatar
from what i can tell you have the xbox version of ark
8:47 PM
if you want to play on steam servers you need the steam version of ark
Avatar
twitch.tv/arkitektum 4/10/2019 9:58 PM
Is there a plugin, that can limit a command from another plugin, so that only a certain "permission group" uses it?
Avatar
don't think so but it should not be hard to make
9:59 PM
unless the plugins uses a console command
9:59 PM
the you can use AdminsPermissions
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 4/10/2019 10:01 PM
Probably all plugins should start depending on permissions.. so check if player has the plugin.commands.command would be pretty cool heh 😄
Avatar
twitch.tv/arkitektum 4/10/2019 10:17 PM
It´s for the plugin, "DeathMatchEvent" of @OwnProx, i need to do that the command /join, used only by certain permission group, but i don´t have this option on config file 😦
6:21 PM
peeps i would recommend that y'all remove enforcers
6:21 PM
killing them in masses throws this crash
Avatar
Ark API Does he have an API for Linux?
Avatar
it depends on injecting DLL's so no
Avatar
Is Michidu missing?
Avatar
need help with something ?
Avatar
I want to ask him if he can customize a plug-in that supports UTF-8 character input in rcon broadcasting.
Avatar
pretty much all of his plugins are open source it should not be that hard to add utf8
Avatar
NONONO, I'm a customized private plug-in
5:47 PM
5:47 PM
For example, let Chinese no longer be?????
Avatar
oh you want RCON to broadcast in utf8 ? (edited)
Avatar
yes
Avatar
weird i thought it already supported utf8
Avatar
so if you type in chinese for example it shows up as [][][][] ?
Avatar
He just supports watching players chat in the interface, isn't it????
5:49 PM
yes
Avatar
hmm i think it should be possible to hook the rcon chat posting and encode it in utf8
5:51 PM
or if not that make a separate command that broadcasts in utf8
Avatar
Accurately speaking, the command ark in broadcast mode can't recognize Chinese. He can only recognize English letters and numbers.
Avatar
yeah it lacks encoding
5:51 PM
did you try unicode RCON ?
Avatar
He shouldn't have been caused by RCON. For example, I used commands to send broadcasts. He doesn't support Chinese either.
5:53 PM
It should be that this command does not support UTF-8.
Avatar
i think it's rcon
Avatar
The display [][][] because it is not recognizable
Avatar
because when ownprox made his crossserver chat he updated the unicode rcon plugin to support it
5:53 PM
otherwise russian for example was not properly transmitted in chat
Avatar
No, it's not. I still can't recognize Chinese using the built-in console in the game.
5:54 PM
Does Russian also belong to UTF-8?
Avatar
i think so
5:55 PM
i could take a look at making the broadcast utf8 later if you want
Avatar
But I asked the ARK Server Manager team before, and they said it was the official order.
5:55 PM
You can try it.
Avatar
yeah should be interesting lol
Avatar
If you can use plug-ins to get him to work, but if you want to sell it as a private version, you can contact me.
5:57 PM
i'll take a look first 😛
Avatar
From what i can see communication to rcon and query ports does not use utf8, as utf8 doesnt seem to like to translate things the \xFF very well
Avatar
I am trying to stop an item from being uploaded using one the following hooks bool Hook_UPrimalInventoryComponent_ServerAddToArkTributeInventory(UPrimalInventoryComponent* _this, FItemNetID* itemID, TArray<unsigned __int64> SteamItemUserIds, FItemNetInfo* AlternateItemInfo) void Hook_UPrimalInventoryComponent_OnArkTributeItemsAdded(UPrimalInventoryComponent* _this, bool Success, TArray<FItemNetInfo>* AddedItems) void Hook_UPrimalInventoryComponent_AddArkTributeItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bFromLoad) bool Hook_UPrimalItem_CanBeArkTributeItem(UPrimalItem* _this) The thing is, I can stop the item from uploading, but then the Uploading to ark.... keeps showing for quite a while, then eventually stops with Uploading item to ArkFailed. 006 - TimedOut. I am guessing this is because the client is waiting for the server to send some form of message or notification back. Does anyone have an idea to what what it is that Ill need to send back, and most importantly, how would I do that. (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 4/21/2019 7:24 AM
Would be great if you could share the implementation of it. Sometimes you might miss the origin game call
Avatar
Hi @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 , its rough but it works in the sense of stopping the item being uploaded. //Working.....welll kinda bool Hook_UPrimalInventoryComponent_ServerAddToArkTributeInventory(UPrimalInventoryComponent* _this, FItemNetID* itemID, TArray<unsigned __int64> SteamItemUserIds, FItemNetInfo* AlternateItemInfo) { Log::GetLog()->warn("ServerAddToArkTributeInventory...."); if (_this != nullptr) Log::GetLog()->warn("UPrimalInventoryComponent data available "); FString inventoryName; _this->GetInventoryName(&inventoryName, false); if(!inventoryName.IsEmpty()) Log::GetLog()->warn("-----Inventory Name: {}", inventoryName.ToString()); if (itemID != nullptr) Log::GetLog()->warn("FItemNetID data available "); int index; auto item = _this->FindItem(itemID, false, false, &index); FString itemName; item->NameField().ToString(&itemName); if (!itemName.IsEmpty()) Log::GetLog()->warn("----Item Name : {} ", itemName.ToString()); if (!itemName.IsEmpty() && itemName.ToLower().Contains("cryopod")) { Log::GetLog()->warn("Item Transfer blocked: {}", itemName.ToString()); auto controller = _this->GetOwnerController(); ArkApi::GetApiUtils().SendServerMessage(controller, FColorList::Red, L"CryoPod transfer not allowed !"); _this->NotifyArkItemAdded(); return false; } return UPrimalInventoryComponent_ServerAddToArkTributeInventory_original(_this, itemID, SteamItemUserIds , AlternateItemInfo); } (edited)
Avatar
Rogue Leader 4/21/2019 11:09 PM
Could be that serveraddarktributeinventory needs to call more functions and returning false leaves something hanging.
11:11 PM
Only way to figure out what was called before and after would be to use something like ida pro and follow the code.
11:14 PM
Maybe there is a better function to hook
Avatar
Yeah that's what I thought, Thanks , I'll have a look at ida pro , since I have tried a couple of hooks already (edited)
Avatar
Is there a function similar to HandleNewPlayer_Implementation that doesnt run on char download/server transfer?
Avatar
@Michidu give me permissions to sell my plugins / mod on the forums 😃
10:12 AM
@Foppa @Rogue Leader
Avatar
Hang on
10:15 AM
Type to me on the community site (edited)
10:19 AM
done
Avatar
@Foppa can you make sure i can use it on friday?
Avatar
GSH | MrOwlSky 4/24/2019 9:30 PM
@Natsu You taken care of?
Avatar
dont think so @GSH | MrOwlSky
Avatar
GSH | MrOwlSky 4/24/2019 9:32 PM
Wait for Foppa or Mich to come back. What plugin you selling? Did you create it, if so I'll throw you rank on discord. @Natsu (edited)
Avatar
il be selling : timed ban/mutes - year - month -day -hour -min auto unban./unmute after the time is gone (mysql only) auto voting for ark-servers you dont even have to be online in ark at all ( mysql only) (edited)
9:37 PM
and my mod
9:37 PM
in this case its an UI interface for ArkShop with custom things
😃 1
Avatar
I have been contacting Mich. Waiting a reply from him.
Avatar
sure i got no rush
Avatar
GSH | MrOwlSky 4/25/2019 12:45 AM
Just waiting on mich confirm before I send over the rank.
Avatar
@Natsu should be fixed now
Avatar
ya i saw thanks
Avatar
when you guys have time check out the plugins i have set on the site i will do my mod tomorrow
Avatar
Medicalmischief 4/29/2019 5:36 AM
Anyone use safezones able to change spawn points?
Avatar
if anyone here is hosting from home and is thinking about renting on OVH vps for ddos protection
2:16 PM
don't...
2:16 PM
just spoke to OVH
2:16 PM
their ddos protection for a non game server VPS is weird to say the least
2:17 PM
they drop all UDP traffic in case of a dos/DDOS
2:17 PM
fast VPN traffic is UDP
2:17 PM
and game traffic is also UDP
Avatar
@WETBATMAN why even host at OVH or futher more why get a VPS?
Avatar
because my main hosting machine is at my house 😄
2:24 PM
and because OVH has the best game protection
2:24 PM
assuming you have a game VPS or dedicated machine
Avatar
your form usa?
Avatar
no
Avatar
where then? 0_O
Avatar
tbilisi Georgia
Avatar
it isnt common here to host from home 😄
2:25 PM
altough we got really good internet speed
Avatar
speed shouldn't be the issue tbh
2:25 PM
as long as OVH filters the traffic
Avatar
i dont use ovh i rent a dedicated server
Avatar
i'm about to get my hands on a game VPS
2:26 PM
it's basically dedicated level ddos protection but just a VPS
2:26 PM
at least that won't drop all udp lol
2:27 PM
and it's just 6$ a month
Avatar
and how much do you pay on cost then ?
2:27 PM
as in power / internet / for the ram/cpu
Avatar
right now i pay 10$ for ddos protection that doesn't even work
2:28 PM
tbilisi has the least expensive power lol
2:28 PM
it's basically nothing
2:28 PM
as for internet i pay 28 lari
2:28 PM
which is like 10$
2:28 PM
maybe less
Avatar
rofl what you expect 😄
2:28 PM
10$ haha
Avatar
like i said my house speed doesn't have an impact
2:28 PM
OVH should filter all traffic
Avatar
should?
Avatar
yes
2:29 PM
people don't connect to my home pc directly
2:29 PM
they connect to the OVH VPS
2:29 PM
my real ip address is never exposed
2:29 PM
with a VPN the connections from the OVH VPS are routed to my machine
2:30 PM
basically a ddos never hits me directly
2:30 PM
it hits OVH
2:30 PM
btw you asked for my machine
2:30 PM
it's an i7 4790k
2:30 PM
32gb ram
2:30 PM
not the best but it does what i want just fine
Avatar
well i pay 50$ included ddoss (not so good so i need to find a solution for this) but 64GB RAM - i7 7700k - SSD 240gb (2 times)
Avatar
yeah ddos sucks
2:34 PM
what's the bandwidth ?
Avatar
give me a sec i need to solve this ticket
2:34 PM
got a high prio atm
Avatar
the VPS i'm about to get has 500mb constant with 1gb burst in case of ddos
Avatar
problem with a dedicated server
2:34 PM
1sec
Avatar
Michidu What has he been doing recently? It's hard to get in touch with him once.😫
Avatar
@WETBATMAN i was thinking of selling my mod 60$ each and 5$ each month as a service
Avatar
buy + subscription ? 😄
Avatar
ya @WETBATMAN or i have to raise the price
Avatar
maybe do the subscription in case they wanna remove your branding 😉
3:05 PM
good idea!
Avatar
@WETBATMAN This may be helpful to you. I recently found out a few things about OVH's firewall: 1)They enable the firewall in their web interface when a DDOS is being mitigated even if it was disabled. 2)Their firewall defaults to allow all traffic, so you probably want a "deny all other" rule as the 19th priority. 3) Their firewall does not handle traffic within their network, so you still want firewall rules on all the machines or other OVH customers could connect (edited)
Avatar
that's the issue
6:37 PM
their regular VPS
6:37 PM
only protects TCP basically
6:37 PM
they drop all udp traffic
6:37 PM
most of the time
6:38 PM
i have deny all ipv4 as the 19th rule btw
6:38 PM
doesn't help a bit 😄
Avatar
@Natsu What does your plugin do? Personally, $60 seems very high for a plugin, especially for groups that aren't making much off their server. You may get more sales by lowering the price. (edited)
Avatar
i lowerd my mute/ban plugin already to 35 (edited)
6:40 PM
@Zachar543 What Does This Plugin Do? Lets you ban/mute people for an X period of time
Avatar
GSH | MrOwlSky 4/30/2019 10:36 PM
What's the advantage of using plugin compared to battlemetrics ban sync?
Avatar
Doesn't battlemetrics cost money?
11:07 PM
That would be the main upside if the plugin were free
Avatar
https://i.imgur.com/BVQ1hPV.png I highly advise the synthwave-vscode extention, my eyes are dead but it's worth every single ms of pain
Avatar
@GSH | MrOwlSky Clusterwide Mysql ban/mute
Avatar
GSH | MrOwlSky 5/1/2019 7:30 AM
Yeah battlemetrics does that for $5.00 (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/1/2019 8:00 AM
who of you goes by "Haragon" in forum? 😄 (edited)
8:10 AM
Whats up?
8:11 AM
Just didnt have a nick set :p
Avatar
Because Michidu is not available for the time being, I need another person to help me. This is a paid service. Developers with good technology and interest can contact me.
Avatar
anyone here? i need someone ingame with me 😄
Avatar
Medicalmischief 5/5/2019 1:20 PM
can someone tell me what caused this crash?
1:20 PM
Fatal error! VERSION: 295.107 VERSION.dll!ArkApi::Hook_AGameState_DefaultTimer() (0x00007ff9dff74a03) + 65 bytes [d:\programs\ark\ark-server-api\version\core\private\ark\hooksimpl.cpp:136] ShooterGameServer.exe!FTimerManager::Tick() (0x00007ff671466087) + 0 bytes [f:\build\trunk\engine\source\runtime\engine\private\timermanager.cpp:1080] ShooterGameServer.exe!UWorld::Tick() (0x00007ff67131e510) + 0 bytes [f:\build\trunk\engine\source\runtime\engine\private\leveltick.cpp:1288] ShooterGameServer.exe!UGameEngine::Tick() (0x00007ff67127b9ff) + 0 bytes [f:\build\trunk\engine\source\runtime\engine\private\gameengine.cpp:1170] ShooterGameServer.exe!FEngineLoop::Tick() (0x00007ff66fe6d08c) + 0 bytes [f:\build\trunk\engine\source\runtime\launch\private\launchengineloop.cpp:2421] ShooterGameServer.exe!GuardedMain() (0x00007ff66fe689ec) + 0 bytes [f:\build\trunk\engine\source\runtime\launch\private\launch.cpp:140] ShooterGameServer.exe!GuardedMainWrapper() (0x00007ff66fe6e0da) + 5 bytes [f:\build\trunk\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] ShooterGameServer.exe!WinMain() (0x00007ff66fe6e210) + 8 bytes [f:\build\trunk\engine\source\runtime\launch\private\windows\launchwindows.cpp:209] ShooterGameServer.exe!__tmainCRTStartup() (0x00007ff6722a3be1) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] KERNEL32.DLL!UnknownFunction (0x00007ff9fccd8364) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ff9fd1470b1) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ff9fd1470b1) + 0 bytes [UnknownFile:0] 慌瑳删灥楬慣整⁤捁潴⁲潂䙡楲汬䍟慨慲瑣牥䉟彐扁牥慲瑮䍟ㅟ㈷റ䰊獡⁴敒潭整䘠湵瑣潩汃敩瑮牐捯獥乳瑥硅捥潃浭湡啤牮汥慩汢൥
Avatar
GSH | MrOwlSky 5/5/2019 8:33 PM
One of your plugins using a timed function. What's list of plugins?
8:33 PM
What happens and how often does this crash
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/5/2019 8:46 PM
This crashlog is not plugin related.. more to the api itself
Avatar
as it does not show the plugin probably the PDB file wasn't included
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/5/2019 8:46 PM
Should be crashing on startup as I see it
Avatar
"PlayerDataIDField()" does not return the steamid?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/5/2019 9:16 PM
Like the field says.. returning the PlayerID 😅
Avatar
fellas
9:16 PM
i need your opinion 😄
9:16 PM
Events,Quests,custom ingame shop,custom plugins and much more!
9:16 PM
good or nah ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/5/2019 9:17 PM
Opinion about what exactly?😅
Avatar
the site 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/5/2019 9:18 PM
Lmao...
9:18 PM
Layout? Scripts? Colors?😂
Avatar
idk 😄
9:18 PM
godaddy offered me a site editor
9:19 PM
1 month trial 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/5/2019 9:19 PM
You‘ve been using that?
Avatar
i only added html for the join links
9:19 PM
didn't have a website before
9:19 PM
only had the ArkBot page
9:20 PM
that's why i was asking haha wondering if it's decent or if i should use something more advanced 😛
Avatar
Clean, quite simple... maybe find a color scheme that you could follow.
6:55 PM
🙂
6:55 PM
But the taste is as the behind, as we say in sweden 😉
Avatar
GSH | MrOwlSky 5/7/2019 12:38 AM
Fun stuff now I'm getting that crash
12:38 AM
Avatar
Any chance either of you had just unloaded/reloaded a plugin?
1:04 AM
I've noticed that crash as well, but only after attempting to unload or reload a plugin. Looks like the section of the code that the message mentions is attempting to invoke a callback in one of your plugins.
Avatar
GSH | MrOwlSky 5/7/2019 1:18 AM
Nope
1:18 AM
Didn't unload/reload any plugins
1:18 AM
Crashes started today for me
Avatar
Hello, I'am getting this crash roughly every hour and a half. Does anyone have any direction they can give me as to how to fix it? Thank you Current plugins: AllEngrams ArkShop DinoColors Lottery Mutes NameControl NewPlayerProtection Permissions zzMAGA UPDATE: after the 3x's...
2:38 AM
@Michidu
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/7/2019 11:03 AM
Can anyone tell me when this crash happens? Startup? Randomly?
Avatar
I'm not getting the crash but I have been told that it's pretty much random
3:42 PM
The one that I have seen is a it different, bit doesnt reference the Timer, just the server tick, otherwise its identical (edited)
Avatar
GSH | MrOwlSky 5/7/2019 6:54 PM
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 Crash is random. Server can be up for 10-45minutes then it does that crash. It's based off some Timer function that the majority servers are using. Assuming with Ark's recent updates they adjusted/optimized something in the timer with API or something.
6:56 PM
Might be the RPS plugin
Avatar
Medicalmischief 5/7/2019 7:04 PM
It's pretty random for me, like once a day, sometimes more
Avatar
GSH | MrOwlSky 5/7/2019 7:27 PM
You using any of kens plugins?
7:27 PM
ORP/Protection/RPS? @Medicalmischief (edited)
7:28 PM
Our crashes are resolved since removing RPS
Avatar
i haven;t updated to the new AUTH of his plugins and i'm not having issues
Avatar
GSH | MrOwlSky 5/7/2019 7:29 PM
It's something with my HWID I think cause it loads on server 1 but server 2 it doesn't load/register the HWID.
Avatar
no
7:29 PM
it's something with the requests 😄
Avatar
GSH | MrOwlSky 5/7/2019 7:29 PM
Yeah the webrequest
Avatar
maybe try downgrading the plugins
7:30 PM
i could send you old versions
Avatar
Medicalmischief 5/7/2019 7:30 PM
We do have rps, new version
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/7/2019 7:30 PM
I think you can even download older version on the forum if you've purchased the plugin (edited)
Avatar
GSH | MrOwlSky 5/7/2019 7:30 PM
No it's all good, It's just RPS for me so not too concern, Already informed him for update.
Avatar
you might not be authed in the old version
7:30 PM
but i can fix that 😛
7777_dabdabdabdab 1
Avatar
Medicalmischief 5/7/2019 7:31 PM
Does the old version have all the quest stuff?
Avatar
yes -permissions (edited)
Avatar
Medicalmischief 5/7/2019 7:31 PM
I think taming was broken I think
Avatar
taming does not exist in the version before new auth (edited)
7:31 PM
there are no taming actions
Avatar
GSH | MrOwlSky 5/7/2019 7:32 PM
How's the new DDoS Prot?
Avatar
switching to it this Saturday
7:33 PM
OVH one is completely broken
7:33 PM
their mitigation is what kills my connection
7:33 PM
not the DDOS
7:33 PM
😄
7:33 PM
tested it yesterday
Avatar
GSH | MrOwlSky 5/7/2019 7:33 PM
Ah so you haven't even played with the new one yet?
Avatar
yeah we did short testing
7:34 PM
200 mb ddos
7:34 PM
nothing happened
Avatar
GSH | MrOwlSky 5/7/2019 7:34 PM
Good deal, Any packet loss so far?
Avatar
haven't noticed any
7:34 PM
it's the best option tbh
7:34 PM
you need game firewall for games
7:34 PM
otherwise UDP gets dropped and you lose connection
Avatar
GSH | MrOwlSky 5/7/2019 7:35 PM
OVH one screwed up MySQL on our end. /kits would take 20 seconds to load and lag to high hell. Even with mySQL being local.
Avatar
that's not a VPN issue
7:35 PM
if it's local it's connecting by localhost
7:35 PM
VPN is run on a different network adapter
7:35 PM
7:36 PM
first one is VPN
7:36 PM
second one is ethernet
Avatar
GSH | MrOwlSky 5/7/2019 7:37 PM
Well I believe it's node located. Because the VPN is in canada and it tries to rely back into US states for the MySQL. Moving the MySQL on a Canada box closer to VPN resolved it somewhat. Turning the VPN off ended up completely resolving the MySQL issues.
Avatar
you sure you're connecting to it via localhost ?
7:37 PM
because if you're connecting to it via localhsot packet gets send to the local db directly
Avatar
GSH | MrOwlSky 5/7/2019 7:37 PM
We tried localhost with VPN and it lagged to high hell
Avatar
huh that's very weird
Avatar
GSH | MrOwlSky 5/7/2019 7:38 PM
It had to ping all the way into canada then ping all the way back into States.
Avatar
my VPS is in germany
Avatar
GSH | MrOwlSky 5/7/2019 7:38 PM
So was causing a delay/lag
Avatar
i'm in tbilisi
7:38 PM
never had DB high ping
7:38 PM
and my DB is also local
Avatar
GSH | MrOwlSky 5/7/2019 7:38 PM
Yeah no idea why it was doing it.
7:38 PM
Only guess was delay with node location being distance.
Avatar
yeah but it shouldn't do that 😄
Avatar
GSH | MrOwlSky 5/7/2019 7:39 PM
Ik
7:40 PM
You've seen the bugs that one day I showed you lol. It's curssed
7:40 PM
Avatar
yeah lol
Avatar
how would i go about pulling mysql info from another plugin ?
8:26 PM
just add the full query including the schema name ?
8:31 PM
ignore that 😄
8:31 PM
dumb question 😄
Avatar
For things like databases that are going to be called synchronously, you don't want any latency 🙂
11:12 PM
You have ~33ms per tick to maintain a "perfect" tickrate, so just the latency in your connect is going to be enough to trash that
11:12 PM
I keep all that stuff on the same machine where at all possible
Avatar
hmm well my select isn't really that intensive
Avatar
If it's called outside of an async method, it doesn't matter (edited)
Avatar
but yea having it local is best
11:13 PM
but yeah i haven't messed with a syncing db requests
Avatar
Do you Mysql for the Permissions plugin?
Avatar
yes
11:14 PM
for shop too
Avatar
If so, those are all sync calls to the database, so you really don't want the ~50ms it's going to take just to talk to your database
Avatar
also i ported ShopRewards to mysql and it sends a +1 to dino kills every time you kill a dino
11:15 PM
that's probably a terrible way to do it but i haven't noticed much lag because of it 😛
11:18 PM
is it reliable to attach a thread to a db request ?
11:18 PM
or even possible in a hook ? 😄
Avatar
I wouldn't create a thread just for it, but you can call the database where ever you want, just don't do it in something that's going to get tons of calls per tick
11:25 PM
As long as your server is good enough, the latency is lower enough, and the data structure is optimized well, modern databases can push a huge number of queries per second.
11:25 PM
I still wouldn't do it unnecessarily many times, but you'd be surprised
11:29 PM
It is possible to do async calls that would use threading, but you'd need a library that supports that, and then you'll have to deal with the callbacks, which might be worse lol
Avatar
Medicalmischief 5/8/2019 5:21 PM
Anyone know if its only the rps that's causing that crash or is it other plugins also
Avatar
anyone here that can grand permissions on the forums other then @Michidu
Avatar
he checks all plugins manually so that's why it's taking some time
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/8/2019 8:50 PM
What do you need natsu?
Avatar
give someone permissions to my plugin so he can give a rating
9:14 PM
since he bought it already
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/8/2019 9:16 PM
If u give me his forum name or maybe even a link then I may be able to add him to purchasers list of the plugin
Avatar
someone knows how to hook the rotation menu?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/8/2019 11:35 PM
should be done @Natsu
Avatar
@Mr.Salt It's unlikely that you'll be able to hook or modify the menu itself since it's mostly a client-side thing, but you may be able to hook the actions once someone choose an option.
Avatar
@Natsu how is your shop UI mod coming along?
Avatar
@Zachar543 yes thats what i am looking for. but i have not found any hook for a option so far
Avatar
@Haragon sold it already wont be released sorry
7:41 AM
Time to learn the devkit lol
Avatar
@Haragon why lol
Avatar
lmao you sold it
1:20 PM
that's too bad 😄
👍 1
Avatar
yea i did does any of you use a forum? and what kind of software / nulled ect?
Avatar
what do you mean 😄
Avatar
@Natsu because I was really excited for that haha. But I understand selling it. Now I will make one and give it to all of the people 😄 that is, if I find the time...
👍 2
Avatar
GSH | MrOwlSky 5/9/2019 5:09 PM
@Haragon I'll throw you some money if you figure out UI and release for free. Anything I can help let me know.
5:09 PM
Natsu's UI is epic.
Avatar
@GSH | MrOwlSky I just gotta open up the devkit and actually teach myself lol. Which should be okay considering I'm not mapping so I wont have to wait 6 hours for shader compilers >.>
👍 1
Avatar
Pffark Dev kit is trash 😂
Avatar
i think agito is working on it
5:44 PM
unless the mod was actually sold to agito 😆
Avatar
I saw his on the workshop, looks very nice
Avatar
What kind of Forum software / nulled ect? (edited)
Avatar
@Natsu Not sure if this is what you're asking, but we used to use https://www.discourse.org/ before switching most things to Discord
Discourse is modern forum software for your community. Use it as a mailing list, discussion forum, long-form chat room, and more!
11:49 PM
Ignore the prices, that's if you want them to host it. It's free if you host it yourself
Avatar
It's kinda trash 😂
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/10/2019 12:20 PM
I don't like it either 😄 (edited)
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 what do you use ? IPB/vbulletin/ Wordpress/MYBB? (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/10/2019 3:35 PM
I've been using WoltLab for a while in recent projects.. even XenForo but yea.. everything has it's (dis)advantages (edited)
Avatar
if you are fine using nulled or willing to pay, go for ipb/VB for free - phpbb, mybb, vanilla would be the best (edited)
Avatar
was setting ipb up but i need to get a good host that's ignore's dmca 😐
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/10/2019 3:58 PM
Russian hosting should help you.. lol
Avatar
no one cares about small forums
Avatar
why dmca?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/10/2019 4:15 PM
I wouldn't ask such things Tom.. lol
Avatar
lol just curious, i cant think of anything short of straight piracy that would be an issue, then again i guess article 13 is a thing now
Avatar
thx for the API update
6:37 PM
requests are much better
Avatar
@Haragon i used to do rsps then i am still active somewhat on those forums
6:59 PM
everyone used nulled things and the company forced dmca on people to shut them down
Avatar
@Natsu Gotcha, that makes sense. I have actually been interested in the wow PS scene again but for the same reason its hard to justify sinking a ton of time in to it
Avatar
Anyone here epic
5:28 PM
is this all the debug you're able to get with the API ? 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/12/2019 8:25 AM
Hey, is someone still having crashes because of the Timer function with API 3.1?
Avatar
nope
9:15 AM
and i never had them
9:15 AM
it's something with Agito's plugins (edited)
Avatar
any ideas how i get the "AShooterPlayerController" when i have only the "PlayerDataID"?
Avatar
maybe get steam id for player id and then get the controller from steam id 😃
Avatar
is there a utility function to get the steamid with the PlayerDataID
Avatar
i think it’s in the API UTILS
12:47 PM
nvm not there
Avatar
GetSteamIDForPlayerID 😍 .....
Avatar
yeah that 😄
12:48 PM
check for nullptr btw
12:48 PM
otherwise it could cause a crash
12:49 PM
AShooterPlayerController* controller = ArkApi::GetApiUtils().FindPlayerFromSteamId(steam_id);
Avatar
sure 😄
Avatar
you can use this to get the controller 😄
12:50 PM
if (controller) { /// } (edited)
12:50 PM
you can check for nullptr like that
Avatar
i prefer a "real" boolean expression -> if (nullptr != controller){/* do stuff*/}
Avatar
its because i develope software for cars which is safety relevant too and there it is not allowed to use the short form (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/12/2019 1:03 PM
In my opinion.. It looks even better with the nullptr inside
Avatar
you guys want a base plugin ? do give me credits tough
3:03 PM
it's a base plugin for classic flyers
Avatar
didn't you post that already ? 😄
Avatar
idk did i?
Avatar
#【🤹】ʀᴇꜰᴇʀᴇɴᴄᴇꜱ
3:04 PM
scroll up a bit
Avatar
anyone here plays apex?
Avatar
most of us i'd assume 😄
5:59 PM
anyone know how to fix this ? https://i.imgur.com/JXxv9EW.png
Avatar
hello everyone, have somewhere i can see how start ? like how get that files.h ? i code befor on vb.net never on c++ and want try do something thanks for the help
Avatar
thanks @WETBATMAN go take a look
Avatar
has anyone had issues with their server not being picked up by https://arkservers.net ?
ARK: Survival Evolved Game servers, community, tutorials, documentation, and more. Find ARK: Survival Evolved servers.
12:12 PM
i switched to a new VPS with a firewall and literally anything else besides that site sees my servers 😄
Avatar
You need to claim it then you can just change your IP whenever I believe
4:27 PM
Not sure what you could do if it's not picked up in the first place though
Avatar
that does not work on that site though
Avatar
they don't support IP swapping
4:28 PM
but the weird part is anything else sees my servers 😄
Avatar
GSH | MrOwlSky 5/13/2019 8:46 PM
Yeah I had issues with that website aswell for VPS
Avatar
hmm
8:48 PM
i captured the traffic with Wireshark and the query gets sent back fine
8:48 PM
so idk what the issue is
Avatar
Do they require pings to work and are you dropping them?
Avatar
i don’t drop icmp
5:08 AM
also idk if they do they never mention it
5:09 AM
but ark-servers.net say they use icmp to identify the server and that site sees all of my servers
Avatar
any ideas on how swapping item X with item Y would be done in the API ? 😄
12:15 PM
want to remove a modded weapon that has no engram
Avatar
@WETBATMAN quick questions adding an extra IP to a dedicated server to host website related things would work out right no draw backs ect?
Avatar
idk tbh
4:48 PM
never used multiple IP's from OVH
Avatar
@Natsu We have a few IP blocks from OVH
5:02 PM
The configuration is interesting since the new blocks won't be in the same subnet as the host's IP, but we've been trying to use the separate IP blocks for everything since if we get another machine or swap to a different one, we can transfer the IP between them, and OVH doesn't let you keep the IP that is given with each server.
Avatar
I don't use ovh 😂 but thank you
Avatar
Honestly, if you're only adding more IPs to separate your web traffic, you could use Cloudflare's free plan and get some caching/CDN out of it as well. They may not be open to the "no DMCA" thing from earlier, though 🙂
5:06 PM
Generally, it's easiest to add IPs from the same block unless your host has some fancy networking stuff set up for you. We just tell ARK to use a specific IP from the block and firewall off the rest
Avatar
Yea I quit ark but I need some kind of we site for future hosting
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 5:50 PM
Hey, is there anyone still having the crash with the Hook_AGameState_DefaultTimer ? Since I was unable to replicate it, I would like to give some of you guys atleast a version for investigating this issue.
Avatar
never had it 😄
5:51 PM
@Sly is the one you should talk to
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 5:51 PM
I already gave him a version for debugging it
Avatar
do you by any chance know which function runs when you equip a weapon like a sword ? 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 5:54 PM
UPrimalItem::EquippedItem maybe (edited)
Avatar
i think i already tried that one 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 5:55 PM
maybe then AShooterPlayerController.ServerEquipToRemoteInventory_Implementation (edited)
5:58 PM
or even AShooterPlayerController::ServerEquipPawnItem_Implementation heh 😄
Avatar
tried that last one
5:58 PM
no success
5:58 PM
actually pretty sure i tried all of the ones you posted 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 5:58 PM
What are you exactly trying to do?
Avatar
there is this broken ass sword from a mod
5:59 PM
it blows up and destroys everything around it, if you hold it for too long
5:59 PM
but the catch is
5:59 PM
it doesn't call either APrimalStructure_TakeDamage or APrimalCharacter_TakeDamage
5:59 PM
there is no engram for it either to disable it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:00 PM
If there is an additional item there must be a blueprint / engram entry for it
Avatar
but there isn't one
6:00 PM
i've crawled through the mod files
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:00 PM
What mod is it?
Avatar
Primal Fear
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:01 PM
and which sword
6:01 PM
Demonic Blade
6:01 PM
or it's called Demonic Sword in game files i think
6:02 PM
it can only be obtained by killing a certain dino so that's why there is no engram
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:03 PM
delete the files from the mod then.. lol.. should work 😄
6:03 PM
done it once with S+.. don't know if Primal Fear would crash if u only remove it
6:04 PM
WeapSword_Oblivion_C
Avatar
yeah but that would have to be done after every update...
6:06 PM
UPrimalItem * Hook_UPrimalInventoryComponent_AddItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer, bool bIgnoreAbsoluteMaxInventory)
6:06 PM
this really long hook runs when you add something to your inventory 😄 (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:06 PM
worked with it already 😄
Avatar
ItemInfo = theItemInfo->CustomItemNameField();
6:06 PM
i need something like that to get item info ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:08 PM
not sure if it contains anything.. would need to check
Avatar
yeah that's why i asked
6:08 PM
tried to log it but getting nothing
6:08 PM
Log::GetLog()->warn("Hook Called"); FString ItemInfo; ItemInfo = theItemInfo->CustomItemNameField(); Log::GetLog()->warn("TheItemInfo : {} ", ItemInfo.ToString());
6:09 PM
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:09 PM
jup.. 😄
Avatar
where is the item info then 😄
6:09 PM
the description is also empty
6:09 PM
unless i'm doing something wrong
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:10 PM
I've also experienced that some fields are just empty.. maybe not even used
6:11 PM
But you're receiving a UPrimalItem* from this func
6:11 PM
maybe copy return value and check then..
6:11 PM
otherwhise you would need to check the Inventory for that certain item and check everytime if its a blocked item or not before inserting
Avatar
what's the other method then ? 😄
6:12 PM
if you check after original do what ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:13 PM
what other method you mean exactly? 😄
Avatar
besides checking if the item is that sword in the hook (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:14 PM
Hook_UPrimalInventoryComponent_AddItem returns a UPrimalItem
6:16 PM
I mean you would first add it.. then remove it.. may be not neccessary but safe way to go
Avatar
does anything after the return original even get executed ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:17 PM
Yea sure
6:17 PM
lol
6:17 PM
I mean you need to do a assignment.. not return original
6:18 PM
you could do like Hook(bla bla) { APrimalItem* item = original(bla bla); // Check if the item is blacklisted or not return item; }
Avatar
i still don't get what you mean 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:20 PM
You got the hook for adding an item to the inventory, right?
Avatar
yea
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:21 PM
Okay, so the original function (same as your hook) returns an Item. Just let the game add that item to the target's inventory and remove it later if its blacklisted
6:21 PM
thats it.. lol
6:22 PM
If you're not able to obtain any data you need from the Hooks parameter
Avatar
but how does one remove it later 😄
6:23 PM
the hook is finished when the item gets transferred no ? (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:25 PM
Yea but u call the original function before removing
6:25 PM
That way you can get the item and call removeitem from inventory again😅
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:27 PM
lol?
Avatar
hmm maybe better to make anti equip
6:29 PM
but anyway how would i read the value after returning the original hook 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:31 PM
In my example I called the original function and later returned its value for parent calls
Avatar
oh
6:32 PM
by original you ment the original return
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:32 PM
Yea 😄
Avatar
return item;
6:33 PM
that's so i can see what the item is ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:33 PM
Jupp
Avatar
okay and then the removeitem is called within this same hook ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:34 PM
If you want to do it that way, then yea 😄
Avatar
what's the other way 😛
Avatar
Log::GetLog()->warn("Hook Called"); UPrimalItem* item = UPrimalInventoryComponent_AddItem_original(_this, theItemInfo, bEquipItem, AddToSlot, bDontStack, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer, bIgnoreAbsoluteMaxInventory); return item; Log::GetLog()->warn("Item Is {}",item.ToString());
6:43 PM
something like that ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:47 PM
Wouldn't work
6:47 PM
after return no code gets executed
6:47 PM
return statement is last everytime
Avatar
UPrimalItem * Hook_UPrimalInventoryComponent_AddItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer, bool bIgnoreAbsoluteMaxInventory) { Log::GetLog()->warn("Hook Called"); UPrimalItem* item = UPrimalInventoryComponent_AddItem_original(_this, theItemInfo, bEquipItem, AddToSlot, bDontStack, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer, bIgnoreAbsoluteMaxInventory); Log::GetLog()->warn("Item Is {}", item.ToString()); return item; }
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:48 PM
looks good 😄 but dunno if UPrimalItem::ToString is existing
Avatar
it's not 😄
6:49 PM
btw just returning item won't break anything ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:49 PM
why should it.. lol
Avatar
or wait lol
6:49 PM
it's the original
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:49 PM
Yea.. its same as returning function
6:49 PM
besides the fact that you need the return value of original function
Avatar
okay now it makes sense 😄
6:50 PM
but any way to convert it into an fstring or string ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 6:52 PM
You could access the item name, which should be a FString
Avatar
it's FName
6:53 PM
itemName = item->GetFullName(); (edited)
6:54 PM
this would work i think
6:54 PM
nvm it totally does not 😄 (edited)
6:58 PM
6:59 PM
output is pretty weird but i think i can work with it 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:08 PM
Yea haha
Avatar
nvm
7:20 PM
it doesn't work 😄
7:20 PM
well it sorta works 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:21 PM
in which way does it not work?
Avatar
PrimalItem_WeaponOblivionSword_C /Engine/Transient.PrimalItem_WeaponOblivionSword_C_49
7:21 PM
the number at the end is random
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:21 PM
Yea it is
Avatar
so like each time you pick up the item it changes
7:21 PM
also that's the general name
7:22 PM
i wouldn't be able to tell a celestial sword from a demonic sword like that
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:22 PM
if(name.Contains("Transient.PrimalItem_WeaponOblivionSword_C"))
Avatar
yea that would work but it would block both swords
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:22 PM
lol? 😄
Avatar
oh lmao
7:23 PM
my bad
7:23 PM
one is called transient
7:23 PM
second valiant
7:23 PM
lmao
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:23 PM
😄
Avatar
hmm
7:24 PM
returning 0 if item is a match doesn't work
7:30 PM
hmm weird
7:31 PM
with item removal the item stays in the inventory
7:31 PM
but i can't do anything with it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:31 PM
try updating player's inventory
7:31 PM
or first try to reconnect
Avatar
damn i have mods on the testserver 😄
7:32 PM
how is the inventory updated ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:32 PM
don't remember exact name.. currently on mobile
Avatar
ah
7:33 PM
it's a function that has to be called ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:33 PM
dont know if it has to be called.. but doing it and test the results isn't a bad idea either 😄 (edited)
Avatar
hmm have to find it first then
7:34 PM
UpdatedItem
7:34 PM
this ?
7:34 PM
nvm probably not
Avatar
relogging fixes it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:45 PM
so only need to update the inventory / item
7:45 PM
try that function you've just mentioned
Avatar
updated item ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:45 PM
jup
Avatar
item->InventoryRefreshCheckItem();
7:45 PM
tried this just now and it didn't work
7:45 PM
so i'll try that one
7:47 PM
nope
7:47 PM
same thing
7:47 PM
gets stuck in my inventory
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/16/2019 7:47 PM
try updating inventory self or even character
7:47 PM
one of them should definitly work
Avatar
is that AActor or inventory ?
7:50 PM
also it gets stuck even with force removal = false 😦
7:55 PM
damn can't fund anything related to updating those
Avatar
@deleted-role Can one of you DM me please?
Avatar
UPrimalItem * Hook_UPrimalInventoryComponent_AddItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer, bool bIgnoreAbsoluteMaxInventory) { //Log::GetLog()->warn("Hook Called"); FItemNetID ItemInfo; ItemInfo = theItemInfo->ItemIDField(); UPrimalItem* item = UPrimalInventoryComponent_AddItem_original(_this, theItemInfo, bEquipItem, AddToSlot, bDontStack, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer, bIgnoreAbsoluteMaxInventory); FString FullName; item->GetFullName(&FullName, nullptr); //Log::GetLog()->warn("Item Is {}", FullName.ToString()); if (FullName.Contains(L"PrimalItem_WeaponOblivionSword_C")) { //Log::GetLog()->warn("Detected Sword!"); FItemNetID itemID; itemID = theItemInfo->ItemIDField(); //Log::GetLog()->warn("Item ID 1 : {} \n Item ID 2 : {}", itemID.ItemID1, itemID.ItemID2); _this->RemoveItem(&itemID, false, false, true, true); } else return item; }
11:53 AM
removing it like this works
11:53 AM
thanks to @Michidu
Avatar
someone know more about Error code: 126 when the PluginManager can not load a plugin ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/19/2019 4:15 PM
Most likely dependency missing
Avatar
do you guys know if you can change the culture langue used by the server so it's different for each player ?
Avatar
@WETBATMAN
Avatar
i think the server language is dependent on the operating system language
10:04 PM
idk if you can change it though (edited)
10:04 PM
for individual players
Avatar
i play on a russian server
10:09 PM
but i dont understand shit
10:09 PM
and owner doesnt want to change
Avatar
you need to get the russian language pack 😄
Avatar
ya i know but still i woulndt udnerstand it
10:10 PM
then 😦
Avatar
what server is that 😛
Avatar
[[RU] ARK NOVA
Avatar
don't you live in the us ?
10:11 PM
Netherlands
Avatar
ah
10:11 PM
don't think you can change it client side 😄
Avatar
ya kinda sucks ass lol
Avatar
Rogue Leader 5/22/2019 1:29 PM
@Michidu has anyone reported that the isAdmin() function from permissions isn't working with mysql?
1:30 PM
I have a group that has their permissions plugin using mysql now and my plugin isn't able to use isAdmin() to tell if they are an admin anymore
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/22/2019 1:31 PM
what does isAdmin have todo with permissions? lol (edited)
Avatar
yea isadmin is a local WC function lol
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/22/2019 1:51 PM
What is WC? lol
Avatar
how can i be getting error 1114 when i commented out everything in my load function 😄
1:52 PM
WC = Wildcard btw
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/22/2019 1:52 PM
lmao
1:52 PM
yea its from APlayerController if im not wrong
1:52 PM
and this function doesnt work?
Avatar
how the fuck can i be getting error 1114
1:53 PM
there is literally nothing in my load function
1:53 PM
wtf
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/22/2019 1:54 PM
Wouldn't be bad to show the exact code you're having problems with 😄
Avatar
that fucntion only checks if you enabled cheat commands
2:52 PM
nothing more nothing less
Avatar
Rogue Leader 5/22/2019 3:01 PM
My mistake, I have a function that I named bool IsAdmin(uint64 steam_id){ return Permissions::IsPlayerInGroup(steam_id, "Admins"); } (edited)
3:03 PM
Was working, fine when owners used sqlite with permissions. Now it's broken when they use mysql
3:04 PM
Was trying to recall it from memory, and my terrible memory thought permissions had a built in admin check function (edited)
Avatar
Rogue Leader 5/22/2019 3:12 PM
They are using V1.5
Avatar
okay i'm speechless 😄
3:17 PM
i have nothing in my plugin's load functions
3:17 PM
and it's refusing to load
3:17 PM
void Load() { //Log::Get().Init("Suicide"); /*try { ReadConfig(); } catch (const std::exception& error) { Log::GetLog()->error(error.what()); throw; } try { ArkApi::GetCommands().AddChatCommand("/suicide", &SuicideCMD); ArkApi::GetCommands().AddConsoleCommand("Suicide.Reload", &ReloadConfig); ArkApi::GetCommands().AddRconCommand("Suicide.Reload", &ReloadConfigRcon); } catch (const std::exception& error) { Log::GetLog()->error(error.what()); throw; }*/ }
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/22/2019 3:17 PM
have you tried turning it off and back on again?
Avatar
unfortunately yea 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/22/2019 3:17 PM
Avatar
@Rogue Leader Are you sure they're in the Admins group? I thought it was supposed to include everyone in the base-game's allowed cheaters file, but I've always had to add our Admins to that group manually (when using either sqlite or mysql) or they don't get the permissions they should.
Avatar
Rogue Leader 5/22/2019 6:59 PM
From my own testing, I was added to the group as soon as I enabled admin cheats for myself. The group that is reporting the error confirmed they are indeed in the group, but my function is still returning false for them. They compared it to their admin whitelists and the db only had half of them listed as admins as well.
Avatar
AttackerShooterController->GetPlayerCharacter()->IsFalling()
9:38 PM
any ideas why checking for IsFalling causes the server to crash ? 😄
Avatar
Is AttackerShooterController or AttackerShooterController->GetPlayerController() null?
Avatar
nope (edited)
Avatar
anyone know how to work with a function that takes TSubclassOf as one of the arguments ?
8:40 PM
HasBuff in particular 😄
8:46 PM
TSubclassOf<AActor> dinoSubclass = APrimalDinoCharacter::GetPrivateStaticClass(); something like that
Avatar
if (character != nullptr && character && character->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) { APrimalDinoCharacter* dino = static_cast<APrimalDinoCharacter*>(character); FString descr; FString result; dino->GetDebugInfoString(&result); dino->GetDinoDescriptiveName(&descr); TSubclassOf <APrimalBuff> buff; dino->HasBuff(buff,false); Log::GetLog()->warn(descr.ToString()); //Log::GetLog()->warn(result.ToString()); if (descr.Contains(L"Mek")) return 0; }
8:46 PM
TSubclassOf <APrimalBuff> buff;
8:47 PM
i already did this but i'm unable to extract the info i actually need from it 😄
8:48 PM
i want to check if the mek has this buff = Buff_MekBackpack_SiegeCannon_C_0
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 8:49 PM
how about GetAllBuffs ?
Avatar
hmm
8:49 PM
Tarray
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 8:50 PM
Shouldn't be a problem
8:50 PM
thats exactly what the hasBuff func does internally (edited)
8:50 PM
you probably won't be able to obtain buffs added by mods with the HasBuff func
Avatar
it's a stock buff
8:51 PM
it's kinda retarded idk why attaching a rocket launcher to a mek adds a buff 😄 (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 8:52 PM
probably because they can easly change keybindings this way
Avatar
TArray <APrimalBuff> buff; dino->GetAllBuffs(buff);
8:52 PM
do it like that ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 8:53 PM
You probably want a TArray consisting out of pointers
8:53 PM
but yea.. exactly by that
8:56 PM
btw; why not check the inventory of the mek
8:56 PM
if he has it installed as a module
Avatar
didn't think of that 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 8:57 PM
There are multiple ways to do it
Avatar
stumbled upon this
8:57 PM
dino->GetDebugInfoString(&result);
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 8:57 PM
so keep on track the one you'd like the most (edited)
Avatar
which printed the buffs
8:58 PM
and i found out that the module it had attached added the corresponding buff
8:58 PM
so i went with that
8:58 PM
how is the inventory even checked 😛
8:59 PM
MyInventoryComponentField
8:59 PM
this ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 9:00 PM
dino->GetDebugInfoString(&result); also uses the internal stored list from ACharacter btw 😄
9:00 PM
Jup.. and then EquippedItemsField
Avatar
TArray <UPrimalItem*> buff; buff = dino->MyInventoryComponentField()->EquippedItemsField();
9:18 PM
something like that ? 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 9:19 PM
Jup
Avatar
any way to log this ?
9:20 PM
Log::GetLog()->warn(buff.GetData());
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/25/2019 9:21 PM
Sure.. its just a TArray out of UPrimalItem*
Avatar
cant get it to print 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/26/2019 11:43 AM
How do you try to print it?
Avatar
nvm got rid of that plugin 😛
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/26/2019 11:44 AM
okay 😄
Avatar
does anyone know how much the ark devkit takes up once it's fully installed and unpacked ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/26/2019 11:45 AM
Avatar
so they weren't lying about 200gb 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/26/2019 11:46 AM
Jep 😄
Avatar
rip lol this is gonna take like a day for me to download
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/26/2019 11:46 AM
what bandwidth do you got?
Avatar
it's downloading at 3 mbps
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/26/2019 11:47 AM
lol
11:47 AM
not even actually 😛
11:47 AM
oh boi this shit won't even fit on my ssd
11:47 AM
the load times are gonna be insane on my hdd
Avatar
Medicalmischief 5/27/2019 9:29 AM
is there any way to force an alliance? my server has 3 alliances of 2 but only 2 work, the 3rd one only sticks if one of the tribes doesn't have any, then hops on to be the 3rd for one tribe...
Avatar
i think you can do that with admin commands @Medicalmischief not quite sure
Avatar
Medicalmischief 5/27/2019 4:29 PM
Only found force join tribe and force tribe admin and owner, nothing with tribes
Avatar
anyone possibly know why github could be freezing in the middle of uploading a VS project ? 😄
7:40 PM
been trying to upload the source code of my suicide plugin for like 3 days lol
Avatar
Rogue Leader 5/30/2019 7:56 PM
Are there any large files? Do you have a bunch of commits in your history where binaries like .exes or .dlls were updated?
7:57 PM
I've seen sometimes where .cpp files are treated like binary files if the file encoding is VS default.
7:59 PM
If you don't care about your commit history, create an empty repo locally, copy over all non binary files from the original repo (do not include .git, .vs, or any bin or obj folders), commit, and upload it as a new repo
Avatar
nop just dll files
8:00 PM
and i'm not uploading the .vs folder
8:00 PM
it gets stuck on .obj files
Avatar
Rogue Leader 5/30/2019 8:00 PM
dll files should not be in your repo when using as source control (edited)
8:00 PM
Neither should .obj files
8:00 PM
Only text files should be in a git repo (edited)
Avatar
so just not upload them ? 😄
Avatar
Rogue Leader 5/30/2019 8:03 PM
No, only upload your .sln, .cpp, .h, and .vcxproj files
8:03 PM
Or .c
8:03 PM
Only text files regardless
8:05 PM
It can seem convenient to upload exes, libs, and dlls but since they are binary files, git tracks each change to them by adding the entire file to the repo again when it's updated since it can't track line by line changes. Lots of changes over time to those types of files will make your git repo really big due to history of changes, vs the actual size of the files (edited)
8:06 PM
They are also known as binary blobs
8:06 PM
^ anything that can't be read as typical text files
8:06 PM
Which is what git is made to track changes in, text files. (edited)
Avatar
ah makes sense
8:07 PM
thanks
8:07 PM
is there a way to make VS automatically clear that out or does that have to be done manually each time ?
Avatar
You may want to create a .gitignore file, set it up to ignore several file types, and commit that
👌 1
Avatar
Rogue Leader 5/30/2019 8:08 PM
One of my plugins source has a good default .gitignore. let me look
Avatar
i assume that's done with GitHub desktop ?
Avatar
Not sure if it has options to help you (like generating a decent default), but it's mostly about adding the file and committing it. (edited)
Avatar
Rogue Leader 5/30/2019 8:09 PM
Just create a file named ".gitignore"
8:10 PM
Here's my npp gitignore
8:10 PM
\.vs/ \x64/ x64/Release/ *.dll *.aps \.h *.rc *.user
8:11 PM
Contribute to barnwellrd/Dino-Passive-Protection development by creating an account on GitHub.
8:11 PM
It's the default .gitignore for VS initialized repos
Avatar
just throw that into the root of the project ?
Avatar
If you leave the leading slash off and keep the trailing slashes for directories (eg 'x64/') it'll ignore all folders named "x64" anywhere and all sub contents, so you could simplify that even a bit more
Avatar
Rogue Leader 5/30/2019 8:12 PM
Correct same level as the .git folder
Avatar
If you leave the leading slash off, it won't require it to be in the same level as the .git folder
Avatar
i don't even have a . git folder 😄 (edited)
Avatar
That's what I meant
8:13 PM
You do. It's hidden by default
Avatar
Rogue Leader 5/30/2019 8:13 PM
^
Avatar
nah i was uploading with the site
8:13 PM
not desktop (edited)
Avatar
Rogue Leader 5/30/2019 8:14 PM
That's not how you git :P
8:14 PM
I highly recommend using a program like GitKraken unless you absolutely love the command line terminal
Avatar
github desktop ? 😄
Avatar
Rogue Leader 5/30/2019 8:15 PM
Github desktop is a clunky tool
Avatar
i've noticed 😛
Avatar
I'll have to give GitKraken a try. I've gotten used to command line, but it seems nice
Avatar
well thank you you've been really helpful 😄
Avatar
Rogue Leader 5/30/2019 8:16 PM
Github desktop and bash are like trying to use a screw driver when you could use a drill instead
8:17 PM
I've been using it for two years and recommend it to everyone I teach git to
Avatar
I'm used to IntelliJ (I do java & web development for a living), so it's normally either command line or the IDE's built in stuff if they're decent.
Avatar
Rogue Leader 5/30/2019 8:18 PM
VS2017 Pro and Enterprise have a decent UI for interacting with source control repos, but community doesn't have it
8:18 PM
GitKraken still trumps them though. It turns most all the commands into nice gui components and displays (edited)
Avatar
What all is locked behind the paid version? Just the merge tools?
Avatar
Rogue Leader 5/30/2019 8:20 PM
Makes branching and history tracking easier, makes staging changes easier with large amounts of changes, has a built in diff that works well, can stash and track stashes easily. Makes merging and resolving conflicts painless
8:20 PM
Paid version is for commercial use and has something called Glo? (edited)
8:21 PM
It's like a Kanban board or something for teams
8:21 PM
It has a free trial but I've never touched it
Avatar
Interesting
Avatar
Rogue Leader 5/30/2019 8:22 PM
You can add your github account to GitKraken and pull your repos down easily too
Avatar
Hmm... I'll have to give it a try. Thanks
Avatar
Rogue Leader 5/30/2019 8:24 PM
In this post I present a Git branching strategy for developing and releasing software as I’ve used it in many of my projects, and which has turned out to be very successful.
8:25 PM
On small projects, it's not really important, mostly useful working with teams, but even working alone it can help you avoid headaches with adding broken commits on your master branch without having to rollback commits
8:26 PM
I run a master branch, and branch off of it when I add features until they are stable then merge it back into master
8:27 PM
My master branch is technically always ready to deploy or build a release off of.
Avatar
@WETBATMAN No matter how you handle branching (or at all), you'll get the most use out of git if you commit often. It's far easier to go back when you realize you've broken everything and just want to go back to something working 🙂
Avatar
Rogue Leader 5/30/2019 8:31 PM
^ but it's much more efficient to branch off at a stable point and then you only have to discard the branch if it flops. And you can still review the branch to keep any changes while making another branch until you discard it
8:32 PM
But he's right, commit often and keep changes small and specific with each commit
8:32 PM
As in don't modify dozens of lines across multiple files and then commit.
8:33 PM
Each commit should have a simple, logical change
8:34 PM
If you stick to that, your commit history will tell a nice pretty story about how your program has changed over time without having to dig into the changes themself (edited)
8:36 PM
And here's an article that touches a bit on why not to commit binary blobs: https://robinwinslow.uk/2013/06/11/dont-ever-commit-binary-files-to-git/ (edited)
Why you shouldn't commit binary files to a distributed version control system - and how you can remove them completely if you do.
Avatar
I tend to follow OneFlow for most things (the thing you'd linked with no develop branch, and the master branch in its place), as a more complicated branching strategy starts to matter more with team size and complexity.
Avatar
Rogue Leader 5/30/2019 8:36 PM
I only use master and feature/release branches on personal work
Avatar
good point @Zachar543 😄 (edited)
Avatar
Rogue Leader 5/30/2019 8:37 PM
And I have a modifiable version of git flow for teams depending on how the team worked prior
8:39 PM
My current project is migrating teams from TFVC to Azure Repos (git based). So we spend a lot of time modifying branching strategies to team specific needs
8:39 PM
And there's currently a lot of debate internally on making changes to the master branch prior to testing for production.
Avatar
Dealing with similar things at my work. Deployment and the required steps leading up to it have been a fun topic recently
Avatar
Rogue Leader 5/30/2019 8:42 PM
Our devops overlords only want our quality Gates to run off of master, which makes sense when working the problem backwards, but I argue that all the quality Gates should be passed before you get to master, and the code in master would then maintain an always production deployable status without having to juggle rollbacks on it (edited)
Avatar
We haven't gotten to this point yet, but some of the CI/CD plans involve the merge to master triggering the production deploy, so we'd need all the gates before then to enable that.
Avatar
Rogue Leader 5/30/2019 8:45 PM
Depending on the platform for CI/CD that you're using, you can have your quality Gates on the pull request to master
8:46 PM
I have mine set up so that the QGs and builds have to actually pass to even allow a PR to be completed into my dev branch.
8:46 PM
And the same is on master, though it's redundant at that point
Avatar
Out of interest, how many developers?
Avatar
Rogue Leader 5/30/2019 8:47 PM
My team is a dozen, but thousands company wide are migrating to the new platform (edited)
8:48 PM
They fucked up too, they set a September deadline without finishing the migration and policy groundwork, so now it's a clusterfuck of policy changing weekly/monthly
Avatar
Yeah... we've had some fun with not getting it right the first time.
Avatar
Rogue Leader 5/30/2019 8:49 PM
Lol what platform are you using for source control storage and CI/CD?
Avatar
There's been a fairly dramatic shift in technologies over the last 2 years. We used to use SVN primarily, but nearly everything has been moved to git. Teams are starting to move to more cloud-focused platforms, but CI/CD is the direction and we're no where near that yet.
8:54 PM
The deployment process is awful at the moment. Several approval steps that add little value and artificial delays, so changes often pile up into massive (and risky) deploys. So... people are understandably excited about switching things up lol (edited)
Avatar
Rogue Leader 5/30/2019 8:55 PM
How big is the company developer pool?
Avatar
200-300. It's very lean for the size of the company (>$10B)
8:57 PM
That is what we are using. Azure DevOps has some really nice options for CI/CD and repo management. It can be integrated with Visual Studio as well
8:58 PM
Fancy backlogs and test plans too
8:59 PM
I've only worked with Microsoft languages and java on it, so idk what else it supports
Avatar
We're primarily a java shop at the moment (outside of web frameworks). Sadly, I don't have a lot of say into what we end up using, but those that do generally like to stay away from being locked to specific vendors and I'm not sure we do much with Azure right now (edited)
Avatar
Rogue Leader 5/30/2019 9:02 PM
ADO can function without the rest of Azure services, but it integrates nicely with it
9:03 PM
Jenkins looks like a nice option for Java and it looks free and open sourced. Never used it though
Avatar
It's pretty good and is pretty flexible. Pipeline builds within Jenkins are decent as well.
9:07 PM
If I had to guess, Jenkins with some cleaver pipeline builds is likely where it'll go initially.
Avatar
Rogue Leader 5/30/2019 9:08 PM
That doesn't seem like a bad option, you'd just be limited to servers on premise
9:09 PM
cloud based is nice for the SLAs and lack of hardware maintenance
Avatar
We'll see where it goes, but it's still very fluid at the moment
9:13 PM
On another note, has anyone messed with running ARK within a Windows container?
Avatar
Though I probably wouldn't run my main servers that way, there's a few theories/ideas I'd like to test (edited)
Avatar
Rogue Leader 5/30/2019 9:59 PM
Just ran a SonarQube Analysis on my NPP to see how it looked:
10:00 PM
99% of the Bugs and code smells are in the sqlite and json files
10:00 PM
Avatar
I have hooked APrimalCharacter_TakeDamage In the hook I have next code: if(_this && _this->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) { log << "Hit to dino" // Do something with dinos } else if(_this && _this->IsA(AShooterCharacter::GetPrivateStaticClass()) { log << "Hit to player" // Do something with players } When I attack dino I have called both methods and see in the logs Hit to dino Hit to player Does anyone know what is this?
Avatar
Are you punching the dino where it hurts your player as well?
Avatar
Rogue Leader 5/31/2019 2:48 AM
Try checking for AShooterPlayerController. Maybe the dino is both a dinocharacter and shootercharacter class (edited)
2:50 AM
Or what Zach said, perhaps there's some empty box where the player goes that transfers damage to the dino if hit?
2:51 AM
Idk, I was having weird issues with APrimalCharacter_Die hook the other day where it would never catch a player dying, only dinos
Avatar
I have the same TargetingTeamField value for damager and target when i attack dino (I am attacking myself...). I am attacking dino by hand, maybe I also take damage
Avatar
Rogue Leader 5/31/2019 1:26 PM
That's probably it
1:26 PM
I forgot punching also caused damage to the player
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/4/2019 8:56 AM
Yea but also the function must be triggered twice, since you got “if else if”
Avatar
jeppekroezen 6/4/2019 11:29 AM
can somebody give me a link to learn to make a automatic backup of a certain folder with all stuff in it? if its possible i like the way ASM uses his backup. every backup is there in a separate folder with the current date/time and packed in Winrar. is this possible to do as a noob in scripting ?
Avatar
Rogue Leader 6/4/2019 1:37 PM
You could probably write a batch file or PowerShell script
1:37 PM
And set it up to run in the scheduler
1:38 PM
Check out the scheduling for ASM and it'll give you a good idea on how they do it
Avatar
jeppekroezen 6/4/2019 2:17 PM
Thanks
Avatar
GSH | MrOwlSky 6/5/2019 7:25 PM
Anyone been having issues with Permissions after latest Atlas Update?
7:25 PM
7:25 PM
7:26 PM
Permissions.remove not working anymore for some reason. (edited)
Avatar
jeppekroezen 6/6/2019 11:23 PM
hi guys,
11:23 PM
so im trying on that backupscript
11:23 PM
it worls but i cant stand the error.
11:23 PM
F:\BackupTest\RAWDATA : The term 'F:\BackupTest\RAWDATA' is not recognized as the name of a cmdlet, function, script file, or operable program. Check th e spelling of the name, or if a path was included, verify that the path is correct and try again. At line:2 char:19 + $backuplocation = F:\BackupTest\RAWDATA + ~~~~~ + CategoryInfo : ObjectNotFound: (F:\BackupTest\RAWDATA:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
11:23 PM
how do i solve>
11:23 PM
or can i delete this line out of the script
Avatar
Where is it located?
11:24 PM
In your F drive?
Avatar
jeppekroezen 6/6/2019 11:24 PM
the folder path is correct
11:25 PM
the file that i want to be copied is not in the F
Avatar
You need to point it to the file you want copied
11:26 PM
F is a default value you must set yourself
Avatar
jeppekroezen 6/6/2019 11:26 PM
but this is the descreption by the rule
11:26 PM
# Sets the location to copy the raw saved files to.
11:26 PM
i put the F there
11:27 PM
-----
11:27 PM
$backuptime = Get-Date -Format "d-M-yyyy-(HH.mm)" $backuplocation = F:\BackupTest\RAWDATA $arksavefolder = "C:\Users\server-pc\AppData\Roaming\Avorion\galaxies" Copy-Item $arksavefolder "$backuplocation\Saved" -Recurse [Reflection.Assembly]::LoadWithPartialName( "System.IO.Compression.FileSystem" ) $destfile = "F:\BackupTest$backuptime-AvorionBackUp.zip" $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal $includebasedir = $false [System.IO.Compression.ZipFile]::CreateFromDirectory("$backuplocation",$destfile,$compressionLevel, $includebasedir ) Remove-Item "$backuplocation\Saved" -Recurse
Avatar
Try to switch the \ to F:/BackupTest/RAWDATA
Avatar
jeppekroezen 6/6/2019 11:29 PM
nope still the same error
Avatar
@jeppekroezen try: $backuplocation = "C:\Backup\Temp\" (edited)
8:10 AM
it should work
Avatar
is the F: disk an network share btw? (edited)
8:34 AM
then you need to tell the script to use it basically: net use X: \\SERVERHOSTNAME\NETWORKFOLDER
Avatar
jeppekroezen 6/7/2019 11:13 AM
No its just a folder on a harddribe
Avatar
@jeppekroezen that script worked fine try backuping the file to C first and see what it does
Avatar
@WoolyPenguin looks good but i can see a lot of unfair deaths also 😄 anyway you should post this on playark reddit hopefully one of the devs will see it
Avatar
impressiv result so far
Avatar
WoolyPenguin 6/8/2019 12:06 PM
@Natsu, how would it be unfair deaths? (edited)
12:06 PM
cause it detects 100% correctly.
12:06 PM
u don't fall into the mesh and c4/rocket structures 😉
Avatar
because its ark 😄
Avatar
WoolyPenguin 6/8/2019 12:07 PM
that doesnt explain it 😛
12:07 PM
hos is it unfair deaths?
Avatar
i know neither does ark 😄
12:07 PM
because some times
12:07 PM
you get teleported up in ark when you login
Avatar
WoolyPenguin 6/8/2019 12:08 PM
and that would do what?
12:08 PM
nothing with my plugin :p
Avatar
you know bugs like that you never know unless tested a lot
Avatar
WoolyPenguin 6/8/2019 12:08 PM
detection still requires actual action vs structure
Avatar
that isn't a reason to not make something like this 😄
Avatar
not saying reason
12:09 PM
saying unfair deaths meaning it must be really good otherwise its fucked up
Avatar
if it is not 100% you still can use it for logging ??
Avatar
anything made by wooly is always 100% 😉
👍 1
Avatar
hello everyone, iam trying find a way to unbuild heavys or turrets everywhere, but cant understand that hooker stuff, iam new on that, have somewhere like a tuto about that ? thanks
Avatar
Anyone have contact to OwnProx?
5:21 PM
I've been trying to get my Advanced Chat copy but he hasn't been replying
Avatar
if he doesn’t reply on discord he’s away
Avatar
jeppekroezen 6/13/2019 10:02 PM
Hi peeps. I have a question. I want to make my avorion server auto restart. Can i make a batchfile that checks if its online and if not it starts. So i can make a command execute true rcon ? But how can i auto command true Rcon
Avatar
Did anyone try to hook take resources by a player? (trees, etc) GiveItem doesn't work, it isn't triggered (edited)
Avatar
Sup, looks like i need to add more structs to the game internals. Is there some magical tool that generates this for me or am i hand rolling all of it?
5:44 PM
i.e. i specifically need FHarvestResourceEntry and UPrimalHarvestingComponent right now and likely some more. this is for Atlas BTW
Avatar
@DevCPP off the top of my head there is a a function for it specifically and ends up going through additem
9:00 PM
Something to do with damage types...
Avatar
@antihax damage type of what entity type?
12:47 AM
Avatar
Let me go look
12:47 AM
idk about ark
Avatar
GiveHarvestResource is that needed, I think, but this structure is not defined in ArkApi (edited)
Avatar
Could be, i am trying to figure out how to add those, but spending too much time playing 😛
12:54 AM
?ApplyHarvestDamageEntryDamage@FAttachedInstancedHarvestingElement@@QEAAXAEBUFDamageHarvestingEntry@@_NPEAVUPrimalInventoryComponent@@MAEBUFDamageEvent@@PEAVAController@@PEAVAActor@@PEAV?$TArray@UFHarvestResourceEntry@@VFDefaultAllocator@@@@@Z maybe
12:54 AM
So much trash in the namespace
Avatar
I am using the IDA software to work with .pdb file, I have the signature of this function and many other... But I haven't the types declaration, so I can't hook them
Avatar
im using Ghidra
Avatar
FAttachedInstancedHarvestingElement also is not defined in the Api (edited)
Avatar
it is calling AddItem from GiveHarvestResource
12:57 AM
checking if it is a tame or player, if harvesting is disabled, etc. so i think you are correct
Avatar
Yes, I hooked it. But AddItem aslo called if you just pickup these resources. I don't know how to distinguish these cases
Avatar
Harvesting is likely also
12:58 AM
ahh i remember why i rememberd damage type now void __thiscall GiveHarvestResource(UPrimalHarvestingComponent *this,UPrimalInventoryComponent *param_1, float param_2,TSubclassOf<class_UDamageType> param_3,AActor *param_4, TArray<struct_FHarvestResourceEntry,class_FDefaultAllocator> *param_5) (edited)
12:59 AM
it's in the function call there
12:59 AM
You could with this, figure out how to hook that function, no?
Avatar
What looks struct_FHarvestResourceEntry and UPrimalHarvestingComponent ? I can't get structure's (class's) declarations
Avatar
you may not need them all, just this one
1:01 AM
it looks like UPrimalHarvestingComponent::GiveHarvestResource
1:01 AM
also this is atlas, not ark
Avatar
struct UPrimalHarvestingComponent { }; struct FHarvestResourceEntry { }; DECLARE_HOOK(UPrimalHarvestingComponent_GiveHarvestResource, void, UPrimalHarvestingComponent*, UPrimalInventoryComponent*, float, TSubclassOf<UDamageType>, AActor*, TArray<FHarvestResourceEntry, FDefaultAllocator>*); void Hook_UPrimalHarvestingComponent_GiveHarvestResource(UPrimalHarvestingComponent* _this, UPrimalInventoryComponent* invComp, float AdditionalEffectiveness, TSubclassOf<UDamageType> DamageTypeClass, AActor* ToActor, TArray<FHarvestResourceEntry, FDefaultAllocator>* HarvestResourceEntryOverrides) { Utils::DebugLog("Hook_UPrimalHarvestingComponent_GiveHarvestResource: Was called"); UPrimalHarvestingComponent_GiveHarvestResource_original(_this, invComp, AdditionalEffectiveness, DamageTypeClass, ToActor, HarvestResourceEntryOverrides); } It is the same as atlas. Stacktrace on screenshot above from Ark
1:03 AM
ArkApi::GetHooks().SetHook("UPrimalHarvestingComponent.GiveHarvestResource", &Hook_UPrimalHarvestingComponent_GiveHarvestResource, &UPrimalHarvestingComponent_GiveHarvestResource_original);
1:03 AM
Its doesn't work
Avatar
do you need UPrimalHarvestingComponent* at the beginning there?
1:04 AM
i guess that is this
1:05 AM
yeah, ok i see it there
1:05 AM
damn 😦
Avatar
Its required
Avatar
do you need to declare it in config.json?
Avatar
What do you mean?
1:07 AM
I need to modify harvest amount for particular players
Avatar
unless i am mistaken, there is a config.json with version.dll
1:08 AM
{ "settings":{ "AutomaticPluginReloading":false, "AutomaticPluginReloadSeconds":5, "SaveWorldBeforePluginReload":true }, "structures":[ "UWorld", "AController", "AShooterPlayerController", "APlayerController", "UCheatManager", "UShooterCheatManager", ...
1:08 AM
you may need to put UHarvestableResource in there... im not sure though, still trying to figure all this out
Avatar
Hm... yes, maybe so
Avatar
@deleted-role am I missing something preventing me.from seeing the coding channels?
Avatar
yes
8:15 PM
a role 😄
Avatar
Well, ok then :3
Avatar
Medicalmischief 6/20/2019 9:44 PM
Any ideas what would cause this?
Avatar
sharing sqlite across multiple servers ?
9:46 PM
@Medicalmischief
Avatar
Medicalmischief 6/20/2019 9:49 PM
Maybe?
Avatar
either enable WAL mode on the db file or better yet
9:49 PM
switch to mysql
Avatar
Medicalmischief 6/20/2019 9:49 PM
Thought I had it throu mysql but... I might not
9:49 PM
How do I enable WAL
Avatar
that’s clearly an sqlite error heh
9:49 PM
with a db editor
Avatar
Medicalmischief 6/20/2019 9:50 PM
Navicat?
Avatar
that’s a mysql editor
9:50 PM
you want to use sqlite or mysql ?
Avatar
Medicalmischief 6/20/2019 9:50 PM
This SQL shit has been the biggest headache for me
Avatar
lol
Avatar
Medicalmischief 6/20/2019 9:51 PM
Lite I guess so I dont lose the db and piss everyone off...?
Avatar
yeah but didn’t you say you had mysql ?
9:51 PM
anyway for sqlite download a program called (edited)
9:51 PM
db viewer sqlite
9:52 PM
and open your arkshop db file in it
9:52 PM
then find WAL mode and toggle it
Avatar
Medicalmischief 6/20/2019 9:52 PM
Yeah I do have a mysql running
Avatar
mysql is better
9:52 PM
btw
Avatar
Medicalmischief 6/20/2019 9:53 PM
Can I copy the db from lite to mysql
Avatar
yeah but you need to convert it
9:54 PM
throw your db file in here i'll convert it
Avatar
Medicalmischief 6/20/2019 9:56 PM
I'll send it to you tonight when I get home... :/ I'm workin
Avatar
it's 11:56 PM here rn so I'll probably be asleep heh
9:57 PM
I found this Perl script while migrating my SQLite database to mysql I was wondering (since I don't know Perl) how could one rewrite this in Python? Bonus points for the shortest (code) answer :)...
9:57 PM
that's a python script for converting the database
Avatar
Medicalmischief 6/20/2019 9:57 PM
K, 10 hours difference lol
Avatar
heh
Avatar
Medicalmischief 6/20/2019 9:58 PM
All this time I thought you was from georgia lol
Avatar
i am
9:58 PM
the country georgia
9:58 PM
not the state heh
9:59 PM
google tbilisi lol
Avatar
Medicalmischief 6/20/2019 10:01 PM
I did lol I was mind blown
Avatar
Anyone know why my permissions plugin isnt adding new players to default role automatically?
Avatar
mysql ?
Avatar
you fucked up importing the db most likely 😃
7:54 PM
cause permissions doesn’t add people to the default group
7:54 PM
the database manager does
7:54 PM
mysql in this case
8:09 PM
Whats this?
8:12 PM
@WETBATMAN
Avatar
can’t see on the phone
8:13 PM
but you have some mysql issue
Avatar
can’t see on the pc but you have some mysql issue
Avatar
Little Bobby Tables maybe?
Avatar
Avatar
how do i get the permission to publish plugins at the arkserverapi forum ?
Avatar
submit it as a resource
Avatar
Hello, I'm looking for a few tutorials I can walk through on plugin development, but it seems you need to request access to view those channels. Is anyone around that can grant access to those and/or how do I need to go about getting access to them?
Avatar
Rogue Leader 6/24/2019 1:44 PM
There you go @Rezalas. There aren't many tutorials though. The best way to learn is to check out the wiki and check out the open source plugins.
1:44 PM
And of course, you can always ask questions here. There's almost always someone who can answer
Avatar
Thank you, I started last night and made it past a bunch of compilation errors on an fnp so I'm looking forward to going through what tuts there are tonight. I'm a c# dev normally and havent written c++ since 99 so I can use the examples!
Avatar
Not sure the best channel to post this on but if anyone wants to help us with the ArkBot it would be greatly appreciated.
Avatar
Rogue Leader 6/25/2019 2:08 AM
What are you guys doing?
Avatar
Development is pretty much stalled but there are a few critical things that needs doing on that and a long wishlist of things that would make it easier to keep it up to date
2:14 AM
Interested parties, join us on #deleted-channel ... I'm willing to pay (small) bounties for completed tasks so it wouldn't be completely free development.
Avatar
jakkapan11123 6/26/2019 7:35 PM
how can I create my plugin? what program should I use?
Avatar
Rogue Leader 6/26/2019 7:37 PM
Visual studio community and there's a wiki on the api site with basic examples. You can also learn from following examples on others source code (edited)
Avatar
anyone fixed the idiot s+ duplicate things ?
7:55 PM
Avatar
Not that i know of @Natsu
Avatar
@Foppa thanks since when did PrimalGameDataOverrideField and PrimalGameDataField change?
Avatar
Hmm, no clue there either. Maybe when they released this patch: v296.101 - May 14, 2019
9:37 PM
How has it changed?
Avatar
primalglobals->PrimalGameDataOverrideField()
9:38 PM
cannot find it anymore
9:38 PM
it was under struct UPrimalGlobals : UObject
9:38 PM
same goes for primalglobals->PrimalGameDataField()
9:39 PM
Cross Server Chat support for ARK Survival Evolved servers. - ark-mod/ArkCrossServerChat
9:39 PM
***auto engine = Globals::GEngine()(); auto primalglobals = engine->GameSingletonField()(); auto gamedata = primalglobals->PrimalGameDataOverrideField()(); if (!gamedata) gamedata = primalglobals->PrimalGameDataField()(); auto texture = gamedata->NameTagServerAdminField()(); if (texture) iconTexture = gamedata->NameTagServerAdminField()();
Avatar
oh, that's most likely a long time ago, All those plugins needs an update. They are built on pretty early API Build.
Avatar
i know i dont use the pulgin
9:41 PM
i only use that part of the code for my plugin
9:41 PM
for some chat handeling but i dont know what i need to change it to
Avatar
hang on
9:41 PM
checking my self too
9:42 PM
Do you have the: ArkPluginLibrary.lib?
Avatar
it’s on tsebrings github
Avatar
yea it was all working before i think it did change indeed in 2.9 i never have to update this plugin 😄
9:47 PM
any idea guys?
Avatar
UPrimalGlobals.PrimalGameDataOverride
9:48 PM
UPrimalGameData * PrimalGameDataOverrideField()
9:48 PM
Maybe that could work
Avatar
so help me a little here i barely did anything with the chat system
Avatar
Found that in GameMode.h
Avatar
same herer @Foppa i just dont know how to use it lol
9:54 PM
nvm
9:54 PM
i think i dont even use it 🤦
Avatar
Oh the fun of "works on my machine" days.
10:55 PM
I built a basic plugin that doesn't do anything really, just logs chat to the console. It loads properly on my dev machine but when I copy the DLL to my test server during load I get Error code: 126
10:56 PM
Looking into the chat history here it appears that's common when you're missing a dependency, though my code is so basic I don't believe I have any to speak of that I could be missing.
10:58 PM
On build it's only generating a single DLL (which makes sense for what I've got - load,unload, dllmain, and a generated hook). Do I need to copy something else with it?
10:59 PM
Also I'm working on an Atlas plugin if that matters at all for context.
Avatar
Do you have anything under Linker -> Input -> Delay Loaded DLLs
Avatar
No I don't
Avatar
Are you compiling with the right configurations? Debug/release ?
Avatar
I'm compiling in debug, x64
Avatar
I usually don't, think you need some other MVS dlls
11:06 PM
Than the API is providing
Avatar
Okay, I'll go over my project config again using the doc. I hadn't tried doing it in release mode before, and it doesn't build if I change to release mode :/
Avatar
Okay building in release successfully now, still dropping just the one DLL. I'll give a few things a try based on that. Thanks so far @Foppa
Avatar
No worries 😃 Good luck, let me know if you need some more help
Avatar
Jokes on me, that worked perfectly! Thanks @Foppa !
11:40 PM
Anyone know one or two about raid control expansion cards if they are bottlenecked by the CPU ? (i believe so since they are placed on the PCI Express slot) Just want my theory confirmed 😃
Avatar
Technically yes, but I've never seen it be a problem in practice.
11:47 PM
Even on bigger 36 disk arrays going back 10 years I've not seen it be a problem. Typically you hit issues with the actual controller before you ever have issues with the CPU.
Avatar
Alright, thanks! 😃
Avatar
jakkapan11123 6/27/2019 12:58 PM
how to save visual studio code as api files?
Avatar
What do you mean?
Avatar
jakkapan11123 6/27/2019 2:54 PM
I can't rebuild the plugin on visual studio 2019 can you hlep?
Avatar
Okay, what error do you get?`
Avatar
jakkapan11123 6/27/2019 2:57 PM
stuck and program closed
Avatar
Well, you need to get the libs and all dependencies from the API and then it in your plugin properties so the plugin can reach everything. (edited)
2:59 PM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
3:00 PM
The problem is that you have a header file that it can't open/find
3:01 PM
In this case it is "ARK.h"
Avatar
jakkapan11123 6/27/2019 3:02 PM
I downloaded it do I have to put it in my plugin master folder?
Avatar
Put it anywhere you like
3:02 PM
But structure is always good 😃
Avatar
jakkapan11123 6/27/2019 3:03 PM
I tried to add another tags and it's my first time haha
Avatar
Then you need to go to Property -> VC++ Directories -> Include Directories: <Enter your path here>
3:04 PM
For example i have: E:\Projekt\Plugins\3.1\API\version\Core\Public;$(IncludePath)
Avatar
jakkapan11123 6/27/2019 3:04 PM
like this?
3:05 PM
oh I missed something
Avatar
Well it could work, you need to maybe changes your includes so the new path works
Avatar
jakkapan11123 6/27/2019 3:05 PM
Avatar
jakkapan11123 6/27/2019 3:06 PM
it's crashed again TT
Avatar
Besure you are using "Release x64" as well when compiling
Avatar
jakkapan11123 6/27/2019 3:07 PM
how can I set it?
Avatar
Another thing for future use: Property -> Linker -> Additional Library Directories: E:\Projekt\Plugins\3.1\API\out_lib;%(AdditionalLibraryDirectories)
3:08 PM
You should see that in top next to "Local Windows Debugger"
3:09 PM
But according to your picture it looks fine 😃
Avatar
jakkapan11123 6/27/2019 3:10 PM
3:10 PM
you mean this?
Avatar
Well that doesn't change when compiling. But you should set the settings i recommended for that configuration though.
Avatar
jakkapan11123 6/27/2019 3:15 PM
it says can't open ArkAPI.lib
3:15 PM
should I move it into public folder?
Avatar
did you change the linker ?
3:16 PM
Avatar
jakkapan11123 6/27/2019 3:18 PM
ohhh
3:19 PM
I can compile now
3:19 PM
Thx master!!!
Avatar
jakkapan11123 6/27/2019 3:21 PM
Do I just need dll and pdb file for plugin?
Avatar
depends. mostly just the .dll
Avatar
jakkapan11123 6/27/2019 3:29 PM
ok htx
Avatar
both won’t hurt
3:37 PM
if you have .pdb in it will show which function crashed your server
Avatar
Just wondering if it is only me but can anyone else access the wiki currently? I keep getting a 502 error saying the server is offline.
Avatar
It's currently down @Frosttoys
Avatar
@Frosttoys it's back up again
1:30 PM
Anyone know if there is some current issue with the Tebex plugin? (feels like the commands isn't sent to the server)
1:36 PM
All commands are "Status: Due"
Avatar
had the same but turns out the user who purchased the item logged in with the wrong steam account
Avatar
Yeah, well i restarted the server and it started to work. For some reason 😛
2:53 PM
Even though i have restarted the server multiple times
Avatar
@Foppa i know i removed that plugin quite annoying
Avatar
GSH | MrOwlSky 6/29/2019 1:02 AM
@Foppa Yeah that issue happens when A. User bought it under SteamID that hasn't been registered in server. B. User hasn't logged into the server with that SteamID. C. The Tebex Secret Key isn't updated in game, Push/Port issues can conflict with this aswell, Preventing the command from being issued. Due simply means, They haven't received it yet. Resulting in tebex for hopefully one of the reasons above not detecting that user in game.
1:02 AM
@Natsu What issues did you have with Tebex? We been using Tebex for years on Minecraft/Rust and other gaming communities never had any issues with them.
1:05 AM
I'll shoot Louise a direct message and see if I can get him to hop in the discord.
Avatar
Well, it was quite strange, but the issue isn't there anymore. But i think the issue was just cause i never "saved" the server. Since i was troubleshooting i restarted alot by just killing the process. back and forth. And after last i didn't and after that it has been working 😃
1:29 AM
And ofc A, B, C was verified 😉
Fire 1
Avatar
Seems I'm the curse of the wiki, I got it to work for about 53 seconds before it decided to go offline again.
laugh_cry 1
Avatar
GSH | MrOwlSky 6/29/2019 1:59 AM
Good to know, Yeah never had any save issues so can't give feedback on that aspect.
1:59 AM
YOU BROKE THE WIKI!!!! Emergawwwwd lol @Frosttoys
😋 1
Avatar
Well since I don't want to kill it again guess ill just ask here, am i correct in the assumption that the hooks used are all overrides of the game functions available to us? Trying to figure out what hooks do by the name only works sometimes lol
Avatar
Rogue Leader 6/29/2019 3:01 AM
Correct me if I'm wrong, but a hook intercepts the game server call to one of its functions. The server calls a function, if you hooked it it will run your code in the hook, and at the end or somewhere in your hook, you call somefunction_original to tell it to continue to the original function.
Avatar
Barnwellrd btw thanks for making NPP and PDP open source, i have been reading through them and they are very well done.
Avatar
Rogue Leader 6/29/2019 3:03 AM
Using a hook allows you to execute code inside of it by manipulating or using the original functions intended data. For example, the Take_damage hook; you can modify the damage taken based on whatever criteria you want by doing some check or calculation and then returning the original function call with the modified data. (edited)
3:06 AM
As for what the functions do or when they are called (also calling your hook to it) is not clear for any of the functions. The only way to know for sure is through debugging with output to the console to see when it happens and what variables it sends, or using a decompiler like IDA Pro to walk through the code.
3:06 AM
Best guess would be the function names.
3:07 AM
And all the api is basically is a layer between the game server and it's functions where you can intercept functions(hooks) or implement timers. With some functionality built in like adding commands and http requests. (edited)
3:10 AM
@Frosttoys thanks! They both need a lot of clean up and maintenance. They are my first big cpp apps and I have a lot of shit like duplicated code and unused variables everywhere. And the db functionality and internal memory variables are severely unoptimized.
3:11 AM
I've gotten reports that servers using it with large clusters have to wipe the db occassionaly because of all the I/O from npp during saves.
3:11 AM
I just haven't had the time to optimize or implement mysql yet
3:12 AM
I ran it through SonarSolar and it lost its mind scanning all the headers I added for the sqlite and json implementation
Avatar
Still has to be better than my own lol, I write fast and clean but not efficiently
Avatar
Rogue Leader 6/29/2019 3:12 AM
Thousands of issues lmao
3:13 AM
It takes practice. Npp 1.0 was an absolute shitshow. And the unreleased ancestors were nasty beasts. (edited)
3:15 AM
At one point I was permanently making structures invincible. Made the plugin impossible to remove without wiping the server. Then 1.1 or 1.2 ran a command to reverse the invincible structures but also broke all the obys (edited)
3:16 AM
1.3 got it right though. I learned not to make any permanent changes to objects in game, just intercept and negate damage. Made the plugin clean to remove and less likely to break a server.
3:18 AM
Most of NPP comes from @Michidu and @OwnProx 's work. I took snippets from a lot of their work and modified and added what I needed to make mine
3:19 AM
And after a few weeks of it being a paid plugin, I made it free and open source for others to learn or modify
3:19 AM
I know of one guy who is turning it into a raid protection plugin
Avatar
Yeah the plugin I decided to attempt is sort of like PDP'ish not really, its raid "protection" by evening out the power levels of the raider and raided. Specific to the server i am playing on though
Avatar
void GetCallback(bool Success, std::string Result) { ArkApi::GetApiUtils().SendNotification(player_controller, { 1,1,1,1 }, 1, 10, nullptr, L"Test Message: {}", Result); Log::GetLog()->info("Ark Server Version: {}", Result); } API::Requests::Get().CreateGetRequest("http://arkdedicated.com/version", &GetCallback); Hello, everybody. Somebody knows. How to send announcements after Requests
Avatar
@GSH | MrOwlSky up i ditched it because it never wanted to run scripts
Avatar
why only "tools" and "Atlas: Server API". Where is ark ? 😖
Avatar
Cause we are storing all "Tools" under one category 😃
8:11 PM
but i like to upload a ark plugin ....
Avatar
Ah! Well what is you name on the forum?
Avatar
@cokll you can use 'SendNotificationToAll' to send it to everyone (edited)
7:23 PM
@Mr.Salt let us know your forum name, will add you to 'developers' group (edited)
Avatar
@Michidu I need to send it to a single player. I've solved it. Thank you
Avatar
@Michidu its MrSalt
Avatar
hi there!
8:16 PM
@Mr.Salt added
Avatar
who is agito in this discord?
Avatar
should be Agito if he is here 😃
Avatar
he’s not
Avatar
i was just gonna say that ui looks great 😂 but i found the discord
Avatar
Is there a plugin already that controls what dinos/items can be transferd between maps?
Avatar
Medicalmischief 7/6/2019 6:01 AM
also interested in that
Avatar
I know a guy, i'll see if he's releaseing it to public
6:01 AM
otherwise i guess i need to write it muyself...
6:02 AM
I can't believe it's not already been done tbh... seems a popular need
Avatar
Medicalmischief 7/6/2019 6:02 AM
yeah
Avatar
my servers keep crashing
Avatar
nvm found it out
1:41 PM
What lib does the mysql version of arkshop use?
2:12 PM
2:12 PM
@Natsu
Avatar
ya i got it
2:12 PM
😄
2:13 PM
i really wish i could get more people
2:13 PM
lol
Avatar
more people?
Avatar
on my server lol
Avatar
you are not alone with that lol
Avatar
some people told me " your server name is the reason i didnt join"
2:13 PM
like wtf is that for reason
2:13 PM
xD
Avatar
what is your server name? xD
Avatar
Mazaca
Avatar
Ahaaa, nothing wrong with that
2:15 PM
it's just a name lol
Avatar
arkshop is open source btw 😃
Avatar
@Michidu yea i know i am editing it lol but i was to dumb to include the includes folder
2:16 PM
:fp:
Avatar
@Natsu players want stability and 24/7 uptime. Give them that and you'll get players.
Avatar
I'm interested in having a Custom Server Menu Plugin coded for my server, I'm wanting to pay for the project as well of course...Might anybody knows Devs who could be interested?
Avatar
you mean a UI ?
Avatar
plugins can’t draw UI’s that’s a job for a mod
12:16 PM
you’re better off asking that in the modding discord
Avatar
Thanks where could I find that Discord?
Avatar
GormusSenex 7/9/2019 4:47 PM
I have a problem including config into my test-project. In ArkShop.DbManager theres a code line handling database: static sqlite::database db(config["General"].value...(etc) what do I need to include to get that "config" command ? Sry if this is a newb question, but im used to c# 😉
Avatar
declare and load config maybe? 😃
Avatar
GormusSenex 7/9/2019 4:50 PM
umm... ? 🤔
4:50 PM
im new... like 2 hour new... to c++ 😄
Avatar
you mean your 'config' variable doesn't exist?
Avatar
GormusSenex 7/9/2019 4:52 PM
yup. do u remember in what class u declare it ?
Avatar
plugins usually use nlohmann library for json config has type 'nlohmann::json' you can declare it anywhere, it has nothing to do with c++ yet
Avatar
GormusSenex 7/9/2019 4:55 PM
ok ty. ill look in the arkshop.cpp and try learn from there. thx 👍
Avatar
GormusSenex 7/9/2019 7:01 PM
Next problem (might be c++ only problem, I donno). I have this code: db << "SELECT count(1) FROM Storage WHERE SteamId = ? AND Blueprint = ?;" << (steam_id, blueprint) >> count; It's changed from the original one with only 1 parameter. But it doesnt work. It might be becus of this (in sqlite_modern_cpp.h line 939): template<typename T> database_binder&& operator << (database_binder&& db, const T& val) { db << val; return std::move(db); } It might be that it doesnt support 2 parameters ? Question: How do I select with 2 paramters instead of 1 ? (edited)
Avatar
<< steam_id << blueprint >> count
Avatar
GormusSenex 7/9/2019 7:02 PM
omfg
7:02 PM
ok ty 😄 (edited)
Avatar
if blueprint is a string, you need to wrap it to quotes ''
Avatar
GormusSenex 7/9/2019 7:03 PM
ahh, that would prolly be my next question in an hour or so 😂
Avatar
(in sql request i mean)
Avatar
GormusSenex 7/9/2019 7:05 PM
like this im guessing: db << "SELECT count(1) FROM MIAStorage WHERE SteamId = ? AND Blueprint = \"?\";" << steam_id << blueprint >> count;
Avatar
single quotes are fine
Avatar
GormusSenex 7/9/2019 7:06 PM
darn same error:
7:07 PM
ahh 'blueprint' is FString.... should prolly cast it to std::string ig
Avatar
yes
Avatar
GormusSenex 7/9/2019 9:56 PM
btw the double << didnt work. also tried "...<< (steam_id, blueprint) >>..." which also didnt work. had to build a string statement instead which is working but doesnt look as good tbh 😑
9:57 PM
everything compiled fine, even the double << or the other. it just didnt fetch correctly from the db
Avatar
Operator abuse right there =P
2:57 PM
You also should not need quotes for token substitution, the driver should do that for you (edited)
2:57 PM
But I dont know exactly what you are working with there.
2:58 PM
Is there a function you can call instead?
2:58 PM
Like db.exec(Stmt, param1, param2,...)
Avatar
multiple << is correct usage for sqlite_modern_cpp library (it's overloaded)
Avatar
GormusSenex 7/10/2019 3:15 PM
I've read that multiple << is the way to go, but somehow it doesn't work. I did this and it looks terrible (but it works): std::string stmt = "SELECT count(*) FROM Storage WHERE SteamId = "; stmt.append(uint64_to_string(steam_id)); stmt.append(" AND Blueprint = \""); stmt.append(blueprint.ToString()); stmt.append("\";"); db << stmt >> count; I wanted to do this: db << "SELECT count(*) FROM Storage WHERE SteamId = ? AND Blueprint = \"?\";" << uint64_to_string(steam_id) << blueprint.ToString() >> count; But that just doesn't work ?! 🤔
3:15 PM
PS. Blueprint has to be double-quotes...
Avatar
what exactly happens? btw you can use std::to_string(steam_id) instead of custom uint64_to_string function
3:16 PM
actually, you dont need to convert it to string
Avatar
GormusSenex 7/10/2019 3:18 PM
I know, that was just for my own "documentation". I've read that it converts it itself. But still doesnt work. I get a compiler error in sqlite_modern_cpp.h line 939
3:18 PM
as if it doesnt somehow support double << (edited)
Avatar
some libraries don't accepts uint64, maybe you need to cast it to signed int64 (edited)
Avatar
GormusSenex 7/10/2019 3:20 PM
hmm... gonna try that. brb
Avatar
but you dont need to convert steam_id to string for sure
3:21 PM
at least, i guess in db its not string too
Avatar
GormusSenex 7/10/2019 3:23 PM
ohh now it compiled... gonna chk if it also works in-game. brb
3:23 PM
(the signed int64)
3:29 PM
well... the game doesn't crash at least. but i've made some refactoring so I need to check if it's my refactoring that doesn't work, or that "new" db call... 😄
Avatar
GormusSenex 7/10/2019 3:51 PM
Nope 😦 Code tested: db << "SELECT count(*) FROM Storage WHERE SteamId = ? AND Blueprint = \"?\";" << (int64)steam_id << blueprint.ToString() >> count; Got this exception: [...] Unexpected DB error column index out of range
Avatar
you sure your request is good?
Avatar
GormusSenex 7/10/2019 4:12 PM
it works if i switch back to the other code...
4:13 PM
(just tested it to make sure if wasnt some other error)
Avatar
the quotes around blueprint are not needed. Also the cast to int64 should not be needed. (edited)
4:40 PM
Not sure if that would cause it to throw that error.
4:41 PM
What type is the string?
Avatar
at least one sql library doesn't accept uint64 (don't remember which one though) quotes might not be needed indeed, but it won't cause issues for sure
Avatar
If it is FString you may have to convert it to std::string or char* because it may not properly translate in the template
Avatar
but also can use fmt::format
Avatar
Roll your own statement you mean?
Avatar
can format string for the request using it
Avatar
Yeah, just have to use the escaping functions for strings
Avatar
might not be necessary (depends how blueprint received)
Avatar
And then something breaks a few years later =P
4:50 PM
Reading the manual though, your code should work.
4:51 PM
Only thing I can think of is it doesn't understand FString and silently omits that parameter so you get the error because only one parameter exists
Avatar
FString converted as far as i can see
Avatar
GormusSenex 7/10/2019 6:48 PM
i need the double quotes (i think) cuz the blueprint FString contains single quotes. And i convert it to std::string with the .ToString().
6:48 PM
(Sry was in the garden working - but thx for helping tho 👍 )
Avatar
Works now? And you shouldn't need any quotes, the driver adds them when it sees it is a string.
7:05 PM
It also escapes it automatically
Avatar
GormusSenex 7/10/2019 7:10 PM
also when the string contains single quotes ?
7:12 PM
anyway i tried this and testing it now: stmt = fmt::format("SELECT count(*) FROM Storage WHERE SteamId = {0} AND Blueprint = \"{1}\";", std::to_string(steam_id), blueprint.ToString()); Looks a little bit better 😉
Avatar
yes .. you will need them there.
7:16 PM
Wish I wasn't on a phone, I could write the other above lol
7:22 PM
std::string bp(TCHAR_TO_UTF8(blueprint.ToString()); db << "SELECT count(*) FROM Storage WHERE SteamId = ? AND Blueprint = ?;" << (int64)steam_id << bp >> count;
7:22 PM
May have to dereference the output of toString.
Avatar
GormusSenex 7/10/2019 7:23 PM
doesnt ToString convert to std::string in itself ?
Avatar
Not what I'm reading, no
7:24 PM
You have a UObject, ToString gives you an FString of it's name (edited)
Avatar
GormusSenex 7/10/2019 7:24 PM
vs says it returns std::string
Avatar
Then I guess it does and I am reading old docs lol
Avatar
GormusSenex 7/10/2019 7:25 PM
Avatar
Yup, would be nice if they updated their wiki then
Avatar
GormusSenex 7/10/2019 7:26 PM
😄
7:27 PM
no need to document ur code... its self explainatory... 😉
Avatar
😐 lol
7:27 PM
Not when you don't have access to an environment it isn't =P
Avatar
GormusSenex 7/10/2019 7:27 PM
what u coding in ?
Avatar
Why auto abuse in C++ can cause serious headaches
7:28 PM
And operators like in this case
7:28 PM
It's not clear what it does or what type it is ;3
Avatar
GormusSenex 7/10/2019 7:28 PM
vs for teh winz... (well, primarily using it for c# and x++)
Avatar
I use whatever language I need at the time :)
7:29 PM
Mostly C or Go, but I have to deal with C++ and all the other junk like Java, JavaScript, python, perl, etc.
7:29 PM
Powershell.. ugh :(
Avatar
GormusSenex 7/10/2019 7:30 PM
one should think that if u merge c# and x++ u would end up with c++-similiar... but no, c++ is russian to me lol
Avatar
sorry for confusing, but ToString is a custom function which is not in Unreal 😄
Avatar
Ahh, now it makes sense :)
7:31 PM
Nice addition
Avatar
i thought it would be very handy in API but in UE itself, there is no easy way to convert FString to std::string as i know (edited)
Avatar
Yeah, I am sure they have their own memory manager like many engines, so you end up with custom types for everything and then reimplimentations of standard things like atoi, math funcs, etc.
Avatar
GormusSenex 7/10/2019 7:37 PM
this ArkAPI tool u made is awesome (and i only scratched the surface). only wish it was c# 😉
Avatar
thanks i have looked at c++ to c# binding a few times.. but it looks very complicated and limiting
Avatar
GormusSenex 7/10/2019 7:40 PM
ahh well. always fun fiddling with another language 😄
Avatar
@Michidu is there a ingame timer as in total playtime?
Avatar
for every player? no, game doesn't save such info you can count manually though
Avatar
yea i was thinking of making a manually counter but also with the fact it might stress the server right?
7:42 PM
every 1 sec to a database
Avatar
well, why every sec? you can do it every minute for example but you can also hook PlayerJoin and PlayerLeave and update time only in PlayerLeave function
Avatar
i was thinking of doing playerjoin / playerleave but how would i count it for each player then? same as arkshop?
Avatar
save it to array
7:47 PM
yes, kinda same
7:48 PM
you can also save only timestamp
7:48 PM
don't even need to Update() then
Avatar
GormusSenex 7/10/2019 9:22 PM
is there anyway to supress the HUD message on AShooterPlayerController->GiveItem like there is on the RemoveItem ?
Avatar
Is there a decent way to read all harvest nodes as they get loaded?
Avatar
@GormusSenex should be possible but you need to manually load item using StaticLoadObject and then use UPrimalItem::AddToInventory
12:22 PM
i think harvest nodes are written in blueprints
Avatar
@Michidu Check out chat information
Avatar
Nodes are in sublevel, overrides, and blueprints
6:02 PM
:(
6:03 PM
They are a foliage subclass I think
6:03 PM
But I can't seem to enumerate them anyway I try
Avatar
GormusSenex 7/11/2019 9:36 PM
@Michidu thx. gonna look into it when i get home next week 👍
Avatar
what's a good way to count resources as in collected ? with ignore things like pulling from s+
Avatar
additem is the only way as far as i’m aware
Avatar
@WETBATMAN i meant counting as in you have collected 100 wood of a 1000
Avatar
just count items that player has in inventory?
Avatar
but pulling ect would be a bug without doing anything
Avatar
i mean items player has right now
Avatar
what hook is that?
Avatar
no hooks, just get player inventory and count items
Avatar
Whats the best way to get a blueprint path from APrimalDinoCharacter?
Avatar
same as for items
Avatar
how's that 😂 havent needed it yet
Avatar
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Perfect, thank you!
Avatar
Rogue Leader 7/15/2019 2:26 AM
Exciting
2:26 AM
I think the emoticons should go after the channel text as well to keep them symmetrical. @GSH | MrOwlSky
Avatar
GSH | MrOwlSky 7/15/2019 2:32 AM
Thanks, The concept behind that is the color correction with your eye, If you read the text prior to the emoji then theoretically it doesn't build muscle memory. When the eye first sees the emoji and color correction it builds a muscle memory and programs the brain into knowing what is what without even reading the text. It's a science trick alot of branding companies do that stores data into the subconscious. https://www.youtube.com/watch?v=7TivZYFlbX8 https://www.psychologytoday.com/us/blog/habits-not-hacks/201408/color-psychology-how-colors-influence-the-mind (edited)
Avatar
Rogue Leader 7/15/2019 2:38 AM
I don't understand that in this context
Avatar
GSH | MrOwlSky 7/15/2019 2:39 AM
Yeah it's hard to explain in text. (the science behind it.) (edited)
Avatar
GSH | MrOwlSky 7/17/2019 10:55 PM
Yeah that's actually the point, you grew up broken family and poor and you programmed your mind into being better then what you came from. You have two roads the one you came from and the one with your roots or the narrow road that's hard but has a greater reward in the end. I grew up in a poor broken family aswell and I had to program my mindset to be better then where I came from. I'm glad you made a life out of that brokenness it's an awesome testimony and I'm so happy for you. Life is without a doubt a blessing (edited)
Avatar
GormusSenex 7/18/2019 12:25 AM
@Michidu u got an example of how to use UPrimalItem::AddToInventory ? I googled it but to no avail... 😦
Avatar
GormusSenex 7/19/2019 5:29 PM
I tried this instead: UObject* object = Globals::StaticLoadObject(UObject::StaticClass(), nullptr, L"Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_Chitin.PrimalItemResource_Chitin'", nullptr, 0, 0, true); TSubclassOf<UPrimalItem> archetype; archetype.uClass = reinterpret_cast<UClass*>(object); UPrimalItem* item = UPrimalItem::AddNewItem(archetype, player_controller->GetPlayerCharacter()->MyInventoryComponentField(), false, false, 0, false, 30, false, 0, false, nullptr, 0); But that gave me an error:
Avatar
GormusSenex 7/20/2019 12:30 AM
omfg i found out. 2 days lol... geez 🙄
Avatar
are there any arkbot users in here?
Avatar
ye
4:47 PM
😄
Avatar
Does anyone know which save file (arkprofile, arktribe or .ark) holds a dino's specific info? For some reason my valguero server keeps resetting random dinos and structures to wild/no ownership
Avatar
i had the same but with players getting their whole tribe's ownership removed
11:04 PM
my saves were corrupt
11:04 PM
your best bet is to probably restore from an ASM backup
Avatar
yep that was the problem
5:59 PM
so strange though
Avatar
usually it doesn't happen
6:08 PM
for me it was my fault my UPS wasn't hooked up to my server at the time and the machine lost power
Avatar
Is there a certain SDK version we need to select for this to work or something? I've set VS up according to the Google Docs guide. created a new C++ file and pasted the code from the welcome message example on the wiki, but I'm getting these 2 errors when trying to build:
Avatar
possibly you didn't link ArkApi.lib
Avatar
I've got the out_lib directory listed as an additional library directory in the Linker section of the properties, and this at the top of the cpp file: #include "API\Atlas\Atlas.h" #include "Timer.h" #pragma comment(lib, "ArkApi.lib") (edited)
Avatar
you should use AtlasApi if the plugin is for atlas
Avatar
Ummm..... How about we delete this conversation and pretend it never happened? 🙈
👌 1
Avatar
haha, so that worked?
Avatar
Yeah it did. Wish it didn't though xD
7:59 PM
Thanks mate 😃
8:00 PM
I guess it could be worth updating the examples in that case - they're all referencing API\Atlas\Atlas.h, but also ArkiApi.lib
Avatar
which ones?
Avatar
oh, that actually was for Ark heh
9:10 PM
will fix it
Avatar
So now I've got a very basic .dll from the exmaples, do I need a json file or .pdb? Not entirely sure when I'd need them
Avatar
.pdb will simply help you debug if your DLL causes a crash
9:59 PM
.json is if you need to load a config for the DLL
Avatar
Gotcha, thought as much with the .json. Thanks 😃
Avatar
Damn, I should be seeing my plugin name here, right? 🤔
Avatar
yes
10:55 PM
you need to name your folder exactly the same as the DLL
Avatar
That was it, cheers.
Avatar
@GSH | MrOwlSky Hello, is the developer Wiki down?
Avatar
what do you want to know ?
Avatar
well I'm coming from scripting in arma, and I was just wanting to look at everything, where to start, etc.
Avatar
wiki is up it's just pretty slow 😄
Avatar
oh rip
10:15 PM
start here
10:15 PM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
10:16 PM
also michidu's plugins are a pretty good exmaple
Avatar
GSH | MrOwlSky 7/25/2019 10:26 PM
Yeah wikis online just slow currently
Avatar
Does anybody happen to know the function that's called when your crew starts to repair your ship when it's anchored? The closest I could find it the IsAnchored() function for APrimalRaft. Would your crew start repairing instantly when IsAnchored() is triggered? Or is there a delay? (edited)
Avatar
i never worked with atlas but IsAnchored will return true if the ship is in an anchored state i think (edited)
Avatar
That's my understand from reading the API source, too. So if I was to do this, do you think it would just run the "Blah blah blah" code when it's anchored? DECLARE_HOOK(APrimalRaft_IsAnchored, bool, APrimalRaft*); bool Hook_APrimalRaft_IsAnchored(APrimalRaft* _this) { Blah blah blah } (edited)
Avatar
you can test it pretty easily
10:54 PM
Log::GetLog()->warn("Hook Called!");
10:55 PM
put something like this in there and load the plugin
10:55 PM
then anchor a ship and look at the server console
10:55 PM
if it says Hook Called! then it works
10:55 PM
also depending on what you wanna do you might or might not want to keep that original function in there
10:55 PM
in this case you do
10:55 PM
if you just want to test it with a log
Avatar
Ah, so the stuff you put in Log::GetLog()->warn doesn't write to a log file, it just outputs to the console? (edited)
Avatar
yeah
Avatar
Perfect, I didn't realise that. Thanks man
10:56 PM
it'll look something like this
Avatar
Gotcha, cheers. I'll check it out
10:57 PM
Jesus, mods were so much easier to make than plugins xD
Avatar
not really tbh API isn't that hard to work with
10:57 PM
and it has many advantages compared to mods
10:58 PM
like speed
10:58 PM
direct file pulling
Avatar
It's more the fact that I didn't need to do any C++ when doing mods 😄
10:58 PM
And that's my main weakness in this
Avatar
you'll learn pretty quick i got into plugin making last summer
10:58 PM
i had no prior experience with any programming language before that
Avatar
Oh wow, OK that's comforting to know 😃
Avatar
Lol, well, that went well... 🤣
Avatar
at least the hook was called XD
LUL 1
11:41 PM
what does your hook look like ?
Avatar
This is the entire code: #include "API\Atlas\Atlas.h" #pragma comment(lib, "AtlasApi.lib") DECLARE_HOOK(APrimalRaft_IsAnchored, bool, APrimalRaft*); bool Hook_APrimalRaft_IsAnchored(APrimalRaft* _this) { Log::GetLog()->warn("Anchor hook called!"); return APrimalRaft_IsAnchored_original(_this); } void Load() { Log::Get().Init("Anarki's Anchor Detection Plugin"); ArkApi::GetHooks().SetHook("APrimalRaft.IsAnchored", &Hook_APrimalRaft_IsAnchored, &APrimalRaft_IsAnchored_original); } void Unload() { ArkApi::GetHooks().DisableHook("APrimalRaft.IsAnchored", &Hook_APrimalRaft_IsAnchored); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); break; } return TRUE; }
Avatar
everything is correct i believe
Avatar
I'm trying to startup the server now without any plugins, just in case the issue is outside of the plugin
Avatar
you can see that the last thing in the console is that log so probably not
Avatar
There was more after that I think, I just cut it off in my snip (although can't remember off the top of my head what it was)
Avatar
you can always check server logs 😄
Avatar
Just the ones in ShooterGame\Saved\Logs?
Avatar
yeah
11:47 PM
API also has logs
Avatar
Looks like you're right, the last line in the API log was the hook being called - so yeah, my plugin broke the world PepeHands
Avatar
it's most likely the API itself crashing on that hook
11:49 PM
did you write the hook yourself or with the hook generator ?
Avatar
I guess so, because it was called before I had even entered the server to spawn a boat, let alone anchor it
11:49 PM
The generator
11:49 PM
Just added in the log line
Avatar
yeah it's the API crashing then
11:50 PM
if it was called before you even joined it would have probably not worked anyway
Avatar
Is this just a "Stay away from that function, Anarki, bad things happen when you go there" situation?
Avatar
it might be tbh
11:51 PM
can't say for sure i never worked with atlas
Avatar
Damn, I'll see if I can find a different function I can use for it
Avatar
if you can't find any function that gets called when a ship in anchored you can always add a timer to check all ships on the map
11:52 PM
what are you trying to do anyway ?
Avatar
For now I just want to get all structures attached to the ship when it's anchored
11:54 PM
(like if someone has built on it, for example)
Avatar
ah
11:54 PM
hmm yeah has to be some other hook for it i think
11:54 PM
but if not like i said you can use a timer
11:55 PM
depending on what you want to do timer maybe faster too if you async it
Avatar
Yeah hoping not to need a timer, because that would probably not be too efficient to query every ship on the map periodically
Avatar
well maybe when a structure is built you could check how far away from a ship it is
11:56 PM
if it's close enough it's probably on a ship 😄
Avatar
SublimeStyle 7/27/2019 12:42 AM
is it possible to debug a plugin while the server is running ? (edited)
Avatar
Where does the version and description here get read from btw?
Avatar
plugininfo.json (edited)
👍 1
Avatar
Gotcha, thanks mate
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 7/27/2019 9:10 AM
Well I wouldn't say that the API is crashing... its more that the API hasn't loaded certain data from the pdb file at the time executed. I would try to add APrimalRaft to the structures section of the config.json file located right in the Win64 folder (API root folder) - then try it again 😃 (edited)
Avatar
SublimeStyle 7/27/2019 3:01 PM
does anyone know what the specific hook would be for when breeding or taming is completed (i.e. anytime a character/tribe attains a new mature dino)
3:03 PM
currently have all dino stats being iterated and processed for POST (let's say via command or timer for now) but eventually I want to optimize bandwidth and save only specific dinos as they are 'tamed'
3:05 PM
I guess context is a little incorrect there, ideally I'd like to do this within the scope of APrimalCharacter or its base/sub classes (edited)
Avatar
Thanks AdrianGaming, that at least stopped the crashing. Just need to find the right hook now 😃
3:25 PM
If I wanted to implement multiple hooks, could I just do it like this? #include "API/Atlas/Atlas.h" #pragma comment(lib, "AtlasApi.lib") DECLARE_HOOK(APrimalRaft_IsAnchored, bool, APrimalRaft*); DECLARE_HOOK(APrimalRaft_OnRep_IsInWetDock, void, APrimalRaft*); bool Hook_APrimalRaft_IsAnchored(APrimalRaft* _this) { Log::GetLog()->warn("IsAnchored hook called!"); return APrimalRaft_IsAnchored_original(_this); } void Hook_APrimalRaft_OnRep_IsInWetDock(APrimalRaft* _this) { Log::GetLog()->warn("IsInWetDock hook called!"); APrimalRaft_OnRep_IsInWetDock_original(_this); } void Load() { Log::Get().Init("Anarki's Anchor Detection Plugin"); ArkApi::GetHooks().SetHook("APrimalRaft.IsAnchored", &Hook_APrimalRaft_IsAnchored, &APrimalRaft_IsAnchored_original); ArkApi::GetHooks().SetHook("APrimalRaft.OnRep_IsInWetDock", &Hook_APrimalRaft_OnRep_IsInWetDock, &APrimalRaft_OnRep_IsInWetDock_original); } void Unload() { ArkApi::GetHooks().DisableHook("APrimalRaft.IsAnchored", &Hook_APrimalRaft_IsAnchored); ArkApi::GetHooks().DisableHook("APrimalRaft.OnRep_IsInWetDock", &Hook_APrimalRaft_OnRep_IsInWetDock); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); break; } return TRUE; }
Avatar
yes
Avatar
Great, thanks 😃
Avatar
DECLARE_HOOK(APrimalCharacter_TakeDamage, float, APrimalCharacter*, float, FDamageEvent *, AController *, AActor *); DECLARE_HOOK(APrimalStructure_TakeDamage, float, APrimalStructure*, float, FDamageEvent*, AController*, AActor*); DECLARE_HOOK(APrimalDinoCharacter_TakeDamage, float, APrimalDinoCharacter*, float, FDamageEvent *, AController *, AActor *); DECLARE_HOOK(UPrimalInventoryComponent_AddItem, UPrimalItem *, UPrimalInventoryComponent*, FItemNetInfo *, bool, bool, bool, FItemNetID *, bool, bool, bool, AShooterCharacter *, bool); DECLARE_HOOK(AShooterCharacter_StartWeaponSwitch, void, AShooterCharacter*, UPrimalItem *, bool); DECLARE_HOOK(APrimalDinoCharacter_DoAttack, bool, APrimalDinoCharacter*, int, bool, bool); DECLARE_HOOK(AShooterPlayerController_ConsoleCommand, FString *, AShooterPlayerController*, FString *, FString *, bool); DECLARE_HOOK(AShooterPlayerController_ServerSendChatMessage_Implementation, void, AShooterPlayerController*, FString *, EChatSendMode::Type); DECLARE_HOOK(APrimalDinoCharacter_ClientMultiUse, void, APrimalDinoCharacter*, APlayerController *, int); DECLARE_HOOK(APrimalDinoCharacter_IsCurrentlyPlayingAttackAnimation, bool, APrimalDinoCharacter*);
3:26 PM
that's how many hooks i have in 1 plugin XD
Avatar
Wow! xD
Avatar
oh i just noticed i left an unused hook in there
3:26 PM
should probably remove it XDD
LUL 1
Avatar
So, should I be able to stop a plugin from running with cheat plugins.unload <PluginName>? So for my plugin called "Anarki's Anchor Detection Plugin", it would be cheat plugins.unload Anarki's Anchor Detection Plugin?
Avatar
yeah you should be able to
Avatar
Hmmm, it doesn't like spaces. Just says that plugin Anarki's is not running. Same if I surround the name with " or '
3:46 PM
🤔
Avatar
you shouldn't have spaces in plugin names
Avatar
Ah, because you can put spaces in the plugininfo.json anyway, right? D'oh!
Avatar
SublimeStyle 7/27/2019 3:47 PM
i think with spaces you just need to wrap it in "
Avatar
Doesn't work 😦
Avatar
SublimeStyle 7/27/2019 3:47 PM
but idk the limitations of the api
3:47 PM
similarly to if you were to have a folder when navigating from cline
Avatar
I'll just redo it without spaces; will reduce possible issues 😃
3:48 PM
Yeah, I already said I tried with " and ' 😃
Avatar
SublimeStyle 7/27/2019 3:48 PM
lol oops
😃 1
3:53 PM
@WETBATMAN any ideas on where I could hook for when a dino is mature ? I found a few places that seem good for taming like TameDino() but haven't seen anything with breeding maturation besides maybe baby age?
3:54 PM
i'd prefer to make database updates in smaller increments so trying to hook in there
Avatar
maybe something like setage
3:55 PM
no idea what function gets called when it grows up tbh
3:55 PM
it's not tame dino because it's already tamed at that point
Avatar
SublimeStyle 7/27/2019 3:56 PM
no worries, i'll keep looking... and yeah that makes sense... I think too you've made me realize I'll have to account for that in TameDino
3:56 PM
as far as making sure it's not a baby
3:56 PM
within that context
Avatar
yeah i don't really know how it would work because when a dino is hatched turrets already shoot it
3:56 PM
so it might be already tamed the second it hatches
Avatar
SublimeStyle 7/27/2019 3:57 PM
hm
Avatar
and claiming might just change the TargettingTeamField
3:57 PM
actually ShopRewards has code to detect an unclaimed dino it might help you
Avatar
SublimeStyle 7/27/2019 3:57 PM
ok will take a look - much appreciated!
Avatar
!unclaim_points && _this->OwningPlayerIDField() == 0
3:58 PM
here
3:58 PM
APrimalDinoCharacter* _this
Avatar
SublimeStyle 7/27/2019 4:14 PM
nice thank you! now to figure out how to determine if they are fully mature xD
Avatar
SublimeStyle 7/27/2019 6:18 PM
so, I'm getting this
6:18 PM
from this
6:18 PM
any reason why this might be returning 0 actors? the server is populated with... several hundred+ dinos
Avatar
try GetPrivateStaticClass
Avatar
SublimeStyle 7/27/2019 6:25 PM
thanks, will try that now ^_^
Avatar
Does anybody know how I can get the character name from APlayerController*? The ArkApi::GetApiUtils().GetCharacterName() function only seems to work with AShooterPlayerController and not APlayerController, but the hooks I have to use are using APlayerController and not AShooterPlayerController (edited)
Avatar
just cast (edited)
👍 1
Avatar
Of course! Been years since I touched C++, but that works; cheers
Avatar
@WETBATMAN well it's also possible for a dino not tamed to grow to adult (and remain unclaimed)
Avatar
like i said it's already tamed when it hatches
Avatar
oh you guys figured it out already
Avatar
claiming just changes the owner field of the dino
Avatar
ah ok (edited)
Avatar
SublimeStyle 7/27/2019 9:29 PM
I'm thinking BabyMaxHealthPercentField() will give me the value I need to check for maturiy
9:30 PM
but yeah, as @WETBATMAN said, just gotta check OwningPlayerIDField() == 0 to determine if claimed
9:31 PM
or at least one of them... curious what happens once a dino has been claimed (at full maturity) and then unclaimed
Avatar
Any ideas of the safest way to rename a player character? 🤔
Avatar
@Anarki use the rename player command?
Avatar
@Scruffy I can't seem to get it working
Avatar
cheat renameplayer "<oldname>" <new name> (edited)
10:24 AM
i'm not sure how you get that in code 😃
Avatar
Yeah, that's the closest I saw, but also no idea how to put that into code 😁 also it's for ATLAS, where you specifically have a first name and last name, so not sure how that behaves
Avatar
you have to run a console command from a player
11:01 AM
also instead of doing that there probably is a field that contains the player name that you could change
Avatar
So I see a RenamePlayer function for AShooterCharacter*, but when I do something like RenamePlayer("Bob Marley"), it complains that it's a const char instead of FString. Is it easy to convert into an FString? (edited)
Avatar
FString NewName = "bob Marley"; RenamePlayer(NewName);
Avatar
Apparently, no suitable conversion function from "FString" to "FString*" exists
Avatar
RenamePlayer(*NewName);
11:09 AM
RenamePlayer(&NewName);
Avatar
Yeah, when I use & it then says that the function doesn't take 0 arguments 🤔
Avatar
XDDDDD
11:11 AM
oh i see that function
11:11 AM
gimme a second
11:12 AM
AShooterCharacter* Character; FString NewName = "Whatever"; Character->RenamePlayer(&NewName);
11:12 AM
it should work like that
Avatar
That's pretty much what I've got when it complains about 0 arguments: AShooterCharacter* dude = shooter_controller->GetPlayerCharacter(); FString NewName = ("Bob Marley"); dude->RenamePlayer(&NewName);
Avatar
Are FString NewName = ("Bob Marley"); and FString NewName = "Bob Marley"; the same? Thats what see as being different @Anarki
Avatar
Ah, good spot! I clearly just skimmed that. Probably is; I'll check later 😃
Avatar
it's same but at least in Ark RenamePlayer doesn't work well alone, should use the one from cheat manager static_cast<UShooterCheatManager*>(controller->CheatManagerField())->RenamePlayer(&old_name, &new_name);
Avatar
So like this? FString oldName = static_cast<FString>(characterName); FString newName = "Bob Marley"; // Use the cheat manager to rename static_cast<UShooterCheatManager*>(shooter_controller->CheatManagerField())->RenamePlayer(&oldName, &newName); (edited)
Avatar
Doesn't do anything PepeHands
6:27 PM
Doesn't error either void Hook_APlayerController_ClientNotifyRespawned(APlayerController* _this, APawn* NewPawn, bool IsFirstSpawn) { // Only check the name if this is a new Pathfinder, not just a respawn if (IsFirstSpawn) { // Cast to AShooterPlayerController AShooterPlayerController* shooter_controller = static_cast<AShooterPlayerController*>(_this); std::string characterName = ArkApi::GetApiUtils().GetCharacterName(shooter_controller).ToString(); warning("ClientNotifyRespawned hook triggered"); info("Character name is: " + characterName); APlayerController_ClientNotifyRespawned_original(_this, NewPawn, IsFirstSpawn); // Check if characterName contains any bad words if (ContainsBadWords(characterName)) { warning("Character name contains a bad word!"); info("Trying to rename to Bob Marley..."); try { FString oldName = static_cast<FString>(characterName); FString newName = "Bob Marley"; // Use the cheat manager to rename static_cast<UShooterCheatManager*>(shooter_controller->CheatManagerField())->RenamePlayer(&oldName, &newName); } catch(std::exception& e) { error(e.what()); } info("Should've renamed."); } else { info("Character name is all good (or we couldn't check)."); } } }
6:28 PM
Anything obvious to anybody that I'm doing wrong? 🤔
Avatar
ah, i forgot that in atlas cheats may require admin rights, but you can try regular Rename function, maybe it will work here
6:33 PM
or try giving admin rights temporarily
Avatar
When you say regular Rename function, do you mean this one? AShooterCharacter* dude = shooter_controller->GetPlayerCharacter(); dude->Rename(WhateverIsRequiredHere) (edited)
Avatar
Damn, I was hoping not - Got to work out what parameters that damn things needs now xD
6:48 PM
Maybe giving temp admin rights is easier
Avatar
what it says?
Avatar
AActor::Rename(const wchar_t *inName, UObject *NewOuter, unsigned int Flags) (edited)
Avatar
ah, this is wrong func for sure
Avatar
Thank God! LUL
Avatar
const bool is_admin = player->bIsAdmin()(), is_cheat = player->bCheatPlayer()(); player->bIsAdmin() = true; player->bCheatPlayer() = true; player->ConsoleCommand(&result, &command, true); player->bIsAdmin() = is_admin; player->bCheatPlayer() = is_cheat;
Avatar
Your player variable is just an AShooterPlayerController* ? (edited)
Avatar
I guess &command is just the cheat command, fine. What is the &result needing though?
Avatar
nothing, just empty FString
Avatar
So actually just testing locally with the command and with ATLAS having first and family names, only the first name can be changed using cheat renameplayer "<oldName>" <newName>
7:59 PM
FeelsBadMan
Avatar
but that something :) maybe you can find more cheat commands
Avatar
SublimeStyle 7/29/2019 8:15 PM
hey guys, so I'm trying to include StringConv.h from UE4 in a plugin to convert FStrings to normal strings for POST but I keep getting namespace clashes (I'm assuming due to the includes in API/ARK/Ark.h) - any suggestions ?
Avatar
just do ToString 😄
8:21 PM
Log::GetLog()->warn(FClass.ToString());
8:21 PM
example
Avatar
SublimeStyle 7/29/2019 8:39 PM
omg is therer really just a ToString?
8:39 PM
i've spent hours trying to avoid namespace clashings and all kinds of other workaround JFC >_<
8:39 PM
ty
Avatar
yeah it's super helpful 😄
Avatar
SublimeStyle 7/29/2019 8:45 PM
gotta love all the nuances I seem to have forgotten about when it comes to harder typed languages - python has ruined me
Avatar
ToString is an API function
8:46 PM
actually
Avatar
SublimeStyle 7/29/2019 8:47 PM
just the headers/include stuff throws me in a rabbit hole
8:47 PM
yeah i know but i mean just dealing with the imports and includes and type conversion... compiler errors
8:47 PM
all kinds of fun
8:49 PM
been using python on back end w/ js/html/css for like the last 2 years - a lot different than C++ or even Java
8:50 PM
that and going from PyCharm to visual studio... all the hotkeys are different 😦
Avatar
SublimeStyle 7/29/2019 8:57 PM
lol little things like remembering to use arrows with pointers >_<
8:57 PM
just took me 10 mins to figure that one out
Avatar
SublimeStyle 7/30/2019 1:14 AM
does anybody have an idea of how to get Actor location ?
1:14 AM
have tried a few methods now to no avail
Avatar
SublimeStyle 7/30/2019 1:31 AM
so, it seems like we can do either GetInterpolatedLocation or GetWorldLocation when calling RootComponent, however, there seems to be a massive offset - not quite sure how this works
Avatar
Try something like this: FVector pos = shooter_pc->DefaultActorLocationField();
Avatar
SublimeStyle 7/30/2019 1:32 AM
I tried that but got 0,0,0
1:33 AM
whereas interpolated and worldlocation seem to be precise - just not sure how to offset
1:33 AM
like i have a couple dinos that are within a few coordinates of each other and that is reflected in the higher number... here look:
Avatar
Well what did use as input?
Avatar
SublimeStyle 7/30/2019 1:33 AM
1:34 AM
input? that was just the method I called from primalcharacter I believe
Avatar
Oh, it's a dino
Avatar
SublimeStyle 7/30/2019 1:34 AM
for defautlocation
1:34 AM
in this case, yes, that's what I'm looking or
1:34 AM
for*
1:35 AM
i wonder if the offset is 100
Avatar
This is a straight copy from ExtendedRCON void GetDinoPos(RCONClientConnection* rcon_connection, RCONPacket* rcon_packet, UWorld*) { FString msg = rcon_packet->Body; TArray<FString> parsed; msg.ParseIntoArray(parsed, L" ", true); if (parsed.IsValidIndex(2)) { int dino_id1; int dino_id2; try { dino_id1 = std::stoi(*parsed[1]); dino_id2 = std::stoi(*parsed[2]); } catch (const std::exception&) { SendRconReply(rcon_connection, rcon_packet->Id, "Request has failed"); return; } APrimalDinoCharacter* dino = FindDinoWithID(dino_id1, dino_id2); if (!dino) { SendRconReply(rcon_connection, rcon_packet->Id, "Can't find dino"); return; } FVector pos = dino->RootComponentField()->RelativeLocationField(); FString reply = pos.ToString(); rcon_connection->SendMessageW(rcon_packet->Id, 0, &reply); } else { SendRconReply(rcon_connection, rcon_packet->Id, "Not enough arguments"); } }
Avatar
SublimeStyle 7/30/2019 1:35 AM
perfect thank you
Avatar
SublimeStyle 7/31/2019 6:08 PM
does anyone know if the visual studio remote debugger will work with plugins ?
Avatar
debugger isn't really helpful
6:09 PM
it won't show you any important info
Avatar
SublimeStyle 7/31/2019 6:09 PM
? and why not
Avatar
it just shows the loaded modules and stuff
Avatar
SublimeStyle 7/31/2019 6:10 PM
debugger is immensely useful in my work applications
Avatar
that's if you have the source code 😄
Avatar
SublimeStyle 7/31/2019 6:10 PM
yeah but can you put break points ?
Avatar
i don't think so
Avatar
SublimeStyle 7/31/2019 6:10 PM
if you can still put break points in your plugin cpps, it's still super worthwhile
6:10 PM
but i guess i'll have to figure that one out myself xD
Avatar
i haven't tried it but as far as i know it's not possible
Avatar
SublimeStyle 7/31/2019 6:11 PM
have you looked into that article I posted and the PDB object?
6:12 PM
j/w so i don't go down the same rabbit hole if so ol
6:12 PM
lol*
Avatar
i haven't tried myself, but someone got VS debugger working with plugins after all, it's same as debugging any dll
Avatar
SublimeStyle 7/31/2019 6:13 PM
^ this is what I was hoping
6:14 PM
I randomly looked up what a PDB was and my excitement got the best of me 😄 (edited)
Avatar
SublimeStyle 7/31/2019 6:49 PM
figured it out - I'll be sure to post a guide
👍 2
6:50 PM
and the breakpoints are IMMENSELY helpful lol
6:56 PM
like I said, I'll post a google drive doc on it when I can but for now ^_^
Avatar
I don't suppose anybody knows what hook to go for when the repair hammer gets used? (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 8/1/2019 9:31 AM
I would start by hooking the TakeDamage func and go from there.. ofc it depends on what you really want to do
👌 1
Avatar
CerberusDC 8/7/2019 8:53 PM
Guys, good afternoon. I have a question regarding the dev configuration of the plugin dev, "here you need to point Visual Studio to the path where you downloaded the second resource (it needs to be pointed to the Public folder not the root of the API folder !) ", the only file indicated for the download link was https://github.com/Michidu/ARK-Server-API/archive/master.zip but after unzipping, it does not follow the folder structure according to the tutorial
Avatar
yeah i probably should update it
Avatar
the out lib folder is the lib files
8:54 PM
the public folder is the includes
Avatar
yeah version -> core -> public
8:54 PM
that goes in includes
Avatar
CerberusDC 8/7/2019 8:56 PM
ty 💯
8:57 PM
I'm a VB programmer learning a new language, so some things are different, thanks for the help
👍 1
Avatar
np 😛
Avatar
CerberusDC 8/8/2019 4:32 AM
Guys, does this api have documentation? I didn't find while scouring the web and forums
Avatar
there is a dev wiki but that’s about it
Avatar
CerberusDC 8/8/2019 2:14 PM
thank you @WETBATMAN
Avatar
how to compile?
7:11 PM
for ark?
8:15 PM
then follow the instructions on this page to install the plugin: https://ark-server-api.com/resources/ark-server-api.4/
ArkApi is a plugin which allows you to create your own server-side plugins for ARK using C++ language. Installation: Extract everything to "ARK\ShooterGame\Binaries\Win64". All files like "version.dll" should be in "Win64" folder. Start your...
Avatar
on compile
7:23 PM
i receive
7:23 PM
7:23 PM
attribute no_init_all unknown
4:26 AM
i wrong
4:26 AM
Avatar
that was something with your VS setup and you can't use arkml in the name
Avatar
trying to access the requests tab on the dev wiki throws a request error
10:29 PM
ironic...
Avatar
I don't suppose anybody has had any luck with renaming a player's full name (including family name) in ATLAS so far? It's different to ARK, so the usual rename functions don't work, they only change the first name
Avatar
Kind of managed lol 😄
10:58 PM
i can test it out more soon
Avatar
Deleted User 8/20/2019 3:28 AM
On the new valguero map there is a cave. Temple cave to be exact, and in this cave you cannot build. I have cave building turned on and extra structure prevention disabled.. anyone know how I could make it so I could build? I’m pretty sure it’s a hard coded area for strictly no building.. can this be changed?
Avatar
it seems like wiki server is unstable
9:19 AM
9:20 AM
how about packing wikifile and add to directory at github repository? (edited)
Avatar
wiki webserver going down so often
Avatar
yeah its been down for a while tonight, is there an alternate link for similar info
Avatar
trying to call a function from UShooterCheatManager but it does nothing and also does not give any error
1:12 PM
UShooterCheatManager cheatManager = UShooterCheatManager(); cheatManager.DestroyTribeIdDinos(13);
Avatar
if it's a console command you can also call it from the AShooterPLayerController
Avatar
ah ok
Avatar
also actually if you look on my git in the ArkBotHelper plugin i have custom functions for wiping tribe dinos/structures
Avatar
sweet
Avatar
A Connection Platform To The Arkbot Web Inteface. Contribute to WETBATMAN/ArkBotHelper development by creating an account on GitHub.
Avatar
@WETBATMAN thanks, that helped put me in the right direction
Avatar
np
Avatar
I seem to be having an issue unloading my plugin from console, it says plugin is not loaded (edited)
5:05 AM
the problem is that all the functions work and it seems functional
5:05 AM
If I load it then unload it its seems fine, but when I try to remove the plugin files so that I can replace with new ones it can not remove the files, so they stay locked (edited)
5:05 AM
this only seem to be when it is loaded from server startup
Avatar
the only way at the moment to get around it, is to restart the server
Avatar
plugin unload command is case sensitive
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 8/24/2019 5:27 PM
UShooterCheatManager cheatManager = UShooterCheatManager(); cheatManager.DestroyTribeIdDinos(13);
(edited)
5:27 PM
I guess this will never work
5:28 PM
You're creating an struct that never has been associated with the ARK Server / World
5:28 PM
You need to get the CheatManager from a User for example and then try to use it
Avatar
thanks @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 , but how do I execute it on a timer instead of getting a user to execute it (edited)
3:52 AM
uh.......wiki seems down again
3:52 AM
3:56 AM
and now
Avatar
is anyone using timers successfully I have a timer that starts with onload and it runs continuously without fail . API::Timer::Get().RecurringExecute(&TimerCallBack, 300, -1, false, 0, 0); When I unload the plugin it hangs the server more or less at the time that the timer would have triggered. My guess is that its trying to call a function that has been unloaded and that is why it fails. If thats the case, how do I kill the timer on the unload section ? (edited)
Avatar
you can’t 😃
10:17 AM
using a timer in your plugin currently means it cannot be unloaded on runtime
Avatar
Damn......ok
12:09 PM
Tx
12:09 PM
It seems to hang after a couple of runs anyway
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 8/25/2019 12:30 PM
Well it certainly can
12:30 PM
You need to remove the Timer on Plugin unload
12:31 PM
Then the API will not try to call the callback of the Timer anymore since it got removed
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 not sure how to do that, do you perhaps have an example for me that works
Avatar
Arg, why this have to be so mean to me...
2:03 AM
one missing & and it spews completely unrelated errors xD
Avatar
yup that's c++ for you
Avatar
is there anyway to cancel unload or tell it to wait for something to finish before unloading ?
Avatar
Seems like the functionality to remove timer on UNLOAD has been removed in v3.2
Avatar
anyone else experience issues with v3.2, I have updated my one server from 3.0 to 3.2 and now it continuously and random times stop responding. Hoping its just a coincidence (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 8/27/2019 9:16 AM
ArkApi::GetCommands().RemoveOnTimerCallback("MyTimer");
9:18 AM
actually.. never really worked with RecurringExecute, this example above is just for a usual timer.. where you can also delay something if you do it right 😛 (edited)
9:22 AM
also, when you set the RecurringExecute async, I wouldn't recommend accessing the world with all its actors on the callback function due to no mutual exclusion --> could cause a crash (edited)
Avatar
I will only be using the timer for requests, so that I can make periodic calls to my api
Avatar
void MyTimer1CallBack() { //DoStuffHere } Load() { ArkApi::GetCommands().AddOnTimerCallback("MyTimer1", std::bind(&MyTimer1CallBack)); } Unload() { ArkApi::GetCommands().RemoveOnTimerCallback("MyTimer1"); } (edited)
Avatar
It works perfectly. 😀 Thanks a stack @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰
Avatar
damn GetIPAddress() still returns steam ID 😦
Avatar
How do I get current player controller for bool Hook_AShooterGameState_AllowDownloadDino(AShooterGameState* _this, TSubclassOf<APrimalDinoCharacter> TheDinoClass)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 8/27/2019 1:49 PM
From that function you cannot obtain the controller.. I mean you could try checking all uploaded dinos and compare to the current one.. but that is just stupid.. (edited)
1:49 PM
AShooterPlayerController::ServerDownloadDino(FARKTributeDino); should be the right one for you
Avatar
Everyday spent on these plugins gives me a new appreciation for C# again.
5:16 AM
😄
Avatar
is there a recommended max amount of hooks per plugin ?
7:32 AM
trying to figure out why ArkApi Plugins is so unstable for me
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 8/28/2019 8:14 AM
There is no max amount of hooks.. I guess the maximum amount of hooks is the amount of functions exists in ARK 😄
Avatar
ok so its not that then
Avatar
I'll have a single hook that works perfect for a while and then the server hangs, and then for a few times it will hang after that when its triggered. at first I thought I did something wrong, but then I uploaded a single hook with no change except for adding a Log::GetLog()->info("triggered"); to see that it gets triggered. This gave me the same result. very erratic behaviour. I find this with the hooks only as I have had no issues with commands. Also these issues have been since I upgraded to v3.2 ( coincidence, maybe , i don't know ) Something else I have noticed today , Lets say I have a plugin called myTestPlugin inside I have Hook1 I add Hook2. comment out the Hook1 Compile, and the load the plugin I have a throw of a dice chance that the hook2 works, but...... if I run the same action that would have triggered Hook1, which has been commented out in this compile, it hangs the server, as if it was expecting it to be there. now after a while of clean build, rebuild and copy to server and restart server Ill get it to work eventually. If anyone has any idea of what might be going on, I would really appreciate your help. (edited)
Avatar
Hmm... i have never experienced any hangs. Maybe share more of your work maybe someone can find the issue for you?
9:36 AM
Are you compiling everything with 3.2 as well?
Avatar
yes I am compiling with 3.2 as well
Avatar
some hooks will just hang in certain cases
10:35 AM
for example i add the console command hook but if i try to unload the plugin from the console after adding it server will hang and close
10:35 AM
stuff like that.
Avatar
main.cpp #include "stdafx.h" #include "API\ARK\Ark.h" #include <iostream> #include <string> #include <fstream> #include "API/ARK/Actor.h" #include "Timer.h" #include "ChatCommands.h" #include "Hooks.h" #include "Timers.h" #pragma comment(lib, "ArkApi.lib") void Load() { RegisterChatCommands(); RegisterHooks(); RegisterTimers(); } void Unload() { UnRegisterChatCommands(); UnRegisterHooks(); UnRegisterTimers(); } Hooks.h #pragma once #include "DinoDownloadPreventionHooks.h" #include "DinoUploadPreventionHooks.h" void RegisterHooks() { Register_DinoDownloadPrevention_Hooks(); Register_DinoUploadPrevention_Hooks(); } void UnRegisterHooks() { UnRegister_DinoDownloadPrevention_Hooks(); UnRegister_DinoUploadPrevention_Hooks(); } DinoDownloadPreventionHooks.h #pragma once DECLARE_HOOK(AShooterGameState_AllowDownloadDino, bool, AShooterGameState*, TSubclassOf<APrimalDinoCharacter>); bool Hook_AShooterGameState_AllowDownloadDino(AShooterGameState* _this, TSubclassOf<APrimalDinoCharacter> TheDinoClass) { FString ClassName; APrimalDinoCharacter* dinoClass = (APrimalDinoCharacter*)TheDinoClass.uClass->GetOwnerClass(); dinoClass->NameField().ToString(&ClassName); Log::GetLog()->warn("Dino Class Name : {}", ClassName.ToString()); return AShooterGameState_AllowDownloadDino_original(_this, TheDinoClass); } void Register_DinoDownloadPrevention_Hooks() { ArkApi::GetHooks().SetHook("AShooterGameState.AllowDownloadDino", &Hook_AShooterGameState_AllowDownloadDino, &AShooterGameState_AllowDownloadDino_original); } void UnRegister_DinoDownloadPrevention_Hooks() { ArkApi::GetHooks().DisableHook("AShooterGameState.AllowDownloadDino", &Hook_AShooterGameState_AllowDownloadDino); }
10:39 AM
DinoUploadPreventionHooks.h DECLARE_HOOK(AShooterPlayerController_ServerUploadDino_Implementation, void, AShooterPlayerController*, APrimalDinoCharacter*); void Hook_AShooterPlayerController_ServerUploadDino_Implementation(AShooterPlayerController* _this, APrimalDinoCharacter* DownloadedDino) { Log::GetLog()->info("AShooterPlayerController_ServerUploadDino_Implementation"); AShooterPlayerController_ServerUploadDino_Implementation_original(_this, DownloadedDino); } void Register_DinoUploadPrevention_Hooks() { ArkApi::GetHooks().SetHook("AShooterPlayerController.ServerUploadDino_Implementation", &Hook_AShooterPlayerController_ServerUploadDino_Implementation, &AShooterPlayerController_ServerUploadDino_Implementation_original); } void UnRegister_DinoUploadPrevention_Hooks() { ArkApi::GetHooks().DisableHook("AShooterPlayerController.ServerUploadDino_Implementation", &Hook_AShooterPlayerController_ServerUploadDino_Implementation); } (edited)
Avatar
when making my mod communicate to my plugin via the console command hook
10:40 AM
my server also hanged and closed if i returned something in that hook
10:40 AM
my solution was switching the communication function lol
10:40 AM
the same hook and the same return didn't crash without the mod
10:41 AM
but i don't think there are any other dino download hooks ?
Avatar
its the only one I have found that was working reliably until recently
10:42 AM
the behaviour is erratic
10:42 AM
then it work fine
10:42 AM
then after another compile it doesnt
10:43 AM
then fine again
10:44 AM
but this is just an example of what i have tried in its simplest form and behaviour does not seem to stay stable
Avatar
i don't think you nullptr check it do you ?
Avatar
not for this example no
10:55 AM
its a simple test, upload a dodo, download a dodo
10:55 AM
expect results to always be the same
Avatar
It must be the ghost in the machine 😄
11:27 AM
....and idiot behind keyboard😆
11:27 AM
who knows....lol
Avatar
All of these hooks result in a timeout bool Hook_UPrimalItem_CanBeArkTributeItem(UPrimalItem* _this) bool Hook_UPrimalItem_IsReadyToUpload(UPrimalItem* _this, UWorld* theWorld) bool Hook_UPrimalInventoryComponent_ServerAddToArkTributeInventory(UPrimalInventoryComponent* _this, FItemNetID* itemID, TArray<unsigned __int64> SteamItemUserIds, FItemNetInfo* AlternateItemInfo) void Hook_UPrimalInventoryComponent_OnArkTributeItemsAdded(UPrimalInventoryComponent* _this, bool Success, TArray<FItemNetInfo>* AddedItems) void Hook_UPrimalInventoryComponent_AddArkTributeItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bFromLoad) UPrimalItem* Hook_UPrimalInventoryComponent_AddItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer, bool bIgnoreAbsoluteMaxInventory)
Avatar
can't be
Avatar
I am trying prevent an item being uploaded to ark tributes, any ideas
Avatar
i'm using AddItem
1:52 PM
in multiple plugins
Avatar
to stop uploads ??
Avatar
no
1:52 PM
handcuff detection
1:52 PM
and some other stuff
1:53 PM
item bans
Avatar
oh yeah sorry the last one is not suppose to be part of the list my bad 😆
Avatar
hehe
Avatar
any idea how i could stop uploads for items
1:54 PM
I have dinos blocked for upload and download and works perfectly now
Avatar
does the hook time out by doing anything in it ?
1:56 PM
or just hooking ?
Avatar
instead of it returning true I make it false
Avatar
and it times out ?
Avatar
which usualy work
1:57 PM
yes
Avatar
huh
1:57 PM
i would advise you to look how ark does it in IDA
1:57 PM
maybe you'll even find a function that's used but not in the API
1:57 PM
you can then hook it manually
Avatar
the error on ark is Refreshing inventory failed 006 - timedout
Avatar
what you can do
1:59 PM
is instead of returning false
1:59 PM
get a reference to that item
1:59 PM
and remove it
1:59 PM
if you return false the item might appear in the inventory still
2:00 PM
but not be accessible (edited)
Avatar
tried that too with similar issue also some server hangs/crashes
2:02 PM
maybe set this to false on the item ?
Avatar
just like this ??? _this->CanBeArkTributeItem = false;
Avatar
one sec
2:08 PM
yeah try that
2:09 PM
you might need to update the item
2:09 PM
after for changes to take place (edited)
2:09 PM
_this->UpdatedItem(false);
2:09 PM
like this
2:10 PM
and it takes no arguments
2:11 PM
2:11 PM
error is, must be a modifiable often
Avatar
it's a function actually
2:12 PM
so maybe you can hook that instead
2:12 PM
but then you'd have to detect when the item is about to be uploaded
Avatar
I have
2:13 PM
Hook_UPrimalItem_CanBeArkTributeItem(UPrimalItem* _this)
2:14 PM
but this one takes a parameter
Avatar
hmm it's a bitfield
2:14 PM
or rather it returns one
Avatar
yeah returns bool
Avatar
found it
2:15 PM
gimme one second
2:15 PM
item->bCanBeArkTributeItem() = false;
2:15 PM
item is UPrimalItem
Avatar
doesnt timeout, but it doesn't do anything either
Avatar
did you update the item after ?
Avatar
uh .....no
2:50 PM
2:51 PM
same result
Avatar
What development environments are you guys using for c++
Avatar
for this? MSVC 2019
Avatar
Is there not a transform -> location function available already? oO
5:25 PM
can't seem to find one anywhere
Avatar
FVector loc; maps->GetTargetPathfindingLocation(&loc);
7:37 PM
Well, ok then.... (edited)
Avatar
you need actor location ?
7:39 PM
FVector StructPos = _this->RootComponentField()->RelativeLocationField();
7:39 PM
this is how i get it for a structure
Avatar
Ill try that in a sec.. i looked at how they do it currently (edited)
8:09 PM
same results :3
Avatar
huh that's weird it works for me
Avatar
I mean, they both give location vec
9:29 PM
ended up using yours though, looks a bit cleaner.
Avatar
currently moved from VS2017 to VS2019, I have loaded the project up and build it. but when I search for something in the "Search Solution Explorer" the ark files from main external library does not show up. If I expand external dependencies it does not show up either. Any one have an idea of how I can get it working again ?
Avatar
HOw do we check the inventory for the current AShooterPlayerController
Avatar
UPrimalInventoryComponent* inventory = player_controller->GetPlayerCharacter()->MyInventoryComponentField(); (edited)
Avatar
damn....I was way off
3:14 PM
😆
3:14 PM
thanks
3:15 PM
it was returning every ark component
3:15 PM
lol
Avatar
happens to the best of us hahaha
Avatar
ok so I have UPrimalInventoryComponent* playerInventory = _this->GetPlayerCharacter()->MyInventoryComponentField(); TArray<UPrimalItem *> inventoryItems = playerInventory->InventoryItemsField(); inventoryItems return unique list of inventory items.....231 of them, which mostly is not in my inventory
3:34 PM
so...still getting the same result
3:35 PM
i am trying to get all inventory items for my character
Avatar
void Hook_AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation(AShooterPlayerController* _this, UPrimalInventoryComponent* inventoryComp) { auto playerInventory = _this->GetPlayerCharacter()->MyInventoryComponentField(); if (playerInventory) { auto inventoryItems = playerInventory->InventoryItemsField(); if (inventoryItems.Num()) { if (inventoryItems.Num() > 0) { for (auto item : playerInventory->InventoryItemsField()) { if (item) { FString ClassName; item->NameField().ToString(&ClassName); if (!ClassName.IsEmpty()) Log::GetLog()->warn("----Item Class : {} ", ClassName.ToString()); } } } AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation_original(_this, inventoryComp); } (edited)
3:53 PM
somehow its seeing 231 items instead of 4 This character is also the only one on the map, since its a new server and no one else can access it.
Avatar
what are the names
3:55 PM
engrams are also inventory
3:55 PM
it could be that you're seeing your engrams 🙂
Avatar
its a unique list of what seems craftable items
Avatar
Blueprints probably
4:03 PM
Should be some bitfields you can use to filter them?
Avatar
isDefaultItem
4:03 PM
is what filters them i think
Avatar
it actually says engram
4:03 PM
lol
4:03 PM
4:05 PM
yeah its all mixed together
Avatar
Could probably do !IsA whatever class type an engram is
Avatar
no need
4:05 PM
all engrams have IsDefaultItem = true
Avatar
Ahhh, neat
Avatar
there is only a IsDefaultSubObject
Avatar
!item->bIsEngram()() && !item->bIsInitialItem()()) (edited)
Avatar
ah ok
Avatar
fantastic thanks that work great
Avatar
successfully blocking character from transfering with banned itemsbanned items
4:51 PM
.......with some minor glithes left lol
Avatar
how do I see with IDA where my function is called from (edited)
Avatar
graph view should tell i think
5:06 PM
or get the parents
Avatar
xrefs (ctrl+x), but static analysis may not be enough
Avatar
you may need a debugger
5:09 PM
mmmmmm
Avatar
no this is too much for me
5:16 PM
its 3am need some sleep too
5:16 PM
lol
5:17 PM
try and figure out how IDA works over the weekend maybe lol
5:18 PM
Thanks for the help, see ya later
Avatar
Xref in Ida, should see it in rightclick of disassembly
7:54 PM
Also.. f5 on disassembly will show a C representation, which is easier to read
Avatar
@Michidu i need to get at a function GetObjectsOfClass i don't see a way to get to this with the current templates as they all seem to expect a class. am i missing something or should i roll out a template for bare functions?
Avatar
nevermind, im dumb
Avatar
yeah... it hates me too... it keeps trying to call compress2 instead of GetObjectsOfClass
Avatar
08/30/19 22:39 [API][info] Cross Check2 FSocketBSD.SetMulticastTtl 20336080 08/30/19 22:39 [API][info] Cross Check2 Global.GetObjectsOfClass 18957328 08/30/19 22:39 [API][info] Cross Check2 AActor.OnTakeAnyDamage 720 it's physically in the table
Avatar
yup.. i am more dumber
Avatar
have you fixed it?
Avatar
thanks @antihax but I tried F5..............guessing its not available with the free version, it says Sorry, you do not have any decompilers on windows
1:22 PM
I thought IDA is a decompiler
1:28 PM
Sorry, my bad, I see its a disassembler and an additional decompiler is required
1:29 PM
Any recomendations
Avatar
you can find leaked 7.0 version
1:29 PM
care 2 share ?
1:29 PM
lol
Avatar
magnet:?xt=urn:btih:169DFE1E10161FFA82B786BF89F05AEA6BCD4510&tr=http%3A%2F%2Fbt2.t-ru.org%2Fann%3Fmagnet&dn=IDA%20Pro%207.0.170914%20WIN%5CMAC%20x64%20%2B%20Hex-Rays%20Decompilers%20(x86%2C%20x64%2C%20ARM%2C%20ARM64)%20%5B2017%2C%20ENG%5D
1:41 PM
the patch contains a trojan................
1:46 PM
or does it only relate to the patching and nothing else
Avatar
maybe because it's leaked you dont need patch though
Avatar
Yeah, I fixed it. It was a missing staticclass function causing the compress2 call.
Avatar
thx @Michidu
Avatar
If you work in the space, it is well worth purchasing IDA Pro btw.
6:24 PM
Ghidra is another good one that is completely free, but it has difficulties with very large binaries like ATLAS
6:25 PM
has cute animations though :3
Avatar
Hi everyone. I'm not really into plugin making but I have a need. So i'm looking for someone who can make me a bot, of course this work will be paid. Please contact me if your interessted
Avatar
that's awfully vague.
Avatar
It is, but ida pro price is crazy
Avatar
ComponentMap CreatureDeathHarvestingComponent_RockGolem_Tundra_C PrimalItemResource_Crystal_Quartz_C PrimalItemResource_Crystal_Tellurite_C PrimalItemResource_Crystal_Amethyst_C PrimalItemResource_Stone_Granite_C PrimalItemResource_Stone_Marble_C PrimalItemResource_Flint_Basalt_C PrimalItemResource_Flint_Chalcedony_C PrimalItemResource_Oil_Crude_C PrimalItemResource_Oil_MineralOil_C PrimalItemResource_Metal_Iron_C PrimalItemResource_Metal_Silver_C that just tickles me to death
10:42 PM
not sure if Ark has mobs like that
Avatar
Does anyone know how to get dinosaur attribute points?
6:57 AM
CurrentStatusValuesField can only get current properties
6:57 AM
How to convert to attribute points
Avatar
I solved it.
7:23 AM
use char* stats = status->NumberOfLevelUpPointsAppliedField()();
👍 1
PirateParrot 1
Avatar
https://github.com/Michidu/ARK-Server-API/pull/31 let me know if any of that is a problem. I am using most of it, so I know it at least works.
Add a bunch of ATLAS API and structures around harvestable resources. Some other files were modified by auto-formatter, but they appeared more consistent after. TIndirectArray was added as it was n...
Avatar
Hey, @Foppa I've been away on vacation, so didn't see your message until now (https://discordapp.com/channels/513432877904691202/513432877904691205/613114447715631134). Have you been able to work it out? 🙂
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
Avatar
HI @Anarki I have been focusing on some other projects, but that shouldn't be an issue. I can take look when i got the time
Avatar
Awesome, appreciate the reply, cheers! 🙂
Avatar
What is ActorStasis and CharacterBasing (edited)
Avatar
is there a way to replace one item with another when additem is called
Avatar
yeah
12:12 PM
remove the item being added and add the one you want 🙂
12:12 PM
that is the cleanest way i'd say
Avatar
I have tried a couple of things, and the latest is controller->GiveItemNum(287, 1, 0, false); for (auto item : _this->InventoryItemsField()) { FString ClassName; item->NameField().ToString(&ClassName); if (ClassName.ToLower().Contains("poop")) { Log::GetLog()->warn("replace Item with poop"); /* FItemNetInfo netinfo; item->GetItemNetInfo(&netinfo, false); auto netID = netinfo.ItemIDField(); return UPrimalInventoryComponent_ServerAddToArkTributeInventory_original(_this, &netID, SteamItemUserIds, &netinfo); */ } } }
12:14 PM
the commented out section crashed the server
Avatar
FItemNetID itemID; itemID = theItemInfo->ItemIDField(); _this->RemoveItem(&itemID, false, false, true, true);
12:15 PM
do it like this
12:16 PM
UPrimalInventoryComponent* _this,
12:16 PM
in this case
Avatar
so for adding and item I want in its place ?
12:22 PM
_this->AddItem
12:22 PM
but how do i create the new item
Avatar
player_controller->GiveItem(&Out, &fBlueprint, Quantity, Quality, IsBP, false, 0);
12:23 PM
you spawn it 😄
Avatar
oh ok like i did above, so its not quite a swap then
Avatar
are you planning to use the item swapping only for players ?
Avatar
then it's better to use GiveItem
Avatar
but brings me back to ......if I transfer an item to ark tribute how would I swap it with another item so that the new itemgets transfered instead of what the player tried to transfer
Avatar
i guess you have to swap it upon placement into the tribute then
Avatar
like....a players tries to transfer metal but instead poop gets transfered
12:29 PM
like when its completed with transfer
Avatar
upon Additem to the tribute
12:29 PM
or the obelisk
Avatar
how do you distinguish between player inventory and obelisk or tribute
Avatar
good question 😂
12:33 PM
AddItem has an inventory ref
12:33 PM
maybe you can find out whose inventory it is by checking the class
12:33 PM
or something similar
Avatar
ok ill try a couple of things
12:34 PM
thanks for that
Avatar
please can someone explain the differences to me or give me a link
9:15 AM
for object *object **object &object &&object
9:16 AM
I get that &object passes it by reference....... and just plain object passes by value. but what is the rest (edited)
Avatar
trying to get the netID for an item in inventory, but it breaks at the point where I get ItemIDField for (auto item : _this->InventoryItemsField()) { FString ClassName; item->NameField().ToString(&ClassName); if (ClassName.ToLower().Contains("poop")) { Log::GetLog()->warn("replace Item with poop"); FItemNetInfo netInfo; item->GetItemNetInfo(&netInfo, false); if (&netInfo) { Log::GetLog()->warn(" poop --->> NetInfo"); FItemNetID* netID; netID = &netInfo.ItemIDField(); /////--->>>>seems to be breaking here if (netID) { itemID = netID; AlternateItemInfo = &netInfo; } } break; } } (edited)
Avatar
it depends on a context, if you mean what they mean in the function arguments, then 1) pass by value, so you make a copy of the object and pass the copy to the function (can be also slow if object is big) 2) by pointer, you only pass an address where object is located. Very fast, but a function will receive exactly same object (not a copy of it), so you should remember it if you plan to make changes 3) mostly used with 2 dimensional arrays (pointer to pointer to object) 4) by reference, similar to pass by pointer but uses 'reference' limitations (like it can't have null value, be re-assigned,....) 5) by rvalue reference (move semantics), something relatively new. Basically, it will try to 'move' or 'steal' an object instead of copying (for example, moving std::vector will only copy a pointer to all it's elements leaving old vector empty, instead of copying them one-by-one, which is obviously much faster).
Avatar
Thanks @Michidu
Avatar
if (&netInfo) makes no sense FItemNetID* netID dont need pointer here
Avatar
trying to make sure that netInfo is not null before it continue
Avatar
it can't be null, netInfo is not a pointer
Avatar
so....only pointers can be null ? (edited)
10:02 AM
sorry for all the dumb questions
Avatar
yes when you write FItemNetInfo netInfo; netInfo must be allocated on stack and even default constructor will be called
Avatar
so I want to assign FItemNetID to FItemNetID* can I do it like this FItemNetID netID; netID = item->ItemIDField(); itemID = &netID;
10:27 AM
where itemID is FItemNetID* (edited)
Avatar
pointer to FItemNetID? why would you need it anyway?
Avatar
FItemNetID*
10:28 AM
bool Hook_UPrimalInventoryComponent_ServerAddToArkTributeInventory(UPrimalInventoryComponent* _this, FItemNetID* itemID, TArray<unsigned __int64> SteamItemUserIds, FItemNetInfo* AlternateItemInfo) (edited)
Avatar
just pass &netID
Avatar
yeah It does not get that far, it keeps crashing
Avatar
what your full code
Avatar
//check for poop item for (auto item : _this->InventoryItemsField()) { FString ClassName; item->NameField().ToString(&ClassName); if (ClassName.ToLower().Contains("poop")) { Log::GetLog()->warn("replace Item with poop"); FItemNetInfo netInfo; item->GetItemNetInfo(&netInfo, false); Log::GetLog()->warn(" poop --->> NetInfo"); //---------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>runs perfect until here FItemNetID netID; netID = item->ItemIDField(); itemID = &netID; AlternateItemInfo = &netInfo; break; } } return original (edited)
Avatar
you think its crashing when you call original?
Avatar
nah I think its when it hits here FItemNetID netID; netID = item->ItemIDField(); (edited)
Avatar
i dont think it can crash here, until item is 0
10:36 AM
actually you should see line in crash log
10:46 AM
ok I guess you might be right, it crashes when it finishes with original (edited)
10:49 AM
ultimately I just wanted to not call original at all , and just return false,so that I can prevent the item from uploading, but it it hangs the ui for a while and the time out with error 006 (edited)
10:49 AM
so, I thought replacing the item might be better, but still stuck on it
Avatar
I dont see any other logs that might tell me what the error might be
Avatar
so if you dont call original, it doesn't crash?
Avatar
it hangs for a while like nothings happening and then shows time-out type of error (edited)
11:09 AM
11:09 AM
Avatar
did you try only return original function (without your code)?
Avatar
yeah works fine, until I try to return false, or replace original variables
Avatar
try do it *itemID = newItemId;
11:13 AM
you want to change only itemID from arguments?
Avatar
and AlternateItemInfo
11:14 AM
I was guessing that i need to do both
11:14 AM
as both are passed
11:14 AM
doing just one doesnt work either
Avatar
well, try to do it as i said
11:15 AM
dont change address
11:17 AM
and i just realized that your code was wrong, netID is a temporary variable and you can't return address of it because it won't be valid after function ends
Avatar
oh yeah it will be gone as soon as it breaks out of the loop
Avatar
is there anyway to utilize a UE4 request without hooking the HTTPRequestCompleted function ? to get the response ? (edited)
Avatar
can you not just use the API::Requests
11:21 AM
or is it not the same thing that you are after
Avatar
they're slow and with multiple plugins calling them at the same time a lockup happens
Avatar
sorry, i missed your question. I haven't found an easy way to use UE4 requests, that why curl was introduced 🙂
Avatar
ah damn that sucks
Avatar
even hooking might not help, if i remember correctly they want callback to be a member function of some game class which we can't add
Avatar
i think the problem is that in devkit you have to create an event listener to have it give the response to you
11:25 AM
you have to add a custom event that handles it
11:26 AM
11:26 AM
my graphing skills aren't really that good but that's how it's done lol
Avatar
haha yeah, it's complicated
Avatar
ue4 request works great though for just POST
11:31 AM
gotta find some requests library then....
Avatar
api seems to work fine actually
Avatar
for requests after the server has started maybe
11:33 AM
but for auth it will hang
11:34 AM
if other plugins also use API requests
Avatar
they should be done in order possible we can increase speed
Avatar
what is on line 82
11:54 AM
in ItemPreventionHooks.h
Avatar
item->GetItemNetInfo(AlternateItemInfo, false);
Avatar
are you sure item isn't nullptr ?
Avatar
yeah as I can check the class name and name
11:56 AM
its almost as if it does not have netinfo
Avatar
what are you trying to get from the item ?
12:04 PM
😆
12:04 PM
Its working now
12:05 PM
oh my F$%^$%^ gosh
12:05 PM
weeks....if not months
12:05 PM
@Michidu your a genius
12:06 PM
@WETBATMAN also thanks for all your help
12:06 PM
you guys are legends
12:07 PM
apparently you only need the ItemID, for some reason last time it didnt work
12:09 PM
@WETBATMAN I was trying to get FItemNetID and FItemNetInfo from Item
12:10 PM
it all failed as I was trying to get id from info, and turns out info was failing
12:13 PM
I then got ID directly from item instead of via info, and that worked
Avatar
yeah haha i posted an example for that before
12:16 PM
ItemID1field
12:16 PM
ItemID2Field
Avatar
I've gotta question, I'm attempting to make logs (And hopefully in the future change it to something like a mysql once I've learned more) when the ark transfer is used- I am using the Server api hooker creator, I am having the hardest time finding the correct hook to use, any tips on figuring out when a function is called so I can find it quickly?
Avatar
run it through a debugger and throw a breakpoint down is prob the best way to figure stuff like that out.
11:53 PM
you can see what was actually in memory when it was called and the stack trace
Avatar
Okay thank you, I'll look into how to do that
Avatar
Depending what you are looking to do also, SQL is not the best application for dealing with logs
Avatar
discord is much easier lol
Avatar
elastic search 😛
11:56 PM
thats a bit overkill though
Avatar
yeah but it's really easy to do
11:57 PM
ShooterGameState->HTTPPostRequest("YourWebhookGoesHere", request.c_str());
Avatar
can prob do that with ES also
Avatar
True, I was thinking more along the lines of replacing making individual files for each player and making it in a lookup table for the mysql portion
Avatar
Never looked at that much, it is threaded off from the game sim?
Avatar
void __fastcall AShooterGameMode::AddToTribeLog(AShooterGameMode *this, int TribeId, FString *NewLog, ETribeLogCategory::Type Category) @Betrail that what you looking for?
12:14 AM
that is from ATLAS though, i don't have Ark
12:14 AM
https://puu.sh/EdsnB/f25ed7ff16.png it's called from all over the place
12:14 AM
the hell is a tripwire
Avatar
I was looking more into getting the information as far as what items were uploaded/downloaded
12:15 AM
Although which program is that? that looks nice
Avatar
it's trap like thingy you place
Avatar
It's IDA Pro
Avatar
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
12:15 AM
you can also check here
12:15 AM
🙂
Avatar
I prefer Ghidra but it can't handle something this large that well 😦
Avatar
How do we get an instance of a dino class from class name, so that we can get the dino type name
9:14 AM
example : auto dinoTypeName = GetDinoTypNameFromClassName("Dodo_Character_BP_C"); then return dinoTypeName as Dodo
Avatar
it can be hard but you can parse name
Avatar
Regular expression could work there
2:50 PM
^([A-Za-z]+)_Character_BP_C$
Avatar
thanks but, that does not always match the dino name
9:50 PM
so it will be hit and miss
9:51 PM
. examples (edited)
9:54 PM
Mega_Tusoteuthis_Character_BP_C ===>>> Alpha Tusoteuthis Sauropod_Character_BP_C ===>>> Brontosaurus camelsaurus_Character_BP_C ===>>> Morellatops
Avatar
dino->GetDinoDescriptiveName(&descr);
10:02 PM
returns the exact name shows ingame
10:02 PM
APrimalDinoCharacter* dino
10:03 PM
oh sorry my bad i just noticed you said you wanted it from a class name
Avatar
but does that change when the user gives the dino a name
Avatar
no it doesn't change
Avatar
ok.....cause the namefield changes when the user gives a dino a name
Avatar
i use this in many plugins and i know for a fact it doesn't change 😛
10:05 PM
as for the class name, I am just going to itterate through all dinos until I find one with the class I want then check the dino name.
10:06 PM
but, I dont like doing that, its not effecient🙄 (edited)
Avatar
So if anyone knows how to get a defaultdino class for a classname i would love to hear it 😃
Avatar
Hey. I want to get the ID of the owner of the structure in Hook_APrimalStructure_Die but instead I get the ID of the killer. Hook_APrimalStructure_TakeDamage: _this->TargetingTeamField() returns the ID of the structure owner. Hook_APrimalStructure_Die: _this->TargetingTeamField() returns the ID of the killer. Hook_APrimalStructure_Destroyed: _this->TargetingTeamField() returns the ID of the killer. What could be the reason for that? (edited)
Avatar
are you testing with c4 ?
11:35 AM
because c4 is also a structure and when it gets destroyed it will print the team id of the attacker 😄
Avatar
@WETBATMAN C4 is a structure? Wow 🙂 But how to get the structure owner ID when using C4?
Avatar
you want the owner player ? tribe ?
Avatar
Both
Avatar
targeting team field is the tribe ID
Avatar
This does not work correctly when using C4. bool Hook_APrimalStructure_Die(APrimalStructure* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { if (_this->OwningPlayerIDField() == 0) // tribe { if (Killer && Killer->IsA(APlayerController::StaticClass())) { AShooterPlayerController* player = (AShooterPlayerController*)Killer; int killerTeamId = player->TargetingTeamField(); int structureTeamId = _this->TargetingTeamField(); ArkApi::GetApiUtils().SendChatMessage(player, "TestPlugin", *FString("[Structure Death] StructureTeamId: " + std::to_string(structureTeamId))); ArkApi::GetApiUtils().SendChatMessage(player, "TestPlugin", *FString("[Structure Death] KillerTeamId: " + std::to_string(killerTeamId))); } } return APrimalStructure_Die_original(_this, KillingDamage, DamageEvent, Killer, DamageCauser); }
12:24 PM
killerTeamId always equal to structureTeamId
Avatar
well yeah because when you trigger the c4 you destroy it
12:24 PM
so you're killing your own structure in a sense 😄
Avatar
Is it possible to get the ID of the tribe that destroyed the structure using c4?
Avatar
probably with the TakeDamage hook
Avatar
Check that damage is greater than current health?
Avatar
ignore all cases where the killerTeamID and the structureTeamID are the same
12:29 PM
it's either friendly fire or c4
12:30 PM
also i'm pretty sure the APrimalStructureExplosive class got added to the API
12:30 PM
that way you can check if it's c4
Avatar
Ok, thanks for your help!
Avatar
@WETBATMAN Cannot find solution using APrimalStructureExplosive Is it good way? float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (EventInstigator && EventInstigator->IsA(APlayerController::StaticClass())) { AShooterPlayerController* player = (AShooterPlayerController*)EventInstigator; APrimalStructure_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); if (_this->HealthField() <= 0) { // Structure Died } // or if (_this->IsDead()) { // Structure Died } return 0; } }
Avatar
if _this->isA(APrimalStructureExplosive::GetPrivateStaticClass) (edited)
6:57 PM
APrimalStructure_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser);
6:57 PM
any code after this will not execute
6:57 PM
btw
6:58 PM
unless the function is a void
Avatar
I need to catch all types of weapons.
Avatar
FString getWeaponName(AController* AttackerController) { FString WeaponName = ""; AShooterPlayerController* AttackerShooterController = static_cast<AShooterPlayerController*>(AttackerController); if (AttackerShooterController && AttackerShooterController->PlayerStateField() && AttackerShooterController->GetPlayerCharacter() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() && AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()) { AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField()->AssociatedPrimalItemField()->GetItemName(&WeaponName, false, true, nullptr); } return WeaponName; }
6:58 PM
that's my function for getting the weapon name
Avatar
I have no problem with this, the code is executing 🙂
Avatar
but it won't work with c4 since it's a structure 😄
6:59 PM
oh nvm you're not returning it
Avatar
Thanks for your help. I think the current version will suit me. Let me know if you find anything better. 🙂
Avatar
hey, if it works don't touch it XD
Avatar
haha, sure
Avatar
I have been trying to get an item dropped from my my inventory, but keeps crashing void RemoveItem(AShooterPlayerController* controller, UPrimalInventoryComponent* inventoryComp, UPrimalItem* item) { FItemNetInfo info; item->GetItemNetInfo(&info, false); Log::GetLog()->warn("netinfo collected"); FVector location; FVector direction; bool fromCrosshair; controller->GetPlayerCharacter()->GetCharacterViewLocationAndDirection(&location, &direction, &fromCrosshair, 0); Log::GetLog()->warn("locationinfo collected"); Log::GetLog()->warn("Attempt a drop"); FRotator r = FRotator(0); inventoryComp->DropItem(&info, true, &location, &r, false, false, false, true); Log::GetLog()->warn("Dropped !!!!"); } (edited)
5:10 AM
I am guessing that I am assigning something wrong. Any ideas, or does anyone have anything that works for dropping an item on the ground
Avatar
why is it crashing? what's the stack trace say?
Avatar
there is none
6:53 AM
small popup comes up saying the program stopped working and thats it
6:54 AM
Avatar
Run it in a debugger or turn the crashdialog on?
6:55 AM
It should tell you what line caused the exception
Avatar
crash dialog comes on every now and then, not sure why not always
Avatar
I'm not as familiar with Ark as I am Atlas, but it shows me a stacktrace in the crash dialog
Avatar
yes I know , like this
6:57 AM
Avatar
Yeah
Avatar
it shows .......sometimes only
6:58 AM
not always
Avatar
Odd, I can't read that one anyway xD
Avatar
running crashmanager too, and it doesnt catch it either
6:58 AM
just an example
Avatar
Try a debugger?
6:59 AM
Ida has one, you can use third party ones with it too
Avatar
I found a different way around what I was trying to do, so dont need the drop function anymore. If I really need to get it working ill try debugging.
7:01 AM
Thanks for the help though (edited)
Avatar
Cool
Avatar
would be cool to know how its done though, if someone has a working example, if not ... thats ok too
Avatar
@WETBATMAN Hi again. I'm trying to use the code you suggested, but my server is crashing. bool Hook_APrimalStructure_Die(APrimalStructure* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { if (_this->IsA(APrimalStructureExplosive::GetPrivateStaticClass())) ArkApi::GetApiUtils().SendChatMessageToAll("TestPlugin", *FString("[Structure Death] APrimalStructureExplosive")); return APrimalStructure_Die_original(_this, KillingDamage, DamageEvent, Killer, DamageCauser); } (edited)
Avatar
Does it give you a stacktrace?
Avatar
could be that the class itself is fucked
6:38 PM
like APrimalStructureTurret
6:38 PM
casting to it or checking it will always crash the server
Avatar
@WETBATMAN Oh, well, okay. Thank you.
Avatar
You are missing something in config.json
7:15 PM
If I had to guess, it is APrimalStructureExplosive
Avatar
I don't use config.json, is it important to use it?
Avatar
The main one for version.dll
7:17 PM
It's how it know what to hook
7:18 PM
If it can't find it, it defaults to the first function on the list, which is compress2
Avatar
Should I put APrimalStructureExplosive here? "structures": [ ] (edited)
Avatar
Think so
7:21 PM
See if it is there already
7:22 PM
It may be a subclass if it is already there, or something else I can't see.
Avatar
It's not there.
Avatar
Ahh, good. Add it and see if it still crashes at compress2
Avatar
Thanks, I'll try!
Avatar
Could also be the prototype doesn't match, PrtivateStaticClass usually takes an argument for me.
Avatar
The server no longer crashes, but _this->IsA(APrimalStructureExplosive::GetPrivateStaticClass()) doesn't return true when I use c4 to destroy the structure.
Avatar
Check the prototype, I think it should take a const wchar*
7:51 PM
That's all defined in the API headers
7:51 PM
I'm not at my PC to check :(
7:55 PM
Oh.. also check the function to make sure someone didn't oops and do AActor::GetPrivateStaticClass or something similar
Avatar
static UClass* GetPrivateStaticClass() "wchar_t" is not required
Avatar
adding that class to the API is not a good solution
8:00 PM
it's better to add it to your plugin PDBConfig.json
8:00 PM
that way you can give your plugin to other people and it would still work
8:00 PM
otherwise not 🙂
Avatar
Where can I read about setting up PDBConfig.json?
8:03 PM
example
Avatar
Okay, I got it. Thanks.
8:05 PM
I just want to count the number of broken structures by the player and get their owner, but because of c4 it does not work.
Avatar
pdbconfig probably won't help you
Avatar
I know
Avatar
it's useful if you want to use a function that's not in the API
8:07 PM
but in this case that class is already in the API just crashes upon usage
8:10 PM
FString descr; DamageCauser->GetHumanReadableName(&descr); const float C4Multiplier = config["WeaponDamageMultipliers"]["C4DamageMultiplier"]; if (descr.Contains(L"C4")) Damage = Damage * C4Multiplier; (edited)
8:11 PM
i have a very simple way of identifying c4 in the TakeDamage hook
8:11 PM
might be useful for you
8:11 PM
but this will only work on systems running windows in english
Avatar
Can I use it in Hook_APrimalStructure_Die? (edited)
Avatar
you could probably
8:15 PM
just get the structure name
8:15 PM
this is the simplest way to do it
8:16 PM
the above example adjusts c4 damage with a multiplier defined in the config
Avatar
But there does not seem to be an explicit way to get the owner of the structure when using c4? 🙂
Avatar
should be
8:19 PM
but not sure how it would work with tribe ownership
8:19 PM
since you’re placing a structure
8:19 PM
but there should be a way to get the owner
8:20 PM
if you cannot get it to work you can always hook IsAllowedToBuild and store the owner of c4 upon placement
8:20 PM
but i would only do that as a last resort
Avatar
Well, I'll try to find ways further.
Avatar
Immortal Pancake 9/14/2019 9:03 PM
So I am pretty advanced with cpp but never worked with the api before. A server owner has offered to pay me to write some plugins for his server and I was wonderong if there were any beginner resources you could point me towards
Avatar
Immortal Pancake 9/14/2019 9:16 PM
Also maybe I'm just missing it but I cant seem to find the documentation for the api (edited)
Avatar
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
10:00 PM
most of the API is basic UE stuff with customizations from Grapeshot/whoeveer
Avatar
Immortal Pancake 9/14/2019 10:35 PM
Ok so most of it needs to be written custom such as creating custom color events and the like
10:36 PM
Server owner gave me a list of custom plugins he is interested in and most of it is now looking like the API won't be much help
10:57 AM
Any Idea how to get around this linker issue with API::Requests::Get().CreateGetRequest(url, callback, GetHeaders());
10:57 AM
unable to build project unless I comment it out
10:58 AM
if I compile the .cpp file on its own its fine, but building the entire project keeps spitting this linker issue at me
10:58 AM
☹
11:00 AM
1>ProjectCCC.cpp 1>apiCalls.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl API::Requests::CreatePostRequest(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::function<void __cdecl(bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)> const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >)" (__imp_?CreatePostRequest@Requests@API@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$function@$$A6AX_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@4@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@4@2V64@@Z) (edited)
Avatar
The Get Request works fine, just Post thats full of it
11:09 AM
Running V3.2
Avatar
Hello. Anybody have idea why 1 of my 7 servers closing query port "27017"? With reason like: https://cdn.discordapp.com/attachments/513432877904691205/620119754442670092/unknown.png
Avatar
Thst could be anything, what changed on that serversince it worked last time
Avatar
Grumpy, usually means it can't find the implimentation of a prototype
8:54 PM
So that functions implimentation is missing somehow
Avatar
So is anyone using post successfully in v3.2
Avatar
It works if you call it correctly
Avatar
GormusSenex 9/18/2019 3:10 PM
is there a trigger to hook up to when a player leaves a tribe ?
Avatar
Maybe this: DECLARE_HOOK(AShooterPlayerState_NotifyPlayerLeftTribe, void, FString*); void Hook_AShooterPlayerState_NotifyPlayerLeftTribe(AShooterPlayerState* aShooterPlayerState, FString* ThePlayerName, FString* TribeName) { AShooterPlayerState_NotifyPlayerLeftTribe_original(aShooterPlayerState, ThePlayerName, TribeName); } (edited)
Avatar
GormusSenex 9/20/2019 1:36 PM
🤔
1:36 PM
ill try, ty
Avatar
Contribute to Mr-Salt/Ark-Plugin-TribeSlotCooldown development by creating an account on GitHub.
Avatar
GormusSenex 9/21/2019 9:11 PM
perfect! ty @Mr.Salt !
Avatar
I am trying a new library, I have successfully created a test app in c++ and it works great, but I have now added the same thing into my ark plugin and now getting error 126. I do understand that its the module missing error, I am not sure where or what it wants me to do. I have tried moving the #pragma comment(lib,"cpprest141_2_10") to the top of main instead of in the class file. I have checked the references to the directories where the files are. more than that I have no idea. everything compiles, but when loading the plugin, I get error 126. Any ideas ?
5:23 AM
It would have been help full to know the path its trying to look in.
Avatar
missing a dll apparently
Avatar
but the dll is in the same directory
Avatar
is it the right one?
5:57 AM
There are usually two or three different versions
6:04 AM
oh jesus
6:04 AM
it uses a ton of DLLs
6:05 AM
6:05 AM
oooh coroutines
Avatar
I hear what you are saying, but it doesn't make sense to me.
6:35 AM
when compiling a console application it outputs a exe and a dll, moving that to another environment still works when running it, why now that its running under arkapi need all these other libraries
Avatar
Throw it in a debugger, it should help narrow it down.
Avatar
The console app project may have provided the path to the lib dlls (edited)
6:37 AM
that error is apparently "The specified module could not be found."
6:37 AM
unless i am reading the wrong docs xD
6:37 AM
thats correct
6:37 AM
doesnt tell you what module or where itwas expecting it
Avatar
yeah =\ the debugger should let you step back a few and see
Avatar
yeah ill give it a try
6:38 AM
thx
Avatar
it could also be it is incompatible with the build tools or a supporting dll i think.. not 100% on that
Avatar
oh shit I hope its not that
Avatar
I had some things like that before where i have to build with MINGW or it just wouldn't work
Avatar
if it is that, you can just build your own version since you have the source for it
Avatar
i had a similar issue when trying to load POCO requests
8:08 AM
if your library has the option to be built as static do that
Avatar
yeah, could could prob build it as static. That's a lot of dependencies xD
6:06 PM
then again, it's a fully featured https client and server
Avatar
well yeah i ditched it because i found out i could set a header with API requests too 😆
Avatar
oh.. it's a shitty one apparently =\
6:09 PM
doesn't support h2....
6:09 PM
and h3 is around the corner xD
Avatar
the GOG client uses poco
6:09 PM
also does the nvidia installer
Avatar
poco?
Avatar
yeah
6:10 PM
the web requests
Avatar
why do all these libraries hide their feature set list =\
6:11 PM
apparently POCO doesn't do it either xD
6:13 PM
it's usually a deathblow to most legacy http libraries, because they were never structured to allow completely async requests
6:18 PM
https://nghttp2.org/documentation/libnghttp2_asio.html looks interesting, but not fully complete apparently 😄
Avatar
@Michidu may we get an update to the ATLAS shop api, its currently broken after mega patch, its no longer logging players in by their steam64 id, its making a random account number and is doing so on every login. im sure permissions may also need an update (edited)
6:18 PM
3 bottom entries as example
Avatar
it's random on every login for the same person or is it really a pseudonym?
Avatar
i can log in and log out and get a different id everytime, tested on live and test server
6:34 PM
other players too, same
Avatar
that's not good 😛
Avatar
GSH | MrOwlSky 9/28/2019 6:37 PM
Can confirm atlas mega update broke shop @Michidu everyone's points got reset on ours.
Avatar
they are not reset
6:37 PM
they are just getting a new ID
6:37 PM
the DB is still intact
6:37 PM
just needs update
Avatar
GSH | MrOwlSky 9/28/2019 6:39 PM
Yeah I gotta check my db just waking up to spam of dms about it this morning lol
Avatar
thing that sucks, is once they log out, they get another new id once they log back in
6:40 PM
i have temp uninstalled shop until fix is applied
6:41 PM
also took backup of db just in case
Avatar
don't worry, mine little plugin is crashing on something so stupidly simple
7:04 PM
i think it may be a bad offset :X
7:04 PM
from the pdb
Avatar
Deleted User 9/28/2019 7:45 PM
permissions and tebex are not working either anything to do with steam ids, it seems maybe the api itself needs updated? Grapeshot must have changed something related to the ids
Avatar
I think they changed a bit more
8:08 PM
trying to see if i can figure it out atm
Avatar
probably they added a new ID system to accommodate for the game being ported to xbox
Avatar
It’s generating new ID every login, even for same person, doubt that’s it
Avatar
don't think they would change the ID system otherwise
10:14 PM
obviously xbox players won't have steamID so they'd have to do something about that
Avatar
But now I have no way of linking the shop dB to the player
10:17 PM
If that’s the case
Avatar
so, there is a really simple class i was using that is now returning shit
10:52 PM
FSeamlessServerInfo
10:53 PM
it could be related that you are also getting complete shit for steamID
10:54 PM
also the log for the shop will be writing to the wrong files if i am not mistaken because it uses similar functions to what i am
Avatar
Whatever the case, shop is down, will be waiting on @Michidu
Avatar
nope, mine was because JSON was invalid and the stupid thing just boots up anyway
1:44 AM
😐
Avatar
most likely we need a new way of getting steam id will look at it once updating is finished
Avatar
Ok thanks
Avatar
Hello guys, I don't know if this is the correct channel for this, but I wanted to ask a question. Is there a command to view ARK server logs by Rcon? I use the ARKon tool to track the status of the server and track the commands used on the server, but I found nothing about the command, and as ARKon uses Rcon, I believe there must be a command for this, could anyone tell me?
Avatar
Has anoyone found a workaround to get GetActorsField for Atlas?
Avatar
@Michidu the atlas shop plugin is not correctly calculating points. We need a hot fix soon please. (edited)
Avatar
plugin
2:42 AM
@Infiniti And It has already been reported. (edited)
Avatar
Thx
Avatar
Immortal Pancake 10/15/2019 10:54 PM
I don't suppose there is any Official documentation or tutorials for the API?
Avatar
There is a whole wiki with documentation
Avatar
@Foppa any reason why only one grid would give about a 5 second lag every 5 min point interval for the shop?
9:44 PM
all other grids remain unaffected
Avatar
No clue, don't think the shop is the reason for that. Maybe that grid is having other issues as well?
Avatar
1/49 seems so weird, i went there myself to witness the players sayins its only upon points given, i confirmed
10:51 PM
i went to C5 and sure enough right before the dialog comes up to give the points a 5-7 second lag happens
Avatar
hey guys im new in development ark plugins now i readed the beginnersguide an do everything what stand in there, now i got a problem when i start my server i become the error 1114. the Only code what i insert is : ArkApi::GetApiUtils().SendServerMessageToAll(FLinearColor(FColorList::Pink), L"This is the first plugin from FlapFlap"); So what do I wrong ? i insert it here case DLL_PROCESS_ATTACH (edited)
Avatar
nobody an answer for me ? (edited)
Avatar
1114 is generic plugin unload
9:26 PM
oh wait you attempt to send a message on plugin load ?
Avatar
yes i just wanted to test if this is working
1:36 AM
okay maybe i cannot do this on load what is the best way to test something like sendservermesage should i get some hook and send it then ?
Avatar
so you want it go out to the server when it's online for example like a chat msg? (edited)
6:30 AM
or just in the server logs
Avatar
you cannot send a message on plugin load, the game isn’t fully loaded at that point
Avatar
Is there a way to get the user's ip? I wanted to build a map with the location of the players, but I didn't find the data in my search. Is there any rcon command to display this information?
Avatar
i still haven't found a way to do it with the API so i just do it with a mod
Avatar
Which? Do you know any plugins that do this?
Avatar
the method for getting ip is broke in the api
7:01 PM
it returns steamID
7:01 PM
as far as i know no plugins can do it
Avatar
Need some help.
7:44 AM
10/26/19 07:24 [API][info] UWorld::InitWorld was called 10/26/19 07:25 [RPS][error] User not authorized. Plugin unloaded You need to buy this plugin! Check key.txt in C:\home\kunden\kd_\server\ase-win_1309\ShooterGame\Binaries\Win64
7:45 AM
i have buy one license to test it on one server and i faild. (edited)
Avatar
GSH | MrOwlSky 10/26/2019 7:43 PM
@Stofftier You need to reach out to the plugin dev directly
Avatar
ok thx ^^
Avatar
Is there an effective way to debug an 1114 error?
Avatar
nvm, I have resolved the error.
Avatar
before i spend a week digging through stuff.. has anyone ever extracted the resource requirements from items?
10:37 PM
TArray<FCraftingResourceRequirement,FDefaultAllocator> BaseCraftingResourceRequirements; looks like it is this
10:42 PM
PrimalItemConsumable_DragonsTongue_C /Game/Atlas/AtlasCoreBP/Items/Recipes/PrimalItemConsumable_DragonsTongue.Default__PrimalItemConsumable_DragonsTongue_C PrimalItemConsumableEatable_WaterContainer_C 1 PrimalItemConsumable_Vegetable_MaizeOrWheat_C 20 PrimalItemConsumable_Meat_Marrow_C 1 PrimalItemResource_Sap_BASE_C 10 PrimalItemConsumable_Herb_BASE_C 20 PrimalItemConsumable_Berry_Base_C 10 PrimalItemConsumable_Fruit_Lime_C 5 PrimalItemConsumable_Vegetable_Chilli_C 5 PrimalItemConsumable_Vegetable_Beet_C 5 yup 😄 (edited)
10:43 PM
Eatable_WaterContainer :triggered:
Avatar
is there a way to inplement in ArkShop Kits with Engrams ?
Avatar
Medicalmischief 11/14/2019 12:13 AM
So it unlocks engrams?
Avatar
There's a cheat for that, no?
Avatar
If you want WC to do something about these broken breeding settings, you can comment in this thread (if you havent done it before) https://survivetheark.com/index.php?/forums/topic/480828-what-is-wrong-with-my-imprints-timers/&
Changes on Imprint in v300.6 Hey ho, did anyone already figure out the new imprint calculation? Cuddle timers are really messed up atm. Our settings (until the patch): MaturationSpeed = x10 Cuddle Interval = x0.2 Previously this resultet in (using Rex as example): Imprints ev...
Avatar
Fatal error! VERSION: 302.51 VERSION.dll!UnknownFunction (0x00007ffd5a154219) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!FTimerManager::Tick() (0x00007ff6eef41187) + 0 bytes [c:\svn_ark\engine\source\runtime\engine\private\timermanager.cpp:1087] ShooterGameServer.exe!UWorld::Tick() (0x00007ff6eedfa185) + 0 bytes [c:\svn_ark\engine\source\runtime\engine\private\leveltick.cpp:1294] ShooterGameServer.exe!UGameEngine::Tick() (0x00007ff6eed6163e) + 0 bytes [c:\svn_ark\engine\source\runtime\engine\private\gameengine.cpp:1170] ShooterGameServer.exe!FEngineLoop::Tick() (0x00007ff6ed9a5bf6) + 0 bytes [c:\svn_ark\engine\source\runtime\launch\private\launchengineloop.cpp:2432] ShooterGameServer.exe!GuardedMain() (0x00007ff6ed9a1a9c) + 0 bytes [c:\svn_ark\engine\source\runtime\launch\private\launch.cpp:140] ShooterGameServer.exe!GuardedMainWrapper() (0x00007ff6ed9a6bca) + 5 bytes [c:\svn_ark\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] ShooterGameServer.exe!WinMain() (0x00007ff6ed9a6d21) + 8 bytes [c:\svn_ark\engine\source\runtime\launch\private\windows\launchwindows.cpp:213] ShooterGameServer.exe!__tmainCRTStartup() (0x00007ff6efd4b725) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] KERNEL32.DLL!UnknownFunction (0x00007ffd7d0913f2) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ffd7fa154f4) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ffd7fa154f4) + 0 bytes [UnknownFile:0]
Avatar
Does anyone else have this problem
Avatar
hi,Some people know how to judge whether there is an item in the backpack
3:03 PM
Avatar
TArray EngramBlueprintEntriesField Can't get the item name? Is there any way to get it
Avatar
If u solve that me know, i have been working on that for days (edited)
Avatar
trying to get engram name or item name ?
9:36 PM
@Foppa
Avatar
well it's for Atlas 😛
Avatar
@WETBATMAN Hello.Do you know how to get the corresponding item blueprint from the Engram
Avatar
i'm pretty sure engrams are inventory
11:27 AM
or are you talking about a specific engram you get some other way ?
Avatar
Get blueprint from engram
11:29 AM
I tried for a long time, can't do it
11:31 AM
Also can't get the item name from engramentry
Avatar
never tried to get full path from engram
Avatar
For example, use blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponPike.PrimalItem_WeaponPike' to get EngramEntry_Pike_C
Avatar
Spikeydragoon 12/7/2019 7:21 PM
Yeah i was thinking of finding something similar for dino name from blueprint.
Avatar
not all dinos have the same name displayed ingame as in the BP
7:23 PM
the reaper is named Xenomorph
7:23 PM
the reaper is named Xenomorph
7:23 PM
for example 😛
7:25 PM
if you're spawning the dino you can copy the API spawn dino function and then use the spawned actor (dino) to get the name
Avatar
Spikeydragoon 12/7/2019 7:31 PM
right but if your not using the spawn dino function which returns the dino to allow that and using the rcon command which doesnt return dino then makes it harder to get dino name hence wanting to get it from blueprint.
Avatar
void SpawnSetupDino(FString* DinoBlueprintPath, FString* SaddleBlueprintPath, float SaddleQuality, int DinoLevel, FString* DinoStats, float SpawnDistance, float YOffset, float ZOffset) { NativeCall<void, FString*, FString*, float, int, FString*, float, float, float>(this, "UShooterCheatManager.SpawnSetupDino", DinoBlueprintPath, SaddleBlueprintPath, SaddleQuality, DinoLevel, DinoStats, SpawnDistance, YOffset, ZOffset); }
7:32 PM
spawn setup dino is a function too idk why you're using an RCON command for it
7:34 PM
you can probably hook it and get the dino name from the function itself 😛
7:35 PM
or pull dino name from config
Avatar
someone knows how to hook the function that adds items into the player inventory?
Avatar
AddItem is the general hook
8:34 PM
i use it to see when a player gets handcuffed 😛
8:35 PM
UPrimalItem * Hook_UPrimalInventoryComponent_AddItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer, bool bIgnoreAbsoluteMaxInventory) { UPrimalItem* item = UPrimalInventoryComponent_AddItem_original(_this, theItemInfo, bEquipItem, AddToSlot, bDontStack, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer, bIgnoreAbsoluteMaxInventory); if (item) { FName ItemName = item->NameField(); FString FItemName; ItemName.ToString(&FItemName); if (FItemName.Contains("WeaponHandcuffs") && item->bEquippedItem()() == true && item->OwnerInventoryField()->GetOwner()) { AActor* Actor = item->OwnerInventoryField()->GetOwner(); if (Actor && Actor->IsA(AShooterCharacter::GetPrivateStaticClass())) { AShooterCharacter* Character = static_cast<AShooterCharacter*>(Actor); AddToHandcuffsArray(Character, nullptr); } } } return item; }
Avatar
nice 😏
Avatar
Is there a way to get all the items in the game, I seem to only get some of them using MasterItemListField
Avatar
maybe they have separated items from each dlc ? Just a though
Avatar
@Jenda But someone still seems to be able to extract everything
6:21 PM
Avatar
I'm pleb in ark c++ development, i was just thinking, maybe they used different librarys for other dlcs or functions 😅
6:22 PM
just trying to help
Avatar
I can only get blueprints of the existence of some maps
6:23 PM
I browsed the entire Actor.h and found nothing
Avatar
@cokll some maps
11:18 PM
don't have all bps
Avatar
Has anyone tried using custom gravity plugins? As in ones that change the direction of gravity dynamically? For ark specifically
Avatar
@substitute It seems like this
Avatar
Hi guys, I have this new issue ive never seen before. Randomly, my server console will display UWorld : InitWorld was called from API? The server console does not crash and switches to initialising and gets stuck. Any help would be great, please @ in any reply
Avatar
Julius Caesar 12/20/2019 7:58 AM
Hello my dear friends, how i can to get info (players, map, steam id and last connection server) e.t.c battlemetrics This service used api? But how? Discord have analog my question bots - eye bot, haxbot I'M interested only official server information How this site and bot search information on player server's, listing online player and steam id... Sry my English bad.
Avatar
BM cant get steam id from every server, but other data you can get using steam queries
Avatar
does anyone know how to get the crossarkchat to work, keep getting an errocode 127
Avatar
the unmaintaned one ? (edited)
Avatar
the free one
10:31 AM
I guess thats the unmaintained one then.......by Ownprox
10:35 AM
Cross Server Chat 1.0
10:39 AM
ugh.....why does it even exists
Avatar
no there is another one that's sqlite based
10:43 AM
that one is unmaintained
Avatar
just found Cross Server Chat 1.7 ....will try that first
10:44 AM
thanks though
Avatar
yea the other one will break RCON chat
11:14 AM
this is all I get from 1.7
11:14 AM
error...error.....try again later
11:14 AM
so then which one would you recomend
11:15 AM
?
Avatar
i personally use DiscordIntegrator
11:16 AM
i used to use AdvancedChat (which has that crosschat you're using built in)
11:16 AM
but it caused horrible lag lol
11:16 AM
it would worldsave every time a crosschat message was sent
11:16 AM
i think prox fixed it by now but i haven't used AdvancedChat after
Avatar
Julius Caesar 12/23/2019 6:06 AM
@Michidu can i tell u in pm? In my question (edited)
11:02 AM
Any Idea why this happens every now and then ?
Avatar
@Hamilton Seems similar to something I get from time to time, try clicking on that window and press escape 1 or twice and check the result with the game. No idea why it does that, it can be very annoying.
Avatar
@Michidu
7:14 PM
down
Avatar
something weird with it today
Avatar
emmm crashed again
8:34 PM
@Michidu
8:36 PM
hardware malfunction?
Avatar
a white guy 12/24/2019 1:25 AM
doh website still down it seems
1:26 AM
or is this just an intermittent thing
Avatar
@Michidu
Avatar
up now
Avatar
Julius Caesar 12/25/2019 4:41 AM
Ho can help
4:41 AM
?
Avatar
English? (edited)
Avatar
Julius Caesar 12/26/2019 9:39 PM
Need change request discord 0.9.6 to new version how can help me? (edited)
9:40 PM
Library
9:40 PM
In project
Avatar
How do I compile the dll so that it contains all the dependencies , is it even possible
Avatar
are we able to get http error codes from the requests ?
12:42 AM
instead of always true
Avatar
Which http error codes @Grumpy
Avatar
http status codes like 401 402 403 404 500 ...........
Avatar
Yes I know what the error codes are
7:06 AM
I mean what context
7:06 AM
What's getting them
Avatar
there is nothing in the ArkApi Request (get or post) that return status codes at the output side of things. the get and post request only tell you that yes it was successful and returns data if included, or false. that is very limiting and also incorrect as I do not expect true when its not 200. (edited)
7:11 AM
With the ArkApi, You make a get request......(your api)server returns 402 or 403 or 500 with no aditional data..........ArkApi request return true with no data.
7:11 AM
It would be more useful if it returned the status codes as well
Avatar
@Grumpy const bool result = API::Requests::Get().CreateGetRequest(url,[](bool success, std::string response) { if (!success) { return; } you code });
2:25 PM
It can do it
Avatar
@Grumpy There's plenty of times you don't get 200 that are successful
7:26 PM
a 204 is a successful request with no response (no content)
7:27 PM
Any valid code from 200-299 is a success code. (edited)
Avatar
Yes, but a 40x or 50x should not be considered success and current it does
Avatar
@Michidu I'm going to add some enums to the api
9:42 PM
I've forked and added two already
Avatar
great job a pull request would be nice when you are done
Avatar
b_man_breal 12/31/2019 7:27 PM
Is any one, here, familiar with applying tags to objects in the dev kit? I'm trying to find out if there is a tag array referencing all tame dinos.
Avatar
@Michidu I seem to upload the plugin in the wrong place....
Avatar
Guys, I need help to get over a hurdle please. No matter how basic of a plugin I make, I am always getting Error Code: 126 when I try to load it up. I've even tried compiling others code that should be working. There must be something I"m doing wrong with my compile (I'm guessing).
1:41 AM
I'm all working per the google docs for setup and compile, so not sure what I'm missing.
Avatar
Fixed by installing latest VS C++ redistributable, that is a 2015-2019 all inclusive package. https://support.microsoft.com/en-ca/help/2977003/the-latest-supported-visual-c-downloads
This article lists the download links for the latest versions of Visual C++.
Avatar
Hey I’m a server owner and I was wondering if anyone here could help me with some coding as I am trying to make my server we’re players get instant level ups upon joining and creating a survivor can anyone help me??
Avatar
substitute 1/5/2020 5:14 AM
@Matthew_
5:14 AM
Like on spawn?
5:14 AM
That's not intrinsically hard
5:15 AM
Though you might be able to do it with just INI settings
Avatar
anyone good with php around ?
Avatar
substitute 1/5/2020 4:11 PM
@vas what’s up
Avatar
nice channel lol
Avatar
substitute 1/6/2020 2:12 PM
@nickismeta
2:12 PM
What are you trying to setup?
2:12 PM
I have a job and university already ... But I can give some guidance
Avatar
b_man_breal 1/7/2020 7:23 PM
Hi, is it possible, in blueprint, to generate a list of all modded creatures that could be spawned while the server is running?
Avatar
substitute 1/7/2020 9:48 PM
Most likely not @b_man_breal
9:48 PM
Unless you can read the spawning tables
Avatar
GormusSenex 1/7/2020 11:34 PM
Im trying to compile the arkserverapi in vs2019 but im an error on deprecated filesystem (_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING). what settings am I missing on build ?
Avatar
@GormusSenex
12:21 AM
It's not a setting
12:21 AM
Here give me a sec
Avatar
GormusSenex 1/8/2020 12:21 AM
ok nvm., i did this (for future reference - and i donno if its a right thing to do or if its obvious):
  • in the Preprocessor I added the "_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING"
-> this gave an error to the minhook library saying it was compiled on an older version. to solve that I changed the "Whole Program optimization" to No. Now compiles on VS2019
12:22 AM
@substitute ohh u beat me to it. i was writing as u wrote too 🙂
12:22 AM
Check at the bottom
Avatar
GormusSenex 1/8/2020 12:22 AM
that failed too. i tried that
Avatar
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
Avatar
GormusSenex 1/8/2020 12:22 AM
ye. failed on my compile
Avatar
Where did you add it
Avatar
GormusSenex 1/8/2020 12:23 AM
version.cpp
12:23 AM
lol. the exact same place
12:23 AM
actually
Avatar
You must have done something incorrect
12:23 AM
I compile against vs 2019 enterprise (edited)
Avatar
GormusSenex 1/8/2020 12:23 AM
most likely. im not rly into this c++ (yet)
12:23 AM
mines vs2019 pro
12:24 AM
i simply downloaded the repo and compiled as-is. didnt work. then i added that line. didnt work. then i did a bunch of other stuff that also didnt work 😂 but i got it in the end
12:25 AM
but thx tho for answering 👍 (and ye, i prolly did do something wrong lol 😂 )
12:26 AM
u sure u havnt also set the settings i did but just forgot about it ?
Avatar
I only added that one line
Avatar
GormusSenex 1/8/2020 12:51 AM
🤔
Avatar
GormusSenex 1/9/2020 8:51 AM
Got this one :
8:51 AM
But I got the files:
Avatar
GormusSenex 1/9/2020 9:18 AM
I downloaded the latest redist. Could that cause the error ?
Avatar
GormusSenex 1/10/2020 5:41 PM
ok. found out why. apparently not my own msdia140.dll works. it has to be that old one (last signed Nov 28, 2017) provided by michidu. Can any1 tell me why thats the case ?
12:31 AM
Did anyone try to use Globals::GetObjectsOfClass? I'm getting very weird crashes when trying to use it. Callstack goes into a hook of different plugin
Avatar
@DevCPP is that returning an array?
3:25 AM
that could be a thread safety issue.
3:25 AM
I'm under the impression other plugins run (or can run) their own threads.
3:26 AM
if it's an array that can be mutated, I can see how cross-thread access can cause issues.
3:26 AM
(would also explain the callstack going to another plugin)
Avatar
@substitute That function doesn't return anything. Instead, it fills out an input array. This way TArray<AActor*> actors = ArkApi::GetApiUtils().GetWorld()->PersistentLevelField()->GetActorsField(); works fine, then just need to find required entities. I don't use multi-threading in this this plugin
Avatar
Well no
8:26 PM
It is returning
8:26 PM
By reference
8:27 PM
The other plugin might be running in a different thread
Avatar
Also there’s the possibility the GetActorsField is being modified from a game thread
8:28 PM
Is gog protection your plugin or the other plugin
Avatar
I told about GetObjectsOfClass, which returns nothing. GetActorsField returns array by reference, yes. Other plugin is also my plugin, and it is single-threaded too
Avatar
The api may run the plugins on their own threads to prevent fatal crashes
8:29 PM
@Michidu would know about that
Avatar
Hm... Interested thing, thanks. Didn't know about it
Avatar
I don’t know either
8:30 PM
There’s no reason for a stack trace to jump plugins though
8:30 PM
Does your plugin hook a same function as the other?
8:31 PM
Maybe the hook isn’t completely bug free ?
Avatar
That hook is used in only one plugin
8:33 PM
I'll check it later on special test plugin, and see whether it will be leading to crash or not
Avatar
Ok
Avatar
api does not run plugins in own threads
9:51 AM
crash stack can jump like this if function is hooked
Avatar
@Michidu yes but they wrote that it is only being hooked by one function.
12:40 AM
Maybe the other hooked function can call the orignal hooked function?
Avatar
@Michidu That function hooked in another plugin, not in the plugin which causes crash This problem occurs only if I use Globals::GetObjectsOfClass static function, but, say, GetActorsField() works fine with the same environment (edited)
Avatar
Hey guys, i just quit the ark dev kit and started with the api to add more server functionality, is there anywhere some information to get started? default plugin structure and get how to get it working in visual studio?
11:07 PM
The wiki is most of the times down
Avatar
This guide is based on the Visual Studio Community 2019 version install Prerequisites: 1. https://visualstudio.microsoft.com/vs/ 2. https://github.com/Michidu/ARK-Server-API/archive/master.zip Step N1: Install Visual Studio by the link given on the first prereq...
Avatar
Oh wow im amazed i havent seen the wiki
2:49 AM
I've been trying to include building addons via vscode with the api il be sure to try and make a update if i manage to get it working
2:49 AM
If i do manage il hopefully have it posted somwhere so it doesnt get lost
Avatar
Could someone tell me how i convert APrimalCharacter* to AShooterPlayerController* ? (edited)
12:30 PM
I have this:
Avatar
So i think i have to start by converting APrimalCharacter to AShooterCharacter. but how?
Avatar
you need to get the controller
1:01 PM
from character
Avatar
GormusSenex 1/25/2020 1:01 PM
ACharacter* character = player->GetCharacterField(); APrimalCharacter* primalCharacter = static_cast<APrimalCharacter*>(character);
1:01 PM
should work but im not sure
Avatar
ye it can be casted
Avatar
GormusSenex 1/25/2020 1:02 PM
anyway now that im here. Mr @WETBATMAN how do I check a playercontroller if he is tribe owner ? i know the player->IsTribeAdmin() but is there a similar for owner ?
Avatar
that will cause crash
1:03 PM
btw
1:03 PM
calling it from the controller
1:03 PM
some ark update broke this
Avatar
GormusSenex 1/25/2020 1:03 PM
ohh
Avatar
you need to call this from player state field
1:04 PM
also state should have what you’re looking for
Avatar
GormusSenex 1/25/2020 1:05 PM
ahh thx. gonna try that 👍
Avatar
alright thx i will try
1:12 PM
hmm im confused
Avatar
@Bram you should check if whatever is taking damage in that hook is actually a player
1:12 PM
because it gets called for dinos too
Avatar
if (_this->IsAlive && _this->IsA(AShooterCharacter::GetPrivateStaticClass()))
Avatar
ah
Avatar
so do i have to cast APrimalCharacter to AShooterCharacter first and then get the controller using FindControllerFromCharacter? (edited)
Avatar
i think AShooterCharacter already has GetOwnerController
1:14 PM
but sure you can also do it with the API function
Avatar
ow okay
1:14 PM
and then.. how do i cast it 🙂
Avatar
i’m on mobile so forgive me if i fuck something up
1:15 PM
but it should be like this
Avatar
np thx anyways
Avatar
AShooterCharacter* character = static_cast<AShooterCharacter*>(YourACharacter)
1:16 PM
no errors in vs
1:16 PM
will try tysm
Avatar
GormusSenex 1/25/2020 1:17 PM
Im guessing getting owner from playerstate is in one of the tags ?
Avatar
is this the correct way to test if its a real player?
1:17 PM
_this->IsAlive && _this->IsA(AShooterCharacter::GetPrivateStaticClass())
Avatar
ye
1:17 PM
looks correct
Avatar
alright
Avatar
@GormusSenex it’s MyTribeDatasField
1:19 PM
something like this
1:19 PM
wait i use it in my fork of NPP
Avatar
GormusSenex 1/25/2020 1:19 PM
found it ty
Avatar
if (State->MyTribeDataField()->TribeIDField() == 0 || (State->MyTribeDataField()->TribeIDField() != 0 && State->IsTribeAdmin()))
1:20 PM
AShooterPlayerState* State = static_cast<AShooterPlayerState*>(player->PlayerStateField());
1:20 PM
if tribe id field in MyTiveDataField is equal to 0
1:21 PM
this means player has no tribe
1:21 PM
so in that case you probably want to treat them as owner heh
Avatar
GormusSenex 1/25/2020 1:23 PM
ig i can use OwnerPlayerDataIDField() from MyTribeDataField() ?
1:23 PM
and compare that to the players playerid
Avatar
yes that’s how they do it if you check in IDA heh
1:27 PM
for IsTribeAdmin
Avatar
GormusSenex 1/25/2020 1:27 PM
gahh.... wife wants the family to go for a walk... just as im in the coding zone... argghh 😂
Avatar
lol
1:29 PM
sometimes taking a break helps 🙂
Avatar
is there a unique id/name for the AShooterCharacter class? im trying to add a timer on the body of each player (edited)
Avatar
use either SteamID or playerID
Avatar
playerID is bound to the controller or character?
Avatar
character
Avatar
okay perfect
1:51 PM
how do i get that from a AShooterCharacter? no function or value named id
Avatar
ArkApi::GetApiUtils().GetPlayerID()
Avatar
ah stupid of me, forgot the check the api thx
3:26 PM
i want to able to cancel them when holding a specific item
Avatar
keypresses aren't sent to the server
3:27 PM
plugins can only handle server side stuff
Avatar
what does it do 😄
3:29 PM
adds a buff ?
Avatar
its the s+ tranfer tool
3:29 PM
opens the menu
Avatar
that's client side
Avatar
server doesn't do any rendering stuff
Avatar
no ik that
Avatar
also you cannot intercept events from mods
3:29 PM
only core game functions
Avatar
but its seems to be handled by server at some part
3:29 PM
okay
3:30 PM
equipping items
3:30 PM
can that be blocked server side?
Avatar
yes
Avatar
also mod items?
Avatar
yes because item equipping calls a game function
Avatar
void Hook_AShooterCharacter_StartWeaponSwitch(AShooterCharacter* _this, UPrimalItem* aPrimalItem, bool bDontClearLastWeapon) (edited)
3:31 PM
use this hook
3:31 PM
this one gets called before the animation starts
Avatar
thanks again
Avatar
i have been looking through the UPrimalItem class but cant find a way to get the blueprint path of the item. I want to test if this is the item:
4:01 PM
primal_item->BPGetItemName() seems to require weird inputs
Avatar
FString ItemString; aPrimalItem->GetFullName(&ItemString, nullptr); (edited)
Avatar
Once the wiki gets back up i imagine it would be a good idea to make so we can create pages for all the classes and hooks
4:05 PM
something like this https://wiki.garrysmod.com/page/Global/AccessorFunc
4:06 PM
But obv using that wiki software
Avatar
.ToString()
Avatar
problem was somewhere else
Avatar
what he said is still relevant 😄
Avatar
you can't print an FString
Avatar
i tried that earlier
4:13 PM
but had the same error
Avatar
ah
5:41 PM
Im missing the C++ option in the property manager in visual code, anyone knows what I can do to fix that?
5:41 PM
I choosed C++ as Project development language
Avatar
@Shorty
5:43 PM
That wrench icon
Avatar
Well that brings me exactly there where I already am
5:44 PM
I am doing the ArkAPI Basic tutorial
5:44 PM
5:44 PM
But missing the C++ Settings options right here
5:44 PM
Hope that makes it clearer
Avatar
Make sure you install the redistributable
5:44 PM
You can see more details here
5:45 PM
This guide is based on the Visual Studio Community 2019 version install Prerequisites: 1. https://visualstudio.microsoft.com/vs/ 2. https://github.com/Michidu/ARK-Server-API/archive/master.zip Step N1: Install Visual Studio by the link given on the first prereq...
Avatar
Yeah that tutorial I am currently doing
Avatar
If it's still not there try doing a restart
Avatar
what do you exactly mean by "redistributable"?
5:46 PM
I installed the C++ desktop development components
Avatar
Got that already
5:48 PM
You got one of those ?
Avatar
Both of them?
5:48 PM
Yeah the x64 one
Avatar
afaik x64 only
5:48 PM
yeah
5:52 PM
Sry currently no other language installed :/
5:52 PM
But I can do that real quick if you want me to
Avatar
When you were creating the project you made sure to select "Dynamic Linked Library" ?
5:54 PM
5:54 PM
that one
5:54 PM
didnt found that
Avatar
It's in the Ark Api basics google doc
Avatar
Yeah mb
5:55 PM
sry
5:55 PM
ty anyway I will try recreating it! 🙂
Avatar
9/10 times not fully reading the documentation for something results in 10x more time spent searching for solutions
5:56 PM
no worries, happy coding 🙂
Avatar
Yep thats true
5:56 PM
I thought that would be activated if I choose C++ as language
5:56 PM
but nope
Avatar
¯\_(ツ)_/¯
Avatar
You know a good tutorial for basic stuff about the api?
6:02 PM
The tutorial is just for basic setup if I got that one right xD
Avatar
GormusSenex 1/25/2020 6:02 PM
best thing to do is to look through michidu and ownprox code.
Avatar
We just got a wiki but i do remember a workshop type tutorial series on youtube
Avatar
GormusSenex 1/25/2020 6:03 PM
on github
Avatar
Also what meduz said, you will learn the best looking at others code
6:03 PM
Just make sure you understand what's writtend and not just copy paste since that wont get you anywhere
Avatar
Okay im not that experienced in c++ just things like java, javascript, swift and co
6:03 PM
Yeah I know that
Avatar
GormusSenex 1/25/2020 6:03 PM
i never coded c++ (im a java and c# guy) but looking through those ppls code and reading some basic stuff helps a lot ngl
6:04 PM
and then... google.. google.. google... and some more google 😂
Avatar
Yeah but there isnt much content I find on google
Avatar
GormusSenex 1/25/2020 6:04 PM
and after that is tried... u come here and ask 😄
Avatar
alright ty 🙂
Avatar
Try looking at UE4 tutorials for C++
Avatar
GormusSenex 1/25/2020 6:05 PM
ik. but im guessing 75% can be "learned" watch others code
6:06 PM
last 25% is impossible to know... except for a few ppl in here who seems to have complete knowledge lol
Avatar
And if I compile it is normal that i cant execute it with windows right?
6:06 PM
Just the command line proves that everything is fine
Avatar
GormusSenex 1/25/2020 6:07 PM
see... this i have never asked. i jsut put my code in my own ark plugin library and start a local host session. i dont know if theres any smarter way to do that
6:07 PM
for me im starting a host up sooooo many times jsut to check basic simple stuff 😂
Avatar
Takes 5 minutes for me to start up an ark server
6:08 PM
uff
Avatar
GormusSenex 1/25/2020 6:08 PM
yup. but when it works... uhh that feeling 😄
Avatar
hhahaha
6:08 PM
Well i will look at some code of them now
6:08 PM
ty bot 🙂
6:08 PM
both*
Avatar
GormusSenex 1/25/2020 6:09 PM
🙂
Avatar
@KillZone can you send me the wiki?
6:23 PM
That would be super helpful
6:23 PM
It's heavily WIP
6:23 PM
But 500 error xD
Avatar
so expect 500's and the likes till it gets more stable
6:23 PM
yeah
Avatar
So I should just reload and it may give me a wiki?
6:24 PM
yeah got it lol
Avatar
Yeah im not too sure whats going on behind the curtains for the instability but it is new so it's sortof a given
Avatar
Hmm seems like it just display some normal commands
6:30 PM
for the api itself
6:30 PM
But not for developing parts
6:30 PM
oh
6:30 PM
maybe im just blind again
6:30 PM
y
Avatar
Okay im sry but I got another question
6:42 PM
API/ARK/Ark.h where do I get that file from
6:42 PM
I imported the ArkAPI lib
Avatar
GormusSenex 1/25/2020 6:50 PM
i copied it from Michidu's github
6:50 PM
no wait
6:50 PM
u need to point ur compile library to the ark one.
6:51 PM
theres a tutorial about it somewhere
6:51 PM
This guide is based on the Visual Studio Community 2019 version install Prerequisites: 1. https://visualstudio.microsoft.com/vs/ 2. https://github.com/Michidu/ARK-Server-API/archive/master.zip Step N1: Install Visual Studio by the link given on the first prereq...
6:51 PM
@Shorty
Avatar
Already did every step of it
Avatar
GormusSenex 1/25/2020 6:53 PM
then i think u missed a step
6:53 PM
i dont got that file in any of my projects
Avatar
Well I imported the Public folder
6:54 PM
changed the language
6:54 PM
and removed the precompiled header
6:54 PM
and the additional library directories
Avatar
GormusSenex 1/25/2020 6:57 PM
so u did this one ?
Avatar
GormusSenex 1/25/2020 6:57 PM
changed language to c++ 17 ?
Avatar
I will restart the tool
6:57 PM
maybe it works after that
6:57 PM
Might have some weird cache
Avatar
GormusSenex 1/25/2020 6:57 PM
and additional library dir to out_lib folder ?
Avatar
GormusSenex 1/25/2020 6:58 PM
its where the file is i think
6:58 PM
hmm
Avatar
now it works after restart
6:58 PM
wow
6:58 PM
love it
Avatar
GormusSenex 1/25/2020 6:58 PM
😄
Avatar
Exporting is Ctrl + F5 right
7:01 PM
Compiling*
Avatar
GormusSenex 1/25/2020 7:01 PM
never use short cuts, but i think ye
Avatar
How do you do it then?
Avatar
GormusSenex 1/25/2020 7:02 PM
right click and rebuild
7:02 PM
ctrl + alt + f7
7:03 PM
but i use mouse... bad habit 😄
7:04 PM
isnt F5 compile and run ?
Avatar
GormusSenex 1/25/2020 7:04 PM
so i dont think u can use ctrl + f5
Avatar
but it fails due to errors in ark server api
7:05 PM
public folder
7:05 PM
Ah the restart changed the release and x64 back wow
Avatar
Just reload it a few times
Avatar
GormusSenex 1/26/2020 12:39 PM
made this in a header file: namespace Enum { enum class Zone { ... } } But now I'm getting a lot of enum type errors, for example: 'EPrimalEquipmentType::Type': 'enum' type redefinition 'EPrimalItemStat::Type': 'enum' type redefinition etc. (a lot more of the same kind)
Avatar
looks like a bad namespace name
Avatar
GormusSenex 1/26/2020 12:41 PM
tried with other name, ie. LocalEnum. Same errors.
12:42 PM
this is also one of the errors with has no Enum in it: 'FItemCraftQueueEntry::ItemID' uses undefined struct 'FItemNetID'
Avatar
just when you add new enum?
Avatar
GormusSenex 1/26/2020 12:46 PM
yes
12:47 PM
i moved it out into header cuz i moved other functions as well. then i get these enum related errors
12:48 PM
if i keep it in the class then theres no problem. its having it in the header that causes the error
Avatar
have you tried other enum name too?
Avatar
GormusSenex 1/26/2020 12:49 PM
renamed Enum namespace to LocalEnum namespace. Havent tried renaming ZoneType tho
Avatar
https://prnt.sc/qt0u2b Does anyone know why it unloads my plugin? I unload it in the detach process. But I looked at others codes and they did the same
12:53 PM
I mean its pretty obvious why its doing it
12:53 PM
But why does it work for other plugins
Avatar
what exactly you are trying to do?
Avatar
Just a simple chat command
12:53 PM
Avatar
@GormusSenex it would be really weird, possibly some other code causes those errors
12:55 PM
so you call function to unload plugin?
Avatar
so what's your problem? it's not being unloaded?
Avatar
It is unloaded at the start of the server when the server is fully initialized
Avatar
GormusSenex 1/26/2020 12:56 PM
ima try moving it to its own header and class and see if its that. if not, then renaming it to something rly unique... brb
Avatar
detach event can't be called by itself however
Avatar
you call it?
Avatar
No thats the weird thing
Avatar
well, plugin can't be unloaded by itself heh
1:00 PM
maybe you call Unload function from some other func too
Avatar
Well no I think I just forgot one break statement
Avatar
GormusSenex 1/26/2020 1:01 PM
rubberducking 😉
Avatar
Well works now somehow
1:02 PM
Lets test my command 😄
Avatar
GormusSenex 1/26/2020 1:12 PM
wierd. i now turned everything back to its original state that compiled without errors, and now im getting same errors even related to files that arent there anymore.. ??
Avatar
GormusSenex 1/26/2020 1:42 PM
ok i guess one should never use enums then. now i removed that enum and replaced it with an int value. theres no use of enum anywhere, but im still getting "forward declaration of enum type is nonstandard " and all the other errors... wtf ?!?
Avatar
have you tried removing vs cache and restart? 😄
Avatar
GormusSenex 1/26/2020 1:45 PM
i tried restarting. but not removing cache. where i do that ?
Avatar
.vs folder in the project
Avatar
GormusSenex 1/26/2020 1:45 PM
the suo file ?
Avatar
whole folder
1:46 PM
it is a hidden folder
Avatar
GormusSenex 1/26/2020 1:47 PM
i tried removingf the suo file earlier. but then nothing compiled cuz i had to redo all the steps
Avatar
it doesn't remove any configuration
1:48 PM
might only reset build mode (like debug/release)
Avatar
GormusSenex 1/26/2020 1:48 PM
🤔
Avatar
most likely your error not even related to enums, possibly you missed a comma or something like this
Avatar
GormusSenex 1/26/2020 1:50 PM
ok, ive deleted it. same errors except the forward declaration thingie. deep breath
Avatar
is your project big already?
Avatar
GormusSenex 1/26/2020 1:50 PM
ye :/
1:51 PM
well.. everything is relative. its big for me not being c++ dude 😄
1:51 PM
its small if it was a c# one
Avatar
heh, indeed you could try remove that h file maybe
1:52 PM
and see if problem is here
Avatar
GormusSenex 1/26/2020 1:52 PM
thats gone long ago 😄
Avatar
ah lol
Avatar
@Michiduhi,Wildcard deleted the uprimalcharacterstatuscomponent. Is there any way to fix it
Avatar
GormusSenex 1/26/2020 3:05 PM
solved it... 🙄
3:06 PM
apparently i just needed to add #include <API\ARK\Ark.h> to a header file even tho theres no need for that in the class file... wierd 🤨
Avatar
that makes sense actually you should also remember that .h file is inlined into .cpp on compilation
3:17 PM
@cokll why do you think so? it still exists in 3 days old dump
Avatar
Player level is currently unavailable@Michidu And the upgrade will cause the server to crash
Avatar
Updated today v304.45
Avatar
GormusSenex 1/26/2020 11:24 PM
why is this present in some code (the 50000 check) ? [...]APrimalStructure* _this[...] int tribeId = _this->TargetingTeamField(); if (tribeId >= 50000) [...] I get that checking tribeId != 0 so you know there's a tribe involved. But why the 50000 ? (_this could might as well been an AActor*) (edited)
Avatar
@GormusSenex tribes start at 50k
12:17 AM
as-in, a player without a tribe still has a targeting team value
12:17 AM
it is just less than 50k
12:18 AM
so that is how it knows if it is a tribe-tribe, or just a single un-tribed player.
Avatar
@cokll will update api today
Avatar
Thank you very much.@Michidu
Avatar
GormusSenex 1/27/2020 7:33 AM
ahh, thx @substitute
Avatar
@Michidu also IsTribeAdmin seems to be removed from the PlayerController now
8:09 AM
calling it from the PC causes the server to crash
Avatar
May i ask, are there any examples of the code or some guide on basic stuff ? I'm looking forward to make a plugin that automatically activates "Pickup event". I have included few librarys and that is kinda all. I'don't have any idea what should be the next step, creating hook or just call some function that will set structure pickup to true ? Sorry for bothering :/
Avatar
Hi! I would like to start make some understanding about plugin development. I tried the WETBATMAN-guide about how to prepare your VS2019 for plugin development. But then the guide ended and I dont know how to write a plugin at all. Instead I tried to download Michidus Plugins and opened the ArkShop plugin to look around a little. If I open it VS2017 it opens fine but there are alot(all?) of header files missing (stlib.h windows.h etc). If I try to open it in VS2020 it wants to be retargeted to a never SDK.... Any help at all to get this noob going i appreciated!
Avatar
@Quarex Have you looked at the google doc regarding how to set up your IDE ?
6:07 AM
@Jenda Be sure to check out Michidu's github profile , you will find some examples there
Avatar
Thank you :)
Avatar
for pickup event you probably would want to hook AddItem (if you mean structures) (edited)
Avatar
@KillZone yes I followed it ( the first one in #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ). But how do I then get, for instance, Arkshop in that project. I want to open the Arkshop-solution. I am clearly missing something.
Avatar
Check the part where you link external libraries in the google doc, that seems to be the thing that's messing up atleast i think
Avatar
quite funny that they added some things from atlas, like 'FAtlasAdminCommandTrackingEntry'
8:52 AM
Seems to have changed a lot
Avatar
its just VS bug most likely
8:55 AM
character still here
Avatar
@Michidu Our server admin is turning it on by just editing Json (if i understanded him correctly) by setting AlwaysAllowPickup to 1. @cokll Thanks, already got it downloaded 🙂
Avatar
DECLARE_HOOK(UPrimalInventoryComponent_AddItem, UPrimalItem, UPrimalInventoryComponent, FItemNetInfo, bool, bool, bool, FItemNetID, bool, bool, bool, AShooterCharacter, bool); UPrimalItem Hook_UPrimalInventoryComponent_AddItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bEquipItem, bool AddToSlot, bool bDontStack, FItemNetID* InventoryInsertAfterItemID, bool ShowHUDNotification, bool bDontRecalcSpoilingTime, bool bForceIncompleteStacking, AShooterCharacter* OwnerPlayer, bool bIgnoreAbsoluteMaxInventory) { return UPrimalInventoryComponent_AddItem_original(_this, theItemInfo, bEquipItem, AddToSlot, bDontStack, InventoryInsertAfterItemID, ShowHUDNotification, bDontRecalcSpoilingTime, bForceIncompleteStacking, OwnerPlayer, bIgnoreAbsoluteMaxInventory); } ArkApi::GetHooks().SetHook("UPrimalInventoryComponent.AddItem", &Hook_UPrimalInventoryComponent_AddItem, &UPrimalInventoryComponent_AddItem_original); ArkApi::GetHooks().DisableHook("UPrimalInventoryComponent.AddItem", &Hook_UPrimalInventoryComponent_AddItem);
9:08 AM
@Michidu I compiled a 3.3 and can't start it. I'll download one now and try it
Avatar
what error? works fine for me
9:18 AM
This will cause failure to start
9:19 AM
Avatar
this config not from github however
Avatar
Start normal after removal
9:21 AM
This is NoCollision plugins
Avatar
AaronBasques 1/28/2020 9:21 AM
are you guys live debugging? that looks like you're loading the server inside the IDE?
Avatar
you can use VS debugger to debug your plugin i'm using x64dbg however
Avatar
AaronBasques 1/28/2020 9:24 AM
well shit the bed, are there any tutorials on setting that up? I've done game work in eclipse IDE with live debugging, i just didn't think is possible with this lot.
Avatar
setting VS debugger?
Avatar
AaronBasques 1/28/2020 9:25 AM
I'm a VS & C++ nub
9:25 AM
yeah
Avatar
AaronBasques 1/28/2020 9:28 AM
those moments in your life where you hate yourself for being such a nub that looking for the obvious is just not obvious enough Thanks man, appreciate the help.
9:28 AM
<i must poke around more>
Avatar
everyone was at some point 🙂
Avatar
AaronBasques 1/28/2020 9:31 AM
just kills me when i have a lot of knowledge and experience with other C types and IDE's and not a lot of it is transferable to all this lol
Avatar
GormusSenex 1/28/2020 9:31 AM
ik that feeling 😂
9:32 AM
I tested 3.3 and it seems that players still can't upgrade
Avatar
then it something with your code, dump 100% matches with what they have
9:43 AM
9:44 AM
Hook is normal, but the game doesn't seem to return
9:49 AM
There is another problem, RCON will also die after uninstalling UPrimalCharacterStatusComponent_ServerApplyLevelUp
9:49 AM
Avatar
what it should return?
Avatar
I'll test it again
Avatar
Fatal error! VERSION: 304.453 UnknownModule!UnknownFunction (0x0000000000000000) + 0 bytes [UnknownFile:0]
10:26 AM
emmm
10:29 AM
Avatar
what you are calling?
Avatar
@KillZone Well, I have done the tutorial but from my understanding those changes are only in that particular project that is created in the tutorial. When opening ArkShop.sln all settings are loaded from that solution, yes?
Avatar
first thing you wanna check is SDK version
Avatar
I've rebooted a lot of times, and I'm back to normal
12:34 PM
Don't know what causes players to fail to upgrade
12:35 PM
12:35 PM
Avatar
GormusSenex 1/28/2020 12:38 PM
float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { [...] <- This area gets triggered if (Damage != 0) { [...] <- Nothing in here ever gets triggered ? } } (edited)
Avatar
Hey guys, anyone know where to find all hooks who can be used?
12:40 PM
Dont find anything in the wiki
Avatar
that would be a list of all ark functions 🙂
12:47 PM
@GormusSenex try FDamageEvent
Avatar
So I can pretty much hook all functions?
Avatar
Okay thanks 🙂
1:15 PM
VERSION: 304.453 Seems to have new changes to serverrequestlevelup
Avatar
it must be your code
1:42 PM
I found the problem ... many functions have been deleted
Avatar
like?
Avatar
GormusSenex 1/28/2020 2:19 PM
If i wanna increase turret damage shouldnt I hook into APrimalStructureTurret_DealDamage and add to the DamageAmount ? Im sending the DamageAmount to chat and it gives really wierd numbers, like 1, -13230, -13234, 1, 1 etc...
Avatar
i just hook take damage and check if struct is a turret 🤷‍♂️
Avatar
GormusSenex 1/28/2020 2:22 PM
i tried that first, but that DamageCauser never turned out to be a turret. Did this: FString descr; DamageCauser->GetHumanReadableName(&descr); if (descr.Contains("Turret")) { [...] <- Never triggered }
2:22 PM
thats why I tried looking into the DealDamage instead
Avatar
check if EventInstigator instead
Avatar
GormusSenex 1/28/2020 2:23 PM
wait... now that im looking at it... maybe I should have looked at the EventInstigator instead...
2:23 PM
hahaha, ye 😄
Avatar
DamageCauser should still be non empty for non ridden dinos though (as far as i remember)
Avatar
DamageCauser is probably a weapon
Avatar
auto Turrets_array = config["TurretAdjustements"]; APrimalStructure* Structure = static_cast<APrimalStructure*>(DamageCauser); //APrimalStructureTurret* Turret = static_cast<APrimalStructureTurret*>(DamageCauser); //if (DamageCauser->IsA(APrimalStructureTurret::ClassField())) Log::GetLog()->warn("Is Turret"); FString NameField = Structure->DescriptiveNameField(); //Log::GetLog()->warn("Turret BP = {}", NameField.ToString()); if (!Turrets_array.empty()) { for (const auto &Turret : Turrets_array) { std::string CheckType = Turret["CheckType"]; std::string SConfigTurretName = Turret["TurretName"]; FString FConfigTurretName = SConfigTurretName.c_str(); std::string DamageAdjustmentType = Turret["DamageAdjustType"]; const float DamageMultiplier = Turret["DamageMultiplier"]; if (DamageAdjustmentType == "All" || (DamageAdjustmentType == "Dino" && _this->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) || (DamageAdjustmentType == "Player" && _this->IsA(AShooterCharacter::GetPrivateStaticClass()))) { if ((CheckType == "Contains" && NameField.Contains(FConfigTurretName)) || (CheckType == "Equals" && NameField == FConfigTurretName)) { Damage = Damage * DamageMultiplier; } } } }
2:26 PM
my code 😄
2:26 PM
"TurretAdjustements": [{ "CheckType": "Equals", "TurretName": "Tek Turret+", "DamageMultiplier": 10, "DamageAdjustType": "Dino" }, { "CheckType": "Equals", "TurretName": "Tek Turret", "DamageMultiplier": 10, "DamageAdjustType": "All" }, { "CheckType": "Equals", "TurretName": "S+ Tek Turret", "DamageMultiplier": 10, "DamageAdjustType": "All" }, { "CheckType": "Equals", "TurretName": "Heavy Automated Turret", "DamageMultiplier": 10, "DamageAdjustType": "All" }, { "CheckType": "Equals", "TurretName": "S+ Heavy Auto Turret", "DamageMultiplier": 10, "DamageAdjustType": "All" }, { "CheckType": "Equals", "TurretName": "Automated Turret", "DamageMultiplier": 10, "DamageAdjustType": "All" }, { "CheckType": "Equals", "TurretName": "S+ Automated Turret", "DamageMultiplier": 10, "DamageAdjustType": "All" } ],
2:26 PM
^^ config
Avatar
GormusSenex 1/28/2020 2:27 PM
ur using DamageCauser ?? (edited)
Avatar
if (_this && DamageCauser) { if (DamageCauser->IsA(APrimalStructure::GetPrivateStaticClass()))
2:29 PM
turret cannot be EventInstigator because it's a controller
Avatar
GormusSenex 1/28/2020 2:30 PM
ig GetHumanReadableName isnt working for turrets then, cuz i c ur using DescriptiveNameField. gonna try that thx 🙂
Avatar
GormusSenex 1/28/2020 2:45 PM
it works 😄
Avatar
nice 😛
Avatar
GormusSenex 1/28/2020 2:45 PM
only took countless hrs to find out what didnt work 😄
Avatar
i wish the AprimalStructureTurret class wouldn't cause crashes so we wouldn't need to rely on a name check 😦
Avatar
GormusSenex 1/28/2020 2:46 PM
it does ? didnt when i triggered it. it just showed a lot of strange damage values
Avatar
stuff like the Balista Turret is also technically a turret using this check
2:46 PM
using IsA and checking if it's APrimalStructureTurret causes a crash
Avatar
GormusSenex 1/28/2020 2:46 PM
ahh
Avatar
at least it did when i wrote this code
Avatar
GormusSenex 1/28/2020 2:47 PM
but why would u do that when ur alrdy inside the hook ?
Avatar
to make sure that the damage causer is a turret 😄
2:47 PM
better than just name check
2:47 PM
i'm talking about class checking the structure inside TakeDamage
Avatar
GormusSenex 1/28/2020 2:47 PM
ohh
2:48 PM
i thought u meant the DealDamage method
2:48 PM
cuz that gives funky values
Avatar
ah no, never used it tbh
Avatar
GormusSenex 1/28/2020 2:49 PM
well, time for an ice cold coca cola... deserve it now that this part is working.... then on to the next 300 missing parts and my plugin will be awesome 😄 😂
Avatar
lol what plugin you are making actually?
Avatar
GormusSenex 1/28/2020 2:50 PM
a Zones one that include ORP, PvE zones and Unbuildable zones. maybe a bit too much for a newb but i like a challange 😂
Avatar
nah it's good
2:51 PM
i was trying to get into coding before i started hosting ark
2:51 PM
couldn't do anything
2:51 PM
then one day i wanted to make a plugin
Avatar
like ArkZones plugin? 🙂
Avatar
michidu pretty much wrote it for me and then i started actually learning lol
2:51 PM
because everything i did was put into practical use
Avatar
GormusSenex 1/28/2020 2:52 PM
ArkZones u say... 🤔
Avatar
SafeZones 😄
Avatar
oh ye, forgot the name of it
Avatar
GormusSenex 1/28/2020 2:52 PM
ive come across SafeZones a bunch of times googling 😄
Avatar
SafeZones Source: Click Here Features: Prevent PVP in certain area's Prevent Building in certain area's Prevent Structure damage in certain area's Notifications on Entering and Leaving SafeZone area's Ability to restrict players from...
Avatar
GormusSenex 1/28/2020 2:53 PM
wtf 😂
Avatar
but at least you learned something, lol (edited)
Avatar
GormusSenex 1/28/2020 2:53 PM
well... yes... basically that 🙄
2:53 PM
hahaha
Avatar
it doesn't have orp though
Avatar
GormusSenex 1/28/2020 2:54 PM
ahh... and thats the one im making right now. w8ing with the other stuff to later 🙂
2:54 PM
(even tho a bunch of others made an orp plugin tho)
Avatar
there are 2 ATM i think
2:55 PM
1 doesn't work 😄
2:55 PM
(for Ark)
Avatar
which doesnt work?
Avatar
agito's
Avatar
he's working on it though as far as i know
Avatar
GormusSenex 1/28/2020 2:56 PM
ima beat him to it !!!
2:56 PM
😄
2:56 PM
(or maybe not...)
Avatar
Is it possible to modify the ark with plugins? Like the orp red shield or something?
2:56 PM
Or just background stuff
Avatar
nothing visual
Avatar
GormusSenex 1/28/2020 2:56 PM
i think u need to do an actual mod for that
Avatar
you could add orp to safezones, shouldn't be hard
Avatar
Okay so you would need to do an extra mod for orp right?
2:57 PM
To show a red bubble
Avatar
GormusSenex 1/28/2020 2:57 PM
ye i would think so
Avatar
to display it visually ye
Avatar
always thought orp plugin with that bubble mod would be a hit
Avatar
for sure because all ORP mods are total garbage
Avatar
seems like not many people who also know dev kit out there however
Avatar
ORP mods are lagging
2:59 PM
hard
Avatar
don't use them
Avatar
Some of them
Avatar
they have a messy implementation
3:00 PM
mods handle ORP by adding an HP modification to the structure
Avatar
What would you do then?
Avatar
use a plugin 😄
Avatar
GormusSenex 1/28/2020 3:00 PM
😄
Avatar
Without a bubble?
Avatar
when you hit a structure plugins can send you a message that it's under ORP
Avatar
GormusSenex 1/28/2020 3:00 PM
yup. let the attackers be surpriced.... (or let them know they r attacking a active orp)
Avatar
i think one of the ORP plugins even sends a message when you enter an ORP zone
Avatar
GormusSenex 1/28/2020 3:01 PM
mine doesssss
Avatar
hehe
Avatar
GormusSenex 1/28/2020 3:01 PM
but its poorly implemented. need to refactor that part
Avatar
So you can 1/3 the structure dmg with plugins and mulitply the turret dmg right?
Avatar
GormusSenex 1/28/2020 3:01 PM
yup
Avatar
Great stuff lol
Avatar
@GormusSenex safezones have nice implementation of zone enter/leave notifications
Avatar
GormusSenex 1/28/2020 3:02 PM
oO
Avatar
i stole it frrom UE code, lol (edited)
Avatar
GormusSenex 1/28/2020 3:02 PM
😄
Avatar
XD
Avatar
Well I will try to do an orp Plugin then, ty 😄
Avatar
GormusSenex 1/28/2020 3:02 PM
im doing calculations based on the orb coords and radius
Avatar
+2 orp plugins looks like
Avatar
GormusSenex 1/28/2020 3:02 PM
prolly not the smartest 😄
Avatar
Mine will release 2022
3:03 PM
😄
3:03 PM
I rly hate C++
3:03 PM
Why cant I just add strings to a string
Avatar
GormusSenex 1/28/2020 3:03 PM
hahaha
Avatar
and have to do {}
Avatar
you can
3:04 PM
but {} is much better actually
Avatar
wdym can't add strings to strings 😄
Avatar
Talking about "welcome to this server" + name
Avatar
GormusSenex 1/28/2020 3:04 PM
fmt:format
Avatar
API has fmt
Avatar
GormusSenex 1/28/2020 3:04 PM
or FString("")
3:04 PM
i think
Avatar
("welcome to {}",ServerName)
3:05 PM
or "welcome to " + ServerName
Avatar
hmm okay
3:05 PM
Why is there even an L in front of Strings
Avatar
makes them unicode
Avatar
GormusSenex 1/28/2020 3:05 PM
UE
Avatar
Ah okay
Avatar
GormusSenex 1/28/2020 3:06 PM
ohh i thought that was UE specific ?
Avatar
not rly it just has to be used with FStrings because FString supports unicode data
Avatar
L makes them of type wchar_t to be more specific
Avatar
I love javascript 🙂
3:07 PM
Simple, easy and clean
Avatar
GormusSenex 1/28/2020 3:08 PM
thats not coding... 😉
Avatar
typescript tbh
Avatar
GormusSenex 1/28/2020 3:08 PM
Ima master in x++, decent in java and c# but shitty in c++ 😂
Avatar
Html is not coding 😄
Avatar
GormusSenex 1/28/2020 3:09 PM
html... javascript... tomAto tomatO
3:09 PM
😂
Avatar
js is not really clean, should always guess variable type heh
Avatar
typescript*
3:10 PM
was talking about typesript
3:10 PM
that makes it more coding 😄
Avatar
GormusSenex 1/28/2020 3:11 PM
umm...
3:12 PM
not knowing much but isnt typescript = javascript + type declaration ?
3:13 PM
And just better for understanding and working in a team
Avatar
GormusSenex 1/28/2020 3:13 PM
ahh
3:19 PM
it looks like SafeZones update a list/array of player pos and then a timer(?) checks whether or not to push a message to player ? @Michidu
Avatar
no, // Update player positions not related to notifications
3:22 PM
its to keep players inside/outside the zone
Avatar
GormusSenex 1/28/2020 3:22 PM
ahh
Avatar
Why......
4:04 PM
use plugins.unload ArkAdvert
4:04 PM
Players adding points will cause crash
Avatar
I tested it for five hours,10+ plugins loop crash
5:13 PM
I re compiled with vs2017 and all crashes disappeared@Michidu
Avatar
well, i dont know whats wrong with your VS setup obviously it's not because of different versions
Avatar
json doesnt actually supports comments
🤪 1
5:18 PM
I'm just marking it
Avatar
GormusSenex 1/28/2020 5:18 PM
😉
Avatar
Deleting this will also resolve the crash
Avatar
it has nothing to do with crashes
5:22 PM
but may break some code
Avatar
I've been testing it for a day, and it's really going to cause a crash
5:23 PM
Plugin adds timed chat messages and welcome message. You can choose from 3 different modes for every message: ClientChat - Chat message ServerChat - Server chat message Notification - On-screen message Configuration: Console commands...
Avatar
coincidence
Avatar
looks like you unloaded plugin which doesnt support it
Avatar
It doesn't use the leveup function
5:30 PM
And if I don't uninstall it, the player can't upgrade. After uninstalling, the server crashes
Avatar
its hard to say without knowing what you are doing
Avatar
...omg
9:15 PM
I finally found the problem
9:16 PM
AllEngrams Plugins@Michidu
👍 1
Avatar
What exactly is the main fucntion of Logger.h ?
3:32 PM
Just print stuff out to the server console ?
Avatar
yes (and file) (edited)
Avatar
what exactly do you mean "and file" ? sadcat
Avatar
it writes everything to log file (edited)
Avatar
Oh ok gotcha
3:35 PM
thanks berynice
3:35 PM
Also, if i launch the server and during server runtime if i modify a plugin and build it will the server reload said plugin ?
Avatar
you can do it manually by unloading and loading or you can also enable AutoPluginsReload in config
Avatar
Ah okay will do, thanks 😄 (edited)
Avatar
GormusSenex 1/29/2020 3:48 PM
how does that work - the autopluginreload ? cuz i dont think i can overwrite the dll file when the server is running ?
Avatar
it unloads it first
3:51 PM
issue is if you have timers in your plugin it will crash when it hits the callback
3:51 PM
since timers cannot be unloaded ATM
Avatar
GormusSenex 1/29/2020 3:55 PM
ahh ok
Avatar
Where is the AutoPluginsReload entry, i searched all the text files inside the server folder and checked out ShooterGame/Config folder and cant seem to find it ?
4:26 PM
found it
4:26 PM
just as i wrote that
4:26 PM
ShooterGame\Binaries\Win64\config.json entry "AutomaticPluginReloading"
Avatar
@WETBATMAN could you not just manually unload your timer?
5:34 AM
It’s a thread yeah? Terminate that thing
Avatar
most of the time its not a thread i should add a way to remove timers, but that would be a breaking change, unfortunately
Avatar
@Michidu is there a way to ensure x hook is invoked before y hook?
6:25 PM
essentially a "load order"
6:25 PM
?
Avatar
currently no most of the time it would depend on plugin load order
Avatar
anyway to force a load order?
6:27 PM
or is it by file name?
Avatar
by file name
Avatar
would it be a breaking change to add an optional load_order.json file?
6:30 PM
e.g. if the file exists, enumerate plugins, load them in the order of the json file, and any missing just load by file-name.
Avatar
GormusSenex 1/30/2020 6:31 PM
is it by file name or folder name ? could maybe just rename folder name ?
Avatar
Yes, you can do that, but that's not a perfect solution
Avatar
it can be done, but a better solution would probably imply setting the order of hooks if you need to execute your hook first, it can be done with a small trick however
Avatar
i can add an overload which would accept order as parameter
Avatar
GormusSenex 1/30/2020 6:59 PM
a "perfect solution" was for Wildcard to fix meshing, duping and then wipe all servers... @substitute 😂
Avatar
they made a wipe?
Avatar
@GormusSenex they never will
Avatar
GormusSenex 1/30/2020 7:09 PM
@Michidu I wish 😄
Avatar
i think they did it a few times already
7:13 PM
@substitute so that would be a good solution for you?
Avatar
it could be, but concern is two plugins trying to be "first"
7:20 PM
no way to fix if it's coded into the plugin directly
Avatar
that true, but it could happen if you specify order of plugins loading too
Avatar
Can set lazy loading
7:26 PM
Avatar
Deleted User 1/30/2020 10:54 PM
hi
10:56 PM
where can i ask for help? i am clueless ive been trying for 2 days to fix something for my ark server its about the server starting to lag when harvesting big amounts im using ark server manager, i tried everything on google and nothing works or it just makes it worse ;/
10:56 PM
im really desperate lol
Avatar
GormusSenex 1/30/2020 11:01 PM
reduce x times harvest amount ?
11:02 PM
increase "health" of harvest, ie. how many times u can hit it (i forgot the correct name for it)
11:02 PM
u can tweak it to get the same amount output, but with more hits iirc
11:03 PM
its my experience that its the harveat multiplier that lags when eg a bronto starts berry farming
11:03 PM
... but this is ArkServerAPI discord, not general discord for server admins 😂
Avatar
@Medicalmischief there are some func wildcard have made for things are really bad
11:30 PM
Like Dino level when spawning is a for loop
11:31 PM
So like level 2000 Dino = 2000 iterations = server lag
11:31 PM
It is why if you spawn a like level 1b the server stalls for several seconds
Avatar
GormusSenex 1/30/2020 11:32 PM
i guess thats for me and not Medicalmischief ? 😂 (edited)
11:33 PM
@substitute
Avatar
Yeah
11:39 PM
Oops
Avatar
Medicalmischief 1/30/2020 11:51 PM
Hahaha i seen that and was like yeah i know but i dont k ow how to code so i dont really know the true difficulties yall are having.
Avatar
GormusSenex 1/31/2020 12:28 AM
At what point can I call this ? AShooterGameMode* aShooterGameMode = ArkApi::GetApiUtils().GetShooterGameMode(); I was gonna call it in the Load()-method (DLL_PROCESS_ATTACH), but it returns null ? Is shootergamemode only active from within a player "call" ?
Avatar
@GormusSenex game mode isn't init'ed yet
Avatar
GormusSenex 1/31/2020 12:29 AM
darn... thats what i assumed since i didnt get anything 😦
Avatar
I would always get a new pointer to ShooterGameMode whenever you need it.
12:30 AM
ArkApi::GetApiUtils().GetShooterGameMode()->KickPlayerController(who, &FString::Format("Kicked by SALT AC, Reason: {0}", (int)why));
12:30 AM
example (edited)
Avatar
GormusSenex 1/31/2020 12:31 AM
I need this be4 any1 logs in: FString fPort; ArkApi::GetApiUtils().GetShooterGameMode()->GetNetworkNumber(&fPort);
12:32 AM
dont wanna call it every time some1 logs in - or check if its been called
12:34 AM
wait... I can make a hook to here and call it ? Hook_AShooterGameMode_InitGame
12:34 AM
that should only be called once ?
12:36 AM
fuck, im slowly becoming semi-pro at this shit 😂
Avatar
yes do it in your initgame
Avatar
GormusSenex 1/31/2020 12:41 AM
yup, it worked. now i can go to sleep 😄
Avatar
@Michidu how would I set a value in a field array ?
1:01 AM
nvm, I figured it out , weird syntax 👍
Avatar
a white guy 1/31/2020 2:59 AM
anyone getting server crashes with the newest ark update?
3:00 AM
im getting this but not sure if its api related or not
3:00 AM
Avatar
a white guy 1/31/2020 3:29 AM
looks to be advancedchat plugin causing the issue so far. when typing in global chat it crashes the map
Avatar
@Michidu
3:32 AM
sadday
3:37 AM
3:37 AM
same problem
3:37 AM
in my own plugin
3:37 AM
compress2() (edited)
3:42 AM
gonna attach a debugger
Avatar
which function you are calling? looks like it's missing
Avatar
ye
8:43 AM
this was the same crashlog in NPP
Avatar
looks like quite some plugins have this issue
9:48 AM
i wonder what they deleted
Avatar
Yes some functions are missing causing problem
4:22 PM
@Michidu I added a function to the api and got the same crash 😦
4:22 PM
I’m 99% sure the function exists
Avatar
possibly you didnt add class to pdb config
Avatar
That might be it actually
4:22 PM
But it’s part of a class that is
Avatar
you can enable DumpAll
Avatar
I will try that. I narrowed it down so I’m certain it’s the one call
Avatar
i apologize for the off topic question
4:25 PM
but does anyone have this issue where SSPVC.exe eats like 50% of the CPU every 60 seconds 😄 ?
Avatar
disable it 🙂
Avatar
then it marks windows as non activated lol
4:27 PM
after 3-5 days
4:27 PM
it's the Microsoft license service
Avatar
Use legit windows
Avatar
i do
4:27 PM
😄
Avatar
dont use legit windows then
Avatar
XD
Avatar
GormusSenex 1/31/2020 4:28 PM
Recently, sppsvc.exe, the Microsoft Software Protection Platform, has decided to give my computer a really hard time. For the last day or so, it has been randomly using up most of my CPU, and really
Avatar
hm
4:30 PM
massive fail XD
4:30 PM
at least i think
Avatar
Windows 10 is free
Avatar
i have windows 10 pro key purchased
Avatar
you can run non activated you just cant customize
Avatar
but i had KMS installed XD
Avatar
so not as comfy
Avatar
from before i bought the key
Avatar
GormusSenex 1/31/2020 4:30 PM
ahh
Avatar
i think it was tampering with this service
Avatar
GormusSenex 1/31/2020 4:30 PM
yup
Avatar
big despacito moment right there
Avatar
GormusSenex 1/31/2020 4:32 PM
whenever i buy used laptops from my company i always do a brand new install
4:32 PM
"whenever"... not ive done that many times.... but 3 still counts 😂
Avatar
XD
4:33 PM
guess i gotta do a thorough clean now
4:33 PM
maybe some leftovers from KMS
Avatar
GormusSenex 1/31/2020 4:33 PM
ughh... it took me 2 days to get arkserverapi and sqlite3 to work together... i donno what i did except that i did a lot... i wont ever do a reinstall 😂
Avatar
same lol
4:34 PM
i got so much random shit on desktop
4:34 PM
i'd rather not do a reinstall XD
Avatar
It's alot easier now imo now with the wiki
Avatar
GormusSenex 1/31/2020 4:34 PM
theres a wiki with the sqlite3 in it ?
4:34 PM
oO
Avatar
@WETBATMAN
4:35 PM
and just install timeshift
4:35 PM
i just wish i didn't have to dualboot for working on ark api sadspin
4:36 PM
or seperate /home and /boot
4:36 PM
aaand i didn't censor everything
4:36 PM
nvm dont care
Avatar
GormusSenex 1/31/2020 4:37 PM
ima hack ur system cuz now i know ur using 'maia' icons... (edited)
4:38 PM
😂
Avatar
nah just my irl first name in the CLI
4:38 PM
that's the only thing
Avatar
GormusSenex 1/31/2020 4:38 PM
my first name is God... last name Almighty... 😉
Avatar
HAHAHA (edited)
Avatar
@Michidu
5:07 PM
UPrimalCharacterStatusComponent* defaultComp = _this->GetDefaultCharacterStatusComponent();
5:07 PM
is what causes my crash
5:08 PM
and my def. in Actor.h
5:08 PM
c++ UPrimalCharacterStatusComponent* GetDefaultCharacterStatusComponent() { return NativeCall<UPrimalCharacterStatusComponent*>(this, "UPrimalCharacterStatusComponent.GetDefaultCharacterStatusComponent"); }
Avatar
looks like GetDefaultCharacterStatusComponent was removed
Avatar
UWorld::GetTimeSeconds() crashes in VoteRewards
5:12 PM
looks like it's also removed
Avatar
yes it is
5:13 PM
which is weird though
Avatar
it was removed?
Avatar
why they doing a bunch of removals recently lol
Avatar
I need to re-generate my ida database
5:13 PM
but you're sure it was removed?
Avatar
yes it crashes with VoteRewards
Avatar
looking at today dump - it's not there anymore
Avatar
is there a way of doing GetDefaultObject<T>? (edited)
Avatar
UClass::GetDefaultObject
5:16 PM
but i dont think its gonna replace GetDefaultCharacterStatusComponent
Avatar
GetDefaultCharacterStatusComponent just gets a new instance of the UPrimalCharacterStatusComponent with default data I believe
Avatar
you could be right better use UClass::CreateDefaultObject
Avatar
GormusSenex 1/31/2020 5:50 PM
std::map<long, long> Foo; Foo.insert(std::pair<long, long>(123, 456)); if (Foo.find(123) != Foo.end()) { [...] <- shouldnt this be activated if there's a match ? } (edited)
Avatar
match in key
Avatar
GormusSenex 1/31/2020 5:52 PM
updated my question
Avatar
seems right
Avatar
GormusSenex 1/31/2020 5:54 PM
hmm
Avatar
your code works Foo[123] = 456; looks better btw
5:56 PM
instead of insert
Avatar
GormusSenex 1/31/2020 5:57 PM
ohh i didnt know thats possible 😂
5:57 PM
will it do the same ?
Avatar
almost [] operator might overwrite entry with new value (insert won't do it)
Avatar
GormusSenex 1/31/2020 5:59 PM
can i also get the value with Foo[123]->second ?
Avatar
yes
Avatar
GormusSenex 1/31/2020 6:00 PM
damn thats easier. wierd way of doing it since [123] never been "inserted"... not used to that 😄
Avatar
another way Foo.emplace(123, 456);
6:00 PM
which is same as insert just prettier
Avatar
@Michidu
6:04 PM
How to make instance of the class?
6:05 PM
I don’t see CreateDefaultObject on the type and the UClass variant isn’t typed
Avatar
what for though?
Avatar
I need to read values from the default object
6:06 PM
I’m replacing a function with a hook
Avatar
ah, you mean that get uclass* first
6:07 PM
UPrimalCharacterStatusComponent possibly missing base class
6:07 PM
set it to UObject
Avatar
GormusSenex 1/31/2020 6:21 PM
so if i want to replace the value in the map, I have to do a Foo.erase(123) first then ?
Avatar
GormusSenex 1/31/2020 6:22 PM
(if using Foo.implace(123, 456) ?
Avatar
then yes heh
6:24 PM
but [] is really better
Avatar
GormusSenex 1/31/2020 6:24 PM
i read that its from c++03 and implace is from c++11... wouldnt the ladder be better then ?
Avatar
no, why?
Avatar
GormusSenex 1/31/2020 6:25 PM
(just assuming since its newer 😂 )
Avatar
std map is old too 🙂
Avatar
AaronBasques 1/31/2020 6:26 PM
i know i'm a nub, but i've been using TMap<int32, FString> Map; Map.Add(teamID, characterName); is this ok? (edited)
Avatar
GormusSenex 1/31/2020 6:27 PM
implace uses references instead of copying the values. when is the old value gonna be free'd then since afaik theres no garbage collector in c++ ?
Avatar
AaronBasques 1/31/2020 6:27 PM
i read somewhere that there is no GC
Avatar
GormusSenex 1/31/2020 6:29 PM
think im gonna use the operator [] instead of emplace
Avatar
*emplace can do everything, it depends on your map type, moreover you probably mean pointer, not reference as it can't be really copied
6:30 PM
@AaronBasques TMap is not complete, i would suggest using std::map instead
Avatar
AaronBasques 1/31/2020 6:31 PM
TMap has Map.Contains(Key) if that helps and works
6:31 PM
oh
6:31 PM
its been working for me thus far
Avatar
it has some limitation like you cannot use FString as key for example
Avatar
GormusSenex 1/31/2020 6:32 PM
ohh, some wise dude on stackoverflow wrote that emplace is the go-to call for elements that cant be copied or moved. ahhh
6:33 PM
<long, long> isnt a problem using [] then
Avatar
hm, if element can't be copied or moved, not sure how you gonna add it to map
6:37 PM
right, i got what you mean emplace can construct elements in-place, so yeah that correct
Avatar
GormusSenex 1/31/2020 6:37 PM
maybe Foo[123] = &&Foo2 wont work ? i donno...
6:38 PM
but does with emplace
6:38 PM
?
6:39 PM
anyway, enuf of this. im gonna use [] now. looks prettier and negates the need for erase 😄
Avatar
this wont work at all 🙂
Avatar
@Michidu
6:39 PM
6:39 PM
😦
Avatar
what is _this? (edited)
Avatar
UPrimalCharacterStatusComponent*
Avatar
did you add UObject as base class? if you did use _this->ClassField()
Avatar
I haven’t changed the api yet
Avatar
you dont even need to recompile it
Avatar
I know
Avatar
GormusSenex 1/31/2020 7:17 PM
Map<long, long> Foo; Foo[1] = 2; Foo[2] = 3; Foo[3] = Foo[3] + 4; cout << Foo[3}; Will I get a 4 or an error ?
Avatar
exception
7:30 PM
actually no are you checking us? 😄
Avatar
GormusSenex 1/31/2020 7:31 PM
no lol, it jsut becuz it takes 10 mins for my ark to start up to test it 😄
7:31 PM
and since it seems like a trivial question for a c++ coder its faster to ask here 😉
Avatar
i don't think it's trivial lol
Avatar
GormusSenex 1/31/2020 7:32 PM
😄
Avatar
ye, [] will always insert new value (even if its default one) but .at() will throw
Avatar
GormusSenex 1/31/2020 7:33 PM
so i should still test if it has a value with Foo.find(3) != Foo.end() ?
Avatar
depends what you need
7:34 PM
Foo[3] = Foo[3] + 4; won't cause any errors
Avatar
GormusSenex 1/31/2020 7:34 PM
ahh kewl
7:34 PM
ty
7:35 PM
wait... it wont cause any errors isnt the same as it will store the correct value... ?
Avatar
result should be 4
7:35 PM
if its good enough for you, then you can use it
Avatar
@Michidu Is update coming soon to forum for download?
Avatar
its not needed
3:43 PM
broken plugins should be recompiled
Avatar
GormusSenex 2/1/2020 3:48 PM
but still. for those who just use others plugin wont they need the new serverapi for download alongside the re-compiled plugins ?
4:07 PM
those functions are local to every plugin
Avatar
DrackusOfDFDDS 2/1/2020 6:20 PM
Wait, to confirm that I am understanding is this the return of the busted functions from yesterday via ark patch or ark api?
Avatar
those funcs are gone
Avatar
GormusSenex 2/1/2020 6:46 PM
are these deprecated ? libmysql.lib mysqlclient.lib (edited)
6:48 PM
... or did my vs add those when i tried getting sqlite3 up and running ? im not sure, did a lot 😄
Avatar
no those libs for mysql though
Avatar
GormusSenex 2/1/2020 7:04 PM
man, just downloaded ur latest update. now i get code errors all around 🤪
7:04 PM
i mean, the serverapi compiles perfectly. my code just references non-existing methods... argghhhh
Avatar
like which ones?
Avatar
GormusSenex 2/1/2020 7:05 PM
how to GetOwnerController from AShooterPlayerState ?
Avatar
it was removed?
Avatar
GormusSenex 2/1/2020 7:08 PM
apparenty. getting this compilation error: 'GetOwnerController': is not a member of 'AShooterPlayerState' (edited)
Avatar
i think that my mistake, sorry should be base class here
Avatar
GormusSenex 2/1/2020 7:12 PM
phew 😄
Avatar
whew lol
Avatar
fixed that
Avatar
GormusSenex 2/1/2020 7:20 PM
Only Actor.h changed right ?
Avatar
now yes
Avatar
GormusSenex 2/1/2020 7:21 PM
aight. compiling...
7:26 PM
yup, all works now. cheers 👍
Avatar
Did anyone try to imprint dinos once they spawned? AShooterCharacter* player_character = static_cast<AShooterCharacter*>(player_controller->CharacterField()); if (player_character) { FString char_name = ArkApi::GetApiUtils().GetCharacterName(player_controller); uint64 data_id = player_character->GetPlayerData()->MyDataField()->PlayerDataIDField(); if (!char_name.IsEmpty() && data_id > 0) { dino_spawn->UpdateImprintingDetails(&char_name, data_id); dino_spawn->UpdateImprintingQuality(imprint_amount / 100.0f); } } This code works fine but sometimes (it seems that absolutely randomly) causes crashes on dino_spawn->UpdateImprintingDetails(&char_name, data_id);
Avatar
it crashes inside UpdateImprintingDetails?
Avatar
Stack trace is ended on this call
10:05 PM
Of course, dino_spawn pointer isn't null, I check it above
Avatar
GormusSenex 2/1/2020 10:18 PM
Erm, have any1 noticed that if u stand on an enemy foundation the enemy turrets wont shoot u ? even if u jump on it... is it just my single player mode that does it ?
10:20 PM
turret in front here wont shoot me until i get off the foundation
10:21 PM
could be some bad coding i made tho... ?
Avatar
substitute 2/2/2020 3:21 AM
@Michidu
3:21 AM
3:21 AM
when using
3:21 AM
UPrimalCharacterStatusComponent* defaultComp = static_cast<UPrimalCharacterStatusComponent*>(static_cast<UClass*>(_this)->GetDefaultObject(true));
Avatar
substitute 2/2/2020 3:55 AM
UPrimalCharacterStatusComponent is a child of UActorComponent
Avatar
which is child of UObject, so you can't just cast it to UClass.. i told you to use ClassField()
6:30 AM
@DevCPP have you tried debugging? it is quite weird, because this function is simply, you could even try to rewrite it
Avatar
substitute 2/2/2020 6:53 AM
@Michidu
6:53 AM
UPrimalCharacterStatusComponent* defaultComp = static_cast<UPrimalCharacterStatusComponent*>(_this->ClassField()->GetDefaultObject(true));
6:53 AM
looks good?
Avatar
yes
Avatar
substitute 2/2/2020 6:56 AM
i'll give it a shot
7:14 AM
could be unrelated
7:14 AM
but interesting random crash
Avatar
substitute 2/3/2020 2:44 AM
@Michidu that getclass did the trick btw
Avatar
substitute 2/3/2020 8:13 AM
I've filled out the FPrimalCharacterStatusValueDefinition struct
8:13 AM
I am going to test my changes
8:05 PM
I found that if killed by a dinosaur it will cause the server to crash
Avatar
GormusSenex 2/4/2020 8:55 PM
umm... i have a more generic c++ question not rly related to arkserverapi. is it possible to make a form of generic callback function when calling sqlite3. like i have 3 diff. structs I want to populate eg.: struct AAA { ... }; struct BBB { ... }; struct CCC { ... }; Instead of needing these: std::vector<AAA> db_callback_AAA(...) { ... }; std::vector<BBB> db_callback_BBB(...) { ... }; std::vector<CCC> db_callback_CCC(...) { ... }; I would like just one: std::vector<T> db_callback(...) { ... }; It's probably called something fancy and thats why i cant find it on google... ? (edited)
Avatar
Templates
9:14 PM
@cokll good idea, just should keep null check and also check if player is alive just in case
Avatar
@Michidu
11:14 PM
how to add to
11:14 PM
?
11:14 PM
I tried template<typename T> FORCEINLINE static TWeakObjectPtr<const T> ToWeak(const T* object) { return TWeakObjectPtr<const T>(object); }; TWeakObjectPtr<const UPrimalInventoryComponent> a = ToWeak<UPrimalInventoryComponent>(comp); who->RemoteViewingInventoriesField().AddUnique(a);
11:14 PM
but i get
Avatar
try FWeakObjectPtr::operator=
Avatar
substitute 2/5/2020 7:25 AM
@Michidu
Avatar
have to do manually probably FWeakObjectPtr::operator=(FWeakObjectPtr *this, UObject *Object)
Avatar
substitute 2/5/2020 7:31 AM
ah no i think i find the issue
7:31 AM
7:31 AM
the class isn't shown as uobject (edited)
7:32 AM
hm no that's not it
Avatar
you sure you need to add it to RemoteViewingInventoriesField manually?
Avatar
substitute 2/5/2020 7:33 AM
yes
7:33 AM
I'm seeing if emulating another existing function will work for something
Avatar
substitute 2/5/2020 9:20 AM
@Michidu well, in the mean time
9:20 AM
I've started RE this struct
9:20 AM
struct FPrimalPlayerCharacterConfigStructReplicated { uint8 bIsFemale : 1; FLinearColor BodyColors[4]; FString PlayerCharacterName; float RawBoneModifiers[22]; int32 PlayerSpawnRegionIndex; };
9:20 AM
but how should I put in constructor and methods?
Avatar
you need dump?
Avatar
substitute 2/5/2020 9:21 AM
no i have it dumped
9:21 AM
i mean how should i add it
9:21 AM
the constructors / methods
9:21 AM
this struct isn't exist in the api currently
9:21 AM
that is what i made so far
9:21 AM
and tested as working
Avatar
FPrimalPlayerCharacterConfigStruct * operator=(FPrimalPlayerCharacterConfigStruct * __that) { return NativeCall<FPrimalPlayerCharacterConfigStruct *, FPrimalPlayerCharacterConfigStruct *>(this, "FPrimalPlayerCharacterConfigStruct.operator=", __that); } static UScriptStruct * StaticStruct() { return NativeCall<UScriptStruct *>(nullptr, "FPrimalPlayerCharacterConfigStruct.StaticStruct"); } void FScriptStruct_ShooterGame_StaticRegisterNativesFPrimalPlayerCharacterConfigStruct() { NativeCall<void>(this, "FPrimalPlayerCharacterConfigStruct.FScriptStruct_ShooterGame_StaticRegisterNativesFPrimalPlayerCharacterConfigStruct"); } you need this?
Avatar
substitute 2/5/2020 9:24 AM
it may be possible, I'm just adding the struct to the api and was going to push it forwards
Avatar
sorry, i gave you wrong struct this is correct
9:30 AM
FPrimalPlayerCharacterConfigStruct * GetPlayerCharacterConfig(FPrimalPlayerCharacterConfigStruct * result) { return NativeCall<FPrimalPlayerCharacterConfigStruct *, FPrimalPlayerCharacterConfigStruct *>(this, "FPrimalPlayerCharacterConfigStructReplicated.GetPlayerCharacterConfig", result); } static UScriptStruct * StaticStruct() { return NativeCall<UScriptStruct *>(nullptr, "FPrimalPlayerCharacterConfigStructReplicated.StaticStruct"); } FPrimalPlayerCharacterConfigStructReplicated * operator=(FPrimalPlayerCharacterConfigStructReplicated * __that) { return NativeCall<FPrimalPlayerCharacterConfigStructReplicated *, FPrimalPlayerCharacterConfigStructReplicated *>(this, "FPrimalPlayerCharacterConfigStructReplicated.operator=", __that); }
9:31 AM
all functions this struct have (edited)
Avatar
GormusSenex 2/5/2020 8:16 PM
is there a way to get from Player ID to AShooterPlayerController ?
Avatar
ye
8:16 PM
it's an arkAPI func
8:18 PM
ArkApi::GetApiUtils().GetPlayerID()
Avatar
GormusSenex 2/5/2020 8:18 PM
no, the other way around
8:18 PM
i have player id
Avatar
oh you mean find controller from player id ?
Avatar
GormusSenex 2/5/2020 8:18 PM
i need the shootercontroller
8:18 PM
ye
Avatar
get stemID and then find the controller from steamID
8:19 PM
or you cannot get steamID ?
Avatar
GormusSenex 2/5/2020 8:20 PM
i can but there doesnt seem to be a GetControllerFromSteamID ?
8:20 PM
unless i wanna loop trough all of them from UWorld
Avatar
ArkApi::GetApiUtils().FindPlayerFromSteamId()
Avatar
substitute 2/5/2020 8:21 PM
^that probably just loops anyways
Avatar
GormusSenex 2/5/2020 8:21 PM
ahh fuck
8:21 PM
ofc
8:21 PM
just saw the name and assumed it was playerid from steam id 😄
8:21 PM
ty
Avatar
substitute 2/5/2020 8:21 PM
@Michidu not that struc there’s a different one i needed
Avatar
@Michidu if you know
10:52 PM
Is it possible to hook bp functions
10:52 PM
I don’t think so because they would not be in pdb but I am unsure
10:53 PM
I figure there are other work arounds though if I want to use a mod to make a ui for my plugin
Avatar
you need communication ?
Avatar
I’d like it yes
11:05 PM
Some things for mods would work much better in c++
Avatar
use ServerSendChatMessage for mod -> plugin
Avatar
I figured something like that
Avatar
use ScriptCommand for plugin -> Mod
Avatar
It’s not very clean though
11:06 PM
:/
Avatar
better than webrequests 😃
11:06 PM
no other way to do it as far as i know
11:08 PM
if u can find a function that has a server and client counterpart maybe you could use it too
11:08 PM
assuming you can get some kind of an event listener in the mod
Avatar
GormusSenex 2/5/2020 11:21 PM
wouldnt it be nice if an actual dev from wildcard would stick his nose in here from time to time ? or would he just get shit-stormed ?? 😂
Avatar
substitute 2/6/2020 6:08 AM
@GormusSenex zen rowie made it clear that they absolutely offer 0 support for plugins
Avatar
GormusSenex 2/6/2020 8:11 AM
ofc 🙄
8:13 AM
... which is funny cuz these server-side plugins r whats saving the ark universe 🙄
Avatar
they are too powerful also
Avatar
GormusSenex 2/6/2020 9:30 AM
and another thing, dont "regular" mods pose a security risk on the users pc ? server side dont afaik
Avatar
pretty sure mods are very limited, so you can't do anything harmful
Avatar
GormusSenex 2/6/2020 9:31 AM
so they r sandboxed ? ahh
Avatar
yes i've had a discussion with mod devs, one of them said they won't join any server running plugins because they have a tendency to steal data
Avatar
GormusSenex 2/6/2020 9:31 AM
u dont have access to file system from a mod ?
Avatar
no
Avatar
what data? lol
Avatar
🤷‍♂️
9:32 AM
they were dissing me for HWIDBans lol
Avatar
ah, that
Avatar
if only they found out it was the mod that grabs HWID
9:32 AM
XD
Avatar
lol
Avatar
GormusSenex 2/6/2020 9:32 AM
ye, but thats becuz ur using a mod combined with the plugin right ?
9:33 AM
ye i figured. hwid is from the mod
Avatar
yes but the mod is responsible for sending all data 😄
9:33 AM
so it makes no sense what they said
Avatar
GormusSenex 2/6/2020 9:33 AM
and thats what i was worried about. cuz if a mod also have access to the file system, then its a rip. a plugin dont
Avatar
actually you can still do pretty bad stuff with it
Avatar
GormusSenex 2/6/2020 9:34 AM
or memory outside the sandbox
Avatar
some chinese modder named his mod after a very large mod
9:34 AM
and made it steal some user data
Avatar
what it can steal?
Avatar
GormusSenex 2/6/2020 9:34 AM
everything if its not 100% sndboxed (edited)
9:34 AM
sandboxed*
Avatar
not from filesystem
9:34 AM
you cannot access it
9:35 AM
i'm assuming it was like IP addresses and all
Avatar
GormusSenex 2/6/2020 9:35 AM
well... access to memory outside whats been given... then u have access anyway
Avatar
since mods can do http requests, there is always a way to know IP (which is not really hidden nowadays anyway)
9:37 AM
you can probably build a small botnet with mod
Avatar
GormusSenex 2/6/2020 9:37 AM
goes off starts coding next bot net
9:37 AM
😄
Avatar
you know
9:37 AM
the PF NPC mod
9:37 AM
also grabs player's HWID and IP to display them on leaderboards
9:38 AM
and possibly ban them for cheating or whatever
9:38 AM
but it don't see it's dev getting bashed 😄
9:38 AM
even though he's collecting all this on HIS own server
Avatar
GormusSenex 2/6/2020 9:38 AM
cuz no1 uses that mod
9:38 AM
😂
Avatar
it has 10k subs less than mine tho 😛
Avatar
server owners can know players IP w/o mods or plugins heh
Avatar
GormusSenex 2/6/2020 9:40 AM
a simple ip sniffer and thats it on the server
Avatar
wireshark 😛
Avatar
GormusSenex 2/6/2020 9:40 AM
love it. even tho i only know like 5% of it 😄
Avatar
GormusSenex 2/6/2020 12:49 PM
another thing: ive added a consolecommand, but when i enter it, it wont execute ? do i need the permission plugin for it to work or do i need to be an admin ?
Avatar
console command needs cheat infront
Avatar
GormusSenex 2/6/2020 1:05 PM
now it worked 😄 geez 🤪
1:06 PM
ty. any way to get around having to be an admin to use console commands ? (edited)
1:06 PM
(besides moving it to chat command)
Avatar
pretty sure it’s read from the ConsoleCommand hook which is only triggered if you input cheat before command
1:11 PM
so maybe add your own hook for it ?
1:11 PM
not sure if it would get called for non admins tho
Avatar
GormusSenex 2/6/2020 1:14 PM
too much work then. ill use chat command and permissions 😉
Avatar
GormusSenex 2/6/2020 10:54 PM
is there any way to call an animation effect, like the cryopod thing, from server-side ?
Avatar
Not really
Avatar
Weird question but how exactly does AutomaticPluginReloading work ? , Im trying to recompile a addon with some modifications but in doing so it errors out saying that the DLL is open in ShooterGameServer.exe ( the server im on at the moment ) so how do you actually use AutomaticPlugin reloading ?
Avatar
GormusSenex 2/7/2020 4:04 PM
not a wierd quiestion, cuz i dont know either 😄
Avatar
Looking into it now , maybe it's because i have it in a admin privilege required directory
4:06 PM
I moved the server to the desktop now and looking into if that fixes it
Avatar
nope
4:22 PM
same issue
4:22 PM
Visual Studio just reports "LNK1104 cannot open file <compileddllname>.dll"
Avatar
If anyone manages to figure it out do let me know
Avatar
file should be named as <compileddllname>.dll.ArkApi (edited)
Avatar
An unexpected database error occurred. Please try again later.
6:29 PM
^website
Avatar
fixed
Avatar
@Michidu It just compiles it as a .dll file , is there a step i missed in the google doc for setup or do i need to rename it ?
6:38 PM
i did see a video of the beyond api auto renaming it to that but i thought it no longer did that since it never did for me
Avatar
you need to rename or configure your project to auto rename it
Avatar
So have the export dll be named .dll.arkapi ?
Avatar
yes
Avatar
Alright thanks for the info il dig into it nice
Avatar
Im looking to cancel the player mount event (using it to disable flyers on abb but still breed), is this the correct one? void OnRep_MountedDino()
Avatar
maybe you should try this one APrimalDinoCharacter::CanMount
6:52 PM
or you wanna remove rider?
Avatar
both will work
7:06 PM
i want to either cancel the mount event or knock the player off his tame after he mounted
Avatar
APrimalCharacter::ClearMountedDino or APrimalDinoCharacter::ClearMountCharacter might help you also
Avatar
how do i get the blueprint path?
9:13 PM
from APrimalDinoCharacter (edited)
Avatar
if (ArkApi::GetApiUtils().IsRidingDino(AttackerShooterController)) { auto character = AttackerShooterController->GetPlayerCharacter(); auto dino = character->GetRidingDino(); if (dino) dino->ServerClearRider_Implementation(0); } (edited)
10:56 PM
@Bram this dismounts the player from dino
Avatar
okay thx, but how do i check which dino type it is
Avatar
if there still is someone willing to help me: how do i get all players that are in an arena once they kill a bossfight
Avatar
substitute 2/9/2020 9:28 AM
@Michidu
9:28 AM
NewPlayer->NetConnectionField()->bSharedConnectionField()
9:28 AM
keeps returning true when it shouldn't
9:28 AM
😦
Avatar
_this->bIsBossDino()() == true
9:30 AM
you need to load bitfields like this
9:30 AM
_this->bIsBossDino() = false
9:30 AM
and like this for setting
9:31 AM
are you sure that it's a bit field
9:31 AM
if (PlayerNetConnection->bSharedConnectionField()() == true)
Avatar
in my case it was indeed a bitfield
Avatar
substitute 2/9/2020 9:31 AM
mine is showing as
9:31 AM
bool& bSharedConnectionField() { return *GetNativePointerField<bool*>(this, "UNetConnection.bSharedConnection"); }
Avatar
oh
9:32 AM
the b in the name made me think it was a bitfield
Avatar
substitute 2/9/2020 9:32 AM
I might need to update the api headers
9:35 AM
@WETBATMAN
9:41 AM
lastest source shows it as
9:41 AM
bool& bSharedConnectionField() { return *GetNativePointerField<bool*>(this, "UNetConnection.bSharedConnection"); }
9:41 AM
:\
9:47 AM
I've figured it out
9:47 AM
somewhat at least
Avatar
GormusSenex 2/9/2020 7:23 PM
How to use AddToInventory ? Doing this: UPrimalInventoryComponent* inventoryComponent = [...] UPrimalItem* item = [...] item->AddToInventory(inventoryComponent, false, false, nullptr, false, true, false); It doesnt put anything in the inventory. InventoryComponent is based on APrimalStructureItemContainer->MyInventoryComponentField().
Avatar
substitute 2/9/2020 8:59 PM
@WETBATMAN I've figured why it's always true I think
8:59 PM
I believe it's because the online subsystem hasn't actually validated the client yet.
9:00 PM
9:00 PM
you can tell when it is shared when m_SteamID != m_OwnerSteamID (edited)
Avatar
GormusSenex 2/9/2020 9:05 PM
r u guys working on some sort of ban system ?
Avatar
substitute 2/9/2020 9:10 PM
Nah I’m just having fun
Avatar
@Michidu
12:14 AM
is something wrong with the hooking library?
12:14 AM
12:14 AM
void ShooterGameModeHooks::Hook_AShooterGameMode_PostLogin(AShooterPlayerState* _this, APlayerController* NewPlayer) { AShooterGameMode_PostLogin_original(NewPlayer); return; }
12:15 AM
hook is completely transparent and it crashes the server
Avatar
no, you just call original wrong first arg is _this
Avatar
oh shit
6:55 AM
kekwhat
6:58 AM
that's what I get for writing it at 4am
Avatar
heh also return is useless here
Avatar
it actually had more code past that
6:59 AM
I just wanted to return early to see if it was my stuff that was the crash
7:00 AM
(I just put the closing } for the sake of having it be "complete" in the sample)
Avatar
GormusSenex 2/10/2020 8:03 AM
speaking of pre-login. what hook checks for whitelist ?
Avatar
@GormusSenex AShooterGameMode_IsPlayerAllowedToJoinNoCheck is one
8:05 AM
but even when just stubbing it and returning true, there must be another check somewhere
8:05 AM
because I was still getting kicked
Avatar
GormusSenex 2/10/2020 8:13 AM
🤔
Avatar
GormusSenex 2/10/2020 11:15 AM
Is there someway to hook into a keypress ? like the '+' for defecate ? ig u cannot hook into keypresses that doesnt do anything server-side (like show map), but defecate should trigger something server-side im guessing... ? (edited)
11:17 AM
i get that u probably cannot hook a keypress directly, but i mean, indirectly when it causes a server-side action (edited)
11:18 AM
nvm above 😂
11:18 AM
any way to hook into defecate action ?
Avatar
probably keys are not sent to server
1:10 PM
APrimalCharacter::Poop this one i guess you wanna give achievements based on that? heh
Avatar
GormusSenex 2/10/2020 1:12 PM
But poop probably only gets fired when character actually poops, and not when he just tries to. I want the pre-poop event if something like that exists. could be this on, i donno - gonna try when i get home.
Avatar
APrimalCharacter::TryPoop
Avatar
GormusSenex 2/10/2020 1:14 PM
No, no Master Poop Achievement 😄 its actually for something completely different - gonna see if its possible to TryPoop while watching through a spyglass - to get viewingactor stats (dont like the binocular mod or adv. spyglass stuff - dont like mods at all tbh) 😂
Avatar
you wanna see if its possible to poop while watching through a spyglass? some nice experiments going on here lol
Avatar
GormusSenex 2/10/2020 1:16 PM
haha, nothing wierd here, move along 😂
1:17 PM
it was in lack of other actions i choose the poop functionality 😉
1:17 PM
no fetish... ehem
Avatar
sure 😄
Avatar
GormusSenex 2/10/2020 1:21 PM
😇
Avatar
is there any doc where i can get info that which hook stants for what?
Avatar
GormusSenex 2/10/2020 2:51 PM
I dont think so, no. The name often reveals the action - most of the time. Im usually looking in these files: https://github.com/Michidu/ARK-Server-API/tree/master/version/Core/Public/API/ARK
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
2:52 PM
... and then with trial'n'error & googling most can be figured out. rest i ask for in here 😄
Avatar
ok tx @GormusSenex
Avatar
some one knows an ark init function / hook that is called after UWorld::InitWorld ?
Avatar
@Smit
10:11 PM
You can also attempt to reverse engineer the game too
10:11 PM
But that’s complicated
10:12 PM
@GormusSenex sounds like what you need specifically
10:13 PM
Ontrypoop: If actor is using spy glass: Ray trace from actor forwards On hit, if Dino dump stats Message calling player controller the stats
10:13 PM
Am I correct?
Avatar
GormusSenex 2/10/2020 10:13 PM
yup
Avatar
Weird
10:14 PM
Why not do a real time thing with a command?
Avatar
GormusSenex 2/10/2020 10:14 PM
if we look past its a poop command, its kinda cool feature instead of a mod
Avatar
!targetStats
Avatar
GormusSenex 2/10/2020 10:14 PM
a hook u mean ?
Avatar
No a command
10:14 PM
You can do chat commands
Avatar
GormusSenex 2/10/2020 10:15 PM
thats annoying. u dont wanna type a command if ur flying around. u just wanna trypoop 😄
Avatar
Then why not track the user state
10:15 PM
And if use spy glass
10:15 PM
Enable a timer that dumps the ray trace Dino stats
Avatar
GormusSenex 2/10/2020 10:16 PM
hmm... timers break the auto-reload plugins dont they ? and i dont like timers. i have a feeling they slow down performance, but i might be wrong
Avatar
The timer would be removed when the user stops aiming with the spy glass
10:16 PM
The timer would just be to repeat the trace while they’re spying
Avatar
i mean yea sounds like a good idea
10:17 PM
just hook the item equip func
10:17 PM
to trigger the timer
Avatar
GormusSenex 2/10/2020 10:22 PM
so instead of a hook u propose a timer, like wait x secs to check if aimedtarget then do yy
Avatar
No you hook when they aim the spyglass
Avatar
GormusSenex 2/10/2020 10:22 PM
ohh
Avatar
Then when they aim with it on your hook you enable a timer to do raytraces
10:23 PM
Once they unaim you kill the timer
Avatar
GormusSenex 2/10/2020 10:23 PM
but... in the rare event that some1 is aiming while the auto-plugin reload fires... wont server crash ?
Avatar
I would also store the last Dino hit so it doesn’t spam the same dino over and over if they don’t move mouse
10:24 PM
Why would you reload the plugin
10:24 PM
On a production environment
Avatar
GormusSenex 2/10/2020 10:24 PM
i dont use the reload thingie at all. not sure how it works. just read in here that timers crashes it.
10:25 PM
ohh... ur using it when ur developing ? ahh
10:25 PM
im shutting down ark each time 😂
Avatar
There’s no reason to reload plugins when they’re configured and done
10:25 PM
Not any good reason at least
Avatar
^^
10:25 PM
reloading the config should be easy enough to add tho
10:26 PM
no need for reloading the entire DLL
Avatar
Yeah dll detach isn’t something I’d want happening often in production
10:26 PM
I’d like it to never happen
Avatar
GormusSenex 2/10/2020 10:27 PM
then i would say the suggestion is solid and a good one
10:27 PM
make timer when aiming spyglass and kill it when not. and when dino in target, send stats to player
Avatar
Keep the last Dino you sent
Avatar
GormusSenex 2/10/2020 10:28 PM
better than the poop thingie 😉
Avatar
And don’t keep resending the same Dino
10:28 PM
Only send if trace is valid and isn’t the last valid trace result
Avatar
GormusSenex 2/10/2020 10:29 PM
i need to figure out how to make a timer. ive seen it bunch of times around jsut never fiddled with it yet (edited)
10:29 PM
"trace" ?
10:29 PM
need to learn that too...
Avatar
Ray trace
10:30 PM
Do you know vector math?
10:30 PM
You need basic vector knowledge to use a ray trace
Avatar
GormusSenex 2/10/2020 10:31 PM
i guess i can google it i hope
Avatar
Here I’ll help you
10:33 PM
For your trace you need to set origin to your actor location, that is easy For the end point, take the forwards vector of your actors rotator and multiply it by the length that you want to trace (E.g. 1000 for 1000 ue units) Take that value and add it to your actor location
10:33 PM
And that would be the end point
Avatar
GormusSenex 2/10/2020 10:35 PM
i think i got that, but what help is the endpoint gonna do for me ? i mean, isnt something triggered when u look at a dino ? and cant i just hook into that and then also check if a spyglass is equipped ?
Avatar
No
10:36 PM
You need to ray trace what is in front
10:36 PM
And check if it is a dino
Avatar
GormusSenex 2/10/2020 10:36 PM
ohh thats what the anti-mesh thingie does? it raytraces to a target and then raytraces back and if u can see urself from the targetm ur not in the mesh ? (edited)
Avatar
yes
Avatar
GormusSenex 2/10/2020 10:38 PM
but im sorry. i understand ur concept, i just have a hard time trying to figure out how to implement it 🙂
Avatar
can't a collision channel be used for this ? 😄
Avatar
GormusSenex 2/10/2020 10:39 PM
any1 made some raytracing code i can scan ? dont think ive seen any on github
Avatar
Probably
10:39 PM
@GormusSenex I can make something in a bit
Avatar
just use a collision channel
Avatar
You still need a ray trace
10:40 PM
You can trace for the Dino channel though
Avatar
GormusSenex 2/10/2020 10:40 PM
cool, thx @substitute
10:41 PM
Is the related ue4 reference
Avatar
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
This how to covers using a Single Line Trace by Channel Blueprint node to return a the first Actor it hits that responds on the Visibility channel, and prints its name.
10:43 PM
@WETBATMAN aimed actor just a ray trace
10:43 PM
The issue is it may not trace far enough
10:43 PM
Depends on how far he wants to trace
Avatar
GormusSenex 2/10/2020 10:43 PM
ohh this is what u mean ? AActor* actor = player_controller->GetPlayerCharacter()->GetAimedActor
10:43 PM
ive used that be4
Avatar
That just wraps the standard ray trace
10:43 PM
You have more control if you diy
Avatar
GormusSenex 2/10/2020 10:44 PM
ok, now we r talking rocket science... im not a native c++ coder 😂
Avatar
Getaimedactor does the ray trace for you
10:44 PM
But it auto fills some stuff
10:44 PM
That you may want finer control over
10:44 PM
If it works good enough for you then it’s good enough
10:45 PM
But you should learn how to do traces as it gives you way more control and lets you do some really neat things
Avatar
GormusSenex 2/10/2020 10:45 PM
theres a lot of stuff i need to learn, ngl... and raytracing wasnt on the list be4 u told me about it 😄
10:45 PM
A visual
10:45 PM
The red line is the trace
10:46 PM
The box is the “hit”
Avatar
GormusSenex 2/10/2020 10:46 PM
i get the concept
10:46 PM
its the code im gonna struggle with
Avatar
It’s 99% math
10:46 PM
And it’s not complicated
10:46 PM
You only need the actor rotator and location
10:46 PM
And you can do one ezpz
10:47 PM
This is ue4 example in bp script
10:47 PM
Avatar
GormusSenex 2/10/2020 10:47 PM
i tell my wife coding is not complicated, and she's a teacher. why do i feel like my wife right now... 😂
Avatar
What do you do¿
Avatar
GormusSenex 2/10/2020 10:48 PM
google to my fingers bleed (edited)
10:48 PM
😉
Avatar
?
Avatar
GormusSenex 2/10/2020 10:49 PM
nvm. u asked me what i would do, and i thought i replied to that 🙂
10:50 PM
what is that ui ? ue engine ?
Avatar
That was ue4 bp script
10:50 PM
Same thing mods use
Avatar
GormusSenex 2/10/2020 10:50 PM
so modding is drag and drop ?
Avatar
The workflow for a trace is the same in c++
10:51 PM
And yes it is
Avatar
GormusSenex 2/10/2020 10:51 PM
omg
Avatar
?
Avatar
@Michidu
6:51 AM
Can not submit Ark plugin
6:51 AM
6:52 AM
Avatar
added you to plugin devs group
Avatar
const long double nNow = ArkApi::GetApiUtils().GetWorld()->GetTimeSeconds(); class "UWrold" has no member "GetTimeSeconds"
7:40 AM
any solution?
Avatar
ArkApi::GetApiUtils().GetWorld()->GetTimeSeconds(); does not work for you?
Avatar
no (edited)
8:10 AM
it says class "UWrold" has no member "GetTimeSeconds"
Avatar
it's because WC removed it recently
Avatar
so any alternative? (edited)
8:22 AM
but realistically it should exists
8:22 AM
Returns time in seconds since world was brought up for play, IS stopped when game pauses, IS dilated/clamped
8:22 AM
unless WC went into the engine src and removed it
Avatar
@WETBATMAN my src has it showing
Avatar
VoteRewards crashed because of this though
8:24 AM
they pulled this func
Avatar
I really don't think it's gone-gone
8:25 AM
that func exists directly in the UE4 engine
8:25 AM
it'd be really dangerous for them to just pluck functions out of the engine
Avatar
ida doesn’t show it anymore tho
Avatar
Again, I think it's something fucky
8:25 AM
mods can call a variant of that
8:25 AM
and they do their best to not let mods crash games
8:26 AM
What (good) reason would they remove it?
Avatar
yeah it’s weird
Avatar
I can't see why they'd remove it especially when removing engine functions is always risky
8:26 AM
@Smit what type of time do you need?
8:26 AM
you could use the system clock
Avatar
basically want to calculate time between command fired
Avatar
system time could probs work just fine
Avatar
time_t SystemSeconds = time(0);
Avatar
TimeSecondsField still here
9:37 AM
i dont think they removed it manually compiler removes unused functions, so could be that
Avatar
@Michidu quick question
10:01 AM
is a parameterless function that returns an FVector
10:01 AM
but
10:01 AM
in the api
10:01 AM
it's
10:01 AM
which requires a pointer to an already existing FVector?
10:01 AM
Making a zero vector isn't a problem, but it's strange (edited)
10:02 AM
especially since it also returns an FVEctor
Avatar
no, it's just compiler optimization you can pass empty vector and the function will write result into it (return value will be same)
Avatar
huh that's strange
10:03 AM
interesting syntax again from the land of c++
10:03 AM
does the invector have to be valid?
10:03 AM
e.g. would NewPlayer->GetActorForwardVector(nullptr); induce a crash
Avatar
yes, it should crash since function will be writing values to it
10:04 AM
nothing weird, this way you achieve less copies
Avatar
side note,
10:04 AM
missing GetActorLocation
10:04 AM
sadday
Avatar
you can get player pos using other funcs
Avatar
but there is no way to use GetActorForwardVector in one line?
10:06 AM
since a new FVector needs to be created ahead of time
10:06 AM
I guess I could write a wrapper that gives a pointer to a fresh FVector
10:09 AM
FVector* GetZero() { auto a = FVector{ 0,0,0 }; return &a; } FVector* myFWD = NewPlayer->GetActorForwardVector(GetZero());
10:09 AM
something dirty like that
Avatar
there is a way but it will involve dynamic memory allocation, which you probably dont need
Avatar
would^ not work?
10:10 AM
wait no
Avatar
it wont work indeed
Avatar
because once GetZero returned
10:10 AM
the pointer is invalidated
10:10 AM
because it was stack allocated
Avatar
FVector myFWD; NewPlayer->GetActorForwardVector(&myFWD); looks fine for me
Avatar
so I mean .... it could work. It's not technically going to fail, it's just 100% undefined
10:10 AM
Yes, I figured the that would work
10:11 AM
Was mostly hoping for clean one-liner
10:11 AM
so can just auto myFWD = NewPlayer->GetActorForwardVector()
10:11 AM
type deal (edited)
Avatar
FVector* myFwd = NewPlayer->GetActorForwardVector(calloc(1, sizeof(FVector))); not clean though
Avatar
yeah
10:13 AM
this would be """clean"""-er
10:13 AM
FVector myFWD;NewPlayer->GetActorForwardVector(&myFWD);
10:13 AM
Kapp
Avatar
In C++ computer programming, copy elision refers to a compiler optimization technique that eliminates unnecessary copying of objects. The C++ language standard generally allows implementations to perform any optimization, provided the resulting program's observable behavior is...
Avatar
[API][warning] (API::PluginManager::LoadAllPlugins) Plugin Release does not exist (edited)
1:39 PM
what is that mean?
Avatar
your folder needs to be called exactly the same as the DLL
1:41 PM
thanks
Avatar
VoteReward is still broken or get fixed? (edited)
Avatar
PDBReader seems pog
12:06 AM
XD
Avatar
@Michidu
3:51 AM
is posted :)
5:00 AM
sup sub
Avatar
GormusSenex 2/12/2020 7:47 AM
Avatar
probably it hasn't been approved yet
Avatar
approved now good job
Avatar
ye indeed
7:57 AM
very cool
Avatar
BIt offtopic, but anyone got some info on the love evolved event for custom servers ?
10:27 AM
Couldnt find anything concrete on how to enable it, no info on an -activeevent option
10:27 AM
and restarting + force wiping dino's does jack shit
Avatar
-ActiveEvent=vday
10:31 AM
@Forced
Avatar
Yeah read that, but people seem to be having mixed success with it
Avatar
Just got word from a player its active, without any -activeevent set
10:48 AM
@#$@ wildcard...
Avatar
GormusSenex 2/12/2020 10:53 AM
😂
Avatar
GormusSenex 2/12/2020 2:26 PM
yo @substitute how do u make the small window appear (where u write kicked etc) ?
Avatar
with the KickPlayer function you can send a message @GormusSenex
👍 1
Avatar
@Michidu
3:07 AM
What would be the easiest way to add this
3:07 AM
I’m not sure how to add references to templated static methods in the api
Avatar
adding templated structs not that easy what do you need from this?
9:40 AM
or just choose overload you need
Avatar
GormusSenex 2/13/2020 12:46 PM
If I wanna hook into chat, are these the ones to do it with ? SendServerDirectMessage SendServerChatMessage SendServerNotification (edited)
12:47 PM
Is there anything else i need to hook into or is that it ? (edited)
Avatar
hook the function api hooking
Avatar
GormusSenex 2/13/2020 12:51 PM
umm ?
12:52 PM
ur function ? the arkapi one ? i didnt know that was possible ?
Avatar
AShooterPlayerController.ServerSendChatMessage_Implementation this i mean
Avatar
GormusSenex 2/13/2020 12:54 PM
ahh, ok. thx 👍
Avatar
@Michidu
3:41 PM
I would like to call send for network failure (edited)
Avatar
@GormusSenex
6:41 PM
For the hot reloading
Avatar
GormusSenex 2/13/2020 6:42 PM
ahh ty 👍 would make it a lot faster testing stuff 😄
Avatar
Yeah i only now got time after work
6:42 PM
to figure that out
Avatar
@substitute just choose an overload you need, then you can call it just like regular function
Avatar
The struct isn’t defined
Avatar
as i see it has only functions you can grab them from ida
Avatar
@Michidu I've enabled AutomaticPluginReloading in config.json, the plugins i compile go into a /Release folder and when it finishes compiling it gets copied to the root folder of the addon im working on however when the server starts up and i do some modifications to the plugin and recompile it ( with the dll.arkapi ) extension name the plugin is still runing the old code
9:31 PM
Is there anything i missed ?
9:32 PM
Also a worthwhile note is that when the server starts up, if it only has a <pluginname>.dll.arkapi file in it it gets renamed to just <pluginname>.dll
Avatar
@Michidu
Avatar
nvm I got it
1:34 AM
No more kicked msg
1:34 AM
lolololole
Avatar
ah nice
Avatar
It’s why I needed the fcontrolmsg
7:09 AM
😉
7:09 AM
Now it is exactly like the official kick
Avatar
GormusSenex 2/14/2020 8:31 AM
but more importantly... can u cancel it ? 😂
Avatar
@GormusSenex btw have you succeed with stacks plugin?
Avatar
GormusSenex 2/14/2020 8:35 AM
I posted it in the #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ . but somehow it wont take veggie cake or cannons
8:35 AM
(and probably more i havent found)
Avatar
weird, this array should have all items
8:37 AM
did you try updating max stack real time?
Avatar
GormusSenex 2/14/2020 8:38 AM
no, i was planning on testing that along with changing the unit weight (edited)
8:38 AM
(eventually) 😉
8:39 AM
but my progress stopped when it didnt dump veggie cakes and cannons
Avatar
that should be only small part of items
Avatar
GormusSenex 2/14/2020 8:40 AM
its more finding which ones tho
8:41 AM
plan was to update it all in AShooterGameMode_InitGame from a config file
Avatar
that a good idea, could replace stacks mods (edited)
Avatar
GormusSenex 2/14/2020 8:42 AM
ye i hope. but then i also need to make a /upload function and /download function for all the existing stacked items so one dont loose existing items
8:43 AM
cuz once u remove the stack mod everything goes
Avatar
that why they are bad heh
Avatar
GormusSenex 2/14/2020 8:43 AM
yup 😄
8:43 AM
im working on upload and download now actually
Avatar
how you gonna do it?
Avatar
GormusSenex 2/14/2020 9:02 AM
my plan is to upload to a db. then ill save the name of the container (aimed target) and the blueprint and the quantity, and then saves it in the db and removes it in the container. then when u download, u look at ur container and it will put the right stuff back in the right container based on the name. ofc it wont work if they remove something (containers) in the meantime, so i plan on maybe have a spawn command that will dump the rest in front of the player (edited)
Avatar
looks like players would have to do it in a limited time
Avatar
GormusSenex 2/14/2020 9:11 AM
i dont know if its possible to iterate through all containers on the map. if so it would be easier
Avatar
some will loose items anyway?
Avatar
GormusSenex 2/14/2020 9:12 AM
not if no players are allowed in the meantime
Avatar
or they didnt transfer items
Avatar
GormusSenex 2/14/2020 9:14 AM
no i mean, if i can iterate through all containers on the map, then one can shut down the servers, install the plugin, start the servers up with the stack mod, let the plugin do its stuff, shut down server, remove stack mod, start server up and let plugin put all stuff back into containers and its done. wouldnt that be better ?
Avatar
ah, yes it would be great not sure if you can iterate all containers though
Avatar
GormusSenex 2/14/2020 9:16 AM
hmm
9:16 AM
must be some way
Avatar
should try iterating over all actors, possible this array has everything
Avatar
GormusSenex 2/14/2020 9:17 AM
how do i get all actors ?
Avatar
in ULevel
9:18 AM
GetActorsField
Avatar
GormusSenex 2/14/2020 12:59 PM
This is probably basic c++ i just dont get. Why cant i write this to log ? FString inventoryName; inventoryComponent->GetInventoryName(&inventoryName, false); Log::GetLog()->info(*inventoryName);` (edited)
1:00 PM
Error: 'fmt::BasicWriter<char>::operator <<': cannot access private member declared in class 'fmt::BasicWriter<char>' (edited)
Avatar
i think it doesnt support wchar
Avatar
GormusSenex 2/14/2020 1:10 PM
Ima shoot myself. yes. added .ToString() and it worked...
Avatar
GormusSenex 2/14/2020 1:21 PM
@Michidu How do I get this ? ULevel uLevel; TArray<AActor*> actors = uLevel.GetActorsField(); Im guessing I somehow need to instantiate uLevel ?
Avatar
you can get ulevel from uworld
Avatar
GormusSenex 2/14/2020 3:01 PM
@Michidu I iterate through this: UWorld* uWorld = ArkApi::GetApiUtils().GetWorld(); TArray<ULevel*> uLevels = (*uWorld).LevelsField(); for (ULevel* uLevel : uLevels) { TArray<AActor*> actors = uLevel->GetActorsField(); for (AActor* actor : actors) { [...] } } But on the 2nd itertion of uLevel the uLevel->GetActorsField(); throws an error. any idsea why ?
Avatar
check actor for null
Avatar
GormusSenex 2/14/2020 3:02 PM
its be4 the actor. its when getting the Actors*
3:02 PM
ohh u mean check if uLevel.GetActorssField is null ?
Avatar
UGameplayStatics::GetAllActorsOfClass(world, APrimalStructure::GetPrivateStaticClass(), &FoundActors);
3:02 PM
isn't it better to do it like this ?
3:02 PM
this just gets all structures instead of all actors
Avatar
GormusSenex 2/14/2020 3:03 PM
🤔
Avatar
UWorld* world = ArkApi::GetApiUtils().GetWorld();
Avatar
ye that might work too 😄
Avatar
A Connection Platform To The Arkbot Web Inteface. Contribute to WETBATMAN/ArkBotHelper development by creating an account on GitHub.
Avatar
GormusSenex 2/14/2020 3:04 PM
ima try switch. brb
3:07 PM
yes yes yes! perfect! 😄
Avatar
btw
3:24 PM
you can use APrimalStructureItemContainer to narrow it down further
3:25 PM
so you only get structures with an inventory
Avatar
GormusSenex 2/14/2020 3:25 PM
ye, im using that and aprimaldinocharacter on a 2nd run
Avatar
ah
Avatar
Don’t use get all actors of class often
4:32 PM
It’s an expensive call
Avatar
GormusSenex 2/14/2020 4:32 PM
its only twice when game inits
Avatar
So make sure you’re not killing server performance
4:32 PM
Ok
4:33 PM
That’s fine
Avatar
GormusSenex 2/14/2020 4:57 PM
I wanna weed out cryopods, blueprints, armur etc. basically everything that cant be stacked; ie looking for a IsStackable on the UPrimalItem. I tried with item->CanStackWithItem(item, <qtyptr>) but nomatter how high a number i put in qtyptr it returns false if item quantity x 2 goes above its max...
4:58 PM
it does, however, weed out the non-stackable items
4:59 PM
but also if the items that have more than half its max qty (edited)
4:59 PM
i could make a simple function that makes an item with 1 and check for stack, but i assume there is a function like that alrdy ?
Avatar
GormusSenex 2/14/2020 7:05 PM
nvm above - i made a IsStackable-func
7:06 PM
now this iceberg... item->MaxItemQuantityField() = 1000; item->BaseItemWeightField() = 0.01f; item->InventoryRefreshCheckItem(); item->UpdatedItem(false); It updates the max quantity but not the weight. any1 knows what to call to change an items base weight ?
Avatar
It’s probably a field
Avatar
GormusSenex 2/14/2020 8:55 PM
i cant find it. maybe override GetItemWeightMultiplier ?
Avatar
that only gets it tho
Avatar
GormusSenex 2/14/2020 8:57 PM
ye. but maybe the InventoryComponent uses that one ?
Avatar
wdym
8:58 PM
as far as i know Get functions only read the value
8:58 PM
they don't have any effect on what it actually is
Avatar
GormusSenex 2/14/2020 9:01 PM
i might be expressing myself wrong. would it be possible to hook into that function and return my own value instead ? that might help in overriding the base item weight if i return my own weight ?
Avatar
GormusSenex 2/14/2020 9:32 PM
nope. hooking into that wont work.
Avatar
Just try to call it with a rvalue
10:08 PM
Also you may need to edit the api and add your own definitions if they’re missing
Avatar
GormusSenex 2/14/2020 10:30 PM
call what with a value ?
10:30 PM
this one ? Hook_UPrimalInventoryComponent_GetItemWeightMultiplier
Avatar
GormusSenex 2/14/2020 10:59 PM
nvm. it works. it just doesnt show the actual weight
10:59 PM
i didnt check before so i thought it didnt work
11:00 PM
but the weight is lowered just not what it shows in the inventory
11:03 PM
its amazing how this works. u finally climb a mountain only to discover the next one behind it... i'm loving it ! 😂
Avatar
Hi! I've been taking my first baby steps in C++ altering an well known existing plugin. In this endeavor I've added an optional field in the config.json file. Since this field doesn't exist in all items my code will generate an error when it does not exist. Surely there must be a better way to deal with it than my way.. se pic. (edited)
Avatar
Or maybe the cleanest way is to see to that all items have this field?
Avatar
GormusSenex 2/14/2020 11:57 PM
is item_entry a json lookup ?
11:59 PM
ohh it is. I have this for getting stuff in json file. if nothing there it returns "": std::string GetSetting_string(const std::string& str) { return Foo::config["Settings"].value(str, ""); }
🤔 1
Avatar
foxboxcriptoecurrentsea 2/15/2020 4:22 AM
Forgive my ignorance this my first time messing around with C++ , in Extended Rcon Michidu pulls the tribeid using the following const int tribe_id = game_mode->GetTribeIDOfPlayerID(player_id); I need to pull the tribe name instead, i've looked threw gamemode.h and didn't find it. Is the tribename just as easy? What am i missing?
Avatar
for online tribe it's easy, for offline - not very. Which do you need?
6:59 AM
@GormusSenex but have you managed to sync max stack size?
Avatar
GormusSenex 2/15/2020 10:23 AM
hahah that is exactly how i feel when coding this 😄
10:24 AM
but what u mean syncing ? it has the lower weight, but it just doesnt show in the inventory - the old value is still shown
Avatar
foxboxcriptoecurrentsea 2/15/2020 2:49 PM
@Michidu for online tribe.
Avatar
How should I implement a countdown (around a minute long)? should i hook onto a tick function or use a timer? only way i know how to create timers in c++ atm is to use a detached thread. Is this the right way to go or should i use a gametick instead?
5:42 PM
ArkApi::GetCommands().AddOnTimerCallback hmm
Avatar
you want to actually know how much is left or just launch a timer that ends in 1 min ?
Avatar
end in 1 min
5:46 PM
well
5:46 PM
120 seconds total
5:46 PM
every 30 it sends a message
5:46 PM
until 0 then run a command
Avatar
API::Timer::Get().DelayExecute
5:48 PM
could help you
5:48 PM
i will look into is
Avatar
you need to include <Timer.h>
Avatar
im am correct that the is no documention of the ArkAPI function and i just have to look in the source code?
Avatar
for now yeah
5:49 PM
actually no
5:49 PM
the wiki should have info on this
5:49 PM
seems to be down though currently
Avatar
not anymore
5:49 PM
was second ago
5:50 PM
it is again...
Avatar
GormusSenex 2/15/2020 7:07 PM
@foxboxcriptoecurrentsea : FString GetTribeName(AShooterPlayerController* playerController) { std::string tribeName; auto playerState = reinterpret_cast<AShooterPlayerState*>(playerController->PlayerStateField()); if (playerState) { auto tribeData = playerState->MyTribeDataField(); tribeName = tribeData->TribeNameField().ToString(); } return tribeName.c_str(); } (edited)
7:13 PM
@Michidu what do u mean by syncing max stack size ?
Avatar
I meant does clients see updated stack size?
Avatar
GormusSenex 2/15/2020 8:50 PM
no, it doesnt show, but the weight is reduced tho
8:51 PM
like - 200 metal weights normally 200 so it shows as 200 weight. but the weight is actually only 100 which is the burden the character has when carrying 200 metal (edited)
8:51 PM
(maybe burden is the wrong word - english aint my native tongue)
Avatar
but the number on items isnt updating?
Avatar
GormusSenex 2/15/2020 9:19 PM
@Michidu nope
9:20 PM
furthermore because veggiecake and cannon balls isnt in the master list, it wont let me update those
Avatar
Ah, that bad Max stack could be solved, but weight.. (edited)
Avatar
GormusSenex 2/15/2020 9:42 PM
yup max stack works (except on those not in the master list), and weight works weight-wise just not visually
Avatar
@GormusSenex
Avatar
GormusSenex 2/15/2020 10:11 PM
sup
Avatar
I’m almost certain you can do this with just ini settings
Avatar
GormusSenex 2/15/2020 10:11 PM
ye, just not weight
Avatar
Console servers modify stack sizes and they can’t use mods
Avatar
GormusSenex 2/15/2020 10:11 PM
and i dont wanna increase player and dino weight
10:12 PM
ik. i posted a small piece of code on the #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ that will make the ini file for it. but afaik u cannot reduce weight in ini files
Avatar
Dinos change item weights
10:12 PM
See how they do it
Avatar
GormusSenex 2/15/2020 10:18 PM
i dont even know how i would begin to do that
Avatar
You’d need a disassembler
Avatar
GormusSenex 2/15/2020 10:21 PM
ye, thats too advanced for me sorry 😄
Avatar
you've been doing all this without IDA ? 😄
Avatar
GormusSenex 2/15/2020 10:22 PM
umm ye ?
Avatar
It’s a skill you should learn tbh
Avatar
IDA will make your life much easier
Avatar
GormusSenex 2/15/2020 10:23 PM
is it IDA Pro by Hex-Rays ?
Avatar
Yes
Avatar
GormusSenex 2/15/2020 10:25 PM
1000$ nahh.. im good thx 😄
Avatar
Pirate it
10:26 PM
Lol
10:26 PM
Or use a free alternative
Avatar
GormusSenex 2/15/2020 10:30 PM
tbh. im struggling with c++ alrdy. no need to learn even more complicated stuff 😄
10:32 PM
Ghidra... developed by the NSA... ye, ofc im gonna download that 😂
Avatar
Dinos change item weight?
Avatar
the inventory components for certain dinos have item class weight multipliers to make specific items weigh less
Avatar
@Michidu yes as what @dougy said
5:39 AM
if you put x weight into a dino that supports weight reduction, the weight in the inventory will be y
5:39 AM
This may be client-sided though as is the weight (the math may be done locally on server and client instead of replicated to client) (edited)
Avatar
does it update item weight number too or just final weight of dino?
Avatar
both
Avatar
is there anyway to fake templates ?
5:43 AM
like how the FNetControlMessage is
5:43 AM
Can I implement my own?
5:43 AM
Internally I think it uses enum as i found the enums on UE4 site
5:43 AM
but overloads are just FNetControlMessage<6>.Send
5:44 AM
is there a way I can "map" <> to specific overrides in C++?
5:44 AM
e.g. FnetControlMessage<NMT_Failure>::Send -> { NativeCall<void, UNetConnection*, FString*>(nullptr, "FNetControlMessage<6>.Send", Conn, ParamA); }
5:44 AM
?
5:44 AM
I'm sure using a parameter and an enum switch would function fine though
5:45 AM
but as you said it just enum, so yes, you can do it
5:46 AM
yes, but they do have mappings
5:46 AM
what I mean is can I create a struct that resolves using <> instead of an actual parameter
5:46 AM
I know you can do some funny things in C++
5:47 AM
actually I think I know a way
Avatar
enum can be implicitly converted to int (not enum class however)
Avatar
using the int value
5:47 AM
and using string concat
5:47 AM
on "FNetControlMessage<6>.Send"
5:47 AM
to be "FNetControlMessage<The Templated Value>.Send"
Avatar
you could also create your own wrapper class
Avatar
That is true. I was mostly trying to keep it in the same calling conventions
5:48 AM
but I also want to consider performance
5:48 AM
does
5:48 AM
c++ RT NativeCall(nullptr_t, const std::string& funcName, Args&&... args) { return static_cast<RT(__fastcall*)(ArgsTypes ...)>(GetAddress(funcName))(std::forward<Args>(args)...); }
5:48 AM
cache the addresses from GetAddress?
5:48 AM
I'm thinking about performance for many calls
Avatar
not yet, however i thought about an easy way to make cache (using static keyword) GetAddress is quite fast anyway
Avatar
👍 was just wondering about performance (edited)
Avatar
could create static variable inside NativeCall and assign address to it received by GetAddress
5:52 AM
that should work as cache
👍 1
Avatar
Tired of banned players coming back by exploiting Steam's family share? Wish to only allow accounts that actually own Ark to join? This plugin preforms the check that Official Servers use to prevent Family Shared accounts from joining. It is a...
Avatar
GormusSenex 2/16/2020 9:33 AM
@Michidu i havnt tried looking at weight in dino
Avatar
how did you update item weight though?
Avatar
GormusSenex 2/16/2020 12:53 PM
item->BaseItemWeightField() *= 0.5f;
Avatar
try ItemStatValuesField and call UpdatedItem() after
Avatar
GormusSenex 2/16/2020 12:54 PM
i do call the updateditem. didnt try itemstatvaluesfield
12:54 PM
gonna try
Avatar
it works for other stats, so should for weight too
12:56 PM
item->ItemStatValuesField()()[7] = 1000.f; like this
Avatar
GormusSenex 2/16/2020 12:57 PM
🙂 was just about to ask which element was weight 😄
Avatar
actually no, its not 7
12:58 PM
isn't it ?
Avatar
ye looks so
12:58 PM
GenericQuality = 0x0, Armor = 0x1, MaxDurability = 0x2, WeaponDamagePercent = 0x3, WeaponClipAmmo = 0x4, HypothermalInsulation = 0x5, Weight = 0x6, HyperthermalInsulation = 0x7,
Avatar
i hope weight isn't set weird like Armor 😄
Avatar
GormusSenex 2/16/2020 1:00 PM
i had actually buried the project cuz i didnt think it was possible. but ima try once again 😄
Avatar
depending on how they set weight you might have to do some math
Avatar
GormusSenex 2/16/2020 1:01 PM
cant i just do *= 0.5f ?
1:01 PM
i wanna half all weight
Avatar
void SetItemStatValue(UPrimalItem* item, EPrimalItemStat::Type item_stat_type, const float new_value) { *(item->ItemStatValuesField()() + item_stat_type) = 0; const float old_stat_modifier = item->GetItemStatModifier(item_stat_type); *(item->ItemStatValuesField()() + item_stat_type) = 1; *(item->ItemStatValuesField()() + item_stat_type) = (new_value - old_stat_modifier) / (item->GetItemStatModifier(item_stat_type) - old_stat_modifier); switch (item_stat_type) { case EPrimalItemStat::MaxDurability: if (item->bUseItemDurability()()) item->ItemDurabilityField() = item->GetItemStatModifier(item_stat_type); break; } #ifdef Atlas item->UpdatedItem(); #else item->UpdatedItem(false); #endif }
1:01 PM
well this is what it looks like for armor 😄
Avatar
GormusSenex 2/16/2020 1:02 PM
remove atlas from the api. no1 plays that broken game anyway... 😂
1:02 PM
😉
Avatar
lol
Avatar
item->ItemStatValuesField()()[item_stat_type] is better than doing pointer arithmetic?
Avatar
GormusSenex 2/16/2020 1:03 PM
r u asking me ?
Avatar
actually yeah 😄
Avatar
GormusSenex 2/16/2020 1:03 PM
phew
Avatar
GormusSenex 2/16/2020 1:27 PM
tried *(item->ItemStatValuesField()() + 0x6) *= 0.5f; didnt work. now trying item->ItemStatValuesField()()[6] = 0.1f;
Avatar
its same but you should probably try it on item which is in inventory
Avatar
GormusSenex 2/16/2020 1:29 PM
im trying it on the master list. not on existing items
1:29 PM
iterating through the master list
Avatar
try on existing
Avatar
GormusSenex 2/16/2020 1:30 PM
but that would mean i have to hook into each pickup / craft / etc wouldnt it ?
Avatar
actually no
1:30 PM
only constructors
Avatar
GormusSenex 2/16/2020 1:30 PM
sry i donno what u mean
Avatar
class constructor
Avatar
@GormusSenex
1:42 PM
Regular mod is on both client and server
Avatar
GormusSenex 2/16/2020 1:42 PM
ye, thats why i deleted it 😉
1:42 PM
i just came to realize it was
Avatar
Hey, does anyone have any idea why this is causing a crash?
4:18 PM
TArray<AActor*> OutActors; UVictoryCore::ServerOctreeOverlapActors( &OutActors, ArkApi::GetApiUtils().GetWorld(), ArkApi::GetApiUtils().GetPosition(shooter_controller), 5000.0f, EServerOctreeGroup::STRUCTURES, false ); for (auto&& actor : OutActors) { if (!actor->IsA(APrimalStructureTurret::GetPrivateStaticClass())) continue; } (edited)
4:18 PM
It crashes at actor->IsA
4:18 PM
4:19 PM
I am able to print the results and see that it's returning a number of actual structures, but when I do IsA it always just crashes
4:19 PM
The crash is saying it's in chatcommand because I have it run that block of code when I do /test
4:23 PM
if i take out if (!actor->IsA(APrimalStructureTurret::GetPrivateStaticClass())) continue; there's no crash
Avatar
check actor for nullptr
Avatar
thanks ill give it a shot
4:30 PM
hmm, same crash
4:31 PM
ill keep messing around a bit though to see if i can find anything
Avatar
maybe APrimalStructureTurret is not in pdb config?
Avatar
lemme look
4:32 PM
i see it in there
Avatar
nah it's just this class causes a crash
4:33 PM
you can't do IsA with APrimalStructureTurret
Avatar
Ah ok it was driving me crazy lol. I’ll see if I can fix it
4:35 PM
I dumped sdk in another project and tried it and it worked haha, I thought I was maybe doing something wrong w the plugin api
4:35 PM
Thx
Avatar
you can check by name as a workaround but it's not that good 😛
Avatar
GormusSenex 2/16/2020 4:36 PM
im having a dejavu here 😂 (edited)
Avatar
ah ye i remember you had this issue too ye ? 😄
Avatar
GormusSenex 2/16/2020 4:37 PM
yup 😄
Avatar
ah yeah i shoulda searched in here
4:38 PM
lol
4:38 PM
woulda saved me tons of time XD
Avatar
GormusSenex 2/16/2020 4:39 PM
wait what ? can u seach in text in discord ??
Avatar
it's weird behavior tho
4:39 PM
and yes ofc
4:39 PM
😄
Avatar
GormusSenex 2/16/2020 4:40 PM
i keep scrolling up and down and shit cuz whenever i search it searches for what X and Y have written (ie. it searches for the name)
4:40 PM
fook lol yes
4:40 PM
hahahahaah
4:40 PM
ima go shoot myself
Avatar
actually discord search is one of the best, how did you live without it, lol
Avatar
lol i didnt think to search primalstructureturret
Avatar
GormusSenex 2/16/2020 4:41 PM
omg i donno... i kept getting frustrated all the time. i actually came to a point where i was about to code a screen scraper 😄
Avatar
thought it was an issue with how i was doing isa
Avatar
ye it even goes through embedded messages it's very useful
Avatar
GormusSenex 2/16/2020 4:42 PM
my life just got 200% easier ! omg !
4:44 PM
well, scrolling all the way to the top and reading almost all messages thought me that wetbatman was once at my level too 😂
Avatar
GormusSenex 2/16/2020 4:45 PM
theres light at the end of the tunnel 😄
Avatar
@Michidu
11:23 PM
need to clean up class names
11:23 PM
template <typename T> class NextConfig { static T* instance; public: static T& Get(); }; template <typename T> T* NextConfig<T>::instance; template <typename T> T& NextConfig<T>::Get() { if (instance == nullptr) { instance = new T(); } return *instance; } class BaseConfig { std::string Filename; json data; protected: json Value(); //raw json object public: void Init(std::string FileName); void Reload(); virtual void Load(); }; class ConfigBody : public BaseConfig //the thing to load from disk { private: static FString kickmessage; static std::vector<uint64> whitelist; public: void Load(); FString KickMessage(); bool WhiteListed(uint64 steamID); };
11:23 PM
but thoughts on this as a kind of generic json config loader?
11:23 PM
used like so
11:24 PM
NextConfig<ConfigBody>::Get().Init("/ArkApi/Plugins/AntiFamilyShare/config.json"); ... &NextConfig<ConfigBody>::Get().KickMessage()
11:24 PM
etc.
11:24 PM
ConfigBody would be the custom "config" type the user would supply and they would override Load to map the values
11:24 PM
e.g.
11:24 PM
void ConfigBody::Load() { //Create mappings here __super::Load(); kickmessage = FString(ArkApi::Tools::Utf8Decode(__super::Value()["Message"])); whitelist = __super::Value()["Whitelist"].get<std::vector<uint64>>(); std::string steamIDs = ""; for (auto steamID : whitelist) { steamIDs += steamID + ", "; } steamIDs = steamIDs.substr(0, steamIDs.length() - 2); Log::GetLog()->debug("[Config Values] Kick Message: " + kickmessage.ToString()); Log::GetLog()->debug("[Config Values] Whitelist: " + steamIDs); }
👍 1
Avatar
i think it's a bit over complicated, since you also need to manually load values
Avatar
Is there a open source solution for HWID Auth? Someone told me ownprox released his at some point...
3:26 PM
Or shared it, whatever to call it
Avatar
GormusSenex 2/17/2020 3:26 PM
wouldnt rly make sense if it were as he is charging for its use
Avatar
Oh, maybe that’s still it. Do you know how much he‘s charging?
Avatar
why do you think he is charging for that?
Avatar
GormusSenex 2/17/2020 3:28 PM
ohh, i just assumed he was ? since u need to register it etc
3:29 PM
3:29 PM
yup, he is
Avatar
I think we‘re talking about different things
Avatar
GormusSenex 2/17/2020 3:30 PM
ohh
3:30 PM
i thought u meant the hwid ban plugin
Avatar
Im not Talking about the HWID ban Plugin
3:31 PM
But an actual auth method to add to my plugin that’s using HWID to authenticate/verify the machine to either be allowed to run it or not (edited)
Avatar
GormusSenex 2/17/2020 3:31 PM
how would u get the client hwid ??
3:31 PM
from the server... ?
Avatar
ownprox didnt release it but gave for free to multiple people (source code)
3:32 PM
actually, its easy to do auth by yourself
Avatar
GormusSenex 2/17/2020 3:32 PM
i think he uses a mod for that
3:32 PM
why would mod be needed
Avatar
GormusSenex 2/17/2020 3:32 PM
for the client hwid ?
Avatar
Huh
3:33 PM
We‘re talking about verifying the server to allowed to run the plugin
Avatar
GormusSenex 2/17/2020 3:33 PM
ahh
Avatar
Well, I was trying to save some time
Avatar
GormusSenex 2/17/2020 3:33 PM
i thought u meant the client's hwid
Avatar
Thought it’s somehow public
3:33 PM
If not, I’ll just do it on my own 😦
Avatar
you might want to ask @WETBATMAN
Avatar
GormusSenex 2/17/2020 3:34 PM
its a lot of work that can be bypassed by a hwid spoofer / changer imo
Avatar
Well a little protection is better than no protection
3:35 PM
Also it’s highly illegal to spoof rented machines HWID
3:35 PM
So I’m fine
Avatar
its not that easy.. how you gonna spoof cpu info
Avatar
i though you were talking about HWIDBans lol
Avatar
I got HWIDBans bro
3:35 PM
😂
3:35 PM
You don’t remember
Avatar
as michidu showed me spoofing isn't the weakest chain in the auth process 😄
3:35 PM
i remember that's why i got confused
3:35 PM
lol
Avatar
Haha
Avatar
GormusSenex 2/17/2020 3:36 PM
even tho intel has a unique identifier on some of their cpus (donno if its all of them now) u can still override that afaik
Avatar
Would you mind sharing ownprox‘s auth?
Avatar
it's very not secure though
Avatar
Well, it’s more about securing it from regular people
Avatar
example usage is here
3:37 PM
but this is very unclean code heh
3:37 PM
also this auth shows names of all ppl that purchased the plugin if cracked (edited)
Avatar
GormusSenex 2/17/2020 3:39 PM
hahaha i like this comment: // MAC SHIT
3:39 PM
😂
Avatar
Puh
Avatar
made by the man ownprox himself
3:39 PM
😄
Avatar
Not sure I wanna use that kind of auth
3:39 PM
I‘ll probably write a webbased one
Avatar
ye it's better
Avatar
I mean webbased one has two step already using clientip
3:40 PM
So it could verify HWID + IP
Avatar
make sure whatever token you use is encrypted
3:41 PM
don't just return true/false
3:41 PM
😄
3:42 PM
also IP is not really reliable
3:42 PM
i got some users who have different internal and external IP's using HWIDbans
3:42 PM
and since most of the time it's a host using a weird setup
3:42 PM
they can't just ping a site to get their external IP
3:42 PM
so i have to send them a debug build to grab it
Avatar
Hm interesting
Avatar
hwid is quite reliable, no easy way to spoof it (if done properly)
Avatar
if its ring0
4:38 PM
no one will go through the trouble of spoofing to use a plugin/mod most likely
Avatar
they will
4:41 PM
the Chinese have most of the plugins on the forum cracked already
Avatar
true lol
4:42 PM
most people wont go through the trouble*
4:42 PM
lol
Avatar
you know where they have them?
Avatar
no but i have a few chinese dudes who told me
4:43 PM
he told me all of agito's plugins are cracked 😄
Avatar
i meant though if the hwid is read at ring0 level
Avatar
how you read hwid doesn't matter
4:45 PM
the hwid getting itself is almost always not how the plugins get cracked
Avatar
i was just referring to the hwid conversation and how hwid is quite reliable when read at that level
4:45 PM
not the plugins being cracked and all that
4:46 PM
idk how any of the plugins are protected so i have no knowledge around any of that lol (edited)
4:48 PM
but that sucks that someone cracked some of the plugins (edited)
Avatar
you probably don't even need go to ring0 can get some ids by DeviceIoControl, also im not sure how you gonna spoof cpuid anyway
Avatar
i think you'd be able to spoof it using a deviceiocontrol hook using detours or something
4:52 PM
never tried though
Avatar
yeah, you can but if you make a driver you will interact with it using the same DeviceIoControl function
4:53 PM
still cpuid stays
Avatar
that's over my head at this point lol, so i trust you
4:57 PM
didn't realize that was the case
4:57 PM
but that adds to your statement that hwid is quite reliable 😛
Avatar
by hooking funcs inside plugin you can always spoof it however
Avatar
yeah, i figure that's always the case
Avatar
btw using version.dll to hook into everything is very clever
5:10 PM
do all ue4 games load version.dll if it exists? (edited)
5:10 PM
or is that an ark specific thing?
5:10 PM
i've never seen that done before
Avatar
not only ue4 games, most apps do
5:12 PM
its just dll hijacking
Avatar
interesting
5:13 PM
thx for reply
Avatar
you can do that with any dll which program loads
Avatar
i know, i was just mroe curious about why the game auto loads version.dll
5:14 PM
and if it was something ue4 specific
Avatar
it's windows dll
Avatar
before i found out about the ark server plugin stuff i had dumped the sdk and had been using a different dll (instead of injecting each time i wanted to test stuff) (edited)
Avatar
ah, sdk has much less functions also
Avatar
yeah i just filled in the missing ones that i needed
5:17 PM
mostly everything was there though
5:19 PM
the work you did on this stuff is awesome though
5:20 PM
been messing around making plugins past week XD
Avatar
Thanks :)
Avatar
sup @No One
10:52 PM
😄
Avatar
reading all the classes from the pdb sounds pretty smart, how is the performance tho when u look up all the functions in a map everytime u have to call them
Avatar
@No One depending on the data structure
11:22 PM
It could be an O(1) look up
11:22 PM
I haven’t looked
Avatar
how can i create timer for run any specific function every X interval
Avatar
#include <Timer.h>
Avatar
GormusSenex 2/18/2020 10:53 AM
Speaking of timer. Ive looking into Michidu's timed rewards (https://github.com/Michidu/Ark-Server-Plugins/blob/master/ArkShop/ArkShop/Private/TimedRewards.cpp). Im wondering, doesn't it degrade overall performance with all these timers or do they run completely separate from the "main" game ?
10:55 AM
Maybe ask in another way; will "main" performance be the same if I had a timed reward on all players (one for each) or just one (for the server) ?
10:55 AM
by "the same" i ofc mean "only a slight non-noticable diffence" 😉
Avatar
they run on game thread but the answer is "only a slight non-noticable diffence"
11:15 AM
its only overhead of calling a function
Avatar
GormusSenex 2/18/2020 11:19 AM
so an endless loop within a timer will stall the main game thread ?
11:20 AM
or do the main game thread fire off a seperate thread for the timer ?
Avatar
UE already has function AGameState::DefaultTimer
11:25 AM
it's run on game thread but not an endless loop
Avatar
Can anyone on here confirm that plugin hot reloading is infact working ?
Avatar
Super noob question.. I'm using the Ark Dev Kit, but i'd rather look at c++ than deal with the orchestration stuff. Where can I find a guide about where to start looking at that for mod development?
Avatar
@Michidu ok so after the better part of a hour i've recompiled the ark server api to get hot plugin reloading to work, my only question is why did you disable it ?
8:02 PM
8:03 PM
Avatar
@Ender
8:06 PM
You can not make mods with this
8:06 PM
Mods only work with the devkit
8:06 PM
This will only work for server sided stuff only
8:06 PM
With functions that already exist
Avatar
I'd like to at least explore it, even if no UI. 🙂
8:09 PM
oh, it's open source, and I use vs 2017, perfect. 🙂
Avatar
GormusSenex 2/18/2020 11:57 PM
when i iterate through player->GetPlayerCharacter()->MyInventoryComponentField()->InventoryItemsField() I also iterate through all the engrams. Is that intended ?
Avatar
Not in front of computer right now but you can filter by !item->is engram().get()
12:30 AM
Or something similar
12:31 AM
It’s intended
Avatar
@KillZone oh, sorry, i forgot that disabled it. Probably it was related to atlas
5:00 PM
Well glad i could help anyways with finding the issue, il make a pull request for the git repo in a sec unless it's already fixed
Avatar
that would be great, thanks
👌 1
5:20 PM
Also thought about increasing the api_version to 3.4 and also pushing a git tag to the repo but i think you decide on that sort of stuff so i left it out
Avatar
@Michidu
5:28 PM
I don’t think the config thing is too complicated
5:29 PM
It makes using multiple easier (edited)
Avatar
@KillZone merged, git tag might be a good idea..
5:31 PM
@substitute multiple configs?
Avatar
Ok should i bump it to 3.4 and tag it ?
Avatar
Yes like if you want to split stuff apart
5:32 PM
Like MySQL.ini
5:32 PM
Also I can just reuse it more easily
5:32 PM
Each override should be its own singleton yes?
5:33 PM
Singleton<A> and Singleton<b>
Avatar
probably tbh using config directly looks fine too
Avatar
So ive been learning and trying to get to grips with the api, made some progress but come up against what is probably simple to someone with more experience. im hooking APrimalCharacter_TakeDamage, and want to get the steamId of the target (when the target is a player of course). im struggling working out how to get from APrimalCharacter* _this to a form of AController to make use of ArkApi::IApiUtils::GetSteamIdFromController...am i looking in the wrong place?
Avatar
@shafted there should be an owning controller field
5:27 AM
You may need to cast the object though
Avatar
feel im close, just not found exactly what i need yet...and now my cats walking on my keyboard, 'helping' so might be time for bed xD
Avatar
unless this happens to be what im looking for 😛
5:41 AM
AController *controller = _this->ControllerField();
Avatar
of course a quick try on a whim had no look. will keep digging.
5:52 AM
all a learning experience!
Avatar
@shafted
6:43 AM
ArkApi::GetApiUtils().GetSteamIdFromController(_this->GetOwnerController());
6:43 AM
should suffice
6:44 AM
for safety, you should really do something like auto PC = _this->GetOwnerController(); if (PC) { ArkApi::GetApiUtils().GetSteamIdFromController(PC); } (edited)
6:44 AM
since the owning controller can be null.
Avatar
thanks, ill take a look tomorrow / at more sociable hours 🙂 too much code, gotta sleep hah
Avatar
GetOwnerController() seems to be causing crashes, good old discord search tells me it may be broken in game - but that was a year ago, dont know if things have changed
Avatar
it's not broken
3:37 PM
you should nullptr check it however
Avatar
so i tried this
3:43 PM
ooh format fail
3:44 PM
if ((_this->GetOwnerController() != nullptr)) { Log::GetLog()->warn("getOwnerController worked?"); }
Avatar
_this->GetOwnerController()
3:44 PM
just this is enough 😄
3:44 PM
if (_this->GetOwnerController())
Avatar
for sanitys sake, i like explicit 😛 but still crashes
Avatar
GormusSenex 2/20/2020 3:44 PM
i actually have a habit too to check for nullptr 😄
Avatar
drilled into me through work history
Avatar
ah that's fine just pointing it out 😄
Avatar
sorry if this format fails too
3:46 PM
Avatar
hm 🤔
3:46 PM
did it rly get removed ?
Avatar
someone will be using it somewhere surely, if it was removed it would have broken a lot id have thought? (edited)
3:47 PM
itll be something on my end
Avatar
GormusSenex 2/20/2020 3:47 PM
not if they havnt updated the serverapi
3:48 PM
myself am a few versions behind but my shit still works
Avatar
im not on latest, but -relatively- up to date
3:48 PM
can see the function stub in actor.h
Avatar
this function is still showing up in my IDA dump
Avatar
@shafted
4:07 PM
The definition might be wrong
4:08 PM
I got compress2 errors when I forgot to pass my _this in my hooks before
4:08 PM
Check in IDA the signature of the function and the see what the api has
Avatar
GormusSenex 2/20/2020 4:09 PM
u guys seems to assume a lot that every1 got IDA 😄
Avatar
You need a disassembler for this
4:10 PM
Otherwise you will be stuck in the dark 90% of the time
Avatar
GormusSenex 2/20/2020 4:10 PM
<-----
4:10 PM
😄
4:10 PM
true that
Avatar
i dont have it...yet 😛
Avatar
GormusSenex 2/20/2020 4:11 PM
try ghidra and tell me about it
4:11 PM
its free
4:11 PM
... cuz its made by the NSA...
Avatar
It’s open source
4:12 PM
If you’re using windows you’ve already lost anyways
Avatar
GormusSenex 2/20/2020 4:12 PM
ye, but who's gonna go through all the code to chk whether or not they r spying on u 😄 (edited)
4:12 PM
true too
Avatar
Literally everyone using it because the people who use it generally spend their time reverse engineering and analyzing software
Avatar
been a few years since ive delved into decompilers, but all this stuff interests me 😛
Avatar
GormusSenex 2/20/2020 4:14 PM
shafted just install it... and now his pc is part of an NSA bot net against the russians 😄
Avatar
Again, no
4:15 PM
And if you’re using windows you have much worse things to worry about
Avatar
GormusSenex 2/20/2020 4:15 PM
u advocate a lot about it substitue... im beginning to think ur part of the NSA too... :takes on tin foil hat: (edited)
4:15 PM
😂
Avatar
im not worried about the NSA 😛
Avatar
GormusSenex 2/20/2020 4:16 PM
true... cuz with "friends" like that who needs enemies 😉
Avatar
GormusSenex 2/20/2020 4:28 PM
Ok, back to a real problem. Why am I getting these values ? UPrimalInventoryComponent* inventoryComponent = player->GetPlayerCharacter()->MyInventoryComponentField() inventoryComponent->MaxInventoryItemsField() -> -1 inventoryComponent->InventoryItemsField().Num() -> 225 inventoryComponent->ItemSlotsField().Num() -> 10 inventoryComponent->NumSlotsField() -> 10 Im only using 1 slot. player is a shooter player controller.
4:35 PM
what i need to get is max inventory slots and how much im carrying. values should be 300 and 1 ?
Avatar
I believe it takes the engrams into account
Avatar
GormusSenex 2/20/2020 4:36 PM
ahh could be it
4:37 PM
but maxinventoryitemsfield at -1 ? i cant have 301 engrams unlocked i assume ?
Avatar
Dunno, go download the devkit and see what it shows
4:40 PM
Devkit helps a lot with stuff that’s fucked
Avatar
GormusSenex 2/20/2020 5:00 PM
it is including engrams apparently (edited)
Avatar
ye engrams are inventory in ark
Avatar
Er question, how do i get the name of the current map ?
Avatar
GormusSenex 2/20/2020 5:02 PM
ArkApi::GetApiUtils().GetShooterGameMode()->GetMapName()
Avatar
@GormusSenex 😘 thanks
Avatar
FString MapName; ArkApi::GetApiUtils().GetShooterGameMode()->GetMapName(&MapName); MapName = MapName.Replace(L"_P", L"");
👍 2
Avatar
GormusSenex 2/20/2020 5:02 PM
haha, u just had to give a better response ;D
5:03 PM
finally i could answer something 😄
Avatar
XD
Avatar
Errrr ok so FString MapName; ArkApi::GetApiUtils().GetShooterGameMode()->GetMapName(&MapName); MapName = MapName.Replace(L"_P", L""); Log::GetLog()->info("The name of the map is {}", MapName); Tosses out a error Error C2338 Cannot format argument. To enable the use of ostream operator<< include fmt/ostream.h. Otherwise provide an overload of format_arg this has happened a few times before so what would a correct version on the console logging look like ? thonkeng
5:09 PM
I've looked at a few other plugins and it should work
Avatar
GormusSenex 2/20/2020 5:10 PM
im not using <<. always got errors and couldnt fix it. so i use fmt::format and then .c_str() instead. probably stupid but i dont know otherwise 😄
Avatar
but MapName is FString
5:11 PM
you can't print out an FString
Avatar
GormusSenex 2/20/2020 5:11 PM
i don tthink question is related to mapname
Avatar
wdym
5:11 PM
Log::GetLog()->info("The name of the map is {}", MapName);
Avatar
@WETBATMAN Yep that helped
5:11 PM
i did this
Avatar
it's related to this format 😄
Avatar
Log::GetLog()->info("The name of the map is {}", MapName.ToString());
Avatar
GormusSenex 2/20/2020 5:11 PM
ahh 😄
Avatar
yep that would work
Avatar
that fixed it
Avatar
@WETBATMAN Regarding the code you sent , what in gods name does the L do ?
5:26 PM
in MapName = MapName.Replace(L"_P", L"");
5:27 PM
Going to definition gives out
Avatar
L infront makes the string able to hold unicode data
Avatar
Ah so incase someone puts weird symbols in their name and you try to get the string ?
Avatar
it makes the string wchar_t
5:28 PM
ye that but FString can already hold unicode data
Avatar
Ah ok gotcha
Avatar
ye, basically when defining the variable you make sure it's a type that FString can hold
Avatar
Yep gotcha
Avatar
@WETBATMAN you don’t need wide strings
5:47 PM
UE4 FString handles c string to utf 16 no issue
Avatar
in some cases you'll get a compile error unless the string has L infront
5:48 PM
personally experienced this
Avatar
Your string literal might have not been ansi
Avatar
GormusSenex 2/20/2020 8:57 PM
omg. i thought my c++ implemented a long as 64 bit but only just now realize its 32 bits. so i have been tossing steamId around as a 32 bit 😄
8:57 PM
slap slap slap across the face
8:57 PM
arghhh !
Avatar
why not use uint64 ? 😄
Avatar
GormusSenex 2/20/2020 8:59 PM
i am now. but im quite sure 1 response from a method returned it as long and then i jsut kept using it as long. but now im also quite sure i remember wrong about that 😄
Avatar
pretty much every plugin treats it as uint64
8:59 PM
in ark it's mostly FString
Avatar
GormusSenex 2/20/2020 9:00 PM
fuck me. means my orp is wrong too ! arghhhh
9:00 PM
funny thing is that it actually works
Avatar
why is it wrong lol
Avatar
GormusSenex 2/20/2020 9:00 PM
cuz i store the steamid as 32 bit in the database
9:01 PM
but it works. and in the rare event that some1else has the same 32 bit well... tough luck 😄
Avatar
lol
Avatar
GormusSenex 2/20/2020 9:01 PM
now i know what to spend the weekend on 😄
Avatar
@GormusSenex you shouldn't use long or other types as so in c++
9:15 PM
depending on the system, long varies in length
9:15 PM
on x64 a 64bit integer would be long long (edited)
9:16 PM
it's just safer to use int64 and uint64, instead of worring to use unsigned long long or unsigned long
Avatar
GormusSenex 2/20/2020 9:19 PM
ye i just read that. jsut as i felt im getting better at c++ im almost back to start 😂
9:19 PM
i mean... who implements a long long ? wtf?!?
9:19 PM
might as well call it verylong 😄 (edited)
9:20 PM
veryshort short long verylong...
9:20 PM
😄
9:21 PM
8 16 32 64 bits. would make more sense
Avatar
GormusSenex 2/20/2020 9:58 PM
ok, now that ive changed most code. i like int32 uint32, etc more.
Avatar
Well
10:18 PM
long long makes sense
10:18 PM
If long is 32 bits then long long is 32+32 bits
10:19 PM
Word is usually more consistent with qword being 64bits
Avatar
GormusSenex 2/20/2020 10:20 PM
verylong makes more sense imo. instead of long long. cuz when we gonna work with 128 bit is that gonna be long long long then ? 😄
10:20 PM
or long long long long... or 4long ? 😄
10:21 PM
int64 uint64 etc. i like that now
Avatar
well long isn’t a data type
10:21 PM
It’s a modifier for a data type
10:21 PM
long and long int mean the same thing
10:22 PM
this is why things like QWORD and int64 exist
10:22 PM
An int is a relatively abstract type in c and can have variable size
10:22 PM
Depends on the processor and compiler
Avatar
GormusSenex 2/20/2020 10:22 PM
when the guys who invented this sat drinking their coffee... i would like to have heard their conversation about long long ? i bet one of them lost a bet and got to name it long long 😂
Avatar
long int just means it uses twice the space
10:23 PM
long long int means four times
10:23 PM
the long is just a modifier
Avatar
ahh data types are so much fun 😄
Avatar
https://github.com/doug147/AutoTurret/blob/master/AutoTurret/dllmain.cpp If anyone wants to see a pretty basic turret filler example. This is working around the APrimalStructureTurret::GetPrivateStaticClass() in case anyone is wondering why I didn't just check to see if the item is a turret that way. It will fill any turret with the the correct ammo type based on the turret inventory's RemoteAddItemOnlyAllowItemClasses field. By default I have it pulling the ammo from the player's inventory when they type /fillturrets but the functions are written in a way that it would be very easy to change if you wanted to scan all inventories nearby, or something like that. (edited)
Automatically fill turrets in-game using ARK Server Plugin API - doug147/AutoTurret
👍 2
Avatar
GormusSenex 2/22/2020 1:53 AM
Which is fasted; doing a Map lookup or a sqlite3 select ? Im assuming a map lookup even tho its a very large map ?
1:54 AM
note: sqlite3 file is in-memory
Avatar
@GormusSenex sqlite3 might be faster
4:10 AM
is your map ordered or anything?
4:10 AM
really it will come down to the data structure
4:11 AM
most databases store things in a btree
4:11 AM
which is O(log n) for finding
4:12 AM
This post is to discuss the performance of finding an element in fixed-size C++11 STL containers with only few elements.
4:14 AM
unordered_map looks to be the fastest with O(1) (edited)
4:15 AM
but it can be worst case O(N)
4:15 AM
map is always O(log n)
Avatar
@Michidu whenever you get a chance can you add me to the plugin devs group on your website? so I can post some plugins
5:06 AM
Thanks!
5:10 AM
Username is doug149
5:10 AM
😄
Avatar
i wish id paid more attention to understanding big O notation...didnt interest me at the time, now ow irry more about it lol
Avatar
@shafted you should remember
7:03 AM
big O isn't end-all be all
7:03 AM
sometimes having O(N) time is better than O(log N)
7:03 AM
if the memory used in the O(log N) is O(N^2)
7:03 AM
and in O(N) it'd be O(1)
7:03 AM
it's all about tradeoffs
Avatar
ill take your word for it, but fr me i see O(***) and i panic xD
Avatar
I mean even O(***)
7:04 AM
not much difference in O(N) and O(log n)
7:04 AM
if n is just 5 items
Avatar
its a topic i never got to grips with, maths scares me so i have an irrational aversion to it lol
Avatar
I am proud of this though, I had to make a priority queue and stack implementations for a college class
7:05 AM
(insert had to be O(N)
7:05 AM
public void insert(T a) { if (isFull()) Grow(); int i = 0; for(; i < count; i++) { contents[count-i] = contents[count-1-i]; if (a.compareTo(contents[count-i]) < 0) {break;} } contents[count++-i] = a; } public T remove() { T t = contents[--count];contents[count] = null; if (isOversized()) Shrink(); return t; }
7:05 AM
we had to use java too
7:05 AM
😒
7:06 AM
but the queue and stack auto resize in powers of two
7:06 AM
public void push(T a) { if (isFull()) Grow(); contents[count++] = a; } public T pop() { T t = contents[--count];contents[count] = null; if (isOversized()) Shrink(); return t; }
7:06 AM
the stack is a little bit shorter
Avatar
good old java, before python became the go to for teaching coderamming principles 😛
Avatar
both implement my Collection base class
7:06 AM
protected void Grow() { Resize(capacity<<=1); } protected void Shrink() { Resize(capacity>>=1); } private void Resize(int size) { T[] next = newArray(size); Arrays.CopyTo(contents, 0, next, 0, count); contents = next; }
7:06 AM
that guy handles all the stuffs
Avatar
something nice to share, coding + programming...just go with coderamming xD
Avatar
Arrays is also another class I wrote
7:07 AM
Java is really behind these days
7:07 AM
so many nice things in C# that Java doesn't support
Avatar
i guess if youre writing in java youre likely not gonna be worried ahout efficiency 😛
Avatar
it's actually very efficient
7:09 AM
in worse case time for the queue (O(N))
7:09 AM
7:09 AM
10,000 inserts (and removals)
7:09 AM
takes 0.08 sec
7:10 AM
best case it has the same timing as the stack
Avatar
cmpare hellow world in java to hello world in c...
Avatar
which can do about a million push/pops
Avatar
wow typos, sorry its late for me ^^
Avatar
in about 0.03 sec
Avatar
the amount of extra 'things' java includes is nuts
7:10 AM
but, it does depend on usage
Avatar
nope (edited)
Avatar
in the right place java is perfect
Avatar
Java is really shit
7:11 AM
you can't even create generic arrays
7:11 AM
you can say you have T[]
Avatar
sensing some animosity here 😛
Avatar
but you can not do
7:11 AM
T[] asdf = new T[10];
7:11 AM
that is illegal
7:11 AM
public T[] Create(int length) { return (T[]) new Object[length]; }
7:11 AM
that is legal
7:11 AM
you can make Object[] and cast it
7:11 AM
but you get a compiler warning
7:11 AM
Avatar
i stand by depends on usage...i dont disagree that java is maybe a bit pants, but for someone notworrying about pointers or memory allocation, its a pretty good starting point
7:13 AM
if you start with java then try to learn C, your brain will explode
7:13 AM
but just my opinnion ofc 😛
7:14 AM
regardless, here i am coderamming at 6AM when i should be sleeping
7:15 AM
someone send me to bed
Avatar
yes
7:19 AM
but
7:19 AM
you should be able to make a new instance of a generic array.
7:19 AM
it is dumb that you can not directly do it.
Avatar
strongly typed vs weak typed argument?
7:21 AM
just speculating
Avatar
no
7:25 AM
it's because java blows
Avatar
GormusSenex 2/22/2020 12:04 PM
hey hey hey... my first ventures into oop was java 😄
Avatar
GormusSenex 2/23/2020 12:46 PM
I've spend all of yesterday refactoring my code to make it look prettier and perhaps perform better. Today I wanted to compile, but I'm getting this error: 'FMicrosoftPlatformString::Stricmp': none of the 2 overloads could convert all the argument types I'm using VS and that is all I'm getting. It points to the FString.h at line 1010 but that's it. I'm getting that it's probably an FString compare somewhere, but I have dozens of those. Any1 know how I can narrow this one down ?
Avatar
i think this error happens when you're comparing FString with an std::string
12:52 PM
don't remember exactly tho
Avatar
GormusSenex 2/23/2020 12:53 PM
Do u know if there is anyway for me to make VS show where it's getting the error ?
12:55 PM
Fuck ur right. Found it. Was fstring == std:string comparison 😄
12:55 PM
was pure luck though haha. just skimmed through all the code fast - u know, scrolling up and down on the mouse hoping the error would reveal itself - and it actually did 😂
12:57 PM
ofc it was the last check ive made at 2 am last night. no wonder there would be an error there 😄 (edited)
12:59 PM
uhh cant w8 to start it up. bet its gonna break ark several times 😂
Avatar
Anyone know if there's a harvest function?
Avatar
GormusSenex 2/23/2020 8:23 PM
i would assume its the attack function ?
Avatar
Not too sure.. Its for harvest rates
8:26 PM
But need to know if theres a function for it
8:27 PM
ye but i mean a function that has the amount of resource as an argument
Avatar
GormusSenex 2/23/2020 11:26 PM
omg i need help. @WETBATMAN u can prolly easily spot what im doing wrong. I tried simplifying what I actually do down to this, but it wont work. struct Foo { uint64 A; uint64 B; }; void SomeOtherName(Foo* _bar) { _bar = &{ 456, 789 }; } void main_here() { Foo* bar = new Foo{}; (bar->A) = 123; SomeOtherName(bar); cout << bar->B; } It compiles fine, but output is 0 where I was expecting 789 ?? (edited)
Avatar
arent u taking the address of a stack variable that goes out of scope?
Avatar
GormusSenex 2/23/2020 11:45 PM
i dont know. im new to c++ 😦 still learning by trial'n'error but this one i couldnt fix
Avatar
try void SomeOtherName(Foo& _bar) { _bar = {456, 789};} if u wnd SomeOtherName to assign a new value to _bar
11:52 PM
and then call it with SomeOtherName(*bar);
11:53 PM
or do void SomeOtherName(Foo* _bar) {*_bar = {456, 789};}
Avatar
GormusSenex 2/23/2020 11:54 PM
ok gonna try last one first - less changes - but i think i alrdy tried that combo. but lets see 🙂
Avatar
hey um, not sure how relevant this would be but maybe use a map with the struct as the value ?
Avatar
GormusSenex 2/23/2020 11:55 PM
theres more than 2 variables in it
Avatar
so ?
Avatar
GormusSenex 2/23/2020 11:56 PM
isnt a map only key and value ?
Avatar
value can be ur struct
Avatar
yea so your map’s value would be the entire struct
11:56 PM
it would be a different instance of the struct based on the key
11:58 PM
if your key is something that can be hashed via a TMap use a TMap otherwise you can use an std::unordered_map
Avatar
GormusSenex 2/24/2020 12:08 AM
I give up! Im too stupid! as i made the changes @No One suggested (which didnt work - at first) i realized the error was elsewhere. in my sql i make a 'select .... where ... || ...' instead of 'select ...where ... or ...'. omg, ive been at this since this morning 🤪 🤦
Avatar
happens xd
Avatar
GormusSenex 2/24/2020 12:13 AM
ye, its works now with ur changes. i can see i tried that earlier but didnt work then (ofc!!!) thx tho 😄
Avatar
so this is kinda vague, but hoping someone may have had similar experiences...some of my servers sometimes hang / time out, everyone is kicked and no one can join afterwards...no crash or error logs, just stops responding. noticed an increase since ive been messing around with plugin things and breaking the game in interesting ways, but with no crash or errors i struggle to diagnose the cause >_> anyone have similar experiences?
1:54 AM
sorry for the mostly useless and too vague statement, but thought was worth a shot 😛
Avatar
@GormusSenex
6:51 AM
stack variables
6:51 AM
are cleared from ram once the function ends
6:53 AM
when you allocate a variable inside of a function, it is put onto the Stack. This part of your memory is managed automagically. Each function call inside of a function simply increases the stack (so a variable in main technically never goes out of stack until end of program execution) Once a function returns, it's stack memory is cleared
6:53 AM
eventually, the whole stack is popped
Avatar
slightly more answerable question, ive tried a few but no luck so far - is there any function i can hook thats called on player spawn / respawn? ak on first joining a server, or respawning after death etc
Avatar
and nothing remains
Avatar
sorry for the mid-flow question 😛 (edited)
Avatar
To keep variables between function calls, you need to allocate them onto the heap
6:53 AM
this is user managed memory
6:54 AM
this is where things like malloc are used. (edited)
6:54 AM
This is also where you can introduce memory leaks
6:55 AM
if you "lose" the pointer for the block of memory (e.g. you make variable called x and do x = malloc .... and then later do x = whatever, without clearing the previously allocated memory, it will remain used, with no reference to where it is
Avatar
stack memory isn't cleared, values just become unpredicted
Avatar
Yes, technically
6:55 AM
but nothing states that your underlying system won't clear the memory
6:55 AM
it's "cleared" in the same way a file is deleted
6:56 AM
When you create a variable using struct initialization, it is created on the stack
6:56 AM
which is why once the function returned, it was no longer valid.
6:57 AM
what is the solution? Should you be doing a heap allocation? For that struct, 100% NO
6:57 AM
what you should do is instead of this
6:57 AM
void SomeOtherName(Foo* _bar) { _bar = &{ 456, 789 }; }
6:57 AM
is set the actual fields directly
6:57 AM
void SomeOtherName(Foo* _bar) { _bar.A = 456; _bar.B = 789; }
Avatar
dont you just love 'undefined' 😛
Avatar
well you should treat it as deleted
6:58 AM
because it could become overwritten in the very next execution
7:01 AM
@shafted
7:01 AM
maybe your steam
7:01 AM
connection for the server is messed up
Avatar
you probably mean 'aggregate initialization' actually, they won't be magically deleted from stack, therefore you can most like get local variables of other function right after return
Avatar
Yes, technically they are still there
7:02 AM
like I said, they're "deleted" like how a file is "deleted"
7:02 AM
but I wanted to keep it simple
7:02 AM
also I did mean struct initialization
7:03 AM
but that might be difference in wording between C and C++
7:04 AM
Foo was a struct @Michidu
7:05 AM
and they didn't use the .field syntax
7:05 AM
but who know, maybe the two overlap
Avatar
i dont think there is such thing as 'struct initialization', you can initialize a struct using aggregate initialization however
7:07 AM
There is
7:07 AM
since C99
7:07 AM
like I said, could be difference in naming
Avatar
ah, in C
Avatar
yea
7:09 AM
my university uses C and Java
7:10 AM
I don't very much care for Java
Avatar
oh really? hadnt noticed 😛
Avatar
I mean
7:11 AM
just look at this shit
7:11 AM
Priority<Country>[] queues = (Priority<Country>[]) new Priority<?>[5];
7:11 AM
I have to create it of type ? ??
7:11 AM
and cast
7:11 AM
so stupid
Avatar
so its like, a java variation on templates?
Avatar
generics
7:12 AM
I also have to make a singleton
7:12 AM
because no static (root) classes
7:12 AM
is also stupid
Avatar
ill go by what i said before, java may have its limitations but also has its uses
Avatar
yes but compared to C#
7:13 AM
there is no point to not use C#
7:13 AM
public static async Task GetAsync(string file, string dest) { using (Stream writeTo = System.IO.File.OpenWrite(dest)) using (Stream readFrom = await IO.File.GetAllAsync(file)) { await readFrom.CopyToAsync(writeTo); } }
7:13 AM
look how much cleaner
7:13 AM
and easier that is
7:13 AM
to read and write
7:13 AM
Avatar
as per @GormusSenex java was my first forray into OOP, was a good learning tool 😛
Avatar
+
7:13 AM
look at this syntax
7:13 AM
public static void Get(string file, string dest) => GetAsync(file, dest).GetAwaiter().GetResult();
7:14 AM
so much easier to write this
Avatar
im still getting a hint of animosity towards java xD
Avatar
+ string interpolation is literally goat
7:15 AM
commandMap.Add($"{owner.PluginName()}.{name}", callback);
7:15 AM
but I will admit, no language has gotten multiple levels of generics perfect yet
7:15 AM
private Dictionary<string, Func<PluginManager, string[], bool>> commandMap = new Dictionary<string, Func<PluginManager, string[], bool>>();
7:15 AM
is still wack to read
Avatar
i blame 7
7:16 AM
its all 7's fault
7:18 AM
why am i still here at 6AM! someone tell me to stop chasing technological enlightenment
Avatar
@shafted
7:20 AM
honestly your best bet would maybe some profiling tools
7:20 AM
and see where the hang-up happens
Avatar
any recommendations appreciated, outside of my area of expertise ^^ (edited)
Avatar
never needed any outside my IDE's debugger
Avatar
likewise, makes it hard when you never hit a single breakpoint 😛
Avatar
well
7:21 AM
if you have ideas where issues are
7:21 AM
you could try making hooks and logging the data going into the fuction or if it even runs
7:22 AM
like you can hook PreLogin to see if people can even get that far once the server enters the it's weird state
Avatar
that could be an interesing one to be fair, im still learning the ropes as far as hooking ARK goes the server is visible so somethings still happening...depends how much of an issue it becomes really
7:23 AM
occasional timeout is just sort of accepted as well, ark being ark
7:24 AM
ill crack on with it later..for now i really should sleep 😛
Avatar
ok i like to prevent that a dino spawns. Any quick ideas for the right hook. Mabey "BeginPlay"? But how do i replace it(the dino) completely 🤔
Avatar
just suicide it XD
8:28 PM
and the corpses 🤓
Avatar
GormusSenex 2/24/2020 8:28 PM
why note just put in the gameini settings ?
8:29 PM
if u dont want it to spawn at all
Avatar
i think Suicide just makes the dino go poof
8:29 PM
XD
8:29 PM
either that or Destroy
Avatar
no gameini settings because i like only stop the spawns for like the first 72h of the server runtime. And i am too lazy to edit the ini all days ... haha
Avatar
GormusSenex 2/24/2020 8:30 PM
but then every time u restart, it will reset that timer
Avatar
maybe just stop BeginPlay from ever being called ? 😄
Avatar
🤔 not that bad.
Avatar
GormusSenex 2/24/2020 8:31 PM
otherwise put a date in a config file combined with batmans suggestion. then the timer wont reset at every server reset
8:32 PM
datetime*
Avatar
but then every time u restart, it will reset that timer the timer is not the problem at all
Avatar
@WETBATMAN i think that would be a bad solution
10:36 PM
the spawn manager would see that there isn't x amount of dinos
10:36 PM
call to spawn one
10:36 PM
-> it is destroyed
10:36 PM
so it repeat on next check
Avatar
going to be lots of new classes today 😄
Avatar
GormusSenex 2/25/2020 1:40 PM
... and lots of crashes 😄
Avatar
no crashes hopefully (edited)
12:15 AM
😛
Avatar
Anyone but me having problem getting 306.42-updated server to start with plugins? After the plugins load the server "hangs" at random places in the start up process. A server without Ark-Api had no problem starting up.
Avatar
GormusSenex 2/26/2020 11:21 AM
why is ur server at 306.42 ? i just updated and only went to 306.4 ?
Avatar
I donno...
11:28 AM
But I sure get a lot of AllActors Call During Gameplay:...-spam. Anyone knows whats that all about yet? Anyone not getting it? That doesnt seem to be related to plugins though . Seems Classic Flyershaving serious problems. (edited)
Avatar
GormusSenex 2/26/2020 1:05 PM
now theres a 306.48 omg (edited)
1:07 PM
ig that extra month of "testing" didnt rly cut it 😂
Avatar
@Michidu
7:55 AM
would you ever consider implementing functions instead of finding addresses and calling them? (edited)
7:55 AM
e.g. ShooterPlayerState is missing GetShooterController
7:55 AM
I could add the native function call wrapper
7:55 AM
but isn't it just faster to use GetOwnerController() and cast?
Avatar
implementing? you want me to rewrite all functions? 🙂
Avatar
not all 😓
Avatar
GetShooterController is in AShooterPlayerState, its not missing
Avatar
just over time, people can add the more basic ones
7:58 AM
it wasn't in mine
7:58 AM
maybe my api need update
Avatar
i will push latest update soon
Avatar
i still need to push to you some things
7:59 AM
I was able to get the FNetControl macros to work
7:59 AM
I think that is best option
7:59 AM
as in UE4 the macro make a new template class for each control message
7:59 AM
and only FNetControl::Send needs to be implemented in a way to be called.
8:00 AM
UE4 does like so
8:00 AM
DEFINE_CONTROL_CHANNEL_MESSAGE(Hello, 0, uint8, uint32, FString); // initial client connection message DEFINE_CONTROL_CHANNEL_MESSAGE(Welcome, 1, FString, FString, FString); // server tells client they're ok'ed to load the server's level DEFINE_CONTROL_CHANNEL_MESSAGE(Upgrade, 2, uint32); // server tells client their version is incompatible
Avatar
ah, so how you want me to add it?
Avatar
currently i have a hacky way
8:02 AM
#define DEFINE_CONTROL_CHANNEL_MESSAGE_ZEROPARAM(Name, Index) \ enum { NMT_##Name = Index }; \ template<> class FNetControlMessage<Index> \ { \ public: \ static uint8 Initialize() \ { \ } \ /** sends a message of this type on the specified connection's control channel */ \ static void Send(UNetConnection* Conn) \ { \ } \ }; #define DEFINE_CONTROL_CHANNEL_MESSAGE_ONEPARAM(Name, Index, TypeA) \ enum { NMT_##Name = Index }; \ template<> class FNetControlMessage<Index> \ { \ public: \ static uint8 Initialize() \ { \ } \ static void Send(UNetConnection* Conn, TypeA& ParamA) \ { \ NativeCall<void, UNetConnection*, TypeA>(nullptr, "FNetControlMessage<" + std::to_string(Index) + ">.Send", Conn, ParamA); \ } \ };
8:02 AM
and then i do
8:02 AM
DEFINE_CONTROL_CHANNEL_MESSAGE_ONEPARAM(Failure, 6, FString);
8:02 AM
and then i can call like in-engine
8:02 AM
FNetControlMessage<NMT_Failure>::Send(PlayerNetConnection, NextConfig<ConfigBody>::Get().KickMessage());
8:03 AM
i haven't finished the 0 parameter one
8:03 AM
because i feel
8:03 AM
the native call with string concat is hacky
8:03 AM
so I want see if i can clean it up some
8:04 AM
I transplated the current UE4 one from latest sources (edited)
8:04 AM
#define DEFINE_CONTROL_CHANNEL_MESSAGE(Name, Index, ...) \ enum { NMT_##Name = Index }; \ template<> class FNetControlMessage<Index> \ { \ public: \ template<typename... ParamTypes> \ static void Send(UNetConnection* Conn, ParamTypes&... Params) \ { \ static_assert(Index < FNetControlMessageInfo::MaxNames, "Control channel message must be a byte."); \ checkSlow(!Conn->IsA(UChildConnection::StaticClass())); /** control channel messages can only be sent on the parent connection */ \ if (Conn->Channels[0] != NULL && !Conn->Channels[0]->Closing) \ { \ FControlChannelOutBunch Bunch(Conn->Channels[0], false); \ uint8 MessageType = Index; \ Bunch << MessageType; \ FNetControlMessageInfo::SendParams(Bunch, Params...); \ Conn->Channels[0]->SendBunch(&Bunch, true); \ } \ } \ };
8:04 AM
and that compiles fine for me so far
8:05 AM
haven't tested it
8:06 AM
other option
8:06 AM
instead of macro
8:06 AM
is to make the template for each control message
8:06 AM
then using the nativecall isn't so hacky
8:06 AM
because no need to string concat
Avatar
template seems the best
Avatar
making each template?
8:13 AM
I can do that @Michidu
Avatar
or actually same way as in UE is fine too if latest one works, i can add it like that
Avatar
nah it does not as-is
8:15 AM
i just tried to use it
8:15 AM
i would need to implement a bunch of those or make them native calls
8:15 AM
both of which would be worse performance than one native call
8:15 AM
and making the template manually
8:16 AM
(Is there a way to compile time constant a string with a macro parameter)
8:16 AM
because if that^ is possible, I could make a macro to generate the templates
Avatar
well, compile time strings should be possible now
Avatar
yes I mean
8:19 AM
not doing this
8:19 AM
NativeCall<void, UNetConnection*, TypeA>(nullptr, "FNetControlMessage<" + std::to_string(Index) + ">.Send", Conn, ParamA); \
8:19 AM
but instead having the macro make the "FNetControlMessage<" + std::to_string(Index) + ">.Send" a compile time const
8:19 AM
so that it doesn't concat the string on each call
Avatar
it might be a bit hacky at this point macro can even be better
Avatar
yes, which is what I would prefer to do
8:22 AM
so I can just
8:22 AM
DEFINE_CONTROL_CHANNEL_MESSAGE_ONEPARAM(Failure, 6, FString);
Avatar
ok, just send me final variant 🙂
Avatar
@Michidu
8:37 AM
i'll fork the api
8:37 AM
#define DEFINE_CONTROL_CHANNEL_MESSAGE_ONEPARAM(Name, Index, TypeA) \ enum { NMT_##Name = Index }; \ template<> class FNetControlMessage<Index> \ { \ public: \ static void Send(UNetConnection* Conn, TypeA& ParamA) \ { \ NativeCall<void, UNetConnection*, TypeA>(nullptr, "FNetControlMessage<" #Index ">.Send", Conn, ParamA); \ } \ };
8:37 AM
this macro works
Avatar
sure, just make a PR
Avatar
need to make each one
8:37 AM
there isn't just 1 parameter version
8:38 AM
but multiple :x
Avatar
GormusSenex 2/27/2020 8:40 AM
i might be obvious, but i dont rly know what the FNetControlMessage adds to the api ?
Avatar
lets you send various low-level network commands
Avatar
GormusSenex 2/27/2020 8:40 AM
ive tried reading up the thread
Avatar
I used it in my anti-family share
Avatar
GormusSenex 2/27/2020 8:41 AM
ohh ok
Avatar
the game sends a specific FNetControl instead of a standard kick
Avatar
btw
8:41 AM
Genesis update broke defeatboss command
8:41 AM
F
8:41 AM
@Michidu
8:42 AM
i ripped the latest ue4 source version
8:42 AM
and modified it some
8:42 AM
#define DEFINE_CONTROL_CHANNEL_MESSAGE(Name, Index, ...) \ enum { NMT_##Name = Index }; \ template<> class FNetControlMessage<Index> \ { \ public: \ template<typename... ParamTypes> \ static void Send(UNetConnection* Conn, ParamTypes&... Params) \ { \ NativeCall<void, UNetConnection*, ParamTypes...>(nullptr, "FNetControlMessage<" #Index ">.Send", Conn, Params...); \ } \ };
8:42 AM
should for for n args (edited)
8:42 AM
@GormusSenex
8:42 AM
8:42 AM
this is why Macro are pretty cool
8:42 AM
not gonna lie
Avatar
GormusSenex 2/27/2020 8:44 AM
i think its above my skill level tbh
Avatar
lets me do this
8:44 AM
FNetControlMessage<NMT_Failure>::Send(PlayerNetConnection, NextConfig<ConfigBody>::Get().KickMessage());
Avatar
seems good
Avatar
Anyone else feel like Michidu deserves a spot in the credits for the hexagon shop? XD
Avatar
They added shop?
Avatar
GormusSenex 2/28/2020 9:31 AM
kinda. its limited but looks soo cool tho
9:32 AM
u pay with hexagons that u earn from doing missions
9:32 AM
i wish we could hack into that shop so my own would look better than just notification alerts
9:33 AM
(hint hint) 😄
Avatar
oh damn so that's what the whole quests functions that were added to the API were about ?
Avatar
you can change hexagon count for sure
9:42 AM
hexagon is like currency if i understand it correctly
Avatar
yeah i also hear this for the first time lol
9:42 AM
been a while since i actually played ark
Avatar
maybe you can even add own items
9:46 AM
maybe you can even add own items
Avatar
is the shop on all maps or just Genesis ?
Avatar
probably only genesis
Avatar
GormusSenex 2/28/2020 9:54 AM
only genesis
9:55 AM
its linked with the HLN-A
9:55 AM
i dont think that one work on other maps
9:56 AM
Avatar
damn
9:56 AM
that’s like a full fledged shop
Avatar
GormusSenex 2/28/2020 9:56 AM
but only 1 page
Avatar
hm maybe with more items added a scrolling bar would appear ?
Avatar
GormusSenex 2/28/2020 9:57 AM
it doesnt look like theres room for it on the UI
Avatar
sad
Avatar
GormusSenex 2/28/2020 9:57 AM
yup
9:57 AM
but
9:58 AM
if hacked into, the search bar could just populate the screen maybe
9:58 AM
real-time
9:58 AM
search for metal and everything with metal in shortname apperas
9:58 AM
appears*
Avatar
yes but how do we know that items aren’t just loaded client side XD
Avatar
GormusSenex 2/28/2020 9:59 AM
hmm
Avatar
if we make a mod
9:59 AM
to port this ui on non genesis maps
9:59 AM
we could even modify the size and item count
10:00 AM
i think it would be pretty good
Avatar
GormusSenex 2/28/2020 10:00 AM
also need to port the HLN-A or some other way to access it
Avatar
we could bind it to some key
Avatar
GormusSenex 2/28/2020 10:00 AM
poop !
10:00 AM
😂
Avatar
i was thinking something like f1 heh
Avatar
GormusSenex 2/28/2020 10:00 AM
no imagination... 😉 (edited)
Avatar
GormusSenex 2/28/2020 10:01 AM
i havnt looked into mods at all, soo.... 😉
Avatar
ye but this would actually be really cool heh
10:02 AM
we could make the ui display shop points instead of hexagons
Avatar
GormusSenex 2/28/2020 10:02 AM
i would make it into an auction house tho
10:02 AM
market place for players
Avatar
heh
Avatar
GormusSenex 2/28/2020 10:04 AM
25 paste... 125 hexagons... resolving a "glitch" gives u 1000. but finding them takes time... i think getting paste any other way is faster 😂
10:04 AM
but hexagons can now be the $$$ for dedicated servers
Avatar
i would still dig converting this UI for ArkShop 😄
10:05 AM
backend of a plugin with a frontend of a nice looking UI
Avatar
GormusSenex 2/28/2020 10:06 AM
if only we could populate it server side
10:06 AM
via search bar
10:06 AM
omg my market place would be awesome
Avatar
a mod has to be made to port it to other maps anyway
10:06 AM
so even if it's client side
Avatar
GormusSenex 2/28/2020 10:06 AM
ohh ye
Avatar
the config can be parsed by the mod to add items
10:08 AM
the latest content isn't in devkit though yet
10:08 AM
so i guess we wait
10:08 AM
😄
Avatar
GormusSenex 2/28/2020 10:09 AM
compared to learning serverapi, how harder/easier is learning the mod making ?
Avatar
i would say much harder 😄
Avatar
GormusSenex 2/28/2020 10:10 AM
fuck
10:10 AM
nvm u made this
10:10 AM
ur oppinion doesnt count 😂
Avatar
GormusSenex 2/28/2020 10:10 AM
any1 else plz 😄
Avatar
devkit is just annoying
10:11 AM
it's too big/slow
Avatar
GormusSenex 2/28/2020 10:11 AM
i hate mods. i hate that if some random update his mod, then no1 can access the server
10:11 AM
cuz of client auto update
Avatar
or if mods cause crashes, you have no idea which mod it is (edited)
Avatar
GormusSenex 2/28/2020 10:11 AM
that too
10:12 AM
but isnt that also the case with the api ? 🤔
10:13 AM
at least 90% of time you know if it's a plugin
10:13 AM
and which
Avatar
GormusSenex 2/28/2020 10:13 AM
if ur not the one getting the error (white screen) then i havnt always seen the cmd prompt show what plugin caused the error
Avatar
crash stack does
Avatar
GormusSenex 2/28/2020 10:15 AM
yes, but thats the player that gets it. or am i wrong ?
10:15 AM
thats the white screen i was referring to 😄
Avatar
what white screen you mean?
Avatar
GormusSenex 2/28/2020 10:16 AM
whenever something crash (almost whenever) i get a white window with the error stack
10:16 AM
as a player
Avatar
client side crash?
Avatar
GormusSenex 2/28/2020 10:16 AM
yup
Avatar
but its not related to plugins
Avatar
devkit sucks
10:17 AM
c++ makes sense
10:17 AM
most of the stuff in devkit doesn't make sense 😄
10:17 AM
it's like it was made for ppl who cannot code
Avatar
GormusSenex 2/28/2020 10:18 AM
lol
Avatar
also if you mess something up
10:18 AM
it doesn't execute
10:18 AM
instead of crashing in plugins 😄
10:18 AM
it's good for beginners but very frustrating when you're trying to find why your BP doesn't work
10:19 AM
also my Ark Better Server security which is a 1mb mod takes 25 min to cook on nvme ssd
10:19 AM
😄
Avatar
GormusSenex 2/28/2020 10:20 AM
wtf
10:20 AM
im guessing it compiles the entire game then
Avatar
you have to wait 25 mins to test changes?
Avatar
GormusSenex 2/28/2020 10:21 AM
.... or u combined ur nvme ssd with an "older" 8088 cpu 😂
Avatar
i7 8700k XD
Avatar
GormusSenex 2/28/2020 10:21 AM
haha i have the sme
Avatar
most things can be tested in devkit
10:21 AM
but if i'm testing stuff that's different in the live game than in devkit
10:22 AM
then yeah i have to wait 25 min 😄
Avatar
GormusSenex 2/28/2020 10:22 AM
now i know why WC isnt fixing any bugs !!!
10:22 AM
😂
Avatar
stuff like UniqueID is your IP in devkit but in the live game it actually returns your steamID
10:22 AM
lol
Avatar
GormusSenex 2/28/2020 10:23 AM
sometimes i actually feel for those WC developers. I bet they were exicted and exstatic about the release of genesis, and then the majority of players just sacks it down as shit
Avatar
XD
10:24 AM
btw that's not even the worst part of devkit
10:24 AM
you'll find it's extremely limited if you got into plugins first 😄
Avatar
GormusSenex 2/28/2020 10:24 AM
haha
Avatar
you can only attach to very basic events
10:24 AM
like players spawning
10:24 AM
or dying
Avatar
GormusSenex 2/28/2020 10:24 AM
the value of ignorance is ever so high 😄
Avatar
if you want to change more advanced stuff you have to override PrimalGameData and make your mod not stackable
10:25 AM
😄
Avatar
GormusSenex 2/28/2020 10:25 AM
which im guessing most modders do ?
Avatar
nah
10:25 AM
doing this your mod must be loaded first
10:25 AM
to work properly
10:26 AM
that green puzzle piece you see on mods in the workshop
10:26 AM
means they don't override anything and only add their own content
Avatar
GormusSenex 2/28/2020 10:26 AM
ohh
Avatar
yellow means they override some stuff but don't require loading first
10:26 AM
red means they absolutely have to be loaded first
Avatar
GormusSenex 2/28/2020 10:27 AM
thats actually cool. but then again, our api dont care about load order 😄
Avatar
yep
Avatar
GormusSenex 2/28/2020 10:27 AM
(mostly)
Avatar
ye it would still be cool if we could change or set hook order 😄
10:27 AM
because DiscordIntegrator breaks my HWIDBans chat block
10:27 AM
XD
Avatar
GormusSenex 2/28/2020 10:28 AM
is discordintegrator oen source ?
10:28 AM
open*
Avatar
nope
Avatar
GormusSenex 2/28/2020 10:30 AM
ahh its wooly's
10:32 AM
another thing i wanted to ask. im using sqlite3 and are updating Players in that DB when they log on. its works fine when not many players log on, but i havtn tested it with like 70+ or more players loggin in at the sme time. is the sqlite3 and filesystem fast enough to not lock ?
Avatar
it's fine as long as you dont share connections
Avatar
GormusSenex 2/28/2020 10:35 AM
ye i do
10:35 AM
its cross server db
Avatar
multiple servers? you will get locks then
Avatar
GormusSenex 2/28/2020 10:36 AM
fuck
Avatar
get mysql
Avatar
GormusSenex 2/28/2020 10:37 AM
isnt sql server express better ?
10:38 AM
i also know sql server from work so would be easier to maintain
10:38 AM
just donno how to make that work in c++... a weekend project then 😄
Avatar
not sure if it's better.. but sure, you can use it too
Avatar
Is there a reason (_this being APrimalDinoCharacter* _this) _this->NameField().ToString(&ClassName); returns Allo_Character_BP_C_52 instead of just Allo_Character_BP ? (edited)
Avatar
seems like it's an id
5:16 PM
extended rcon has good function for getting dino name
Avatar
Ah ok il look into it , thanks peepoheart
Avatar
GetDinoDescriptiveName i think
Avatar
Yep just came across that
Avatar
Yeah that only returns the print name
5:50 PM
Ie
5:52 PM
I've also tried getting it via dino->DinoID1Field() dino->DinoID2Field() but those 2 return large ints that dont correspond to the dino itself
Avatar
but what exactly you need?
Avatar
The Entity ID
Avatar
maybe BP path will be enough
Avatar
I can give it a try, do you happen to know the name of the fucntion that fetches that ?
Avatar
GetItemBlueprint in Api utils
5:56 PM
it says for UPrimalItem but will work for dinos too
Avatar
wait i think i found a function within ark that does it
5:57 PM
i think it was in UVictoryCore
Avatar
Aight il start with Michidu's and go from there
Avatar
@Michidu I need hints on how to convert the APrimalDinoCharacter to UPrimalItem
Avatar
(UPrimalItem*)dino
6:17 PM
but yeah, UVictoryCore has the function to return what you need
6:17 PM
not sure which one exactly though
6:20 PM
GetClassString GetClassPathName try them
Avatar
Yeah both UVictoryCore functions return BoaFrill_Character_BP_C_145 with the exception that GetClassPathName returns a windows path but non the less contains the _145 junk
6:58 PM
il just try and manipulate the string
6:59 PM
when it runs into _C_ remove everything after that
6:59 PM
I've also exported the dino and inspected it with the inspection tool, nothing has anything to do with the number 145 ( not level, id or anything else )
Avatar
must be dino unique number
Avatar
Yeah when i try to download a dino and when i check its NameField() it doesnt have the random number at the end
7:01 PM
So it must be something that gets appended when the dino initializes
Avatar
if every dino has number, you can easily remove it
Avatar
Yeah just need to play around with the string a bit
7:08 PM
il still dig through the header file for APrimalDinoCharacter maybe i missed a function
Avatar
@Michidu Thanks for the help , i managed to cobble this together /** * @brief Get the Entity ID of a given dino * @param dino The dino to fetch the Entity ID of **/ FString GetDinoEntityID(APrimalDinoCharacter* dino) { FString entityID; dino->NameField().ToString(&entityID); int startPos = entityID.Find("_C_"); if (startPos != -1); { return entityID.Left(startPos + 2); // +2 is the _C string from the match } return entityID; }
7:51 PM
and for any criticism please improve upon it if you wish to because as is it works ™️
Avatar
looks good
peepoheart 1
Avatar
that looks like it works, you just want to get the name of the dino right ?
8:50 PM
theres a field called DinoNameTag
8:50 PM
it contains the basic name of the dino like "Achatina" or "Raptor"
Avatar
@Michidu can add CreateHeadRequest?
3:37 PM
I want to pull data from http/s but only if it is modified
Avatar
Deleted User 3/2/2020 4:09 AM
how can I get the status of whether the baby dino has ally looking and wandering enabled and then tell something to automatically changed both values to false so they wont wonder or look at allys (other players/dinos) and also I dont know how to code help please
Avatar
GormusSenex 3/2/2020 7:51 AM
"dont know how to code" as in general or just c++ or only this api ? cuz if in general ur in for a mountain climb 😄
Avatar
Deleted User 3/2/2020 11:21 PM
kinda all round
11:21 PM
print hello world hello world
Avatar
Is there a way to get every structure in a radius?
2:22 PM
say for example a radius of 15 foundations
Avatar
UKismetSystemLibrary::SphereOverlapActors_NEW() (edited)
2:29 PM
UVictoryCore::SphereOverlapFast
2:29 PM
maybe also this one but haven't tried it
Avatar
Does it not have a size parameter?
Avatar
yes but it's not gonna be in foundations ofc
Avatar
yes I know, but what are the parameters for that method
2:30 PM
how do I give it the position and size
Avatar
const int MinFoundations = config["FireBreathFix"]["MinimumEnemyStructureDistanceInFoundations"]; UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, _this->RootComponentField()->RelativeLocationField(), static_cast<float>((MinFoundations * 300)), &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors);
2:30 PM
_this is APrimalDinoCharacter*
2:31 PM
1 foundations is around 300 units but i'm not entirely sure on this
Avatar
GormusSenex 3/3/2020 2:31 PM
ye
2:31 PM
no. 10000 is around 30 foundations
2:31 PM
iirc
2:32 PM
thats atleast what im calculating with in my orp code
2:33 PM
Units used in ARK are based on the Unreal engine's units, which are approximately 1 cm. They are what is being displayed on the Bed's Fast-Traveling map, and what is shown in many stats in this Wiki. A foundation in ARK is about 300x300 units, i.e. 3x3m Creatures' travel speed...
Avatar
it doesnt have to be exact right now
Avatar
300 will be fine then
2:34 PM
been using this code for like a year without issues 😛
Avatar
GormusSenex 3/3/2020 2:34 PM
i got my 10000 from some other post that said ~30 foundations. damn 😂
2:34 PM
didnt rly look into it
Avatar
well if it was that off i think you'd notice it ingame hah
2:35 PM
the 300 units is also not exactly accurate i think
Avatar
TArray<TEnumAsByte<enum EObjectTypeQuery>> types what is this?
Avatar
it's for the ObjectTypes arg
Avatar
I dont understand what this part does &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors
Avatar
tells it to only add actors of class APrimalStructure
2:37 PM
basically it fills the new_actors array with structures in the range
2:37 PM
you can then iterate over it to do what you wish to do
2:38 PM
UKismetSystemLibrary::SphereOverlapActors_NEW(world, _this->RootComponentField()->RelativeLocationField(), static_cast<float>((MinFoundations * 300)), &types,APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors);
2:38 PM
those are just args btw
2:38 PM
just split across multiple lines
Avatar
haha I know, but im trying to understand what args you're passing to the method
Avatar
1. where is searches
2:39 PM
2. sphere starting position
2:40 PM
3. sphere radius
2:40 PM
4. actor types (edited)
2:41 PM
5. actors of which class it looks for
2:41 PM
6. actors which are ignored
2:42 PM
7. TArray which will get populated with the found actors
Avatar
ok that makes a lot more sense
2:47 PM
apologies for my questions, but having a tough time wrapping my head around c++
Avatar
GormusSenex 3/3/2020 2:48 PM
ohh me too 😄
Avatar
it's fine we all start somewhere XD
Avatar
GormusSenex 3/3/2020 2:48 PM
theres a reason c++ got upgraded to c# 😉 😂
Avatar
c# is a lot easier to make sense of 😛
Avatar
GormusSenex 3/3/2020 2:49 PM
agree. and I even once coded assembler back in the days
2:49 PM
c++ is wierd. still cant remember the * and & and ** etc omg
Avatar
yeah, takes some getting used to
2:51 PM
Avatar
** is a pointer to a pointer 😄
Avatar
can I delete some of those files?
Avatar
yeah you don't need precompiled headers
Avatar
GormusSenex 3/3/2020 2:52 PM
pch frameword resoure
2:52 PM
dllmain
Avatar
would I need to use a database to store all sphere locations?
3:23 PM
and who it belongs to
Avatar
GormusSenex 3/3/2020 3:25 PM
why would u store it in a db when its there ?
Avatar
that hugely depends on what you're doing
Avatar
the idea is that every tribe gets 1 sphere that protects one of their bases completely
Avatar
so ORP 😄
3:26 PM
you can use SafeZones for that
Avatar
basically, but it is on even when player is logged in
Avatar
just use SafeZones if you don't mind adding every zone to the plugin config
Avatar
GormusSenex 3/3/2020 3:26 PM
u dont need to store the actors
3:27 PM
just store the position of each tribe
3:27 PM
and then make relevent hooks and return 0 damage if within those spheres (with ur position as center)
3:28 PM
like, do a chat command /protection set. that stores the position of the player into a db
Avatar
@WETBATMAN looks like with safezones you can only define safezones in the config
3:29 PM
the point here is that players can set their own safezone basically (edited)
Avatar
GormusSenex 3/3/2020 3:29 PM
yes. do chat commands
Avatar
for normies yes 😄
3:29 PM
otherwise you can make your own plugin to add safeZones on certain events
3:29 PM
if you don't wanna make the zone logic yourself
Avatar
GormusSenex 3/3/2020 3:30 PM
/protection set - Sets the location of your PvE base /protection get - Checks if your inside your protection area
Avatar
yes i want it something like that meduza
3:32 PM
@WETBATMAN what's the license for that code?
3:32 PM
can i use and modify?
Avatar
yeah
Avatar
GormusSenex 3/3/2020 3:32 PM
and then u hook into damage-events and return 0 damage if inside the spehere area. but u dont need that costly sphere overlap thingie. i think the basic calculation is like (pos.x-x)^2 + (pos.y-y)^2+(pos.z-z)^2<radius^2 if true then ur inside sphere (edited)
Avatar
I dont see a license on that repo
Avatar
GormusSenex 3/3/2020 3:35 PM
its free
Avatar
source code without license reverts to standard copyright
Avatar
GormusSenex 3/3/2020 3:35 PM
its under mit open source license or something
Avatar
I dont see that for that plugin
Avatar
GormusSenex 3/3/2020 3:36 PM
just assume it is 😂
Avatar
are you planning to sell it ? 😃
Avatar
Safezones have api actually for adding new zones. Also, in my tests sphere overlap was quite fast, even faster than calculating distance manually.
Avatar
GormusSenex 3/3/2020 3:38 PM
that doesnt sound logic to me
3:38 PM
do a simple calulation rather that looping through a lot of stuff
3:38 PM
should be faster
Avatar
it’s very fast tho
Avatar
If you dont need things like notifications, then yeah, it might be a bit faster
Avatar
GormusSenex 3/3/2020 3:39 PM
im not argueing that its not fast
Avatar
in fact i use it inside a hook and it’a not even a noticeable diff
Avatar
GormusSenex 3/3/2020 3:40 PM
im just rare curious about it being faster than (pos.x-x)^2 + (pos.y-y)^2+(pos.z-z)^2<radius^2
Avatar
@WETBATMAN no but with basic copyright, im not allowed to do anything with the code but to view it
3:41 PM
if it's on github
Avatar
Sure, inside hook, calc will be faster, you are right. I meant, if you gonna find actors inside zones, sphere is faster than looping through actors array and compare dist.
Avatar
GormusSenex 3/3/2020 3:41 PM
ahh ye
3:42 PM
but he just want a fixed point, and then calculate whether or not an attacker is inside a sphere of that point
3:43 PM
(im guessing) and then hook into damage-events
3:43 PM
thats at least how i build my orp
Avatar
I just thought at some point you would want more advanced orp heh
Avatar
easiest way to explain it is full ORP in a sphere, but not ORP cuz it's active at all times not just when logged off
3:44 PM
so just regular raid protection 😛
Avatar
oh you’re the one who asked about this in the mmo.su discord
3:45 PM
couldnt find a plugin that did what i wanted so im attempting to make one myself
Avatar
GormusSenex 3/3/2020 3:48 PM
Ye. U need a database to store tribeid and position of the fixed point. then u hook into damage events (structure, dino and player) and calculate if attacker is inside the sphere (with the above formulae). if true, then return 0 damage.
3:49 PM
just whenever u start ur server up, load the database into an array or map so u dont have to do a select to db at each damage-event
Avatar
I can do it like safezones
3:49 PM
tribeid and position in json
Avatar
GormusSenex 3/3/2020 3:50 PM
safezones is a bit big for what u want imo
Avatar
lol im not gonna use safezones
3:50 PM
just use the same way of storing the positions
Avatar
GormusSenex 3/3/2020 3:50 PM
ye
3:50 PM
ok
Avatar
dont want to make it too complicated to use so want to avoid having to setup database
Avatar
You want to use json as db? not the best idea
Avatar
GormusSenex 3/3/2020 3:52 PM
as long as he is not performing json lookup it would work ok
Avatar
Only thing im storing is safezone position and tribeid (who it belongs to)
Avatar
since it’s map specific and the db won’t be shared anyway maybe use sqlite ? (edited)
Avatar
Why not use sqlite? It doesnt require setup and will work much better (edited)
Avatar
GormusSenex 3/3/2020 3:53 PM
(i had my difficulties setting sqlite up to work the first time, so i kinda understand where he is ngl 😉 )
Avatar
what would the advantage of sqlite be over json for my purpose
Avatar
Still there can be many entries, you gonna serialize/desearilize json each time to make changes
Avatar
ok so worst case scenario. with a max server of 70 people and everyone in their own tribe it'll be 70~ entries (edited)
4:08 PM
realistically that wont happen
4:08 PM
the server im making it for has max 20 people during the day and like max 10 different tribes
Avatar
substitute 3/3/2020 5:03 PM
@GormusSenex
5:04 PM
Sphere overlap isn’t expensive
5:05 PM
It’s also likely run in the gpu instead of cpu
Avatar
@substitute yeah, i can add 'head' request. Maybe i should rewrite requests class actually
Avatar
substitute 3/3/2020 5:06 PM
Thanks @Michidu
5:06 PM
Head will be useful for checking headers for things like date modified
5:06 PM
I store files on my s3 which has a last modified header in the response
5:07 PM
Makes it easy to only update things when the external file actually updates
Avatar
ArkApi::GetCommands().AddChatCommand when this adds a command, is it automatically after a /?
5:44 PM
or do I need to define the prefix myself
Avatar
you need to add the / yourself
Avatar
@WETBATMAN
6:38 PM
nvm seems like i fixed that
Avatar
GormusSenex 3/3/2020 7:13 PM
but still. i bet sphere overlap is more costly than a simple calculation as the one i mentioned. and i cant c why it should run on the gpu either
Avatar
after a couple of hours i finally got it to build and have commands working lol
7:30 PM
took me awhile but im starting to understand c++ a bit more
Avatar
@WETBATMAN how do I add the SafeZones api to my project?
Avatar
include the public folder of SafeZones
Avatar
just that?
7:51 PM
where do I put the other files
Avatar
you don't need them if you're just including functions from SafeZones
7:55 PM
if the plugin itself is loaded (SafeZones) you can call it's functions
Avatar
is there a way to do it without having to load safezones as a seperate plugin?
Avatar
i guess you will have to copy the code you wanna use to your own plugin then
Avatar
substitute 3/3/2020 8:39 PM
@GormusSenex
8:39 PM
it would run on the gpu as gpu's are designed for those types of calculations (edited)
8:40 PM
(rendering and such too, but trust me, gpus have specific design choices to make traces as quick and cheap as possible.)
8:43 PM
related
8:43 PM
Due note, this only really applies when talking about real time rendering for simple scenes such as games.
8:44 PM
also, internally UE4 uses all vectors, which depending on the aglo (for you, (pos.x-x)^2 + (pos.y-y)^2+(pos.z-z)^2<radius^2) may be faster.
8:45 PM
realistically though, as long as you do not use heavy trig functions, especially inverse trig functions such as acos, atan, asin, performance should be ok
Avatar
GormusSenex 3/3/2020 8:59 PM
ye, and sqrt too. that costs a lot of cpu cycles
9:02 PM
u cant compare gfx vs cpu. gpu is optimized to throw every single little calculation into its own core whereas the cpu while calculating also has to render, read input from devices, take care of interrupts etc. a gpu will always be faster at core calculations 🙂 (edited)
Avatar
@WETBATMAN sorry to keep asking, but wiki is down so cant look it up myself. How do I get the tribeid of a player?
Avatar
TargetingTeamField()
Avatar
so player.TargetingTeamField() would work?
Avatar
player->TargetingTeamField()
Avatar
ah right c++
Avatar
substitute 3/3/2020 9:18 PM
well
9:19 PM
there's plenty of asdf.field in c++
9:19 PM
it's just for pointers you use ->
Avatar
^^
Avatar
substitute 3/3/2020 9:22 PM
@WETBATMAN
9:22 PM
PepeHands (edited)
9:23 PM
physics II can leap off a bridge
Avatar
i don't know a thing about physics so i literally can't even fathom what that is 😄
Avatar
GormusSenex 3/3/2020 9:58 PM
nope. me neither
Avatar
@Michidu how do I use the safezones api in my plugin?
Avatar
did you try what i told you ? 😄
10:18 PM
include the public folder of the SafeZones source code
10:18 PM
and then include this header ISafeZoneManager.h
Avatar
GormusSenex 3/3/2020 10:25 PM
just copy paste as he said. faster and cleaner. u only get what u need
Avatar
@WETBATMAN i did what you said but it gives me errors
Avatar
well SafeZones was last updated 2 years ago so it might be out of date now 😄
Avatar
error LNK2001: unresolved external symbol "class SafeZones::ISafeZoneManager & __cdecl SafeZones::GetSafeZoneManager(void)" (?GetSafeZoneManager@SafeZones@@YAAEAVISafeZoneManager@1@XZ) 1>C:\Users\????\source\repos\ForcedArkPlugin\x64\Release\ForcedBaseProtection.dll : fatal error LNK1120: 1 unresolved externals
Avatar
looks like a lib file is needed
Avatar
so it is needed after all?
11:06 PM
what is error code 126
Avatar
dependency missing
Avatar
lol my head is gonna explode
11:11 PM
😄
11:12 PM
can I see somehow which dependency is missing?
11:12 PM
I mean the project builds... (edited)
Avatar
is the server running the latest VC++ redist ? (edited)
Avatar
downloaded the server today so i geuss so
11:16 PM
already have it (edited)
Avatar
some plugin you include should be missing then
Avatar
Libraries: C:\Users\????\Desktop\Ark Plugin Dev\ARK-Server-API-master\out_lib\ArkApi.lib C:\Users\????\Desktop\Ark Plugin Dev\SafeZone\x64\Release\SafeZone.lib (edited)
11:18 PM
Included Directories: C:\Users\????\Desktop\Ark Plugin Dev\SafeZone\SafeZone\Public C:\Users\????\Desktop\Ark Plugin Dev\ARK-Server-API-master\version\Core\Public (edited)
11:18 PM
plugins folder:
Avatar
hm your plugins loads before permissions
11:19 PM
did you add permissions to Delay Loaded DLL's ?
Avatar
Since I dont know what that is, prolly not.
Avatar
GormusSenex 3/3/2020 11:19 PM
hmm. maybe i'll get the plugin dev title if i make this for him ? 😉
11:20 PM
i basically just need to copy paste my project and remove the fancy stuff
Avatar
under Linker
11:20 PM
go into Input
11:20 PM
11:20 PM
and find this
11:20 PM
add Permissions.dll and SafeZones.dll into it
11:22 PM
same error still
Avatar
Any other ideas? 😅 (edited)
11:36 PM
omg
11:36 PM
i put a z in front of the name so it was last alphabetically
11:36 PM
and now it loads
11:36 PM
🤦
Avatar
GormusSenex 3/3/2020 11:37 PM
😂
Avatar
oof
11:37 PM
delay loaded dll’s should have done this
11:37 PM
without you renaming the plugin
Avatar
idk I did the delay loaded dll thing
Avatar
@WETBATMAN hey, how do I get the tribe name based off of tribeid
Avatar
is it just me or is the wiki down 95% of the time?
Avatar
you wanna do it for online tribes ?
Avatar
i guess you can hook the player logIn function and keep their tribe name with their TribeID in memory
1:35 PM
then clear it when they log out
1:36 PM
you could also just loop over all players and get their TribeID until it's a match and find the name for the tribe
1:36 PM
but the second method is slower
Avatar
that sounds like a very tedious way to do it
2:11 PM
is there no way the API can access that information based on the tribeid?
2:11 PM
It's stored somewhere by the server is it not? (edited)
2:12 PM
how about tribe name based on player
Avatar
it's stored but to find it server would have to loop all tribes anyway 😄
2:20 PM
that's why i asked if you wanted to get it for online players
Avatar
GetOrLoadTribe function should work too
Avatar
doesn't it leak memory ?
Avatar
When tribe is online, it shouldnt load anything
Avatar
what does that function return exactly?
Avatar
TribeData
Avatar
Ok that would work I think, I dont see that function in the player class
Avatar
AShooterGameMode::GetOrLoadTribeData
Avatar
Rogue Leader 3/5/2020 2:43 PM
Anyone know what class shoulder dinos are? They aren't APrimalDinoCharacters, and that class is the only one in the api that has baby functions/fields and a function to return a UPrimalCharacterStatusComponent
Avatar
player->ShowTribeManager() does this get the tribe leader?
3:11 PM
3:11 PM
I need to pass along the tribedata to get the tribedata?
3:18 PM
@Michidu could you give me an example of this function?
Avatar
Rogue Leader 3/5/2020 3:27 PM
GetOrLoadTribeData is probably just where the server loads up the tribes data and returns if it was successful or not.
3:27 PM
You could hook it to get the tribe data though
Avatar
Rogue Leader 3/5/2020 3:41 PM
DECLARE_HOOK(AShooterGameMode_GetOrLoadTribeData, bool, AShooterGameMode*, int, FTribeData*); void AShooterGameMode_GetOrLoadTribeData(AShooterGameMode* _this, int TribeID, FTribeData* LoadedTribeData) { uint64 tribeLeaderID = LoadedTribeData->OwnerPlayerDataIDField(); AShooterGameMode_GetOrLoadTribeData_original(_this, TribeID, LoadedTribeData); } void Load() { ArkApi::GetHooks().SetHook("AShooterGameMode.GetOrLoadTribeData", &Hook_AShooterGameMode_GetOrLoadTribeData, &AShooterGameMode_GetOrLoadTribeData_original); } void Unload() { ArkApi::GetHooks().DisableHook("AShooterGameMode.GetOrLoadTribeData", &Hook_AShooterGameMode_GetOrLoadTribeData); } (edited)
3:41 PM
that will probably* get you what you want
3:44 PM
That would load all tribe data when the server loaded i imagine
3:46 PM
if you want to get a players tribe leader from AShooterPlayerController: AShooterPlayerController* player; AShooterPlayerState* State = static_cast<AShooterPlayerState*>(player->PlayerStateField()); FTribeData* tribeData = State->MyTribeDataField(); uint64 tribeLeaderID = tribeData->OwnerPlayerDataIDField(); (edited)
Avatar
c++ FString tribe_name = tribeData->TribeNameField();
3:50 PM
this gets the tribename?
3:50 PM
lol if this works i dont have to bother with all that other stuff
Avatar
Rogue Leader 3/5/2020 3:50 PM
maaaaaaaybe
3:52 PM
You can try it and print the result with Log::GetLog()->info(tribe_name.ToString());
Avatar
@Rogue Leader is PlayerIdField not the same as OwnerPlayerDataIDField?
Avatar
Rogue Leader 3/5/2020 4:20 PM
I'm not sure
Avatar
c++ if (player->PlayerStateField()->PlayerIdField() == tribeLeaderID) {
4:21 PM
i wanna check if the player that executes the command is the tribeleader or not
4:22 PM
when i do it this way it says im not the tribe leader, but i am
Avatar
Rogue Leader 3/5/2020 4:23 PM
I'm using this code to check for tribe admins in one of my plugins: AShooterPlayerState* State = static_cast<AShooterPlayerState*>(player->PlayerStateField()); State->IsTribeAdmin();
4:23 PM
but an admin is not the same as a tribe owner
Avatar
Oh actually, that might be better than just the owner anyway
4:24 PM
4:24 PM
lol
4:24 PM
so there it is
Avatar
Rogue Leader 3/5/2020 4:25 PM
This may work for owner: State->IsTribeOwner(State->PlayerIdField());
Avatar
@Rogue Leader I think that worked
4:47 PM
thanks for the help
Avatar
Rogue Leader 3/5/2020 5:29 PM
Awesome!
Avatar
substitute 3/6/2020 6:49 PM
@Michidu
6:49 PM
@WETBATMAN
6:49 PM
the turret isA crash is due to a missing function name
6:49 PM
These objects have GetPrivateStaticClass
6:49 PM
6:49 PM
APrimalStructureTurret does not
6:49 PM
6:50 PM
6:50 PM
other PrimalStructureXXYY classes have the function too.
6:50 PM
Maybe the PDB or something forget it ? Who knows.
Avatar
actually sometimes ida doesnt show all funcs
Avatar
Rogue Leader 3/6/2020 6:51 PM
Bad ida
Avatar
substitute 3/6/2020 6:51 PM
@Michidu Yes but there is
6:51 PM
GetPrivateStaticClassBody@VAPrimalStructureTurret
Avatar
well, yeah, might be it
Avatar
substitute 3/6/2020 6:52 PM
Also I don't see why else calling IsA on turret would cause a crash
6:52 PM
if (a->IsA(APrimalStructureTurret::GetPrivateStaticClass())) { //we found it Log::GetLog()->debug("Found Turret"); }
6:52 PM
is a CTD
Avatar
i have experienced some crashes with IsA too recently
6:53 PM
seems it might not even depend on class which being checked
Avatar
GormusSenex 3/6/2020 6:54 PM
newb c++ question. Is ->IsA a std. c++ method ?
Avatar
GormusSenex 3/6/2020 10:31 PM
any1 else seeing this ?
Avatar
is this Atlas ?
Avatar
GormusSenex 3/6/2020 10:32 PM
ark
Avatar
SetAddictedAmount
10:32 PM
weird
10:32 PM
doesn’t atlas have this mechanic ?
10:33 PM
where you get addicted to vitamins or whatever
Avatar
GormusSenex 3/6/2020 10:33 PM
i donno. only tried atlas once, and hurried back to ark 😂
10:34 PM
its the genesis server. could be the new gremlin tame
Avatar
Rogue Leader 3/6/2020 11:10 PM
It looks like debugging that the devs left in for the new shoulder pet's that transform
9:01 PM
anyone know what error code 1114 is?
Avatar
Rogue Leader 3/7/2020 9:01 PM
Bad config
Avatar
syntax you mean or?
Avatar
Rogue Leader 3/7/2020 9:02 PM
Syntax, missing variables, wrong type
Avatar
no it's his own plugin
Avatar
Rogue Leader 3/7/2020 9:02 PM
1114 is a generic error for failing to load the dll
Avatar
1114 means load error (in public plugins this usually indicates a config error, since nothing else should stop the plugin from loading)
Avatar
Does it have something to do with the fact that im trying to use sqlite?
Avatar
possibly
9:03 PM
are you trying to log something ?
Avatar
i added a line as a test because otherwise the server crashes at a function where I do a sqlite request
Avatar
have you looked at other plugins for sqlite implementations ?
9:05 PM
I used ArkShop as a guide
Avatar
ArkShop is pretty overkill if you're going for just sqlite 😄
Avatar
well i only use the sqlite bit as a guide
9:06 PM
i took what i needed
9:06 PM
i didnt use everything
Avatar
add debug to see where it throws this error
9:12 PM
9:12 PM
this is the line
9:15 PM
so it has to do with the sqlite stuff
Avatar
@WETBATMAN I cant even log it lol
9:33 PM
cuz it crashes the server before it gets the chance to log it
9:34 PM
the exact same thing happened yesterday when i tried to write to a json file
9:35 PM
so I decide to switch to sqlite and now i get the same
Avatar
crashed while writing json ?
9:38 PM
that’s pretty weird
9:39 PM
but i have no idea what this function does heh
Avatar
c++ std::vector<std::vector<std::string>> GetAllProtectionZones() override { std::vector<std::vector<std::string>> protection_zones; try { db_ << "select tribe_id,position_x,position_y,position_z,last_updated from protection_zone;" >> [&](std::string tribe_id, float position_x, float position_y, float position_z, std::string last_updated) { std::vector<std::string> protection_zone = { tribe_id, std::to_string(position_x), std::to_string(position_y), std::to_string(position_z), last_updated}; protection_zones.push_back(protection_zone); }; return protection_zones; } catch (const sqlite::sqlite_exception & exception) { Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); return protection_zones; } }
Avatar
You have no idea either. Im geussing? 😅
Avatar
Is there another way to tell why the server crashed
11:39 PM
Considering i cant even log it
Avatar
substitute 3/8/2020 1:55 AM
Attach a debugger
1:55 AM
Wait for the exception
Avatar
Anyone have any ideas what hook gets called when you upload a item to the ark tiredoflife ?
Avatar
substitute 3/8/2020 1:55 PM
Why
Avatar
GormusSenex 3/8/2020 3:00 PM
omg! working with sql server and c++ is just not for normal ppl ! 👿
Avatar
why? 🙂
Avatar
GormusSenex 3/8/2020 3:03 PM
fetching data from a stored procedure and the SQLFetch just wont return anything
3:04 PM
it works fine if single row. but multiple rows it jstu wont
Avatar
you use ms sql ?
Avatar
GormusSenex 3/8/2020 3:04 PM
yup
Avatar
ah, you dont look for easy ways 😄
Avatar
GormusSenex 3/8/2020 3:05 PM
prolly not 😂
3:05 PM
it sounded easy. it looked easy. but it isnt easy...
Avatar
mysql would be easier probably
Avatar
GormusSenex 3/8/2020 3:06 PM
this is the last i need done. ive rewritten everything from sqlite to ms sql. not gonna try some other db now or ill shoot myself
3:09 PM
another funny thing. in c++ u have to close the cursor urself after each fetch wtf ?!? took me hours to figure out why my first call always worked but 2nd didnt
3:09 PM
so now im jsut closing cursors left and right hahaha
3:16 PM
haha ofc. ive looked at it, tried a bunch of stuff and googled till my fingers bleed, and nothing worked. then i come on here crying, and i notice a line of code that shouldnt be there. i removed it, and the shit works! omfg rubberduck next level achieved !
Avatar
glad we could help lol
😂 1
👍 1
Avatar
GormusSenex 3/8/2020 3:18 PM
🦆
3:18 PM
it aint yellow, but its a duck...
🦆 2
Avatar
@substitute Im trying to modify override what can be uploaded to the ark
5:55 PM
Nothing special but i cant find a hook for it
5:55 PM
dinos i managed but not for tributes
Avatar
GormusSenex 3/8/2020 6:10 PM
could it be AShooterPlayerController->OnArkTributeAllClustersInventoryItemsLoaded(..) ?
6:11 PM
or OnAddedItemsToAllClustersInventory ?
6:11 PM
@KillZone
6:14 PM
this prolly comes before that: AddItemToAllClustersInventory (edited)
Avatar
Oh il try that temphappy
6:18 PM
im not on windows now so when i boot back into it il let you know if it works
6:19 PM
as is i used AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation and that didn't seem to get called
6:19 PM
il report back what i find out in a few
Avatar
what library do you guys use for sqlite?
Avatar
GormusSenex 3/8/2020 7:19 PM
i previously used the one michidu had in his arkshop. but then i reinstalled pc and installed the newest sqlite and after hours and hours of trial and error it suddenly worked. but now im switching to sql express.
Avatar
meduza im also using that sqlite library and I know what you mean by trial and error
😂 1
7:21 PM
Lul
7:22 PM
fix something and suddenly something else doesnt work anymore
Avatar
GormusSenex 3/8/2020 7:22 PM
ye, but luckily we get such informative error messages... 😂 (edited)
Avatar
im having fun though
7:23 PM
yeah good messages typeKappa
7:23 PM
86 error messages saying the syntax of the library is wrong
7:23 PM
😂
Avatar
GormusSenex 3/8/2020 7:23 PM
they might as well have made the compiler with 1 error message "Something went wrong, newb, go fix!"
7:24 PM
so easy to mess something up in c++
7:24 PM
without knowing what you messed up
Avatar
GormusSenex 3/8/2020 7:24 PM
in c# it points directly to where shit happended... but nooo, not in c++ 😉
Avatar
c# tells me what the cause of the error is and where. C++ tells me where it went wrong but not what caused it per se
Avatar
GormusSenex 3/8/2020 7:26 PM
not always where in my experience tho
Avatar
if I had to use an analogy. It would be if a car hits a fence, and the fence hits a person. C++ would tell me, ERROR at fence when it hits person.
7:26 PM
C# would tell me the cause was the car hitting the fence
Avatar
lol
Avatar
GormusSenex 3/8/2020 7:30 PM
i know what Michidu is thinking right now... kids these days wants it too easy 😂
Avatar
I just wanna know what went wrong and where. Is that too much to ask?
7:31 PM
Avatar
not really, it's great analogy actually
Avatar
whole thing with how libraries work in C++ is also tough to grasp for me
7:34 PM
the included directories and the linker stuff
Avatar
but C++ is experiencing a renaissance because power is king again. Languages like Java and C# are good when programmer productivity is important, but they show their limitations when power and performance are paramount. For high efficiency and power, especially on devices that have limited hardware, nothing beats modern C++. by Microsoft might give you some motivation heh
Avatar
GormusSenex 3/8/2020 7:36 PM
im not argueing against that. that is true
Avatar
yeah that is what is appealing about C++
7:37 PM
aside from the issues, im having fun learning it along with the api stuff (edited)
Avatar
GormusSenex 3/8/2020 7:38 PM
i did code assembler once - back on 8088. fast too when running, not fast coding and impossible once windows was standard 😄
7:39 PM
but back then there were no dear momma
7:39 PM
an error could be anywhere... ANYwhere
Avatar
actually modern compilers are quite smart, they can probably generate better asm code than you 🙂
Avatar
GormusSenex 3/8/2020 7:39 PM
true 🙂
7:39 PM
the instruction set back then were also a lot smaller
Avatar
Meduza, speaking of the sqlite library earlier. How did you include it in your project?
7:40 PM
For the life of me I cannot get it to compile now
Avatar
GormusSenex 3/8/2020 7:40 PM
i ran some command-shell thingie i forgot about and it prompted me something like "include in vs projects?"
Avatar
was it this?
7:41 PM
./configure && make && sudo make install
Avatar
GormusSenex 3/8/2020 7:41 PM
no sudo. i would have remembered that
Avatar
including sqlite a bit tricky, you should preserve the order of includes it is true at least for one sqlite library (which probably used in arkshop)
Avatar
I think the order is correct?
Avatar
GormusSenex 3/8/2020 7:46 PM
i cant even find it in my downloads or in my history. cuz i had to reinstall chrome completely cuz it was leaking memory
7:46 PM
just been trough all my files 😦
Avatar
it's the sqlite_modern_cpp wrapper that is giving me the compile errors
Avatar
GormusSenex 3/8/2020 7:47 PM
have u included the sqlite3 header file ?
7:47 PM
and the .c file ?
7:47 PM
it has to be in ur project
Avatar
it is in the same directory, and it is also included
7:48 PM
C:\Users\????\Desktop\Ark Plugin Dev\Permissions\Permissions\Public C:\Users\????\Desktop\Ark Plugin Dev\ARK-Server-API-master\version\Core\Public C:\Users\????\source\repos\ForcedBaseProtection\ForcedBaseProtection\DataBase C:\Users\????\source\repos\ForcedBaseProtection\ForcedBaseProtection\hdr
7:49 PM
the sqlite3.h and sqlite3.c is in the database folder
7:49 PM
do I need to add something under Linker?
Avatar
GormusSenex 3/8/2020 7:50 PM
i donno about that. i have mine in the base folder witrh the rest of my files
Avatar
same issue still
7:56 PM
i get 80+ syntax errors
7:56 PM
in the library itself
7:56 PM
kimyell
Avatar
GormusSenex 3/8/2020 7:58 PM
ngl i fell ur pain. ive been there and suddenly it just works
7:58 PM
after installing stuff... moving files... doing other stuff...
Avatar
im so close aswell, I can see the light at the end of the tunnel
8:02 PM
😂
Avatar
GormusSenex 3/8/2020 8:02 PM
...
8:03 PM
also been there. and then the light was painted on and u discover its a concrete wall u need to break down
8:03 PM
with a spoon
8:08 PM
the thing that i find weird aswell is that intellisense is not giving me any syntax errors
8:08 PM
it's only when building
Avatar
idk, im starting to actually believe the library is just outdated
9:02 PM
there actually was syntax errors in the code
9:02 PM
Lul
9:02 PM
visual studio was reading the file wrong and left out a few lines, but notepad++ showed everything (edited)
Avatar
substitute 3/8/2020 9:07 PM
@Michidu
9:07 PM
I know how you can hook bp events / functions
9:07 PM
I might try something from my side and if I can get it working without issues I’ll elaborate
9:08 PM
It’s actually fairly easy
Avatar
@GormusSenex omg I got it working
9:50 PM
im crying bro
9:50 PM
😂
Avatar
GormusSenex 3/8/2020 9:51 PM
👍
9:51 PM
i know that feeling too 😉
Avatar
is Log::GetLog()->debug(msg); supposed to print to the server console? (edited)
Avatar
substitute 3/9/2020 1:26 AM
Yes
Avatar
Good to know
1:39 AM
Also curently im using c++ player->RootComponentField()->RelativeLocationField()
1:39 AM
to get the player position
1:40 AM
but i've noticed this function only returns the position of where the player spawned initially (edited)
1:42 AM
not the realtime position of the player
Avatar
substitute 3/9/2020 2:28 AM
There should be get actor location
2:28 AM
Similar to get actor rotator
2:28 AM
But i think it is missing in the api
2:29 AM
I think there is an api helper though for player location
Avatar
DefaultActorLocationField seems to work
3:42 AM
all though I agree (edited)
3:42 AM
a GetActorLocation() function would make way more sense (edited)
Avatar
GormusSenex 3/9/2020 1:12 PM
@WETBATMAN I know u know this one. How to I make a "delayed" notification to a player - like 2 mins after logging on ? It got something to do with the timer, i know that... but how ? can it be done any simpler than this: https://github.com/Michidu/Ark-Server-Plugins/blob/master/ArkShop/ArkShop/Private/TimedRewards.cpp ?
Avatar
API::Timer::Get().DelayExecute(&CallBack, 120);
2:44 PM
@GormusSenex
👍 1
Avatar
@WETBATMAN Can I use API::Timer to put a command on a cooldown?
Avatar
i guess
2:47 PM
but API timers aren't extremely precise
2:48 PM
i would save the time stamp of when the command was last run in a TMap with the players SteamID being used as the key
2:48 PM
then check the time diff on command call and execute if necessary
Avatar
GormusSenex 3/9/2020 5:10 PM
So, @WETBATMAN If I want something to be called like every 5 mins, there would be no problem in doing a DelayExecute inside the callback ?
Avatar
GormusSenex 3/9/2020 5:18 PM
... and why cant I reference Timer within API, but only Tools ?
Avatar
you have to include Timer.h
Avatar
GormusSenex 3/9/2020 5:25 PM
ahh ty
Avatar
what is the hook for when a player joins the server?
Avatar
HandleNewPlayer_Implementation
Avatar
substitute 3/9/2020 6:30 PM
@WETBATMAN
6:30 PM
I know how to handle bp events
6:30 PM
Pog
6:34 PM
wdym (edited)
6:34 PM
BP functions can be hooked no ?
Avatar
GormusSenex 3/9/2020 6:36 PM
what is BP functions ? Im guessing its not BluePrints ?
Avatar
it is ye
Avatar
GormusSenex 3/9/2020 6:36 PM
ohh. then what does he mean with 'handle bp events' ? like when crafting it ?
Avatar
no he means functions made with BP
Avatar
GormusSenex 3/9/2020 6:39 PM
im still not following ? functions made with blueprints ? umm
Avatar
BP is what the Devkit uses
6:40 PM
Overview of using the Blueprint visual scripting system for gameplay.
🤔 1
Avatar
substitute 3/9/2020 8:09 PM
@WETBATMAN
8:09 PM
Yes
8:09 PM
And normally they can not
8:09 PM
They aren’t compiled into the exe
8:10 PM
And they 101% don’t exist in the pdb
8:10 PM
@GormusSenex this means I could hook a function from a mod for example
Avatar
what would be the best way to get the tribedata of a tribe I only have the tribeid for
Avatar
now hooking a function from a mod is very cool
Avatar
GormusSenex 3/9/2020 8:16 PM
u have the player also, or jsut the tribe id ?
Avatar
literally just the tribeid
Avatar
GormusSenex 3/9/2020 8:17 PM
sry then. only know how to get tribedata from a player
Avatar
is there no function I can use to get the tribedata based of tribeid?
Avatar
AShooterGameMode::GetOrLoadTribeData
Avatar
that requires tribedata
8:26 PM
that i dont have
Avatar
no it returns tribeData
8:26 PM
😄
8:26 PM
8:26 PM
LoadedTribeData
Avatar
is that a hook?
Avatar
it's a function you call
8:27 PM
that screenshot is from IDA
Avatar
how do I get the shootergamemode?
Avatar
GormusSenex 3/9/2020 8:30 PM
i think like this: FTribeData tribeData; ArkApi::GetApiUtils().GetShooterGameMode()->GetOrLoadTribeData(123, &tribeData); (edited)
8:30 PM
havnt tested it tho
8:31 PM
or: FTribeData* tribeData; ArkApi::GetApiUtils().GetShooterGameMode()->GetOrLoadTribeData(123, tribeData);
8:31 PM
i think its the ladder
8:32 PM
123 is ur tribe id ofc
8:32 PM
im still getting confused about the * and &. so i always try each combo to c which one it is 😂 (edited)
Avatar
they are completely opposite heh
Avatar
GormusSenex 3/9/2020 8:40 PM
it got something to do with pointers 😄
Avatar
in either case
8:41 PM
it doesnt work
Avatar
GormusSenex 3/9/2020 8:41 PM
game must be done loading i think
Avatar
it's not even building
Avatar
GormusSenex 3/9/2020 8:42 PM
ohh
Avatar
Its a bit wrong, a correct way to call this func was posted here already
Avatar
GormusSenex 3/9/2020 8:42 PM
FTribeData* tribe_data = static_cast<FTribeData*>(FMemory::Malloc(0x200)); RtlSecureZeroMemory(tribe_data, 0x200); if (ArkApi::GetApiUtils().GetShooterGameMode()->GetOrLoadTribeData( teamId, tribe_data)) { // } FMemory::Free(tribe_data);
Avatar
that function makes no sense to me though
Avatar
GormusSenex 3/9/2020 8:42 PM
that one ?
Avatar
Yes Just getorloadtribe might leak memory
Avatar
it does ye
Avatar
that sounds terrible
8:47 PM
ill just store some of the data in a database and update it 💤
Avatar
why
8:47 PM
TribeID is per server
Avatar
GormusSenex 3/9/2020 8:47 PM
or read it from the arktribe file
Avatar
unless you need it for offline tribes you can load this data in memory
Avatar
i need it for online and offline tribes
Avatar
ah
Avatar
@WETBATMAN
5:55 AM
5:55 AM
🙂
5:55 AM
hah
5:55 AM
Avatar
is it a full hook ? can we also see and intercept the args ?
9:39 AM
anyhow that's very cool, nice work
Avatar
Yes it is
10:05 AM
Though I need to write a macro to define args types as they are passed void*
10:05 AM
so they need to be user casted to a container
Avatar
@WETBATMAN
10:24 AM
this is what I have so far
10:24 AM
template<typename... args> class UE4FunctionParameters { public: std::tuple<args &...> params; }; #define DEFINE_UE4_Function_Parameters(name, ...) \ class name : public UE4FunctionParameters<__VA_ARGS__> { };
10:26 AM
example usage
10:26 AM
DEFINE_UE4_Function_Parameters(LoadedWorld, UWorld*);
10:27 AM
LoadedWorld* myParameters; std::get<UWorld*>((*myParameters).params);
10:27 AM
user casting
Avatar
Though I don’t really like using this setup
10:54 AM
I would prefer to macro define a struct with 1:1 mapping of fields to va args
10:54 AM
Then it’d just be a direct cast from the void pointer
10:55 AM
I may just define a macro for an arbitrary n and assume the parameters are always under n amount
10:56 AM
But that’s not great
11:01 AM
I may also settle on unpacking the void* myself instead of mapping it to a struct
Avatar
GormusSenex 3/10/2020 4:56 PM
If I want to do a recurring action/thing every x sec, what is the best approach ? To do a ArkApi::GetCommands().AddOnTimerCallback(...) or do a API::Timer::Get().DelayExecute(...) and call that inside the delayed-executed function ? Or is it basically the same ? (edited)
4:58 PM
My guess is the first one puts in on a "list" of some sort and then checks the list constantly whether or not its time to do something, and the other puts it in its own thread and therefore have no impact on "primary" thread execution ?
Avatar
timer also has a ReoccurringExecute
5:01 PM
😄
Avatar
GormusSenex 3/10/2020 5:02 PM
so its basically the same ?
Avatar
API::Timer::RecurringExecute()
👍 1
5:02 PM
no it will execute your func every X seconds
Avatar
GormusSenex 3/10/2020 5:02 PM
ohh i didnt know there actually were a recurringexecute 😄
5:02 PM
then i dont have to call my func from inside the func
Avatar
You should avoid calling your function from itself forever
5:03 PM
It would eventually stack overflow
Avatar
Recursion 👀
Avatar
Recursion has an exit case
Avatar
well yea if you endlessly call the function over and over what's the point 😄
Avatar
GormusSenex 3/10/2020 5:04 PM
if i want to clear/stop my recurringexecute, then what ?
Avatar
i'm pretty sure you cannot stop it after it's loaded
Avatar
GormusSenex 3/10/2020 5:04 PM
ohh darn
5:09 PM
what about this then: bool* stopFunc = false; void MyFunc(bool* stopFunc) { if (!stopFunc) { [... do something...] API::Timer::Get().DelayExecute(&MyFunc, 30, stopFunc); } } API::Timer::Get().DelayExecute(&MyFunc, 30, stopFunc); [... do something for some time...] stopFunc = true; (edited)
Avatar
DelayExecute will just execute your function AFTER some time tho
5:10 PM
not in a time frame
Avatar
GormusSenex 3/10/2020 5:11 PM
ye, i forgot to add seconds. but the concept from calling itself inside itself and have a bool outside deciding to run any further. would that work ?
Avatar
@GormusSenex your code is wrong
5:17 PM
if stopFunc points to a bool pointer
5:17 PM
then you need if (!(*stopFunc))
5:17 PM
right now you are just checking if stopFunc is a valid pointer or not
Avatar
GormusSenex 3/10/2020 5:18 PM
ahh ty. but would the concept work or is it a stupid idea ?
Avatar
I mean
5:19 PM
it'd work
5:19 PM
but it's not great
Avatar
GormusSenex 3/10/2020 5:21 PM
haha ty for being diplomatic about it 😂 Ive checked the recurringexecute and it needs both a timer and a counter. anyway to change that counter after execution then ? (in order to stop the recurringexecution before the counter has to reach zero)
Avatar
check how the function checks
5:22 PM
maybe it checks if count == 0
5:22 PM
or maybe it checks if count < 1
5:22 PM
if the first
5:22 PM
just set count = -1
5:22 PM
for endless
5:22 PM
but you can always roll your own that doesn't self-call.
Avatar
GormusSenex 3/10/2020 5:22 PM
yes but what if i want to stop the reccurance ?
Avatar
close the server
5:22 PM
Kapp
Avatar
GormusSenex 3/10/2020 5:23 PM
🙄 😂
Avatar
for yourself
5:23 PM
maybe roll your own implementation
5:23 PM
having the function call itself isn't a good choice (edited)
5:23 PM
remember, for every iteration, the stack of the previous iteration exists
5:24 PM
so you end up with n levels deep of the function's stack
5:24 PM
hence why you can stack overflow
Avatar
GormusSenex 3/10/2020 5:24 PM
doesnt it get out of scope and the cleaned up ?
Avatar
no because your function is calling itself
5:24 PM
the callee isn't out of scope
5:24 PM
since it's waiting for the called function to complete
Avatar
GormusSenex 3/10/2020 5:25 PM
but the caller has completed hasnt it ? and just started a new caller ?
Avatar
no
5:25 PM
it looks like this
5:25 PM
5:26 PM
the outer most my func is waiting on the inner my func which is waiting on its inner my func
5:26 PM
forever
Avatar
GormusSenex 3/10/2020 5:26 PM
but doesnt the first MyFunc get out of scope once it reaches the end of its execution ?
5:26 PM
isnt is async ?
Avatar
yes, but it never ends its execution
5:26 PM
because it's calling itself
5:27 PM
think this
5:27 PM
is main ever out of scope?
5:27 PM
no, it exists until the end of the program
Avatar
GormusSenex 3/10/2020 5:27 PM
yes, but the main doesnt reach its end of code
Avatar
the calling my func exists until the called my func finishes
5:27 PM
but since the called my func keeps calling itself
5:27 PM
no my func completes
Avatar
GormusSenex 3/10/2020 5:27 PM
the myfunc does as it fires the deleayexecutre and then moves on in its code
Avatar
also async doesn't mean different threads
Avatar
GormusSenex 3/10/2020 5:31 PM
ur most likely right, i just cant wrap my head around why the 1st myfunc hasnt stopped and the 2nd is now waiting for execution and so on.
Avatar
i was talking in general
5:35 PM
a function calling itself
5:36 PM
the delay execute may spin off async
5:36 PM
and the caller may return
5:36 PM
(since you don't await for the result)
5:40 PM
I am supper new to this, Wetbatman has helped me alot in PM, but i thought i would not spam him anymore xD I am trying to make a small change to Arkshop but am getting this on build
5:40 PM
I checked all the files are unblocked
Avatar
did you include the lib files ?
5:40 PM
you have to include the out_lib folder
Avatar
Im sure i did but i will double check
5:41 PM
PS the one you made me didnt load xd
5:41 PM
error codes ?
5:43 PM
Plz dont say its my fault xD
Avatar
nah looks like ShooterGameMode is not yet initialized yet i used it in the code i sent
5:44 PM
😄
Avatar
You fixed my other problem, i accidentally included all of Ark API and not just the out_lib folder
5:44 PM
Dang thats a fat RIP then
5:44 PM
Cant use this method?
Avatar
GormusSenex 3/10/2020 5:45 PM
what ?! we can spam @WETBATMAN with questions in PMs ? noiceeee 😂
5:45 PM
😉
Avatar
Well i said i was going to buy a plugin he might be working on so xD
5:50 PM
Maybe thats why he was kind to me haha
5:54 PM
Its not possible to pass anything from the .bat into the API?
Avatar
GormusSenex 3/10/2020 5:58 PM
why not just load it in a config file ?
Avatar
Basically, whether its correct or not i like to run all of my server instances from 1 set of Server Files
5:59 PM
I want the ability to load a separate Ark Shop config per server instance
5:59 PM
Wetbatman gave me the code to splice the mapname into the config file name so i can run a config for each map
Avatar
GormusSenex 3/10/2020 6:00 PM
so why not do that ? sounds like a good idea ?
Avatar
He made my dreams true, but as he mentioned just then hes trying to use GetShooterGameMode before its initialised (edited)
Avatar
GormusSenex 3/10/2020 6:01 PM
hook into initgame and run it after the original call
6:02 PM
void Hook_AShooterGameMode_InitGame(AShooterGameMode* a_shooter_game_mode, FString* map_name, FString* options, FString* error_message) { AShooterGameMode_InitGame_original(a_shooter_game_mode, map_name, options, error_message); // do stuff here } (edited)
Avatar
@WETBATMAN
6:11 PM
Your hwid ban system is very easily bypass btw
Avatar
for now yes, i need to redo it
Avatar
Pretty much forever
Avatar
well i cannot do anything about spoofers
6:11 PM
🤷‍♂️
Avatar
The get device id uses the network card MAC address
Avatar
it's about adding extra steps for cheaters
Avatar
Windows has built in MAC randomization
6:12 PM
At least on windows 10
6:12 PM
SadCptPepe
Avatar
can't rly do anything about that
6:12 PM
😦
6:16 PM
looks like someone released a cheat with a bypass for the mod though lol
Avatar
@GormusSenex I have never coded a plugin before xd
Avatar
GormusSenex 3/10/2020 6:16 PM
well, then im just a little bit ahead of u then. im also a c++ newb 😂
Avatar
When you wrote "Do stuff here" Should this be when you are creating the string for the config path
Avatar
GormusSenex 3/10/2020 6:17 PM
ye, after that line AShooterGameMode is fully loaded
Avatar
I read what ownprox wrote about Hooks
6:17 PM
But like, embedding it in the hook, will wait for shootergame to initialise and then load the config?
Avatar
no you can't do it like that
6:18 PM
this needs to be in hooks
6:19 PM
but then you have a problem
6:19 PM
you have to redo the entire load process for ArkShop
Avatar
GormusSenex 3/10/2020 6:19 PM
it just reading the config then why not just to it in the main load-method ?
Avatar
by redo i mean you would need to move it after ShooterGameMode was initialized
6:19 PM
he has multiple servers running on the same files
Avatar
If you are moving it to then, do you need to add in the hook?
Avatar
GormusSenex 3/10/2020 6:19 PM
ima stay out of this. i donno what ur trying to achieve
Avatar
so he want's arkShop to load a config per map
6:20 PM
the configs would be differentiated by map names
6:20 PM
to get the map name he needs ShooterGameMode
Avatar
GormusSenex 3/10/2020 6:20 PM
but he points to the same config file or what ?
6:20 PM
I want to have like TheIslandConfig.json AberrationConfig.json etc
6:21 PM
Then i can pull flyers etc from the shop on aber
Avatar
GormusSenex 3/10/2020 6:21 PM
i still dont get it. unless ur pointing to the same config file with eg. symblinks then each "map" automatically gets its own config file anyway ??
Avatar
Its because i run 6 Servers from 1 set of server files
Avatar
GormusSenex 3/10/2020 6:22 PM
ohh now i think i get it. u want the sme config for the shop, but exclude some items for diffenrent maps ?
Avatar
and just use .bat's to launch the servers
Avatar
GormusSenex 3/10/2020 6:24 PM
is that what ur trying to achieve ?
6:25 PM
Thats what i already do lol
Avatar
you could probably get mapName by reading launch args yourself instead of waiting for the ShooterGameMode to get it
Avatar
Yeah i had asked that further up, if i can send something via the .bat
6:25 PM
I will explore the functions see whats there
Avatar
you don't send it 😄
6:26 PM
server has map name on hand
6:26 PM
otherwise how would it know which map to load 😄
Avatar
GormusSenex 3/10/2020 6:26 PM
wait a minute. read up on symlinks and u can achieve what u want out of the box with no added stuff
Avatar
you just gotta read the setting
Avatar
Oh sorry i thought you meant add something additional to the .bat for it
Avatar
yea but then you gotta know which .bat launched the server (edited)
6:27 PM
😄
Avatar
GormusSenex 3/10/2020 6:27 PM
create a folder for each map. symlink to essential files, but not the config ones, savegame ones etc. then u just change ur bat file to each folder and start the game there. by that u have a config for each map, but still only 1 shootergame.exe to update etc
Avatar
^^
6:28 PM
this would be the better solution 😄
6:29 PM
better get on google then xD
Avatar
GormusSenex 3/10/2020 6:32 PM
symlink, or symbolic link, is basically a reference to a file. but the system treats it as it was the file, meaning if u try and delete the symlinked file then the original one gets deleted "as well". u can still delete the symlink, but thats a difficult process so make sure u keep a backup folder of the files ur gonna symlink to. Im speaking from bad experience 😂 (edited)
6:35 PM
the command is mklink if im not remembering wrong
Avatar
So i would need to Symlink everything in Win64 and its subfolders apart from the one config file within ArkShop?
Avatar
GormusSenex 3/10/2020 6:37 PM
everything in the ark dedicated folder and exclude the config, save etc folders
Avatar
Oof so i still end up with 6 Folders xD
Avatar
GormusSenex 3/10/2020 6:38 PM
basically ur gonna end up with 6 identical folders of the ark installatino folder
6:38 PM
yes
6:39 PM
but ur filesystem will only have 1 file - and 6 symlinks. symlnks in each folder. rename the "original" folder something like "_original" and symlink from there
Avatar
@XeLaD
8:12 PM
this is a relatively easy change
8:12 PM
change the main loading method to only make a hook for the loaded world event
8:12 PM
on that event, get the map name
8:13 PM
unhook the event -> setup the actual arkshop hooks
8:13 PM
You will basically use a hook to delay init the rest of the plugin.
8:14 PM
additionally, another approach is to parse the startup args as those generally have the map name
8:14 PM
either option is valid
Avatar
Oh nice ok, the synlink seems like a good option too. But I'm kind of looking to use this to learn as much as I can about api too
8:32 PM
Are there any examples available of parsing startup args? I feel like that is the better way to do it
Avatar
You can try
Avatar
using the hook to init ArkShop is not rly that bad of an idea
9:04 PM
it will just delay the loading of the plugin a bit
Avatar
c++ ArkApi::GetApiUtils().SendChatMessage(player, "ForcedBaseProtection", FString::Format("Base protection on cooldown {0} seconds remaining.", FString::FromInt(secondsLeft)));
9:27 PM
why doesnt this work
9:27 PM
Avatar
GormusSenex 3/10/2020 9:28 PM
L missing infront of "force..." ? (edited)
Avatar
what does that do
Avatar
GormusSenex 3/10/2020 9:29 PM
const FString (edited)
Avatar
that doesnt fix it unfortunately
Avatar
GormusSenex 3/10/2020 9:32 PM
then its ur FString::format. use fmt::string(...).c_str();
Avatar
same error
Avatar
GormusSenex 3/10/2020 9:34 PM
u sure player is right ?
Avatar
the command works elsewhere multiple times
9:35 PM
only when I try to add multiple strings together this happens
Avatar
GormusSenex 3/10/2020 9:35 PM
then to the basic L"hello" + L" world" + L"!" 😂
Avatar
c++ std::string narrow_string(""); std::wstring wide_string = std::wstring(narrow_string.begin(), narrow_string.end()); const wchar_t* result = wide_string.c_str();
9:43 PM
this works
Avatar
That’s
10:15 PM
Really wrong
10:15 PM
FString supports formatting
10:15 PM
I would use that and take the tostring of the fstring
Avatar
@substitute that gives me an error though and doesnt work
Avatar
@Buu this owrks fine for me
10:51 PM
ArkApi::GetApiUtils().SendChatMessage(asdf, "ForcedBaseProtection", *FString("Base protection on cooldown {0} seconds remaining."), secondsLeft);
10:52 PM
this also works
10:52 PM
ArkApi::GetApiUtils().SendChatMessage(asdf, "ForcedBaseProtection", "Base protection on cooldown {0} seconds remaining.", secondsLeft);
Avatar
the * made it work lol
Avatar
that's because it expected a pointer
11:05 PM
a string literal is a pointer
11:05 PM
it's char*
Avatar
I have to look up the * and & stuff
Avatar
GormusSenex 3/10/2020 11:06 PM
😂
Avatar
Not used to having to use that kinda stuff
Avatar
GormusSenex 3/10/2020 11:06 PM
i do constantly and forget it too 😄
Avatar
I'm not sure why to use the star in this specific case though, as that is for dereferencing
11:07 PM
but it does expect a pointer
11:07 PM
const T* msg
11:07 PM
is a pointer of T
11:07 PM
where T is a type that is supplied by the template
11:07 PM
template <typename T, typename... Args> void SendChatMessage(AShooterPlayerController* player_controller, const FString& sender_name, const T* msg, Args&&... args) { if (player_controller) { const FString text(FString::Format(msg, std::forward<Args>(args)...)); FChatMessage chat_message = FChatMessage(); chat_message.SenderName = sender_name; chat_message.Message = text; player_controller->ClientChatMessage(chat_message); } }
11:07 PM
you can see how it works here.
11:07 PM
I would suggest leaving the concatenation to this function btw. (edited)
Avatar
c++ API::Timer::Get().DelayExecute(&ActivateSafeZone, secondsLeft);
11:25 PM
11:26 PM
what?
11:26 PM
cant convert from int to int
Avatar
from int * to int
11:27 PM
try
11:27 PM
API::Timer::Get().DelayExecute(&ActivateSafeZone, *secondsLeft); (edited)
Avatar
Can you post the whole block
Avatar
c++ int secondsLeft = config["SafeZoneActivationDelayInSeconds"]; API::Timer::Get().DelayExecute(&ActivateSafeZone, *secondsLeft);
Avatar
no issue for me
11:30 PM
11:30 PM
it's a build error
11:30 PM
I had it without the * first
11:31 PM
and it gives me the "cant convert int * to int" (edited)
Avatar
@Buu
11:36 PM
it's the reference to your function that is causing issues
11:36 PM
is the function static ?
11:36 PM
no
Avatar
It needs to be
11:36 PM
because if it isn't, once compiled, it has an extra (first) parameter called this
11:37 PM
you can't easily pass non-static methods as function pointers
11:37 PM
json config; int secondsLeft = config["SafeZoneActivationDelayInSeconds"]; API::Timer::Get().DelayExecute(asdf, secondsLeft);
11:37 PM
works for me
11:37 PM
static void asdf() {}
Avatar
static now and same error
11:37 PM
:/
Avatar
remove the &
Avatar
again, same error
Avatar
Show me the entire block
11:38 PM
including the callback
11:38 PM
the whole thing
11:38 PM
and did you recompile? (edited)
Avatar
c++ static void ActivateSafeZone(AShooterPlayerController* player) { AShooterPlayerState* State = static_cast<AShooterPlayerState*>(player->PlayerStateField()); FTribeData* tribeData = State->MyTribeDataField(); int tribeid = tribeData->TribeIDField(); const auto& zone = SafeZoneManager::Get().FindZoneByName(FString::FromInt(tribeid)); if (!zone) { zone->active = true; cooldowns.Add(tribeid, std::chrono::system_clock::now()); if (player != nullptr) { ArkApi::GetApiUtils().SendChatMessage(player, "ForcedBaseProtection", "Base protection has activated."); } } } int secondsLeft = config["SafeZoneActivationDelayInSeconds"]; API::Timer::Get().DelayExecute(ActivateSafeZone, secondsLeft);
Avatar
GormusSenex 3/10/2020 11:39 PM
how do u get color on code snippits ?
Avatar
GormusSenex 3/10/2020 11:40 PM
ohh cool
Avatar
oh
11:41 PM
you forgot to pass the parameter
Avatar
static void ActivateSafeZone(AShooterPlayerController* player) { //stubbed code. } void HandleEvent(AShooterPlayerController* player) { json config = {}; //stub int secondsLeft = config["SafeZoneActivationDelayInSeconds"]; API::Timer::Get().DelayExecute(ActivateSafeZone, secondsLeft, player); }
Avatar
🤦‍♂️
Avatar
GormusSenex 3/10/2020 11:42 PM
doesnt it need to be c++ API::Timer::Get().DelayExecute(&ActivateSafeZone, secondsLeft, player);
Avatar
no
Avatar
not if the function is static apparently
Avatar
the function name without () is a pointer
11:42 PM
and you can't really ever pass an instance function as a function pointer easily
11:42 PM
generally only static methods can be function pointers (edited)
Avatar
yeah that worked, now i just gotta work through a few more errors 😂
11:43 PM
thanks @substitute
11:43 PM
you've been more helpful in 10 minutes than the c++ help discord server has been in 3 days
Avatar
to be fair
11:43 PM
they aren't using the same library
11:43 PM
so they can't see the template declarations
Avatar
I havent asked a single api specific question in that discord
11:44 PM
only general c++ questions
Avatar
GormusSenex 3/10/2020 11:44 PM
well, this apparently works: c++ void DelayedMessage(AShooterPlayerController* new_player) { if (new_player) { ArkApi::GetApiUtils().SendNotification(new_player, FColorList::Green, 2.0f, 15.0f, NULL, L"Hello player!"); } } [...] API::Timer::Get().DelayExecute(&DelayedMessage, 30, new_player);
Avatar
but with 25 "Helpful" people on at all times, I never got a decent answer
Avatar
@GormusSenex you can try that
Avatar
GormusSenex 3/10/2020 11:45 PM
it works
Avatar
but good chance it could crash (edited)
Avatar
GormusSenex 3/10/2020 11:45 PM
its implemented
Avatar
are both functions being run from the same class?
Avatar
GormusSenex 3/10/2020 11:45 PM
ye
11:45 PM
no
11:45 PM
same namespace tho
Avatar
because if so, it could be implicitly handling the _this parameter
Avatar
Substitute, could c++ *FString("Base protection will activate in {0} seconds."), std::to_string(secondsLeft) potentially be the cause of an error?
11:46 PM
Im getting
11:46 PM
5 times in a row and that corresponds to the amount of time I use that formatting
11:46 PM
of FString
11:47 PM
is it the std::string + fstring?
Avatar
what is that in?
11:48 PM
I would just do
11:48 PM
ArkApi::GetApiUtils().SendChatMessage(asdf, "ForcedBaseProtection", "Base protection on cooldown {0} seconds remaining.", secondsLeft);
11:48 PM
and let the internal FString::Format of send chat message handle formatting.
Avatar
GormusSenex 3/10/2020 11:49 PM
i would be surpriced if that works
Avatar
It does
11:49 PM
template <typename T, typename... Args> void SendChatMessage(AShooterPlayerController* player_controller, const FString& sender_name, const T* msg, Args&&... args) { if (player_controller) { const FString text(FString::Format(msg, std::forward<Args>(args)...)); FChatMessage chat_message = FChatMessage(); chat_message.SenderName = sender_name; chat_message.Message = text; player_controller->ClientChatMessage(chat_message); } }
11:49 PM
that is the template
11:49 PM
msg is the first arg in it's FString::Format
11:50 PM
which does handle char* -> FString (edited)
Avatar
hmm ok I changed it and it still doesnt work, so I can at least conclude it's not that
Avatar
GormusSenex 3/10/2020 11:51 PM
then i have overcomplicated a lot of stuff in my code if that works
11:51 PM
try commenting it out and compile
11:51 PM
to make sure its not that
Avatar
@GormusSenex I haven't tested using that call
11:52 PM
but I can't see any reason it won't work.
11:52 PM
I've never needed to send a message to a player
11:52 PM
other than in here
11:52 PM
FNetControlMessage<NMT_Failure>::Send(PlayerNetConnection, NextConfig<ConfigBody>::Get().KickMessage());
Avatar
yeah all commented out and still doesnt work. Good to know at least
Avatar
using my own declaration of FNetControlMessage (edited)
Avatar
why can't C++ tell me what the cause of the error is lol
Avatar
it is
11:55 PM
it's just not super clear
11:55 PM
cringe (edited)
Avatar
I mean
11:55 PM
it really is doing the best it can
11:55 PM
templates generate code at compile time
11:55 PM
that isn't easy to show where the error is
11:56 PM
since it's generated code that doesn't exist in your editor
11:56 PM
but can't compile due to an error that you caused (edited)
11:56 PM
this error is literally meaningless to me
Avatar
what is the error
Avatar
oh
11:57 PM
that does make sense completely
11:57 PM
Basically, you're using something that is deprecated
11:58 PM
it says at the end define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
11:58 PM
to disable the build error
Avatar
GormusSenex 3/10/2020 11:58 PM
ahhhhhhh ive had that one too long ago 😄
Avatar
At the top of the file
11:58 PM
put
11:58 PM
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
11:58 PM
something like that
11:58 PM
and make sure there's no typos
Avatar
hmm copy pasted from the error
12:01 AM
triple checked, the define line is correct
12:01 AM
didnt get rid of the build errors though
Avatar
GormusSenex 3/11/2020 12:01 AM
ive added it like this:
Avatar
can you paste that line
Avatar
GormusSenex 3/11/2020 12:02 AM
the define didnt work for me either
12:02 AM
/D _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
Avatar
if the define didn't work in the file
12:03 AM
then whatever is causing the issue
12:03 AM
that file
12:03 AM
needs the define
12:03 AM
@GormusSenex what you did is fine too
12:03 AM
just globally defines it
Avatar
then globally defining it works
12:03 AM
it compiled
👍 1
12:03 AM
@GormusSenex thanks
12:03 AM
u2 substitute
Avatar
GormusSenex 3/11/2020 12:04 AM
@substitute it worked if i added it the actual file, but then i would have changed the "standard" arkserverapi which i didnt want to do
12:04 AM
so i just put it there
12:04 AM
and kept the "standard
Avatar
that doesn't change the ark api 🙂
Avatar
GormusSenex 3/11/2020 12:04 AM
file clean
Avatar
my FNetConnection macro and definitions works fine
Avatar
GormusSenex 3/11/2020 12:05 AM
no i mean. if i were to overwrite at a later stage, then that line would be lost
Avatar
and so do a few other fields i added
Avatar
i spent the entire day adding a new functionality without building or testing once
12:06 AM
😅
Avatar
GormusSenex 3/11/2020 12:06 AM
haha
12:07 AM
ive refactored an entire project. compiled at night. some minor bugs but then it actually compiled. couldnt wait for next day to test it. i should have known better... ofc it didnt work. had to spend 2 days debugging 😂
Avatar
yeah lol
12:07 AM
it not compiling is the worst
12:07 AM
when everything builds correctly it is so easy to add new stuff
12:08 AM
but when you're stuck debugging for days it's so depressing
Avatar
GormusSenex 3/11/2020 12:08 AM
no, in my experience. if it compiles at first run, then something is wrong... 😂
12:09 AM
😂 1
Avatar
it doesnt always build first time around
12:11 AM
but usually it's a simple thing I missed
12:11 AM
but c++ is just a different beast entirely
Avatar
GormusSenex 3/11/2020 12:11 AM
agreed
Avatar
im geussing if I try to send a chat message to a player that has logged off, it'll give me a nullpointer reference error? (edited)
Avatar
if so, is there a way to check if player is online or not?
Avatar
Check if the player controller pointer is null
Avatar
@Buu
Avatar
so a simple c++ if(player){} would work right?
Avatar
yes
Avatar
@Michidu could you please add me as a plugin dev on the forum, I would like to post my plugin there.
Avatar
Can i disable the Buff_FrozenEffect_Base using the API?
9:44 PM
its hard to find the documentation anywhere so i just ask it here
9:44 PM
basically im asking if i can catch buff aplly events and cancel them
Avatar
Maybe
Avatar
Hello! Took me a while to get here. I've been watching this project on/off for a few years. (edited)
Avatar
GormusSenex 3/12/2020 11:09 PM
how do i convert FString to std::wstring ? (edited)
Avatar
GormusSenex 3/12/2020 11:31 PM
Need help with this one: c++ FString command = L"some text"; std::wstring_convert<std::codecvt_utf16<char16_t>> converter; uint32 commandSize = command.Len(); TArray<uint8> commandData; commandData.AddUninitialized(commandSize); std::wstring wcmd = converter.from_bytes(StringToBytes(command, commandData.GetData(), commandSize)); SQLWCHAR* cmd = (SQLWCHAR*)wcmd.c_str(); I'm trying to convert an FString into SQLWCHAR. I get this error: 'std::codecvt_base::result std::codecvt<char16_t,char,mbstate_t>::in(mbstate_t &,const char *,const char *,const char *&,char16_t *,char16_t *,char16_t *&) const': cannot convert argument 5 from '_Elem *' to 'char16_t *'
Avatar
@GormusSenex
12:42 AM
Have you tried command.tostring()
12:42 AM
That should give an std::string
12:43 AM
I would expect the sql library to be able to accept input as std::string
Avatar
@Foppa I think moving forwards, the server api should hook into having the api hook functions and having plugins pass in pre and post function callbacks.
1:09 AM
The hooking could be dynamic, only installing a hook when at least one callback is registered.
Avatar
You'd probably want a way to deal w/ hook priority and event cancellation
1:11 AM
(mainly for dealing with multiple plugins, I could see conflicts happening)
Avatar
That's what I'm suggesting
Avatar
I really like how bukkit (minecraft server API) handled that: https://bukkit.gamepedia.com/Event_API_Reference
Welcome to Bukkit's Event API reference page.
Avatar
right now my plugin for AntiFamily Share is a POST hook
1:12 AM
as I need the original to run first (and fill out the user info from Steam)
1:12 AM
however, if I wanted to add another that did name filtering
1:12 AM
they'd both be post hooks
Avatar
and both would have to call the original function
1:12 AM
to ensure it runs
1:13 AM
vs having a system where you simply pass in the function name, a callback, and if it is post or pre hook.
1:13 AM
and having the system handle calling the original function
1:13 AM
Obviously you would add something like callback(bool* isHandled)
Avatar
in general not having plugins touch hooks directly would probably make for a better api? I think you could have some central system that handles hooking and prioritization
Avatar
so that a plugin could say to not run the original
1:13 AM
@Plazmaz Yes I do think so
1:14 AM
having plugins install their own hooks can get messy as things start to get larger
Avatar
seriously I think it's worth pulling some design concepts from bukkit. It's Java, so it's likely not all applicable, but their approach (still allowing direct access, but exposing easy interfaces) was pretty solid and it's probably one of the most mature server APIs
Avatar
I think there's two paths that can be done. Have the API hook everything and do the pre() func() post() That would require lots of code, but much of it could likely be made via macros. Not clean, could be problematic Second, when a user asks to install a pre/post hook, check if the method has a hook, if not, hook it, otherwise just add the callback to the callbacks map.
1:15 AM
The second is much less work in terms of raw code
Avatar
I think priority and cancellation are both important
Avatar
If you only consider the number of args for the function (edited)
1:16 AM
you can simply say all args are void*
Avatar
let's say your plugin blocks an event, but another one needs that event
Avatar
priority I don't think would be easy to do.
Avatar
the prioritization and handling of cancelled events is impoortant
1:17 AM
it wouldn't
Avatar
C++ doesn't have reflection.
1:17 AM
Which is how it is done in Java
Avatar
We shouldn't need it
Avatar
Your best bet for that would be an interface/class pattern for hooks that has a function to get the priority
Avatar
my C++ isn't great, but it seems like you could just do a map of priority to callback pointer? (edited)
Avatar
how would the map know the hook's priority?
1:18 AM
assuming you're not requiring it as a parameter
Avatar
you would
1:18 AM
when registering events
1:18 AM
you'd have a default priority
1:19 AM
then allow for explicitly specifying?
1:19 AM
ugh I gotta brush up on C++
1:21 AM
But the TL;DR there is that yes, it would require more code on the API side
1:21 AM
but the result would probably less code on the plugin side?
Avatar
I think less on the plugin side
1:22 AM
and less ambiguity
Avatar
a good approach might be writing an example plugin using a system that would be the best system possible, then write the API for that plugin
Avatar
void callback(void* _this, int* myGuy, bool* otherGuy) { printf("got my data :), %d %d", *myGuy, *otherGuy); } void functionCalled(void* _this, void* param1, void* param2) { ((void(*)(void*, void*, void*))callback)(_this, param1, param2); } int main() { int a = 20; bool b = true; functionCalled(nullptr, &a, &b); }
1:23 AM
passing void pointers works fine
1:23 AM
question is how to dynamically generated vararg length hooks
Avatar
@substitute I think the question should be directed more towards @Michidu 🙂
Avatar
yeah probably
Avatar
But it sounds like rewriting the whole API here lol 😛
Avatar
parts of it
1:27 AM
Direct hooking is problematic when two plugins have to fight over the same function
Avatar
is it tho?
Avatar
Yes,
1:27 AM
I put an example up before
Avatar
ah, let me scroll
Avatar
You can not create posthooks properly
1:27 AM
as each posthook would have to run the function to ensure the function was run
1:27 AM
in the login process, that's not "a problem"
1:28 AM
but if you had two functions posthooking takeDamage() (edited)
1:28 AM
and both call takeDamage()
1:28 AM
well, I'm sure you can figure that out :p
Avatar
Ahaaa 😛
1:29 AM
alright
Avatar
+ I have a working poc of hooking UE4 bp functions
1:30 AM
and I plan on making it use pre and post hooking
Avatar
Well if you can contribute an improvement to the API where we can make it better it's always appreciated!
Avatar
@Foppa
1:35 AM
POGYOU
1:35 AM
this works
1:35 AM
void callback(void* _this, int* myGuy, bool* otherGuy) { printf("got my data :), %d %d", *myGuy, *otherGuy); } void functionCalled(void* _this, void* param1, void* param2) { void* data[] = { _this, param1, param2 }; ((void(*)(void**))callback)(data); } int main() { int a = 20; bool b = true; functionCalled(nullptr, &a, &b); }
1:35 AM
basically, packing the args into void*[]
1:35 AM
and passing them into the function that unpacks implicitly
Avatar
((void(*)(void**))callback)(data); that line is kinda awful to read...
Avatar
users wouldn't see that
1:37 AM
that's behind the scenes
Avatar
yeah
1:37 AM
but still probably worth splitting that out 😛
Avatar
now the idea is to have the hook get the args from the stack
1:37 AM
and stuff them into void**
1:37 AM
and pass them to callback
Avatar
Make a PR! 🙂
Avatar
@Plazmaz
2:05 AM
void callback(void* _this, int myGuy, bool otherGuy) { printf("got my data :), %d %d", myGuy, otherGuy); } void functionCalled(void* data...) { ((void(*)(void**))callback)(&data); } int main() { functionCalled(nullptr, 20, true); }
2:05 AM
works 😉
Avatar
Awesome. The ((void(*)(void**))callback)(&data); bit seems really weird. I would just say you should probably either comment that or split that out into assigning the callback and calling it
Avatar
one side note, this doesn't know what function is who yet
2:07 AM
but we can read function addresses from pdb names
2:07 AM
so why not the reverse too
Avatar
Hmm what do you mean by that?
2:08 AM
this doesn't know what function is who yet
2:08 AM
basically it doesn't know the function name? Is that what you're getting at?
Avatar
yea
2:10 AM
that "hook" wouldn't know who was trying to call itself
2:10 AM
if that makes sense
2:10 AM
would need a way to filter them
Avatar
Lol if c++ had reflection you could just register hooks by name
2:53 AM
Or I guess when registering it you kinda already need to know the method right?
2:54 AM
So really I don't know why the callback would need to know the method, just use one callback per method hooked...
Avatar
the hook needs to know
2:56 AM
so it calls the correct callback
Avatar
ohhh ok
3:51 AM
yep
Avatar
A lamda wrapper function could suffice
3:56 AM
Basically many to one to many
Avatar
GormusSenex 3/13/2020 10:10 AM
@substitute sry for late reply - ur comment was when i was sleeping :) what i need is to get from FString to SQLWCHAR. do a .ToString() works if i wanted to get the std::string, but then i loose special characters, and thats what im trying to prevent when sending to sql server.
Avatar
good idea i think the main issue would be dynamically hooking arbitrary function @substitute
Avatar
Okay folks. I got a 24 bay SAS enclosure that I need to get rid of. Barely worth anything on eBay. Just pay shipping and it's yours. DM me if you want pics or details.
Avatar
@MindDragon
4:51 PM
I’d like pics/details
Avatar
will send in a bit
Avatar
Did i see somewhere that someone posted a fixed Vote Rewards plugin?
Avatar
@substitute
Avatar
What’s the asking price
9:00 PM
And what internals are included (like cpu,ram, etc)
Avatar
Thought he said it's free just pay postage
Avatar
it's just a sas box
9:18 PM
no cpu or whatever
9:18 PM
yeah pay for box and shipping
9:19 PM
probably like ~$100 idk
9:19 PM
ill pic the receipt even
9:19 PM
it's missing one drive carrier
9:19 PM
at the moment - somewhere around this house
9:19 PM
my kid ran off with it the nitwit
9:19 PM
ill try to find it
Avatar
Guys since the first update today
10:02 PM
My PvE Cluster has been having random crashes all day, I dont get a crash stack but just in Event Viewer I see it crashed and points towards permissions.dll
10:02 PM
10:03 PM
They always crash in pairs
10:03 PM
Is there any way I can extract some more detailed information as to what's happening? (edited)
Avatar
Hm. That's a hardcoded breakpoint.
Avatar
It started happening after I updated this morning
10:19 PM
After 306.89
10:19 PM
Nothing has changed Plugin / API Wise. I had one similar crash shortly after updating, which had the same error but pointed to shoprewards.dll
10:20 PM
I removed shop rewards and now its permissions
Avatar
@MindDragon you wouldn’t happen to be in Florida would you
Avatar
Texas
Avatar
Damn
Avatar
So. You want it?
Avatar
@substitute
11:16 PM
lol, made my own console command to open the shop, because holding E and pressing exchange is a lot of work KEKW
Avatar
@MindDragon unfortunately not currently
11:26 PM
😦
Avatar
GormusSenex 3/13/2020 11:39 PM
@dougy did u add more items to that one ? last time i was on genesis, only 1 page was available
Avatar
yeah the last update they added more items
Avatar
GormusSenex 3/13/2020 11:58 PM
u looked into if its possible to override those and even add more ?
11:58 PM
but likely not using plugins
11:58 PM
actually maybe, you'd have to use the base class and make ur own tradableoption
11:59 PM
and save it in genesistradableoptions in the daycyclemanager on the server
11:59 PM
but i have no idea if that replicates or anything
11:59 PM
u can override existing ones to be whatever class/cost/anything
Avatar
GormusSenex 3/13/2020 11:59 PM
would be cool to add it to other servers as well
Avatar
yea def
Avatar
hey guys. I'm an experience programmer for work, but this is quite different than what I'm used to doing. I'm not sure the references I need to open and compile an existing project. I am trying to open and compile the SafeZones API for ARK, but can't seem to properly add/correct the references for the ARKApi. I checked the tutorials below but am still having issues. Is there a place here to ask for help with something like that?
Avatar
GormusSenex 3/14/2020 12:11 AM
my guess is ur problem is with the sqlite3 from SafeZones ?
12:11 AM
maybe try and scroll up. another one were having issues as well only a few days ago
Avatar
Nah, a lot of the things i believe are part of the ARKApi. Got the red squigglies telling me it can't find all these references. I know (or think I know) its to do with the references, but I'm not finding how to add them.
12:12 AM
I'll scroll up and look
Avatar
GormusSenex 3/14/2020 12:12 AM
remember to have sqlite3.h and .c in ur folder
12:13 AM
u using visual studio ?
Avatar
GormusSenex 3/14/2020 12:13 AM
ye, remember also to set all the settings as described in the help papers
12:13 AM
like c++17 etc
Avatar
yeah did the c++17. I'm opening an existing project and all those seemed to be set already. I noticed the Additional Include Directories were defined for others' machines, so I tried to correct it to the right file path on my machine.
Avatar
GormusSenex 3/14/2020 12:14 AM
and u also need to download the actual ArkServerAPI and reference the correct folders
12:15 AM
cuz ur most likely gonna get that warning
12:16 AM
have u downloaded the actual API ?
Avatar
https://github.com/Michidu/ARK-Server-API/archive/master.zip From the first tutorial in the coding-tutorial channel
Avatar
GormusSenex 3/14/2020 12:16 AM
and not jsut the plugin ?
12:16 AM
ok
Avatar
have my c++ general additonal include directories pointing to the out_lib folder from that project
Avatar
GormusSenex 3/14/2020 12:17 AM
what errors r u getting ?
Avatar
@Michidu Yes, generating hooks for arbitrary functions could be tricky, however (at least in my builds) this void callback(void* _this, int myGuy, int otherGuy) { printf("got my data :), %d %d\n", myGuy, otherGuy); } void functionCalled(void* data...) { ((void(*)(void**))callback)(&data); } int main() { functionCalled(nullptr, 27, 58); } does properly send the args from the """hook""" to the callback.
Avatar
A lot of this, then stuff about not finding ArkApi and Permissions references from the #include (and other references throughout the project)
Avatar
of course, that does have any filter, but I imagine generated lambda would work
Avatar
GormusSenex 3/14/2020 12:21 AM
must have ur includes wrong then
12:21 AM
wait all that is standard headers isnt it ?
Avatar
the bulk of the errors it seems yeah
Avatar
GormusSenex 3/14/2020 12:22 AM
never came across that one
Avatar
Got it. I did a dumb with the reference paths
12:25 AM
I un-did my dumb and now I get some meaningful errors (function does not take 5 arguments, etc)
12:25 AM
Thank you for the assistance!
👍 1
Avatar
GormusSenex 3/14/2020 12:26 AM
always glad to be someones rubberduck 😂
12:28 AM
i'll go to the dollar store today 😛
🦆 1
Avatar
Guys, killing myself here xd
1:30 AM
Reconfigured all my API, Re-setup MYSQL
1:30 AM
Still getting these crashes, apart from now i get this
1:30 AM
19.97 KB
1:31 AM
can open it with notepad but i cant see anything of relevance..
Avatar
@substitute that would work, but another issue is actually setting the hook you would want one function to handle multiple hooks
Avatar
@Michidu
7:03 AM
that is why i say do something to filter by name
7:04 AM
many small wrappers -> main "hook" -> filtered list of callbacks
Avatar
you suggest to pre-define hooks? that would limit plugins
Avatar
did anyone play with giving admin rights temporarily? Command executing even through tab isn't working, player only gets star icon without real admin rights player->bIsAdmin() = true; player->bCheatPlayer() = true; player->ConsoleCommand(&res, &bluep, true); (edited)
Avatar
you don't need the player to be an admin to run a console command
10:35 AM
if you call it from a plugin
10:36 AM
i mean
Avatar
GormusSenex 3/14/2020 12:58 PM
@WETBATMAN Do u know how I can get from an FString to std::wstring ?
Avatar
std::wstring(*fstr)
Avatar
GormusSenex 3/14/2020 12:59 PM
omg is it that easy ?
Avatar
yes 🙂
Avatar
GormusSenex 3/14/2020 12:59 PM
testing...
Avatar
GormusSenex 3/14/2020 1:12 PM
apparently my compile error was at another method... i just love how c++ gives what and where errors 😂
Avatar
GormusSenex 3/14/2020 1:34 PM
it works @Michidu thx 👍
Avatar
GormusSenex 3/14/2020 3:05 PM
@Michidu do u have any experience with SQL Server from c++ ? I have this issue; in my one plugin my connection and sqlexec works fine, but in my 2nd plugin i have to open and close the connection after each command execute. difference between the 2 is in the first one, im using std::string to build the command string, but in the 2nd plugin im using FString to build the command string. I cant c why that should matter, since it all gets turned into a SQLWCHAR ?
Avatar
Why you have to close it?
Avatar
GormusSenex 3/14/2020 3:20 PM
I dont know. the SQLGetDiagRec doesnt return anything. I can execute the command once and then no more unless i close the connection and reopen it
3:20 PM
in my 1st plugin i dont have to. the connection stays open during the entire "session"
Avatar
Hm, i didnt use sql server, but seems the difference not only here
Avatar
Usually you wanna open a connection, execute the queries you want to, then close the connection again
Avatar
GormusSenex 3/14/2020 3:51 PM
im more into keeping a connection opened and not open-close every command
3:54 PM
it is strongly recommended that you close a connection so that it returns to the pool
Avatar
GormusSenex 3/14/2020 4:16 PM
well it might turn out that way anyway, since I cant keep the connection open for more than one execution anyway.
Avatar
GormusSenex 3/14/2020 5:11 PM
ok, @Buu ive read up on connection pooling. the odbc handles it neatly so i dont get too much wasted time reconnecting. ima remake my code to close after each execution is done. ty.
Avatar
Got my first API modification to compile and run on the server. 😄 Logging in now for some testing to see if it does what i want it to 😄
👍 1
🍀 1
Avatar
it works! I can configure safe-zones, then allow damage to be applied to specific structures white-listed for PvP. Next up, I add hooks for low-health storage structures to automatically unlock when below a certain % HP. Driving towards an API that will help smaller servers with 'friendlier' PvP enable PvP without requiring full base wipes to get all the loot
👍 1
Avatar
GormusSenex 3/14/2020 8:57 PM
sadly in my experience is that when ppl raid some1 they make sure theres nothing left for when the defender comes online 🙄
Avatar
On our server, when I raided I didn't want all of their loot. I wanted to break defenses, steal a few things and leave. If the storage boxes were unlocked when I raided, I'd have left a lot of their stuff alone. However, since everything is locked by default, or they've locked everything, the only option I had was to completely destroy all the containers. And with that, their walls and foundations went as well.
9:03 PM
So all the loot I didn't want simply despawned, even if I wanted to leave them their lesser gear to rebuild with.
Avatar
GormusSenex 3/14/2020 9:03 PM
im guessing its ur own server then ? cuz others might not be as good-hearted as u ngl
Avatar
It is our own cluster, yes.
9:05 PM
All pretty much friends
Avatar
GormusSenex 3/14/2020 9:28 PM
but a, say, vault would still be destructable ?
Avatar
yes. if you wanted to destroy it you still could
9:38 PM
getting halfway there breaks the lock
Avatar
@Michidu no
3:03 AM
A “wrapper” that forwards hook args and the function name to a function that calls callbacks by name and passes them the args
3:03 AM
The wrapper being generated via something like lambda
Avatar
but how you gonna call original functions?
Avatar
GormusSenex 3/15/2020 11:13 AM
how can I make so that \n doesnt turn into a new line when fiddling with the message ? if i tyoe normally in chat and use \n it outputs the \n. however, if i do it in a command, eg. '/somecmd dont to \n this' then the '\n ' moves to next line. I tried replacing \ with \\ but to no avail. (edited)
Avatar
@GormusSenex I'd imagine you'd need to actually replace \n with a literal newline char
Avatar
GormusSenex 3/15/2020 8:19 PM
FString has a replacecharwithescapechar, but that doesnt rly work as intended
8:20 PM
cuz when i change it back with replaceescapecharwithscar (or ssomething) it does the same
Avatar
So, I'm having trouble linking the AController* in this hook to the PlayerController doing causing the damage. Am I understanding this hook wrong, and is it possible? I want it so when a specific structure triggers "die", instead of dying, it will switch teams. bool Hook_APrimalStructure_Die(APrimalStructure* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { return APrimalStructure_Die_original(_this, KillingDamage, DamageEvent, Killer, DamageCauser); }
8:29 PM
This is just experiments and messing around for my own understanding
8:29 PM
I don't think I can use the AActor DamageCauser, because that could be a multitude of things (bullet, pick, player, grenade, etc) and wouldn't be able to link back to the killer's team ID
Avatar
if you hook die (which is called when the structure already has 0 HP) and you don't let the structure actually die you're going to have a structure left with 0 HP and potentially cause issues later on....
8:30 PM
IMO it's better to hook TakeDamage and leave some HP on the structure
Avatar
I'd think to also revert the HP of the structure to full
8:31 PM
a "capture point" if you will
8:31 PM
where the time to capture depends on the rate at which you can damage it
Avatar
Wetbatman could you look into my question in #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ ❤️
Avatar
ah you're making a capture game pretty much ? 😄
8:35 PM
then yeah i'd work
8:36 PM
you don't wanna return original though in that case
Avatar
nah. the hook would take the death event of a specific structure class, then get all structures in a determined range and convert them to the killer's team
8:41 PM
I'm having trouble linking the EventInstigator in that hook back to the player class and getting the TeamID of the killer
Avatar
int killerTeam = EventInstigator->TargetingTeamField(); (edited)
8:42 PM
here
Avatar
I want to create the API to have admin-built above-ground bases that can't be destroyed. They cannot be built either, except for whitelisted structures. So an admin can say "here is a shell. you can place crafting stations, vaults, turrets, doors, etc. But you can't place doorways, walls, or anything non-whitelisted."
8:43 PM
So in effect, someone could take a shell with no doors, put their own doors and turrets on, and it becomes an "above-ground cave" of sorts
8:43 PM
with specific entry and exit points to the base
8:43 PM
the caveat is that once you lose the base, the enemy takes the entire structure. vaults, crafting stations, turrets and all.
8:43 PM
AWESOME. I am sciencing with it now 😄
Avatar
btw
8:45 PM
there are cases where EventInstigator is null while DamageCause is not or vice versa
8:45 PM
might wanna cover both cases
Avatar
I'm sure I'll run into a lot of issues that I'll need to work out. Thanks for the heads up 🙂
Avatar
GormusSenex 3/15/2020 9:27 PM
any1 know if this leaks memory or something ? API::Timer::Get().RecurringExecute(...) after a while the server crashes. takes down all maps at once. this is the only thing implemented after that started happening (along side other code ofc, but this is the only "new"-ish code added, i havnt used be4)
Avatar
any crashlog ?
Avatar
GormusSenex 3/15/2020 9:29 PM
ye it shows the white screen dump which i ofc forgot to screenshot
Avatar
it gets copied to your clipboard
9:30 PM
btw
Avatar
GormusSenex 3/15/2020 9:30 PM
ohh, didnt know. thx
Avatar
also it gets saved into the Logs folder
Avatar
GormusSenex 3/15/2020 9:35 PM
under shootergame saved ? ye, thats almost emtpt. nothing readable in that file
Avatar
no .crashstack file ?
9:37 PM
API::Timer::Get().RecurringExecute(...) just executes the function over and over it'd be pretty hard to cause a memory leak with this 😄
Avatar
GormusSenex 3/15/2020 9:41 PM
damn im slow to say the least. the crashstack does gimme info. its jsut in wide chars. removing nulls made it readable 😂
9:41 PM
ye, it is as expected the code it runs that made it crash
Avatar
does it crash after it runs it once?
Avatar
GormusSenex 3/16/2020 12:02 AM
no. after some hrs
12:03 AM
it runs every 5 sec. and runs fine. but after a few hrs, it crashes all maps simulatanously
12:04 AM
any off to bed. gonna try and wrap all the code in same method it calls so i dont risk interference
Avatar
@Michidu then maybe the same as before with lambda function
12:35 AM
but instead doing this install lambda hook call callbacks (pre) by name (string literal in lambda) call original function inside this lambda (generated , maybe we can use a macro or a template) call callbacks (post) by name
Avatar
@substitute it's not that easy to call original. Since to achieve that, we would need ability to hook any ARK function from API. Even if universal hook would work, the only way i see is modify hooking library so it would write index of hooked function (and using this we can call original function)
Avatar
Did i see something mentioned here before about Vote Rewards causing crashes? I want to put it on my cluster but i remember seeing it caused crashes if /claim was used without having voted
Avatar
GormusSenex 3/16/2020 9:23 PM
any1 know how to write the 2 letters \n in a wstring or FString without it turning into a newline when doing a sendmessage ?
Avatar
Use another backslash
Avatar
GormusSenex 3/16/2020 9:57 PM
like \\n ? ye, tried that didnt work then it prints \ and a new line (edited)
Avatar
Somebody happen to have a blog post / article / video for IDA to point me in the right direction with how to use it for ark ? tiredoflife
Avatar
you have the x64 ver ?
Avatar
Both
8:11 PM
32 and 64
Avatar
any tips for decreasing server boot-up? I tried auto-reload for plugins but the dll ends up getting locked so I can't overwrite it, so I need to boot it up every time
10:56 PM
like can I force it to use the UE4 test map or something?
Avatar
you can always try unload/load plugins
12:03 AM
then you don't need to restart at all
Avatar
how do I do that?
Avatar
@Plazmaz We've readded plugin hot reloading
10:53 AM
look into the config.json and the recent commits i made on the repo those should give you a hint
Avatar
I was unable to do that because the DLL file for my plugin was locked by the process
Avatar
plugins.unload <pluginname>
9:45 PM
replace the dll
9:45 PM
plugins.load <pluginname>
Avatar
ooo is this new? I could definitely use this right about now. I'm having to manually stop, update and start my whole server to test code changes
Avatar
So, I'm not sure if I'm referencing this right. I'm using UKismetSystemLibrary::SphereOverlapActors_NEW(world, position, radius, &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &structures); to dump a list of structures in a sphere into a TArray<AActor> structures; I then loop through all these structures, cast them as a primal structure: auto teamswap = static_cast<APrimalStructure*>(structures[index]); then try to change their team: teamswap->ChangeActorTeam(killerTeam); It gets through all the functionality and makes all these calls, but the structure never flips its team the way I want
Avatar
Found it. Needed to make a BPChangedActorTeam(); call. nevermind
Avatar
How do I get access to post plugins to the forums?
Avatar
you need the plugin dev role
Avatar
I gathered that much already but how do I get the role assigned?
Avatar
GormusSenex 3/18/2020 11:38 PM
only michidu can assign it
Avatar
My base capture API is complete 😄
Avatar
Simonsays095 3/20/2020 1:33 AM
Just started working with the PI for the first time, and I have a question about the tutorial at the top of #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ about setting up the API. In step 3, it says to set up VS to include the "public" folder of the API, but this folder doesn't exist anymore. Which folder should I be including nowadays?
1:38 AM
Actually, with a bit more digging in the API directory, I found the version/Core/Public directory - is this the one I should include?
Avatar
yeah that should be the right one
Avatar
Simonsays095 3/20/2020 6:55 AM
Thank you, I just did it and it seems to work. How would I find which Hook to use to start/stop weather events like fog or rain? I'm brand new to modding, so I don't really know where to start but I figured this might be a good place to start (?). I followed the tutorials in the #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ channel, but it doesn't really explain a whole lot about the hooks, beyond how to hook into a function once you find the one you want. Does the API have all the hooks I'll ever need? Do I have to decompile the game to find the rest (I see a lot of people with IDA here - is that necessary)? Are there aspects/mechanics of the game that just don't have functions that I can hook into?
Avatar
@Simonsays095
7:04 AM
You will likely have to reverse engineer some stuff
7:04 AM
Many functions exist already in api but not all
7:04 AM
You do not need IDA, there are alternatives
Avatar
ghidra is a solid option that's FOSS
Avatar
Simonsays095 3/20/2020 7:32 AM
I saw that Ida has a free version that I installed, but I'm just getting machine language gibberish out. Can you recommend any tutorials (with any free software, really) for a decompiler noob?
Avatar
magnet:?xt=urn:btih:169DFE1E10161FFA82B786BF89F05AEA6BCD4510&tr=http%3A%2F%2Fbt2.t-ru.org%2Fann%3Fmagnet&dn=IDA%20Pro%207.0.170914%20WIN%5CMAC%20x64%20%2B%20Hex-Rays%20Decompilers%20(x86%2C%20x64%2C%20ARM%2C%20ARM64)%20%5B2017%2C%20ENG%5D
7:33 AM
😉
7:33 AM
posted by michidu before
Avatar
radare2 is also fantastic FOSS
7:56 AM
(and is not made by the NSA) (edited)
7:59 AM
FWIW it was a lot easier for me to use these tools after writing a few programs in x86 assembly (edited)
8:00 AM
That being said I think pretty much all functionality should be covered. The game provides debug mappings which are used to generate the hooks.
Avatar
Simonsays095 3/20/2020 3:57 PM
Yeah, I'm not sure what that link is for @WETBATMAN . Google won't even search for the whole thing... It looks like maybe a hacked version of IDA? I already have a free version of IDA, I just need a tutorial that I can use to decompile ark and get reasonable-looking results. I'm open to using other software like ghidra as well, if it's easier for newbies to get started with. Any suggestions?
Avatar
free version of IDA will not work
3:57 PM
paste that link into any browser if you have a torrent client
Avatar
GormusSenex 3/20/2020 3:57 PM
Any1 know how to change color of message without using <richcolor> markup ? Ie. the FChatMessage ?
Avatar
michidu's ArkAdverts has an example
Avatar
GormusSenex 3/20/2020 3:58 PM
ty. gonna look into that
4:01 PM
no. i meant change the color of the SendChatMessage-message.
Avatar
ah from players ?
Avatar
GormusSenex 3/20/2020 4:01 PM
yup
Avatar
only way is to add the RichColor
4:01 PM
as far as i know
Avatar
GormusSenex 3/20/2020 4:01 PM
damn. that also adds a blank space between name and message
Avatar
you could get creative and instead of returning the original func just send the message again
4:02 PM
but instead add the colors and stuff
Avatar
GormusSenex 3/20/2020 4:03 PM
im not following ? ima get back to u when i get back. wife's calling :/
Avatar
@Simonsays095 IDA is not required for doing basic things, you can find a list of all functions that are added to the API here
4:03 PM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
4:04 PM
however not all functions/variables are here so for finding ones that aren't in these header files you need IDA
Avatar
Simonsays095 3/20/2020 4:15 PM
I'll double-check there, but I didn't see any weather-related functions when I looked through the API. It is very possible I just missed it, though.
Avatar
it's also possible that what you're looking for isn't in the API yet hah
4:16 PM
in that case you need IDA
Avatar
Simonsays095 3/20/2020 4:28 PM
I just got IDA installed from that link, and I can't open as PE, is that a problem? I tried opening as EXE but it only loads 450 lines and stops.
Avatar
are you launching the x64 version ?
Avatar
Simonsays095 3/20/2020 4:29 PM
yeah, I'm pretty sure. Only one version came with the download. (edited)
Avatar
🤦‍♂️ 1
👍 1
Avatar
@Simonsays095 FWIW you can't really decompile ARK in the same way you can games written in languages like C# or Java. You're probably better off disassembling it and looking at that. There's some attempts at reconstructing code from the assembly, but it's pretty nasty code.
Avatar
Simonsays095 3/20/2020 4:51 PM
So what I'm gathering is that I should just use API functions and hope that the functions I want are added eventually. Especially since I'm new to modding, it's best to keep it simple. For those of you with a lot more modding experience, how often do you have to head over to decompiled/disassembled code because the API doesn't have what you need?
Avatar
I think weather events are specific to the map and built into the level blueprints
5:03 PM
for example the "ce stoprain", start/stop sandstorm, start/stop superheat, etc are all in the level blueprint of se
5:04 PM
so you won't really be able to use IDA to figure out how those work
5:04 PM
but most of the other stuff you can use ida
Avatar
Simonsays095 3/20/2020 5:05 PM
What are ce and se?
Avatar
SE is scorched earth (i was using for an example) and "ce start_rain" and "ce stop_rain" are admin commands you'd run to control the events on Scorched Earth
5:07 PM
I honestly forgot what CE stands for 😂
Avatar
Simonsays095 3/20/2020 5:09 PM
Just looked it up on the wiki, and found the ce section... It's weird that the island only has ways to start weather, and not to stop it.
Avatar
yeah they're built into the level blueprints in the editor, not the executable
5:10 PM
that''s why each map has their own
Avatar
Simonsays095 3/20/2020 5:10 PM
That's too bad... Thank you for your help, so I can stop endlessly looking for something that isnt there 😛 (edited)
Avatar
no prob
Avatar
chances are something calls it so you can find the function
Avatar
yeah you can find the CE function but the actual functions that do the work are defined in blueprints
5:11 PM
you can likely read them using the editor (devkit) and recreate what theyre doing in c++ (edited)
5:12 PM
but you'd prolly have to take into account each map when controlling weather for it
5:12 PM
and i think some times weather is controlled in MatineeActors
5:13 PM
if you iterate through those some of them might have names with "Weather" in them
5:13 PM
you can probably get the matineeactor and call Stop() on it
Avatar
Simonsays095 3/20/2020 5:13 PM
I also haven't had much luck in the devkit, as far as modding goes. I can find and extract info, but I haven't been able to see the mechanism or functions that are called in it.
Avatar
for example Time of day is done through a matinee actor
5:14 PM
std::wstring arg = cmd.substr(wcslen(L"settime ")); int idx = arg.find(L":"); if (idx != std::string::npos) { int hours = _wtoi(arg.substr(0, idx).c_str()); int minutes = _wtoi(arg.substr(idx + 1, arg.size() - 1).c_str()); float seconds = hours * 3600.0f + minutes * 60.0f; sdk::TAActorArray OutActors; GetGameplayStatics().GetAllActorsOfClass(GetWorld(), sdk::AMatineeActor::StaticClass(), &OutActors); for (auto&& Actor : OutActors) { auto Matinee = (sdk::AMatineeActor*)Actor; if (Matinee->bForceStartPos && Matinee->bIsGameplayRelevant && Matinee->bPlayOnLevelLoad && Matinee->bLooping && Matinee->bDedicatedServerUpdateInterpolations) { Matinee->SetPosition((seconds / 86400.0f) * Matinee->MatineeData->InterpLength, false, false, false); } } } and that''s how you'd set the time of day using c++
5:14 PM
but you'd have to adjust that code to work in ark server api
5:15 PM
assuming arg is something like "settime 12:00"
5:15 PM
if u print out all the matinee actors you mind find some weather related ones
5:18 PM
but theyll probably be different for each map
Avatar
GormusSenex 3/20/2020 5:19 PM
@WETBATMAN ok back. what u mean by "sending the msg again" ?
Avatar
get the data from the hook and call the ClientChat function except set the color, name, message etc...
🤔 1
Avatar
Can APIs be installed on XBox/PS4? Or PC only feature?
8:06 PM
May be a dumb question
Avatar
@Ras yes
8:50 PM
But no
8:51 PM
The dedicated servers that Wildcard has likely can since they should have pdbs
8:51 PM
But a server running on an Xbox or ps4 can’t (edited)
Avatar
Hmm alright. Just had someone ask for something I'm working on. They wanted to use it on xbox.
Avatar
For them it is not possible
8:52 PM
So while it could technically work , the only people who could use it (assuming there’s no problems) are Wildcard themselves
Avatar
it's theoretically possible (edited)
9:08 PM
but would require actual reverse engineering
9:08 PM
I bet they use a similar protocol though
9:08 PM
but likely don't have debug mappings
Avatar
maybe someone knows a good way to find out the item(structure) a player holds in hand/ has selected?
Avatar
what are you trying to do?
Avatar
Simonsays095 3/22/2020 6:03 AM
When hooking into functions, do I need to include __fastcall? The hook generator program doesn't include it, but I'm getting compile errors when trying to build because of it.
Avatar
I have never needed __fastcall
Avatar
Simonsays095 3/22/2020 6:05 AM
Do I have to use x64 instead of x86? Does that make a difference?
6:08 AM
I just refollowed the instructions in #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ, but I switched over to x64 first (in step 1) and it seems to work just fine now. That should probably be updated if anyone is maintaining that document, for future newbies like myself.
Avatar
Yes
6:23 AM
Ark is x64
6:23 AM
I understand that it should likely be updated, but I think the author made the assumption that the reader would know computer architecture basics 😉
6:23 AM
but yes, you must compile for x64
Avatar
Simonsays095 3/22/2020 6:43 AM
Slowly but surely getting closer to a somewhat-functional plugin here.... When trying to load my plugin onto my server, I get error code 1114. I believe the error is arising because of which files I put in the plugin folder, but I couldn't find which ones I need anywhere. Is it just the dll and pdb? I saw a couple plugins just include those and I'm just not sure how to get from building the plugin to getting it on the server.
Avatar
Are you building as Debug or as Release?
6:44 AM
1114 is load error
Avatar
Simonsays095 3/22/2020 6:44 AM
Release
6:45 AM
What could cause a load error after a successful build?
Avatar
Simonsays095 3/22/2020 7:09 AM
Odd, I narrowed it down to this line in Load(): Log::GetLog()->info("Your plugin has been loaded there, bud!"); Is it not possible to log things in the Load() function?
Avatar
it may not be init
7:14 AM
did you init your logger ?
7:14 AM
Log::Get().Init("PLUGIN NAME HERE");
7:14 AM
?
7:14 AM
@Simonsays095
Avatar
Simonsays095 3/22/2020 7:17 AM
No I did not... I'll put that in and see if it works.
7:19 AM
When should I use Get() versus GetLog()? Is there documentation on the logger anywhere?
7:22 AM
(BTW, that did fix the error - thank you very much!)
Avatar
I use GetLog() for logging
7:23 AM
Get() for init the log
Avatar
@Simonsays095
7:31 AM
GetLog should get a logger object
7:31 AM
while Get I believe gets the whole singleton
Avatar
Is there somewhere detailed instructions on how to set up multiple root servers in parallel and connect them to a server cloud.
Avatar
That is out of the scope of the api
3:53 PM
And I don’t believe so
3:53 PM
What you want to do has many solutions and are dependent on specifics
Avatar
So, I want my API to write a message to every tribe's log when an event happens. Anyone know what tribe class I would be using to make that happen?
9:15 PM
Or maybe an API i can reference for example? I can't think of any off the top of my head that write to the tribe logf
Avatar
how do I check if the player is alive or not
Avatar
if their character is not nullptr they're alive
Avatar
GormusSenex 3/23/2020 6:56 PM
I'm guessing this one gives u the selected remote item/bp u've clicked on: c++ UPrimalItem* item = playerController->GetInventoryUISelectedItemRemote(); But it crashes every time ? (edited)
6:57 PM
any other way to c what the player has selected in the remote inventory ?
Avatar
FItemNetID& LastEquipedItemNetIDField() { return *GetNativePointerField<FItemNetID*>(this, "AShooterPlayerController.LastEquipedItemNetID"); }
7:02 PM
maybe this ?
Avatar
GormusSenex 3/23/2020 7:03 PM
is that for me ?
Avatar
ye don't you need the equipped item ?
Avatar
GormusSenex 3/23/2020 7:04 PM
no 🙂 i need what the player has selected in eg. the fabrikator or storage box etc 🙂
Avatar
ah like before placement ?
Avatar
GormusSenex 3/23/2020 7:04 PM
not necessarily. just selected
Avatar
like remote inventory ?
Avatar
GormusSenex 3/23/2020 7:05 PM
like u just clicked on it
Avatar
like hold E ? 😄
Avatar
GormusSenex 3/23/2020 7:05 PM
ye. lets say i have 5 engrams in teh fabrikator. then i click on one of them. i need to know which one
Avatar
ah so you need to get remote inventory then
7:06 PM
bool Hook_APrimalStructureItemContainer_TryMultiUse(APrimalStructureItemContainer* _this, APlayerController* ForPC, int UseIndex)
Avatar
GormusSenex 3/23/2020 7:06 PM
not just the remote inventory. but also the selected item in the remote inventory
Avatar
this hook triggers when u hold E on an item
Avatar
GormusSenex 3/23/2020 7:06 PM
ohh kewl
Avatar
what you need probably will be in the MyInventoryComponentField of the PrimalStructure
Avatar
GormusSenex 3/23/2020 7:12 PM
ok thx will look into that
Avatar
can that be used to add options to the wheel?
Avatar
not visually
9:38 PM
from what i know the options are cooked into the PrimalStructure
Avatar
I'm feeling somewhat silly: I can't even find the arj/unreal install for plugin development... supposedly in/from the epic launcher? But only have versions of unreal itself from there. Feel I'm missing something obvious? where do I really get started please?
Avatar
@scornflake and replying to myself; cos that's fun. I had thought it in the Unreal part of Epic Launcher... I think instead its in the main library (installing ARK Editor now, with medium level hopes : )
Avatar
@scornflake this api has nothing to do with the devkit (edited)
Avatar
@substitute ... which API? That's part of the confuision. Docs mention "ARK Dev Kit" then all I see is "ARK Editor". Not particulrly clear for a new user just getting started.
Avatar
@substitute ah. wrong discord channel perhaps? (somehow)... (runs off to find appropriate)
Avatar
GormusSenex 3/24/2020 3:41 PM
@WETBATMAN Have u played with APrimalDinoCharacter->DoAttack(..) ? I can set my dino to attack, but it wont harvest anything. It will, however, kill anything that comes close, but i want it to harvest.
Avatar
API::Requests::Get().CreatePostRequest(url, std::bind(&GetResult, placeholders::_1, placeholders::_2), message, headers); void GetResult(bool success, string response) { cout << "success: " << success << endl; cout << "response: " << response << endl; cout << "responseLength: " << response.length() << endl; } This Post Request sometimes gives a success=1 and response={"message": "400: Bad Request", "code": 0} However when response contains information like this I want to retry the Post that was called from inside the AddToTribeLog Hook. It seems like the first time I do a Post Request after starting the server I get back this response so trying to find a workaround so events aren't missed. For instance if I start the server and kill myself the event will be missed. But if I immediately respawn and kill myself again the event is sent properly along with all other events I do. Any ideas?
Avatar
You shouldn’t be posting on each event
4:39 PM
I suggest creating a batching system and you send requests periodically with all events that happened
Avatar
Seems if I do a CreatePostRequest during the Load() it no longer misses the first event.
4:41 PM
batching means I have to store the data as well
Avatar
@substitute Do you suggest batching because you think there will be a negative impact on the server or the Endpoint?
Avatar
@GormusSenex yes i've used it but only in a hook, i don't call it
5:17 PM
void BPDoHarvestAttack(int harvestIndex) { NativeCall<void, int>(this, "APrimalDinoCharacter.BPDoHarvestAttack", harvestIndex); }
5:17 PM
maybe you need this
Avatar
GormusSenex 3/24/2020 5:18 PM
i tried doing ->BPDoHarvestAttack(0) and (1) but that didnt do anything at all
5:18 PM
maybe i need another number ?
Avatar
DoAttack is definitely called, so following this chain should lead you to the harvest function in IDA
Avatar
GormusSenex 3/24/2020 5:20 PM
ida...
5:20 PM
... 😉
Avatar
@Lethal both
Avatar
Question: were the Ida scripts used for generating structs/headers ever made public?
Avatar
When C4 is used to damage a structure : float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) Does the EventInstigator point to the user of the c4? I'm having an issue where I'm using the EventInstigator, eventually casting it as a player controller and using that team field to update the damaged structures to join the EventInstigator's team. This works fine with rockets, tek rifles, swords, but does not work for c4. It causes server crash. I haven't tried grenades just yet. (edited)
Avatar
c4 is a bit different
8:39 PM
it's a structure
8:40 PM
c4 is in DamageCauser since it's what i use to modify c4's damage
8:41 PM
also you should always check EventInstigator for being null
8:41 PM
in cases like c4 it will crash the server if it's null
Avatar
gotcha. so if EventInstigator is NULL, I probably have C4 and need to re-write the rest of my code to use the AActor class for the c4 structure
8:44 PM
and swtich based on whether EventInstigator is there. If it isn't, use the DamageCause logic
Avatar
if (DamageCauser) { FString descr; DamageCauser->GetHumanReadableName(&descr); FString StructureDescr; _this->GetHumanReadableName(&StructureDescr); const float C4Multiplier = config["WeaponDamageMultipliers"]["C4DamageMultiplier"]; if (descr.Contains(L"C4")) Damage = Damage * C4Multiplier; else if (!StructureDescr.Contains("C4") && descr.Contains(L"Turret"))return 0; } (edited)
8:46 PM
smth like this
Avatar
Hmmm... alright.
8:53 PM
Seems hacky to go by the name of "C4" in a search, but might be what I have to do...? Lets say I use the DamageCauser - is there a way to link this back to the player who is doing the damage?
8:53 PM
For like a notification on screen or server chat message?
Avatar
it's not a public plugin (my excuse) XD
Avatar
DamageCauser->OwnerField()
8:54 PM
try this btw
8:54 PM
DamageCauser->GetOwnerController()
8:54 PM
or this
Avatar
I'll give it a shot and report back. Thanks!
Avatar
GormusSenex 3/25/2020 10:09 PM
this is wierd. if i set the dino to attack via DoAttack(..) it does and it kills dinos, but doesnt destroy rocks. but if i jump on it while its in attack mode it will now destroy the rock and harvest. me, the actor, is doing nothing but getting on the tame. what can be different on the primaldinocharacter when im on and its attacking and when im off and its attacking ?
Avatar
Doesn't seem to be working @WETBATMAN . float damagecap = _this->GetHealth() - 1; FString desc; DamageCauser->GetHumanReadableName(&desc); if (!desc.Contains("C4")) { //This section works when i use rockets/tek rifle SafeZoneManager::Get().CaptureBaseFromController(_this, EventInstigator); } else { //When C4 is used, I believe I am arriving here, but it is crashing. AController* player = DamageCauser->GetOwnerController(); SafeZoneManager::Get().CaptureBaseFromController(_this, player) } That is the code snippet I am running. I get the human readable name of the DamageCauser, see if it contains "C4". If it doesn't I process using the EventInstigator Controller Class. If it does contain the word "C4", I then try to get the owner controller class of that DamageCauser and pass it into the same function. I am assuming the DamageCauser Controller would still be the Player Controller.. ? (edited)
Avatar
first of all
10:46 PM
you check if it DOESN’T
10:46 PM
contain c4
10:47 PM
also crashlogs say exactly which line your plugin crashes on btw
Avatar
Is it an issue to check if it doesn't contain C4? Logically, it makes just as much sense to me as checking if it does. I added an error log statement and a try/catch around it just now to see what is happening
Avatar
not rly, just pointed out this flaw
10:56 PM
anyway though you don't need a catch statement to see where it crashes
10:56 PM
check the .crashstack file in the Logs folder of the server
10:56 PM
under ShooterGame->Saved (edited)
Avatar
doesn't look like it has a crash log. i wonder if i somehow oops'd and made an infinite loop.
Avatar
Alright. It seems to not like looking up the controller or owner when calling DamageCauser->GetOwnerController() or DamageCauser->GetOwner() at all. Both of them result in a crash, and I'm not finding the crash-stacks. I'll just work-around for now and make it a "rule" that the last shot has to be a weapon, not c4
Avatar
Are you checking if DamageCauser is null?
Avatar
it's not null when it's c4 because my code works fine
1:16 PM
🤷‍♂️
1:17 PM
you might wanna cast the c4 into APrimalStructure and get the owner with some func from that class
1:17 PM
@Ras
1:17 PM
since c4 is a structure
Avatar
GormusSenex 3/26/2020 1:33 PM
How to I loop through nearby rocks etc ? I'm doing : c++ UKismetSystemLibrary::SphereOverlapActors_NEW( world, _this->RootComponentField()->RelativeLocationField(), static_cast<float>((1500)), &types, APrimalWorldSettings::GetPrivateStaticClass(), &actors_ignore, &new_actors); for (AActor* actor : new_actors) { if (actor && actor->IsA(APrimalWorldSettings::GetPrivateStaticClass())) { APrimalWorldSettings* worldSetting = static_cast<APrimalWorldSettings*>(actor); if (worldSetting) { FString fullName; worldSetting->GetFullName(&fullName, NULL); if (fullName.StartsWith(L"InstancedFoliageActor")) { // Do stuff with eg. rock, metal node etc here } } } }
1:35 PM
I dont know how to get the actual foliageactor (rock, metal node etc) into a class or something.
Avatar
So I noticed screen notifications dont show up when you're on a tame
5:07 PM
when using ArkApi::GetApiUtils().SendNotification();
5:08 PM
any fix for this?
Avatar
@Buu you may need to write your own
6:59 PM
could be something like it get the pawn for the PC and send notification
6:59 PM
and the pawn when rinding tame != the player
7:00 PM
template <typename T, typename... Args> void SendNotification(AShooterPlayerController* player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D* icon, const T* msg, Args&&... args) { if (player_controller) { FString text(FString::Format(msg, std::forward<Args>(args)...)); player_controller->ClientServerSOTFNotificationCustom(&text, color, display_scale, display_time, icon, nullptr); } }
7:00 PM
this is the code for it
7:01 PM
player_controller->ClientServerSOTFNotificationCustom is likely the function that is failed
7:01 PM
if you have IDA or some other disassembler, you can look at AShooterPlayerController.ClientServerSOTFNotificationCustom to see why
Avatar
Seems like too much of a hassle. It's not that big of a deal
Avatar
you can try
7:04 PM
AShooterPlayerController.ClientServerNotification
7:04 PM
so if you want to use a similar to the SendNotification() method you can do template <typename T, typename... Args> void SendNotification(AShooterPlayerController* player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D* icon, const T* msg, Args&&... args) { if (player_controller) { FString text(FString::Format(msg, std::forward<Args>(args)...)); player_controller->ClientServerNotification(&text, color, display_scale, display_time, icon, nullptr); } }
7:04 PM
or something similar, and just call your own SendNotification
7:04 PM
and see what happen
Avatar
I'll try that. If it works it works, if it doesnt it's fine aswell. Not too important
Avatar
GormusSenex 3/26/2020 10:17 PM
Ok, Im in deep water here. I managed to extract this using Ghidra: c++ /* public: void __cdecl APrimalDinoCharacter::BPDoAttack(int) __ptr64 */ void __thiscall BPDoAttack(APrimalDinoCharacter *this,int param_1) { UFunction *pUVar1; PrimalDinoCharacter_eventBPDoAttack_Parms Parms; Parms = param_1; pUVar1 = FindFunctionChecked((UObject *)this,SHOOTERGAME_BPDoAttack); (**(code **)(*(longlong *)this + 0x1d8))(this,pUVar1,&Parms); return; } This is, I hope, what will attack and cause damage to rock even with no rider. But... what next ? 😢
10:17 PM
@WETBATMAN
10:20 PM
this is at the very end of APrimalDinoCharacter->DoAttack(..)
Avatar
void __fastcall APrimalDinoCharacter::BPDoAttack(APrimalDinoCharacter *this, int AttackIndex) { UFunction *v2; // rax int v3; // [rsp+20h] [rbp-18h] APrimalDinoCharacter *v4; // [rsp+40h] [rbp+8h] v4 = this; v3 = AttackIndex; v2 = UObject::FindFunctionChecked((UObject *)&this->vfptr, SHOOTERGAME_BPDoAttack); ((void (__fastcall *)(APrimalDinoCharacter *, UFunction *, int *))v4->vfptr[9].ShouldInstance)(v4, v2, &v3); }
Avatar
GormusSenex 3/26/2020 10:35 PM
?
Avatar
from IDA
Avatar
GormusSenex 3/26/2020 10:37 PM
seems like IDA is a lot better at recognizing
10:38 PM
theres just no APrimalDinoCharacter::BPDoAttack(..)
10:39 PM
which is strange, cuz theres an BPDoHarvestAttack(int) that does nothing when called
Avatar
void __fastcall APrimalDinoCharacter::BPDoHarvestAttack(APrimalDinoCharacter *this, int harvestIndex) { UFunction *v2; // rax int v3; // [rsp+20h] [rbp-18h] APrimalDinoCharacter *v4; // [rsp+40h] [rbp+8h] v4 = this; v3 = harvestIndex; v2 = UObject::FindFunctionChecked((UObject *)&this->vfptr, SHOOTERGAME_BPDoHarvestAttack); ((void (__fastcall *)(APrimalDinoCharacter *, UFunction *, int *))v4->vfptr[9].ShouldInstance)(v4, v2, &v3); }
Avatar
GormusSenex 3/26/2020 10:42 PM
yup. almost the same. nomatter the harvestindex number, it does nothing
Avatar
might be a replication issue
10:53 PM
try to call this func then relog/restart the server and check if the dino has resources
Avatar
GormusSenex 3/26/2020 11:09 PM
ok will do
11:13 PM
relog did nothing. restarting...
11:15 PM
... nope. nothing in inventory on restart 😦
11:17 PM
i also hooked both the BPDoHarvest and the DoAttack. if im on the dino, it goes through DoAttack with (0, false, false), but if i call that without me on it, it swings and do the attack animation (and even kills dinos nearby) but doesnt harvest
11:17 PM
(and when im on it, it do harvest the rock)
11:17 PM
(otherwise not)
Avatar
Cryopods...anyone know what to hook to find out who used it and what dino came out of it?
2:20 AM
Wild Card shows who froze a dino but not who unfreezes a dino i'm going to fix that hopefully.
Avatar
UPrimalItem_RemoveCustomItemData is the answer
Avatar
I got the tribe log to show when you remove a dino from a cryopod.
Avatar
thats a nifty feature
Avatar
Anyone else have any issues compiling the API or a Plugin for ATLAS? (edited)
Avatar
I've cloned the API from github. Open the solution and select ARK build configuration and Rebuild (works great) Change the build configuration to ATLAS and Rebuild (throws a bunch of errors like 'FSpawnPointInfo': 'struct' type redefinition in \Core\Public\API\Atlas\Actor.h)
Avatar
apparently structure resistances and damage modifiers are all calculated AFTER this hook: float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser)
Avatar
It returns a float so the original function is calculating the actual damage taken after modifiers right?
2:22 PM
return APrimalStructure_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser);
Avatar
I'm trying to convert the Damage from that into an FString to confirm, but ahving issues
2:24 PM
but yeah, I think that is what it is doing. That "Damage" value is a float and i think that is base damage before modifiers are applied
Avatar
Sounds logical
2:28 PM
FString damageStr = FString(to_string(Damage));
Avatar
Yeah I got that. And it does exactly what I said, too. It calculates all resistances/modifiers AFTER the takedamage call. Which is kinda weird. You'd think it would calculate first, then do damage.
2:43 PM
This throws off my checks for "if current health - damage < 0". Need to find a way now to get the structure resistance types or modifiers or something.....
Avatar
float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { float damageTaken = APrimalStructure_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); //Your additional code/checks //Your additional code/checks //Your additional code/checks return damageTaken; } This will allow you to do additional processing after the damage calculation but before the value is returned. (edited)
Avatar
I changed my code to hook into the _Die function and interrupt that instead. Basically, when a certain "structure" dies, it converts to your team then auto-repairs
3:27 PM
it doesn't matter too much to me that the health goes negative for a bit, because the auto-repair will bring it back to full over time
3:32 PM
I think that code above would cause the damage to happen first, drive the health below zero, trigger "death", then the code I use afterwards that references the original structure might be null.. ?
Avatar
Possibly, I was just showing a way to use the value being returned in case you needed to do something with it in the hook.
Avatar
Yep, I appreciate it! 🙂
3:36 PM
I'll probably have to do something like that for other things, so its good information
Avatar
So i'm using <queue> that offers FIFO but I would like to be able to look further head than the next entry. I guess std::vector would be what I should use instead. I want to be able to pop off the stack certain entries when i'm doing the look ahead and not take a big performance hit.
Avatar
@Lethal you don’t need look ahead then
4:54 PM
Just check if it’s a value to ignore and pop when dumping the queue
4:54 PM
Or easier, don’t enque the data
4:55 PM
Unless I’m missing something
4:55 PM
If you want certain events to take a higher priority then you can use a priority queue
Avatar
So the events are added to the queue chronologically however they could be delivered to different endpoints. To maximize throughout of POST requests i'm combining entries by endpoint to take advantage of the 2000 character POST limit to reduce the number of POST requests to each endpoint. The look ahead lets me grab/combine common endpoint messages into a single message as long as they are under the 2000 character limit when combined. So currently with QUEUE I can technically "peek" one item forward if it matches pop that off the stack but if the next entry is for a different endpoint there is no way of skipping it so I have to stop iteration/combining send a message then continue for the new endpoint that was found. @substitute
Avatar
Just use separate queues at that point if you are concerned about performance
Avatar
I don't want to discard any entries basically.
Avatar
Yes
5:13 PM
Just do one queue per end point
5:13 PM
There’s no gain in having a master queue list if you need to iterate it over and over to combine messages
Avatar
Currently I have allocated 2 QUEUE one to handle an Admin endpoint and one to handle tribe endpoints.
Avatar
Yes you need n queues where n is the amount of end points
5:14 PM
You can do this and still use one mutex only btw
5:15 PM
(You just might have more contention)
Avatar
How do I dynamically add global queue per endpoint?
Avatar
Use an array
5:15 PM
An array of queues
5:15 PM
Where the index in the array is associated with the “type” of queue
Avatar
ok, thats what I thought but wasn't sure
5:16 PM
gotcha
Avatar
You can make an enumeration too for readability
5:16 PM
Then you can do
5:16 PM
Queues[admin].push(msg)
Avatar
vector<queue<DiscordMessage>> vDM; void DoSomething(){ vDM[Index].pop(); }
5:21 PM
seems like that should work
Avatar
Make sure you use a mutex
5:24 PM
So you don’t introduce ud behavior between your two threads
Avatar
Ended up using std::unordered_map<std::string, std::queue<std::string>> uM;
7:29 PM
First string is the Key/Endpoint and then the queue of messages second.
7:29 PM
seems to be working well so far in my testing
Avatar
Any known/common methods used to link tribes between maps instead of doing the settings on each server since the TribeID changes?
Avatar
Maybe something like the same person must be tribe owner on each server and steamid is used to tie them all together
Avatar
you could stub the create tribe method to block players from making a tribe from the UI
10:50 PM
and tell them to use a command
10:50 PM
and then make the command generate the tribe and sync it with a shared database
Avatar
why a command tho
11:03 PM
the UI button calls a function which creates a tribe
11:03 PM
could be hooked
Avatar
To prevent potential state issues
Avatar
Hi. What is the best mysql class/wrapper to use? (edited)
Avatar
I was also literally about to ask that question.
5:38 PM
I planned on referencing ARKShop source codes
Avatar
GormusSenex 3/28/2020 5:38 PM
@WETBATMAN If I wanna cast from AController to AShooterPlayerController, will this work? c++ reinterpret_cast<AShooterPlayerController*>(some_AController) the AController is from here, so it should be the right class: c++ void Hook_AShooterGameMode_Logout(AShooterGameMode* _this, AController* exiting) {...} (edited)
Avatar
@GormusSenex In my code, I was able to static_cast to AShooterPlayerController. I was hooked into the TakeDamage function and casting EventInstigator
Avatar
GormusSenex 3/28/2020 5:44 PM
vs gives me an error doing static_cast
Avatar
I'm going off memory, but I thing it was AShooterPlayerController* player = static_cast<AShooterPlayerController*>(EventInstigator); (edited)
5:45 PM
Please excuse typos, I'm on my phone
Avatar
GormusSenex 3/28/2020 5:45 PM
isnt eventinstigator a APlayerController ?
Avatar
It was AController
Avatar
GormusSenex 3/28/2020 5:46 PM
hmm...
Avatar
Or AController* actually
Avatar
GormusSenex 3/28/2020 5:47 PM
static_cast gives me an "Invalid type conversion" error
5:48 PM
If you dont figure it out, I will be messing around with my plugin today. Have some testers and players reporting bugs lol
5:48 PM
I'll see if I can get that hook and controller casting
👍 1
5:50 PM
I know having all the little asterisks made it work somehow
Avatar
void Hook_AShooterGameMode_Logout(AShooterGameMode* _this, AController* Exiting) { if (Exiting && Exiting->GetOwnerController()) { APlayerController* APC = Exiting->GetOwnerController(); AShooterPlayerController* PC = static_cast<AShooterPlayerController*>(APC);
5:52 PM
@GormusSenex
Avatar
GormusSenex 3/28/2020 5:53 PM
ohh, nice ! ty 🙂
5:55 PM
btw. when u have time, can u extract DoAttack from IDA for me. Cuz Ghidra only shows half of the variable names
5:55 PM
it should be jsut above the BPDoHarvestAttack u showed the other day
Avatar
👍 1
Avatar
Anyone run into an issue where one person can load a plugin and another person gets an "error 126" using the exact same downloads from the website?
Avatar
Simonsays095 3/29/2020 6:22 AM
I tried adding a console command with my plugin, and I see that I need to use ArkApi::GetCommands().AddConsoleCommand(...), and I see that the function I define for the command has to have 3 arguments (APlayerController*, FString*, and bool). Is there documentation to say what each of these 3 parameters do/mean? I assume the first is the player invoking the command and the second is the (rest of?) the command text as invoked, but idk what the 3rd is. Or should I just keep asking in here, or is it educated guesses for most of these things? I would like to be able to get answers through documentation so I don't have to keep bugging people here... I looked through the API code and it describes the API function calls, but not the structure of the underlying function.
Avatar
@Lethal
6:39 AM
they might be missing a dependency
6:39 AM
you may have built your library against something like a version of C++ that isn't installed on their pc.
6:40 AM
@Simonsays095 my AddConsoleCommand only has 2 args.
6:40 AM
6:41 AM
However, generally if you control+click the function, it will take you to the definition, and from there you can see how it works.
Avatar
I build with VS19
Avatar
Can you send me the plugin ?
6:41 AM
I have VS2019 so I can see if it works for me.
Avatar
Gives tribe owners the ability to have in-game tribe log events forwarded to a discord channel of their choosing. Also gives server admins the ability to log all tribe activity to a private admin discord channel. Chat Commands: /TLR
Avatar
(I actually have a bunch of visual studios laughpoint )
Avatar
I guess I could configure my VS17 to compile it as well and see if that fixes it for him.
Avatar
The project might be linking against a newer version
6:43 AM
anyway let me see if it load
6:44 AM
6:44 AM
I get an error
6:44 AM
something might be wrong on your compile or something
6:44 AM
the 126 should be a loadlibrary error or something
6:44 AM
Avatar
Does version 1.0 work for you?
Avatar
Let me check
Avatar
The other guy that can't load v1.1 couldn't load v1.0 either
Avatar
I think I know the issue
6:46 AM
btw 1.0 loaded
6:46 AM
6:47 AM
I am checking something now
Avatar
I got it to load
6:48 AM
6:48 AM
I know the issue
6:48 AM
the 126 is because they do not have permissions
6:48 AM
I added the plugin and then it loaded
Avatar
Permissions plugin? Because he did have it.
Avatar
I added permissions plugin and it loaded
6:49 AM
without I got 126
Avatar
He couldn't load v1.0 which didn't have Permissions as a dependency
Avatar
Maybe he didn't download right file
6:49 AM
but see, I just remove permission plugin
6:49 AM
6:49 AM
and I get 126 again
Avatar
He did I watched him via screen share
Avatar
Well some library file is missing for him
6:50 AM
if it isn't permissions, then it could be a system library file or something
6:50 AM
might need a debugger to catch the Exception
6:50 AM
or a custom build of the library (api) (edited)
Avatar
I had him basically delete the whole plugins folder and download both plugins fresh without touching the json files and Permissions loaded and mine did not.
Avatar
like i said before
6:50 AM
126 = some library file was missing
6:51 AM
that was required by this library
Avatar
So maybe VS19 runtime files might be needed
Avatar
so you will need to either put debugger on his server and see the exact issue
6:51 AM
or modify the api loader to print the full error other than the code
Avatar
gotcha
Avatar
but yes, he may need vs19
6:51 AM
since 1.0 didn't load
Avatar
Simonsays095 3/29/2020 6:56 AM
Just saw your message, @substitute Yeah, I ctrl+clicked to look at the function. The 2nd argument is a reference for a function that has 3 arguments... That's what I want to know more about. (edited)
Avatar
oh @Simonsays095
7:12 AM
that's your callback
7:12 AM
the function you wish to run when the player enter the command
Avatar
you are building for v142
7:14 AM
which is VS2019
Avatar
I'm going to compile the Permissions plugin in VS17 and VS19 and see if he can load both.
Avatar
it doesn't matter the IDE
7:14 AM
change the platform toolset
Avatar
VS17 compiled with v141 toolset
Avatar
Simonsays095 3/29/2020 7:15 AM
I know that it's the callback, that's mentioned in the ctrl+click menu. I want to know what the 3 arguments for the function correspond to.
7:15 AM
Types APlayerController*, FString*, and bool
Avatar
AShooterPlayerController*, FString*, EChatSendMode::Type is the actual args
7:16 AM
the first is the player that called the command (edited)
Avatar
Simonsays095 3/29/2020 7:16 AM
Avatar
the second I believe is the args, but it may also contain the command as well, you will need to parse this yourself.
7:16 AM
e.g. /help asdf -> PC, asdf, EChatSendMode
7:17 AM
EChatSendMode = the channel
Avatar
Simonsays095 3/29/2020 7:17 AM
I have the 3rd argument is a bool, we must have different versions?
Avatar
I'm reading from the source on GitHub right now
7:17 AM
7:17 AM
this file not edited since August 1 2019
Avatar
Simonsays095 3/29/2020 7:17 AM
V3.2?
Avatar
This is the latest source
7:17 AM
from GitHub
7:17 AM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
Avatar
Simonsays095 3/29/2020 7:18 AM
How do I have a different signature then? Hmm...
Avatar
unsure, but the third arg being a bool can just be discarded
7:19 AM
I don't use it
7:19 AM
void Commands::ReloadConfig(APlayerController* player_controller, FString*, bool) { Log::GetLog()->debug("Reloading Config"); NextConfig<ConfigBody>::Get().Load(); }
Avatar
Simonsays095 3/29/2020 7:19 AM
Oh you're looking at the source for AddChatCommand
Avatar
yes
Avatar
Simonsays095 3/29/2020 7:19 AM
I was looking at AddConsoleCommmand
Avatar
oh wait
Avatar
Simonsays095 3/29/2020 7:20 AM
and the 3rd there is a bool
Avatar
virtual void AddConsoleCommand(const FString& command, const std::function<void(APlayerController*, FString*, bool)>& callback) = 0;
Avatar
Simonsays095 3/29/2020 7:20 AM
That's it! I just want to know what that bool is, in case I ever need to use it in the future.
Avatar
the bool isn't used
7:20 AM
void ArkBaseApi::LoadPluginCmd(APlayerController* player_controller, FString* cmd, bool /*unused*/) { auto* shooter_controller = static_cast<AShooterPlayerController*>(player_controller); ArkApi::GetApiUtils().SendServerMessage(shooter_controller, FColorList::Green, *LoadPlugin(cmd)); }
Avatar
Simonsays095 3/29/2020 7:21 AM
Not in that implementation... But it's gotta be useful somewhere, right?
7:21 AM
Or it wouldn't be included
Avatar
it is for writing to log
7:22 AM
bool Commands::CheckConsoleCommands(APlayerController* a_player_controller, FString* cmd, bool write_to_log) { return CheckCommands<ConsoleCommand>(*cmd, console_commands_, a_player_controller, cmd, write_to_log); }
7:22 AM
so not really useful lolololole
7:22 AM
only useful if you want to determine to write to log conditionally
Avatar
Simonsays095 3/29/2020 7:23 AM
How did you get to these 2 code snippets?
Avatar
e.g. mine could be from void Commands::ReloadConfig(APlayerController* player_controller, FString*, bool) { Log::GetLog()->debug("Reloading Config"); NextConfig<ConfigBody>::Get().Load(); } to void Commands::ReloadConfig(APlayerController* player_controller, FString*, bool doLog) { if (doLog) Log::GetLog()->debug("Reloading Config"); NextConfig<ConfigBody>::Get().Load(); }
7:23 AM
I got them from the Github page.
7:23 AM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
Avatar
Simonsays095 3/29/2020 7:25 AM
Huh.. Got a bit of reading to do, I guess. Thanks much for your help, Substitute!
Avatar
np.
Avatar
@substitute I compiled my plugin in VS17 but it hangs on the timer implementation I have. If i comment out the two timer calls the plugins loads fine. But them not commented out when debugging it hits the first timer line and just never comes back. Just need to get verification that the VS19 Redistributable install fixes the issue then I will add that as a prerequisite for the plugin.
Avatar
Simonsays095 3/29/2020 7:53 AM
With this command ArkApi::GetCommands().AddConsoleCommand("Plugin.SetDamage", &SetDamage); any player that types Plugin.SetDamage into the console will call the SetDamage(...) function, right? I'm not getting anything happening when I try to use it in-game.
Avatar
Simonsays095 3/29/2020 8:09 AM
It should just log a message for now, I'll add functionality once I know it's being called: void SetDamage(APlayerController* player, FString* command, bool /*unused*/) { Log::GetLog()->info("Inside of function body"); } But nothing is showing up in logs. (edited)
Avatar
did you run the command
8:19 AM
console commands are commands done via player
8:19 AM
like cheat mycommand if i remember
Avatar
Simonsays095 3/29/2020 8:38 AM
Yeah, I tried running it in-game. Does it require the cheat prefix? Like should Plugin.SetDamage work, or will it need to be cheat Plugin.SetDamage? (edited)
Avatar
you need cheat
Avatar
@Lethal you need to tell him to install the latest vc++ redist
Avatar
@WETBATMAN Ya, he confirmed that fixed it this morning. I'm updating my plugin page to reflect this for others.
Avatar
Anyone familiar with how the "Day" calculation works? I'm doing this but the longer the server runs the further this number is off. UWorld* world = ArkApi::GetApiUtils().GetWorld(); string currentDay = to_string((int)(((world->TimeSecondsField() / 60) / 60) + 1));
5:24 PM
or maybe a built in routine that does this better than my math above.
5:25 PM
I thought ARK was on a 1/24th scale or something like that.
Avatar
Anyone could help me with why I am getting this? error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl ArkApi::Tools::GetCurrentDir(void)" (__imp_?GetCurrentDir@Tools@ArkApi@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) error LNK2001: unresolved external symbol "__declspec(dllimport) class std::vector<class std::shared_ptr<class spdlog::sinks::sink>,class std::allocator<class std::shared_ptr<class spdlog::sinks::sink> > > & __cdecl GetLogSinks(void)" (__imp_?GetLogSinks@@YAAEAV?$vector@V?$shared_ptr@Vsink@sinks@spdlog@@@std@@V?$allocator@V?$shared_ptr@Vsink@sinks@spdlog@@@std@@@2@@std@@XZ) fatal error LNK1120: 2 unresolved externals
Avatar
@Lethal
6:01 PM
Lag will cause that number to drift 😉
Avatar
So, i'm doing it correctly then?
Avatar
Dunno I haven’t checked
6:02 PM
I’m not at my pc
6:02 PM
But you could be
Avatar
Someone told me the server is on Day 1000 but discord logs say Day 5000+
Avatar
But the number will always drift backwards since server saves and such generally stall/lag the server for like a second or so
6:03 PM
Why don’t you just take the actual day field?
6:03 PM
I didn't see one
Avatar
There should be an actual field , the steam query shows the day (and does the server picker)
6:03 PM
So it’s 100% in there somewhere
Avatar
I'm searching for it atm
Avatar
I can look in like an hour or so
Avatar
Cool thanks.
6:06 PM
@Raptross That is a linking error I believe so you will need to verify you have everything that needs linked in the "Additional Library Directories"
Avatar
I might just make a git repo with a default project with linker setup (edited)
6:06 PM
Lol
Avatar
Starting template project would help people most likely.
Avatar
Which directory does it have to point to in the API ?
Avatar
int& DayNumberField() { return *GetNativePointerField<int*>(this, "AShooterGameState.DayNumber"); } float& DayTimeField() { return *GetNativePointerField<float*>(this, "AShooterGameState.DayTime"); }
6:10 PM
one of those might be it
6:11 PM
@Raptross try the "out_lib" folder
Avatar
Worked, thanx
Avatar
@WETBATMAN AShooterGameState.DayNumber was correct. I was focused on looking in UWorld thinking it was something in there or had to be calculated from there.
Avatar
anyone know what the s+ demo gun uses when it picks up a structure? I want to stop people from picking up specific structures. its not TakeDamage because I'm already hooked into that
Avatar
DECLARE_HOOK(APrimalStructure_BPOnStructurePickup, void, APrimalStructure*, APlayerController*, TSubclassOf<UPrimalItem>, UPrimalItem*, bool); void Hook_APrimalStructure_BPOnStructurePickup(APrimalStructure* _this, APlayerController* PlayerController, TSubclassOf<UPrimalItem> ItemType, UPrimalItem* NewlyPickedUpItem, bool bIsQuickPickup) { APrimalStructure_BPOnStructurePickup_original(_this, PlayerController, ItemType, NewlyPickedUpItem, bIsQuickPickup); } ArkApi::GetHooks().SetHook("APrimalStructure.BPOnStructurePickup", &Hook_APrimalStructure_BPOnStructurePickup, &APrimalStructure_BPOnStructurePickup_original); ArkApi::GetHooks().DisableHook("APrimalStructure.BPOnStructurePickup", &Hook_APrimalStructure_BPOnStructurePickup); probably
Avatar
im hooked into a similar demolish function, but still am able to demolish the structures
8:16 PM
using the demo gun. regular hold E demolish prevents demolishing properly
Avatar
you can take a look at s+ source code
8:17 PM
it's open source
Avatar
oh. right i forgot he did that lol
Avatar
@WETBATMAN that won't matter if it's a custom action
8:18 PM
if it's a custom action you will need to hook the blueprint event, which isn't trivial
Avatar
yes that's what i'm thinking
Avatar
It is possible to hook bp functions
8:18 PM
but it isn't trivial
Avatar
yes but maybe hook the demo gun equip or fire ?
Avatar
i may just disable the demo gun all together
Avatar
Simonsays095 3/29/2020 10:20 PM
Is it possible to reload plugins on the fly? Or do I have to start/stop my test server every time I try to debug something else?
Avatar
if you're not loading timers it's ok
10:21 PM
plugins.unload YourPluginName
10:21 PM
plugins.load YourPluginName
Avatar
Simonsays095 3/29/2020 10:22 PM
Oh nice, that's going to save a lot of time 😛
Avatar
doesnt work for me. always says its not loaded :/
Avatar
Try it on another plugin
Avatar
Simonsays095 3/29/2020 11:58 PM
What function is called when the player takes damage? I've overloaded AActor::TakeDamage but it doesn't seem to be the one. For that matter, what class is the player?
Avatar
GormusSenex 3/29/2020 11:59 PM
c++ float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) {}
Avatar
Simonsays095 3/30/2020 12:00 AM
I tried that one before AActor, but it didn't seem to work either. Also, isn't APrimalCharacter a subclass of AActor? In which case, overloading AActor::TakeDamage would also overload APrimalCharacter::TakeDamage?
Avatar
GormusSenex 3/30/2020 12:01 AM
c++ if (_this->IsA(AShooterCharacter::GetPrivateStaticClass())) {...}
12:01 AM
it works.
12:02 AM
_this is the player if above condition is true
12:02 AM
EventInstigator is the one doing the damage iirc
Avatar
Simonsays095 3/30/2020 12:03 AM
Not DamageCauser?
Avatar
GormusSenex 3/30/2020 12:03 AM
DamageCause could be a turret, a gun or something iirc (edited)
12:03 AM
not sure there tho. i know it can be a turret
12:04 AM
but it might also be the dino ridden by eventinstigator
Avatar
Simonsays095 3/30/2020 12:04 AM
Eventinstigator is the person/dino doing the damage, and DamageCauser is the gun/item/type of attack (?) that the damage is coming from?
Avatar
GormusSenex 3/30/2020 12:05 AM
not sure about gun etc., but if a turret, then yes
Avatar
Simonsays095 3/30/2020 12:19 AM
Just tried this: DECLARE_HOOK(APrimalCharacter_TakeDamage, float, APrimalCharacter*, float, FDamageEvent*, AController*, AActor*); float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass())) { //Player taking damage Log::GetLog()->info("Player is taking " + std::to_string(Damage * plugin.dmg_mult) + " points of damage"); } else { ... } And got hit by a dino, with no log about it. (edited)
12:23 AM
I log when other types of dinos take damage (in the else statement), and those are coming through correctly. (edited)
Avatar
do you activate the hook ?
Avatar
Simonsays095 3/30/2020 12:24 AM
Yep, I'm getting the other dino's working properly as well. Just the log about the player taking damage isn't coming up.
Avatar
if (EventInstigator->TargetingTeamField() > 10000) { if (_this->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) { if (_this->TargetingTeamField() > 10000) Damage = Damage * TamedToTamed; else if (_this->TargetingTeamField() < 10000) Damage = Damage * TamedToWild; } else if (_this->IsA(AShooterCharacter::GetPrivateStaticClass())) Damage = Damage * TamedToPlayer; }
12:25 AM
that's pretty weird it works for me
Avatar
GormusSenex 3/30/2020 12:27 AM
have u added the hook at all ?
Avatar
Simonsays095 3/30/2020 12:27 AM
If you set TamedToPlayer=0, you take no damage?
12:27 AM
@GormusSenex Yes. This works for all dinos, just not players as I just told wetbatman.
Avatar
GormusSenex 3/30/2020 12:28 AM
sry yes, didnt read that 🙄 😂
Avatar
TamedToPlayer = 0 means tamed dinos defined in config would do no damage to players
Avatar
Simonsays095 3/30/2020 12:32 AM
Well, I don't see what I'm doing wrong... Here are the full relevant bits of my code: DECLARE_HOOK(APrimalCharacter_TakeDamage, float, APrimalCharacter*, float, FDamageEvent*, AController*, AActor*); float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->IsA(AShooterCharacter::GetPrivateStaticClass())) { //Player taking damage Log::GetLog()->info("Player is taking " + std::to_string(Damage * plugin.dmg_mult) + " points of damage"); } else { FString dinoName; _this->GetDescriptiveName(&dinoName); Log::GetLog()->info("A " + dinoName.ToString() + " is taking " + std::to_string(Damage * plugin.dmg_mult) + " points of damage"); } return APrimalCharacter_TakeDamage_original(_this, Damage * config.dmg_mult, DamageEvent, EventInstigator, DamageCauser); } void Load() { Log::Get().Init("ARK-test-plugin"); ReadConfig(); ArkApi::GetHooks().SetHook("APrimalDinoCharacter.TakeDamage", &Hook_APrimalCharacter_TakeDamage, &APrimalCharacter_TakeDamage_original); } void Unload() { ArkApi::GetHooks().DisableHook("APrimalDinoCharacter.TakeDamage", &Hook_APrimalCharacter_TakeDamage); } BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: Unload(); break; } return TRUE; } Anything wrong here?
Avatar
yes
12:32 AM
you activate the wrong hook
Avatar
GormusSenex 3/30/2020 12:33 AM
ur hooking APrimalDinoCharacter and not APrimalCharacter
Avatar
Simonsays095 3/30/2020 12:33 AM
😉 I see what happened here.
Avatar
this did not crash ? 😄
Avatar
Simonsays095 3/30/2020 12:34 AM
Yeah, I'm surprised as well! I think the hot-reloading made it more lenient... Not entirely sure, though
Avatar
sometimes when you reload the plugin certain hooks won't get activated
12:35 AM
common one i've seen is AShooterGameMode.HandleNewPlayer_Implementation
Avatar
Simonsays095 3/30/2020 12:35 AM
Ah nice, that works. Typos/copy-paste errors ftw!
👍 1
🦆 1
Avatar
Apparently my plugin doesn't play well with Unicode messages and not really sure where to begin to fix it. Anyone else had to fix something like this?
Avatar
you need to utf8 encode the message before pushing it to the webhook
2:20 PM
api has a function for this
Avatar
FString(ArkApi::Tools::Utf8Decode(message).c_str()) looks like it
Avatar
Started my server and client using Korean...this is interesting
Avatar
@WETBATMAN Thanks I believe I have it working now. I'm working on getting someone that reported the issue to test it before I push my new changes at the end of the week.
Avatar
void PostToDiscord(FString MSG) { nlohmann::json Webhook; Webhook["username"] = ArkApi::Tools::Utf8Encode(*ServerName); Webhook["content"] = ArkApi::Tools::Utf8Encode(*MSG); AShooterGameState* ShooterGameState = static_cast<AShooterGameState*>(ArkApi::GetApiUtils().GetShooterGameMode()->GameStateField()); ShooterGameState->HTTPPostRequest(WebhookURL.c_str(), FString(ArkApi::Tools::Utf8Decode(Webhook.dump()))); }
3:52 PM
this works fine for me
Avatar
void sendDiscordMessage(string message, string webHookURL) { nlohmann::json j; try { j["content"] = message; const string jsonMessage = j.dump(); static_cast<AShooterGameState*>(ArkApi::GetApiUtils().GetWorld()->GameStateField())->HTTPPostRequest(FString(webHookURL), FString(ArkApi::Tools::Utf8Decode(jsonMessage).c_str())); } catch (exception ex) { Log::GetLog()->error(ex.what()); } } Mine is very similar (edited)
Avatar
Is it a bad idea to use using namespace std; btw?
Avatar
I removed it and prefixed stuff with the namespace again. Apparently it is a poor coding standard since it imports a ton of stuff.
Avatar
GormusSenex 3/30/2020 4:35 PM
is that all thats needed to post to discord ??
😮 1
Avatar
yes
Avatar
Discord webhooks are very simple to use.
Avatar
GormusSenex 3/30/2020 4:36 PM
i havnt looked into that but this seems too easy 😄
4:37 PM
ig the webhook u get from the discord channel ?
Avatar
GormusSenex 3/31/2020 12:02 AM
@Ras How did u call BPChangedActorTeam ?
Avatar
I think I need that discord thingy.
1:03 AM
I'll paste my code in here in a bit @GormusSenex
Avatar
if (structures[index]->IsA(APrimalStructure::GetPrivateStaticClass())) { structuretoflip = static_cast<APrimalStructure*>(structures[index]); int killerTeam = Killer->TargetingTeamField(); structuretoflip->ChangeActorTeam(killerTeam); structuretoflip->BPChangedActorTeam(); }
1:18 AM
I needd to use the ChangeActorTeam(tribeId) then call the BPChangedActorTeam to see it update on my client screen
1:22 AM
Is there a quick tutorial/how-to on setting up the discord webhook and sample code?
Avatar
How bad is the server crash when the server just closes but doesn't create a crash log?
Avatar
GormusSenex 3/31/2020 9:12 AM
@Ras thx. but how u get BPChangedActorTeam? I only have bUseBPChangedActorTeam which returns a bool. what class is structuretoflip (im guessing APrimalStructure - but my APrimalStructure dont have that call aswell) ? (edited)
Avatar
GormusSenex 3/31/2020 9:21 AM
nvm. seemed like i had an old version of AActor
9:25 AM
No, not the case. I have the call in my AActor-file but cant call it ?
Avatar
GormusSenex 3/31/2020 9:50 AM
why can I call the first one but not the last one ? This is from AActor.h: c++ void BPAttachedRootComponent() { NativeCall<void>(this, "AActor.BPAttachedRootComponent"); } void BPChangedActorTeam() { NativeCall<void>(this, "AActor.BPChangedActorTeam"); }
Avatar
GormusSenex 3/31/2020 10:03 AM
again. nvm. it WAS some old code that didnt allow me 🙄
Avatar
got it figurd out?
2:25 PM
also, amazed how easy the discord web hook was. like damn.
Avatar
GormusSenex 3/31/2020 2:30 PM
ye, was me. had an old version of the api.
Avatar
alright awesome
Avatar
GormusSenex 3/31/2020 2:44 PM
any1 know how I can "trick" the system into thinking a dino is being ridden ?
Avatar
what are you trying to accomplish?
Avatar
GormusSenex 3/31/2020 2:47 PM
to do a APrimalDinoCharacter->DoAttack(...), but so that it harvest
2:47 PM
it will harvest if im sitting on it. otherwise it just swings
Avatar
oh gotcha. hmmmm
2:49 PM
I see above you've already tried: APrimalDinoCharacter dino; dino.bUseBPDoHarvestAttack();
2:50 PM
and that is hte function that works when ridden
Avatar
GormusSenex 3/31/2020 2:50 PM
yup and BPDoHarvestAttack too
2:50 PM
but it wont attack with just doing that
2:50 PM
then it does nothing
Avatar
Hi. Which is the best data type to keep date times in DB? And what is the best methods to get the current datetime and etc for it. Thanx (edited)
Avatar
GormusSenex 3/31/2020 4:27 PM
I use string. and then this to get time: c++ std::string GetSystemDatetimeNow(long addedSeconds) { char buffer[32]; time_t now = time(0) + addedSeconds; tm ltm; localtime_s(&ltm, &now); std::strftime(buffer, 32, "%Y-%m-%d %H:%M:%S", &ltm); std::string bufferStr(buffer); return bufferStr.substr(0, 19); }
4:27 PM
not sure if its "the best" but thats what i use 😄
4:28 PM
but its string comparable cuz its yyyy-mm-dd hh:mm:ss (edited)
Avatar
@Raptross depends which database you're using
Avatar
@Buu MySQL
Avatar
then it depends if you want to store only date or also the time
Avatar
Both Date and Time
Avatar
then use the DATETIME type
Avatar
why not use a unix timespamp ? (edited)
Avatar
there's no advantage other than it takes a little bit less byte's but having more restrictions
Avatar
That's the current way I have on my plugin. Using the timestamps. Also, whats better to use std::chrono::system_clock::now() / std::time(0) ?
4:50 PM
I mean the classes for time usages.
  • std::chrono
  • std::time
Avatar
anyone ever messed with the USoundBase* class? I see some notifications in the API allow us to send a sound, optionally. If I included a sound file in my API folder, then prompted the server to use that sound file, would players hear it? Or would it need to be on their local machine as well?
6:00 PM
specifically speaking, this function call: void Hook_AShooterGameMode_SendServerNotification(AShooterGameMode* _this, FString* MessageText, FLinearColor MessageColor, float DisplayScale, float DisplayTime, UTexture2D* MessageIcon, USoundBase* SoundToPlay, int ReceiverTeamId, int ReceiverPlayerID, bool bDoBillboard)
6:03 PM
ArkApi::GetApiUtils().GetShooterGameMode()->SendServerNotification();
Avatar
GormusSenex 3/31/2020 7:05 PM
@Michidu I can see this in Ghidra but I cant access it : c++ UPrimalHarvestingComponent::GiveHarvestResource( UPrimalHarvestingComponent *this, UPrimalInventoryComponent *param_1, float param_2, TSubclassOf<class_UDamageType> param_3, AActor *param_4, TArray<struct_FHarvestResourceEntry, class_FDefaultAllocator> *param_5) Am I accessing it wrong or should it be in the api ?
7:05 PM
Actually, I cant access anything in UPrimalHarvestingComponent
Avatar
i think its not in the api
Avatar
GormusSenex 3/31/2020 7:23 PM
ahh makes sense then
7:23 PM
thought i did something wrong here
7:27 PM
is there any way i can access it even tho its not in the api ? like some special c++ call ?
Avatar
you can always add it
7:29 PM
😄
Avatar
GormusSenex 3/31/2020 7:29 PM
i dont think i got the skills for that 😂 otherwise i would love to tho 😄
Avatar
what do you need from it ?
Avatar
GormusSenex 3/31/2020 7:31 PM
i think only that and the GetPrivateStaticClass()
Avatar
then you can define this class with this function in it
7:32 PM
struct FOnlineSubsystemSteam { FString& BanListURLField() { return *GetNativePointerField<FString*>(this, "FOnlineSubsystemSteam.BanListURL"); } };
7:32 PM
example
Avatar
GormusSenex 3/31/2020 7:32 PM
where do i put it ?
Avatar
you can do it in the API files
Avatar
GormusSenex 3/31/2020 7:33 PM
ohh. like the AActor.h ?
Avatar
yeah
Avatar
dont forget to add it to pdb config
Avatar
GormusSenex 3/31/2020 7:44 PM
like this ? c++ struct UPrimalHarvestingComponent : UActorComponent { void GiveHarvestResource(UPrimalInventoryComponent* param_1, float param_2, TSubclassOf<UDamageType> param_3, AActor* param_4, TArray<FHarvestResourceEntry, FDefaultAllocator>* param_5) { NativeCall<void, UPrimalInventoryComponent*, float, TSubclassOf<UDamageType>, AActor*, TArray<FHarvestResourceEntry, FDefaultAllocator>*>(this, "UPrimalHarvestingComponent.GiveHarvestResource", param_1, param_2, param_3, param_4, param_5); } };
Avatar
in your case it's a class not a struct
Avatar
GormusSenex 3/31/2020 7:46 PM
so just "class" instead of "struct" ?
Avatar
this class doesn't exist at all in the API ?
Avatar
GormusSenex 3/31/2020 7:46 PM
i dont think so. but then again... im not pro at this 😉
7:51 PM
@Michidu its alrdy in the Base.h file: c++ struct UPrimalHarvestingComponent; Is there anything else i need to add ?
7:52 PM
its under an Atlas tag tho, but does that matter ?
Avatar
its just declaration
7:52 PM
You need to define struct
7:53 PM
Actually you already did it
Avatar
GormusSenex 3/31/2020 8:03 PM
well it compiles and the game starts. lets c what happends when i call it 😂
8:05 PM
hard crash 😄
8:05 PM
wait. forgot to copy version
8:10 PM
Ok, crash again. I also added GetPrivateStaticClass like this: c++ struct UPrimalHarvestingComponent : UActorComponent { // Functions static UClass* GetPrivateStaticClass(const wchar_t* Package) { return NativeCall<UClass*, const wchar_t*>(nullptr, "UPrimalHarvestingComponent.GetPrivateStaticClass", Package); } void GiveHarvestResource(UPrimalInventoryComponent* param_1, float param_2, TSubclassOf<UDamageType> param_3, AActor* param_4, TArray<FHarvestResourceEntry, FDefaultAllocator>* param_5) { NativeCall<void, UPrimalInventoryComponent*, float, TSubclassOf<UDamageType>, AActor*, TArray<FHarvestResourceEntry, FDefaultAllocator>*>(this, "UPrimalHarvestingComponent.GiveHarvestResource", param_1, param_2, param_3, param_4, param_5); } }; Is that not the right way to do it ? (edited)
Avatar
Added to config?
Avatar
GormusSenex 3/31/2020 8:10 PM
ohh which config ?
Avatar
Api config
Avatar
GormusSenex 3/31/2020 8:16 PM
is now 🙂 ok, gonna try again 🤞
Avatar
GormusSenex 3/31/2020 8:26 PM
fails on my GetPrivateStaticClass
8:30 PM
ok, found out why. this function needs a wchar_t
Avatar
GormusSenex 3/31/2020 8:48 PM
I might not know how to use this : c++ const wchar_t* Package = L"x"; if (actor->IsA(UPrimalHarvestingComponent::GetPrivateStaticClass(Package))) { ... } what to put in Package ?
Avatar
nullptr
Avatar
GormusSenex 3/31/2020 9:02 PM
skipped the chekc and just went straight to casting it. it didnt break, but it also didnt harvest anything. trying to look in Ghidra what these parameters actually need since i've nullptr most of it
Avatar
GormusSenex 3/31/2020 10:52 PM
Ok, next iceberg... I have this: c++ TSubclassOf<UDamageType> dinoDamage; float outputMultiplier = 5.0f; dino->BlueprintOverrideHarvestDamageType(&dinoDamage, &outputMultiplier); TArray<FHarvestResourceEntry, FDefaultAllocator>* param_5; harvestComponent->GiveHarvestResource(dino->MyInventoryComponentField(), 5.0f, dinoDamage, dino, param_5); I need to define param_5 / fill it with something, otherwise call to GiveHarvestResource(...) goes straight to return according to this (from Ghidra): c++ if ((((param_5 != (TArray<struct_FHarvestResourceEntry,class_FDefaultAllocator> *)0x0) && (cVar5 = (**(code **)(*(longlong *)param_5 + 0x830))(param_5), cVar5 != '\0')) && (50000 < *(int *)(param_5 + 0x214))) && (bVar6 = DisableHarvesting((APrimalDinoCharacter *)param_5), bVar6 != false)) goto LAB_140695f6a; (the LAB_140695f6a is the end of code) HELP 😦
10:54 PM
everything compiles and "works" (ie. doesnt crash when called). but becuz param_5 is empty, it does nothing.
Avatar
GormusSenex 3/31/2020 11:06 PM
Damn it, in Atlas theres this: c++ struct UPrimalHarvestingComponent : UActorComponent { static UClass* GetPrivateStaticClass(const wchar_t* Package) { return NativeCall<UClass*, const wchar_t*>(nullptr, "UPrimalHarvestingComponent.GetPrivateStaticClass", Package); } static void StaticRegisterNativesUPrimalHarvestingComponent() { NativeCall<void>(nullptr, "UPrimalHarvestingComponent.StaticRegisterNativesUPrimalHarvestingComponent"); } bool TemplateCheckForHarvestRepopulation(bool bForceReinit, UWorld* world, FVector* where) { NativeCall<bool, UWorld*, FVector*>(this, "UPrimalHarvestingComponent.TemplateCheckForHarvestRepopulation", world, where); } TArray < FHarvestResourceEntry, FDefaultAllocator>& HarvestResourceEntries() { return *GetNativePointerField< TArray<FHarvestResourceEntry, FDefaultAllocator>*>(this, "UPrimalHarvestingComponent.HarvestResourceEntries"); } TArray < FHarvestResourceEntry, FDefaultAllocator>& BaseHarvestResourceEntries() { return *GetNativePointerField< TArray<FHarvestResourceEntry, FDefaultAllocator>*>(this, "UPrimalHarvestingComponent.BaseHarvestResourceEntries"); } [...] which is just what I need (HarvestResourceEntries). but its not in Ark and Ghidra can't find it either 😦
Avatar
APrimalDinoCharacter* Hook_APrimalDinoCharacter_StaticCreateBabyDino(APrimalDinoCharacter* _this, UWorld* theWorld, TSubclassOf<APrimalDinoCharacter> EggDinoClassToSpawn, FVector* theGroundLoc, float actorRotationYaw, char* EggColorSetIndices, char* EggNumberOfLevelUpPointsApplied, float EggTamedIneffectivenessModifier, int NotifyTeamOverride, TArray<FDinoAncestorsEntry>* EggDinoAncestors, TArray<FDinoAncestorsEntry>* EggDinoAncestorsMale, int EggRandomMutationsFemale, int EggRandomMutationsMale) { APrimalDinoCharacter* newBaby = APrimalDinoCharacter_StaticCreateBabyDino_original(_this, theWorld, EggDinoClassToSpawn, theGroundLoc, actorRotationYaw, EggColorSetIndices, EggNumberOfLevelUpPointsApplied, EggTamedIneffectivenessModifier, NotifyTeamOverride, EggDinoAncestors, EggDinoAncestorsMale, EggRandomMutationsFemale, EggRandomMutationsMale); //DO STUFF HERE return newBaby; } This errored out on the line that assigns to "newBaby". What am I doing wrong there? (edited)
2:04 AM
Basically letting the original function finish while I temporarily store the result to change values before returning the created baby.
Avatar
Exception thrown at 0x00007FF7F3814FD9 in ShooterGameServer.exe: 0xC0000005: Access violation reading location 0x000000008F5FC750. occurred
3:04 AM
return APrimalDinoCharacter_StaticCreateBabyDino_original(_this, theWorld, EggDinoClassToSpawn, theGroundLoc, actorRotationYaw, EggColorSetIndices, EggNumberOfLevelUpPointsApplied, EggTamedIneffectivenessModifier, NotifyTeamOverride, EggDinoAncestors, EggDinoAncestorsMale, EggRandomMutationsFemale, EggRandomMutationsMale); Doesn't cause the error. (edited)
Avatar
@Lethal that is prolly a nullpointer (edited)
Avatar
Does this not work for ATLAS? ArkApi::GetApiUtils().GetShooterGameMode()->LoadTribeData(TribeId, tribe_data, false, false); (edited)
5:08 AM
It works fine for ARK.
5:10 AM
@Buu I guess my point was why does it work if I directly return the value and not when I store it in the typed object then return that object.
Avatar
Any idea on how we can get a Type that seems to be missing from ArkApi, but is in use by Ark ? I am trying to use some hooks that require FArkTributePlayerData Getting the following error (edited)
7:57 AM
Avatar
struct FArkTributePlayerData : FArkTributeEntity { unsigned __int64 PlayerDataID; TArray<unsigned char, FDefaultAllocator> PlayerDataBytes; FString PlayerName; FString PlayerStats[12]; FString UploadingServerMapName; bool bWasAllowDPCUpload; bool bWithItems; unsigned int ItemCount; bool bForServerTransfer; float Version; }; struct FArkTributeEntity { int UploadTime; }; (edited)
👍 1
Avatar
@Lethal I'm new to C++ , but it might be that you're not actually storing it in a variable but rather just make another reference to the same pointer. But when you try to return it, it is already null (edited)
Avatar
TArray<FTribeData> tribeData = ArkApi::GetApiUtils().GetShooterGameMode()->TribesDataField(); Anyone know how to get this function to work? I want to read all tribes on the map and loop through them, doing things
9:07 PM
It seems to crash my server each time I run it, and I don't see any logs indicating what im doing wrong
Avatar
substitute 4/2/2020 9:08 PM
You might need to attach debugger
Avatar
@substitute Any idea about my question above about "Hook_APrimalDinoCharacter_StaticCreateBabyDino"
9:16 PM
Was trying to make a simple No Wander plugin for babies.
Avatar
hooking AprimalDinoCharacter_BeingPlay would also probably work (edited)
Avatar
@WETBATMAN Checking the following fields to make sure it is a new breed baby using these perhaps. _this->bIsBaby(); _this->bReceivedDinoAncestors();
Avatar
GormusSenex 4/2/2020 10:02 PM
Any1 know of a command that clears all dinos buffs, any carried characters etc. like when u just tossed out a cryoed dino. ?
10:03 PM
im looking for the deploy cryo command kind-of. im probably not explaining it well. a clear-all-dino-state-command 🙂
Avatar
@Lethal you are apply state to the Dino ?
11:53 PM
Just run the original spawn Dino then apply state
11:53 PM
Or is that when it crashes?
Avatar
It crashes if I don't return the original in the same line.
12:00 AM
but the crashes happens in the original code
12:00 AM
access violation
Avatar
Wander plugin is tough to figure out. I can make it so every dino spawned will not wander around or I can do it when claimed to only affect bred dinos. APrimalDinoCharacter has a bIsBaby property but always 0 and the same with bReceivedDinoAncestors. if (_this->bIsBaby()()) { //is never true
Avatar
Uh
1:56 AM
After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. We recognize that the Wiki has been a valuable resource for many of you during your development journey, and we will be incorporating the top-visited content from the Wiki into ...
1:58 AM
A VuePress documentation site scraped from the internet archives: - MichaelJCole/wiki.unrealengine.com
Avatar
Hello, I'm actually trying to use a hook who trigger when a player open the inventory of an object (like storage). I've already tried those one :
  • GetAimedUseActor
  • OnKeyboardUsePress
  • ShowMyInventory
  • TriggerPlayerAction
All those came from AShooterPlayerController but none is working. Am I missing something ? Anyone can tell me which hook I need to use ? Thank you in advance for your help.
Avatar
it’s client side
9:17 AM
you cannot hook it
Avatar
Ok Thank you for your answer. So I suppose that the same for everything about the inventory of player ? (like item added / removed from their inventory) I've got a lot of stealing problems and I want to check who is taking items from another tribe storage.
Avatar
those functions you can hook
Avatar
AddItem would be called if they were to steam something from someone else's storage box heh
Avatar
Yes, I'm actually checking the function, thank you for your help 🙂
Avatar
How can I iterate through TArray<FItemNetInfo>* Items I have tried ..... for (auto item : Items) { } but it doesn't like it (edited)
Avatar
Perhaps try with : for (FItemNetInfo* item : Items) { ... }
Avatar
no that doesnt work either
9:44 AM
Avatar
Are you sure the array is not empty and the var isn't null ? did you put something in the { } when you made tests ?
Avatar
at this point its not running/compiling so not even getting that far
9:46 AM
its the first time I am using this type of pointer
Avatar
I've got the function that have a for like that and it works very well. TArray<AActor> found_actors; for (AActor actor : found_actors) { }
Avatar
yeah I have Many of them too but none of them use a TArray<FItemNetInfo>* Items
Avatar
Yes, sorry can't help you more with that, I'm pretty new to C++ and pointer so perhaps someone with better experience will give you the solution.
👍 1
Avatar
I can get the first Item doing the following FItemNetInfo item = Items[0][0]; but it doesn't make sense to me (edited)
9:58 AM
the for loop you mentioned works with something like TArray<FItemNetInfo> Items or TArray<FItemNetInfo*> Items but not TArray<FItemNetInfo>* Items but I am sure someone here can point ( 🤣 ) me in the right direction
10:02 AM
@Neka thanks anyway
Avatar
And what's the difference between the third and the second one ? Why not using TArray<FItemNetInfo*> Items is this is working ?
Avatar
I am guessing its a pointer to the items(to each memory allocation) in the array(2nd one) and the (3rd) one is a pointer to the actual array(one memory allocation of the array). Its hooks with that as a parameter, I don't think you can just change it, it would be the same as changing the type of a parameter (edited)
10:16 AM
Then again, I am just guessing here. Would be nice for some Big Brain to come online and correct us.
Avatar
I also have a question about TargetingTeamField. I've got a Hook with APrimalStructureItemContainer_RemoteInventoryAllowActivation (who trigger when a player try to access to a structure inventory). I've got two param from the hook : APrimalStructureItemContainer* _this, AShooterPlayerController* ForPC I'm retrieving their "team id" with : teamStructure = _this->TargetingTeamField(); teamPlayer = ForPC->TargetingTeamField(); But I don't understand the logic to check if the player is in the same tribe or allied tribe from the structure ? I made multiple tests but the teamStructure is never the same as teamPlayer even if i'm in the same tribe. Anyone can explain me more about that TargetingFieldTeam please ? Thank you in advance.
Avatar
GormusSenex 4/4/2020 11:44 AM
"teamStucture never the same as teamPlayer" -> maybe cuz its two different classes ?
11:44 AM
ohh nvm. u meant the targetingteamfield of the both... ok, nvm
Avatar
Yes, really don't understand the logic behind TargetingTeamField. Just to give an example : First screen is log when I tried to access to another tribe structure
11:54 AM
Then I joined the tribe structure :
Avatar
GormusSenex 4/4/2020 11:55 AM
u using the same type to get both values ?
Avatar
As it show, now I've got the tribe ID of the structure has from the first screen. But the team structure changed on the second.
11:56 AM
TargetingTeamField give me back int so I'm using int
Avatar
GormusSenex 4/4/2020 11:56 AM
wierd
Avatar
that's indeed weird because TargettingTeamField is just TribeID
12:06 PM
if (_this->TargetingTeamField() != EventInstigator->TargetingTeamField()) { FVector StructPos = _this->RootComponentField()->RelativeLocationField(); AGameState* aGameState = ArkApi::GetApiUtils().GetWorld()->GameStateField(); AShooterGameState* GameState = static_cast<AShooterGameState*>(aGameState); GameState->NetAddFloatingDamageText(StructPos, ConfigDamage, TeamField, 0); GameState->ForceNetUpdate(true); }
12:06 PM
i know it works because i use it to check for friendly fire
12:06 PM
otherwise overlap custom damage numbers
12:06 PM
_this is APrimalStructure
Avatar
GormusSenex 4/4/2020 12:07 PM
Wetbatman, u will be my god if u can solve this (ive been working 3 days to try and fix it) :
Avatar
_this is a APrimalStructureItemContainer*
12:07 PM
(Or you mean in your code ?)
Avatar
it's just a child of APrimalStructure
12:08 PM
should be the same
Avatar
GormusSenex 4/4/2020 12:09 PM
I sit on a tame and enter a command that executes ->SetRider(..) on another tame. works fine. then i execute the command again to get back to 1st tame (->SetRider(..)), also works fine. But now both tames r fucked up unless i desaddle them and cryo them. ServerClearRider doesnt work. ive tried nearly everything
12:09 PM
any tips / hints / suggestions ?
Avatar
sounds like a replication issue
12:10 PM
desaddling probably replicates something to the client that SetRider method u use doesn't
Avatar
GormusSenex 4/4/2020 12:10 PM
if i relog, the tames r fine too
Avatar
yes that's a replication issue
Avatar
GormusSenex 4/4/2020 12:10 PM
how to solve that ?
Avatar
you will have to take a look at ark's source code
12:11 PM
or even in devkit
12:11 PM
to see what happens when a rider is set (edited)
Avatar
GormusSenex 4/4/2020 12:11 PM
i did with ghidra, but most of it isnt labeled :/
Avatar
you trying to set a rider because of that harvest issue you have ?
Avatar
GormusSenex 4/4/2020 12:12 PM
yup
Avatar
well that's not a clean solution tho
Avatar
GormusSenex 4/4/2020 12:12 PM
i know. but i couldnt force the tame to harvest anything
Avatar
some dinos like megapithecus can harvest fiber and stuff when on wander and not ridden
Avatar
GormusSenex 4/4/2020 12:12 PM
but it harvest. but is also fucked up
Avatar
so it must be a bool or something
12:12 PM
also just get IDA
12:12 PM
magnet:?xt=urn:btih:169DFE1E10161FFA82B786BF89F05AEA6BCD4510&tr=http%3A%2F%2Fbt2.t-ru.org%2Fann%3Fmagnet&dn=IDA%20Pro%207.0.170914%20WIN%5CMAC%20x64%20%2B%20Hex-Rays%20Decompilers%20(x86%2C%20x64%2C%20ARM%2C%20ARM64)%20%5B2017%2C%20ENG%5D
Avatar
GormusSenex 4/4/2020 12:13 PM
😄 i want to. but the price is tooo steep 😄
Avatar
paste this into a browser but install a torrent client first
12:13 PM
😛
Avatar
GormusSenex 4/4/2020 12:14 PM
im not rly fond of downloading some cracked software. not becuz its cracked (idc) but becuz of whatever shit the crackers put into it 😂 (edited)
Avatar
well that's up to you
Avatar
GormusSenex 4/4/2020 12:15 PM
come on - be my god almighty 😉 heeeelp meeeee 😄
Avatar
maybe try with a dino that is able to harvest items by default ?
12:15 PM
(when not ridden)
12:16 PM
try to get a megapithecus and run your code on it
12:16 PM
if not try to set it on wander and then run your code
Avatar
GormusSenex 4/4/2020 12:16 PM
hmm that one harvest on its own ?
Avatar
yes
12:16 PM
if set on wander
Avatar
GormusSenex 4/4/2020 12:16 PM
i wonder if an anky set on wander does the same until its full
Avatar
possibly
Avatar
GormusSenex 4/4/2020 12:18 PM
... if its that simple omg...
Avatar
@WETBATMAN you know how to iterate through TArray<FItemNetInfo*> Items;
Avatar
maybe try it the OG way ? 😄
12:23 PM
get count of how many items are in the array
12:23 PM
then iterate over it
Avatar
if you have a quick look at my comments above, is what I have tried
12:25 PM
OG way ?
Avatar
GormusSenex 4/4/2020 12:25 PM
original 😉
Avatar
ah.....ok
12:26 PM
pre 11
Avatar
GormusSenex 4/4/2020 12:26 PM
for (int n=0; n< XXX; n++) in c# at least
Avatar
there is no begin function so you can't use the easy iteration here
12:28 PM
for (auto item : Items) { }
12:28 PM
this only works if it's known where to begin iteration and where to stop
Avatar
right.......ok
12:29 PM
hey..
12:29 PM
Anyone have any clue how to get IDA to show to work that it shows structs ?
12:29 PM
@WETBATMAN I know you showed me what steps you follow , but i just don't get the same results, I must be missing something else
Avatar
TArray<FItemNetInfo>* Items; Items->Num(); for (int i; i < Items->Num; i++) { }
12:30 PM
smth like this
Avatar
yeah just did that thanks
Avatar
hm there are no extra steps supposed to be there
12:31 PM
when you decompile the .exe and enter local types it should show all structs
Avatar
what about when you load it in there is some option for processors and so on ?
Avatar
just open it as whatever is set already
12:31 PM
don't change any settings before decompile
Avatar
the structs i get to see is a total of about 900+ ish and all unreadable
12:32 PM
I noticed yours was way over 25k
Avatar
yea it sounds like u selected the wrong decompile option perhaps ?
Avatar
no Idea, totally lost atm 😄 (edited)
Avatar
this seems to do the trick, auto outerTotal = Items->Num(); for (int i = 0; i < outerTotal; i++) { auto innerTotal = Items[i].Num(); for (int j = 0; j < innerTotal; j++) { auto item = Items[i][j]; } } (edited)
Avatar
GormusSenex 4/4/2020 1:37 PM
Nope, enable wandering didnt do the trick 😦
Avatar
GormusSenex 4/4/2020 3:36 PM
@WETBATMAN new approach. how do i add a dummy-shootercontroller / clone to the world ?
3:36 PM
(if even possible)
Avatar
haven't tried it but i would assume it's spawned like other actors
Avatar
GormusSenex 4/4/2020 3:42 PM
this one ? c++ ArkApi::GetApiUtils().GetWorld()->SpawnActor(...) (edited)
Avatar
take a look at the API's spawn dino function (edited)
Avatar
API Site is down?
Avatar
Seems like
3:48 PM
😦
Avatar
nvm working now
Avatar
GormusSenex 4/4/2020 3:49 PM
@WETBATMAN that call dont have FActorSpawnParameters.
Avatar
GormusSenex 4/4/2020 4:09 PM
also, i dont know how to get from AActor to a AshooterPlayerController.
Avatar
@GormusSenex I guess you can't because a AShooterPlayerController is always an AActor but an AActor isn't always a AShooterPlayerController. Perhaps if you cast it like that : AShooterPlayerController* shooter_controller = static_cast<AShooterPlayerController*>(yourActor);
Avatar
GormusSenex 4/4/2020 4:31 PM
i dont think i can down-cast
4:32 PM
ohh it allows it
Avatar
Yes it will compile it but that can probably throw an exception if the received Actor can't be casted
4:33 PM
Perhaps put a try catch too and check if it works in game
Avatar
lmao were the devs on crack when they wrote item stat generation ?
Avatar
GormusSenex 4/4/2020 4:34 PM
not only when they wrote that... 😉
Avatar
when you need to use it
4:35 PM
you'll see
4:35 PM
it's so bad
4:35 PM
my setter functions works for armor and durability but not for damage for some reason
Avatar
GormusSenex 4/4/2020 4:36 PM
u dont got time to look at item stat generation. (waving hand like a jedi) u want to look into spawning a shooterplayercharacter (edited)
4:37 PM
😉
Avatar
lol
Avatar
GormusSenex 4/4/2020 4:37 PM
guess my jedi skill is as low as my c++ skill... 🙄
4:38 PM
😂
Avatar
Anyone using the built in CURL? I frequently get the first POST requests in the callback function with this. success: 1 response: {"message": "400: Bad Request", "code": 0}
4:40 PM
Once I get this it seems to work fine after that going foward.
4:42 PM
I'm also logging the webhook and message sent which I can use to verify the message was properly formatted using PostMan.
4:48 PM
I'm going to build in some retry logic to make a 2nd attempt on a failed post. Just don't understand why it seems to fail after a fresh server start.
4:53 PM
Retry code works at least and the message did get sent on 2nd attempt.
Avatar
Still something seems off because sending messages under the webhook limits I still get the "Bad Request" message even on retries when sending several messages in rapid succession.
Avatar
GormusSenex 4/4/2020 5:47 PM
what annoys me the most is that i cant let it be cuz i know theres a solution to it! arghh !!! 👿
Avatar
substitute 4/4/2020 6:39 PM
@WETBATMAN
6:39 PM
Item stats are whacked
6:39 PM
Weird array nonsense (edited)
Avatar
yes lol i still can't set the damn weapon damage %
6:40 PM
with the same function that sets armor and durability fine
Avatar
substitute 4/4/2020 6:40 PM
Nope it’s a % calculated from a scalar
6:40 PM
You could probably figure out the calculations
6:40 PM
And work backwards
Avatar
if (item_stat_type == EPrimalItemStat::Armor || item_stat_type == EPrimalItemStat::MaxDurability) { *(item->ItemStatValuesField()() + item_stat_type) = 0; const float old_stat_modifier = item->GetItemStatModifier(item_stat_type); *(item->ItemStatValuesField()() + item_stat_type) = 1; *(item->ItemStatValuesField()() + item_stat_type) = (new_value - old_stat_modifier) / (item->GetItemStatModifier(item_stat_type) - old_stat_modifier); if (item_stat_type == EPrimalItemStat::MaxDurability) { if (item->bUseItemDurability()()) item->ItemDurabilityField() = item->GetItemStatModifier(item_stat_type); } }
6:40 PM
this works for dura and armor
Avatar
substitute 4/4/2020 6:41 PM
Oh btw I’m working on a neat plugin @WETBATMAN
6:41 PM
It’ll make default survivor items instead of items, engrams
6:42 PM
So you don’t have your inventory spammed
Avatar
indeed neat
Avatar
Hey @substitute , are you the same Substitue who developed the Anti-Family Share plugin?
Avatar
yes he is
Avatar
Okay nice. I hope its okay to ask here. Do you know by any chance if the Plugin still works? It doesnt kicks my family shared account from my testserver with the plugin loaded and I honestly have no clue how to troubleshoot this.
Avatar
substitute 4/4/2020 8:30 PM
@Al Capone it could need an update
8:30 PM
What happens exactly
Avatar
Well nothing basically. It loads up correctly. I join with my family shared account and well I dont get kicked or Something
Avatar
GormusSenex 4/4/2020 10:39 PM
@WETBATMAN if Ghidrea writes this: c++ this->field_0x498 And "this" is APrimalDinoCharacter. U have any idea how i can find out what the code is referring to ?
Avatar
What function are you looking at?
Avatar
GormusSenex 4/4/2020 11:01 PM
APrimalDinoController->SetRider(..)
Avatar
@substitute can you confirm that the plugin doesnt work atm or is it an issue on my side? Not sure what I could have done wrong since it says " zero setup or configuration needed"
12:10 AM
Could it be bound to the Api Key being overused? Not sure how you check for family shared users, but this is a common issue with the ark server manager. Would be fixed by having server owners add their own api key
Avatar
@GormusSenex I believe if you have the PDB loaded you can right click on "field_0x498" select "Edit Data Type". Then on the window that pops up select "Align" in the bottom right corner. Then top right next to the X click the down arrow and click "Show numbers in Hexadecimal" scroll down list for 0x498 which I believe is "ColorOverrideBuff". I could be wrong as i'm still trying to learn the decompiler stuff as well.
👍 1
🤩 1
1GOGN 1
12:17 AM
You can then click save and it will update the code with the names also.
Avatar
GormusSenex 4/5/2020 12:17 AM
omg that is so kewl ! tyvm !
12:17 AM
its WeaponBobTime (whatever that is 😂 ) but this is so helpful !!!
Avatar
Ah, I was looking at a different 0x498 in another object
Avatar
GormusSenex 4/5/2020 12:21 AM
one more thing. what if it refers to a number thats in between two numbers shown in that list ? i have 0x4f8 but only 0x4f0 and 0x4fc is shown
Avatar
substitute 4/5/2020 1:25 AM
@Al Capone
1:25 AM
API Key?
1:26 AM
I think you are confusing my plugin with another
Avatar
Well Steam API key
Avatar
substitute 4/5/2020 1:26 AM
Mine doesn’t require any steam api key
1:26 AM
Mine works completely in engine
1:26 AM
Can you link to me the plugin?
1:26 AM
There’s two no family share plugins on the forums
Avatar
Ah okay. Yes, I am sure that I am refering to your plugin, just didnt know how it worked and tried to explain the error to me. https://ark-server-api.com/resources/anti-familyshare.159/
Tired of banned players coming back by exploiting Steam's family share? Wish to only allow accounts that actually own Ark to join? This plugin preforms the check that Official Servers use to prevent Family Shared accounts from joining. It is a...
Avatar
substitute 4/5/2020 1:28 AM
I’ll check it
Avatar
Thanks 😄
Avatar
substitute 4/5/2020 1:53 AM
@Michidu I was thinking, maybe one way (instead of making a proper api for now) we can implement post-trampoline hooks?
1:54 AM
instead of writing the jmp at the top of the original function, writing the jmp at the bottom
1:54 AM
though this may not be easy as I know you use a library for making these hooks.
1:55 AM
@Al Capone
1:55 AM
1:55 AM
1:55 AM
(ignore the richcolor, i was testing some time ago if you could use markup in here like the chat window, you can not 😦 )
1:55 AM
it works for me just fine on latest version
1:56 AM
Which other plugins do you have installed?
1:56 AM
There may be a conflict
1:58 AM
@GormusSenex
1:58 AM
Which function was crashing for you on calling ?
1:59 AM
I think of an idea of why but I wanna investigate more first (edited)
Avatar
substitute 4/5/2020 2:03 AM
Hm, two things
2:03 AM
One can you update to 1.1?
2:03 AM
And 2, if that doesn’t work I will need to check those plugins
Avatar
This is the most recent download from your api page. I just downloaded it last week. Seems like the Version number didnt update in the PluginInfo.json
Avatar
substitute 4/5/2020 2:09 AM
ah, hm
2:09 AM
would you be able to run just my plugin
2:09 AM
and nothing else?
2:09 AM
Just to confirm it's a conflict?
Avatar
sure
2:11 AM
Will take about 5 minutes for my server to startup
Avatar
still able to join with only anti family share + permissions (edited)
2:29 AM
And my Account is 100% family shared
Avatar
even without permissions i can join
Avatar
substitute 4/5/2020 2:55 AM
@Al Capone this is very strange
2:55 AM
what does the directory look like?
2:56 AM
i reinstalled it to be sure I didnt have a corrupt download
2:59 AM
even without any mods it doesnt seem to work
3:03 AM
Would you mind trying to join the server yourself? Maybe there is a problem with my specific family shared account? Its 3am here atm so I cant get my admins to test it for me 😄
3:05 AM
Otherwise I will have my admins test it tomorrow and get back to you in like 12-15 hours.
Avatar
substitute 4/5/2020 3:12 AM
Maybe in a bit
3:12 AM
I’m going to be making dinner and such
Avatar
Enjoy your meal
Avatar
substitute 4/5/2020 5:36 AM
@Al Capone I'm back
Avatar
GormusSenex 4/5/2020 9:25 AM
@substitute u have an idea of how I can add a "fake" AShooterPlayerController ? and once used, then destroy it ?
Avatar
substitute 4/5/2020 9:25 AM
@GormusSenex
9:25 AM
what do you mean fake ?
9:30 AM
why uh
9:31 AM
are you doing it this way ?
9:31 AM
what's the end goal
9:32 AM
AShooterPlayerController::StaticClass()->GetDefaultObject(true);
9:32 AM
will get the default class instance
9:34 AM
@Al Capone it is weird my plugin doesn't work for you.
9:34 AM
All I do is check the same way the game does
9:37 AM
@Michidu when you get a chance
9:38 AM
why does NativeCall use __fastcall*?
9:38 AM
This could the source of some crashes
9:38 AM
I don't think all function calls in UE4 are __fastcall x)
Avatar
by default, all functions in x64 are fastcall about your hook suggestion, post-hooks won't work for all plugins
Avatar
substitute 4/5/2020 9:43 AM
why would post not work (?)
9:43 AM
if you need to do something before and after
9:43 AM
just prehook, and then posthook
Avatar
well, it's not possible anyway as you don't know function size
9:46 AM
moreover, function may have more than one return
Avatar
substitute 4/5/2020 9:51 AM
could you not overwrite return address ?
Avatar
ye, changing return address is possible
Avatar
@substitute how exactly does the "newplayer" option works? Does it have to be a player unknown to the server or just any player who joins the server?
Avatar
Hello, I'm actually working on a plugin and the servers where I test it are sometimes crashing (Fatal Error with the name of my plugin). Is there a way to debugging and to see what's the problem ? Because the fatal error message doesn't really help to find it out. Thanks in advance
Avatar
Ok looks like it isnt an issue with just my account. Another Admin couldnt join as well with a family shared account.
Avatar
GormusSenex 4/5/2020 4:03 PM
@Neka it should show on ur server. there will be a crash dump. it also copies itself to clipbord. and i think, iirc, it also writes to the log (edited)
Avatar
@GormusSenex Thank you for the answer. I checked but the log is the same as what was write in the fatal error and that's not enough to know what's going wrong :/
4:25 PM
It just say to me the line where the crashed happend but all inside it is secured and normaly can't crash so
4:26 PM
Is there a way to secure all crash like put everything in a try catch ?
Avatar
@Neka the name of your plugin in the log ends with a number
4:56 PM
this number is the line where your plugin crashes
Avatar
Yes I saw that and checked that line but I don't understand why that crashed there. When I'm coding in web or other language I can easily debug objects and var but here I don't know if it's possible to have those data.
Avatar
substitute 4/5/2020 6:30 PM
@Al Capone you didn't whitelist yourself did you?
Avatar
No the whitelist is empty
Avatar
substitute 4/5/2020 6:31 PM
What's your Steam64?
Avatar
from the secondary account?
Avatar
substitute 4/5/2020 6:31 PM
Yes
Avatar
76561199035548159
Avatar
substitute 4/5/2020 7:47 PM
Thanks
7:48 PM
@Al Capone
Avatar
But another admin could join there with his family shared account too, so I doubt its an issue with the account
Avatar
substitute 4/5/2020 7:59 PM
what are your server settings?
Avatar
Well we are a x50 pvp server with 15 mods + customized drops + plugins. And hosting the server in a cluster via asm on a i9-9900k. Not sure which settings you are referring to. And would you mind moving this to pm? Easier to follow for me since I am in many Discord and we wont spam this channel too much. (edited)
Avatar
GormusSenex 4/8/2020 9:17 AM
This is from official server (some1 got a hack apparently): https://ibb.co/310Zcs8 Is there any way to prevent sending bullet-count to the client when viewing the turret ?
9:19 AM
(PS. this is not a tribe member viewing or an allied party)
Avatar
the guys looking at
6:12 PM
APrimalStructureTurret->NumBullets
6:13 PM
you can probably force the server to always have the number set to 0, so it replicates 0 to the clients
6:14 PM
that shouldn't have any adverse effects because that variable isnt really used for anything special in ark other than displaying number of bullets in the turret cosmetically
👍 1
6:15 PM
that looks like he's on windows 10 ark though xD
Avatar
GormusSenex 4/8/2020 6:15 PM
xbox ark via windows
Avatar
but yeah same shit on steam ark
6:18 PM
if u force that to 0 u might as well force APrimalStructureItemContainer->CurrentItemCount to show 0 as well
6:19 PM
so it replicates 0 to the clients
6:20 PM
but, with the turret + item container thing u set those to always be 0 u gotta make sure whatever mods u are running on the server don't rely on those values
6:20 PM
otherwise stuff will start to break
6:21 PM
actually i take that back, i woulnd't force CurrentItemCount to replicate to 0 XD, some things in the game rely on it
6:22 PM
NumBullets though u can
Avatar
substitute 4/8/2020 7:34 PM
@dougy honestly
7:34 PM
it would be pretty funny to spoof inventories
7:34 PM
to bad clients
7:34 PM
bootypeplaugh (edited)
7:35 PM
@GormusSenex I would check a few things for that value, if you wanted to this proper
7:35 PM
I would find how UE4 replicates the value and conditionally send the valid count to players in the same tribe
7:48 PM
xD
7:48 PM
id leave it alone i guess
7:48 PM
but yeah it would be funny (edited)
Avatar
Hello, is it normal that when I want to get all the items in the player inventory, it give me also all engrams he can craft ? inventory->InventoryItemsField(); Thanks for the help
Avatar
GormusSenex 4/10/2020 8:09 PM
u have to do c++ !item->bIsEngram()()
8:09 PM
where item is a UPrimalItem
Avatar
Thank you, will try that
Avatar
GormusSenex 4/11/2020 12:43 PM
Any1 tried wrapping the shootergame.exe in a Windows Service, so it runs as a windows service? I did, and it works fine sort-of. only problem is, my plugin wont connect to my database. if i run it "normally" it connects fine, but somehow it cant connect from inside the service wrapper. any1 got experience with that ? and to make sure its not a connection-string issue, ive hardcoded user and password in the plugin for testing purposes. (edited)
Avatar
You don't need to do that (edited)
1:07 PM
DM me...
Avatar
This is kinda out there, but is there any way to interact with the player handheld maps from the server side? I'm pretty sure that stuff is stored locally, but didnt know if there might be a way to clear waypoints or add them.
Avatar
The waypoints are client sided @Ras
Avatar
GormusSenex 4/13/2020 9:17 AM
how do one make a own message in the "welcome box" ?
Avatar
@GormusSenex do you mean the motd?
Avatar
GormusSenex 4/13/2020 9:25 AM
yup
Avatar
There's commands for it
Avatar
GormusSenex 4/13/2020 9:25 AM
and im not asking how to make another motd
Avatar
The MoTD is fairly limited
9:26 AM
you can basically just set it
9:26 AM
or show it to people at will
9:26 AM
it's hard coded that way.
Avatar
GormusSenex 4/13/2020 9:26 AM
ahh ok. but can i change the actual message then on-the-fly ?
Avatar
You can without a plugin
9:27 AM
there's a command for it
9:27 AM
If you wanted it automatic either execute the command
9:27 AM
or reverse engineer what the command does
Avatar
GormusSenex 4/13/2020 9:28 AM
is it the ShowMessageOfTheDay ur talking about ?
Avatar
that shows
9:28 AM
you want to set it
Avatar
GormusSenex 4/13/2020 9:29 AM
ahh SetMessageOfTheDay
Avatar
How can we get Character Name from APrimalCharacter ?
12:28 PM
I have tried APrimalCharacter->NameField(); //this returns the character class name APrimalCharacter->GetDescriptiveName(); //this returns "PrimalCharacter Lvl - 49" (edited)
12:29 PM
I have attempted to cast to AShooterPlayerController in a very desperate attempt.........dont know why I thought it would work......
Avatar
FString name = ""; AShooterPlayerController* controller = ArkApi::GetApiUtils().FindPlayerFromSteamId(steam_id); if (controller && controller->GetPlayerCharacter()) name = controller->GetPlayerCharacter()->PlayerNameField(); (edited)
Avatar
the player is offline, not sure thats going to work
12:41 PM
I know it works for online players, but in this case the player is offline
Avatar
do you have their AShooterCharacter ?
Avatar
I have APrimalCharacter* _this
Avatar
for online players I get the AShooterPlayerController like this from APrimalCharacter* OnlinePlayer const auto player_controller = ArkApi::GetApiUtils().FindControllerFromCharacter(reinterpret_cast<AShooterCharacter*>(OnlinePlayer)); but it fails for offline players as I think it does not exists when player is offline. but since Ark can display an offline players name ......there must be a way to access it (edited)
Avatar
if you can get the AShooterCharacter you will have the name
Avatar
yeah thanks got this to work FString characterName = (reinterpret_cast<AShooterCharacter*>(_this))->PlayerNameField(); (edited)
1:33 PM
thanks @WETBATMAN
Avatar
Trying to determine when a cryopod is thrown to release a dino. I know there are some checks happening after it is thrown which if there is not enough room to spawn the dino like "Cannot Deploy: Can't Fit" but i'm struggling to find where these checks are happening. Looking through decompiled source etc. Anyone have any experience with this?
Avatar
I may have found something for this as the crypod is treated as an exploding projectile.
Avatar
A lot of the cryopod is made in blueprint
6:31 PM
That’s going to be a tad harder to hook
Avatar
Anyone have a IDA db of ark ?
Avatar
Just let ida run for a few hrs
Avatar
And it will figure out the names on it's own ? (edited)
7:02 PM
yes
7:02 PM
but if u don't wanna wait
7:02 PM
here it is
Avatar
Thanks much apriciated
7:02 PM
the only resource i found was on unknowncheats
7:03 PM
Hello everyone! First off I just want to say that I am very thankful that I found this forum. I have learned a lot in the past week just from this for...
Avatar
I'm trying to find a specific event and after OnExplode it is calling ProcessEvent but not sure what. ShooterGameServer.exe!AShooterProjectile::OnExplode(const FHitResult & Result) Line 18373 ShooterGameServer.exe!AActor::ProcessEvent(UFunction * Function, void * Parameters) Line 636
Avatar
are you trying to decompile the server or client lol
7:04 PM
@KillZone
Avatar
Im trying to figure out what function is called when you upload a item to the ark tribute , so server tiredoflife (edited)
7:05 PM
7:06 PM
Since that apears to be the best way to figure out how stuff is called and i did do a semester of Assembly in uni so i should be able to cobble it together
7:06 PM
Thanks again for the db @WETBATMAN
Avatar
@KillZone we have a PDB for servers
7:52 PM
what?
Avatar
I didn't know that existed
8:03 PM
Would you mind linking to it ?
Avatar
wdym
8:15 PM
it's in the server folder
Avatar
Ah i see i forgot i dragged it in when installing the API
8:16 PM
Alright cool il go and finish this guys lecture and see if i manage to find something
Avatar
hm ?
8:16 PM
wdym it's in there by default
Avatar
The video i linked
8:16 PM
Oh that
8:17 PM
Was it not in the ark server api zip file you download from the website ? thonk
Avatar
@KillZone after you load ShooterGameServer.exe into IDA, go to File->LoadFile-> PDB File
4:35 AM
4:36 AM
then, in the same path u found shootergameserver.exe you should see shootergameserver.pdb
4:36 AM
4:36 AM
just load that
4:36 AM
on top of exe
Avatar
Thanks this is the only thing that I could get a ping for in 4 in the morning and that would make me happy, steve2
4:38 AM
Will give it a try first thing Tomorrow
4:40 AM
( I am unironically saying thanks )
4:40 AM
It'll take a little bit to load but once it's done you'll be able to find functions a lot easier
4:47 AM
salute
Avatar
Q: how does the ark Linux server function? Does it use mono? If so could you do LD_PRELOAD or something similar?
9:19 PM
I'm pretty sure it'd be possible to add Linux support, even if it ends up requiring binary patches...
9:22 PM
Or even just wrapping the application would probably be feasible for loading in the API and hooking the correct functions, wouldn't it?
Avatar
@Plazmaz you can't at all add Linux support (edited)
10:54 PM
they don't ship debugging symbols / PDB
10:55 PM
so there's no way to find functions other than manually finding each function offset by hand.
10:55 PM
The Linux server is also a native binary for Linux
Avatar
Ah okay. Yeah you'd have to do some sort of crazy control flow matching or something for Linux
Avatar
Is it Possible to teleport a o player when he joins? And also when is is new?
Avatar
someone also has problems with the latest ark patch and the api? looks like it broke the api. 🙄
Avatar
AaronBasques 4/16/2020 10:27 AM
yeah same, even after the API was removed i still crashed
Avatar
AaronBasques 4/16/2020 10:29 AM
without api
10:29 AM
same crash
Avatar
well i can boot without api ....
10:29 AM
🧐
Avatar
seems to be an issue with PDB they released (it doesn't match the game files)
Avatar
@Michidu v310.29 -BUG
10:29 AM
ALL BOOMM
Avatar
AaronBasques 4/16/2020 10:29 AM
so that would crash with and without api?
Avatar
no, without api it works
Avatar
AaronBasques 4/16/2020 10:30 AM
i still got the same crash on a non API implemented server 😕
Avatar
maybe you didn't remove it correctly?
Avatar
AaronBasques 4/16/2020 10:31 AM
the 3 files that come with the api i removed, verified files and started
10:31 AM
i take it thats not correct?
Avatar
check version.dll just in case
Avatar
AaronBasques 4/16/2020 10:35 AM
need to install fresh vanilla and go from there
Avatar
but yeah, i just looked at your screenshot and api is not loaded so your issue must be coming from mods
Avatar
the fix for the api will be difficult?
Avatar
devs released wrong PDB, so i can't do anything we will have to wait for new update
Avatar
I thought so - and it can take some time because they don´t care much about the PDB 🙄
Avatar
AaronBasques 4/16/2020 10:42 AM
same crash with the mods & api disabled lol pMeh
10:42 AM
waiting for a fresh install to complete
Avatar
Patch Notes: v310.29 - 15/4/2020 - Fixed multiple server crashes might be a reason, heh
Avatar
🤦‍♂️
11:15 AM
UP
11:15 AM
Repaired
Avatar
yeah, seems to be fixed now
Avatar
AaronBasques 4/16/2020 11:23 AM
👍
Avatar
lmao they just don't give a shit
11:24 AM
some patches ago they shipped a server update compiled in debug mode
risitas 1
Avatar
AaronBasques 4/16/2020 11:26 AM
Its a bunch of people paid small amounts of money to do a job they would likely perform better if they get paid what the job is worth.
Avatar
GormusSenex 4/16/2020 11:27 AM
@KillZone haha, we have that at work. every new employee in our department is mandated to watch that one 😄 its still funny even after watching it for the 10th time hahaha
Avatar
Yeah i usualy do unit testing where i can and just automate it with jenkins
11:29 AM
and a seperate "live" branch on git that jenkins deploys when it sees a new commit made to it
Avatar
GormusSenex 4/16/2020 11:29 AM
"what about backup" "ye, they were on the nice to have list" that one cracks us all up cuz we've been there 😄 😄 😄
Avatar
my only backups are proxmox snapshots of the vm monkaSS
11:30 AM
11:30 AM
10gb
11:30 AM
risitas
Avatar
GormusSenex 4/16/2020 11:31 AM
and to top it off "we have performance review next week" HAHAHAHA
11:33 AM
"all this machine learning garbage that somehow resultats in a graph" - ohh yea !!! 😄 😄 😄
Avatar
my nerves 😫
Avatar
GSH | MrOwlSky 4/16/2020 9:37 PM
Getting constant crashes on our servers aswell
9:37 PM
Ark's recent update created a massive memory leak
9:37 PM
Avatar
ye it's leaking pretty bad
Avatar
No apparent memory leaking here with 24 players online. Only using cross server chat, permissions and suicide plugins. (edited)
Avatar
ArkShop - AutoDecay - ExtendedRcon - Permissions - RconCrossServerChat on our 5 servers and none have memory leaking
Avatar
GormusSenex 4/18/2020 6:39 PM
Any1 having issues with dealyed execute ?
6:39 PM
delayed*
6:40 PM
sry, recurring execute
Avatar
bunch of plugins use it tho
Avatar
GormusSenex 4/18/2020 6:41 PM
ok, so if its a big thing im guessing ppl will notify about it.
6:46 PM
ok , must have been a null issue even tho i chk for it. it crashed here: c++ ArkApi::IApiUtils : template <typename T, typename... Args> void SendNotification(AShooterPlayerController* player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D* icon, const T* msg, Args&&... args) { if (player_controller) { FString text(FString::Format(msg, std::forward<Args>(args)...)); -> Crashed here -> player_controller->ClientServerSOTFNotificationCustom(&text, color, display_scale, display_time, icon, nullptr); } }
Avatar
Anyone have any idea what function to hook onto for when you upload a item to the ark tribute inventory ?
10:41 PM
I've tried ClientOnArkTributeItemsAdded_Implementation OnArkTributeItemsRemoved ClientOnArkTributeItemsAdded (edited)
10:42 PM
None are called when adding in a item
Avatar
@KillZone I can look
Avatar
Using IDA ?
Avatar
yes
Avatar
Aight i'd appriciate it i tried doing some IDA tooday havent gotten it to fully work yet
Avatar
Ok so after a bit of detective work ( and by that i mean guessing based off what i see in ida ) ™️ (pattent pending) it would appear OnArkTributeItemsAdded is only called on (edited)
11:58 PM
Those 2
11:59 PM
So only when you upload your charachter to the ark and when the server finishes saving it ( ? )
Avatar
GormusSenex 4/19/2020 12:05 AM
so void __thiscall ClientOnArkTributeItemsAdded_Implementation(UPrimalInventoryComponent *this) isnt working ?
Avatar
I assume it does but not the way i imagined it did, from the xrefs provided in IDA it's for when you upload your charachter to the ark
12:06 AM
Il test it now
Avatar
GormusSenex 4/19/2020 12:06 AM
i would have guessed its that one or OnArkTributeItemsAdded. but if u tried them then i donno
Avatar
im dry testing since launching the server with ida errors out
12:07 AM
12:07 AM
Tested that one
12:07 AM
knew it sounded familiar
12:07 AM
doesn't get called
12:07 AM
eiter
Avatar
GormusSenex 4/19/2020 12:07 AM
have u tried this one ? c++ void __thiscall AddArkTributeItem(UPrimalInventoryComponent *this,FItemNetInfo *param_1,bool param_2)
12:07 AM
seems to be called from OnArkTribute ItemsAdded
Avatar
Isn't that just to add a item to the player's ark ?
Avatar
GormusSenex 4/19/2020 12:08 AM
at what point r u trying to hook ?
Avatar
Well prior to when a item is added
Avatar
GormusSenex 4/19/2020 12:09 AM
that is the one i would assume. cuz the last call in that function is AddToArkTribueInventory
Avatar
so something that would ideally take a boolean as a return parameter to indicate allowing / disallowing item to be uploaded
Avatar
GormusSenex 4/19/2020 12:10 AM
that method is checking wheter theres enough room and if so, adds to tribute. so i would guess its the one (edited)
Avatar
Il hook onto it see what / when it's called
Avatar
Bingo
12:18 AM
it get's called
12:19 AM
But it's in the "ARK DATA" section no clue if it should be in the Tribute
12:20 AM
but in case someone searches the messages on here ( since i do often ) transfer items hook tribute data ; Hook onto AddArkTributeItem ( or RequestAddArkTributeItem ) (edited)
Avatar
GormusSenex 4/19/2020 12:23 AM
👍
Avatar
@KillZone
5:35 AM
the data is likely serialized at that point
5:35 AM
hence FItemNetInfo
5:35 AM
one option you could try, though a bit extreme
5:35 AM
is to crash your server on that function and read back your crash stack
5:36 AM
the crash stack will have the calling functions (hence the name stack) so you can see what is calling that function
5:38 AM
5:39 AM
basically, Unknown function was called by FError::LowLevelFatal() called by FArchiveFileReaderGeneric::InternalPrecache() .... all the way up to ntdll.dll!UnknownFunction
5:39 AM
you can actually see the ShooterGame.exe!WinMain() function as like the 4th called function
Avatar
Hi. Anyone could help me tell me which hook is for tribe name change ?
Avatar
@Raptross Possibly MarkTribeNameChanged , hook onto it and see if it's called if not you might need to IDA it in which case if you dont know what that even is start here https://youtu.be/bYDK5IJphPU
11:53 AM
@substitute Good idea haven't actually thought of that but that would have been a good idea to find out the call hierarchy
Avatar
@WoolyPenguin Plugin hotloading has been fixed
4:34 PM
3.4
4:35 PM
Hasn't been uploaded yet though
4:35 PM
( sorry for the ping i cant type in #【🤹】ʀᴇꜰᴇʀᴇɴᴄᴇꜱ )
Avatar
BigBrain 2
Avatar
Is there a ArkServer API v3.4 ? v3.2 is the latest on the site. I see that a plugin got upgraded with that version, so just asking around.
Avatar
@Raptross check github
Avatar
Thanx, I didn't realize that it was updated since the site didn't show it updated.
Avatar
@Raptross a dll update wasn't needed
2:34 PM
only plugins that use API need to be updated
Avatar
Alright, thanx
Avatar
Anyone hear about the leak of TF2 source code ? 😂
11:46 PM
Figured someone might be interested since IDA and all that
Avatar
does someone know how to scan the structures in range at a specific location?
🤔 1
Avatar
#【🔷】ᴘʟᴜɢɪɴ-ʀᴇꜰꜱ
🤷 1
Avatar
can´t see the channel
Avatar
#deleted-channel
Avatar
code snippets only for advanced - okey 😆
Avatar
new hardware (edited)
10:19 AM
10:19 AM
x)
2:40 PM
i average 400-600 seconds
2:41 PM
Is it on a nvme drive ?
2:41 PM
@substitute
Avatar
GormusSenex 4/25/2020 4:19 PM
Nahh...
4:19 PM
oc asf
4:23 PM
4:23 PM
Do you know that keeping your pc in the freezer is not a good idea ?
😂 1
4:24 PM
Never saw that before congrats on winning the silicone lottery (edited)
Avatar
GormusSenex 4/25/2020 4:27 PM
simple ln2 cooling
Avatar
That do be a fast load time
4:34 PM
Lol
Avatar
@KillZone
5:59 PM
Nvme pcie4 drive
Avatar
Man i can only imagine the Read/Write to that
6:01 PM
I only once saw LinusTT do a win10 install on one and it took less that one min to full install
6:01 PM
boot up included
6:03 PM
clowniguess
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 4/26/2020 9:52 AM
oc asf
@GormusSenex It's a screenshot of der8auer's overclock lol he did cool it with liquid nitrogen xD
Avatar
GormusSenex 4/26/2020 9:52 AM
haha true 😄 good spottet. it's actual a world record iirc 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 4/26/2020 9:53 AM
yea it is lol
9:53 AM
I know Roman 😄
Avatar
GormusSenex 4/26/2020 9:53 AM
😂
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 4/26/2020 9:54 AM
because I build myself a custom water loop and still having the i7 8700k OC.. and im not reaching any close to this 7.6GHz lol
Avatar
GormusSenex 4/26/2020 9:54 AM
18 sec start-up would be sick tho 😉
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 4/26/2020 9:54 AM
so you've manipulated that too? lol
Avatar
GormusSenex 4/26/2020 9:54 AM
dont believe everything on the internet 😉 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 4/26/2020 9:54 AM
I just showed you I don't 😄
9:55 AM
but the time could be real
9:55 AM
I sometimes have 22 seconds
Avatar
GormusSenex 4/26/2020 9:55 AM
mines acutally liquid cooled too. but not reaching those speeds haha
9:55 AM
i can get low too but thats on the second startup. its like if it has been run once, then the second time is faster
Avatar
@dougy Hello, your engram unlocker plugin causes often crashes in my servers
Avatar
Anyone know how to correct the issue with "Private Message" plugin showing path to emote ? instead of the actual emote ?
Avatar
@Cloetté You will probably get the answer first from the dev of said plugin faster
Avatar
thanks.
Avatar
@Pelayori hey i'll take a look at it
4:42 PM
maybe a recent update broke something
Avatar
Thank you!
4:43 PM
The crash stack isn't very helpful as it shows unknown function
Avatar
no worries, thanks for letting me know , ill check it out shortly (just woke up XD)
Avatar
Haha ^^
Avatar
hey @Pelayori did it just start breaking recently
Avatar
I got it installed on 17th april
6:32 PM
And it didn't seem to have much crashes but it had some
Avatar
kk, thx! ill look into it now
Avatar
Appreciate it!
Avatar
@Pelayori I updated it, fixed a few things as well. Once the post gets approved it should show up there to download, i'll let you know once it goes through
Avatar
Will plugins compiled in C++ 20 Work with the api ?
Avatar
sure
nice 1
3:40 PM
How to solve this crash
4:31 PM
@Michidu
Avatar
substitute 5/8/2020 5:21 PM
@cokll That looks like a normal game crash
5:21 PM
why would he know how to fix that ?
5:22 PM
is UnknownModule!UnknownFunction (0x00007ffbf9555d50) + 0 bytes [UnknownFile:0] your plugin (?)
5:22 PM
if so, there is zero useful information here.
5:22 PM
We need to know the function UnknownModule!UnknownFunction (0x00007ffbf9555d50) + 0 bytes [UnknownFile:0] to see what the crash could be if it is your own plugin.
Avatar
😅 I try to remove the API and return to normal..
5:32 PM
The crash log is not associated with any plugins
Avatar
Try to verify files see if it helps
Avatar
Hello everyone.. Did anyone face such errors? I'm just updated ArkApi version and trying to build Atlas release version of my plugin. For Ark that works fine. 1>d:\projects\goglootbox\goglootbox\include\api\atlas\actor.h(251): error C2011: 'FSpawnPointInfo': 'struct' type redefinition 1>d:\projects\goglootbox\goglootbox\include\api\base.h(167): note: see declaration of 'FSpawnPointInfo' 1>d:\projects\goglootbox\goglootbox\include\api\atlas\actor.h(5905): error C2011: 'UShooterDamageType': 'struct' type redefinition 1>d:\projects\goglootbox\goglootbox\include\api\base.h(202): note: see declaration of 'UShooterDamageType' 1>d:\projects\goglootbox\goglootbox\include\api\atlas\actor.h(5982): error C2011: 'UPrimalDinoSettings': 'struct' type redefinition 1>d:\projects\goglootbox\goglootbox\include\api\base.h(197): note: see declaration of 'UPrimalDinoSettings' Actually, FSpawnPointInfo defined in base.h as follow: struct FSpawnPointInfo {}; and, actually, redefined in atlas\actor.h: struct FSpawnPointInfo { unsigned int& EntityIDField() { return *GetNativePointerField<unsigned int*>(this, "FSpawnPointInfo.EntityID"); } ... }; (edited)
12:37 PM
But it isn't redefined in ark\actor.h Do I misunderstand something or it's the Api problem?
Avatar
it's a header problem
12:49 PM
remove the definition ({})
Avatar
I put in a pull request to fix the issue weeks ago.
1:06 PM
The following struct&#39;s cause a &#39;struct&#39; type redefinition error when compiling an ATLAS plugin. Because they are defined in API\Atlas\Actor.h struct UShooterDamageType {}; s...
Avatar
That works, of course, thanks I thought I misunderstand something)
Avatar
Hi guys, I'm new to this discord and to c++ (not to programming though). I should start by thanking Michidu for the API and wetbatman for the doc that allows us to get setup with VS. I spent quite a bit of time looking at the API and some other source code to learn, and I managed to build my first plugin. Not doing much, mostly playing around and see what I can do. I could set the function to catch messages from the chat and I'm having a hard time with encoding issues. I see the message is a FString and as long as I keep it there everything is ok but I completely fail at printing it correctly to the console or the API log. I've tried so many things to convert it to a string and keep the encoding but I don't seem to be able to get it right... I'm working with characters that contain accents and weird stuffs, a testing string would be "çâ". Could someone point me to some cues please?
Avatar
FString.ToString()
Avatar
Yeah I tried that but it breaks the string, I get weird characters instead
6:35 PM
I also understand there is a difference between the data type (string, wstring, FString) and the actual encoding inside of it. I'm under the impression the FString containing the chat message is UTF-16. I guess what I'm trying to do is to get a printable string in UTF-8 I suppose.
Avatar
Look at these ArkApi::Tools::Utf8Decode() ArkApi::Tools::Utf8Encode()
Avatar
I saw these but it didn't work, I tried again and here are some examples of what I thought would be a very simple test: FString msg = "hello çàûéèï"; std:string msg_str = msg.ToString(); std::wstring msg_ws = ArkApi::Tools::ConvertToWideStr(msg.ToString()); cout << ArkApi::Tools::Utf8Encode(msg_ws) << '\n'; cout << ws2s(ArkApi::Tools::Utf8Decode(msg_str)) << '\n'; cout << ws2s(msg_ws) << '\n'; Log::GetLog()->info(ArkApi::Tools::Utf8Encode(msg_ws)); Log::GetLog()->info(ws2s(ArkApi::Tools::Utf8Decode(msg_str))); Log::GetLog()->info(ws2s(msg_ws)); They all display "hello ??????" 😦
Avatar
because you're using the non unicode logger
7:00 PM
😄
7:00 PM
wcout is unicode
7:00 PM
fuck
Avatar
also UTF8Decode is only useful if what you had initially was encoded ?
7:01 PM
which is probably not the case in your usage ?
7:01 PM
when loading configs for example that contain utf8 characters you'd use this
Avatar
right, and I didn't define anything. In my case I receive a FString from the chat callback function that contains a chat message. I don't know what encoding it's using, I was under the impression it was UTF-16 looking at some other code... but really not sure.
Avatar
should be UTF8
7:05 PM
FString has support for UTF8 built in
Avatar
Yeah I read that somewhere too, I'll keep it in mind thanks
7:06 PM
Ok, so I switched to wcout but I'm still getting the ??????
Avatar
ah you're storing a utf8 string right inside the project ?
Avatar
For instance: FString msg = "hello çàûéèï"; std::wstring msg_ws = ArkApi::Tools::ConvertToWideStr(msg.ToString()); wcout << msg_ws << '\n';
Avatar
there are some project settings you need to set to even get support for utf8 text inside a project
7:07 PM
i never got it to work
7:08 PM
but my customer compiled it on a chinese machine and utf8 worked right away
Avatar
I have two use cases, this test above where I'm trying to get the hand of the basics, and then handling the chat message
Avatar
so not sure what's up with that
Avatar
oh ok
Avatar
FString msg = "hello çàûéèï";
7:08 PM
this seems utf8 encoded
Avatar
I tried sending the FString to a mysql DB with just ToString() and it's all scrambled in there
7:09 PM
yeah
Avatar
His problem is likely the fact he was printing to the windows console
Avatar
yeah so I wanted to ask about that
Avatar
Which doesn’t support Unicode, it uses code pages
7:10 PM
I was wondering if it was fixed to something and none of my tests would ever work
Avatar
bool UpdatePlayerName(uint64 steam_id, const FString& player_new_name) override { try { return db_.query("UPDATE ShopRewards SET Name = '%s' WHERE SteamId = %I64u;", ArkApi::Tools::Utf8Encode(*player_new_name), steam_id); } catch (const std::exception& exception) { Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); return false; } } (edited)
Avatar
Try just writing the string to a file and see if it encodes correctly
Avatar
this works for me
7:10 PM
it inserts utf8 into DB (edited)
Avatar
You don’t have to use utf 8
7:11 PM
Unreal Engine uses utf 16 internally
Avatar
yeah, that's why I thought the FString I was getting was UTF-16, I also tried to send it as such to the DB but it's all scrambled in there, maybe the visualization is not right in workbench though... I also queried it and couldn't get a proper string, yet, I was printing in the console...
7:13 PM
Thanks guys, you gave me some stuffs to try
Avatar
Is your database using utf16
7:13 PM
utf16 isn’t the default character encoding
Avatar
No I don't think it is, checking...
7:16 PM
(writing that I start seeing another point I neglected...)
7:17 PM
yeah utf8....
Avatar
thanks again for the help, it helped me see I was building the query correctly so I started to look into how it was submitted to the DB. Long story short, turns out there is "charset" option when creating the mysql instance, I just set it to utf8 and it works now. daotk::mysql::connect_options options; options.charset = "utf8";
Avatar
👍
👍 1
Avatar
Nice, thanks for the update @FouFou I'm also a programmer looking into building some stuff with plugin API, that will help
Avatar
I'm glad it helps!
10:54 AM
also, I replaced the mysql API that came with ArkAPI with a newer version of it, there are some nice fixes and added support for the port in connect_options. I didn't check if "charset" was in the original version or came later... if it's not there, I'd suggest to use the newer implementation 😉
Avatar
How do you replace it? I'm just looking at setting up my environment now
Avatar
just include the new version of the library
Avatar
Can anyone think of a good place to find some demo HTTP client code? Looking to post some JSON data to an endpoint
Avatar
Think I've figured it out. Is there any way to get the current servers port?
Avatar
GormusSenex 5/11/2020 5:07 PM
c++ std::string GetServerPort() { // Get port number (format is <value>:<port>) FString fPort; ArkApi::GetApiUtils().GetShooterGameMode()->GetNetworkNumber(&fPort); // Regex port from string std::string port = fPort.ToString(); try { std::regex re(":(.*)"); std::smatch match; if (std::regex_search(port, match, re) && match.size() > 1) { return match.str(1); } } catch (std::regex_error & error) { Log::GetLog()->error(error.what()); } return port; }
5:07 PM
@arkin
Avatar
Thanks @GormusSenex much appreciated
Avatar
@WETBATMAN
🙏 1
6:49 PM
Later today, I may release a template project for the server api on Github that should compile once downloaded.
👍 1
Avatar
how to write safe threading for Network Connection(TCP/IP - local) with arkapi? currently i had some lagging, i'll hope solve it need urs recommendations (edited)
Avatar
(Not sure if it's just me, i tested it multiple times with the same outcome ) Note for anyone working with "AShooterGameState.AllowDownloadDino_Implementation" , the function isn't called just for downloading of dinos, it's called for both uploads and downloads causing bad values to be passed when it's called for dino upload
5:22 PM
Instead use AShooterPlayerController.ServerDownloadDino
Avatar
Morning all, I've created my first plugin but when I go to reboot the server I get "Unable to load .... Error code: 1114" , quick search of the forum states check JSON but I don't load a json file :/
Avatar
Onit the log ?
10:04 AM
Onit*
10:04 AM
....
10:04 AM
Init
Avatar
You've lost me? I'm new to this
10:05 AM
05/14/20 08:58 [API][warning] (API::PluginManager::LoadAllPlugins) Failed to load plugin - TestPlugin Error code: 1114
Avatar
Are you using the ark api logger ?
Avatar
Only to state the plugin is loaded, otherwise no
Avatar
You need to init the log
10:09 AM
Not on my PC ayl5m
10:09 AM
Atm*
10:10 AM
When you get the log there is a init function that takes a string as a parameter
Avatar
Ahhhhhhhh
10:10 AM
Log::Get().Init("")
Avatar
Yessir
Avatar
I have the wrong name in there 🙂
Avatar
That's the one make sure it's called I got that error for the same reason
Avatar
It's called, but with the wrong name, so I'll take a look - thanks Luka
Avatar
:+1:
Avatar
Not that, could it be because I don't have a PluginInfo?
Avatar
Give it a try it could be but I doubt it
Avatar
Nope, not that :/
10:30 AM
It's weird because plugins.load xx works
Avatar
then you use something which is not yet initialized on server load (edited)
Avatar
Ah, good one!
10:39 AM
Could that be the server port?
Avatar
And that was it - thanks.
Avatar
do you get it from GameMode ?
11:17 AM
if (ArkApi::GetApiUtils().GetStatus() == ArkApi::ServerStatus::Ready)
11:17 AM
check if the server is running on load
11:17 AM
make a function for getting server port
11:17 AM
and call it directly from here if server is running
11:18 AM
otherwise hook a function that's called when the server is about to fully init and get the game port
11:18 AM
void Hook_AShooterGameMode_InitGame(AShooterGameMode* a_shooter_game_mode, FString* map_name, FString* options, FString* error_message)
11:18 AM
this func is pretty good for that
Avatar
GormusSenex 5/14/2020 11:24 AM
I do it on the InitGame one, after calling "standard". Works fine.
Avatar
you don't call it from load ?
Avatar
GormusSenex 5/14/2020 11:28 AM
Hmm, now im not sure. Let me check...
Avatar
if you don't also call it from load, on loading while the server is running your server won't get the game port
Avatar
GormusSenex 5/14/2020 11:29 AM
No, calling it after InitGame(..)
11:30 AM
And I do get the game port
Avatar
yes but that hook won't be called if your plugin is loaded after the server has started
Avatar
GormusSenex 5/14/2020 11:31 AM
Im not following... ?
11:31 AM
I never had an issue calling it after InitGame
Avatar
that's not what i'm saying 😄
11:32 AM
if someone loads your plugin via plugins.load PluginName
11:32 AM
it won't get the game port
11:32 AM
because this function will not be called
11:32 AM
the server has already started
Avatar
GormusSenex 5/14/2020 11:32 AM
Who should that "someone" be ?
Avatar
maybe even you while testing 😛
Avatar
GormusSenex 5/14/2020 11:34 AM
I might not have made myself clear 😄 I'm hooking into InitGame and calls it in there, after calling super (ie. standard InitGame) 😉
11:34 AM
So it will always be loaded
11:35 AM
(calling super might be a bad word. That's what it's called in x++ when u call out and wait for standard to return 😉 )
Avatar
that's only true if your plugin is loaded normally, (on server startup)
Avatar
GormusSenex 5/14/2020 11:37 AM
I dont do reload if thats what ur referring to
11:37 AM
and isnt plugin-load-on-startup the only option to load a plugin besides reload ?
Avatar
yes that's what i was saying, reload wouldn't work unless you also get port from the load function if the server is already running
Avatar
GormusSenex 5/14/2020 11:39 AM
then we agree 🙂 and since i dont use reload, mine always work 🙂
Avatar
@WETBATMAN Appreciate the hook, I was looking for this and could not find. I've reverted to setting the port when it is first called then using the cached port on all subsequent. It is only first called when a player event happens to safe to say the port is available then 🙂
11:42 AM
In my case plugins.load was working because port was always available, plugin on server setup was failing because I was trying to get the port on init, and the port wasn't available
11:43 AM
It's like taking a step back in time doing c++ not sure how I feel about it lol
Avatar
GormusSenex 5/14/2020 11:43 AM
This is what I do: c++ void Hook_AShooterGameMode_InitGame(AShooterGameMode* a_shooter_game_mode, FString* map_name, FString* options, FString* error_message) { AShooterGameMode_InitGame_original(a_shooter_game_mode, map_name, options, error_message); Zones::ServerId = fmt::format(L"{0}:{1}", Helper::GetSetting_string("ServerIP").c_str(), Helper::GetServerPort().c_str()); } (edited)
11:44 AM
That's essentially what @WETBATMAN said I think
Avatar
GormusSenex 5/14/2020 11:44 AM
ye
Avatar
Can you explain what the .c_str() does, I'm struggling with the FString and such types a little
Avatar
GormusSenex 5/14/2020 11:44 AM
u can get server ip by calling out also, but i just keep it in a config. easier 😉
11:45 AM
c_str() turns it into an FString (or wide string to be exact i think - not sure - it works, soo 😉 )
Avatar
haha, that's pretty much how i've been winging it
😉 1
Avatar
GormusSenex 5/14/2020 2:49 PM
@WETBATMAN Do u know how to check whether or not a structure is inside a cave, ie. having added damage ?
Avatar
it should have it as a variable/field i'd check the APrimalStructure_TakeDamage function in IDA
Avatar
hey guys can anyone tell me what Killer->IsLocalController() does ?
Avatar
what is killer
Avatar
bool _cdecl Hook_AShooterCharacter_Die(AShooterCharacter* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser)
Avatar
bool __fastcall AController::IsLocalController(AController *this) { AController *v1; // rbx v1 = this; return TEnumAsByte<enum ESlateColorStylingMode::Type>::operator enum ESlateColorStylingMode::Type((TEnumAsByte<enum ETickingGroup> *)&this->RemoteRole) != 2 && TEnumAsByte<enum EMovementMode>::operator==((TEnumAsByte<enum EWorldType::Type> *)&v1->Role, Zeros); }
11:01 PM
this is the decompiled func but not fully sure what it does
11:01 PM
lol
11:01 PM
My first thought is it might be detecting if its the core killing the player e.g. they meshed or something
11:01 PM
just wanted clarification
Avatar
no
Avatar
where do you get the decompiled funcs from @WETBATMAN ?
Avatar
if world kills actor
11:02 PM
then it's DamageCauser
11:02 PM
stuff like Lava and c4 and stuff
Avatar
hmm ok
11:02 PM
Maybe someone on localhost, e.g. singleplayer?
Avatar
the decompiled funcs can be found in IDA
11:03 PM
I'm a newb to all of this
Avatar
yeah hex rays IDA PRO x64 decompiler
11:03 PM
magnet:?xt=urn:btih:169DFE1E10161FFA82B786BF89F05AEA6BCD4510&tr=http%3A%2F%2Fbt2.t-ru.org%2Fann%3Fmagnet&dn=IDA%20Pro%207.0.170914%20WIN%5CMAC%20x64%20%2B%20Hex-Rays%20Decompilers%20(x86%2C%20x64%2C%20ARM%2C%20ARM64)%20%5B2017%2C%20ENG%5D
11:03 PM
here 😛
Avatar
oooooh, interesting
Avatar
btw, why do you need this function are you trying to do something specific or just exploring ?
Avatar
A bit of everything, I'm going to start recording player and dino kills, with some specific information
11:04 PM
for a leaderboard/stats page
11:04 PM
(I'm primarily a web dev)
Avatar
ah sounds cool
Avatar
which brings me on to my next question, any info on what ->GetRidingDino() returns?
11:05 PM
Only thing I can find is that I can ...->GetDinoDescriptiveName() which seems to return name (Dino)
Avatar
there is a way to get blueprint
11:06 PM
ShopRewards plugin source has it
11:06 PM
let me find it
11:06 PM
FString GetDinoBlueprint(UObjectBase* dino) { if (dino && dino->ClassField()) { FString path_name; dino->ClassField()->GetDefaultObject(true)->GetFullName(&path_name, nullptr); if (int find_index = 0; path_name.FindChar(' ', find_index)) { path_name = "Blueprint'" + path_name.Mid(find_index + 1, path_name.Len() - (find_index + (path_name.EndsWith( "_C", ESearchCase::CaseSensitive) ? 3 : 1))) + "'"; return path_name.Replace(L"Default__", L"", ESearchCase::CaseSensitive); } } return FString(""); }
11:06 PM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Hmm, I'm looking to get level ideally, scouring all the available plugin sources myself
11:08 PM
anything core game cant seem to find any documentation on
Avatar
ShopRewards also gets level
11:09 PM
const int dino_level = char_comp->BaseCharacterLevelField() + char_comp->ExtraCharacterLevelField();
11:09 PM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
11:09 PM
here
Avatar
woop, thanks
Avatar
Morning all, I'm trying to limit my questions so apologies but there isn't a ton of documentation 😂
10:51 AM
*ArkApi::GetApiUtils().GetCharacterName(Player).Replace(L"{}", L"")
10:51 AM
I've not been doing the .Replace(...), is this essentially the same as .toString() ? (edited)
Avatar
are you trying to get an std::string of a player name ?
Avatar
I've no idea, I just see it a lot
11:47 AM
I am using the json.cpp helper, which wants a std::string
11:48 AM
So I use .ToString()
Avatar
yeah that's correct
11:57 AM
but what does the replace do?
11:57 AM
I see it a lot
Avatar
can you provide an example ?
Avatar
above^
12:07 PM
*ArkApi::GetApiUtils().GetCharacterName(Player).Replace(L"{}", L"")
Avatar
yes but where it’s used heh
12:08 PM
for (TWeakObjectPtr<APlayerController> PlayerCon : player_controllers) { AShooterPlayerController* Player = static_cast<AShooterPlayerController*>(PlayerCon.Get()); if (Player) Players += Counter++ == 0 ? FString::Format(L"{} ({})", *ArkApi::GetApiUtils().GetCharacterName(Player).Replace(L"{}", L""), ArkApi::GetApiUtils().GetShooterGameMode()->GetSteamIDForPlayerID(Player->LinkedPlayerIDField())) : FString::Format(L", {} ({})", *ArkApi::GetApiUtils().GetCharacterName(Player).Replace(L"{}", L""), ArkApi::GetApiUtils().GetShooterGameMode()->GetSteamIDForPlayerID(Player->LinkedPlayerIDField())); }
12:08 PM
looks like an RCON reply
Avatar
it's used for format in this case
12:11 PM
.ToString() is all you need to convert into std::string from FString
Avatar
c++ bool Hook_AShooterCharacter_Die(AShooterCharacter* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) { // ... const uint64 killer_steam_id = ArkApi::IApiUtils::GetSteamIdFromController(Killer); AShooterPlayerController* killer_controller = ArkApi::GetApiUtils().FindPlayerFromSteamId(killer_steam_id); auto* killer_primal_character = static_cast<APrimalCharacter*>(killer_controller->CharacterField()); UPrimalCharacterStatusComponent* killer_char_component = killer_primal_character->MyCharacterStatusComponentField(); // The bit below is wrong if the player is riding a Dino... int KillerPlayerLevel = killer_char_component->BaseCharacterLevelField() + killer_char_component->ExtraCharacterLevelField(); } (edited)
3:02 PM
On this hook, if the player is riding a dino, I get the dino level and not the player.
3:02 PM
Is there any way to get the player level? It all looks correct to me.
3:03 PM
The function is larger, I've removed unrelated code.
Avatar
@substitute Bit late since i haven't worked on it but i did as you described here https://discordapp.com/channels/513432877904691202/513432877904691205/701274688063799318 and not too sure what to grab onto , Any tips ?
Avatar
what is on line 31 in JMNTransferHooks.cpp (edited)
Avatar
It was the throw; statement
6:32 PM
to make it crash so i could get the call stack
6:32 PM
Im trying to get something that even has a hint as to what server a player is traveling to in clustered servers
6:33 PM
That's one of the functions that gets called during said process
6:33 PM
AShooterPlayerController_ServerRequestDownloadPlayerCharacter_Implementation , AShooterPlayerController_IsValidArkTributePlayerDownloadForThisServer , AShooterPlayerController_ClientPlayerIsValidToDownload_Implementation are all not even called before, during, or after the server travel
6:34 PM
Assumed they would since they all have a FArkTributePlayerData param in them
Avatar
execServerUploadCurrrentCharactetAndItems
6:54 PM
@KillZone
6:54 PM
That seems to be the upload , it could be possible if that isn’t working for you then
6:54 PM
It is possible you’re hooking too high in the stack
6:55 PM
What I mean is you want to find B in this A>B>C (edited)
6:55 PM
But your hook , H is placed here
6:55 PM
A>H>B>C
6:55 PM
You may have to keep looking
6:56 PM
I can look
Avatar
Possible, il try hooking onto something lower , maybe the regular function without the _implementation
Avatar
UPrimalLocalProfile::AddArkTributeItem
7:19 PM
for item upload @KillZone
7:21 PM
UPrimalLocalProfile::AddArkTributePlayerData is for player character
Avatar
Did you dig it up in IDA ?
Avatar
yes
7:22 PM
Looks like there is no escape from using IDA
7:23 PM
Yeah will give it a shot in a hot sec need to wait for the server to boot
7:29 PM
Er what address is it at ?
7:29 PM
The function
7:31 PM
Found it
Avatar
The API doesn't seem to have a struct defined for ArkItem correct ? (edited)
Avatar
not all structs are dumped
Avatar
Any hints on how i can get the definition of ArkItem ? ...
Avatar
you need IDA
Avatar
Got that
Avatar
under local types find it and click edit
7:58 PM
8:05 PM
Doesn't appear to show in there , il keep looking
Avatar
then it doesn't exist
Avatar
Think i found what it might be /* 24665 */ struct __cppobj FArkInventoryData { TArray<FArkTributeInventoryItem,FDefaultAllocator> ArkItems; TArray<FARKTributeDino,FDefaultAllocator> ArkTamedDinosData; TArray<FArkTributePlayerData,FDefaultAllocator> ArkPlayerData; }; I created a header file containing all the structs that's the only place it's defined as "ArkItems"
8:11 PM
Will pass that to declare hook il report back if that works
Avatar
you can add it into API headers
8:12 PM
they're local to every plugin anyway
Avatar
Will do
Avatar
@WETBATMAN
8:28 PM
wrote my own FMemory class
8:29 PM
with templates
8:30 PM
res->Data = FMemory::Realloc(res->Data, size, 0);
8:30 PM
template <typename T> static T Realloc(T Original, size_t Count, unsigned int Alignment) { return (T) Realloc(Original, Count, Alignment); }
Avatar
Hey, does anyone own RPS plugin here?
Avatar
If someone can help me, I bought the RPS plugin from https://ark-server-api.com/resources/rps.113/ - The support button takes me to discord.me where I should be able to join owners discord, which seems to have expired. And the guy did not get on the api site for over a month lol. Could really use an invite
Player has own progress based on actions Current available actions: Harvest: when player do harvest Kill: when player kill character/structure Ride: when player ride on dino Tame: when player tame dino To understand how it works we'll use...
Avatar
ImpishNymph 5/17/2020 7:41 AM
I have a question about conflicting plugins. If anyone is available to help me?
Avatar
ImpishNymph 5/17/2020 8:04 AM
I am running ark api. I have these plugins and one of them is crashing my server and I can't figure out which one. Its so bad now that my servers won't even boot up anymore. AllEngrams, ArkAdvert, ArkShop, DinoColors, DinoColourcommand, ExtendedRcon, KillFeed, Lottery, Mutes, NameControl, NewPlayerProtection, NoWander, Permissions, PointLimiter, PrivateMessage, StructureLimit, TribeSlotCooldown, & VoteRewards. I know its not ArkShop or Permissions as the server will run great with just those two. But one of the other ones is causing issues.
Avatar
remove all
8:46 AM
install one at a time until crashes
thistbh 2
Avatar
ImpishNymph 5/17/2020 8:49 AM
Thats what I'm doing right now
Avatar
GormusSenex 5/17/2020 2:22 PM
18 plugins damn !!
Avatar
ImpishNymph 5/17/2020 6:27 PM
Down to 12 now. Couldnt figure out which one was the issue.
Avatar
Nothing in the logs?
6:31 PM
Or the crash message?
Avatar
ImpishNymph 5/19/2020 1:33 AM
No, I use host havoc so there is no logs or crash messages. Servers wouldn't load at all.
1:34 AM
I'm running into a new problem where Structures Limit isn't working. It recognizes foundations and walls but not blueprint paths.
1:34 AM
So frustrated.
Avatar
GormusSenex 5/19/2020 10:26 AM
@ꐕꐕ what isnt working ? (its not my plugin tho)
10:26 AM
im guessing its the collect thing that isnt working
Avatar
so, could someone help me make a "hello world" pretty much, i want to use VSCode and i just want to learn how to compile the code for arkapi
Avatar
GormusSenex 5/19/2020 10:27 AM
have u checked the #deleted-channel ?
Avatar
nope
Avatar
GormusSenex 5/19/2020 10:28 AM
wrong channel
10:28 AM
anyway in one of those channels theres a well explained how-to
10:29 AM
check them all and u'll find it
10:29 AM
i cant remember which one
10:29 AM
ahh, top post in #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ
Avatar
thanks
10:33 AM
i have a pretty basic need, i have DiscordIntegrator by Wooly, and just installed KillFeed, i'm trying to make the chat messages from the killfeed be captured and sent to discord by DiscordIntegrator, can i make this modifying KillFeed which is opensourced?
Avatar
GormusSenex 5/19/2020 10:35 AM
None of Wooly's code is open source afaik
Avatar
i know, but KillFeed is opensourced, so i'm guessing that probably the SendMessage call it makes i can change that to try to make a message that simulates being a player's message or something so Wolly's plugin catches it
Avatar
GormusSenex 5/19/2020 10:36 AM
I dont know how Wooly made his discord integrator, but it isnt hard to make ur own
Avatar
No point really talking from one plugin to another, just implement the discord stuff into your own
Avatar
i have very little experience on Windows's and C++ sorry
Avatar
GormusSenex 5/19/2020 10:36 AM
basically just capture all messages and send it to the discord url
10:37 AM
then u got a mountain ahead of u 😉
Avatar
Any coding skills @Hsilamot ?
Avatar
yeah i know, and the chance i need is, like nothing and i would like to avoid having to do all that work xD
Avatar
GormusSenex 5/19/2020 10:37 AM
pay some india coder to do it. prolly 10$ max 😉
Avatar
yeah, plenty, i'm pretty sure i can do the discord bot, idk in 1 week or two learning all the basics of c++ and stuff
10:38 AM
You know where i can find one?
10:38 AM
like, i really really have a lot of needs and i'm depending a lot on wooly's plugins atm xD
Avatar
GormusSenex 5/19/2020 10:38 AM
i was jk'ing 😉 dont think any1 offers to code in ark plugin for 10$ :p
Avatar
well, proably not 10
Avatar
@Hsilamot I've been using ownprox and michidus plugins to piece together my own, its a good starting point
Avatar
GormusSenex 5/19/2020 10:39 AM
ye
Avatar
i started about 2 weeks ago, no prior c++ knowledge, but coding skills
10:39 AM
i have a fully working plugin now
10:39 AM
few hours max spent
Avatar
i already have an infrastructure but i want to focus more on selling and creating the ideas than coding
Avatar
GormusSenex 5/19/2020 10:39 AM
😉
Avatar
heh i bet, i'd love to do that too
Avatar
Like, right now i have a pretty complex setup
Avatar
GormusSenex 5/19/2020 10:40 AM
plz dont say 18 plugins 😄
Avatar
i use woly's bot to send the ingame messages to MySQL and from there i have a Discord bot that does the sync
10:40 AM
Basically if your name in Discord is "A" and in game is "B", then you speak in discord in game appears as "B" and vice-versa
Avatar
Did you code the discord bot?
Avatar
yep
Avatar
Ah man, you are half way there
Avatar
GormusSenex 5/19/2020 10:41 AM
ohh nice. so u send discord message back to the server ?
Avatar
yes, from discord back to ark
Avatar
GormusSenex 5/19/2020 10:42 AM
i only made from ark -> discord not vice versa
Avatar
people have been asking for the killfeed but i want to make it global
Avatar
GormusSenex 5/19/2020 10:43 AM
dont u get a lot of spam if ppl can write in discord to the server ??
Avatar
well my community is small, about 1k people so, chat is active, but not overwelming
Avatar
GormusSenex 5/19/2020 10:43 AM
kk
10:44 AM
ig u dont got all the toxic kids then 😂
Avatar
oh no no, i have a great Admin team, they keep them under check
👍 1
10:45 AM
i'm not talking like banning or muting i'm talking about destroying them on ark pvp xD lol
10:45 AM
community loves seeing toxic kids ragequitting the server
Avatar
GormusSenex 5/19/2020 10:45 AM
hmm... admin abuse im guessing ? dont like that - at all
Avatar
no, that's the great part, basically they're really good at the game
Avatar
GormusSenex 5/19/2020 10:46 AM
ofc they r... they r admins 😂
Avatar
some conflicts have been taken up to officials with the same results
Avatar
GormusSenex 5/19/2020 10:46 AM
😉
Avatar
people always call out admin abuse for loosing that hard but they loose all the same on officials so, well , game stories and what not
Avatar
GormusSenex 5/19/2020 10:47 AM
😂
Avatar
curiously, i have joined several ark related discords, but i don't see "aceman" here, i think i have seen him on a lot of servers
Avatar
GormusSenex 5/19/2020 10:48 AM
ive been admin abused on official twice... they came in, found us, and dev wiped us 😂
Avatar
i have heard of that but haven't seen it personally
Avatar
GormusSenex 5/19/2020 10:48 AM
no more xbox ark for me hahaha
Avatar
shame that happens on officials
Avatar
GormusSenex 5/19/2020 10:48 AM
2 banned acocunt and im out 😄
Avatar
you got banned?
Avatar
GormusSenex 5/19/2020 10:49 AM
i have a clip of the one time where i was looking in our vault... and then vault and entire base was gone... and i died... did not know what happend until i saw an admin notification 😄
10:49 AM
small tribe official on valguero 2 montgs in 😄
10:49 AM
months*
Avatar
What i have seen is people abusing the report system and doing false claims to get adminwipes on enemies
10:50 AM
but, wildcard will be wildcard and god bless private servers
Avatar
GormusSenex 5/19/2020 10:51 AM
no, it wasnt a false report by our "enemies". it was true. but i never heard of that rule actually being followed. On small tribes u cant team with others, but ppl do it everyday. so did we. so did our enemies (we just didnt report it). then apparently wildcard thought that now was a good time to enforce the rule and they dev wiped us for teaming. never heard of any1 getting dev wiped for that be4 and since...
Avatar
ahh
Avatar
GormusSenex 5/19/2020 10:51 AM
thats when i quit xbox
Avatar
i have heard of it multiple times, but i blame it on the statistics and capacity of wildcard
10:52 AM
like, if i have a rule and i don't have enough Admins to enforce it all trough my servers, when, i probably only enforce it on 10% of the population at a time
Avatar
GormusSenex 5/19/2020 10:52 AM
ye on pc. but not on xbox
Avatar
so it becomes a matter of luck and from any normal Person's POV it's never going to get banned from that
Avatar
GormusSenex 5/19/2020 10:54 AM
i also told my kids "no more xbox - we going pc" and we sold our 5 xbox's haha. my wife was happy to begin with, but now we all got pc and she's back to square one 😄
Avatar
smart move, xboxes are awful (edited)
Avatar
GormusSenex 5/19/2020 10:54 AM
yup
Avatar
my friends played ARK on xbox so I joined them
10:55 AM
lasted a day
10:55 AM
what a different experience
Avatar
yeah, i purchased mine, never use it and i regret the purchase
Avatar
GormusSenex 5/19/2020 10:55 AM
i still play ark with a controller tho 😄
Avatar
i had high hopes for the kinect
Avatar
@Hsilamot I got live kill feed to website working on my community and realtime player log
10:55 AM
spent max 10 hours of something with the help from this channel too
Avatar
GormusSenex 5/19/2020 10:55 AM
u cant shake 4 yrs of ark on controller easily off 😉
Avatar
player log?
Avatar
join/part
Avatar
ahh i have that already
10:56 AM
all realtime, no refresh needed
10:56 AM
kills appear in cluster events
10:56 AM
including dino kills
Avatar
you can do that just with RCON
Avatar
not in realtime
10:56 AM
you have to ping rcon every <x> seconds?
Avatar
pretty much
Avatar
yea didn't fancy that
Avatar
on my integration the info is also pushed to the Mysql server
Avatar
our servers send events when they happen so im not pinging endlessly
10:57 AM
I ping once every 15 minutes to make sure data is accurate
10:57 AM
also get global chat into database
10:57 AM
just need to filter out commands lol
Avatar
lol
10:58 AM
i don't want to put too much time into this, like, i already do programming for a job, not really on the mood to code more xD
Avatar
heh, so you want to pay someone?
Avatar
well, if he's not gonna charge me like 300 usd for that yeah
11:00 AM
i have plenty of ideas for like a "centralized" plugin for my servers, and i could pay something "normal" idk
Avatar
well it's your best bet, i'd contact plugin authors maybe even wooly that you mentioned, asking about paying for something
11:01 AM
bc you don't want to learn/code yourself
Avatar
he doesn't seem interested at all and i think i suggested the idea to webtatman i think it's the name
11:02 AM
but yeah, i guess that if i don't find anyone i'm gonna have to do it myself
Avatar
👉 @WETBATMAN
Avatar
yup
11:03 AM
the tutorial seems pretty straight forward tho, i don't like having to download another IDE tho xD i like the simplicity of VsCode
Avatar
the IDE will help, you are going to get build errors
Avatar
yeah and i guess it's going to be way more complex to compile using just vscode
11:04 AM
since i'm guessing that i need to use .net framework's executables to do it
Avatar
I've not idea, but in terms of getting started there is a youtube video which helps you set up paths to the libs you need
Avatar
how familiar are you with Windows's API?
Avatar
then you build, and copy the .dll into the plugin directory
Avatar
yeah i was reading the doc tutorial with the instructions, seems pretty straight forward
Avatar
I'm the wrong person to be asking, I use and develop on a Mac, only game on a windows PC lol
Avatar
lol
Avatar
GormusSenex 5/19/2020 11:09 AM
ok ok ok, ill do it. not charging 300$ an hr. only 250 😂
11:10 AM
😉
Avatar
lol xD, hope you can do a lot in one hour
Avatar
GormusSenex 5/19/2020 11:38 AM
not rly. im a c++ noob too. everything takes forever to make for me 😄
Avatar
You don’t need visual studio
7:35 PM
Code will work fine as long as you have a c++ compiler
7:36 PM
There is no need to bring .net dependencies in
7:36 PM
Are you a web developer? @Hsilamot
Avatar
Yes
Avatar
Guessed so
Avatar
why is that?
Avatar
Visual studio code but no visual studio
3:07 AM
Also the small confusion between c++ and .net framework requirement
Avatar
As fas as i know .net has a c++ compiler
Avatar
Yes but basically no one uses it
3:14 AM
If you mean the managed c++
3:14 AM
Visual studio has a compiler for c++ but it’s not dependent on .net
Avatar
ah, i tought .net had a compiler itself
Avatar
can anyone point me in the direction of a hook for tribe logs?
9:40 AM
not the data, but more the event when a new log entry is posted
Avatar
#【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ
12:34 PM
Do you know the hook name ?
Avatar
no, there are guides on how to find them
Avatar
Yeah, I've tried with no luck so far
1:30 PM
I just thought someone might know as I assume its a hook because I see a discord tribe log, but can't find the source for it
Avatar
you can recompile the API to print what hooks it creates and then load that tibe log relay plugin 🤷‍♂️
Avatar
Interesting, thanks
1:33 PM
Do you have any idea @WETBATMAN ?
Avatar
you can search by name
Avatar
evil idea^^ probably you need this hook: AShooterGameMode::AddToTribeLog
Avatar
sounds fairly obvious then, let me try again
1:35 PM
oh ok thanks @Michidu I'm pretty sure one of my searches was "TribeLog"
1:35 PM
hmm :/
Avatar
why is it evil ? XD
Avatar
can see hooks from any plugin, lol
Avatar
haha yea it's the point XD
Avatar
Yeah, I get what he means, there is a certain amount of reverse engineering I probably could have done, but this C++ is all a bit new for me
1:37 PM
So just thought someone might be able to give me a keyword as you did @Michidu so cheers, and nice work on the plugin API 👍
1:38 PM
Btw that came up straight away 😊 so obvious, Github search failed me I think
Avatar
jeppekroezen 5/23/2020 6:48 PM
Hi guys, some players cant see their kits? sometimes they can, sometimes they cant. Any ideas how to fix this?
6:49 PM
or what is causing this
Avatar
jeppekroezen 5/23/2020 6:58 PM
arkshop btw
Avatar
Check Permissions
Avatar
jeppekroezen 5/23/2020 7:03 PM
but he likes sees none of the kits,
7:03 PM
i have a lot of default kits also, and his permissions also are correct
Avatar
Can StructuresLimit plugin be reloaded in runtime?
Avatar
plugins.unload & plugins.load ?
Avatar
I mean if it uses timers cause don't want servers to crash 😛
Avatar
I have an issue with a plugin i developed. mostly rubber ducking here, but i have it installed on two servers. the one server it works
12:31 AM
the other server throws error 126
12:31 AM
the only thing it references at all is Permissions, and that is installed and identical on both servers
12:31 AM
anyone experienced something like this before?
Avatar
Missing dependency VS Runtime or plugin
Avatar
they're both hosted through the same service, hosthavoc. I'd need to install the VS Runtime on their server, then?
12:35 AM
or have them do it?
Avatar
126 is dependency issue
Avatar
Its odd, because that server it doesn't work on is running ARKShop, ShopRewards and ARK MAGA.
12:36 AM
Compiles and runs on my test server, loads up fine and works.
12:38 AM
Sorry, I am listening. I know 126 is dependency, I just can't figure out why it works on one place and not the other when everything is seemingly identical
Avatar
What VS version is the plugin compiled with?
Avatar
VS2019 with C++ Language standard set to 120 c++17 standard
12:39 AM
set to ISO** not 120
Avatar
So, if you have the permission plugins on both servers the only difference is probably the runtime files are not on the server that doesn't work. (edited)
Avatar
yeah so being a commercial provider, I'd have to open a support ticket to have the VS runtime installed
12:43 AM
is it recommended to use VS2019 for API development or should I be using an older version?
Avatar
I use VS19 for mine.
Avatar
vs2017 is fine
Avatar
alright, thanks. So I've either gotta get that runtime installed or recompile in VS2017 I guess.
Avatar
I think you can just retarget your plugin to 2017 via the Platform Toolset in the project properties
Avatar
trying to find that platform toolset right now
12:58 AM
so i dont have to install a whole new version of VS lol
Avatar
Hello 👋
Avatar
Is AgitoReiKen still active in the ASI community?
Avatar
Quick sanity check, im writing a custom hook not defined in the API for eggs, is this correct ? C++ struct ABiomeZoneVolume {}; struct ADroppedItemEgg : ADroppedItem { TSubclassOf<APrimalEmitterSpawnable> SpawnDinoEmitter; float IndoorsHypoThermalInsulation; float IndoorsHyperThermalInsulation; float EggThermalInsulationTemperatureMultiplier; unsigned __int32 bIsEggTooHot : 1; unsigned __int32 bIsEggTooCold : 1; ABiomeZoneVolume* MyBiomeZone; long double LastInsulationCalcTime; float HyperThermalInsulation; float HypoThermalInsulation; }; DECLARE_HOOK(ADroppedItemEgg_Tick, void, ADroppedItemEgg*, float); void Hook_ADroppedItemEgg_Tick(ADroppedItemEgg* _this, float deltaSeconds) { Log::GetLog()->info("Called egg tick!"); ADroppedItemEgg_Tick_original(_this, deltaSeconds); } ArkApi::GetHooks().SetHook("ADroppedItemEgg.Tick", &Hook_ADroppedItemEgg_Tick, &ADroppedItemEgg_Tick_original); ArkApi::GetHooks().DisableHook("ADroppedItemEgg.Tick", &Hook_ADroppedItemEgg_Tick); (edited)
6:12 PM
That compiles and runs, main issue is it's never called
6:12 PM
Which i dont think is possible unless there is a issue with the code
Avatar
uh
6:13 PM
it should be called
6:14 PM
as for the args, I don't know about minhook, but Detours doesn't care if they don't match (though it could cause problems)
6:14 PM
2 things
6:14 PM
is the log init'd
6:14 PM
and sethook and disablehook happen in load/unload right
Avatar
Log is initiallized and yes to the load unload
6:15 PM
There are other hooks that get loaded / unloaded i just put that one in aswell
Avatar
Can you scaffold your own C++ project using Detours?
6:15 PM
You could always try to find the function address with Detours to see if it can be found.
Avatar
Not familiar with what Detours is
Avatar
Detours is a function hooking library similar to minhook, just by Microsoft.
6:16 PM
minhook is actually an alternative made because Detours used to cost a lot of money for x64
6:16 PM
(it's free and open source now)
Avatar
Ah was that the one that was recently open sourced ?
6:16 PM
Ye 😄
6:17 PM
Man i do not look forward to adding that in
Avatar
PVOID ownsDLC = DetourFindFunction("ShooterGame.exe", "ADroppedItemEgg::Tick");
6:17 PM
would be to see if Detours can find it
6:17 PM
it's easy to add if you use Visual Studio
Avatar
I do
6:17 PM
6:17 PM
(click install where my uninstall button is)
6:18 PM
then just #include "detours.h"
Avatar
Il give it a spin thanks allsmilesg , if i get it to work il see if i cant make a google doc
Avatar
I would remove Detours from your final plugin if you can confirm that the function exists
6:18 PM
Having two hooking libraries is a bit redundant
6:18 PM
But, again it can be useful for testing.
Avatar
Will do, thanks substitute 😃
Avatar
#pragma once #include "detour.h" bool Detour::OnFailure(std::string message) { DetourTransactionAbort(); //Force abortion of any possible detour transaction. #if _DEBUG printfn("Unable to create detour, %s!", message); #endif return false; } bool Detour::Create(void* function, void* callback) { if (DetourTransactionBegin() != NO_ERROR) return Detour::OnFailure("Begin Failure."); if (DetourUpdateThread(GetCurrentThread()) != NO_ERROR) return Detour::OnFailure("Unable to get Thread."); if (DetourAttach((PVOID*)function, callback) != NO_ERROR) return Detour::OnFailure("Unable to Attach."); if (DetourTransactionCommit() != NO_ERROR) return Detour::OnFailure("Unable to Commit."); #if _DEBUG printfn("Successfully Created Detour."); #endif return true; }
6:20 PM
a CPP file to make a detour easily.
6:20 PM
You'll need to define printfn though
6:20 PM
#pragma once #define printfn(format, ...) \ printf(format"\n", ##__VA_ARGS__)
6:21 PM
oh, and printfn("Unable to create detour, %s!", message); should be printfn("Unable to create detour, %s!", message.c_str()); 😅
6:21 PM
To use, just Detour::Create(&FunctionToBeHooked, YourCallback);
6:22 PM
#pragma once #include <vector> #include <Windows.h> #include <detours.h> #include <string> #include "macro.h" class Detour { static bool OnFailure(std::string); public: static bool Create(void* function, void* callback); };
6:22 PM
you'll need the header too
6:22 PM
I haven't packed it all into a single header file yet
6:22 PM
#include "macro.h" is the printfn, you can remove it.
Avatar
Big thanks , will test it and write it up
Avatar
The following struct&#39;s cause a &#39;struct&#39; type redefinition error when compiling an ATLAS plugin. Because they are defined in API\Atlas\Actor.h struct UShooterDamageType {}; s...
Avatar
@KillZone I'm in rabbit hole myself
Avatar
Ah i can see someone else is also investigating 😄
6:24 PM
man i miss python
Avatar
I'm writing a general purpose Direct X hooking library
Avatar
Oh boy
Avatar
Supports DX8,DX9,DX10,DX11,DX12
Avatar
Yeah if you do manage to pull that off i imagine alot of interested parties
Avatar
If you know the DX version you can call a specific DX wrapper, otherwise there's an implicit system
6:25 PM
the implicit system just installs a hook for all DX versions, and the first to have a endscene/present is then used as the version (and the others are unloaded)
6:26 PM
DX<DXX>::initialize(); for any vesion DX<D9>::initialize(); for D9 (edited)
6:26 PM
DX<T> is a template to get a static context of the system.
6:26 PM
MadLaugh
Avatar
Think you might run into issues with DX12 ik Microsoft used it as promo for switching from Win7 to 10
Avatar
I am on Windows 10
Avatar
Way back when
Avatar
is one of the most clever things I have ever read about
6:27 PM
creating a singleton in a threadsafe way
6:27 PM
with a "magic" static
6:28 PM
(a static in a function is only loaded on first function call, and is never recreated)
6:29 PM
Everything past that point is going into therapy sessions level (edited)
Avatar
That was just some aids code to get the instance of an API in a static method
6:29 PM
since function hooks can't be non-static (or rather, they can't be members of a class)
6:30 PM
Python defo spoiled me
6:30 PM
&& Java
Avatar
Well, they can't because functions that are members of classes
6:30 PM
have an implicit parameter
6:30 PM
the this parameter
6:30 PM
how could a function hook pass a valid instance of your object 😉
Avatar
don't be scared of big pointers
6:31 PM
PeepoEvil
Avatar
Best of luck with figuring that out, you could write alot of "wrappers" with it if you do assuming you get past the initial security checks games create
Avatar
?
6:34 PM
what security
Avatar
Escape from tarkov has a security measure in place for reading from memory when the game is running
Avatar
You mean anticheats
6:36 PM
That's not the goal of this
6:37 PM
anyways
6:37 PM
here's it working with a DX9 game
Avatar
Well that's the only thing that came off the top of my head for writing a hookable DX library but then again it's not all there is
Avatar
@substitute Ok so after implementing that C++ Class for creating detours my code is like this, C++ struct ABiomeZoneVolume {}; struct ADroppedItemEgg : ADroppedItem { TSubclassOf<APrimalEmitterSpawnable> SpawnDinoEmitter; float IndoorsHypoThermalInsulation; float IndoorsHyperThermalInsulation; float EggThermalInsulationTemperatureMultiplier; unsigned __int32 bIsEggTooHot : 1; unsigned __int32 bIsEggTooCold : 1; ABiomeZoneVolume* MyBiomeZone; long double LastInsulationCalcTime; float HyperThermalInsulation; float HypoThermalInsulation; }; DECLARE_HOOK(ADroppedItemEgg_Tick, void, ADroppedItemEgg*, float); void Hook_ADroppedItemEgg_Tick(ADroppedItemEgg* _this, float deltaSeconds) { Log::GetLog()->info("Called egg tick!"); ADroppedItemEgg_Tick_original(_this, deltaSeconds); } void Testing(RCONClientConnection* cl, RCONPacket* pckt, UWorld*) { try { Log::GetLog()->info("Called!"); Detour::Create(&ADroppedItemEgg_Tick_original, &Hook_ADroppedItemEgg_Tick); } catch (const std::exception & error) { Log::GetLog()->error(error.what()); } } // These 2 functions are in Load&Unload just dropped in here for example sake ArkApi::GetHooks().SetHook("ADroppedItemEgg.Tick", &Hook_ADroppedItemEgg_Tick, &ADroppedItemEgg_Tick_original); ArkApi::GetHooks().DisableHook("ADroppedItemEgg.Tick", &Hook_ADroppedItemEgg_Tick);
10:43 PM
Sorry for the wall of text
10:43 PM
Detours::Create returns true in creating the hook i just have it be created it in a rcon client command
Avatar
I would really either be using detourfindfunction or printing the address after creation
10:45 PM
simply to check if the function was found
Avatar
C++ PVOID ownsDLC = DetourFindFunction("ShooterGame.exe", "ADroppedItemEgg::Tick"); std::cout << ownsDLC prints just a bunch of zeros
Avatar
0s means it didn’t find the function
11:35 PM
It’s a nullptr
11:36 PM
Rather did you init the value with something like detour find function ?
11:37 PM
Also you shouldn’t mix the two libraries
Avatar
I want to make blueprints a "permanent" part of a crafting station. For example, I want to place a smithy, then put in a flak chestpiece and a longneck, and have the plugin prevent the player from removing the blueprints from the crafting station. I have two possible hooks: Hook_UPrimalInventoryComponent_RemoveItem(UPrimalInventoryComponent* _this, FItemNetID* itemID, bool bDoDrop, bool bSecondryAction, bool bForceRemoval, bool showHUDMessage) bool Hook_UPrimalItem_RemoveItemFromInventory(UPrimalItem* _this, bool bForceRemoval, bool showHUDMessage) The first one is based on the inventory component removing an item, and the second is based around the item. Is it possible to use that itemID to look up the Item and do a check on "bIsBlueprint" to prevent the moving of that item?
3:44 PM
For the inventory component hook, I can check if "_this" is my special designated crafting station. I'd need to differentiate between crafting materials to make the BP and the BP itself.
Avatar
Couldn't a player destroy the crafting station @Ras ?
Avatar
plugin interrupts those hooks for things I define as "base components"
5:32 PM
its part of an overall larger plugin I'm making with capturable bases
5:35 PM
Right now, I can define a "sphere of influence" for a base. Then define components (vanilla metal walls/cielings/foundations/any structures I want). Components cannot be built, picked up or destroyed. They're the "Shell" of the base I want to be permanent. A special type of component is defined as a "Capture point" (transmitter, single panel flag, taxidermy base, whatever). Damageable, but indestructible. Once "Destroyed", i interrupt the "Die" hook to stop it from being removed and instead flipping all structures in the "Sphere of Influence" to the attackers' tribe
5:35 PM
The "Locked" BP would be in a crafting station defined as a component and give reason to owning the base. In order to make a really good fabricated sniper, you'd have to own the base AND craft it there.
Avatar
Nice idea, makes sense
Avatar
@substitute I managed to get it to work, i would up taking @Lethal 's branch (https://github.com/Michidu/ARK-Server-API/pull/36) implementing ADroppedItemEgg Tick and BeginPlay function ( will implement a few remaining a make a pull request on lethal's branch to finish the ADroppedItemEgg struct ). They key to solving it was adding in a PdbConfig.json { "structures": [ "ADroppedItemEgg" ] } without that defined inside the root of the plugin you are working on or inside ShooterGame\Binaries\Win64\config.json it wont let you hook onto it for reasons i dont yet know; Once that was added in it started to spit out log messages. Special thanks to @Lethal wouldn't have figured it out without him peepoheart
Avatar
this is because the struct doesn't exist in the API's config.json
8:47 PM
for this reason i recommend you turn on DumpAll for testing servers
8:48 PM
it increases boot time so for regular users it's not of much use
Avatar
Yep was instructed to do that aswell
Avatar
Left out: // void execNetSpawnDinoEmitter(FFrame &,void * const) Since FFrame Definition doesn't exist
3:23 PM
Should be fully implemented now, compiles successfully
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/29/2020 10:48 AM
Does anybody know if there is a way to obtain / create a UShooterCheatManager without having a player to get it from? Already tried UShooterCheatManager* cheatManager = ArkApi::GetApiUtils().GetShooterGameMode()->GlobalCommandsCheatManagerField(); But it always returns a nullptr
Avatar
hey guys, does anybody here have some experience with steam web api ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/29/2020 12:04 PM
Im not an expert but I did some requests 😄
Avatar
well what i m working on, i have a discord bot to querry servers, and I'm trying to identifie thous people with 123 on the server
12:05 PM
i got this working
12:07 PM
I can add servers into the bot + also enemy players and allied players but i have got problem identifing those 123. Query returns this kind of information about that server
12:10 PM
sadly it won't say the steamIDs of thous players and only request that can return serverIp where the player is playing is getPlayerSummaries but that will give you that data based on profile setting
Avatar
Unless you own the server @Jenda I'm pretty sure that's all the info you can get...
Avatar
well i have seen 1 bot that can do it
12:11 PM
Eye of Sauron is momentaly only bot that is able to identifie 123 players. I kinda wonder how, becous that kind of information is possible to get trought RCON only if I'm not misteaken
Avatar
If you could get more i'm sure the big services like Battlemetrics would have done it long ago
Avatar
wam i will send it here
Avatar
Iirc there are some functions I saw in IDA that handle steam related stuff like achievements , you might find it there
Avatar
@arkin @Jenda
6:00 PM
it's possible to sus out Steam IDs
6:01 PM
@Jenda that bot actually copies my original proof of concept from 2016
6:01 PM
I have new program I wrote, it emulates Steam completely and is able to run in a scalable environment
6:01 PM
Can process hundreds of servers in like minutes
Avatar
@substitute so you got basicaly running steam client ?
Avatar
Yes
6:02 PM
and I run the connection process in Steam
Avatar
GormusSenex 5/29/2020 6:02 PM
how u achieve that ?
Avatar
once I do that, Steam passes the SteamIDs to my client
6:02 PM
@GormusSenex I used SteamKit2 and I added a missing protobuff
6:03 PM
I dumped the data using the program they have
Avatar
so when you run connect steam will send you all SteamIDs on that server that you want to join ?
Avatar
to dump network packets
6:03 PM
@Jenda , Yes
6:03 PM
it is how Steam can show the other players on the server in your steam overlay
6:04 PM
The account ids are sent 1 by 1 so you need to properly detect when Steam has finished sending them
Avatar
GormusSenex 5/29/2020 6:04 PM
its a nuget packet apparently
Avatar
@substitute is your program open library ?
6:08 PM
or open-source ? 😄 i don't know how to call it properly
Avatar
Is it not currently.
Avatar
Haha nice @substitute I always thought this would be the way to do it but had no idea
Avatar
i was thinking it was possible only trough Rcon
6:13 PM
Here is an old proof of concept
6:13 PM
this one required the game instance
6:13 PM
my newer process doesn't , and again, emulates Steam
Avatar
well, i think the video is gone
Avatar
?
Avatar
GormusSenex 5/29/2020 6:14 PM
no its there. just open it on yt
Avatar
ok, nvm 😄
Avatar
Here is the old version that just dumped Steam ids
Avatar
Yeah nice @substitute so your implementation uses steams own libs to connect to game server ? So you are protected also against updates etc?
Avatar
You don't actually have to connect to the server
6:15 PM
you just need to do the Steam handshake dance
6:15 PM
Steam handles all the stuff regarding account ids
Avatar
SteamKit2 is a .NET library designed to interoperate with Valve&#39;s Steam network. It aims to provide a simple, yet extensible, interface to perform various actions on the network. - SteamRE/...
6:18 PM
This is what you need to dump stuff from your Steam client
6:18 PM
the network protocols
6:18 PM
Don't use it on an account you care about, they could ban you
Avatar
looks like a lot of work :D, anyway thanks man
Avatar
if it is your server
6:21 PM
btw, this is like the worst way to do this
6:21 PM
sometimes using Steam isn't 100% accurate
6:21 PM
it's an Ark issue though
6:31 PM
and no it is not my server
6:31 PM
but i do not see any other way
6:31 PM
at this point
Avatar
@substitute do you know about better way ?
Avatar
get your own server and write a plugin for it
10:02 PM
so easy
Avatar
Anyone have any ideas why C++ APlayerController* apc = _this->GetOwnerController(); AShooterPlayerController* shooter_controller = static_cast<AShooterPlayerController*>(apc); Would fail to cast correctly ? (edited)
9:22 PM
shooter_controller results in nullptr
Avatar
Anyone know why the following only returns 499 items? TArray<TSubclassOf<UPrimalItem>> all_items = static_cast<UPrimalGlobals*>(Globals::GEngine()()->GameSingletonField())->PrimalGameDataOverrideField()->MasterItemListField();
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:16 AM
how many should it be? 😄
Avatar
Not sure exactly but there are certainly items not in the list that should be in the master list.
1:16 AM
Bunk Bed for instance is not there
1:17 AM
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:18 AM
that is weird indeed
1:19 AM
dunno about it but is there another field other than PrimalGameDataOverrideField
Avatar
Ya, lots of fields 🙂
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:20 AM
I mean smth like PrimalGameDataField
1:20 AM
maybe its not overriden in that context but you get the idea
1:21 AM
I think ownprox did it before somewhere
Avatar
Simple Bed is in that list
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:21 AM
Yea I've seen that
Avatar
@Lethal
1:21 AM
Does bunk bed have an item id
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:22 AM
cheat GFI bed_modern 1 0 0 cheat giveitemnum 128 1 0 0
Avatar
Basically, can you use giveitemnum on it
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:23 AM
First one is for bunk bed the other one is for normal bed
Avatar
Notice anything different 🙂 (edited)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:23 AM
so atleast to wikipedia it doesn't have one
Avatar
It’s very likely that data list only contains items with ids
1:23 AM
And the id is the index of the item in that array
Avatar
Or rather, items don’t have ids
1:24 AM
The ids are their index in the list
1:24 AM
@Lethal try item 127,128,129 from that array and check if any of the 3 are a simple bed
Avatar
128 is the bed as my file is built from the array in order
1:28 AM
I guess the problem I have is if I modify the items from the MasterList array the settings seem to "stick" like I expect. However since not all items are in the list i'm trying something different which doesn't seem to change the item setting the same way.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:34 AM
Seems like giveitemnum searches in the MasterItemListField and GFI works with the Blueprint system of Unreal Engine itself somehow
Avatar
That’s what I figured
1:34 AM
GFI is probably a fuzzy search
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:34 AM
but don't ask me why some id's are there and some aren't
Avatar
I'm trying to load items I care about this way now. UObject* object = Globals::StaticLoadObject(UObject::StaticClass(), nullptr, *path_name, nullptr, 0, 0, true); TSubclassOf<UPrimalItem> archetype; archetype.uClass = reinterpret_cast<UClass*>(object); UPrimalItem* UPI = (UPrimalItem*)archetype.uClass->GetDefaultObject(true);
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 just lazy wildcard
1:35 AM
@Lethal use static cast
1:36 AM
reinterpret cast is unsafe
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:36 AM
yea but why is there even a MasterItemList ? Is it for performance reason?
Avatar
It’s likely left over
1:36 AM
Legacy code
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 1:36 AM
Hmn yea might be
Avatar
The earliest ids are debug items (edited)
1:36 AM
Like 0-10
Avatar
static_cast gives invalid type conversion
1:37 AM
static_cast<UClass*>(object)
Avatar
Then you should see why and not use reinterpret
1:37 AM
you can safely upcast with static cast which is what you’re doing
1:37 AM
reinterpret cast doesn’t check types or preform and explicit conversions
1:38 AM
It just says a is actually a pointer of b
1:39 AM
Actually you have a problem in your code @Lethal
1:39 AM
The instanced uobject isn’t a uclass
1:39 AM
object should have a field for its uclass
Avatar
archetype.uClass = static_cast<UClass*>(object->ClassField());
Avatar
The funny thing is
1:46 AM
Uclass is uobject
1:46 AM
As in a child type
1:46 AM
But that also means that uobject may not be uclass
Avatar

coding-tutorial

Is where?
Avatar
Rank is beginner The game chose ARK.
10:53 AM
I can't speak Korean well, so I can't speak English well.
Avatar
반응을 눌러서, 역할을 획득하셔야 합니다.
Avatar
Is this right?
Avatar
10:55 AM
만약 채널을 나갔다 오신 경우에는, 다시 눌러야 획득할 수 있습니다.
Avatar
음.. 한국어 사용 가능하세요?
Avatar
네 가능합니다.
Avatar
이모티콘을 취소 후 다시 눌러도 변화가 없습니다..
Avatar
현재 봇이 비활성화 되어있는 것 같습니다. 디스코드 마스터가 해당 문제를 해결하기 전까지는 원하시는 채널을 이용하실 수 없을 것 같아요.
Avatar
아하 답변 감사합니다. 서버 발전을 위해 빨리 입문하고싶어요.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 6:00 PM
@substitute Do you know how the game updates the ui when you change a tribename?
6:00 PM
like broadcasting it to the players
Avatar
you trying to set it ?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 6:31 PM
Im just trying to modify smth from FTribeData and display the changes to the user
6:31 PM
since it needs a manual update when updating Fields (edited)
Avatar
AShooterCharacter::RefreshTribeName(AShooterCharacter *this)
6:32 PM
APrimalCharacter::NetUpdateTribeName(APrimalCharacter *this, FString *NewTribeName)
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 6:32 PM
This is for TribeName only. looking for a update in General 😄
Avatar
you could try ForceNetUpdate()
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 6:34 PM
yea will try that
6:34 PM
anyone knows what the parameters does?
Avatar
GameState->ForceNetUpdate(false, true, false);
6:35 PM
i call it like this and it works for my use case
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 5/31/2020 6:41 PM
Thank you 🙂
Avatar
someone knows the field for the Entity ID of dinos ? aka "Ankylo_Character_BP_C" for example ?
Avatar
@Mr.Salt You can try using GetFullName
Avatar
idk if it is not set already but GetFullName is: "PrimalDinoCharacter /Script/ShooterGame.Default__PrimalDinoCharacter"
Avatar
@Mr.Salt dinoToCheck->NameField().ToString(&outputString) returns the same ?
Avatar
"Piranha_Character_BP_C_48"
10:59 PM
looks like Entity ID + consecutive number.... but that is something that i can work with
10:59 PM
thanks 🙂
Avatar
Hi. Whats the call to get the current map name?
Avatar
FString mapName; ArkApi::GetApiUtils().GetWorld()->GetMapName(&mapName);
Avatar
Thanx
Avatar
Hi. What's the best array type to define, if I want to output from a function an array that contains multiple data types? I tried to use TArray, but it can only use 2 arguments I believe. I want something like this - array (string, int, string, string, int) Thanx
Avatar
substitute 6/3/2020 2:17 AM
@Raptross not really possible (easily)
2:17 AM
you can always make a void* but how will you know the type of the pointer?
2:18 AM
Either way, the array will need to be an array of pointers/references, not an array of values/objects. (edited)
2:18 AM
If you want only UE4 objects, UObject is the base type.
Avatar
Hmmm.. alright, thanx
Avatar
what about list ?
9:18 AM
if I'm not misteaken you should be able to save all kinds of data to the list
Avatar
This is probably not the best discord for this question but, if anyone knows or could help me, i'm trying to Fix Ragnarok's map, that got "corrupted" (No Obelisk / no Water/Oil Veins) i have tried to go trough all the locations spawning the resources but i can't get it right in-game (specially the veins) so i tried using the Qwojin ark-tools to modify the savefile but couldn't compile the .ark file I'm trying to develop my own tool to modify the save file, but if anyone knows a way to respawn theese resources that would be great help.
Avatar
@Jenda list are typed
11:37 AM
again, if you need to mix type, you need do use a pointer to a covariant basetype.
11:37 AM
otherwise...how can you know what the data is!
11:37 AM
You could always make your own container though.
Avatar
ok nvm 😄
Avatar
Is there any place where you can watch the basics of plugin creation?
Avatar
@돌드민 There is a google doc somewhere regarding what the first steps are to starting to creating a plugin and i have been pondering the idea of creating a video
2:59 PM
There should be something on the forums that should help you or search this discord for the google docs link nice
Avatar
forums?
Avatar
Yes
3:00 PM
Do you not know the link to the forums ?
Avatar
ok!
Avatar
Or is it a english issue ?
Avatar
link Umm..
Avatar
if you need help just write it here or dm me
3:01 PM
Server plugins for ARK
Avatar
Menu Plugin Development I go here?
3:04 PM
Because I'm not that good at english I am using Google Translator.
Avatar
https://ark-server-api.com/forums/guides.4/ contains most of what you need it's a bit dated but should do the trick
3:05 PM
any tutorial to create plugins? Thank you
Avatar
Thank you very much.
Avatar
can somebody answer me on #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ pls?
3:14 PM
Might help
3:14 PM
I do know webatman answered a question simillar to what you have (edited)
Avatar
Utf8Encode doesnt work for me(
Avatar
Try looking into using Cyrilic in C++
3:16 PM
iirc it has something to do with prepending a L"Some string" when using it
3:17 PM
not entirely sure so best google it or search this discord for cyrilic charachters
3:17 PM
Since if you do find cyrilic it most likely will be related to your issue
Avatar
@KillZone L is a keyword for creating a wchar_t* literal. (edited)
Avatar
Yeah read up latter on
Avatar
"hello" is char*
6:27 PM
L"hello" is wchar_t*
dodgeok 1
6:29 PM
6:29 PM
1592_feelsmugman
6:30 PM
anyways, you can also use u8"hello" for Unicode (utf-8) (edited)
6:30 PM
you will need utf-16 to interop with strings from Ark though, UE4 uses utf-16
6:31 PM
There is also the TEXT macro
Avatar
@GreengoDK
Avatar
Tnx, I'll try it 🙂
Avatar
Anybody noticed this after the recent ark update. I'm getting a steam id like this now on the plugins. 16140901064495857664
Avatar
That's because the epic cross
Avatar
Hey, what's the epic cross @Hsilamot ?
Avatar
crossplay
Avatar
Ah.....
7:53 PM
News to me, this will cause havoc, no?
Avatar
somewhat yes
Avatar
Ok, our shop doesn't seem to work after update, going to check forums for anything
Avatar
you need to update SteamID columns to use BigInt Unsigned
Avatar
Just found that now, thanks @Hsilamot
Avatar
Yeah, but how would you be able to map existing players to their existing records
Avatar
What do you mean?
Avatar
I think he means, will Steam IDs now be different?
7:58 PM
epic id's are bigger
Avatar
Permission plugin and Shop plugin They use their Steam ID to distinguish who is who. If we are getting another type, there is no way to say who's record it is.
Avatar
@Raptross accounts aren't crossshared
7:59 PM
just update the field to use a bigint.
7:59 PM
steamid won't change
Avatar
BigInt is already used
Avatar
epic ids won't collide with steamids
Avatar
but it's signed
Avatar
unsign it
8:00 PM
also the signing should not matter
8:00 PM
steamids aren't negative
8:00 PM
unsigned 14 and signed 14 are bitwise the same.
8:00 PM
signing just means the Most significate bit is used to determine if the value is negative or not.
8:00 PM
0001 unsigned and 0001 signed are the same 🙂
Avatar
Hmm, the only thing odd for me is, no epic game players have tried to connect to our server only steam, but we are getting Permissions::Hooks::Hook_AShooterGameMode_HandleNewPlayer) Couldn't add player error?
Avatar
it would only be a problem if you had negative ids, because 1001 unsigned and 1001 signed aren't the same.
Avatar
i think you're saying too much information
8:01 PM
arkin, that's because the MySQL Insertion is not working
Avatar
I was answering this
Avatar
update your database and make sure SteamID's is BigInt Unsigned
Avatar
Sure @Hsilamot I just don't understand why if its only regular steam users connecting but sure
Avatar
@arkin could you get a stacktrace on that error? Maybe a function is trying to validate something that's slightly different now.
Avatar
TLDR; BIGINT Signed allows negative numbers which steam id's and epic id's will never be, Unsigned allows >0 and gives you a bigger range as you no longer support negative numbers ...
Avatar
assuming fields are proper
Avatar
@substitute My tables are already using BigInt(20) for that. I checked in code, this function is not returning a normal steam id. ArkApi::IApiUtils::GetSteamIdFromController(player_controller);
Avatar
I can't @substitute but when the player reconnected after the unsigned fix, no error and they can now see points
Avatar
signed gives you a max of 2^n-1 bits, unsigned gives you 2^n maximum @arkin
Avatar
Raptross, you need to make sure its' bigint Unsigned
Avatar
@arkin also the issue could be simply they use unsigned bigints internally now
8:03 PM
as to why even with Steam only ids you were getting an error
Avatar
please, people, stop explaining what signed means, most people who are coming here don't care about that and they just want the hotfix
Avatar
Yeah was thinking this @substitute
8:04 PM
BUT
Avatar
whonever is actually interested in learning will ask for more information, but for now, in this Sh**show we need as accurate and precise information as possible for people looking for help
Avatar
The player has lost all their points now so maybe not
Avatar
@substitute /// A 64-bit unsigned integer. typedef FPlatformTypes::uint64 uint64; This is how the API currently is sending it.
Avatar
New ID — 16140901064495857664 Their old ID — 76561198063581674
8:05 PM
^ The player in question
Avatar
oh, god, is that the new id?
Avatar
Yeah, this is a steam player before & after update
Avatar
Seems quite close to BIGINT max too, but it isn't...
Avatar
It is the max
Avatar
Deleted User 6/11/2020 8:07 PM
I am having the same problem.
Avatar
BIGINT unsigned max is 18446744073709551615
Avatar
Deleted User 6/11/2020 8:07 PM
It cannot match the existing steam_id.
Avatar
where did you get that number Arkin?
Avatar
I mean, all the players are now reporting this as their steam id
Avatar
From the database @Hsilamot our top player lost all of their points, I'm now wondering if all players are showing as that steam id
Avatar
wel, the id is litearlly only the 3 most significant bits 111
Avatar
Deleted User 6/11/2020 8:08 PM
me too.
Avatar
the rest are 0
8:08 PM
16140901064495857664 --> 1110000000000000000000000000000000000000000000000000000000000000
8:09 PM
so, i'm thinking an internal overflow on arkapi or something
Avatar
it is most likely the plugin is using or expecting signed 64 bit ids
8:11 PM
or worse, 32 bit ids
Avatar
no, steam already required using U64
Avatar
Yep, we are all sharing the same ID, I have just purchased a kit and it took from that ID posted above^
Avatar
problem right now is probably the sign
Avatar
Can you show the hook
8:13 PM
because the API itself has nothing to do with the data in the hook
Avatar
It's @Michidu ArkShop plugin^
Avatar
the API just installs your function at the top of the in-game function.
Avatar
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Yes, let me check his hook
8:14 PM
8:14 PM
this line is the problem most likely
8:15 PM
/** * \brief Returns Steam ID from player controller */ static uint64 GetSteamIdFromController(AController* controller) { uint64 steam_id = 0; if (controller != nullptr) { APlayerState* player_state = controller->PlayerStateField(); if (player_state != nullptr) { auto* steam_net_id = static_cast<FUniqueNetIdSteam*>(player_state->UniqueIdField() .UniqueNetId.Get()); steam_id = steam_net_id->UniqueNetId; } } return steam_id; }
8:15 PM
it isn't using a top-level id
8:15 PM
it's using FUniqueNetIdSteam
Avatar
Deleted User 6/11/2020 8:18 PM
i understand... So how do get the top-level id?
Avatar
FUniqueNetId
Avatar
Deleted User 6/11/2020 8:19 PM
Thank you very much. Let's try it.
Avatar
Is that in ArkPluginApi tools @substitute or the plugin?
Avatar
that's in the API
Avatar
Deleted User 6/11/2020 8:21 PM
8:21 PM
FUniqueNetId is empty...
Avatar
I may also not be that line being the issue, but seeing as your data is bad, that might be it
8:21 PM
@Deleted User it's ok that it is empty
8:21 PM
it's actually a pointer
Avatar
How about try how the Atlas is API for that function was changed to? auto* steam_net_id = static_cast<FUniqueNetIdString*>(player_state->UniqueIdField() .UniqueNetId.Get()); const FString steam_id_str = steam_net_id->UniqueNetIdStr; try { steam_id = std::stoull(*steam_id_str); } catch (const std::exception&) { return 0; }
Avatar
Yes, try that
8:22 PM
that could work just fine ^
8:22 PM
it's not really a clean solution though
8:23 PM
but by "not clean" I mean it's assuming all ids are ulongs and it needs them as strings first
8:23 PM
realistically, unique ids are strings, we're just lucky both EGS and Steam use numerical types.
8:23 PM
Google Play I think starts ids with "G:XXXXXXX"
Avatar
Deleted User 6/11/2020 8:25 PM
oh..... ok..
8:25 PM
I should use it like that now. (edited)
Avatar
go ahead and try that
8:28 PM
it should work fine because both ids are uint64
8:28 PM
but like if they add crossplay with PS4 and Xbone in the future it could break
8:29 PM
I think PS4 ids are uint64 but I think xbone ids are XUID
8:29 PM
XUID is just Microsoft's version of GUID
Avatar
Deleted User 6/11/2020 8:30 PM
ok. i try that. ark server rebooting.
Avatar
solution here would be to use the playerId and not SteamId 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:30 PM
Im going to take a look at the current errors. If you have any information that could help fixing this issue please write it down here and tag me or dm me
Avatar
Filename: ArkApiUtils.h Function: GetSteamIdFromController I believe this is where the fixing needs to be on, since almost all plugins get the steam id from there.
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 I'm fairly the error is from what I posted.
Avatar
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 all players on my server have the steam ID 16140901064495857664 being reported by 2 separate plugins, which is close to but not the max bigint unsigned... playerId/tribeId seem fine... @substitute determined that its caused by a bit of code in the plugin API
Avatar
@arkin I was just taking an educated guess, I don't have time atm to compile a new build of the plugin to test with.
Avatar
that id is all zeros with the 3 most significant bits 1
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:34 PM
```cpp /** * \brief Returns Steam ID from player controller */ static uint64 GetSteamIdFromController(AController* controller) { uint64 steam_id = 0; if (controller != nullptr) { APlayerState* player_state = controller->PlayerStateField(); if (player_state != nullptr) { auto* steam_net_id = static_cast<FUniqueNetIdSteam*>(player_state->UniqueIdField() .UniqueNetId.Get()); steam_id = steam_net_id->UniqueNetId; } } return steam_id; } ```
@substitute So you mean the SteamID Field just changed and nothing else? 😄
Avatar
It's not a SteamID
Avatar
the function changed somehow and we are not getting the correct ID
Avatar
Ark is crossplay with Epic Store now
Avatar
It's outputting 16140901064495857664 for all
Avatar
they're likely using an abstracted higher-order ID type
Avatar
i think it's an integer overflow since that number casually it's 111 followed by 61 zeros
8:35 PM
16140901064495857664 --> 1110000000000000000000000000000000000000000000000000000000000000
Avatar
that is incorrect @Hsilamot
8:35 PM
1110....0 is 1 600 000 000 000 000 000 000‬
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:35 PM
So your guess is that the ark devs have messed up smth which causes a int overflow?
Avatar
yes
Avatar
Which is not correct
8:36 PM
if that was the case, you would not be able to connect at all.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:36 PM
Thats my thought too
Avatar
The authentication protocol uses your account ID
Avatar
i'm not able to connect at all
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:36 PM
also Steam servers wouldn't work anymore
8:36 PM
but seems like they do
Avatar
I think they cahanged it somehow. Maybe another function or something to get the real steam id.
Avatar
Where did you get that 1110000000000000000000000000000000000000000000000000000000000000 is 1 600 000 000 000 000 000 000‬, Substitute????
Avatar
Authentication is done (on Steam) as so. CLNT: Hello server, my account is is XXX SERV: hello client, please request a ticket from Steam to join CLNT: Hello steam, here's my valid login info, may I have a token? STEAM: Here is a 1-time use cryptographically secure token CLNT: Hey server, here's my token SERV: hey steam, validate this token please, his account id is XXX Steam: Token is valid -> Accept connection | Token is invalid -> Reject
8:38 PM
@Hsilamot
8:38 PM
I got the number from my calculator
Avatar
you're giving me the OCT value, not the DEC value
8:38 PM
your calculator is also signed
8:38 PM
you need an unsigned calculator to get the correct number
Avatar
your number is still not right
Avatar
man....
Avatar
1 sec (edited)
Avatar
GormusSenex 6/11/2020 8:44 PM
i wonder who in here is from salty bay, tekforce, elite ark and mtsark 😄 im glad i made all my own plugins 😄
Avatar
are you getting the correct PlayerID?
Avatar
even if he isn't off the bat, it's much easier for him to fix
8:44 PM
CloutNerd
Avatar
GormusSenex 6/11/2020 8:45 PM
no wrong ids too, but as @substitute said - way easier when u know the code 😉
8:46 PM
cant fix it anyway be4 i get home from work, but still 😉
Avatar
@Hsilamot yes, player_id/tribe_id are fine
Avatar
you mean UE4Id i guess
Avatar
@GormusSenex well, perfect time than any I guess to setup a template project
8:51 PM
I'm gonna look at the authentication methods
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:52 PM
i wonder who in here is from salty bay, tekforce, elite ark and mtsark 😄 im glad i made all my own plugins 😄
@GormusSenex What do you mean you wonder who in here is from those servers? 😄
Avatar
GormusSenex 6/11/2020 8:53 PM
jsut read a few of their discords and it looks like its tits up 😂
Avatar
whats up with salty bay?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:54 PM
Sure it is.. but that should be a known risk any plugin developer / server owner who uses the API.
Avatar
yeah, they just don't care about this side of the game
Avatar
GormusSenex 6/11/2020 8:57 PM
i think i read somewhere they dont support us making plugins at all. but this is just rude 😄
Avatar
well it's basically a hack. But it is quite obvios that this would happen with the EGS integration...
Avatar
Deleted User 6/11/2020 8:58 PM
i try this code. static uint64 get_steam_id_from_controller(AController* controller) { uint64 steam_id = 0; if (controller != nullptr) { APlayerState* player_state = controller->PlayerStateField(); if (player_state != nullptr) { auto* steam_net_id = static_cast<FUniqueNetIdString*>(player_state->UniqueIdField().UniqueNetId.Get()); const FString steam_id_str = steam_net_id->UniqueNetIdStr; try { steam_id = std::stoull(*steam_id_str); } catch (const std::exception&) { return 0; } } } return steam_id; }
Avatar
@Mr.Salt it is a hack
8:58 PM
It’s not like a hack
8:58 PM
It is
8:58 PM
It’s just not being used maliciously to gain an advantage in a game
Avatar
Deleted User 6/11/2020 8:59 PM
Always returns 0.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:59 PM
due to exceptions?
Avatar
Deleted User 6/11/2020 8:59 PM
oh....
Avatar
GormusSenex 6/11/2020 8:59 PM
😂
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 8:59 PM
Avatar
Should never swallow exceptions like that
8:59 PM
Should at least log them
Avatar
Deleted User 6/11/2020 9:00 PM
re try.
9:00 PM
ok .ok... ;;
Avatar
It’s ok to handle it and return 0 (edited)
9:00 PM
But I would debug log the error
Avatar
AdminDeluxe 6/11/2020 9:01 PM
It's seems to be the API that fetches uncorrect SteamID's. Admins that are automatically authorized by their steam ID still show up with star icons.
Avatar
GormusSenex 6/11/2020 9:02 PM
this channel has basically been dead for 1 month. then wc releases a new map... BOOM it explodes 😂
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:02 PM
is ArkEGSLauncher.exe the EpicGamesStore variant of it? lol
Avatar
lol, I said it was in the function lol
9:02 PM
And not an overflow directly
9:02 PM
Stuff would break way harder if there was a global overflow on ids
9:02 PM
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 yes
9:02 PM
EGS=epic games store
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:03 PM
wow 😄
Avatar
So if that’s the name of the new binary
9:03 PM
That’s the epic store one
9:04 PM
Hahahha it could be possible an address/offset is wrong
9:04 PM
@Hsilamot
9:04 PM
List me some steam ids that turn into 11100000...0
9:04 PM
The field might be unaligned
Avatar
GormusSenex 6/11/2020 9:05 PM
would make sense
Avatar
@substitute for me it's all of them
Avatar
it's all of them as people are reporting
Avatar
Yeah, all are same
Avatar
i'm trying to fetch the new id's with RCON
Avatar
GormusSenex 6/11/2020 9:06 PM
which would suggest an unaligned field as Sub said
Avatar
yes, in Steam ids
9:06 PM
if there is 111
9:06 PM
in the bits
9:06 PM
we could be unaligned
Avatar
6985314156924967416 7208506302483821243
9:07 PM
thoose seems to be the new id's from epic
Avatar
GormusSenex 6/11/2020 9:07 PM
could have put in an EGS id just before steam one or something
Avatar
yep
9:07 PM
I picked a random steam id
9:07 PM
9:07 PM
it has 111 followed by some zeros (edited)
Avatar
GormusSenex 6/11/2020 9:07 PM
i bet if u login via egs launcher u actually get some sort of id (still wrong prolly)
Avatar
could be alignment issue
Avatar
111? i see only a 1 and a number
Avatar
man, no offense but i don't think you know what are you doing
9:08 PM
if it was an alignment issue you would see that 111 followed by at least 61 zeros
Avatar
Not always
Avatar
kinda, yes always, IF it was an alignment issue
Avatar
GormusSenex 6/11/2020 9:09 PM
im no c++ expert but assigning new vars doesnt clear it in c++. i think...
9:09 PM
unlike c#
Avatar
Except we don't read the structure literally
Avatar
GormusSenex 6/11/2020 9:09 PM
so if a field is put in in front of it, it would behave like that
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:09 PM
new vars do but pointers don't
9:10 PM
if you create a new pointer without ensuring that the memory area is only zero you can have a weird pointer which is part of something else
Avatar
@Hsilamot the field is also a pointer
9:10 PM
as previously stated
Avatar
Deleted User 6/11/2020 9:10 PM
i re try. get exception message.
9:10 PM
9:10 PM
" exception invalid stoull argument"
Avatar
because it's not a long
9:10 PM
stoull is string to unsigned long
Avatar
Deleted User 6/11/2020 9:10 PM
use this code. static uint64 get_steam_id_from_controller(AController* controller) { uint64 steam_id = 0; if (controller != nullptr) { APlayerState* player_state = controller->PlayerStateField(); if (player_state != nullptr) { auto* steam_net_id = static_cast<FUniqueNetIdString*>(player_state->UniqueIdField().UniqueNetId.Get()); const FString steam_id_str = steam_net_id->UniqueNetIdStr; try { if (*steam_id_str == nullptr) { Log::GetLog()->info("is Null"); } steam_id = std::stoull(*steam_id_str); Log::GetLog()->info("Chat Steam Id {}", steam_id_str.ToString()); } catch (const std::exception& ex) { Log::GetLog()->info("exception {}", ex.what()); return 0; } } } return steam_id; }
Avatar
the input string isn't valid as an unsigned long
9:11 PM
can you dump the actual value in the string before you call stoull?
Avatar
Deleted User 6/11/2020 9:11 PM
oh..
9:11 PM
ok.
9:11 PM
re try.
9:11 PM
I made this
9:11 PM
I know what I am doing for the most part.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:12 PM
this is what? a plugin? mod? "client plugin"? 😄
Avatar
it's an injection
Avatar
client plugin
9:12 PM
it's a hack
9:12 PM
in SP, no AntiCheat
9:13 PM
the window is running on the Direct X thread and using Direct X for rendering.
Avatar
same as Ark api
Avatar
Yes, but I don't use Ark API for that
9:13 PM
I just used MS Detours
9:13 PM
Could also always write the trampoline functions yourself too
Avatar
we are definitely not talking in the same language
Avatar
I had to for another game to make midfunction hooks.
9:14 PM
@Deleted User
9:14 PM
9:14 PM
on this
9:14 PM
1234 and 1235
Avatar
Deleted User 6/11/2020 9:14 PM
this is chat.
Avatar
are those the "ids" before they're converted with stoull
Avatar
Deleted User 6/11/2020 9:14 PM
chat message.
Avatar
oh
9:14 PM
ok
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:17 PM
to me it looks like all plugins which used a steamid before will need a update and take EpicID into account
9:17 PM
in addition to SteamID
Avatar
Yes, they will have too
9:17 PM
That part we know
9:17 PM
right now we need to fish out why the steamid is invalid anyways
9:18 PM
I'm waiting to see what the account id is from @Deleted User before he tried to stoull
9:18 PM
since it's crashing throwing on stoull, which would not happen if they were valid steam ids (edited)
Avatar
Deleted User 6/11/2020 9:18 PM
ok. restart server.
Avatar
what do we always do when making a new project?
Avatar
Deleted User 6/11/2020 9:19 PM
me too. wait. server on.
9:19 PM
very slow....
Avatar
turn off precompiled headers
9:19 PM
9:19 PM
MadLaugh
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:19 PM
xD
Avatar
will make fun - to convert the databases like those from the shop to EpicIDs 🤓
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:20 PM
People are saying that deactivating Raw Socket options works
Avatar
interesting, and very strange.
Avatar
it works to be able to connect
9:20 PM
doesn't work to solve the ID Fetch
Avatar
datatype changed?
Avatar
alright folks, it's time to attach a debugger
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:21 PM
oh okay.. just got the message with it
9:21 PM
alright folks, it's time to attach a debugger
@substitute already doing that x)
Avatar
@Lethal yes, that's the higher order type 🙂
9:21 PM
FUniqueSteam is a child of that
Avatar
Deleted User 6/11/2020 9:21 PM
empty.
9:21 PM
Avatar
UniqueID?
Avatar
Deleted User 6/11/2020 9:21 PM
use this code.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:21 PM
Thats why it couldnt convert 😄
Avatar
Deleted User 6/11/2020 9:21 PM
static uint64 get_steam_id_from_controller(AController* controller) { uint64 steam_id = 0; if (controller != nullptr) { APlayerState* player_state = controller->PlayerStateField(); if (player_state != nullptr) { auto* steam_net_id = static_cast<FUniqueNetIdString*>(player_state->UniqueIdField().UniqueNetId.Get()); const FString steam_id_str = steam_net_id->UniqueNetIdStr; try { if (*steam_id_str == nullptr) { Log::GetLog()->info("is Null"); } Log::GetLog()->info("Chat 1 Steam Id '{}'", steam_id_str.ToString()); Log::GetLog()->info("Chat 2 Steam Id '{}'", steam_id_str.ToString().c_str()); steam_id = std::stoull(*steam_id_str); } catch (const std::exception& ex) { Log::GetLog()->info("exception {}", ex.what()); return 0; } } } return steam_id; }
Avatar
yep
9:22 PM
UniqueNetId now UniqueNetIdRepl
Avatar
i think they broke down so much my ASM keeps cycling trough servers "updating" them over and over again
9:23 PM
they might use platformuserId conversion from unique net id
Avatar
@Hsilamot thought we were having the same but 2 update cycles and we made it through...
Avatar
i'm disabling it now, it's going trough its 5th cycle and no version changes
Avatar
@cokll it has always been FUniqueNetIdRepl
9:25 PM
FUniqueNetIdRepl& UniqueIdField() { return *GetNativePointerField<FUniqueNetIdRepl*>(this, "APlayerState.UniqueId"); }
9:26 PM
@Deleted User
9:26 PM
try not casting the ID
9:26 PM
auto* steam_net_id = (player_state->UniqueIdField().UniqueNetId.Get());
9:27 PM
the address should be fine if the PDB has the correct address for the field
9:27 PM
template <typename RT> RT GetNativePointerField(const void* _this, const std::string& field_name) { return reinterpret_cast<RT>(GetAddress(_this, field_name)); }
Avatar
Deleted User 6/11/2020 9:30 PM
i try this code? static uint64 get_steam_id_from_controller2(AController* controller) { uint64 steam_id = 0; if (controller != nullptr) { APlayerState* player_state = controller->PlayerStateField(); if (player_state != nullptr) { // auto* steam_net_id = static_cast<FUniqueNetIdString*>(player_state->UniqueIdField().UniqueNetId.Get()); auto* steam_net_id = (player_state->UniqueIdField().UniqueNetId.Get()); Log::GetLog()->info("Chat 1 Steam Id '{}'", typeid(steam_net_id).name()); } } }
Avatar
yes
Avatar
Deleted User 6/11/2020 9:30 PM
ok.
Avatar
Shadowsong Today at 2:32 PM For those of you getting Ark crashes relating to Voice, swapping to the new Vivox system seems stable. It works even if your not able to use crossplay due to having mods. Server Arg " -UseVivox"
Avatar
Deleted User 6/11/2020 9:35 PM
9:35 PM
struct FUniqueNetId * __ptr64
Avatar
a pointer ? that's good
Avatar
well we know it's a pointer
9:36 PM
the type is FUniqueNetId*
9:38 PM
FString s2; auto steamId = player_controller->GetUniqueNetIdAsString(&s2); const uint64 steam_id = stoull(steamId->ToString());
Avatar
Deleted User 6/11/2020 9:42 PM
ok . i try this code. static uint64 get_steam_id_from_controller3(AShooterPlayerController* pc) { uint64 steam_id = 0; if (pc != nullptr) { FString s2 = ""; auto steamId = pc->GetUniqueNetIdAsString(&s2); Log::GetLog()->info("Chat 1 uq '{}'", s2.ToString()); Log::GetLog()->info("Chat 2 uq '{}'", steamId->ToString()); try { const uint64 steam_id = stoull(steamId->ToString()); Log::GetLog()->info("Chat 3 uq '{}'", steam_id); }catch (const std::exception& ex) { Log::GetLog()->info("exception {}", ex.what()); return 0; } } return 0; }
9:43 PM
server rebooting.
Avatar
as far as i can see, all Epic id's have the two most significant bits always on
Avatar
i testd work
Avatar
Deleted User 6/11/2020 9:43 PM
oh!
Avatar
8002257547803181846 7792121212714308622 8756058525359577470 76561198971508214 110111100001101101110101101011110001001111111110100001100010110 110110000100011001011001111010101100010100111110101010000001110 111100110000011110001001101011001010100100101101001100101111110 000000100010000000000000000000100111100010001100101010111110110
Avatar
Deleted User 6/11/2020 9:44 PM
@cokll That is really cool! I will test it too.
Avatar
problem is
9:44 PM
the number is way too big for Int64
9:44 PM
wait, no, it's not
9:45 PM
it even fits on the signed one xD
Avatar
Deleted User 6/11/2020 9:46 PM
wow...
9:46 PM
Avatar
Why not use "GetUniqueNetIdAsUINT64()"?
Avatar
Deleted User 6/11/2020 9:46 PM
its work.
9:47 PM
@cokll nice!
Avatar
nice!
9:47 PM
Example Epic ID's 8002257547803181846 7792121212714308622 8756058525359577470 7557390344006069269 76561198971508214 64 bit representtations: 0110111100001101101110101101011110001001111111110100001100010110 0110110000100011001011001111010101100010100111110101010000001110 0111100110000011110001001101011001010100100101101001100101111110 0110100011100001001111100111101000100011011100101110110000010101 0000000100010000000000000000000100111100010001100101010111110110
Avatar
Deleted User 6/11/2020 9:47 PM
i try epic id connect.
9:48 PM
wait.
Avatar
the last id is Steam
Avatar
Deleted User 6/11/2020 9:48 PM
oh....
9:49 PM
option.... -crossplay..
9:49 PM
very long time.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:49 PM
-crossplay? what do you mean
Avatar
Deleted User 6/11/2020 9:49 PM
9:49 PM
i not input args.
Avatar
can you -crossplay with steam mods thought? surely not
9:50 PM
nvm..
9:51 PM
Architect what did you change? can you compile the api?
Avatar
Deleted User 6/11/2020 9:51 PM
9:52 PM
i have 2 id. steam, epic.
9:52 PM
steam is "pc->GetUniqueNetIdAsString(&s2);" worked.
9:52 PM
I will test that.
9:53 PM
epic account.
9:53 PM
English is really difficult.. Please understand. Words can be weird.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 9:53 PM
pc->GetUniqueNetIdAsString(&s2); can someone look into it and take a look at the accessed fields? mine is still decompiling..
Avatar
Deleted User 6/11/2020 9:54 PM
i test this code.
9:54 PM
static uint64 get_steam_id_from_controller3(AShooterPlayerController* pc) { uint64 steam_id = 0; if (pc != nullptr) { FString s2 = ""; auto steamId = pc->GetUniqueNetIdAsString(&s2); Log::GetLog()->info("Chat 1 uq '{}'", s2.ToString()); Log::GetLog()->info("Chat 2 uq '{}'", steamId->ToString()); try { const uint64 steam_id = stoull(steamId->ToString()); Log::GetLog()->info("Chat 3 uq '{}'", steam_id); }catch (const std::exception& ex) { Log::GetLog()->info("exception {}", ex.what()); return 0; } } return 0; }
9:54 PM
result is
9:54 PM
9:54 PM
this idea @cokll
Avatar
that's steam id, seems ok
Avatar
is that with the arg or without?
Avatar
arg should not change the result
Avatar
@Deleted User seems like a solution then.
Avatar
c++ static uint64 GetSteamIdFromController(AController* controller) { uint64 steam_id = 0; if (controller != nullptr) { AShooterPlayerController* pc = static_cast<AShooterPlayerController*>(controller->GetOwnerController()); if (pc != nullptr) { steam_id = pc->GetUniqueNetIdAsUINT64(); } } Log::GetLog()->info("SteamID: {}", steam_id); return steam_id; } I'm testing this version
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:03 PM
So the current "GetSteamIdFromController" returns the EpicGamesID ?
10:03 PM
is that correct?
Avatar
Deleted User 6/11/2020 10:03 PM
server list not print.
10:04 PM
i try other args.
10:04 PM
island map.
Avatar
my code above should be a direct replacement for the current API function call
Avatar
epic need -epiconly@Deleted User
Avatar
waiting on ARK client to update so I can verify
Avatar
Deleted User 6/11/2020 10:05 PM
@cokll ok. thank you.
10:05 PM
i try.
Avatar
Looks good @Lethal are you able to update the ark api itself or is that only @Michidu ?
Avatar
I believe @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 can do it, since it was last posted by him too.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:08 PM
I can do it yes
10:08 PM
But I'll compile it on my own
10:08 PM
Also I will add EpicID's to it
Avatar
Yeah, that would be better
Avatar
this one works for now
10:09 PM
but i think it comes from a sketchy source
Avatar
GormusSenex 6/11/2020 10:10 PM
crowd-debugging at it's best ngl
10:10 PM
if only i could apply that at work too... 🙄 😂
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:10 PM
well I guess I will add epic ids later.. lol
Avatar
Just a suggestion for later
  • Common function to get the ID steam/epic maybe like name it GetPlatformAccountID()
  • Another function maybe to check what type of platform it came from
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:11 PM
GetUniqueNetIdAsString(&s2); so this is the way to go now?
Avatar
I don't think so
Avatar
GormusSenex 6/11/2020 10:11 PM
that works, but lethals is prettier
10:12 PM
dont know if lethals works tho
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:12 PM
got no response on that
10:12 PM
so I can't know :3 (edited)
Avatar
c++ FindPlayerFromSteamId() Will be broken if you use the string version.
Avatar
Deleted User 6/11/2020 10:12 PM
oh...
Avatar
Yeah, I'll go with Lethal. More straight forward coding rather than work arounds.
Avatar
GormusSenex 6/11/2020 10:12 PM
just return as uint64
Avatar
Waiting on my ARK client to finish updating 14gb...test server is already up and running just cannot connect yet 😦
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:13 PM
I feel you Lethal
Avatar
Once I test it and it works I will add to my pull request from a month or more ago 😛
Avatar
i finished downloading Ark and crystal isles on epic
10:14 PM
Steam still 44% done
Avatar
GormusSenex 6/11/2020 10:15 PM
less players dl'ing from epic i assume. AND i would also guess they beefed the servers since they r in the start-up phase and dont wanna give bad experience 😄
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:19 PM
so can someone give me a working version (code!) of it? (edited)
Avatar
EPIC ID
Avatar
I think Wooley did a fix too idk
Avatar
Steam frustrates me, ARK installed to NVMe (C:) yet it always wants to update using spinning HDD (D:) then copy back to C:
Avatar
Yeah it's aids man
10:25 PM
I'm sure it does some x Delta type patching too right?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:25 PM
Can someone test the version I have if the function works again?
10:25 PM
still need to load the client <.<
10:25 PM
Avatar
Deleted User 6/11/2020 10:26 PM
I will use this code until this problem is solved. i all change function GetSteamIdFromController() -> get_steam_id_from_pc() FindPlayerFromSteamId() -> find_pc_steam_id()
10:26 PM
static uint64 get_steam_id_from_pc(AController* ctrl) { uint64 steam_id = 0; if (ctrl && ctrl->IsA(AShooterPlayerController::GetPrivateStaticClass())) { AShooterPlayerController* pc = (AShooterPlayerController*)ctrl; FString szsteam_id = ""; try { pc->GetUniqueNetIdAsString(&szsteam_id); const uint64 steam_id = stoull(szsteam_id.ToString()); return steam_id; } catch (const std::exception& ex) { Log::GetLog()->info("exception {}", ex.what()); } } return 0; } AShooterPlayerController* find_pc_steam_id(uint64 steam_id) { AShooterPlayerController* result = nullptr; const auto& player_controllers = ArkApi::GetApiUtils().GetWorld()->PlayerControllerListField(); for (TWeakObjectPtr<APlayerController> player_controller : player_controllers) { const uint64 current_steam_id = get_steam_id_from_pc((AController*)player_controller.Get()); if (current_steam_id == steam_id) { auto* shooter_pc = static_cast<AShooterPlayerController*>(player_controller.Get()); result = shooter_pc; break; } } return result; }
10:27 PM
thank you @cokll
Avatar
You don’t need to update the api
10:30 PM
Only the plugin
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:31 PM
or the api so it works for everyone
10:32 PM
without the need of a developer to change it
Avatar
I think he means the sever doesn't need a new version.dll installed
10:32 PM
Just need to recompile the plugins with the updated API
Avatar
Deleted User 6/11/2020 10:33 PM
oh!
10:33 PM
Now I understand.
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 10:34 PM
@substitute so you mean those function will be inlined?
Avatar
Deleted User 6/11/2020 10:34 PM
this file change?
10:34 PM
Avatar
They’re included during build
10:35 PM
version.dll just loads your libraries
Avatar
Yes architect, that file changes
10:36 PM
how are you going to correct a functional call if you don't change the function substitute...
Avatar
I didn’t say don’t change the file
Avatar
What you are trying to say? Each plugin will need to be updated and recompiled as they have the ArkApi functions embedded in them and are nothing to do with the version.dll installed ?
Avatar
I was saying you don’t need to rebuild version.dll
10:37 PM
You are linking against the header file directly
Avatar
Arkin, no, i don't know what they are saying but the solution is fixing the API itself not the plugins
Avatar
When you build the function is compiled
10:37 PM
The api isn’t linked against for runtime resolution
10:38 PM
The plugins are built from the API @Hsilamot so yes the API needs fixing, but then the plugins need recompiling too...
Avatar
no they don't, unless you change the function itself
10:39 PM
i'm working with a fixed version.dll already
10:39 PM
it's working fine
Avatar
Ideally, what will happen is that the functioin gets renamed
10:39 PM
Then, you need to recompile
Avatar
@arkin you don't need to update version.dll at all
Avatar
but to keep Backwards compatibility don't expect that to be a night to day process
Avatar
you update the function in the header file form the api
10:40 PM
when you recompile your plugin will use your changed function
10:40 PM
you do not need to build a new version.dll
10:40 PM
when you compile your plugin, you are not compiling against prebuilt code, you don't use version.dll to compile your code, and version.dll contains no exports.
10:40 PM
when you compile, your compiler builds the functions itself and puts them in your plugin.
10:41 PM
version.dll only loads your plugin
Avatar
man, i seriously don't know what you're talking about Substitute, up until now you're just putting noise into the conversation and i don't know now if you're just trying to troll us or what, but everyone else is solving this and you're just saying stuff that doesn't help and confuses people only. i would appreciate if you either stop that or be more clear on your sayings.
😮 1
Avatar
@Hsilamot I have literally added my own functions and structures to the API.
Avatar
good for you, you're nott helping
Avatar
You DO NOT need to rebuild the whole API into a new version.dll (edited)
Avatar
GormusSenex 6/11/2020 10:42 PM
i get it, and im not c++-smart 😄
Avatar
If you actually ask people, I help people frequently
10:42 PM
It sounds like you don't understand how your linker and compiler work
Avatar
ok, my bad, but for now, i think people are going to find it more helpfull to replace version.dll and get their servers up, than to wait for each of their plugins to be updated.
Avatar
lol @ this convo
Avatar
GormusSenex 6/11/2020 10:43 PM
ye 😂
Avatar
@Lethal it's frustrating
Avatar
@substitute knows what he is talking about FYI
Avatar
GormusSenex 6/11/2020 10:43 PM
was close to turning into a dick measuring contest 😄
Avatar
You read one binary number wrong after working all day and people don’t let it go
10:44 PM
joyLMFAO
Avatar
GormusSenex 6/11/2020 10:44 PM
haha
Avatar
kinda throws you off
Avatar
GormusSenex 6/11/2020 10:45 PM
cough i think sub IS trolling 😄
10:46 PM
let the rant continue... 😂
Avatar
let's not
Avatar
GormusSenex 6/11/2020 10:47 PM
ok, im tired. i need to get home.... soo tired fixing other ppls stuff at work
Avatar
already have the fixed version.dll and it's working
Avatar
Also only plugins that are calling SteamID stuff should need updated. If the plugin isn't using Steam ID they should be fine currently.
Avatar
GormusSenex 6/11/2020 10:47 PM
any plugin that doesnt use steam ID ??? 😮
Avatar
which in my case is almost all of them xD
Avatar
GormusSenex 6/11/2020 10:48 PM
ohh wait, true... i actually made one that doesnt.
Avatar
yeah, there's couple , like KillFeed,
Avatar
my NoWander doesn't
Avatar
but yeah, most of thjem in my particular case use ID
Avatar
@GormusSenex I forgot a lot of people link against the lib file
10:58 PM
Which is a prebuilt static lib for compiling
10:58 PM
In that case the function isn’t compiled at compile time
10:58 PM
As the lib has it already and just links to it
10:58 PM
I don’t usually link against lib files for things I might have to change
11:00 PM
Changing the function only works if you’re not statically linking
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/11/2020 11:24 PM
cant update the Version cause of forum update :/
Avatar
my version worked btw
👍 1
Avatar
Is it possible to post the updated version here?
Avatar
AaronBasques 6/12/2020 3:11 AM
anyone had this issue building the API? i'm no expert
Avatar
You need to rebuild the whole API
3:58 AM
clean or manually delete .obj files
4:38 AM
4:38 AM
#if DEBUG_PLUGIN Log::GetLog()->log(spdlog::level::info, "Plugin is in Debug mode!"); #else Log::GetLog()->log(spdlog::level::info, "Plugin is in Release mode!"); #endif
4:38 AM
Almost ready to publish the template project.
4:38 AM
@Lethal
4:39 AM
The debugging/release isn't anything fancy
4:39 AM
I just deleted the original Debug config, cloned Release and set a preprocessor define (DEBUG_PLUGIN), but will be useful.
Avatar
AaronBasques 6/12/2020 4:57 AM
@substitute can there exist a conflict for multiple versions in separate directories? my other project works on v3.2 i removed obj files and cleaned the solution, still the error persists. in a v3.4 solution
Avatar
this error isn't specific to the api
4:57 AM
it's a compiler error
Avatar
AaronBasques 6/12/2020 4:58 AM
with this i just downloaded 3.4 and opened the solution and hit build, this error appeared and i'm lost as to how to fix it.
Avatar
If anyone would like to test my plugin template, shoot me a pm
8:05 AM
The goal is to make a one click setup solution for visual studio (edited)
Avatar
Hello everyone, has this project stopped updating
9:17 AM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
Avatar
Deleted User 6/12/2020 9:18 AM
oh....
9:18 AM
why...?
Avatar
Where can I download the latest version?
9:19 AM
this project stopped updating?
Avatar
Deleted User 6/12/2020 9:19 AM
i don't know....
9:19 AM
ArkApi is a plugin which allows you to create your own server-side plugins for ARK using C++ language. Installation: Extract everything to "ARK\ShooterGame\Binaries\Win64". All files like "version.dll" should be in "Win64" folder. Start your...
Avatar
Yes, I know. I just want to look at the source code
Avatar
Deleted User 6/12/2020 9:21 AM
@substitute wow... can i help you?
Avatar
@Michidu ?
Avatar
no, it's not stopped updating ofc
Avatar
@Deleted User pm
Avatar
2 days ago
Avatar
Deleted User 6/12/2020 9:22 AM
i don't know pm...;; sorry;;; what 'pm'?
😂 1
Avatar
Where can I see the latest version of the source code?
Avatar
Deleted User 6/12/2020 9:23 AM
i English is not good.
Avatar
I want to try to build it myself.
Avatar
on github...
Avatar
ok, the github code , is latest?
Avatar
It says right there in your picture
9:23 AM
Last update 2 days ago
9:24 AM
Avatar
-_-#
9:25 AM
Thank you. I'm dazzled
Avatar
@Deleted User
9:29 AM
Send me a private message on discord to test the template
Avatar
may i see your template too? 🙂
Avatar
Deleted User 6/12/2020 9:36 AM
oh. ok.
Avatar
best for template would be to use CMake and windows batch and git. I already have something that pulls the api, creates the visual studio project, compiles and links the project and generates the plugin info with one klick. The problem is when there is too much change in the project structure, e.g. new files, then you need cmake knowlege again ....
Avatar
@Mr.Salt
9:48 AM
Mine is 1 line of git
9:48 AM
Who uses cmake for visual studio projects
9:48 AM
😛
Avatar
someone who is tired of absolute paths in visual studio projects. someone who is a fan of full automated code generation including documentation, tests, code style etc.
Avatar
You can use relative paths
9:52 AM
That’s how my template includes all api dependencies
9:53 AM
Someone needing a template is also someone who’s far and away from needing docs and test suites
Avatar
I know I know, that's a good thing and a great solution for these purposes. But then a user still has to set up and save the api and the project in a similar way to you
Avatar
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
Avatar
Deleted User 6/12/2020 9:57 AM
I just tested his template. @substitute It works really well and I hope this will be released. Then I expect the new plugin developers will be more accessible.
Avatar
There’s some more I want to add
9:57 AM
And more documentation
9:57 AM
But it’s 4am
Avatar
Deleted User 6/12/2020 9:57 AM
oh.
9:57 AM
sleep!
9:58 AM
Eyes must be healthy.
Avatar
lol I'm with @Mr.Salt I've seen a few compiled plugins throw exceptions with paths like d:\programs\projects\ etc when we don't even run a D: drive 😄
Avatar
well that is because of the paths in the pdb.
Avatar
@Deleted User What time is it then?
Avatar
Deleted User 6/12/2020 10:01 AM
this korea. utc +9.:00 this time is 17:01
Avatar
it's always like this and depends on where the build was linked. Even the Ark exceptions contain the build working directory.
Avatar
GormusSenex 6/12/2020 11:31 AM
Documentation wtf ?!? My code is always, ALWAYS, self-explanatory 😂
11:36 AM
good codes don’t need comments
Avatar
GormusSenex 6/12/2020 11:37 AM
Amen !
Avatar
and there are still tools that measure comments per codlines
11:38 AM
😂
Avatar
GormusSenex 6/12/2020 11:42 AM
Infidels !
11:43 AM
(just like a "Software Architect".... that's basically just a coder who cant code no-more but they think they can ! I spit on them ! 😂 )
Avatar
Crystal Wyvern Queen , How to tame it?
12:40 PM
Prompt me to put in the food and start feeding.
12:40 PM
What does it eat? Anybody know?
Avatar
GormusSenex 6/12/2020 12:48 PM
u seriously asking this in a development forum ? go somewhere else omg !
Avatar
@Mr.Salt Please tell me you are using msbuild with cmd
1:35 PM
Windows CLI is horrid
1:44 PM
i use Cmake for C++ and C projects with various compilers. Mostly visual studio for development....
Avatar
Yeah i use cmake aswell for some of my C++ projects but i've been using .sln for compiling and all that so i guess i should consider making a make file
3:13 PM
Thanks
Avatar
well build then just is: cmake --build . --target ALL_BUILD --config Release
3:39 PM
Contribute to SaltyBay/Ark-Plugin-TribeSlotCooldown development by creating an account on GitHub.
3:39 PM
if you like to have a look
Avatar
Does anyone know how to convert to digital format
5:54 PM
5:54 PM
EPICID
Avatar
cokll can you paste the numbers here? the netID ones
5:56 PM
a6dc6a9172a04b669a77fc754e64faef|0002ce56b15444d99d72b0e5c355de12 to 8186112038914615050
Avatar
@cokll what did you use to convert the profile to json?
Avatar
ark-tools probably
Avatar
Is there one that is updated?
5:59 PM
I found a github, but last update was 3 years ago.
Avatar
i'm not sure if the number is directly convertible , i have to explore this more
5:59 PM
yes, there is one
6:00 PM
PlayerListCommands.java 149 playerFileName = player.uniqueId.getNetId() + ".json"; Change to playerFileName = path.getFileName().toString() + ".json";
Avatar
java
6:01 PM
8455_DrakeNo
Avatar
is whet is available
Avatar
is it open source
Avatar
i'm developing another conversor in pohp
Avatar
I can port it to C#
Avatar
There's already one in C#, well, not c# but .Net
6:02 PM
Library for reading ARK Survival Evolved savegame files using C#. - ark-mod/ArkSavegameToolkitNet
6:02 PM
i'm 95% done with my reader in ohp, i just need to finish the reader and start writing the Compiler to reconvert from json to binary
6:03 PM
@cokll can you send me a full json profile to give it a read?
Avatar
yeah, nothing useful..... hmmmmmm
Avatar
i don't think this info is on the map save file.... could it be?
6:07 PM
gotta gtive me some time, i haven't resumed my deevelopment xD
Avatar
Yes, it's not on the map
Avatar
but i already have my "documentation"
Avatar
your pawn test character what info does it have, have you checked it recently?
Avatar
Have you ever had trouble getting into the game?Since the update, my server went black and dropped the call after 10 seconds.
6:48 PM
Until then, the server was working properly,
Avatar
The background shows that the player enters and exits the game within 1 second.
7:00 PM
Avatar
Are GetPlayerSteamId calls broken? Do I need to update my API?
10:07 PM
I think this is causing a crash: GetSteamIdFromController
10:09 PM
apoligies if it is a similar or repeat question from before. I'm scrolling back to see if it is answered
Avatar
GormusSenex 6/12/2020 10:20 PM
yup it is cuz of epic id
10:20 PM
new* epic id
10:21 PM
we basically spend all evening yesterday discussing it 😄
10:21 PM
michidu updated the api so u should be good now
Avatar
thanks. grab latest from github and update references. are there new function calls?
10:26 PM
or same function calls?
Avatar
function calls are the same only the code inside them had to be changed
Avatar
GormusSenex 6/12/2020 10:29 PM
ye, no need to change any plugin u made
Avatar
alright, thanks
10:33 PM
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
10:33 PM
That is the one, right? Just to be 100%
10:34 PM
i downloaded, updated references, recompiled and still have a crash. just being sure im in the right one
Avatar
You do my need to recompile
11:41 PM
Just get updated version.dll
11:42 PM
Michidu uses dynamic linking so new version dll updates everything automatically
Avatar
Uses the names generated from DECLARE_HOOK to help tie the two features together.
9:03 AM
/* Macro to add a hook easily. */ #define SET_HOOK(functionName, hookName) \ ArkApi::GetHooks().SetHook(functionName, &Hook_ ## hookName, &hookName ## _original) /* Macro to remove a hook easily. */ #define DISABLE_HOOK(functionName, hookName) \ ArkApi::GetHooks().DisableHook(functionName, &Hook_ ## hookName) (edited)
Avatar
So, anyone here has some experience with the ARK Save file? i'm trying to interpret the last data at the properties of an object, i can't make heads or tails out of it
Avatar
AaronBasques 6/13/2020 2:17 PM
@substitute i did what you suggested, i deleted all .obj files and recompiled the API, this error is just always there, using API 3.2, no issues using API 3.4.1 this issue
2:21 PM
there are no obj files before i compile
Avatar
GormusSenex 6/13/2020 2:21 PM
what about in the project itself ? if its set to "copy to output" ? (edited)
Avatar
AaronBasques 6/13/2020 2:25 PM
afaik the output folders are all within the project folder, is there some place I'm missing, maybe some additional output location?
Avatar
GormusSenex 6/13/2020 2:25 PM
not sure, sry 😦
2:26 PM
just threw up an idea cuz i jsut did exactly that in the c# project im in rn 😄
Avatar
AaronBasques 6/13/2020 2:26 PM
i did the same steps with 3.2 to get the API compiles, it just doesn't wanna compile 3.4
2:31 PM
@GormusSenex are you able to compile 3.4?
Avatar
GormusSenex 6/13/2020 2:32 PM
havnt tried yet, sry
Avatar
API is on 3.5 to fix steam id issue. No reason to use 3.4 any longer.
Avatar
AaronBasques 6/13/2020 2:34 PM
well, its still numbered 3.4 i just see it as 3.4.1, but the latest master branch is what i'm using , 3.4.1/3.5
Avatar
AaronBasques 6/13/2020 2:43 PM
definitely using master : commit 207 @Lethal have you managed to compile that version?
Avatar
AaronBasques 6/13/2020 2:44 PM
do you happen to know why i would be getting this error?
Avatar
I only use VS2019 to compile my stuff (edited)
🤔 1
2:47 PM
Pretty sure the released official code is compiled against VS17 which I had issues getting to work right when I started writing plugins. Did you try google for answers? Usually much faster to find things to try there and that error wouldn't be specific to the API.
Avatar
AaronBasques 6/13/2020 2:48 PM
google is always the first place i try
Avatar
AaronBasques 6/13/2020 3:32 PM
@Lethal so i also use 2019 for all other projects, i just ran this against 2017, same issue so lol, no idea..
Avatar
Try deleting the the x64 folders
3:42 PM
Also your screenshot shows a linking error.
3:45 PM
Does yours look like this?
Avatar
AaronBasques 6/13/2020 4:31 PM
@Lethal yeah everything just like that literally out of the box this error exists, i download master:207, open solution, compile.. this works ok for 3.2, not ok for 3.4/5
Avatar
AaronBasques 6/13/2020 5:56 PM
something in commit 183 changed, and i cant compile the API after there, not sure what the issue is.
5:57 PM
i suppose the issue is obvious to the more experienced people, but i am not.
Avatar
there will be plugins for ark epic servers?
Avatar
GormusSenex 6/13/2020 6:44 PM
maybe... maybe not...
6:45 PM
thats gonna need a rewrite / rethinking of ID stored runtime and on DB with a column telling whether or not the ID is a steam id or an epic one
6:46 PM
or store ID in a string column as '[Epic ID]#[Steam ID]' and a rewrite on the methods accessing and storing that ID. many ways to implement it (edited)
Avatar
Ark epic servers ?
11:28 PM
What ?
11:30 PM
Wow.
11:30 PM
Just
11:30 PM
Wow.
11:30 PM
What a shill of a company
Avatar
GormusSenex 6/14/2020 2:33 AM
makes sense. why should steam support EGS ?
2:34 AM
egs can make their own MOD "shop"-look-a-like... gl lol (edited)
2:35 AM
this is the era of arkserverapi plugins ! 😄 at least on epic ark 😂
Avatar
That’s not really a helpful error message
👍 1
Avatar
@Michidu would you ever consider moving from minhook to MS Detours?
6:48 AM
It's open source now, https://github.com/microsoft/Detours has a nuget package and has the wonderful DetourFindFunction function. DetourFindFunction would reduce/remove the need for PDB parsing.
Avatar
@substitute ah, didn't know about it. But still PDB reader would be needed for other things. also good idea about macro
8:17 AM
therefore i'm not sure what improvements it would give?
Avatar
@Michidu no need to always find function by scan
10:12 AM
So you don’t have to remember to update config to dump other structures
10:12 AM
Tbh it should just always dump all
10:12 AM
I don’t see much performance overhead
Avatar
yeah, 'dump all' is planned i'm working on adding nearly all structs to api also
👍 1
Avatar
Nice
10:17 AM
Are you going to use software dumper?
10:17 AM
Once you add findfunction / findobject bp code becomes available too
10:17 AM
One major flaw to bp code is the parameters are passed in as a pointer to a structure containing the args
10:18 AM
I wrote a template function that can take any args of any size and repack them in memory like a structure
10:18 AM
So it makes it easy to interop
Avatar
findfunction is added already i use ida with my own scripts to dump
Avatar
Nice
Avatar
i mean findfunction was always here
Avatar
Did you want the function template for packing args as structure?
10:19 AM
It works because the type expected is void* internally I believe
10:19 AM
And the magic ue4 does unpacks properly
Avatar
sure, it might be nice addition
Avatar
It’ll prevent you from having to make a structure for every bp function
10:20 AM
I think this is latest
10:20 AM
Contribute to SubstituteR/ParamaterPack development by creating an account on GitHub.
10:21 AM
Needs c++17 for the fold expression
Avatar
to call it you mean? api will directly call funcs as before
Avatar
I am talking about blueprint script functions
10:22 AM
You can find the ufunction and call it
10:22 AM
But the parameters for ufunctions are structures
10:22 AM
Like a(x,y) in bp script is a structure with two fields
Avatar
ye, true sometimes you can use just array though
Avatar
Only if the types match
10:24 AM
Like int,int array is fine
10:24 AM
int,playercontroller would be jank
10:25 AM
Would be useful to interop server api and workshop mod
Avatar
that's a great idea in your code definitely makes calls easier
Avatar
Is there a function to detect if a player is in a boss arena? I want to prevent users from using plugin commands when in boss arena.
Avatar
GormusSenex 6/14/2020 3:37 PM
im guessing u dont want them to buy 5 gigas while in the boss arena ? 😂
3:38 PM
i think some1 posted something about that sometime ago. have u tried searching here ? (edited)
Avatar
you don´t need to prevent to buy gigas in boss arena. actually you just can bring them in... huhe huhe
Avatar
GormusSenex 6/14/2020 3:55 PM
ye but u have to time the cryo-toss. with shop u just buy it in there 😉 (edited)
Avatar
Couldn't find much on search. Would really appreciate if someone could help out.
Avatar
Some day I am going to make a plugin that expands Aberration "native dino" code to the rest of the maps.
Avatar
My suggestion would be to do an area validation, i mean the coordinates for each arena are well known
5:04 PM
another suggestion would be to do it around the BossController (check distance from the Actor)
5:06 PM
like on ragnarok, the actor BossArenaManager_TwoBosses_DragonManticore_C is right in the center of the boss arena
Avatar
@Michidu Are you an official member of ARK?
5:53 PM
I had a question, In the latest version, rawSocket is disabled. Before this, my server had a layer of forwarding service.
5:54 PM
After the update, the forwarded game traffic can not enter the game, logged in after the black screen.
5:55 PM
I would like to confirm whether the verification of UDP source IP was added when rawSocket was officially disabled.
Avatar
@Codeboy he does not work for Wildcard
6:00 PM
Your best bet is to go into ida and check yourself (edited)
Avatar
@substitute Sorry, my English is not good. What is Wildcard?
Avatar
The company that made ark...
Avatar
Does it represent a router?
6:05 PM
-_-#
Avatar
GormusSenex 6/14/2020 6:05 PM
ur a troll - leave
Avatar
I see. You mean Michidu doesn't work for Wildcard?
Avatar
Yes, he does not work for them
Avatar
Amazing, ARKServerAPI is so convenient. I always thought it was an official insider.
Avatar
The dino, health attribute that the ArkShop purchased is sometimes regressed to a lower level than when it was purchased, Has anyone ever come across this problem?
Avatar
Hi! Erm... noob question here. I run an unmodded server, can I use Ark Api and it's plugins? You see people that got the game on Epic store can't use mods. Wil it be compatible with them?
Avatar
Yes
5:56 AM
@Deicide
Avatar
thanks man
Avatar
man i can't get this new version.dll file to work. I download the latest from ARKServerAPI website, replace it in the x64 folder and the server doesn't even attempt to boot.
8:26 PM
Just throws this every 15 seconds 6/15/2020 10:22:02 AM Restart SYSTEM 127.0.0.1 Detected process crash
Avatar
@Ras do you know how to use a debugger
Avatar
i know where the log files are for the API, but it doesn't even make it that far. ShooterGame logs aren't appearing either
Avatar
You need to attach a debugger
9:16 PM
And catch the exception
Avatar
that i don't know how to do then ><
9:33 PM
not through the Host Havoc control panel anyway
Avatar
If your host supports API use they should be able to help you get it updated and running again I would think. (edited)
Avatar
Honestly if I had to guess
10:05 PM
the server runtime may not support whichever version of Visual C++ the version.dll was compiled with
10:05 PM
I've seen a few people here using 2019 instead of 2017
10:06 PM
@Ras You can try to fix/update the issue and compile yourself on VS 2017
10:06 PM
in a nutshell, the version.dll might be using
10:06 PM
which may not be on your host's servers
Avatar
that could likely be it if version.dll was compiled in 2019. i had an issue with my API the exact same way
10:07 PM
my plugin*
Avatar
I'd give it a shot then, you can find what people did above
Avatar
ill give it a shot, didn't even consider that possibility
10:07 PM
i just figured i was doing something wrong with the version.dll lol
Avatar
it's just drag/drop replace CheckMark
Avatar
which is exactly what i did lol
Avatar
yep, I'd give the 2019/2017 a check
10:08 PM
just in case
Avatar
servers are on older hardware though, im told. i had updated my "test" server which worked with my plugin compiled on 2019
Avatar
I assumed the new API would be 2017 since Adrian posted it and the last version.
Avatar
@Ras is the test server your own or on the same host?
Avatar
and when i moved my plugin to our "play" servers, it had the issue and i had to compile to 2017
10:09 PM
same hosting service, different machine
Avatar
interesting lol.
10:09 PM
Looks like they don't use single image setups
Avatar
You could ask them to install the runtime files that support 2019 and below.
Avatar
or someone asked them to install VS2019 redist on your testing server
Avatar
i pay my own "test" account to play around with the plugins/API and make cool things. someone else owns and pays for hte playing cluster
10:09 PM
lol
Avatar
Shameless self-plug
10:10 PM
@Ras template I'm making for the API.
10:10 PM
one git command and it's ready to compile out of box.
10:10 PM
includes a debugging build setup as well.
Avatar
no shame in plugging cool sh*t 😄
10:11 PM
sounds useful lol
Avatar
DECLARE_HOOK(setAutoAdmin, void, AShooterGameMode*, APlayerController*, bool, bool, const FPrimalPlayerCharacterConfigStruct*, UPrimalPlayerData*); BOOL Load() { INIT_LOG("All Admins"); SET_HOOK("AShooterGameMode.StartNewShooterPlayer", setAutoAdmin); LOG->info("All Admins Loaded!"); #if DEBUG_PLUGIN LOG->debug("Debugging is enabled."); #endif return TRUE; } BOOL Unload() { DISABLE_HOOK("AShooterGameMode.StartNewShooterPlayer", setAutoAdmin); return TRUE; }
10:11 PM
it's that easy to use.
10:11 PM
SET_HOOK (and DISABLE_HOOK) are macros to compliment DECLARE_HOOK
10:12 PM
you still have to write the handler though obviously void Hook_setAutoAdmin(AShooterGameMode* _this, APlayerController* NewPlayer, bool bForceCreateNewPlayerData, bool bIsFromLogin, const FPrimalPlayerCharacterConfigStruct* charConfig, UPrimalPlayerData* ArkPlayerData) { //dostuff }
Avatar
@Ras I checked with dependency walker and it seems to use vcruntime 140
10:21 PM
so if rebuilding doesn't fix, which it might not, you'll need a debugger 😦
Avatar
Am i the only one to discover something called C++ ArkApi::GetHooks().DisableHook("ADroppedItemEgg.PerformanceThrottledTick_Implementation", &Hook_ADroppedItemEgg_PerformanceThrottledTick_Implementation); ?
10:28 PM
Aparently something called a performance throttled tick exists
10:28 PM
but isn't mentioned
10:28 PM
( in IDA or i missed it )
10:33 PM
I see it
10:33 PM
PerformanceThrottledTick is on parent class AActor
10:34 PM
when a class implements a function like this (one that is BP also), I find it is usually named func_Implmentation
10:34 PM
I think that's an UE4 standard
10:34 PM
yeah see, on parent
10:34 PM
10:34 PM
it is a bpscript function
Avatar
Ah ok yeah i see it aswell i dont recall seeing it so it could have slipped by
10:38 PM
i only found it in a crash stack call trace and figured might aswell check if it works
Avatar
Good morning everybody. By the way, is there a Linux version of APISDK?
Avatar
No
5:45 AM
There will likely never be one @Codeboy
5:46 AM
Linux ark doesn’t ship with pdb as far as I know, and that is required for this to work.
5:46 AM
This api is also using windows specific sdks to function
5:47 AM
Someone would have to port this library
Avatar
@Michidu
8:22 AM
Unreal Engine 4 .NET Core integration. Contribute to nxrighthere/UnrealCLR development by creating an account on GitHub.
8:22 AM
Each day we stray closer to clr in ark
8:24 AM
Has anyone ever encountered this problem
Avatar
@substitute nice! Just hooks might be an issue
Avatar
Coworker sent me that, and yeah hooks will be tricky
8:28 AM
Roadmap looks promising
8:28 AM
Avatar
oh, c# adding pointers
Avatar
Well tbh
8:32 AM
Pointers exist already either as unsafe or using intptr
8:32 AM
Just not super fun or easy to deal with
Avatar
yeah, i know if they are adding better support, that's great
Avatar
For a hook, the set hook would have to be a custom hook to write a trampoline to a native method that just forwards to the managed method
8:33 AM
I thought minhook had something like that though
8:33 AM
Might be mistaken
Avatar
that what minhook does, it might work for .net too actually would need to test
Avatar
Maybe I can later
8:35 AM
But for now cod
Avatar
Expanding to include the linux market would bring in more users
4:07 PM
Especially just for the fact you don't have to run a win10-7 VM to host a server on it's own in order to use the API
Avatar
Yeah but no pdb @KillZone
Avatar
Yeah i know pepefatsad
6:27 PM
Read the messages
Avatar
trust me
7:09 PM
you're gonna want to run the server on Windows
7:09 PM
they almost exclusively run their servers on Windows
7:10 PM
it's the only platform they give any love to.
Avatar
GormusSenex 6/17/2020 7:11 PM
Linux is for cheaps who dont wanna pay for a real OS 😉
Avatar
Linux is a real OS
Avatar
GormusSenex 6/17/2020 7:12 PM
not from my windows point of view...
7:12 PM
😄
Avatar
Windows can't Jailbreak iDevices on an A11 chip or older with checkra1n
7:12 PM
🙂
7:13 PM
Windows doesn't run on my PS3, or my pi3
Avatar
GormusSenex 6/17/2020 7:13 PM
pi3 it can tho
Avatar
Not really, no.
7:13 PM
it's completely unsupported
7:14 PM
and uses like 85% of your RAM idle on the desktop
7:14 PM
I can run Linux 100% in RAM once loaded.
7:14 PM
legit you can use USB to boot linux and then remove the USB with 0% issues if you use something like puppylinux
7:14 PM
the whole OS is loaded into RAM
Avatar
GormusSenex 6/17/2020 7:15 PM
jsut becuz its small and loads into ram on an inferior "computer" doesnt make it a full stack OS
Avatar
Linux is a fullstack OS
7:15 PM
it's so much of a fullstack OS Microsoft uses it on some parts of Azure
7:16 PM
the NSA contributed to it (SE Linux)
7:17 PM
a majority of computers run it or on top of it* *This is including phones.
7:17 PM
It runs on RISC-V, PowerPC, x86, x86_64
7:17 PM
and many more CPU architectures
7:18 PM
OS X and Linux systems are also cousins, both being designed around Unix.
Avatar
GormusSenex 6/17/2020 7:20 PM
linux has a lack of software, doesnt get the updates first to the software that runs both "OS"s, linux has way too many distributions all being very different, bugs are better handled in windows, support is close-to-none on linux unless ur a linux-geek urself, drivers r close to non existant, games are... none existant... and its basically complicated to a point where one think its complicated just for the sake of making it complicated so not too many users uses it (edited)
Avatar
GormusSenex 6/17/2020 7:22 PM
dont ever compare a giant to a mouse. in all aspect, except price, windows > linux. facts !
7:22 PM
i would even guess TCO is higher on linux but dont know for sure
Avatar
@GormusSenex to your points. 1. Linux gets daily updates. Really, go check the Linux kernel github. Distros have many updates over time 2. You don't have to use the many different types of distros. Stick to the main couple (for servers, CentOS is a good choice, there is also Red Hat Enterprise.) 3. Bugs are not better handled in Windows. This isn't subjective, both systems handle bugs by giving the developer control on how to handle issues. Blame the developer. 4. Support, there are distros that offer tons of support, such as Redhat. 5. Drivers .... that's again on the developers to do. Buy hardward that matches the OS you plan to use. This is not a good argument, OS X only has drivers for the hardware they use in Macs. Additionally, drivers are a complete non-issue in the server world. 6. Games, that's on the developer. Open APIs exist for game design, such as OpenGL. UE4 has bindings for these. 7. It is not complicated. There are extremely user friendly distros.
7:25 PM
I personally wouldn't use Linux for my desktop usage, but if I could use any OS, I would use OS X if my hardware was supported.
7:26 PM
OS X has both polish, and a common Unix history making it the perfect blend.
7:26 PM
Android runs on top of Linux btw, iDevices run on top of Darwin, which is based off of FreeBSD, which is designed around the common Unix.
7:28 PM
Anyways, if you want to talk about bugs
7:28 PM
Windows skipped version "9" because it could "break software using 9 to detect if the system was 95/98 vs 2000"
7:28 PM
that should say enough about the clobbered mess that Windows is.
7:29 PM
They still haven't correctly unified their UX from Windows 7 to the flat style they introduced in Windows 8.
Avatar
GormusSenex 6/17/2020 7:29 PM
is linux close-to-100% back-compatible ?
Avatar
Yes
7:29 PM
Linux itself is a kernel.
Avatar
GormusSenex 6/17/2020 7:29 PM
give it 20 yrs, and its not
Avatar
Yes it is
Avatar
GormusSenex 6/17/2020 7:30 PM
all distros r 100% back compatible ?
7:30 PM
i think not
Avatar
That's by the choice of the distro
Avatar
GormusSenex 6/17/2020 7:30 PM
exices
7:30 PM
excuses*
Avatar
is software written for windows 98 going to work automatically on windows 10?
7:30 PM
No,
7:30 PM
it doesn't
7:30 PM
I know it doesn't because I've had to deal with that
7:30 PM
That's on the developer
7:31 PM
If you use a distro that cares about long-term stability and compatibility, they almost always are backwards compatible.
7:31 PM
breakage comes from bad developers
7:33 PM
This issue is getting real tiresome and I've been spending atleast 2 days looking around for an answer. Basically, I want to publish a game, and I've hired a friend of mine to test it out before I
7:33 PM
XNA doesn't ship with Windows 8+
7:33 PM
you have to go through MS download pages to find it and get it working partially
7:33 PM
just to play games written in it
Avatar
GormusSenex 6/17/2020 7:35 PM
googling linux backward compatibility issues gives 9m hits. same on windows gives 52m hits. windows is used by 85%ish of the world where linux is hardly 2%. soo....
Avatar
how many people do you know on Windows use ancient software
7:35 PM
Of course Linux is going to have more results (by ratio), linux is almost exclusively used in a majority of server infrastructures (edited)
7:36 PM
btw, you're wrong about the usage of Windows %
7:36 PM
Mac OS and Android have massive market shares as well.
Avatar
GormusSenex 6/17/2020 7:36 PM
not the issue. that fact that its "clumpsy" as u said is becuz its almost 30 yrs old and started from 16bit
7:37 PM
7:37 PM
Android runs on Linux
Avatar
GormusSenex 6/17/2020 7:37 PM
im talking pc. not smart devices
Avatar
Smart devices are computers
7:37 PM
in many developing countries, a smart device is a person's only computer
Avatar
GormusSenex 6/17/2020 7:38 PM
cuz they r fucking poor. idc about them
7:38 PM
im talking PCs
Avatar
Wow, what an incredibly ignorant statement
Avatar
GormusSenex 6/17/2020 7:38 PM
actual PCs
Avatar
I'm not talking to you anymore. That was an incredible ignorant thing to say.
Avatar
GormusSenex 6/17/2020 7:38 PM
ye it is what it is
Avatar
There's nothing a PC can do that a smart device can not do.
Avatar
GormusSenex 6/17/2020 7:38 PM
umm, ye ?!
Avatar
Name one.
Avatar
GormusSenex 6/17/2020 7:38 PM
like a lot and a lot faster
Avatar
You can develop on a smart device. You can game on a smart device. You can produce music on a smart device. You can edit video on a smart device. You can write documents on a smart device.
7:39 PM
Just because a full-sized desktop is faster doesn't make the point invalid.
Avatar
GormusSenex 6/17/2020 7:39 PM
it doesnt even come close to the computational power of a pc... duhh
7:40 PM
anyway, i love linux. got ubuntu on two laptops at home. im basically trolling cuz im bored at work 😄
Avatar
btw
7:42 PM
7:43 PM
are you saying Spain is poor?
Avatar
GormusSenex 6/17/2020 7:43 PM
umm, ye
7:43 PM
like greece and italy
Avatar
And China and Ireland?
Avatar
GormusSenex 6/17/2020 7:44 PM
yup
Avatar
because that would be be wrong
Avatar
GormusSenex 6/17/2020 7:44 PM
maybe not ireland
Avatar
China has one of the largest economies on the planet.
Avatar
GormusSenex 6/17/2020 7:44 PM
only a little
7:44 PM
not per capita
7:45 PM
7:45 PM
spain #34
7:45 PM
china #79
7:46 PM
... let me point u to #16 <---
7:46 PM
<----
Avatar
Hong Kong is above USA
7:47 PM
HK is part of China
7:47 PM
🙂
7:47 PM
Ireland is above USA
7:47 PM
UAE > USA
7:48 PM
7:48 PM
7:48 PM
7:48 PM
All Android #1
Avatar
GormusSenex 6/17/2020 7:48 PM
ireland is only up there cuz of their tax laws making them the european capital of tax evaders
Avatar
excuses
7:48 PM
wasn't that what you said?
Avatar
GormusSenex 6/17/2020 7:48 PM
😄
7:48 PM
😉
7:48 PM
doesnt make the citizens rich if its all owned by companies
7:49 PM
but ye... excuses
7:49 PM
i guess
Avatar
I'd also back linux, recently switched to it after 15 years of using windows
10:35 PM
After the learning curve it's so much more powerfull than windows
10:35 PM
I have my old OS on a SSD just for games and ark and that's about it
10:36 PM
And regarding what you said about updates @GormusSenex with linux, It's alot more updated than windows if you get a rolling release cycle distro
Avatar
GormusSenex 6/17/2020 10:36 PM
cough ark cough
Avatar
If you opt for something like CentOS then yeah windows is updated more but servers ( note servers, not PC's ) running a OS like that isn't chasing the latest updates, rather stability
10:37 PM
No clue why they opted to love windows so much
10:37 PM
but given how the reacted to Epic games with "Epic ark servers" i would place theories but it's their right to do whatever they deem fit
10:37 PM
Also
10:38 PM
Might sound stupid, but has anyone just asked for the PDB for linux?
Avatar
AaronBasques 6/18/2020 12:44 AM
@Michidu will you by any chance be updating your repository https://github.com/Michidu/Ark-Server-Plugins specifically the permissions source code? thanks.
Avatar
It didn't need updated it only needed to be compiled against the fixed API source i'm pretty sure. At least that's all I had to do before the official version was released.
Avatar
AaronBasques 6/18/2020 12:50 AM
oh i see, thanks. i seem to be getting this ArkAdvert, not sure what it is Severity Code Description Project File Line Suppression State Error C4996 'std::result_of<callable (AShooterPlayerController *&)>': warning STL4014: std::result_of and std::result_of_t are deprecated in C++17. They are superseded by std::invoke_result and std::invoke_result_t. You can define _SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning. ArkAdvert D:\VisualStudio\Repository\ArkAdvert\ArkAdvert\Tools.h 9
12:50 AM
it jumps to this class
12:51 AM
i have no idea what i'm doing here
Avatar
AaronBasques 6/18/2020 12:55 AM
Linus just doesn't look like that little 12yo Tech wizard anymore, must be the beard.
Avatar
@AaronBasques You can add the following in the project in code or in the properties #ifndef _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS #define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS #endif (edited)
Avatar
AaronBasques 6/18/2020 1:12 AM
@Lethal thank you, i added it to the PreprocessorDefinitions is it wise to use depreciated stuff though?
Avatar
Its fine until it gets removed 🙂
Avatar
AaronBasques 6/18/2020 1:14 AM
awesome, i appreciate the help. do you have any experience with \version\Core\Public\Timer.h i cant find anything that uses it to use as an exampel (edited)
Avatar
Pretty sure there is public code that uses "AddOnTimerCallback" and "RemoveOnTimerCallback".
1:17 AM
ArkAdvert TimedRewards EventManager etc...
Avatar
AaronBasques 6/18/2020 1:22 AM
it doesn't appear to be the same timer though, those plugins seem to create their own thread as where Timer.h uses two functions DelayExecute and RecurringExecute i figure, if there is already a timer implementation in the API, why am i using my own thread instead of the API stuff (edited)
1:24 AM
or at least i'm likely not understanding how to use them lol idk
Avatar
@KillZone I asked zen
1:33 AM
He said no to pdb
1:33 AM
Also it wouldn’t be a pdb it would be a different file
1:33 AM
Pdb is made by Microsoft though technically it’s an open standard now
2:29 AM
Not even sure how you would use it then for the API if it were a different file, but worth a shot
2:29 AM
Im not sure why they released a windows PDB but wont give the linux equivalent
Avatar
Anyone tried a server running on WINE or something similar?
Avatar
That's a rabbit hole in itself but no i havent
2:31 AM
Il give it a shot
2:37 AM
2:37 AM
Well it somewhat launches
2:38 AM
the API isn't picked up since no output of it being loaded
2:38 AM
and i can't test if it actually started since i don't have ark installed on this OS
2:38 AM
But somewhat works if you can call it that
2:39 AM
The failed to get host name is not a error , just the running VPN causing it to fail btw
Avatar
Anyone tried a server running on WINE or something similar?
WHY would you run a server on wine?
2:40 AM
To avoid forced restarts on a win10 VM for updates a good example ?
Avatar
why not just simply run in linux and that's it
Avatar
API isn't supported on Linux I was asking a question to add to the conversation. Try and catch up with the convo.
Avatar
Api sounds like a good excuse to add a layer of virtualization
2:49 AM
I swear im being monitored
Avatar
AaronBasques 6/18/2020 3:04 AM
everything is monitored, its how they make money, selling your activity so they can push adverts at you, every site/app does it that has any kind of tracking discord included.
3:06 AM
i only have to say "baby bottle" near someone else's phone when i'm no where near my devices, then i look later, a bunch of ads i get, baby stuff... the shit knows your voice too...
Avatar
Yeah the privacy concerns were one of the main reason i switched to linux
3:13 AM
Because when i search for a file what i want the OS to do is send the search query to bing.com just in case
Avatar
AaronBasques 6/18/2020 3:14 AM
I just accept there is no privacy and limit my usage accordingly i don't even use facebook or instagram
3:15 AM
i'm not missing out on anything there
3:15 AM
all my profiles on signups are fake, with fake emails and fake names
3:16 AM
fuck the multinationals and their corporate shit
Avatar
Eh just use the correct software and aproperiate steps
Avatar
AaronBasques 6/18/2020 3:17 AM
nothing is safe though, no matter what you use. they have you some how.
Avatar
Why not use Windows Server Core? My server runs on this one
Avatar
i'm not a fan of not having the classic explorer, but that's not a bad idea actually
Avatar
Solved the Windows 10 messy interface, leaning to Linux streamlined, stable
4:08 AM
For the game server, no Explorer is needed
4:09 AM
The command section of PowerShell is similar to that of Linux, and regular operations are sufficient.
Avatar
i know, but, i haven't actually bringed myself to actually do something like that, out of lazyness
Avatar
My Server
breddigood 1
4:14 AM
The system only needs 600M memory.^_^
4:15 AM
windows server 2019 needs 3~4G memory....
Avatar
the system, so the OS?
Avatar
can you like install the explorer into a server core?
4:19 AM
i'm thinking i might want that with my workjstation xD
4:19 AM
i installd
Avatar
bare minimum windows and the minimum needed to run steam would be the dream
Avatar
chrome
Avatar
nice, i think i will try to do that next time i reformat my computer
4:23 AM
It lacks the DLLS needed to run the ARK server and needs to copy opengl32.dll, glu32.dll, dsound.dll and dx to the server
Avatar
but that is installing directx only doesn't it?
Avatar
yes, Directx installation error in my system, later is the required DLL copy over to solve
4:28 AM
It is now up and running, and the plugins are loaded
4:29 AM
Some time ago, I tried to run Server Core with Docker, and finally got stuck in directX DLL
4:30 AM
Next time I try it again, just copy the DLL and I guess it will work fine
Avatar
hmmm
Avatar
@Hsilamot
4:41 AM
look into Windows LTSB
4:41 AM
but you would have to pirate it, LTSB is only sold to enterprise
4:42 AM
@KillZone
4:42 AM
you could do an obj dump on the linux server binary to see what symbols are in it.
4:42 AM
but I don't expect much, Googling it shows unknownfunction on crash logs. (searching linux ark server crashstack) (edited)
breddigood 1
Avatar
i can acquire it, problem is that, it is not what i'm looking for
Avatar
latest Windows Server can run headless
Avatar
i want a Windows Core, like the server, basically stripping away all the components i do not need, for example Windows Network sharing, i don't use it, i don't want it, windows contacts, windows maps, windows calendar all of those apps that run all the time on the background, don't need them, active directory integrations, don't use them, don't need them.
Avatar
Those are removed in LTSB (edited)
Avatar
Problem with windows server is that you can't run windows store applications on it
Avatar
Networking sharing, likely not, but all the metro UWP apps are. (edited)
Avatar
we did explorer LTSB but we didn't like it,,, i don'r remember why actually, but i think i might want to give it another shot at somepoint
4:46 AM
oh, yeah, same problem, no access to the microsoft store so no apps on LTSB
Avatar
Well, you have to deal with the UWP apps if you want Microsoft Store
4:47 AM
many of them are to some extent dependent on each other.
Avatar
yeah, they need to make it UWP so it doesn't require their apps to work
Avatar
Google Play Store on Android won't work without Google services
4:47 AM
I can assure you, those apps are at most taking like 200mb of RAM, tops.
4:47 AM
If you have a server machine, I'd expect no less than 64 GB of ram.
Avatar
like, i kinda understand that you require MsContacts for the UWP to work, but, do i need the MsContacts to run as a service? shouldn't that be implemented with callbacks instead?
Avatar
That's not how Operating Systems work
4:48 AM
callbacks only function in the process they exist in.
4:48 AM
To have crosstalk between services, both programs need to be running and they need to implement their own IPC protocol.
4:49 AM
They could have made MsContacts a front-end for a background service, but it's effectively the same, as MsContacts (in unloaded/idle) is basically already that.
Avatar
i see
Avatar
Works that way in all modern OSes
Avatar
at the end of the day what i would like to see is my computer with less processes, not the 280 i see it today,,,
Avatar
it's part of protecting applications
4:51 AM
even in Linux, you have to pipe contents from process A to process B at a minimum
4:51 AM
if you want DMA between programs, use an unprotected OS like Temple OS
4:51 AM
Kapp
Avatar
but linux somehow feels much better than windows,
Avatar
but when someone gets a buffer overflow and crashes the whole system
4:51 AM
MONKA
Avatar
eww, TOS
Avatar
Linux feels better because it hides some things better 😉
Avatar
hides?
Avatar
many things are in daemons that you don't usually see (edited)
4:54 AM
If I can ask (edited)
4:54 AM
why do you need MS Store?
Avatar
up until now, for games mostly in my case, on the bussiness because our parent company has developed apps for the windows store that are core for the bussiness
Avatar
has anyone tried to use epic's version of ark? Does it print a proper ID?
Avatar
yes, print a proper ID.
Avatar
have you got an example of ID?
8:47 AM
The first is epicID and the second is steamID
Avatar
thanks
Avatar
@Hsilamot Linux uses systemd which handles all the background services
1:21 PM
It's very well written but still gets a bit of controversity despite how long it's existed already
1:21 PM
previously you would have to cron jobs with shell and that was all you had
1:21 PM
then they introduced systemd
1:22 PM
also @substitute Saw what you wrote, atm it's just for dev work but a headless version of windows does sound more apealing
Avatar
@Michidu http://arkdedicated.com/globaladmins.txt the last 2 are epic ids as well
1:46 PM
8997470993440060352 8218251314968812020
Avatar
@unclema 国人?
thonkhmm 1
Avatar
哇。国人出现了
Avatar
@dougy thanks
Avatar
Good morning everybody, Is there a link like steam://connect in Epic's ARK?
3:52 AM
In China, epic search server is very slow, often cannot search server.
5:03 AM
you can execute "open ip:port" command
Avatar
It is too troublesome to execute the command, and you can only open the console after entering the stand-alone game
5:13 AM
Epic ARK doesn't seem to have a LAN option either.
5:13 AM
-_-#
Avatar
nope, but it's the only way to make it stable, they introduced favorites last patch tho
Avatar
No lan on epic version might be due to them just not having a protocol to support lan play or they intentionally left it out
Avatar
yep, I guess they did it on purpose.
Avatar
Good News everyone, ARK for Epic Games has solved all the network issues!
2:57 PM
👍 2
gigakek 1
2:57 PM
They just removed online play entirely
Avatar
hahahahaha
Avatar
lmao, wow
3:24 PM
You guys battling it out on Windows vs. Linux, can't Mac get some love? 😂
Avatar
Mac ≈ Linux
thistbh 1
Avatar
GormusSenex 6/19/2020 3:57 PM
Mac is not even worth mentioning (edited)
Avatar
love the excuse mac users make when it can't run games
4:45 PM
"MaC iS nOt mEaNt fOr gAmInG"
4:45 PM
dude if you pay like 3k for a machine it better do everything like competitors
Avatar
GormusSenex 6/19/2020 4:49 PM
AMEN !
Avatar
Have never heard any mac user say that, but, i would not be impressed if they do say that
Avatar
I mean just dual boot lol
Avatar
GormusSenex 6/21/2020 11:33 AM
and thats why windows > mac. no windows users ever need mac os on their pc, but mac ppl cheered when they could isntall windows on their mac 😂
Avatar
I mean
7:29 PM
I need OS X on my PC
Avatar
GormusSenex 6/21/2020 7:33 PM
... and i guess when ur in a room full of ppl u cant find the room wierdo either ? 😉
7:34 PM
(no sane ppl needs os x on a windows pc)
Avatar
You need it to compile programs for iOS.
Avatar
GormusSenex 6/21/2020 7:35 PM
that is true tho. and rly annoying...
Avatar
need Black Apple system?
Avatar
?
Avatar
Was someone working on an automatic wyvern/ drake egg clean up plugin? I feel like I've seen it mentioned, was thinking of writing one (edited)
Avatar
This plugin allows you to schedule RCON commands to run exactly when you need them to. You can set them to run when the server starts, every X minutes, every X hours or at an exact time during the day. Dependencies: Microsoft Visual C++...
2:39 PM
do you know what the command would be?
Avatar
They are in the default config I believe.
Avatar
it is, i did not scroll. sorry, early morning! Thanks for the plugin!!
Avatar
Anyone familiar with the UUI functions or something that would accomplish the following? I'm trying to force close a menu on the client or tell the client to reinit the hud to remove/refresh a menu that is open.
Avatar
I was trying the following to hook the button click but it never seemed to get called. DECLARE_HOOK(UUI_ClusterServersListSessions_ClickedButton, void, UUI_ClusterServersListSessions*, UWidget*); void Hook_UUI_ClusterServersListSessions_ClickedButton(UUI_ClusterServersListSessions* _this, UWidget* clickedWidget) { UUI_ClusterServersListSessions_ClickedButton_original(_this, clickedWidget); } ArkApi::GetHooks().DisableHook("UUI_ClusterServersListSessions.ClickedButton", &Hook_UUI_ClusterServersListSessions_ClickedButton); ArkApi::GetHooks().SetHook("UUI_ClusterServersListSessions.ClickedButton", &Hook_UUI_ClusterServersListSessions_ClickedButton, &UUI_ClusterServersListSessions_ClickedButton_original); (edited)
Avatar
@Lethal not possible
7:10 PM
UUI doesn’t run on the server
7:11 PM
Anything to force a client HUD refresh?
7:14 PM
May doing a teleport command on the player and teleport them to the exact same location would close any open menu screens 🙂
Avatar
you can't force close UUI screens
8:12 PM
why are you trying to force close the UUI?
Avatar
I'm blocking player server transfers when they have certain items that are not allowed per settings.
Avatar
ohhhhhh, why don't you just block the items themselves ?
Avatar
Items that the base game allow being transferred.
Avatar
it's a boolean
8:15 PM
you could probably override it
8:16 PM
you could also override the upload/transfer functions and block them if items are found (edited)
Avatar
blocking works fine but the UI bugs out a little
Avatar
try flipping the boolean (edited)
8:17 PM
or even better
8:17 PM
override the function that checks
8:17 PM
if an item is OK to transfer
Avatar
for instance when transferring a player I can block when they click "Join with survivor" but the cancel button is not active any longer. So you have to toggle a sort option on that screen to refresh it so the cancel button can be clicked.
Avatar
I'm sure there's a way to do this easily enough.
8:18 PM
with changing the function that checks for allowed transfers
Avatar
Pretty sure the client side checks if the item can be transferred
Avatar
the server validates it
8:20 PM
if it didn't, people would just cheat to transfer things like element
Avatar
local_4c8 = (wchar_t**)LoadStringCacheProperty(L"Items Not Allowed", 9); This message comes from the client side UUI clicked function.
Avatar
yes, because that is UUI specific
8:22 PM
the server has final say if an item is uploaded or not.
Avatar
I'm checking the decompiled source again.
Avatar
Ya, not sure where that would be happening at in the code i've been looking at.
8:40 PM
Just like trying to override allowing element transfers. That is blocked by the client as it doesn't ask the server if it is a valid upload item. So you can't even drag that over to the upload UI.
8:41 PM
Normal items will highlight the remote inventory frame when you can interact with it when dragging and dropping an item.
8:42 PM
My blocking code works and prevents the upload of single items or the upload of a character. Just no way to update the client that the UI state needs to change.
Avatar
try overriding the item settings
Avatar
I don't think the client is checking with the server so not sure that would do anything different.
8:55 PM
I have an idea I will try based on that and see what happens.
8:58 PM
BTW, I already override "Hook_UPrimalItem_CanBeArkTributeItem" but this isn't called for the purpose of checking player inventory only when uploading single items.
Avatar
I verified the item had "bCanBeArkTributeItem()()" value of 0 and it didn't block on the client side.
Avatar
Did you replicate those changes
10:20 PM
To the client
Avatar
Can I hook another plugin's own functions? (edited)
Avatar
depends
Avatar
I want to hook a function from VoteRewards plugin
Avatar
hm ?
2:13 AM
it has pdb and it's open source so you can do it
Avatar
Yeah, the thing is I can't figure out how to declare the hook 😬
Avatar
you can't with the traditional method
2:13 AM
since it's looking inside ShooterGameServer.exe
2:14 AM
you'll need to include minhook in your plugin and find the function inside VoteRewards.dll
Avatar
That is a good start 😃 thanks
Avatar
it would be easier for you to add whatever you're doing to the plugin itself
2:15 AM
lol
2:15 AM
instead of hooking it
Avatar
@WETBATMAN
2:24 AM
he could also just use Detours
Avatar
DetourFindFunction is op
Avatar
@substitute I did try UpdatedItem(false) but didn't seem to affect it.
Avatar
it works for other stuff so the issue is somewhere else
11:01 PM
if i call it after i update item stats it reflects ingame
Avatar
I don't think every field is able to replicated back to the client. I can change stats without calling UpdatedItem and the client sees the correct stats.
Avatar
hm ?
11:15 PM
which stats are you talking about ?
11:16 PM
i 100% remember that unless i called UpdatedItem the durability/damage/armor were not changing
Avatar
item->bCanBeArkTributeItem (edited)
Avatar
unless something else called UpdatedItem
Avatar
I think it depends on where/when you change the stat values.
Avatar
yeah, if something else calls updatedItem you don't need to
Avatar
I tried many different things but bCanBeArkTributeItem() would never seem to be updated on the client regardless if I called UpdatedItem or not.
11:20 PM
I could change it and the server can tell me that it was flagged as "true" but the client doesn't know about it so the UUI stuff doesn't seem to call "Hook_UPrimalItem_CanBeArkTributeItem" when it is checking if restricted items are on a player it uses the local item information on the client best I can tell.
Avatar
the thing is
11:21 PM
APrimalItem is hardcoded
11:21 PM
i tried to change turret slots with a plugin
11:21 PM
and it just didn't work
11:21 PM
because the actual slot count is hardcoded and can't be changed without a mod
Avatar
Certain things can be changed for sure that reflect on the client side but other things i'm pretty sure just don't have any replication available.
11:25 PM
I was looking at trying to determine spoil times as some requested a per item setting. I haven't quite figured out how to affect the spoil timer properly yet.
Avatar
@here WARNING: latest version (released few momments ago) breaks the API, if you have a server depending on the api do not upgrade it just yet
Avatar
06/25/20 00:22 [API][error] Failed to create hook for RCONClientConnection.ProcessRCONPacket
Avatar
They once again failed to release the most current PDB with the Binary
7:52 AM
Steam Database record for depot ARK: Survival Evolved Dedicated Server Depot Linux (DepotID or AppID: 376031)
Avatar
oops,, already autoupdate worked my servers... i didnt never seem this channel T_T (edited)
Avatar
Yeah noticed that. 17 servers down here 😛 (edited)
Avatar
My servers seem to be fine running with 311.94 Binary and PDB. Maybe someone has a more recent copy of these?
Avatar
i tried reverting to the previous patch but it didn't work.
8:35 AM
i have a 311.99 build
Avatar
Did you replace the exe and the matching pdb for the older version?
8:40 AM
mines okay 🤞
8:41 AM
I just dropped 311.94 pdb and exe over the top and working fine. ill test further and share if wildcard dont fix soon
Avatar
no i just overwrite the pdb file
Avatar
use the matching ShooterGameServer.exe that the PDB was created with
8:42 AM
Just woke up here lol
Avatar
haha I'm at work 😛 almost home time haha
Avatar
i have a .302 working
Avatar
Can you upload the exe and pdb somewhere? ❤️
Avatar
yes will do
👍 2
8:56 AM
There has been an update from Wildcard that has broken the API due to a corrupted .pdb file. Here is a temp solution if you don't want to wait for WC to release an update. https://www.dropbox.com/s/hdo9ork7an1l6t7/Temp%20ArkApi%20Fix.zip?dl=0
👍 2
Avatar
Thanks @Foppa , champion
Avatar
@Foppa
5:28 PM
someone should make a PDB generator
5:28 PM
using an older PDB + older exe, create signatures and dump into a temporary PDB from new exe when they forget to ship pdb
5:28 PM
sig scanning is quite powerful 🙂
Avatar
Any hook to change the inventory slot of a set equipment/structure?
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/25/2020 8:03 PM
new update (summer one)seems to be stable for now (edited)
Avatar
My test server is running on it fine as well with the event enabled
Avatar
yep me too
Avatar
So anyone know how to change the inventory slot of a set equipment/structure??
Avatar
slot count ?
Avatar
Non-Modded Trying to increase slot counts for structures like forge/vault/benches
Avatar
you can't
12:09 AM
it's hardcoded into AprimalItem and is client side
12:10 AM
(as far as i know, i also tried this, the slot count would show a different number on the structure but when opened slots would be the same)
Avatar
Oh, I see. ok, thanx 🙂
Avatar
@WETBATMAN @Raptross
12:16 AM
you can make it into a command though
12:16 AM
like /overfill "item name here"
12:16 AM
while looking at the structure
Avatar
Good morning guys Woke up to see some messages about API Problems with the newest update? Im wiping my PvE cluster today to enable Crossplay with EG so wanted to make sure everything is going to be running smoothly
Avatar
there are no api problems, problem was with the game itself, they mismatched the .pdb file
Avatar
Yeah sorry i worded that badly xD I didnt mean it like that
Avatar
it’s fixed now so it doesn’t matter anyway lol
Avatar
@WETBATMAN@Michidu
5:32 PM
I've found a use-case for needing to expediate proper BPScript interop with the API.
5:32 PM
anything relating to the player character directly, not the ShooterCharacter, but the PlayerPawnTest is all in BPScript.
5:33 PM
ex: Player Chibi Levels
Avatar
Do you know what protocol is used to check the server online player on rcon tools or ark server manager ?
Avatar
Hey, how can I create a FName variable and assign it a string?
Avatar
@Pelayori
11:41 PM
FName(L"your string here", EFindName::FNAME_Add, false);
Avatar
Lol thank you, been looking for it some hours
Avatar
Does anyone know if there is a problem with permissions when running Crossplay? None of my players this wipe have been given permissions
10:14 AM
The only difference is the servers are now crossplay
Avatar
Did you update your api
Avatar
Yes everything is up to date
Avatar
Is anyone willing to test out my cross cluster chat (global + tribe)? (hopefully on a server with more than a couple players > 2 maps)
Avatar
substitute 7/1/2020 7:49 AM
@Michidu
7:50 AM
do timers run in their own little threads?
7:50 AM
if they do, we could look into using TerminateThread and keeping a list of active timers
7:50 AM
this would allow for proper unloading when using timers.
Avatar
2 options But that planned
Avatar
substitute 7/1/2020 7:52 AM
what are the two options? (edited)
7:52 AM
I did say I was gonna contribute at some point and merge some of my changes in
7:52 AM
laughpoint
Avatar
In own thread or in ark timer :)
Avatar
substitute 7/1/2020 7:54 AM
you mean in UE4 timer?
Avatar
Yes
Avatar
substitute 7/1/2020 7:54 AM
hm, interesting choices.
7:54 AM
one one hand, own thread gives much more control to the programmer
7:54 AM
on the other, UE4 timers run in the game thread.
7:54 AM
some functions aren't allowed to be run outside of the game thread.
7:54 AM
They'll crash (and sometimes Assert!)
Avatar
true
Avatar
substitute 7/1/2020 7:55 AM
Might actually be why the raytrace crashes
7:55 AM
from what I have heard the raytrace/linetrace function crashes the API
7:56 AM
ok so here's the best of both 😉
Avatar
In next version automatic unload of hooks/timers/commands is planned
Avatar
substitute 7/1/2020 7:56 AM
hook a gamethread (like ProcessEvent)
7:56 AM
and allow devs to "queue" game thread sensitive commands
7:56 AM
make timers their own thread.
7:56 AM
then devs can do like GameThread::Enqueue(std::function here)
7:56 AM
if you can pass a lambda that way, I think it would be perfect
7:57 AM
What do you think?
7:57 AM
option A with interop for B
7:58 AM
It should work for API functions at least with enqueue (edited)
Avatar
So execute only game functions in game thread
Avatar
substitute 7/1/2020 7:58 AM
Yes
7:58 AM
but force the developer to choose when to queue that way
Avatar
That might be 3rd option
Avatar
substitute 7/1/2020 7:58 AM
because like if I hook ProcessEvent
7:58 AM
I'm already in a gamethread and don't need to worry about it.
7:59 AM
I don't remember
7:59 AM
can you pass a local method as a std::function?
7:59 AM
like class->func?
7:59 AM
don't remember, I usually don't worry about passing things like that 😛
Avatar
Timer already hooks game thread in first option
8:01 AM
Member function you mean?
Avatar
substitute 7/1/2020 8:01 AM
Yes
Avatar
Yes with std bind
Avatar
substitute 7/1/2020 8:02 AM
ah neato
8:02 AM
the main issue with UE4 timer
8:02 AM
is well .... much less control
8:02 AM
and also forced to run on game thread
8:02 AM
somethings don't need to touch game thread at all
8:02 AM
(like something that periodically dl's data from the internet and caches it)
Avatar
That why there is second option haha
Avatar
substitute 7/1/2020 8:04 AM
hm, I'll try to prototype #3 as well, I think there's merit in the Enqueue function even outside of the timers
Avatar
But new threads can be dangerous also
8:04 AM
For new devs especially
Avatar
substitute 7/1/2020 8:04 AM
considering that the api is a hack, everything is dangerous 😉
Avatar
hehe
Avatar
substitute 7/1/2020 8:05 AM
that's why the timer function would abstract that thread nonsense for them.
8:05 AM
and the thread singleton could track and terminate them when unloading
8:06 AM
as far as what the dev needs to do, they don't need to really make a thread with a loop (and delay)
8:06 AM
could just pass a function and the api would make the thread and run that function
8:06 AM
(the api would make the endless thread with correct delay)
Avatar
That almost how works now, except termination
Avatar
substitute 7/1/2020 8:10 AM
++ the termination stuff (singleton tracking threads)
8:10 AM
I think easy peasy
8:11 AM
if worried about ease of thread close, could copy the UE4 design of naming them.
8:11 AM
e.g. createThread("my updater", updatingFunction)
8:11 AM
endThread("my updater")
Avatar
Looks good
Avatar
substitute 7/1/2020 8:12 AM
oh , while you're here
8:12 AM
do you know a way to force replicate a variable ?
8:13 AM
I haven't dug too deep, but I have a variable that's sent from server to client, but doesn't update on client when changed on server (updates on reconnect though obviously)
8:13 AM
I was wondering is there was a "force update" type deal
Avatar
Often classes have update function.. Need to look, not near pc rn
Avatar
substitute 7/1/2020 8:14 AM
kk, no big deal
8:14 AM
mostly for convenience
Avatar
Hello @Michidu (Sorry to ping you plz dont ban xD). Do you know if your All Engrams plugin works for Epic Games players?
Avatar
substitute 7/1/2020 5:09 PM
@XeLaD there’s no reason for it to not work
Avatar
Hook_APrimalStructure_IsAllowedToBuild Is called for C4 placement on structures and ground but is not called for placing on dinos. What hook am I missing for dinos? I've been looking for a bit now.
9:22 PM
I thought maybe APrimalStructure::BPPreventPlacementOnPawn but I guess it doesn't hook because its a "BP" function?
Avatar
c4 is not just AprimalStructure, it’s an AprimalStructure_Explosive
9:31 PM
that class might have it’s own placement function
9:32 PM
btw
9:32 PM
functions that have bp in name
9:32 PM
call bp functions in them
9:32 PM
you can hook them fine
9:32 PM
and get return
9:33 PM
(if function has one)
Avatar
Attaching to a dino is the hook I can't find.
Avatar
i also ran into this and couldn’t find a hook when c4 is placed on a dino, so i made it just not detonate
9:56 PM
granted in my case i didn’t have to know what the c4 was placed on
Avatar
I'm actually going down that path now.
Avatar
DECLARE_HOOK(APrimalStructureExplosive_CanDetonateMe, bool, APrimalStructureExplosive*, AShooterCharacter*, bool);
9:59 PM
bool Hook_APrimalStructureExplosive_CanDetonateMe(APrimalStructureExplosive *_this, AShooterCharacter* Character, bool bUsingRemote) { if (ProtectExplosives) { const auto& NowTime = ArkApi::GetApiUtils().GetWorld()->GetTimeSeconds(); if (NowTime >= LastTime && Character) { AShooterPlayerController* aspc = ArkApi::GetApiUtils().FindControllerFromCharacter(Character); if (aspc) { LastTime = NowTime + 1; ArkApi::GetApiUtils().SendNotification(aspc, { 1,0,0,1 }, 2, 5, nullptr, ArkApi::Tools::Utf8Decode(PVPMessage[2]).c_str()); } } return false; } return APrimalStructureExplosive_CanDetonateMe_original(_this, Character, bUsingRemote); } (edited)
9:59 PM
from PVP-Scheduler by OwnProx
10:00 PM
if you go down this path, make sure to destroy the c4 otherwise they can place c4 on wild dinos and drop those into enemy bases which have turrets
10:01 PM
the turrets will detonate the c4, or if your hook prevents that the c4 will soak the turret 😄
10:01 PM
i make the turrets ignore the c4 when targeting in this case
Avatar
lol good call
Avatar
a tester found this out for me, i wouldn’t even think of it XD
Avatar
I feel ya. Its hard to test every single scenario solo.
Avatar
@WETBATMAN This makes the C4 a dud :) _this->ExplosionDamageField() = 0; _this->Destroyed();
Avatar
hah
10:40 PM
good call
Avatar
I might add a message that the C4 was faulty lol
Avatar
RunningBearYarrr 7/2/2020 1:22 PM
Could someone please check this config for ArkShop, it just stopped working after I changed some items around.pFML
Avatar
Json formatting is alright, how did it stop working?
Avatar
RunningBearYarrr 7/2/2020 1:59 PM
When I put the ARkShop folder with the default json config into the server, it worked fine, for example points were being given, and people could buy items. I shut the server down, removed the old config file, and put this new one in it's place, turned the server back on and then did a restart so it would update. It said updating, server came back online, plugin no longer works. /shop /kit etc do nothing, cheat reload.config or however it's written does nothing, it's acting as if nothing is there now.
2:00 PM
I am barely capable of editing SQL so, if nothing is wrong with the json file, I'm lost lol
2:01 PM
I used Altova XMLSpy to edit the config file, and I use Filezilla to upload it to my server, which is hosted through G Portal
Avatar
Does the console throw an error when loading the plugin?
Avatar
RunningBearYarrr 7/2/2020 2:08 PM
No, no errors
2:10 PM
This is how the folders look in Filezilla on the servers side
2:11 PM
I did have the ArkHelp plugin installed to the plugins folder, but I felt as if I didn't want to mess with that so I removed that entire folder at the same time I replaced the ArkShop config file. Would that have done something to mess it up?
Avatar
You could try and redownload the plugin, but it's strange that is doesn't work without any error in console
Avatar
RunningBearYarrr 7/2/2020 2:14 PM
Well, I technically did that too. I spent a few restarts trying to get it to work. So I shut it down again, removed the ArkShop folder through filezilla. Then I put the new config file in a copied download of the original ArkShop file after removing the default one. I put that new file/config in through filezilla, and turned it on, restarted, etc and still doesn't work.
Avatar
Let me try arkshop with your config
Avatar
RunningBearYarrr 7/2/2020 2:22 PM
Ok, good luck XD
Avatar
Console throws an error on load. (edited)
Avatar
RunningBearYarrr 7/2/2020 2:32 PM
I wonder why nothing shows on G portal, or when loading into the Ark? What do you mean by console?
2:33 PM
Sorry if it's a stupid question, lol
Avatar
it's what pops up when you boot your server
Avatar
RunningBearYarrr 7/2/2020 2:38 PM
Nothing pops up when I boot the server, either before or after editing that file. It worked on default, I edited it, replaced it, stopped working. But I am hosting through gportal for unofficial ark, not running it off of my computer, if that's what you mean?
2:39 PM
I feel like IT s worst nightmare right now lol
2:40 PM
Do either of you have a decently modified config file I could use or look at, to maybe see what went wrong or at least gimp my server along for now XD
Avatar
JSONLint is the free online validator and reformatter tool for JSON, a lightweight data-interchange format.
2:42 PM
use this to check your config before you upload it, if you cannot see your console
2:42 PM
JSON Editor Online is a web-based tool to view, edit, format, transform, and diff JSON documents.
2:42 PM
you can use this to edit it
Avatar
RunningBearYarrr 7/2/2020 2:43 PM
I just ran it through the validator and got
2:44 PM
Is this part at the top supposed to be there? I havn't seen it on other configs. "Mysql": { "UseMysql": false, "MysqlHost": "localhost", "MysqlUser": "apitest", "MysqlPass": "12345", "MysqlDB": "apitest"
Avatar
yes ofc, don't remove stuff from config 😄
Avatar
RunningBearYarrr 7/2/2020 2:45 PM
Oh, well I didn't remove that, but I did remove some stuff that I didn't want, I was careful to delete up to the previous }, and it returned no errors while doing so. How do you remove something or make it null, without causing problems? I will try to reload the original config and redo my edits, without erasing anything.
Avatar
i mean don't remove variables
2:47 PM
editing arrays is fine
2:47 PM
you can remove the example items and kits they have
Avatar
RunningBearYarrr 7/2/2020 2:47 PM
Oh, ok. Right that's what I did.
Avatar
but don't remove any variables inside those
Avatar
RunningBearYarrr 7/2/2020 2:47 PM
That's what's confusing me. The verifier says it's good, but it won't load lol 😩
2:48 PM
Maybe, remove the file from the server again, remove the addon, restart and do it all over?
Avatar
maybe tell us what error it's throwing ? 😄
Avatar
RunningBearYarrr 7/2/2020 2:49 PM
That's just it, I'm not getting any errors anywhere
2:49 PM
Server loads and runs fine, nothing shows up in the logs othe than people talking or whatever. It just acts like it's not there
Avatar
that's why i hate hosts
2:49 PM
it's throwing an error
2:49 PM
you just can't see it
2:49 PM
because you don't have access to console
Avatar
RunningBearYarrr 7/2/2020 2:50 PM
well.... poop. Is there anywhere that people share working configs?
2:50 PM
I've been through all of API's website and didn't see anything
2:52 PM
or can I download this console you mentioned and run the file through it to see the error?
Avatar
It's throwing a json error. 306 if I recall correctly
2:52 PM
and thus plugin not loading with 1114 error
Avatar
RunningBearYarrr 7/2/2020 2:55 PM
Alright, thank you both for your help. I will just try deleting it, and redoing the config again, albeit more carefully and hope it works XD
Avatar
substitute 7/2/2020 6:11 PM
@RunningBearYarrr
6:11 PM
are you connecting via ftp or sftp
6:12 PM
@WETBATMAN sounds like a perfect time to extend the api to have error logging : )
Avatar
RunningBearYarrr 7/3/2020 6:08 AM
@substitute FTP through Filezilla
Avatar
substitute 7/3/2020 6:09 AM
Ooo if you can use sftp use it
6:09 AM
FileZilla supports it
6:09 AM
Ftp is insecure
Avatar
Hi all. Is there any quick little guides on basic arkapi plugin? I have a decay system but need to send admin destroy commandss to a server. I'm thinking I could do it through arkapi perhaps
Avatar
substitute 7/3/2020 8:10 AM
@Scruffy
8:10 AM
I have a basic template you can use
Avatar
great, thanks, where do i find it?
Avatar
substitute 7/3/2020 8:11 AM
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
8:12 AM
I’m working on a more robust example atm
Avatar
nice, i'll see what i can do
Avatar
RunningBearYarrr 7/4/2020 9:52 AM
Thanks to everyone here, I was able to get the ark shop plugin working and managed to create my own custom list for dinos, so I'm sharing it here if anyone wants to use it and I also have a quick question
9:53 AM
Can someone show me how to continue down the items list, so I can create a list of multiple items that you can sell to the shop plugin for points
9:53 AM
}, "SellItems": { "metal": { "Type": "item", "Description": "10000 metal ingots", "Price": 110, "Amount": 10000, "Blueprint": "Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_MetalIngot.PrimalItemResource_MetalIngot'" } }, "Messages": { "Sender": "ArkShop", "BoughtItem": "<RichColor Color="0, 1, 0, 1">You have successfully bought item</>",
9:54 AM
I basically just need to know, how many } i need and where the }, stops and } goes to end that list and continue to the "messages" part
Avatar
substitute 7/4/2020 1:41 PM
@Michidu /*** Basic wrapper to call a BPFunction safely. Please see proper usages on the template guide. ***/ void* callBlueprintFunction(UObject* object, const wchar_t* function, void* parameters) { if (!object || !function) return parameters; //There's nothing to do! UFunction* bpFunction = object->FindFunctionChecked(FName(function, EFindName::FNAME_Find, false)); if (!bpFunction) return parameters; //There's nothing to do! object->ProcessEvent(bpFunction, parameters); return parameters; } (edited)
1:41 PM
basic wrapper to (hopefully) safely call bp functions if you already have constructed the parameters structure.
1:42 PM
I return parameters because in bp functions, the return values are fields on the structure, which is what is being pointed to by parameters
1:42 PM
I mean technically it is all pointers, so don't really "have" to return it, but might as well.
1:44 PM
callBlueprintFunction(myPawn, L"SetNumChibiLevelUps", &params); is how easy it is to call.
Avatar
simple and useful 🙂
Avatar
I got a big PvP+ update for today to prevent boss arena exploits.
👍 1
4:42 PM
@substitute What would be an example of something we could do with that wrapper that we can't do now?
4:43 PM
When you say BP Function is that stuff that is only in the Dev Kit on the Blueprint?
Avatar
it just make calls a bit easier
4:44 PM
and yes
Avatar
That might have come in handy over the last 10 hours lol
Avatar
@substitute you asked about replicating fields, look at PropertyServerToClients or MulticastProperty functions (edited)
Avatar
RunningBearYarrr 7/4/2020 6:41 PM
Could someone help me with my question up above? I just need to know how to continue the } }, part to add more items.
Avatar
}, "SellItems": { "metal": { "Type": "item", "Description": "10000 metal ingots", "Price": 110, "Amount": 10000, "Blueprint": "Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_MetalIngot.PrimalItemResource_MetalIngot'" }, "metal": { "Type": "item", "Description": "10000 metal ingots", "Price": 110, "Amount": 10000, "Blueprint": "Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_MetalIngot.PrimalItemResource_MetalIngot'" }, "metal": { "Type": "item", "Description": "10000 metal ingots", "Price": 110, "Amount": 10000, "Blueprint": "Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_MetalIngot.PrimalItemResource_MetalIngot'" } }, "Messages": { "Sender": "ArkShop", "BoughtItem": "<RichColor Color="0, 1, 0, 1">You have successfully bought item</>",
7:01 PM
Like that
7:01 PM
@RunningBearYarrr
Avatar
RunningBearYarrr 7/4/2020 8:45 PM
@Pelayori Ty! I kept putting in too many } at the end, i thought it needed a }, then two } } lol. Ty ty
Avatar
is there any guide on how to learn plugin coding ?
Avatar
#【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ
Avatar
substitute 7/5/2020 9:20 AM
@Michidu
9:20 AM
I made some changes (no need for std::align btw 🙂 ), and so far it seems to be working fine.
9:20 AM
template<typename ...Ts> Packed f(Ts&&... args) { Packed packed; packed.size = 0; packed.size = ((sizeof(Ts) + packed.size % sizeof(Ts)) + ...); printf("size is %i\n", packed.size); char* memoryBlock = (char*)calloc(1, packed.size); packed.parameters = memoryBlock; int written = 0; auto pack = [&memoryBlock, &packed, &written](auto& item) { memoryBlock += written % sizeof(item); printf("moving %i forward...\n", written % sizeof(item)); memcpy(memoryBlock, &item, sizeof(item)); printf("wrote data to %p for a total of %i bytes.\n", memoryBlock, sizeof(item)); packed.returnValue = memoryBlock; memoryBlock += sizeof(item); //move pointer forward written += sizeof(item); }; (pack(args), ...); return packed; }
9:20 AM
I need to clean parts of it up, but it is working so far
Avatar
substitute 7/5/2020 9:53 AM
template<typename ...Ts> Packed packParameters(int returnValues, Ts&&... args) { Packed packed = { nullptr,nullptr, 0 }; packed.size = ((sizeof(Ts) + packed.size % sizeof(Ts)) + ...); //calculate total size with alignment. char* memoryBlock = (char*)calloc(1, packed.size); packed.parameters = memoryBlock; //get the block of memory for this. int written = 0; int maxCount = sizeof...(Ts) - returnValues; int itemCount = 0; /* Function to pack the structure. */ auto pack = [&memoryBlock, &packed, &written, &maxCount, &itemCount](auto& item) { written += written % sizeof(item); memcpy(memoryBlock+written, &item, sizeof(item)); if (itemCount++ == maxCount) packed.returnValue = memoryBlock + written; written += sizeof(item); }; (pack(args), ...); return packed; }
9:53 AM
supports N return types
9:53 AM
now I just need to make a simple interface "reader" someone could use to read the values.
9:54 AM
maybe like read<int>(&packed) and have it increment the pointer.
9:54 AM
Packed block = packParameters(2, 65, 10., 1337, 1., nullptr, 0, 0); ((void(*)(void*))test)(block.parameters); //just to call by a function pointer printf("Returned value %d and %d\n", *((int*)block.returnValue), *((int*)(block.returnValue + 4)));
9:54 AM
void test(MyStruct* data) { std::cout << "my data is " << data->a << " and " << data->b << " and " << data->c << "\n"; data->ret = 69; data->ret2 = 420; }
9:54 AM
but it is working
9:54 AM
9:54 AM
struct MyStruct { char a; double b; int c; double d; void* e; int ret; int ret2; }; (structure that it is essentially packing into)
Avatar
Hey guys, do you think it would be possible to somehow change Day number of the map like if you have Island with day 3000 and you would like to have it day 1000? I was looking into .ark file for few hours now and found set of words 4461 794e 756d 6265 7200 0800 0000 (DayNumber 08 should be a Back Space ) i made copy of that island with day 3000 and created new one with day 2 and the number was same (edited)
11:09 AM
Maybe number of days is saved in different var
Avatar
callBlueprintFunction(myPawn, L"SetNumChibiLevelUps", packParameters(0, value).parameters);
12:44 PM
@Michidu getting closer to being able to make this into a simple macro
12:44 PM
first parameter states how many of the parameters are for return values
12:45 PM
since this bp function returns nothing, and only expects an int input
12:45 PM
packParameter(0, value) works perfect
Avatar
that looks great for sure
Avatar
substitute 7/5/2020 9:39 PM
I need to obviously write a wrapper @Michidu to ensure proper memory deletion
Avatar
@Michidu I'm getting
12:11 AM
None_Int when using an FName with it
12:12 AM
12:12 AM
None_181815 vs EelBoss
12:12 AM
left is from the parameter packing (using a variable for the FName) and right is that FName variable
12:14 AM
12:15 AM
Nesting isn't the issue
12:15 AM
struct inner { char inside_char; double inside; }; struct asdf { int a = 0; inner b; char c; };
12:15 AM
for (int i = 0; i < 100; i++) { inner in; in.inside = 66. + i; in.inside_char = 'Z' - i; block = packParameters(0, i, in, 'A'); ((void(*)(void*))test2)(block.parameters); //just to call by a function pointer }
12:15 AM
works fine ...
Avatar
Just posted my first plugin :D https://ark-server-api.com/resources/kals-crosschat-with-discord-tribes.196/ Looking for feedback/testers!
5:31 AM
oh nm, Awaiting approval before being displayed publicly.
Avatar
Anyone got any idea why Ark Shop would stop redeeming kits? I am on the latest API but also switched to crossplay
12:19 PM
Normal shop items work fine, but kits do not give any items (the kit is redeemed and given in the logs)
Avatar
RunningBearYarrr 7/7/2020 10:41 AM
I am looking for a plugin to prevent people from creating characters if they are named human, humano, humain, mens, mensch, mennenske, bob, gg, ree, yeet, 123, [][][] etc. I found this https://ark-server-api.com/resources/name-control-disabled.69/ but it doesn't appear to be available anymore - and I did join one Ark server a few days ago that had some type of this plugin working because I tried to load in as Human and it denied me, saying cannot have this name. Can anyone please point me to a working plugin for these features? Thank you!
  • Prevent create characters/tribes with invalid names
  • Auto name changer
  • Kick | Kill player
  • 2 modes to check player on valid name:
Equal: return true, if InvalidName (config) = InvalidName (player), Contains: return true, if InvalidName...
Avatar
@RunningBearYarrr
11:00 AM
I could make you something really quickly
Avatar
RunningBearYarrr 7/7/2020 11:02 AM
@substitute That would be terrific, thank you : )
Avatar
I actually basically made it already
11:02 AM
when I was helping someone else
11:02 AM
let me just package it into a plugin
Avatar
RunningBearYarrr 7/7/2020 11:02 AM
hah, works for me lol
Avatar
@RunningBearYarrr gonna add a config so you can adjust the names.
Avatar
RunningBearYarrr 7/7/2020 11:13 AM
Ok thank you : )
Avatar
@RunningBearYarrr
11:29 AM
let me test it now
Avatar
RunningBearYarrr 7/7/2020 11:29 AM
Ok 🙂
11:45 AM
@RunningBearYarrr
11:45 AM
is this fine?
Avatar
RunningBearYarrr 7/7/2020 11:45 AM
It looks like it will : )
11:46 AM
work I mean, lol
Avatar
important note, it'll only match exact matches
11:46 AM
so like Human1 would bypass it
11:46 AM
but it's a good enough stop-gap for your use case until a more robust solution can be created.
Avatar
RunningBearYarrr 7/7/2020 11:46 AM
And I can edit names in the config file?
Avatar
I use an unordered set so performance for name lookups should be O(1)
11:46 AM
yes
Avatar
RunningBearYarrr 7/7/2020 11:46 AM
Ok, awesome!
Avatar
{ "DisallowedNames":{ "BlockedList":["Human", "123", "Admin"] } }
Avatar
RunningBearYarrr 7/7/2020 11:47 AM
I appreciate your hard work, this will be a lifesaver lol
Avatar
you should also be able to edit the config and reload it
11:47 AM
DisallowedNames.Reload is a console command
11:47 AM
that should reload the config
Avatar
RunningBearYarrr 7/7/2020 11:48 AM
Ok cool : )
11:51 AM
@RunningBearYarrr
11:51 AM
I'm giving it another test now that I built it in release mode
11:51 AM
but it should be good
11:52 AM
alright it is looking good
Avatar
RunningBearYarrr 7/7/2020 11:52 AM
Ok, I'll wait for you to test it again, I don't have anything I can test it on I think, because I use gportal to host. I tried downloading the api itself but whenever i boot ark it causes a shootergame crash lol. But yeah, you're awesome! Thank you so much 😄
Avatar
@RunningBearYarrr
11:52 AM
it should be good to go
11:52 AM
only thing I didn't test was reloading the config
11:52 AM
but it should work just fine. (edited)
Avatar
RunningBearYarrr 7/7/2020 11:52 AM
I just seen, you typed it before I finished that last comment lol. Thanks again!!
Avatar
idk how much you know about CS
11:53 AM
but the look up should be O(1)
11:53 AM
because I use an unordered set
Avatar
RunningBearYarrr 7/7/2020 11:53 AM
I am a toddler when it comes to any sort of programming / coding stuff. I can understand a tiny bit atm lol
Avatar
big O is time it takes for a function
11:53 AM
so like
11:54 AM
O(n) is the total time increases linearly with the data
11:54 AM
that would be a like
11:54 AM
loop for all items in an array
11:54 AM
because obviously as the array is bigger, it takes longer
11:54 AM
average search time in an unordered set is O(1) which means it takes constant time, no matter the amount of items, it takes the same amount of time.
11:54 AM
worst case is O(n)
11:54 AM
which would be best/average/worst of a normal linear search
Avatar
RunningBearYarrr 7/7/2020 11:55 AM
That makes sense, ty for explaining it, honestly better than my online college did lol
Avatar
let me make a repo real quick
11:55 AM
and i'll dump the code there if you want to look at it.
Avatar
RunningBearYarrr 7/7/2020 11:55 AM
Ooh ok, that'd be great : )
11:59 AM
Maybe a dumb question, but while I'm adding names to the config, does capitilization matter? If Human is blocked, would a human still get through if all lower case?
Avatar
yeah
12:02 PM
you can fix that though if you wanted to learn about C++ more
12:02 PM
(hint, make all the checks use the same casing)
Avatar
RunningBearYarrr 7/7/2020 12:03 PM
Ok, I can work with that and for now I will just add every possible differnt version of a name into the config, until I learn more
12:03 PM
oh, ty for that too!
12:03 PM
has most of the code
Avatar
RunningBearYarrr 7/7/2020 12:03 PM
Awesome ty! You're terrific lol
penguindance 1
Avatar
Oops! We ran into some problems. Error initializing paypal communication
12:33 PM
any fix ?
12:33 PM
2:42 PM
i also made NameControl but mine has tribe name control too hah
2:42 PM
@RunningBearYarrr
Avatar
thats really cool
Avatar
@WETBATMAN Add dino names to complete the plugin 🙂
Avatar
hm interesting 😛
Avatar
substitute 7/7/2020 6:39 PM
wouldn't be too hard
6:40 PM
@WETBATMAN now what would be interesting is regex support with robust rules
Avatar
Hi guys! I'm looking for a hook that would be triggered upon player spawn. I tried HandleNewPlayer but obviously that's only when logging in. I tried FinishSpawningActor from Other/UGameplayStatics but it doesn't seem to act the way I think (which would be the function called every time after spawning an actor, including a player), sounded good though. Then I found SpawnedPlayerFor, but it's for APrimalStructureBed... which sounds like it would only target spawning in a bed. I spent a good amount of time looking at the API and the hook generator (thanks for that, awesome work!), and I don't know if it exists or if I'm going the wrong way. I'll appreciate any help! Thanks!!
Avatar
you should probably keep track of that yourself
8:25 PM
hook HandleNewPlayer and check if it's a new player on smth like char lvl or creation date
8:25 PM
you should get a decompiler it will make your job easier
Avatar
I got IDA but I'm not an expert with it and didn't manage to get much working...
8:27 PM
You mean to decompile the game and dig into it?
8:28 PM
ok, but it sounds there is no such hook then...
Avatar
You could maybe hook AShooterCharacter_BeginPlay (edited)
8:35 PM
And do your checks there
8:36 PM
I don't know how good is that
Avatar
The idea sounds good, but I checked and I'm not sure it fits what I need but I'll keep it in mind, thanks!
Avatar
BeginPlay is called on every server boot, and character spawn
9:09 PM
that function doesn't do what it sounds it does
9:09 PM
pretty much every class has this function and it's called when the item is initialized
Avatar
Well yeah, but it could be an option
9:11 PM
Also, I want to get all online players but when trying to access this, it crashes
Avatar
well ofc you have the wrong type array 😄
Avatar
Yikes
9:13 PM
xD
9:13 PM
Thanks, I'll check what do I need lol
Avatar
that func returns TWeakObjectPtr i think
9:13 PM
array of them
Avatar
Well, if I go above the PlayerArrayField() it shows it returns TArray<APlayerState*>
9:15 PM
Avatar
ah that's not the func i meant
9:39 PM
API also has a func for getting online players
Avatar
I'll stick to that then :p
9:44 PM
tyty
Avatar
BeginPlay works for me actually, thanks again! 💪
Avatar
@WETBATMAN begin play should suffice (and it did in their case) if you're hooking it on the right object. (edited)
Avatar
I hooked it on AShooterCharacter and I see it gets loaded very early once the server is almost done loading (not sure what it means, at that moment no one is connected, but well), but it runs every time I spawn (in bed, after dying, etc). But not when the player connects so I use HandleNewPlayer for that. So far, this combination seems to match the "every time a player spawns".
Avatar
i told you this would be the case 😄
11:48 AM
players have 2 objects that belong to them
11:48 AM
a character and a shooter Controller (edited)
11:49 AM
the character is initialized on boot and on respawn etc...
11:49 AM
you're probably better of hooking AShooterPlayerController_BeginPlay
Avatar
The controller would be best
11:51 AM
@WETBATMAN
11:51 AM
But
11:51 AM
There’s the edge case of the person not having a character yet
11:52 AM
So depending on use case really
Avatar
controller also isn't great
Avatar
There’s no one size fits all
Avatar
BeginPlay gets called on the same one many times
11:53 AM
i stored players by refs to their PlayerControllers in HWIDBans and after a long server runtime the refs would change resulting in nullptrs
Avatar
I wouldn’t use refs at all
Avatar
HandleNewPlayer is the best hook here
11:53 AM
yeah after this i switched to storing by steamID
Avatar
Oh I’m sure I’ve said this before
11:54 AM
But in this version of ue4
11:54 AM
The hwid node you have access too is fundamentally broken
11:54 AM
It’s just a hash of the MAC address
11:54 AM
Which windows let’s users change
11:54 AM
Unfortunately there’s no good clean workaround
Avatar
it's the curse of the internet
11:55 AM
after all
11:56 AM
there is no 100% way to know who is on the other end of that account
Avatar
Could require a sign in procedure
11:56 AM
Minecraft servers do this
Avatar
however this adds and extra step and most players aren't that tech savvy to bypass this
11:56 AM
ofc anything can be bypassed
11:56 AM
yes but how would you verify who's actually signing in heh
11:56 AM
if the HWID node can by passed
11:57 AM
the only other way of tracking i see is IP
11:58 AM
which is even worse, considering the world is running out of ipv4 so what many ISP's do is they allocate the same IP to multiple clients
Avatar
Signing it adds a lot of overhead to cheaters
Avatar
then you have the side effect of a clean player potentially getting banned
Avatar
Especially if you use like oauth with discord for registration
Avatar
maybe with mobile num 🤔
Avatar
With amazon sns it would be possible
Avatar
mobile is best i think if you filter out the online sms numbers
11:59 AM
combination of IP HWID and mobile would be best i think
Avatar
If you go that route then honestly you’re better off as acaas
12:00 PM
Anticheat as a service
12:00 PM
That way random people are giving other random people their phone numbers
12:00 PM
Aren’t *
Avatar
oh yea that would be very dangerous
12:01 PM
it would require a central database
Avatar
I would suggest encrypting the numbers with a public key and sending that to your api
12:01 PM
On a central server
12:01 PM
Which would have the private key (edited)
Avatar
yeah ofc sending that over as plan text would be very dangerous aswell
Avatar
Hm
12:01 PM
Maybe I’ll work on this
12:02 PM
Could also work with @Lethal and combine his discord logger but add in text notifications
12:02 PM
Like you get texted when your base is raided
12:02 PM
kekwhat
12:03 PM
if you wish you're welcome to work on this with me and integrate it into HWIDBans 😛
Avatar
Cool thing is then you could provide the plugin for free
12:03 PM
Since it’s a service
12:03 PM
People would have to pay for the service features
12:03 PM
But yeah this would basically be
12:03 PM
CSGOs prime
12:04 PM
But for ark
Avatar
Anyone know if 2 arenas on a map can be active at once? The Island has 4 arenas and I can't remember if someone could do Brood and someone else do Mega at the same time. (edited)
Avatar
Anyone know anything about the vanilla grapple hook prevention in Arenas? Trying to track it down in IDA and ADK and its not done with AShooterWeapon_CanFire or AShooterCharacter_CanFire.
Avatar
AShooterCharacter_AllowGrappling_Impl
3:16 PM
@Lethal
3:16 PM
@Michidu sent me this one
Avatar
I will check it
Avatar
been working on detecting grapple myself and it's a huge pain
3:18 PM
keeps crashing for some reason
Avatar
I have a way that works b ut i'm trying to improve on it and make it like the boss arena version.
Avatar
grapple prevention or detection ?
Avatar
both
Avatar
you detect from APrimalBuff_Grappled or you found another way ?
Avatar
Different way.
Avatar
hm, interesting
Avatar
Using the ammo type loaded into the crossbow
Avatar
yea but i mean
3:22 PM
detecting if the char has a tether attached
3:23 PM
like when you grapple another player
Avatar
Oh, i'm not doing anything with that. My code is for reusable grapples in boss arena.
Avatar
ah lol yea i'm stomping my head on this and got really confused when you said there was another way XD
3:24 PM
btw
3:24 PM
you can detect via APrimalBuff_Grappled
3:24 PM
TEnumAsByte<EGrappleState> GrappleState_Current;
3:24 PM
with this
Avatar
AShooterCharacter::IsGrapplingHardAttached
Avatar
that also triggers when you're a dino passenger i believe
Avatar
Boss arenas say "Can't use here" when you use a vanilla grapple. I'm trying to replicate that same as close as possible but with any reusable grapple.
Avatar
that above hook should work for you then
3:27 PM
AShooterCharacter_AllowGrappling_Impl
Avatar
AShooterCharacter::AllowGrappling_Implementation?
Avatar
yep
Avatar
return !this->MyCharacterStatusComponent || !((*(this->MyCharacterStatusComponent + 2928) >> 1) & 1);
3:29 PM
1 line of code in that
3:29 PM
lol
3:30 PM
Need to determine what 2928 I guess
Avatar
hm shows the same for me
3:31 PM
weird
Avatar
Ya, not sure because MyCharacterStatusComponent doesn't appear to be part of AShooterCharacter in IDA but the API says it is.
Avatar
That hook is not called from the boss arena.
Avatar
@WETBATMAN I was able to get mine working with AShooterWeapon::CanFire and then identifying the player using OwnerField() so I can block specific players from using grapples.
Avatar
nice one
6:52 PM
6:52 PM
thanks Windows
6:53 PM
you have to change the encoding of the terminal i think
Avatar
substitute 7/8/2020 6:54 PM
I'm in vscode
6:54 PM
cbf to deal with that (edited)
6:55 PM
6:55 PM
looks fine online
Avatar
AShooterCharacter has these _this->CurrentGrappledToCharacterField (edited)
7:01 PM
_this->CharactersGrappledToMeField
Avatar
Oh man... so I'm still working on BeginPlay and spawning. There was a suggestion above to hook it on the Controller instead of the Character, I tried that but it barely gets called, so I'm using it on the Character... Now, if you do a random respawn (so not in your bed), everything is ok, the character object is "correct". But if you spawn in your bed, the object seems different. For instance, the string returned by GetDescriptiveName would include the word "player" instead of the actual name. And the ArkApi util function FindControllerFromCharacter doesn't work on this character, it misses the controller which does exist. Not sure why Character is so inconsistent when spawning in a bed... Another WC gift maybe... I'll keep pushing...
Avatar
If you want to hook the function when player spawns on a bed there is the APrimalStructureBed _SpawnedPlayerFor_Implementation, which I haven't tried but it may do the trick
9:00 PM
And for non-bed spawn you could look into something in the gamemode
Avatar
DECLARE_HOOK(AShooterCharacter_AuthPostSpawnInit, void, AShooterCharacter*);
9:02 PM
just use this hook for spawns
9:02 PM
😄
Avatar
I like more weird possibilities :p
Avatar
Alright I'm gonna try that!!
Avatar
RunningBearYarrr 7/8/2020 10:04 PM
Does anyone use https://ark-server-api.com/resources/safezones.2/ for pvp and can tell me how to set safe zones? I have an ark server which is going to have pvp weekends and this plugin sounds like a good option to protect certain buildings
SafeZones Source: Click Here Features: Prevent PVP in certain area's Prevent Building in certain area's Prevent Structure damage in certain area's Notifications on Entering and Leaving SafeZone area's Ability to restrict players from...
Avatar
Its all in the description on the plugin man it creates a bubble of safe zone around the point "Position" use ShowDebug physics ingame in the cheat menu to see position
Avatar
What would happen if you try to send a notification to a nullptr?
11:49 PM
I guess a beautiful crash
Avatar
Is the Atlas API going to be updated soon so it can handle the new way of getting SteamIDs? Sill getting "unexpected DB error" (edited)
Avatar
Pretty sure ATLAS wasn't broken from any changes.
Avatar
@Fosh Atlas API should be fine
12:07 AM
the breaking change was due to Epic Games crossplay (edited)
Avatar
Unexpected DB error doesn't mean it's broken. Maybe there is some parsing error or any other thing
Avatar
Nothing poping up in logs and the DB works on the ark side using the same db name
12:08 AM
I cannot add players to groups
Avatar
Did you create the correspondant group?
12:08 AM
It'll give successful group creation
12:14 AM
Fixed it: Don't use the same Database name for shop and permissions.
Avatar
RunningBearYarrr 7/9/2020 11:26 AM
Its all in the description on the plugin man it creates a bubble of safe zone around the point "Position" use ShowDebug physics ingame in the cheat menu to see position
@Kal You assume I am some genius lol. I am more like r/ELI5 (explain it like I'm 5) but I think I understand what you're saying. So I need to go in game first, get the position with showdebug physics and then I can put that into the config and load the addon?
Avatar
RunningBearYarrr 7/9/2020 11:45 AM
So I did that for my first area I want to safe zone, so here in the config for zone 1, "Name":"Zone1", // Safe zone name "Position":[ // Safe zone location -111820, 233874, -14259.6 I am assuming the top position is X - the middle is Y and the bottom is Z?
11:46 AM
the position for the first zone I want to set shows X=386571.125 Y=433429.063 Z=8637.601
Avatar
Hmm, curious, I use Permissions in my plugin and so far everything is ok, except if I loop through this array: TArray<FString> groups = Permissions::GetPlayerGroups( steam_id ); It only returns Admins and Default, but my player is definitely part of other groups which I can list in game through the Permissions commands. I let Permissions use its local sqlite DB too, no fancy setup here. I assumed that loading and using Permissions would automatically "connect" to the Permissions DB, but maybe not? I feel like it's not looking at the right place.
Avatar
Hellp..
Avatar
Without context and in a language not much of us probably speak (on this discord), it's going to be difficult to help you... But based on the error code, you might want to make sure everything is up to date (your compiler, external libraries, ArkApi, etc) and you perform a clean and full rebuild of your project. First link on google: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1047?view=vs-2019 (edited)
Avatar
Getting more confused here about Permissions. So I added a test group, added the player to it, listed his groups, and then listed them again using the chat command, but they are not the same: (edited)
4:15 PM
It seems Permissions::GetPlayerGroups( steam_id ); returns Default and Admins only. Same behavior if I log out and log back in, the groups are different between the admin command and the chat. It feels like I'm doing something wrong but I don't see it.
4:16 PM
My Permissions config is the default one: { "Database":"sqlite", "MysqlHost":"localhost", "MysqlUser":"root", "MysqlPass":"pass", "MysqlDB":"arkdb", "MysqlPort":3306, "DbPathOverride":"" }
Avatar
Ok, taking it all back, I didn't use the right steam ID format to handle the groups.... 🤯
Avatar
Where can I see the basic tutorial on make plugin? ex) how to apply my plugins, make commands... etc
Avatar
substitute 7/9/2020 9:21 PM
I have a template I made that might help you @Urang
Avatar
substitute 7/9/2020 9:46 PM
@Urang you clearly didn't read the instructions then
9:46 PM
If you can't read instructions, I can't help you
9:47 PM
Avatar
oh I'll read it now
Avatar
I can't solve this 😦
10:09 PM
10:09 PM
Avatar
do you have git installed
Avatar
it looks like it cloned just fine
10:11 PM
😦
10:13 PM
Avatar
can you show the actual error
10:19 PM
10:19 PM
all my includes are fine
10:20 PM
only error is from this being a copy of a plugin I made for a guy (on accident) which used new structures I made a PR for in the API (which you would just delete anyways and would not be a problem)
10:21 PM
10:21 PM
this is from fresh git clone
Avatar
Did you follow wetbatman's document on how to setup VS? not sure about the plugin.h but the Ark.h sounds like maybe your project is not including the API sources.
10:23 PM
and yes, the actual error message would help...
Avatar
That looks like an SDK issue
10:29 PM
do you have Windows C++ SDKs installed?
10:29 PM
Again, this you not reading
10:29 PM
10:29 PM
I state exactly what you need for the template. (edited)
10:30 PM
Visual Studio Code (it looks like that is what you have) is just a really fancy text editor
10:30 PM
you need to install the C++ environments
11:00 PM
wow
Avatar
?
11:04 PM
it just has a sample plugin at the moment that I made for someone
11:04 PM
what..
Avatar
Try installing Visual Studio 2019
Avatar
ok I'll try
11:45 PM
ty
11:45 PM
🙂
Avatar
If I have plugin source, how do I use it? (edited)
Avatar
I know there is one in shop rewards
Avatar
idk its in mysql when i look in the table
9:58 PM
so probably
Avatar
if i have a too many plugin will have an effect to my server ?
Avatar
well each plugin has his own possibility of being "bad" developed and it's an error factor or a crash factor, the more you have the more possible this is to happen
5:25 AM
toher than that, i don't think so you should be able to load 1000 of them without issues
Avatar
It will add overhead @Hsilamot
6:41 AM
no matter how well made, additional instructions are still additional instructions
6:41 AM
really depends on the hardware
Avatar
well, yeah, but i don't think plugins are going to be something too much besides the native Tick function of the game
Avatar
Did anyone work with the Boss battles? I'm looking for a way to prevent particular players of entering the boss battles. I know only way to prevent damage to the boss dino, but I can't prevent teleport to Arena
Avatar
Not sure its possible to prevent them from being teleported in unless you can force them outside the teleporter radius and keep them out.
Avatar
@DevCPP hook the teleporter
Avatar
@substitute but how can I determine that it's exactly boss battle?
Avatar
What do you mean
12:38 AM
there's actual teleporting actors for each boss
12:38 AM
check in the devkit
Avatar
Don't think you can selective pick players out to exclude from teleporting though regardless.
12:44 AM
You can cancel the teleporter if someone enters you don't want I guess but no way to hook this "Do Teleport" logic and affect the player pawns it picks.
12:44 AM
At least that i'm aware of anyways.
Avatar
Cancel the logic
12:47 AM
reimplement it
12:47 AM
@Lethal
12:47 AM
Everything needed to remake the teleport function is already given in that screenshot 🙂
Avatar
True, but if you have to ask if it possible you probably are not going to rewrite a complete Boss Teleporter either 🙂
12:48 AM
but technically you are correct lol
Avatar
Well
12:49 AM
if it was made in C++ it would be possible without rewriting, just not easily in this API
12:50 AM
you would need to find a code cave in the function before the instructions and you would put a jmp to your own function.
12:50 AM
it is what I did when I was making this for a game
12:50 AM
where I added more color palettes to the character selects
Avatar
Ya, I remember you showed me that.
Avatar
code caves are relatively easy, you save the X bytes you overwrite, write a JMP
12:51 AM
run the original instructions or your code, then the other
12:51 AM
then return to the address inside the function offset by your JMP
12:51 AM
/* Fixes the selected color to be bound between 0-7. This is for when the game transitions from the character select to the level select menu. */ __declspec(naked) void correctColor() { __asm { mov al, [esi + 0x3A] mov localVariable, al } pushStack(); localVariable %= 8; ComputeRET(CorrectColor); popStack(); __asm { mov al, localVariable cmp al, 07 jmp[retJMP] } RET(); }
12:52 AM
example^
Avatar
Ya, that would be amazing to do that for some stuff in ARK.
Avatar
you can do it for anything in C++
12:53 AM
not really possible from blueprint
12:53 AM
it might be but that's a very advanced issue
12:53 AM
boss teleport function though should be like 20 lines max to reimplement
12:53 AM
blueprints are extremely verbose
8:34 PM
what..
Avatar
@Urang empty folder?
Avatar
I built it and put it in.
9:32 PM
9:32 PM
But it doesn't work 😦
Avatar
you put no config info
Avatar
where are config info?
Avatar
Thanks @Lethal @substitute , will try
Avatar
Is there a function to get a specific structure by its ID (StructureIDField)? Or is only possible to find that by looping through all AActors?
3:25 AM
APrimalStructure::GetFromID(UWorld *World, unsigned int TheStructureID) apparently there is if you use the right search terms
Avatar
Doesn't appear to actually work though...
Avatar
Server players are kicked out every 3-5 minutes, have they encountered
Avatar
disable bettleye
5:33 AM
Do you have Epic crossplay?
Avatar
When I add the Kals Cross Chat with Discord & Tribes plugin the rcon does not appear the chat of the people who speak in the game.
Avatar
Do you have Epic crossplay?
@Hsilamot I turned on epic support
5:53 AM
Avatar
i think it has something to do with it, in my case since i have epic enabled i can't use batlleye, keeps kicking out my players every now and then
6:02 AM
not all of them but enough to make it annoying
Avatar
Ok thanks, i close epic to try
Avatar
Is there any function that I could hook when transfer tab loads the servers?
Avatar
AaronBasques 7/15/2020 10:19 PM
pretty sure all thats client side
10:20 PM
you can hook some upload functions though
10:21 PM
widgets (HUDS) are client side
Avatar
But cluster servers aren't loaded from server?
Avatar
AaronBasques 7/15/2020 10:22 PM
clustered servers afaik use an extra filter using the clusters ClusterID
Avatar
Yeah, and I can't hook like the function when the server gets the servers in the cluster id?
10:23 PM
If not then I look for another solution
Avatar
AaronBasques 7/15/2020 10:30 PM
well, on your client when you pull up a list of servers, its entirely client side, like from the main menu when you are on a server your client is aware what cluster you are on as the Cluster ID was sent to your client on connect or when you open the cluster HUD I'm guessing when you open the HUD, there is some check to IsClusterServer and then ClusterIdField, then it applies a filter to listed servers on your client from a list of all servers. Just like typing in the search box. None of which i imagine is executed on the server. You could try hooking AShooterGameState.ClusterId and AShooterGameState.IsClusterServer and see what happens but i suspect nothing as the API is not run client side.
Avatar
Okay I'll try that 😄 tyty
Avatar
anyone knows if there's a script command or something that allows to set the boss timer? i'm trying to "ground" a server forbidding the boss arena for 24 hours and tought about using the timer when the arena is being used for that purpose
Avatar
you could ghetto it
4:39 AM
when someone spawns a boss teleporter, figure out which one, and where
4:40 AM
return the regents to the unit
4:40 AM
and destroy the teleporter
6:20 AM
@Hsilamot
6:20 AM
Hi
Avatar
That player from the little bit I watched is suspect to a degree
6:22 AM
They have little to no aim wobble on their fabby and they have not eaten a shadow steak
6:22 AM
I would say it’s not definitive
Avatar
yeah that's my problem, no definitive answer, and the post on ARK Forums just got spamme by his friends
6:36 PM
https://survivetheark.com/index.php?/forums/topic/552575-help-identifying-a-possible-aimbotter/ all the first answers are from his friends which only make me wonder more, and i'm really really tempted on purchasing one or two aimbot softwwares for ark to test them and see if you can configure how precise you want it to be
Avatar
Just make a plugin that checks for SteamID and make his shots miss 100% of the time.
6:59 PM
or track his hit/miss percent
Avatar
how is that about missing 100% of the time? or what's your idea there?
7:00 PM
i'm interested on that, but, i haven't manned up to make a development environment for ark plugins xD
Avatar
If he is hacking and never missing force him to miss everything lol
Avatar
yeah, i don't think that's a good idea, sounds fun but at the end a petty move
7:01 PM
the tracking of Hit miss and kill rate tho, that could be interesting
Avatar
well that was sort of a joke but my second statement was more serious.
Avatar
yeah that could be actually great
Avatar
Don’t buy cheat software
7:48 PM
Of course they’re configurable software
7:48 PM
But you don’t have to aimbot either
7:49 PM
There’s other things that help a ton without aimbotting
Avatar
i think you gotconfused, i wanted to purchase it to have a frame of reference, not to play the game
Avatar
I'm not confused, I'm stating that you should not purchase it regardless
8:02 PM
If you want a frame of reference, read posts on cheat forums.
8:04 PM
things a person could do (in general, not Ark specific) some reference: Silent Aim (shots are registered without aiming the player view port) Extremely low FOV aimbot (only adjusts when the aim is within 1-3 deg) Triggerbot (shoots when a target is in crosshairs) No Recoil / No Sway (self explanatory)
Avatar
everything i'm comming around says it' unconclussive and everyone is saying the same, that they have no experience using cheats so they couldn't know
Avatar
I have experience with cheats
8:05 PM
I'm saying your best option is to watch the user yourself
Avatar
i have videos from the user's pov
Avatar
From the user
Avatar
yes
Avatar
which they would cherry pick
8:06 PM
You're best options are either analytics or watching yourself
8:06 PM
but without any obviously blatant things, you can't know
Avatar
watching myself?
Avatar
watching the player
8:06 PM
yourself
8:06 PM
with spectator
Avatar
yeah but i can't watch him, ark's spectator mode doesn't allow me to see how he's aiming
Avatar
Then take some statistics
8:07 PM
Nothing in the video screams obvious cheats
8:07 PM
but it's also a cherry picked video from the user
Avatar
well the statistics are going to take me some time because htat means i'm gonna need to learn how to do plugins and i just haven't wanted to do so
8:09 PM
that's from a free CSGO hack
8:09 PM
a user can configure their cheat to be extremely hard to detect from a spectator
Avatar
it's a shame we don't have like a top players of ark to have a reference on how good aim should look like or people stablishing standards, like, how normal it would be to shoot all sniper's shoots and hit all of them straight
Avatar
@Hsilamot I don't think he's cheating, but write his steamid down and take another look at it in a month or 2
2:54 AM
To see if there's a game ban on it
2:54 AM
Just for closure 😛
Avatar
lol, yeah
Avatar
The only thing that's kinda weird is the lack of steaks, and how he doesn't particularly aim for a specific body part most of the time, that's indicative that he may be using a trigger bot because it shoots the second there's he aim's over any part of the player..
2:59 AM
but Idk, I think he's legit
Avatar
yeah that's the argument but i'm not really that good at the game and i don't know if you can reach a point in which you hit all your shots with the sniper rifle compensating for the recoil
Avatar
@Hsilamot Man just watch someone like kishko
11:01 AM
He hits every sniper shot standing on the back of a hovering wyvern or anything
11:01 AM
There is a bunch of good players to reference against
Avatar
Please tell me how to write PluginInfo.json file
Avatar
Are there any beginner tutorials on creating plugins?
Avatar
basically, if you know JSON. you are about to learn the basics, but if you can't understand JSON files you shouldn't start with C++. (Maybe... perhaps.) but JSON is quite basic, it is like any code. Keep your sections (as I call them) correct. And close your arrays correct. So.. when you have mastered JSON, you can go to the next step. ... That's my suggestion, but if you are wild and crazy and just want to skip some "cutscenes". Go and learn C++. There is lot's of guides out there and many "how to's" and so on. But from my experience is to start with learning with an already made plugin and try to understand what that plugin does and how it works. ( there are several options out there) And start making some changes of your likings and so on. I don't want to send you to "it's impossible" but you need to pay much time and devotion to learning the way of coding in general. C++ is not something you will find a tutorial this how you make "ark plugins" but knowing C++, in general, will help you a lot. And no there is nothing like "this how you make a plugin for ark either" you need to start somewhere and my suggestion is to look at some already made plugins with open source. (edited)
Avatar
But here is some guides to get you started what you need to have in hand to start coding ark plugins. "Finding and Creating a simple hook": https://ark-server-api.com/threads/finding-creating-a-simple-hook.760/ "How to setup your project in MVS (Microsoft Visual Studio)": https://ark-server-api.com/threads/tutorial-create-plugins.55/
What is a Hook? a hook is a way intercepting a function when it gets called by the server it will execute your hook before returning back to the original function giving you the ability to modify the return or manipulate the arguments or do your own task Automatic Hook Genera...
any tutorial to create plugins? Thank you
Avatar
Ok, Yes thank you
Avatar
https://discordapp.com/channels/513432877904691202/513502859992760321/704122693569609728 I would like to know how to activate Tech Engram from the link above.
Avatar
if (!Engram->bCanBeManuallyUnlocked().Get()) { return false; } Can be manually unlocked means the player can click on it to unlock, and this makes engrams that players can't unlock not elegible for being unlocked. You could remove that line if you want tek engrams to be unlocked (edited)
Avatar
thank you!!👍
Avatar
Are we able to cast to specific types of, for example, UPrimalItem to modify something inside of them? Like I want to modify a field from tek chestpiece but I don't know if I can cast to it as it is a BP. Thanks 😄
12:46 AM
My guess is a no as all that is bp
Avatar
who made the Kals CrossChat with Discord & Tribes plugin, would like to purchase and clear some doubts.
Avatar
That's me
Avatar
Deleted User 7/22/2020 9:36 PM
is there any plugin that reloads the game ini and gus during runtime? the current one on the store doesnt seem to work
Avatar
yes there is, but it crashes the game half of the time
Avatar
Deleted User 7/22/2020 10:36 PM
ah rip
Avatar
how to fix this crash arkshop > ?
Avatar
Check your arkshop config for some error
Avatar
GSH | MrOwlSky 7/24/2020 7:07 PM
That crash log means you got a config error inside kits
7:08 PM
If https://jsonlint.com/ is valid most likely a bad blueprint being redeem or mis typed interval.
JSONLint is the free online validator and reformatter tool for JSON, a lightweight data-interchange format.
Avatar
How should anyone know
1:15 AM
we know nothing about your setup, what you're running, etc.
1:15 AM
If you get these consistently, attach a debugger to your server and see what is causing the crash.
Avatar
Anyone could share or send me links to any c++ library/codes that I could use to connect to mysql server version 8. The current ones I could find from free plugins works for ones below 8.0 server versions. Thanx.
Avatar
Hi
4:17 AM
Hello, I am new I would like to learn how to make plugins, do not have a tutorial?
Avatar
You have some info in #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ to get you started on few things. But I don't think there is a tuto to show you how to code/build your first plugin, you will have to do some digging 😉
10:09 AM
Guys, just to confirm: there is no way to unload/reload the actual dll file besides rebooting the server? I do see the AutomaticPluginReloading from the API but that seems to be for the reload command inside the plugin, not the dll directly.
Avatar
@BruteForce
10:46 AM
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
10:46 AM
This is a buildable example plugin
Avatar
Julius Caesar 7/27/2020 7:36 PM
Avatar
@Julius Caesar I can't read Russian
7:38 PM
mind translating that?
Avatar
Julius Caesar 7/27/2020 7:40 PM
geting steamid on official server
7:40 PM
ark 😉
Avatar
oh, that's not really that hard.
7:41 PM
I wrote a program to do that which doesn't require Steam or the game installed
7:41 PM
and scales with as many accounts as you wish to provide to the system.
7:42 PM
the main problem is the server can sometimes have out of date data, and it won't get epic games accounts
Avatar
Julius Caesar 7/27/2020 7:44 PM
but this code - mini client
7:44 PM
😄
7:45 PM
and i see who are online or exit
7:45 PM
one server
Avatar
mine can check all servers very fast
7:46 PM
using deltas you can track who joins and leaves any server
7:46 PM
in one program
Avatar
Julius Caesar 7/27/2020 7:47 PM
oh
7:47 PM
yes need more working to create good program
Avatar
mine emulates steam so you don't need steam installed
Avatar
Julius Caesar 7/27/2020 7:48 PM
and work on official server?
7:49 PM
u program?
7:49 PM
can u show result if u have
7:49 PM
screen
Avatar
this is my friend's version
7:51 PM
I don't have the code on on this PC
7:51 PM
he was only using one account at the time so his scan time was high for all servers
7:51 PM
but since it can use any # of accounts, you can get it down to mere seconds if you use enough accounts
Avatar
Julius Caesar 7/27/2020 7:53 PM
ok
7:53 PM
nice work
Avatar
yeah i ended up using like
8:39 PM
12 accounts to cycle through and scan
8:39 PM
that was a while ago though, was just doing it to help a friend out i haven't really kept up on it
Avatar
@substitute Thx bro.
Avatar
! ♠ 𝐋𝐮𝐩𝐞 ♠ 7/29/2020 11:44 AM
hello, have ARKServerAPI ani documentation somewhere? I dont know how to start 😄
Avatar
AaronBasques 7/29/2020 1:54 PM
try the #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ chat
Avatar
! ♠ 𝐋𝐮𝐩𝐞 ♠ 7/29/2020 2:07 PM
i dont see this channel (edited)
2:07 PM
ah, i didnt have role 😄
Avatar
Hello everyone!
Avatar
Hey guys
9:44 PM
heya i need help with how to install plugins and use them on my ark single player server if you might’ve known how? I play on steam btw.
Avatar
! ♠ 𝐋𝐮𝐩𝐞 ♠ 8/2/2020 11:34 AM
Hello, i need plugin that allow solo players to have better rates like 10x harvest instead of 5x, i sawit on some servers but i cant find anything 😄 Do you know about something?
Avatar
🐨Dream Doctor🦘 8/2/2020 4:24 PM
@! ♠ 𝐋𝐮𝐩𝐞 ♠ Why do you want a plugin when you can do that with default settings?
Avatar
! ♠ 𝐋𝐮𝐩𝐞 ♠ 8/2/2020 4:24 PM
you cant do it (edited)
4:25 PM
i mean give to SOLO players higher rates, not for whole server
Avatar
substitute 8/2/2020 9:08 PM
@! ♠ 𝐋𝐮𝐩𝐞 ♠ while I applaud the idea, it’s unfortunately super easily abused
Avatar
! ♠ 𝐋𝐮𝐩𝐞 ♠ 8/2/2020 9:09 PM
not really if you check f player has tribe or if he is alone in tribe
Avatar
substitute 8/2/2020 9:20 PM
Okay then they leave tribe to farm (after allying), farm at higher rates, rejoin tribe
9:20 PM
Now that tribe is farming at higher rates
Avatar
AaronBasques 8/2/2020 9:43 PM
store the steam id or player id, have a day cooldown on leaving a tribe or something
9:45 PM
people will always find a way around it though, alt accounts etc, even if you stored the machine ID they play from they could just use some dummy on an alt machine
Avatar
there is no Plugin to change the speed of the forge, manufacturer and chemical bench?
Avatar
AaronBasques 8/2/2020 10:00 PM
i'm not sure, but there are plenty of mods, even configurable ones.
10:00 PM
no need for some hacky way using plugins imo
Avatar
and why I use my server without mods.
Avatar
AaronBasques 8/2/2020 10:01 PM
mods are not evil lol, but i get you.
Avatar
AaronBasques 8/2/2020 10:04 PM
you could make one yourself, you'd need to get the class default object on start up and alter the speeds from the properties on the relevant crafting station, and likly have to loop through existing placed stations and alter those too.
Avatar
the problem is to do that kkkk
Avatar
! ♠ 𝐋𝐮𝐩𝐞 ♠ 8/3/2020 12:52 AM
@substitute no lol, it should be checked every xxx minutes and can be prevented with cooldown before join tribe again after leave
Avatar
Yeah but they may just go without tribe then leave and create another one
Avatar
AaronBasques 8/3/2020 2:41 AM
There is literally no way you could reasonably make a system like that work without the risk of abuse. The aim is to reduce the risk without being overzealous in its creation.
Avatar
! ♠ 𝐋𝐮𝐩𝐞 ♠ 8/3/2020 10:22 AM
No, you are not Reading. There should be cooldown before rejoin tribe or create own
Avatar
substitute 8/3/2020 4:04 PM
There isn’t a really a good cool down where that’ll work effectively @! ♠ 𝐋𝐮𝐩𝐞 ♠
4:04 PM
People bypass (or simply wait for) 24hr cooldowns on small tribes all the time to have tribes > 6
4:05 PM
This is something you’ll have to heavily police
Avatar
🐨Dream Doctor🦘 8/4/2020 8:04 AM
Does anyone know how to change the text color when using AShooterGameMode->AddToTribeLog?
Avatar
Ark Markup Language (or ArkML for short) is a markup language seen in several instances within ARK. It is a type of SGML, and currently has only one known element, the "RichColor" element, which is used to add color to text. There is no official documentation for this markup l...
Avatar
🐨Dream Doctor🦘 8/4/2020 8:08 AM
Thanks 🙂
Avatar
🐨Dream Doctor🦘 8/4/2020 8:36 AM
@Michidu Do you know if there's some special way I need to handle adding that ML? Right now it's printing the ML in the log.
Avatar
did you close it?
Avatar
🐨Dream Doctor🦘 8/4/2020 8:39 AM
Sorry, bad clip. Yes I did.
8:40 AM
Maybe the newline messed it up?
Avatar
hm, have you tried without?
Avatar
🐨Dream Doctor🦘 8/4/2020 8:45 AM
Yeah just tried it now and it works without the \n. Thanks for the help 🙂
8:46 AM
I might try closing it, adding the \n then reopening it again.
Avatar
ah, great. yeah, good idea
Avatar
🐨Dream Doctor🦘 8/4/2020 11:23 AM
Does anyone have a functional example of converting ue4 coords to gps? This is how we do it in the dev kit, but I'm not sure how to get the world scale and origin values with the api?
Avatar
substitute 8/4/2020 5:48 PM
@🐨Dream Doctor🦘 you could call get world position details from C++
5:49 PM
UPrimalPlayerData* data = (static_cast<AShooterCharacter*>(playerController->PawnField()))->GetPlayerData(); /* Find the bp Function and run it. */ UFunction* bpFunction = data->FindFunctionChecked(FName(L"DefeatedBoss", EFindName::FNAME_Find, false)); DefeatedBoss_Params params; params.boss = nullptr; params.DifficultyIndex = difficulty; params.tagOverride = FName(boss.c_str(), EFindName::FNAME_Add, false); params.PC = playerController; data->ProcessEvent(bpFunction, &params);
5:49 PM
this is how I call DefeatedBoss node
5:49 PM
struct DefeatedBoss_Params { APrimalDinoCharacter* boss; int DifficultyIndex; FName tagOverride; AShooterPlayerController* PC; };
5:50 PM
for your params struct it should be like struct getWorldPositionDetails_Params { AActor* Actor float LatScale float LonScale float LatOrigin float LonOrigin }
5:51 PM
or something close to that
5:51 PM
it won't be as fast of course as native C++, but it's worth doing if you can't find a pure C++ method.
Avatar
Is that easy to call a bp func?
6:52 PM
I thought it was harder.
Avatar
substitute 8/4/2020 7:02 PM
Yes
Avatar
can someone tell me if the plugin causes lag on the server? I don't use any mod in my services, I already use harvest optimization.
Avatar
AaronBasques 8/4/2020 8:33 PM
@🐨Dream Doctor🦘 there is this that i use inline float trunc_decs(float f, int decs) { float i1 = floor(f); float rmnd = f - i1; float i2 = static_cast<float>(rmnd * pow(10, decs)); float f1 = static_cast<float>(i2 / pow(10, decs)); return i1 + f1; } inline FVector2D GetMapCoordsFromLocation(const FVector& Pos) { FString Map; ArkApi::GetApiUtils().GetShooterGameMode()->GetMapName(&Map); int divider = Map.Equals("Ragnarok") ? 13100 : 8000; return FVector2D(Pos.X > -1 ? trunc_decs(50 + Pos.X / divider, 1) : trunc_decs(50 + Pos.X / divider, 1), Pos.Y > -1 ? trunc_decs(50 + Pos.Y / divider, 1) : trunc_decs(50 + Pos.Y / divider, 1)); } (edited)
Avatar
substitute 8/4/2020 8:39 PM
@AaronBasques you don't need to truncate decimals
8:39 PM
in fact, I wouldn't simply because of potential floating point error.
8:39 PM
you can format decimal numbers when printing to two places.
8:39 PM
%.2f
Avatar
AaronBasques 8/4/2020 8:39 PM
its not mine, i just use it, never had issues
Avatar
substitute 8/4/2020 8:40 PM
int divider = Map.Equals("Ragnarok") ? 13100 : 8000 this is also problematic
8:40 PM
if the user uses mod maps
Avatar
Possible to set a custom display name on a structure in the world?
Avatar
substitute 8/4/2020 8:40 PM
looks like hard coded scaling
8:40 PM
@Lethal that's a good question.
8:40 PM
Check out how other structures can be renamed
Avatar
AaronBasques 8/4/2020 8:40 PM
Rag is a mod map keep in mind
Avatar
substitute 8/4/2020 8:40 PM
(like beds)
8:40 PM
@AaronBasques Not the samse
8:40 PM
Rag is an officially supported mod map
Avatar
AaronBasques 8/4/2020 8:41 PM
CI has some weird scaling even in mods, so i get your point
Avatar
substitute 8/4/2020 8:41 PM
different than a map someone makes and releases on the workshop (until WC make that map offical)
8:41 PM
but even then, the point I was making was other maps may have their own scaling values
Avatar
AaronBasques 8/4/2020 8:41 PM
WC have CI and its still got scaling issues
Avatar
substitute 8/4/2020 8:41 PM
this only accounts for Rag, and it does it by hard coding the value
Avatar
AaronBasques 8/4/2020 8:41 PM
i just gave a pointer, not a catch all solution
8:42 PM
¯\_(ツ)_/¯
Avatar
can someone tell me if the plugin causes lag on the server? I don't use any mod in my services, I already use harvest optimization.
@KillSam ?
Avatar
@KillSam
10:17 PM
attach a debugger
10:17 PM
and measure timings
Avatar
how do I do that
Avatar
@substitute Feeling real dumb on this rename thing 🙂
10:47 PM
AActor::Rename is for sure not it. I don't find anything in the DevKit about renaming beds/smithy/etc that have rename ability on the multiuse. I don't even see anything to say what multiuse options the structures are supposed to have either.
Avatar
Does anyone know how to make a discordbot like this? I know the Shop rewards & stats collects this information but I don't know how to put it in a discord bot.
10:59 PM
Since it doesn't use mysql
10:59 PM
11:00 PM
Is there a download somewhere
11:00 PM
Or a discord where I can buy it?
Avatar
🐨Dream Doctor🦘 8/4/2020 11:21 PM
@substitute Wow that's amazing! Thank you so much!
Avatar
AaronBasques 8/5/2020 5:36 AM
@Lethal its not exposed in the dev kit afaik you can only enable structures to be able to have custom names that auto adds the option index to the multi use by checking bAllowCustomName in a child of Primal Structure Item Container. I'm not sure you will find it in the dev kit.
Avatar
Ok, thanks
Avatar
🐨Dream Doctor🦘 8/5/2020 6:22 AM
@Lethal This is where the custom name is stored on a structure. I'm not sure if that's what you were asking,
Avatar
Ya, its only on item containers I was told.
Avatar
🐨Dream Doctor🦘 8/5/2020 6:29 AM
Yeah in the dev kit it's added in PrimalStructureItemContainer as Bonjella says. So were you wanting to, for example, change "Metal Foundation" to something else in the HUD for a specific instance of that metal foundation?
Avatar
🐨Dream Doctor🦘 8/5/2020 6:45 AM
So I'm hoping there's a simpler way of doing this without needing to use the blueprint methods.
Avatar
🐨Dream Doctor🦘 8/5/2020 6:56 AM
Ok I can get this far: AWorldSettings* WorldSettings = ArkApi::GetApiUtils().GetWorld()->GetWorldSettings(false, true); But I'm not clear on casting in the api yet. How do I get from AWorldSettings to APrimalWorldSettings?
Avatar
AaronBasques 8/5/2020 7:01 AM
you cast a dino ACharacter like this APrimalDinoCharacter* dino = static_cast<APrimalDinoCharacter*>(character);
7:02 AM
so i assume, not tested APrimalWorldSettings* ws = static_cast<APrimalWorldSettings*>(ArkApi::GetApiUtils().GetWorld()->GetWorldSettings(false, true));
Avatar
🐨Dream Doctor🦘 8/5/2020 7:08 AM
Thanks Bonjela. That got me APrimalWorldSettings, but it doesn't seem to contain the same variables as it does in the dev kit. Can't find anything resembling scale, origin, latitude or longitude.
Avatar
Update your API with these structures.
Avatar
🐨Dream Doctor🦘 8/5/2020 7:42 AM
That's fantastic. Thanks so much @Lethal .
7:46 AM
For your naming issue, I'm able to change "DescriptiveName" on any structure at runtime in the dev kit, which will change a "Metal Foundation" to "My Custom Foundation" for example.
Avatar
🐨Dream Doctor🦘 8/5/2020 11:19 AM
I added the structs from Lethal's APrimalWorldSettings.h to my API source code, and was able to find LatitudeScaleField, LongitudeScaleField, LatitudeOriginField and LongitudeOriginField that I needed in APrimalWorldSettings, but when I print them to console I get these values: Lat Scale: 5.67151e-24 Lon Scale: 5.67151e-24 Lat Origin: 5.67151e-24 Lon Origin: 5.67151e-24 Code is: AWorldSettings* WS = ArkApi::GetApiUtils().GetWorld()->GetWorldSettings(false, true); APrimalWorldSettings* PrimalWS = static_cast<APrimalWorldSettings*>(WS); std::cout << "Lat Scale: " << PrimalWS->LatitudeScaleField() << "\n"; std::cout << "Lon Scale: " << PrimalWS->LongitudeScaleField() << "\n"; std::cout << "Lat Origin: " << PrimalWS->LatitudeOriginField() << "\n"; std::cout << "Lon Origin: " << PrimalWS->LongitudeOriginField() << "\n"; Anyone know what I might be doing wrong? (edited)
Avatar
@🐨Dream Doctor🦘
12:12 PM
Static cast is always safe if the compiler allows it
12:13 PM
I can take a look at the gps stuff in a little bit
12:14 PM
Also descriptive name is for item in inventory right, I don’t think world structures have this?, something else I can look at
Avatar
🐨Dream Doctor🦘 8/5/2020 12:16 PM
All PrimalStructures have a descriptivename which is what is shown in the HUD when you look at that structure once its placed. Yes, PrimalItems (in inventory) also have a descriptivename which is shown on the item when it's in an inventory. (edited)
Avatar
🐨Dream Doctor🦘 8/5/2020 12:25 PM
This is Blueprint'/Game/PrimalEarth/Structures/Metal/Floor_Metal.Floor_Metal' where you can see Descriptive Name which sets the name of the item as shown in the HUD, as well as in the log when it's destroyed, and a couple of other places I think. (edited)
12:28 PM
And this is the corresponding Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Structures/Metal/PrimalItemStructure_MetalFloor.PrimalItemStructure_MetalFloor' which has Descriptive Name Base that sets the name of the item in your inventory.
Avatar
I don’t think that field is overridable
12:30 PM
There’s a specific field on inventory items for overrides I believe
12:30 PM
But I will check
Avatar
I can confiirm DescriptiveName doesn't display to the client when it's changed on the server side. (edited)
Avatar
AaronBasques 8/5/2020 8:14 PM
that's because its not a replicated value
Avatar
APrimalStructureItemContainer does work with BoxName though.
Avatar
AaronBasques 8/5/2020 8:18 PM
I'm not sure in the API, but in the dev kit if you modify a replicated value that has no onRepNotify handler, you have to manually replicate the value using multicast property.
GOGCHECK 1
Avatar
AaronBasques 8/5/2020 8:35 PM
something interesting also, BoxName has no setter, apparently you can only preface the name.
Avatar
In code though you can set it which replicates to the clients.
Avatar
AaronBasques 8/5/2020 8:40 PM
nice, have you solved it then?
Avatar
I did using the structure type I mentioned above.
Avatar
AaronBasques 8/5/2020 8:42 PM
ahh i misread does for doesn't
Avatar
Appreciate the info though regardless
Avatar
Apologies if this is not allowed :) I'm looking to commission an ARK plugin that will allow me to set a blueprint & name for a creature and when a player kills that creature, log it to a database with their steam id, tribe id, creature name, and date killed. Message me if interested! (edited)
Avatar
🐨Dream Doctor🦘 8/6/2020 10:27 AM
I'm still not able to read the variables I need from APrimalWorldSettings. I used Lethal's structs, but and it compiles and runs fine, but when I try and read any of LatitudeScaleField, LongitudeScaleField, LatitudeOriginField and LongitudeOriginField I just get the value -0.000022 from all of them, no matter what map I'm running. I assume it's because those structs are somehow missing from the standard API? Obviously I can't be having a custom API build just for my plugin. Anyone else know how I might work around this?
Avatar
substitute 8/6/2020 6:15 PM
@🐨Dream Doctor🦘 that's not the issue
6:15 PM
it could be possible you're reading either the wrong data type, or the structure offset is wrong.
6:16 PM
I use a structure to read stuff that isn't included in the API for changing the # of chibi levels a player has unlocked (the variable is only stored on a blueprint)
6:16 PM
This is how I do so void SetChibi(AShooterPlayerController* playerController, int value) { AShooterCharacter* myPawn = static_cast<AShooterCharacter*>(playerController->PawnField()); UPrimalPlayerData* data = myPawn->GetPlayerData(); callBlueprintFunction(myPawn, L"SetNumChibiLevelUps", packParameters(0, value).parameters); (reinterpret_cast<UPrimalPlayerDataBP_Base*>(data))->NumChibiLevelUpsData = value; /* yolo */ data->SavePlayerData(ArkApi::GetApiUtils().GetWorld()); }
6:16 PM
struct UPrimalPlayerDataBP_Base //This is 101% an unclean solution. :| gonna find to find a way to find the field a little bit easier. { unsigned char unk[0x028]; //UObject unsigned char unk2[0x0498]; //PrimalPlayerData int NumAscensions; unsigned char UnknownData00[0x4]; TArray<float> AscensionData; TArray<struct FName> BossDinoNameTagAscensionDataMap; int SavedPlayerDataVersion; int CurrentPlayerDataVersion; int HexagonCount; int NumChibiLevelUpsData; };
6:20 PM
you can try this, but you'll need to add some padding at the top
6:22 PM
0x0C70 bytes of padding should be what you need (edited)
Avatar
Pulled this from IDA for just the structure. The other file I provided was from a dump Mich shared. (edited)
Avatar
substitute 8/6/2020 6:23 PM
@Lethal is your IDA database out dated?
Avatar
maybe
Avatar
substitute 8/6/2020 6:23 PM
missing bMapSupportsMissions (edited)
6:23 PM
as aids as it is, you have to regen the database when the game updates
6:23 PM
😦
Avatar
lol that is very aids
6:24 PM
takes hours on my VM
Avatar
substitute 8/6/2020 6:24 PM
@dougy posted a DLL you can inject into your game to dump structures and stuff
6:24 PM
obviously run it on an alt account with BE disabled
6:24 PM
6:24 PM
it's where I get BP structs when I need them
6:24 PM
(since those don't exist in IDA)
Avatar
ah ok
Avatar
substitute 8/6/2020 6:25 PM
MISSED OFFSET is usually alignment, so it's nothing
6:25 PM
like, in a struct if you have char a int b the total memory used is 8 bytes
6:25 PM
with char a and 3 bytes of padding int b
6:26 PM
in a way, MISSED OFFSETs show where WC could have restructured their structures to use less memory 😉 (edited)
6:26 PM
e.g. int b char a is only 5 bytes
Avatar
A repo of these dumps would be nice
Avatar
substitute 8/6/2020 6:27 PM
I have an old repo
6:27 PM
it takes like 30 minutes to dump
6:27 PM
maybe once my heat sinks show up for my server
6:27 PM
I can setup a VM to detect game updates and redump them and push to github
Avatar
that would be sweet
6:28 PM
For now just set up a fan to blow on the CPU 😛
Avatar
substitute 8/6/2020 6:28 PM
I wanted to make a collapsible box at my job
6:28 PM
and this is what I had to do
6:28 PM
because CSS transitions don't work unless you use fixed sizes
6:28 PM
e.g. you can't go from 0px to 'auto'
RIP 1
6:30 PM
it works tho
Avatar
We really need a plugin that automatically updates plugins but keeps a copy of the config for each plugin seperately so that configs don't get overridden
Avatar
substitute 8/6/2020 7:25 PM
we'd need a different distribution system
7:26 PM
a plugin package manager is totally possible, it's just not worth it to most people
Avatar
RunningBearYarrr 8/6/2020 8:33 PM
Would someone be kind enough to help me and edit this arkshop config file? I simply don't know when to use ] or }, or }] and so forth so I'm having a heck of a time trying to tweak it lol. --- I need things removed; the vips, the starter needs to be a griffin instead of a pteronodon and no saddle, the engrams and buy tek gear section I need removed, and I need more lines in the items for sale section under the sulfur, I don't know how to continue or close that line either. So if someone could remove the vips, the engrams, the tek gear - change the ptero to a griffin and remove the saddle - and add more lines under the sulfur where I can edit it to put in items for sale. Thank you 🙂
Avatar
Jsoneditoronline.org
9:00 PM
Is your friend buddy
Avatar
RunningBearYarrr 8/6/2020 9:04 PM
It gives me errors, not what to put in place to fix said error.
9:57 PM
you should learn how the things you use work so you don't have to ask whenever you get an error.
Avatar
Julius Caesar 8/6/2020 10:01 PM
hi all
10:01 PM
who can give code to connect on official server ARK to get player connect info
Avatar
@RunningBearYarrr if it knew what had to be in place of the error it could generate the config for you XD
10:10 PM
{} is for objects and [] is for arrays
10:10 PM
you need both when you close an object inside an array and vice versa
Avatar
@Julius Caesar This isn't the place for that.
Avatar
Julius Caesar 8/7/2020 12:49 AM
@substitute ok where place for that?
12:50 AM
in pm?
Avatar
another discord lol
Avatar
🐨Dream Doctor🦘 8/7/2020 6:16 AM
@substitute thank you so much for all that help. So if I use the struct for PrimalWorldSettings in this way, and something changes in an update, I need to update my code again? How does the basic API avoid having to do this? Maybe I could ask for that particular struct to be included in the base API?
Avatar
🐨Dream Doctor🦘 8/10/2020 7:05 AM
Well, until I can work out a better solution I made a workaround. The plugin loads a JSON file which contains the gps-relevant variables from primalwoldsettings for a bunch of maps including all the official ones. The plugin fetches the JSON and the map name at startup and if it finds a match it uses those values. I also made a little mod in the dev kit that reads those variables from any map and dumps them to the server log. So if someone needs a particular map that isn't included in the default JSON, they can load up the map once with the mod, get the relevant settings and add them to the JSON themselves. It's not perfect but it means the gps coordinates can be 100% accurate for absolutely any map.
Avatar
@Michidu
9:35 AM
maybe we can override new operator ?
9:36 AM
so then we don't have to do like so
9:36 AM
static_cast<FItemNetInfo*>(FMemory::Malloc(sizeof(FItemNetInfo)))
Avatar
@Lethal I found a way to force replication of inventory items
11:01 AM
In my case I wanted to see if it was possible to change an items id (effectively making it a new item)
Avatar
All properties?
Avatar
I don’t see why others wouldn’t work assuming they’re editable
Avatar
weight shown client side?
Avatar
good question, I can try
Avatar
@Lethal
5:50 PM
it "kinda" works
5:50 PM
5:51 PM
the item shows original weight
5:51 PM
but the new weight is calculated properly on the user stats
Avatar
Ya, thats how Items+ does it currently.
Avatar
that value might not be editable at all (the item in inventory)
5:52 PM
auto myItems = pc->GetPlayerInventory()->InventoryItemsField(); for (UPrimalItem* item : myItems) { if (item->bIsEngram()()) continue; FString name; item->GetItemName(&name, true, false, pc); int amount = item->GetItemQuantity(); item->IncrementItemQuantity(-amount, true, false, false, false, false); FItemNetID itemId = item->ItemIDField(); LOG->info(name.ToString()); LOG->info(itemId.ItemID1); LOG->info(itemId.ItemID2); LOG->info("------------------------------------------------------------------------------------------"); item->GenerateItemID(&itemId); item->ItemIDField() = itemId; item->BaseItemWeightField() = 0.f; item->IncrementItemQuantity(amount, true, false, false, false, false); item->AddToInventory(pc->GetPlayerInventory(), false, false, nullptr, true, false, true); } This is how I was doing it
5:52 PM
I wanted to try regenerating the item ids
5:52 PM
you have to remove the old item ids before you add the new ids since item id = the actual item
5:52 PM
if you don't it'll desync
5:52 PM
my solution was add -amount to remove the first item (with proper replication)
5:53 PM
and then reset that back to it's previous value (add amount) before adding the item to the user inventory
Avatar
RunningBearYarrr 8/11/2020 12:09 PM
Is there a plugin or .ini setting to allow crafting more than 1000 items at a time? Can't use mods (steam & epic crossplay ARK)
Avatar
Do you need to stack items to 1000?
Avatar
I was trying to make exactly that, but no luck so far
Avatar
Anyone have ideas on why someone may get error 1114 and another person using the same exact zip file contents does not?
Avatar
If it works for some, that person has anything wrong on their side then
Avatar
Ya, just not sure how to help them with the issue. I even put a std::cout line as the first thing that gets executed inside Load() and it didn't output that for them.
5:06 PM
It's as if it doesn't even attempt to load the plugin. (edited)
Avatar
The dll process attach might not being called then? (edited)
5:10 PM
I haven't experienced that but maybe tell them to run as admin, may be windows user permission issue (edited)
Avatar
@Lethal dependency issue most likely
Avatar
Dependency wasn't 126?
Avatar
load errors aren't exactly like that
Avatar
Dependency usually is 126 though.
Avatar
Oh, nvm then
Avatar
I used to get 1114 for various things
5:13 PM
like building in debug instead of release
5:13 PM
maybe they don't have the right version of Visual C++ installed
Avatar
I will have them install the latest and see if that fixes it.
Avatar
but you're not going to fish any useful info from 1114 (edited)
5:14 PM
5:14 PM
it just means it failed
5:15 PM
126 is for like missing dll
5:15 PM
Avatar
Ya, I knew it was a general error.
Avatar
are you returning true in your dll attach?
Avatar
when you attach a dll you are supposed to make a thread and return on the attach call
5:15 PM
hm, yeah have them check if they have latest c++ runtimes
Avatar
Yep, will do.
Avatar
That didn't fix it either for them. I gave them a new DLL to try that uses std::cout to display console messages in DllMain to see if it even outputs anything there.
PepeHands 1
Avatar
It doesn't even seem to call Load() from inside DllMain() for him.
5:52 PM
but is able to load other plugins of mine without issues
Avatar
Hi there, this is probably the wrong place to ask but I could really do with some help. I have spent hours looking for info but keep hitting a dead end with no info on this. I have a ark server and am trying to setup the ARK shop plugin UI mod. Any chance some can point me in the right way? The info on the steam workshop page is the most info available but for someone like me with limited JavaScript knowledge idk HELP🤣
Avatar
This API has nothing to do with Workshop mods directly.
11:02 PM
does the workshop mod have a dll for this api?
Avatar
It's the AgitoReiKen Arkshop UI, which plugin to make it work costs 150$
Avatar
that is a disgusting price
11:03 PM
KEKW
Avatar
Yeah lol
Avatar
wait
11:04 PM
11:04 PM
uh, does this workshop mod do anything with this API directly?
11:04 PM
hm, maybe they use php stuff as their bridge between this API and mod
Avatar
Yes, php files are to communicate with a modified version of arkshop
Avatar
since my stuff wasn't released yet
Avatar
That makes sense. I am trying to fit the wrong API to the mod then
Avatar
Yes, the issue wasn't the API itself (which this is using)
11:05 PM
but instead the system the user made to communicate between this API and their mod
11:05 PM
do you have a web server with PHP installed?
11:05 PM
sounds like you need that.
Avatar
I don't really recommend that one UI, it's very buggy as I've seen. And I also heard Wooly will be releasing one shop UI which won't cost 150$ 🤣
Avatar
or maybe everyone can instead of trying to make a quick buck
11:06 PM
we can create a simple standard
11:06 PM
and allow anyone to design their own mod UI for workshop (edited)
11:06 PM
🙂
Avatar
That could be an option, and probably with better performance
Avatar
Especially since we can read/write to bp variables now.
Avatar
The arkshop ui mod now takes several seconds to open
Avatar
and I know how to hook bp functions
Avatar
Do you?
11:07 PM
😮
Avatar
yes, it is really easy.
11:07 PM
bp functions are processed by a higher order function
11:07 PM
ProcessEvent
Avatar
I see where you are going
Avatar
so you can check the UFunction for a name (and get the internal index so you don't have to keep checking name)
11:08 PM
and simply call your callback
11:08 PM
and never process the original UFunction
Avatar
I am lost but thanks guys, will try to do some more reading up on PHP and how it works. Or try finding a different mod thats makes the shop more user friendly
Avatar
I've made a few hacks to test around with in Single Player with that method @Pelayori
11:08 PM
@StefMista do you have a PHP runtime on a webserver? (edited)
Avatar
Also, have you bought the 150$ plugin? you need it for the shop ui to work
Avatar
I am not even sure what PHP is mate tbh
Avatar
you can just use nginx with php or apache2 with php
11:09 PM
php is a programming language
11:09 PM
it runs on the php process,
11:09 PM
similar to like Java or Python
11:10 PM
php runs on websites to do stuff like interact with databases and generate dynamic pages
Avatar
Also, have you bought the 150$ plugin? you need it for the shop ui to work No I have not since I can't get to that info or point
Avatar
Yeah, his discord link is broken
Avatar
maybe this weekend I can brush up my mod stuff and make a basic UI thing that runs a function on server when button is pressed and I can implement the server logic in C++ and a hook @Pelayori
Avatar
@substitute I will definitely look into it and learn more. I have started using Wampserver and am trying to learn as I go
Avatar
if I can make an easy to use system I'll add it to the API
11:11 PM
@StefMista WAMP is a good basic system
Avatar
maybe this weekend I can brush up my mod stuff and make a basic UI thing that runs a function on server when button is pressed and I can implement the server logic in C++ and a hook @Pelayori
@substitute That's cool, now that I know how to interact with bp stuff I can miss with some more things heh
11:12 PM
I just need a trace tho :C
Avatar
If you manage to make a basic one please let me know. I will 100% go for that over the $150 one that I can't even get proper info on
Avatar
yea, when I can spend some time on that I will @Pelayori
11:13 PM
I was only going to make a basic proof of concept @StefMista
11:13 PM
I don't have the time to spend making and maintaining such as system right now
11:13 PM
xd
Avatar
I can help you if you want another pair of eyes on something, but I'm not the best at c++ yet 👀
Avatar
I mostly hate working with the devkit
11:14 PM
it is not very good
11:14 PM
and crashes a lot when working on UI stuff
Avatar
I bet it does
Avatar
I wonder if you can put a web view in the UI stuff
Avatar
But I have some hacks to avoid crashing
Avatar
then you could make the whole system as html pages
11:14 PM
KEKW
Avatar
xDD
11:14 PM
I don't think so tho
Avatar
I need to get a new computer case
11:15 PM
so I can fit a 240mm AIO for my cpu
11:15 PM
3900X is too hot to fit in my 10 liter case
11:15 PM
sadpepe
11:15 PM
so I'll move up to 12 liters
11:15 PM
KEKW
Avatar
Anyone know if it is possible to tie C4 damage back to a specific player not tribeid? (edited)
Avatar
hm
11:16 PM
good question
11:16 PM
if they were not in a tribe it would be trivial
11:16 PM
does the damage instigator have the structure?
11:17 PM
maybe when someone places a C4 you can store their character id with that structure id in a table
11:17 PM
so when it does damage, you can take the instigator (for structure) to lookup in the table to get their id
Avatar
Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) EventInstigator is nullptr DamageCauser is the C4 structure
Avatar
ah,that's what I meant
11:18 PM
was the damager causer
11:18 PM
so you can get the specific id then of the structure
11:18 PM
seems trivial enough
Avatar
I've cast it a structure but the owner fields are nulls it seems
Avatar
I think Owner is only valid when structure is not in a tribe, aka non-tribed player
Avatar
yes, don't use owner
11:19 PM
I mean
11:19 PM
there should be some id specific to the structure
11:20 PM
you may have to go all the way back to the function that handles the spawning of the c4 from user placement
11:20 PM
but it should be possible
11:21 PM
you're a smart guy, I'm sure you can get something working 😄
Avatar
I think I found it 😛
Avatar
nice
Avatar
APrimalStructureExplosive contains ConstructorPlayerDataID
Avatar
ah perfect then
11:23 PM
you may not even need to make a look up table
Avatar
I had another way to do it but I didn't want to go down that path.
11:23 PM
I don't its already working to get SteamID with the PlayerID
Avatar
perfect then
Avatar
I think c4 is the only unique item like that. (edited)
Avatar
where is the tutorial channel?
Avatar
GSH | MrOwlSky 8/18/2020 4:10 AM
Avatar
Thanks
Avatar
Yo did anybody there have problem with permissions like that? * permission aka WC character doesn't do anything. Database is working. Its reading and writing. I gave myself admin group with default * permissions and i still can't do any cheat or anything with it lol
Avatar
permissions are for plugins to use I don't believe that permission allows you to bypass doing "enablecheats <password>" unless you have another plugin that executes commands for you.
Avatar
By the way, thanks for the new discord updates (channels, roles, tutos etc), that's nice!
Avatar
GSH | MrOwlSky 8/20/2020 2:16 AM
No problem glad you enjoyed it
👌 1
Avatar
Can anyone tell me if there is any store other than Shop, Currency & Kits
Avatar
🎮 Stevie 8/26/2020 9:37 AM
hey, can anyone tell me what causes this error in the arkapi log? 08/26/20 15:04 [Permission][error] (d:\programs\ark\plugins\permissions\permissions\private\hooks.cpp Permissions::Hooks::Hook_AShooterGameMode_HandleNewPlayer) Couldn't add player
Avatar
Epic player perhaps?
Avatar
@Foppa
1:00 AM
1. I have function calling with return values, but I found if the function has an in arg that is also an out arg, it's structure isn't args, returns
1:00 AM
so I am making the above^
1:01 AM
which will use a builder pattern to allow users to execute bp functions stating the args by name
1:01 AM
ex: FunctionArgs args = FunctionArgs::Create() .Add(L"some bool", false) .Add(L"some int", 5) .Add<int>(L"out arg");
Avatar
Looks interesting, for what purpose tho? 🙂
Avatar
For calling functions that exist in bp and getting their return data back
Avatar
@Foppa for blueprint functions that have their args and then their returns in normal order (basically functions where no ouput is an input)
5:06 AM
template<typename ...Rs, typename ...Ts, typename std::enable_if<sizeof...(Rs) >= 2, bool>::type = true> std::optional<std::tuple<Rs...>> ExecBP(UObject* object, std::wstring name, Ts&&... args)
5:06 AM
this template I have works to return an optional tuple of the return types
5:07 AM
for single return values I have just an optional of the type version template<typename RT, typename ...Ts> std::optional<RT> ExecBP(UObject* object, std::wstring name, Ts&&... args) and of course void return version template<typename ...Ts> void ExecBP(UObject* object, std::wstring name, Ts&&... args)
5:07 AM
these work 100%, but again, some functions have inputs that are outputs and thus deducing the return args at compile time is impossible
5:07 AM
my current work-around offering is a version that takes a pointer to the structure directly, void ExecBP(UObject* object, std::wstring name, void* args)
5:08 AM
however as I now have proper UE4 reflection on UFunctions, I will instead add runtime checking
Avatar
can someone edit the permission plugin so they not only stores the steam id for the player even the playername would be great... on mysql
1:29 PM
id tried this and cant get this to work
Avatar
What's the reason for it? 🙂
Avatar
see which player it is when browsing in database or even when building a webui for admins
Avatar
if you’re making a webui you can just get the steam name with steam id via steam’s api
Avatar
for the steam name, but it want the ingame name :Facepalm:
Avatar
Hi all! Nice to meet - just joined as I'm developing a plugin and wanted to get in touch with the community
Avatar
@Frost® pretty rude to say facepalm while asking others to do something for you for free
Avatar
@Frost® pretty rude to say facepalm while asking others to do something for you for free
@substitute That wasn't meant as an insult, but of course you turn everything around and troll, but sorry if understand it like so
Avatar
@Frost® It's quite simple to get the players name if you have the steamID of the player: FString Playername; AShooterPlayerController* shooter_pc = ArkApi::GetApiUtils().FindPlayerFromSteamId(steam_id); shooter_pc->GetPlayerCharacterName(&Playername);
Avatar
the line "shooter_pc->GetPlayerCharacterName(&Playername);" fills the Fstring ? Thought its need to be "Playername = shooter_pc->GetPlayerCharacterName(); (edited)
Avatar
GetPlayerCharacterName will fill the value for the FString
Avatar
not sure what you did there, pro tip upload your pdb file after you compile
10:40 AM
and you will see more info in the crash log
10:41 AM
Avatar
i will restart and try
10:43 AM
try { FString Playername; AShooterPlayerController* shooter_pc = ArkApi::GetApiUtils().FindPlayerFromSteamId(steam_id); shooter_pc->GetPlayerCharacterName(&Playername); Log::GetLog()->info(Playername.ToString()); } catch (const std::exception& exception) { Log::GetLog()->error("({} {}) Unexpected DB error {}", FILE, FUNCTION, exception.what()); }
10:43 AM
this will be ok ?
Avatar
Where do you get the steam id from then?
10:46 AM
its a parameter fro the addplayertogroup function, i just added my code there
10:46 AM
std::optional<std::string> AddPlayerToGroup(uint64 steam_id, const FString& group) {
10:47 AM
oh wait
10:47 AM
i did crap
10:47 AM
xD
10:48 AM
as there no api on this place this cant work
Avatar
you need to start looking from the hook and follow the code logic how it is adding new players to the database
10:51 AM
the Permission plugin use only one hook for players basically "AShooterGameMode_HandleNewPlayer"
Avatar
is this creating it while player is connecting or while its been creating a char
10:52 AM
cause u can connect without a character at first
Avatar
I'm pretty sure that hook is executed as player joins
Avatar
so u have the GUi first with generating the char
Avatar
you could log the hook and see when it's executed
Avatar
Is there anyone that can make a ark plugin that stops placing c4 in pve time?
Avatar
AShooterPlayerController* shooter_pc = ArkApi::GetApiUtils().FindPlayerFromSteamId(steam_id);
12:07 PM
if (!shooter_pc) { Log::GetLog()->info("Cant find Player from steamid {}", steam_id); } else { Log::GetLog()->info("Found Player from steamid {}", steam_id); }
12:07 PM
i got cant find player 😄
12:08 PM
is it only possbible if player is online ?
Avatar
Heitorznx_048 9/14/2020 12:19 PM
what I put in .pdb I did .json only .pdb is missing
Avatar
there are 2 things that are owned by the person playing the game (more but i'm saying what's relevant in this case) the AShooterPlayerController and the AShooterCharacter the AShooterPlayerController ONLY exists when the player is connected to the server the AShooterCharacter exists if the character is spawned in the world (not dead), and is there even if the player is offline
12:59 PM
@Frost®
Avatar
thanks man
Avatar
is it possible to change servername without restart ?
Avatar
@WETBATMAN
4:36 PM
I've got to clean up my code, but I have runtime BP calling with proper arg binding
4:36 PM
I've also made it possible to iterate the global objects array
4:36 PM
auto a = GObjects(); printf("GObjects %p\n", GObjects()); LOG->info("total objects {0}", a.ObjObjects.NumElements); UClass* myGuy = nullptr; for (int i = 0; i < a.ObjObjects.NumElements; ++i) { UObjectBase* object = a.ObjObjects.GetObjectPtr(i)->Object; if (object == nullptr) continue; FString expt; object->NameField().ToString(&expt); if (expt.ToString().find("KismetSystemLibrary") != std::string::npos) { myGuy = static_cast<UClass*>(object); break; } } UFunctionExec::create(myGuy->GetDefaultObject(true), L"LineTraceSingle_NEW") .add("WorldContextObject", pc) .add("Start", FVector(0, 0, 0)) .add("End", FVector(0, 0, 0)) .add("TraceChannel", 0) //whatever .add("bTraceComplex", false) .add("ActorsToIgnore", TArray<AActor*>()) .add("DrawDebugType", 0) .skip("OutHit") //we know that this isn't quite required, so we force the check to skip this. .add("bIgnoreSelf", true) .add<bool>("ReturnValue") .call();
4:37 PM
so you can get the CDO of things like KismetSystemLibrary
4:38 PM
Just need to move this into the API itself directly and I'll be making a PR.
Avatar
@substitute How i can write this like u Stuff?
7:49 PM
[Ausdrucksweise]"Ihr Lieben!!!. von Caleb" LuL!- Solch ein Verhalten fürth zum Ausschluss.
7:49 PM
Im not sure how u made this, Bro.
Avatar
@Stofftier ?
8:12 PM
I'm not sure what you are asking.
Avatar
How i can write this in one Block?
8:12 PM
is it tricky?
Avatar
what do you mean? You want a new line in your text?
Avatar
that are several Blocks and u have only one Block with several colors.
Avatar
You mean calling the functions on each other like .add().add().add()?
Avatar
jep
8:14 PM
yes
Avatar
the functions return a reference to the object itself for method chaining.
8:14 PM
template<typename T> UFunctionExec& add(std::string argName, T argValue) { //code return *this; }
Avatar
some links how explain it for Beginners?
Avatar
UFunctionExec& call() { //another return *this; }
8:15 PM
the function just returns the instance of the object
Avatar
oh ok
Avatar
so you can use that return value to call the next function
Avatar
thx
Avatar
🐨Dream Doctor🦘 9/15/2020 10:52 AM
Anyone know the appropriate function/hook I need to look for to control floating damage numbers?
Avatar
I’ll look tomorrow @🐨Dream Doctor🦘
11:48 AM
I used it recently actually
Avatar
🐨Dream Doctor🦘 9/15/2020 11:49 AM
Thank you so much 🙂
11:49 AM
I found AShooterPlayerController_ClientAddFloatingDamageText but I'm not sure if that's correct or not.
Avatar
Hi folks, I'm quite new to the plugin making and have a couple of questions as I can't find documentation on what's available inside the API. If anyone knows answers or URLs to resources that I've missed I'd really appreciate it and hope to return the favour once I've gotten better at this stuff. 1. Does anyone have experience using event driven mechanics? I'm looking to trigger some code every time someone joins the server 2. I also want to trigger some code regularly, eg every 30 seconds. Is there a way I can do this? Thanks in advance, let me know if there's any more info you need. All the best, Ashley
Avatar
1. and 2. look at the arkshop source code
Avatar
Heitorznx_048 9/15/2020 3:23 PM
can someone help me create an ark plugin just new to this
Avatar
1. and 2. look at the arkshop source code
@Frost® Thanks for this!
Avatar
Found the most intresting things also there. XD
Avatar
🐨Dream Doctor🦘 9/16/2020 6:13 AM
Hey @substitute , did you get a chance to have a look for the floating damage text info? Sorry for the tag.
Avatar
Found the most intresting things also there. XD
@Frost® it's a chunky one for sure but it seems to have everything I need 🙂 thanks so much!
Avatar
Hi guys, Been struggling with the includes - I've been looking for the file included below: #include <API/Ark/Ark.h> I installed the API as described but I don't think my Visual Studio knows where the file actually is (and I don't either 🤷‍♂️) Is it part of the ArkApi.lib library? I think I'm including it in my project so if I'm barking up the wrong tree that'd be good to know. Also - does anyone know if there's an updated version of this video on compiling the plugins? There's a version here (https://ark-server-api.com/index.php?threads/tutorial-how-to-compile-the-plugins-your-self.628/) but it's been taken off YouTube Again, realise I'm new and asking for help so if there's any way I can help in return let me know, I know a decent amount about C++ (although in Linux) so may be able to help there. All the best, Ash
Avatar
You just have to press build to create the dll (edited)
6:54 PM
This guide is based on the Visual Studio Community 2019 version install Prerequisites: 1. https://visualstudio.microsoft.com/vs/ 2. https://github.com/Michidu/ARK-Server-API/archive/master.zip Step N1: Install Visual Studio by the link given on the first prerequ...
6:54 PM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Thank you for this @Tsjollin!
Avatar
@🐨Dream Doctor🦘
9:25 PM
9:25 PM
check these four
9:26 PM
_Implementation is usually the actual function
9:26 PM
I would use ClientAddFloatingText if you are adding text
Avatar
is it possible to fake that iam online with plugin? players doing shit if no admin is online 😄
Avatar
You just have to press build to create the dll
@Tsjollin hi! this file is fantastic - I was thinking of adding some extra info in the form of suggestions on the doc which you can approve or reject, just to add a bit of extra info for you and other people who look at the file if you don't mind
Avatar
Hi again - looking through the ArkShop Hooks and wondering which hooks to use, I want to do something every time a player logs in, should I go for AShooterGameMode_HandleNewPlayer, or another hook, such as AShooterPlayerState_BeginPlay, AShooterPlayerState_NotifyPlayerJoined. Currently a little confused as to what hooks correspond to which events
1:38 PM
using OwnProx's Hook Generator which seems like a godsend
Avatar
Thanks @Ashington I'll create a suggestion system
Avatar
no problem - it's possible within the google doc itself if you switch from editing to suggestion mode 🙂
Avatar
the doc is not his though, it was created by me XD
Avatar
Never said it was mine haha
6:35 PM
@Ashington AShooterGameMode_HandleNewPlayer and AShooterGameMode_Logout
6:36 PM
and i dont know if you knew it existed but try using OwnProx's Hook creator
Avatar
using OwnProx's Hook Generator which seems like a godsend
He does
Avatar
the doc is not his though, it was created by me XD
@WETBATMAN My bad! Either way a fantastic doc haha
Avatar
has anyone been fiddeling with mysql/cpp ? I'm trying to add mysql support to a plugin and when it suppose to get values from config i get nothing? But the rest of the config values works.
Avatar
uh
5:57 AM
can u post ur config and related code?
5:57 AM
(mask ur info)
Avatar
🐨Dream Doctor🦘 9/18/2020 7:45 AM
@Foppa There are many open source plugins that use mysql. I would start by looking at them 🙂
Avatar
Well i think i have figured out the issue
7:46 AM
it's when it's creating the table
7:46 AM
But still confused why it isn't posting any values
7:47 AM
Overall the plugin is working when i created the table manually
7:51 AM
7:51 AM
Avatar
cause your uername and passwort and database are empty
8:15 AM
;-D
Avatar
Pfft!! 😄
8:21 AM
That should gathered from config
8:21 AM
i'm not sure might be that i'm using mariaDB
8:23 AM
Maybe i need to add mariadb wrapper
8:25 AM
C++ client library for MariaDB. Contribute to viaduck/mariadbpp development by creating an account on GitHub.
Avatar
normaly mariadb is complete compatible to mysql
Avatar
yeah i know
8:28 AM
I mean the other queries works
8:29 AM
lol
Avatar
print the query from console
8:29 AM
please
Avatar
So must be that the creating query that's having issue
Avatar
and copy that string here
Avatar
"CREATE TABLE IF NOT EXISTS {} (" "Id INT NOT NULL AUTO_INCREMENT," "SteamId BIGINT(11) NOT NULL DEFAULT 0," "PlayerId INT DEFAULT 0," "TribeId INT DEFAULT 0," "Level INT DEFAULT 0,", "PRIMARY KEY(Id)," "UNIQUE INDEX SteamId_UNIQUE (SteamId ASC));"
Avatar
in c++ its need to ad quotes for the newline ?
8:32 AM
Here is ArkShop: "CREATE TABLE IF NOT EXISTS {} (" "Id INT NOT NULL AUTO_INCREMENT," "SteamId BIGINT(11) NOT NULL DEFAULT 0," "Kits VARCHAR(768) NOT NULL DEFAULT '{{}}'," "Points INT DEFAULT 0," "TotalSpent INT DEFAULT 0," "PRIMARY KEY(Id)," "UNIQUE INDEX SteamId_UNIQUE (SteamId ASC));"
8:32 AM
LOL
8:32 AM
I see the comma
Avatar
level line
Avatar
OH WELL
8:33 AM
Let's try that again 😄
Avatar
i also edited arkshop 😄
8:33 AM
8:34 AM
not yet finished
8:35 AM
Pulling more steam info?
Avatar
yes i do this with php
8:36 AM
just tested but not implemented
8:36 AM
it works buit to lazy now
8:36 AM
😄
Avatar
AH No errors
Avatar
just working on admin interface wehre mods can switch groups and give points and kits etc over webui
8:37 AM
and its easyier then to find the player he wants to by Playername or Steamname
Avatar
Yeah that's always easier, looking forward for more progress ! 🙂
Avatar
@Frost®
11:26 AM
Check your character encoding
11:26 AM
Unicode should fix those garbage names
Avatar
Ark uses utf16
11:52 AM
Btw
11:58 AM
home players uses symbol link in there names ?
11:58 AM
i saw that a few times
Avatar
Is there anyone who can make a plugin to prevent placing c4 in pve times. On a lot of servers that use ASM to run pvpve times pre planting is a major problem
Avatar
just dont disable turrets in pve
Avatar
It comes with a ton of other problems when you run a server pvp and make rules to stop fighting at a certain time
Avatar
why you should disable pvp completly ? then do a pve server xD
Avatar
So players can play peacefully in pve times. To stop trolls and douch bags. To make veins and drops doable. The list is long
Avatar
https://discord.gg/u5v44xC World PVP and Raid PVP independent settings World PvP will only apply its restrictions. (Affects only you) Raid PvP will apply World and Raid restrictions. (Affects the whole tribe) Block Commands like /shop Block...
12:27 PM
hmm
12:27 PM
no
12:27 PM
😄
12:31 PM
do oyu use PVPShedeuler ?
Avatar
No I use the Ark Server Manager's auto pve time schedule to change from pve to pvp for 4 hours a day
12:46 PM
bAutoPvEUseSystemTime=true AutoPvEStartTimeSeconds=86340 AutoPvEStopTimeSeconds=46860
12:46 PM
These settings basically
Avatar
int Hook_APrimalStructure_IsAllowedToBuild(APrimalStructure* _this, APlayerController* PC, FVector AtLocation, FRotator AtRotation, FPlacementData* OutPlacementData, bool bDontAdjustForMaxRange, FRotator PlayerViewRotation, bool bFinalPlacement) { if (bFinalPlacement && PC != nullptr) { if (!PVPEnabled && BlockC4PlacementInPVPOff) { const FString path_name = GetBlueprint(_this); if (path_name.ToString() == "Blueprint'/Game/PrimalEarth/Structures/C4Charge.C4Charge'") { ArkApi::GetApiUtils().SendNotification(static_cast<AShooterPlayerController*>(PC), FColorList::Green, 1.3f, 15.0f, nullptr, "C4 is Blocked in PVP OFF"); return 0; } } } return APrimalStructure_IsAllowedToBuild_original(_this, PC, AtLocation, AtRotation, OutPlacementData, bDontAdjustForMaxRange, PlayerViewRotation, bFinalPlacement); }
(edited)
9:05 PM
this is it if added to pvpsheduler 😄
Avatar
with c4 block in PVP OFF
Avatar
Thank you very much, will give it a try
Avatar
this isn't enough you can still place a c4 on a dino (this hook doesn't trigger for some reason) and then drop the dino in
1:29 PM
i have a pretty much reworked version of PVPScheduler, never got around to posting it on the forum though
Avatar
@WETBATMAN would you mind sharing it with me pretty please🥺
5:30 PM
@StefMista
5:31 PM
has new features like not allowing players to access enemy structure's inventories when pve is enabled
5:31 PM
and c4 detonation can be also blocked in pve
5:33 PM
oh also during pve turrets don't target players at all
Avatar
Awsum thank you very much. You guys have been extremely helpful on here
Avatar
then may just make a pull request with the code u have to support community.... @WETBATMAN
Avatar
Getting a crash when i'm making damage as a player riding on a dino towards a player who is not riding a dino. float Hook_AActor_TakeDamage(AActor* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) ... AShooterPlayerController* defender_aspc = static_cast<AShooterPlayerController*>(_this->GetOwnerController()); AShooterPlayerState* defender_asps = static_cast<AShooterPlayerState*>(defender_aspc->PlayerStateField()); <---- That line seems to cause the crash But i don't know why and been trying to figure out why.
11:23 PM
but when player vs player it doesn't crash
Avatar
hmm.. it is actually this that isn't working properly AShooterPlayerController* defender_aspc = static_cast<AShooterPlayerController*>(_this->GetOwnerController()); (edited)
Avatar
i assume you check for nullptr already ?
11:46 PM
but it seems that i don't get any Controller
Avatar
thing is
11:46 PM
controller is only available if player is online
11:46 PM
And the player is online
Avatar
yes but
11:46 PM
do you ensure this code only gets called on that particular player ?
Avatar
do you know if _this->GetOwnerController() returns nullptr
11:47 PM
?
Avatar
Not sure tbh
Avatar
just make an if statement for it
Avatar
Still confused why it dosen't give me controller when it's Player vs Player but not Dino vs Player (And the dino is being ridden) (edited)
11:49 PM
i added a if statement for nullptr for _this as well now
Avatar
if i remember correctly calling this func on a character always gave me nullptr
11:52 PM
not 100% sure but i remember a plugin crashing because of this issue
Avatar
it works fine on other parts of the code, where i also use it to get tribe info and such
11:59 PM
This return true atleast: _this->GetInstigatorController();
12:03 AM
yeah you need to use GetInstigatorController() to find the controller in that scenario (edited)
Avatar
@WETBATMAN
1:40 AM
wanna see something that is an awful time
Avatar
what heh
Avatar
@WETBATMAN
2:10 AM
2:10 AM
for my systems software course, our first project is to build the pass 1 of a SIC assembler
2:10 AM
in C
2:10 AM
KEKW
2:10 AM
That's mine^
2:11 AM
it's very advanced, and doesn't fault on the first error, it continues accumulating errors to show the user (though it only generates a symbol table up until the first error)
Avatar
I like the colors 😛
2:23 AM
I made my own
2:23 AM
ghetto "C++" with macros
3:27 AM
Does anyone know the Hook for when a player get's kicked from a tribe?
Avatar
I found it 😛
Avatar
lulw faking isofficialserver = true XD
Avatar
Imagine your server added to official network list 👀
Avatar
nah they pull official servers from a list that is client side
5:09 PM
but sites like battlemetrics will say your server is official
Avatar
@Pelayori
5:53 PM
Official Server list is downloaded from an ini
5:53 PM
@WETBATMAN somewhat
Avatar
Yeah yeah I was just joking xD
Avatar
I believe they pull the Official Server list from Steam with a filter and then apply the ini as an IP filter on top of that.
Avatar
me is wondering why some players are created under arkshop players but not present in the permissions table ?
Avatar
🐨Dream Doctor🦘 9/24/2020 5:45 AM
Does anyone have an api example of GAAC I could have a look at?
Avatar
of what ?
Avatar
The Rockwell on aberration gives items directly ? never killed him
11:42 AM
so editing the loot is may possible through api ?
Avatar
hi! I'm currently wondering how exceptions raised by plugins are handled by the server - I want to do some error handling 🙂
11:47 AM
does anyone know what the behaviour is for this?
Avatar
The Rockwell on aberration gives items directly ? never killed him
@Frost® no, only engrams and levels
Avatar
how are the boss drops are received, i readed in beacons app discord that the items are not optained by a lootchest ore boss corpse
Avatar
@🐨Dream Doctor🦘
6:11 PM
I might have one of get all actors of class
6:11 PM
Though you should absolutely avoid it for performance reasons
Avatar
is it some way you can call the API to unload a plugin?
Avatar
@Foppa I don't believe that's supported
Avatar
ArkApi::Tools::IsPluginLoaded to check if its loaded, then send internal rcon plugins.unlaod Pluginname ?
Avatar
was into doing something like that as well Frost...
11:09 AM
@Foppa I don't believe that's supported
@substitute hmm okay
Avatar
Trying to unload might work
11:17 AM
But that breaks when using timers
Avatar
Question, when using structs with TArrays, and i want to have several, do i need to create a new struct for each TArray or will one struct do? I'm worried about data is being collided
2:53 AM
i just figured out that now lol
Avatar
Hi, does anyone know if this plugin still works without crashes/performance loss, since it's quite old and could be outdated. https://ark-server-api.com/index.php?resources/safezones.2/
SafeZones Source: Click Here Features: Prevent PVP in certain area's Prevent Building in certain area's Prevent Structure damage in certain area's Notifications on Entering and Leaving SafeZone area's Ability to restrict players from...
Avatar
U should be good to have structs with tarrays
Avatar
Hi, does anyone know if this plugin still works without crashes/performance loss, since it's quite old and could be outdated. https://ark-server-api.com/index.php?resources/safezones.2/
@Matisse i tested about 2 weeks ago and it worked fine
SafeZones Source: Click Here Features: Prevent PVP in certain area's Prevent Building in certain area's Prevent Structure damage in certain area's Notifications on Entering and Leaving SafeZone area's Ability to restrict players from...
Avatar
Thanks @Uaca
Avatar
🐨Dream Doctor🦘 10/4/2020 10:53 AM
Are there any examples around of how to interact with the Permissions plugin from my own plugin?
Avatar
ArkShop maybe
Avatar
You'd just need to include ArkPermissions.h and link Permissions.lib. function names are self explanatory from there
Avatar
🐨Dream Doctor🦘 10/4/2020 4:32 PM
I'm trying to get hold of the AscensionData array from PlayerData. Thanks to some examples from @substitute I can get as far as getting UPrimalPlayerData using GetPlayerData, but I'm not sure where to go from there? This is how I'd do it in the dev kit, but it won't let me cast UPrimalPlayerData to UPrimalPlayerDataBP_Base
Avatar
PrimalPlayerDataBP_Base is a Blueprint Only class
4:35 PM
Maybe it's not defined in API, let me open up IDA
4:39 PM
No, it's only a BP class. However there is a solution Substitute posted a while ago https://discordapp.com/channels/513432877904691202/513432877904691205/740966572532826112
4:43 PM
You could try something like this: TArray<float> GetAscensionDataArray(AShooterPlayerController* player_controller) { AShooterCharacter* shooter_char = static_cast<AShooterCharacter*>(player_controller->PawnField()); UPrimalPlayerData* data = shooter_char->GetPlayerData(); return (reinterpret_cast<UPrimalPlayerDataBP_Base*>(data))->AscensionData; } (edited)
4:43 PM
@🐨Dream Doctor🦘
Avatar
🐨Dream Doctor🦘 10/4/2020 4:53 PM
Thanks Pelayori, that's pretty much what I came up with too. About to give it a try. Thanks again.
Avatar
🐨Dream Doctor🦘 10/4/2020 5:00 PM
Hmmm, unfortunately that's an instant crash as soon as it's called.
5:04 PM
I know in Substitutes post he uses this: void SetChibi(AShooterPlayerController* playerController, int value) { AShooterCharacter* myPawn = static_cast<AShooterCharacter*>(playerController->PawnField()); UPrimalPlayerData* data = myPawn->GetPlayerData(); UFunction* bpFunction = myPawn->FindFunctionChecked(FName(L"SetNumChibiLevelUps", EFindName::FNAME_Find, false)); int params[] = { value }; myPawn->ProcessEvent(bpFunction, &params); (reinterpret_cast<UPrimalPlayerDataBP_Base*>(data))->NumChibiLevelUpsData = value; /* yolo */ data->SavePlayerData(ArkApi::GetApiUtils().GetWorld()); } I'm just not sure what this part in the middle is doing. UFunction* bpFunction = myPawn->FindFunctionChecked(FName(L"SetNumChibiLevelUps", EFindName::FNAME_Find, false)); int params[] = { value }; myPawn->ProcessEvent(bpFunction, &params); (edited)
Avatar
That is calling the BP function "SetNumChibiLevelups" to set chibi levels. Is there any bp function in UPrimalPlayerDataBP_Base to get ascension data or just a variable?
Avatar
🐨Dream Doctor🦘 10/4/2020 5:07 PM
No it's just a variable.
5:08 PM
5:11 PM
Actually there is no real function SetNumChibiLevelUps, it's just setting a variable.
Avatar
Huh?
5:13 PM
That is this line: (reinterpret_cast<UPrimalPlayerDataBP_Base*>(data))->NumChibiLevelUpsData = value; /* yolo */ (edited)
5:13 PM
Or should be
Avatar
🐨Dream Doctor🦘 10/4/2020 5:24 PM
Yes, but I'm wondering why reading the NumChibiLevelUps variable is done one way and writing it another way. (edited)
Avatar
You'd need to ask Substitute directly since he's the boss of BP stuff
Avatar
🐨Dream Doctor🦘 10/4/2020 5:27 PM
Sorry, that line is setting it.
Avatar
I know little about getting fields, I know how to call functions but that's it
Avatar
@🐨Dream Doctor🦘 I’ll look at your issue
7:16 PM
I do have a good solution that was accepted to the api though
7:17 PM
If you update your api (if you’re not on latest) there is a Get/Set on UProperty*
7:17 PM
And a FindProperty on UObject*
Avatar
Yeah, the downside is everyone who wants to use that plugin need the new API version as it has a new cpp source file
Avatar
It’s like 15 lines, so worst case (edited)
7:56 PM
You could just implement it into your plugin directly
Avatar
🐨Dream Doctor🦘 10/5/2020 1:14 AM
Thank you @substitute . Any advice you could offer would be appreciated.
Avatar
@🐨Dream Doctor🦘
3:06 AM
UProperty* prop = data->FindProperty(FName(L"NumChibiLevelUpsData", EFindName::FNAME_Find, false)); if (!prop) return; prop->Set<int>(data, value);
3:07 AM
is how I set the property directly using my added-in BP stuff (edited)
3:07 AM
to read you'd just do
3:07 AM
prop->Get<int>(data);
3:07 AM
where data is UPrimalPlayerData* data = myPawn->GetPlayerData(); (edited)
3:08 AM
if you don't want to update API
3:08 AM
template<typename T> T Get(UObject* object) { if (!object->StaticClass()->HasProperty(this)) throw std::invalid_argument("Object does not contain this property."); if (sizeof(T) != this->ElementSizeField()) throw std::invalid_argument("Expected size does not match property size."); return *((T*)(object + this->Offset_InternalField())); } template<typename T> void Set(UObject* object, T value) { if (!object->StaticClass()->HasProperty(this)) throw std::invalid_argument("Object does not contain this property."); if (sizeof(T) != this->ElementSizeField()) throw std::invalid_argument("Expected size does not match property size."); * ((T*)(object + this->Offset_InternalField())) = value; }
3:08 AM
are for get/set
3:08 AM
and for FindProperty
3:09 AM
UProperty* UObject::FindProperty(FName name) { for (UProperty* Property = this->ClassField()->PropertyLinkField(); Property = Property->PropertyLinkNextField();) if (Property->NameField().Compare(&name) == 0) return Property; return nullptr; }
Avatar
🐨Dream Doctor🦘 10/5/2020 3:11 AM
Awesome! Thank you. I'll give that a go asap.
Avatar
🐨Dream Doctor🦘 10/5/2020 7:55 AM
@substitute Unfortunately I'm not able to get any of this to work without an instant crash. I tried running your example instead of my own code, and I get the same crash. This is the example of yours I'm trying.
Avatar
Do you have a crash stack?
Avatar
🐨Dream Doctor🦘 10/5/2020 7:57 AM
I downloaded and built the API from https://github.com/Michidu/ARK-Server-API, and I can see it includes your merge.
Avatar
Do you replace the api dll on your server with the new one as well?
Avatar
🐨Dream Doctor🦘 10/5/2020 7:58 AM
Yes, I replaced version.dll with the new one.
Avatar
Any crash stack?
7:59 AM
If you attach debugger you should get
Avatar
🐨Dream Doctor🦘 10/5/2020 8:00 AM
Avatar
Looks like get player data is crashing
8:02 AM
Have you tried only getting player data and doing nothing else
8:02 AM
See if that crashes
Avatar
🐨Dream Doctor🦘 10/5/2020 8:05 AM
8:06 AM
I'll try with just GetPlayerData.
8:11 AM
Yes this crashes at the same point as above.
Avatar
check if myPawn is null
Avatar
🐨Dream Doctor🦘 10/5/2020 8:21 AM
Yep myPawn is null.
8:23 AM
So maybe because I'm doing this in AShooterGameMode_HandleNewPlayer which runs before the player spawns?
8:25 AM
Actually that function gives me AShooterCharacter, so I'll try that.
Avatar
🐨Dream Doctor🦘 10/5/2020 8:33 AM
Ok that works. Thank you! I wonder why the cast doesn't work then? Anyway, I have one more question. In your code you do prop->Set<int>(data, value); as you're setting a single int. I'm trying to get a TArray. I'm not sure how that works here? (edited)
Avatar
prop->Get<TArray<type>>(data);
8:34 AM
^that is how
Avatar
🐨Dream Doctor🦘 10/5/2020 8:41 AM
Thank you so, so much!
Avatar
you got it?
Avatar
🐨Dream Doctor🦘 10/5/2020 8:44 AM
I think so, yes. 🙂
Avatar
🐨Dream Doctor🦘 10/5/2020 9:02 AM
Yep it works perfectly. Although I'd love to know why WC chose an array of floats when the possible values are forever limited to 0, 1, 2 or 3 lol Anyway thanks so much again Substitute!
Avatar
np!
Avatar
🐨Dream Doctor🦘 10/5/2020 4:41 PM
I'm trying to use the Permissions functionality for the first time... I've included the Permissions files, and my plugin builds fine, but when the server starts it throws an error when loading my plugin Failed to load plugin - Error code 126. As soon as I remove the include for permissions and rebuild, the plugin loads normally again. Anyone know what I might have done wrong? (edited)
Avatar
Is your plugin loading before Permissions (by alphabetical order)?
Avatar
🐨Dream Doctor🦘 10/5/2020 4:46 PM
Yes
Avatar
If so, go to Project Settings/Linker/Input/Delay Loaded DLLs and write "Permissions.dll" (if using visual studio)
4:47 PM
Avatar
🐨Dream Doctor🦘 10/5/2020 4:48 PM
That fixed it! Thank you Pelayori!!
Avatar
No worries
4:49 PM
I also got that issue the first time linking Permissions 😛
Avatar
Deleted User 10/6/2020 12:56 AM
Are there any plugins that are open source created? I'm trying to learn C++ and it would be very usefull for me to see what aspects are used in the making of plugins
Avatar
C++ Plugins for Ark Server API: https://github.com/Michidu/ARK-Server-API/ - ownprox/ArkServerApi
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
9:54 PM
9:54 PM
9:54 PM
9:54 PM
❤️
Avatar
Awesome!
Avatar
Hi all - is there a function in the API to just execute a generic console command? I'm just asking as I have an API which will send commands and we just want to execute whatever is passed along - am I barking up the wrong tree?
Avatar
use rcon ?
Avatar
is that something we can trigger from C++?
Avatar
you have an api whoch sends commands , from what ?
Avatar
🐨Dream Doctor🦘 10/8/2020 5:40 AM
I wonder if there would be any chance of the the leaders of this amazing project doing a release to fix the version numbering issue. Users get very confused when you tell them they need version 3.5, but the latest on the website is 3.4. Pretty please? 🙂
Avatar
you have an api whoch sends commands , from what ?
@Frost® Hi Frost, my bad for missing this - we have a web server which manages external data, and my plugin will query this web server for the server commands to run - I have everything else in place already but I haven't actually got the bit that runs the commands haha
5:18 PM
I found an example which was admincheat Broadcast <Message>, which is an example of a command we might want to run (edited)
Avatar
try use a web call to and via rcon and send any commands with that plugin (edited)
Avatar
Deleted User 10/8/2020 9:14 PM
for a question about a plugin I'm trying to develop, is there any channel that I can send this question to?
Avatar
🐨Dream Doctor🦘 10/9/2020 9:24 AM
Does anyone have any simple examples of multithreading in a plugin? Or any tips, tricks or things to watch out for?
Avatar
@🐨Dream Doctor🦘
9:30 AM
You need to watch out for race conditions (use a mutex to protect vulnerable data)
9:30 AM
You also can’t run any game functions outside the game thread
9:31 AM
I’m interested myself in finding a way to spin up game threads in ue4 to mitigate #2
Avatar
🐨Dream Doctor🦘 10/9/2020 3:10 PM
Thanks @substitute.
Avatar
@🐨Dream Doctor🦘 with multithreading it's super important to protect against race conditions, but only when you have to, as otherwise you knock out a lot of the boost you'd get as you'd have idle threads - C++ has some great tools to do with parallelism, including shared-memory parallelism such as what you'd be doing with the multithreading
5:14 PM
I used a library called OpenMP which is great
ThankYou 1
💯 1
Avatar
🐨Dream Doctor🦘 10/10/2020 5:33 AM
Thanks @Ashington.
5:34 AM
Another question. Does anyone happen to know the hooks that would be involved in the process of a players transferring out of a server? Something where I could interrupt the process before they leave the server?
5:39 AM
Or maybe the function involved in fetching the list of available clustered servers?
Avatar
Server fetching is client sided @🐨Dream Doctor🦘
Avatar
🐨Dream Doctor🦘 10/10/2020 7:17 AM
Ok, thanks substitute. I'm sure there's some hooks we can use to get involved in some part of the transferring process, and I know Lethal does some work in that area.
Avatar
🐨Dream Doctor🦘 10/10/2020 10:25 AM
I have an annoying issue. I'm using the following hook: bool Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* NewPlayer, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) I'm trying to run some checks (based on server rules) on AShooterCharacter as a player transfers in to this server from another server, and either do nothing and allow them to continue, or kick them at that point. When players try and connect to the server without transferring, then AShooterCharacter is null, so I kick them also as that doesn't meet the server rules. It all works fine except for a couple of annoying situations where the player already has a character on the server, but when they log in AShooterCharacter still returns null so they get kicked. This can happen, for example, if they are killed while offline, or if they die then log off without respawning. I'm, hoping that someone will know of some way I can determine if the player is transferring in from another server or not, or perhaps some other possible way around this? (edited)
Avatar
@🐨Dream Doctor🦘 might be able to check prelogin data
Avatar
🐨Dream Doctor🦘 10/10/2020 11:37 AM
I was hoping there was some way to determine if they were transferring in or not.
Avatar
try use a web call to and via rcon and send any commands with that plugin
Hi @Foppa, sorry for the tag - I'm not quite sure what this means, is there some sort of ssh protocol you're talking about where we can send commands to the server? I've been looking online for something along these lines but not quite sure what you mean
Avatar
@🐨Dream Doctor🦘 Try some of these Hook_AShooterGameMode_DownloadTransferredPlayer(AShooterGameMode* _this, AShooterPlayerController* NewPlayer) Hook_AShooterPlayerController_ServerRequestDownloadPlayerCharacter_Implementation(AShooterPlayerController* _this, FArkTributePlayerData DownloadedCharacter, int spawnPointID, int spawnRegionIndex) (edited)
1:01 PM
If you want to check AShooterCharacter it will be null unless spawned. And HandleNewPlayer almost never has valid Shooter Character at call but a few seconds later (edited)
Avatar
🐨Dream Doctor🦘 10/10/2020 1:02 PM
Amazing info! Thanks Pelayori!
Avatar
FArkTributePlayerData has some handy info you might want to take a look. You may be able to insert some custom data bytes when player uploads character (aka clicks transfer, maybe a function in gamemode or shooterplayercontroller), to make your checks easier
1:06 PM
I never messed with player data bytes, only dino and item datas
1:08 PM
If you don't want player to download character return before calling original func, I'd recommend doing in on the shooter controller because that way server doesn't get notified and it's just like player didn't request (maybe some failed to download message tho)
1:09 PM
Another way to check which server is the player transferring from is hooking the tribute player data creation and change UploadingServerMapName to some custom name, might have to try if it causes issues tho 😛
Avatar
🐨Dream Doctor🦘 10/10/2020 1:10 PM
Wow that's all really amazing stuff. Thanks so much.
Avatar
I found this hook: void Hook_AShooterPlayerController_ServerCharacterUploadWithItems_Start(AShooterPlayerController* _this, unsigned __int64 PlayerDataId, FArkTributePlayerData PlayerData) Then you'd return your copy of PlayerData with custom info inside. I'd do some Logging test to see if it prints the right info or not
Avatar
🐨Dream Doctor🦘 10/10/2020 2:27 PM
Yeah I've got a ton of things to try now. Thanks again.
Avatar
🐨Dream Doctor🦘 10/11/2020 10:18 AM
Can anyone help me work out how I get a bool from this?
Avatar
🐨Dream Doctor🦘 10/11/2020 10:27 AM
I think this is right? bool IsFirstSpawned(UPrimalPlayerData* myData) { FPrimalPlayerDataStruct* myDataStruct; myDataStruct = myData->MyDataField(); return myDataStruct->bFirstSpawned().Get(); } (edited)
Avatar
@🐨Dream Doctor🦘 just ()() should suffice for bitfields if I remember
10:42 AM
bool val = a->bFirstSpawned()(); (edited)
10:43 AM
it's weird syntax, but basically bFirstSpawned() returns BitFieldValue<bool, unsigned int>
10:43 AM
and () on BitFieldValue<T,J> is overridden to return the value of T (edited)
10:43 AM
RT operator()() const { return GetNativeBitField<RT, T>(parent_, field_name_); }
10:43 AM
(on BitFieldValue)
Avatar
🐨Dream Doctor🦘 10/11/2020 11:41 AM
Thanks @substitute . @Pelayori wrote the other day that And HandleNewPlayer almost never has valid Shooter Character at call but a few seconds later. How would I go about waiting those few seconds to grab ShooterCharacter without impacting performance? (edited)
Avatar
I use a DelayedExecute of 5-10 seconds, and it's usually valid at that point
Avatar
hey @Michidu is it easy to adjust the asm file (for version.dll) to work for a 32 bit application
6:51 PM
not the server api just working on something else
6:52 PM
involving runtime linking
Avatar
nm lol
7:37 PM
just changed the size to 4
7:37 PM
Avatar
Yeah pointer sizes are 4 bytes in x32
8:03 PM
x64 pointer sizes are 8 bytes
Avatar
🐨Dream Doctor🦘 10/12/2020 4:13 PM
@Pelayori I don't suppose you'd be willing to share a simple example of what your DelayedExecute looks like?
Avatar
@🐨Dream Doctor🦘 Create another function (I like to name them execJoin or handleJoin) and pass the controller and any other params you want to use
5:19 PM
Then API::Timer::Get().DelayExecute(&callback, 10, params_PC, params_IsFromLogin);
Avatar
🐨Dream Doctor🦘 10/13/2020 3:12 AM
Thanks so much @Pelayori .
Avatar
🐨Dream Doctor🦘 10/13/2020 11:17 AM
Does anyone know if we can completely delete a character from a server, short of actually removing their character file? I found AGameMode_RemoveConnectedPlayer but I'm not sure how that one works.
Avatar
that one won't remove the file tho, i'm pretty sure
Avatar
@🐨Dream Doctor🦘 AShooterGameMode::DeletePlayerData does what you want, it takes AShooterPlayerState as argument.
👍 2
Avatar
🐨Dream Doctor🦘 10/14/2020 11:15 AM
@Pelayori Thanks so much again!
Avatar
No worries
12:38 PM
If you need further help you can PM me 🙂
Avatar
someone knows how to remove all structures by name ?
Avatar
Get all actors and filter the structures maybe?
Avatar
Yes, use UGameplayStatics::GetAllActorsOfClass
3:20 PM
Note that running get all actors of class is intensive and may lag server while it's being executed (edited)
Avatar
Anyone having UVictoryCore related crashes? doesnt seem to be plugin related
Avatar
Crash stack?
Avatar
S+ issues @Haragon
8:03 PM
It's serverwide, there are issues with S+ item collector, agreggator, hatchery...
Avatar
🐨Dream Doctor🦘 10/15/2020 4:33 PM
Can anyone tell me, is this the user's steam ID? Or something else? In the dev kit their unique id is their steam id. What's the correct way to access this?
Avatar
Steam id has FUniqueNetIdSteam, so I guess that one is UE4 id. To get FUniqueNetId to UniqueId->Get()
4:39 PM
But I think FUniqueNetId is emtpy in API
4:40 PM
It's also empty in IDA, so no clue
Avatar
🐨Dream Doctor🦘 10/15/2020 4:40 PM
Yeah I was able to get a uint64 out of it but it wasn't the steam id and it wasn't the player id either.
Avatar
It’s their steam but also not
4:44 PM
It’s their unique id
4:44 PM
For steam it’s steam
4:44 PM
For epic it’s epic
Avatar
🐨Dream Doctor🦘 10/16/2020 8:15 AM
@substitute So you're saying that is their steam id? Do you know how I can get it from what is provided there? What I'm getting isn't a steam ID or player ID or anything.
Avatar
🐨Dream Doctor🦘 10/16/2020 10:07 AM
So I found the source for the class FUniqueNetId in the unreal engine source code on Github. It has a function ToString() that provides an FString of the Steam ID when used on the Steam platform. Unfortunately that whole class seems to be missing from the dev kit, and instead we have struct FUniqueNetId : IOnlinePlatformData { }; struct FUniqueNetIdSteam : FUniqueNetId { unsigned __int64 UniqueNetId; // Functions int GetSize() { return NativeCall<int>(this, "FUniqueNetIdSteam.GetSize"); } FString* ToString(FString* result) { return NativeCall<FString*, FString*>(this, "FUniqueNetIdSteam.ToString", result); } bool IsValid() { return NativeCall<bool>(this, "FUniqueNetIdSteam.IsValid"); } FString* ToDebugString(FString* result) { return NativeCall<FString*, FString*>(this, "FUniqueNetIdSteam.ToDebugString", result); } }; And so I'm really confused about how to get that Fstring. (edited)
Avatar
I'll look up in IDA if that ToString function exists in ark binaries later
Avatar
@🐨Dream Doctor🦘 Only these functions exist for FUniqueNetId
Avatar
🐨Dream Doctor🦘 10/16/2020 3:19 PM
Ok, thanks so much for that @Pelayori . You're the best.
3:21 PM
So the child class FUniqueNetIdSteam adds the actual steam id.
Avatar
Yes, if you have FUniqueNetId you can cast it to FUniqueNetIdSteam I think (edited)
Avatar
🐨Dream Doctor🦘 10/16/2020 3:24 PM
Well I do have FUniqueNetId, but I'm not sure how to cast it.
Avatar
Not sure if this would work, but you need to cast a pointer: static_cast<FUniqueNetIdSteam*>(&id);
Avatar
🐨Dream Doctor🦘 10/16/2020 3:51 PM
Unfortunately that gives me an invalid type conversion error. void Hook_AGameMode_PreLogin(AGameMode* _this, FString* Options, FString* Address, TSharedPtr<FUniqueNetId, 0>* UniqueId, FString* authToken, FString* ErrorMessage) { FUniqueNetId* netid = UniqueId->Get(); FUniqueNetIdSteam* steamid = static_cast<FUniqueNetIdSteam*>(&netid); AGameMode_PreLogin_original(_this, Options, Address, UniqueId, authToken, ErrorMessage); } (edited)
Avatar
If you already have FUniqueNetId* pointer you'd just need FUniqueNetIdSteam* steamid = static_cast<FUniqueNetIdSteam*>(netid);
Avatar
🐨Dream Doctor🦘 10/17/2020 7:44 AM
Has anyone worked with FUniqueNetIdSteam? This gives me an empty string every time, even though an FUniqueNetIdSteam->IsValid() check returns true. void Hook_AGameMode_PreLogin(AGameMode* _this, FString* Options, FString* Address, TSharedPtr<FUniqueNetId, 0>* UniqueId, FString* authToken, FString* ErrorMessage) { FUniqueNetIdSteam* SteamId; FString SteamString; SteamId = static_cast<FUniqueNetIdSteam*>(UniqueId->Get()); SteamId->ToString(&SteamString); LogDebug("Hook_AGameMode_PreLogin -> Steam ID: " + SteamString.ToString()); AGameMode_PreLogin_original(_this, Options, Address, UniqueId, authToken, ErrorMessage); } (edited)
Avatar
🐨Dream Doctor🦘 10/21/2020 5:36 PM
If I wanted to hook into BeginPlay for a specific dino in a plugin, is there a proper way to do that in the api? Obviously I could hook Hook_APrimalDinoCharacter_BeginPlay and then check the supplied reference to see if it was the dino I wanted, but that seems inefficient. Is there a better way? (edited)
Avatar
If you are not doing intense loops or function, it won't notice (edited)
7:16 PM
A simple equals does not take any time
Avatar
🐨Dream Doctor🦘 10/22/2020 4:52 AM
Thanks @Pelayori. My next question is, if I want to work with a specific dino class, I can see none of those definitions are included in the dev kit. Or any specific classes really. What is the method people use to work with specific classes?
4:55 AM
For example, if there's a specific class of dino I want to work with, with a class-specific variable I want to use.
Avatar
Specific classes?
7:36 AM
What do you mean by that
Avatar
🐨Dream Doctor🦘 10/22/2020 9:29 AM
Well, for example, I'm easily able to work with the PrimalDinoCharacter class, as it's defined in the api. Like this for example: APrimalDinoCharacter* mydino; float myval = mydino->GetCharacterStatusComponent()->FoodConsumptionMultiplierField(); But what if I want to deal with a specific variable that exists in the child class Ankylo_Character_BP_C that doesn't exist in the parent classes that are defined in the api? (edited)
Avatar
You have various options, I think ark has a built in function to get properties, or you can use Subtitute's Set/Get from the new api fork, but you'd need the api version (or include it into your project
10:04 AM
But not with the normal fields of base PrimalDinoCharacter (edited)
Avatar
🐨Dream Doctor🦘 10/22/2020 10:32 AM
Is it possible to get hold of the definition for that class from somewhere, and include it in my project, and do it that way?
Avatar
Which class?
Avatar
🐨Dream Doctor🦘 10/22/2020 11:22 AM
Whichever one I'm trying to work with. Ankylo_Character_BP_C for example.
Avatar
You could create a struct and add there the function to get/set property but there is nothing like a IsA function for bp classes
12:24 PM
You could also define a struct, named Ankylo_Character inherited from PrimalDinoCharacter, and you might be able to cast to it, and add the get set funcs
12:24 PM
Several ways to approach this
12:25 PM
But you would have to check manually (parsing by name, parsing bp path to check if it's Ankylo) and do separate routes for each one you want to modify. Might be other ways but those are the ones I would take
Avatar
🐨Dream Doctor🦘 10/22/2020 2:07 PM
So am I right in saying that the api is taken from the main exe, which only contains the highest level classes like PrimalDinoCharacter, but because the majority of the content is in separate blueprint files, those are not in the api?
Avatar
Yes
2:22 PM
the exe only contains C++ classes
2:23 PM
Substitute and I were talking about a possible Blueprint functions hooking in the API that we could do, not being done now but I think would be a nice addition and very helpful (edited)
Avatar
🐨Dream Doctor🦘 10/22/2020 2:36 PM
Yes I think it would open up a huge amount of new possibilities for plugins.
Avatar
Somethings may be on the virtual function table of a class
5:10 PM
But that isn’t trivially reverse engineered
5:11 PM
API can only dump what is in PDB, which is what is in the exe
5:11 PM
Anything dynamic can’t be dumped by the API right now
5:11 PM
But you can use UE4 reflection to mess with dynamic content. (edited)
5:13 PM
Additionally I have written a GObjects scanner that can find any arbitrary name from all loaded objects
5:13 PM
I would use this sparingly though as it’s basically doing GAAOC but manually
Avatar
@Pelayori
5:24 PM
IsA may be a function on the vftbl
5:25 PM
So you might be able to get away calling it on any object using a function pointer
Avatar
Yeah but you'd need the uclass pointer from the bp class
Avatar
Nah you don’t
5:28 PM
Well
5:28 PM
Yeah nah
5:28 PM
Unless you’re trying to use one that isn’t provided or you don’t have a ref to
5:28 PM
Though gobjects scanner can find the cdo
Avatar
You could bpload class too I think
Avatar
Yep
5:29 PM
Both have issues though
5:29 PM
BPLoad class hitches the server as it loads the class
5:29 PM
If the class is big enough
5:30 PM
I would precache instances ahead of time
Avatar
Yeah I was thinking of caching it
Avatar
Problem is concerning the GC
5:30 PM
Don’t want your cached object to be collected
5:30 PM
Might be able to push a +1 ref count to the object
5:30 PM
As GC usually don’t collect until ref count = 0
Avatar
If you add it to an array does it get cleared?
Avatar
Not sure
Avatar
It would get destroyed if reference is not stored or kept track of
Avatar
🐨Dream Doctor🦘 10/23/2020 4:33 AM
Someone asked me the other day what the best way to get started with plugins was. I gave them this Discord, and the api website obviously. I was thinking something that might be really useful is a boilerplate project. Even better, a boilerplate creator.... "Name of your project?"...."Location of your API source?".... "Here you go". (edited)
Avatar
@🐨Dream Doctor🦘
Avatar
🐨Dream Doctor🦘 10/23/2020 4:37 AM
Ha! I should have known you were already ahead @substitute 🙂
4:41 AM
Beautiful code too.
4:42 AM
Something that never ceases to amaze me is just how different each person's coding styles can be in C++, much more than any other language I've worked with.
Avatar
🐨Dream Doctor🦘 10/23/2020 8:24 AM
So how do we get the class of an actor in the API? UE4 docs say GetClass(), but that doesn't seem to exist for us?
Avatar
GetPrivateStaticClass
8:26 AM
AActor::GetPrivateStaticClass()
Avatar
🐨Dream Doctor🦘 10/23/2020 8:28 AM
TY! 🙂
Avatar
There are also a lot of classes that have that function but are not even defined in api too (edited)
10:10 AM
Like APrimalStructureExplosive aka C4
Avatar
🐨Dream Doctor🦘 10/23/2020 4:42 PM
I'm struggling to get what I'm looking for in terms of getting the classname. I've tried a few different thing in UClass, but I just keep getting a string PrimalDinoCharacter rather than the actual child class. void Hook_APrimalDinoCharacter_BeginPlay(APrimalDinoCharacter* _this) { UClass* myclass = _this->GetPrivateStaticClass(); FString ClassString{}; myclass->GetDescription(&ClassString); std::cout << "BeginPlay Class: " << std::string(ClassString.ToString()) << std::endl; APrimalDinoCharacter_BeginPlay_original(_this); } (edited)
4:48 PM
Output: BeginPlay Class: PrimalDinoCharacter
Avatar
Well, getprivatestaticclass returns the C++ class
4:49 PM
And it's a static function
4:49 PM
So you don't need object ref to call it
4:50 PM
If you want the Blueprint path (like item/dino spawn paths for commands) you can use this function: FString GetBlueprint(UObjectBase* object) { if (object != nullptr && object->ClassField() != nullptr) { FString path_name; object->ClassField()->GetDefaultObject(true)->GetFullName(&path_name, nullptr); if (int find_index = 0; path_name.FindChar(' ', find_index)) { path_name = "Blueprint'" + path_name.Mid(find_index + 1, path_name.Len() - (find_index + (path_name.EndsWith( "_C", ESearchCase:: CaseSensitive) ? 3 : 1))) + "'"; return path_name.Replace(L"Default__", L"", ESearchCase::CaseSensitive); } } return FString(""); }
4:51 PM
From Michidu^^
Avatar
🐨Dream Doctor🦘 10/23/2020 4:54 PM
Thank you again 🙂
4:55 PM
I think that's a tip that should go in one of the tutorial channels. (edited)
Avatar
#【🔷】ᴘʟᴜɢɪɴ-ʀᴇꜰꜱ
Avatar
🐨Dream Doctor🦘 10/24/2020 5:27 AM
Thank you @Pelayori . That's exactly what I was looking for. (edited)
Avatar
🐨Dream Doctor🦘 10/24/2020 8:34 AM
Did someone mention they were working on a wiki project for the api at some point?
Avatar
Does anyone know a way of a way to execute commands on non-admin players? I've been using AShooterPlayerController::ConsoleCommand with no luck
Avatar
Hi all, was talking to @GSH | MrOwlSky earlier today and he suggested me posting this concept idea here: Have you as the api plugin community considered allowing more people to work on the core? I think that would make api plugins a lot more resilient towards future ark updates and added functionality: like for example stacktrace logging. I’ve been working on making docker report stack traces to help making debugging easier, but this seems easier said then done.
2:56 AM
Regardless of the concept idea, i would love to talk to anyone that has idea’s on how to make stacktraces easily available via logging (edited)
Avatar
@AnotherMax the API is open source
3:06 AM
anyone can make a fork, add their changes, and submit a PR
Avatar
Alright! Because of the download on the website i was under the impression that it was more restricted
3:13 AM
So would that mean that someone like me is able to submit a pr where it catches all errors that happen in plugins and write that to a file? Or is that architecturally hard to achieve?
Avatar
I mean you could yeah
5:33 AM
Though I would consider making that an opt-in feature
Avatar
🐨Dream Doctor🦘 10/25/2020 5:53 AM
I'm trying to work out how to determine if a player has a particular buff or not. I've gotten this far, but I'm not sure how to specify the specific class. The ?? in the example is supposed to be the buff class, but in what format do I provide it? if(TestPrimalChar->HasBuff(TSubclassOf<APrimalBuff> ?? )) (edited)
Avatar
Getting buffs isn’t trivial atm
6:08 AM
You’re gonna have to do a lot of research for that one
Avatar
🐨Dream Doctor🦘 10/25/2020 6:15 AM
Hmm that doesn't sound good lol. I've looked through all the posts on this discord that mention buff and I can see a lot of questions but no clear answers. Any suggestions on where to start?
Avatar
You need either a TSubClassOf var, or you could do two more things. Feed it an UClass* or Define a TSubCkassOf<APrimalBuff>, and set it's member var "UClass" To an UClass of the buff class you wanna check @🐨Dream Doctor🦘
Avatar
🐨Dream Doctor🦘 10/25/2020 10:59 AM
@Pelayori The part I'm struggling with is how to get from a blueprint path for a particular buff class, say Blueprint'/Game/Aberration/CoreBlueprints/Buffs/Buff_Radiation_Sickness.Buff_Radiation_Sickness' to a UClass for that buff?
Avatar
UVictoryCore::BPLoadClass
Avatar
🐨Dream Doctor🦘 10/26/2020 9:12 AM
Thanks @Pelayori. Now I'm trying to do the reverse, get a string of the blueprint path of the class of a buff. Here is the test I'm using, but the server crashes as soon as I attempt to do anything with the UClass. void PrintBuffs(AShooterCharacter* MyChar) { TArray<APrimalBuff*> MyBuffs{}; if (MyChar != nullptr) { MyChar->GetAllBuffs(&MyBuffs); std::cout << "Got total buffs: " << MyBuffs.Num() << std::endl; for (auto& Element : MyBuffs) { UClass* BuffClass = Element->StaticClass(); if (BuffClass != nullptr) { UObject* MyCDO = BuffClass->ClassDefaultObjectField(); // <-- THIS CRASHES FString DetailedInfo{}; BuffClass->GetDetailedInfo(&DetailedInfo); // <-- THIS ALSO CRASHES } } } } (edited)
Avatar
Use UClass::GetDefaultObject(true)
9:13 AM
@🐨Dream Doctor🦘
9:14 AM
Also, for logging you could use the included logger in API
9:15 AM
In load: Log::Get().Init("Plugin Name") The to use it Log::GetLog()->info("msg")
Avatar
🐨Dream Doctor🦘 10/26/2020 9:23 AM
Unfortunately UClass::GetDefaultObject(true) crashes the server as well. void PrintBuffs(AShooterCharacter* MyChar) { TArray<APrimalBuff*> MyBuffs{}; if (MyChar != nullptr) { MyChar->GetAllBuffs(&MyBuffs); std::cout << "Got total buffs: " << MyBuffs.Num() << std::endl; for (auto& Element : MyBuffs) { UClass* BuffClass = Element->StaticClass(); if (BuffClass != nullptr) { UObject* MyCDO = BuffClass->GetDefaultObject(true); } } } }
9:29 AM
Fatal error! VERSION: 315.4 ShooterGameServer.exe!UClass::GetDefaultObject() (0x00007ff679a387f6) + 0 bytes [f:\build\live315\engine\source\runtime\coreuobject\public\uobject\class.h:1945] ExtinctionBosses.dll!PrintBuffs() (0x00007ff9bbd92ecf) + 61 bytes [C:\Users\lachl\source\repos\ExtinctionBosses\Plugin\init.cpp:124] ExtinctionBosses.dll!PrintPlayerBuffs() (0x00007ff9bbd93072) + 8 bytes [C:\Users\lachl\source\repos\ExtinctionBosses\Plugin\init.cpp:192] VERSION.dll!ArkApi::Commands::CheckCommands<ArkApi::Commands::Command<void __cdecl(AShooterPlayerController *,FString *,enum EChatSendMode::Type)>,AShooterPlayerController * &,FString * &,enum EChatSendMode::Type &>() (0x00007ff97e336f26) + 84 bytes [I:\ARKServerAPI\version\Core\Private\Commands.h:115] VERSION.dll!ArkApi::Hook_AShooterPlayerController_ServerSendChatMessage_Impl() (0x00007ff97e334203) + 0 bytes [I:\ARKServerAPI\version\Core\Private\Ark\HooksImpl.cpp:107] ShooterGameServer.exe!AShooterPlayerController::execServerSendChatMessage() (0x00007ff67ad73fa7) + 343 bytes [f:\build\live315\projects\shootergame\source\shootergame\classes\shooterplayercontroller.h:309]
Avatar
Something wrong with the class then
Avatar
🐨Dream Doctor🦘 10/26/2020 12:37 PM
It's very strange. With a character that has no visible buffs, even if I only run the the following, it works the first time I run it, and then second time it crashes the server. int BuffType = Element->GetBuffType(); std::cout << "Buff Type: " << BuffType << std::endl;
12:37 PM
( run from a chat box command )
12:39 PM
The first time it's run, it shows that there is a single buff, and shows a type of -2. Then the second time its run it still shows there is a single buff, but when it gets to GetBuffType() it crashes the server.
Avatar
Buffs are not a thing we can work with very well (edited)
Avatar
🐨Dream Doctor🦘 10/26/2020 1:37 PM
Well I guess I'll have to put that project on the backburner for now. Thanks for your help Pelayori.
Avatar
No worries
Avatar
@🐨Dream Doctor🦘 There may be one thing, did you try to load the plugin with a PdbConfig.json? APrimalBuff might not be right included
3:02 PM
{ "structures":{ "APrimalBuff" } }
Avatar
🐨Dream Doctor🦘 10/26/2020 3:07 PM
@Pelayori I'm sure I've seen that file before but I can't see it anywhere now. Where does it normally go?
3:08 PM
I have this config.json in the same directory as version.dll which looks similar to that. (edited)
Avatar
The PdbConfig.json goes in the folder where your plugin's dll goes
3:09 PM
It is used to inject structs that are not in the API by default, so hooks, functions, etc get called for that class (edited)
Avatar
🐨Dream Doctor🦘 10/26/2020 3:12 PM
Wow, I had no idea. I think that's another thing that really ought to go in the tutorials or examples channel. Thank you 🙂
Avatar
🐨Dream Doctor🦘 10/26/2020 3:31 PM
Looks like that stopped it crashing when just printing the buff type int. Thank you so much @Pelayori ! I'll have to add some more things back in tomorrow and see what happens. Thanks again.
Avatar
Yeah, I didn't remember buffs weren't added to default api
Avatar
🐨Dream Doctor🦘 10/26/2020 3:40 PM
I couldn't wait lol Looks like it works now. Thanks again.
thumbs 2
Avatar
Anyone able to get ClientGivenIP to work
5:57 PM
to pull ip address of person connecting
5:57 PM
couldn't get it working
5:58 PM
if anyone wants to pull someone's ip address
5:58 PM
im just doing this, and it works
5:58 PM
auto NetConnection = PlayerController->GetNetConnection(); auto IP = reinterpret_cast<FString*>(reinterpret_cast<char*>(NetConnection) + 0x341D8); Log::GetLog()->info("IP: {}", IP->ToString());
Avatar
idk why auto IP = *GetNativePointerField<FString*>(NetConnection, "UNetConnection.ClientGivenIP"); doesn't work, but above is a workaround for time being (edited)
Avatar
There is an api utils function to get player ip (edited)
6:21 PM
But it takes controller or steamid64 (don't remember now)
7:35 PM
i could only find one that gave steamid i must have missed it lol
7:36 PM
the game uses ClientGivenIP when getting ip for metrics so i tried using that and it was returning garbage, so i just did it by the offset
7:36 PM
i probably missed the other functions
Avatar
@dougy const FString& IPAddress = ArkApi::GetApiUtils().GetIPAddress(Player); Where Player is AShooterPlayerController* (edited)
8:55 PM
didnt see that
8:55 PM
thanks
Avatar
🐨Dream Doctor🦘 10/28/2020 8:33 AM
Anyone happen to know the hooks involved in handing out loot when dinos are killed? So for example, giving trophies to players when bosses are killed?
Avatar
Might be a bp function, there is one called DefeatedBoss
Avatar
🐨Dream Doctor🦘 10/29/2020 5:10 AM
I'm still struggling with these buffs. I'm trying to get the full BP class path, but I just keep getting /Script/ShooterGame.Default__PrimalBuff as the result from this. UClass* BuffClass = MyBuff->StaticClass(); UObject* CDO = BuffClass->GetDefaultObject(true); FString BuffBP{}; CDO->GetPathName(&BuffBP, nullptr); std::cout << "Buff BP: " << BuffBP.ToString() << std::endl; I can do the following and get part of the BP path for each buff, but not really enough. FString DetailedInfo{}; BuffClass->GetDetailedInfo(&DetailedInfo); std::cout << "Got Detailed Info: " << DetailedInfo.ToString() << std::endl;
Avatar
@🐨Dream Doctor🦘 MyBuff->StaticClass(); is likely returning the static class of the base type
5:29 AM
maybe
Avatar
🐨Dream Doctor🦘 10/29/2020 5:30 AM
Yeah, but I can't find any other method of getting the class.
Avatar
Try Getting bp of MyBuff directly
7:33 AM
But last time I took a look at buffs it was not parented correctly in the api
Avatar
🐨Dream Doctor🦘 10/29/2020 7:46 AM
I can't see any method for getting the bp directly from the buff itself. I've looked three times but I might be missing it. Is there any way we can fix the parenting in the api?
Avatar
Go to the definition of APrimalBuff and parents it to AActor
8:03 AM
So replace struct APrimalBuff put struct APrimalBuff : AActor
8:03 AM
@🐨Dream Doctor🦘
8:03 AM
I think it's AActor directly, didn't check in ida tho
Avatar
🐨Dream Doctor🦘 10/29/2020 8:03 AM
In the source of the api you mean?
Avatar
In the headers
8:04 AM
Headers are local to each plugin so you won't need a new version either
Avatar
🐨Dream Doctor🦘 10/29/2020 8:05 AM
Sorry for the stupid question but where would I find those? I'm not used to C++ in Visual Studio.
Avatar
Write APrimalBuff some where in your code, and press control + click APrimalBiff you just wrote
8:06 AM
That will bring you to the definition
Avatar
🐨Dream Doctor🦘 10/29/2020 8:07 AM
Oh right, got it. So even though that takes me to a file in the API source, it won't need a custom version of the API?
Avatar
No, headers are compiled with each plugin
8:11 AM
You can modify headers without a new api version
8:12 AM
I've introduced some custom funcs in Ark.h so I dont have to write them every time
Avatar
🐨Dream Doctor🦘 10/29/2020 8:17 AM
It wouldn't compile with AActor... it complained it wasn't defined. It compiled with UObject though, which is good enough to get ClassField(). And it works! Amazing. Thank you again Pelayori.
8:17 AM
How can we get some of these fixes and additions into the main api code. Is it possible?
Avatar
I fixed those no compile errors by adding said struct to Ark.h, since everything is defined in that header
Avatar
@🐨Dream Doctor🦘
9:03 AM
Have you considered finding the bp version of the function
9:04 AM
Also if you wish to add those fixes
9:04 AM
Just open a pr on the repo
Avatar
🐨Dream Doctor🦘 10/29/2020 11:35 AM
I'm not sure how that would work @substitute ?
Avatar
🐨Dream Doctor🦘 10/29/2020 12:00 PM
So I can now get the BP for a buff, list all of a players buffs with GetAllBuffs, check if a player has a specific buff with HasBuff, remove a buff with DeactivateBuff. The last thing I'd like to be able to do is add a buff. We use StaticAddBuff in the dev kit, which is available, but I first have to create a APrimalBuff with the correct class, which I'm not sure how to do?
Avatar
As the name states StaticAddBuff is a static function
12:11 PM
You can call it without any object ref
12:11 PM
But I don't think it's defined in api so you'd need ida for it
Avatar
🐨Dream Doctor🦘 10/29/2020 12:24 PM
OK yes it does work. You create a APrimalBuff, then you call StaticAddBuff and you specify a buff class in that call, along with a target character etc. (edited)
12:28 PM
UClass* BuffClass = UVictoryCore::BPLoadClass(&ClassString); APrimalBuff* TestBuff; TestBuff->StaticAddBuff(BuffClass, ShooterCharacter, nullptr, nullptr, true);
Avatar
@🐨Dream Doctor🦘 I wouldn't do it that way since that might not be very safe. Not sure tho but when I can get to pc I will send you the static add buff func
8:50 PM
Try APrimalBuff::StaticAddBuff
8:50 PM
Without a pointer
Avatar
@🐨Dream Doctor🦘
Avatar
🐨Dream Doctor🦘 10/30/2020 7:13 AM
Amazing. Thank you @Pelayori
Avatar
Does someone have a plugin to block certain locations from being built at? Like obilisks and ratholes?
Avatar
there's one
5:50 PM
i think it's called something protection
Avatar
Hmm I really need this since people are constantly blocking artefacts and obilisks
Avatar
SafeZones Source: Click Here Features: Prevent PVP in certain area's Prevent Building in certain area's Prevent Structure damage in certain area's Notifications on Entering and Leaving SafeZone area's Ability to restrict players from...
Avatar
🐨Dream Doctor🦘 11/3/2020 9:06 AM
What do I need to do in order to be able to post a free plugin on the API website?
Avatar
Sign up
9:10 AM
Post it (edited)
9:10 AM
Have it get approved
9:10 AM
You might need someone to give a rank I’m not 100% if I remember
Avatar
🐨Dream Doctor🦘 11/3/2020 9:22 AM
I've been a member on the site for years. But it says You have insufficient privileges to post threads here. if I try and post something to the plugins section.
Avatar
One of the staff have to give you a developer role on the forums to post stuff.
Avatar
🐨Dream Doctor🦘 11/4/2020 8:24 AM
Yeah I've been asking for two days but seems they must be on holiday or something lol
Avatar
You can pm Michidu or any other staff, but they are kinda busy lately
Avatar
🐨Dream Doctor🦘 11/4/2020 11:29 AM
Yeah I did that already. I'll just have to be patient 🙂
Avatar
Does anyone know how to modify the cooldown of the cryogenic chamber?
Avatar
@Codeboy It's a buff, so you could hook the add buff function, and change the return's APrimalBuff* deactivation after time to what you want
2:34 PM
Also, if you are going to work with buffs, download latest api source since it has a correction in buff's definition (edited)
Avatar
🐨Dream Doctor🦘 11/4/2020 2:36 PM
@Pelayori Oh! Your pr was accepted. Awesome!
Avatar
Yeah 😛
Avatar
Hi all, anyone know how to run RCON commands using the ARK API?
Avatar
You can include a RCON library into your plugin, as I believe you can get rcon password from the server, as well as port (edited)
Avatar
noice, thanks, can we run ordinary console commands as well?
9:45 PM
can't find a way to do it on the API and not sure if I'm blind :/
Avatar
You mean like cheat commands?
9:51 PM
You can do so with AShooterPlayerController::ConsoleCommand
Avatar
oooooooooooo
12:01 AM
will have a look and get back to you @Pelayori
Avatar
@Pelayori thank you 🙂
Avatar
🐨Dream Doctor🦘 11/5/2020 12:46 PM
I still haven't heard anything from the api website about permissions to post a plugin after three days now. I've tried a public message, Michidu and Foppa. Does anyone else know someone I might try contacting?
Avatar
You might want to talk to @GSH | MrOwlSky too, he might be able to give it to you
1:35 PM
@🐨Dream Doctor🦘
Avatar
Anyone know how i might go about opening the steam browser in ark to a specified URL from a plugin?
Avatar
You can't
4:44 PM
That function is client sided
Avatar
A mod could do it
4:44 PM
Maybe
Avatar
nm, ill just try to open with default system browser
4:45 PM
oh, wait
4:45 PM
i understand the issue lol
Avatar
All open url functions are client sided
Avatar
You'd need a mod to send the client function from
4:46 PM
With some kind of buff controlled by the plugin (edited)
Avatar
many different times ive wanted a mod to execute commands from plugin, or load a few assets
4:47 PM
but i dont really like mods, especially now that they exclude epic players
Avatar
Search for the bp function of your custom bp and call it
4:47 PM
It shouldn't be hard, I have a project in mind for it when I get time to do it
Avatar
a couple different ideas i had couple benefit from a plugin-mod interface (edited)
Avatar
@🐨Dream Doctor🦘 Send me a pm on the api site and i'll fix it for you
Avatar
🐨Dream Doctor🦘 11/6/2020 1:05 AM
Thank you @Foppa. I sent you one a day or two ago :)
Avatar
Then i have most likely already answered you 🙂
Avatar
🐨Dream Doctor🦘 11/6/2020 4:36 AM
Thank you. I'm active and ready to go now 🙂
Avatar
Does someone know why my server is not generating a SavedArks folder? Every time a player loggs out they lose their character. I can't out what's causing it
Avatar
Does someone know a plugin that reloads the Whitelist so we can add ppl to the whitelist while the server is online
Avatar
you dont need a plugin for that @YaBro
Avatar
how you do it @Khazex ?
10:51 PM
while the server is online the list is unneditable, even with the addtowhitelist command the very own server fails to update the list
Avatar
i use the AllowPlayerToJoinNoCheck <SteamID> It gives an error on the machine, but it adds him to the whitelist.
10:52 PM
and he can join without a restart
10:53 PM
@Hsilamot
Avatar
for me it doesn't work
Avatar
hm, works for me atleast (edited)
Avatar
i just did it, and i see no error, but checking PlayersJoinNoCheckList.txt the id wasn't added
10:54 PM
before at least the server would throw an error saying the file was read only
Avatar
i have to be ingame on the map for that
10:55 PM
used it this season alot (season on my server)^^ (edited)
Avatar
do you use windows server? and asm?
Avatar
windows server 2019 and asm
Avatar
i'm not sure what could be different then, i have a windows 10 machine and a server 2016 machine with asm on both and the fcommand has never worked for me
Avatar
hm, iam also not sure tbh @Hsilamot
Avatar
Does someone know a plugin that reloads the Whitelist so we can add ppl to the whitelist while the server is online
@YaBro this might work for you https://ark-server-api.com/index.php?resources/exclusivejoin.105/
This plugin will reload the PlayersExclusiveJoinList.txt on a given interval, defaults to 60 seconds. There is no interaction nor command needed. Configuration: { "Interval":60 } Commands: RCON & Console: ExclusiveJoin.Reload - This will...
Avatar
🐨Dream Doctor🦘 11/8/2020 5:21 AM
Does anyone happen to know the hook/function involved in sending broadcast messages? I thought it might be Broacast in AGameMode but it is not.
Avatar
🐨Dream Doctor🦘 11/8/2020 7:18 AM
Found it, in case anyone else ever wants it.... DECLARE_HOOK(UShooterCheatManager_Broadcast, void, UShooterCheatManager*, FString*);
Avatar
🐨Dream Doctor🦘 11/8/2020 7:39 AM
How do I get a reference to UShooterCheatManager?
Avatar
@🐨Dream Doctor🦘
7:41 AM
If you can’t find an easy way
7:41 AM
I can send you my GObjects scanning code
7:41 AM
And you can match by name
7:42 AM
GObjects = all objects
Avatar
🐨Dream Doctor🦘 11/8/2020 10:55 AM
Thanks @substitute . I can't seem to find any other way around it.
Avatar
@🐨Dream Doctor🦘 UShooterCheatManager is on ShooterPlayerController
12:39 PM
MyCheatManagerField() I think, then you need to cast it to the shooter cheat manager
Avatar
🐨Dream Doctor🦘 11/8/2020 12:41 PM
Oh I think I saw another post about that method from a year or so ago. Thanks Pelayori. That might be something worth adding to the Api Utils, like ArkApi::GetApiUtils().GetShooterCheatManager()
Avatar
That's the same as game state, you need to get it from UWorld and cast it, I have my own functions to make that easy in the headers
1:28 PM
inline AShooterGameState* GetGameState() { return static_cast<AShooterGameState*>(ArkApi::GetApiUtils().GetWorld()->GameStateField()); } inline UShooterCheatManager* GetCheatManagerByPC(AShooterPlayerController* SPC) { if (!SPC) return nullptr; UCheatManager* cheat = SPC->CheatManagerField(); if (cheat) { return static_cast<UShooterCheatManager*>(cheat); } return nullptr; } (edited)
Avatar
🐨Dream Doctor🦘 11/8/2020 3:02 PM
@Pelayori Could we use those functions above to add ArkApi::GetApiUtils().GetGameState and ArkApi::GetApiUtils().GetShooterCheatManager()? I think those kinds of helpers are really great for new starters and those less experienced members of the community.
Avatar
Yeah it could
Avatar
ArkServerAPI website down?
Avatar
It is
Avatar
Any update about site status ?
Avatar
It's reported, waiting info from Mich (edited)
👌 1
Avatar
ark website access error
Avatar
🐨Dream Doctor🦘 11/9/2020 7:58 AM
I noticed in a crash dump that involved another plugin that they were using Hook_UGameEngine_Tick(). Am I the only one who would be very, very nervous about using that?
Avatar
I wouldn't be
8:17 AM
I use UWorld tick and no issues
Avatar
After the update, did you encounter the BUG of playing BOSS in Wonderland, which caused the collective death of the characters?
Avatar
Yes, it's a known bug
Avatar
Now how do we solve this?
1:53 PM
I see that there is no official new patch release
1:54 PM
latest v316.18
Avatar
@Pelayori ?
Avatar
@Codeboy It is a WC problem, you should wait for an update from them
Avatar
has anyone produce a manual for the api? I figured out some of it from the source code but a lot of it doesn't tell me anything
Avatar
Hey, the following line crashes my Server: TArray<unsigned int> tribeID = alliance.MembersTribeIDField(); although alliance.MembersTribeIDField().Num() > 0 the second thing is true, in the case i testet, its 1, but why does my server crash when trying to get the array of the TribeIds?
2:28 PM
"alliance" is a FTribeAlliance btw, which i got from the FTribeData through TArray<FTribeAlliance> tribeAlliances = tribe->TribeAlliancesField();
2:29 PM
anyone knows why / how to fix it? 😄
Avatar
don't think you need to have unsigned int
Avatar
@Foppa but the MembersTribeIDField() returns a Array of unsigned int, so i need to or not? (edited)
Avatar
try without
Avatar
so TArray<int> tribeID = alliance.MembersTribeIDField(); ? that doesnt work, no conversion exists
Avatar
well do it the other way around then. TArray<int> tribeIDs tribeIDs.Add(alliance.MembersTribeIDField())
4:37 PM
or maybe it has to be unsigned as well
Avatar
ya doesnt work either
Avatar
can you show me more of the code?
Avatar
It'd be better if we could have what is the crash stack
Avatar
that too
Avatar
You can do so with AShooterPlayerController::ConsoleCommand
@Pelayori Hi Pelayori, I think this runs on the player, will there be problems with permissions etc depending on the server, or does the plugin execute the command regardless?
Avatar
where to find the crash stack? xDD or do you mean the crash message that pobs up at the crash?
Avatar
under logs
4:42 PM
you should have a crashstack file
Avatar
@Ashington It does execute, but some commands need admin perms explicit
Avatar
thanks for that! is there a resource where I can see what commands are allowed and what need admin approval?
Avatar
Sadly no, it is just a matter of testing
Avatar
no worries, thanks for that! one feature is that we want to execute commands at regular intervals, eg every minute or hour, even if there's nobody on the server, is there a way to get this to work with that or is it a case of finding another way
Avatar
You can use timers
Avatar
ill send the crash stack in #【💬】ᴅɪꜱᴄᴜꜱꜱɪᴏɴ-ʙ , cant send files here :/
Avatar
@Ashington
4:46 PM
Your best bet is to emulate the command’s behavior
Avatar
how do you mean @substitute?
Avatar
Do what the command does
4:54 PM
Yourself
4:55 PM
And call your function
Avatar
okay great thanks
Avatar
hey all, does anyone know how I can wait in a plugin? i.e. will it just wait and the rest of the server carry on or does the plugin run on the same thread as something else?
Avatar
It depends
Avatar
🐨Dream Doctor🦘 11/10/2020 1:39 AM
@Pelayori I'm sorry but this made me laugh. Fix it Pelayori! Fix it now! ;)
Avatar
Heh
3:01 PM
If I could i'd fix it
Avatar
hi guys, is there any documentation on ArkApi with descriptions of all functions?
Avatar
🐨Dream Doctor🦘 11/11/2020 7:09 AM
No there is not.
7:11 AM
You can find documentation for a lot of the content on the Unreal website with google searches, as its just UE4 code. However there's a lot that has been added by Wildcard as part of Ark, as well as a few custom things that have been added specifically for this API kit. (edited)
7:12 AM
I found some knowledge of the official ark dev kit helps a lot in understanding what you're looking at in the api. If you've never used the dev kit or Unreal Engine before, I think you'll have a very difficult time getting started. (edited)
Avatar
🐨Dream Doctor🦘 11/11/2020 8:58 AM
Has anyone every used Restinio (https://stiffstream.com/en/products/restinio.html) in a plugin? I can built basic projects with Restinio very easily, but when trying to use it in DLL projects, just including the library causes hundreds of compilation errors.
Avatar
🐨Dream Doctor🦘 11/11/2020 10:44 AM
Actually it seems that importing any http libs in a DLL file won't work. Is there something special I need to do to include libraries like that in a windows DLL?
Avatar
My plug-in USES Golang to write DLL
1:23 PM
Golang comes with HTTP Server
Avatar
@🐨Dream Doctor🦘 That kind of libraries depend on CMake, you won't be able to include as you'd include the ArkAPI for example (edited)
Avatar
🐨Dream Doctor🦘 11/11/2020 2:38 PM
The website says it can be used with Visual Studio and vcpkg, which is how it was installed.
Avatar
🐨Dream Doctor🦘 11/11/2020 2:55 PM
So I've managed to get Restinio to compile in a DLL, which is great. My problem now is it seems like some of the includes it uses, in particular fmt, are causing conflicts with the API, which includes it's own version of that same library that is very different to the main version. In \ARK-Server-API\version\Core\Public\Logger\spdlog\details\pattern_formatter_impl.h there calls to things like fmt::MemoryWriter and fmt::pad that don't exist in the main version of fmt that is installed by vcpkg. It's actually the same problem in the other web libraries I've tried as well, as they all use the main fmt library. So is there any way to separate the two, so that the API uses its version and the web libraries use their version? (edited)
Avatar
You might be able to change namespace
Avatar
🐨Dream Doctor🦘 11/11/2020 4:06 PM
Hmm that doesn't sound like fun lol
Avatar
I have a question regarding the ARK-Server-API
4:15 PM
Ive read through version.cpp, and can see all the init functionality
4:16 PM
I was wondering why is the DLL even loaded in the first place. Since I don't see any changes being made to the exe itself, or runpath / environment variables
Avatar
Server exe is probably calling init on all folder dlls
Avatar
I wondered about that, but didn't think that would be done.
Avatar
@Onslauth server loads every dll in plugins directory
4:44 PM
dll then has full access to do whatever the plugin is designed to do
Avatar
I believe he says the API itself (version.dll)
Avatar
oh, well that's so the API can load our plugins
4:46 PM
it's autoloaded by the game, and version.dll is one of the smallest libraries to write wrappers for
Avatar
I always wondered why was it called version.dll
4:46 PM
So that it is
Avatar
yeah it's just dynamic link hijacking
4:47 PM
Windows checks the folder of the exe for dep dlls before checking system path
4:47 PM
same method that reshade uses (they do this with d3d11)
4:49 PM
Avatar
Yeah lol I want to hide that but I can't
Avatar
like intellisense
4:52 PM
you don't want me to provide info to you for this
4:52 PM
return ((RT(*)(A...)) immutable_ptr)(args...);
Avatar
@substitute Are you saying ShooterGameServer.exe loads version.dll because it loads all the .dlls in the same directory?
4:56 PM
or is there another dll looking for "version.dll" and loading that if its in the path, and its just path/link hijacking? (edited)
Avatar
version.dll is a dependency that is linked at run time
Avatar
Dependency by what?
Avatar
the Server
4:57 PM
version.dll is normally a Windows dll, so the exe normally would load it from your System Path
Avatar
Oh, okay
Avatar
but Windows loads dynamically linked dependencies from the directory first
Avatar
Thank you, that makes sense now.
Avatar
before checking system path
Avatar
Yes, so link / path / dll hijacking (edited)
Avatar
🐨Dream Doctor🦘 11/12/2020 10:05 AM
After some modifications to #include search paths I was able to replace the ancient version of spdlog in the API kit with the current version, which also brought with it the current version of fmt. This allows other libraries using fmt to work correctly without conflict.
Avatar
🐨Dream Doctor🦘 11/12/2020 2:38 PM
I know I've asked this before, but does anyone have a simple example of launching a new thread from a plugin? I'm doing only the simplest thing, but it causes the server to instant-crash on start up as it loads my plugin. (edited)
Avatar
You can use std::thread
2:41 PM
This is a simple example of a new thread std::thread([param_1, param_2]() { DoSomething(param_1, param_2); }).detach(); (edited)
2:41 PM
With detach() it will be detached and you won't be able to access it anymore though. I usually do it this way so it doesn't block the main thread for heavy calculations
2:42 PM
And instead have an array of callbacks, that is checked on tick and each array element has its own callback info and function
2:42 PM
(In case I need some info back of those calculations)
Avatar
🐨Dream Doctor🦘 11/12/2020 9:04 PM
Thanks @Pelayori that worked for me. Love your array idea. I was going to try one of the IPC message queue libraries as well, but your idea sounds easier.
Avatar
I mean, I just do a struct, that has for example, steamID and items to give (as an example of what I'm doing for my vote reward plugin rework). Then vote claim is done async as it involves http requests, and then on uworld tick (which is main game thread) player is given items. Struct would be something like this: struct VoteRewardCallback { uint64 steamid; TArray<ItemReward> item_rewards; };
9:05 PM
ItemReward is also a custom struct
9:06 PM
in case you need a function you can do std::function
9:06 PM
Also, take care of creating/destroying/modifying UObjects in async thread, very bad things happen
9:06 PM
Game functions can be called, but I'd rather not do it
Avatar
Anybody try to get ClusterID?
7:54 AM
I want to get it in the plugin
7:55 AM
Is there any other way to get cluster ids other than by parsing the command line myself?
Avatar
Isn't it in the game mode?
8:04 AM
8:04 AM
I need to get it in code
Avatar
I mean in shooter game mode
8:05 AM
There should be a field I believe
Avatar
is value
Avatar
But did you try to find it on the game mode / game state?
Avatar
Just a moment, I'll try
8:09 AM
I looked for it before, but I couldn't find it
8:12 AM
it?
8:13 AM
it in AShooterGameState.
Avatar
Yeah that is
Avatar
I don't know how to get AShooterGameState.
Avatar
One sec
8:15 AM
AShooterGameState* game_state = static_cast<AShooterGameState*>(ArkApi::GetApiUtils().GetWorld()->GameStateField());
8:15 AM
It's something like that, I'm on phone can't look it up now
Avatar
🐨Dream Doctor🦘 11/13/2020 8:16 AM
Another thing to add to the API Utils Pelayori 🙂
Avatar
Yeah
8:16 AM
It's a pain to have to cast from world all time when you want to have game state lol
Avatar
@Codeboy
8:27 AM
AShooterGameState* state = static_cast<AShooterGameState*>(ArkApi::GetApiUtils().GetShooterGameMode()->GameStateField()); LOG->info(state->ClusterIdField().ToString().c_str());
8:27 AM
@Pelayori @🐨Dream Doctor🦘 macros I have for the API
8:27 AM
#include <API/ARK/Ark.h> /* Macro to add a hook easily. */ #define SET_HOOK(functionName, hookName) \ ArkApi::GetHooks().SetHook(functionName, &Hook_ ## hookName, &hookName ## _original) /* Macro to remove a hook easily. */ #define DISABLE_HOOK(functionName, hookName) \ ArkApi::GetHooks().DisableHook(functionName, &Hook_ ## hookName) /* Shortcut */ #define HOOKS \ ArkApi::GetHooks() /* Shortcut */ #define COMMANDS \ ArkApi::GetCommands() /* Shortcut */ #define API_UTILS \ ArkApi::GetApiUtils() /* Shortcut */ #define LOG \ Log::GetLog() /* Shortcut */ #define INIT_LOG(text) \ Log::Get().Init(text)
Avatar
Yeah I think I stolen some of them one time you posted them 😛
Avatar
Specially Log one, such a useful one
Avatar
wanna see some shit?
Avatar
Uh alright
Avatar
template<class = typename std::enable_if<std::is_same<VA, NO_VA>::value>::type> RT operator()(A... args) { if (!immutable_ptr) throw "Attempted to call null pointer."; return ((RT(*)(A...)) immutable_ptr)(args...); } template<typename ...B, class = typename std::enable_if<std::is_same<VA, VA_ARGS>::value>::type> RT operator()(A... args, B... va) { if (!immutable_ptr) throw "Attempted to call null pointer."; return ((RT(*)(A..., B...)) immutable_ptr)(args..., va...); }
8:28 AM
LULLLLLL
8:29 AM
for my cyber security club at my college I am presenting some basic reverse engineering
8:29 AM
8:29 AM
^this is what I will be using for example, it dumps out the user's account info when they log into the game
8:29 AM
it's injected and tracks proper state and only dumps when the account is valid
8:30 AM
I built a class to make hooking/calling functions easy
8:30 AM
but the class itself is a monster to read
8:30 AM
Avatar
@Pelayori thank you, I have successfully obtained the cluster ID.
Avatar
No problem
Avatar
@substitute that's some real shit lol. Can't understand most of it auroneyes
Avatar
ya but declaring them / using is SO easy
8:31 AM
8:31 AM
8:31 AM
and in the patch
8:31 AM
void loginPatch::callback(char* u, char* p) { isAuthenticating = true; strcpy_s(username, 16 * sizeof(char), u); strcpy_s(password, 16 * sizeof(char), p); printf("User is authenticating to server...\n"); WOW::Auth::Login.original(u, p); }
8:31 AM
DetourAttach(&WOW::Auth::Login, callback);
8:31 AM
etc.
Avatar
I see, I want to experiment with detour when I have time
8:34 AM
Plus I will test bp func hooking and see where can I get
Avatar
Hi guys, I'm looling for some help: std::string* sMsg = config["ChatCommands"]["Name"].get<std::string*>(); FString* sName = FString(sMsg.c_str()); how do i get this to work?
Avatar
std::string sMsg = config["ChatCommands"]["Name"]; FString sName = FString(sMsg.c_str());
8:22 PM
If you need to pass a FString pointer to a function just pass its memory address
8:22 PM
like SomeFunction(&sName); (edited)
8:22 PM
@ouzo1986
Avatar
thanks man that's working now
Avatar
🐨Dream Doctor🦘 11/14/2020 4:20 AM
@Pelayori I know you mentioned yesterday that you avoid using API functions in threads... I want to hook APrimalDinoCharacter.Die and send those details to thread for further processing because it could become quite heavy... If, for example, I need the steam id of the killer and I get an AController*, would you normally get those details in the hook function and send them to the thread, or would you send the AController ref to the thread and do everything there?
Avatar
🐨Dream Doctor🦘 11/14/2020 5:14 AM
What are people using to get all online players?
Avatar
Anybody know what this is?
Avatar
@🐨Dream Doctor🦘 I always try to get as much as I can in the game thread
Avatar
🐨Dream Doctor🦘 11/14/2020 9:41 AM
Would it be worth trying to get the changes I made to upgrade spdlog in the API included in the main code? I'm afraid I'm not that confident in making a PR.
Avatar
new stuff is always better
9:48 AM
and as Pelayori said, do as much as you can in the game thread....at least anything that deals directly with the game.
9:49 AM
you might be able to get by reading some variables, but you're risking a race condition.
9:49 AM
My suggestion? Write your own struct to hold your data that your other thread operates on and use a mutex to properly handle threaded access to the struct.
9:49 AM
game thread -> write to struct
9:49 AM
your thread -> read from struct
Avatar
I pass it on to the lambda where I launch the new thread
Avatar
Oh and @Codeboy that is ferox things left as debug I guess
Avatar
Can some man explain how i can protect my own mods with passwort or Ip whitelisting?
Avatar
mods should always be public @Stofftier
Avatar
nope
Avatar
you found a way to make steamworkshop mods not public?
11:01 AM
i think they are always public
Avatar
pls tell this Metfans (MTS Arena) or ouze123 (K+)both are dudses thst use some kind of protecting.
11:03 AM
nevermind
Avatar
Avatar
Stofftier
nevermind
wy?
11:05 AM
i mean i suspect, its works the same as some plugins do it
11:05 AM
i thought you meant preventing people from downloading the mod
Avatar
Angenommen du mag mich und meine Commuity überhaubt nicht. Und du hast eine Ark Map erstellt wo du tausende Studen rein investiert hast damit sie porno wird. Würdest du wollen das ich sie benutzte obwohl ich die letzte Person auf erden wäre mit der du deine arbeit teilen würdestß also ich halt nicht.
Avatar
ja hatte dich am anfang falsch verstanden ^^, dachte du wolltest es direkt im workshop hiden (edited)
Avatar
Zudem gibt es Modder wie metfan die machen so einen geilen Mod wie Metsfan arena (MTS Arena) und die wohlen halt einen fufi haben für ihre Arbeit. Finde ich in Ordnung.
Avatar
ja ich ja auch, hatte dich halt falsch verstanden am anfang ^^ @Stofftier
11:08 AM
Ich denke halt es wird ähnlich funktionieren, wie HWID Protections von Plugins
Avatar
chill Bro mein english ist kacke nicht dein missverständnis.^^
11:09 AM
Ja. Ka ich frage halt rum ob irgendjemand mir das zeigen kann.
Avatar
get that, lets see if someone here knows how to and wants to show it
Avatar
You'd probably want a http server hosting a list of passwords, and each time the server starts you want to check if that http url pointing to a txt/json file contains said password. You could specify the password by ini settings
11:41 AM
What you cannot do is make people pay for it tho, but you can make a private mod
Avatar
Avatar
Pelayori
You'd probably want a http server hosting a list of passwords, and each time the server starts you want to check if that http url pointing to a txt/json file contains said password. You could specify the password by ini settings
Is there a guide on YT?
Avatar
No there isn't afaik
11:58 AM
Not a specific one (edited)
Avatar
nice so need to try out by myself
12:01 PM
You could specify the password by ini settings
And for that? Some guides somewhere?
Avatar
he prob means that after the first part you can make an .ini setting for your mod, that there needs to be a key/password for the mod to work
12:02 PM
like agito has done it in his arkshop ui
12:02 PM
i think thats what pelayori meant
Avatar
Ok bin jetzt genauso schlau wie vorher. Mir scheint eher das die par Leute die wissen wie man sowas macht dies für sich behalten wollen. Aber ohne geht nicht keine Ahnung ob eine eigne Map gut wird oder nicht . Wenn ich am ende dastehe und ich kann es nichtmal als exklusiv Mod für die eigne Community nutzten kann bringt es mir nichts. Ich denke aber das sowas nachvollziehbar ist. (edited)
12:09 PM
Bin gerade beim Beams Reavival dabei. Der k+ ist mega gut. S+ gebalaced mit Engramm unlocker und anderen guten Stuff. Und dieser Mod ist ebenfalls in der GUS pw geschützt. finde ich auch in Ordnung.
Avatar
its totally fine for people to keep some secrets imo. They invested a lot of work and some earn money by selling these things. Your not entitled to get everything shown to you, you have to invest something. Many things are trial and error and a learning process.
12:12 PM
then your best bet prob is to ask the mod owner how he has done it, if you are already working together
Avatar
Дивоглюк 11/21/2020 3:16 PM
hello, where can I find what mean EPrimalCharacterStatusValue::MAX?
Avatar
namespace EPrimalCharacterStatusValue { enum Type { Health = 0x0, Stamina = 0x1, Torpidity = 0x2, Oxygen = 0x3, Food = 0x4, Water = 0x5, Temperature = 0x6, Weight = 0x7, MeleeDamageMultiplier = 0x8, SpeedMultiplier = 0x9, TemperatureFortitude = 0xA, CraftingSpeedMultiplier = 0xB, MAX = 0xC, }; }
Avatar
🐨Dream Doctor🦘 11/23/2020 7:12 AM
Found this really nice header-only message queue library that is very well used and tested. -- NOTE: It does not work with many of the custom UE4 data types. Use standard types to be safe. https://github.com/rigtorp/MPMCQueue (edited)
A bounded multi-producer multi-consumer concurrent queue written in C++11 - rigtorp/MPMCQueue
Avatar
🐨Dream Doctor🦘 11/25/2020 4:39 AM
So after two days of testing and struggles, there's a few strange issues with the library above. You cannot use a struct which includes a std::string (amongst other things) as the queue type. And I've not yet been able to get a pointer to a queue to work properly... I'm certain there is ways around that but they are beyond me at this point.
Avatar
🐨Dream Doctor🦘 11/26/2020 6:01 AM
Is there a hook I can use that's called when the world finishes loading at startup?
Avatar
AshooterGameMode::InitGame (edited)
12:16 PM
@🐨Dream Doctor🦘
12:16 PM
it’s a void function so you can just add your code after original
Avatar
🐨Dream Doctor🦘 11/27/2020 1:25 AM
Thank you!
Avatar
Does anyone know how to modify the weight of the ship in Atlas?
10:33 AM
I tried to add the following configuration in the GameuserSettings.ini file: PerLevelStatsMultiplier_Ship[0]=2.00 PerLevelStatsMultiplier_Ship[1]=2.00 PerLevelStatsMultiplier_Ship[2]=2.00 PerLevelStatsMultiplier_Ship[3]=2.00 PerLevelStatsMultiplier_Ship[4]=2.00 PerLevelStatsMultiplier_Ship[5]=2.00 PerLevelStatsMultiplier_Ship[6]=2.00 PerLevelStatsMultiplier_Ship[7]=2.00
10:34 AM
But it doesn't seem to be working. 😦
Avatar
hey, this plugins works on oficial ark? or its only for privaate servers?
Avatar
Only for private servers
6:04 PM
Unofficial servers
Avatar
ok, thanks!
Avatar
🐨Dream Doctor🦘 12/1/2020 10:34 AM
Anyone know of any issues using the API callback timers in a thread?
Avatar
@🐨Dream Doctor🦘 I haven't had any issues with it, other than if seems to go on regular intervals rather than an exact time, if you need super precision you might need another option (edited)
12:20 PM
hi all! I'm running the APlayerController::ConsoleCommand() function, and it's crashing the server and throwing an error "Fatal error!", for some commands, does anyone know how to get it to fail more gracefully/give me some more info on it?
Avatar
Avatar
Ashington
hi all! I'm running the APlayerController::ConsoleCommand() function, and it's crashing the server and throwing an error "Fatal error!", for some commands, does anyone know how to get it to fail more gracefully/give me some more info on it?
What does the crashtack say?
Avatar
You have a crash in your command, but since you don't have the pdb file, we can't know what function and where
Avatar
What's the pdb file? 🙂
Avatar
Avatar
Ashington
What's the pdb file? 🙂
When you compile your plugin, in the release folder there is the .dll file and the .pdb file, among some other files. Pdb file is what contains debug information that will report @ which function and line the program did crash
Avatar
oh fantastic, I'll have a look in there then 🙂
Avatar
Avatar
Ashington
oh fantastic, I'll have a look in there then 🙂
Are you using a AddOnTimerCallback? It appears to crash inside a timed callback which then calls a couple more internal plugin functions before crashing. Also the PDB file needs to be placed in the plugin directory with the .dll file and additional information will output at the time of the crash.
Avatar
Thanks for that! I looked in the PDB and there seems to have been something weird happening with strings, all this help has been super useful
Avatar
🐨Dream Doctor🦘 12/4/2020 9:50 AM
I've been messing around with some of the timer functions, and API::Timer::Get().RecurringExecute is a really useful one. A timer callback on a loop, with a loop count limit and the option to launch the callback in a new thread. So many uses!
Avatar
Yeah, I had forgotten about that one 😛
Avatar
DeletedUser 12/8/2020 6:21 PM
hello i have a simple question if someone can help me , what c++ course should i learn to be able to do a simple plugin ? cuz all the course i am downloading talk about variable and function and stuff like that and i am trying to read plugins resource they just look strange if someone can help me what course should i take
Avatar
Avatar
DeletedUser
hello i have a simple question if someone can help me , what c++ course should i learn to be able to do a simple plugin ? cuz all the course i am downloading talk about variable and function and stuff like that and i am trying to read plugins resource they just look strange if someone can help me what course should i take
🐨Dream Doctor🦘 12/10/2020 4:59 AM
C++ is an incredibly complex language. I always think of it like a spoken language. There are a thousand different ways of saying most things, and every person has their own individual way of speaking. So once you get past the most very basic aspects of C++ you'll quickly find that things can look very different to what you expect depending on how the individual programmer liked to work. The thing about plugins is that most of the work you'll do and see involves pointers, which are known to be one of the most confusing aspects of C++ for newcomers and even more advanced programmers. I don't think there's any real shortcuts. You absolutely must have reasonable understanding of all the major aspects of the C++ language before you'll understand much of what you'll see with plugins. That doesn't mean that you can't do some basic things by starting with one of the open source projects and adapting/changing it to suit your needs.
Avatar
can someone point me in the direction to set this up, I have done everything in the read me file. Cross chat isn't working and Bot isn't online
Avatar
Avatar
Bk
can someone point me in the direction to set this up, I have done everything in the read me file. Cross chat isn't working and Bot isn't online
If you are talking about an specific plugin configuration ask its creator. This is for development help.
Avatar
i'm looking for KalCrossChat I do not see that any where?
Avatar
GSH | MrOwlSky 12/11/2020 5:11 AM
🤞 Hopefully they use a solid build of unreal engine for the release. Would be really nice to have a stable working dev kit without the bugs.
Avatar
Hi, what program do you use to sync cluster folders across multiple machines?
6:38 PM
To make a cluster across multiple machines?
Avatar
@YaBro it depends
7:18 PM
if you know where to look, you don't need anything 😉
Avatar
Hey, anyone know a hook that triggered when someone drops a fertilized egg? (i need info (like name, lvl) about the dropped egg, too 🙂 ) i tried hooks like Hook_UPrimalInventoryComponent_DropItem it triggeres, but the FItemNetInfo is empty 🤔 I cant find a proper hook that triggeres and gives me item info 😦
Avatar
or does someone know how to get the class of an Item via the Item Id / FItemNetID (FItemNetInfo wasnt empty, just took the wrong IdField() ) (edited)
Avatar
Avatar
🐨Dream Doctor🦘
C++ is an incredibly complex language. I always think of it like a spoken language. There are a thousand different ways of saying most things, and every person has their own individual way of speaking. So once you get past the most very basic aspects of C++ you'll quickly find that things can look very different to what you expect depending on how the individual programmer liked to work. The thing about plugins is that most of the work you'll do and see involves pointers, which are known to be one of the most confusing aspects of C++ for newcomers and even more advanced programmers. I don't think there's any real shortcuts. You absolutely must have reasonable understanding of all the major aspects of the C++ language before you'll understand much of what you'll see with plugins. That doesn't mean that you can't do some basic things by starting with one of the open source projects and adapting/changing it to suit your needs.
DeletedUser 12/14/2020 3:19 AM
Thank u buddy that make sense now why i am not understand the code there first i didnt reached pointers didnt even know it was using it , and yh i know about how complex it is i know c# flutter angular but plugins need c++ cuz unreal engine thank u will try to find my way out than as now i know what is the base for me it is just for curiousity like for fun and more knowledge
Avatar
I mean actually you could write plugins in any language. Before this project existed I tinkered a bit with modding the server in C#, but it's significantly easier to deal with memory management and hooking in c++. Theoretically you could probably also build c# bindings or interface with rust
6:21 AM
also I am not sure if there's a tool that can generate method signatures for C# from the PDB like IDA does for c++ here. Might be.
Avatar
I do not believe someone that is struggling to learn C++ should undertake attempting to rewrite or wrap the API in C# 😛
Avatar
yeah
Avatar
If memory management is difficult for you, then hacking the ark memory and making an api for it wont be easy
Avatar
lol yeah I'm aware. Just wanted to make the distinction that the reason it's in C++ is not because of unreal
Avatar
am i supposed to get the roles to see all the channels in here automatically? i reacted in #deleted-channel but didn't recieve any roles
Avatar
Yes, you should. Also a bot dms you with a confirmation message
Avatar
ah, well i have dms turned off by default so that is probably why
Avatar
Avatar
dolphin
am i supposed to get the roles to see all the channels in here automatically? i reacted in #deleted-channel but didn't recieve any roles
GSH | MrOwlSky 12/19/2020 12:18 AM
Yeah the roles in #deleted-channel just unlock different channels for "Beginners or Advanced" as examples. Should still be able to see the main channels without it.
Avatar
yeah, the bot just didn't give the roles to me since i had dms turned off
Avatar
Help. An error occurs when adding #include <mysql.h>. If you delete it, it works normally.. The include alone will cause the error.
Avatar
There is a missing dependency
Avatar
Hi, Is it possible to check if a player has aggro or in boss arena zone? I didn't find the check for this
Avatar
there’s a hook for mass teleports
Avatar
Avatar
Pelayori
There is a missing dependency
When you say dependencies, do you mean settings?
Avatar
Avatar
돌드민
When you say dependencies, do you mean settings?
No he means libraries
Avatar
Avatar
substitute
No he means libraries
The above error has been resolved. Thank you.
Avatar
I am currently getting an error when trying to connect to mysql. How to do it
8:04 AM
8:04 AM
The part where the error occurs is the bottom part.
Avatar
is anyone having problem with the site?
12:17 AM
every page i try to access gives this error:
12:17 AM
Avatar
Yes, it's like that for everyone! And it's reported as well. @everyone (edited)
Avatar
The site is now working properly again @everyone
👍 2
Avatar
Hi, can anyone help me? I have a crash when trying to use ArkApi::GetApiUtils().GetSteamIdFromController(new_player) in HandleNewPlayer hook. Also the TargetingTeamField == 0 every time. I dont understand, whats going on, cause i can use GetSteamIdFromController in another functions
Avatar
check if new_player != nullptr
Avatar
Avatar
GreengoDK
Hi, can anyone help me? I have a crash when trying to use ArkApi::GetApiUtils().GetSteamIdFromController(new_player) in HandleNewPlayer hook. Also the TargetingTeamField == 0 every time. I dont understand, whats going on, cause i can use GetSteamIdFromController in another functions
HandleNewPlayer hook will probably have the NewPlayer var valid, but for tribe, etc. you might want to check for player state and tribe data,
9:52 PM
And what SorPlex said, check for null pointers.
Avatar
Avatar
Pelayori
And what SorPlex said, check for null pointers.
I've check it, it isnt nullptr
Avatar
Do you have a crash stack, and the line where it crashes?
Avatar
Avatar
Pelayori
Do you have a crash stack, and the line where it crashes?
Yes, its crashes every time on line with GetSteamIdFromController, i can get targetingTeam, but, for test, i was try HumanReadableName and it also casue a crash. And, when i trying to debug, i have that error. I dont understand, why GetSteamIdFromController has exeption in FWidgetStyle XD
10:01 PM
What is your goal?
10:01 PM
I use a lot getsteamidfromcontroller on HandleNewPlayer
Avatar
Avatar
Pelayori
I use a lot getsteamidfromcontroller on HandleNewPlayer
I need to get valid ref to player controller..
10:02 PM
This is what I do
10:02 PM
Works fine, no crashes
Avatar
It doesnt work, cause after update ArkApi from git i have another signature, without game mode. It's working fine before update
Avatar
What I showed is the hook, not the GameMode call.
10:06 PM
DECLARE_HOOK(AShooterGameMode_HandleNewPlayer, bool, AShooterGameMode*, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool); bool Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* NewPlayer, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) { return AShooterGameMode_HandleNewPlayer_original(_this, NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); } ArkApi::GetHooks().SetHook("AShooterGameMode.HandleNewPlayer", &Hook_AShooterGameMode_HandleNewPlayer, &AShooterGameMode_HandleNewPlayer_original); ArkApi::GetHooks().DisableHook("AShooterGameMode.HandleNewPlayer", &Hook_AShooterGameMode_HandleNewPlayer); (edited)
10:06 PM
That is what declares, and sets the handle player hook
10:07 PM
And I'm using latest API source from GitHub
Avatar
It's a shooter game mode... I dont know, probably i have invalid api version
Avatar
Yes, but what I said is the GameMode function does not have anything to do with the actual hook
Avatar
Server plugins support for ARK. Contribute to Michidu/ARK-Server-API development by creating an account on GitHub.
Avatar
Although my GameMode struct is like this
10:09 PM
Avatar
It should
Avatar
HandleNewPlayer doesn't have AShooterGameMode* in signature
Avatar
Avatar
GreengoDK
HandleNewPlayer doesn't have AShooterGameMode* in signature
@Pelayori right?
Avatar
But that is irrelevant to the hook
10:13 PM
Hook is an independant function, which just contains a reference to the game mode object
10:13 PM
You must have something wrong in the code, which is making it fail, as I showed you it just works fine.
Avatar
Avatar
Pelayori
You must have something wrong in the code, which is making it fail, as I showed you it just works fine.
I have that error, when i try to compile with your hook
Avatar
Did you declare it?
Avatar
yep
Avatar
I don't know them, I am working with that hook right now 🤷
Avatar
I just copy your declaration and sets
Avatar
Avatar
Pelayori
I don't know them, I am working with that hook right now 🤷
Can you check signature of HandleNewPlayer in your api version, please?
Avatar
bool HandleNewPlayer_Implementation(AShooterPlayerController* NewPlayer, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) { return NativeCall<bool, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool>(this, "AShooterGameMode.HandleNewPlayer_Implementation", NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); }
Avatar
Hmm.. I've fix it and server was started, tnx, I'll test it now
Avatar
Avatar
Pelayori
bool HandleNewPlayer_Implementation(AShooterPlayerController* NewPlayer, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) { return NativeCall<bool, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool>(this, "AShooterGameMode.HandleNewPlayer_Implementation", NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); }
Yep, its working, thanks!!
Avatar
hey guys, i swapped my permissions plugin over to mysql, and it created the tables just fine but whenever someone joins the server it throws this into the console Permissions::Hooks::Hook_AShooterGameMode_HandleNewPlayer) Couldn't add player so i tried manually adding myself into the players table and reconnected. it did the same thing but it at least let me add myself to a permission group, and i was also able to add a new group and add a permission to that group, but it's still throwing that error in console and not automatically populating the players table.
12:48 AM
I googled the error and found someone else having this issue, but their solution was changing the auto-increment value in the players table (which doesnt seem to be the problem here)
12:49 AM
also, hope everyone is having a merry christmas
Avatar
@dolphin the permissions plugin that comes with the API is outdated, download the standalone permissions plugin from the forum and update yours
Avatar
@WETBATMAN I see, thanks!
Avatar
hey, tell me please, how to make struct, which will be allowed to be a key in TMap? (edited)
6:45 AM
I've overload operator== but it's not enough. I have that error
Avatar
🐨Dream Doctor🦘 12/28/2020 2:23 PM
I've got a class string for a PrimalItemStructure, and I want to be able to get the "StructureToBuildField" of the CDO for that PrimalItem. I can use BPLoadClass to get a UClass, but can I get any further without actually creating a PrimalItem in an inventory somwhere in order to read the StructureToBuild from? I don't actually want to create the primalitem, just read that field. (edited)
5:36 PM
api site down?
Avatar
Seems like
Avatar
Avatar
🐨Dream Doctor🦘
I've got a class string for a PrimalItemStructure, and I want to be able to get the "StructureToBuildField" of the CDO for that PrimalItem. I can use BPLoadClass to get a UClass, but can I get any further without actually creating a PrimalItem in an inventory somwhere in order to read the StructureToBuild from? I don't actually want to create the primalitem, just read that field. (edited)
When you get the UClass, get the default object and cast it to UPrimalItem*, there you have its default values and the StructureToBuild (edited)
Avatar
Anyone had this same crash and know why it happens? Seems to happen randomly when using ArkApi::GetApiUtils().SendNotification() VERSION: 320.38 ShooterGameServer.exe!UClass::FindFunctionByName() (0x00007ff6cb11ec1b) + 59 bytes [f:\build\live320\engine\source\runtime\coreuobject\private\uobject\class.cpp:3563] ShooterGameServer.exe!UObject::FindFunctionChecked() (0x00007ff6cb145e2a) + 15 bytes [f:\build\live320\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:802] ShooterGameServer.exe!AShooterPlayerController::ClientServerSOTFNotificationCustom() (0x00007ff6ca76191b) + 20 bytes [f:\build\live320\projects\shootergame\intermediate\build\win64\shootergameserver\inc\shootergame\shootergame.generated.1.cpp:5668]
5:41 PM
The AShooterPlayerController is null checked before passing it to SendNotification().
Avatar
@🐨Dream Doctor🦘 UClass* some_class; if (some_class != nullptr) { UPrimalItem* cdo_item = static_cast<UPrimalItem*>(some_class->GetDefaultObject(true)); TSubclassOf<APrimalStructure> structure_to_build = cdo_item->StructureToBuildField(); } (edited)
Avatar
Avatar
Lethal
Anyone had this same crash and know why it happens? Seems to happen randomly when using ArkApi::GetApiUtils().SendNotification() VERSION: 320.38 ShooterGameServer.exe!UClass::FindFunctionByName() (0x00007ff6cb11ec1b) + 59 bytes [f:\build\live320\engine\source\runtime\coreuobject\private\uobject\class.cpp:3563] ShooterGameServer.exe!UObject::FindFunctionChecked() (0x00007ff6cb145e2a) + 15 bytes [f:\build\live320\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:802] ShooterGameServer.exe!AShooterPlayerController::ClientServerSOTFNotificationCustom() (0x00007ff6ca76191b) + 20 bytes [f:\build\live320\projects\shootergame\intermediate\build\win64\shootergameserver\inc\shootergame\shootergame.generated.1.cpp:5668]
I've never seen this crash error, but seems like failing at replicating the message to client trough the player controller blueprint
Avatar
Avatar
Pelayori
I've never seen this crash error, but seems like failing at replicating the message to client trough the player controller blueprint
that's not it
Avatar
Avatar
Lethal
Anyone had this same crash and know why it happens? Seems to happen randomly when using ArkApi::GetApiUtils().SendNotification() VERSION: 320.38 ShooterGameServer.exe!UClass::FindFunctionByName() (0x00007ff6cb11ec1b) + 59 bytes [f:\build\live320\engine\source\runtime\coreuobject\private\uobject\class.cpp:3563] ShooterGameServer.exe!UObject::FindFunctionChecked() (0x00007ff6cb145e2a) + 15 bytes [f:\build\live320\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:802] ShooterGameServer.exe!AShooterPlayerController::ClientServerSOTFNotificationCustom() (0x00007ff6ca76191b) + 20 bytes [f:\build\live320\projects\shootergame\intermediate\build\win64\shootergameserver\inc\shootergame\shootergame.generated.1.cpp:5668]
looks like it's failing to find the function, which is really really strange
7:38 PM
FindFunctionByName is internal in the game engine though, unsure why it's crashing
Avatar
Ya, I was confused by this as well.
Avatar
Avatar
substitute
that's not it
oops, thought it was failing at that yeah. It is strange since I don't know of this error in any other plugin
Avatar
Avatar
Infiniti
api site down?
GSH | MrOwlSky 12/28/2020 10:21 PM
Yeah #【📢】ᴀɴɴᴏᴜɴᴄᴇᴍᴇɴᴛꜱ down for a minute until deployed back online.
Avatar
🐨Dream Doctor🦘 12/28/2020 11:43 PM
@Lethal I noticed ShooterGameServer.exe!AShooterPlayerController::ClientServerSOTFNotificationCustom(). Is this running on SOTF?
Avatar
It is not, that is the function used to send client notifications with IApiUtils::SendNotification()
Avatar
Deleted User 12/29/2020 4:39 AM
I haven't been able to access "arkserverapi.com" for several hours. Does anyone know of this issue?
4:39 AM
Avatar
#【📢】ᴀɴɴᴏᴜɴᴄᴇᴍᴇɴᴛꜱ
Avatar
🐨Dream Doctor🦘 12/29/2020 9:39 AM
We do seem to have a lot of very long outages on the api website. There's no commercial hosting company that I'm aware of that would last with outages of this length and frequency. Perhaps we could do some quick fundraising to move the api site to a more suitable host? (edited)
Avatar
Avatar
🐨Dream Doctor🦘
We do seem to have a lot of very long outages on the api website. There's no commercial hosting company that I'm aware of that would last with outages of this length and frequency. Perhaps we could do some quick fundraising to move the api site to a more suitable host? (edited)
I’ve had the idea of an api package manager
9:53 AM
Then people could use whatever hosts they want
Avatar
🐨Dream Doctor🦘 12/29/2020 9:53 AM
Well that sounds great, but I think there's still a lot of useful info on the website.
Avatar
The downloads section is basically an package manager with extra steps
9:54 AM
Usually unless I’m misremembering, package managers list changes / and basic infos
9:54 AM
As for the site error
9:54 AM
Maybe he self hosts
Avatar
🐨Dream Doctor🦘 12/29/2020 9:55 AM
Yeah that's the only reason I can think of why there would be outages that last a day or more sometimes.
Avatar
🐨Dream Doctor🦘 12/29/2020 11:57 AM
Does anyone know why BPLoadClass would be causing this crash? It's strange because it runs successfully and returns a valid UClass, but then a few seconds or minutes later, when what looks like GC runs, it crashes the server. (edited)
Avatar
Are you keeping the pointer somewhere or just as a local var?
Avatar
🐨Dream Doctor🦘 12/29/2020 1:01 PM
Just as a local var. It's only used temporarily.
Avatar
Hmm, not sure then
Avatar
🐨Dream Doctor🦘 12/29/2020 1:03 PM
In fact it's all inside an if statement, so it should all be destroyed anyway.
1:08 PM
I tried a manual delete statement at the end of the function but that just causes an instant crash.
Avatar
🐨Dream Doctor🦘 12/29/2020 3:58 PM
Well no matter what I try, using BPLoadClass anywhere does load the class correctly but ends in the server crashing a few moments later. I used a plugin that I know used to work but it also crashes the server too now. I'm using the latest API (3.5). I'm wondering if there's something different in the latest version that's causing issues?
4:02 PM
Is there any alternative to BPLoadClass?
Avatar
🐨Dream Doctor🦘 12/30/2020 4:43 AM
Still struggling with UVictoryCore::BPLoadClass. I used the test program below, and experimented with dozens of variations of BPString. With a few blueprints, like the one below, it worked fine. With most, it took several seconds to load the class successfully, but then later, once the server had finished starting up, it crashed. I'm now wondering whether it's maybe due to it running too early, and maybe it needs to wait until after the server has finished starting up before using BPLoadClass... #include <iostream> #include <API/ARK/Ark.h> #include <Logger/Logger.h> #pragma comment(lib, "ArkApi.lib") void ReadConfig() { FString TempBPString = ("Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_Polymer.PrimalItemResource_Polymer'"); UClass* LoadedClass = UVictoryCore::BPLoadClass(&TempBPString); FString TestClass; LoadedClass->GetFullName(&TestClass, nullptr); if (LoadedClass != nullptr) { std::cout << "CLASS LOADED: " << TestClass.ToString() << std::endl; } else { std::cout << "CLASS NOT LOADED" << std::endl; } } void Load() { try { ReadConfig(); } catch (const std::exception& error) { Log::GetLog()->error(error.what()); throw; } } void Unload() { } BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); break; } return TRUE; }
Avatar
@🐨Dream Doctor🦘
5:01 AM
I've found loading is just slow
5:02 AM
are you running this code in the game thread?
5:02 AM
it's not much different compared to my own
5:02 AM
void giveRagnarokTekgrams(AShooterPlayerController* playerController) { const wchar_t* tekGrams[] = { L"Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Structures/Misc/PrimalItemStructure_TekLight.PrimalItemStructure_TekLight'", L"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponTekSword.PrimalItem_WeaponTekSword'", L"Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Armor/Shields/PrimalItemArmor_ShieldTek.PrimalItemArmor_ShieldTek'" }; AShooterPlayerState* state = playerController->GetShooterPlayerState(); for (const wchar_t* gram : tekGrams) { TSubclassOf<UPrimalItem> tekGram; tekGram.uClass = UVictoryCore::BPLoadClass(&FString(gram)); state->ServerUnlockEngram(tekGram, true, true); } }
Avatar
🐨Dream Doctor🦘 12/30/2020 5:16 AM
Thanks @substitute. Actually I think trying to use it too early in the loading process is what was causing my issues. I moved it to InitGame and it works fine now, at least from my first couple of tests. (edited)
Avatar
ah, yeah that makes sense
5:18 AM
my code was running after a command so it's way after InitGame
Avatar
🐨Dream Doctor🦘 12/30/2020 3:01 PM
Does anyone have a simple way of determining whether one class is the child of another? I'm asking for PrimalItemStructure classes in a config file, and I'd like to be able to check that.
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have a simple way of determining whether one class is the child of another? I'm asking for PrimalItemStructure classes in a config file, and I'd like to be able to check that.
UClass::IsChildOf
Avatar
🐨Dream Doctor🦘 12/30/2020 3:06 PM
Thanks @Pelayori. I saw that, but I wasn't sure how to get the comparison class when it's something like PrimalItemStructure.
Avatar
Let me hook you up with an example
Avatar
🐨Dream Doctor🦘 12/30/2020 3:07 PM
That would be amazing! Thank you!
Avatar
bool IsClassChildOf(UClass* this_class, UClass* parent_class_check) { if (!this_class || !parent_class_check) return false; return this_class->IsChildOf(parent_class_check); }
3:09 PM
this_class is the class you want to check if is child of parent_class_check
3:10 PM
To get APrimalStructure UClass just do: APrimalStructure::GetPrivateStaticClass()
3:10 PM
@🐨Dream Doctor🦘
Avatar
🐨Dream Doctor🦘 12/30/2020 3:13 PM
Thank you so much@Pelayori !
Avatar
🐨Dream Doctor🦘 12/30/2020 3:29 PM
Oh wait, sorry, APrimalStructure::GetPrivateStaticClass() doesn't work because APrimalStructure is the base class for the built structures. I'm looking for APrimalItemStructure, which is the base class for the PrimalItems for all structures. It doesn't seem to be defined anywhere in the API. (edited)
Avatar
Oh I see (edited)
3:30 PM
Let me start IDA
3:30 PM
yay site's back online 😄
Avatar
🐨Dream Doctor🦘 12/30/2020 3:32 PM
@Foppa I'm really sorry for the tag, but we were discussing yesterday if it might be possible to move the website to a proper web host? I'm sure we could pass around the hat and organise the funding for it, given how inexpensive high quality web hosting is. Is that something that might be possible?
Avatar
Problem isn't the webhosting
3:35 PM
But i will look into if what we can do with this
3:35 PM
if we can improve the solution somehow
Avatar
@🐨Dream Doctor🦘 PrimalItemStructure is not a C++ class, it's a BP defined class
3:52 PM
The parent BP class for primal item structure is
3:52 PM
Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Structures/BuildingBases/PrimalItemStructureGeneric.PrimalItemStructureGeneric'
3:52 PM
You might have to bploadclass, and then do the check against that
Avatar
🐨Dream Doctor🦘 12/30/2020 3:53 PM
Oh wow thank you so much again. That will do the trick. You're the best! Thank you!
Avatar
@ me with the result
3:53 PM
I'll have the devkit open today most likely
Avatar
🐨Dream Doctor🦘 12/30/2020 3:58 PM
Yep that worked perfectly. Thank you again@Pelayori !
Avatar
No worries
Avatar
How can you send something to a players ark data in the Obelisk
Avatar
Avatar
Raelynda
How can you send something to a players ark data in the Obelisk
You have UPrimalLocalProfile::AddArkTributeItem, but this function is not defined in the API
12:15 AM
To get UPrimalLocalProfile you can do Player_Controller->PrimalLocalProfileField()
12:16 AM
And then pass to AddArkTributeItem the item net info of the item you want to add (if you don't have the net info, create a new item on a nullptr inventory with AddNewItem function)
Avatar
Awesome! Thanks for the information.
Avatar
I have never tested it, but if you have any issue you can @ me and I'll try to help
Avatar
Still a bit from testing it but good point to look at
Avatar
If the nullptr inv doesn’t work
12:20 AM
Can also add to player inven and immediately take it away
Avatar
Yeah that can work too, but if I remember correctly the nullptr inv worked back when I used it
12:20 AM
Lot of ways to approach it 😛
Avatar
😄 Yea just looking at ways to add items to player without them needing to be logged in
Avatar
If the player isn't online then you can use this: UPrimalItem* new_item = UPrimalItem::AddNewItem(ItemClass, nullptr, false, false, quality, false, amount, is_bp, 0, false, nullptr, 0); FItemNetInfo* net_info = static_cast<FItemNetInfo*>(FMemory::Malloc(0x200)); RtlSecureZeroMemory(net_info, 0x200); new_item->GetItemNetInfo(net_info, false); (edited)
12:28 AM
I think it was that to create an item without an inventory
12:29 AM
@Raelynda
Avatar
So that would create an item for a player that they would get when the logged in?
Avatar
No, that would create an item. But that item would not be in any inventory. Then with the item net info you call the add tribute item function
Avatar
Thank you. Very new to creating api so this was very helpful
Avatar
Hey, does anyone know the hook thats called when picking up a structure? 😄
Avatar
Might be some hook, but I'd go for TryMultiUse, and check (with Log) which is the index used for pickup
Avatar
Avatar
SorPlex
Hey, does anyone know the hook thats called when picking up a structure? 😄
🐨Dream Doctor🦘 12/31/2020 9:26 AM
DECLARE_HOOK(APrimalStructure_AllowPickupForItem, bool, APrimalStructure*, AShooterPlayerController*); bool Hook_APrimalStructure_AllowPickupForItem(APrimalStructure* _this, AShooterPlayerController* ForPC) { return APrimalStructure_AllowPickupForItem_original(_this, ForPC); } ArkApi::GetHooks().SetHook("APrimalStructure.AllowPickupForItem", &Hook_APrimalStructure_AllowPickupForItem, &APrimalStructure_AllowPickupForItem_original); ArkApi::GetHooks().DisableHook("APrimalStructure.AllowPickupForItem", &Hook_APrimalStructure_AllowPickupForItem);
9:27 AM
I'm pretty sure I've used that one before.
Avatar
Find someone who can create a fake player for squad
Avatar
Avatar
🐨Dream Doctor🦘
DECLARE_HOOK(APrimalStructure_AllowPickupForItem, bool, APrimalStructure*, AShooterPlayerController*); bool Hook_APrimalStructure_AllowPickupForItem(APrimalStructure* _this, AShooterPlayerController* ForPC) { return APrimalStructure_AllowPickupForItem_original(_this, ForPC); } ArkApi::GetHooks().SetHook("APrimalStructure.AllowPickupForItem", &Hook_APrimalStructure_AllowPickupForItem, &APrimalStructure_AllowPickupForItem_original); ArkApi::GetHooks().DisableHook("APrimalStructure.AllowPickupForItem", &Hook_APrimalStructure_AllowPickupForItem);
thats working, thanks 😄 but it seems like the hook triggeres 2 times 🤔
Avatar
Bl4ckSkull666 12/31/2020 5:40 PM
Server plugins for ARK
Avatar
Nguyễn Đình Huy 1/1/2021 8:51 AM
How to save chat and send chat from mysql. Help me 🥰
Avatar
Avatar
Nguyễn Đình Huy
How to save chat and send chat from mysql. Help me 🥰
substitute 1/1/2021 9:06 AM
like when someone chats send it to a database?
9:06 AM
hook the chat event and do an insert (IN ANOTHER THREAD)
Avatar
Avatar
Nguyễn Đình Huy
How to save chat and send chat from mysql. Help me 🥰
Bl4ckSkull666 1/1/2021 11:35 AM
send chat via rcon and crosschat plugin directly and save it for history only.
Avatar
hey @Lethal I got a question concerning your tribe enforcer Plugin, if someone leaves a tribe on one map, it will force the player on other maps out of the tribe, but does this force trigger the leave tribe hook? cuz i want / need to count players in tribe so i need to know if the force on a different map triggeres that hook 😄
Avatar
Avatar
SorPlex
hey @Lethal I got a question concerning your tribe enforcer Plugin, if someone leaves a tribe on one map, it will force the player on other maps out of the tribe, but does this force trigger the leave tribe hook? cuz i want / need to count players in tribe so i need to know if the force on a different map triggeres that hook 😄
You would be better off using the database table to get a count.
Avatar
mh okay
Avatar
@Lethal May i also ask, how got the server id? Or where you get that? 😄
Avatar
AShooterGameMode::ServerIDField
Avatar
ah lol xD thanks a lot 😄
Avatar
imaginedragon 1/5/2021 1:34 PM
how to like "RconCrossServerChat" send msg in all cross servers?
Avatar
Avatar
imaginedragon
how to like "RconCrossServerChat" send msg in all cross servers?
chinese?
Avatar
imaginedragon 1/7/2021 10:54 AM
whats up? yes (edited)
Avatar
我英语不好,打字费劲,你是国人我方便讲。。
12:03 PM
你要用Rcon跨服聊天?
Avatar
블리-어드민 1/8/2021 1:19 PM
How do I purchase a support or paid plugin?
Avatar
Is there a Plugin out there to remap hotkeys.. Aka the tek helm.
Avatar
Hey, has anyone any idea of this error? UpdatePlayerDetailsAsync - Error: CreateAsync. The process cannot access the file 'C:\ARK\Servers\Server10\ShooterGame\Saved\SavedArks\7655211979816271.arkprofile' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost) at ArkData.Parser.ParsePlayer(String fileName) at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ArkData.DataContainer.<CreateAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at ServerManagerTool.Lib.ServerRCON.<UpdatePlayerDetailsAsync>d__71.MoveNext() Its freezing our server as soon as one perticular person joins the server. BUT its not the person mentioned by the error.
Avatar
Looks like some application is locking a .arkprofile and cause issues for the server to read or access it 🙂
Avatar
It’s also not an ark server error
3:47 AM
Looks like an error with some clr program
Avatar
Deleted User 1/10/2021 10:33 AM
hi happy day. Can "Status Effects" be generated using ark server api? link: https://ark.gamepedia.com/Status_Effects
In ARK: Survival Evolved there are various Status Effects that can affect your character in various ways. See an entire list of Status Effects below.
Avatar
Avatar
Deleted User
hi happy day. Can "Status Effects" be generated using ark server api? link: https://ark.gamepedia.com/Status_Effects
🐨Dream Doctor🦘 1/10/2021 2:37 PM
Those are buffs. Yes you can add a buff to a player or dino using the api, but obviously you can only add buffs that already exist in the game. (edited)
Avatar
In fact you could maybe modify them, since buffs have natively fields for the status modifiers. For example hp regen, and even weight reduction iirc
Avatar
Deleted User 1/10/2021 2:59 PM
Thank you for answer. Do you have any examples?
Avatar
@Deleted User To begin with, to add buffs you want to use APrimalBuff::StaticAddBuff
3:01 PM
It will return a pointer to the new buff
3:01 PM
Then you do your things from there
Avatar
Deleted User 1/10/2021 3:01 PM
oh ok. thank you!
3:02 PM
Knowing how to get started is really helpful. Thank you.
Avatar
You need the buff class, so you might have to UVictoryCore::BPLoadClass if you don't have a class reference already (edited)
Avatar
🐨Dream Doctor🦘 1/11/2021 1:44 AM
I've just learned that wooly has made his own updated closed source, paid version of Michidu's Permissions plugin. This really worries me, given that it's such a core part of the API and that so many existing plugins are built against it. The issues he identified as needing fixing appear to be genuine, but they are also relatively easy to fix. I'd like to look at updating the proper, open source version of Permissions to address these issues as soon as possible. Would anyone else be willing to help out with this? It really does affect us all, and keeping Permissions open source is, in my opinion, extremely important for us all. How quickly can we get Michidu to review and accept the changes? (edited)
Avatar
Avatar
🐨Dream Doctor🦘
I've just learned that wooly has made his own updated closed source, paid version of Michidu's Permissions plugin. This really worries me, given that it's such a core part of the API and that so many existing plugins are built against it. The issues he identified as needing fixing appear to be genuine, but they are also relatively easy to fix. I'd like to look at updating the proper, open source version of Permissions to address these issues as soon as possible. Would anyone else be willing to help out with this? It really does affect us all, and keeping Permissions open source is, in my opinion, extremely important for us all. How quickly can we get Michidu to review and accept the changes? (edited)
if you make compatible bindings against Michidu's you don't even need to make a PR for his.
4:12 AM
e.g. you could make your own completely from scratch
4:12 AM
just as long as your EXPORTS matches Michidu's EXPORTS
4:13 AM
@🐨Dream Doctor🦘 One more thing
4:13 AM
If Wooly has used the original Permissions in his paid variant, he has most likely violated the licensing terms of the original.
4:14 AM
4:14 AM
ah he'd be in the clear
4:14 AM
it's MIT and not GPL
Avatar
🐨Dream Doctor🦘 1/11/2021 4:22 AM
Look I make no comment on the legal or ethical nature of Wooly's plugin. I do however strongly believe that we need to prevent the fragmentation of the open source API with closed source proprietary plugins. The open source nature of the API is what makes it work. The second core components of it start getting broken off and close sourced the whole thing will fall apart. What happens when server owners have two plugins that both rely on permissions, but two people have released their own closed sourced versions with different features to suit their other closed source plugins? They can't use them both at once. You then have server owners being forced to chose one author over another because things are clashing. It quickly turns into a nightmare.
Avatar
Avatar
🐨Dream Doctor🦘
Look I make no comment on the legal or ethical nature of Wooly's plugin. I do however strongly believe that we need to prevent the fragmentation of the open source API with closed source proprietary plugins. The open source nature of the API is what makes it work. The second core components of it start getting broken off and close sourced the whole thing will fall apart. What happens when server owners have two plugins that both rely on permissions, but two people have released their own closed sourced versions with different features to suit their other closed source plugins? They can't use them both at once. You then have server owners being forced to chose one author over another because things are clashing. It quickly turns into a nightmare.
Yes, if Wooly has made additional bindings to his Permissions plugin, this could be problematic
4:23 AM
however I HIGHLY doubt this is the case
4:23 AM
He would have to distribute the .lib to developers for them to make use of it. (edited)
4:23 AM
(or at a minimum headers)
4:24 AM
with that said, I agree with your issues raised by this.
4:24 AM
Do you have a link to the plugin?
4:24 AM
What needed to be fixed?
Avatar
🐨Dream Doctor🦘 1/11/2021 4:25 AM
He's already said he's made modifications to his version of the Permissions plugin which I assume his own other plugins will make use of. If someone else does the same, that's game over. They have to choose between wooly and all his plugins that use his Permissions and the other guy and all his plugins. It's a disaster.
Avatar
Avatar
🐨Dream Doctor🦘
He's already said he's made modifications to his version of the Permissions plugin which I assume his own other plugins will make use of. If someone else does the same, that's game over. They have to choose between wooly and all his plugins that use his Permissions and the other guy and all his plugins. It's a disaster.
Yes, and people should not support proprietary plugins in this regards
4:26 AM
as for those changes, he needs to distribute a .lib file
4:26 AM
which means it is possible for us (the open source community) to make compatible open source permissions plugins
4:26 AM
the problem however is that gives the individual control to implement whatever they want
4:26 AM
and we would need to match them
Avatar
🐨Dream Doctor🦘 1/11/2021 4:32 AM
Yes, I think it's something we can all do better. It's obvious Michidu and Ownprox have mostly moved on from the API. They did amazing work creating the API, making all those initial plugins and releasing all their source code as open source. They've fixed major problems where they can, but overall the API has stagnated and stalled. We all know of things that need improvement and change. I think it's up to all of us to step up and bring the project back to life to stop things like this Permissions horror from happening. Maybe if wooly felt the API was a more active and receptive project he would have submitted the changes to be included in the main project? maybe
Avatar
I disagree that he'd have submitted it for free.
4:33 AM
Michidu does still review and merge PRs
Avatar
🐨Dream Doctor🦘 1/11/2021 4:33 AM
Yeah, I was just trying to be polite lol
Avatar
What was his plugin, and what needed to be fixed from the original permissions? (edited)
Avatar
🐨Dream Doctor🦘 1/11/2021 4:37 AM
I think getting Permissions fixed up is a good first step. Right now it's the only plugin that's included in the main binary distro of the API, and that version is broken. It has to be replaced with a later version downloaded from the website. Wooly is saying that on a reasonably busy server he's seeing the Permissions plugin making several hundred database calls a second. The existing plugin runs in the main game thread. So his plugin runs the database calls from another thread, and caches the database locally to stop all the remote mysql calls.
4:37 AM
None of that is difficult to implement.
Avatar
Yes, and as a massive amount of the legwork was already done by the original implementation, is why I am willing to bet the lack of open source contribution isn't due to thinking the API has stagnated
Avatar
🐨Dream Doctor🦘 1/11/2021 5:15 AM
I don't mean that as a criticism of anyone. There are some truly amazing people on this Discord like yourself, @Lethal and @Pelayori who have all shared some of their own brilliant modifications and additions to the core API, some very simple and some not, but as far as I can see none of them have ever made it to the binary distro. The last binary release was about 8 months ago, and the last release to make any additions to the API was almost a year ago. And the Permissions plugin included in the main binary distro has been broken for almost a year as well. Someone here also mentioned they had an idea for a simple package manager for plugins. That would be another amazing addition for the community. I think there are many more ideas like that floating around. We just need some encouragement and perhaps some written info about how to get them into the main distro.
Avatar
Avatar
🐨Dream Doctor🦘
I don't mean that as a criticism of anyone. There are some truly amazing people on this Discord like yourself, @Lethal and @Pelayori who have all shared some of their own brilliant modifications and additions to the core API, some very simple and some not, but as far as I can see none of them have ever made it to the binary distro. The last binary release was about 8 months ago, and the last release to make any additions to the API was almost a year ago. And the Permissions plugin included in the main binary distro has been broken for almost a year as well. Someone here also mentioned they had an idea for a simple package manager for plugins. That would be another amazing addition for the community. I think there are many more ideas like that floating around. We just need some encouragement and perhaps some written info about how to get them into the main distro.
I think that might've been me
5:45 AM
with the package manager idea haha (edited)
Avatar
🐨Dream Doctor🦘 1/11/2021 5:51 AM
There are some great open source package managers we could use, like conan.io for example.
Avatar
My plan is to make a Permission plugin rework, along with an arkshop and vote rewards one. But time has been none lately and couldn't advance them much 😬
7:36 AM
Also I have a bunch of things to add to the API utils
Avatar
🐨Dream Doctor🦘 1/11/2021 8:01 AM
Hey @Pelayori 🙂 Would your Permission plugin be something you'd consider working on together as a group and contributing back to the main distro?
Avatar
It isn't really something that would take a lot of time either, and I would make it open source if it made it to "official" , but if I need a second hand I'll tell you
8:11 AM
In fact thinking about it, only a TMap would be necessary to cache permissions
Avatar
🐨Dream Doctor🦘 1/11/2021 9:35 AM
I understand it's not a great deal of work, and I certainly understand in general we all prefer to work alone. I was more thinking that given it's such an important, commonly used part of the API, maybe we could at least get some agreement between interested parties on what any upgrades and changes would look like? I'm sure it would help Michidu's decision on whether to include it to know that it was agreed upon by a group of people.
Avatar
My plans for Permissions new features included: -Code rewrite, caching permission info in memory so no more waiting stages -MySQL syncing to memory data and viceversa -Timed Permissions
  • Modification of rates (harvest, tame, xp) based on group
  • Auto Tribe Rank
9:36 AM
I'd do a first release with just the data caching, and the other features would be coming up later when the plugin is in a stable state. We could have a beta branch of it too.
9:37 AM
We would have to talk to Michidu to see if we could update the official permissions or it would need to be a separate plugin
9:42 AM
But after all, I think permission data caching is a thing everyone should agree with, because it will give a performance boost for servers
Avatar
🐨Dream Doctor🦘 1/11/2021 10:03 AM
From the conversation I saw, Michidu is very well aware of the issues with Permissions, so I assume he'd welcome an official update.
Avatar
I sent him a message, waiting for his reply
10:08 AM
I already told him I planned a permission rework a while ago
Avatar
🐨Dream Doctor🦘 1/11/2021 10:12 AM
Some form of memory cache is obviously required, and I think moving the database access to another thread would be helpful also.
Avatar
Yeah, I've already moved to making mysql calls async.
Avatar
🐨Dream Doctor🦘 1/11/2021 10:38 AM
That's fantastic news. If there's anything at all anyone can do to help please let us know. That includes things like documentation and other boring stuff you may not want to do 🙂
Avatar
Avatar
Pelayori
My plans for Permissions new features included: -Code rewrite, caching permission info in memory so no more waiting stages -MySQL syncing to memory data and viceversa -Timed Permissions
  • Modification of rates (harvest, tame, xp) based on group
  • Auto Tribe Rank
Doing a PR on the permission plugin branch is probably the best approach. I think caching is the biggest advantage to updating the code base since it is sort of a core plugin. Timed permissions would auto expire or something? I guess that would require an update timer to periodically check or maybe removed when a cache update is run? I'm not sure how rates would fit into permissions though. That seems more of a thing a plugin would use permissions to determine. Not sure what "Auto Tribe Rank" means.
Avatar
Auto Tribe Rank means specific groups depending on number of tribe members
4:47 PM
But yeah, the rates were supposed for a custom permissions I was making, not the official one (edited)
Avatar
Avatar
🐨Dream Doctor🦘
I've just learned that wooly has made his own updated closed source, paid version of Michidu's Permissions plugin. This really worries me, given that it's such a core part of the API and that so many existing plugins are built against it. The issues he identified as needing fixing appear to be genuine, but they are also relatively easy to fix. I'd like to look at updating the proper, open source version of Permissions to address these issues as soon as possible. Would anyone else be willing to help out with this? It really does affect us all, and keeping Permissions open source is, in my opinion, extremely important for us all. How quickly can we get Michidu to review and accept the changes? (edited)
I Agree with this. And i think there should be 1. API and 1 Permission Plugin that is the core package for all plugins. It should NEVER cost. It's the base ground for everything. It should apply the same for everyone. And why it's open source is for someone to come with suggestion/improvement and improve what's already there. NOT to take it in and improve and re-sell.
Avatar
Avatar
Foppa
I Agree with this. And i think there should be 1. API and 1 Permission Plugin that is the core package for all plugins. It should NEVER cost. It's the base ground for everything. It should apply the same for everyone. And why it's open source is for someone to come with suggestion/improvement and improve what's already there. NOT to take it in and improve and re-sell.
i fully agree with what everyone had to say, this was going on long before too
12:50 AM
i consider permissions as one of the core plugins from the API and it should remain free and open source
Avatar
I'll make a first pass through the plugin to add in the realtime permission checks without database calls.
Avatar
Avatar
Pelayori
My plans for Permissions new features included: -Code rewrite, caching permission info in memory so no more waiting stages -MySQL syncing to memory data and viceversa -Timed Permissions
  • Modification of rates (harvest, tame, xp) based on group
  • Auto Tribe Rank
GSH | MrOwlSky 1/12/2021 4:01 AM
That would be amazing. Arkshop and Permissions both need some revamps for up to date trends this year.
Avatar
🐨Dream Doctor🦘 1/12/2021 5:51 AM
Maybe we should talk to Michidu about swapping out the license for the API and all his plugins from MIT to Common Clause or another less permissive license.
Avatar
I'm about 2/3 done converting permissions I should have the rest done for testing tomorrow.
Avatar
🐨Dream Doctor🦘 1/12/2021 6:57 AM
I think @Pelayori was working on his own version to submit to the official distro as well.
7:00 AM
As far as ArkShop goes, I agree entirely. There are a ton of features I'd love to see integrated into the official version. I've been working on a web gui myself which generates a config.json, but it would be great to add the ability for arkshop to pull config from a web address instead of a file. That's only a five minute task I know. There's also been a bit of a fad for people to create mods with a gui that works with their own versions of arkshop. It would be wonderful if the official version had some form of open interface that we could publish to the modding community, allowing that whole community to easily create shop guis. We'd no doubt see some wonderful things. (edited)
Avatar
I'll be working on my implementation this weekend.
8:08 AM
My plan was just using 2 TMaps, one with key uint64 for steamid and value of a TArray<FString>, then another one with key FString for group permissions
8:09 AM
So when the database is called, instead of querying the mysql, check the cached maps, and resync from db on a short interval
8:09 AM
With threaded calls
Avatar
Avatar
🐨Dream Doctor🦘
Maybe we should talk to Michidu about swapping out the license for the API and all his plugins from MIT to Common Clause or another less permissive license.
this is possible
8:28 AM
however it is VERY hard legally to enforce such a change
8:29 AM
generally you can make future code MIT, but to change the licenses requires explicit permission from every single contributor.
8:29 AM
and generally you can't retroactively change a license.
8:30 AM
@Pelayori any reason to use TMap and FString directly? I know those are what UE4 use internally, but I always felt it funny to use them by default and not simply copy/construct in-place as needed 😛
Avatar
I'm used to them already 😛
Avatar
@🐨Dream Doctor🦘 I will look into cleaning up and making a PR for my code that calls BP functions via UE4's reflection system. I want to add to UObject a Size() that computes the actual size of the object in bytes
8:31 AM
because some structs in the API are simply function wrappers and thus don't actually allocate the proper amount of memory
8:31 AM
which is why for most people, stuff like line tracing crashes, at it expects a pointer to a block of memory of n bytes. (edited)
8:32 AM
maybe I will make it like Class::DefaultEmpty() and have it construct in place a char[] casted to the type.
Avatar
Avatar
Pelayori
I'm used to them already 😛
that's fair 😉
8:32 AM
I need to reboot my PC
8:32 AM
Feelsbad
8:32 AM
updated Visual Studio for that sweet-sweet C++20
Avatar
🐨Dream Doctor🦘 1/12/2021 8:42 AM
Oh man, v20 has some amazing new stuff. Although it's stuff C++ should have had twenty years ago lol
Avatar
Avatar
🐨Dream Doctor🦘
Oh man, v20 has some amazing new stuff. Although it's stuff C++ should have had twenty years ago lol
this just in, I didn't need to reboot my computer
8:47 AM
I cheated by just changing the flag in the registery
8:48 AM
Avatar
Avatar
substitute
that's fair 😉
Yeah, as they are needed for game funcs I started using them eveywhere cause they are handy too
9:18 AM
Also permissions use them internally
Avatar
Avatar
Pelayori
Yeah, as they are needed for game funcs I started using them eveywhere cause they are handy too
Avatar
Avatar
Pelayori
So when the database is called, instead of querying the mysql, check the cached maps, and resync from db on a short interval
I have something similar using unordered_maps almost completed. I believe the way it is done there will not be a need for a timed update or threaded calls. I have updated the MySQL library used to include Port which previously it only allowed default install port to be used.
Avatar
How will adding a new player to group in another server replicate to the others, if in cluster? (edited)
Avatar
Avatar
Pelayori
How will adding a new player to group in another server replicate to the others, if in cluster? (edited)
Well that is a good point. 🙂
Avatar
Yeah that was the reason for resyncing 😛
12:51 PM
I might be able to get it done today so we can compare and see which one is better
Avatar
Mine is currently completed minus the cluster sync. I'm working on getting before and after performance metrics.
Avatar
Awesome, report back the performance impact
Avatar
Avatar
Pelayori
How will adding a new player to group in another server replicate to the others, if in cluster? (edited)
i was also thinking about this, best solution that could probably work is sending the player data via RCON to all servers
1:34 PM
or have a custom listener on a custom port that would be used for plugin communication across servers
Avatar
I think it's easy, add a on timer call back, and then resync from db every minute or so
1:35 PM
It won't require a lot of effort, and won't affect performance a lot since it'd be a query per minute or so.
1:35 PM
And threaded ^^
Avatar
I'm curious how big the permission tables grow on busy servers. In general databases can handle thousands of rows very easily. Performance is a much higher concern when you get into millions of rows in tables.
Avatar
I've been running a cluster since 2019 and I got 12-15k rows
1:45 PM
However, I don't think any of my current plugins spams permissions to make a big performance loss.
Avatar
The row size for the permissions tables is pretty low as well. Currently with my new permissions.dll the only select statements that run are when the plugin initially loads. Other commands that change the data like add/remove will run statements still and realtime update the local servers cache.
Avatar
Yeah, updating on real time is perfect too. The only thing is discussing how to replicate in cluster, I already exposed my idea, and will likely do it as well.
Avatar
Just need to figure out the more efficient way to handle the cluster sync. Updating too frequently will be a waste but updating too far apart isn't great either.
1:49 PM
2, 5, 10 minutes really is what i'm looking at for possible times.
Avatar
In my opinion, upadating every minute or 5 minutes would be the best.
1:50 PM
Could also let the server owner choose the timer interval
Avatar
Ya, default to like 5 and allow a config setting to change it.
1:52 PM
I'll start with this.
1:53 PM
Also I built the caching layer directly into the database headers so impact on the code is very minimal.
Avatar
I built some test data with 90k fake steamid rows and 100+ group name rows. I figure this will be much larger than anything actually being used. Local performance on my dev box seems to show 0 impact during the sync process.
3:17 PM
I don't run a cluster so need to find someone to real world test this as well.
Avatar
I reached out to server owners in my discord community for testing assistance.
Avatar
Mine is also done, I pushed it to my ark-api plugins forked from Michidu's latest. https://github.com/Pelayori/Ark-Server-Plugins/tree/master/Permissions
Server Plugins for ARK: Server API. Contribute to Pelayori/Ark-Server-Plugins development by creating an account on GitHub.
4:48 PM
I've been testing it and seems working absolutely fine.
Avatar
Lol i didnt read this channel and was working on the same thing last night
7:59 PM
you both did better caching than i did though
8:00 PM
ill branch of off Lethals PR and add my features
Avatar
Wait a minute
8:07 PM
There is a PR from Ownprox in the ark-api plugins repo, with the cache added :p
8:07 PM
Cache Added Default permission added to Default group Fixed admin detection when using AllowedCheaterSteamIDs.txt
8:08 PM
On 26 july
Avatar
his is closer to mine The main difference is that in his and mine there would be a max of 1 call per player per timeInterval and with Lethal or yours its 1 big threaded call every 5 mins Lethal already verified the large threaded call has no performance impact so the only actual difference i see is that in mine and Ownprox's cache the calls are dependant on Sql results if the cache is not populated and response time and are tied to the game thread whereas you both did the sql in a different thread I like the threaded load all approach better after comparing the 2 (edited)
8:15 PM
In addition to caching im going to be adding TimedPermissions and TribePermissions
Avatar
Yeah, as Lethal already made the PR I have plans to add it too
Avatar
oh, i dont want to double up with your efforts
Avatar
I have been with lots of ideas in mind for like a couple months but I can't get time for anything 🤣
8:17 PM
I don't mind if you also want to do it
8:17 PM
Different approaches can also be good
Avatar
i already coded the timed and tribe parts last night, but with crappier caching than you guys did
8:18 PM
so ill rewrite that off of lethals pr
Avatar
Welp, I still have to finish my vote rewards rework lol
8:19 PM
Been on standby for a month
Avatar
Avatar
Pelayori
Welp, I still have to finish my vote rewards rework lol
I'm re-working it too, almost done xD (edited)
Avatar
i thought vote rewards was foppa?
Avatar
Yeah, but I started it before it was taken up :p
Avatar
Only issues i have is the "IsLast" function
Avatar
So I will carry on as a different version with the features I wanted to add
Avatar
Avatar
Foppa
Only issues i have is the "IsLast" function
What is that func?
Avatar
Well there is known bug where you do a vote and do /claim and then if you try to /claim again it will never finish
Avatar
Oh yeah, I wrote it from scratch
8:23 PM
For that particular reason
8:23 PM
I might need to do that as well. Think it's not working logic enough.
Avatar
Yeah, reworked everything, and made my own request handler
Avatar
What other functions have you added? 🙂
Avatar
In the request callback, instead of having a config for each site, most of them use the classic 1 or 0 response instead of the new json one some sites are doing. So you can dinamically add new vote sites if the current request handler supports it. For example you can add a new site called "vote-my-ark-server.com/api/claim?steamid={}&serverkey={}" and if the response is 1/0 or such it can be handled without any more code
8:27 PM
Also vote rewards are way more customizable than a simple dino/level or item/quantity, etc..
Avatar
Okay! 🙂 Sound cool! Yeah, though ppl that use the plugin might not even understand how to setup that don't you think? 😛 Maybe that's good thing tho haha (edited)
Avatar
Yeah, but if they request you X site you can just tell them, add a new config entry with this api url: site.com
8:29 PM
heh
Avatar
Alright, i re-wrote some in the random generation function and added some discord integration, but just want to fix the isLast function before i release it (edited)
8:35 PM
And some crash fixes
8:36 PM
but yeah, it's quite stable now but yeah. Would be good maybe to have it fully customizable tbh.
Avatar
I thought it for more more than people, although some will appreciate the ability to allow customize the api urls
Avatar
with everyone trying to improve the permissions plugin, I think we should make an ISO Standard for Ark permissions
9:03 PM
pepeLaugh
9:03 PM
then you can have as many various implementations as you want that are all drop-in compatible
9:03 PM
I'm only half joking, Minecraft has a ton of various permissions plugins, and most are drop-in compatible due to them usually following a rather standard interface.
Avatar
Lol yeah, you can find a ton of permissions plugin for minecraft
9:05 PM
Anyways, if you keep the same function exports they should be compatible
Avatar
Nah, i think we all jsut need to discuss and contribute to the open source main one
Avatar
Avatar
Kal
Nah, i think we all jsut need to discuss and contribute to the open source main one
I disagree partially
9:54 PM
Some people may not want to use a database for their permissions
Avatar
could you elaborate on how that might work?
Avatar
Permissions via config?
Avatar
yep
Avatar
hmm, on that note while im adding tribe permissions should i add in a default permission for TribeSize-# for tribe sizes? (edited)
Avatar
flatfile, nosql
10:50 PM
etc.
10:50 PM
json, yml, tons of ways
Avatar
i mean you would be specifying steamids or tribeids right? (edited)
Avatar
you need to handle caching for the various forms of data storage
10:52 PM
if we want to create a standard for permissions, then the permissions plugin itself would just be a middleware translation layer between a plugin that does all the network/file/caching/etc.
Avatar
Thats where OwnProxs solution with a new layer for the cache was a little nice
Avatar
so that plugin can ask permissions -> permissions
10:52 PM
and permissions -> some handler
Avatar
i would still argue for 1 plugin and adding more storage/init options
Avatar
you run into the issue of one point of failure and a bloated plugin
10:53 PM
this could be made modular while forcing only one handler by having the permissions plugin loadlibrary the handler from the config file directly.
10:54 PM
this would also make it drop-in replaceable for the handler you want. Maybe you want to use some fancy new database that isn't compatible , instead of having to download and compile the entirety of the permission plugin (including all dependencies) you could just write your own handler
10:54 PM
and replace the default handler dll with yours
10:54 PM
otherwise every person that wishes to add a new backend for permissions would have to clone and build for all possible backends, while also bringing more dependencies into the project making it extremely bloated
10:55 PM
OR forcing people to make their own permissions compatible plugin instead
Avatar
Well nobody has asked for different storage options that I have seen so you might be looking at a problem that doesn't exist.
Avatar
I don't see a problem with having various permissions plugins that follow a standard, since building out a default one that loads a backend handler is basically the same thing.
Avatar
makes sense, whats the liklihood anyone will add another backend to it? Would it be worth the extra effort to make it modular?
Avatar
Avatar
Lethal
Well nobody has asked for different storage options that I have seen so you might be looking at a problem that doesn't exist.
This is mostly looking towards future proofing the plugin.
10:56 PM
and not everyone wants/can run MySQL, nor do they necessarily want to
10:56 PM
a hard dependency is never the best solution imho
Avatar
depends on the users and people extending it i suppose I doubt it would have much use beyond a default implementation we end up making
Avatar
even now, there are various ways to implement the plugin even in MySQL
10:57 PM
personally, I very much dislike building the queries directly into the plugin when I can use stored procedures instead
10:57 PM
which are significantly more secure when setup properly
10:58 PM
as the user executing them can have zero permissions outside of executing the procedures which protects my databases in the case of a compromised server.
Avatar
thats fair, but then we have to create the procedures when we create the tables
Avatar
which is why I said a hard dependency isn't a perfect / best world solution 😛 (edited)
10:59 PM
as for the sql procedures used by the plugin, we should remove these from the code (at least the CREATE ones) and move them into .sql files in a \SQL folder
Avatar
in a perfect world i totally agree with you, for this case i think it would be overkill
Avatar
that way if there's ever a need to update the sql it won't require a full plugin recompile
Avatar
hmm, i do like that
11:00 PM
if the plugins shipped with a .sql that had the create, default data, and stored procedures that could be pretty nice and clean up a lot of the plugin code
Avatar
Most likely though if you are changing table structure you are releasing supporting code with it anyways.
Avatar
i've been adding code to check and alter my tables when needed
Avatar
What you say makes sense from a business view in real world scenarios though.
Avatar
what substitute is describing is the type of discussion id expect to hear at work, not on ark api xD
Avatar
SublimeStyle 1/12/2021 11:01 PM
i lurk a lot, but Substitute is right... it's why ORM/ODMs are so great
11:02 PM
loose coupling high cohesion
Avatar
my only argument is for lack of use in the community not justifying the effort
11:02 PM
i totally agree fundamentally
Avatar
Avatar
Kal
what substitute is describing is the type of discussion id expect to hear at work, not on ark api xD
Hey, it's important, if we are going to do it, might as well do it right 😄
Avatar
SublimeStyle 1/12/2021 11:04 PM
there will always be an argument for robustness vs expedience, so I agree, but I don't think expedience is the priority in this case IMO
11:04 PM
@Kal
11:05 PM
and sorry, I usually just stfu and watch the chat, but when ya'll start talking about this stuff I get excited
Avatar
@SublimeStyle you should see some of the stuff I sent to @Pelayori
Avatar
feel free to tell me im agruing for laziness and to back off and let it happen haha no offense taken
Avatar
let's just say, if I can get motivated to clean it up and add it to the base API, it would add an incredible amount of potential to plugins
Avatar
Im watching and it just goes over my head... lol
Avatar
Why don't we rename Substitute to "Template Crazy"
Avatar
Templates are insanely useful
Avatar
SublimeStyle 1/12/2021 11:06 PM
template metaprogrammer over here
11:06 PM
xD
Avatar
they're not hard!
Avatar
haha just dont look at my code Substitute 😮 (edited)
Avatar
template<typename T> constexpr std::tuple<T> unpackParameter(char* memoryBlock, int& offset) { alignMemory<T>(offset); T item; memcpy(&item, memoryBlock + offset, sizeof(T)); offset += sizeof(item); return std::make_tuple(item); } template<typename T, typename ...Rs, typename std::enable_if<sizeof...(Rs) >= 1, bool>::type = true > constexpr std::tuple<T, Rs...> unpackParameter(char* memoryBlock, int& offset) { return std::tuple_cat(unpackParameter<T>(memoryBlock, offset), unpackParameter<Rs...>(memoryBlock, offset)); } template<typename ...Rs> constexpr std::tuple<Rs...> unpackParameters(char* memoryBlock, int offset) { return unpackParameter<Rs...>(memoryBlock, offset); } template<typename ...Rs> constexpr std::tuple<Rs...> unpackParameters(char* memoryBlock) { return unpackParameters<Rs...>(memoryBlock, 0); } compile time, unpacks the struct pointed at by void* into a tuple of the supplied types
11:08 PM
template<typename T> inline void alignMemory(int& offset) { int size = sizeof(T); int align = alignof(T); offset += (align - (offset % align)) % align; }
11:08 PM
handles memory alignment as well
11:08 PM
I'm really proud of it, but I don't have a use for it anymore
11:08 PM
Feelsbad
Avatar
i consider myself a pretty capable developer, but i have no clue wtf you are doing lol (edited)
Avatar
KermitG (edited)
11:10 PM
@Kal one thing I am adding is blueprint function hooking
11:11 PM
11:11 PM
the API for it is extremely clean
11:11 PM
first string = event name, second = callback name (to remove it later), third = std::function callback
Avatar
I have been interested to use that a couple times
Avatar
I will spend some time to write my own void* unpacker using run-time reflection data
11:12 PM
I do the inverse of it for the code I wrote to call blueprint functions
Avatar
the plan is to properly check if the type you pass it is large enough to hold the data (it will throw an exception if not instead of corrupting your memory)
Avatar
Have you poked around at the AHud and AShooterHud at all? I havent had any luck
Avatar
but I will have a template specialization for std::any that just makes a char[] the size of the property
11:12 PM
and then you could later any cast
Avatar
Avatar
Kal
Have you poked around at the AHud and AShooterHud at all? I havent had any luck
UMG elements are client sided
Avatar
atleast some of the controls for them are still server side
11:13 PM
for instance sending notifications
Avatar
@Lethal the hook is super clean too auto spongehax::process_event(sdk::UObject* who, sdk::UFunction* what, void* how) -> void { while(!tick_queue.empty()) { tick_queue.front()(); tick_queue.pop(); } const auto func = what->GetName(); auto handled = false; for (auto [_, callback] : process_event_handlers[func]) { handled = callback(who, how); if (handled) break; } if (!handled) process_event_.original(who, what, how); }
11:13 PM
but one thing I want to consider is
11:13 PM
event names can be shared
11:13 PM
you can filter these by using the full name of the ufunction
11:14 PM
but that requires knowing the full name
11:14 PM
personally, I filter later by checking the type of the object (in my callback), but this is something that can be considered. (edited)
11:15 PM
@Lethal
11:15 PM
I wrote this for my Spongebob hack, lol. (edited)
SpongebobIDC 1
Avatar
One thing i was really trying to use was the DinoMapMarkers i was hoping to use this for tribemates and corpsefinder to have pins on your minimap similar to how a titan displays on your minimap
Avatar
oh @Pelayori I forgot to mention
11:16 PM
I have scanning of GObjects in my local copy of the ark api too
Avatar
Oh cool
Avatar
it is very cool, because then you can get a reference to things like KismetSystemLibrary
11:17 PM
which may not have a native pointer
Avatar
I tried hooking some static function but the _this of kismet was nullptr
Avatar
yeah, it's a tricky one
Avatar
hmm, that could be helpful I was wondering if there would be a good way to rewrite GetAimedActor it is very picky about being dead on, and i would like to make it ignore trees and suchs
11:19 PM
also the spyglass is more of a cone shape collision (edited)
Avatar
GetAimedActor
It depends on your usage here. If you're calling this, you could check out how it's implemented and write your own
11:19 PM
if you want to change how the server is doing it for everything, hooking would be the way to go.
Avatar
With 80% of trace functions crashing in API , might be not possible
Avatar
no, the server is likely using something else the spyglass itself is not as picky as the GetAimedActor
Avatar
Avatar
Pelayori
With 80% of trace functions crashing in API , might be not possible
that's only because you're calling the sketchy, usually broken ones from C++ using improperly sized structs
Avatar
Because the spyglass is probably doing a trace on tick
Avatar
it really is apparent when in trees or bushes
Avatar
traces have no issues from my BPExec
11:20 PM
Avatar
any thoughts on how i might ignore certain classes (bushes, trees, resources, but not mesh) and get a shape closer to the spyglass view?
Avatar
you would need to do your own trace and add either those classes to the ignored or do it by channel
Avatar
GetAimedActor has channels, might be worth trying with those
Avatar
i wasnt clear on how the channels work
Avatar
The channels are written in some .ini file in the game
Avatar
I forgot to mention @Pelayori you can dump the OP codes of the blueprint functions as well
Avatar
i tried changing it randomly and didnt have any luck beyond sometimes not working at all (edited)
Avatar
I want to look into that ... could see how some things work that may be unavailable
11:22 PM
e.g. changing how a mod works (edited)
Avatar
also, when i was messing with the MulticastDrawDebug* i had an issue that any of them that didnt have the enableInShipping option didnt show up in the client, ended up drawing my own arrow out of line segments haha
11:25 PM
Ty Pela
11:25 PM
will go back and mess with that some more now
Avatar
The most used one is 2, which is weapon
Avatar
that makes sense, would go through leaves and shit but still hit trees and rocks
Avatar
Avatar
Kal
also, when i was messing with the MulticastDrawDebug* i had an issue that any of them that didnt have the enableInShipping option didnt show up in the client, ended up drawing my own arrow out of line segments haha
easy, just write your plugin for the devkit
11:30 PM
wesmarts
11:31 PM
but non-joking, could see about writing a dll you could inject to make everything enableInShipping
11:31 PM
would just have to make sure to disable BattlEye and VAC before running your game. (edited)
Avatar
ahh, easier to do math and draw an arrow since thats all i really need for now
Avatar
I have issues with multicast draw debug sphere, where multicast line works lol (edited)
Avatar
i was really hoping to find something similar to the multicast but for screencoords instead of world coords lol, no luck obviously
11:32 PM
sphere worked for me
Avatar
Did it? I can't seem to make it work
Avatar
100% its in one of my released plugins
11:33 PM
and lethals orp uses it
Avatar
Hmm
11:34 PM
I can't seem to make it work by any means and I've spent a few hours on it only already
11:35 PM
shooter_pc->MulticastDrawDebugSphere(teleport.fromLoc, 300 * teleport.bubbleSizeInFoundations, 40, FLinearColor(1, 0, 0), duration, true);
11:35 PM
maybe you were giving too small or big of a radius or too few segments?
Avatar
Oh, I was multicasting it from the player character
Avatar
ah, try the pc
Avatar
Will give that a go, thanks
Avatar
Avatar
substitute
it is very cool, because then you can get a reference to things like KismetSystemLibrary
that’s actually really cool tho, i needed the FOnlineSubsystemSteam or smth like that
11:37 PM
a few days ago
Avatar
damn, what are you working on lol
11:38 PM
blacklist?
Avatar
Probably his hwidbans
Avatar
nah it’s for sotf 2.0 revival
Avatar
Oh lol
11:38 PM
Are you working on it too?
Avatar
yes
Avatar
Seems like a very cool revival
11:38 PM
ngl
Avatar
but mostly just our servers
Avatar
I played official soft a few times and meh
Avatar
like the ppl i own the servers with
11:39 PM
had some drama with the mod author
11:39 PM
so we decided it was best if we just moved on improving with plugins
11:39 PM
lol
Avatar
but yeah Substitute really knows his shit lol
11:40 PM
he told me alot about BP hooks
11:41 PM
Avatar
ive honestly just skimmed past all the BP functions, now i need to look back and see if they spark any ideas (edited)
Avatar
my shit is a bit ghetto but i get bp func name and save it in map
11:41 PM
by internal index
11:41 PM
then if it's a match it calls the function (which is the value)
11:42 PM
Avatar
oh wow lol
11:42 PM
i mean, if it works!
Avatar
bp hooks are insanely useful for mod hooks
11:43 PM
this is how i can even tell if the match begun in sotf 2
11:43 PM
lol
Avatar
i was curious if we could trigger or use any of the leaderboard ui stuff in ark
Avatar
from sotf ?
Avatar
wc does have code from sotf in ark
11:44 PM
team based spectating is enabled
Avatar
i keep seeing it around, not sure what is usable
Avatar
like it’s still ingame
Avatar
even using the leaderboard to have a UI ingame playerlist would be something
11:45 PM
havent messed with it all
Avatar
you’d rather make a mod for the ui
11:45 PM
and then call the ui open function from your plugin
11:45 PM
u can pass data from plugin -> mod this way
Avatar
not very interested in making mods aiming to replace all the mods that i feel are necessary
Avatar
understandable
Avatar
was thinking over cryos the other day
11:47 PM
and trying to make them closer to soul balls
Avatar
what’s the diff lol
Avatar
something like - Extra description when dino is cryos - Configurable cryo sickness - No sickness near base option - auto cryo new babies in range - optionally mature and imprint cryo babies when they are uncryod - optionally add a not near enemy structure option - optional no cryo after dmg/tame - override time to cryo - Toggle mating for area
Avatar
ah
Avatar
seeing the points, current stats, and if it has a saddle while its in cryo is really nice
11:48 PM
if i could even just start with that and write extra description on the cryopod when you cryo or release
Avatar
u can modify item description
Avatar
yea, nothing blocking me from doing most or all of those things
11:50 PM
and for replacing S+, i was struggling with changing fuel requirements and noise output on crafting stations, idk if youve looked at those at all
Avatar
I don't think you can change noise, since the sounds are played on the client?
Avatar
actually me and my team were discussing that like yesterday
11:51 PM
lmao
Avatar
i tried hooking several of the noise methods and didnt have much luck
Avatar
we need to up the charcoal craft speed of the forge
11:51 PM
without s+
Avatar
also wanted to change volume of global noises like bosses (or for PFET) (edited)
11:52 PM
oh, ive already done that one
11:52 PM
can share
Avatar
Avatar
Pelayori
I don't think you can change noise, since the sounds are played on the client?
maybe if you nullptr the sound field
11:52 PM
of the APrimalItem
Avatar
Yeah but the client still gets the sound, doesn't it?
Avatar
APrimalStructure
11:52 PM
i mean
11:52 PM
well
Avatar
As far as I know it isn't replicated
Avatar
well
11:53 PM
it kinda is
11:53 PM
so what i did
11:53 PM
is i had a bow
11:53 PM
and i got it’s default item
Avatar
well, i changed the crafting speed of the forge which increased both coal and ingots, but it would have been trivial to add more conversions or change the speeds at that point
Avatar
from the bp class
11:53 PM
i changed it’s equip speed
11:53 PM
and now all bows had the diff equip speed
11:53 PM
so it’s most likely replicated
Avatar
i had been changing each crafting station instance, not the default object
Avatar
in the case of the bow
11:55 PM
what i said worked
Avatar
batman, if you end up doing some of the S+ functions add auto doors too xD
Avatar
oof that one would be interesting lol
Avatar
intake without water source and automatic doors
Avatar
Avatar
Kal
intake without water source and automatic doors
intake without water was a big hassle for me and ownproz
11:56 PM
ownprox
11:56 PM
sorry can’t fucking type
Avatar
i guess it depends on how ark blocks it/checks for water
Avatar
well
11:56 PM
neither me or him tried multicast tbh
11:56 PM
because there is a field
11:56 PM
on the primalitem
11:57 PM
that’s like RequiresWater
11:57 PM
and the client won’t send the placement unless it’s false on the client
11:57 PM
so prob we fucked up in not replicating it after changing
Avatar
pipes and shit have their own subclass btw
Avatar
to the same point, i was wondering if lethals Dinos+ could be changed to replicate the canUse[12] on fliers to make the UI button work
Avatar
Avatar
Kal
to the same point, i was wondering if lethals Dinos+ could be changed to replicate the canUse[12] on fliers to make the UI button work
yes!
Avatar
it still shows the +
11:58 PM
though
11:58 PM
but you can’t press it
11:59 PM
same for players
Avatar
there are 2 fields,DontUseValueField & CanLevelUpValueField
11:59 PM
both had movement = 0 for ptera
12:00 AM
guessing 1 controls the button, and 1 is for the hook
Avatar
oh i haven't tried making something that's unlevelable levelable
12:00 AM
i did the reverse lol
Avatar
i wanted to have native speedy fliers
12:00 AM
without the /levelspeed command
Avatar
cause in sotf 2.0 dinos can't level speed
12:00 AM
yeah that's a nice one
12:01 AM
maybe setting the CanLevelUpValue could work
12:01 AM
actually no
Avatar
i had tried, but again, i was fucking with a particular ptera
Avatar
it should be reverse
Avatar
not the default object
Avatar
because the level function is already called
12:01 AM
when it checks the value of CanLevelUpValueField
Avatar
are you sure?
Avatar
and if it's 0 it just doesn't go through with adding the point
Avatar
the client has be looking at the Ptera bp for weather or not that button is enabled
Avatar
let me double check
Avatar
if we could replicate the bp to client and change the field it should enable button
Avatar
should take a look at the devkit
Avatar
i got as far as opening and getting lost in dev kit, finding nothing like what i thought i was looking for, and not trying again
Avatar
lol yeah i feel you
12:03 AM
i simply don't understand how people justify working in it
12:03 AM
just having to do something in devkit makes me want to not do the project at all
Avatar
well, that was my instinct without actually having the experience in dev kit to justify it haha
12:05 AM
12:05 AM
CanLevelUpValue is only checked after the button was clicked
Avatar
fk, so what controls the damn button?
Avatar
yeah good question
12:05 AM
😄
Avatar
thats basically what i was getting out of my testing was that both of those seemed to function identically
Avatar
well, the hiding and unhiding the + is something i want to have for sotf 2.0 as-well so if i find out how it works i'll let you know
Avatar
alright lol
12:07 AM
perhaps the inventory hud itself is doing a check somewhere
Avatar
that would be very fucked up lol
12:07 AM
if instead of the dino bp having that value on it the ui had it
Avatar
haha i mean like the hud also looking at the dino bp
12:07 AM
in addition to that method you sent
12:08 AM
basically a double check i guess
12:08 AM
idk, just speculating
Avatar
Thanks for the shoutout @WETBATMAN
Avatar
not really, i just stated facts, you know what you're doing super well 😉
Avatar
Avatar
Kal
to the same point, i was wondering if lethals Dinos+ could be changed to replicate the canUse[12] on fliers to make the UI button work
Pretty sure this is client side blocked with non-replicated data just like element not being uploadable to arkdata.
Avatar
🐨Dream Doctor🦘 1/13/2021 4:01 AM
Wow, that's more chat overnight than we've seen on this discord for an entire year 😉 So where did we get up to with Permissions? Am I right in saying it seems to have moved from @Pelayori to @Lethal and now to @substitute ?
Avatar
i think we all added cache slightly different Substitute is saying for a rewrite to support extensible backends for permissions I'm planning to make a PR on top of lethals to add Timed and Tribe permissions
Avatar
Yeah I was merely suggesting something, not that I wrote something myself.
Avatar
Hoping to add defaults for TribeSize:# TribeOnline:# If i can do it without a performance impact
Avatar
Avatar
Kal
Hoping to add defaults for TribeSize:# TribeOnline:# If i can do it without a performance impact
are you using my font by-chance?
Avatar
i think so, i changed fonts to mess with chinese at one point
9:36 PM
I just like seeing it in the wild
9:37 PM
I think it had like 5k downloads before I moved it to S3 (and thus lost DL count tracking)
Avatar
im sure its everywhere lol
Avatar
wouldn't be needed if WC would update their engine to use runtime cached fonts
9:38 PM
Feelsbad
Avatar
@substitute @WETBATMAN @Lethal @Pelayori Would like opinions, feedback, changes https://github.com/Michidu/Ark-Server-Plugins/pull/42
12:26 AM
@Foppa
Avatar
squashed it down to 1 commit so its easier to read
Avatar
I like it, Looks like a really good improvement + the caching from lethal.
Avatar
will add tribesize and tribe online count to any plugins that support permissions 😛
12:52 AM
preferably would be a merge and new release on the official permission plugin
Avatar
Deleted User 1/15/2021 1:25 AM
hi good day.
1:25 AM
When I run Server Api Hooker Creator.exe, it says "Failed to create SSL/TLS secure channel". Can anyone help with this?
1:25 AM
Avatar
Avatar
Kal
@substitute @WETBATMAN @Lethal @Pelayori Would like opinions, feedback, changes https://github.com/Michidu/Ark-Server-Plugins/pull/42
I think that looks good
3:07 AM
Maybe format the text with some coloring
3:07 AM
You can do this in line
Avatar
yea, i added a flag and colored the tribe permissions at last second
3:07 AM
could color the end and activate times too
Avatar
Yep
3:07 AM
Green for activate
3:07 AM
Red for remove
3:07 AM
Or green for active
3:07 AM
Yellow for to become active
Avatar
feel free to make a commit on top
3:08 AM
😛
3:08 AM
i think foppa is gonna ask mich about releasing a new official permissions
Avatar
Maybe later, I have a project for computer networks I want to get a head start on. Need to make a server and client, and I chose to do it in C++ 😛 (edited)
3:09 AM
Since I’m on windows I need to support Linux and windows
3:09 AM
I’m just writing abstraction later right now
Avatar
had a choice and chose c++ 😢
Avatar
I’m not using Java
Avatar
im jk, its great for complex thinks or things that need to be quick
3:09 AM
just not great for quickly developing
Avatar
It’s also great for flexing
3:10 AM
Which is what I plan on doing
3:10 AM
People will struggle to get it done in Java
3:10 AM
While I turn in C++ native code that works on the Linux machine and on Windows machines
Avatar
thats fair, just depends on the project 😛
Avatar
First is a single threaded server
3:12 AM
Second is multi threaded
3:12 AM
And clients ^
Avatar
Any thoughts on implementing something like this? ex. ARK_API void AddPlayerPermissionCallback(FString CallbackName, bool onlyCheckOnline, bool cacheBySteamId, bool cacheByTribe, const std::function<TArray<FString>(uint64*, int*)>& callback); ARK_API void RemovePlayerPermissionCallback(FString CallbackName); FArray<FString> HasRaidProtection(uint64 steam_id, int tribeId) { TArray<FString> result; if (LethalORP::HasRaidProtection(tribeId)) result.add(FString("RaidProtected")); return result; } FArray<FString> HasPvpCooldown(uint64 steam_id, int tribeId) { TArray<FString> result; if (LethalORP::HasPvpCooldown(steam_id)) result.add(FString("PvpCooldown")); return result; } Permissions::AddPlayerPermissionCallback("RaidProtected", true, false, true, &HasRaidProtection); Permissions::AddPlayerPermissionCallback("PvpCooldown", true, false, false, &HasPvpCooldown); (edited)
Avatar
Added that to my pull request
5:47 AM
@substitute wdyt? 😄
5:49 AM
now for instance my solo farm can easily be setup to be based on TribeSize, TribeOnlineCount, PvpCooldown, etc without rewriting pvp cooldown in each plugin slightly differently
5:50 AM
and chat tags based on permissions based on plugin specific functionality can be easy without integrating each plugin into chat (edited)
Avatar
Avatar
Kal
Any thoughts on implementing something like this? ex. ARK_API void AddPlayerPermissionCallback(FString CallbackName, bool onlyCheckOnline, bool cacheBySteamId, bool cacheByTribe, const std::function<TArray<FString>(uint64*, int*)>& callback); ARK_API void RemovePlayerPermissionCallback(FString CallbackName); FArray<FString> HasRaidProtection(uint64 steam_id, int tribeId) { TArray<FString> result; if (LethalORP::HasRaidProtection(tribeId)) result.add(FString("RaidProtected")); return result; } FArray<FString> HasPvpCooldown(uint64 steam_id, int tribeId) { TArray<FString> result; if (LethalORP::HasPvpCooldown(steam_id)) result.add(FString("PvpCooldown")); return result; } Permissions::AddPlayerPermissionCallback("RaidProtected", true, false, true, &HasRaidProtection); Permissions::AddPlayerPermissionCallback("PvpCooldown", true, false, false, &HasPvpCooldown); (edited)
use an enum/flag for this
7:59 AM
only needs 2 bits really
7:59 AM
00 = false,false 01 = false,true 10 = true,false 11 = true,true
8:00 AM
are these in the base permissions plugin?
8:01 AM
if not, I think we should like make our own "RFC" for what permissions should always exist in the permissions api
8:01 AM
because it can become a problem of "well shouldn't the PVP handling plugin choose the permissions" vs "well this is a rather core feature of the game so it should be included"
8:02 AM
other than that, lgtm
8:02 AM
8:02 AM
maybe make things like this into const references
8:02 AM
e.g. const FString&
8:02 AM
better than doing a value copy of the whole FString
Avatar
🐨Dream Doctor🦘 1/15/2021 12:38 PM
Are schools still teaching Java?? Do they include "Introduction to Fax Machines" and "Beginners Guide to Fortran" in that Java course? (edited)
12:39 PM
"Visitors Guide To The USSR" maybe?
Avatar
No just the callback parts are in base permissions
3:05 PM
And yeah, still teaching java haha And you joke but I did have a fortran class haha
3:05 PM
Const reference makes sense
3:06 PM
I feel like this makes permissions easily extensible for plugins that may have a state to share with others
3:06 PM
And a way to abstract away WHICH pvp cool down plugin you have
Avatar
Avatar
🐨Dream Doctor🦘
Are schools still teaching Java?? Do they include "Introduction to Fax Machines" and "Beginners Guide to Fortran" in that Java course? (edited)
I don’t like Java, so now I’m writing my socket server and client in C++
4:12 PM
And like the mad lad I am, I am supporting Windows and Linux
4:12 PM
Avatar
whats the project?
Avatar
SublimeStyle 1/15/2021 4:25 PM
What year are you both in? You in the US?
4:27 PM
If ya don’t mind me asking 🙂
Avatar
Avatar
Kal
whats the project?
Iterative socket server and threaded client (mostly to hit the server with many clients)
Avatar
Avatar
SublimeStyle
If ya don’t mind me asking 🙂
USA. I already have an AS degree but not all of my credits transferred properly. As of now, I’m roughly a Junior in regards to my BS degree.
Avatar
Avatar
Kal
whats the project?
The server has to implement a few commands that run via system() and return the results
4:31 PM
I need to change my recv and send wrapper, right now it truncates the message to the buffer, which isn’t long enough. I’m not going to let it be an n length buffer still though as that’s bad for security (keep pushing data until OOM)
4:31 PM
Probably will do 1kb chunks up to 1mb
4:32 PM
And force a truncate at 1mb as no message in this project should even be near 1mb
Avatar
Avatar
substitute
USA. I already have an AS degree but not all of my credits transferred properly. As of now, I’m roughly a Junior in regards to my BS degree.
SublimeStyle 1/15/2021 4:33 PM
Cool cool! USA here as well
Avatar
@SublimeStyle Computer Science and Applied Mathematics double major
Avatar
I setup my own wrappers around the socket apis
4:34 PM
And based on build config it changes how they’re defined
4:34 PM
Since WIN32 and Linux are different
Avatar
Avatar
Kal
@SublimeStyle Computer Science and Applied Mathematics double major
SublimeStyle 1/15/2021 4:34 PM
I see you are a glutton for learning lol
Avatar
more like indecisiveness, started at Chemical Engineering lol
Avatar
I’m just getting my Computer Science degree
Avatar
i graduated in 2015
Avatar
Calc 1&2, Physics 1&2, Linear Algebra are more than enough math for me
Avatar
SublimeStyle 1/15/2021 4:36 PM
I’m senior year SE/HCI myself, but have AS in web design and another in app dev. Hoping to get into OMSCS- great program for the price 🙂
Avatar
i had > 20 math courses in college lol
🔥 1
Avatar
SublimeStyle 1/15/2021 4:36 PM
Lol that’s good tho!
4:37 PM
Math is an area I’m weak in- gonna have to refresh for grad school 😦
Avatar
but let me tell you what, when the multicast arrow didnt work and i had to recreate an arrow out of line segments i felt really proud of myself for knowing how to do it without looking shit up
4:37 PM
lol, bout the only use for my math degree so far
😂 1
Avatar
SublimeStyle 1/15/2021 4:38 PM
I think it’s more about the practice
4:38 PM
Good problem solving skills
4:38 PM
Especially discrete math
Avatar
yea, most important thing i got from college is learning how to learn new things quickly
Avatar
There’s some usefulness of various maths
4:38 PM
Like Linear makes dot product trivial (edited)
4:38 PM
AB^T
Avatar
SublimeStyle 1/15/2021 4:39 PM
Yeah stats, discrete, trig IMO are the most commonly used in CA
4:39 PM
CS
Avatar
having atleast up to linear algebra is great
👍 1
Avatar
SublimeStyle 1/15/2021 4:39 PM
Agreed
Avatar
abstract algebra is pretty cool
Avatar
Avatar
Kal
having atleast up to linear algebra is great
I got a C+ in linear (it was only remote due to COVID)
Avatar
SublimeStyle 1/15/2021 4:39 PM
It felt like coding on paper lol
Avatar
That was good enough for me
Avatar
SublimeStyle 1/15/2021 4:39 PM
If that makes sense
Avatar
yeah, im glad i was able to do everything in in person classes
Avatar
But I also have ADHD any paying attention to a 90 minute zoom call is impossible
4:40 PM
So I usually had to just figure it out later on my own time
Avatar
i dont think id do well with remote learning for school its fine now for work
Avatar
Avatar
substitute
But I also have ADHD any paying attention to a 90 minute zoom call is impossible
same issue
Avatar
SublimeStyle 1/15/2021 4:41 PM
Oof I’m on the fence about COVID- good for my introvert personality, but I agree I think in class is more conducive to learning
Avatar
I’m taking compilers also now
4:41 PM
But we get to use antler
4:41 PM
So that’s nice
Avatar
Avatar
substitute
I’m taking compilers also now
SublimeStyle 1/15/2021 4:41 PM
That’s one class I won’t take lol but you’ll learn a lot
Avatar
im too lazy/procrastinator for remote learning, and cant pay attention to whole thing unless stuck in the a lecture room
4:42 PM
operating systems was a very interesting class
Avatar
SublimeStyle 1/15/2021 4:42 PM
Our compiler class has you write your own by the end of the quarter in C (edited)
Avatar
we wrote linux activity monitor from scratch for one of the projects
Avatar
SublimeStyle 1/15/2021 4:43 PM
Nice
4:43 PM
Cool to ‘meet’ you both 🙂
Avatar
Avatar
Kal
we wrote linux activity monitor from scratch for one of the projects
My intro to system software class had us write an assembler for a made up assembly (SIC) in C
4:43 PM
KEKW
4:43 PM
So I wrote a ton of macros to make C into bootleg C++
Avatar
my favorite class i had, dont remember the class name, but we had a semester long project that was nand2tetris.com with lectures
Avatar
Including my own “string” object (edited)
Avatar
you can take the course online for free, highly recommend it
👍 1
Avatar
SublimeStyle 1/15/2021 4:45 PM
I think the low level projects are super helpful, but damn I don’t miss them. I’m a web dev and like my Python and web frameworks lol
Avatar
from a single logic gate (nand) to building the others, to building simulated hardware, to building an operating system, then a language, then a tetris game
Avatar
SublimeStyle 1/15/2021 4:46 PM
What do you do currently @Kal ?
4:46 PM
As far as work I mean
Avatar
Avatar
Kal
from a single logic gate (nand) to building the others, to building simulated hardware, to building an operating system, then a language, then a tetris game
SublimeStyle 1/15/2021 4:47 PM
That’s an awesome course, idk if I could do it lol
Avatar
erm, ever searched for anything?
Avatar
SublimeStyle 1/15/2021 4:48 PM
Never
Avatar
ahh, then youve probably never heard of my company
Avatar
he works for Bing
Avatar
SublimeStyle 1/15/2021 4:48 PM
Bing,
4:48 PM
Omg
4:49 PM
I was gonna list them all but bing was the 1st one
4:49 PM
yea, its bing
Avatar
SublimeStyle 1/15/2021 4:49 PM
Nice man!
Avatar
gotta love bing
Avatar
you ever just
4:49 PM
4:49 PM
Feelsbad
4:49 PM
@Kal some of the disgusting C macros
Avatar
oh good golly
4:49 PM
Feelsbad
4:50 PM
pseudo constructor and destructors
4:50 PM
that I added to C
Avatar
i bet debugging isnt easy lol
Avatar
and my memory safe string that allowed for n-length via appending
4:50 PM
FUNCTION(string, append, void, const char* data) { unsigned int nextLength = _this->length + strlen(data); if (!VALID(data) || nextLength == _this->length) return; if (nextLength >= _this->limit) { unsigned int nextLimit = _this->limit; while (nextLength >= nextLimit) nextLimit <<= 1; _this->c_str = realloc(_this->c_str, nextLimit); memset(_this->c_str + _this->length, 0, nextLimit - _this->limit); _this->limit = nextLimit; } strcpy(_this->c_str + _this->length, data); _this->length = nextLength; }
4:50 PM
pepega
Avatar
Avatar
Kal
i bet debugging isnt easy lol
it was aids
Avatar
i try to avoid low level languages
4:51 PM
😦 (edited)
Avatar
Avatar
Kal
i try to avoid low level languages
I could use Java for my networks project
4:52 PM
but I'm not going to use Java
4:52 PM
LULLLLLL
Avatar
SublimeStyle 1/15/2021 4:52 PM
But instead you’re a masochist lol
4:52 PM
Jk
Avatar
he said the Linux env. has .Net
4:52 PM
but
4:52 PM
doubt
Avatar
i mean, my job is just "sorta angular" + a java backend
4:53 PM
java at massive scale when everything you could ever want is defined and organized is pretty nice
Avatar
SublimeStyle 1/15/2021 4:53 PM
Idk man I prefer C++ too over Java but I just know more of it- I think I would like Java more had I used it more in my classes/work
Avatar
speaking of, if either of you looking for a job when you graduate hit me up for referrals
🔥 1
🙏 1
Avatar
C++ isn't so bad 😛
Avatar
Avatar
Kal
speaking of, if either of you looking for a job when you graduate hit me up for referrals
I have a job currently with a local start up but I'm always looking for a job with benefits
4:54 PM
dogekek
Avatar
lets just say nothing can top it unless you own a company that goes to the moon (edited)
Avatar
Avatar
substitute
C++ isn't so bad 😛
SublimeStyle 1/15/2021 4:54 PM
Lol my C++ code is decidedly much worse
Avatar
my recv and send wrappers aren't as clean
4:55 PM
auto recv(const SOCKET socket) { char message_buffer[1024] = { 0 }; ::recv(socket, message_buffer, 1024, 0); if (message_buffer[1023] != 0) { std::cout << "Message exceeds buffer and will be truncated!" << std::endl; message_buffer[1023] = 0; //we must have a null terminator for safety. } return std::string(message_buffer); } auto send(const SOCKET socket, const std::string& message) { if(message.length() > 1023) { std::cout << "Message exceeds buffer and will be truncated!" << std::endl; ::send(socket, message.substr(0, 1023).c_str(), 1024, 0); //substr shall have a null terminator, 1023+1 } else { ::send(socket, message.c_str(), static_cast<int>(message.length() + 1u), 0); //1023+1 } }
4:55 PM
since those functions expect char*
Avatar
at least your end result should be pretty readable logic without all the low level shit
👍 1
Avatar
yeah that's the plan
4:56 PM
my includes are a disaster though
4:56 PM
4:56 PM
since Linux and Windows have different files for sockets
4:57 PM
but
4:57 PM
4:57 PM
the end result is actually nice to work with.
4:57 PM
until theres a problem you have to track down lol
Avatar
that's what Visual Studio is for
Avatar
one of the most important things of computer science, a lot of smart people before you have done all the low level shit and run into all the problems and gone through all the pain of creating their libraries and higher level languages you should try to take advantage of that where possible so that you can quickly achieve what you need instead of getting lost in the weeds
👍 1
5:00 PM
with the obvious exception when there are specific low level things you need to do
Avatar
Avatar
Kal
one of the most important things of computer science, a lot of smart people before you have done all the low level shit and run into all the problems and gone through all the pain of creating their libraries and higher level languages you should try to take advantage of that where possible so that you can quickly achieve what you need instead of getting lost in the weeds
I do for work.
5:00 PM
(Linux working ldyay ) (edited)
5:01 PM
my job is mostly stuff like Typescript, F#, etc.
Avatar
never tried F#
Avatar
but for this project, why not do C++ sockets
5:01 PM
not only a great flex
5:01 PM
but a great way to learn about lower level socket programming (edited)
Avatar
if those are your goals then its the right choice 😛 always different for each project
Avatar
SublimeStyle 1/15/2021 5:03 PM
I feel like you gradually work your way up from foundational and low level concepts so that you can better understand the higher level stuff
5:03 PM
At least that’s been my experience, especially going from C++ to Python
Avatar
it is really good to have a solid understanding of the low level stuff instead of treating everything like a black box (edited)
💯 1
5:05 PM
Did you guys have any thoughts on the AddPlayerPermissionCallback?
Avatar
SublimeStyle 1/15/2021 5:05 PM
I haven’t worked at all on perms, just been lurking to see how y’all are rebuilding it 🙂
5:06 PM
Im hoping to eventually get back to my web interface project for the API once I have more free time
Avatar
what project?
5:09 PM
ive been tempted several times to do something and decided i didnt have the time/priority for it
Avatar
SublimeStyle 1/15/2021 5:11 PM
I have a front-end and back-end built with the eventual goal of allowing stats and operations thru the website. Stuff like leveling up your dinos, enabling breeding, etc.
5:12 PM
a lot of the plugin for it is done, but there's still a lot of work to do
Avatar
oh, i was just thinking a tool for managing the api plugins for multiple maps and maybe computers for instance loading, unloading, adding new, removing, updating, version checking, editing configs, versioning configs, updating multiple maps configs at same time (edited)
Avatar
SublimeStyle 1/15/2021 5:14 PM
ah yeah not quite that, it's meant to be web interface to interact with your ingame stuff
5:15 PM
also trades and stuff
Avatar
gotcha, similar to arkbot but with a little different functionality
Avatar
SublimeStyle 1/15/2021 5:15 PM
i.e. initiating a trade on the website and being able to accept and have it update on the server
5:15 PM
yeah the goal is a comprehensive web UI- arkbot doesn't work like that
5:15 PM
arkbot also has a lot of constraints based on the environemnt
Avatar
ive never used it myself
Avatar
SublimeStyle 1/15/2021 5:16 PM
this will poll the web server so that the users don't have to adjust any kind of security/privacy settings with the host
5:16 PM
like ArkBot has an API, but it requires you to connect to the host on a different port AFAIK
Avatar
Avatar
Kal
ive never used it myself
ughyhhh I gotta do my own message framing
5:27 PM
eyeroll
5:28 PM
send/recv bundles messages into single buffers
5:28 PM
well...since this just a string, I could probably cheat and just treat the null as the frame
5:28 PM
read until null -> track count
5:28 PM
loop until count >= read bytes
Avatar
🐨Dream Doctor🦘 1/16/2021 7:07 AM
Trying to find a couple of hooks, does anyone happen to know what they are off the tops of their heads? 1. Allocation of XP to players when a creature dies. 2. Allocation of loot to players when a creature dies. That is, not the inventory loot of the creatures, but things like engrams etc.
Avatar
@Deleted User Fixed, I made a PR in ownprox github.
👍 1
2:09 PM
@🐨Dream Doctor🦘 you have void Hook_UPrimalCharacterStatusComponent_AddExperience(UPrimalCharacterStatusComponent* _this, float HowMuch, bool bShareWithTribe, EXPType::Type XPType) For leveling
2:11 PM
The XPType will tell you which xp type was given, (generic, crafting, kill...)
2:12 PM
2:13 PM
I'm looking for the loot one, I can't seem to find anything
2:15 PM
@Deleted User the api hooker fixed is above
Avatar
Avatar
Pelayori
@Deleted User Fixed, I made a PR in ownprox github.
Deleted User 1/16/2021 2:22 PM
thank you!
Avatar
@🐨Dream Doctor🦘 APrimalDinoCharacter.DeathGiveEngramClasses APrimalDinoCharacter.DeathGiveItemClasses APrimalDinoCharacter.DeathGiveItemChanceToBeBlueprint APrimalDinoCharacter.DeathGiveItemRange APrimalDinoCharacter.DeathGiveItemQualityMin APrimalDinoCharacter.DeathGiveItemQualityMax APrimalDinoCharacter.DeathGiveAchievement (edited)
Avatar
Avatar
Kal
@🐨Dream Doctor🦘 APrimalDinoCharacter.DeathGiveEngramClasses APrimalDinoCharacter.DeathGiveItemClasses APrimalDinoCharacter.DeathGiveItemChanceToBeBlueprint APrimalDinoCharacter.DeathGiveItemRange APrimalDinoCharacter.DeathGiveItemQualityMin APrimalDinoCharacter.DeathGiveItemQualityMax APrimalDinoCharacter.DeathGiveAchievement (edited)
🐨Dream Doctor🦘 1/16/2021 11:11 PM
Thank you!
Avatar
Avatar
Pelayori
@Deleted User Fixed, I made a PR in ownprox github.
AaronBasques 1/17/2021 1:21 AM
my anti virus removed this immediately
Avatar
Tools i have made to make stuff a heck of a lot easier. - Pelayori/Tools
Avatar
AaronBasques 1/17/2021 1:22 AM
yeah ik, i'm just letting you know
Avatar
Not sure why, just changed a line to force it to use tls 1.2
Avatar
Deleted User 1/17/2021 4:58 AM
If you compile with the latest version of .NET, it works without modifying the source.
Avatar
Deleted User 1/19/2021 5:52 PM
Aight creating a command ingame doing /gc do i need to use the mysql
5:52 PM
gender change
5:52 PM
is the command to use
5:53 PM
Aight nvm.
Avatar
Guys, I want to create my first plugin. Downloaded .lib files included and did not have available methods from Log class. Do I need to have also header files to be imported? I'm python and golang developer and cpp had in university 😛 Thanks for your help.
9:16 PM
And is it possible to use Intelij IDE for development?
Avatar
you need to download the source code of the API and include the public folder to be able to compile the plugin
Avatar
@Foppa could you please share a link for that, I have found many of them - most probably not correct :/
Avatar
Avatar
dixi
And is it possible to use Intelij IDE for development?
SublimeStyle 1/20/2021 9:21 PM
Clion could work, but I found using ReSharper plugin with visual studio works best for me and I use Webstorm/Pycharm all the time
Avatar
Yeah, so the whole JetBrains stuff should work 🙂
10:28 PM
@dixi
Avatar
@Foppa thanks!
Avatar
🐨Dream Doctor🦘 1/21/2021 5:07 AM
How are things progressing with the Permissions update? Is there anything else we need to do?
Avatar
I don't think there will be any official updates until the github PR stuff is cleaned up. I know my cache changes are working great without issue for anyone that downloaded from my discord.
Avatar
I'm dealing with it, but yes some cleaning of pr may be needed
Avatar
@Kal guess who just got to solve a compiler issue
8:38 PM
Clang/GCC were reading one of my templatted overloads in the wrong order
8:38 PM
axoRollingEyes
Avatar
but you caused the compiler issue 😂
Avatar
I just ended up making the original return by value and the other take rvalue references and using std::move
8:39 PM
#pragma once #include <mutex> #include <ostream> #include <iostream> class osyncstream_locked final : std::streambuf, public std::ostream { std::unique_lock<std::recursive_mutex> lock_; std::ostream& stream_; public: osyncstream_locked(std::recursive_mutex& mtx, std::ostream& stream) : std::ostream(this), lock_(mtx), stream_(stream) {} //construct and lock the mutex from osyncstream. osyncstream_locked(const osyncstream_locked& o) = delete; /* A recursive mutex isn't great here (reference forwarding would be better except...only a recursive mutex can assure lock-before-release on ownership transfer */ template<typename T> friend osyncstream_locked&& operator<<(osyncstream_locked&& os, const T& d) { std::cout << d; return std::move(os); /* move semantics :( ... thanks Clang/GCC */ } osyncstream_locked(osyncstream_locked&& o) noexcept : osyncstream_locked(*o.lock_.mutex(), o.stream_) {} //could be better... max depth 2, usual depth 1. osyncstream_locked& operator=(osyncstream_locked&) = delete; //disallow osyncstream_locked& operator=(osyncstream_locked&&) = delete; //disallow ~osyncstream_locked() = default; }; class osyncstream final { std::recursive_mutex mutex_{}; std::ostream& stream_; public: explicit osyncstream(std::ostream& stream) : stream_(stream) {} template<typename T> friend osyncstream_locked operator<<(osyncstream& os, const T& d) { std::unique_lock<std::recursive_mutex> lock(os.mutex_); os.stream_ << d; return osyncstream_locked { os.mutex_, std::cout }; } osyncstream& operator<<(const osyncstream_locked& d) = delete; }; struct streams { static std::ostream& cout; static std::ostream& cerr; }; std::ostream& streams::cout = std::cout; std::ostream& streams::cerr = std::cerr; osyncstream sscout(streams::cout); osyncstream sscerr(streams::cerr);
8:39 PM
nah
8:39 PM
it's just a wrapper around ostream
8:39 PM
to allow for locking
8:39 PM
until the last <<
Avatar
I think it kept resolving this friend osyncstream_locked operator<<(osyncstream& os, const T& d)
8:39 PM
over and over
8:39 PM
because when it did compile, it would only output the first <<
Avatar
clever, and potentially very useful
Avatar
using the mutex pointer is ugly but it's the only way I can ensure I relock the mutex before the previous releases
Avatar
templates are gonna expose weird compiler edge cases lol
Avatar
because between the ownership transfer, release->lock another thread can lock the mutex
Avatar
thats cool
Avatar
so using a recursive mutex and locking before the previous unlocks
Avatar
they fixing it?
Avatar
it remains locked
8:40 PM
oh, idk
Avatar
or you gotta work around
Avatar
my work around was using rvalues in the locked overload
8:41 PM
and std::move
8:41 PM
that above code is the working code
8:41 PM
works in Clang, GCC and MSVC
Avatar
first is MSVC, second is G++
8:42 PM
std::vector<std::thread> threads; for(int i = 0; i < 100; ++i) { threads.emplace_back(std::thread([&, i]() { for(int j = 0; j < 100; ++j) { sscout << "[" << (i % 10) << "]: " << "fuck" << "shit" << "up" << " " << j%10 << "\n"; } })); } for (auto& thread : threads) thread.join(); return 0;
8:42 PM
test case
Avatar
g++ keeps it ordered?
Avatar
which would normally produce garbage output
8:42 PM
it's kept in order via the lock
Avatar
you should move the lock inside the loop
Avatar
sscout is osyncstream. << on osyncstream returns osyncstream_locked which continues to keep the mutex locked osyncstream_locked chains <<
Avatar
a more complicated example would have it in a helper method deep in the code for example, ideally not the whole loop
Avatar
after the last << osyncstream_locked is destructed releasing the lock
Avatar
oh i see
Avatar
the idea is to have a stream that ensures all calls to << are output in order
8:43 PM
even if many threads are trying to output text
Avatar
std::unique_lock<std::recursive_mutex> releases it's lock automatically via destructor
8:44 PM
so at most there is a depth of 2 in the lock, but usually only a depth of 1
Avatar
still for your messaging project?
Avatar
(depth of 2 while transferring ownership of the mutex so that the mutex remains completely locked so another thread doesn't steal it)
8:45 PM
yeah
8:45 PM
but I moved this into a header
8:45 PM
I might use it in other projects
Avatar
wanna rewrite my chat + bot with websockets instead of storing chat? xD
Avatar
I'm using it for cout and cerr, but it supports any ostream
8:45 PM
struct streams { static std::ostream& cout; static std::ostream& cerr; }; std::ostream& streams::cout = std::cout; std::ostream& streams::cerr = std::cerr; osyncstream sscout(streams::cout); osyncstream sscerr(streams::cerr);
8:46 PM
and then my own `sscout for safe stream cout
8:46 PM
and na 😛
Avatar
more of a joke, im too lazy for a rewrite, so it is what it is
Avatar
I feel bad for the other students that are trying to do this in C++
8:47 PM
I can't share any of my code with them
8:47 PM
and writing this was aids
8:47 PM
sooooo many random issues without clear resolution paths
Avatar
i still dont expect it would be to terrible to do the same project in c++
Avatar
most of these people have very little C++ exposure
Avatar
but i only know a few general details
Avatar
it's a multi-threaded client and a single threaded server
8:48 PM
the point is to see the slow-down on the server when many clients hit it
Avatar
because the next project is the same thing but threaded server
8:49 PM
doing this in C++ without much experience ... is going to hurt them.
Avatar
do you get into sharding at all?
Avatar
I've read about it for Discord bots.
Avatar
most anything at scale
8:49 PM
global scale is insane
Avatar
yeah but we're not going to have to worry about that 😉
8:49 PM
in this class
8:49 PM
most of these people don't even know how to use threads in Java
Avatar
yeah
8:50 PM
lol
8:50 PM
and C++ has no standard sockets library
8:50 PM
so they're going to have to either write once on Linux
8:50 PM
or write for both Windows and Linux like I am
8:50 PM
on top of learning about threading
8:50 PM
pepekek
Avatar
we have sharding, multi level clustering, automatic resource provisioning based on load signals, global re-routing (edited)
Avatar
yes, but this is a college class project
8:51 PM
not a multi-billion $ company
Avatar
whats the class?
Avatar
Computer Networks
8:53 PM
more specifically
8:53 PM
Welcome to Computer Networks and Distributed Processes
8:53 PM
these are things I already know
8:53 PM
Feelsbad
Avatar
i really avoid low level stuff and dont miss those classes lol
Avatar
I don't mind it
8:54 PM
as long as it's no lower than C++
Avatar
one of my least favorite, mainly cause i didnt like the professor, was operating systems
Avatar
ouch
Avatar
have you had any classes on hardware?
Avatar
yes, hardware arch/organization
8:55 PM
mostly just circuit stuffs
8:55 PM
our last assignment was SRAM
Avatar
i had that class when i was in a minecraft phase
8:57 PM
made some cool shit lol
Avatar
lmao
Avatar
@substitute hey, would any of your plugins benefit from having an up to date list of player on all maps in the cluster? c++ class MapPlayer { public: std::wstring CharacterName, TribeName; std::string ServerKey; uint64 steamId; int LastCharacterId; }; TArray<MapPlayer> I could make it avialable in public header from my chat (edited)
Avatar
Avatar
Kal
@substitute hey, would any of your plugins benefit from having an up to date list of player on all maps in the cluster? c++ class MapPlayer { public: std::wstring CharacterName, TribeName; std::string ServerKey; uint64 steamId; int LastCharacterId; }; TArray<MapPlayer> I could make it avialable in public header from my chat (edited)
I don’t actually make plugins all that much sweating
5:41 AM
But I do think it’ll be very beneficial
Avatar
How to get TArray<UPrimalItem> and Dino. I know how to get TArray<UPrimalEngramEntry> TArray<UPrimalEngramEntry*> all_engrams_entries = static_cast<UPrimalGlobals*>(Globals::GEngine()()->GameSingletonField())->PrimalGameDataOverrideField()->EngramBlueprintEntriesField(); Thank you very much. (edited)
Avatar
Avatar
2345com
How to get TArray<UPrimalItem> and Dino. I know how to get TArray<UPrimalEngramEntry> TArray<UPrimalEngramEntry*> all_engrams_entries = static_cast<UPrimalGlobals*>(Globals::GEngine()()->GameSingletonField())->PrimalGameDataOverrideField()->EngramBlueprintEntriesField(); Thank you very much. (edited)
SublimeStyle 1/24/2021 7:48 PM
you just want all items on dinos? I'm assuming you can just get all dinos and check their 'MyInventoryComponentField' std::vector<AActor*> foundActors; UGameplayStatics::GetAllActorsOfClass( reinterpret_cast<UObject*>(ArkApi::GetApiUtils().GetWorld()), APrimalDinoCharacter::GetPrivateStaticClass(), &foundActors ); for (auto* actor : foundActors) { auto* dino = reinterpret_cast<APrimalDinoCharacter*>(actor); if (!dino || dino->bIsVehicle().Get()) { continue; } auto* inventoryComponent = dino->MyInventoryComponentField(); } (edited)
7:49 PM
and line 197 of Inventory.h (UPrimalInventoryComponent) will show the struct that gets passed back and how you can get that array of items (or you can just dig into the class definition using your IDE shortcut)
Avatar
No. Is Globals.
6:44 AM
Use to Tab.
6:48 AM
Cheat GiveItem "Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItemAmmo_AdvancedRifleBullet.PrimalItemAmmo_AdvancedRifleBullet'" 10 0 0 Cheat SpawnDino "Blueprint'/Game/PrimalEarth/Dinos/Tapejara/Tapejara_Character_BP.Tapejara_Character_BP'" 0 0 0 120 (edited)
6:49 AM
Get all the orders.
Avatar
🐨Dream Doctor🦘 1/28/2021 11:00 AM
Hey @Foppa, is there any news on the new permissions plugin? I think it's really important that we get that out there asap along with a new binary package release. Is there anything I or anyone else can do to assist?
Avatar
Not yet
11:27 AM
Waiting for response basically 🙂
Avatar
Any kind soul that can help me, i don't know what to do anymore.
Avatar
So some person is ddos ing your stuff
Avatar
Yeah, whole shit
7:01 PM
I can't find where he attacks
Avatar
not much you can do unless you upgrade your ddos protection
Avatar
Like with a child: if you want behavior to stop. You have to ignore it. Bite the bullet and ignore. He will stop. If you feed their need for attention, it’ll continue
11:47 PM
Thanks guys
Avatar
this kids with her ddos toys feel like hero always
Avatar
Hello @Michidu , how can I make a new player automatically have 1000 points when they enter?
6:02 PM
"Inicial": { "DefaultAmount": 1, "Description": "1000", "Items": [ { "Amount": 1, "Blueprint": " addpoints {steamid} 1000", "Fixed": true, "ForceBlueprint": false, "Quality": 0 } ], "Price": 1000 },
6:03 PM
in Arkshop
Avatar
@Guanarteme you need to edit mysql table arkshopplayers
7:21 PM
set points row to default value 1000 (edited)
Avatar
I have the MySQL table with arkshopplayers
Avatar
Avatar
Pelayori
set points row to default value 1000 (edited)
so I don't have to add anything to the config?
7:33 PM
Only un MySQL
Avatar
Avatar
Guanarteme
Only un MySQL
Yes, in here
8:10 PM
Default value of points row
Avatar
What MySQL soft use?
9:27 PM
I don't know how to put that is navicat
Avatar
Looks like HeidiSQL
9:28 PM
or similar interface
Avatar
It is HeidiSQL
Avatar
thank you
10:24 PM
i look
Avatar
"gacha": { "Description": "Dino - Gacha + Montura (150 armadura)", "Permissions": "Vip", "Price": 10000, "Items": [ { "Amount": 1, "Quality": 10, "ForceBlueprint": false, "Blueprint": "Blueprint'/Game/Extinction/CoreBlueprints/Items/Saddle/PrimalItemArmor_GachaSaddle.PrimalItemArmor_GachaSaddle'" } ], "Dinos": [ { "Level": 315, "Neutered": true, "Blueprint": "Blueprint'/Game/Extinction/Dinos/Gacha/Gacha_Character_BP.Gacha_Character_BP'" } ] },
10:58 PM
Why does the server crash when trying to mount with tell us?
Avatar
Avatar
Guanarteme
"gacha": { "Description": "Dino - Gacha + Montura (150 armadura)", "Permissions": "Vip", "Price": 10000, "Items": [ { "Amount": 1, "Quality": 10, "ForceBlueprint": false, "Blueprint": "Blueprint'/Game/Extinction/CoreBlueprints/Items/Saddle/PrimalItemArmor_GachaSaddle.PrimalItemArmor_GachaSaddle'" } ], "Dinos": [ { "Level": 315, "Neutered": true, "Blueprint": "Blueprint'/Game/Extinction/Dinos/Gacha/Gacha_Character_BP.Gacha_Character_BP'" } ] },
You mean when you spawn and put saddle and ride it the server crashes?
Avatar
no
12:06 AM
only when I give to buy
12:09 AM
no puedo mandar screenshot
12:09 AM
I can't send screenshots
Avatar
I just learned about the existence of plugins in ark and i would like to start learning c++. I downloaded professional c++ with latest sdk and c++ language for desktop windows. Is this a good start in learning the code for plugin development?
Avatar
I find very little tutorials about creating plugins. You guys know a tutorial?
6:51 PM
How to disable 3d view
Avatar
@Primeval😈 ah hello
7:20 PM
what a coincidence
7:20 PM
or not (edited)
Avatar
Primeval😈 1/31/2021 7:21 PM
waddup
Avatar
You can code plugins?
Avatar
Are there any open source projects of ark plugins i can look at
7:34 PM
?
Avatar
Thanks
Avatar
@Gromit you have setup tutorial and some other useful info in #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ
8:06 PM
If you have any specific question ask it and we will help you
Avatar
Thanks man forgot to select a role
Avatar
Which headers i need to include to start coding ark plugins?
Avatar
Avatar
Gromit
Which headers i need to include to start coding ark plugins?
substitute 2/1/2021 6:06 PM
I wrote a template
6:07 PM
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
6:07 PM
@Gromit
Avatar
Thanks
7:03 PM
Is there any negative side effects of using namescape std cause i dont see many using it
Avatar
Could it be that you already put in disallowed names in?
Avatar
Avatar
Gromit
Is there any negative side effects of using namescape std cause i dont see many using it
substitute 2/1/2021 8:16 PM
Don't use std namespace
8:16 PM
it will pollute your globals
Avatar
Nguyễn Đình Huy 2/1/2021 9:52 PM
How to fix getchat command RCON please helpme 😞
Avatar
@OwnProx
4:18 PM
i like my new rcon tool 😄
Avatar
🐨Dream Doctor🦘 2/9/2021 2:49 AM
Hi again@Foppa , just wondering if there's been any progress getting the new Permissions and API version ready to go?
Avatar
No update yet.
Avatar
I was given merge rights to the official repo and have merged in all PR's for permissions. I think there are a few more things being looked at before an official release will be made.
Avatar
🐨Dream Doctor🦘 2/10/2021 5:25 AM
Unfortunately there has been some offline discussion about forking the API and starting a whole new project due to the perceived severe lack of interest and attention from and visibility of the original project owners. I think this would be really bad for the API. I'd really like to see some discussion on how we can avoid this. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Unfortunately there has been some offline discussion about forking the API and starting a whole new project due to the perceived severe lack of interest and attention from and visibility of the original project owners. I think this would be really bad for the API. I'd really like to see some discussion on how we can avoid this. (edited)
forking isn't always a bad thing. We have a lot of very knowledgable people here and I don't see a problem moving forward as a unified group without a single point of failure.
5:29 AM
I would love to see a basic form of package manager for the api for example
5:30 AM
this is 10000% out of Michidu's scope and I don't blame him
5:30 AM
however the inconsistency of the website (and the lack of a proper wiki) is certainly problematic
5:32 AM
To be quite frank. I think one of the biggest issues with the API is that Michidu took a hands off generational approach (only dumping structs from IDA) and having a very C orientated programming style.
5:32 AM
There's some modern C++ in the api
5:33 AM
but a lot of non-modern too
5:33 AM
such as the singleton's being non-magic static init'ed
5:34 AM
Plugins load via DLLATTACH instead of having a set of exported functions (which _also means all data needs to be in the config json), etc.
5:34 AM
What Michidu has made, is fantastic
5:34 AM
but it can be more
Avatar
🐨Dream Doctor🦘 2/10/2021 5:34 AM
Look I don't disagree that there a mountain of fantastic experience, knowledge and enthusiasm. There have been many great ideas expressed on this Discord over the last few months that would all be wonderful additions. And yes there are many things that need fixing like the website that goes down for days at a time and is extremely out of date. But none of that changes the fact that unless the new project is completely refactored and made so that it can run alongside the existing API, it would be, IMHO, a disaster for the community. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Look I don't disagree that there a mountain of fantastic experience, knowledge and enthusiasm. There have been many great ideas expressed on this Discord over the last few months that would all be wonderful additions. And yes there are many things that need fixing like the website that goes down for days at a time and is extremely out of date. But none of that changes the fact that unless the new project is completely refactored and made so that it can run alongside the existing API, it would be, IMHO, a disaster for the community. (edited)
There only needs to be a compatibility layer
5:35 AM
all the headers are compiled into the plugins directly, so those are non-issues
Avatar
SublimeStyle 2/10/2021 5:35 AM
When someone wants to start working on a server API for Ark 2, LMK. I assume it will be at least a year or two though.
Avatar
on the note of out-dated sites
5:36 AM
we really should just setup a CI/CD
5:36 AM
Github actions would probably suffice to be honest.
5:36 AM
just trigger a build when the main repo updates
5:36 AM
then the site can simply link to latest on Github
5:37 AM
and it'll always be an up to date link.
5:37 AM
as for plugins, I REALLY would prefer a package manage system
5:37 AM
it doesn't need to even be good
5:37 AM
just being able to api install <name>
5:37 AM
and having it query several different repositories would be nice.
Avatar
🐨Dream Doctor🦘 2/10/2021 5:38 AM
Unfortunately Windows package managers generally suck. But there are a couple that are ok.
Avatar
yeah but anything
5:42 AM
is better than a site
5:42 AM
when the site is offline for days
Avatar
🐨Dream Doctor🦘 2/10/2021 5:43 AM
I think it's more that server owners with lots of plugins have almost zero chance of keeping all their plugins up to date without any kind of centralised system.
Avatar
hence repositories
5:44 AM
just being able to have more than one
5:44 AM
would be very helpful
5:44 AM
sure, anyone can rehost the plugins from the site right now
5:44 AM
but have you tried downloading all the plugins?
5:44 AM
that's not gonna happen hahaha
Avatar
🐨Dream Doctor🦘 2/10/2021 5:48 AM
I work with a cluster that has over 60 maps, each using dozens of paid and free plugins. Trying to keep them all updated is a nightmare 🙂
Avatar
Wait, 60 ARK Maps?
12:38 PM
Or what on earth is that kind of cluster 😮
Avatar
a plugin manager could be the solution
12:58 PM
so it would auto update your plugins
Avatar
Avatar
WETBATMAN
a plugin manager could be the solution
Yes
5:41 PM
What I said before 😉
Avatar
SublimeStyle 2/10/2021 5:42 PM
so when's the new API coming out @substitute ?
5:42 PM
it's been 12 hours, let's see some results lol
Avatar
Avatar
SublimeStyle
so when's the new API coming out @substitute ?
Too busy for that
5:47 PM
Work, school, etc.
Avatar
SublimeStyle 2/10/2021 5:47 PM
that's the joke man
5:47 PM
easy to theorize about design approaches
5:47 PM
another thing entirely to implement all your ideas
Avatar
I mean I have added some things to the api 😉
5:47 PM
And I have other things that are done but need to be cleaned up before a pr.
Avatar
SublimeStyle 2/10/2021 5:50 PM
my point is you are eager, and that's cool, but it's way different when you have deadlines, priorities, paying clients, stakeholders from different departments, etc. you sound like an eager CS student lol
5:51 PM
it's cool that you can do meta-template programming in C++, but building a software system is so much more
5:52 PM
it's not a knock as much as seeing a lot of myself in you and just reminding you to slowwww down lol
Avatar
SublimeStyle 2/10/2021 6:03 PM
an example: there is such a thing called a non-functional requirement, every project has several of them and every project has to make it a point to prioritize or make trade-offs to meet the project non-functional requirements (https://en.wikipedia.org/wiki/Non-functional_requirement). It's easy to theorize design approaches without taking context, intent, or scope into account, but once you do, you have to start making trade-offs. Software engineering in general is about having multiple solutions to a problem and making the appropriate trade-offs to solve the problem at the best possible intersection of defined requirements, constraints, etc. I.e. is security more important for this solution or the usability? Should the system be more correct (fail early) or robust (roll with the punches)? Should the system need to scale? etc.
Avatar
Avatar
WETBATMAN
a plugin manager could be the solution
I don't see how this can be reliably done with config changes. I feel like there would be a ton of edge cases.
Avatar
Avatar
Lethal
I don't see how this can be reliably done with config changes. I feel like there would be a ton of edge cases.
nlohmann::json is pretty good, what i was thinking is the manager would load the new config for the new version of the plugin and compare the variables inside to the variables inside the current config
6:33 PM
variables that don't exist in the current config could be added with a default value
Avatar
okkay... i know this isnt the right discord...but i need some real plugin help
9:25 PM
its not with creating a plug in..its just getting a plug in to work.... ive followed their exact config and it just wont load.. ran my own code through 5 diffferent json validators...100% perfect.. but when i do plugins.load Arkshop it just wont load..comes back 1114 error
Avatar
i would really love it if someone can guide me in the direction of understanding expressions ..i think its called.. the {} [] () and how they all tie things up. ive got the how to write it and such down a lil.. but its the use of those that really throw me a loop
Avatar
Avatar
DaddyDuck
i would really love it if someone can guide me in the direction of understanding expressions ..i think its called.. the {} [] () and how they all tie things up. ive got the how to write it and such down a lil.. but its the use of those that really throw me a loop
do you mean lambda functions, which are [] () {}?
12:26 AM
(captures, args, code)
Avatar
Avatar
DaddyDuck
its not with creating a plug in..its just getting a plug in to work.... ive followed their exact config and it just wont load.. ran my own code through 5 diffferent json validators...100% perfect.. but when i do plugins.load Arkshop it just wont load..comes back 1114 error
as for this, error 1114 isn't a json error. Make sure you have all dependencies on your system.
Avatar
i got that 1114 issue taken care of ... finally lmao.. and yes.. those functions..
Avatar
Im not here to advertise, but i do want to share my thoughts with you. I am the owner of gameserverapp, and i am currently working on integrating a system that allows to manage plugins on infinite servers automatically. However, i run into great problems that i see as a threat to this great platform (ark server api) you all built and continue to build upon. To give you an example: uMod (rust etc) has a great platform with an api where 3rd parties can tap into. Their plugins use a form of standardization which ark api doesnt seem to have that much. You all built great things and i hope someone is going to stand up and take the lead to get this thing going again. Work together ❤️
1:02 AM
Maybe you guys should vote or whatever. But right now I dont know who to talk to. As there doesnt seem anyone that is leading this right now
Avatar
Avatar
AnotherMax
Im not here to advertise, but i do want to share my thoughts with you. I am the owner of gameserverapp, and i am currently working on integrating a system that allows to manage plugins on infinite servers automatically. However, i run into great problems that i see as a threat to this great platform (ark server api) you all built and continue to build upon. To give you an example: uMod (rust etc) has a great platform with an api where 3rd parties can tap into. Their plugins use a form of standardization which ark api doesnt seem to have that much. You all built great things and i hope someone is going to stand up and take the lead to get this thing going again. Work together ❤️
Yes, some form of standardization would be very useful
1:34 AM
right now everything is rather implicit. A developer can do things the right way if they know what to do
1:35 AM
and a developer can do things the wrong way if they don't
Avatar
SublimeStyle 2/11/2021 1:38 AM
only the sith deal in absolutes
Avatar
they can also do things the wrong way even if they know what they're doing (edited)
💯 1
Avatar
SublimeStyle 2/11/2021 1:38 AM
it's from star wars but works surprisingly well for software development
1:41 AM
“You Can't Write Perfect Software. Did that hurt? It shouldn't. Accept it as an axiom of life. Embrace it. Celebrate it. Because perfect software doesn't exist. No one in the brief history of computing has ever written a piece of perfect software. It's unlikely that you'll be the first. And unless you accept this as a fact, you'll end up wasting time and energy chasing an impossible dream." - Andrew Hunt
Avatar
Avatar
SublimeStyle
it's from star wars but works surprisingly well for software development
yeah, and I'm not saying it needs to be perfect
1:41 AM
but there's some things are people do that are breaking changes
Avatar
SublimeStyle 2/11/2021 1:41 AM
saying that it is binary and that there are two ways to do things implies so much that's wrong with your mentality
Avatar
and make it so their plugin can't be mixed with another plugin
Avatar
Avatar
SublimeStyle
saying that it is binary and that there are two ways to do things implies so much that's wrong with your mentality
Yes, but having delay loaded dlls and DLL_ATTACH as the defacto standard when there are a lot of new developers in here that are making plugins
1:42 AM
is dangerous
Avatar
SublimeStyle 2/11/2021 1:42 AM
I'm not debating what you're saying, I'm debating the way you're saying these things
Avatar
Fair
Avatar
SublimeStyle 2/11/2021 1:44 AM
there were a lot of criticisms the other day, some fair, some a little naive- all I'm saying is be careful analyzing what's good or bad when you don't have all the information
Avatar
the other thing is the API is haphazardly designed (for actual features) Like there's helpers for A but not for B even though the way you'd get to both is the same. I think this is mostly the effect of the developers choosing to include these shortcuts for things that they found it useful for. that alone isn't a problem But when the API is both a thin dll loading layer and a fat implemented api (helper methods built into the api) it also causes problems
1:45 AM
i.e. when they added Epic games crossplay.
1:45 AM
I feel in that regard there should be some separation of responsibility
1:45 AM
If you use the API as a thin wrapper it works wonderfully
Avatar
Avatar
SublimeStyle
there were a lot of criticisms the other day, some fair, some a little naive- all I'm saying is be careful analyzing what's good or bad when you don't have all the information
I don't think they were naive. This is an open source community project. There's no deadlines.
1:46 AM
well, there shouldn't be deadlines
Avatar
SublimeStyle 2/11/2021 1:50 AM
I think you just come off a little abrasive with your suggestions. It's one thing to suggest a better approach, it's another to use polarizing words like dangerous, haphazardly designed, talking about CI/CD as if everyone doesn't already know (also CI/CD is not a catch all, that's why they have whole teams dedicated to devops). You don't want to alienate the people you're trying to work with, nor the owner or moderators of the community that you're trying to migrate.
Avatar
🐨Dream Doctor🦘 2/11/2021 12:32 PM
@SublimeStyle I don't mean to be rude, but your own attitude comes off as pretty patronising. I don't remember Substitute asking for your life advice. Personally I find all his thoughts and suggestions incredibly helpful, useful and entirely plausible and reasonable. And not at all "abrasive". (edited)
Avatar
Avatar
AnotherMax
Maybe you guys should vote or whatever. But right now I dont know who to talk to. As there doesnt seem anyone that is leading this right now
Well, i'm mostly online an available but i don't see msg from you tbh 🙂
Avatar
thanks for your reply Foppa. Are you the person responsible for the website?
Avatar
As for how i see it, there could be better way off making standardization here and there. But we can't compare with other platforms always, ARK Is more complicated and complex than rust is.
12:41 PM
Well depends what you are looking for. Maybe reach out in pm?
Avatar
I'm trying to get in contact with the person that is able access the admin panel for XenForo. I tried reaching out to @Michidu with some help from @GSH | MrOwlSky but so far my experience kinda worries me. I'm eager to get into contact with the person that owns the website and is able to enable the XenForo resources api. So 3rd parties can grab a list of all available plugins (edited)
Avatar
Well, Mich owns the site. But i'm pretty sure you can do that
12:45 PM
already
12:46 PM
Cause other game service sites has it working
Avatar
can you show me how? Because so far my attempts to get more info werent very successful 🙂
Avatar
whole lotta talking but no progress 😄
1:05 PM
i think we should come up with a list of what we NEED to improve
1:05 PM
and just do it
1:05 PM
i think everyone should be cool with that
1:05 PM
i'll help with anything we need
Avatar
i totally agree @WETBATMAN. Just like any business: standing still means your business is dying.
1:09 PM
IMO, this community needs to pick 1 or 2 people that will determine what the core team will work on, and have people contribute to that. basically a project manager / product owner. Without it, you're basically a ship without a captain at sea
1:09 PM
and ships without a captain eventually sink
Avatar
I've just catched a bit of this discussion. Unfortunately, with life/work i didn't have time for this project for the past ~6 months or more and probably didn't even expect it would become that popular when it was started. Going forward, API indeed needs a rewrite with keeping backwards compatibility (there is a high chance that many plugins will never be updated to the new standards). I would be glad to contibute if we decide to do it.
Avatar
life happens 🙂 Perhaps it is time for you to promote someone to take your place. Maybe with a transition period. Im sure you know who would be the right candidate. Either way: i think Ark server API needs to keep moving, to prevent it from slowly getting behind the curve (edited)
Avatar
I don't think there is a such 'place' if it's going to be a more community driven project.
Avatar
You can count me in for the project. I'll contribute with anything I can. However I'm not that experienced as some people is and might not be able to contribute as much, but definitely keen to help.
Avatar
i would personally start with webrequests tbh
2:40 PM
the API requests are too slow
2:40 PM
i've included POCO webrequests in my HWIDBans and it takes ~ 200ms for a reqeust
2:40 PM
while the API ones take like 2-4 sec
Avatar
maybe you all can create some issues on Github: https://github.com/Michidu/ARK-Server-API/issues to address the problems you see in the core. Have everyone vote on the issues. From there you have a list of prio's to work on. Github has a lot of great tools to help you manage a community driven project
2:43 PM
here is some inspiration, if you want: https://github.com/GameServerManagers/LinuxGSM/issues
Avatar
There is probably someone who has more experience and can organize the process. As for requests, it might be a good idea to incorporate this lib: https://github.com/yhirose/cpp-httplib. Small and simple.
2:46 PM
tbh poco can be compiled with just requests and it's pretty good
2:46 PM
it's not as lightweight as a single header but those are very fast
Avatar
and im happy to help manage github at the start. Due to my position i dont want to keep doing that, but if nobody else will I am willing to help and get you going. How that will work out all depends on whether people here actually help create PR's for issues that are on github and want to help review the PR. Because i can not code in the language you're using 🙂 I can help organise, but i can not do the work
Avatar
SublimeStyle 2/11/2021 2:56 PM
I think voting on priorities would help.
Yes 3
No 1
Avatar
There are for sure many things which should be improved including the core design. I will release some tools to dump API from Ark in a few days (when i clean them a bit). But that alone have multiple issues too. Right now API being dumped by selecting a few important structures followed by a manual cleaning. It would be nice to generate a full and working dump automatically.
Avatar
@Michidu maybe this is a perfect example to use as the first issue. I myself prefer using Use cases , but perhaps you have other preferences. In case someone is unfamiliar with use cases, here are a couple examples:
  • as a developer i want the ability to easily dump API for development purposes
  • as a api user i want a central point to download all API plugins from
  • as a 3rd party i want an api for the website to pull all available plugins
With a use case it usually is easier to derive actions and for developers to understand the context for the issue
(edited)
👍 2
Avatar
i went ahead and added one regarding something else 🙂
Avatar
Avatar
Michidu
There are for sure many things which should be improved including the core design. I will release some tools to dump API from Ark in a few days (when i clean them a bit). But that alone have multiple issues too. Right now API being dumped by selecting a few important structures followed by a manual cleaning. It would be nice to generate a full and working dump automatically.
My friend and I use dumpers for a lot of UE4 games, but these operate around UFunctions of course. (Other games don't share PDB.) Maybe later today or tomorrow I can fix up and submit my code for proper Blueprint interaction. Also, welcome back!
5:28 PM
Blueprint dumping is very useful for interoping with mods though, as those are purely Blueprints.
5:30 PM
I think another really useful package (one that I want to actually make for myself) is a Docker for the ServerAPI. All of the Docker images for Ark servers are based on Linux SAD , but with Windows Server Nano I might be able to get one working HAPPY
5:30 PM
but that is outside the scope of the API.
Avatar
SublimeStyle 2/11/2021 5:41 PM
it would be nice to see something like this lend itself well to working with Ark 2, which I think it could even if they were to utilize UE5... maybe write some type of interface layer if worst comes to worst. I agree about the API itself being thin and trying to decouple the helper methods from the core API functionality (binding the server/client structures)
5:42 PM
some utils functions could still be useful in the core IMO though
Avatar
SublimeStyle 2/11/2021 5:51 PM
I think a singleton config module could be helpful too- something that constrains and enforces the workflow beyond just a simple json, making it more accessible and consistent.
Avatar
Avatar
substitute
My friend and I use dumpers for a lot of UE4 games, but these operate around UFunctions of course. (Other games don't share PDB.) Maybe later today or tomorrow I can fix up and submit my code for proper Blueprint interaction. Also, welcome back!
Thanks. A perfect solution would include a PDB and BP dump, since they complement each other. I hope they will keep PDB in Ark 2 (they should).
Avatar
Avatar
SublimeStyle
I think a singleton config module could be helpful too- something that constrains and enforces the workflow beyond just a simple json, making it more accessible and consistent.
What config do you mean?
Avatar
SublimeStyle 2/11/2021 6:26 PM
nvm I realize now this would probably be a bad idea as I was more-so thinking in the context of a plugin's config and correlating that with the API config
6:32 PM
random question, but is it possible to expose sockets with the Ark server? or is it more a problem with hosting vendors?
Avatar
Avatar
SublimeStyle
random question, but is it possible to expose sockets with the Ark server? or is it more a problem with hosting vendors?
I don't see why it would be a problem
6:38 PM
the hosting vendors might get upset though
6:39 PM
self-hosted , it's no problem
6:40 PM
I've had the idea for a while to make an IRC plugin for cross server chat
Avatar
SublimeStyle 2/11/2021 6:40 PM
I thought it was mostly just permission based, but I was wondering about its effects on the multi-threadedness of Ark, I'm a full-stack web dev by day so not too familiar with multi-threaded C++ programs (edited)
Avatar
and just have the server's send their messages to a central IRC server
Avatar
Avatar
SublimeStyle
I thought it was mostly just permission based, but I was wondering about its effects on the multi-threadedness of Ark, I'm a full-stack web dev by day so not too familiar with multi-threaded C++ programs (edited)
Are you creating new sockets or trying to integrate with the existing ones.
6:41 PM
new sockets have zero overlap with the existing unless you're accessing data between threads (which would be standard multi-threaded code)
Avatar
SublimeStyle 2/11/2021 6:41 PM
I would think creating a new socket would be better than intergrating with existing ones for what I'm trying to do (and preventing any conflict or instablitility) (edited)
6:42 PM
but then my concern is if no host will allow it, I don't want to waste the time writing it when I could just poll with http
6:42 PM
albeit not as effective for the purpose
Avatar
Avatar
SublimeStyle
but then my concern is if no host will allow it, I don't want to waste the time writing it when I could just poll with http
it depends
6:42 PM
is the socket a client or a server in this context
Avatar
SublimeStyle 2/11/2021 6:42 PM
a client
Avatar
if it's a client, it's not a problem, http has to open a socket after all 😉 (edited)
Avatar
SublimeStyle 2/11/2021 6:42 PM
ahhh
6:42 PM
awesome
6:42 PM
thanks
6:43 PM
just started learning about sockets
6:43 PM
embarassing, I know
Avatar
sockets in C++ are...not so fun 😄
Avatar
SublimeStyle 2/11/2021 6:43 PM
xD
6:44 PM
doing my networks project in C++
6:44 PM
socket server and client
6:44 PM
um, this would be really useful for you
6:45 PM
struct addrinfo_up_deleter { void operator()(addrinfo* ptr) const { ::freeaddrinfo(ptr); } }; typedef std::unique_ptr<addrinfo, addrinfo_up_deleter> addrinfo_up; /* Modern C++ shared pointer for addrinfo. */ struct popen_up_deleter { void operator()(FILE* ptr) const { pclose(ptr); } }; typedef std::unique_ptr<FILE, popen_up_deleter> popen_up; /* Modern C++ shared pointer for popen. */ static auto getaddrinfo(const std::string& address, const std::string& port) noexcept -> addrinfo_up { addrinfo* result{}; addrinfo hints{}; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; hints.ai_flags = AI_PASSIVE; ::getaddrinfo(address.c_str(), port.c_str(), &hints, &result); // NOLINT(bugprone-unused-return-value) return addrinfo_up(result); }
6:45 PM
there's a lot more
6:45 PM
but this at least makes a smart pointer out of getaddrinfo
Avatar
SublimeStyle 2/11/2021 6:46 PM
I was thinking about using something like this given that my web server will also be using socket io: https://github.com/socketio/socket.io-client-cpp
Avatar
ah yeah well
6:46 PM
you don't have to write everything from scratch
6:46 PM
😄
Avatar
SublimeStyle 2/11/2021 6:47 PM
lol true xD
6:49 PM
good to learn that stuff though, my lower divs and foundation was in C++ then moved to Python at work/uni. I love Python, but the knowledge of lower level stuff is invaluable. And it's nice to be able to write C++ now and then
6:49 PM
it was embarassing when my coworker at my first job had been there for 5+ years and didn't even know the difference between shallow/deep copies
6:50 PM
but Python kind of abstracts all that... I feel like he had to know, maybe just didn't understand the terminology or something
Avatar
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
6:51 PM
that's my sockets wrapper
6:51 PM
for modern C++ for my project
6:51 PM
message framing is implicit on null terminator
6:51 PM
since I'm just sending/receiving strings
Avatar
SublimeStyle 2/11/2021 6:52 PM
heeeyyy +1 for resharper
6:52 PM
lol
6:52 PM
Library I wrote
Avatar
SublimeStyle 2/11/2021 6:52 PM
except in this instance you seem upset with it 😛
Avatar
to have proper thread-safety with stream writing
Avatar
SublimeStyle 2/11/2021 6:52 PM
// ReSharper disable All Just shut up resharper
Avatar
basically, std::cout << a << b << b
6:52 PM
will always be in order
6:53 PM
no matter how many threads are using std::cout
Avatar
SublimeStyle 2/11/2021 6:53 PM
nice man
Avatar
but in this case, you'd use sscout
Avatar
SublimeStyle 2/11/2021 6:54 PM
my two main concerns for my project would be reliability and stability (threads/communication)... which REST is great for but I get concerned with sockets
Avatar
sockets is REST hard mode (edited)
Avatar
SublimeStyle 2/11/2021 6:54 PM
ahah
6:55 PM
i'm dealing with this right now working on a biofeedback app... we have to process audio signal and evaluate prat metrics but it needs to be reliable, but it needs to be bi-directional... so we're essentially using both REST and sockets lol
Avatar
I like how mine looks so far
6:55 PM
for my project 😄
Avatar
SublimeStyle 2/11/2021 6:55 PM
rest to initiate, sockets to emit
6:55 PM
nice man that's really cool!
6:56 PM
are you done with it or still more to go?
Avatar
need to put the rest of the system commands to execute
6:56 PM
I'm also dumping the metrics data to JSON for the people that will write the paper for the project
6:56 PM
the first project is a multi-threaded client, single threaded server
6:56 PM
second is the same , but server is multi-threaded (edited)
6:56 PM
basically to see the performance differences between the two is the goal of the projects
6:56 PM
the way my project is setup though, it's already both done
6:57 PM
a define decides at compile time for the server
6:57 PM
#ifdef THREADED std::thread(&server::accept_client_message, this, client).detach(); #else std::thread(&server::accept_client_message, this, client).join(); #endif
6:57 PM
hahah
Avatar
SublimeStyle 2/11/2021 6:57 PM
also, just wanted to apologize, Dream guy was right, I was being patronizing; was not my intent (tho I know it came off that way)
Avatar
it's ok, I know I can also have .... polarizing language
6:58 PM
but it's because I like the project and I want the best for it
6:58 PM
doesn't make it ok though.
Avatar
SublimeStyle 2/11/2021 6:58 PM
it's fine, you're passionate, honestly I understand
7:01 PM
that's a cool project tho, lots of experience to be gained from it and I like your coding/design style, you seem to embody best practices in several areas
Avatar
Avatar
SublimeStyle
that's a cool project tho, lots of experience to be gained from it and I like your coding/design style, you seem to embody best practices in several areas
thanks!, and I try. I've seen some bad code, and I don't want people reading my code to feel the way I felt reading the bad code.
👍 1
7:03 PM
this is one of my new favorite toys
7:03 PM
template<auto lb, typeof(lb) ub> [[maybe_unused]] constexpr auto is_between(typeof(lb) x) -> bool { return (ub > x) && (x > lb); }
7:03 PM
basically a < x < b
7:03 PM
where you only need to pass x
7:04 PM
so you get that really great callback signature where the only thing passed in it x
7:04 PM
like in pseduo code
7:04 PM
my_numbers.filter(is_between<0,100>) //numbers from 1-99
Avatar
SublimeStyle 2/11/2021 7:08 PM
noice, always a nice feeling when you can write something that simplifies all the other things you do haha... I think that's why I'm semi-addicted to software dev
Avatar
hey everyone, has anyone else encountered this, where if you change a variable on a BP it becomes really laggy for a client, like the server is trying to sync it with the client but is inaccurate? for example you get this effect if you change the TamedRunningSpeedModifier of APrimalDinoCharacter, for the client riding the dino the dino starts teleporting, while for others players it walks like normal in devkit when changing such values it requires a recompile. even when i tried to replicate the value to all clients the issue still persisted, at this point i assume such fields cannot be changed without mods but i can be wrong (edited)
Avatar
Avatar
WETBATMAN
hey everyone, has anyone else encountered this, where if you change a variable on a BP it becomes really laggy for a client, like the server is trying to sync it with the client but is inaccurate? for example you get this effect if you change the TamedRunningSpeedModifier of APrimalDinoCharacter, for the client riding the dino the dino starts teleporting, while for others players it walks like normal in devkit when changing such values it requires a recompile. even when i tried to replicate the value to all clients the issue still persisted, at this point i assume such fields cannot be changed without mods but i can be wrong (edited)
I would suggest a mod/plugin combo
6:44 PM
the plugin to modify values
6:44 PM
the mod to have an RPC for the clients to update locally
Avatar
the mod i'm dealing with is already core, so i really wanted to avoid that 😄
Avatar
🐨Dream Doctor🦘 2/14/2021 9:08 AM
There are many variables where replication is non-standard that I've come across while making mods. I made a spyglass mod which highlighted many of them. If you find something specific, ask on the modding discord where someone else has probably (but not always) come across it.
Avatar
weird thing is, it does replicate the speed to the client, because the dino moves at the new speed
11:52 AM
it just warps around for the person riding it
11:52 AM
i guess i should open the devkit and check what kind of replication this particular variable has
Avatar
@WETBATMAN looks like windows server 2019 doesn’t play nice with Ark (edited)
12:15 PM
I wound up having to download two old as fuck dx related dlls off the internet because dx9 redist would just not install (edited)
12:15 PM
(Yes, I verified the signatures of the dlls)
12:15 PM
Hopefully this doesn’t turn into a problem for Ark down the road SweatyNerd
Avatar
well i don't share the same problem, i host all servers on server 2019 😄 (edited)
Avatar
Avatar
WETBATMAN
well i don't share the same problem, i host all servers on server 2019 😄 (edited)
Core or Desktop
12:16 PM
Huge difference
12:16 PM
And physical or virtual
Avatar
not sure another person is responsible for machines 😄
Avatar
Does it have explorer
12:16 PM
/ a desktop
12:17 PM
And you don’t know if it’s running on a vm?
Avatar
That doesn’t show core or desktop
12:17 PM
Standard can be installed in either mode
12:17 PM
Core is just headless mode
12:18 PM
Which is better for a game server (edited)
12:18 PM
I didn’t say the server didn’t run
Avatar
ah it's desktop
Avatar
Just that required libraries were uh
12:18 PM
Not straight forward to get
12:19 PM
Desktop probably might be fine
12:19 PM
Core can install direct x
12:19 PM
But I guess the audio effects library ark uses isn’t shipped in that package
12:20 PM
Going to honestly probably wipe the machine and log all the libraries it needs and fails to find
12:20 PM
And just copy them from my computer into a zip
12:20 PM
I want as little overhead on the server as possible
12:20 PM
I’d run it on Linux is they shipped debug symbols sadge
Avatar
you know
12:21 PM
i had way more issues with server 2016
12:21 PM
hosting ark
12:21 PM
than 2019
12:21 PM
mostly network related
12:28 PM
At least it would start in those instances poggies
12:28 PM
Oh well I’ve got it solved on my end
Avatar
Дивоглюк 2/15/2021 9:27 AM
how can I find all electric generators connected to the turret?
Avatar
do all your plugins use config.json as the default config file?
Avatar
Avatar
AnotherMax
do all your plugins use config.json as the default config file?
It isn't required to be named that but I think in general everyone uses that naming convention.
👌 1
Avatar
Hey @Lethal by coincidence i came across one of your paid plugins while pulling all listed plugins from the arkserverapi.com website. cc @Michidu. It seems that i can not access a download like for any paid plugins, which kinda prevents me from providing auto update & install for paid plugins.
Avatar
I don't have any control over the website. But my discord offers them for download but not sure that helps you either.
Avatar
I know, no worries 🙂 Unfortunately i'm not able to utilise discord servers to determine when a plugin was updated and where to download the link from
Avatar
So, do all paid plugins have a license model? Or is that only with most? If all would have a license, i'd think it wouldnt be a problem to allow the download link to be visible, right? (edited)
Avatar
Avatar
AnotherMax
So, do all paid plugins have a license model? Or is that only with most? If all would have a license, i'd think it wouldnt be a problem to allow the download link to be visible, right? (edited)
it's up to the developer
Avatar
yes i understand. But what is currently mostly practiced? Even though it is up to the developer, does everyone have a license model?
Avatar
Avatar
AnotherMax
yes i understand. But what is currently mostly practiced? Even though it is up to the developer, does everyone have a license model?
all paid plugins atm have a license model yes
9:27 PM
that being something like a serial key or a hwid / ip etc, right?
9:30 PM
basically, even though people have the files, they still cant use it without the license
Avatar
Yes
👍 1
Avatar
Perhaps you could ask developers case by case to do github releases
Avatar
Дивоглюк 2/16/2021 9:53 AM
what is difference between BPGetAllLinkedStructures and GetAllLinkedStructures?
Avatar
🐨Dream Doctor🦘 2/16/2021 10:20 AM
Anyone know if there's a way for a plugin to get a list of mods loaded by the server. Obviously I could parse GUS.ini, or the mods directory, but I'd prefer a way to know what mods were definitely, successfully loaded by the server.
Avatar
Avatar
🐨Dream Doctor🦘
Anyone know if there's a way for a plugin to get a list of mods loaded by the server. Obviously I could parse GUS.ini, or the mods directory, but I'd prefer a way to know what mods were definitely, successfully loaded by the server.
I believe game mode had activemods field
Avatar
bool IsModLoaded() { FString LoadedMods; ArkApi::GetApiUtils().GetShooterGameMode()->GetStringOption(&LoadedMods, "ServerSettings", "ActiveMods"); TArray<FString> ModsArray; if (!LoadedMods.IsEmpty()) LoadedMods.ParseIntoArray(ModsArray, L",", true); return ModsArray.Contains(L"1925654247"); }
11:41 AM
parsing ini is fine
11:42 AM
game caches the ini file so it's not like if the user changes it, you'll get a new list
Avatar
how many of you store the plugin files in a ZIP vs a RAR? I noticed a couple plugins use RAR. Some uniformity would be nice 🙂
12:54 PM
@Pelayori i noticed yours are using RAR. Any chance you could swap to zip? 😄
12:57 PM
i see 95% is using zip. So i will exclude all RAR downloads
Avatar
Avatar
AnotherMax
how many of you store the plugin files in a ZIP vs a RAR? I noticed a couple plugins use RAR. Some uniformity would be nice 🙂
🐨Dream Doctor🦘 2/16/2021 1:30 PM
For what purpose are you needing uniformity?
Avatar
i'm adding a automated plugin manager to GSA
Avatar
Avatar
AnotherMax
i'm adding a automated plugin manager to GSA
🐨Dream Doctor🦘 2/16/2021 1:33 PM
Ok. I think it's a tough ask to request an entire community to confirm to your requirements when you're working on a commercial product. Perhaps GSA would consider contributing towards something the entire community can use in terms of a plugin manager? (edited)
Avatar
well, there only seems to be 1 author using RAR 🙂
1:35 PM
like i said, 95% is zip
Avatar
Avatar
AnotherMax
well, there only seems to be 1 author using RAR 🙂
🐨Dream Doctor🦘 2/16/2021 1:36 PM
Sure, but you've made a number of requests that I can see. Don't get me wrong, I love GSA, but the fact that the API itself and many of the plugins are free and open source makes your requests regarding your very commercial product a little.... sensitive. What can GSA give back to the API community in return for their assistance?
Avatar
GSA cant give anything back, because Ark server API has a partner already and there is no room for another. I wish there was
1:37 PM
but I think having a system that makes it easier for people to install plugins will take off a huge load support wise, from you guys
1:37 PM
so IMO its a win-win
Avatar
🐨Dream Doctor🦘 2/16/2021 1:38 PM
It's not a win-win for the API community when GSA develops a closed-source commercial system. It's a win for you guys for sure. It adds an attractive feature to your commercial product.
Avatar
im advertising your work?
1:40 PM
im making it easier for your customers to run their plugins. I dont see how that is not a win for all
1:40 PM
im even allowing you to advertise paid plugins, so you get more publicity... without charging you (edited)
1:41 PM
and for the record, i tried helping here. offering to act as a project manager on git. But there doesnt seem to be any interest. So what do you want me to do? 😄
Avatar
🐨Dream Doctor🦘 2/16/2021 1:44 PM
Again, no, you're making it easier for a very small percentage of server owners (your customers) to update their plugins, and you're doing it to sell more of your own product. I'm sure you've seen the discussion recently about the API community developing their own package management / repository system. Are you the expecting plugin authors to conform to two different systems, their own AND yours as well?
Avatar
you do come off a little hostile. Im not sure why that is. Im just asking questions like anyone
Avatar
🐨Dream Doctor🦘 2/16/2021 1:50 PM
Not hostile at all. Like I said, I love GSA as a product, and have done for a long time. I'm just asking you to consider your requests in terms of the entire open source API community, and consider how you might contribute something meaningful for the entire community instead of just GSA. Anyway, I'll shut up now. I'm sure others will disagree with me 🙂
Avatar
literally everyone is using zip, except one... And my questions was: can you swap to zip. I tried helping you manage the core project management, and nobody responded. 🤷‍♂️
1:52 PM
at least I am trying to help, compared to the server providers that already offer plugins.
Avatar
🐨Dream Doctor🦘 2/16/2021 1:56 PM
Yeah I understand. There's a lot of patience required in that regard, and that has spawned multiple discussions about forking the API.
Avatar
that, i can not do anything about. Other than offering my help here. And hope someone will take the lead and continue development. Thats what i warned for a couple months back.... It is also in my best interest to keep this project running
1:58 PM
anyway, my offer is still on the table. Its up to you people
Avatar
@AnotherMax Do you have a place to upload files that can be added as part of my release pipeline?
Avatar
i will make a special portal available where owners can manually add plugins and settings
2:06 PM
i have access to the Arkserverapi.com api, but that api does not allow me to download files for paid plugins. I reached out to Michidu to see if there is a way for my api keys to have access to all downloads. Since you guys all have a license system in place, people wont be able to use your plugins without a license. So, preferably I would use the arkserverapi.com api for all info, so you only need to upload the information in 1 place.
Avatar
Ah, ok.
Avatar
there still will be a manual override option. So you can set default configuration settings etc. To make it easier for people to install the plugin etc.
2:09 PM
if you want i can let you know when the update is released. Hopefully somewhere this week
Avatar
Sure
👍 1
Avatar
I have a questions about how plugins store data. Do you store any data in the plugin folder, that may need to be stored. For example with a backup?
Avatar
Avatar
AnotherMax
@Pelayori i noticed yours are using RAR. Any chance you could swap to zip? 😄
Yes, I'll upload all versions as zip when I get the chance. Currently busy for this entire week most likely
Avatar
no rush, thanks!
Avatar
Avatar
AnotherMax
I have a questions about how plugins store data. Do you store any data in the plugin folder, that may need to be stored. For example with a backup?
Plugins with data access generally use MySQL or SQLite so it is possible there are database files if using SQLite. (edited)
Avatar
👍 okido, thanks! (edited)
2:50 PM
im assuming this wouldnt be a lot of data. We're not talking about 100mb+, i think?
Avatar
In generally I think the databases are very small.
👍 1
Avatar
Would be interesting to see a plugin built around artifact bases. Make it so you can have only one base every X foundations, but if you put a module in, it applies an effect to the area around it. One module can make buildings tougher, a different one increase turret damage, maybe a third could give increased health regen...
Avatar
Is this https://ark-server-api.com/index.php?resources/ark-permissions.12/ the Permissions plugin that comes with the base installation?
Avatar
Avatar
AnotherMax
literally everyone is using zip, except one... And my questions was: can you swap to zip. I tried helping you manage the core project management, and nobody responded. 🤷‍♂️
Just use 7zip to extract the files
4:59 PM
Then it won’t matter between rar or zip
4:59 PM
I personally prefer 7z over rar and zip myself
Avatar
i prefer using built-in Windows commands, so I dont have to rely on 3rd party software
Avatar
Avatar
AnotherMax
i prefer using built-in Windows commands, so I dont have to rely on 3rd party software
I mean you are a 3rd party software.
Avatar
i try to minimise using 3rd party software to execute actions on a server. Less reliablities in general leads to a more stable solution
Avatar
7z is fairly safe to rely on. Personally I only use the 7z format because it has better compression over zip. It’s a bonus that they support rar and zip too.
Avatar
alright, well thanks for sharing your insights 🙂
Avatar
You could tarball it
5:26 PM
But again, you’d need 7z on windows for that
Avatar
Avatar
AnotherMax
Is this https://ark-server-api.com/index.php?resources/ark-permissions.12/ the Permissions plugin that comes with the base installation?
It is the same plugin however the version released in the API zip is not correct but the permission plugin page has the current working version. There is a new version coming whenever @Foppa gets around to releasing it on the website which includes caching, tribe and timed permission support.
👍 1
Avatar
@Lethal have you seen this?
5:53 PM
C++/WinRT is an entirely standard modern C++17 language projection for Windows Runtime (WinRT) APIs, implemented as a header-file-based library.
5:53 PM
poggies
Avatar
thanks @Lethal !
Avatar
It's out 🙂
👍 1
Avatar
yaaaay new permissions
9:27 PM
awesome work everyone
Avatar
i was gonna ask if someone had an update planned, to test the auto update. I guess i was lucky today 😄
9:49 PM
is sqlite the default now?
Avatar
Avatar
AnotherMax
is sqlite the default now?
sqlite was always default for permissions
Avatar
ah, perhaps the Permissions that shipped with the base was using mysql as default?
Avatar
yes but ofc the connection info wouldn't be accurate unless you changed it, so it defaulted to sqlite
Avatar
👍 i was a little confused because earlier today i saw mysql as default. But i think that was with the old one
Avatar
Avatar
Foppa
It's out 🙂
🐨Dream Doctor🦘 2/17/2021 2:05 AM
Awesome! Thank you! Could you maybe make an @everyone announcement in #【📢】ᴀɴɴᴏᴜɴᴄᴇᴍᴇɴᴛꜱ to make sure everyone is aware? It's such an important release 🙂
Avatar
is #deleted-channel the right channel to submit a feature request for the api core, and put a bounty on a PR? Say, € 100 for the person that submits the PR for X?
11:56 AM
also, is there a place I can suggest conventional guidelines? Should i post the list I made in a github issue?
Avatar
oh no, after updating the api permissions 1.7 the servers are turned off, no crash
Avatar
Avatar
Guanarteme
oh no, after updating the api permissions 1.7 the servers are turned off, no crash
Do you have C++17?
4:33 PM
It might've been compiled against that.
Avatar
Probably needs the VS2019 runtime files.
Avatar
Avatar
Lethal
Probably needs the VS2019 runtime files.
Was it compiled against vs19?
Avatar
Ummm
6:55 PM
Ok. I download later
Avatar
Avatar
substitute
Do you have C++17?
I dont no
Avatar
Avatar
substitute
Was it compiled against vs19?
@Foppa compiled the release so he can say for sure but i'm pretty sure both @Kal and I were both using VS19.
7:04 PM
@AnotherMax what PR? o.0
Avatar
pull request
7:31 PM
i understand the term, i was asking what you were trying to bribe people to do
7:32 PM
but i appreciate being treated like an idiot
Avatar
c++ 2015
7:52 PM
download C++2019??
Avatar
sorry, my distribution is Microsoft Visual C++ 2015-2019 redistributable (x64) - 14.28.29325
Avatar
Avatar
Kal
i understand the term, i was asking what you were trying to bribe people to do
it's not really a bribe, more of work?
8:27 PM
8:27 PM
had no fan mounting brackets, let gravity do it's thing
8:27 PM
8:27 PM
Avatar
Yes it's 2019 🙂
Avatar
I have returned to the permissions 1.6 and they do not turn off
Avatar
permissions 1.7 still gives me problems, the servers are turned off.
Avatar
Install this on your server
Avatar
ok
8:31 PM
it is the same one I have installed
8:32 PM
I have permission to upload the photo
Avatar
Well, i don't have any issues on my end so far !
Avatar
@Foppa yes I have repaired it and nothing
Avatar
Avatar
Kal
but i appreciate being treated like an idiot
i just assumed not everybody uses git. So, no need to take this personal. I dont see it as a bribe either 🤷‍♂️ I dont understand the negativity. I cant code in C#, neither do i have the ambition. But i do experience an issue with the ark api, due to some missing functionality. So i offer money to anyone willing to help me. Which i think is more than fair if you ask someone to make something. My PR request would benefit all though. As i am interested in crash / stack trace logging to a file. So i dont see how this is negative in any way.. (edited)
Avatar
Avatar
AnotherMax
i just assumed not everybody uses git. So, no need to take this personal. I dont see it as a bribe either 🤷‍♂️ I dont understand the negativity. I cant code in C#, neither do i have the ambition. But i do experience an issue with the ark api, due to some missing functionality. So i offer money to anyone willing to help me. Which i think is more than fair if you ask someone to make something. My PR request would benefit all though. As i am interested in crash / stack trace logging to a file. So i dont see how this is negative in any way.. (edited)
You mean server crash log? A .crashstack file is created on /Saved/Logs but I'm not sure if you want anything different
Avatar
is that something that was added recently? From what i've seen so far, there are .dmp files generated in there. But my customers cant decipher. I also received reports from customers that some developers cant use a .dmp. They need crash stack logs. So, i am trying to find a solution to that problem. I tried catching the errors via docker, but it turns out to be harder than anticipated. Im not sure how it works in your coding language, but in the one i use, i use tools like Bugsnag. This is a great error logging tool. And it wors because exceptions are intercepted before the application cycles comes to a halt. I can't help but imagine there being a similar option available for the plugin framework.
Avatar
@AnotherMax it depends on the crash
10:14 PM
some crashes generate a crashstack
10:14 PM
others don’t
10:14 PM
sometimes you don’t even get a .dmp file (edited)
Avatar
Avatar
AnotherMax
is that something that was added recently? From what i've seen so far, there are .dmp files generated in there. But my customers cant decipher. I also received reports from customers that some developers cant use a .dmp. They need crash stack logs. So, i am trying to find a solution to that problem. I tried catching the errors via docker, but it turns out to be harder than anticipated. Im not sure how it works in your coding language, but in the one i use, i use tools like Bugsnag. This is a great error logging tool. And it wors because exceptions are intercepted before the application cycles comes to a halt. I can't help but imagine there being a similar option available for the plugin framework.
2 things
Avatar
basically, i'm looking for a solution that simplifies it for an example dummy ark admin. If they can just copy/paste some file and bring that a plugin developer, so they understand why it crashed: i'd be super happy
Avatar
anyone can use a dmp, the developer needs to learn how to read a dmp 🙂
10:15 PM
second (edited)
Avatar
Avatar
substitute
anyone can use a dmp, the developer needs to learn how to read a dmp 🙂
i learned that it can be hard to learn people stuff they dont want to learn. So I would mostly prefer something people dont have to learn, but is kinda plain simple
Avatar
add this arg to your servers
10:16 PM
-stackonexitrequest
10:16 PM
and you should get a stack in most cases
Avatar
Avatar
AnotherMax
i learned that it can be hard to learn people stuff they dont want to learn. So I would mostly prefer something people dont have to learn, but is kinda plain simple
A developer writing software at the C/C++ level needs to learn how to read a dmp
Avatar
is that something that is handled inside the ark api? or is this a vanilla ark flag?
Avatar
it's no different than learning how to use a debugger
Avatar
Avatar
AnotherMax
is that something that is handled inside the ark api? or is this a vanilla ark flag?
vanilla ark
Avatar
in most cases when the server generates .dmp it also generates a crashstack
10:17 PM
ppl running the PluginCrashManager might not get crashstacks (edited)
Avatar
so, keep in mind i know 0 about your language, i'm trying to make sure i understand. A dmp file would hold all info. I tried a microsoft dmg reader a while back (forgot the name). But i didnt see any logs. Are there tools you can link to, that enables a novice like me to understand what happened?
Avatar
a dmp isn't a dmg
10:18 PM
and a dmp will contain all the crash info
Avatar
sorry, i meant dmp. its a typo
Avatar
related to the crash
10:18 PM
generally the same info in the dmp is also in the event viewer
10:18 PM
it's just a file that can be shared
Avatar
what tools do you use to read the dmp, so you know exactly what happened?
Avatar
for developers to use/read to fix their bug
10:19 PM
Displays information about blue screen crashes occured on your system. (MiniDump Reader)
10:19 PM
this program usually does an OK job
10:19 PM
you can also try Visual Studio
Avatar
are there any tools that are easy? Say, for a non-techy?
Avatar
not really
10:19 PM
dmp files are mostly for developers
10:19 PM
to investigate a crash with a debugger
Avatar
a non techie doesn’t need to read the dumps
10:20 PM
just send it to the dev
Avatar
yeah sure, but which dev do they need to send to if they have 10 plugins running 😄
10:20 PM
they need to figure out which dev's plugin caused it
Avatar
Avatar
AnotherMax
yeah sure, but which dev do they need to send to if they have 10 plugins running 😄
crashstack says plugin name
Avatar
and -stackonexitrequest this would generate that, in most cases?
Avatar
it should
Avatar
alright!
Avatar
not sure if that only enables while as an official server though
10:21 PM
you'd need to check
10:21 PM
some flags only do anything if the server is marked as official
Avatar
if you don’t get crashstacks at all
10:21 PM
you most likely misconfigured something
Avatar
can also check event viewer
Avatar
well, i run game servers in docker
Avatar
or possibly some plugin/mod interfering
Avatar
just saying
Avatar
so its a little more complicated
Avatar
Avatar
AnotherMax
well, i run game servers in docker
which Windows image
10:22 PM
for your containers
Avatar
let me check
10:22 PM
mcr.microsoft.com/windows:1809
10:22 PM
the full
10:25 PM
is there any chance -stackonexitrequest would cause issues? Like, i'm working with production environments here 🙂
Avatar
It shouldn’t
👍 1
Avatar
GSH | MrOwlSky 2/18/2021 3:54 AM
Yeah so good question that @AnotherMax brought up. How can we review crashes that are generated from Windows Dockers using his GameServerApp program? The .DMP files are useless for server owners who don't know the dev side of reading .DMPs. The goal would be making it more consumer friendly for server owners but how is that possible if windows dockers don't produce crashstacks when servers crash.
Avatar
Ok...who didn't nullptr check in their code? 🙂
Avatar
GSH | MrOwlSky 2/18/2021 4:03 AM
nullptr?
4:05 AM
Was sort of a joke since no plugin gets named and appears to be a null pointer error.
4:06 AM
But its ruined since I had to explain 😛
Avatar
It’s fairly easy to read that ngl
5:29 AM
5:29 AM
That code is nullptr error code
5:29 AM
Can find It on Google
5:30 AM
You should get a more relevant crash stack
5:30 AM
Looks like someone didn’t ship symbols since you are getting UnkownFunction
Avatar
Avatar
substitute
Looks like someone didn’t ship symbols since you are getting UnkownFunction
So, this gets us back to my previous point
12:06 PM
Is there anyone that is willing to help make a stacktrace logger to file? Because as above demonstrates: it doesnt help customers and neither does it help developers because they will all say “nope, not my plugin causing the crash”
12:07 PM
I hope you all understand this exact issue is what makes people look for alternatives, from plugins
12:08 PM
People dont like being told by everyone: i cant help you, go figure it out
12:08 PM
Simplify this if you want a broader adoption rate and stability in plugins.
Avatar
Avatar
AnotherMax
I hope you all understand this exact issue is what makes people look for alternatives, from plugins
you can’t magically tell what function it was if the plugin dev decided to not give you a .pdb file
1:25 PM
the .pdb file contains debug symbols
1:25 PM
if you don’t have it
1:25 PM
the crashstack will never say which function caused the crash
1:25 PM
but it will say the plugin name
Avatar
WoolyPenguin 2/18/2021 1:35 PM
ark already has a stacktrace.. that is the crashstacks^^
1:35 PM
if those don't work the system environment is the issue
Avatar
Avatar
WoolyPenguin
if those don't work the system environment is the issue
Yeah i understand that is and has been your opinion. I’m trying to find a work around. Perhaps you can share some info how to make sure its not the environment 🙂
Avatar
Avatar
WETBATMAN
you can’t magically tell what function it was if the plugin dev decided to not give you a .pdb file
I am trying to find a solution for people to determine who’s plugin caused the issue. Without having to search through dmp files. Most people dont understand
Avatar
Avatar
AnotherMax
I am trying to find a solution for people to determine who’s plugin caused the issue. Without having to search through dmp files. Most people dont understand
you’re trying to fix something that doesn’t need a fix
1:52 PM
if there is a crashstack
1:52 PM
it says what caused it
1:53 PM
if there is no crashstack
1:53 PM
that’s not something your average person can debug
1:56 PM
i hook UObject_Process event in HWIDBans
1:56 PM
a function that is called for every single bp graph (edited)
1:56 PM
this means that HWIDBans will show up in EVERY single crashstack on the server
1:56 PM
does that mean my plugin is ALWAYS the cause ?
Avatar
Im just trying to find a more userfriendly solution to this technical problem. But i understand there isnt much you can/want to do about it
Avatar
Avatar
AnotherMax
Im just trying to find a more userfriendly solution to this technical problem. But i understand there isnt much you can/want to do about it
there isn't much to do about it, you can just read the crashstack
2:05 PM
2:05 PM
it looks like this
2:05 PM
if you want to dumb it down for users
2:05 PM
just read the crashstack
2:05 PM
and tell the user what it was
2:05 PM
simple
2:05 PM
the very top line is always what was the last function and hence, what caused the crash
Avatar
So what if the application doesnt prompt a crashstack. Where is it logged to? Can it be logged to a file?
Avatar
Avatar
AnotherMax
So what if the application doesnt prompt a crashstack. Where is it logged to? Can it be logged to a file?
then there is no crashstack
2:25 PM
there are many ways a server can close
2:26 PM
crash in another thread doesn’t give a crashstack
2:26 PM
sometimes the server can just exit and also not generate a crashstack
2:27 PM
if you’re sure it’s not something with your environment then possibly the particular crash you’re having doesn’t generate a crashstack
2:27 PM
which happens very rarely
2:30 PM
it’s most likely your environment, i’ve seen this with people that host with TcAdmin and such
2:30 PM
they never get a crashstack
Avatar
Yes, and i do understand there are limitations. But in case where its possible to log, i would like something like that. And i’m willing to contribute financially if someone is willing to spent time on that
Avatar
Avatar
AnotherMax
Yes, and i do understand there are limitations. But in case where its possible to log, i would like something like that. And i’m willing to contribute financially if someone is willing to spent time on that
when it's possible to log, it will create a crashstack, i've mentioned this multiple times before
3:17 PM
3:17 PM
i have a blueprint function logger
3:17 PM
this isn't full stack as it doesn't show c++ functions but maybe it could help you (edited)
Avatar
WoolyPenguin 2/18/2021 3:44 PM
ark server and client by default create crashstack files. only thing i know preventing this is docker
3:44 PM
if it fails to get a stack trace, you cannot create a plugin to make a stack trace
Avatar
So, can we catch the exception and write it to a file instead?
Avatar
WoolyPenguin 2/18/2021 3:45 PM
that wouldn't help
3:45 PM
if ark fails to get a stack trace, you will not be able to either
3:45 PM
hence a generic exception tells you nothing about what did it (edited)
3:46 PM
I would look at what can be done with the environment it runs in
Avatar
Avatar
WoolyPenguin
I would look at what can be done with the environment it runs in
I spend quite some time on that, without much luck. I talked to a couple developers that work for governments that use the same language as you do. And they were surprised there was no logging implemented
Avatar
WoolyPenguin 2/18/2021 3:48 PM
that's where you're mistaken, this is implemented (edited)
3:48 PM
and in every other environment i know it works just as it's supposed to
Avatar
Alright. Well if someone is willing to work with me to figure it out: name your price and send me a friend request
Avatar
WoolyPenguin 2/18/2021 3:49 PM
I'm sorry, I've never used docker
Avatar
Avatar
AnotherMax
Alright. Well if someone is willing to work with me to figure it out: name your price and send me a friend request
you're putting a band aid fix on a problem that's specific to your platform
3:49 PM
i'd say this is unacceptable for a paid service of this price
Avatar
WoolyPenguin 2/18/2021 3:49 PM
figuring out why wouldn't be a band aid
Avatar
this is my opinion
3:49 PM
i mean a plugin stack tracer 😄
3:50 PM
ofc figuring out what the issue is in those virtualized environments is a good fix
Avatar
WoolyPenguin 2/18/2021 3:50 PM
the issue seems to be that it cannot trace the stack tho (edited)
Avatar
yup, TCAdmin has the same issue
Avatar
I hope you do understand that the only way forward is via containerisation. So, it’s a matter of time before everyone has this problem.
Avatar
WoolyPenguin 2/18/2021 3:51 PM
that's a funny statement
3:51 PM
the way forward for things not focusing on performance maybe
Avatar
Avatar
WoolyPenguin
that's a funny statement
I know you’re not a fan. You mentioned that often. Check out the benchmark results and you’ll see you are wrong. Either way, if you dont want to help, thats fine 🙂
Avatar
WoolyPenguin 2/18/2021 3:52 PM
i have a detailed benchmark of docker
3:52 PM
and it looses everything from 5-15% of cpu
Avatar
What kind of isolation are you talking about?
3:53 PM
Hyper-v isolation, sure. Process-isolation: no way
Avatar
WoolyPenguin 2/18/2021 3:54 PM
5-15% was an average
3:54 PM
you cannot add overhead and not loose performance
Avatar
Im very interested to see your results 🙂
Avatar
WoolyPenguin 2/18/2021 3:54 PM
it's not mine
3:54 PM
i'll see if i can find
3:57 PM
I ran a lot of benchmarks using ark benchmark mods, and funny enough: there was no difference, or a very small decrease using hyper-v isolation. And even then, the future is still containerization. Look at all tools like kubernetes, lxc, docker, openstack etc etc
3:57 PM
the future for some
3:59 PM
the reason people use docker has nothing to do with performance. it has to do with cutting costs for developers. not to create a better end product.
Avatar
This is about docker on linux?
4:00 PM
Docker on windows is quite different
4:00 PM
Its also quite an old research. A lot has changed in 4 years
4:00 PM
Back then ark api wasnt even a think
Avatar
WoolyPenguin 2/18/2021 4:01 PM
yeah, it's not better today
Avatar
Avatar
WoolyPenguin
the reason people use docker has nothing to do with performance. it has to do with cutting costs for developers. not to create a better end product.
It’s about creating a environment that is constant
Avatar
Avatar
WoolyPenguin
yeah, it's not better today
Got info that confirms your claims? On windows?
Avatar
WoolyPenguin 2/18/2021 4:01 PM
I have quite a few connections in companies, and those that use docker use it to cut cost only.
4:01 PM
I don't get why you bother trying to say overhead is non existent (edited)
Avatar
Well, i want to invite you to use ARK benchmark mods and test to see if you can proof me wrong. Or build a benchmark tool that we can run to measure performance loss. Proof me wrong and i give you € 100
4:04 PM
Please do use windows, and test hyper-v and process isolation
Avatar
WoolyPenguin 2/18/2021 4:04 PM
you're talking about a game that uses 100% of a cpu core at times...
Avatar
I ran tests, comparing with running on asm. No difference
Avatar
WoolyPenguin 2/18/2021 4:04 PM
there's no point
4:04 PM
try that with 100 players
Avatar
We do
4:06 PM
Microsoft made a great implementation, which works very decent nowadays
4:11 PM
4:14 PM
These benchmarks test the cpu, memory & disk
Avatar
There’s always going to be overhead when using a virtualization platform
5:37 PM
But in this case it could be negligible on modern processors (edited)
Avatar
Avatar
AnotherMax
I hope you do understand that the only way forward is via containerisation. So, it’s a matter of time before everyone has this problem.
As for this
5:38 PM
It depends
5:39 PM
Some things also just don’t work in docker properly yet , so I only see it for the more general use applications or applications designed for containerization.
5:40 PM
I don’t have this problem as I run the servers in a VM instead of a container as my base OS is Linux
Avatar
I prefer not using VM’s. That does have a lot more overhead compared to containers that run without any virtualization. Perhaps also negligible.
5:43 PM
Anyway, i came to the conclusion that although there seems to be possibilities, there isnt anyone interested in helpen. Perhaps because they dont understand my perspective 🤷‍♂️ i’ll look for a developer somewhere else that can
Avatar
Avatar
AnotherMax
Anyway, i came to the conclusion that although there seems to be possibilities, there isnt anyone interested in helpen. Perhaps because they dont understand my perspective 🤷‍♂️ i’ll look for a developer somewhere else that can
SublimeStyle 2/18/2021 6:07 PM
what you're looking for is a dev you can pay to help debug your issues when they happen... you can't expect to run some enterprise or community-scale server with a bunch of third party libraries and expect there to be an easy solution when things go wrong... The easiest solution is to be hyper sensitive to any plugin updates and not blindly update plugins when one update could break another of the several plugins you have. It's not that nobody wants to help, it's that nobody here is a unicorn that can give you everything you're asking for without you ponying up a lot more than $100.
Avatar
Avatar
AnotherMax
Anyway, i came to the conclusion that although there seems to be possibilities, there isnt anyone interested in helpen. Perhaps because they dont understand my perspective 🤷‍♂️ i’ll look for a developer somewhere else that can
you're looking for someone that we can't provide you with, if your server instances are unable to generate crashstacks, there is an issue with your docker system, we cannot just magically make the game create a crashstack
6:18 PM
this is something that you have to fix in your implementation/system
6:18 PM
best of luck 🙂
👍 1
Avatar
Avatar
SublimeStyle
what you're looking for is a dev you can pay to help debug your issues when they happen... you can't expect to run some enterprise or community-scale server with a bunch of third party libraries and expect there to be an easy solution when things go wrong... The easiest solution is to be hyper sensitive to any plugin updates and not blindly update plugins when one update could break another of the several plugins you have. It's not that nobody wants to help, it's that nobody here is a unicorn that can give you everything you're asking for without you ponying up a lot more than $100.
just to make sure, my € 100 was an example. Name your price and i'm sure we can work it out 🙂
9:49 AM
hourly rate with time estimate is fine too
Avatar
Avatar
Lethal
Sure
it's been released 👍
Avatar
Avatar
AnotherMax
it's been released 👍
Any more details?
Avatar
Avatar
Lethal
Any more details?
what kind of info are you looking for? I posted quite some info in my discord. Didnt post here to prevent spam complaints
Avatar
Oh, I hadn't joined the discord.
Avatar
basically everything works out of the box. I setup an article with some guidelines to ensure all works fine. Mainly a couple conventions that i think were missing. https://help.gameserverapp.com/article/217-ark-server-api-developer-guidelines
12:29 PM
i tested with quite some of your plugins. I think most work out of the box
Avatar
Ok, my plugins all follow that setup currently
Avatar
👍 then you dont have to do anything 😄
Avatar
Only issue was the paid plugins that you can't read.
Avatar
i was able to fix that, with help from Michidu
Avatar
I thought there was going to be a submit feature or something.
Avatar
your plugins should be listed
Avatar
oh ok
12:34 PM
12:34 PM
coming week i will add a little icon with the price info, if im able to pull that from the api
Avatar
sexy screenshot there 😛
Avatar
feel free to hit me up if you want to run some tests. Im happy to supply you with a test server to test whether your plugins work
Avatar
ok sounds good
12:38 PM
Can't rename myself on your discord but not a huge deal. I just try to keep it the same which is not my actual discord name.
Avatar
hm, according to the settings it should allow you to do that
Avatar
fixed 🙂
Avatar
Nice Lmk if you have any issues with my plugins (edited)
4:23 PM
Now that several of us are standardizing on a license system we may even be able to make a simple way for you to allow them to pay us then create a license on our behalf Have you checked with mine, lethals, or foppas license key system if you get same or diff hwids per map/cluster? (edited)
Avatar
Avatar
Kal
Nice Lmk if you have any issues with my plugins (edited)
i'm redirecting people to devs, when the plugin is having issues. 👍
Avatar
I'm in the process of reuploading as zip and chaning some plugin titles in the site to comply with your system 🙂
Avatar
sweet, appreciate it @Pelayori ! ❤️
5:10 PM
FYI, the plugin name can have spaces, but the folder inside the zip is converted to Camel Case (most here already use that approach). I inherited that approach and ensured all names will convert to camelcase and replace characters like + into plus
Avatar
Yeah, mine just had some extra title, like GenderChanger had [Tokens & Permissions], so I'll just keep it the plugin name
👍 1
Avatar
Avatar
AnotherMax
just to make sure, my € 100 was an example. Name your price and i'm sure we can work it out 🙂
SublimeStyle 2/19/2021 5:12 PM
You seem like a nice person, and I like that you're building out another provider to support the API, but I personally just wouldn't have the time. It seems like people here are pretty willing to work with ya though to standardize things 😉 I feel like having more providers helps everyone here. (edited)
Avatar
Avatar
SublimeStyle
You seem like a nice person, and I like that you're building out another provider to support the API, but I personally just wouldn't have the time. It seems like people here are pretty willing to work with ya though to standardize things 😉 I feel like having more providers helps everyone here. (edited)
no worries, i understand. But if someone else is reading this and thinks "hey!", reach out!
Avatar
Avatar
AnotherMax
sweet, appreciate it @Pelayori ! ❤️
They are now pending approval, but some of mine were already in zip so let me know if any of mine is still wrong.
👍 1
Avatar
Avatar
Pelayori
They are now pending approval, but some of mine were already in zip so let me know if any of mine is still wrong.
Approved
Avatar
Avatar
Kal
Now that several of us are standardizing on a license system we may even be able to make a simple way for you to allow them to pay us then create a license on our behalf Have you checked with mine, lethals, or foppas license key system if you get same or diff hwids per map/cluster? (edited)
Good idea for developers to use. Bad idea for developers to protect their plugins.
6:17 PM
if it's standardized it's easy to break.
Avatar
well, i think uMod is a great example. The people over there spend some time to seriously think about how to approach this. And i think they nailed it
Avatar
No idea what uMod is.
Avatar
Avatar
substitute
Good idea for developers to use. Bad idea for developers to protect their plugins.
my approach to this is that, if someone wants to crack your shit they will
6:30 PM
😄
Avatar
yes, and even with license systems. I've noticed some license system are using HTTP / HTTPS calls. Which isnt that hard to crack. So, i agree and think you better focus on content
Avatar
ofc i don’t mean there shouldn’t be any protection
Avatar
whats wrong with http calls actually?
Avatar
Avatar
Michidu
whats wrong with http calls actually?
easy to mitm and figure out the proper responses
Avatar
SublimeStyle 2/19/2021 6:36 PM
easy is subjective, especially nowadays- this implies developer error in the first place
Avatar
you can pretty much mitm everything try to figure out a proper response when it's encrypted (edited)
💯 1
Avatar
in some cases it can be quite hard. But i often use a MITM attack with a web proxy to alter the response. Fairly easy and useful for debugging
Avatar
some devs just don't care, there are ways to detect your debugger too
Avatar
@AnotherMax I think you could specify some sort of character like [] for example, in where your system would just ignore what is inside the brackets/character so some folders don't end up being too long 🙂
Avatar
good point, i can setup a regex to do that
9:05 PM
im not able to add that right now, but i will try to do that tomorrow morning 👍 (edited)
Avatar
Yeah no rush, just a suggestion 😛 (edited)
Avatar
good suggestion though 😉
Avatar
Because as far as I can think, arkshop would end up like ShopCurrency&Kits or something like that
9:06 PM
Unless it's specifically handled
Avatar
yeah, im not sure if there is an option for @Michidu, but maybe the website supports custom fields. So you can specify the map name in that field. I can make the API look for that field and then you can just set it to whatever you feel like 🙂
9:08 PM
i've added it to my todo list!
Avatar
Awesome 😄
Avatar
Hi, does anyone know if this api works AdminsPermissions
1:51 AM
I just got it to work /cheat fly and /cheat walk
1:52 AM
I want to give permission to the moderators
Avatar
Avatar
Lethal
Anyone using the built in CURL? I frequently get the first POST requests in the callback function with this. success: 1 response: {"message": "400: Bad Request", "code": 0}
AaronBasques 2/20/2021 5:36 AM
i know this is an old one, i notice if the json is too large i get 400: Bad Request, and what I've noticed is once the json gets above the 1300-1500 character size it looks like its being compressed. I created i php end point to capture what the plugin is sending and after so many characters even with all the correct headers, the issue persists and garbage comes out, sometimes its only partially compressed. I see you said you used postman, but that has built in decomp and stuff. did you ever figure it out?
Avatar
I switched to use the UE4 commands
5:41 AM
AShooterGameState* ShooterGameState = static_cast<AShooterGameState*>(ArkApi::GetApiUtils().GetShooterGameMode()->GameStateField()); ShooterGameState->HTTPPostRequest(URL, CONTENT);
Avatar
AaronBasques 2/20/2021 5:42 AM
Well.. shit xD Thanks man
5:43 AM
considering i've used that in a mod, i never thought to use it in plugins.. smh
Avatar
Avatar
Lethal
I switched to use the UE4 commands
AaronBasques 2/20/2021 5:46 AM
i assume you hooked the HTTPPostResponse?
Avatar
Nah, I don't need it for what i'm doing
Avatar
AaronBasques 2/20/2021 5:48 AM
ahh, but thanks anyway man, i would of ended up trying to implement a http lib otherwise Legend 👍
5:53 AM
using the curl methods
5:53 AM
the HTTPPostRequest
5:54 AM
lol
Avatar
i’m implementing POCO http requests into api atm (edited)
11:04 AM
i will make a pr when i’m done
Avatar
Avatar
AaronBasques
using the curl methods
Gzip compressed ? Whats in thw header
Avatar
🐨Dream Doctor🦘 2/20/2021 2:28 PM
I ran into a lot of difficulty with third party networking libs. There are some very old libraries that are built into the api itself (in spdlog) that are also commonly used in networking libraries. It was difficult to work around. (edited)
Avatar
Server plugins support for ARK. Contribute to WETBATMAN/ARK-Server-API development by creating an account on GitHub.
2:35 PM
well mine works
2:35 PM
but not yet fully finished
Avatar
Avatar
Frost®
Gzip compressed ? Whats in thw header
AaronBasques 2/20/2021 4:22 PM
yeah that's what i'm thinking, even with encoding headers explicitly set it was still compressing what was being sent to discord, i'm just happy its working with ARK's methods.
Avatar
CaptainPeeples 2/21/2021 8:01 PM
hello all!
Avatar
i Wonder, when you have tebex as a discord, bot and do !tebex:claim, i guess that if you make a plugin with a discord bot, then it would be the same as tebex, or maybe i can manipulate it to if someone buys from tebex can do in discord channel ?claim STEAM_ID64 but i dont know if it require a plugin on the server too?. sry bad english. just a reminder i know how to make a bot, like i have alot of knowledge in javascript and node.js so is easy for me to make discord bot. (edited)
9:26 PM
So basically the question is, if i make a plugin and do something like that connects it to the discord with the tebex, and people do ?redeem STEAM_ID64 (edited)
9:26 PM
would that work ?
Avatar
Hello, it's my first message on this discord. I want to know if there is some documentation for the ark-api-server (to clearly know what it's possible to do) ? I also would know if there is no way to put it UP on linux Server (no wip project ?), i really want to invest my self but i want to keep a Linux server. I don't clearly see what are boundaries between proprietary ark-server source code and user source code.
Avatar
Avatar
Tookie
Hello, it's my first message on this discord. I want to know if there is some documentation for the ark-api-server (to clearly know what it's possible to do) ? I also would know if there is no way to put it UP on linux Server (no wip project ?), i really want to invest my self but i want to keep a Linux server. I don't clearly see what are boundaries between proprietary ark-server source code and user source code.
Not possible on Linux at this time
Avatar
Anyone know if it is possible to dynamically scale a dino's size when not set as a baby?
Avatar
Avatar
Lethal
Anyone know if it is possible to dynamically scale a dino's size when not set as a baby?
🐨Dream Doctor🦘 2/24/2021 2:07 AM
Yes and no. You can, but it's buggy to do so. I think physical size is one of those things that doesn't replicate properly, since it's not usually changed. Sometimes some other events do cause it to replicate, but its not reliable, and causes all kinds of other issues. I've seen some mods do it, but it never works properly, and they have to make sure they manually do their own replication, which we obviously can't do with the server-side-only API.
Avatar
Gotcha, thanks for the info. (edited)
Avatar
Lethal, i had thought of something very similar to scale players to be super tiny or super huge xD
4:18 PM
Player size probably is replicated a little more reliably
4:18 PM
since each player can be different
Avatar
CaptainPeeples 2/24/2021 8:22 PM
Has anyone been able to automate PayPal payments and shop, currency and kits? Looking to automate my donations, turning them into shop points
8:22 PM
🤔
Avatar
I use tebex for that
Avatar
CaptainPeeples 2/24/2021 8:23 PM
The heck
8:23 PM
I’ll have to google it 🙂
8:24 PM
Interesting!
8:24 PM
Any fees?
8:26 PM
So from Tebex, what discord bot do you use to run the Rcon command?
Avatar
Only paypal fees if you use paypal directly, but they have a pretty good tebex checkout with 60+ payment methods, for which you have to apply and they charge you with 5% + gateway (ex. paypal) fee
8:26 PM
They have a plugin, check their web out https://www.tebex.io/
Fund your game server costs with Tebex. The leading payment plugin for Minecraft, Rust, ARK, GTA V and more.
Avatar
CaptainPeeples 2/24/2021 8:26 PM
Your a genius
Avatar
They also provide you with a free webstore
Avatar
CaptainPeeples 2/24/2021 8:27 PM
🙇‍♂️
Avatar
And for arkshop, you just need to add a command on the package, like 'addpoints {id} amount'
8:30 PM
{id} is a placeholder for steamid
8:30 PM
{ue4id} is for player id (ingame)
Avatar
CaptainPeeples 2/24/2021 10:24 PM
@Pelayori So the players will have to know their steam ID when they go to donate?
Avatar
They would need to sign in with steam.
Avatar
(Using OAuth)
Avatar
I'm really happy with it, and yes steam sign-in is secured
Avatar
Foppa uses DonoHook to allow people to donate in discord for timed roles then used my chats permission sync for ingame permissions
1:19 AM
works pretty well end to end
1:21 AM
sorry, correction donohook gives a permanent role i helped write a separate discord bot/plugin that then PMs them a code to use ingame to claim a timedPermission (edited)
1:23 AM
1:23 AM
Avatar
Umm interesant
Avatar
🐨Dream Doctor🦘 2/26/2021 3:53 AM
So if there are two plugins that both hook the same function, which one goes first? Is it based on load order?
Avatar
Last loaded plugin gets the final say but it depends on the type of hook and how the hook was written as well.
Avatar
Usually alphabetical order. But the logic depens on as Lethal says
Avatar
Which are the things to look out for compatibility among various hooks of the same functions?
Avatar
Avatar
Pelayori
Which are the things to look out for compatibility among various hooks of the same functions?
not much, just keep in mind that if you don't return original you stop the execution chain
Avatar
I have concerns about getting the ret value from the original, and then returning that or another value I need. I think that breaks some compatibility from what I've seen (edited)
Avatar
Avatar
Pelayori
I have concerns about getting the ret value from the original, and then returning that or another value I need. I think that breaks some compatibility from what I've seen (edited)
if another plugin does the same, original would be called twice
Avatar
Hiiii!! Can someone tell me where i can found a proper tutorial for making plugins? havent found any x.x found one for preparing the Visual Studio for start but nothing about programming the actual plugin or the documentations or sintaxis or anything, and the tutorial channel here its gone and the wiki doesnt exist x.x wanna make plugins but dont now how QwQ
Avatar
Avatar
Amarok47
Hiiii!! Can someone tell me where i can found a proper tutorial for making plugins? havent found any x.x found one for preparing the Visual Studio for start but nothing about programming the actual plugin or the documentations or sintaxis or anything, and the tutorial channel here its gone and the wiki doesnt exist x.x wanna make plugins but dont now how QwQ
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
Avatar
thanks!! at home ill see it better, but there isnt a documentation for know all the things i can do or use? commands and limitation or so?
Avatar
@Amarok47 Do you mean like a documentation?
Avatar
yeah @Azael a documentation, like unity that has its documentation to know all variables or commands and so, because without a documentation for this its difficult to know what i can or cant do with the plugin x.x
Avatar
I'm searching the same as you
5:38 PM
a documentation with the functions or things like that
Avatar
it would be nice if theres one somewhere, the only thing i can think right now its see the code of many existing plugins to see how the do the things and that way to some king of reverse engineering on them
Avatar
There is no central documentation (edited)
Avatar
and theres a way to know what we can do with a plugin and how to do it? 😒
Avatar
Avatar
Amarok47
and theres a way to know what we can do with a plugin and how to do it? 😒
you can modify anything that runs on the server and is replicated to the client
5:58 PM
for implementation you can check open source plugins
Avatar
can have examples? UI its included there?
Avatar
you cannot do anything related to UI's with a plugin
Avatar
so only can do things with World, Structures, Items, Player, Dinos and Chat(?
Avatar
Avatar
Amarok47
so only can do things with World, Structures, Items, Player, Dinos and Chat(?
SublimeStyle 2/26/2021 6:01 PM
theoretically, you could do a lot, but some of that might have to be the plugin communicating with a devkit mod (like for UIs as @WETBATMAN mentioned) (edited)
Avatar
for know i cant use DevKit because download sooo slow on the epic launcher + my internet and has a really big size x.x only can work with plugins for now
6:04 PM
i was wondering, can i make buy/sell or shop system like the Glory Coins mods? where people can sell his own objects and dinos? i know theres a ArkShop or so, but i want to make something more like Glory Coins, let players sell directly or put shops
Avatar
just add those coins to the ArkShop config then ? 😄
Avatar
but arkshop its simple, players cant make shops or sell directly xD i want something more complex 😛
Avatar
I was thinking in a plugin about moderation with the chat, mutes from the chat voted by the players, this type of functions
Avatar
CaptainPeeples 2/27/2021 6:09 AM
@Pelayori so tebex has amazing features thanks for the idea! However it seems like everyone online cant get it to actually add points for the API(Shop, currency and kits)
6:09 AM
RIP.. 😕
6:10 AM
ive tried RCON, the tebex API and to afraid to try mysql
Avatar
You just need to add a rcon/console command (I prefer rcon if you have arkshop with MySQL) and then select just 1 server tht will execute addpoints {Id} 5000
Avatar
@CaptainPeeples
Avatar
CaptainPeeples 2/27/2021 1:51 PM
Yeah it seems you might be the only one that has that working haha.
1:51 PM
I got it working but had to use MySQL
Avatar
I use the the Ark Server Manager, it has a integrated rcon console
6:48 PM
it works just fine to add coins
Avatar
Hey @Foppa , quick question. Should the Permissions plugin auto-create the tables in the configured DB or is that something people need to do manually?
Avatar
Yes it should
8:55 PM
you shouldn't be needed to do any thing with the database (edited)
9:17 PM
one last question @Foppa The new config.json has new fields for the individual tables. If those fields arent present, will it fallback to some default value?
9:30 PM
They are optional as mentioned i hoped in the description
Avatar
awesome, thanks Foppa!
Avatar
Hi @Foppa and everyone. I have a problem with the plugin StructureLimit. Sometimes when a player (with 0 structures) try to join a tribe with probably the limit of some structure the pluggin throw an error. The error is this one "InvitingTribeFail". I saw this error a lot of times and I don't know if I have a problem on my configuration or it's a bug. I send you my config.json
10:51 PM
I send you the config.json by PM
Avatar
New Ark Update has bad pdb I guess.
Avatar
Avatar
Lethal
New Ark Update has bad pdb I guess.
AaronBasques 3/2/2021 5:29 AM
Avatar
Can't view that link
5:32 AM
UEngine.Init fails to hook
5:34 AM
Pretty sure its just a mismatched pdb.
Avatar
AaronBasques 3/2/2021 5:36 AM
yeah that link jumps to beginners #【🚫】ɪꜱꜱᴜᴇꜱ-ʙᴜɢꜱ-ʙ , guess you were never a beginner 🙂 same issue yeah
Avatar
Ah, I wasn't opt'd into any of those channels
5:39 AM
Been missing a lot of chat it seems
Avatar
@Michidu @Foppa @GSH | MrOwlSky sorry for ping guys but wc released patch completely breaking the api. pinging you guys so your aware.
Avatar
on load, it is giving the error: 03/02/21 01:58 [API][error] Failed to create hook for UEngine.Init
Avatar
yep
6:01 AM
turn it off until a fix comes
Avatar
GSH | MrOwlSky 3/2/2021 6:27 AM
Nice, WC breaking mods/plugins again fun stuff. Thanks for the update
Avatar
WC is working on fix it now.
6:45 AM
6:47 AM
Update is now live. My dev server just booted
Avatar
Oh oh oh,Seems to have rolled back a version
9:20 AM
WC has recognized the influence of Michidu's masterpiece.
Avatar
Avatar
Pelayori
@AnotherMax I think you could specify some sort of character like [] for example, in where your system would just ignore what is inside the brackets/character so some folders don't end up being too long 🙂
AnotherMax 3/2/2021 5:01 PM
Just a FYI, so others can read as well. This has been added. Guidelines are updated too. Plugin names on arkserverapi.com can now use [bla bla], where [bla bla] is left out at GSA. This should make it easier to add tags / info to your plugin name and be compatible with guidelines 🙂 Thanks for the suggestion Pelayori!
🤟 1
Avatar
Avatar
AnotherMax
I know you’re not a fan. You mentioned that often. Check out the benchmark results and you’ll see you are wrong. Either way, if you dont want to help, thats fine 🙂
can you point me to the benchmark results ?
Avatar
AnotherMax 3/2/2021 5:29 PM
sure, you can find all in the #benchmark channel in the Game Server Owner discord https://discord.gg/QemJ5JFE
👍 1
Avatar
jraServerAPI 3/3/2021 5:53 AM
Is there a way to tell if a character is currently underwater? when fully submerged and they are using their oxygen stat?
Avatar
maybe APrimalCharacter WaterSubmergedDepthThreshold; ?
Avatar
APrimalCharacter::IsSubmerged (edited)
👍 1
monkaHmm 1
Avatar
Avatar
AnotherMax
sure, you can find all in the #benchmark channel in the Game Server Owner discord https://discord.gg/QemJ5JFE
AaronBasques 3/3/2021 7:35 PM
do you happen to have a valid invite to that discord?
Avatar
Avatar
AaronBasques
do you happen to have a valid invite to that discord?
AnotherMax 3/3/2021 7:51 PM
Avatar
AaronBasques 3/3/2021 9:41 PM
Thank you 🙂
👍 1
Avatar
substitute 3/5/2021 6:58 PM
@Michidu maybe one day we can have pre and post hooks using a look up table 🙂
7:05 PM
This works for being an intermediate unknown signature jumping post
7:05 PM
#include <iostream> #define WIN32_LEANANDMEAN #include <Windows.h> #include <detours.h> void asdf(int a, char b, int c) { printf("%d %c %d\n", a, b, c); } auto duh = &asdf; void resolver() { printf("this is the hooked function\n"); } __declspec(naked) void intermediate() { __asm { pushad pushfd } resolver(); __asm { popfd popad jmp duh } } int main() { asdf(420, 'f', 69); DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(&(PVOID&)duh, intermediate); DetourTransactionCommit(); asdf(420, 'f', 69); std::cout << "Hello World!\n"; }
7:05 PM
Avatar
not as easy.. in x64 we don't have inline asm and pushad/pushdf (which is not big issue actually) but how we gonna call correct hooks?
Avatar
Avatar
Michidu
not as easy.. in x64 we don't have inline asm and pushad/pushdf (which is not big issue actually) but how we gonna call correct hooks?
substitute 3/6/2021 7:28 PM
Macro to build the trampoline
7:29 PM
Big problem now is post hook, can not use jmp, call works with enter and leave but args are offset by one register since the return address is pushed
7:30 PM
I tried to hack it with just add esp, 8 but then I never return (loop) potato_sweats
7:31 PM
Hm perhaps if it is easy to find the return address from inside the trampoline
Avatar
in x64 we would use registers for args (mostly) however i still don't see how you wanna call other hooks in automatically generated hook
Avatar
substitute 3/6/2021 7:33 PM
You insert this as the trampoline with a prefix that finds the vector of callbacks and runs those callbacks
7:33 PM
Then calls the original
7:33 PM
Then does the same process for post execute callbacks
7:34 PM
Since we find hooks by text name that can be used as the key for an unordered map of callbacks
7:34 PM
And just make it a const in the generated trampoline
7:35 PM
This can probably be done though with disregard to registers, since we need to declare the types right now, we could templatize this instead
7:36 PM
I already have a templated smart container for function hooking @Michidu
7:36 PM
Various classes/headers I've written that I find useful. - SubstituteR/useful-cpp
7:36 PM
So could be adapted for general use
Avatar
i see.. it can be solved if we generate different general hooks for each functions hook body should be written in assembly completely
Avatar
substitute 3/6/2021 7:43 PM
Yep and eh maybe
7:43 PM
A majority of it at least
7:44 PM
But accessing the stl container might be aids from assembly
7:45 PM
Since we won’t know the stack size of args (for like copy struct) perhaps the definition can precompute that at compile time from the type args
7:45 PM
It’s possible but a little weird
Avatar
should be a way to make our general hook not change stack/registers i will think about it
7:50 PM
might use raw arrays instead of stl (edited)
Avatar
substitute 3/6/2021 7:51 PM
Then new hook add/remove will be slow
7:51 PM
The map is just for key:vector
7:51 PM
So in the trampoline you can have like
7:52 PM
Const name = “123” Const callbacks = manager[name] for callback : callbacks callback();
Avatar
yes it should be like this except the fact that registers/stack should be reverted before each callback call
7:55 PM
can probably use templates somehow and precompute func signature at compile time as you said.. but i don't think it's very reliable
Avatar
jraServerAPI 3/9/2021 7:56 PM
Q: there seems to be a long standing known bug with s+ turrets still powered and shooting even when the nearby generators runs out of fuel.. It's been reported a few times now on my server. I'm wondering..is there a api/plugin fix for this? Probably not, but i'm just throwing this out there and maybe one of you Ninja's will point me in the right direction 🙂
Avatar
@Michidu just needs translate to x64 (edited)
11:42 PM
__declspec(naked) void memes() { __asm { pushad pushfd } printf("This executes before the function call\n"); __asm { popfd popad mov original, ebp pop ebp call duh } printf("This executes after the function call\n"); __asm { push ebp mov ebp, original ret } }
11:43 PM
Avatar
Avatar
substitute
__declspec(naked) void memes() { __asm { pushad pushfd } printf("This executes before the function call\n"); __asm { popfd popad mov original, ebp pop ebp call duh } printf("This executes after the function call\n"); __asm { push ebp mov ebp, original ret } }
did you try to add arguments and call multiple functions?
Avatar
Avatar
Michidu
did you try to add arguments and call multiple functions?
Yea, it can work
10:05 AM
You can even do some bullshit
10:05 AM
This calls two function
10:05 AM
void memes() { __asm { leave //fuck this stack pushfd //don't fuck this stack pushad } int j = 10; void* ret = 0; for(int i = 0; i < 100; ++i) { __asm { popad //let's GOO popfd mov original, ebp pop ebp call next //prehook call duh push ebp mov ebp, original pushfd pushad } } printf("This executes after the function call : %d\n", j); __asm { popad popfd ret } }
10:06 AM
It also has a stack that is independent
10:07 AM
Big problem now is stack memory is gone when call since need to restore stack for call
10:07 AM
Maybe we can write literal .data with hardcode global address as needed
10:08 AM
Or perhaps can use relative addressing, but this is also prone to issues as we don’t setup the stack from the C side. Maybe we can manually build some stack for holding this data and can use a relative address. (edited)
Avatar
@substitute Do you know if it is possible to block/intercept a call to a BP Function?
Avatar
yes, you can hook either UObject_ProcessEvent or UFunction_Invoke
10:24 PM
@Lethal
10:24 PM
you can get the name from UFunction
Avatar
Avatar
Lethal
@substitute Do you know if it is possible to block/intercept a call to a BP Function?
hook ProcessEvent and compare the UFunction->Name
10:44 PM
if it isn't the one you want to block , forward to the original process event
10:45 PM
otherwise just don't run it
Avatar
thanks guys i'll give that a try
Avatar
I started working on this and got far enough to start filtering UFunctions but would get random hard crashes. The S+ dev put out a patch to allow turning off a feature via INI that was causing some issues with my Item+ plugin so I stopped working on this. (edited)
Avatar
Hello guys
10:51 AM
Is 3.4 the latest release
10:51 AM
My servers have become a bit unstable recently and im sure its probably because i have not updated the API since mid last year
Avatar
Is there a way I can hook into the mindwipe? I want to make the possibility where you can mindwipe per day or a set duration.
Avatar
I would assume there's a call to consume an item somewhere. You'd have to filter down the item consumed for mindwipe
1:50 PM
Consume item or use inventory item. I'm at work and can't look at the moment
Avatar
Deleted User 3/23/2021 10:10 PM
@XeLaD The 3.4 version has no problems. I am running a server with that version. Would you like to check if there is a problem with the plugins you are using?
Avatar
jraServerAPI 3/29/2021 7:01 PM
Q: Is there a hook for when a character levels up? (eg.. hit's the + button)
Avatar
Several 🙂
7:02 PM
But that's quite complicated
7:03 PM
You have to try your way to find the hook that fits your needs
Avatar
Avatar
jraServerAPI
Q: Is there a hook for when a character levels up? (eg.. hit's the + button)
Hook_AShooterPlayerController_ServerRequestLevelUp_Implementation
7:10 PM
this triggers for both dino and player
Avatar
jraServerAPI 3/29/2021 7:20 PM
Thank you friends, I will research this! Also, is the Server API Hooker Creator app broken? or is it just me..
Avatar
Avatar
jraServerAPI
Thank you friends, I will research this! Also, is the Server API Hooker Creator app broken? or is it just me..
7:22 PM
I made a fix, ownprox said he would be checking it out but he might haven't had time yet
Avatar
jraServerAPI 3/29/2021 7:22 PM
Awesome! tytytytyty!
Avatar
Avatar
WETBATMAN
Hook_AShooterPlayerController_ServerRequestLevelUp_Implementation
jraServerAPI 3/30/2021 3:27 AM
Thank you sir! I tried my best to try and figure it out, but I'm not having any success... Do you know how I can determine if it's a character or dino that is being leveled up here? Or just give me a hint 🙂
Avatar
APrimalCharacter* Character; if(Character->IsA(AShooterCharacter::GetPrivateStaticClass())){ // Is a player } if (Character->IsA(APrimalDinoCharacter::GetPrivateStaticClass())){ // Is a dino }
9:31 AM
but i'll have to get the Character of the one that's being leveled up
Avatar
void Hook_AShooterPlayerController_ServerRequestLevelUp_Implementation(AShooterPlayerController* _this, UPrimalCharacterStatusComponent* forStatusComp, EPrimalCharacterStatusValue::Type ValueType) { if (AActor* Owner = forStatusComp->GetOwner(); Owner && Owner->IsA(AShooterCharacter::GetPrivateStaticClass())) { AShooterCharacter* Char = static_cast<AShooterCharacter*>(Owner); } AShooterPlayerController_ServerRequestLevelUp_Implementation_original(_this, forStatusComp, ValueType); }
1:07 PM
@jraServerAPI add your code inside the if statement 🙂
Avatar
jraServerAPI 3/30/2021 2:52 PM
wow, so the hint would have been "UPrimalCharacterStatusComponent forStatusComp"... And I was focused on the "AShooterPlayerController _this" the whole time... son of a... 🤦‍♂️ Thank you again.. I'm trying my best to figure this out on my own before bothering you guru's, but failing hahahaha
Avatar
i am making a few changes on the ArkShop, just for my cluster, would it be considered a dick move to release and charge for this version of ArkShop?
Avatar
Wouldn't just be for your cluster if you are selling it.
Avatar
While the MIT license allows for you to do that i'm not a fan of taking the entire open source plugin adding a couple functions then charging for it but that's just me. Adding changes to the original code through a PR would be the preferred method imo.
👍 1
Avatar
Send a PR To the official instead if you like
7:18 PM
There is already two that makes my work quite a hazel sometimes. (edited)
Avatar
and what is a PR?
Avatar
Avatar
Uaca
and what is a PR?
Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.
Avatar
i see. it would be nice to be able to make plugins of plugins 🙂
Avatar
since it is considered a dick move, no charging. What is did so far is add option to choose gender, will also add option to imprint to player
9:39 PM
and will look into the PR stuff.
👍 1
Avatar
Can ark be programmed in Visual Studio Code?
Avatar
jraServerAPI 4/1/2021 3:29 PM
Yes, the API/Plugins stuff is VS C++
3:38 PM
Thx
Avatar
can i get 1.6 version permissions
Avatar
SolaoBajiuik 4/2/2021 7:20 PM
Is there anyway we can do cSharp code instead of C++ ?
Avatar
Avatar
SolaoBajiuik
Is there anyway we can do cSharp code instead of C++ ?
it would be nice, but no.
Avatar
SolaoBajiuik 4/3/2021 12:18 AM
Darn. I haven't touched c++ in almost 20 years. Can't even get the darned plugins to work. Says loaded, no errors, but does nothing. I'll keep pkking it.
Avatar
Avatar
SolaoBajiuik
Darn. I haven't touched c++ in almost 20 years. Can't even get the darned plugins to work. Says loaded, no errors, but does nothing. I'll keep pkking it.
yeah, it is the same for me, had to relearn C++
Avatar
Hello, Im new here, Im a C++ developer, Ive played Ark for more than a year now and really loved it, now looking to maybe do some plugins for the game, or idk something cool/fun.
👍 3
sure 1
Avatar
Who knows Visual Studio 2019, I can pay
3:27 PM
Who knows Visual Studio 2019, I can pay and develop the same plug-in
Avatar
hello, can someone explain to me how to make plugins work with MySQL ? I followed video and tutorial but I never managed to make them work, it always tells me that it cannot connect to the database. if anyone would have a better explained video than this i would be interested because for me it doesn't work. thank you https://www.youtube.com/watch?v=a4SvklUWmRs
Avatar
Avatar
Nyckeel
hello, can someone explain to me how to make plugins work with MySQL ? I followed video and tutorial but I never managed to make them work, it always tells me that it cannot connect to the database. if anyone would have a better explained video than this i would be interested because for me it doesn't work. thank you https://www.youtube.com/watch?v=a4SvklUWmRs
Hi, how do you host your game server? what db did you install on your machine? Can you confirm through a mysql client that the mysql server works and your credentials are correct? Are you using the same credentials in your configs?
Avatar
Avatar
AnotherMax
Hi, how do you host your game server? what db did you install on your machine? Can you confirm through a mysql client that the mysql server works and your credentials are correct? Are you using the same credentials in your configs?
I host the game and mysql on a local personal machine. then for everything else, I understood nothing.
Avatar
Avatar
Nyckeel
I host the game and mysql on a local personal machine. then for everything else, I understood nothing.
when installing mysql did you specifically select legacy authentication mode?
6:56 PM
did you create another user for your plugins after?
Avatar
Avatar
WETBATMAN
when installing mysql did you specifically select legacy authentication mode?
yes I have selected legacy authentication method. I have the main root account and I created another 'plugindb' account for the plugins. either way I did exactly what is shown in the video. I created a diagram, gave the permissions to access plugindb but nothing happens with the plugin, none can connect to the database. that's why if someone can tell me if there is any information missing in the video, I would be delighted to know them because I am not out of it, I am almost tearing my hair out of my head ^^'
Avatar
when you create a new user it defaults to newer auth type thus disabling the legacy auth for you new user 🙂
7:04 PM
try to connect with root to check
Avatar
I had already tried also with root but without success, I will try again but I don't think that will change anything
7:10 PM
I just tried and it doesn't work ^^'
Avatar
I'm going crazy, I don't understand anything about Mysql, I'm about to break everything, I've been trying to make this work for months and I can't find anyone to help me (edited)
Avatar
Avatar
Nyckeel
I'm going crazy, I don't understand anything about Mysql, I'm about to break everything, I've been trying to make this work for months and I can't find anyone to help me (edited)
First of all, can you access your user account on the mysql server (without plugin connection)
7:22 PM
I just reinstalled mysql 2 days ago, took me 10 minutes to get all connected again
Avatar
Avatar
Pelayori
First of all, can you access your user account on the mysql server (without plugin connection)
how can i check this ?
Avatar
Download any app that lets you connect to mysql
7:23 PM
Mysql workbench, navicat, heidisql...
7:24 PM
Did you change the mysql port for any reason or is it default?
Avatar
Mysql is installed locally, on the same machine as my ark servers no port has been changed
Avatar
Avatar
Nyckeel
Mysql is installed locally, on the same machine as my ark servers no port has been changed
Try accessing mysql there, if you can access your user then it should be fine
7:26 PM
I mean, access it with an external app/cmd
Avatar
if you have legacy auth then either the server itself is not reachable or you did not install the c++ 64bit connector
Avatar
Avatar
Nyckeel
Mysql is installed locally, on the same machine as my ark servers no port has been changed
GSH | MrOwlSky 4/25/2021 2:12 AM
2:17 AM
1. Make sure the port is open/active for the port you used for MySQL. If the port isn't open or active then no plugin can connect remotely into the database. 2. Make sure configuration file matches exact details from user accounts. Common user error is having a configuration problem restricting remote connection. Huge reason we use "PluginDB" user account instead of root account is because of security concerns and default root account doesn't allow % for outside remote connections it only allows "Localhost" connections. This becomes a problem when owners use VPS to host discord bots and mysql database, while hosting ark servers on different machines same thing happens to using custom DDOS protection when modifying the domains and IPs. 3. Some plugin configuration files don't allow Localhost for IP section in config. It doesn't hurt to use the main IPv4 address when possible as not every plugin configuration file supports LocalHost for 127.0.0.1 mainly issues with reverse proxies for ddos protection setups and such. This can also effect web host like Nitrado/G-Portal aswell. Notes:
  • Root account by default blocks % which can restrict usage if servers are on other machines outside of localhost.
  • Try to restrict usage of ROOT for plugins for security measures. Root accounts of anything is the last account you would want attacked from outside sources.
  • The tutorial video you linked is one I uploaded, that tutorial video is still currently up to date on how things work to setup MySQL. Just use the latest version the launcher installer gives you.
  • The screenshot above is for making sure the PluginDB account you created has the right permissions when creating new database schema's and altering the current database schema's. This tends to resolve some errors later down the road when plugin configuration requires certain altering table functions and being restricted by the user account not having the proper permissions.
(edited)
Avatar
Avatar
Nyckeel
Mysql is installed locally, on the same machine as my ark servers no port has been changed
GSH | MrOwlSky 4/25/2021 2:27 AM
  • Ideally try to avoid using custom ports when setting up a MySQL database. Try to stick with the default port of 3306 alot of times server owners will change this setting when installing the MySQL database and workbench but forget to remotely open the port via port forwarding and firewall. 3306 is the easiest method for admins when first installing MySQL. Alot of times when you have fail to connect errors it's a result of a port being closed and not fully opened. Many other factors can prevent failed connections but having a closed port tends to be the problem 90% of the time for beginners.
Avatar
Avatar
GSH | MrOwlSky
  • Ideally try to avoid using custom ports when setting up a MySQL database. Try to stick with the default port of 3306 alot of times server owners will change this setting when installing the MySQL database and workbench but forget to remotely open the port via port forwarding and firewall. 3306 is the easiest method for admins when first installing MySQL. Alot of times when you have fail to connect errors it's a result of a port being closed and not fully opened. Many other factors can prevent failed connections but having a closed port tends to be the problem 90% of the time for beginners.
thanks for all your explanations, @Pelayori took the time to help me solve the problems by mp yesterday and i appreciate it. I take note at any time of all your explanations in case I happen to have a new problem 😉 thank you 🙂
👍 1
Avatar
NeO_Anderson 4/25/2021 9:32 PM
so today my server seems to be randomly crashing...not sure why we havent really done anything. is there any 'crashlogs' to help determine the cause somewhere?
Avatar
Avatar
NeO_Anderson
so today my server seems to be randomly crashing...not sure why we havent really done anything. is there any 'crashlogs' to help determine the cause somewhere?
Ark generates .crashstack files in /Saved/Logs
9:35 PM
*Most of the times
Avatar
NeO_Anderson 4/25/2021 9:40 PM
hmm sadly nothing fortoday =\
Avatar
You could also check windows event viewer
Avatar
NeO_Anderson 4/25/2021 9:48 PM
ahh okay ill tr that
Avatar
🐨Dream Doctor🦘 4/26/2021 1:26 AM
Can anyone tell me which hooks are involved in spawning a dino?
Avatar
Avatar
🐨Dream Doctor🦘
Can anyone tell me which hooks are involved in spawning a dino?
🐨Dream Doctor🦘 4/26/2021 3:00 AM
I mean obviously there's SpawnActor, but I was wondering if there's any more specific functions involved for dinos.
Avatar
Avatar
🐨Dream Doctor🦘
I mean obviously there's SpawnActor, but I was wondering if there's any more specific functions involved for dinos.
There is a static SpawnDino in primal dino character and spawn from dino data
Avatar
you mean for spawning a new dino or just whenever existing dinos appear
12:22 PM
APrimalDinoCharacter has BeginPlay which triggers for any time the dino appears into the map
Avatar
GetAimedActor Isn't it different from before?
Avatar
Is there any plugin that I can get the id epi games from discord?
Avatar
Avatar
DEX
Is there any plugin that I can get the id epi games from discord?
GSH | MrOwlSky 4/29/2021 7:18 PM
Wooly has a really great plugin that logs all that into discord. Not sure if he included the EPIC ids support into it or not. Wouldn't hurt reaching out and asking him directly.
Avatar
thank you, I'll see with him
Avatar
Avatar
GSH | MrOwlSky
Wooly has a really great plugin that logs all that into discord. Not sure if he included the EPIC ids support into it or not. Wouldn't hurt reaching out and asking him directly.
should "just work"
10:13 PM
if the plugin uses the generic unique ID that is used for both
Avatar
Hello good day. I have a doubt, is there any way to remotely turn on the servers when one is shut down without restarting Windows. I do not know what is happening that I have it automated when it detects a server turned off that turns it on, it has been 30m. but it took 4 to 8 hours to do it. and I wanted to know if there is any method so that a moderator can turn it on when I am not online
Avatar
I know arkbot has a discord bot that admins can use to turn on/off servers with commands
2:45 PM
Other thing would be coding your own, or setting up all the group policy necessary for admins to connect to RDP and only use ark server manager
Avatar
Avatar
Pelayori
I know arkbot has a discord bot that admins can use to turn on/off servers with commands
Thank you very much, do you know of any tutorial to configure arkbot in discord?
Avatar
There is one in the arkbot wiki, but it's easy. You need to configure each server instance, and enable the remote management Then after all servers are configured follow this: https://github.com/ark-mod/ArkBot/wiki/Discord-Bot
ARK Survival Evolved application that monitors and extracts data from local ARK servers and exposes this data through a Web App, Web API and Discord Bot. Provides important functions to players: di...
4:22 PM
You can find all info on that wiki
4:22 PM
@Guanarteme
Avatar
thank very much
Avatar
🐨Dream Doctor🦘 5/1/2021 7:04 AM
Hi @substitute , I've always used your template for my plugins, but after some time away from developing I've come back and am now unable to compile even the empty template. It gives the following error. Any help would be much appreciated.
Avatar
substitute 5/1/2021 7:05 AM
Oh yeah, there’s a weird problem that I’ll have to fix
Avatar
Avatar
🐨Dream Doctor🦘
Hi @substitute , I've always used your template for my plugins, but after some time away from developing I've come back and am now unable to compile even the empty template. It gives the following error. Any help would be much appreciated.
substitute 5/1/2021 7:06 AM
Try including tuple
7:07 AM
Also which version of c++ 🙂
Avatar
🐨Dream Doctor🦘 5/1/2021 8:45 AM
Hey, thanks for the quick reply. Same C++17 in VS 2019 as always. It's really strange. I've updated VS to the latest and replace the api source with the latest. I can compile some plugins just fine, but others (including your template) fail with the same error as above.
Avatar
🐨Dream Doctor🦘 5/1/2021 9:41 AM
So even after creating a blank DLL project, as soon as I included the API it stopped compiling with that Tuple.h error. By comparing a number of the sample open source projects to see which would compile and which would not, I found that setting Conformance Mode to No allowed the basic DLL project to then compile.
9:42 AM
And also allow @substitute 's sample project to compile.
Avatar
substitute 5/1/2021 9:45 AM
Hm, good solution but I want to look into it more
9:45 AM
Non conformant code is asking for problems
Avatar
Avatar
substitute
Hm, good solution but I want to look into it more
🐨Dream Doctor🦘 5/1/2021 9:46 AM
I don't understand why it suddenly stopped working. I can only assume something changed in a recent Visual Studio update that prevents it compiling in conformant mode.
Avatar
substitute 5/1/2021 9:47 AM
What are the options available?
9:48 AM
Also looks like they added an option in visual studio 2019 16.8
9:48 AM
If you updated visual studio that could’ve been the issue
Avatar
🐨Dream Doctor🦘 5/1/2021 9:52 AM
Running 16.9.4, which is the latest version.
9:53 AM
I can't see any obvious config options that might be affecting anything. So I assume they changed the compiler somehow. (edited)
Avatar
Hello guys, sorry for worries. My little story for u. Just bought an arena from our friend Metsfun. And took on freelance @root (Daemonium) he also give admin password to @xa4ker (I dont know why). Task`s: the installation of the arena + coding a discord bot for parsing information into chats. We finish works, paid them, and after all - find this funny stuff. 1. My "Administrator" had limited rights 2. New root user has all the rights, I do not have access to it. 3. They gave themselves IP access in the firewall.
9:57 AM
I do not recommend working with these guys
Avatar
🐨Dream Doctor🦘 5/1/2021 10:05 AM
Just looking at the patch notes for VS, it looks like 16.9 is the next "LTR" version replacing 16.7.
10:10 AM
And the MSVC++ compiler went from 14.27 in VS 16.7 to 14.29 in VS 16.9
Avatar
Avatar
🐨Dream Doctor🦘
I don't understand why it suddenly stopped working. I can only assume something changed in a recent Visual Studio update that prevents it compiling in conformant mode.
Avatar
🐨Dream Doctor🦘 5/1/2021 12:07 PM
Sorry I'm not a member of whatever that Discord is.
Avatar
It is this discord
12:07 PM
It's in begginner's #【💬】ᴅɪꜱᴄᴜꜱꜱɪᴏɴ-ʙ
12:07 PM
Avatar
Avatar
Pelayori
Click to see attachment 🖼️
🐨Dream Doctor🦘 5/1/2021 12:25 PM
Thanks so much! Can we get this updated in git?
Avatar
Hmm yeah someone should update it
12:25 PM
I'll get it done in a few
12:25 PM
I haven't updated VS yet so I didn't encounter this problem
Avatar
There is probably a better way to fix than what I did by commenting stuff out but was just trying to quickly fix my compiling issues 🙂
Avatar
NeO_Anderson 5/1/2021 6:54 PM
hello all, dos the Megapithecus boss ALWAYS drop element? there's no possibility that it sometimes wont drop?
Avatar
Avatar
NeO_Anderson
hello all, dos the Megapithecus boss ALWAYS drop element? there's no possibility that it sometimes wont drop?
There are instances where if it's killed by a player it doesn't give the element (since it auto despawns). I always encourage to kill bosses with a dino
Avatar
NeO_Anderson 5/1/2021 7:25 PM
I see, yeah hey killed it with a dino. but they claim the dino froze at half health, then few seconds later unfroze and died but didnt drop anything
7:26 PM
google shows no one reporting any bosses dying at half health and anytime element didnt drop was later found in the dinos inventory so I see no bugs or anything but i wondered if they made it so loot doesnt always drop or something
7:26 PM
seems that is not the case, it should always drop
Avatar
They should always drop the loot except in such scenarios like the one I described above
Avatar
NeO_Anderson 5/1/2021 7:30 PM
ahh okay
7:30 PM
thanks
Avatar
jraServerAPI 5/3/2021 3:21 PM
Is there a way to prevent a structure from being placed inside another inventory, whether it be a dino, or a structure like a vault? Basically I want a specific structure to either be placed or in the players inventory only. Thanks in advance!
Avatar
hook removeitem and additem functions
3:24 PM
then ensure the item cannot leave a player’s inventory and also ensure it cannot be added to some other inventory
Avatar
jraServerAPI 5/3/2021 3:30 PM
so it's not: DECLARE_HOOK(UPrimalInventoryComponent_AllowAddInventoryItem, bool, UPrimalInventoryComponent, UPrimalItem, int*, bool);
3:36 PM
@WETBATMAN these hooks? DECLARE_HOOK(UPrimalInventoryComponent_AddItem, UPrimalItem, UPrimalInventoryComponent, FItemNetInfo, bool, bool, bool, FItemNetID, bool, bool, bool, AShooterCharacter, bool); DECLARE_HOOK(UPrimalInventoryComponent_RemoveItem, bool, UPrimalInventoryComponent, FItemNetID*, bool, bool, bool, bool);
3:36 PM
peepoClap
Avatar
Avatar
jraServerAPI
so it's not: DECLARE_HOOK(UPrimalInventoryComponent_AllowAddInventoryItem, bool, UPrimalInventoryComponent, UPrimalItem, int*, bool);
you can use something like this, but then you have to handle item drop from player inventory separately
3:37 PM
if you allow the item to be dropped that’s fine i guess
Avatar
jraServerAPI 5/3/2021 3:38 PM
dropped? or placed?
3:38 PM
either way
3:38 PM
i think I need the two hooks you recommend instead.. I think i'll have more control with those
3:39 PM
I'll give it a go!.. thank you!
Avatar
Avatar
jraServerAPI
dropped? or placed?
no i mean like dropped, because if you have mods like s+ or stuff they have collectors and the item can end up in the vault eventually heh
Avatar
jraServerAPI 5/3/2021 3:40 PM
haha..
3:40 PM
no mods on this one 🙂
3:40 PM
but that's a good point
Avatar
Is it me or does the developer wiki page redirects to the forums? Why is that?
Avatar
🐨Dream Doctor🦘 5/10/2021 6:45 AM
Does anyone have a reasonably simple solution for randomly selecting from a weighted list?
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have a reasonably simple solution for randomly selecting from a weighted list?
You mean like
6:52 AM
Pick randomly with a weighted distribution?
Avatar
🐨Dream Doctor🦘 5/10/2021 6:52 AM
Yeah exactly.
Avatar
You could use a map
6:53 AM
And set the odds from 0-1 with the total adding to 1
6:53 AM
And do like
6:54 AM
Rng = random() For(odds) If odds > Rng and next < Rng
6:54 AM
Or something like that
6:55 AM
That way a weight could be like
6:55 AM
20:60:20
6:55 AM
So if > 0 and < 0.2 it’s the first
6:55 AM
> 0.2 and < 0.8 it’s the second (edited)
6:56 AM
Etc
6:56 AM
In this case you can derive 0.8 as the odds + previous
6:57 AM
E.g. for the third, 0.8 < x < 1.0
6:57 AM
Which is the previous added < x < previous added + current (edited)
6:57 AM
Since you use a for it’s very easy to track the summation
6:58 AM
Does that help? @🐨Dream Doctor🦘
7:00 AM
in more mathy talk basically this
7:00 AM
Avatar
Avatar
substitute
Does that help? @🐨Dream Doctor🦘
🐨Dream Doctor🦘 5/10/2021 7:21 AM
Thanks Sub. Yes it does. Using a cumulative sum as you suggest is the approach that seems most popular, as you only need to iterate through the array/map/vector or whatever once. (edited)
thumbsUp 1
Avatar
Is there a way to get an AActors (APrimalStructure) location? I am trying it via DefaultActorLocationField but it's always X=0.000 Y=0.000 Z=0.000 for me, might not been set yet, not sure if there is another way
Avatar
Structure->RootComponentField()->RelativeLocationField();
8:54 PM
@Dia
Avatar
thanks, will try it
Avatar
oh, nice, that works, at least for the most. Is there a simple way to get lat/lng from it?
Avatar
you could look into how the gps renders the coords, or maybe @Kal would know
Avatar
How do I get the items the player faces, such as fertilized eggs Player - > GetPlayerCharacter () - > GetAimedActor (); Do not apply
Avatar
🐨Dream Doctor🦘 5/12/2021 7:11 AM
Is there a channel for plugin authors to announce their plugins? There have been some fantastic plugins being released recently and I'd love to see authors being able to announce their own plugins here.
Avatar
Hi guys, I'm not a plug-in developer. But I would like your help, I have 25 plugins on my server, and during the day there are 7 crashes, they do not generate log files in the saved folder, I don't know why. I was wondering if anyone could help me find out which plugin it can be, because it is complicated to test 1 plugin at a time and the crashes are not so successful, it takes time to happen. Thank you very much in advance.
Avatar
Avatar
DEX
Hi guys, I'm not a plug-in developer. But I would like your help, I have 25 plugins on my server, and during the day there are 7 crashes, they do not generate log files in the saved folder, I don't know why. I was wondering if anyone could help me find out which plugin it can be, because it is complicated to test 1 plugin at a time and the crashes are not so successful, it takes time to happen. Thank you very much in advance.
try to list the plugins you have might help to find common ground
Avatar
Avatar
DEX
Hi guys, I'm not a plug-in developer. But I would like your help, I have 25 plugins on my server, and during the day there are 7 crashes, they do not generate log files in the saved folder, I don't know why. I was wondering if anyone could help me find out which plugin it can be, because it is complicated to test 1 plugin at a time and the crashes are not so successful, it takes time to happen. Thank you very much in advance.
GSH | MrOwlSky 5/13/2021 6:44 PM
How are you hosting the actual servers? Different server host sometimes prevent crash stacks from appearing. GameServerApp was the latest one that recently added crash stacking to their hosting. When does the crash occur exactly? Every 15 minutes? Every time someone joins server? When commands are issued? Try to explain in much detailed explanation as possible.
Avatar
well I will explain, and very difficult to know the time, because sometimes it happens about 3x in the day, I use my own machine, I have 8 Server.
Avatar
Avatar
DEX
well I will explain, and very difficult to know the time, because sometimes it happens about 3x in the day, I use my own machine, I have 8 Server.
Attach a debugger to the server
7:19 PM
Since you’re running it yourself you can do this
7:19 PM
The debugger should state what the cause of a crash is
7:19 PM
(Not which line / function always, but it will at least state what kind of error)
Avatar
Wow, more how I do it
7:34 PM
Do you have a link to the program?
Avatar
how do i use it and put it on my server, so when it crashes it shows me the error.
9:13 PM
to cm this problem for 1 month already, complicated for me
Avatar
void Hook_UPrimalInventoryComponent_AddArkTributeItem(UPrimalInventoryComponent* _this, FItemNetInfo* theItemInfo, bool bFromLoad) If I use this hook to send items to another server, the server will be stuck for several seconds to tens of seconds
6:23 AM
The server will also get stuck when the player teleports to another server
Avatar
Whats the best way to find out why an ark server is stalling - e.g. if its a plugin (sometimes it'll run 6 hrs without a problem before stalling, sometimes 2 hrs) - is there anything I can do to hook into whats running live on the ark server?
Avatar
I'm having almost the same problem as you, but mine does not generate a log for me to know which plugin can be.
Avatar
🐨Dream Doctor🦘 5/15/2021 5:32 AM
Having some trouble with APrimalStructureBed not being a child of APrimalStructure in the API. Is there any quick way to fix this?
Avatar
Avatar
DEX
I'm having almost the same problem as you, but mine does not generate a log for me to know which plugin can be.
Yup-0 people on a server random stall, sometimes will hit enter in the console and it will return to life instantly other times it will sort itself out after an hour ..server is defn online just stops responding to everything (client connection/ rcon)
Avatar
No logs and have run sysinternals process monitor to try to find out further what’s going on
Avatar
Avatar
🐨Dream Doctor🦘
Having some trouble with APrimalStructureBed not being a child of APrimalStructure in the API. Is there any quick way to fix this?
Reparent it in the header
10:55 AM
Headers are local/not api dependent
10:55 AM
So no one needs your header changes
Avatar
Avatar
substitute
Reparent it in the header
🐨Dream Doctor🦘 5/15/2021 11:07 AM
Yeah I forgot I could do that. Thank you 🙂
Avatar
🐨Dream Doctor🦘 5/15/2021 11:24 AM
Trying to hook this function in my plugin, but it causes this error when loading the server, although the plugin still continues to load? This is taken from the hook creator. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Trying to hook this function in my plugin, but it causes this error when loading the server, although the plugin still continues to load? This is taken from the hook creator. (edited)
Try adding a Pdbconfig.json with structure "APrimalStructureBed"
Avatar
Avatar
A New Home
Yup-0 people on a server random stall, sometimes will hit enter in the console and it will return to life instantly other times it will sort itself out after an hour ..server is defn online just stops responding to everything (client connection/ rcon)
but mine does and close out of nowhere, it doesn't freeze. it just closes and does not generate the error logs, so it would be interesting to catch this error.
Avatar
I noticed rebuilding the API with latest Visual Studio compiler version throws compile error when linking minhook, because the lib is not build with the same compiler version.
Avatar
jraServerAPI 5/15/2021 5:26 PM
I'm wondering has anyone had any luck in getting the map information you receive when you press and hold "H" in game? I would love to get the location text form this. eg.. "The Highlands" etc... I've been looking in the dev kit, but not coming up with much, of course my expertise is that of a peanut butter and jelly sandwich, but I'm trying! 🙂 Thanks in advance! (edited)
Avatar
Avatar
Pelayori
I noticed rebuilding the API with latest Visual Studio compiler version throws compile error when linking minhook, because the lib is not build with the same compiler version.
I did a PR yesterday that has a new version of it.
Avatar
Avatar
Lethal
I did a PR yesterday that has a new version of it.
Awesome, didn't see it
Avatar
Avatar
Pelayori
Try adding a Pdbconfig.json with structure "APrimalStructureBed"
🐨Dream Doctor🦘 5/16/2021 3:23 AM
Thanks, that fixed it.
Avatar
Avatar
DEX
Hi guys, I'm not a plug-in developer. But I would like your help, I have 25 plugins on my server, and during the day there are 7 crashes, they do not generate log files in the saved folder, I don't know why. I was wondering if anyone could help me find out which plugin it can be, because it is complicated to test 1 plugin at a time and the crashes are not so successful, it takes time to happen. Thank you very much in advance.
Someone can help me, I can even pay for it.
Avatar
🐨Dream Doctor🦘 5/16/2021 11:31 AM
How do we force an actor to replicate in a plugin?
Avatar
Avatar
🐨Dream Doctor🦘
How do we force an actor to replicate in a plugin?
Actor->ForceReplicateNow(false, false) or there is a way to just replicate an specific property Actor->MulticastProperty()
11:35 AM
In the latter you put the field name without "Field"
Avatar
Avatar
Pelayori
Actor->ForceReplicateNow(false, false) or there is a way to just replicate an specific property Actor->MulticastProperty()
🐨Dream Doctor🦘 5/16/2021 11:51 AM
Amazing. Thank you!
7:27 PM
what can this error be?
Avatar
Avatar
Pelayori
Actor->ForceReplicateNow(false, false) or there is a way to just replicate an specific property Actor->MulticastProperty()
🐨Dream Doctor🦘 5/17/2021 3:34 AM
Sorry for the ping, but do you have an example of using Actor->MulticastProperty(), I can't seem to get it right.
Avatar
jraServerAPI 5/17/2021 4:24 AM
@🐨Dream Doctor🦘 This should help you out. This snippet of code updates the health of a structure (_this) (edited)
Avatar
jraServerAPI 5/17/2021 4:32 AM
Avatar
Avatar
jraServerAPI
@🐨Dream Doctor🦘 This should help you out. This snippet of code updates the health of a structure (_this) (edited)
🐨Dream Doctor🦘 5/17/2021 5:06 AM
That's exactly what I needed. Thank you so much.
Avatar
Purchase Cross Server Chat 1.7 source code,Who can provide
Avatar
jraServerAPI 5/18/2021 5:23 AM
6847_feelsglassesman
Avatar
Hi guys, I'm not a plug-in developer. But I would like your help, I have 25 plugins on my server, and during the day there are 7 crashes, they do not generate log files in the saved folder, I don't know why. I was wondering if anyone could help me find out which plugin it can be, because it is complicated to test 1 plugin at a time and the crashes are not so successful, it takes time to happen. Thank you very much in advance.
Avatar
Is it possible to change the server name through plugins? I mean on the fly while it is running
Avatar
Avatar
Raptross
Is it possible to change the server name through plugins? I mean on the fly while it is running
I think it is with the plugin from Ownprox not sure tough . the one that reloads gameserverini (edited)
Avatar
This guide is based on the Visual Studio Community 2019 version install Prerequisites: 1. https://visualstudio.microsoft.com/vs/ 2. https://github.com/Michidu/ARK-Server-API/archive/master.zip Step N1: Install Visual Studio by the link given on the first prerequisite. When the inst...
4:11 PM
please read this
4:14 PM
oh looks like someone messed up the doc by editing 🤷‍♂️
Avatar
I ❤️ YOU
4:23 PM
@WETBATMAN can i msg you if i run into any problems?
Avatar
Does anyone know how I can get the epicgames player Id, for me to put on the tebex, because it has 2 more digits.
GOGHEART1 1
Avatar
Hello everyone, I have a small question regarding the hardware, I am currently looking to upgrade the hardware that hosts my servers. Would you have a configuration capable of managing without too much worry 12 servers or even a little more which could possibly go up to 16 ? I am currently running 10 Ark servers on 2700x and 64Gb of ram (with 8 servers this is fine but as I increase the number of servers I see that I am reaching the current configuration limit) I was thinking maybe upgrading to a 5950x or dual xeon E5 2699 V3 configuration, with between 96 and 128Gb of ram. what would be the criteria to be taken into account before anything else ? do you have a configuration to suggest or one of my ideas seems correct ? thank you in advance for your answers 🙂
Avatar
Avatar
Nyckeel
Hello everyone, I have a small question regarding the hardware, I am currently looking to upgrade the hardware that hosts my servers. Would you have a configuration capable of managing without too much worry 12 servers or even a little more which could possibly go up to 16 ? I am currently running 10 Ark servers on 2700x and 64Gb of ram (with 8 servers this is fine but as I increase the number of servers I see that I am reaching the current configuration limit) I was thinking maybe upgrading to a 5950x or dual xeon E5 2699 V3 configuration, with between 96 and 128Gb of ram. what would be the criteria to be taken into account before anything else ? do you have a configuration to suggest or one of my ideas seems correct ? thank you in advance for your answers 🙂
I’ve talked to Lil Panda about this before
5:55 AM
Faster cpu cores is king
5:55 AM
Ark only uses about 2 cores for a server
5:55 AM
Memory is also what you need
5:55 AM
Generally 8-12GB per server depending on map
5:55 AM
(Without mods)
Avatar
HI guys its me again (: i am still new to coding especcially using dll files for plugins ( and using hooks for the data??) i got the setup to start making plugins, but i really don't get how everything works xD (i would still love to learn it). does anyone have a little simple example of how to make a chat command (for ark server). for example you say /hello and the server responds with hello welcome on the server. any help or explaination would be appreciated. thanks in advance 🥴
Avatar
Avatar
kevinvanb
HI guys its me again (: i am still new to coding especcially using dll files for plugins ( and using hooks for the data??) i got the setup to start making plugins, but i really don't get how everything works xD (i would still love to learn it). does anyone have a little simple example of how to make a chat command (for ark server). for example you say /hello and the server responds with hello welcome on the server. any help or explaination would be appreciated. thanks in advance 🥴
Ark Suicide Plugin. Contribute to WETBATMAN/Suicide development by creating an account on GitHub.
4:29 PM
check my suicide commands's source
Avatar
@WETBATMAN one more thing about this. should it work if i would paste this code in visual studio with the settings as in the guide, build it as a .dll file and put it in the plugins folder (in a folder). or are there more files required to do that? (this is just to test if i got all my settings right and if i am capable enough to do everything exept the coding xD)
4:42 PM
and ofcourse thanks for another very usefull response GOGHEART1
Avatar
Avatar
kevinvanb
@WETBATMAN one more thing about this. should it work if i would paste this code in visual studio with the settings as in the guide, build it as a .dll file and put it in the plugins folder (in a folder). or are there more files required to do that? (this is just to test if i got all my settings right and if i am capable enough to do everything exept the coding xD)
yes it will work
4:45 PM
but you need to set project settings
4:45 PM
and include ArkApi
Avatar
wow thank you!! i have been looking all over the internet for this xD your amazing
Avatar
@WETBATMAN i am sorry to bother you again but what do you mean by include ArkApi?
Avatar
Avatar
DEX
Hi guys, I'm not a plug-in developer. But I would like your help, I have 25 plugins on my server, and during the day there are 7 crashes, they do not generate log files in the saved folder, I don't know why. I was wondering if anyone could help me find out which plugin it can be, because it is complicated to test 1 plugin at a time and the crashes are not so successful, it takes time to happen. Thank you very much in advance.
can someone help me?
Avatar
Avatar
DEX
can someone help me?
Did you look through my api-fixes channel on my discord? I have an updated API download and a tip about a hidden ark launch parameter that generate logs in most cases.
Avatar
Avatar
DEX
can someone help me?
you can also attach a debugger to catch it when it crashes
Avatar
Avatar
Lethal
Did you look through my api-fixes channel on my discord? I have an updated API download and a tip about a hidden ark launch parameter that generate logs in most cases.
seriously, I'm going to test your api, this is the problem that i have, server crashes out of nowhere and does not generate logs, so i don't know which plugin caused it. I go by your Api and test. Thanks
Avatar
Avatar
substitute
you can also attach a debugger to catch it when it crashes
I don't know how I do it, I already searched on google but I didn't find anything, if you can teach me, I would appreciate it.
Avatar
The API download you will want is 3.51 v2. It is basically a compiled version of what is submitted to the official repo waiting to merged
Avatar
Avatar
Lethal
Did you look through my api-fixes channel on my discord? I have an updated API download and a tip about a hidden ark launch parameter that generate logs in most cases.
Unloading plugins 1 by 1 until the error stops printing in the API Log/Server Console would be the way to figure that out. what would that be, i would have to put 1 plugin at a time and let it run, or i connect servers without plugin and reload them
Avatar
That is for tracking down plugins that are throwing Timer errors.
7:45 PM
The updated API will prevent timer crashes.
Avatar
so in case i have to connect the server without a plugin and putting 1 by 1 loading? would it be this
Avatar
I would try the new API and see how that works for you first.
7:49 PM
in the case when the server crash, will it generate the logs in the save now?
Avatar
Avatar
DEX
in the case when the server crash, will it generate the logs in the save now?
Avatar
i use my own machine, do i still need it? because I use the ark server manager, but the server crashes and does not generate logs.
Avatar
Won't hurt to use it
8:09 PM
Are you using the crash manager plugin?
Avatar
ok, i will try to see how it looks. thanks.
Avatar
Avatar
Lethal
Are you using the crash manager plugin?
I used it, but also do not generate logs.
8:10 PM
mine simply closes the cmd and does not generate anything, it happens about 3x a day, it is not normal.
Avatar
Ya, I think it doesn't let the log generate is why I asked about it.
8:11 PM
Well hopefully this helps with that.
Avatar
I removed it, but it didn’t generate it, I’ll try using your api and this argument as it is.
Avatar
Avatar
Lethal
I put this argument in serves args? no service manager?
Avatar
Avatar
DEX
I put this argument in serves args? no service manager?
Yes
Avatar
ok, thanks
Avatar
Avatar
kevinvanb
@WETBATMAN i am sorry to bother you again but what do you mean by include ArkApi?
?
Avatar
Avatar
substitute
Ark only uses about 2 cores for a server
2 cores or 2 threads are enough to make a server work correctly ? concerning the amount of ram, that shouldn't be a problem for me. but I care enough about the number of cores and the speed of the processor, because I spread the workload of the different servers on the different cores available. So I don't really know if it's better to have more cores with an average frequency or to have fewer cores and a higher frequency. which would be the most interesting in your opinion ?
Avatar
Avatar
Nyckeel
2 cores or 2 threads are enough to make a server work correctly ? concerning the amount of ram, that shouldn't be a problem for me. but I care enough about the number of cores and the speed of the processor, because I spread the workload of the different servers on the different cores available. So I don't really know if it's better to have more cores with an average frequency or to have fewer cores and a higher frequency. which would be the most interesting in your opinion ?
fewer cores with higher frequency
1:55 AM
is what Panda told me
Avatar
Avatar
Nyckeel
2 cores or 2 threads are enough to make a server work correctly ? concerning the amount of ram, that shouldn't be a problem for me. but I care enough about the number of cores and the speed of the processor, because I spread the workload of the different servers on the different cores available. So I don't really know if it's better to have more cores with an average frequency or to have fewer cores and a higher frequency. which would be the most interesting in your opinion ?
🐨Dream Doctor🦘 5/26/2021 6:44 AM
Minimum two cores, not two threads. And the higher the frequency the better. 4GHz is really needed for even a moderately busy map. And the amount of RAM you use depends on how populated your map is with structures and dinos. I've seen very heavily used maps consume over 25GB of RAM.
Avatar
🐨Dream Doctor🦘 5/26/2021 8:11 AM
What's the current best way to get the tribe name of a player?
Avatar
Avatar
🐨Dream Doctor🦘
What's the current best way to get the tribe name of a player?
are they online?
Avatar
Avatar
substitute
are they online?
🐨Dream Doctor🦘 5/26/2021 8:15 AM
Yeah.
Avatar
Avatar
🐨Dream Doctor🦘
Yeah.
I think there's a field for that.
8:15 AM
check the various pc stuff including the status component
8:15 AM
I think one of them has it
Avatar
Avatar
substitute
I think one of them has it
🐨Dream Doctor🦘 5/26/2021 8:25 AM
I've been looking but I can't find the tribe name. ShooterPlayerController has TargetingTeamField for the Tribe ID, but I can't find the name.
Avatar
Avatar
🐨Dream Doctor🦘
I've been looking but I can't find the tribe name. ShooterPlayerController has TargetingTeamField for the Tribe ID, but I can't find the name.
did you check the status compo and others?
8:45 AM
I may have been mistaken but I'm like 90% sure it's in there somewhere
8:45 AM
on something w/ the character/dino
Avatar
🐨Dream Doctor🦘 5/26/2021 9:07 AM
Ah, found this example from last year. Looks perfect. Someone should add this to the API utils. FString GetTribeName(AShooterPlayerController* playerController) { std::string tribeName; auto playerState = reinterpret_cast<AShooterPlayerState*>(playerController->PlayerStateField()); if (playerState) { auto tribeData = playerState->MyTribeDataField(); tribeName = tribeData->TribeNameField().ToString(); } return tribeName.c_str(); }
Avatar
Avatar
🐨Dream Doctor🦘
Ah, found this example from last year. Looks perfect. Someone should add this to the API utils. FString GetTribeName(AShooterPlayerController* playerController) { std::string tribeName; auto playerState = reinterpret_cast<AShooterPlayerState*>(playerController->PlayerStateField()); if (playerState) { auto tribeData = playerState->MyTribeDataField(); tribeName = tribeData->TribeNameField().ToString(); } return tribeName.c_str(); }
nice
9:12 AM
I knew it was in there somewhere
Avatar
🐨Dream Doctor🦘 5/26/2021 9:13 AM
Thanks for the help as always 🙂
Avatar
np
Avatar
I'm trying to add a Buff to a Player on Hook_AShooterPlayerController_ServerDownloadTransferredPlayer_Implementation but i can't figure out how to get the PrimalCharacter from a AShooterPlayerController UClass* BuffClass = UVictoryCore::BPLoadClass(&ClassString); if (BuffClass != nullptr) { APrimalBuff* MyBuff; MyBuff->StaticAddBuff(BuffClass, PlayerCharacter, nullptr, nullptr, true); }
Avatar
AShooterPlayerController::GetPlayerCharacter
11:28 AM
Btw StaticAddBuff is an static function so you can just do APrimalBuff* MyBuff = APrimalBuff::StaticAddBuff()
Avatar
Avatar
ouzo1986
I'm trying to add a Buff to a Player on Hook_AShooterPlayerController_ServerDownloadTransferredPlayer_Implementation but i can't figure out how to get the PrimalCharacter from a AShooterPlayerController UClass* BuffClass = UVictoryCore::BPLoadClass(&ClassString); if (BuffClass != nullptr) { APrimalBuff* MyBuff; MyBuff->StaticAddBuff(BuffClass, PlayerCharacter, nullptr, nullptr, true); }
🐨Dream Doctor🦘 5/27/2021 11:29 AM
Be careful, from memory I don't think the character is available yet from that function.
Avatar
But the character might not be ready right after that transfer func fires
Avatar
🐨Dream Doctor🦘 5/27/2021 11:29 AM
^
11:30 AM
When adding buffs to a player you're better off using the functions associated with the character rather than the controller.
Avatar
Could also do a delay execute with some delay
Avatar
Avatar
Pelayori
Could also do a delay execute with some delay
🐨Dream Doctor🦘 5/27/2021 11:31 AM
Yeah, but there's no guarantee when it will become available, as it depends on when the player actually spawns. If they sit at the spawn screen for some length of time without spawning then your delay might still miss them.
Avatar
ServerDownload is only fired on the actual download so the timing on that is find
Avatar
I don't exactly know when that function fires but looking at the name seems like it's after downloading and spawning
Avatar
but The Character don't has this hook
Avatar
🐨Dream Doctor🦘 5/27/2021 11:34 AM
I have a question about json. I have a struct containing a few strings, and a vector of that struct. I want to turn that vector into json. I can't seem to find a sensible example of how this is done with nlohmann. Does anyone have an example of this they could share?
Avatar
nhlomann json accepts std vectors
11:35 AM
So json["MyKey"] = MyStdVector
Avatar
🐨Dream Doctor🦘 5/27/2021 11:37 AM
Yeah I tried that, but it won't seem to accept my struct vector. It happily accepts a vector of strings, but not my struct. (edited)
Avatar
I see, then better to create a method in the struct to serialize it to json
Avatar
🐨Dream Doctor🦘 5/27/2021 11:39 AM
So that's the "to_json" method they talk about in the docs?
Avatar
Yep seems like it
Avatar
1358732203889233361 4 APPCRASH Not available 0 ShooterGameServer.exe 4.5.1.0 60a468c1 ShooterGameServer.exe 4.5.1.0 60a468c1 c0000005 0000000000ced81e ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC10C.tmp.dmp ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC1D8.tmp.WERInternalMetadata.xml ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC1F9.tmp.xml ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC1F7.tmp.csv ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC207.tmp.txt ?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_ShooterGameServe_579ffb6f7ecbb67547ab6c27d67456379654fe_37d32f1f_1ab4c2e1 0 500b6513-1fec-4301-a977-a840d4132170 268435456 252224dba92dfe6a42db2fbd95b38dd1 0 The server crashed and presented this different error in the Event Viewer files
Avatar
Avatar
DEX
1358732203889233361 4 APPCRASH Not available 0 ShooterGameServer.exe 4.5.1.0 60a468c1 ShooterGameServer.exe 4.5.1.0 60a468c1 c0000005 0000000000ced81e ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC10C.tmp.dmp ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC1D8.tmp.WERInternalMetadata.xml ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC1F9.tmp.xml ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC1F7.tmp.csv ?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERC207.tmp.txt ?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_ShooterGameServe_579ffb6f7ecbb67547ab6c27d67456379654fe_37d32f1f_1ab4c2e1 0 500b6513-1fec-4301-a977-a840d4132170 268435456 252224dba92dfe6a42db2fbd95b38dd1 0 The server crashed and presented this different error in the Event Viewer files
This type of crash is not really able to identify, maybe you can read a .dmp file of it
Avatar
I'll see if I can read his file
Avatar
You will need an external tool for it like WinDbg (edited)
Avatar
AShooterCharacter* _this; FString ClassString = L"Blueprint'/Game/Genesis/CoreBlueprints/HLNA/Buff_Companion_HLNA.Buff_Companion_HLNA'"; TSubclassOf<APrimalBuff> buffObj; buffObj.uClass = UVictoryCore::BPLoadClass(&ClassString); APrimalBuff* buff = APrimalBuff::StaticAddBuff(buffObj, _this, nullptr, nullptr, false);
i don't understand why this is not adding the buff. Buff itself is not a nullptr but it's not added to the character if i check with "hasbuff" and the same buffObj the buff is working if applied by a mod
(edited)
Avatar
Your AShooterCharacter* is a null pointer
4:36 PM
It isn't binded to any character
Avatar
AShooterPlayerController* Hook_AShooterCharacter_GetSpawnedForController(AShooterCharacter* _this) that is from there and valid cause the GCM Buff is there if i look into GetBuffs
Avatar
Is the loaded class valid?
Avatar
it's not a null pointer. is there another check i can do?
Avatar
If it's not a null pointer, it should work
4:56 PM
Maybe the companion buff is not allowed to be added outside genesis
Avatar
Blueprint'/Game/PrimalEarth/CoreBlueprints/Buffs/Buff_CreativeModeHelper.Buff_CreativeModeHelper' this buff also don't work and i'm admin on the server. i don't get it what's wrong here
Avatar
🐨Dream Doctor🦘 5/30/2021 6:41 AM
I'm working with Hook_UWorld_SpawnActor and wild dino spawns. I' making some modifications to dino spawns as they go through. Unfortunately it's also picking up when tamed dinos are released (spawned) from cryopods. Does anyone happen to know how to determine if a dino is spawned wild or from a cryo? That function returns an FActorSpawnParameters which includes two actor references, "Owner" and "Instigator", unfortunately both are null when spawning dinos either wild or from cryo. None of the other spawn params are obviously related to being wild or tamed or anything else that would help. Does anyone know a way of working out what is wild vs tamed spawn? (edited)
Avatar
Targeting team > 50000 is a tamed dino
Avatar
🐨Dream Doctor🦘 5/30/2021 8:19 AM
Sure, except it doesn't have a targeting team as far as I can see. Obviously it would return an AActor ref once the function completed, but I'm working with it before it completes.
Avatar
as you do to attach the debugger to the CMD, so I can see which plugin is cracking, I'm not a developer. Because I still haven't been able to solve their problem, they don't generate logs. (edited)
Avatar
Can I just hook methods known by the arkapi or is the list of hookable methods generated from the pdb file of the server? (edited)
Avatar
Avatar
Dia
Can I just hook methods known by the arkapi or is the list of hookable methods generated from the pdb file of the server? (edited)
you can hook absolutely any function located inside the .pdb file for the server
Avatar
ok, thank you very much, currently my hook is not called but I guess my method signature is not correct
5:50 PM
or it's an client method and it's not getting called in server code. But good to know ark api should support it
Avatar
Avatar
Dia
ok, thank you very much, currently my hook is not called but I guess my method signature is not correct
1. if your function signature is incorrect the server will crash when it gets called 2. do you have DumpAll enabled inside the API configuration?
Avatar
Yeah, you are right, since the hook itself does not check for parameters, it should crash on call. No, did not enable it, I will try it. looking for AMissionType::CanStartMission
5:54 PM
Might be another reason, put my changes to another server directory 😉
Avatar
Avatar
Dia
Yeah, you are right, since the hook itself does not check for parameters, it should crash on call. No, did not enable it, I will try it. looking for AMissionType::CanStartMission
if you don't have DumpAll enabled and the function/struct is not added inside the API config it won't be hooked even if it gets called
5:55 PM
this is why you should always have DumpAll enabled (especially for testing)
Avatar
ok, thanks, will try that
6:01 PM
Avatar
nice 😛
Avatar
Avatar
Dia
Yeah, you are right, since the hook itself does not check for parameters, it should crash on call. No, did not enable it, I will try it. looking for AMissionType::CanStartMission
A function with wrong signature (no args) will never crash
6:47 PM
No arg functions can take any amount of args
6:48 PM
They are just discarded
6:48 PM
Only time it would crash is if you specifically state no args, i.e. (void)
6:50 PM
What is better: void foo() or void foo(void)? With void it looks ugly and inconsistent, but I've been told that it is good. Is this true? Edit: I know some old compilers do weird things, but if I'm
6:50 PM
Guess it depends on compiler
Avatar
Avatar
Dia
ok, thanks, will try that
When you are using DumpAll: true for a struct that is not included in the base API, make sure to ship a PdbConfig.json with that struct included. Ark API does not have DumpAll: true by default on the current releases, but will likely have it enabled in future releases
Avatar
good point, need to check that. DumpAll shouldn't have any negative impact expect a slightly higher init time, right?
Avatar
Correct
Avatar
Ok, so I guess we will just enable it, then we should be fine
Avatar
But many servers do not have it enabled, and can cause to issues on their end and unnecessary bug reports
7:49 PM
Plus it protects you against the developer forgetting the pdbconfig.json (if plugin needs it) (edited)
👍 1
Avatar
🐨Dream Doctor🦘 5/31/2021 3:12 AM
Still stuck on this SpawnActor issue. The function is meant to take a bunch of parameters required to spawn an actor, then it returns a reference to that actor. However when I hook that function, it looks like all the information needed to spawn that actor is missing. The function looks like this: AActor* Hook_UWorld_SpawnActor(UWorld* _this, UClass* Class, FVector* Location, FRotator* Rotation, FActorSpawnParameters* SpawnParameters) FActorSpawnParameters looks like this: struct FActorSpawnParameters { FName Name; AActor *Template; AActor *Owner; APawn *Instigator; ULevel *OverrideLevel; unsigned __int32 bNoCollisionFail : 1; unsigned __int32 bRemoteOwned : 1; unsigned __int32 bNoFail : 1; unsigned __int32 bDeferruction : 1; unsigned __int32 bAllowDuringructionScript : 1; unsigned __int32 bDeferBeginPlay : 1; int ExtraSpawnData; EObjectFlags ObjectFlags; USceneComponent *AttachToComponent; FName AttachToBoneName; }; In the hook I can always see Class, Location and Rotation. In some rare (no-dino) cases I can see SpawnParameters->Instigator as well, but SpawnParameters->Template is always a nullptr, and I'm guessing it holds all the required information to spawn the dino. SpawnParameters->Owner is always nullptr and SpawnParameters->Instigator usually is also. Does anyone have any ideas? (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Still stuck on this SpawnActor issue. The function is meant to take a bunch of parameters required to spawn an actor, then it returns a reference to that actor. However when I hook that function, it looks like all the information needed to spawn that actor is missing. The function looks like this: AActor* Hook_UWorld_SpawnActor(UWorld* _this, UClass* Class, FVector* Location, FRotator* Rotation, FActorSpawnParameters* SpawnParameters) FActorSpawnParameters looks like this: struct FActorSpawnParameters { FName Name; AActor *Template; AActor *Owner; APawn *Instigator; ULevel *OverrideLevel; unsigned __int32 bNoCollisionFail : 1; unsigned __int32 bRemoteOwned : 1; unsigned __int32 bNoFail : 1; unsigned __int32 bDeferruction : 1; unsigned __int32 bAllowDuringructionScript : 1; unsigned __int32 bDeferBeginPlay : 1; int ExtraSpawnData; EObjectFlags ObjectFlags; USceneComponent *AttachToComponent; FName AttachToBoneName; }; In the hook I can always see Class, Location and Rotation. In some rare (no-dino) cases I can see SpawnParameters->Instigator as well, but SpawnParameters->Template is always a nullptr, and I'm guessing it holds all the required information to spawn the dino. SpawnParameters->Owner is always nullptr and SpawnParameters->Instigator usually is also. Does anyone have any ideas? (edited)
Try a break point
3:54 AM
If the signature is off for whatever reason
3:54 AM
You’re gonna read the data wrong
3:55 AM
Also if you want to ghetto it
3:55 AM
Call the original
3:55 AM
Then take the reference
3:55 AM
And you can check the data on the reference
Avatar
🐨Dream Doctor🦘 5/31/2021 4:07 AM
I mean logic sense says FActorSpawnParameters must have the data in it, otherwise nothing would spawn. So it must have something to do with how its being read in the api.
Avatar
Avatar
🐨Dream Doctor🦘
I mean logic sense says FActorSpawnParameters must have the data in it, otherwise nothing would spawn. So it must have something to do with how its being read in the api.
Yeah and if the args or struct are wrong
4:08 AM
Stuff gets funky
Avatar
🐨Dream Doctor🦘 5/31/2021 4:09 AM
Is anyone with the fancy tools able to check it for me?
Avatar
Avatar
🐨Dream Doctor🦘
Is anyone with the fancy tools able to check it for me?
I’m in Seattle else I would
4:13 AM
Found a google data center earlier today
4:13 AM
But I fly back tomorrow, so if I’m not super busy
Avatar
Avatar
substitute
I’m in Seattle else I would
🐨Dream Doctor🦘 5/31/2021 4:16 AM
Thank you! If anyone else and is around to take a look at the definition of FActorSpawnParameters for me that would be really appreciated 🙂
Avatar
Avatar
🐨Dream Doctor🦘
Thank you! If anyone else and is around to take a look at the definition of FActorSpawnParameters for me that would be really appreciated 🙂
it can be null
12:21 PM
i spawn my mod actor like this
12:21 PM
\
12:21 PM
this is valid^^
Avatar
🐨Dream Doctor🦘 5/31/2021 12:23 PM
FActorSpawnParameters isn't null. Just some parameters of it are. And I can't understand how the function would work if those parameters are null. You would end up with an vanilla actor with no parameters.
Avatar
do you have DumpAll enabled?
12:26 PM
in API config?
Avatar
🐨Dream Doctor🦘 5/31/2021 12:29 PM
No, how does that work?
Avatar
Avatar
🐨Dream Doctor🦘
No, how does that work?
the API doesn't dump everything by default, unless you specify it to do so, when DumpAll isn't enabled some of the classes/structs you're using may not give you any values
12:40 PM
in the win64 folder the API has a config.json, open it and enable DumpAll, reboot your server and re-test the values you're getting from FActorSpawnParameters
Avatar
Avatar
WETBATMAN
in the win64 folder the API has a config.json, open it and enable DumpAll, reboot your server and re-test the values you're getting from FActorSpawnParameters
🐨Dream Doctor🦘 5/31/2021 2:01 PM
Unfortunately that didn't help, but thanks for the info.
Avatar
what are you trying to do?
Avatar
🐨Dream Doctor🦘 5/31/2021 2:22 PM
I'm trying to find someone with IDA who can check the pdb for me to make sure what's in the dev kit for FActorSpawnParameters is correct. I don't think it is.
Avatar
struct __cppobj FActorSpawnParameters { FName Name; AActor *Template; AActor *Owner; APawn *Instigator; ULevel *OverrideLevel; unsigned __int32 bNoCollisionFail : 1; unsigned __int32 bRemoteOwned : 1; unsigned __int32 bNoFail : 1; unsigned __int32 bDeferConstruction : 1; unsigned __int32 bAllowDuringConstructionScript : 1; unsigned __int32 bDeferBeginPlay : 1; int ExtraSpawnData; EObjectFlags ObjectFlags; USceneComponent *AttachToComponent; FName AttachToBoneName; };
2:42 PM
@🐨Dream Doctor🦘 from my IDA
Avatar
Avatar
WETBATMAN
struct __cppobj FActorSpawnParameters { FName Name; AActor *Template; AActor *Owner; APawn *Instigator; ULevel *OverrideLevel; unsigned __int32 bNoCollisionFail : 1; unsigned __int32 bRemoteOwned : 1; unsigned __int32 bNoFail : 1; unsigned __int32 bDeferConstruction : 1; unsigned __int32 bAllowDuringConstructionScript : 1; unsigned __int32 bDeferBeginPlay : 1; int ExtraSpawnData; EObjectFlags ObjectFlags; USceneComponent *AttachToComponent; FName AttachToBoneName; };
🐨Dream Doctor🦘 5/31/2021 2:56 PM
Thank you so much. So does this look correct to you then? struct FActorSpawnParameters { FActorSpawnParameters() : Name() , Template(NULL) , Owner(NULL) , Instigator(NULL) , OverrideLevel(NULL) , bNoCollisionFail(0) , bRemoteOwned(false) , bNoFail(false) , bDeferruction(false) , bAllowDuringructionScript(false) , bDeferBeginPlay(0) , ExtraSpawnData(0) , ObjectFlags(EObjectFlags::RF_Transactional) , AttachToComponent(nullptr) { } FName Name; AActor *Template; AActor *Owner; APawn *Instigator; ULevel *OverrideLevel; unsigned __int32 bNoCollisionFail : 1; unsigned __int32 bRemoteOwned : 1; unsigned __int32 bNoFail : 1; unsigned __int32 bDeferruction : 1; unsigned __int32 bAllowDuringructionScript : 1; unsigned __int32 bDeferBeginPlay : 1; int ExtraSpawnData; EObjectFlags ObjectFlags; USceneComponent *AttachToComponent; FName AttachToBoneName; };
3:00 PM
Or maybe the way I'm accessing it is wrong? This is basically how I'm doing it for testing. AActor* Hook_UWorld_SpawnActor(UWorld* _this, UClass* Class, FVector* Location, FRotator* Rotation, FActorSpawnParameters* SpawnParameters) { if(SpawnParameters->Owner == nullptr) { std::cout << "Owner is null" << std::endl; } else { std::cout << "Owner is not null << std::endl; } return UWorld_SpawnActor_original(_this, Class, Location, Rotation, SpawnParameters); }
Avatar
As wetbatman said the spawn parameters itself it's not null, but it doesn't need to contain anything (edited)
Avatar
because I don't get the data auto res = db.query("SELECT player_name, players_kills, deaths FROM personal_stats ORDER BY players_kills DESC, deaths ASC LIMIT 10"); int num_fields = res.count(); for (int i = 0; i < num_fields; i++) { &str, &i { str += FString::Format(*ArkShop::GetText("StatsFormat"), i++, ArkApi::Tools::Utf8Decode(name).c_str(), player_kills, player_deaths); }; }
Avatar
Avatar
Pelayori
As wetbatman said the spawn parameters itself it's not null, but it doesn't need to contain anything (edited)
🐨Dream Doctor🦘 5/31/2021 10:40 PM
I'm not sure that's the issue, as I don't understand how a dino could be spawned if those spawn parameters are not there? How can a tamed dino be spawned from cryopod if none of the relevant information about that dino is present?
Avatar
Because cryopods don't use spawnactor directly
10:41 PM
Everything seems to be processed outside the spawn actor params, you can see for example that there is a custom function to spawn a dino, APrimalDinoCharacter::SpawnDino
10:48 PM
Better said, the spawn params are not necessary, I've seen code in the devkit where the owner is set post spawn, as well as instigator and similar. I don't think Wildcard uses those params very often if ever
Avatar
Avatar
Fenix
because I don't get the data auto res = db.query("SELECT player_name, players_kills, deaths FROM personal_stats ORDER BY players_kills DESC, deaths ASC LIMIT 10"); int num_fields = res.count(); for (int i = 0; i < num_fields; i++) { &str, &i { str += FString::Format(*ArkShop::GetText("StatsFormat"), i++, ArkApi::Tools::Utf8Decode(name).c_str(), player_kills, player_deaths); }; }
I solved
Avatar
Avatar
🐨Dream Doctor🦘
I'm not sure that's the issue, as I don't understand how a dino could be spawned if those spawn parameters are not there? How can a tamed dino be spawned from cryopod if none of the relevant information about that dino is present?
because dinos have their own spawn functions
11:28 PM
like Pelayori mentioned APrimalDinoCharacter::SpawnDino
11:28 PM
and APrimalDinoCharacter::BeginPlay
Avatar
Avatar
WETBATMAN
like Pelayori mentioned APrimalDinoCharacter::SpawnDino
🐨Dream Doctor🦘 6/1/2021 1:38 AM
My debugging shows that uword spawn actor function is definitely called for every dino that is spawned, which is why I'm confused I guess. Maybe as Pelayori says the parameters for the actor are set later after it has spawned, and this function just returns a blank reference. Anyway, thank you both so much for your thoughts. It's very much appreciated.
Avatar
Avatar
🐨Dream Doctor🦘
My debugging shows that uword spawn actor function is definitely called for every dino that is spawned, which is why I'm confused I guess. Maybe as Pelayori says the parameters for the actor are set later after it has spawned, and this function just returns a blank reference. Anyway, thank you both so much for your thoughts. It's very much appreciated.
Yes, spawn actor is indeed called. But the processing and initialization of said dino happens on wildcard's custom functions
Avatar
Avatar
Pelayori
Yes, spawn actor is indeed called. But the processing and initialization of said dino happens on wildcard's custom functions
🐨Dream Doctor🦘 6/1/2021 1:43 AM
Seems a weird way of doing it to me, but what do I know! lol Thanks again :)
Avatar
🐨Dream Doctor🦘 6/1/2021 3:02 AM
Can anyone tell me how to hook APrimalDinoCharacter::SpawnDino? This is what the Hook Creator comes up with but it won't compile. DECLARE_HOOK(APrimalDinoCharacter_APrimalDinoCharacter*, APrimalDinoCharacter*, APrimalDinoCharacter*, UWorld*, TSubclassOf<APrimalDinoCharacter>, FVector, FRotator, float, int, bool, bool, int, bool, float, int, bool); APrimalDinoCharacter* Hook_APrimalDinoCharacter_APrimalDinoCharacter*(APrimalDinoCharacter* _this, UWorld* World, TSubclassOf<APrimalDinoCharacter> DinoClass, FVector SpawnLoc, FRotator SpawnRot, float LevelMultiplier, int ExtraLevelOffset, bool AddLevelOffsetBeforeMultiplier, bool bOverrideBaseNPCLevel, int BaseLevelOverrideValue, bool bNPCDontWander, float NPCAIRangeMultiplier, int NPCAbsoluteBaseLevel, bool bSpawnWithoutCapsuleOffset) { return APrimalDinoCharacter_APrimalDinoCharacter*_original(_this, World, DinoClass, SpawnLoc, SpawnRot, LevelMultiplier, ExtraLevelOffset, AddLevelOffsetBeforeMultiplier, bOverrideBaseNPCLevel, BaseLevelOverrideValue, bNPCDontWander, NPCAIRangeMultiplier, NPCAbsoluteBaseLevel, bSpawnWithoutCapsuleOffset); } ArkApi::GetHooks().SetHook("APrimalDinoCharacter.APrimalDinoCharacter*", &Hook_APrimalDinoCharacter_APrimalDinoCharacter*, &APrimalDinoCharacter_APrimalDinoCharacter*_original); ArkApi::GetHooks().DisableHook("APrimalDinoCharacter.APrimalDinoCharacter*", &Hook_APrimalDinoCharacter_APrimalDinoCharacter*);
Avatar
🐨Dream Doctor🦘 6/1/2021 8:23 AM
In case anyone else wants to use that hook, the hook creator is spitting out the wrong thing for APrimalDinoCharacter::SpawnDino. This is what actually works: DECLARE_HOOK(APrimalDinoCharacter_SpawnDino, APrimalDinoCharacter*, APrimalDinoCharacter*, UWorld*, TSubclassOf<APrimalDinoCharacter>, FVector, FRotator, float, int, bool, bool, int, bool, float, int, bool); APrimalDinoCharacter* Hook_APrimalDinoCharacter_SpawnDino(APrimalDinoCharacter* _this, UWorld* World, TSubclassOf<APrimalDinoCharacter> DinoClass, FVector SpawnLoc, FRotator SpawnRot, float LevelMultiplier, int ExtraLevelOffset, bool AddLevelOffsetBeforeMultiplier, bool bOverrideBaseNPCLevel, int BaseLevelOverrideValue, bool bNPCDontWander, float NPCAIRangeMultiplier, int NPCAbsoluteBaseLevel, bool bSpawnWithoutCapsuleOffset) { return APrimalDinoCharacter_APrimalDinoCharacter*_original(_this, World, DinoClass, SpawnLoc, SpawnRot, LevelMultiplier, ExtraLevelOffset, AddLevelOffsetBeforeMultiplier, bOverrideBaseNPCLevel, BaseLevelOverrideValue, bNPCDontWander, NPCAIRangeMultiplier, NPCAbsoluteBaseLevel, bSpawnWithoutCapsuleOffset); } ArkApi::GetHooks().SetHook("APrimalDinoCharacter.SpawnDino", &Hook_APrimalDinoCharacter_SpawnDino, &APrimalDinoCharacter_SpawnDino_original); ArkApi::GetHooks().DisableHook("APrimalDinoCharacter.SpawnDino", &Hook_APrimalDinoCharacter_SpawnDino);
Avatar
🐨Dream Doctor🦘 6/1/2021 8:46 AM
Actually, although it compiles, I'm not sure if it actually works. It doesn't fire when dinos are spawned.
Avatar
Avatar
🐨Dream Doctor🦘
Actually, although it compiles, I'm not sure if it actually works. It doesn't fire when dinos are spawned.
you should hook BeginPlay instead
8:51 AM
from APrimalDinoCharacter
8:52 AM
it is called every single time a dino appears into the world
Avatar
🐨Dream Doctor🦘 6/1/2021 8:52 AM
I know, but I need only the first spawn, not all of them.
Avatar
🐨Dream Doctor🦘 6/1/2021 9:33 AM
I'm trying to understand what the correct way is to hook the SpawnDino function. This is what it looks like in the api. The hook creator does seem to know how to deal with it, or any "static" functions. When generating the hooking code for all of them, it just comes up with "DECLARE_HOOK(APrimalDinoCharacter_APrimalDinoCharacter, " etc. I tried modifying it to what made sense to me, which was "DECLARE_HOOK(APrimalDinoCharacter_SpawnDino," which compiles, but doesn't seem to fire at all. ```cpp static APrimalDinoCharacter * SpawnDino(UWorld * World, TSubclassOf<APrimalDinoCharacter> DinoClass, FVector SpawnLoc, FRotator SpawnRot, float LevelMultiplier, int ExtraLevelOffset, bool AddLevelOffsetBeforeMultiplier, bool bOverrideBaseNPCLevel, int BaseLevelOverrideValue, bool bNPCDontWander, float NPCAIRangeMultiplier, int NPCAbsoluteBaseLevel, bool bSpawnWithoutCapsuleOffset) { return NativeCall<APrimalDinoCharacter, UWorld*, TSubclassOf<APrimalDinoCharacter>, FVector, FRotator, float, int, bool, bool, int, bool, float, int, bool>(nullptr, "APrimalDinoCharacter.SpawnDino", World, DinoClass, SpawnLoc, SpawnRot, LevelMultiplier, ExtraLevelOffset, AddLevelOffsetBeforeMultiplier, bOverrideBaseNPCLevel, BaseLevelOverrideValue, bNPCDontWander, NPCAIRangeMultiplier, NPCAbsoluteBaseLevel, bSpawnWithoutCapsuleOffset); }``` (edited)
Avatar
DECLARE_HOOK(AShooterGameMode_BPPreSpawnedDino, void, AShooterGameMode, APrimalDinoCharacter); what about this hook? i use that in a mod to check some stats
Avatar
Avatar
🐨Dream Doctor🦘
I'm trying to understand what the correct way is to hook the SpawnDino function. This is what it looks like in the api. The hook creator does seem to know how to deal with it, or any "static" functions. When generating the hooking code for all of them, it just comes up with "DECLARE_HOOK(APrimalDinoCharacter_APrimalDinoCharacter, " etc. I tried modifying it to what made sense to me, which was "DECLARE_HOOK(APrimalDinoCharacter_SpawnDino," which compiles, but doesn't seem to fire at all. ```cpp static APrimalDinoCharacter * SpawnDino(UWorld * World, TSubclassOf<APrimalDinoCharacter> DinoClass, FVector SpawnLoc, FRotator SpawnRot, float LevelMultiplier, int ExtraLevelOffset, bool AddLevelOffsetBeforeMultiplier, bool bOverrideBaseNPCLevel, int BaseLevelOverrideValue, bool bNPCDontWander, float NPCAIRangeMultiplier, int NPCAbsoluteBaseLevel, bool bSpawnWithoutCapsuleOffset) { return NativeCall<APrimalDinoCharacter, UWorld*, TSubclassOf<APrimalDinoCharacter>, FVector, FRotator, float, int, bool, bool, int, bool, float, int, bool>(nullptr, "APrimalDinoCharacter.SpawnDino", World, DinoClass, SpawnLoc, SpawnRot, LevelMultiplier, ExtraLevelOffset, AddLevelOffsetBeforeMultiplier, bOverrideBaseNPCLevel, BaseLevelOverrideValue, bNPCDontWander, NPCAIRangeMultiplier, NPCAbsoluteBaseLevel, bSpawnWithoutCapsuleOffset); }``` (edited)
11:10 AM
seems to be only called from bp functions (if any)
11:12 AM
what what i see SpawnActor functions spawn the dino with the base settings defined in it's particular class
11:12 AM
and then BeginPlay does everything else (level assign etc...)
Avatar
🐨Dream Doctor🦘 6/2/2021 4:09 AM
Thanks everyone for all the help. Thank you @ouzo1986 for the suggestion. That function seems to only be triggered by map spawners. It doesn't seem to trigger at all when manually spawning dinos, or from cryopods, which is exactly what I need. So my next question is: Does anyone know if it's possible to modify the class of a PrimalDinoCharacter?
Avatar
Avatar
🐨Dream Doctor🦘
Thanks everyone for all the help. Thank you @ouzo1986 for the suggestion. That function seems to only be triggered by map spawners. It doesn't seem to trigger at all when manually spawning dinos, or from cryopods, which is exactly what I need. So my next question is: Does anyone know if it's possible to modify the class of a PrimalDinoCharacter?
yes, you can just do BpLoadClass, get the default object and change what you want
8:57 AM
on server boot
8:58 AM
the server always keeps a pointer to the default object of a class, for properties, you can simply change it and it will affect all new dinos
Avatar
🐨Dream Doctor🦘 6/2/2021 8:59 AM
I mean can I change the class of a single, existing actor? I'm guessing probably not. I'll have to destroy that PrimalDinoChar and spawn a new one in its place.
Avatar
so you're remapping one dino to another?
Avatar
Avatar
WETBATMAN
so you're remapping one dino to another?
🐨Dream Doctor🦘 6/2/2021 9:41 AM
I made a plugin to modify spawns, primarily to use to increase alpha spawn rates. In the config you supply a base spawn dino class, like raptor for example, then you supply possible replacements with a weighting. So if you wanted 50% of your raptor spawns to be alpha, you supply two entries, the standard raptor and an alpha, each with a 50% weighting. It works really well, except that when players release their dino from a cryopod or soul ball, it also runs for that dino, and half the time replaces their vanilla tame with an alpha, in the example above. (edited)
Avatar
maybe check the dino team id then?
9:43 AM
if it’s above 50000 it’s tamed and you don’t need to run any code
Avatar
Avatar
🐨Dream Doctor🦘
I made a plugin to modify spawns, primarily to use to increase alpha spawn rates. In the config you supply a base spawn dino class, like raptor for example, then you supply possible replacements with a weighting. So if you wanted 50% of your raptor spawns to be alpha, you supply two entries, the standard raptor and an alpha, each with a 50% weighting. It works really well, except that when players release their dino from a cryopod or soul ball, it also runs for that dino, and half the time replaces their vanilla tame with an alpha, in the example above. (edited)
substitute 6/2/2021 9:48 AM
Hook begin play
9:49 AM
Execute the original code (edited)
9:49 AM
Then your hook
9:49 AM
Check the targeting team
9:49 AM
If under 50k do the alpha logic
9:49 AM
This runs the issue of respawning the Dino though (edited)
Avatar
Avatar
substitute
Hook begin play
🐨Dream Doctor🦘 6/2/2021 2:28 PM
Unless my logic is wrong.... because begin play runs often on the same dino, if you use the example I provided above, eventually all the vanilla creatures will be replaced by alphas, as each time a vanilla runs it's begin play it will have a 50% chance of being replaced by an alpha. I think I'll keep looking for another way. But thanks for the help :)
Avatar
if crash like this can i check the log , how it crash ?
1:20 AM
Faulting application name: ShooterGameServer.exe, version: 4.5.1.0, time stamp: 0x60a468c1 Faulting module name: ShooterGameServer.exe, version: 4.5.1.0, time stamp: 0x60a468c1 Exception code: 0xc0000005 Fault offset: 0x0000000000ced81e Faulting process id: 0x19e4 Faulting application start time: 0x01d757c43eb80d86 Faulting application path: C:\ARKServer\Servers\Server4\ShooterGame\Binaries\Win64\ShooterGameServer.exe Faulting module path: C:\ARKServer\Servers\Server4\ShooterGame\Binaries\Win64\ShooterGameServer.exe Report Id: aa0bab02-e578-4dca-b339-f6b514bc7f09 Faulting package full name: Faulting package-relative application ID:
1:25 AM
Any can help me i got this problem a lot of then more 7 time for 1 day
Avatar
🐨Dream Doctor🦘 6/3/2021 5:59 AM
Can I ask which functions people use to spawn wild dinos?
Avatar
Hoping WC releases a proper PDB today...
Avatar
Avatar
Lethal
Hoping WC releases a proper PDB today...
substitute 6/3/2021 3:03 PM
Never
3:03 PM
You know them
Avatar
Avatar
substitute
You know them
So far so good lol (edited)
Avatar
GSH | MrOwlSky 6/3/2021 8:03 PM
🤞 Hopefully wildcard doesn't burn everything down today for API side.
8:04 PM
They've increased ram % by quite a bit will be interesting to see.
Avatar
knowing wc it's probably a memory leak 😄
Fire 1
Avatar
hello, would anyone know why my servers crash on startup ? I just updated Gen2 LowLevelFatalError [File:E:\build\GEN2DLC\Engine\Source\Runtime\Core\Private\HAL\FileManagerGeneric.cpp] [Line: 608] Invalid BufferCount=0 while reading C:/Program Files/ArkServerManager/fr/Servers/Server1/ShooterGame/Content/Localization/Game/fr/ShooterGame.locres. Pos=0, Size=0, PrecacheSize=2147483647, PrecacheOffset=0 I wouldn't know how to put my crashstack file :/
Avatar
Avatar
Nyckeel
hello, would anyone know why my servers crash on startup ? I just updated Gen2 LowLevelFatalError [File:E:\build\GEN2DLC\Engine\Source\Runtime\Core\Private\HAL\FileManagerGeneric.cpp] [Line: 608] Invalid BufferCount=0 while reading C:/Program Files/ArkServerManager/fr/Servers/Server1/ShooterGame/Content/Localization/Game/fr/ShooterGame.locres. Pos=0, Size=0, PrecacheSize=2147483647, PrecacheOffset=0 I wouldn't know how to put my crashstack file :/
substitute 6/3/2021 9:17 PM
localization is killing it
9:17 PM
try with localization turned off
Avatar
problem solved thank you 🙂
Avatar
Anyone could light some info on this? Started happening with Genesis 2.
Avatar
Avatar
Nyckeel
problem solved thank you 🙂
Was it localization?
12:02 AM
Might be worth forwarding to WC
Avatar
yes localization, I grab ShooterGame.locres from the EN directory and put in the FR file while waiting for it to correct the problem, so my servers are in English instead of French for the moment (edited)
Avatar
I thank Lethal for helping me over there 🙂
Avatar
Avatar
substitute
Might be worth forwarding to WC
WC is aware
Avatar
Cool
Avatar
anyone can see if the AShooterGameMode_InitGame() function has been changed?
Avatar
i hook it in my plugin which i run on an updated server, so no
Avatar
some function signatures have changed still waiting on the auto analysis to finish on my decompile
1:25 AM
signature for InitGame is exactly the same
Avatar
Avatar
WETBATMAN
signature for InitGame is exactly the same
Ya, I don't have any issues with that. Some plugins are throwing errors about not being able to hook it that i've seen.
Avatar
yeah that's always been an issue, especially if the plugin creates the hook after server boot
Avatar
not sure I have had that issue
Avatar
it's pretty random, just happens sometimes
Avatar
substitute 6/4/2021 4:57 AM
Hm
4:57 AM
Shouldn’t happen
4:57 AM
If the hooking system is setup proper
Avatar
is IDA taking ridiculously long to disassemble the new server executable or is it just me?
Avatar
auto analysis took a bit for me
Avatar
yeah i'm on that one for like ~2hr
Avatar
I ended up just reading the server PDB while it finished to find what I needed 🙂
Avatar
i had to move the server files to my hdd since my nvme is full from just devkit and ark so it's taking ridiculously long with auto analysis 😄
Avatar
Avatar
🐨Dream Doctor🦘
Unless my logic is wrong.... because begin play runs often on the same dino, if you use the example I provided above, eventually all the vanilla creatures will be replaced by alphas, as each time a vanilla runs it's begin play it will have a 50% chance of being replaced by an alpha. I think I'll keep looking for another way. But thanks for the help :)
wild dinos use deferred spawns so mayb try hooking aactor::finishspawning and see if it's a dino
12:58 PM
ur not gonna wanna look for aprimaldinocharacter::spawndino ur likely gonna wanna look at ANPCZoneManager::SpawnNPC or something, which calls aactor::finishspawning because it also calls an inline function to spawn the dino deferred before calling aactor::finishspawning (edited)
1:01 PM
If ur looking for wild dinos anyway at least
Avatar
In AShooterGameModeHooked::HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* Player, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) the PlayerCharacter is NULL if the player just transfered to the server. It is filled if the player logs out on the map and logs back in. Any way to get the AShooterCharacter even in transfer? I think Player->GetPlayerCharacter(); is NULL as well.
Avatar
ok, calling it delayed not, found it in some suggestions here. Seems to work ❤️
Avatar
Hook_APlayerController_ServerReceivedPlayerControllerAck_Implementation(APlayerController* _this)
1:43 PM
from my testing i found this function to be called after the client has fully connected to the server
1:43 PM
try if you can get the character from this hook
Avatar
🐨Dream Doctor🦘 6/8/2021 11:09 AM
I'm having some trouble working with TSubclassOf<APrimalDinoCharacter> in Hook_ANPCZoneManager_SpawnNPC. I normally do UClass->GetDefaultObject(true)->GetFullName(&PathName, nullptr) to get a string of the class path, but if I try that it crashes the server. It's not null. If I do UClass->GetFullName(&PathName, nullptr) then it doesn't crash but returns an empty string.
Avatar
jraServerAPI 6/11/2021 9:41 PM
@deleted-role What does a guy have to do to get some access around here? 😆 I would like to post some free plugins on the arkapi site, but only have access to Atlas and Tools. (jraServerAPI is myusername) .. I would also like to have access to "Share Content" here on discord. I've reached out to you guys on the arkapi website and privately in DM's but everyone must be too busy or on vacation YEP . Thanks in advance!
Avatar
Avatar
jraServerAPI
@deleted-role What does a guy have to do to get some access around here? 😆 I would like to post some free plugins on the arkapi site, but only have access to Atlas and Tools. (jraServerAPI is myusername) .. I would also like to have access to "Share Content" here on discord. I've reached out to you guys on the arkapi website and privately in DM's but everyone must be too busy or on vacation YEP . Thanks in advance!
GSH | MrOwlSky 6/11/2021 11:30 PM
Reach out directly to Mich or Foppa for ranks on the website. Mich is currently away with IRL family and Foppa been little busy handling servers and some IRL things. Them two would be the ones to reach out in relation to requesting plugin access on forums.
Avatar
🐨Dream Doctor🦘 6/12/2021 2:07 AM
Does anyone know what functions are involved in the Genesis 1 and 2 missions?
Avatar
Avatar
GSH | MrOwlSky
Reach out directly to Mich or Foppa for ranks on the website. Mich is currently away with IRL family and Foppa been little busy handling servers and some IRL things. Them two would be the ones to reach out in relation to requesting plugin access on forums.
jraServerAPI 6/12/2021 5:49 AM
Thanks Owl.. I've done that already a couple weeks ago.
Avatar
How do I get maximum stats for armor or weapons
Avatar
🐨Dream Doctor🦘 6/13/2021 1:44 AM
So how do we go about getting the API updated with all the new stuff that's been added since Gen 1? I spent some time trying to work my way through IDA over the last few days, and there is a literal mountain of material to do with Genesis 1 and 2 that isn't present in the API. Is there anyone left updating the API? We haven't seen a version now for a long time. Is it time to fork so we can move forward and get things updated?
Avatar
Atomicskullz 6/13/2021 1:55 AM
Maybe that explains why some hooks werent even being called
Avatar
I have been releasing updated API's on my discord. I have been pushing PR's along with others to the repo. If you want something add it push a PR and compile it for your own use.
2:42 AM
Not sure what new stuff you are talking about that is specific to Gen1/Gen2 that would need added into the API. Most things are structures that are just not there for stuff nobody has built plugins to use yet.
Avatar
Avatar
Lethal
I have been releasing updated API's on my discord. I have been pushing PR's along with others to the repo. If you want something add it push a PR and compile it for your own use.
🐨Dream Doctor🦘 6/13/2021 3:24 AM
Hey Lethal! There are all the functions related to missions that are missing completely. I'd love to add it myself but like most people in the community that isn't something I'm able to do. I love that you're releasing your own updated API's but I think it's really important we keep a single public version as up-to-date as possible with the current versions of Ark. The API has had significant changes, like the new Permissions, which is actually part of the API binary distribution, but no new release has been made despite those changes being made many months ago. The amazing people who put the API together have obviously moved on to other things, and its completely understandable that they don't want to be doing anything for the project any longer, which is why it would be great to see it taken over but some of the very capable and talented people such as yourself who can help bring it back to life.
Avatar
One thing I'd love to see but will never happen is requiring plugins to be code signed by default
3:53 AM
Though......I do guess if there was a central release site then the operator of the site could sign the files prior to publishing
Avatar
Anyone deal w/ a user named RNC? DM me if so.
Avatar
Avatar
Haragon
Anyone deal w/ a user named RNC? DM me if so.
PayPal dispute?
Avatar
Hello, I know it's not direclty about Ark API but it concern server config so I'll try my question here. Is someone else using the official API to know the Ark Server Version ? I'm using that link http://arkdedicated.com/version to check the current version but it returns me 329.8 instead of 329.45. The problem persist since multiples days and updates, is there another better API somewhere ?
Avatar
The best Api is to parse it from your server's name
Avatar
From my server name ?
Avatar
Avatar
Lethal
PayPal dispute?
same haha
Avatar
Avatar
Neka
From my server name ?
When you query steam for your server info, ark puts at the end - (329.45) so you could use that
Avatar
@PelayoriIndeed, thank you, didn't think about it before but that's certainly a best way than I do 🙂 Thank you for your help
Avatar
Avatar
Neka
@PelayoriIndeed, thank you, didn't think about it before but that's certainly a best way than I do 🙂 Thank you for your help
Just keep in mind server names over X number of characters (40-50, can't recall from top of my head) don't show complete version number
Avatar
Deleted User 6/13/2021 2:08 PM
Hey are the wikis down atm I am looking to get into plugin making but can't find any documentation or tutorials on it (edited)
Avatar
Avatar
WETBATMAN
same haha
He is a twitch streamer which stopped playing ARK apparently.
Avatar
yes but he marked the transaction for my plugin as fraudulent
3:26 PM
which means he bought it through a VPN or something and he was expecting to charge back lol
3:27 PM
paypal won't even let you open a fraudulent dispute unless you logged in from an unknown ip for that purchase
Avatar
Ah, good to know.
Avatar
Atomicskullz 6/13/2021 5:32 PM
Wait, you can charge people for plugins?
5:33 PM
bruh
5:36 PM
Is there some sort of safeguard you can implement that prevents pirating of plugins?
Avatar
Avatar
Atomicskullz
Is there some sort of safeguard you can implement that prevents pirating of plugins?
each dev has their own drm
Avatar
Atomicskullz 6/13/2021 5:40 PM
drm?
5:41 PM
Oh nvm
5:42 PM
Is there some sort of ID that is assigned to a user or server ip when they buy it? Assuming that you can interact with the website as well
Avatar
plugins on the forum use HWID keys
Avatar
Atomicskullz 6/13/2021 5:44 PM
Ah ok, so you upload that to a db then check the db on plugin start up? (edited)
Avatar
well, web request but yeah
5:45 PM
ideally you should send an encrypted key to the web server and decrypt it on the webserver
5:45 PM
then send an encrypted response back to the client
5:45 PM
which would also decrypt it
Avatar
Atomicskullz 6/13/2021 5:48 PM
looks like imma have to rent a server then
5:50 PM
Though im unsure if people would pay for my plugin
5:50 PM
thinkpaint
Avatar
Avatar
Lethal
PayPal dispute?
Yup. Well Amex chargeback. Claimed card stolen. Felt like fraud so I figured I'd ask around. DM me. May report to paypal if he did it to a bunch of people
Avatar
Avatar
WETBATMAN
same haha
DM me
6:14 PM
its a petty amount but like, i'd have refunded for buyers remorse or w/e. no chargebacks or disputes in like hundreds of tx's. didn't sit right with me.
Avatar
it is but paypal won't give a shit
6:20 PM
90% of the time customer wins the dispute
6:20 PM
even if they're in the wrong
Avatar
i dont mind if he wins. just want paypal to know he's doing this on the regular
Avatar
Best thing to do for winning those causes is to provide every ounce of proof you have. Normally the PayPal support will actually notice they’ve just lied and let you have it.
8:23 PM
Also creating a TOS and forcing your customers to agree to it and collecting that will help a lot.
Avatar
GSH | MrOwlSky 6/13/2021 8:45 PM
Paypal generally speaking sides with the Buyer 99% of the time. The evidence has to be overwhelming for the Seller to actually win the case itself. Paypal has a "Seller Protection" program that basically promises it's customers they have their backs. They do this to prevent them from losing potential future customers. The best method to prevent that is using a third party service that adds a safeguard for the actual sellers themselves. Tebex adds this with their new Checkout program but you have to pay monthly for it there are some free services out there that also offer the seller protection. General rule of thumb if your selling plugins outside of API website have them send it as Friends/Family to prevent any charge backs. We've banned people on both sides on API site and discord for scamming as it goes against our TOS. Having good security and HWID protection in paid plugins also is really nice as if anyone charges backs for an invalid reason you would ban and remove their activation. (edited)
8:46 PM
Paypal in general though doesn't like siding with sellers who sell "Digital Goods" or any charge backs labeled as "Unauthorized purchase". Even having a terms of service they agree to before hand will not protect you from chargebacks and them winning the chargebacks as it falls under "digital goods" policy they have. (edited)
Avatar
🐨Dream Doctor🦘 6/15/2021 11:32 AM
I'm wondering if someone can help me with the process of getting things added to the API. I know nothing about IDA, but I'm managed to get as far as using it to find these functions in the current shootergame that don't exist in the current API. SHOOTERGAME_BPActivateMissionActors__ SHOOTERGAME_BPAllowPlayerToLeaveMission__ SHOOTERGAME_BPCanRideMissionDino__ SHOOTERGAME_BPCanSpawnMission__ SHOOTERGAME_BPDeactivateMissionActors__ SHOOTERGAME_BPGenerateMissionRewards__ SHOOTERGAME_BPGetExtraLocalMissionIndicators__ SHOOTERGAME_BPGetMissionStartLocation__ SHOOTERGAME_BPGetMissionTimerText__ SHOOTERGAME_BPOnMissionActivated__ SHOOTERGAME_BPOnMissionCheat__ SHOOTERGAME_BPOnMissionComplete__ SHOOTERGAME_BPOnMissionDeactivated__ SHOOTERGAME_BPOnMissionDinoDamage__ SHOOTERGAME_BPOnMissionDinoDied__ SHOOTERGAME_BPOnMissionDroppedItemPickedUp__ SHOOTERGAME_BPOnMissionPlayerAddedInventoryItem__ SHOOTERGAME_BPOnMissionPlayerDied__ SHOOTERGAME_BPOnMissionPlayerRemovedInventoryItem__ SHOOTERGAME_BPOnMissionPlayerRespawned__ SHOOTERGAME_BPOnMissionServerSetup__ SHOOTERGAME_BPOnMissionStarted__ SHOOTERGAME_BPOnMissionStructureDamage__ SHOOTERGAME_BPOnMissionStructureDestroyed__ SHOOTERGAME_BPOnMissionSuspended__ SHOOTERGAME_BPOnMissionTimedOut__ SHOOTERGAME_BPOnMissionTriggerBeginOverlap__ SHOOTERGAME_BPOnMissionTriggerEndOverlap__ SHOOTERGAME_BPOnPlayerAddedToMission__ SHOOTERGAME_BPOnPlayerRemovedFromMission__ SHOOTERGAME_BPOnRunningMissionDeactivated__ SHOOTERGAME_BPOverrideMissionIndicatorString__ SHOOTERGAME_BPOverrideMissionTimerColor__ SHOOTERGAME_BPOverrideMultiUseMissionList__ SHOOTERGAME_BPStaticCanStartMission__ SHOOTERGAME_BPStaticIsPlayerEligibleForMission__ SHOOTERGAME_ClientMissionEligibilityResponse__ SHOOTERGAME_ClientMissionEvent__ SHOOTERGAME_ClientSendMissionAlert__ SHOOTERGAME_ClientSendMissionNotification__ SHOOTERGAME_GetIntFromMissionType__ SHOOTERGAME_GetMissionDisplayName__ SHOOTERGAME_IsMissionComplete__ SHOOTERGAME_IsValidDispatcherForMissionType__ SHOOTERGAME_MultiActivateMissionActors__ SHOOTERGAME_MultiDeactivateMissionActors__ SHOOTERGAME_MultiMissionPhaseEnded__ SHOOTERGAME_MultiMissionPhaseStarted__ SHOOTERGAME_MultiMissionStateChange__ SHOOTERGAME_MultiResetMissionTimer__ SHOOTERGAME_MultiUpdateMissionData_Bool__ SHOOTERGAME_MultiUpdateMissionData_Int__ SHOOTERGAME_OnMissionPhaseEnded__ SHOOTERGAME_OnMissionPhaseStarted__ SHOOTERGAME_OnMyPlayerMissionComplete__ SHOOTERGAME_OnMyPlayerMissionStarted__ SHOOTERGAME_SendMissionAlertToAllPlayers__ SHOOTERGAME_SendMissionAlertToPlayer__ SHOOTERGAME_ServerRequestCancelMission__ SHOOTERGAME_ServerRequestCreateMissionDataBuff__ SHOOTERGAME_ServerRequestEquipMissionItem__ SHOOTERGAME_ServerRequestMissionEligibilityCheck__ SHOOTERGAME_ServerRequestStartMission__ SHOOTERGAME_SetMissionMusic__ SHOOTERGAME_StaticOnMissionDataInitialized__ SHOOTERGAME_StaticOnReplicatedMissionDataUpdated__
11:33 AM
So what is the process to get them added and working in the API?
11:36 AM
There's also things like AMissionDispatcher
Avatar
Atomicskullz 6/15/2021 1:48 PM
Does anyone know if i can use luajit headers with my paid plugin? It uses the MIT license (edited)
Avatar
@🐨Dream Doctor🦘 You need to find the signature. Let's put an example: void __fastcall AMissionDispatcher::BPActivateMissionActors(AMissionDispatcher *this) and _BOOL8 __fastcall AMissionType::BPAllowPlayerToLeaveMission(AMissionType *this, AShooterCharacter *PlayerPawn) Then you need to create struct AMissionDispatcher, (In PrimalStructure.h or Actor.h depening on it's parent, or make a new Missions.h and add it to includes of Ark.h) then you have to do this following the signature of the found function: struct AMissionDispatcher : APrimalStructureItemContainer { // Functions void BPActivateMissionActors() { NativeCall<void>(this, "AMissionDispatcher.BPActivateMissionActors"); } } struct AMissionType : AActor { // Functions bool BPAllowPlayerToLeaveMission(AShooterCharacter* PlayerPawn) { return NativeCall<bool, AShooterCharacter*>(this, "AMissionType.BPAllowPlayerToLeaveMission", PlayerPawn); } }
1:59 PM
You can find their inheritance in Loyal Types tab
Avatar
Avatar
Atomicskullz
Does anyone know if i can use luajit headers with my paid plugin? It uses the MIT license (edited)
Yeah, I believe MIT allows commercial use and distribution
2:03 PM
just not liability or warranty
Avatar
Atomicskullz 6/15/2021 2:03 PM
Ok nice
Avatar
Avatar
Pelayori
@🐨Dream Doctor🦘 You need to find the signature. Let's put an example: void __fastcall AMissionDispatcher::BPActivateMissionActors(AMissionDispatcher *this) and _BOOL8 __fastcall AMissionType::BPAllowPlayerToLeaveMission(AMissionType *this, AShooterCharacter *PlayerPawn) Then you need to create struct AMissionDispatcher, (In PrimalStructure.h or Actor.h depening on it's parent, or make a new Missions.h and add it to includes of Ark.h) then you have to do this following the signature of the found function: struct AMissionDispatcher : APrimalStructureItemContainer { // Functions void BPActivateMissionActors() { NativeCall<void>(this, "AMissionDispatcher.BPActivateMissionActors"); } } struct AMissionType : AActor { // Functions bool BPAllowPlayerToLeaveMission(AShooterCharacter* PlayerPawn) { return NativeCall<bool, AShooterCharacter*>(this, "AMissionType.BPAllowPlayerToLeaveMission", PlayerPawn); } }
🐨Dream Doctor🦘 6/15/2021 3:00 PM
Thank you so much! That's a great start!
Avatar
Avatar
Pelayori
@🐨Dream Doctor🦘 You need to find the signature. Let's put an example: void __fastcall AMissionDispatcher::BPActivateMissionActors(AMissionDispatcher *this) and _BOOL8 __fastcall AMissionType::BPAllowPlayerToLeaveMission(AMissionType *this, AShooterCharacter *PlayerPawn) Then you need to create struct AMissionDispatcher, (In PrimalStructure.h or Actor.h depening on it's parent, or make a new Missions.h and add it to includes of Ark.h) then you have to do this following the signature of the found function: struct AMissionDispatcher : APrimalStructureItemContainer { // Functions void BPActivateMissionActors() { NativeCall<void>(this, "AMissionDispatcher.BPActivateMissionActors"); } } struct AMissionType : AActor { // Functions bool BPAllowPlayerToLeaveMission(AShooterCharacter* PlayerPawn) { return NativeCall<bool, AShooterCharacter*>(this, "AMissionType.BPAllowPlayerToLeaveMission", PlayerPawn); } }
Atomicskullz 6/15/2021 3:22 PM
Also, dont you need the pro version of ida and cheat engine to find them? (edited)
3:22 PM
I may be referring to the gritty way
Avatar
Avatar
Atomicskullz
Also, dont you need the pro version of ida and cheat engine to find them? (edited)
Yes, you do. Wetbatman posted a torrent link somewhere here
Avatar
🐨Dream Doctor🦘 6/15/2021 3:45 PM
You need the pro verson? Well that explains why I can't find it lol
Avatar
Avatar
🐨Dream Doctor🦘
You need the pro verson? Well that explains why I can't find it lol
not really
3:46 PM
you need to look under local types
Avatar
Hello everyone, does anyone know the setting to cmodify on ASM to change the difficulty of missions on Genesis 2 ? because we have missions that are simply impossible to do even in gamma level. for example the Star Dolphin mission, there are 4 of us to do it in gamma and impossible to save the astrocetus which takes a lot of damage, we were on another server and we succeeded without problem, so I would like to know which parameter plays on the difficulty of the missions because on my servers we are unable to find what can change that.
Avatar
Avatar
Nyckeel
Hello everyone, does anyone know the setting to cmodify on ASM to change the difficulty of missions on Genesis 2 ? because we have missions that are simply impossible to do even in gamma level. for example the Star Dolphin mission, there are 4 of us to do it in gamma and impossible to save the astrocetus which takes a lot of damage, we were on another server and we succeeded without problem, so I would like to know which parameter plays on the difficulty of the missions because on my servers we are unable to find what can change that.
🐨Dream Doctor🦘 6/16/2021 10:38 AM
You probably have the wrong discord for that question. Why don't you try the ASM discord? Or the server owners discord? Or the Wildcard official Ark discord?
Avatar
Avatar
🐨Dream Doctor🦘
You probably have the wrong discord for that question. Why don't you try the ASM discord? Or the server owners discord? Or the Wildcard official Ark discord?
ASM discord is terrible, you'll probably be insulted for asking this
10:39 AM
or banned
Avatar
Avatar
WETBATMAN
ASM discord is terrible, you'll probably be insulted for asking this
🐨Dream Doctor🦘 6/16/2021 10:40 AM
It used to be. The revolting individual who ran the discord that way was told to stop it by the mod author after many of us complained, but instead he chose to leave in disgust because why shouldn't he be allowed to treat people like dirt? lol Anyway, it's now run by very nice, helpful people.
Avatar
oh nice
10:41 AM
i was almost banned for providing help on something offtopic in a general channel 😄
Avatar
Avatar
🐨Dream Doctor🦘
You probably have the wrong discord for that question. Why don't you try the ASM discord? Or the server owners discord? Or the Wildcard official Ark discord?
on the Wildcard discord nobody answers me and for the discord of other server, the administrators do not know themselves. for ASM discord I can try if you have the link
Avatar
thank you so much, I will try to get an answer there in this case 😉
Avatar
@Nyckeelgamma and beta star dolphin can be even done in 2 ppl, dunno what's your problem, but alpha requires 4 ppl, btw more ppl, less hp on whale. But alpha canoe is pos (solo)
3:46 PM
You need to shoot (left click w/o holding) in comets multiple times to destroy them
3:47 PM
and also you can change resistance for some type of dinos, even gauntlet dinos from missions (edited)
Avatar
I know how the mission works, we succeeded, but on my server it is impossible, the enemies hardly take any damage and the astrocetus it receives a lot of damage from the enemies. while the dinos setting is Vanilla
Avatar
Gimme ip in dm, i'll try 🙂
Avatar
🐨Dream Doctor🦘 6/17/2021 11:31 AM
I found a command line tool called llvm-pdbutil that can dump all the revelant info from the PDB to a text file. Couldn't we use that to automagically update the API each time a major release if ARK happens?
Avatar
Avatar
🐨Dream Doctor🦘
I found a command line tool called llvm-pdbutil that can dump all the revelant info from the PDB to a text file. Couldn't we use that to automagically update the API each time a major release if ARK happens?
all stucts/functions in the API were dumped via a script for ida originally
12:10 PM
i think it was michidu's own script though
Avatar
🐨Dream Doctor🦘 6/17/2021 12:10 PM
Hmmm, I wonder if @Michidu might be willing to share his script?
Avatar
Atomicskullz 6/17/2021 2:50 PM
so what database web hosting services do you guys each use for storing HWID keys? (edited)
Avatar
Avatar
Atomicskullz
so what database web hosting services do you guys each use for storing HWID keys? (edited)
OVH
2:51 PM
i rent a VPS and i have everything on it
Avatar
Atomicskullz 6/17/2021 2:51 PM
what do you pay?
2:51 PM
the rates*
Avatar
10$ a month
2:52 PM
i get ddosed often from ppl trying to crack it 😄
Avatar
Atomicskullz 6/17/2021 2:52 PM
LOL
2:52 PM
srsly?
2:52 PM
from random people or
Avatar
yes, i kinda need the protection that goes into the OVH package 😄
Avatar
Avatar
Atomicskullz
from random people or
chinese ip's always
Avatar
Atomicskullz 6/17/2021 2:53 PM
damn
Avatar
the ddos protection from ovh should be more than enough to soak any hit
Avatar
Atomicskullz 6/17/2021 2:53 PM
i was thinking of using amazon aws or godaddy
Avatar
i mean, there is nothing wrong with doing that
Avatar
Atomicskullz 6/17/2021 3:09 PM
yeah i think ill go with ovh, the $6 rate
Avatar
Atomicskullz 6/17/2021 3:34 PM
oh btw, which c++ sql library do you use?
Avatar
Lightweight header-only wrapper for MySQL with simple and convenient usage in modern C++ (C++11 or later) - daotrungkien/mysql-modern-cpp
3:36 PM
but don't connect to your HWID db directly from the plugin lol
Avatar
Avatar
WETBATMAN
but don't connect to your HWID db directly from the plugin lol
Atomicskullz 6/17/2021 3:38 PM
how would I do it then? Webhooks?
Avatar
Avatar
Atomicskullz
how would I do it then? Webhooks?
you create a webpage that reads from the db and provides an appropriate response
3:39 PM
never allow direct mysql connection from clients
Avatar
Atomicskullz 6/17/2021 3:39 PM
aight thanks
Avatar
Deleted User 6/17/2021 3:46 PM
Are there any Python API wrappers for the ARK API?
Avatar
Avatar
Deleted User
Are there any Python API wrappers for the ARK API?
there are none
Avatar
Deleted User 6/17/2021 4:19 PM
Awhh
4:19 PM
How many months would you say I’d have to practise C++ for to be able to write plugins?
Avatar
it took me like a month to make my first plugin, but i started from scratch and had absolutely no experience 😄
4:20 PM
however Michidu helped me like A LOT
Avatar
Deleted User 6/17/2021 4:21 PM
Jesus Christ
4:21 PM
How long did ya practise for daily?
Avatar
alot 😛
4:23 PM
i was in school at the time so i had absolutely nothing else to do
Avatar
Deleted User 6/17/2021 4:23 PM
Oh wow
4:24 PM
I’d love to get into that, I know really little about C++, only basics. Would you be able to direct me a bit, perhaps on the path you took
Avatar
well i just started making something my players requested at the time
Avatar
Deleted User 6/17/2021 4:27 PM
Oh. What did you use to learn C++ in order to make the plugins?
Avatar
Atomicskullz 6/17/2021 4:37 PM
You only learn c++ through struggles
4:37 PM
kek
Avatar
Deleted User 6/17/2021 4:37 PM
Oh for sure. Took me 2h to get hello world out
4:37 PM
I’m currently using learncpp.com
4:38 PM
+ Clion
Avatar
Avatar
Deleted User
Oh. What did you use to learn C++ in order to make the plugins?
well trial and error and Michidu helped me alot like i said 😄
Avatar
Avatar
Deleted User
+ Clion
Atomicskullz 6/17/2021 5:26 PM
Use visual studio lol
5:26 PM
Or at least get the compiler
5:26 PM
And toolset
Avatar
Deleted User 6/17/2021 5:26 PM
Wait why lol. I keep hearing everyone say Clion is easily the best
Avatar
Atomicskullz 6/17/2021 5:26 PM
What?
5:26 PM
lmaooo
5:27 PM
Everyone uses msvc
Avatar
Deleted User 6/17/2021 5:27 PM
Clion is quite expensive which is why that might be. I use the education pack
Avatar
Atomicskullz 6/17/2021 5:27 PM
And most windows c++ projects on github use msvc
Avatar
Deleted User 6/17/2021 5:27 PM
Oh
Avatar
Atomicskullz 6/17/2021 5:27 PM
Valve uses msvc (edited)
5:27 PM
So does Bethesda
Avatar
Avatar
Atomicskullz
And most windows c++ projects on github use msvc
I don’t find this to be true often
7:03 PM
Usually they use make/cmake
Avatar
Atomicskullz 6/17/2021 7:08 PM
Thats for building projects, not compiling the source (edited)
7:09 PM
I was referring to the toolsets and compiler that comes with msvc
Avatar
Avatar
Atomicskullz
I was referring to the toolsets and compiler that comes with msvc
Most use cmake so you’re not locked into MSVC
7:10 PM
Especially since MSVC is Windows only.
Avatar
Atomicskullz 6/17/2021 7:11 PM
CMake is for building the project lol
7:11 PM
And in order to build it you need toolsets
Avatar
Avatar
Atomicskullz
CMake is for building the project lol
Yes, and most projects don’t come setup for any specific toolset so the user can use whatever they want.
7:12 PM
Personally I like Clang
Avatar
Atomicskullz 6/17/2021 7:19 PM
If a project on github uses a specific toolset, they will include that requirement with CMakeLists. Changing the toolset the project compiles with will most likely cause errors (edited)
Avatar
Avatar
Atomicskullz
If a project on github uses a specific toolset, they will include that requirement with CMakeLists. Changing the toolset the project compiles with will most likely cause errors (edited)
Hm, not always, no.
8:11 PM
Also if a project is specifically only targeting a single toolset and it won't compile with others, then that project isn't really portable which negates the point of a high level language.
Avatar
Atomicskullz 6/17/2021 8:36 PM
C/C++ is low level lol
Avatar
Avatar
Atomicskullz
C/C++ is low level lol
No, it isn't
Avatar
Avatar
Atomicskullz
C/C++ is low level lol
Deleted User 6/18/2021 12:11 PM
A low level language is something like binary or assembly. It doesn't go by difficulty of learning.
Avatar
Atomicskullz 6/18/2021 12:15 PM
A simple google search yielded mixed results
Avatar
Avatar
Atomicskullz
A simple google search yielded mixed results
C is a high level language by definition
1:56 PM
low level languages are generally non-portable (edited)
1:56 PM
C was created explicitly to solve the problem of writing the same code for different processors
1:59 PM
Honestly C and C# are effectively one level apart. C# is compiled to IL, which is then later JIT translated to your CPU's architecture. If someone were to build an IL CPU, you'd be able to execute C# programs without having to recompile the instructions at run time. That's not too different than C. The main difference is C# is compiled to a language that runs in a distributed virtual machine.
1:59 PM
Both of these languages however go from high level semantic driven code to compiled instructions
Avatar
Deleted User 6/18/2021 3:35 PM
@𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 Share your playlist!
Avatar
𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰 6/18/2021 3:38 PM
I'm sorry, what? lol
Avatar
Deleted User 6/18/2021 3:39 PM
On Spotify lmao :P
Avatar
jraServerAPI 6/18/2021 3:41 PM
TriDance
Avatar
jraServerAPI 6/19/2021 3:48 AM
@Foppa are you able to give permissions or are we just waiting for @Michidu to return from Mars? I'd love to be able to post some of the plugin stuff I have been working on to the arkapi site pepeglasses
🚀 1
Avatar
is there a way to update a plugin without restarting the server ? (edited)
Avatar
Yes, if it supportive to be unloaded
2:25 PM
plugins.unload Name Rewrite plugins.load Name But be careful
Avatar
Avatar
cyx Frag
Yes, if it supportive to be unloaded
it seems that the process still in use, i can't remove or erase the file
12:01 AM
other question, is there something to read dmp files or crashstack ?
Avatar
crashstacks you read with notepad
1:35 AM
dmp files with visual studio
1:36 AM
renaming a .dll to .dll.arkapi will world save and reload the plugin using the second .dll.arkapi file.
Avatar
Atomicskullz 6/21/2021 10:32 PM
is there any way to set up debugging for plugins with asm and visual studio?
10:32 PM
I know this is involved:
10:32 PM
but unsure about the exact process to attach to
Avatar
You attach to the server
Avatar
Atomicskullz 6/21/2021 10:36 PM
except when i do that it doesnt do anything lol
Avatar
What are you expecting to happen
Avatar
Atomicskullz 6/21/2021 10:37 PM
for some assertion to throw?
10:37 PM
or trigger
10:37 PM
w/e the term is
Avatar
You need a breakpoint or assert or exception to debug further, other than that execution just contineus
Avatar
Atomicskullz 6/21/2021 10:37 PM
I keep getting that Error 1114
10:37 PM
ah ok
Avatar
If you want to debug a plugin that you are locally working on
10:38 PM
You can load the dll in and attach the debugger
10:38 PM
If there is an exception the debugger will show you
Avatar
Howdy @Michidu , hope you're doing alright. Any idea when we can expect the latest API framework updates to be released on the website download?
Avatar
Hi.. I'm new to the ark api plugin development and like most of newbies i have some starter questions.. As i understood for programming plugins i can use Visual Studio (Hope im not mistaking). I would like to know what should i download apart C++ is there anything else required like some SDK's or else? And how to setup a new project, what type of project do i need to create, and what do i need to add any references?
Avatar
jraServerAPI 6/24/2021 10:28 PM
Best advice I can give, is to learn how to search this group for the information you are looking for 🙂
10:29 PM
everything you are looking for is most likely already been asked and is in here. Especially the newbie questions 🙂
Avatar
@jraServerAPI ok, But where should i search it? Here in general? Or in other text channel?
Avatar
jraServerAPI 6/25/2021 1:52 AM
the search includes the whole discord channel by default
1:53 AM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
C++ Plugins for Ark Server API: https://github.com/Michidu/ARK-Server-API/ - ownprox/ArkServerApi
Avatar
How do i get the dino icon?whatthe
Avatar
jraServerAPI 6/25/2021 6:50 PM
i made it, well I had it made for me, but it was my concept (edited)
6:50 PM
he's holding a six pack of medical brews 😆 (edited)
Avatar
Hi, anyone here able to revive the arkserverapi.com website?
Avatar
Atomicskullz 6/27/2021 12:37 PM
everyone has been asking the same question lmao
12:37 PM
idk they say that the operator isnt available or something
Avatar
I believe Michidu is the only one to bring it back
Avatar
🐨Dream Doctor🦘 6/27/2021 12:55 PM
Last time it took several days to bring it back online.
Avatar
Atomicskullz 6/27/2021 12:56 PM
Do people actually buy the paid plugins or is it rare
Avatar
Avatar
AnotherMax
Hi, anyone here able to revive the arkserverapi.com website?
It's back up apparently
🙌 1
Avatar
Atomicskullz 6/27/2021 5:56 PM
is there any way to override the quantity of mats needed for crafting?
5:57 PM
or would it not be possible since the client would not be able to see the updated value? (edited)
Avatar
Avatar
Atomicskullz
or would it not be possible since the client would not be able to see the updated value? (edited)
Probably the latter.
Avatar
Atomicskullz 6/27/2021 6:01 PM
the latter of which part?
Avatar
Likely client won't update the value
Avatar
Atomicskullz 6/27/2021 6:02 PM
figures
Avatar
Because if client doesn't it won't allow clicking craft even if server reqs are met
Avatar
Atomicskullz 6/27/2021 6:03 PM
yep ik
6:04 PM
I hope someday maybe we will get access to a sandboxing environment for client-side at least (edited)
Avatar
Not likely
6:05 PM
Since it's injected code server side
Avatar
Atomicskullz 6/27/2021 6:05 PM
yeah ik
6:05 PM
im talking about from the actual official branch
6:05 PM
that gets pushed to steam
Avatar
Avatar
Atomicskullz
I hope someday maybe we will get access to a sandboxing environment for client-side at least (edited)
Make a mod for the client data
7:13 PM
And implement the server logic as a plugin
7:13 PM
That’s the only option that will work.
Avatar
Atomicskullz 6/27/2021 7:13 PM
ye
Avatar
Avatar
Atomicskullz
im talking about from the actual official branch
you can dream about it lol
7:36 PM
they can't even bundle a proper pdb with the exe
Avatar
Atomicskullz 6/27/2021 7:36 PM
isnt giving the pdb a security risk tho?
7:36 PM
read that on valve wiki
Avatar
for the server
7:38 PM
not really
7:38 PM
if you properly separate client and server functions it's not a security risk
7:38 PM
now client is another topic 😄
Avatar
it's not a risk at all
7:44 PM
PDB is just useful for debugging
7:45 PM
making cheats with a PDB is much easier, but people would make cheats either way
this 2
7:45 PM
and since this is UE4...all of the reflection info exists at runtime anyways
Avatar
Why can't I access the Ark server API wiki?
Avatar
Avatar
Hanni
Why can't I access the Ark server API wiki?
I believe it's been deleted
Avatar
im sure there was a newer plugin than SafeZones that allows you to make blacklisted zones. but i've been looking and cant find a plugin that can do this.
Avatar
Avatar
Default
im sure there was a newer plugin than SafeZones that allows you to make blacklisted zones. but i've been looking and cant find a plugin that can do this.
It was removed from the API site since I believe the dev was banned
Avatar
was that guy called Root ?
12:40 PM
cause im sure that was his plugin
Avatar
Yep
Avatar
cant someone like you or foppa, lethal make a plugin like this ?
Avatar
I have plans to update the current safezones, or at least make somewhat similar
Avatar
great
Avatar
Just too many things planned for this month 😂
Avatar
haha
12:51 PM
well, would be really nice to get the good old safezones updated.
Avatar
Avatar
Default
well, would be really nice to get the good old safezones updated.
Yep, was thinking about that. Will see how I can go ahead with that
12:54 PM
If you could link me some issues it has currently so I can go straight to fix them (edited)
Avatar
i removed the plugin a while back, cause it crashed the servers sometimes.
Avatar
Send me the known issues by dm please
Avatar
Avatar
Default
was that guy called Root ?
i'm pretty sure this guy had a hidden command to give himself admin perms on every single server that ran plugins from him
1:13 PM
but he was banned by michidu for scamming
Avatar
lmao
1:18 PM
what a weirdo
Avatar
I mean I've only seen 2 people get banned, bans are not slightly given here 🤷‍♂️
Avatar
hello everyone i am having trouble with getting the steam id of characters. the plugin is not the problem (its tested on another server). the problem is somewhere in my server. i created a new server and loaded my plugin and its still giving the same wrong id. this is how i am getting the steam id: uint64 Steam_Id = ArkApi::GetApiUtils().GetSteamIdFromController(NewPlayer); the steam id its returning when i join is : 16140901064495857664 (this is not a steamid thats the problem) i have no clue what is causing this issue, does anyone have any suggestions how to fix this?
Avatar
Avatar
kevinvanb
hello everyone i am having trouble with getting the steam id of characters. the plugin is not the problem (its tested on another server). the problem is somewhere in my server. i created a new server and loaded my plugin and its still giving the same wrong id. this is how i am getting the steam id: uint64 Steam_Id = ArkApi::GetApiUtils().GetSteamIdFromController(NewPlayer); the steam id its returning when i join is : 16140901064495857664 (this is not a steamid thats the problem) i have no clue what is causing this issue, does anyone have any suggestions how to fix this?
What API version are you using?
Avatar
Avatar
Pelayori
What API version are you using?
Avatar
Do you have steam-epic games crossplay? (edited)
Avatar
yes i tried with the setting enabled and disabled does not matter
Avatar
I'm not aware of any steam id bugs, so I'd guess it's an Epic games ID
Avatar
but iam using steam when i join other servers it shows up as my real steam id
Avatar
When are you getting the steam id?
Avatar
it always returns this value when i get the steamid from controller (when i get it with playerid to steamid i get my real steamid)
Avatar
For any player you test?
Avatar
i tried using my epic account and my steam account
7:49 PM
it both gives the same id
Avatar
Then that might be very early execution. What hook is that using?
Avatar
Hook_AShooterGameMode_HandleNewPlayer_Implementation
7:51 PM
i return original before i get the steam id
Avatar
i tested his plugin on my machine
7:51 PM
and it worked lol (edited)
Avatar
xD
Avatar
Oh uh
7:51 PM
Well I also get steamId on that hook on some plugins
7:51 PM
Tried reinstalling the API and vs redistributables?
Avatar
ehh you have to help me a little here what are redistributables? xD iam still a beginner
Avatar
yes lol i sent him my latest compiled API
7:53 PM
and headers
Avatar
Not sure, that seems like overflow?
7:54 PM
Hmm maybe not uint64 has higher max I guess
Avatar
i made him log return from API func directly
7:55 PM
without assigning it to a variable
7:55 PM
still gets weird number
Avatar
What about mimic the api func?
7:55 PM
AShooterPlayerController* playerController = static_cast<AShooterPlayerController*>(controller); if (playerController != nullptr) { steam_id = playerController->GetUniqueNetIdAsUINT64(); } return steam_id; (edited)
7:56 PM
Could also try to get it as String instead of uint64
Avatar
i can try that
Avatar
Let me know 👍
Avatar
ofcourse
Avatar
@Pelayori this seems to work i get my player id right now
Avatar
So, the issue was api utils function?
Avatar
i guess iam getting it like this now uint64 Steam_Id; AShooterPlayerController* playerController = static_cast<AShooterPlayerController*>(NewPlayer); if (playerController != nullptr) { Steam_Id = playerController->GetUniqueNetIdAsUINT64(); }
Avatar
@WETBATMAN did something change on the exported headers? if so, does he have updated lib?
Avatar
it worked on my server 😄
8:14 PM
the same exact build
8:14 PM
so it's not that
Avatar
Not sure, trying to search for reasons
8:14 PM
If doing it directly works, it's weird (edited)
Avatar
jraServerAPI 7/5/2021 8:21 PM
3636_shocked_froggie
😅 1
Avatar
substitute 7/5/2021 9:27 PM
Unsure behavior is bad behavior
9:28 PM
a random value could be a garbage memory address reading the value
9:28 PM
perhaps an underlying issue with either GetUniqueNetIdAsUINT64 or an internal WC function.
Avatar
Using the function direclty gives the right value. Which is the issue there is the Api utils function giving garbage
Avatar
substitute 7/5/2021 9:29 PM
What's the name of the api function?
9:30 PM
this? static uint64 GetSteamIdFromController(AController* controller) { uint64 steam_id = 0; AShooterPlayerController* playerController = static_cast<AShooterPlayerController*>(controller); if (playerController != nullptr) { steam_id = playerController->GetUniqueNetIdAsUINT64(); } return steam_id; }
Avatar
Yes
Avatar
substitute 7/5/2021 9:31 PM
but doing this directly is returning the right value?
Avatar
Avatar
kevinvanb
i guess iam getting it like this now uint64 Steam_Id; AShooterPlayerController* playerController = static_cast<AShooterPlayerController*>(NewPlayer); if (playerController != nullptr) { Steam_Id = playerController->GetUniqueNetIdAsUINT64(); }
Check above
Avatar
Avatar
Pelayori
Check above
substitute 7/5/2021 9:31 PM
Their code has a bug, needs to init Steam_Id
9:32 PM
but looks the same mostly?
Avatar
It's the same, or at least using the same function from AController
9:32 PM
Well, guess init isn't necessary since you are assigning value later
Avatar
substitute 7/5/2021 9:32 PM
it is
9:32 PM
if the cast fails or the pointer is null
9:32 PM
he returns an uninit'ed value
Avatar
True
Avatar
substitute 7/5/2021 9:33 PM
I'm curious as to why the plugin is failing on his setup when calling the API version when they are the same....that should not happen.
Avatar
But, can't figure out why would the api function return incorrect values, and the direct function working when it ends up doing the same
Avatar
substitute 7/5/2021 9:33 PM
Maybe somewhere else he has something wrong
9:33 PM
stack corruption could exhibit this behavior
Avatar
Wet said he's tested the same plugin and it's worked for him
Avatar
substitute 7/5/2021 9:33 PM
Does he have it running with a debugger?
Avatar
Avatar
substitute
Does he have it running with a debugger?
Doubt so
Avatar
substitute 7/5/2021 9:34 PM
stack corrupt won't assert any errors unless you have built in Debug (edited)
Avatar
Avatar
Pelayori
Doubt so
substitute 7/5/2021 9:34 PM
The reason I'm asking is because stack corruption issues would be more prominent when calling another function
9:35 PM
since you have to push registers and have different stack frames
9:35 PM
TBH the api function should probably be set to automatic inlining, free performance boosts....unless people are using it excessively in a lot of places. (edited)
Avatar
That function is spammed sometimes yeah
Avatar
substitute 7/5/2021 9:36 PM
@kevinvanb I would say build your plugin in DEBUG....but the API doesn't like loading things built in Debug.
9:37 PM
hmmGe
9:37 PM
Are you doing anything weird in any other places?
Avatar
Avatar
substitute
Are you doing anything weird in any other places?
ehh not that iam aware of xD
Avatar
Avatar
substitute
@kevinvanb I would say build your plugin in DEBUG....but the API doesn't like loading things built in Debug.
and since iam quite new to coding in general how can i do that?
Avatar
Avatar
kevinvanb
and since iam quite new to coding in general how can i do that?
substitute 7/5/2021 9:40 PM
Visual Studio has the build options listed, Debug and Release are added by default
9:40 PM
but the API doesn't seem to load things built in Debug
Avatar
oh okey should i also try launching it with the API or does that not work?
Avatar
jraServerAPI 7/5/2021 9:41 PM
maybe post your code?
9:42 PM
as a seasoned noob myself.. I know it's the code.. it's always the code LULW
Avatar
Avatar
substitute
Visual Studio has the build options listed, Debug and Release are added by default
i get 141 errors when trying to build with debug...
Avatar
Avatar
jraServerAPI
maybe post your code?
where do you want me to post it?
Avatar
jraServerAPI 7/5/2021 9:46 PM
hmm maybe in Beginners #【💬】ᴅɪꜱᴄᴜꜱꜱɪᴏɴ-ʙ
Avatar
Avatar
kevinvanb
i get 141 errors when trying to build with debug...
why are you building in debug
Avatar
Avatar
substitute
@kevinvanb I would say build your plugin in DEBUG....but the API doesn't like loading things built in Debug.
@WETBATMAN because he asked?
Avatar
Avatar
kevinvanb
i get 141 errors when trying to build with debug...
do you have API headers included in debug?
Avatar
yes
Avatar
Avatar
kevinvanb
i get 141 errors when trying to build with debug...
substitute 7/5/2021 9:54 PM
It's likely you aren't linking to the api in Debug
9:55 PM
but like I said, the api doesn't like to load plugins built in debug
Avatar
Avatar
substitute
It's likely you aren't linking to the api in Debug
than what should i do?
Avatar
@WETBATMAN @jraServerAPI @substitute @Pelayori it looks like i fixed it xD after 2 days of trying 😂 i removed the permissions from my plugin and now when i try the getsteamidfromcontroller it does return my steam id thanks for all the help xD (edited)
Avatar
Avatar
kevinvanb
@WETBATMAN @jraServerAPI @substitute @Pelayori it looks like i fixed it xD after 2 days of trying 😂 i removed the permissions from my plugin and now when i try the getsteamidfromcontroller it does return my steam id thanks for all the help xD (edited)
So the issue is relating to permissions?
10:40 PM
what do you mean by removed permissions?
10:40 PM
From your code or your server config?, etc?
Avatar
It was included in my code for some reason i cant remember. It was an (old) version from permissions (version1.5). @substitute (edited)
Avatar
🐨Dream Doctor🦘 7/6/2021 12:32 AM
So what is this "voidwyrn" API thing? (edited)
Avatar
An API which aims to replicate some of the Ark APi stuff by sending thousands of http requests a second
Avatar
guy said he was gonna consider adding dll injection
12:33 AM
and then said he didn’t know what a .pdb was
12:33 AM
and had to learn it
Avatar
He's added "cogs" to the C# core app
Avatar
it’s basically like Walmart ArkApi
😂 2
1:31 AM
Yeah lol
1:31 AM
That about sums it up
1:34 AM
¯\_(ツ)_/¯
2:25 AM
smugery
Avatar
🐨Dream Doctor🦘 7/6/2021 2:59 AM
I think that was because he was hoping to monetise it, but following the big announcements today about Steam cracking down on workshop monetising, he's having second thoughts.
3:00 AM
I mean I like some of the concepts he has at a high level, but I have no idea how he's planning to implement them. I'm not sure he does either.
3:06 AM
Oh wait, I just found his API github page. He's actually doing something similar to what I've been occasionally working on for a long while, which is something like a websockets replacement for RCON, which is just about the worst thing in the world. I think he'll come across similar issues to me though, which is how to make it performant. It's no use just multi-threading the websockets processes when they need to interact with the main thread for every request. So you need to find a way of efficiently getting data out of the main thread and caching it.
Avatar
Avatar
🐨Dream Doctor🦘
Oh wait, I just found his API github page. He's actually doing something similar to what I've been occasionally working on for a long while, which is something like a websockets replacement for RCON, which is just about the worst thing in the world. I think he'll come across similar issues to me though, which is how to make it performant. It's no use just multi-threading the websockets processes when they need to interact with the main thread for every request. So you need to find a way of efficiently getting data out of the main thread and caching it.
substitute 7/6/2021 3:15 AM
I don’t think he even knows what a thread is
Avatar
Avatar
substitute
I don’t think he even knows what a thread is
🐨Dream Doctor🦘 7/6/2021 3:19 AM
Yeah, I'm getting the feeling he might be a web developer having a go at something new.
Avatar
Hello, is it possible to change PerLevelStatsMultiplier_Player per player? And which function can i use for it?
Avatar
Not per player directly, unless you hook spawn character and update the character status component each time they spawn
3:32 PM
@Lacoi
Avatar
on spawn (maybe login?) should be ok. But i didn't find the function to update the multiplier
Avatar
Avatar
Lacoi
on spawn (maybe login?) should be ok. But i didn't find the function to update the multiplier
I believe it's something like GetCharacterStatusComponent-> Set Max status values or similar
3:37 PM
But needs to be done when player spawns, maybe could be done in AShooterCharacter::BeginPlay
3:37 PM
Begin play fires when spawned, but also on server startup when loading the character if it's somewhere in the world
Avatar
Where is the chat hook in hook manager?
Avatar
Avatar
돌드민
Where is the chat hook in hook manager?
AShooterPlayerController::ServerSendChatMessage_Implementation
Avatar
Avatar
Pelayori
AShooterPlayerController::ServerSendChatMessage_Implementation
Thank you!!!
Avatar
🐨Dream Doctor🦘 7/10/2021 3:46 AM
Anyone know the hook for world saves?
3:52 AM
Nevermind. Looks like it's AShooterGameMode_SaveWorld.
Avatar
in Hook_APrimalDinoCharacter_TakeDamage: is it possible to check if it is a specific gen2 mission and a mission weapon or maybe taking on non mission weapon is not allowed?
Avatar
Not sure
9:12 PM
Maybe weapons have an is mission bool like dinos do
Avatar
Any idiomatic way of passing some data to Create*Request in the requests API that is also passed to the callback? So I can e.g. inform the player who started it about the outcome of the request. (edited)
Avatar
You can bind with 2 placeholders and your data
Avatar
That could work. Will give it a shot, thanks.
Avatar
API::Requests::Get().CreateGetRequest(url, std::bind(&function, std::placeholders::_1, std::placeholders::_2, yourVar1, yourVar2)); (edited)
❤️ 1
12:15 PM
Where the first 2 args are bool and std string
Avatar
Worked like a charm.
👍 1
Avatar
Another thing, so I am doing a config.json thing, and I basically did the json.hpp (with some CMake FetchContent). Is there a better way? Or should I just stick to this?
1:15 PM
Feels a little off to include json.hpp in so many plugins. xP
Avatar
Tried running this: ARK_API bool CreatePostRequest(const std::string& url, const std::function<void(bool, std::string)>& callback, const std::string& post_data, const std::string& content_type, std::vector<std::string> headers = {}); It took ages to actually get this error out: 2814:6a8c @ 44492234 - LdrpNameToOrdinal - WARNING: Procedure "?CreatePostRequest@Requests@API@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$function@$$A6AX_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@4@00V?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@4@@Z" could not be located in DLL at base 0x00007FF8AF900000. Can any of you decipher this? It seems like the overload is just broken.
Avatar
Did you download latest source from the repo?
10:49 PM
@Nick 🍌
Avatar
Yea, should I perhaps go a little less bleeding edge? xP
Avatar
Then it's likely it. We added some new exported functions, and the current dll is one version below
10:50 PM
New one will be released tomorrow
Avatar
Ah, neat.
Avatar
Well, at least I guess that's what is ahppening
Avatar
Would be cool with some Git tags.
10:50 PM
Since pulling straight from master feels a little 🤠
Avatar
Avatar
Nick 🍌
Tried running this: ARK_API bool CreatePostRequest(const std::string& url, const std::function<void(bool, std::string)>& callback, const std::string& post_data, const std::string& content_type, std::vector<std::string> headers = {}); It took ages to actually get this error out: 2814:6a8c @ 44492234 - LdrpNameToOrdinal - WARNING: Procedure "?CreatePostRequest@Requests@API@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$function@$$A6AX_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@4@00V?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@4@@Z" could not be located in DLL at base 0x00007FF8AF900000. Can any of you decipher this? It seems like the overload is just broken.
Don’t you just love name mangling
Lul 1
Avatar
What are mentors here?
Avatar
People who have worked extensively with the API, as well as reputable members
Avatar
Avatar
Pelayori
People who have worked extensively with the API, as well as reputable members
(though I don't think the role is granted anymore ;))
Avatar
Yeah, seems like 😛
Avatar
@Pelayori got this today
9:51 PM
9:51 PM
hmmGe
Avatar
what lol
10:02 PM
thisisfine
Avatar
@PelayoriI blame the templates
10:05 PM
changing the base type to std::any and doing hookableFunction<RT, VA, A...>& test() { return std::any_cast<hookableFunction<RT, VA, A...>&>(hookable); }
10:05 PM
fixed my issue
Avatar
ahh, that error blew up my mind kekw
Avatar
I've been upgrading my hookable function header to C++20...the new base hookable Function is VERY nice
10:06 PM
Avatar
Didn't dabble with ++20 yet myself
Avatar
but now I am writing a container for the hookable function + a std::function
10:06 PM
so you can make a list of hook
10:06 PM
and handle whatever hooking and unhooking you do and other stuff
10:07 PM
ex. for(hook : hooks) unhook(hook) where unhook might be like DetourDetach(hook.hookable, hook.callback);
Avatar
Pretty easy it seems
Avatar
Avatar
Pelayori
Pretty easy it seems
yea, because I did all the hard work of writing the smart containers
10:08 PM
joyLMFAO
Avatar
I mean yeah lol 😂
10:09 PM
Pretty easy to use at the end 😛
Avatar
without the class I'm writing now it's already REALLY easy to work with
10:09 PM
I'm debating if this class is even required
10:09 PM
since you could do a tuple already
10:09 PM
this is how I declare the process event hook for a UE4 game
10:09 PM
static hookable<void, sdk::UObject*, sdk::UFunction*, void*> process_event_;
Avatar
ahh so the object where the func is, the func ptr and params?
Avatar
then set the address from the virtual function table process_event_.reset(sdk::UObject::StaticClass(), 66); and attach the hook DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(process_event_.get(), process_event); DetourTransactionCommit();
10:10 PM
and the entire callback (which calls the original) auto spongehax::process_event(sdk::UObject* who, sdk::UFunction* what, void* how) -> void { while(!tick_queue.empty()) { tick_queue.front()(); tick_queue.pop(); } const auto func = what->GetName(); auto handled = false; for (auto [_, callback] : process_event_handlers[func]) { handled = callback(who, how); if (handled) break; } if (!handled) process_event_.original(who, what, how); }
Avatar
Avatar
Pelayori
ahh so the object where the func is, the func ptr and params?
you just put the return type and the args
Avatar
Hah I remember that spongehax 😂
Avatar
by doing this you also get compile time checking
10:11 PM
assuming you put the right args on the declaration
Avatar
What I'm thinkin about it's that it'd be a great thing if we could get a way to dump all bp only functions in the api
Avatar
that's what the UFunction FindFunction is for
Avatar
it finds the function X on type T
Avatar
I mean a list of all functions, kinda like we have with c++ structs
Avatar
if you don't have an instance of type T you can just use the ::StaticClass
Avatar
Avatar
Pelayori
I mean a list of all functions, kinda like we have with c++ structs
You don't want to go down this path
10:13 PM
I dumped everything using GNames a few DLCs ago and it can't be compiled
10:13 PM
the resultant library file is over 4GB
Avatar
Hmm... yeah could be
10:13 PM
But it could be used as reference for what can be used or done
Avatar
it took like 20 hours to compile the individual obj files
10:13 PM
but none could be linked into a single DLL due to file size limits
Avatar
So you can just look like you do in ida and then find function
Avatar
Avatar
Pelayori
So you can just look like you do in ida and then find function
Yah, you can do this
10:13 PM
with the devkit
10:13 PM
the ADK has all the BP functions 🙂
Avatar
Yeah but devkit is a fucking pain
10:13 PM
😂
Avatar
it also isn't always updated
Avatar
Also yeah
Avatar
dumping everything isn't hard...making it somewhat usable is
Avatar
If you tried dumping all into the dll and didn't play well then at least a wiki or reference for BP funcs would be a great resource
10:15 PM
So then you can look for what you want or need, then find func and process event
Avatar
Avatar
Pelayori
If you tried dumping all into the dll and didn't play well then at least a wiki or reference for BP funcs would be a great resource
This is the same problem the mod discord has
10:15 PM
no one wants to document everything
10:15 PM
joyLMFAO
Avatar
Lol true
10:15 PM
I mean, I hate to open the devkit to look for functions 😦
Avatar
🐨Dream Doctor🦘 7/13/2021 3:06 AM
Hi all, quick question. Am I remembering correctly that someone wrote a diagnostic plugin that gave more details about crashes?
Avatar
Avatar
substitute
This is the same problem the mod discord has
🐨Dream Doctor🦘 7/13/2021 3:13 AM
I'd love to start a proper wiki for the API, but I think the issue would be motivating people to contribute to it.
Avatar
Avatar
substitute
no one wants to document everything
jraServerAPI 7/13/2021 5:05 AM
This discord IS the wiki! 😂 the searching sucks, it doesn't find partial words all the time, but this my go to when I need to look for some answers..we should at least document as much as we can in here. 🙂
Avatar
🐨Dream Doctor🦘 7/13/2021 8:33 AM
Has anyone been able to utilise APrimalDinoCharacter::DoMate? I've hooked it as per usual but it won't run.
Avatar
Yeah, I was hooking that for restrict mating from different tribes for pve, what do you want?
9:17 AM
I'll check later what exactly domate I've hooked, probably there is implementation, that is correct to hook (edited)
Avatar
Avatar
cyx Frag
I'll check later what exactly domate I've hooked, probably there is implementation, that is correct to hook (edited)
🐨Dream Doctor🦘 7/13/2021 9:21 AM
I've just used the implementation from the api hook creator, same as I always do. If there's anything extra required I'd very much appreciate that info.
Avatar
This hook happens only when 2 Dinos just mated
9:22 AM
When fem will lay egg
Avatar
Avatar
cyx Frag
When fem will lay egg
🐨Dream Doctor🦘 7/13/2021 9:24 AM
Ah, that explains it then. I thought it ran before they mated. Do you know of any hooks that run before mating?
Avatar
I don't but I was looking for it (edited)
9:29 AM
Why do you need exactly process? You can hook result and do whatever you want with 2 Dinos
Avatar
Avatar
cyx Frag
Why do you need exactly process? You can hook result and do whatever you want with 2 Dinos
🐨Dream Doctor🦘 7/13/2021 9:34 AM
I want to prevent mating in some circumstances. And using DoMate which apparently runs after the mating cycle, then they would keep showing the mating hud constantly without actually mating. Not ideal at all.
Avatar
Understood
Avatar
Avatar
🐨Dream Doctor🦘
I want to prevent mating in some circumstances. And using DoMate which apparently runs after the mating cycle, then they would keep showing the mating hud constantly without actually mating. Not ideal at all.
For my anti pve grief I hooked UpdateMating and reset mating progress then multicast property if not suitable (edited)
Avatar
Avatar
Pelayori
For my anti pve grief I hooked UpdateMating and reset mating progress then multicast property if not suitable (edited)
🐨Dream Doctor🦘 7/13/2021 11:28 AM
Thank you sir. I think I'll just recommend they use your plugin instead, as it looks great.
👍 1
11:29 AM
Is there any info anywhere about the new API release? There's a bunch of stuff mentioned that affects devs. Where can I find further info?
Avatar
Avatar
🐨Dream Doctor🦘
Is there any info anywhere about the new API release? There's a bunch of stuff mentioned that affects devs. Where can I find further info?
all changes are committed to the official API repo from michidu
Avatar
Avatar
WETBATMAN
all changes are committed to the official API repo from michidu
🐨Dream Doctor🦘 7/13/2021 12:01 PM
Yeah, I'm aware 🙂 I was hoping for some kind of patch notes or updated info somewhere, or do we need to trawl through commits to find what has changed?
Avatar
Avatar
🐨Dream Doctor🦘
Yeah, I'm aware 🙂 I was hoping for some kind of patch notes or updated info somewhere, or do we need to trawl through commits to find what has changed?
changes so far are: new http/https requests added by me (i changed libcurl to libpoco and added OpenSSL for ssl) Lethal added timer changes so when a timer crashes in another thread it won't crash the entire server, it will instead display the id of the callback that caused the crash pelayori added new API util functions
Avatar
Avatar
WETBATMAN
changes so far are: new http/https requests added by me (i changed libcurl to libpoco and added OpenSSL for ssl) Lethal added timer changes so when a timer crashes in another thread it won't crash the entire server, it will instead display the id of the callback that caused the crash pelayori added new API util functions
🐨Dream Doctor🦘 7/13/2021 12:11 PM
Any changes to how the http/https functionality is used? And what are the new API functions?
Avatar
Avatar
🐨Dream Doctor🦘
Any changes to how the http/https functionality is used? And what are the new API functions?
I can document the new API utils functions
12:12 PM
The Http request format is still the same as you were using before the update
Avatar
@🐨Dream Doctor🦘 I wrote some documentation on the latest api functions added/changed https://ark-server-api.com/index.php?threads/latest-api-utils-functions-added-documentation-for-developers.2492/
Avatar
Avatar
Pelayori
@🐨Dream Doctor🦘 I wrote some documentation on the latest api functions added/changed https://ark-server-api.com/index.php?threads/latest-api-utils-functions-added-documentation-for-developers.2492/
🐨Dream Doctor🦘 7/13/2021 11:10 PM
That's awesome. Thank you so much. Some really important additions there that were long overdue. Thank you again.
Avatar
Avatar
🐨Dream Doctor🦘
That's awesome. Thank you so much. Some really important additions there that were long overdue. Thank you again.
No problem 🙂
Avatar
Is there an idiomatic way to store small pieces of data to a player (that does not need to persist across connections)? If possible, I'd rather avoid having to include SQLite or smth like that. I am considering doing a HashMap of SteamID to the data I wanna store, and then add/remove from it as players connect/disconnect. Is there any such thing as player IDs going from 0 to maxplayers or smth like that? So that I can initialize a fixed size array instead of something dynamic and hash-based. Any thoughts on this? (edited)
Avatar
Do you think it would be possible to make a plugin to use multi-thread on the saveworld action ?
Avatar
Avatar
Nick 🍌
Is there an idiomatic way to store small pieces of data to a player (that does not need to persist across connections)? If possible, I'd rather avoid having to include SQLite or smth like that. I am considering doing a HashMap of SteamID to the data I wanna store, and then add/remove from it as players connect/disconnect. Is there any such thing as player IDs going from 0 to maxplayers or smth like that? So that I can initialize a fixed size array instead of something dynamic and hash-based. Any thoughts on this? (edited)
Atomicskullz 7/15/2021 12:25 PM
Just use TMap or TArray.
12:26 PM
But you’ll need to provide a hashing function for FString keys (edited)
Avatar
Yeah, tmap would be my go for that
Avatar
Avatar
Shadow
Do you think it would be possible to make a plugin to use multi-thread on the saveworld action ?
There is one, but as it says it's unstable
Avatar
Not to worried about containers or anything specific but rather the overall method.
12:29 PM
At least yet. I take this as it would probably be alright to use a map of some kind, SteamIDs, and hook login/logout to set it up?
Avatar
Avatar
Pelayori
There is one, but as it says it's unstable
Anyone can try to upgrade it rework it? Should be very useful (edited)
Avatar
Avatar
Nick 🍌
At least yet. I take this as it would probably be alright to use a map of some kind, SteamIDs, and hook login/logout to set it up?
Yeah that'd be a good method
12:30 PM
Latest API version uses that for player controllers from steamid
Avatar
Atomicskullz 7/15/2021 12:30 PM
You still need hashing function
12:31 PM
And Crc2 header (edited)
Avatar
Any particular reason to not just go with an STL container over the T* ones? (edited)
Avatar
API uses stl map
Avatar
I assume the T-ones have more overhead due to how the API works.
Avatar
Atomicskullz 7/15/2021 12:32 PM
No, the types are included with the API
Avatar
Those are native ue4 types, and often used when working with game functions, like TArray is widely used because of it
Avatar
Atomicskullz 7/15/2021 12:32 PM
So there’s no sig scanning involved with them
Avatar
Imma try my luck with some good ol' STL containers.
Avatar
Atomicskullz 7/15/2021 12:33 PM
Eh UE types are more optimal but ok
Avatar
I would really like a source on that, haha. (edited)
Avatar
Avatar
Nick 🍌
Imma try my luck with some good ol' STL containers.
i use unordered map for tracking player info in pretty much every plugin
12:36 PM
that is when i have a potential need to look up via steamID
Avatar
Yea, that's what I plan on as well.
12:37 PM
If you only have to look up based on the controller, would you do it differently?
Avatar
Avatar
Nick 🍌
If you only have to look up based on the controller, would you do it differently?
the controller pointer can change on runtime
12:37 PM
unless you account for that it's not a good solution
Avatar
Oh, I just meant using something from the controller, not the controller itself as key. 😛
Avatar
if i have values that don't really require lookup based on key then i just use a TArray
12:38 PM
like if i have an array i just need to iterate every tick/ X amount of sec etc....
Avatar
I'd love to be able to put it all into a fixed size array, but I guess UE is too "dynamic" for that, haha.
12:39 PM
I come from Source Engine with very fixed player IDs from 1 to maxplayers.
12:39 PM
Makes it very simple. :3
Avatar
Atomicskullz 7/15/2021 12:39 PM
Source engine is ancient and old
Avatar
Indeed.
Avatar
Atomicskullz 7/15/2021 12:39 PM
So you cant really compare it to UE
12:40 PM
Source engine is more C-based actually
Avatar
I noticed some kind of player ID though in ARK. But I couldn't really figure out what it actually meant/can be used for.
Avatar
Avatar
Nick 🍌
I noticed some kind of player ID though in ARK. But I couldn't really figure out what it actually meant/can be used for.
it's basically character ID
12:41 PM
it's also referred to as character data ID because it contains all info about a character
Avatar
Ah, I see.
Avatar
🐨Dream Doctor🦘 7/16/2021 4:59 AM
Anyone know the functions relating to cloning?
Avatar
Avatar
🐨Dream Doctor🦘
Anyone know the functions relating to cloning?
🐨Dream Doctor🦘 7/16/2021 6:14 AM
Or are they all in BPs?
Avatar
Avatar
🐨Dream Doctor🦘
Or are they all in BPs?
All in bp
12:51 PM
I have an example of getting vanilla cloning call one sec
12:53 PM
DECLARE_HOOK(AActor_BPServerHandleNetExecCommand, bool, AActor*, APlayerController*, FName, FBPNetExecParams*); bool Hook_AActor_BPServerHandleNetExecCommand(AActor* _this, APlayerController* FromPC, FName CommandName, FBPNetExecParams* ExecParams) { if (config["PreventionOptions"].value("PatchCloningEnemyDinos", true)) { if (FromPC && CommandName.ToString().Find(L"Clone") != -1) { APrimalDinoCharacter* toClone = (APrimalDinoCharacter*)ExecParams->ObjParam1; if (toClone) { const int pcTribe = ((AShooterPlayerController*)FromPC)->TargetingTeamField(); const int dinoTribe = toClone->TargetingTeamField(); if (pcTribe != dinoTribe) return false; } } } return AActor_BPServerHandleNetExecCommand_original(_this, FromPC, CommandName, ExecParams); } ArkApi::GetHooks().SetHook("AActor.BPServerHandleNetExecCommand", &Hook_AActor_BPServerHandleNetExecCommand, &AActor_BPServerHandleNetExecCommand_original); ArkApi::GetHooks().DisableHook("AActor.BPServerHandleNetExecCommand", &Hook_AActor_BPServerHandleNetExecCommand); This is what I use in my anti grief plugin @🐨Dream Doctor🦘
12:53 PM
Where FBPNetExecParams is: struct FBPNetExecParams { int IntParam1; int IntParam2; int IntParam3; float FloatParam1; float FloatParam2; float FloatParam3; UObject* ObjParam1; UObject* ObjParam2; UObject* ObjParam3; FString StringParam1; };
12:54 PM
S+ does not use this tho, it's trickier
Avatar
Avatar
Pelayori
DECLARE_HOOK(AActor_BPServerHandleNetExecCommand, bool, AActor*, APlayerController*, FName, FBPNetExecParams*); bool Hook_AActor_BPServerHandleNetExecCommand(AActor* _this, APlayerController* FromPC, FName CommandName, FBPNetExecParams* ExecParams) { if (config["PreventionOptions"].value("PatchCloningEnemyDinos", true)) { if (FromPC && CommandName.ToString().Find(L"Clone") != -1) { APrimalDinoCharacter* toClone = (APrimalDinoCharacter*)ExecParams->ObjParam1; if (toClone) { const int pcTribe = ((AShooterPlayerController*)FromPC)->TargetingTeamField(); const int dinoTribe = toClone->TargetingTeamField(); if (pcTribe != dinoTribe) return false; } } } return AActor_BPServerHandleNetExecCommand_original(_this, FromPC, CommandName, ExecParams); } ArkApi::GetHooks().SetHook("AActor.BPServerHandleNetExecCommand", &Hook_AActor_BPServerHandleNetExecCommand, &AActor_BPServerHandleNetExecCommand_original); ArkApi::GetHooks().DisableHook("AActor.BPServerHandleNetExecCommand", &Hook_AActor_BPServerHandleNetExecCommand); This is what I use in my anti grief plugin @🐨Dream Doctor🦘
🐨Dream Doctor🦘 7/16/2021 12:55 PM
That's amazing! Thank you!
🤟 1
Avatar
_this would be the actor where the call is received, in case of cloning, the cloning chamber (edited)
Avatar
Avatar
Pelayori
_this would be the actor where the call is received, in case of cloning, the cloning chamber (edited)
🐨Dream Doctor🦘 7/16/2021 12:57 PM
How did you work out what the netexec params were?
Avatar
Devkit 😛
Avatar
🐨Dream Doctor🦘 7/16/2021 12:57 PM
Ah, right. 🙂
Avatar
You can open cloning chamber graph, and you can see what each thing is in the bp handle net exec
12:58 PM
as well as it checks for command name Clone
12:59 PM
S+ is more complicated since it calls a net exec to open a ui, but it's the same call when opening different types of UIs of the mod, differentiated by an int para (0/1) and then makes a call from the ui
Avatar
🐨Dream Doctor🦘 7/16/2021 1:00 PM
Thanks, I'll take a look in the dev kit later. 🙂
Avatar
I made a dirty way of preventing cloning of specific dinos in s+ chamber, on try multi use on structure, if is cloning chamber to an octree, check nearby dinos. If dino not met criteria to allow clone -> setsleeping(true) -> make original multiuse call and store in const bool result -> setsleeping(false) -> return var
Avatar
🐨Dream Doctor🦘 7/16/2021 1:04 PM
Right, because it won't clone sleeping dinos! lol
Avatar
Yeah, had to dig a lot to find that one
1:05 PM
loading s+ source is such a pain
Avatar
🐨Dream Doctor🦘 7/16/2021 1:06 PM
Tell me about it. I've done a lot of work with it. I've made two different clones of S+ for a cluster, and it's been such a huge headache. The newer releases of S+ are better in terms of not crashing the dev kit, but they're incredibly complicated.
Avatar
I'll decompile latest binaries, not sure if timers are borked or what. But lots of plugins having issues (edited)
Avatar
Did anyone get same error after updating to the latest api version? 07/16/21 15:37 [API][error] Net Exception: Cannot assign requested address: 192.168.88.254:0
Avatar
Avatar
Nice
Did anyone get same error after updating to the latest api version? 07/16/21 15:37 [API][error] Net Exception: Cannot assign requested address: 192.168.88.254:0
When are you seeing this?
Avatar
spamming in server console
Avatar
The first time after what log line? (edited)
Avatar
one time after loading all plugins and then it spams that error after the full launch
Avatar
it usually happens when url of request is invalid
Avatar
Spicy port
Avatar
that's strange, all my written plugins which uses requests worked normally before the update, also i updated api sources from github and there are no errors in my plugins
Avatar
I just turned on my server and no request issues with several paid plugins or requests (edited)
Avatar
Maybe the old requests back-end just ignored the weird port?
Avatar
Requests goes to domain, not via ip:port
3:17 PM
I didn't specify it
Avatar
it doesn't matter to make a request it needs to convert domain to ip and port
3:18 PM
that's how requests work
Avatar
ye, but idk why it tries my local ip and 0 port, domain where the request goes is on another ip
Avatar
dns lookup could be failing
Avatar
i will try to bind it in hosts
Avatar
Api repo has been updated with most up to date enums thanks to Michidu for the updated enums :p
9:37 PM
@Atomicskullz Also following on TMap key hash func, I have added FCrc::MemCrc32 and the FString hash function and I was able to use FString as a TMap key
Avatar
Atomicskullz 7/16/2021 9:37 PM
nice
Avatar
Yeah, now you just include Crc.h into the data type header, and add the hash function
9:38 PM
This is for FString FORCEINLINE uint32 GetTypeHash(const FString& Thing) { uint32 Hash = FCrc::MemCrc32(&Thing, sizeof(FString)); return Hash; }
Avatar
Atomicskullz 7/16/2021 10:38 PM
Yeah i already did before :P
10:38 PM
But thanks anyway
Avatar
I figured I'd add it to the api 🙂 (edited)
Avatar
Deleted User 7/17/2021 2:49 PM
Hey guys, how long would you guys think it’d take a beginner to be able to learn C++ to where you could make your own simple plug-ins
Avatar
Got experience with other programming languages, @Deleted User ?
Avatar
Deleted User 7/17/2021 2:56 PM
Yessir, I’m an intermediate Python developer.
2:57 PM
Though I don’t think I’m the best with objects :|
Avatar
Ah, once you get a dev environment running for the API (I am not the right guy to guide you through that), I think you can catch on pretty quickly.
2:57 PM
You can try looking through some of the code here: https://github.com/Michidu/Ark-Server-Plugins
3:00 PM
To give a quick tour: you can probably recognize methods. DllMain is where the fun starts, but often you just wanna look at Load and Unload (pretty solid base line for any plugin). You can see it adds a chat command for /cheat which has the callback OnChatMessage.
3:00 PM
All the types with a T in front are UE4 types, but they act pretty much as one would expect.
3:02 PM
But yea, C++ can be a straight up asshole, but you can ask for help here if you run into issues. Perhaps read a basic intro to C++.
Avatar
Deleted User 7/17/2021 3:06 PM
Oh, thank you! I think I’ll need to start off learning the basics and whatnot, and then come back in a month or so after I solidify my understanding
Avatar
Could learn through ARK plugins 🧠 In any case, good luck with it. 😄 And feel free to reach out if you encounter any issues.
Avatar
Deleted User 7/17/2021 3:36 PM
❤️
Avatar
🐨Dream Doctor🦘 7/18/2021 9:44 AM
@Foppa, when you get a moment, would you mind adding a link somewhere prominent for the source code? It doesn't seem to be listed anywhere in this discord, or at least I can't find it. Many thanks 🙂
Avatar
Yeah, you are totally right. Hmm... i'll see what i can do
Avatar
Avatar
Foppa
Yeah, you are totally right. Hmm... i'll see what i can do
🐨Dream Doctor🦘 7/18/2021 12:48 PM
Thank you! Also, another minor thing. Is there a way we could get some branches happening in the repo? I know we make changes to master here and there. It would be great to lock down a release branch so that people can know the code they're building against always matches the release version exactly.
Avatar
Tags.
12:53 PM
Please do tags.
Avatar
Avatar
🐨Dream Doctor🦘
Thank you! Also, another minor thing. Is there a way we could get some branches happening in the repo? I know we make changes to master here and there. It would be great to lock down a release branch so that people can know the code they're building against always matches the release version exactly.
Last change was just updated enums, you can safely (in fact should) build against them. But yeah maybe a develop branch could fit. Only on the event of changing exported functions and new lib would be the the unsafe build case
Avatar
Avatar
Pelayori
Last change was just updated enums, you can safely (in fact should) build against them. But yeah maybe a develop branch could fit. Only on the event of changing exported functions and new lib would be the the unsafe build case
🐨Dream Doctor🦘 7/18/2021 1:12 PM
I don't think it's just about what's probably safe or not, as much as what may occur that nobody expects, and having certainty that what you're building against is a 100% match with what you're running with. 🙂 (edited)
Avatar
The good part of this api is most of the magic happens plugin side, so updating headers won't need a new version.dll build
Avatar
hello everyone, I have a problem that I cannot solve and that I absolutely do not understand. so my problem is as follows: I run 12 maps on my server and 2 of my servers cannot start, it blocks when loading the shop because I think they cannot connect to the mySQL database, however my 12 servers have the same configuration for the shop, if I put the shop with this parameter on both servers then it works but is no longer linked to mySQL as a result "UseMysql": false, someone would have already had the same problem or have a solution ? thank you
Avatar
@Nyckeelgoing to need more info....it could be a connection problem or it could be a library problem (missing dependency)
Avatar
and what kind of information should I share to help solve ?
Avatar
You may be hitting the max default connection limit in MySQL with 12 servers.
Avatar
if i have less than 12 servers running and i try to start one of the failed servers then it should theoretically work ? because for the moment I have all my servers off and I am only trying to start one of the servers in question and it still hangs when the shop is connected
Avatar
is it possible to increase the max limit of connection to mysql ?
Avatar
I changed the max connection limit, but it doesn't change anything :/
Avatar
what I don't understand is that I only have Arkshop which is causing the problem, if I remove Arkshop, all the other plugins that use MySQL manage to connect and therefore the server starts up without any problems at this time. so why does Arkshop manage to load on 2 of my servers when the configuration is exactly the same ?
Avatar
🅸🅽🅳🅸🅾 7/19/2021 1:12 AM
Is foppa's ark store working well? wanted to test to see if this is not crashing with the update
Avatar
It's stable.
1:51 AM
I haven't had any issues with it
Avatar
There is a way to consume api with PHP ?
waitwhat 1
Avatar
No? lol
Avatar
Only to check, cuz i want to use some information about players inside an site, but don't find any way, except open save files or mysql plugins data (edited)
Avatar
Atomicskullz 7/19/2021 4:31 PM
Well yeah, you can , but you’ll have to code it yourself
4:32 PM
Basically just storing information in a database and querying it (edited)
Avatar
Avatar
Atomicskullz
Well yeah, you can , but you’ll have to code it yourself
hummmm, thanks, but any tips about how open properly save files ?
Avatar
I've found an library with many bugs in GitHub with JavaScript, I'm solving bugs and using it to store in dB, thanks !
Avatar
Has anyone tried to create a AStaticMeshActor? I do not understand what the problem is, actor spawns, but does not appear. struct AStaticMeshActor : AActor { UStaticMeshComponent* StaticMeshComponent() { return *GetNativePointerField<UStaticMeshComponent**>(this, "AStaticMeshActor.StaticMeshComponent"); } static UClass* StaticClass() { return NativeCall<UClass*>(nullptr, "AStaticMeshActor.StaticClass"); } }; AActor* SpawnTest(FVector* spawn_location) { DEBUG_WARN("Spawning actor..."); auto* uworld = ArkApi::GetApiUtils().GetWorld(); if (!uworld) { return nullptr; } FString sphere_path = "StaticMesh'/Game/PrimalEarth/CoreBlueprints/Sphere_Closed_Inverted_Collidable.Sphere_Closed_Inverted_Collidable'"; auto* sphere_object = UVictoryCore::BPLoadObject(&sphere_path); if (!sphere_object) { DEBUG_ERROR("!sphere_object"); return nullptr; } DEBUG_INFO("sphere_object loaded! class: {}", Utils::GetClassFullName(sphere_object->ClassField()).ToString()); FRotator rotation(0); FActorSpawnParameters new_actor_spawn_params; new_actor_spawn_params.bNoFail = true; new_actor_spawn_params.bDeferBeginPlay = true; auto* actor = static_cast<AStaticMeshActor*>( uworld->SpawnActor(AStaticMeshActor::StaticClass(), spawn_location, &rotation, &new_actor_spawn_params)); if (actor) { DEBUG_INFO("actor was spawned!"); auto static_mesh_component = actor->StaticMeshComponent(); static_mesh_component->SetStaticMesh(static_cast<UStaticMesh*>(sphere_object)); static_mesh_component->SetWorldScale3D(FVector(100.f)); actor->BeginPlay(); actor->ForceReplicateNow(false, false); } else { DEBUG_ERROR("!actor"); } DEBUG_WARN("...end"); return actor; }
Avatar
Deleted User 7/20/2021 9:58 PM
How would you guys query an ARK server to see how many players are on it?
Avatar
Avatar
overmind
Has anyone tried to create a AStaticMeshActor? I do not understand what the problem is, actor spawns, but does not appear. struct AStaticMeshActor : AActor { UStaticMeshComponent* StaticMeshComponent() { return *GetNativePointerField<UStaticMeshComponent**>(this, "AStaticMeshActor.StaticMeshComponent"); } static UClass* StaticClass() { return NativeCall<UClass*>(nullptr, "AStaticMeshActor.StaticClass"); } }; AActor* SpawnTest(FVector* spawn_location) { DEBUG_WARN("Spawning actor..."); auto* uworld = ArkApi::GetApiUtils().GetWorld(); if (!uworld) { return nullptr; } FString sphere_path = "StaticMesh'/Game/PrimalEarth/CoreBlueprints/Sphere_Closed_Inverted_Collidable.Sphere_Closed_Inverted_Collidable'"; auto* sphere_object = UVictoryCore::BPLoadObject(&sphere_path); if (!sphere_object) { DEBUG_ERROR("!sphere_object"); return nullptr; } DEBUG_INFO("sphere_object loaded! class: {}", Utils::GetClassFullName(sphere_object->ClassField()).ToString()); FRotator rotation(0); FActorSpawnParameters new_actor_spawn_params; new_actor_spawn_params.bNoFail = true; new_actor_spawn_params.bDeferBeginPlay = true; auto* actor = static_cast<AStaticMeshActor*>( uworld->SpawnActor(AStaticMeshActor::StaticClass(), spawn_location, &rotation, &new_actor_spawn_params)); if (actor) { DEBUG_INFO("actor was spawned!"); auto static_mesh_component = actor->StaticMeshComponent(); static_mesh_component->SetStaticMesh(static_cast<UStaticMesh*>(sphere_object)); static_mesh_component->SetWorldScale3D(FVector(100.f)); actor->BeginPlay(); actor->ForceReplicateNow(false, false); } else { DEBUG_ERROR("!actor"); } DEBUG_WARN("...end"); return actor; }
The actor spawns without a mesh, you change static mesh on the server but client is not aware of none static mesh or world scale
Avatar
Avatar
Deleted User
How would you guys query an ARK server to see how many players are on it?
You can query steam for the server info
10:14 PM
Most of the times is reliable, but others it will show wrong count for whatever reason
Avatar
Deleted User 7/20/2021 10:15 PM
Oh, how can you query steam for that?
10:15 PM
I've looked around a wee bit but couldn't find anything
Avatar
Avatar
Deleted User
I've looked around a wee bit but couldn't find anything
Avatar
Deleted User 7/20/2021 10:17 PM
Thank you!!
Avatar
Avatar
Deleted User
Thank you!!
There's also some open source projects like bots to show player count around already, could use them or just look at how they query the data 🙂
Avatar
Anyone who had succes setting up the Cross Server Chat 1.7 plugin? I've set it up and it seems like it's working on paper, but nothing seems to have changed
Avatar
Avatar
Pelayori
The actor spawns without a mesh, you change static mesh on the server but client is not aware of none static mesh or world scale
I completely forgot about replication. (edited)
5:28 PM
https://i.ibb.co/4fVfSb2/2.png Thanks for the bright idea, @Pelayori
Avatar
You might be able to spawn static mesh actors with a mesh already attached to them that are in game already
6:25 PM
But uhh, battle Royale interesting heh
Avatar
Just a random name for testing different functions.
Avatar
As far as I know you can't build custom structures and meshes I tried.
Avatar
I am not trying to create my own object, I am loading them from builtin StaticMesh. Currently, replication occurs only once at spawn. Size, rotation and position are not updated. Tried many tricks but can't seem to fix this problem. https://i.ibb.co/7rLkZNS/3.png https://i.ibb.co/p2n5RPD/4.png
Avatar
Overmind, how are you spawning in structures? its something ive been trying for a while
Avatar
@AxenariYou can create structure from blueprint: inline AActor* BPSpawnActor(UWorld* uworld, FString blueprint, FVector* location, FRotator* rotation, bool do_begin_play) { //auto* world = ArkApi::GetApiUtils().GetWorld(); if (!uworld) { return nullptr; } UClass* object_class = UVictoryCore::BPLoadClass(&blueprint); if (!object_class) { return nullptr; } FActorSpawnParameters new_actor_spawn_params; new_actor_spawn_params.bDeferBeginPlay = true; auto* actor = uworld->SpawnActor(object_class, location, rotation, &new_actor_spawn_params); if (actor) { if (do_begin_play) { actor->BeginPlay(); actor->ForceReplicateNow(false, false); } return actor; } return nullptr; } auto* world = ArkApi::GetApiUtils().GetWorld(); auto character = player_controller->GetPlayerCharacter(); auto location = character->RootComponentField()->RelativeLocationField(); FString blueprint = "Blueprint'/Game/PrimalEarth/Structures/StorageBox_Small.StorageBox_Small'"; auto* actor = BPSpawnActor(uworld, blueprint, &location, &rotation, true); https://i.ibb.co/SRmjjJN/6.png Also after structure was spawned you need set it parameters like: auto* primal_structure = static_cast<APrimalStructure*>(actor); primal_structure->HealthField() = primal_structure->MaxHealthField();
Avatar
Nice! Ill try it out when i get the time
10:14 PM
Thanks!
Avatar
Developer's notice for v3.51 API (Releasing today, 19:00 CEST / 13:00 EST) FName constructor now takes const char* instead of the previous const wchar* version, headers are updated so with API v3.51 release any plugin using FNames should be recompiled to comply with the new FName constructor. This is a requirement for all FNames to work properly, due to the changes made to PDB Reader in the API Old FNames won't crash, but they won't get the right string passed on (edited)
Avatar
🐨Dream Doctor🦘 7/25/2021 12:44 AM
Wow, @Pelayori , this is a REALLY big deal. Are you saying that literally every single plugin has to be recompiled and re-released? What about older plugins that may not be supported any more? Was there no way around this?
Avatar
No, I'm not saying all plugins must be recompiled. The PDB structure appeared to had changed and that's we were seeing an incredibly high amount of crashes, and obscure issues we couldn't decipher. As you might have noticed some functions in the game have overloads, the pdb reader before the update would choose a random one (but always chose that one), but it now calls the first overload that might, or might not be the same as you were using previously. One of those affected overloads is FName::Init, which, as I said above, takes different parameters. Some plugins don't require any update specially if not using any overloaded function of the game (your own ones are fine, just the ones using Native Calls are the ones affected). There isn't a work around as of now. Michidu is working on supporting overloads, but it isn't an easy task at all, not even sure if it's doable. The thing is PDB Reader now is more reliable and fixed for newest ark updates and we must go with it
Avatar
Avatar
Pelayori
No, I'm not saying all plugins must be recompiled. The PDB structure appeared to had changed and that's we were seeing an incredibly high amount of crashes, and obscure issues we couldn't decipher. As you might have noticed some functions in the game have overloads, the pdb reader before the update would choose a random one (but always chose that one), but it now calls the first overload that might, or might not be the same as you were using previously. One of those affected overloads is FName::Init, which, as I said above, takes different parameters. Some plugins don't require any update specially if not using any overloaded function of the game (your own ones are fine, just the ones using Native Calls are the ones affected). There isn't a work around as of now. Michidu is working on supporting overloads, but it isn't an easy task at all, not even sure if it's doable. The thing is PDB Reader now is more reliable and fixed for newest ark updates and we must go with it
🐨Dream Doctor🦘 7/25/2021 1:05 AM
Yeah I completely understand that you had no choice but to fix the issue. It's just a very large change that could have all kinds of unintended consequences in older plugins that probably won't be re-released. Thanks for the update and all the information. Much appreciated.
Avatar
The problem is the calls being handled plugin side, there is no other way than recompiling to get the updated and correct headers for correct FName constructor. I haven't found any other affected overloaded functions, but I'd be happy if you let me know if you find any
1:08 AM
I for example tested GetAimedActor, and it worked with the usual overload
1:08 AM
Also, if you find any old plugin open sourced that is broken, forward it to me I'll see what I can do
Avatar
Avatar
Pelayori
No, I'm not saying all plugins must be recompiled. The PDB structure appeared to had changed and that's we were seeing an incredibly high amount of crashes, and obscure issues we couldn't decipher. As you might have noticed some functions in the game have overloads, the pdb reader before the update would choose a random one (but always chose that one), but it now calls the first overload that might, or might not be the same as you were using previously. One of those affected overloads is FName::Init, which, as I said above, takes different parameters. Some plugins don't require any update specially if not using any overloaded function of the game (your own ones are fine, just the ones using Native Calls are the ones affected). There isn't a work around as of now. Michidu is working on supporting overloads, but it isn't an easy task at all, not even sure if it's doable. The thing is PDB Reader now is more reliable and fixed for newest ark updates and we must go with it
If overload reading is now deterministic then one way is to access a specific overload by index
Avatar
I guess that could be a way yeah
1:16 AM
It was deterministic before too tho
1:16 AM
Just it wouldn't reliably get the first overload, but a random one
1:16 AM
(I believe)
Avatar
Avatar
Pelayori
It was deterministic before too tho
It wasn’t if it was a random one 🙂
1:31 AM
Caching the result of a random draw isn’t deterministic
Avatar
Maybe I didn't express myself well. The thing is that it now reliably chooses the first overload, and then some of the overloads used are no longer callable
Avatar
Avatar
Pelayori
Maybe I didn't express myself well. The thing is that it now reliably chooses the first overload, and then some of the overloads used are no longer callable
🐨Dream Doctor🦘 7/25/2021 3:25 AM
Is there no way to have access to all the overloads?
Avatar
Avatar
🐨Dream Doctor🦘
Is there no way to have access to all the overloads?
Not as of now.
9:46 AM
Michidu is working on it
Avatar
🐨Dream Doctor🦘 7/25/2021 3:23 PM
This is (part of) the function I have used for a while in a plugin to access the player's boss levels. It doesn't compile any longer with the updated api. BossLevels GetPlayerBossLevels(UPrimalPlayerData* myData) { TArray<float> AscensionData; BossLevels MyLocalLevels{}; UProperty* prop = myData->FindProperty(FName("AscensionData", EFindName::FNAME_Find, false)); AscensionData = prop->Get<TArray<float>>(myData); return MyLocalLevels; } The line was previously UProperty* prop = myData->FindProperty(FName(L"AscensionData", EFindName::FNAME_Find, false)); which has been modified from wchar to char due to changes, but now when compiling that line throws an error: '<function-style-cast>': cannot convert from 'initializer list' to 'FName' Any advice would be appreciated. (edited)
Avatar
FName constructor has been changed
3:24 PM
FName(const char* InName, EFindName FindType);
Avatar
🐨Dream Doctor🦘 7/25/2021 3:25 PM
Sorry, you did mention that. Stupid question. It's been a long day lol
Avatar
No problem
Avatar
Primeval😈 7/26/2021 2:35 AM
Anyone getting this error with the new ark api update? https://gyazo.com/695295206741561a7095f436a53d2b1d
2:35 AM
^ My ark servers ip is in the ss btw. Not a random perons.
Avatar
Check if in one of your plugins request is written to the link without http:// or https://
Avatar
Primeval😈 7/26/2021 3:53 AM
How would I go about that 🤣
Avatar
🐨Dream Doctor🦘 7/27/2021 5:00 AM
So I was thinking about the issues I've had in the past with some of the newer functions, structs etc that are missing from the API source. The advice to date has been to use IDA to find what I need and add it manually. But the recent update to PDB Reader in the API made we wonder... can't that be used to dump a complete current list of all those things from the PDB without needing IDA which costs several thousand dollars and is very difficult to learn? Maybe we could add PDB reader to the Server Hook Creator. Allow the user to point it to whatever PDB they want to read and have it load all the current info that way? Then it would always be full up to date?
Avatar
Avatar
🐨Dream Doctor🦘
So I was thinking about the issues I've had in the past with some of the newer functions, structs etc that are missing from the API source. The advice to date has been to use IDA to find what I need and add it manually. But the recent update to PDB Reader in the API made we wonder... can't that be used to dump a complete current list of all those things from the PDB without needing IDA which costs several thousand dollars and is very difficult to learn? Maybe we could add PDB reader to the Server Hook Creator. Allow the user to point it to whatever PDB they want to read and have it load all the current info that way? Then it would always be full up to date?
PDB may or may not contain type information (unsure)
5:11 AM
if it does, totally
5:12 AM
if it does not then you need to do disassembly
Avatar
Avatar
🐨Dream Doctor🦘
So I was thinking about the issues I've had in the past with some of the newer functions, structs etc that are missing from the API source. The advice to date has been to use IDA to find what I need and add it manually. But the recent update to PDB Reader in the API made we wonder... can't that be used to dump a complete current list of all those things from the PDB without needing IDA which costs several thousand dollars and is very difficult to learn? Maybe we could add PDB reader to the Server Hook Creator. Allow the user to point it to whatever PDB they want to read and have it load all the current info that way? Then it would always be full up to date?
Pdb Reader I believe only dumps function and class name, not type names
Avatar
@🐨Dream Doctor🦘 You can use ue4 dump https://github.com/2bite/ARK-SDK-Server or generate your own
Avatar
Avatar
overmind
@🐨Dream Doctor🦘 You can use ue4 dump https://github.com/2bite/ARK-SDK-Server or generate your own
🐨Dream Doctor🦘 7/27/2021 12:38 PM
Wow what is that? I've never seen it before?
Avatar
This is a dump of the server's structures and functions.
Avatar
Avatar
overmind
This is a dump of the server's structures and functions.
🐨Dream Doctor🦘 7/27/2021 12:41 PM
Sorry, I mean what is the "ARK-SDK"?
Avatar
These SDKs are mainly used for writing cheats. This one is made specifically for the server to write plugins.
Avatar
Avatar
overmind
These SDKs are mainly used for writing cheats. This one is made specifically for the server to write plugins.
🐨Dream Doctor🦘 7/27/2021 1:05 PM
Ah ok. I assume it won't trigger battlemetrics or VAC?
Avatar
If used on the server side, it is safe. I only need this to look at functions and structures. It doesn't make sense to use the SDK directly as long as we have the API.
Avatar
@🐨Dream Doctor🦘 I'll see if Michidu has time, or can give me the python script to dump from ida. He says it's bad and should be fixed. Anyways i have plans to take time to go trough headers and check dumps and possibly create mission dumps too, among other things
Avatar
Avatar
Pelayori
@🐨Dream Doctor🦘 I'll see if Michidu has time, or can give me the python script to dump from ida. He says it's bad and should be fixed. Anyways i have plans to take time to go trough headers and check dumps and possibly create mission dumps too, among other things
🐨Dream Doctor🦘 7/27/2021 1:25 PM
Thank you! I wish there was a better way to do it though.
Avatar
There's always manual work option, but it'd take a long time to redo all dumps manually
Avatar
Avatar
overmind
These SDKs are mainly used for writing cheats. This one is made specifically for the server to write plugins.
That one is a bit outdated
4:09 PM
Also those sdks use reflection only and no static analysis (edited)
Avatar
They also miss some important members from classes and some classes need to be tweaked.
woo 1
Avatar
Deleted User 7/28/2021 6:59 PM
Can someone help me with this error?
7:00 PM
The Server Api Hooker Creator showme: Error The Request was aborted: Could not create SSL/TLS secure channel
Avatar
Avatar
Deleted User
The Server Api Hooker Creator showme: Error The Request was aborted: Could not create SSL/TLS secure channel
Avatar
🐨Dream Doctor🦘 7/29/2021 1:54 AM
Does anyone have an example of using the new http libraries in the api?
Avatar
What is the method when the nogglin controls you? so you can't put the / kill command if (AttackerShooterController->GetPlayerCharacter()->?) { return; }
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have an example of using the new http libraries in the api?
It was built to replace the old system so the usage is exactly the same.
Avatar
Avatar
Lethal
It was built to replace the old system so the usage is exactly the same.
🐨Dream Doctor🦘 7/29/2021 5:33 AM
Ok, so are there any examples of that anywhere? I never used the old system because it was so broken, I always used my own library, but that won't compile anymore because it conflicts with what's been added to the new api. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Ok, so are there any examples of that anywhere? I never used the old system because it was so broken, I always used my own library, but that won't compile anymore because it conflicts with what's been added to the new api. (edited)
Using it's fairly simple API::Requests::Get().CreateGetReauest(URL, &callbackFunc);
9:04 AM
You could bind the call back with placeholders to pass your variables along with the callback API::Requests::Get().CreateGetRequest(url, std::bind(&function, std::placeholders::_1, std::placeholders::_2, yourVar1, yourVar2));
Avatar
What is the method when the nogglin controls you?
Avatar
Avatar
Fenix
What is the method when the nogglin controls you?
Probably the player controller posseses the dino pawn
Avatar
Avatar
Pelayori
Using it's fairly simple API::Requests::Get().CreateGetReauest(URL, &callbackFunc);
🐨Dream Doctor🦘 7/29/2021 9:45 AM
Thanks for that. I think it would be fantastic to have a full, simple example of that linked somewhere on this Discord. I imagine it's something very many people use.
Avatar
I still have to test post requests for discord webhooks though. I Know It didn't work in curl and I'd like to move to API requests rather than doing http post in the game state
Avatar
Avatar
Pelayori
I still have to test post requests for discord webhooks though. I Know It didn't work in curl and I'd like to move to API requests rather than doing http post in the game state
🐨Dream Doctor🦘 7/29/2021 9:49 AM
I always used restclient-cpp for webhooks, but that won't compile any more because of conflicts with the api additions. (edited)
Avatar
Due to redefinitions? Maybe some headers are already included or some library dependency already included
Avatar
🐨Dream Doctor🦘 7/29/2021 9:52 AM
Avatar
Avatar
Pelayori
Due to redefinitions? Maybe some headers are already included or some library dependency already included
🐨Dream Doctor🦘 7/29/2021 9:53 AM
Avatar
Nothing more than a couple redefinitions, you could modify ark Enums.h or remove the definition on the lib. Not sure how different are they
Avatar
Avatar
Pelayori
I still have to test post requests for discord webhooks though. I Know It didn't work in curl and I'd like to move to API requests rather than doing http post in the game state
i use poco post for hwidbans webhooks in new update (edited)
10:37 AM
works fine
Avatar
🐨Dream Doctor🦘 7/29/2021 2:57 PM
Trying to use the new API::Requests for discord webhooks. I've run into the issue that Discord webhooks requests require a correct "Content-Length" header, otherwise it either ignores the request or returns a 400 error. I can't seem to find an overload that automatically adds the Content-Length header that isn't application/x-www-form-urlencoded, and when I try and add it manually by getting length() of the payload string, it's not correct. For the JSON payload I was testing I was getting a length of 620 and the request was failing, but when I pasted that same json string into Postman it was sending a Content-Length of about 1200. Has anyone used API::Requests for Webhooks, and if so how did you do it?
Avatar
void PostDiscordWebhook(FString URL, nlohmann::json Content) { API::Requests::Get().CreatePostRequest(URL.ToString(), [](bool Sucess, std::string Result) {}, Content.dump(), "application/json"); }
2:59 PM
@🐨Dream Doctor🦘
3:00 PM
content length is set in every post request overload, not sure why you'd run into that issue
Avatar
Does anyone use GetCharacterName(...) function HandleNewPlayer hook? I have such code and function returns empty string. I have latest version of API bool Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* newPlayer, UPrimalPlayerData* playerData, AShooterCharacter* playerCharacter, bool isFromLogin) { auto result = AShooterGameMode_HandleNewPlayer_original(_this, newPlayer, playerData, playerCharacter, isFromLogin); const uint64 playerId = ArkApi::GetApiUtils().GetPlayerID(newPlayer); // Player ID is 0 when character creation window, so we need to catch spawn of character if (playerId > 0ULL) { const uint64 steamId = ArkApi::GetApiUtils().GetSteamIdFromController(newPlayer); const FString characterName = ArkApi::GetApiUtils().GetCharacterName(newPlayer); // Will be an empty string Log::GetLog()->warn("Char name {}", characterName.ToString()); // ... } return result; } (edited)
Avatar
Avatar
WETBATMAN
content length is set in every post request overload, not sure why you'd run into that issue
🐨Dream Doctor🦘 7/30/2021 1:28 AM
Thanks, I'll try that, although it doesn't make much sense to me. That overload option is listed as "header" which is a vector of strings, which as I have been using it is an array for full format header strings, so "Content-Type: application/json", and this does work, but it also stops Content-Length being added automatically.
Avatar
content length is always set in every single overload of post request functions
1:31 AM
i had to keep an overload of post that automatically uses application/x-www-form-urlencoded to preserve backwards compatibility
1:31 AM
since most plugins used that in POST
Avatar
🐨Dream Doctor🦘 7/30/2021 1:33 AM
Are you certain? That wasn't what I was seeing in testing last night. It was missing when I used headers and didn't explicitly specify it. Obviously I could have been doing something wrong though. I'll try again this morning.
1:35 AM
there are 3 post request overloads
1:35 AM
content length is set in every single one
Avatar
🐨Dream Doctor🦘 7/30/2021 2:04 AM
Yeah, I just tested it again this morning. If I leave out the Content-Length header then it does add it automatically. I don't know what I was doing wrong last night.
Avatar
🐨Dream Doctor🦘 7/30/2021 5:39 AM
Eugh. Formatting complex Discord messages with nlohmann::json is not fun.
Avatar
Avatar
🐨Dream Doctor🦘
Eugh. Formatting complex Discord messages with nlohmann::json is not fun.
are you using embeds?
Avatar
🐨Dream Doctor🦘 7/30/2021 7:46 AM
Yeah. I got it all working, but it wasn't fun!
Avatar
it ain't that bad 😄
Avatar
🐨Dream Doctor🦘 7/30/2021 7:53 AM
Trying to get nlohmann to put square brackets in the right places was not fun! lol nlohmann::json j; j["username"] = "TestName"; j["avatar_url"] = "https://i.imgur.com/testimg.png"; j["content"] = ""; j["embeds"] = { { {"title", "Test Webhook Title"}, {"url", "https://testurl.com"}, {"description", "This is a test message with embeds and fields."}, {"color", "16711935"}, {"author", { {"name", "Test Plugin"}, {"icon_url", "https://i.imgur.com/testimg.png"} }}, {"fields", { {{"name", "TestField1"}, {"value", TestVar1}, {"inline", true}}, {{"name", "TestField2"}, {"value", TestVar2}, {"inline", true}}, {{"name", "TestField3"}, {"value", TestVar3}, {"inline", true}}, {{"name", "TestField4"}, {"value", "This is the last field."}} }} } };
Avatar
but why do it like this 😄
7:55 AM
void Discord_BannedPlayer_Kicked(uint64 SteamID, std::string HWID, time_t TimeRemaining) { std::vector<nlohmann::json> ObjVec; ObjVec.push_back(GetEmbedObject("Player Steam ID", std::to_string(SteamID))); ObjVec.push_back(GetEmbedObject("Player HWID", HWID)); if (TimeRemaining) { tm* Time = gmtime(&TimeRemaining); ObjVec.push_back(GetEmbedObject("Remaining Ban Days", Time->tm_yday)); ObjVec.push_back(GetEmbedObject("Remaining Ban Hours", Time->tm_hour)); ObjVec.push_back(GetEmbedObject("Remaining Ban Minutes", Time->tm_min)); } PostDiscordWebhook(conf::sKickWebhook, ConstructWebhook("A Player Was Kicked Because Their Unique Identifiers are Banned!", 16751360, ObjVec)); } (edited)
7:56 AM
you can just create a vector of json objects
7:56 AM
and push it back into the embeds field
7:58 AM
template <typename T> nlohmann::json GetEmbedObject(std::string Name, T const& Data) { nlohmann::json Obj; Obj["name"] = Name; Obj["value"] = Data; Obj["inline"] = conf::IsCompactWebhook; return Obj; }
Avatar
🐨Dream Doctor🦘 7/30/2021 7:59 AM
Well sure, that's another way. But mine uses so many more curly brackets! 😉
Avatar
lol
Avatar
Rogue Leader 7/30/2021 2:24 PM
Who approves arkserverapi.com plugin updates now?
Avatar
several people do sometimes it takes a few hours
Avatar
Avatar
Rogue Leader
Who approves arkserverapi.com plugin updates now?
Done 👍 (edited)
Avatar
Avatar
Pelayori
Done 👍 (edited)
Rogue Leader 7/30/2021 2:40 PM
Thanks!
Avatar
if (!isLocal || !plugin.hideServerTagOnLocal) { // format name with server tag auto name_with_tag = FString(ArkApi::Tools::ConvertToWideStr(plugin.namePattern).c_str()); name_with_tag.ReplaceInline(L"{Name}", *name); name_with_tag.ReplaceInline(L"{ServerTag}", ArkApi::Tools::ConvertToWideStr(serverTag).c_str()); name_with_tag.ReplaceInline(L"{ditu}", ArkApi::Tools::ConvertToWideStr(serverTag).c_str()); name = name_with_tag; }
6:20 PM
ConvertToWideStr()
6:21 PM
ConvertToWideStr(),3.52api cannot be used
6:21 PM
Thanks!
Avatar
@Trustp those functions have been deprecated and should not be used. You might be able to use encode or decide functions
Avatar
Avatar
Pelayori
@Trustp those functions have been deprecated and should not be used. You might be able to use encode or decide functions
Can you give a wide character code, thank you
Avatar
Avatar
WETBATMAN
you can just create a vector of json objects
substitute 8/1/2021 6:50 AM
if you want to get technical
6:50 AM
a javascript object is just a dictionary of string, jsObject
6:50 AM
where jsObject is either the previously defined type, a string, or a primitive
6:50 AM
in C# land I generally use Dictionary<string, Object>
6:52 AM
One could probably use map<std::string, std::any>
6:53 AM
6:53 AM
6:53 AM
hahahah what the fuck
6:54 AM
this is in the json.hpp header
Avatar
Avatar
Pelayori
@Trustp those functions have been deprecated and should not be used. You might be able to use encode or decide functions
Solved thanks
Avatar
🐨Dream Doctor🦘 8/1/2021 1:58 PM
Anyone know if we're able to add to the remap arrays in PGD, and if it works?
Avatar
Avatar
🐨Dream Doctor🦘
Anyone know if we're able to add to the remap arrays in PGD, and if it works?
You probably can, but it won't end up good
Avatar
Avatar
Pelayori
You probably can, but it won't end up good
🐨Dream Doctor🦘 8/2/2021 5:03 AM
Why do you say that?
Avatar
Avatar
substitute
Click to see attachment 🖼️
🐨Dream Doctor🦘 8/2/2021 5:03 AM
OMG that gives me a migraine just looking at it lol
Avatar
Avatar
🐨Dream Doctor🦘
Why do you say that?
Server/Client discrepancy
1:58 PM
I never tested remaps, though.
Avatar
@Lethal look we have ascended!
11:02 PM
lol
cheers 1
🙇‍♂️ 1
Avatar
c++ UShooterCheatManager* cheatManager = static_cast<UShooterCheatManager*>(new_player->CheatManagerField()); cheatManager->MakeTribeFounder(); I set the owner of the tribe like this, but it will not take effect
Avatar
At present, the server has a delay in absorbing bullets from the turret, and the connection is dropped.Is there any hook to solve this problem?
Avatar
Avatar
Trustp
At present, the server has a delay in absorbing bullets from the turret, and the connection is dropped.Is there any hook to solve this problem?
What do you mean?
Avatar
Avatar
Tommmmmm
c++ UShooterCheatManager* cheatManager = static_cast<UShooterCheatManager*>(new_player->CheatManagerField()); cheatManager->MakeTribeFounder(); I set the owner of the tribe like this, but it will not take effect
Where are you doing it? Maybe the player is not yet ready
12:14 PM
Or, better said, the command might require the player to be server admin
Avatar
@PelayoriIt means that the automatic turret will drop the connection when attacking the dinosaur
12:17 PM
Too many server administrators have had this problem
Avatar
Yes, I have that problem too. It started after Gen2 update but I couldn't find anything to help reduce the lag when soaking a bunch of turrets
Avatar
Delayed 255, or dropped, the same is true for I9 9900K
12:19 PM
I just want to find this hook to solve the problem, but I did not find this hook when looking for API
Avatar
Turrets find their target on APrimalStructureTurret::Tick, and they fire on APrimalStructureTurret::DoFire
Avatar
Ok, thank you, I will share in time if the problem is solved
Avatar
Avatar
Pelayori
Where are you doing it? Maybe the player is not yet ready
I'm going to let players automatically create clans and acquire owners when they enter the map
Avatar
Hmm the command doesn't seem to need the player to be admin
Avatar
But it won't work😩
12:54 PM
I don't understand the difference between founder and owner
Avatar
Avatar
Tommmmmm
But it won't work😩
Maybe you could Get or Load tribe data, then set the owner there
Avatar
c++ AShooterGameMode* GameMode = ArkApi::GetApiUtils().GetShooterGameMode(); FTribeData* CreatedTribeData = static_cast<FTribeData*>(FMemory::Malloc(0x200)); RtlSecureZeroMemory(CreatedTribeData, 0x200); if (GameMode->GetOrLoadTribeData(TribeID, CreatedTribeData)) { CreatedTribeData->OwnerPlayerDataIDField() == PlayerID; GameMode->UpdateTribeData(CreatedTribeData); } I will try this
Avatar
I think I've done that before and it worked, but that sometimes has some delay if I remember correctly
Avatar
OK, but I can't find other way to set the tribe owner.
Avatar
There are 3 ways, some work reliably, some don't 1) Use MakeTribeFounder 2) When the founder logs in, force transfer ownership (with the function in Shooter Player State) 3) Modify the tribe data directly
Avatar
Avatar
Tommmmmm
c++ AShooterGameMode* GameMode = ArkApi::GetApiUtils().GetShooterGameMode(); FTribeData* CreatedTribeData = static_cast<FTribeData*>(FMemory::Malloc(0x200)); RtlSecureZeroMemory(CreatedTribeData, 0x200); if (GameMode->GetOrLoadTribeData(TribeID, CreatedTribeData)) { CreatedTribeData->OwnerPlayerDataIDField() == PlayerID; GameMode->UpdateTribeData(CreatedTribeData); } I will try this
You have an error there
1:32 PM
CreatedTribeData->OwnerPlayerDataIDField() == PlayerID; should be CreatedTribeData->OwnerPlayerDataIDField() = PlayerID;
1:32 PM
You are using boolean operator instead of assign
Avatar
Well, thank you!!
Avatar
Avatar
Tommmmmm
I'm going to let players automatically create clans and acquire owners when they enter the map
불가리스 8/9/2021 9:48 AM
Is it resolved? i use this code.
9:48 AM
// create tribe if (Player->GetPlayerCharacter() && !Player->IsSpectator() && !Player->IsInTribe()) { AShooterGameMode* GameMode = ArkApi::GetApiUtils().GetShooterGameMode(); FString TribeName = L"Tribe of " + ArkApi::GetApiUtils().GetCharacterName(Player); int CreatedTribeID = GameMode->ForceCreateTribe(&TribeName, 0); FTribeData* CreatedTribeData = static_cast<FTribeData*>(FMemory::Malloc(0x200)); RtlSecureZeroMemory(CreatedTribeData, 0x200); if (GameMode->GetOrLoadTribeData(CreatedTribeID, CreatedTribeData)) Player->GetShooterPlayerState()->AddToTribe(CreatedTribeData, false, false, false, nullptr); FMemory::Free(CreatedTribeData); UShooterCheatManager* cheat_manager = static_cast<UShooterCheatManager*>(Player->CheatManagerField()); cheat_manager->MakeTribeFounder(); }
Avatar
Avatar
불가리스
Is it resolved? i use this code.
I used this code before, but it doesn't work c++ AShooterGameMode* GameMode = ArkApi::GetApiUtils().GetShooterGameMode(); FTribeData* CreatedTribeData = static_cast<FTribeData*>(FMemory::Malloc(0x200)); RtlSecureZeroMemory(CreatedTribeData, 0x200); if (GameMode->GetOrLoadTribeData(TribeID, CreatedTribeData)) { CreatedTribeData->OwnerPlayerDataIDField() = PlayerID; GameMode->UpdateTribeData(CreatedTribeData); } I use this code now
Avatar
불가리스 8/11/2021 6:05 AM
my code works. If there is no tribe, it creates a tribe and gives it ownership.
Avatar
🐨Dream Doctor🦘 8/13/2021 12:50 PM
Has anyone updated VS to 16.11.0 yet? Any issues?
Avatar
No, I'm still behind it seems
2:55 PM
Will update later today
Avatar
Avatar
🐨Dream Doctor🦘
Has anyone updated VS to 16.11.0 yet? Any issues?
i'm having all kinds of weird issues lol
Avatar
@Foppa
7:04 PM
someone should get on this
7:04 PM
before they invade the forums
Avatar
They already did
thumbsUp 1
7:04 PM
lol
7:04 PM
There's over 30 reports from these 2-3 days
Avatar
Yeah been cleaning everyday
7:13 PM
😩
Avatar
불가리스 8/14/2021 1:44 PM
Hi. Is there an ARK developer Discord Channel other than here? I remember joining the ARK Modding Discord Group a while back. I can't find the link right now. Can anyone invite me? (edited)
Avatar
불가리스 8/14/2021 2:04 PM
Does anyone know about the console command "StreamMap Genesis"? Normal users can also use it.
Avatar
Avatar
불가리스
Hi. Is there an ARK developer Discord Channel other than here? I remember joining the ARK Modding Discord Group a while back. I can't find the link right now. Can anyone invite me? (edited)
https://discord.arkmodding.net/ but the link is not working
Avatar
불가리스 8/14/2021 2:27 PM
you're right. It doesn't work.
Avatar
🐨Dream Doctor🦘 8/15/2021 5:25 AM
Wondering if anyone could take a look at the hook generator app. It's doing some strange things. This is the code it came up with for UPrimalItem::AddNewItem DECLARE_HOOK(UPrimalItem_UPrimalItem*, UPrimalItem*, UPrimalItem*, TSubclassOf<UPrimalItem>, UPrimalInventoryComponent*, bool, bool, float, bool, int, bool, float, bool, TSubclassOf<UPrimalItem>, float); UPrimalItem* Hook_UPrimalItem_UPrimalItem*(UPrimalItem* _this, TSubclassOf<UPrimalItem> ItemArchetype, UPrimalInventoryComponent* GiveToInventory, bool bEquipItem, bool bDontStack, float ItemQuality, bool bForceNoBlueprint, int quantityOverride, bool bForceBlueprint, float MaxItemDifficultyClamp, bool CreateOnClient, TSubclassOf<UPrimalItem> ApplyItemSkin, float MinRandomQuality) { return UPrimalItem_UPrimalItem*_original(_this, ItemArchetype, GiveToInventory, bEquipItem, bDontStack, ItemQuality, bForceNoBlueprint, quantityOverride, bForceBlueprint, MaxItemDifficultyClamp, CreateOnClient, ApplyItemSkin, MinRandomQuality); } ArkApi::GetHooks().SetHook("UPrimalItem.UPrimalItem*", &Hook_UPrimalItem_UPrimalItem*, &UPrimalItem_UPrimalItem*_original); ArkApi::GetHooks().DisableHook("UPrimalItem.UPrimalItem*", &Hook_UPrimalItem_UPrimalItem*);
Avatar
Yeah static functions are not its strongest point
Avatar
🐨Dream Doctor🦘 8/15/2021 12:13 PM
I'm having a really strange issue. I'm hooking UPrimalItem::AllowInventoryItem. If I add a simple std::cout << "AllowInventoryItem" << std::endl into the hook function as a test, everything works as expected. When the server starts it spits out a few dozen lines from cout in less than a second which is expected. However, UPrimalItem::AllowInventoryItem has UPrimalItem* as a parameter. If I use ArkApi::GetApiUtils().GetItemBlueprint on that, and cout the result, the whole server slows down to a crawl. It spits out one or two couts per second and the server cannot be connected to. Does anyone know why that would be and what I could do to fix it?
Avatar
Pull latest headers from repo (edited)
12:14 PM
I fixed that issue a few days ago
Avatar
🐨Dream Doctor🦘 8/15/2021 12:16 PM
Oh man, thank you as always Pelayori, you're a superstar, but I wish I had known that many hours ago. Perhaps we could get something posted in #changelogs when issues like that are fixed, or any changes made to the repo? (edited)
Avatar
A 3.53 release is not that far away so was waiting for that to release to write some notes
Avatar
🐨Dream Doctor🦘 8/15/2021 12:22 PM
GitHub has inbuilt webhooks that are very easy to set up. Perhaps if one was set up to post to #changelogs every time a pull request is accepted, it might help us all stay up to date?
Avatar
Could do yeah, might look into it
Avatar
🐨Dream Doctor🦘 8/15/2021 12:32 PM
Thank you Sir!
1:54 AM
Anyone do commissions?
Avatar
Depends on the scope of the commission
Avatar
🐨Dream Doctor🦘 8/16/2021 7:57 AM
Has anyone ever spoken with WC about the possibility of them releasing debug symbols for Linux as well as Windows? I can't think why they wouldn't do it, other than it possibly being another step in their workflow.
Avatar
Avatar
🐨Dream Doctor🦘
Has anyone ever spoken with WC about the possibility of them releasing debug symbols for Linux as well as Windows? I can't think why they wouldn't do it, other than it possibly being another step in their workflow.
They won't do it.
8:31 AM
releasing debugging symbols on Linux isn't as trivial as it sounds though
8:31 AM
PDB is a Windows format
8:31 AM
even if they generate debugging symbols, loading libraries is completely different on Linux
8:32 AM
(not that these things are impossible, they are just a LOT of work to have dual platform support)
8:32 AM
plugins would also have to adjust to NOT use ANY OS specific APIs (or have separate builds for each platform with #enable) (edited)
8:32 AM
(though with the modern STL this is likely not an issue)
Avatar
🐨Dream Doctor🦘 8/16/2021 10:48 AM
So many problems Sub. But where are the solutions? 😉
Avatar
🐨Dream Doctor🦘 8/16/2021 1:18 PM
I want to work with the struct FPlacementData but it only has a forward declaration in base.h? How do I get the details for that struct? (edited)
Avatar
Avatar
🐨Dream Doctor🦘
I want to work with the struct FPlacementData but it only has a forward declaration in base.h? How do I get the details for that struct? (edited)
struct FPlacementData { FVector AdjustedLocation; FRotator AdjustedRotation; bool bSnapped; bool bDisableEncroachmentCheck; int MySnapToIndex; int TheirSnapToIndex; AActor *FloorHitActor; APrimalStructure *ParentStructure; APrimalStructure *ForcePlacedOnFloorParentStructure; APrimalStructure *ReplacesStructure; APawn *AttachToPawn; FName AttachToBone; APrimalDinoCharacter *DinoCharacter; };
Avatar
Avatar
WETBATMAN
struct FPlacementData { FVector AdjustedLocation; FRotator AdjustedRotation; bool bSnapped; bool bDisableEncroachmentCheck; int MySnapToIndex; int TheirSnapToIndex; AActor *FloorHitActor; APrimalStructure *ParentStructure; APrimalStructure *ForcePlacedOnFloorParentStructure; APrimalStructure *ReplacesStructure; APawn *AttachToPawn; FName AttachToBone; APrimalDinoCharacter *DinoCharacter; };
🐨Dream Doctor🦘 8/16/2021 11:22 PM
Thank you so much!
Avatar
So if anyone's up for a commission
4:11 AM
I was wondering if it's possible to make a plugin where fliers get the same kind of speed imprinting bonus as the snow owls
4:11 AM
Like whenever you imprint on a snow owl it gets a 20% movement speed buff, but no other fliers do that
4:12 AM
If that's possible, or if I'm just a noob asking noob questions, either way just msg me if down
Avatar
🐨Dream Doctor🦘 8/17/2021 9:07 AM
If two plugins both hook the same function, is there any way to determine which plugin will run first? Or even to ensure one plugin runs before the other?
Avatar
Avatar
TMJoe
I was wondering if it's possible to make a plugin where fliers get the same kind of speed imprinting bonus as the snow owls
Look at my Creatures+ plugin I think it does what you want already.
Avatar
Avatar
🐨Dream Doctor🦘
If two plugins both hook the same function, is there any way to determine which plugin will run first? Or even to ensure one plugin runs before the other?
Execution order is the same as the plugin load order.
Avatar
Avatar
Lethal
Execution order is the same as the plugin load order.
🐨Dream Doctor🦘 8/17/2021 12:16 PM
Ok, thank you. So it's "AAAMyPlugin" then lol
Avatar
🐨Dream Doctor🦘 8/17/2021 1:29 PM
What's a hook I can use to run GAAC for structures at startup? Running it in AShooterGameMode.InitGame misses most placed structure actors.
Avatar
Avatar
🐨Dream Doctor🦘
What's a hook I can use to run GAAC for structures at startup? Running it in AShooterGameMode.InitGame misses most placed structure actors.
run it after
1:34 PM
the original function
Avatar
Avatar
WETBATMAN
the original function
🐨Dream Doctor🦘 8/17/2021 1:56 PM
Thank you!
Avatar
🐨Dream Doctor🦘 8/17/2021 2:04 PM
I'm doing a GAAC as follows, and the server is crashing on the last line below after looping successfully through about 20 structures. I'm guessing maybe that structure doesn't have an inventory component or something. How would I prevent the crash? UGameplayStatics::GetAllActorsOfClass(ArkApi::GetApiUtils().GetWorld(), APrimalStructureItemContainer::GetPrivateStaticClass(), &AllActors); for (auto* StorageStructure : AllActors) { APrimalStructureItemContainer* ItemContainer = static_cast<APrimalStructureItemContainer*>(StorageStructure); TArray<UPrimalItem*> AllItems = ItemContainer->MyInventoryComponentField()->InventoryItemsField(); ...
Avatar
Avatar
🐨Dream Doctor🦘
I'm doing a GAAC as follows, and the server is crashing on the last line below after looping successfully through about 20 structures. I'm guessing maybe that structure doesn't have an inventory component or something. How would I prevent the crash? UGameplayStatics::GetAllActorsOfClass(ArkApi::GetApiUtils().GetWorld(), APrimalStructureItemContainer::GetPrivateStaticClass(), &AllActors); for (auto* StorageStructure : AllActors) { APrimalStructureItemContainer* ItemContainer = static_cast<APrimalStructureItemContainer*>(StorageStructure); TArray<UPrimalItem*> AllItems = ItemContainer->MyInventoryComponentField()->InventoryItemsField(); ...
🐨Dream Doctor🦘 8/17/2021 2:10 PM
Nvm. A if (ItemContainer->MyInventoryComponentField()) did the trick.
Avatar
🐨Dream Doctor🦘 8/18/2021 3:50 AM
Looking for a bright idea here. We made some mod changes to a bunch of our really old maps the other day, and it all went well except for one map, which is crashing with the error below. It's due to something that's present in some storage container somewhere on the map. I believe it's because the file for the item doesn't exist anymore, although usually the item would just disappear when that happens. I'm not sure why it's crashing the server. The server crashes with or without the plugin system disabled. I was thinking maybe I could make a plugin to hook whichever function is crashing the server and somehow either stop it or find out which item or which storage container is causing the crash and remove it. Any ideas would be very much appreciated.
3:53 AM
The last functon I can see running in that crashdump is UObjectBaseUtility::GetName, but it doesn't seem like I can hook that function?
Avatar
Avatar
🐨Dream Doctor🦘
The last functon I can see running in that crashdump is UObjectBaseUtility::GetName, but it doesn't seem like I can hook that function?
not trivially no
5:05 AM
it's also not GetName
5:05 AM
5:05 AM
is the crashing function
Avatar
Avatar
substitute
not trivially no
🐨Dream Doctor🦘 8/18/2021 5:41 AM
Thanks Sub. I ended up hooking UPrimalInventoryComponent.LoadedFromSaveGame and dumped the details for each structure as it was loaded. The last structure to show before the crash was the one responsible.
Avatar
Avatar
🐨Dream Doctor🦘
Thanks Sub. I ended up hooking UPrimalInventoryComponent.LoadedFromSaveGame and dumped the details for each structure as it was loaded. The last structure to show before the crash was the one responsible.
nice
5:42 AM
good work, where you able to get it all fixed?
Avatar
🐨Dream Doctor🦘 8/18/2021 5:46 AM
I think so, it worked on a backup of the map, just seeing if it works on the live map now.
thumbsUp 1
Avatar
@LethalAyyy thanks man
Avatar
Avatar
🐨Dream Doctor🦘
I think so, it worked on a backup of the map, just seeing if it works on the live map now.
If you are still interested I updated vs yesterday and no issue
Avatar
Anyone know if it's possible to get the structure type/tier ?
7:43 PM
haven't found it's being stored somewhere
Avatar
Like wooden / stone / metal / tek ?
Avatar
It should be possible, as the game calculates damage differently per tier. There are weird ones like the tek replicator that are "tek" but really "stone" though, so I don't know how reliable that would be, I will take a look at what I can find.
Avatar
Dirty way: parse structure name Other way, this might work (it does for metal structures and returns "Metal" string) if (structure->ConsumesPrimalItemField().uClass) { TArray<FString> folder_paths = ((UPrimalItem*)(structure->ConsumesPrimalItemField().uClass->GetDefaultObject(true)))->DefaultFolderPathsField(); if (folder_paths.IsValidIndex(1)) tier = folder_paths[1]; } (edited)
8:07 PM
@Foppa
8:08 PM
Just works for structures that can be placed by the player, though (those with valid Consumes Primal Item field class)
Avatar
Yeah parsing name is to dirty 😛
Avatar
Then you can give a go to the 2nd way
Avatar
I will check it out!
Avatar
That's also a way to get primal item structure bp paths from a structure
8:10 PM
ArkApi::IApiUtils::GetClassBlueprint(structure->ConsumesPrimalItemField().uClass)
Avatar
I'm aware 😛
Avatar
For people using discord search then 😛
👍 1
Avatar
How ever... interesting results ! [Debug] Structure Tag: None [Debug] Structure GetArchetype: Blueprint'/Game/PrimalEarth/Structures/StorageBox_TekTransmitter.StorageBox_TekTransmitter' [Debug] Structure Debug Info: Structure Name: StorageBox_TekTransmitter_C_3 Instigator: NULL OwnerName: YOLO1 Owner: NULL TargetingTeam: 1874804364 [Debug] Structure Debug Info: No_Detailed_Info_Specified [Debug] Structure Debug Info: No_Detailed_Info_Specified [Debug] Structure Debug Info: Crafting <--------
Avatar
Ah yeah, this works with simple structures, others might have it on other index yeah
8:19 PM
But I believe all structures have their tier listed under the folder paths array
Avatar
i guess it's "Ark"
8:19 PM
:p
Avatar
No, I am wrong lol
8:19 PM
Transmitter does not have the tier there
8:20 PM
0: Structures 1: Crafting
Avatar
Avatar
Foppa
Anyone know if it's possible to get the structure type/tier ?
You can probably build a mapping of what structure tiers use what "StructureSettingsClass".
Avatar
Avatar
Foppa
Anyone know if it's possible to get the structure type/tier ?
12:53 AM
yea
12:53 AM
what lethal said
12:53 AM
sorry didnt see you wrote that already
Avatar
Thank you all, i'm going to check it out!
Avatar
Hello everyone, As a little presentation I will say that I've done some mods for Subnautica and TheForest, I like survival/craft games and all C languages. At the moment I'm discovering and testing the ARK Server API, doing some custom mods for the cluster I'm hosting, but later on I might be able to extract some features from it for a public mod.
👍 3
Avatar
Fatal error! VERSION: 336.12 VCRUNTIME140.dll!UnknownFunction (0x00007ff8841f1558) + 0 bytes [UnknownFile:0] AdvancedChat.dll!UnknownFunction (0x00007ff8586f6bf8) + 0 bytes [UnknownFile:0] AdvancedChat.dll!UnknownFunction (0x00007ff85874b71d) + 0 bytes [UnknownFile:0] AdvancedChat.dll!UnknownFunction (0x00007ff8587426f8) + 0 bytes [UnknownFile:0] AdvancedChat.dll!UnknownFunction (0x00007ff85882ead5) + 0 bytes [UnknownFile:0] AdvancedChat.dll!UnknownFunction (0x00007ff8586d7513) + 0 bytes [UnknownFile:0] AdvancedChat.dll!UnknownFunction (0x00007ff8587011e2) + 0 bytes [UnknownFile:0] VERSION.dll!UnknownFunction (0x00007ff85af53ca8) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7b0b74cda) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7b0a1a7dd) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7b09b488f) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7ae86816c) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7ae864bed) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7ae864c4a) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7ae8687dc) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!UnknownFunction (0x00007ff7b187ea6d) + 0 bytes [UnknownFile:0] KERNEL32.DLL!UnknownFunction (0x00007ff897bc7974) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ff89a97a2f1) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007ff89a97a2f1) + 0 bytes [UnknownFile:0]
11:02 AM
My ark server has always been wrong. Do you have a problem like me?
11:03 AM
[2021.08.27-01.25.22:107][ 0]Number of cores 12 [2021.08.27-08.43.39:736][ 60]LogMemory: Platform Memory Stats for WindowsServer [2021.08.27-08.43.39:741][ 60]LogMemory: Process Physical Memory: 1514.91 MB used, 5640.73 MB peak [2021.08.27-08.43.39:742][ 60]LogMemory: Process Virtual Memory: 5555.91 MB used, 7799.50 MB peak [2021.08.27-08.43.39:742][ 60]LogMemory: Physical Memory: 53483.80 MB used, 131001.59 MB total [2021.08.27-08.43.39:742][ 60]LogMemory: Virtual Memory: 12253.88 MB used, 134217728.00 MB total [2021.08.27-08.52.53:903][ 60]!!!HANG DETECTED!!! [2021.08.27-08.52.54:594][ 60] - FPlatformMisc::RequestExit(1) [2021.08.27-08.52.54:595][ 60]Log file closed, 08/27/21 16:52:54
11:05 AM
This is ark's log. Could he have caused it by a plugin?
Avatar
🐨Dream Doctor🦘 8/27/2021 12:01 PM
Does anyone know why the developer called "root" was banned?
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone know why the developer called "root" was banned?
scamming he had an embedded command in all of his plugins that would give him admin on all servers running his plugin and as far as i know there was some malware found in his plugins, also
Avatar
🐨Dream Doctor🦘 8/27/2021 12:20 PM
Yeah I thought it was something like that. Oh dear.
Avatar
🐨Dream Doctor🦘 8/27/2021 12:28 PM
Does anyone know if the plugin "AuthLib" belongs to him? Or is it legitimate?
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone know if the plugin "AuthLib" belongs to him? Or is it legitimate?
it’s for the ExtendedApi plugin from him
12:31 PM
it really takes doing some nasty things to get banned from the forum
12:31 PM
i wouldn’t use anything from him 😃
Avatar
🐨Dream Doctor🦘 8/27/2021 12:32 PM
Yeah, neither would I. Thank you for the info. 🙂
Avatar
🐨Dream Doctor🦘 8/27/2021 1:55 PM
I have a question about PrimalItem. It has "GetOwnerPlayer" which returns a ShooterCharacter. I'm guessing that works fine when the item is in an inventory, but what happens if the item is in a structure inventory instead? Does it return null?
Avatar
Probably
Avatar
Avatar
🐨Dream Doctor🦘
I have a question about PrimalItem. It has "GetOwnerPlayer" which returns a ShooterCharacter. I'm guessing that works fine when the item is in an inventory, but what happens if the item is in a structure inventory instead? Does it return null?
GetOwnerPlayer is the exact same as just doing GetOwner and casting it into AshooterCharacter
1:58 PM
if the inventory owner isn't AShooterCharacter it will return null
1:59 PM
AShooterCharacter *__fastcall UPrimalItem::GetOwnerPlayer(UPrimalItem *this) { AActor *v1; // rax v1 = UPrimalItem::GetOwnerActor(this); return Cast<AShooterCharacter>((UObject *)&v1->vfptr); }
1:59 PM
this is the func
Avatar
🐨Dream Doctor🦘 8/27/2021 1:59 PM
Oh that's great. Thank you!
Avatar
Updated git api I get empty cryopods? bool ArkShop::GiveDino(AShooterPlayerController* player_controller, int level, bool neutered, std::string blueprint, std::string saddleblueprint) { bool success = false; const FString fblueprint(blueprint.c_str()); APrimalDinoCharacter* dino = ArkApi::GetApiUtils().SpawnDino(player_controller, fblueprint, nullptr, level, true, neutered); if (dino && ArkShop::config["General"].value("GiveDinosInCryopods", false)) { FString cryo = FString(ArkShop::config["General"].value("CryoItemPath", "Blueprint'/Game/Extinction/CoreBlueprints/Weapons/PrimalItem_WeaponEmptyCryopod.PrimalItem_WeaponEmptyCryopod'")); UClass* Class = UVictoryCore::BPLoadClass(&cryo); UPrimalItem* item = UPrimalItem::AddNewItem(Class, nullptr, false, false, 0, false, 0, false, 0, false, nullptr, 0); if (item) { if (ArkShop::config["General"].value("CryoLimitedTime", false)) item->AddItemDurability((item->ItemDurabilityField() - 3600) * -1); UPrimalItem* saddle = nullptr; if (saddleblueprint.size() > 0) { FString fblueprint(saddleblueprint.c_str()); UClass* Class = UVictoryCore::BPLoadClass(&fblueprint); saddle = UPrimalItem::AddNewItem(Class, nullptr, false, false, 0, false, 0, false, 0, false, nullptr, 0); } FCustomItemData customItemData = ArkShop::GetDinoCustomItemData(dino, saddle); item->SetCustomItemData(&customItemData); item->UpdatedItem(true); if (player_controller->GetPlayerInventoryComponent()) { UPrimalItem* item2 = player_controller->GetPlayerInventoryComponent()->AddItemObject(item); if (item2) success = true; } } dino->Destroy(true, false); } else if (dino) success = true; return success; }
Avatar
Worked fine when I wrote it. (edited)
Avatar
@Lethal if it works but update the git of the api of all the git and when I put it I get the empty cryopods
2:01 AM
for adding the FORCEINLINE i that's why it doesn't work for me ?
Avatar
I repair me error
3:04 AM
work
Avatar
🐨Dream Doctor🦘 8/28/2021 9:20 AM
Does anyone use Boost libraries in their plugins? Do you run into any performance issues?
Avatar
🐨Dream Doctor🦘 8/28/2021 1:44 PM
Also, has anyone had any luck with APrimalDinoCharacter_CanFly, I can't get it to trigger.
Avatar
No to both, sorry
2:37 PM
Never tried to use that hook either
Avatar
it might be a client func if it doesn’t trigger
Avatar
Avatar
🐨Dream Doctor🦘
Also, has anyone had any luck with APrimalDinoCharacter_CanFly, I can't get it to trigger.
bool __fastcall APrimalDinoCharacter::BP_CanFly(APrimalDinoCharacter *this)
12:39 AM
maybe try this
12:39 AM
seems to be called
Avatar
Avatar
WETBATMAN
bool __fastcall APrimalDinoCharacter::BP_CanFly(APrimalDinoCharacter *this)
🐨Dream Doctor🦘 8/29/2021 12:53 PM
Thank you, I'll try that. I'm also not able to get APrimalDinoCharacter_CanMount to trigger either. Anyone had any luck with that one?
Avatar
Avatar
WETBATMAN
bool __fastcall APrimalDinoCharacter::BP_CanFly(APrimalDinoCharacter *this)
🐨Dream Doctor🦘 8/29/2021 12:54 PM
Oh wait, isn't _fastcall ignored for x64 architectures?
Avatar
fastcall passes args in registers
1:11 PM
on x64 it passes only the first 4 args in registers
1:11 PM
rest in the stack
1:11 PM
that's just the decompiled function sig from IDA btw
ThankYou 1
Avatar
Avatar
🐨Dream Doctor🦘
Thank you, I'll try that. I'm also not able to get APrimalDinoCharacter_CanMount to trigger either. Anyone had any luck with that one?
CanMount appears to be called from only bp code from what i can see
Avatar
Avatar
WETBATMAN
CanMount appears to be called from only bp code from what i can see
🐨Dream Doctor🦘 8/29/2021 1:13 PM
Yeah thanks. I just found CanRide and realised that was what I needed anyway, and it works.
Avatar
ah
Avatar
Avatar
WETBATMAN
on x64 it passes only the first 4 args in registers
I believe all x64 calls are fast call
9:05 PM
At least by default
Avatar
🐨Dream Doctor🦘 9/9/2021 3:37 AM
Does anyone know, when a cryopod or soul ball is released, is UWorld::SpawnActor used?
Avatar
🐨Dream Doctor🦘 9/10/2021 10:25 AM
Is all very quiet around here lately. I think I just saw a bat fly past. lol
ghostwave 2
Avatar
I didn't see the message heh
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone know, when a cryopod or soul ball is released, is UWorld::SpawnActor used?
I would take a guess and say it falls down to spawn actor somewhere
1:55 PM
But the function called is APrimaoDinoCharacter::SpawnFromDinoData
1:55 PM
Static, returns pointer to spawned Dino
Avatar
Avatar
Pelayori
I would take a guess and say it falls down to spawn actor somewhere
🐨Dream Doctor🦘 9/10/2021 2:07 PM
Aha, thank you! 🙂
Avatar
🐨Dream Doctor🦘 9/11/2021 1:20 AM
I have a couple of functions that I'm having trouble finding.
  • Applying a skin to armor. In particular, a glider suite skin.
  • Something I can use to prevent the use of a particular type of ammo.
Avatar
Avatar
🐨Dream Doctor🦘
I have a couple of functions that I'm having trouble finding.
  • Applying a skin to armor. In particular, a glider suite skin.
  • Something I can use to prevent the use of a particular type of ammo.
UPrimalItem::UseItemOntoItem
1:33 AM
this is used for swapping ammo and adding skins
Avatar
Avatar
WETBATMAN
UPrimalItem::UseItemOntoItem
🐨Dream Doctor🦘 9/11/2021 1:34 AM
Wow, really? Two for one deal! Thanks Wetbatman.
Avatar
yes, if you hook it _this is the item that is being used onto another item
1:34 AM
and the second item is in the second param
1:34 AM
the third param is an int but it's always 0 from what i've seen
Avatar
I want to know the API when the user connects to the server and the API when the user exits.
4:52 AM
and I want to know how to find the desired API
Avatar
https://discord.com/channels/513432877904691202/513822201145982976/885952956204199946 thx for the shout out @Pelayori and good update! Credit for the original one also goes to @substitute as well 👍 (joint effort lol)
😛 1
Avatar
Avatar
돌드민
and I want to know how to find the desired API
help me T.T
Avatar
Avatar
돌드민
help me T.T
jraServerAPI 9/11/2021 9:54 AM
c++ DECLARE_HOOK(AShooterGameMode_HandleNewPlayer, bool, AShooterGameMode*, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool); DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController*); bool Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* new_player, UPrimalPlayerData* player_data, AShooterCharacter* player_character, bool is_from_login) { return AShooterGameMode_HandleNewPlayer_original(_this, new_player, player_data, player_character, is_from_login); } void Hook_AShooterGameMode_Logout(AShooterGameMode* _this, AController* exiting) { AShooterGameMode_Logout_original(_this, exiting); } ArkApi::GetHooks().SetHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer, &AShooterGameMode_HandleNewPlayer_original); ArkApi::GetHooks().SetHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout, &AShooterGameMode_Logout_original); ArkApi::GetHooks().DisableHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer); ArkApi::GetHooks().DisableHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout);
Avatar
Hi there, how are you, could you help me in AttackerShooterController-> GetPlayerCharacter () -> BuffsField () that is, I specify a buff that is, if you have it activated, you can deactivate it by command you know something about aprimalbuff or BuffClass (edited)
Avatar
Avatar
Fenix
Hi there, how are you, could you help me in AttackerShooterController-> GetPlayerCharacter () -> BuffsField () that is, I specify a buff that is, if you have it activated, you can deactivate it by command you know something about aprimalbuff or BuffClass (edited)
There's a GetBuffs function
12:41 PM
On ShooterCharacter
Avatar
Avatar
jraServerAPI
c++ DECLARE_HOOK(AShooterGameMode_HandleNewPlayer, bool, AShooterGameMode*, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool); DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController*); bool Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* new_player, UPrimalPlayerData* player_data, AShooterCharacter* player_character, bool is_from_login) { return AShooterGameMode_HandleNewPlayer_original(_this, new_player, player_data, player_character, is_from_login); } void Hook_AShooterGameMode_Logout(AShooterGameMode* _this, AController* exiting) { AShooterGameMode_Logout_original(_this, exiting); } ArkApi::GetHooks().SetHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer, &AShooterGameMode_HandleNewPlayer_original); ArkApi::GetHooks().SetHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout, &AShooterGameMode_Logout_original); ArkApi::GetHooks().DisableHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer); ArkApi::GetHooks().DisableHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout);
thank you!
Avatar
Avatar
돌드민
thank you!
You would want to check if the character is valid. That hook will be called when they login, but they can be in respawn screen, downloading or the character has not initialized correctly by then.
12:56 PM
If you wanted to have the character valid as well you could use a DelayExecute of 1-2 seconds if Player character was not valid
Avatar
🐨Dream Doctor🦘 9/11/2021 2:47 PM
I'm having an issue with this: DECLARE_HOOK(APrimalBuff_StaticAddBuff, APrimalBuff*, TSubclassOf<APrimalBuff>, APrimalCharacter*, UPrimalItem*, AActor*, bool); Basically I do this: APrimalBuff* Hook_APrimalBuff_StaticAddBuff(TSubclassOf<APrimalBuff> BuffClass, APrimalCharacter* ForCharacter, UPrimalItem* AssociatedItem, AActor* DamageCauser, bool bForceOnClient) { std::string MyBuffClass = ArkApi::GetApiUtils().GetClassBlueprint(BuffClass.UClass).ToString(); } return APrimalBuff_StaticAddBuff_original(BuffClass, ForCharacter, AssociatedItem, DamageCauser, bForceOnClient); ... and then do some stuff with the string. It's all good until I run gcm on the server, at which point the server instantly crashes but only about 25% of the time. I know gcm adds a buff to the character, but I don't understand why it crashes the server and only some of the time. I've tested it with maybe 20 or 30 different buffs without any issues. The only crashes were with gcm?
Avatar
You can try hooking the non static one (APrimalBuff::AddBuff)
2:52 PM
Also, which crash is it?
Avatar
🐨Dream Doctor🦘 9/11/2021 2:58 PM
This is the crashdump.
2:58 PM
Just noticed those additional last two lines that normally don't appear in the crashdump.
Avatar
Not much info on that crash log
3:01 PM
Try checking the other one hook I said
Avatar
🐨Dream Doctor🦘 9/11/2021 3:01 PM
Will do. Thanks as always.
Avatar
I use that on a couple plugins and never had a crash with gcm
Avatar
Avatar
Pelayori
There's a GetBuffs function
yes
Avatar
Then use that 🙂
Avatar
@Pelayori what I mean is that when the character has a buff x well I can not throw x command
Avatar
I'm not sure I understand
7:07 PM
What do you want exactly?
Avatar
Avatar
Pelayori
If you wanted to have the character valid as well you could use a DelayExecute of 1-2 seconds if Player character was not valid
Oh Thank you very much
Avatar
🐨Dream Doctor🦘 9/12/2021 7:03 AM
I got a fair distance in compiling the latest API in the VS2022 preview using the v143 toolset and C++17. I had to recompile libMinHook as always, but then the only errors were some POCO errors. (edited)
7:06 AM
Compiling with v143 and C++20 actually gets further, with just the following errors. 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(139,38): error C2440: 'initializing': cannot convert from 'Poco::Net::HTTPRequest' to 'Poco::Net::HTTPRequest &' 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(139,38): message : A non-const reference may only be bound to an lvalue 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(172,38): error C2440: 'initializing': cannot convert from 'Poco::Net::HTTPRequest' to 'Poco::Net::HTTPRequest &' 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(172,38): message : A non-const reference may only be bound to an lvalue 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(210,38): error C2440: 'initializing': cannot convert from 'Poco::Net::HTTPRequest' to 'Poco::Net::HTTPRequest &' 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(210,38): message : A non-const reference may only be bound to an lvalue 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(252,38): error C2440: 'initializing': cannot convert from 'Poco::Net::HTTPRequest' to 'Poco::Net::HTTPRequest &' 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(252,38): message : A non-const reference may only be bound to an lvalue 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(302,38): error C2440: 'initializing': cannot convert from 'Poco::Net::HTTPRequest' to 'Poco::Net::HTTPRequest &' 1>I:\ARK-Server-API-VS2022\ARK-Server-API-master\version\Core\Private\Tools\Requests.cpp(302,38): message : A non-const reference may only be bound to an lvalue (edited)
Avatar
I updated Vs yesterday prior compiling the v3.53 I uploaded and didn't have to recompile minhook
10:56 AM
Ah, I'm still using vs2019
Avatar
🐨Dream Doctor🦘 9/12/2021 11:08 AM
Anyone know what this is about?
Avatar
Avatar
Pelayori
I updated Vs yesterday prior compiling the v3.53 I uploaded and didn't have to recompile minhook
🐨Dream Doctor🦘 9/12/2021 11:09 AM
Yeah for some reason minhook is locked so that it has to be compiled on the same version of VS that you're compiling the API on.
Avatar
Avatar
🐨Dream Doctor🦘
Anyone know what this is about?
Some issues permissions has with sqlite, which are fixed on the latest source and not yet released.
Avatar
Avatar
Pelayori
Some issues permissions has with sqlite, which are fixed on the latest source and not yet released.
🐨Dream Doctor🦘 9/12/2021 11:18 AM
I think I've said before how detrimental to the community some of Wooly's activities are. How soon can we get a release done to neutralise this?
Avatar
We are working on it, we wanted to ensure the issue was resolved prior releasing (edited)
Avatar
Avatar
Pelayori
We are working on it, we wanted to ensure the issue was resolved prior releasing (edited)
🐨Dream Doctor🦘 9/12/2021 11:19 AM
Ok, thanks Pelayori. ThankYou 👍
🤟 1
Avatar
I will be looking at the code and see if I can spot anything wrong. Or if someone does/did let us know
Avatar
🐨Dream Doctor🦘 9/12/2021 1:59 PM
Perhaps @WoolyPenguin could help out? He seems to know exactly how to fix it.
Avatar
Sqlite issue is fixed. I spotted something with duplicated groups in player's rows and I'm trying to address that atm.
Avatar
Avatar
🐨Dream Doctor🦘
Perhaps @WoolyPenguin could help out? He seems to know exactly how to fix it.
Avatar
Avatar
🐨Dream Doctor🦘
I think I've said before how detrimental to the community some of Wooly's activities are. How soon can we get a release done to neutralise this?
Is his permissions based on the original?
8:00 PM
If it is, by not disclosing the changes he made he is in violation of the licensing of the original
8:01 PM
If it is under the GPL
Avatar
It's MIT license
Avatar
Oh, that’s lame
Avatar
Afaik it's rewritten from scratch, but the exported headers are the same to preserve compatiblity with all plugins
Avatar
Avatar
substitute
Oh, that’s lame
All plugins under Michidu's repo use MIT
Avatar
Avatar
Pelayori
Afaik it's rewritten from scratch, but the exported headers are the same to preserve compatiblity with all plugins
Wouldn’t matter with GPL
8:02 PM
Since he (obviously) didn’t use a clean room design
8:02 PM
But MIT is far too weak to protect open source communities
8:02 PM
Someone could fork the whole api and close source it and charge money
8:02 PM
MIT is too lenient
Avatar
Yeah, that would be a shame. I agree that maybe the api at least could have a more restrictive license. But after all it falls under Michidu's decision 🤷‍♂️
Avatar
Well not just his anymore
8:04 PM
Everyone that’s contributed
8:04 PM
Would have to agree
8:05 PM
But yeah
8:05 PM
Lame it is MIT
Avatar
Would be difficult since lot of people who contributed are not reachable anymore, or not for this project at least
Avatar
Yeah
8:05 PM
That’s why changing licensing is nearly impossible on open source stuff
8:05 PM
And mixed licensing is even more confusing
Avatar
It's true that using a bit more restricting one on the base API could help with people distributing misterious api versions to the public (edited)
Avatar
At least changes would always be easy to push upstream
8:07 PM
If the people were complaint with the license (ha!)
8:07 PM
MIT is good for if you wanted to open source your own plugin and didn’t care about how it was used
8:07 PM
But for base api stuff GPL would’ve been best
Avatar
Could be yeah
Avatar
`FString mind1 = FString(config["General"].value("MindControl", "Blueprint'/Game/PrimalEarth/CoreBlueprints/Buffs/Buff_Base_Disease_Low.Buff_Base_Disease_Low'")); UClass* Class1 = UVictoryCore::BPLoadClass(&mind1); if (AttackerShooterController->GetPlayerCharacter()->GetBuff(Class1)) { Log::GetLog()->warn("view"); return; } no fount detecte player and buff (edited)
Avatar
🐨Dream Doctor🦘 9/13/2021 2:19 PM
I've said before, and I was saying to Pelayori last night, is that apart from the questionable morals of with these types of things that Wooly does, the larger issue is the very real danger of fragmenting the community and creating incompatibilities between different mods. Permissions is a core part of the API, and by creating his own version Wooly has now created a major point of failure for the whole community. The second he decides to change something in his version of Permissions, or the official Permissions decides to change something he doesn't like, you suddenly have a significant percentage of the plugins out there that cannot be run with the other percentage. The community will be forced to choose between one mod author or others. And Wooly may not be the only one. Others may follow his lead. I really believe this would be the beginning of the end for the API. The leaders of this official API are the only ones that can prevent this from happening, and because the damage is already being done it really needs to happen immediately. My suggestion to Pelayori was to move Permissions into the main API rather than having it as a separate plugin. That way it will always be protected. I don't really know what can we done about licensing, but IMHO something the prevents Wooly and others from releasing plugins that conflict with official components is a good start. If Wooly wants to make his own version Permissions, he should do that. Make an entirely separate version (called something else) that can be run alongside the official Permissions without issue, then refactor his own plugins to use his own version of Permissions instead. That eliminates the point of failure. He should do the same with his version of ArkShop. (edited)
Avatar
Hey, I'm currently trying to retrieve data from dino AttackInfos arrays such as the AttackRange and MeleeDamageAmount of an attack, however it only seems to return valid results from the first element of the array. Subsequent elements seem to always return a value of 0, which shouldn't be the case (also checked several of their values in the DevKit to verify). Does anyone know why that might be?
Avatar
how are you loading the array?
Avatar
I am currently just retrieving the data like this: "Dino->AttackInfosField()[AttackIndex].SomePropertyFieldHere()"
Avatar
🐨Dream Doctor🦘 9/14/2021 5:43 AM
Anyone know why this might be failing compile? It's from a library I'm trying to use. if (!(check(*(data + 1)) && check(*(data + 2)) && check(*(data + 3)) && check(*(data + 4)))) return {}; check is #define check(expr) {} It's showing these errors: (edited)
Avatar
If it's from a library you're using, I would check to make sure you're using a version that is building. If the version you're using is building fine, you've most likely got an error somewhere else that is masked under that error.
Avatar
Avatar
Frigoff
If it's from a library you're using, I would check to make sure you're using a version that is building. If the version you're using is building fine, you've most likely got an error somewhere else that is masked under that error.
🐨Dream Doctor🦘 9/14/2021 6:26 AM
Yes it's from a version that is building according the the project dev. The error occurs just from including the library, without any code in my project, so it's very confusing.
Avatar
Hard to say without more information.
Avatar
hello, i hope i'm writing in the right channel? I'm looking for someone who can program a plugin for us. Of course we would pay for it! What the plugin should do: 1. Players should be able to enter a username with a command that they use on a voting website (this does not use Steam API!). Example: /myusername Aracin The plugin now saves a name for this player in a database (ideally MySQL!) 2. The player now votes for our servers on the voting page. This outputs a "Votes JSON API" for each map with the voters and the date when they voted. 3. The plug-in must now look for the previously saved username (/myusername) on the voting page (on the Votes JSON API page?) And see whether the player has voted on the current day. 4. If the username entered matches a username on the voting page and if there is a vote for the current day, the player should receive a reward (I must be able to provide a reward). Example: I voted today for Ragnarok, now when i'm ingame i write /claim in the chat, the plugin check our ragnarok entry on the votingsite and search for my username and if i voted for the current day. then i become an reward. In a nutshell: A manual plugin that reads a voting page without an interface to Steam and credits votes in rewards. Since the voting page has its own login, the player must be able to enter in the plugin what his username is on this voting page. The Votingsite ist deutsche-arkserver.de and the "Vote JSON API" Site is something i show u in an screenshot (edited)
Avatar
Avatar
Aracin
hello, i hope i'm writing in the right channel? I'm looking for someone who can program a plugin for us. Of course we would pay for it! What the plugin should do: 1. Players should be able to enter a username with a command that they use on a voting website (this does not use Steam API!). Example: /myusername Aracin The plugin now saves a name for this player in a database (ideally MySQL!) 2. The player now votes for our servers on the voting page. This outputs a "Votes JSON API" for each map with the voters and the date when they voted. 3. The plug-in must now look for the previously saved username (/myusername) on the voting page (on the Votes JSON API page?) And see whether the player has voted on the current day. 4. If the username entered matches a username on the voting page and if there is a vote for the current day, the player should receive a reward (I must be able to provide a reward). Example: I voted today for Ragnarok, now when i'm ingame i write /claim in the chat, the plugin check our ragnarok entry on the votingsite and search for my username and if i voted for the current day. then i become an reward. In a nutshell: A manual plugin that reads a voting page without an interface to Steam and credits votes in rewards. Since the voting page has its own login, the player must be able to enter in the plugin what his username is on this voting page. The Votingsite ist deutsche-arkserver.de and the "Vote JSON API" Site is something i show u in an screenshot (edited)
🐨Dream Doctor🦘 9/14/2021 11:02 AM
You're aware of the existing Vote Rewards plugin?
11:04 AM
Is there a way to get the current server version using the API?
Avatar
Avatar
🐨Dream Doctor🦘
Is there a way to get the current server version using the API?
Not directly, maybe some field in game mode, game state, game instance or shooter game session. I know you could get server name from a query to steam and parse version from there, but no idea of the way to do it from code
Avatar
Avatar
🐨Dream Doctor🦘
You're aware of the existing Vote Rewards plugin?
yea i know voterewards plugin but there is no way to add deutsche-arkserver.de because they dont use steam as login feature.
Avatar
Avatar
🐨Dream Doctor🦘
Is there a way to get the current server version using the API?
session data has the version
Avatar
Avatar
WETBATMAN
session data has the version
🐨Dream Doctor🦘 9/14/2021 12:24 PM
Oh thanks. How do I access that?
Avatar
Hook_FOnlineSessionSteam_UpdateSession(FOnlineSessionSteam* _this, FName SessionName, FOnlineSessionSettings* UpdatedSessionSettings, bool bShouldRefreshOnlineData)
12:26 PM
i had to hook this to obtain a pointer
Avatar
🐨Dream Doctor🦘 9/14/2021 12:27 PM
Oh nice, thank you 🙂
Avatar
struct FOnlineSessionSteam : IOnlineSession { FNamedOnlineSession* GetGameServerSession() { return NativeCall<FNamedOnlineSession*>(this, "FOnlineSessionSteam.GetGameServerSession"); } };
Avatar
Avatar
WETBATMAN
struct FOnlineSessionSteam : IOnlineSession { FNamedOnlineSession* GetGameServerSession() { return NativeCall<FNamedOnlineSession*>(this, "FOnlineSessionSteam.GetGameServerSession"); } };
🐨Dream Doctor🦘 9/14/2021 2:18 PM
So that must be something custom you've come up with Wetbatman? I can't find any of that anywhere in the API? Very lost lol
Avatar
Avatar
🐨Dream Doctor🦘
So that must be something custom you've come up with Wetbatman? I can't find any of that anywhere in the API? Very lost lol
these structs are not inside the API
2:20 PM
i had to manually dump them and include them inside my plugin
Avatar
🐨Dream Doctor🦘 9/14/2021 2:20 PM
Ah ok, that explains it 🙂
Avatar
Avatar
WETBATMAN
i had to manually dump them and include them inside my plugin
🐨Dream Doctor🦘 9/14/2021 2:21 PM
I don't suppose you'd consider making a pull request would you? That hook looks incredibly useful.
Avatar
that's probably a good idea, i also use something similar in HWIDBans to obtain the query and game ports 😄
2:22 PM
the session name contains the server name + game server version
Avatar
🐨Dream Doctor🦘 9/14/2021 2:23 PM
Getting reliable access to the server version could be so incredibly useful, and server name too.
Avatar
Avatar
🐨Dream Doctor🦘
Getting reliable access to the server version could be so incredibly useful, and server name too.
you can rename the server on runtime like this 😛
Avatar
🐨Dream Doctor🦘 9/14/2021 2:24 PM
Haha! Probably not 😉
2:24 PM
you can hah
2:25 PM
i prefix my sotf servers like this
Avatar
🐨Dream Doctor🦘 9/14/2021 2:27 PM
Is it the same as AGameSession.SessionName? struct AGameSession { int& MaxSpectatorsField() { return *GetNativePointerField<int*>(this, "AGameSession.MaxSpectators"); } int& MaxPlayersField() { return *GetNativePointerField<int*>(this, "AGameSession.MaxPlayers"); } char& MaxSplitscreensPerConnectionField() { return *GetNativePointerField<char*>(this, "AGameSession.MaxSplitscreensPerConnection"); } bool& bRequiresPushToTalkField() { return *GetNativePointerField<bool*>(this, "AGameSession.bRequiresPushToTalk"); } FName& SessionNameField() { return *GetNativePointerField<FName*>(this, "AGameSession.SessionName"); } };
Avatar
it should be, yeah
Avatar
🐨Dream Doctor🦘 9/14/2021 2:30 PM
There's a few functions in GameSession that I can try that look like they might work for now. But yours looks much better. It would be amazing if you find the time to submit it some time. 🙂 (edited)
Avatar
🐨Dream Doctor🦘 9/14/2021 3:08 PM
So this will get you the Session Name, which as Wetbatman says contains the Server Name and version. void Hook_AShooterGameSession_RegisterServer(AShooterGameSession* _this) { std::cout << "Session Name: " << _this->SessionNameField().ToString().ToString() << std::endl; AShooterGameSession_RegisterServer_original(_this); }
3:09 PM
That function runs once on startup, and perhaps again if the server loses connection to steam for some reason.
Avatar
There should be a way to get game session without having to rely on a hook
Avatar
Avatar
🐨Dream Doctor🦘
That function runs once on startup, and perhaps again if the server loses connection to steam for some reason.
AGameSession* GameSession = ArkApi::GetApiUtils().GetShooterGameMode()->GameSessionField();
3:58 PM
Maybe the field/session isn't fully up on plugin load, so your hook might be better actually
Avatar
Avatar
Pelayori
AGameSession* GameSession = ArkApi::GetApiUtils().GetShooterGameMode()->GameSessionField();
Else you could do this on InitGame (edited)
Avatar
🐨Dream Doctor🦘 9/14/2021 3:59 PM
Oh nice! Thank you!
🤟 1
Avatar
Avatar
Raiden
Hey, I'm currently trying to retrieve data from dino AttackInfos arrays such as the AttackRange and MeleeDamageAmount of an attack, however it only seems to return valid results from the first element of the array. Subsequent elements seem to always return a value of 0, which shouldn't be the case (also checked several of their values in the DevKit to verify). Does anyone know why that might be?
Any insights on this? TArrays are somewhat new to me, but that syntax example I posted above has been working for every other TArray I've come across.
Avatar
Avatar
Raiden
Any insights on this? TArrays are somewhat new to me, but that syntax example I posted above has been working for every other TArray I've come across.
Yeah the problem isn't from the TArray
4:55 PM
Let me dump that struct and see the fields
Avatar
Avatar
Pelayori
Yeah the problem isn't from the TArray
it works fine though
4:58 PM
been using that to change attack speed of dinos from config
4:58 PM
😄
Avatar
Hmm (edited)
Avatar
if (!dinoConf["AttackSpeedModifiers"].empty()) { for (auto &element : dinoConf["AttackSpeedModifiers"]) { _this->AttackInfosField()[element["Index"].get<int>()].RiderAttackIntervalField() = element["AttackSpeed"].get<float>(); } }
4:59 PM
_this is APrimalDinoCharacter
Avatar
I just tried setting a dino's attacks MeleeDamageAmountFields to 1000 like that ^, and got strange results similar to when I try reading the data. The first attack index was affected, however it dealt 65,595,624 damage with the attack rather than 1000.. it didn't seem to affect any subsequent attack indexes though, they just dealt the regular attack's expected base damage amount. (edited)
Avatar
so... no one can make me this kind of plugin?
Avatar
You will probably have more luck contacting developers directly
Avatar
u have an dev name who r open for this kind of plugin?
Avatar
No, I don't
Avatar
Avatar
Aracin
yea i know voterewards plugin but there is no way to add deutsche-arkserver.de because they dont use steam as login feature.
It is in the progress lol
11:04 PM
I have sent to specifically to https://deutsche-arkserver.de how to create an integration with the vote reward
Avatar
Avatar
Foppa
I have sent to specifically to https://deutsche-arkserver.de how to create an integration with the vote reward
oh rly?
Avatar
Yes. i'm waiting for them to finalise their endpoints so i have something to check for votes 🙂
Avatar
jraServerAPI 9/16/2021 4:52 AM
Hello everyone! Does anyone have any thoughts about the Deadon food glitch/bug? I assume its a bug. It's when you have a bunch of daedons and their Food is empty, and you can easily refill their food by putting raw meat in their inventory (or in a feeding trough) and then just leave the rendering area and come back. And magically they will have devoured all the food and fill up their food level. It's a mechanic that's been in ark for as long as I remember. The problem is that when players do this with very large daedons, it lags the server quite a bit depending on how many they are filling. (I'm assuming this is because Wildcard is devouring each piece of raw meat one at a time in a loop or something) I'm wondering if there's anyway to detect this mechanic and prevent it via a plugin? Since Wildcard cant seem to do it, or doesn't care to fix it. 🤷‍♂️ Thanks! (edited)
Avatar
jraServerAPI 9/16/2021 5:01 AM
Here is a video demonstrating the lag: https://youtu.be/BD8jsFpT9gc (edited)
Avatar
Theorically it is intended behaviour, and the lag is derived by the calculations done I guess
Avatar
I'm not sure but i troubleshooted that, can't remember what we found out about that
Avatar
Avatar
Pelayori
Theorically it is intended behaviour, and the lag is derived by the calculations done I guess
jraServerAPI 9/16/2021 8:12 PM
yeah, i agree. But do you think it's an actual intended behavior by Wildcard? Or just a result of the way the game is programmed? and they just dont give a crap 😆
Avatar
Avatar
jraServerAPI
yeah, i agree. But do you think it's an actual intended behavior by Wildcard? Or just a result of the way the game is programmed? and they just dont give a crap 😆
Result of the game
8:14 PM
the code is intended to refill food on unstasis
Avatar
UPrimalCharacterStatusComponent* status = dino->GetCharacterStatusComponent(); char* stats = status->NumberOfLevelUpPointsAppliedField()(); I am trying to figure out why the stats from dinos are negative after the stats gets above 127 points. For example, i have a giga with 150 points on damage and the status (int)stats[8] gives me -108 and a rex with 150 gives -106
Avatar
Avatar
Uaca
UPrimalCharacterStatusComponent* status = dino->GetCharacterStatusComponent(); char* stats = status->NumberOfLevelUpPointsAppliedField()(); I am trying to figure out why the stats from dinos are negative after the stats gets above 127 points. For example, i have a giga with 150 points on damage and the status (int)stats[8] gives me -108 and a rex with 150 gives -106
overflow
3:43 PM
the stat can only hold numbers until a certain number
Avatar
and there is another place to get the correct values?
Avatar
not really
3:49 PM
this has been a thing since the game release 😄
3:50 PM
when i was hosting very boosted modded servers i had to warn players to not level a stat past 255 points
3:50 PM
otherwise it would reset 😄
Avatar
There's a GetLevelupPoints in character status comp, but might be same results
Avatar
Avatar
Pelayori
There's a GetLevelupPoints in character status comp, but might be same results
it will yeah, it just reads the stats from the stat array
Avatar
too bad 😦
4:36 PM
the egg incubator can read the stats somewhere, it displays 150
4:36 PM
i was hopping that would be available somewhere
Avatar
Check egg incubator code
Avatar
i would except i have no idea how to do it 😅
Avatar
You'd need the dev kit
Avatar
Avatar
Uaca
UPrimalCharacterStatusComponent* status = dino->GetCharacterStatusComponent(); char* stats = status->NumberOfLevelUpPointsAppliedField()(); I am trying to figure out why the stats from dinos are negative after the stats gets above 127 points. For example, i have a giga with 150 points on damage and the status (int)stats[8] gives me -108 and a rex with 150 gives -106
You should just be able to check if the returned Stat Value is less than zero, and add 256 to it if so to get the correct value you'd see in game. That works for me when testing on player levels.
Avatar
Avatar
Fenix
`FString mind1 = FString(config["General"].value("MindControl", "Blueprint'/Game/PrimalEarth/CoreBlueprints/Buffs/Buff_Base_Disease_Low.Buff_Base_Disease_Low'")); UClass* Class1 = UVictoryCore::BPLoadClass(&mind1); if (AttackerShooterController->GetPlayerCharacter()->GetBuff(Class1)) { Log::GetLog()->warn("view"); return; } no fount detecte player and buff (edited)
jraServerAPI 9/20/2021 5:36 PM
Example code of how to detect if a player is using mind control with a Noglin: c++ bool isPlayerUnderNoglinMindControl(AShooterPlayerController* player_controller) { auto buffs = player_controller->GetPlayerCharacter()->BuffsField(); for (const auto& buff : buffs) { const FString bpBuff = ArkApi::GetApiUtils().GetBlueprint(buff); //const FString bpPlayerUsingNoglin= L"Blueprint'/Game/Genesis2/Dinos/BrainSlug/Buff_BrainSlugPostProccess.Buff_BrainSlugPostProccess'"; const FString bpPlayerUnderMindControl = L"Blueprint'/Game/Genesis2/Dinos/BrainSlug/Buff_BrainSlug_HumanControl.Buff_BrainSlug_HumanControl'"; if (bpPlayerUnderMindControl == bpBuff) { // Player is under Noglin mind control return true; } } return false; } Hope this helps! (edited)
👍 1
ooohhh_yeeeaahhh 1
Avatar
@jraServerAPI I already fixed it, it works for me xd FString mind = FString(config["General"].value("MindControl", "Blueprint'/Game/Genesis2/Dinos/BrainSlug/Buff_BrainSlug_HumanControl.Buff_BrainSlug_HumanControl'")); UClass* Class = UVictoryCore::BPLoadClass(&mind); if (AttackerShooterController->GetPlayerCharacter()->GetBuff(Class)) { ArkApi::GetApiUtils().SendChatMessage(AttackerShooterController, *KillGetText("Sender"), *KillGetText("MsgNogglin")); return; } (edited)
👍 1
Avatar
jraServerAPI 9/20/2021 9:21 PM
just about the same thing, but taking a different route 😂 (edited)
Avatar
It could be a worse way since you load the class repeated times
9:35 PM
BPLoadClass could stall the server depending on the class loaded
Avatar
jraServerAPI 9/20/2021 9:46 PM
🤦‍♂️
Avatar
@Pelayori So which one is better mounted? of the two
Avatar
The version not using UVictoryCore::BPLoadClass(&mind) is better
Avatar
Avatar
Lethal
The version not using UVictoryCore::BPLoadClass(&mind) is better
It should hopefully be cached already at run time
5:50 PM
Load Class only stalls if actually loading from disk
Avatar
@substitute then you reprimand me to remove UVictoryCore :: BPLoadClass (& mind) in my code
Avatar
Avatar
Raiden
You should just be able to check if the returned Stat Value is less than zero, and add 256 to it if so to get the correct value you'd see in game. That works for me when testing on player levels.
just tested, and it worked, i am going to check against the values from the incubator. Thanks!
Avatar
Hello, does anyone know how to get the tamed creatures in ark tribute.
Avatar
Avatar
Pelayori
Let me dump that struct and see the fields
Hey did you find anything looking through the dumped DinoAttackInfo struct? I'm curious what the problem would be.
Avatar
No, I didn't find anything relevant
Avatar
Hm that's unfortunate, I'm not finding anything myself either. Thanks for looking into it
Avatar
🐨Dream Doctor🦘 9/27/2021 2:01 PM
There's a few structs that I think contain some data I require, however they are only forward declared in the API and are missing the full declaration. How would I go about getting access to those?
Avatar
Avatar
🐨Dream Doctor🦘
There's a few structs that I think contain some data I require, however they are only forward declared in the API and are missing the full declaration. How would I go about getting access to those?
you need to dump them via IDA
Avatar
Avatar
WETBATMAN
you need to dump them via IDA
🐨Dream Doctor🦘 9/27/2021 2:10 PM
Is there any option other than IDA? I don't really want to spend thousands of dollars.
Avatar
cracked IDA 😄
Avatar
🐨Dream Doctor🦘 9/27/2021 2:37 PM
OK, so assuming I can find IDA somewhere, does anyone have any good info on how to get what I need from IDA?
Avatar
Avatar
🐨Dream Doctor🦘
OK, so assuming I can find IDA somewhere, does anyone have any good info on how to get what I need from IDA?
View->Open Sub views->Local Types
2:41 PM
then just search the struct you want
2:41 PM
right click it and click edit
Avatar
🐨Dream Doctor🦘 9/27/2021 2:43 PM
Thank you!
Avatar
🐨Dream Doctor🦘 9/27/2021 2:57 PM
I think I found what I need. Thanks again @WETBATMAN . My next question is, how do people go about adding the definitions to their source code without having it all overwritten each time they update their API?
Avatar
Avatar
🐨Dream Doctor🦘
I think I found what I need. Thanks again @WETBATMAN . My next question is, how do people go about adding the definitions to their source code without having it all overwritten each time they update their API?
you can add the definitions you require directly into your project too
Avatar
Or submit it to the repo, others might find it useful 🙂
💯 1
Avatar
Avatar
🐨Dream Doctor🦘
I think I found what I need. Thanks again @WETBATMAN . My next question is, how do people go about adding the definitions to their source code without having it all overwritten each time they update their API?
As others have said, give back to the project
6:41 PM
Otherwise you’d just declare them in your own header
6:41 PM
Forward declarations are incomplete and shouldn’t cause an issue with duplicate definitions if you do that
Avatar
🐨Dream Doctor🦘 9/27/2021 10:59 PM
I'd love to submit it to the repo. Haven't made a submission before but I'll do my best!
Avatar
In regards to header additions, most of them are more than welcome. Always good to keep headers updates, or add new stuff into them!
Avatar
🐨Dream Doctor🦘 9/28/2021 3:45 AM
Having a little trouble with my definitions. I'm after FInstalledItemInfo which includes FThreadedTaskContainer. So I try and add that and it includes FThreadedTaskContainer_vtbl and, well it looks like below and obviously doesn't work. struct /*VFT*/ FThreadedTaskContainer_vtbl { void(__fastcall * ~FThreadedTaskContainer)(FThreadedTaskContainer* this); bool(__fastcall* IsActive)(FThreadedTaskContainer* this); void(__fastcall* GetStatus)(FThreadedTaskContainer* this, int*, int*); bool(__fastcall* WasSucessfull)(FThreadedTaskContainer* this); }; struct FThreadedTaskContainer { FThreadedTaskContainer_vtbl* __vftable /*VFT*/; };
3:47 AM
FInstalledItemInfo looks like this: struct FInstalledItemInfo { unsigned __int64 Id; FString Title; FString InstallPath; FString InfoFilePath; TArray<FString, FDefaultAllocator> MapNames; int Version; FGuid GUID; EModType::Type ModType; bool bHasMetaInfo; TMap<FString, FString, FDefaultSetAllocator, TDefaultMapKeyFuncs<FString, FString, 0> > ModMetaInfo; bool RetrievedInfo; bool Subscribed; bool Installed; bool HasError; unsigned __int64 SubscriptionCallback; unsigned __int64 RetrieveInfoCallback; FThreadedTaskContainer* ThreadedCopyProgress; FDirectoryTreeCopyProgress* CopyProgress; }; It seems fine. What happens if I just leave off those last two lines from the struct that I don't need?
Avatar
just make them void* ThreadedCopyProgress; void* CopyProgress; or something, you don't want to change the size of the struct depending on what you're doing
Avatar
Does ark server api have an implementation of tmap? I forget
7:12 AM
if not u can just fill that tmap in the struct with 0x50 too
Avatar
It has TMap
7:31 AM
I use it whenever I can, but sometimes using FString makes it confuse itself. I believe FString hashing func is not working correctly
Avatar
Avatar
🐨Dream Doctor🦘
Having a little trouble with my definitions. I'm after FInstalledItemInfo which includes FThreadedTaskContainer. So I try and add that and it includes FThreadedTaskContainer_vtbl and, well it looks like below and obviously doesn't work. struct /*VFT*/ FThreadedTaskContainer_vtbl { void(__fastcall * ~FThreadedTaskContainer)(FThreadedTaskContainer* this); bool(__fastcall* IsActive)(FThreadedTaskContainer* this); void(__fastcall* GetStatus)(FThreadedTaskContainer* this, int*, int*); bool(__fastcall* WasSucessfull)(FThreadedTaskContainer* this); }; struct FThreadedTaskContainer { FThreadedTaskContainer_vtbl* __vftable /*VFT*/; };
with pdb reader you’re not required to import the entire struct you can simply only make the variables/functions you need available (edited)
Avatar
Avatar
🐨Dream Doctor🦘
FInstalledItemInfo looks like this: struct FInstalledItemInfo { unsigned __int64 Id; FString Title; FString InstallPath; FString InfoFilePath; TArray<FString, FDefaultAllocator> MapNames; int Version; FGuid GUID; EModType::Type ModType; bool bHasMetaInfo; TMap<FString, FString, FDefaultSetAllocator, TDefaultMapKeyFuncs<FString, FString, 0> > ModMetaInfo; bool RetrievedInfo; bool Subscribed; bool Installed; bool HasError; unsigned __int64 SubscriptionCallback; unsigned __int64 RetrieveInfoCallback; FThreadedTaskContainer* ThreadedCopyProgress; FDirectoryTreeCopyProgress* CopyProgress; }; It seems fine. What happens if I just leave off those last two lines from the struct that I don't need?
Like Doug said, void* if you want the structure to have the same size in bytes
2:39 PM
A pointer of T is always a void*
2:40 PM
Because void* is a pointer without a type, aka a pointer to any T
Avatar
Avatar
substitute
Like Doug said, void* if you want the structure to have the same size in bytes
🐨Dream Doctor🦘 9/28/2021 2:42 PM
Thanks Sub.
Avatar
🐨Dream Doctor🦘 9/28/2021 2:50 PM
So is it normal for a lot of stuff you find to end up being empty? I'm working with AShooterGameSession, and I've looked through FShooterGameSessionParams which looks like: struct FShooterGameSessionParams { FName SessionName; FName InitSessionName; bool bIsLAN; bool bIsPresence; bool bIsPrivate; TSharedPtr<FUniqueNetId, 0> UserId; int BestSessionIdx; FString DDUserId; FString DDUserName; unsigned __int64 ModId; FString ServerPassword; FString ServerAdminPassword; FString SpectatorPassword; }; Only about three of those fields return anything. The rest are blank. I've also looked at FShooterSessionData which looks like: const struct FShooterSessionData { int EntryIndex; FString GameName; FString MapName; FString OwnerName; FString DayTimeStr; int NumPlayers; int MaxNumPlayers; int Ping; FString HostAddrWithPort; FString HostAddr; unsigned __int64 ModId; bool bIsOfficial; bool bHasPassword; bool bPVEServer; bool bUsingBattleEye; bool bAllowDownloadCharacters; bool bAllowDownloadItems; bool bIsLegacyServer; bool bLastPlayedSession; bool bHasActiveMods; int QueryPort; int LobbyReportedBuildID; FString SessionId; unsigned __int64 TotalConversionID; FGuid Identifier; }; That is returned in an array which is always empty. I'm getting the reference to ShooterGameSession from void Hook_AShooterGameSession_RegisterServer(AShooterGameSession* _this) which seems to work for other purposes. I even added a 30 second delay to my functions looking at the reference but that made no difference.
Avatar
Avatar
🐨Dream Doctor🦘
So is it normal for a lot of stuff you find to end up being empty? I'm working with AShooterGameSession, and I've looked through FShooterGameSessionParams which looks like: struct FShooterGameSessionParams { FName SessionName; FName InitSessionName; bool bIsLAN; bool bIsPresence; bool bIsPrivate; TSharedPtr<FUniqueNetId, 0> UserId; int BestSessionIdx; FString DDUserId; FString DDUserName; unsigned __int64 ModId; FString ServerPassword; FString ServerAdminPassword; FString SpectatorPassword; }; Only about three of those fields return anything. The rest are blank. I've also looked at FShooterSessionData which looks like: const struct FShooterSessionData { int EntryIndex; FString GameName; FString MapName; FString OwnerName; FString DayTimeStr; int NumPlayers; int MaxNumPlayers; int Ping; FString HostAddrWithPort; FString HostAddr; unsigned __int64 ModId; bool bIsOfficial; bool bHasPassword; bool bPVEServer; bool bUsingBattleEye; bool bAllowDownloadCharacters; bool bAllowDownloadItems; bool bIsLegacyServer; bool bLastPlayedSession; bool bHasActiveMods; int QueryPort; int LobbyReportedBuildID; FString SessionId; unsigned __int64 TotalConversionID; FGuid Identifier; }; That is returned in an array which is always empty. I'm getting the reference to ShooterGameSession from void Hook_AShooterGameSession_RegisterServer(AShooterGameSession* _this) which seems to work for other purposes. I even added a 30 second delay to my functions looking at the reference but that made no difference.
You can try using the pdb reader, something like: type& TheVariableNameField() { return *GetNativePointerField<type*>(this, "ClassName.FieldName"); }
3:46 PM
The Field at the end of the functions is just a convention to know it is a field, and not a function. In the FieldName you should input the variable name as you see it when extracting from ida
Avatar
Use Global as class name if the field is a global variable
Avatar
Avatar
Pelayori
You can try using the pdb reader, something like: type& TheVariableNameField() { return *GetNativePointerField<type*>(this, "ClassName.FieldName"); }
🐨Dream Doctor🦘 9/29/2021 4:29 AM
Thanks Pelayori. Could you expand on this a little? What is the pdb reader? And what would this method work when the other does not?
Avatar
🐨Dream Doctor🦘 9/29/2021 5:00 AM
Sorry, I see. That is added to each field in the struct def, and seems to be used in many of the existing struct defs in the main api.
Avatar
The pdb reader is what makes the magic in the api
10:37 AM
has functions/fields memory adresses and gets it directly, without needing to have the same class definition in the api
Avatar
Avatar
Pelayori
has functions/fields memory adresses and gets it directly, without needing to have the same class definition in the api
🐨Dream Doctor🦘 9/29/2021 11:16 AM
So if we add a struct def like the above FShooterSessionData, why is it that sometimes that works and sometimes it doesn't, and what makes the pdb reader method work better?
Avatar
Avatar
🐨Dream Doctor🦘
So if we add a struct def like the above FShooterSessionData, why is it that sometimes that works and sometimes it doesn't, and what makes the pdb reader method work better?
when you declare a struct that doesn't read function/vars with the pdbreader you're loading everything via fixed offsets (edited)
11:39 AM
so if the struct changes in a game update
11:39 AM
your whole struct is now invalid
11:39 AM
if you read everything via pdbreader it will load offsets and sizes on it's own
11:40 AM
another advantage is that you do not have to define every variable inside a struct with pdbreader
Avatar
One down side however is your structure isn’t the same size as the game’s
5:11 PM
Which does cause problems if a function takes your structure as an arg.
Avatar
Pointers shouldn't have an issue tho, at least that I can recall
Avatar
PDB reader is indeed OP
bongoPing 1
6:50 PM
And word on the street is ark2 is shipping with the PDB as well
6:50 PM
PogU
6:52 PM
At least jat said that it likely will but ark2 I guess is still pretty far away
6:52 PM
Do anything can happen lol
Avatar
i do not see any reason any game shouldn't ship server pdb
6:52 PM
(if they made it properly server shouldn't have client funcs anyway) 😄
6:53 PM
Haha yeah
6:55 PM
Plus a game like ark the devs respond quickly to exploits and stuff so I guess it’s not that bad
6:55 PM
And it helps them w crashes ppl get
Avatar
Avatar
Pelayori
Pointers shouldn't have an issue tho, at least that I can recall
I disagree
6:56 PM
If the function called expects a pointer to a struct of a certain size
6:56 PM
And your instance isn’t that size
6:57 PM
It’ll cause a problem
6:57 PM
It’s the root cause of crashes for the sphere overlap
Avatar
@substitute you’re a pointer Fingerguns
Avatar
Deleted User 9/30/2021 2:20 AM
Slightly off topic, I was wondering if anyone knew of a service that could give me info on servers through a query. I've looked at Battlemetrics which is a bit slow, and the A2S protocol that doesn't give much info either.
Avatar
Avatar
Deleted User
Slightly off topic, I was wondering if anyone knew of a service that could give me info on servers through a query. I've looked at Battlemetrics which is a bit slow, and the A2S protocol that doesn't give much info either.
I would use A2S unless you want to use RCON
2:22 AM
Battlemetrics uses A2S
2:22 AM
if you want more info than A2S and you want something more reliable than RCON, I would suggest you write a custom plugin
2:23 AM
A2S requires writing your own program to query your servers
2:23 AM
there are libraries for C# that implement A2S
2:23 AM
I'm sure there's some for other languages too
Avatar
Deleted User 9/30/2021 2:24 AM
Ah this isn't for one server. I run a bot that tracks servers' player counts and whatnot, with join notifications. I'm just looking for a reliable service to give me that info, but BM has some drawbacks :( >>> a2s.info(address) SourceInfo(protocol=17, server_name=" 24/7 Dustbowl :: Nemu's Stomping Ground", map_name='cp_dustbowl', folder='tf', game='Team Fortress', app_id=440, player_count=31, max_players=33, bot_count=21, server_type='d', platform='l', password_protected=False, vac_enabled=True, version='5579073', edf=177, port=27015, steam_id=85568392920040090, stv_port=None, stv_name=None, keywords='brutus,celt,couch,cp,dustbowl,increased_maxplayers,nemu,nocrits,nodmgspread,pony,replays,vanilla', game_id=440, ping=0.253798684978392) >>> a2s.players(address) [Player(index=0, name='Brutus', score=34, duration=836.4749145507812), Player(index=0, name='RageQuit', score=6, duration=1080.8099365234375), Player(index=0, name="Screamin' Eagles", score=1, duration=439.8598327636719)]
2:24 AM
That's an example of it in Python, which doesn't give much info :(
Avatar
Avatar
Deleted User
Ah this isn't for one server. I run a bot that tracks servers' player counts and whatnot, with join notifications. I'm just looking for a reliable service to give me that info, but BM has some drawbacks :( >>> a2s.info(address) SourceInfo(protocol=17, server_name=" 24/7 Dustbowl :: Nemu's Stomping Ground", map_name='cp_dustbowl', folder='tf', game='Team Fortress', app_id=440, player_count=31, max_players=33, bot_count=21, server_type='d', platform='l', password_protected=False, vac_enabled=True, version='5579073', edf=177, port=27015, steam_id=85568392920040090, stv_port=None, stv_name=None, keywords='brutus,celt,couch,cp,dustbowl,increased_maxplayers,nemu,nocrits,nodmgspread,pony,replays,vanilla', game_id=440, ping=0.253798684978392) >>> a2s.players(address) [Player(index=0, name='Brutus', score=34, duration=836.4749145507812), Player(index=0, name='RageQuit', score=6, duration=1080.8099365234375), Player(index=0, name="Screamin' Eagles", score=1, duration=439.8598327636719)]
I would suggest a custom plugin
2:24 AM
A2S is inaccurate on Ark sometimes
2:24 AM
for player list
2:25 AM
or use RCON
Avatar
Deleted User 9/30/2021 2:25 AM
I don't have admin perms on any of the servers. This is a bot service, like the Eye of Sauron bot.
Avatar
also scraping BM for that info for your bot probably breaks their fair use
Avatar
Avatar
Deleted User
I don't have admin perms on any of the servers. This is a bot service, like the Eye of Sauron bot.
Yes, I created the proof of concept for bots like that
Avatar
Deleted User 9/30/2021 2:25 AM
I use their API with a key
Avatar
to do that you need to implement the connection through Steamworks
2:26 AM
it requires a copy of Steam installed
2:26 AM
if you want to scale it, then you need to also implement a Steam client
2:26 AM
(something like SteamKit2)
2:26 AM
I created a program for this a long time ago that implements a Steam client and does the connection handshake with the server via Steamworks
2:26 AM
it scales for N accounts
2:27 AM
where N is however many accounts that own Ark that you have in your possession
Avatar
Deleted User 9/30/2021 2:27 AM
Oh
Avatar
Banned accounts work for this (BE, VAC, etc...) as you get the player info from Steam really early in the handshake phase
2:27 AM
but the general idea is
2:27 AM
implement a steam client -> implement the server/client auth+handshake -> get the player list
2:28 AM
and then scale it for however many accounts you have (edited)
Avatar
Deleted User 9/30/2021 2:28 AM
And I can get information like their steam id, playtime, etc?
Avatar
Yes
2:28 AM
but it also isn't 100% accurate all the time
2:28 AM
Ark is jank
kekd 1
Avatar
Deleted User 9/30/2021 2:28 AM
Oh wow. Is this a complicated task?
Avatar
sometimes "zombie" players are included
2:28 AM
which there is no easy method to filter
Avatar
Avatar
Deleted User
Oh wow. Is this a complicated task?
if you don't know what you are doing, yes
2:29 AM
iirc the packets needed to use SteamKit2 to auth with a server you have to implement yourself
2:29 AM
which requires injecting a DLL into your Steam Client to log all protobuff msgs
2:29 AM
so you can figure out which is the right one so you can make your own
Avatar
Deleted User 9/30/2021 2:29 AM
I see, thanks a lot
Avatar
also Steam doesn't chunk the whole player list as an array (edited)
2:30 AM
just one account at a time
2:30 AM
I would recommend tracking the time since last player msg and if it exceeds some threshold (I did 100 ms) then you can assume you have the entire playlist from the server
Avatar
Been digging around the interwebs for about an hour now... I know there is a AllowPlayerToJoinNoCheck <SteamID> and cheat DisallowPlayerToJoinNoCheck <SteamID> command which updates the PlayersJoinNoCheckList.txt file, but is there one specifically for the PlayersExclusiveJoinList.txt file? No check allows players to join a capped server? and idk if true or not cause it's google but mentioned the hidden ability for admin command usage Exclusive join is strictly allowing the player to join the server, thats it. Thanks for any insight.
Avatar
Not near my computer but when you do “showmyadminmanager” and on bottom you add someone to the “white listed players” that allows them to join a server that’s capped
7:04 AM
Whatever function is being called there does it, I can check when i get back
Avatar
Idk if that helps lol
Avatar
That's the PlayersJoinNoCheckList.txt if it allows players to join full servers. Which is right next to the Exclusivejoin.txt file in the win64 folder, the one I'm looking for a command to make life easier Or at least confirmation that it gives no admin abilities. I've been using NoCheckList for awhile but I havent noticed anything admin command use wise. So as long as that's not a thing, the over full joining is no biggie in my case. Command for exclusive would be perfect tho. (edited)
Avatar
Don’t think it enables admin
9:13 AM
Go ahead and try it tho
9:13 AM
On a local server
Avatar
🐨Dream Doctor🦘 9/30/2021 3:07 PM
I'm still not having much luck with AShooterGameSession. It looks like this in GameState.h: struct AShooterGameSession : AGameSession { TArray<FInstalledItemInfo>& CachedModsField() { return *GetNativePointerField<TArray<FInstalledItemInfo>*>(this, "AShooterGameSession.CachedMods"); } TArray<FShooterSessionData>& ThreadSafeSearchResultsField() { return *GetNativePointerField<TArray<FShooterSessionData>*>(this, "AShooterGameSession.ThreadSafeSearchResults"); } TArray<UNetConnection*> FailedAuthTokenClientConnectionsField() { return *GetNativePointerField<TArray<UNetConnection*>*>(this, "AShooterGameSession.FailedAuthTokenClientConnections"); } TArray<FUniqueNetIdUInt64>& FailedAuthTokenClientUniqueIDsField() { return *GetNativePointerField<TArray<FUniqueNetIdUInt64>*>(this, "AShooterGameSession.FailedAuthTokenClientUniqueIDs"); } FShooterGameSessionParams& CurrentSessionParamsField() { return *GetNativePointerField<FShooterGameSessionParams*>(this, "AShooterGameSession.CurrentSessionParams"); } TSharedPtr<FShooterOnlineSessionSettings, 0>& HostSettingsField() { return *GetNativePointerField<TSharedPtr<FShooterOnlineSessionSettings, 0>*>(this, "AShooterGameSession.HostSettings"); } TSharedPtr<FShooterOnlineSearchSettings, 0>& SearchSettingsField() { return *GetNativePointerField<TSharedPtr<FShooterOnlineSearchSettings, 0>*>(this, "AShooterGameSession.SearchSettings"); } bool& bFoundSessionField() { return *GetNativePointerField<bool*>(this, "AShooterGameSession.bFoundSession"); } I'm trying to get to CachedMods and ThreadSafeSearchResults but they both return empty arrays. I've tried checking them with Hook_AShooterGameSession_RegisterServer(AShooterGameSession* _this) and using that reference. I've also tried by adding an RCON command which uses AShooterGameSession* MyShooterSession = static_cast<AShooterGameSession*>(ArkApi::GetApiUtils().GetShooterGameMode()->GameSessionField()); to get a AShooterGameSession refernce. I can run the command after the server has started and settled to see if anything changes, but it doesn't. Has anyone else used either of those arrays in their work and been able to make them work?
3:11 PM
I can successfully get several fields from the AShooterGameSession reference but they're all ints and FStrings that are inherited from AGameSession.
Avatar
Avatar
🐨Dream Doctor🦘
I'm still not having much luck with AShooterGameSession. It looks like this in GameState.h: struct AShooterGameSession : AGameSession { TArray<FInstalledItemInfo>& CachedModsField() { return *GetNativePointerField<TArray<FInstalledItemInfo>*>(this, "AShooterGameSession.CachedMods"); } TArray<FShooterSessionData>& ThreadSafeSearchResultsField() { return *GetNativePointerField<TArray<FShooterSessionData>*>(this, "AShooterGameSession.ThreadSafeSearchResults"); } TArray<UNetConnection*> FailedAuthTokenClientConnectionsField() { return *GetNativePointerField<TArray<UNetConnection*>*>(this, "AShooterGameSession.FailedAuthTokenClientConnections"); } TArray<FUniqueNetIdUInt64>& FailedAuthTokenClientUniqueIDsField() { return *GetNativePointerField<TArray<FUniqueNetIdUInt64>*>(this, "AShooterGameSession.FailedAuthTokenClientUniqueIDs"); } FShooterGameSessionParams& CurrentSessionParamsField() { return *GetNativePointerField<FShooterGameSessionParams*>(this, "AShooterGameSession.CurrentSessionParams"); } TSharedPtr<FShooterOnlineSessionSettings, 0>& HostSettingsField() { return *GetNativePointerField<TSharedPtr<FShooterOnlineSessionSettings, 0>*>(this, "AShooterGameSession.HostSettings"); } TSharedPtr<FShooterOnlineSearchSettings, 0>& SearchSettingsField() { return *GetNativePointerField<TSharedPtr<FShooterOnlineSearchSettings, 0>*>(this, "AShooterGameSession.SearchSettings"); } bool& bFoundSessionField() { return *GetNativePointerField<bool*>(this, "AShooterGameSession.bFoundSession"); } I'm trying to get to CachedMods and ThreadSafeSearchResults but they both return empty arrays. I've tried checking them with Hook_AShooterGameSession_RegisterServer(AShooterGameSession* _this) and using that reference. I've also tried by adding an RCON command which uses AShooterGameSession* MyShooterSession = static_cast<AShooterGameSession*>(ArkApi::GetApiUtils().GetShooterGameMode()->GameSessionField()); to get a AShooterGameSession refernce. I can run the command after the server has started and settled to see if anything changes, but it doesn't. Has anyone else used either of those arrays in their work and been able to make them work?
are you making a client cheat or something lol?
3:36 PM
ThreadSafeSearchResults is the array of servers on the client
3:36 PM
when you click join ark
Avatar
Avatar
WETBATMAN
are you making a client cheat or something lol?
🐨Dream Doctor🦘 9/30/2021 10:34 PM
Ha! Well that explains why it's not working! rofl! facepalm ok now I feel stupid lol
Avatar
Avatar
🐨Dream Doctor🦘
Ha! Well that explains why it's not working! rofl! facepalm ok now I feel stupid lol
🐨Dream Doctor🦘 10/1/2021 8:44 AM
So to avoid future humiliation in my investigations, is there any way to identify and avoid client code? Is there any obvious way to know which is which?
Avatar
Test & fail
Avatar
Avatar
Pelayori
Test & fail
🐨Dream Doctor🦘 10/1/2021 8:50 AM
You'd think I'd be a lot further ahead by now then lol
Avatar
There are some indicators, like if they call get hud or client side only functions that are obvious
8:52 AM
Other than that, test & fail
Avatar
🐨Dream Doctor🦘 10/1/2021 8:54 AM
I was really hoping AShooterGameSession.CachedMods contained a list of mods being used by the server, but maybe it's a list of mods on the client. Still hoping to find the server's list of mods.
Avatar
Avatar
🐨Dream Doctor🦘
I was really hoping AShooterGameSession.CachedMods contained a list of mods being used by the server, but maybe it's a list of mods on the client. Still hoping to find the server's list of mods.
What do you need from mods, mod ids or names from its pgd?
Avatar
Avatar
Pelayori
What do you need from mods, mod ids or names from its pgd?
🐨Dream Doctor🦘 10/1/2021 11:36 AM
I was hoping to get the same details show in CachedMods, all the versioning for example. I'd like to know exactly what mod versions are installed on the server without having to try and dig through the mod files.
Avatar
Not sure if mods contain versioning in the files
11:37 AM
Pretty sure that's controlled by steam
11:37 AM
You can get mod ids and their individual pgds tho
Avatar
🐨Dream Doctor🦘 10/1/2021 12:26 PM
Yeah you can get some versioning info from the steam files on disk. ASM does some of that. But it's messy and unpleasant. That's why I was so excited to find FInstalledItemInfo which seems to have everything needed, but apparently it's only used on the client. struct FInstalledItemInfo { unsigned __int64 Id; FString Title; FString InstallPath; FString InfoFilePath; TArray<FString,FDefaultAllocator> MapNames; int Version; FGuid GUID; EModType::Type ModType; bool bHasMetaInfo; TMap<FString,FString,FDefaultSetAllocator,TDefaultMapKeyFuncs<FString,FString,0> > ModMetaInfo; bool RetrievedInfo; bool Subscribed; bool Installed; bool HasError; unsigned __int64 SubscriptionCallback; unsigned __int64 RetrieveInfoCallback; FThreadedTaskContainer *ThreadedCopyProgress; FDirectoryTreeCopyProgress *CopyProgress; };
Avatar
Hmm yeah, not sure if you can get that info from any other source
Avatar
Avatar
Pelayori
Hmm yeah, not sure if you can get that info from any other source
Steam API + mod id
3:07 PM
Maybe
Avatar
I've been searching what info does steam api provide in regards to workshop and didn't find anything useful
10:40 PM
i think in OnlineSubsystem there's info on the mods
10:41 PM
returns array of that struct dreamdoctor found
10:43 PM
void __fastcall FOnlineSubsystemSteam::GetMods(FOnlineSubsystemSteam *this, TArray<FInstalledItemInfo,FDefaultAllocator> *Mods) this one
Avatar
i don't have the api project setup on this computer but you can call IOnlineSubsystem::Get(FName_NONE); and that will return fonlinesubsystemsteam, then u can call fonlinesubsystemsteam::Getmods and pass that array of struct
11:44 PM
IOnlineSubsystem::Get| 000001AD9E22A800 ModID: 1136125765| InstallPath: ../../../ShooterGame/Content/Mods/1136125765| ModTitle: Bitou2k's Binocular ModID: 1231538641| InstallPath: ../../../ShooterGame/Content/Mods/1231538641| ModTitle: ARKomatic ModID: 1404697612| InstallPath: ../../../ShooterGame/Content/Mods/1404697612| ModTitle: Awesome SpyGlass! ModID: 1428596566| InstallPath: ../../../ShooterGame/Content/Mods/1428596566| ModTitle: Auto Engrams! ModID: 1609138312| InstallPath: ../../../ShooterGame/Content/Mods/1609138312| ModTitle: Dino Storage v2 ModID: 1829635965| InstallPath: ../../../ShooterGame/Content/Mods/1829635965| ModTitle: HG Remap Stack V1.51 ModID: 1840739225| InstallPath: ../../../ShooterGame/Content/Mods/1840739225| ModTitle: Getter Component ModID: 1941328406| InstallPath: ../../../ShooterGame/Content/Mods/1941328406| ModTitle: Solo Farm Mod ModID: 1999447172| InstallPath: ../../../ShooterGame/Content/Mods/1999447172| ModTitle: Super Structures ModID: 2501968412| InstallPath: ../../../ShooterGame/Content/Mods/2501968412| ModTitle: MTS Ragnarok Extension ModID: 566885854| InstallPath: ../../../ShooterGame/Content/Mods/566885854| ModTitle: Death Helper ModID: 928102085| InstallPath: ../../../ShooterGame/Content/Mods/928102085| ModTitle: HG Stacking Mod 10000-90 V315
11:44 PM
ah oops i forgot to print add the guid for version
11:48 PM
im guessing the guid is what ud wanna check to for version anyway
Avatar
IOnlineSubsystem::Get| 00000222BCB0A800 ModID: 1136125765| ModTitle: Bitou2k's Binocular| ModGUID: 3864034354-1077919130-1255057850-2516745270 ModID: 1231538641| ModTitle: ARKomatic| ModGUID: 3851322781-1221503930-3744069779-3148035478 ModID: 1404697612| ModTitle: Awesome SpyGlass!| ModGUID: 2278268445-1225547686-3572651442-2502918914 ModID: 1428596566| ModTitle: Auto Engrams!| ModGUID: 999821796-1114061443-1560261803-2842499181 ModID: 1609138312| ModTitle: Dino Storage v2| ModGUID: 753996299-1259150744-545294743-2268441977
11:58 PM
struct Guid { uint32_t A; uint32_t B; uint32_t C; uint32_t D; }; struct FInstalledItemInfo { uint64_t Id; //0x00 FString Title; //0x08 FString InstallPath; //0x18 FString InfoFilePath; //0x28 TArray<FString> MapNames; //0x38 uint32_t Version; //0x48 Guid GUID; //0x4C uint32_t ModType; //0x5C bool bHasMetaInfo; //0x60 unsigned char Buffer1[0x07]; //0x61 unsigned char ModMetaInfo[0x50]; //0x68 bool RetrievedInfo; //0xB8 bool Subscribed; //0xB9 bool Installed; //0xBA bool HasError; //0xxBB unsigned char Buffer2[0x04]; //0xBC uint64_t SubscriptionCallback; //0xC0 uint64_t RetrieveInfoCallback; //0xC8 void* ThreadedCopyProgress; //0xD0 void* CopyProgress; //0xD8 }; using IOnlineSubsystem__Get_Type = void*(*)(FName*); static IOnlineSubsystem__Get_Type IOnlineSubsystem__Get_Original = reinterpret_cast<IOnlineSubsystem__Get_Type>(DetourFindFunction("ShooterGameServer.exe", "IOnlineSubsystem::Get")); static auto None = FName("None"); void* OnlineSubsystem = IOnlineSubsystem__Get_Original(&None); printf("IOnlineSubsystem::Get| %p\n", OnlineSubsystem); TArray<FInstalledItemInfo> Mods{}; using FOnlineSubsystemSteam__GetMods_Type = void(*)(void*, TArray<FInstalledItemInfo>*); static FOnlineSubsystemSteam__GetMods_Type FOnlineSubsystemSteam__GetMods_Original = reinterpret_cast<FOnlineSubsystemSteam__GetMods_Type>(DetourFindFunction("ShooterGameServer.exe", "FOnlineSubsystemSteam::GetMods")); FOnlineSubsystemSteam__GetMods_Original(OnlineSubsystem, &Mods); for (auto&& Mod : Mods) { printf("ModID: %llu| ModTitle: %s| ModGUID: %u-%u-%u-%u\n", Mod.Id, Mod.Title.IsValid() ? Mod.Title.ToString().c_str() : "", Mod.GUID.A, Mod.GUID.B, Mod.GUID.C, Mod.GUID.D); }
11:58 PM
i didn't use server api cause im on a dif comp but here's what i did: i'm sure the funcs could be added to the server api
Avatar
🐨Dream Doctor🦘 10/2/2021 2:56 AM
Thanks @dougy I'll check it out!
Avatar
Avatar
Pelayori
I've been searching what info does steam api provide in regards to workshop and didn't find anything useful
🐨Dream Doctor🦘 10/2/2021 2:59 AM
I'll try and dig up all the useful stuff I have somewhere. I made a small contribution to the now-defunct Atlas-Server-Manager project many years ago and it involved determining when a mod needed an update.
Avatar
Avatar
🐨Dream Doctor🦘
Thanks @dougy I'll check it out!
np, its just IOnlineSubsystem::Get(FName("None")); then treat that result as FOnlineSubsystemSteam and call FOnlineSubsystemSteam::GetMods
3:10 AM
altho i think it brings back every mod in the that folder even if ur not using it
3:12 AM
i think theres a better way
3:12 AM
TArray<FModInfo,FDefaultAllocator> *__fastcall FPackageName::GetMods(TArray<FModInfo,FDefaultAllocator> *result)
3:12 AM
idk if it works as the server though
3:12 AM
worth a try
Avatar
🐨Dream Doctor🦘 10/3/2021 6:04 AM
@dougy Is there anything else you might have done to get your code to work on your server? I'm able to get the line IOnlineSubsystem::Get| 000001FFABE92100 but the FArray of FInstalledItemInfo is always empty.
Avatar
Hmm I don’t think. I can try it In server api framework this week (edited)
Avatar
Hi guys, could you tell me a good host for a 6 server cluster?
Avatar
🐨Dream Doctor🦘 10/4/2021 7:09 AM
I'm sure this is a silly question. Can anyone tell me why this code crashes the server? class ServerInfo { private: ServerRates MyServerRates; AShooterGameMode* MyGameMode; public: void UpdateRates() { MyGameMode = ArkApi::GetApiUtils().GetShooterGameMode(); MyServerRates.XPMultiplier = MyGameMode->XPMultiplierField(); } } Server crashes when UpdateRates is called. If I modify UpdateRates to this it works fine with no crashes. void UpdateRates() { MyServerRates.XPMultiplier = ArkApi::GetApiUtils().GetShooterGameMode()->XPMultiplierField(); } (edited)
Avatar
Validate ShooterGameMode before you dereference it, the crash should give you an exact line number of the crash if it loaded the pdb.
Avatar
What he said, that only thing I can think of is that being called before the game is init'ed
7:15 AM
Oh and, in your struct, how do you assign game mode?
Avatar
MyGameMode = ArkApi::GetApiUtils().GetShooterGameMode();
Avatar
Shoot, didn't see it (edited)
Avatar
I didn't either at first.
7:18 AM
Anyways a simple nullptr or IsValid check will fix this, though like Pelayori said you should only be trying to interact with the GameMode after the server is fully initialized, if you're trying to do it before hand you will probably need to find a function hook that contains a valid pointer and there's no gaurentee depending on what you're changing that it won't change after you've modified it.
Avatar
When inserting a plug-in after creation Putting the plugin on the server takes too long to open. Any solution?
Avatar
Avatar
Frigoff
Validate ShooterGameMode before you dereference it, the crash should give you an exact line number of the crash if it loaded the pdb.
🐨Dream Doctor🦘 10/4/2021 8:12 AM
Sorry, the code supplied is simplified. There is a nullptr check there. And it's called way after the server starts. Also as you can see from the change I made, when accessing the sgm reference through ArkApi::GetApiUtils().GetShooterGameMode() at the same point it works fine. It's very confusing lol
8:13 AM
@Pelayori We were discussing reading the workshop files directly, this page from TCAdmin has a bunch of useful information, including some sample scripts for reading the binary .info files inside the mod directories that contain useful info.
Avatar
So... you asked us to look at this code and see why it crashes, then say the code is actually different? I don't understand, post the code that's running. Not the idea.
Avatar
Avatar
Frigoff
So... you asked us to look at this code and see why it crashes, then say the code is actually different? I don't understand, post the code that's running. Not the idea.
🐨Dream Doctor🦘 10/4/2021 8:39 AM
No need to be narky. I provided the code that was causing the issue. thanks for your help though.
Avatar
🐨Dream Doctor🦘 10/5/2021 5:07 AM
How would I go about getting access to loaded_plugins in PluginManager?
Avatar
Avatar
🐨Dream Doctor🦘
How would I go about getting access to loaded_plugins in PluginManager?
That is not exposed nor exported so no way to get it from a plugin
Avatar
Avatar
Pelayori
That is not exposed nor exported so no way to get it from a plugin
technically you can load it via offset or write an assembly function to read it from stack
4:51 PM
but why would you need this var anyway heh
Avatar
Avatar
WETBATMAN
but why would you need this var anyway heh
I'd argue we should have access to it.
6:30 PM
maybe you want to conditionally enable extended features based off of loaded plugins
Avatar
You have IsPluginLoaded(string)
Avatar
you should know more than anyone that iterating an array is faster than checking a bunch of plugins by hand 😉
6:32 PM
There should at least be a read-only copy of the array that users can read.
Avatar
Avatar
substitute
you should know more than anyone that iterating an array is faster than checking a bunch of plugins by hand 😉
Well yeah, but I don't see the use case of having access to the plugins array
6:32 PM
Of course it can have its uses
Avatar
Avatar
Pelayori
Well yeah, but I don't see the use case of having access to the plugins array
I've thought of writing a server management plugin
6:33 PM
so users could simply use the API to remotely manage their servers
6:33 PM
that's one use case
Avatar
Manage how, unload and load plugins or?
Avatar
That, view status
6:33 PM
Execute commands
6:33 PM
Reboot
6:33 PM
Etc
Avatar
I've done that with a python discord bot without access to plugins array
Avatar
Yes, but why jump through hoops when it’s right there lol
Avatar
🐨Dream Doctor🦘 10/5/2021 11:02 PM
Its pretty simple really, as Sub says. I need a list of plugins currently running on the server. Doesn't seem like an unreasonable request :)
Avatar
Make a PR that exports it. See if they add it.
Avatar
Avatar
Frigoff
Make a PR that exports it. See if they add it.
I don't expect it being added any time soon.
12:52 AM
Adding it means another revision of the API
12:53 AM
stability is pretty important, hopefully it can be added if/when there is a good reason to bump the version
Avatar
🐨Dream Doctor🦘 10/6/2021 2:49 AM
I made a yucky workaround that scans the plugin directory, then runs 'IsPluginLoaded' on each one, however it's not ideal. (edited)
Avatar
Avatar
Pelayori
Well yeah, but I don't see the use case of having access to the plugins array
🐨Dream Doctor🦘 10/6/2021 2:57 AM
With respect, I feel that "I don't see the use" is a bit of a dangerous response to a feature request for a project like this. Any one of us could probably think of multiple features that they could use that current don't exist that others haven't thought of, and that's really the point of the entire project isn't it? To push boundaries and come up with new use cases?
Avatar
Avatar
substitute
stability is pretty important, hopefully it can be added if/when there is a good reason to bump the version
🐨Dream Doctor🦘 10/6/2021 3:06 AM
I totally agree that stability is incredibly important, but I also feel that excessive caution has really led to some serious stagnation in this project. How many proper new releases have we had in the last two years, compared to the previous two years when Mich was really driving the project forward? The danger is that the community gets frustrated, fragments and the whole project falls apart. This is already happening. Community members like Wooly have been so frustrated with the stagnation of the official project that they've been forced to act on their own, making unofficial versions of official components that can and will eventually conflict with official versions, and that's where things will really start to go wrong. I'd made no secret about how I feel about his commercial methods, but nobody can blame him for wanting to take action to fix things that weren't being addressed. I'd love to see a release timetable developed, where we release an official version every 3 or 6 months. I'd love to see an open working group which met and published it's decisions and thoughts in an open forum and invited the participation of the community. In effect I'd love to see the project run more like an open source group project. Worse, if this doesn't happen, I fear that it will not be long before the project is forked and that is done elsewhere. I've heard rumours this may already been happening, and that's a disaster IMHO. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
With respect, I feel that "I don't see the use" is a bit of a dangerous response to a feature request for a project like this. Any one of us could probably think of multiple features that they could use that current don't exist that others haven't thought of, and that's really the point of the entire project isn't it? To push boundaries and come up with new use cases?
My "I don't see a use case" does not mean I am against it. Sure it can be useful in a way for someone. Our plans regarding new releases rely on new fixes/features that are requested and added afterhand, in this case that would require an exported function which would also need a new .lib uploaded and a new api release on the site. Unless our plans change, I'd say we will to look at why .arkapi files now crash when reloading and release a new version for it. We will then take into consideration adding such feature, likely as an api utils/tools function and not direct access to the plugin array. Which info would you like to have? Plugin name only, or some other kind of info? (edited)
Avatar
hello everyone use the Plugins Send data to mod Has anyone tried
Avatar
Yes
1:17 PM
You can call blueprint functions with findfunctionchecked and processevent
Avatar
hello everyone, how to use the bPreventUpload ? i want item to upload
2:23 PM
like the tyrannosaurus rex arm
Avatar
Avatar
Codeboy
hello everyone, how to use the bPreventUpload ? i want item to upload
you can't
11:23 PM
this field is checked on the client
11:24 PM
and it's not replicated
11:24 PM
meaning it won't sync to the client if you change it on the server
11:24 PM
so the item won't be uploadeable
2:02 PM
Every now and then my server would have an error that would cause all the maps to crash.
2:04 PM
ShooterGameServer.exe!FTimerManager::Tick( (Ox00007ff60b25c29a) +0 bytes[f:\build summerbash2021\engine\source\runtimelengine\private\timermanager.cpp:1087] ShooterGameServer.exe!FTimerManager::Tick( (Ox00007ff60b25c29a) +0 bytes[f:\build summerbash2021\engine\source\runtimelengine\private\timermanager.cpp:1087]
2:05 PM
I saved the picture of the error message, but there seems to be no way to send it here
Avatar
Timer is borked
Avatar
Avatar
Invoker
ShooterGameServer.exe!FTimerManager::Tick( (Ox00007ff60b25c29a) +0 bytes[f:\build summerbash2021\engine\source\runtimelengine\private\timermanager.cpp:1087] ShooterGameServer.exe!FTimerManager::Tick( (Ox00007ff60b25c29a) +0 bytes[f:\build summerbash2021\engine\source\runtimelengine\private\timermanager.cpp:1087]
Does it happen without api?
Avatar
is there a plugin to prevent using cryopods ?
Avatar
Items+
Avatar
Blueprint'/Game/Extinction/CoreBlueprints/Weapons/PrimalItem_WeaponEmptyCryopod.PrimalItem_WeaponEmptyCryopod
8:01 PM
i want to prevent using cryopod with a dino inside
8:03 PM
don't know if it's gonna work
Avatar
Avatar
Pelayori
You can call blueprint functions with findfunctionchecked and processevent
🐨Dream Doctor🦘 10/19/2021 3:39 PM
Do you know if there's any example of that anywhere?
Avatar
Guys have a doubt and I don't know if anyone has been through this here, my server sometimes when the player tames the dino right after the dino self-destructs, does anyone know which plugin is causing th
pepePoint 2
Avatar
Avatar
🐨Dream Doctor🦘
Do you know if there's any example of that anywhere?
UFunction* netUpdateFunc = actor->FindFunctionChecked(FName("NetRefreshRadiusScale", EFindName::FNAME_Add)); if (netUpdateFunc) { const float units_needed = (radius / 400.f); int arg = (int)floor(units_needed / 0.2) + 2; actor->ProcessEvent(netUpdateFunc, &arg); }
4:19 PM
That's what I used in safe zones to modify bubble's size
4:21 PM
The function/event takes an int as param, so I just passed the pointer to the int. But if you need more than one param, or return value you can use a struct ex: void BP func with 2 params, int and string struct Params { int param1; FString param2; }; ex: bool bp func with int and dino character params struct Params { int param1; APrimalDinoCharacter* param2; bool returnValue; };
Avatar
Avatar
Pelayori
That's what I used in safe zones to modify bubble's size
On this topic, you can read the size of the expected arg (property of ufunc) and pass a memory block you allocate
5:17 PM
You just need to write your values to the right offsets in the memory block
5:17 PM
This is also possible as the size and offset of the property is on uprop
5:18 PM
It’s how my run time ufunction interop builder works
5:18 PM
Just need to put it in the api some day
Avatar
True^^, need to be cautious with various types in the api since they are not imported with the correct size and they end up having different offsets as game does
Avatar
Avatar
substitute
Just need to put it in the api some day
waiting patiently 😛
Avatar
Avatar
Pelayori
True^^, need to be cautious with various types in the api since they are not imported with the correct size and they end up having different offsets as game does
Not just this, but the structs DO have memory alignment
5:18 PM
So you need to make sure you’re alignment is the same
5:18 PM
Usually it is though unless you’ve done something weird
Avatar
Ah yeah, think if you put the args in the same order alignment is kept?
Avatar
Yeah, usually
5:19 PM
As long as your types are sized the same too
Avatar
Yeah, that's the issue with some things, luckily often-used ones are correctly sizes I believe
5:20 PM
But for things like FItemNetIfo you need to alloc memory since it's a fnction wrapper struct
5:20 PM
FTribeData, etc..
Avatar
Yep
5:21 PM
I have a safe alloc that frees when out of scope
5:21 PM
Just a unique ptr with custom deleter (edited)
5:22 PM
I was thinking of adding Size() to ustruct
5:22 PM
And having it use the reflection to compute the structure size
5:22 PM
Would help with the structures where we don’t have fields declared (or are as functions)
Avatar
Yeah, I usually don't bother to check the size so I allocate more than necessary lol, usually 0x200
Avatar
Rip ur ram
Avatar
Yeah lol, should check the actual sizes instead of going straight to rampage 😂
Avatar
hello Do you know the reborn hook?
3:31 PM
bool Hook_AShooterGameMode_IsFirstPlayerSpawn(AShooterGameMode* _this, APlayerController* NewPlayer) { const uint64 steam_id = ArkApi::IApiUtils::GetSteamIdFromController(NewPlayer); if (steam_id != 0) { AShooterPlayerController* player = static_cast<AShooterPlayerController*>(NewPlayer); std::string QQ = detection::database->GetLastClockTime(steam_id); Log::GetLog()->info("1:{}", steam_id); if (QQ == "") { //player->GetPlayerCharacter()->Suicide(); return true; } } return AShooterGameMode_IsFirstPlayerSpawn_original(_this, NewPlayer); }
3:32 PM
Killed after rebirth, unable to resurrect
Avatar
🐨Dream Doctor🦘 10/23/2021 3:44 AM
Are there any examples of using sphere overlap anywhere?
Avatar
🐨Dream Doctor🦘 10/23/2021 4:10 AM
Is UVictoryCore::ServerOctreeOverlapActorsClass what people use? Is it safe now? I remember something about it causing crashes?
Avatar
You need to make sure the fhit struct is the right size
6:19 AM
I think that’s it
Avatar
Avatar
🐨Dream Doctor🦘
Is UVictoryCore::ServerOctreeOverlapActorsClass what people use? Is it safe now? I remember something about it causing crashes?
^
Avatar
FHitResult is not the right size, so gotta malloc manually
Avatar
Avatar
Pelayori
FHitResult is not the right size, so gotta malloc manually
(This is where the Size() on UObject that computes the size based on the UProperty chain would be useful)
7:06 PM
😛
7:06 PM
Just need to spend time to write it in
Avatar
Yayy!
Avatar
it's not part of the game
7:07 PM
but it is easy to implement
Avatar
Right, so I don't have to rip my ram when allocating 😂
Avatar
I'm just a little occupied playing Back4Blood at the moment
7:07 PM
ylmao
😆 1
Avatar
Avatar
Pelayori
FHitResult is not the right size, so gotta malloc manually
🐨Dream Doctor🦘 10/24/2021 2:35 PM
Where does FHitResult come from? ServerOctreeOverlapActors looks like: static TArray<AActor*>* ServerOctreeOverlapActors(TArray<AActor*>* result, UWorld* theWorld, FVector AtLoc, float Radius, EServerOctreeGroup::Type OctreeType, bool bForceActorLocationDistanceCheck) { return NativeCall<TArray<AActor*>*, TArray<AActor*>*, UWorld*, FVector, float, EServerOctreeGroup::Type, bool>(nullptr, "UVictoryCore.ServerOctreeOverlapActors", result, theWorld, AtLoc, Radius, OctreeType, bForceActorLocationDistanceCheck); Or am I doing the wrong thing? lol
Avatar
I was responding to Subs, but yeah it isn't in octree function
2:36 PM
It's a trace thing usually
Avatar
🐨Dream Doctor🦘 10/24/2021 2:36 PM
Ah got it. Thanks 🙂
Avatar
You have an api utils func using octrees too. IApiUtils::GetAllActorsInRange i think it was
Avatar
Avatar
Pelayori
You have an api utils func using octrees too. IApiUtils::GetAllActorsInRange i think it was
🐨Dream Doctor🦘 10/24/2021 2:38 PM
Oh yeah, there is too. Thanks again!
2:38 PM
I would love to make a nice wiki one day with all those documented and searchable.
Avatar
Avatar
🐨Dream Doctor🦘
I would love to make a nice wiki one day with all those documented and searchable.
There was a wiki, but no longer available I believe. I know I browsed it at some point
Avatar
🐨Dream Doctor🦘 11/5/2021 4:07 AM
Hey All, do any of you happen to have a plugin that might kick someone with a "nice try" kick reason? We're getting reports from players that they're being kicked with this message, but nothing is showing in the logs. Very strange. So I assume it's one of the 30-odd plugins we use. (edited)
Avatar
hey can someone explain what the min level and max level mean in the ark shop, currency, and kits plugin means? im assuming its for a gamble roll at the dino's level when spawned in but wasn't 100% sure... from the example text: "para":{ // Dino "Type":"dino", "Description":"Parasaurolophus", "Level":10, "Price":20, "MinLevel":10, "MaxLevel":15, "Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Para/Para_Character_BP.Para_Character_BP'"
Avatar
and if that is the case that it's a level gamble roll, does the "Level" parameter offset that or does that line mean nothing in that case?
Avatar
jraServerAPI 11/5/2021 6:05 AM
That is for player level. Players level 10-15 can buy that shop item
Avatar
oh ok thanks for the clarification
Avatar
jraServerAPI 11/5/2021 6:05 AM
yw
Avatar
Avatar
🐨Dream Doctor🦘
Hey All, do any of you happen to have a plugin that might kick someone with a "nice try" kick reason? We're getting reports from players that they're being kicked with this message, but nothing is showing in the logs. Very strange. So I assume it's one of the 30-odd plugins we use. (edited)
You could hook the kick function and try to debug which plugin
Avatar
Avatar
🐨Dream Doctor🦘
Hey All, do any of you happen to have a plugin that might kick someone with a "nice try" kick reason? We're getting reports from players that they're being kicked with this message, but nothing is showing in the logs. Very strange. So I assume it's one of the 30-odd plugins we use. (edited)
you could also attach x64dbg via stealth mode and perform a string scan
2:00 PM
then you'll find out which module contains that string
Avatar
Or do it with a plugin
4:11 PM
Both work
Avatar
Maybe use my command logger ? 😮
Avatar
howdy guys, the arkserverapi.com website is down. anyone able to give that machine a kick?
Avatar
site api is down?
Avatar
Avatar
AnotherMax
howdy guys, the arkserverapi.com website is down. anyone able to give that machine a kick?
Waiting on Michidu to check it out
cheers 1
Avatar
Avatar
AnotherMax
howdy guys, the arkserverapi.com website is down. anyone able to give that machine a kick?
Seems it's back up.
Avatar
awesome, thanks guys!
HappySlime 1
Avatar
jraServerAPI 11/8/2021 5:07 PM
f2b1931abb214095a0e739d606cc41d8
Avatar
Is there a hook to upload and download?
  • Ark data
Avatar
Avatar
돌드민
Is there a hook to upload and download?
  • Ark data
There are mutliple hooks for that purpose, you can search by "Upload" and you will find many of them, mainly in AShooterPlayerController
Avatar
🐨Dream Doctor🦘 11/23/2021 1:20 AM
Does anyone have an example of calling a function from a mod? I know someone mentioned you guys had worked out a way to do it now. If anyone has any info it would be very much appreciated.
1:21 AM
Also wondering if its possible to hook a custom function from a mod also?
Avatar
Mod can’t hook C++
1:42 AM
But C++ can hook mod
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have an example of calling a function from a mod? I know someone mentioned you guys had worked out a way to do it now. If anyone has any info it would be very much appreciated.
I can show you how later
1:42 AM
It is pretty easy
Avatar
Avatar
substitute
I can show you how later
🐨Dream Doctor🦘 11/23/2021 1:59 AM
Thanks Sub! That would be awesome.
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have an example of calling a function from a mod? I know someone mentioned you guys had worked out a way to do it now. If anyone has any info it would be very much appreciated.
if (!PC->bIsAdmin().Get()) { UObject* Object = reinterpret_cast<UObject*>(PC); UFunction* Func = Object->FindFunctionChecked(FName("ClientNotifyAdmin", EFindName::FNAME_Find)); Object->ProcessEvent(Func, nullptr); }
10:24 AM
calling a bp function
10:24 AM
you obtain a function pointer by looking it up via name
10:24 AM
and then you call ProcessEvent
10:24 AM
if the function takes no params then you pass nullptr as the second argument in ProcessEvent
10:24 AM
otherwise you create a struct with the required parameters structure
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have an example of calling a function from a mod? I know someone mentioned you guys had worked out a way to do it now. If anyone has any info it would be very much appreciated.
void Hook_UObject_ProcessEvent(UObject* _this, UFunction* Function, void* Parameters) { UObject_ProcessEvent_original(_this, Function, Parameters); FName objname = Function->NameField(); FString FuncName; objname.ToString(&FuncName); if (FuncName == L"the function name you need to hook") { //do stuff } }
10:28 AM
example of a simple bp hook, check by function name (slow)
10:30 AM
for bp hooks i have a class to manage it
10:30 AM
void AddBpHook(const std::string FunctionName, const FString ContainerBP) { UObject* Obj = GetDefaultObjectOfClass(ContainerBP); if (Obj) { UFunction* Func = Obj->FindFunctionChecked(FName(FunctionName.c_str(), EFindName::FNAME_Find)); if (Func) FunctionsMap_[Func->InternalIndexField()] = FunctionName; } } void OnFunctionCalled(int InternalIndex, UObject* Caller, void* Params) { if (Caller && FunctionsMap_.find(InternalIndex) != FunctionsMap_.end()) { std::string FunctionID = FunctionsMap_[InternalIndex]; if (FunctionID == "OnOpenUIRequested") OpenUIForPlayer(Caller); else if (FunctionID == "OnClaimReward") ClaimReward(Caller, Params); else if (FunctionID == "OnSwapMission") SwapMission(Caller, Params); } }
10:30 AM
i have these 2 function in there
10:30 AM
basically what i do is i perform a lookup for the function once
10:30 AM
and then i store it's internal index
10:31 AM
then i can just check every internal index from the ProcessEvent hook and if it's a match i call my hook
10:31 AM
this way it's much faster
10:32 AM
credits for this go to @substitute he showed me the internal index optimization for hooks
Avatar
Avatar
WETBATMAN
if (!PC->bIsAdmin().Get()) { UObject* Object = reinterpret_cast<UObject*>(PC); UFunction* Func = Object->FindFunctionChecked(FName("ClientNotifyAdmin", EFindName::FNAME_Find)); Object->ProcessEvent(Func, nullptr); }
🐨Dream Doctor🦘 11/23/2021 11:37 AM
Thank you so much! I'll give it a go 🙂
Avatar
Avatar
WETBATMAN
if (!PC->bIsAdmin().Get()) { UObject* Object = reinterpret_cast<UObject*>(PC); UFunction* Func = Object->FindFunctionChecked(FName("ClientNotifyAdmin", EFindName::FNAME_Find)); Object->ProcessEvent(Func, nullptr); }
🐨Dream Doctor🦘 11/23/2021 11:37 AM
Any idea what happens if there are multiple functions with the same name?
Avatar
Avatar
🐨Dream Doctor🦘
Any idea what happens if there are multiple functions with the same name?
cannot happen
11:43 AM
you're looking for the function within an object
11:43 AM
not within the entire server
Avatar
Avatar
WETBATMAN
you're looking for the function within an object
🐨Dream Doctor🦘 11/23/2021 12:16 PM
Right, got it. Thanks 🙂
Avatar
Avatar
WETBATMAN
credits for this go to @substitute he showed me the internal index optimization for hooks
Thanks, been kinda busy and couldn’t write it out for him last night
Avatar
Avatar
🐨Dream Doctor🦘
Any idea what happens if there are multiple functions with the same name?
You can also check the full path name of the ufunction if you’re concerned (edited)
2:10 PM
And not just the function name itself
Avatar
as far as i know bp funcs cannot be overloaded, as i'm not sure how else you'd call a function with FindFunctionChecked otherwise?
2:14 PM
for hooks it's easy you just check the bp path of the object containing the function
Avatar
Avatar
WETBATMAN
as far as i know bp funcs cannot be overloaded, as i'm not sure how else you'd call a function with FindFunctionChecked otherwise?
Same, and checking object or using find function is usually good enough
2:16 PM
Tick is One event that is in all objects (duplicate) but again using the object solves that (edited)
Avatar
Avatar
WETBATMAN
as far as i know bp funcs cannot be overloaded, as i'm not sure how else you'd call a function with FindFunctionChecked otherwise?
Брутал 11/24/2021 7:06 PM
Hi
7:06 PM
Need you help
Avatar
i won't partake in developing plugins that display fake player count 🙂 (edited)
oof 2
f2b1931abb214095a0e739d606cc41d8 1
💪 1
Avatar
Avatar
WETBATMAN
i won't partake in developing plugins that display fake player count 🙂 (edited)
EuphoricGaming 11/25/2021 3:37 AM
o-o...
Avatar
one question, why is allowed to sell discord bot in an ark server plugin forum? so basically i can also sell my hundreds of discord bot and call me as a plugin developer?
9:52 AM
Avatar
Avatar
Sly
one question, why is allowed to sell discord bot in an ark server plugin forum? so basically i can also sell my hundreds of discord bot and call me as a plugin developer?
I guess it refers to ark-related software. But I'm not aware of the exact policy, you would have to ask an admin to get a proper answer.
Avatar
well, everything refers to ark if you use rcon 😄
10:19 AM
its not a plugin tho
Avatar
As I said I'm not the one who enforces that policy about what can and cannot be uploaded 🙂
Avatar
yea i know, just 15€ for discord status bot, triggers me so hard, also renewal price 😂 (edited)
🤷‍♂️ 1
Avatar
I personally use the one from gog, free and pretty useful player counter
Avatar
Avatar
Sly
Click to see attachment 🖼️
tbh, that's very true. It should at least be under it's own category. (but it will not be something we will add for now) And yeah, this forum isn't supposed to be a place for selling discord bots. It's supposed to be a place for making plugins and donating content to the ark community with plugins. But sure the plugin can use a discord bot integration as an extension for the plugin. But not to be based on. (edited)
11:35 AM
I will look into this. Thanks for speaking up about it!
Avatar
Avatar
Sly
yea i know, just 15€ for discord status bot, triggers me so hard, also renewal price 😂 (edited)
I can give u an update from me
Avatar
i mean i am a c# developer and i can make a bot like this in 1-2 hours, so it just annoys me a bit that people make profit so easily... i would have offered something like this for free, no idea, maybe view thing (edited)
Avatar
Thats true
Avatar
Avatar
Sly
i mean i am a c# developer and i can make a bot like this in 1-2 hours, so it just annoys me a bit that people make profit so easily... i would have offered something like this for free, no idea, maybe view thing (edited)
So do it then
Avatar
Hey, found this discord by googling around researching ARK server hosts etc and on a forum says you guys are partnered with serverblend hosting. Was just wondering if I could get a rundown on the API plug-ins etc. Sorry if it's too much to ask for 😅 I've come from. Developing fiveM servers, recently got back into ark and so I made a server with gportal. But after some research I can't find anything about integrating your ArkAPI plug-in to gportal servers, so wanting to make a switch and learn a bit more about it.
9:36 PM
oh, those are the ones that have been created.. if you're looking for the API then check the #【💌】ʜᴇʟᴘꜰᴜʟ-ʟɪɴᴋꜱ
Avatar
Avatar
OGReaper
Hey, found this discord by googling around researching ARK server hosts etc and on a forum says you guys are partnered with serverblend hosting. Was just wondering if I could get a rundown on the API plug-ins etc. Sorry if it's too much to ask for 😅 I've come from. Developing fiveM servers, recently got back into ark and so I made a server with gportal. But after some research I can't find anything about integrating your ArkAPI plug-in to gportal servers, so wanting to make a switch and learn a bit more about it.
Basically Ark Api is a software injected into ark server dedicated binaries and adds a framework for plugins to work on. Plugins are similar to server-side only mods which have quite a few more features since they can access root code of the game and modify it according to the necessities. There are lots of plugins you can use, most are listed in the Ark Api forum above
Avatar
Avatar
Pelayori
Basically Ark Api is a software injected into ark server dedicated binaries and adds a framework for plugins to work on. Plugins are similar to server-side only mods which have quite a few more features since they can access root code of the game and modify it according to the necessities. There are lots of plugins you can use, most are listed in the Ark Api forum above
So basically ditch Gportal and use serverblend?😅
Avatar
Serverblend is good, I also know GameServerApp as well. For gportal I think you need to request them to install api & plugins manually themselves, those 2 I mentioned are more api friendly
Avatar
Okay cool thanks. From past experience gportal support isn't always the best so I'll pass on the requesting. If I'm not mistaken with ServerBlend you can request your saved data/mods to be transferred from current host to ServerBlend if you're switching right? Sorry for all the questions. Just trying to get all the peas in one pot before deciding
Avatar
I've not used them extensively so I can't help you there.
Avatar
What about GameServee APP? Again I apologize if I'm asking too many questions. Just tell me to shut up if I am 😂😂
Avatar
I know they offer 1 click install for api and plugins too
Avatar
Okay cool. I'll look into what they offer
👍 1
Avatar
After updating the API, the user nickname cannot be obtained from the new player API. I need a way.
Avatar
Avatar
돌드민
After updating the API, the user nickname cannot be obtained from the new player API. I need a way.
I don't understand your question, is this about developing a plugin?
Avatar
Avatar
Pelayori
I don't understand your question, is this about developing a plugin?
wait..
Avatar
Avatar
Pelayori
I don't understand your question, is this about developing a plugin?
'Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* new_player ' use this hook FString c_name = ArkApi::IApiUtils::GetCharacterName(new_player); When I look it up, the result is null. do you have a solution
Avatar
Avatar
돌드민
'Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* new_player ' use this hook FString c_name = ArkApi::IApiUtils::GetCharacterName(new_player); When I look it up, the result is null. do you have a solution
The player character's isn't always valid on HandleNewPlayer, so depending on if the player pawn is spawned, the name will be returned, or null if the character has not spawned
12:08 PM
If you need to do something with the player character itself you can try hooking a different function, or using a delay execute until it is valid.
Avatar
Avatar
Pelayori
If you need to do something with the player character itself you can try hooking a different function, or using a delay execute until it is valid.
How do you delay? Should I write a sleep function? (edited)
Avatar
API has a built in timer implementation, to use it do: 1) #include "Timer.h" 2) to use delay execute use API::Timer::Get().DelayExecute(&function, delaySeconds, args); You can also pass a lambda instead of a function pointer, like this: API::Timer::Get().DelayExecute([]() { YourFunctionCall(); }, delay);
🥳 1
Avatar
Avatar
Pelayori
API has a built in timer implementation, to use it do: 1) #include "Timer.h" 2) to use delay execute use API::Timer::Get().DelayExecute(&function, delaySeconds, args); You can also pass a lambda instead of a function pointer, like this: API::Timer::Get().DelayExecute([]() { YourFunctionCall(); }, delay);
aha thank you! Let's do it.
Avatar
Avatar
Pelayori
API has a built in timer implementation, to use it do: 1) #include "Timer.h" 2) to use delay execute use API::Timer::Get().DelayExecute(&function, delaySeconds, args); You can also pass a lambda instead of a function pointer, like this: API::Timer::Get().DelayExecute([]() { YourFunctionCall(); }, delay);
Well, I can't just mark the nickname.
Avatar
How are you doing it?
Avatar
Avatar
Pelayori
How are you doing it?
Avatar
I just told you that the character might not be ready in HandleNewPlayer 🙂
Avatar
Avatar
Pelayori
I just told you that the character might not be ready in HandleNewPlayer 🙂
Ummm.. Are you getting the character shortage and player number, but only the character name late?
Avatar
Had to rebuild my player activity for that as well, don't remember what i had to do to make it work lol
5:11 PM
hehe i'm using bunch of methods 😄 e.playerNameW = *( (ArkApi::GetApiUtils().GetCharacterName(new_player).IsEmpty()) ? GetPlayerCharacterNameOLD(new_player) : ArkApi::GetApiUtils().GetCharacterName(new_player));
5:12 PM
But safest would be to actually delay it
5:12 PM
as Pelayori says, that hook is being executed sometimes to early for any code to get the player name. (edited)
Avatar
Deleted User 12/4/2021 8:51 AM
i waiting 2 days for the verivication email i dont recive (Forum) (edited)
Avatar
Avatar
Deleted User
i waiting 2 days for the verivication email i dont recive (Forum) (edited)
Look in the smam folder
Avatar
Avatar
Deleted User
i waiting 2 days for the verivication email i dont recive (Forum) (edited)
You don't need to spam every single channel.
FeelsBanMan 1
Avatar
@Pelayori @Foppa thank you both
🤟 1
Avatar
does anyone know any plugin to block flyers in aberration or block mount on them. because the ASM's own function it blocks even the managarm from flying, I would like to block only a few dinos.
Avatar
What should the plugin do when the API version is updated? Is there a way to update the plugin as well?
Avatar
Avatar
Winnmi
Look in the smam folder
Deleted User 12/5/2021 7:50 AM
i have looked in spam folder, have tried 3 emails not work
7:51 AM
try self, create a account and u will see you dont revice email
7:52 AM
maybe email server down
Avatar
Avatar
Pelayori
You don't need to spam every single channel.
Deleted User 12/5/2021 7:52 AM
yes sorry sir
Pelayori started a thread. 12/5/2021 12:25 PM
Avatar
Avatar
DEX
does anyone know any plugin to block flyers in aberration or block mount on them. because the ASM's own function it blocks even the managarm from flying, I would like to block only a few dinos.
jraServerAPI 12/5/2021 4:23 PM
I just posted a new plugin to do this for you called: No Fly List It's awaiting approval.
Avatar
𝕾𝖊𝖗𝖆 12/5/2021 4:28 PM
Does this only work for the steam version or does it work for Microsoft one too?
Avatar
jraServerAPI 12/5/2021 4:29 PM
Does what work?
Avatar
𝕾𝖊𝖗𝖆 12/5/2021 4:29 PM
The pluggins
Avatar
jraServerAPI 12/5/2021 4:30 PM
I think Microsoft (xbox) and Playstation etc.. they connect to a separate network than PC
Avatar
𝕾𝖊𝖗𝖆 12/5/2021 4:30 PM
Alright thanks
Avatar
jraServerAPI 12/5/2021 4:30 PM
so you wont be able to host a server for them
Avatar
void Hook_AShooterPlayerState_ServerRequestCreateNewPlayer_Implementation(AShooterPlayerState* _this, FPrimalPlayerCharacterConfigStructReplicated PlayerCharacterConfig) How do I get the user's Steam number and nickname when using the above hook?
Avatar
AShooterPlayerState has a function to get AShooterPlayerController. (edited)
Avatar
Avatar
돌드민
void Hook_AShooterPlayerState_ServerRequestCreateNewPlayer_Implementation(AShooterPlayerState* _this, FPrimalPlayerCharacterConfigStructReplicated PlayerCharacterConfig) How do I get the user's Steam number and nickname when using the above hook?
_this->GetShooterController() ( or similar name)
4:55 PM
With the controller you can get steam name with api utils func
Avatar
Avatar
Pelayori
With the controller you can get steam name with api utils func
Thanks for replying every day. Can I see an example just once?
Avatar
Avatar
돌드민
Thanks for replying every day. Can I see an example just once?
jraServerAPI 12/5/2021 4:58 PM
what I usually do is search this discord.. if you search for: steam_id you will find alot of examples already discussed
Avatar
Avatar
jraServerAPI
what I usually do is search this discord.. if you search for: steam_id you will find alot of examples already discussed
thank you i will look for more
Avatar
Avatar
𝕾𝖊𝖗𝖆
Does this only work for the steam version or does it work for Microsoft one too?
Yes, they do
5:08 PM
However you can’t host a server for those platforms
👍 1
5:08 PM
And the places that will rent to you most likely will not install the api for those platforms
Avatar
Avatar
substitute
Yes, they do
This is based on the fact that Wildcard uses Windows to host all of their official servers. As long as the PDB exists and it is Windows, it’ll work.
Avatar
@Pelayori @jraServerAPI Thanks I solved it. I will learn a lot!
👍 1
pepehype 1
Avatar
Twin-Daddy0201 12/11/2021 11:11 PM
Hello,i register on website but i dont become a corfirmation email
11:13 PM
@[Council] @Pelayori @WETBATMAN
11:14 PM
Everyone can send me the api files?
Avatar
Did you check spam folders?
Avatar
Twin-Daddy0201 12/11/2021 11:27 PM
yes i have check all folders
Avatar
I'll pass it onto the staff
Avatar
Twin-Daddy0201 12/11/2021 11:30 PM
ok thanks
Avatar
@Twin-Daddy0201 Why are you asking the same question everywhere?
Avatar
Twin-Daddy0201 12/13/2021 9:47 PM
sorry
Avatar
CTRL + F "GetPlayerCharcter" -> Select All Open Document
1:19 AM
😛
Avatar
Strangely enough, GetPlayerCharacter just calls the field I mentioned, and if you access the field directly it does not crash lol
7:10 AM
But had some instances already of crashes, that were due to the same reason
Avatar
no fount for (const auto& item : items_map) { const std::string command = item["DefeatBoss"]; const std::string BossID = item["BossID"]; const int Dificultad = item["Dificultad"]; FString fcommand = fmt::format("{0} {1} {2} {3}", command, player_controller->GetLinkedPlayerID(), BossID, Dificultad).c_str(); FString result; Log::GetLog()->warn(fcommand.ToString()); player_controller->ConsoleCommand(&result, &fcommand, true); }
Avatar
jraServerAPI 12/16/2021 2:48 AM
you might have to be an admin
2:49 AM
try player_controller->bIsAdmin().Set(true); before you call the command
Avatar
is there a good guide or video to see how to setup an IDE for ark plugins , I tried following the top post in #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ but that didn't work for me
Avatar
You don't need to setup anything in particular if you base your plugin on an existing one. For that just setup Visual Studio then take a look at existing projects to see if they compile. (edited)
Avatar
If you don't base your plugin on an existing one you want to go in your project properties and : => Include required library (basically, https://github.com/Michidu/ARK-Server-API). => Include library headers (from ARK-Server-API : \ARK-Server-API\version\Core\Public). => Set all other settings (Output type: DLL, Platform toolset: VS 2017 v141, Character encoding: Unicode, C++ language standard: ISO C++ 17 standard, Incremental linking: No, Subsystem: Windows). If you don't want to miss any project properties you should look once again at existing projects from GitHub, very valuable source of information 🙂 (edited)
Avatar
And here is a plugin example (it does nothing except logging messages, when it gets loaded/unloaded): #include "API/ARK/GameMode.h" #pragma comment(lib, "ArkApi.lib") BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Log::Get().Init("MyMod"); Log::GetLog()->info("Loading my mod!"); // Your mod stuff here... break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: Log::GetLog()->info("Unloading my mod!"); // Stop your mod processing here if any (for example freeing resources)... break; } return TRUE; } (edited)
Avatar
Must say the log must be inited before any use: Log::Get().Init("MyPlugin");
Avatar
ah right, I did a dirty copy pasta x)
Avatar
Copy pasta no bueno 😛
Avatar
fixed!
Avatar
woot!
Avatar
I just edited above thank you ^^
Avatar
Are there any other lost island servers just crashing random out of nowhere unofficial?
Avatar
Avatar
peek
Are there any other lost island servers just crashing random out of nowhere unofficial?
Not that I know of.
Avatar
Avatar
Pelayori
Not that I know of.
are you maby familiar with this error LowLevelFatalError [File:F:\build\LostIsland\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp] [Line: 51] Ran out of memory allocating 1900544 bytes with alignment 0 ShooterGameServer.exe!UnknownFunction (0x00007ff670981316) + 0 bytes [UnknownFile:0] Then it repeats it self with random numbers
Avatar
Avatar
peek
are you maby familiar with this error LowLevelFatalError [File:F:\build\LostIsland\Engine\Source\Runtime\Core\Private\GenericPlatform\GenericPlatformMemory.cpp] [Line: 51] Ran out of memory allocating 1900544 bytes with alignment 0 ShooterGameServer.exe!UnknownFunction (0x00007ff670981316) + 0 bytes [UnknownFile:0] Then it repeats it self with random numbers
Do you have enough ram?
Avatar
well i bought a server enouf for 16 poeple
4:52 PM
so i hope nitrado assaings enouf ram for it then
4:52 PM
i just bought a basic pacger
Avatar
You should contact them then
Avatar
yea but the support ticket before they respond useally take a few days.. so
Avatar
Not much we can do unfortunately
Avatar
yea sadly
Avatar
Avatar
OSubMarin
If you don't base your plugin on an existing one you want to go in your project properties and : => Include required library (basically, https://github.com/Michidu/ARK-Server-API). => Include library headers (from ARK-Server-API : \ARK-Server-API\version\Core\Public). => Set all other settings (Output type: DLL, Platform toolset: VS 2017 v141, Character encoding: Unicode, C++ language standard: ISO C++ 17 standard, Incremental linking: No, Subsystem: Windows). If you don't want to miss any project properties you should look once again at existing projects from GitHub, very valuable source of information 🙂 (edited)
Thank you!
Avatar
JustBetter.com 12/22/2021 1:43 PM
how do i join this server
Avatar
Hello, I am a server administrator in Korea. Is there any administrator who has experienced the error that only Lost Island cannot be opened?😅
2:45 AM
I'm sorry that I can not speak English This is a translator, please understand😁
Avatar
I had no problems opening Lost Island. (edited)
Avatar
불가리스 12/24/2021 1:49 AM
Please share logs and screenshots.
Avatar
hi guys, the website seems down again 😉 anyone able to give it a kick?
10:08 AM
there are systems like https://uptimerobot.com/ that are free and send you an email when the site is down.
Avatar
site is off the API?
Avatar
Its online
Avatar
LostIsland make error on UnicodeRcon plugin. LoadServerRconPort() occur error with Hook_AShooterGameMode_HandleNewPlayer(...), so it take build error on LoadServerRconPort()
10:16 AM
ArkApi version 3.53, 3.54
Avatar
URCONServer is already defined in the api so no need to redefine it on headers anymore. Also SocketField returns a reference a not a pointer. So you can't static cast a reference to a pointer.
Avatar
Avatar
Achernar
LostIsland make error on UnicodeRcon plugin. LoadServerRconPort() occur error with Hook_AShooterGameMode_HandleNewPlayer(...), so it take build error on LoadServerRconPort()
Try rconport = static_cast<FSocketBSD*>(&ArkApi::GetApiUtils() .GetShooterGameMode()->RCONSocketField()->SocketField())->GetPortNo();
👍 1
Avatar
already try it my plugin. it sometime return wrong port number. but it works (edited)
2:17 PM
THX!
Avatar
Wrong port? Maybe returns wrong port if rcon not enabled on the server?
Avatar
sometime it return trash value(mem - this is very rarely), but recall this fx it return successfully
Avatar
maybe this my plugins code error, itsn't no error on UnicodeRcon
Avatar
void Hook_AShooterPlayerController_ServerRequestInventoryUseItem_Implementation(AShooterPlayerController* _this, UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) Is it possible to get a blueprint for an item using that api?
Avatar
Avatar
돌드민
void Hook_AShooterPlayerController_ServerRequestInventoryUseItem_Implementation(AShooterPlayerController* _this, UPrimalInventoryComponent* inventoryComp, FItemNetID itemID) Is it possible to get a blueprint for an item using that api?
itemID.ItemID1 itemID.ItemID2 use this or I think I can get it using InventoryComp, but I don't know how.
8:44 AM
How ever i would use: Hook_UPrimalItem_AllowUseInInventory
8:47 AM
But if you must use the inventorycomp
8:48 AM
then you need to loop for the items i believe unless someone has a better idea: inventoryComp->InventoryItemsField() (edited)
Avatar
Avatar
Foppa
How ever i would use: Hook_UPrimalItem_AllowUseInInventory
First of all, thanks for the reply. So when a player uses an item like above, can they get a blueprint for that item?
8:49 AM
I'm trying hard to find it, but it's still very difficult...
Avatar
And then you can use the built in API Function: ArkApi::GetApiUtils().GetItemBlueprint()
👍 1
Avatar
Aha! thank you. Let's do it.
Avatar
Try it out! 🙂
👍 1
Avatar
Avatar
Foppa
Try it out! 🙂
Thanks to you, we solved it. I appreciate it.
Avatar
no problem mate 🙂
💯 1
Avatar
is there a way to run the plugins on a ubuntu20.04 server ?
Avatar
Only way would be if you could run it with wine and if all the windows libs were avaialble (edited)
Avatar
oh okay
11:41 PM
ty
11:44 PM
do you have experience with this? cause i dont XD
Avatar
Me neither
11:45 PM
And would not recommend it
Avatar
why not?
Avatar
because Wine emulates windows
11:53 PM
and by doing that you cause overhead
Avatar
Is there any other way?
Avatar
Run windows
Avatar
I am looking for something on linux
Avatar
There must be a way to run the api on linux.
11:58 PM
😂
Avatar
We just told you how
11:59 PM
But you will run into issues at some point
Avatar
But wine is a gui tool, and i only have console interface
Avatar
wine is a cli app, the gui is just extra 😉
12:01 AM
I mean, i can try it. At least i can say that i tried
Avatar
If you have to run linux for sure yes, but not recommended. api and plugins rely on some windows libs that might or might not be available on wine, I have used wine a very few times
Avatar
Yeh, i wished the api supported both OS’s
Avatar
Avatar
Default
Yeh, i wished the api supported both OS’s
loader will have to be rewritten from scratch
12:12 AM
the current loader only works because of how Windows functions
Avatar
But i may be worth for all the server providers that run linux
Avatar
It's not only the loader, it's the loader, pdb reader (linux has no pdb), windows libs, etc...
12:13 AM
It's like making a whole new program
Avatar
actually scratch that
12:13 AM
even MinHook doesn't work on linux
12:13 AM
so the entire project will have to be rewritten 😄
Avatar
Sounds like a fun little update 😂
12:14 AM
I hope the ark2 server api will get rewritten
Avatar
First step would see if the game has pdb file
12:14 AM
If it has a big step is done already lol
Avatar
Avatar
Pelayori
First step would see if the game has pdb file
doesn't really matter tbh if it doesn't game can be dumped with unreal SDK
12:15 AM
same result as reading from pdb
Avatar
Yeah but pdb makes it faar easier
12:15 AM
or at least seems like easier
Avatar
actually SDK dumps are pretty solid
12:15 AM
they get you struct sizes, names, function offsets, function names
12:15 AM
pretty much everything
Avatar
Sounds fun 😛
Avatar
Avatar
Default
I hope the ark2 server api will get rewritten
only part of the API that requires an update for Ark2 is game dump files
Avatar
I wish i knew what u guys are saying 😐
Avatar
rest of the project will work just fine 😄
Avatar
Lol I would be disappointed if 50%+ functions were the same 😛
2236_keka 1
12:17 AM
Ah well, but there is another factor, UE5 🤩
Avatar
why can't i send files in this channel lol
12:18 AM
was trying to attach how a dump from SDK dumper looks
Avatar
Yeah I mentioned it on other channel that we can't send stuff here
12:18 AM
Probably so you don't send us a virus 😛
12:19 AM
dump file obtained via Unreal SDK
👍 1
Avatar
Uh interesting
Avatar
it creates .h files for every class that you can just include into your own project
12:20 AM
basically even if they don't ship PDB, the API is still easily doable 😄
Avatar
Avatar
WETBATMAN
basically even if they don't ship PDB, the API is still easily doable 😄
Eh
3:08 AM
There are some performance considerations
3:08 AM
You can only hook through ProcessEvent and then filtering down
3:08 AM
Though…….I’m willing to argue that is better to an extent
3:08 AM
As you can then queue callbacks and have a proper system of priority and what not
Avatar
You could still hook the functions that are only available in the binary, you would just have to sig them very well and every update could break them but with powerful enough sigs it should be fine.
Avatar
hope it doesn't come to making sigs of every function, but even that can be managed with auto updates for sigs 😄
Avatar
Can I make such dump with the DevKit? Or I need to download another tool? @WETBATMAN
2:12 PM
I didn't see any "Dump" option in the DevKit.
Avatar
you can't dump anything with devkit
Avatar
Ok
2:13 PM
I guess I have to download and install Unreal SDK, then I'll try to find the "Dump" option.
Avatar
it's better to decompile Ark with IDA pro
2:16 PM
i would only use the SDK if .pdb files are not available
Avatar
Ah ok 😉
2:17 PM
Also, about the Linux support for the API, it does not only require the API itself to be updated but also the plugins (for example my plugin is using Windows paths and functions, I'm also using Windows-specific libs). So yeah, that would be a challenging update ^^ (unless you can setup a perfect Windows emulation but it's unlikely to happen) (edited)
Avatar
Avatar
OSubMarin
I guess I have to download and install Unreal SDK, then I'll try to find the "Dump" option.
SDK dumpers aren’t tools from Epic
6:08 PM
They’re community made tools that dump the game information using the UE4 reflection system
👌 1
Avatar
`DECLARE_HOOK(AShooterGameMode_ForceCreateTribe, int, AShooterGameMode*, FString*, int);` Can't we use this to find the moment to create a tribe? Or which hook do you use?
Avatar
Avatar
돌드민
`DECLARE_HOOK(AShooterGameMode_ForceCreateTribe, int, AShooterGameMode*, FString*, int);` Can't we use this to find the moment to create a tribe? Or which hook do you use?
The hook for when a player creates a tribe is AShooterPlayerState::ServerRequestCreateTribe_Implementation
Avatar
Avatar
Pelayori
The hook for when a player creates a tribe is AShooterPlayerState::ServerRequestCreateTribe_Implementation
Haha I'll test it right now. thank you
Avatar
Avatar
Pelayori
The hook for when a player creates a tribe is AShooterPlayerState::ServerRequestCreateTribe_Implementation
thanks solved it but i have a question Leaving a tribe or changing a tribe name was in AShooterGameMode. Why is this in AShooterPlayerState? I want to find it quickly without help.
Avatar
Avatar
돌드민
thanks solved it but i have a question Leaving a tribe or changing a tribe name was in AShooterGameMode. Why is this in AShooterPlayerState? I want to find it quickly without help.
Sometimes you just need to search around 😉
7:25 PM
I usually search in AShooterPlayerController, AshooterPlayerState, AshooterGameMode and AShooterCharacter for player related functions
Avatar
This is a scam
10:25 PM
10:25 PM
@Pelayori
Avatar
I know, just waiting on someone to clear it up
10:27 PM
you could at least put in the effort to make this drop down work
10:29 PM
@Pelayori
10:29 PM
this is hilarious
10:29 PM
it's such a bad scam
Avatar
lmao
10:29 PM
yeah they are a bit lame
Avatar
also the fake discord help link
10:30 PM
has their language setting
10:30 PM
pepe_kek
Avatar
Avatar
Pelayori
I usually search in AShooterPlayerController, AshooterPlayerState, AshooterGameMode and AShooterCharacter for player related functions
Aha thank you so much!! We wish you a successful end of 2021.
Avatar
Hmm... is there a way to get the hardware id?
Avatar
There are lots of ways to generate a 'hwid'
Avatar
Avatar
Pelayori
There are lots of ways to generate a 'hwid'
Are you using a hook?
Avatar
No, they are generated with info from the machine
👍 1
Avatar
ah, let's see thank you.
Avatar
hey I have a question I'm using shockbyte hosting and I don't know how to install the mods correctly and I don't want to f up my server or plugins AKA mods so somebody can help me or dm video call me please
Avatar
Ask your host for assistance with their environment. (edited)
Avatar
I'm using SharkBite
Avatar
Avatar
NickPoi
I'm using SharkBite
GSH | MrOwlSky 12/31/2021 6:18 PM
This discord isn't support for private web hosting tutorial or guides this discord is designed for the API development of ArkServerAPI. You need to contact your hosting directly and have them assist you on how their layout and system operates.
Avatar
Happy new year 🍾🦕
Avatar
Avatar
OSubMarin
Happy new year 🍾🦕
Happy New year!!
Avatar
@GSH | MrOwlSky I know that I'm just trying to figure out how to set it up in my FTP client and saying on my server console that is not popping up
Avatar
please don't tag staff members, it won't make them assist you faster, furthermore we do not provide support about installation of ArkServerAPI on hosts here
3:18 PM
please contact your host and ask them how to install it
Avatar
I only tagged him because he tagged me
3:19 PM
and this is literally the Discord everybody has been sending me to to ask questions
Avatar
all you have to do to install the API is to place the required files inside the win64 folder
3:20 PM
ShooterGame->Binaries->Win64
Avatar
okay say I did that and it doesn't pop up anything else how do I fix it I can put a screenshot in here to show you
Avatar
some hosts block external dll files, nothing you can do about it
Avatar
is it supposed to say in console right ???
Avatar
yes
Avatar
is there a mod on the Steam Workshop for this API
Avatar
no
3:38 PM
thx you
Avatar
are you sure you placed files in the right directory?
Avatar
I have no clue
3:49 PM
Avatar
yes
Avatar
I send you a link in APS Discord where it's including a video of how everything works.
4:57 PM
Did you watch it?
Avatar
Avatar
NickPoi
@GSH | MrOwlSky I know that I'm just trying to figure out how to set it up in my FTP client and saying on my server console that is not popping up
GSH | MrOwlSky 1/2/2022 5:28 PM
If you haven't resolved this you can send me a DM directly and I'll guide you.
Avatar
Hello 🙂 Got some troubles with arkshop We haven't time rewards on. I can give and buy on shop When it try to list groups members :
6:00 PM
[1/3/2022 6:00 PM] > Permissions.ListGroups [1/3/2022 6:00 PM] 1) Admins - *; [1/3/2022 6:00 PM] 2) Default -
6:01 PM
  • /groups command didn't return data
6:02 PM
Hope someone can help us 🙂 Thanks
Avatar
jraServerAPI 1/3/2022 6:07 PM
support for ArkShop can be found here, this forum is for the ArkApi and the art of developing plugins 🙂 (edited)
Avatar
Oh, thanks 🙂 Sorry
Avatar
Hi I just joined the Discord because I registered an account on arkserverapi.com so that I can download the Cross Server Chat plugin. Looks like I need admin approval, any prereqs I need to satisfy?
Avatar
Avatar
GoNow
Hi I just joined the Discord because I registered an account on arkserverapi.com so that I can download the Cross Server Chat plugin. Looks like I need admin approval, any prereqs I need to satisfy?
I think you have to verify your email
Avatar
Avatar
GoNow
Hi I just joined the Discord because I registered an account on arkserverapi.com so that I can download the Cross Server Chat plugin. Looks like I need admin approval, any prereqs I need to satisfy?
check now
Avatar
Hello!
9:16 PM
I'm a bit new to the API of ARK Server API
9:16 PM
Would it be possible to read all structures on the map and all dinos
9:16 PM
And make them into JSON
9:16 PM
and read all players connected
Avatar
Get all actors of class for structures, and serialize them using the json lib
9:17 PM
for players UWorld has a PlayerControllerListField
Avatar
would that lag the server?
9:18 PM
or does not affect performance (edited)
9:18 PM
it's for an external web API
Avatar
highly depends on implementation 🙂
Avatar
GAAOC does lag yes
Avatar
would reading save file
9:19 PM
be better?
Avatar
If you have the courage to do it I guess it would
Avatar
I have no idea how it's parsed
Avatar
Me neither, there is some c sharp tool but not for c++ afaik
9:21 PM
What is the real limitation of the API btw?
Avatar
how's your API rewrite going btw
9:22 PM
did you remove all the shady libs?
Avatar
My API is just web based portal now
9:23 PM
It works alongside ARK Server API (og version)
Avatar
guess shady libs are here to stay then
Avatar
well ark server api is just weird.
9:24 PM
Its doing injection
Avatar
Wildcard didn't give us the source code sadly
Avatar
we're open to suggestions on how else to autoload the dll 🙂
Avatar
https://github.com/ark-mod/ArkBot <= this is why i need to read all things
9:30 PM
from the map
Avatar
getting all actors via the ingame function will cause alot of overhead if you use it alot
9:31 PM
you can build a local object cache and dump all this in another thread
9:31 PM
i mean like hook the Actor spawn and despawn/kill events
9:32 PM
it depends on how often you need to do this, even getting all actors might not cause that much lag tbh
Avatar
im not even sure how i would do this
9:34 PM
and do this each like 30min
Avatar
getting all actors each 30 min shouldn't cause any noticeable lag
9:40 PM
but if you want to make sure it doesn't you can build a cache
9:40 PM
a lot of ways to do this
Avatar
But it wont update the data in real time
10:10 PM
right
Avatar
wdym?
Avatar
we want something simillar to ArkBot
10:12 PM
but made with ARK server API
Avatar
every field in ArkServerAPI is read from game memory, it will always be up to date
Avatar
the cache would be?
Avatar
the cache is something you have to make, so it depends on how you make it
Avatar
also my vscode is 2022
10:13 PM
studio*
Avatar
would that work fine
10:20 PM
or it has to be a downgreaded version
Avatar
it should work fine
Avatar
The C# project is working great. It misses few extra properties that were added during 2021 but it's not important since they're not required (and they can be added by hand quite easily thanks to useful debug outputs in console). (edited)
10:53 PM
and this project is a port from Java so you can also find it in Java
Avatar
Avatar
OSubMarin
The C# project is working great. It misses few extra properties that were added during 2021 but it's not important since they're not required (and they can be added by hand quite easily thanks to useful debug outputs in console). (edited)
Talking about ARK bot?
Avatar
no Ark Savegame Toolkit
Avatar
Is the private one available
12:44 AM
for source?
Avatar
Is it the latest one?
12:59 AM
1:30 AM
Seems to work
1:33 AM
1:33 AM
Yeah....
Avatar
you have to keep in mind that file access locks the file, so other processes cannot read it in the meanwhile
1:36 AM
this is important because if the server decides to save while your tool is reading the savefile, the server just won't save
1:36 AM
and your tool might cause data loss
1:36 AM
this is already an issue with ArkBot
Avatar
idk how i will decide what to pick
1:37 AM
from a 2-8GB json file
Avatar
same during server boot, if your tool reads the savefile while the server is booting, there is a chance that the server won't be able to read the savefile and will wipe itself
Avatar
I already have that sorted out
1:37 AM
I make a copy of the file
1:37 AM
else where
1:39 AM
Should is save the data in a database maybe?
Avatar
no idea, i don't know what you're trying to achieve with this project
1:40 AM
😄
Avatar
read list of dinos
1:40 AM
and structures
Avatar
those things constantly change, not sure how you'd keep a database of so much data updated
Avatar
so json is best way?
1:42 AM
But how would i read a 2GB json file
1:42 AM
without crashing anythnig
Avatar
what are you reading it in
Avatar
NodeJS
1:43 AM
but i can do it in any language really
Avatar
yeah but what are you doing with the information
1:44 AM
you got a list of dinos
1:44 AM
now what
Avatar
To list them on a website
1:44 AM
With the name and status like health
1:45 AM
That is binded to my website with a steam account login
Avatar
i would dump this info via a plugin tbh and avoid the multiple gb files scenario 😄
Avatar
Don't know why you're having such a big json file when you could just use the server api to loop all actors grab the dinos and structures
1:46 AM
It won't be large and then use whatever you want to read that data for the website
Avatar
you could even integrate sockets or some other communication method into your plugin so your website could request the data directly from the servers running the plugin
Avatar
If the files are getting bigger you could add split them based off any data you want
1:47 AM
Tribe id
1:47 AM
or anything you want
Avatar
GameObject is typeble right (edited)
1:47 AM
Like by type of dino
1:47 AM
or etc...
Avatar
in what?
1:48 AM
ArkServerAPI?
Avatar
In the C# library you gave me
1:48 AM
Ark savegame toolkit
Avatar
i've certainly not given you any library and i certainly never used it 😄
Avatar
Avatar
WETBATMAN
i would dump this info via a plugin tbh and avoid the multiple gb files scenario 😄
Like make a plugin with websocket
1:49 AM
to read data?
1:49 AM
I don't even know how to make a plugin lol
1:50 AM
Yeh idk (edited)
Avatar
dunno man you asked if it would be better to make a plugin or read the savefile, we told you it's better to make a plugin and now you say you don't know how to make it 🤷
1:51 AM
not sure what kind of help you expect, you don't seem to know what you're going for yet
Avatar
Plugin will be the easiest most scalable solution with better customization.
1:52 AM
Imma do a plugin then.
1:52 AM
I think its better option
1:52 AM
brb going to forums to check for a base tutorial
1:53 AM
use the project template created by Substitute
Avatar
Oh that saves time
1:53 AM
Thank you
1:56 AM
you can look at my example of destroying all structures for a tribe
1:56 AM
to see how to get all actors of class
2:00 AM
2:00 AM
great.
2:02 AM
now it worked
2:02 AM
🙂
2:06 AM
What are hooks in ARK Server API
2:08 AM
Avatar
you can intercept game functions and add your own code into them
2:14 AM
you can do this for any function that runs on the server
2:17 AM
Would this work
2:17 AM
const auto& PCS = ArkApi::GetApiUtils().GetWorld()->PlayerControllerListField();
Avatar
Avatar
WETBATMAN
you could even integrate sockets or some other communication method into your plugin so your website could request the data directly from the servers running the plugin
what if i dont want a socket
2:33 AM
2:50 AM
Wtf
3:00 AM
fixed
Avatar
1. Is there a way to unlock only certain item engrams? https://discord.com/channels/513432877904691202/513502859992760321/704122693569609728 , but I would like to know how to unlock only one or a few. 2. Is there a way to expand the character max level? Or you need a way to ascension.
Avatar
help T.T
Avatar
@deleted-role I registered this morning, and I wanted to download a plugin but the button wasn't "lit up" so I figured that I had to verify first. But I'm waiting for the verification mail to come, but it isn't coming. Anything I can do about this?
Avatar
Avatar
Joren
@deleted-role I registered this morning, and I wanted to download a plugin but the button wasn't "lit up" so I figured that I had to verify first. But I'm waiting for the verification mail to come, but it isn't coming. Anything I can do about this?
GSH | MrOwlSky 1/16/2022 12:32 AM
Foppa or Mich will be able to get back with you on this
Avatar
Avatar
GSH | MrOwlSky
Foppa or Mich will be able to get back with you on this
Thank you. May I @ one of them or?
Avatar
Avatar
GSH | MrOwlSky
Foppa or Mich will be able to get back with you on this
This also happened to me. Still have not received a verification email as well
Avatar
GSH | MrOwlSky 1/18/2022 6:44 PM
Only Foppa and Mich have backend site access to check on that you'd need to contact them directly
Avatar
@Foppa I do not mean to ping. But would you rather me DM you?
Avatar
can this code editor be used to make shop and points system on Xbox Ark?
Avatar
Avatar
LadyWolf
can this code editor be used to make shop and points system on Xbox Ark?
no
😭 1
Avatar
Avatar
Teach
@Foppa I do not mean to ping. But would you rather me DM you?
I have been troubleshooting it, but no cigar yet.
💯 2
Avatar
Thank you. I know you are busy, so I dont mean to be rude. Let me know if I can help
Avatar
Avatar
Foppa
I have been troubleshooting it, but no cigar yet.
Thank you again
Avatar
Will update as soon as i can
💯 2
Avatar
for some reason i cant manage to get my plugins to connect to my mysql server. the installation is done correct and the connection details are also correct. does anyone have any idea what can be the issue?
Avatar
jraServerAPI 1/20/2022 4:07 PM
you'll need to share more content with us.. can you show us your config files?
Avatar
🐨Dream Doctor🦘 1/21/2022 3:15 AM
Hey I've been out of touch for a bit, but I've just seen the new work done on ArkShop. It's so great to see all our gurus here working together on such an important part of the plugin ecosystem. Thank you so much to you all for the hard work and cooperation. It's fantastic! 🙂
Avatar
🐨Dream Doctor🦘 1/21/2022 4:23 AM
@Foppa Will you be making the source available for the official plugin updates?
Avatar
Avatar
🐨Dream Doctor🦘
@Foppa Will you be making the source available for the official plugin updates?
Are you referring to ArkShop because that is already on the github and updated. (edited)
5:13 AM
ArkShopUI source will not be available however.
Avatar
Avatar
Lethal
Are you referring to ArkShop because that is already on the github and updated. (edited)
🐨Dream Doctor🦘 1/21/2022 5:48 AM
Yes just referring to the ArkShop plugin. Thanks for the info Lethal. I'll go have a look at GitHub. Thanks again for your work! 🙂
Avatar
Deleted User 1/21/2022 7:23 AM
anyone figured out /kit commands for xbox nitrado servers?
Avatar
Avatar
Deleted User
anyone figured out /kit commands for xbox nitrado servers?
ArkApi will not work on nitrado first of all, but it also only works for the steam version of the game
Avatar
Deleted User 1/21/2022 9:28 AM
There is a cluster on Xbox called permafrost and they have working /kit commands
9:28 AM
How……. Idk but they proved it was possible
Avatar
🐨Dream Doctor🦘 1/21/2022 10:06 AM
They do seem to have / commands on their Xbox cluster. I wonder how?
Avatar
probably custom API port for that game version 🤷
Avatar
Avatar
🐨Dream Doctor🦘
They do seem to have / commands on their Xbox cluster. I wonder how?
should ask in their discord, its possible they arent even using server api, they could have made something themselves (w10 has debug symbols shipped w/ it as well)
2:39 PM
also
2:39 PM
lol
2:40 PM
some interesting commands... 😂
Avatar
But can you host win10 yourself?
3:37 PM
I thought it was only by 3rd party hosts
Avatar
Avatar
Pelayori
But can you host win10 yourself?
I think you can but using the Windows 10 xBox version (like Single Player).
Avatar
Avatar
WETBATMAN
probably custom API port for that game version 🤷
the host has probably allowed the api software
8:03 PM
there isn't really anything different between console and PC servers other than how they auth clients
8:03 PM
and I would be shocked if they didn't use Windows servers for Xbox
Avatar
Avatar
Pelayori
But can you host win10 yourself?
ah im not really sure
Avatar
КосАмА 1/22/2022 12:42 PM
how to add plugins to nitrado server
Avatar
Avatar
КосАмА
how to add plugins to nitrado server
you can't they do not allow external dll files to be loaded
Avatar
КосАмА 1/22/2022 12:42 PM
ok thx
Avatar
Any updates on the unable to verify email issue? @Foppa
Avatar
🐨Dream Doctor🦘 1/23/2022 7:30 AM
Guys the new ArkShop is such brilliant work! And the combination of that and the new interface mod is just unbeatable. It's a magical thing seeing what can result from the plugin and modding community cooperating together.
Avatar
Indeed, it's glorious
Avatar
Avatar
🐨Dream Doctor🦘
Guys the new ArkShop is such brilliant work! And the combination of that and the new interface mod is just unbeatable. It's a magical thing seeing what can result from the plugin and modding community cooperating together.
What is the new interface mod?
11:42 PM
but it seems to require a regular mod (client side downloaded) unfortunately :p (edited)
Avatar
Avatar
OSubMarin
but it seems to require a regular mod (client side downloaded) unfortunately :p (edited)
plugins cannot render anything on screen otherwise i'm afraid 😦
Avatar
yeah that's why I was curious about this new UI thing
12:19 AM
you can only reuse existing UI stuff to a certain extent with plugins
Avatar
By the way, I'm not planning to add client side mod on my server but if I do, is your Getter Component usable by anyone? @WETBATMAN (edited)
Avatar
Avatar
OSubMarin
By the way, I'm not planning to add client side mod on my server but if I do, is your Getter Component usable by anyone? @WETBATMAN (edited)
yes
Avatar
Cool thank you 😉
Avatar
Avatar
OSubMarin
By the way, I'm not planning to add client side mod on my server but if I do, is your Getter Component usable by anyone? @WETBATMAN (edited)
🐨Dream Doctor🦘 1/24/2022 12:48 AM
What is a "getter component'?
Avatar
It's a mod that WETBATMAN published on the Steam Workshop for Ark
12:49 AM
it's downloaded/installed client side
12:49 AM
and I believe it allows server-side plugins to "Get" (as in Getter Component ^^) some information (edited)
12:51 AM
Unfortunately there's no description on the Steam workshop, so maybe WETBATMAN can give us more details about the mod features.
12:54 AM
Also I cannot find any usage explanations (that's why I asked if it was made for public use or not). Are we supposed to IDA it to use it? @WETBATMAN (edited)
Avatar
🐨Dream Doctor🦘 1/24/2022 1:06 AM
I would assume that if it was something that wetbatman wanted us to use he would have provided the details for us already.
Avatar
He just said we can use it, that's why I asked in the first place.
Avatar
Blueprint'/Game/Mods/HWIDBans/Actor_BP_HWIDBans.Actor_BP_HWIDBans'
1:08 AM
find the actor by bp on server load
1:08 AM
cache it
1:08 AM
1:08 AM
then call the function like this, pass the controller as a parameter
Avatar
that's easy usage thank you
1:09 AM
I'm not planning to use it for now, but I'll keep in mind if I need it.
Avatar
you need to then hook ProcessEvent to receive the HWID
Avatar
alright
1:10 AM
what i do is i look up the function that is invoked once the server gets the HWID and i bind it to a local c++ function
1:10 AM
1:11 AM
then you just unpack params inside ProcessEvent when this function is called
1:11 AM
that's about it
👍 2
Avatar
alright
Avatar
void CheckPlayer(AShooterPlayerController* PC, FString PlayerHWID)
1:13 AM
exactly
Avatar
I'm not familiar with FindFunctionCheck :p
Avatar
FindFunctionChecked returns UFunction
1:15 AM
you use this when you want to get a pointer to a function from a blueprint
Avatar
ah ok I understand now
Avatar
then you can call ProcessEvent with the function pointer and parameters (if any)
1:15 AM
and it will invoke it
Avatar
ok
Avatar
Start_Get_Client_HWID signals the mod to run a Run On Client function to get the HWID
1:16 AM
ROS_Server_Receive_HWID is a function from my mod that is called when the client responds with the HWID
Avatar
yeah I noticed
1:17 AM
I'm not familiar with the event system as well ^^
1:18 AM
but it does not seems too much complicated with your examples 👍 (edited)
Avatar
as long as you know the function name and it's parameters in BP it's really easy to call/intercept events
👌 1
1:20 AM
also, please ensure that the client is ready for RPC calls before you call the get hwid function
1:20 AM
Hook_APlayerController_ServerReceivedPlayerControllerAck_Implementation
1:20 AM
i start my check from this hook
1:20 AM
but sometimes even here the client is not ready
1:20 AM
so you might have to call the function multiple times with a delay to get a reponse
Avatar
ah, what I use to start my player processing is AShooterGameMode.SpawnedPawnFor
1:21 AM
I'll give a try at APlayerController.ServerReceivedPlayerControllerAck_Implementation if needed
Avatar
this will not trigger if the player is on the spawn screen when they log in
1:22 AM
which is not ideal for HWIDBans 😄
Avatar
ah ok ^^
Avatar
Avatar
OSubMarin
ah, what I use to start my player processing is AShooterGameMode.SpawnedPawnFor
i meant this hook
1:22 AM
my hook triggers on connect
Avatar
yeah this SpawnedPawnFor only triggers when the player controller gets binded to its in game character
1:23 AM
noticed that already
Avatar
well, that is pretty much it for usage, if you have any questions let me know
Avatar
that's very clear thank you
👍 1
Avatar
@WETBATMANdon't use a struct to unpack parameters
2:32 AM
updates to the game could break the structure at any time
2:32 AM
use reflection
2:35 AM
You can cache the property offsets/sizes after the first read if you want to
Avatar
Avatar
substitute
updates to the game could break the structure at any time
what do you mean?
Avatar
Avatar
WETBATMAN
what do you mean?
They are generated at compile time (for the bp)
9:38 AM
So even just a content update could change them
Avatar
yeah but this struct is from my mod
Avatar
^^
Avatar
КосАмА 1/24/2022 10:12 PM
in what time they can aprove me
Avatar
Avatar
КосАмА
in what time they can aprove me
It's done
Avatar
🐨Dream Doctor🦘 1/25/2022 5:46 AM
I wonder if I can make a really humble request regarding ongoing development of the api code. I think it's safe to say that a lot of people who come into the API ecosystem are not anywhere near as proficient programmers are the awesome gurus we have here. Something I really admired about Mich's code was that he kept it as simple as he possibly could most of the time. He avoided a lot of shortcuts and kept it longform where possible. This made the API code reasonably easy to read and understand for less advanced programmers. I know you guys all have a thousand amazing tricks up your sleeves, but can I humbly request you try and continue the tradition of keeping it as simply as possible? Simple things like avoiding the ternary operator can make a big difference to end users while making little or no difference to the quality or speed of the end result. Just my thoughts 🙂
Avatar
How dare you denying the ternary operator kimyell
5:50 AM
It's just an if else on a line, nothing sophisticated, but apart from that you're right (the simpler the better). (edited)
Avatar
Avatar
🐨Dream Doctor🦘
I wonder if I can make a really humble request regarding ongoing development of the api code. I think it's safe to say that a lot of people who come into the API ecosystem are not anywhere near as proficient programmers are the awesome gurus we have here. Something I really admired about Mich's code was that he kept it as simple as he possibly could most of the time. He avoided a lot of shortcuts and kept it longform where possible. This made the API code reasonably easy to read and understand for less advanced programmers. I know you guys all have a thousand amazing tricks up your sleeves, but can I humbly request you try and continue the tradition of keeping it as simply as possible? Simple things like avoiding the ternary operator can make a big difference to end users while making little or no difference to the quality or speed of the end result. Just my thoughts 🙂
is there any code in particular that made you say this?
10:10 AM
or is it just a general remark
Avatar
Avatar
WETBATMAN
is there any code in particular that made you say this?
🐨Dream Doctor🦘 1/25/2022 10:22 AM
I definitely don't mean it as any kind of criticism. I suppose that I have (as someone nowhere near as advanced or clever as you guys) a little more trouble working through the new additions to the API, ArkShop etc than I used to with Mich's older code. I'm sure it's really annoying being asked to dumb down your brilliant work, but I just think that with a big open source project like this it's important to consider as many potential skill levels as possible.
Avatar
I think I try to make open source code more readable than private code. You would be scared if you saw some of my multiple ternary operator usage lol
12:11 PM
I think it's not bad to use it, if it's correctly marked, after all the api is a tool for ark, and assumes you have some sort of c++ knowledge (edited)
Avatar
Avatar
Pelayori
I think it's not bad to use it, if it's correctly marked, after all the api is a tool for ark, and assumes you have some sort of c++ knowledge (edited)
🐨Dream Doctor🦘 1/25/2022 1:57 PM
Absolutely, you obviously need some C++ knowledge, but I think we can all agree that when it comes to C/C++, there is a whole universe between "some" knowledge, and experts like yourselves. Any help us mere mortals can get to comprehend what's put into the API is a wonderful thing.
Avatar
Yes but this Discord is here just to solve that problem : Bringing people together from all horizons so that you can talk/ask questions and improve in the Ark modding environment. If there's a piece of code that looks too complicated you can get explanations here or ask for some examples or for an equivalent piece of code, or even a re-write. It costs nothing to ask except a little time :p (edited)
2:09 PM
To keep the API simple since it is the shared piece of code between all modders is always a good reminder anyway 👍 Also some concise comments in the code is a big plus. (edited)
Avatar
Do you know,Open the backpack the hook,Can you tell me😥
Avatar
Avatar
🐨Dream Doctor🦘
I wonder if I can make a really humble request regarding ongoing development of the api code. I think it's safe to say that a lot of people who come into the API ecosystem are not anywhere near as proficient programmers are the awesome gurus we have here. Something I really admired about Mich's code was that he kept it as simple as he possibly could most of the time. He avoided a lot of shortcuts and kept it longform where possible. This made the API code reasonably easy to read and understand for less advanced programmers. I know you guys all have a thousand amazing tricks up your sleeves, but can I humbly request you try and continue the tradition of keeping it as simply as possible? Simple things like avoiding the ternary operator can make a big difference to end users while making little or no difference to the quality or speed of the end result. Just my thoughts 🙂
A lot of this can be fixed by migrating over to new C++ standards
10:17 PM
C++14 is good, C++17 is great, C++20 is awesome
10:18 PM
The API doesn't even use C++14 standards. Hooks (DECLARE_HOOK) utilize C macros instead of STL templates
10:21 PM
this, for example, is from my own template for hooking functions that use standard calling conventions (which our DECLARE_HOOK macro is also limited by (even more limited, it assumes fastcall))
10:21 PM
static hookable<void(sdk::UObject*, sdk::UFunction*, void*)> process_event_;
10:22 PM
where the template type is the std::function signature of the function to hook.
10:22 PM
and then calling the original is just as trivial from a user callback auto spongehax::process_event(sdk::UObject* who, sdk::UFunction* what, void* how) -> void { while(!tick_queue.empty()) { tick_queue.front()(); tick_queue.pop(); } const auto func = what->GetName(); auto handled = false; for (auto [_, callback] : process_event_handlers[func]) { handled = callback(who, how); if (handled) return; } process_event_.original(who, what, how); }
10:24 PM
setting the address of the object is just process_event_.reset(0xadd9e55); and taking the address of the address of (for Detours, MinHook, etc.) DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(process_event_.get(), process_event); // (hookable_object.get(), callback) DetourTransactionCommit(); (edited)
10:25 PM
same goes for future stuff dealing with reflection in UE4
10:25 PM
to be frank, I don't really think we should be hooking the native methods anymore outside of methods that absolutely must be hooked this way, unless we change how we hook.
10:26 PM
option one, which keeps the API slim, is to have people hook the UE4 event system by passing the event name (function name) and a callback to the API which keeps a table of these events
10:27 PM
this would make the api closer to how Minecraft plugins work where a callback can say if it handled the event or not (stop/keep bubbling)
10:28 PM
the other option is similar but would require the API to make signatures for each native function and use an expansion of the above code. I have created a proof of concept where users can register callbacks to a hook_event which has a static callback to pass the data into the registered callbacks.
10:29 PM
this however requires defining one of these for each function AND requires the usage of some system to ensure unique types. Personally, I suggest using either tag structures (empty structs) or string literals.
10:29 PM
string literals is the better option but last I tested makes VS2022 (and earlier) show a compiler error (but compiles fine)
10:29 PM
the benefit to string literals is that these could also be used for calling a function/resolving it by the pdb, AIO.
10:30 PM
template<typename RT, typename VA, typename ...A, typename name> class HookEvent<RT(A...), VA, name> { public: static inline hookable<RT(A...)> hook; static inline std::vector<std::function<RT(A..., bool&)>> preHooks; static inline std::vector<std::function<RT(A..., bool&)>> postHooks; static RT callback(A... args) { auto handled = false; for (auto hook : preHooks) { hook(args..., handled); if (handled) return; } hook.original(args...); for (auto hook : postHooks) { hook(args..., handled); if (handled) return; } } using type = HookEvent<RT(A...), VA, name>; };
10:31 PM
one example implementation of such a template
10:31 PM
wherein the handled value is passed by reference as an extra arg
Avatar
Avatar
substitute
setting the address of the object is just process_event_.reset(0xadd9e55); and taking the address of the address of (for Detours, MinHook, etc.) DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(process_event_.get(), process_event); // (hookable_object.get(), callback) DetourTransactionCommit(); (edited)
I’m upset you didn’t use 0xD34DB33F as the address in your example
Avatar
We were just saying to keep it simple and now you want to change everything. Doesn't sound so simple to me, I'm fine with macros (everyone knows Macros I guess).
Avatar
someone told me you can just forward the dll exports directly, rather than setting up a project as having a masm build dependency + needing a module def file & needing to use loadlibrary and etc etc... just figured id share because i thought it was pretty cool, all you have to do is this #pragma comment(linker, "/export:GetFileVersionInfoA=C:\\windows\\system32\\version.dll.GetFileVersionInfoA,@1") #pragma comment(linker, "/export:GetFileVersionInfoByHandle=C:\\windows\\system32\\version.dll.GetFileVersionInfoByHandle,@2") #pragma comment(linker, "/export:GetFileVersionInfoExA=C:\\windows\\system32\\version.dll.GetFileVersionInfoExA,@3") #pragma comment(linker, "/export:GetFileVersionInfoExW=C:\\windows\\system32\\version.dll.GetFileVersionInfoExW,@4") #pragma comment(linker, "/export:GetFileVersionInfoSizeA=C:\\windows\\system32\\version.dll.GetFileVersionInfoSizeA,@5") #pragma comment(linker, "/export:GetFileVersionInfoSizeExA=C:\\windows\\system32\\version.dll.GetFileVersionInfoSizeExA,@6") #pragma comment(linker, "/export:GetFileVersionInfoSizeExW=C:\\windows\\system32\\version.dll.GetFileVersionInfoSizeExW,@7") #pragma comment(linker, "/export:GetFileVersionInfoSizeW=C:\\windows\\system32\\version.dll.GetFileVersionInfoSizeW,@8") #pragma comment(linker, "/export:GetFileVersionInfoW=C:\\windows\\system32\\version.dll.GetFileVersionInfoW,@9") #pragma comment(linker, "/export:VerFindFileA=C:\\windows\\system32\\version.dll.VerFindFileA,@10") #pragma comment(linker, "/export:VerFindFileW=C:\\windows\\system32\\version.dll.VerFindFileW,@11") #pragma comment(linker, "/export:VerInstallFileA=C:\\windows\\system32\\version.dll.VerInstallFileA,@12") #pragma comment(linker, "/export:VerInstallFileW=C:\\windows\\system32\\version.dll.VerInstallFileW,@13") #pragma comment(linker, "/export:VerLanguageNameA=C:\\windows\\system32\\version.dll.VerLanguageNameA,@14") #pragma comment(linker, "/export:VerLanguageNameW=C:\\windows\\system32\\version.dll.VerLanguageNameW,@15") #pragma comment(linker, "/export:VerQueryValueA=C:\\windows\\system32\\version.dll.VerQueryValueA,@16") #pragma comment(linker, "/export:VerQueryValueW=C:\\windows\\system32\\version.dll.VerQueryValueW,@17") (edited)
Avatar
jraServerAPI 1/28/2022 6:55 PM
Be on the lookout!
6:55 PM
6:55 PM
he's still at it (edited)
Avatar
Just got a message as well
Avatar
\mysql++11.h error compile no declare 'MYSQL_TYPE_LONGLONG' (edited)
Avatar
🐨Dream Doctor🦘 1/29/2022 8:04 AM
Is it possible that casting an AActor to APrimalDinoCharacter when the AActor isn't a dino would crash the server? I thought it would just return a nullptr? Trying to track down a weird crash.
Avatar
Yes, that will cause issues.
8:14 AM
Casting isn't doing anything other than telling the compiler that the type you currently have is actually another type
Avatar
Avatar
Frigoff
Casting isn't doing anything other than telling the compiler that the type you currently have is actually another type
🐨Dream Doctor🦘 1/29/2022 8:31 AM
And you're certain it could crash the server?
Avatar
If you're derefing a nullptr then yes.
8:35 AM
Just attach a debugger and find the crash
Avatar
🐨Dream Doctor🦘 1/29/2022 8:43 AM
Not sure exactly what you mean. It's not a nullptr. Rather it's possible the Actor is not a dino, but something else, in rare cases. I guess I can always check the actor class before trying to cast it, but I'm trying to avoid extra steps as there could be a large number of events. I thought that an incorrect cast would just return nullptr rather than crash the server.
Avatar
const auto dino = (APrimalDinoCharacter*)actor; dino->SomeComponent->SomeValue;
9:16 AM
Will crash if SomeComponent isn't a valid ptr
9:16 AM
Casts do not check if it's invalid or not, they do what you say.
9:17 AM
The performance lost on checking the static class vs just assuming is worth it.
Avatar
🐨Dream Doctor🦘 1/29/2022 10:31 AM
Struggling to make sense of this function: Hook_APrimalDinoCharacter_Die(APrimalDinoCharacter* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) It provides a Controller reference, which I assumed would not be valid if the killer was a dino, but it is, and that reference can be cast to a valid ShooterPlayerController reference. How is that possible when it's a dino that's doing the killing? At first I thought it was because the dino was being ridden, but it does this even when the wild dino is the killer?
Avatar
AI controller.
10:35 AM
Also I think you're confusing can cast with should cast
10:35 AM
You can cast an int to a float and make changes.
10:35 AM
You should not cast an int to a float and make changes
Avatar
Avatar
🐨Dream Doctor🦘
Struggling to make sense of this function: Hook_APrimalDinoCharacter_Die(APrimalDinoCharacter* _this, float KillingDamage, FDamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) It provides a Controller reference, which I assumed would not be valid if the killer was a dino, but it is, and that reference can be cast to a valid ShooterPlayerController reference. How is that possible when it's a dino that's doing the killing? At first I thought it was because the dino was being ridden, but it does this even when the wild dino is the killer?
like already mentioned, dino's have controllers too
11:05 AM
you can check if it's an AI controller with the IsLocalController function
11:05 AM
or just check if the controller is of class AShooterPlayerController
Avatar
To add to the above, one of the only assumptions you can do with controller's cast is that APlayerController can always (or most of the times) be casted to AShooterPlayerController, but AController is not always a player controller
Avatar
🐨Dream Doctor🦘 1/29/2022 12:46 PM
Thanks guys. Much appreciated as always 🙂
Avatar
I have a problem that doesn't make much sense.every time a player attacks a base his ping locks 255 and this message appears here. this only happens when going to attack a base and the turrets start attacking.
monkaW 1
2:23 PM
I've already created a server from scratch without a plugin and the error still happens.
Avatar
Is there a guide to adding pugins for a Nitrado server? Sorry for the noob question 😄
Avatar
Avatar
Gray
Is there a guide to adding pugins for a Nitrado server? Sorry for the noob question 😄
plugins cannot be added to nitrado servers
2:49 PM
unless you rented a dedicated machine from them of course
Avatar
Ah unfortunate. I really want to add a shop to my server, but the only good one ive come across is a plugin and not a steam mod
2:52 PM
Is it possible to take my nitrado server and move it to somewhere else and then add the plugin??
Avatar
if you pick another host that supports addition of custom dll's then yes
Avatar
Sorry, what is dll?
Avatar
file extension
2:54 PM
to load ArkApi you need to install version.dll and msdia140.dll, some hosts do not allow such files to be transferred over ftp
Avatar
What hosts do people here typically recommend?
Avatar
ServerBlend, GameServerApp, LogicServers are the 3 I have more confidence on
Avatar
Ok, ill have to check those out, thank you guys! (edited)
👍 2
Avatar
Avatar
DEX
I have a problem that doesn't make much sense.every time a player attacks a base his ping locks 255 and this message appears here. this only happens when going to attack a base and the turrets start attacking.
look if it's the vanilla Tek Turret.
1:02 AM
if it's above 50-100 turrets it will cause issue from my findings
1:02 AM
had to remove them
Avatar
Like what I was thinking could be the network, I have another server on another network and I don't have this problem.
Avatar
It's how ever network related but it's due to the Tek Turret that sends too much network packets for the client to handle. Tested it. And one player can get about 5-10mbit/s for just couple of turrets (edited)
1:37 AM
from my findings at least
Avatar
Avatar
Foppa
It's how ever network related but it's due to the Tek Turret that sends too much network packets for the client to handle. Tested it. And one player can get about 5-10mbit/s for just couple of turrets (edited)
yes it was the only thing i thought could cause this, the network issue. Is there any plugin that allows the reduction of packages that clinete uses?
Avatar
I have been looking into it and i believe it might be able to be solved by a plugin. But haven't solved it yet. How ever it might be easier to be solved in a mod
Avatar
I understand, the way and look for another network. OR leave the server closed because I've looked everywhere
Avatar
Avatar
Frigoff
Casting isn't doing anything other than telling the compiler that the type you currently have is actually another type
Not entirely no
7:50 PM
Dynamic cast returns nullptr if a cast fails
Avatar
Didn’t know that. How can a cast fail
Avatar
Avatar
Frigoff
Didn’t know that. How can a cast fail
Generally if the type isn’t really the type you are asking for
7:51 PM
That’s pretty cool
Avatar
Static cast can also fail
7:52 PM
But only at compile time
7:52 PM
Downcasting from actor to primal Dino is valid at compile time
7:52 PM
So static allows it
7:53 PM
Even if we don’t know if actor is actually primal Dino
7:53 PM
It takes the assumption the developer has ensured only primal Dinos are passed in as actor
7:53 PM
While dynamic cast happens at run time
7:53 PM
And doesn’t assume that
Avatar
That’s pretty cool to know. But say you have passed in an AActor*
7:55 PM
You dynamic cast it to a PrimalDino*
7:55 PM
But really it’s a APrimalStructure
Avatar
You would get a null primal Dino pointer if it wasn’t a pointer
Avatar
How does it know which it really is?
Avatar
I would still recommend using the UE4 reflection system to type check though
Avatar
Avatar
Frigoff
How does it know which it really is?
In the context of the api, it probably doesn’t
7:56 PM
But in your own code there is some basic type information
7:56 PM
Stored in types
Avatar
Okay. But for general cpp ye
7:56 PM
I guess it would still run into issues if you’re passing in a base type that leads into two different higher types though
7:56 PM
And trying to separate based on those higher types
7:57 PM
But that’s just bad practice anyways, still cool none the less
Avatar
Personally I would avoid dynamic cast
Avatar
Base* b2 = new Derived; if (Derived* d = dynamic_cast<Derived*>(b2); d != nullptr) { std::cout << "downcast from b2 to d successful\n"; d->name(); // safe to call }
Avatar
I would instead explicitly check the type using UE4 reflection
Avatar
Isn’t the d != nullptr
7:58 PM
Redundant
Avatar
No
Avatar
Avatar
substitute
I would instead explicitly check the type using UE4 reflection
Yeah that is the correct answer
Avatar
They call the name method on d
7:58 PM
If d was null it would crash
7:58 PM
As 0x0+X is an invalid address
Avatar
But it’s being declared in an of statement
7:59 PM
Which checks the
7:59 PM
Value of the declaration
Avatar
The first initializes the variable (edited)
7:59 PM
It doesn’t check it
7:59 PM
And it declares it
Avatar
Has my life been a lie
Avatar
Reread it
Avatar
Does
8:00 PM
if(const auto ptr = get_ptr(…))
8:00 PM
Not check if ptr is a nullptr
Avatar
~~~v Declaration, could equal null. ~~~v check d value if (Derived* d = dynamic_cast<Derived*>(b2); d != nullptr) { std::cout << "downcast from b2 to d successful\n"; d->name(); // safe to call }
8:01 PM
Derived* d = dynamic_cast<Derived*>(b2); isn't equality check
8:01 PM
assignment should always work
Avatar
Yes but does assignment within if not get checked for validity
8:02 PM
After the assignment
Avatar
Explicit checks are still always best
8:04 PM
It is redundant but not very clear
Avatar
possibly
8:06 PM
could also depend on the compiler
8:06 PM
Their examples are supposed to kinda be universal
8:06 PM
so maybe they're covering all bases
Avatar
Yeah. Well cool to learn something new
8:07 PM
👍
Avatar
🐨Dream Doctor🦘 1/31/2022 2:08 AM
Does anyone know... when a player transfers in to a server from another server, is there any way to determine which server they have come from?
Avatar
Speaking of transfers, I'm looking for a way to stop people from traveling with their inventories but allow them to retrieve items from the obelisks. Does anyone have an idea or willingness to open commissions for such a thing?
2:21 AM
I'd need to trick the origin server to think that the remote server doesn't allow item downloads somehow.
Avatar
Avatar
meza
Speaking of transfers, I'm looking for a way to stop people from traveling with their inventories but allow them to retrieve items from the obelisks. Does anyone have an idea or willingness to open commissions for such a thing?
🐨Dream Doctor🦘 1/31/2022 4:07 AM
Have you looked at @Lethal 's Items+? It's an incredibly good plugin with a great deal of flexibility.
👍 1
Avatar
is ark api in c++ or c#
Avatar
c++
Avatar
k thx
Avatar
Avatar
🐨Dream Doctor🦘
Have you looked at @Lethal 's Items+? It's an incredibly good plugin with a great deal of flexibility.
I need to give it a go but it seems like it's a bit more than I'd need and might not actually do the one thing ... At least it's promising that it seems like it should be possible
Avatar
How would i change FString* Message to FChatMessage ?
Avatar
struct __cppobj FChatMessage { FString SenderName; FString SenderSteamName; FString SenderTribeName; unsigned int SenderId; FString Message; FString Receiver; int SenderTeamIndex; long double ReceivedTime; TEnumAsByte<enum EChatSendMode::Type> SendMode; unsigned int RadioFrequency; TEnumAsByte<enum EChatType::Type> ChatType; UTexture2D *SenderIcon; FString UserId; };
💯 1
10:12 PM
you don't change it, you need to construct an FChatMessage with your text
Avatar
Do you need to fill in everything or can i leave things default?
Avatar
no idea, hook a function containing this struct and check which fields are filled in
Avatar
Or check how the Api utils function sends a chat message 😉 (edited)
Avatar
yeah or that lol
Avatar
🐨Dream Doctor🦘 2/1/2022 4:17 AM
Does anyone have an example of serialising/deserializing an item that they would be willing to share?
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have an example of serialising/deserializing an item that they would be willing to share?
In what way do you want to serialize? (edited)
9:20 AM
For items you could get the item bytes, and serialize the unsigned char array
Avatar
Avatar
Pelayori
In what way do you want to serialize? (edited)
🐨Dream Doctor🦘 2/1/2022 9:23 AM
I want to serialize a primalitem and store it either in a database or a file.
Avatar
Then you can serialize it by item bytes, and then deserialize it by UPrimalItem::CreateFromBytes
9:25 AM
It preserves item stats and such if I recall correctly
Avatar
Avatar
Pelayori
Then you can serialize it by item bytes, and then deserialize it by UPrimalItem::CreateFromBytes
🐨Dream Doctor🦘 2/1/2022 11:28 AM
Amazing! Thank you!
Avatar
🐨Dream Doctor🦘 2/2/2022 4:43 AM
Has anyone had any experience with loading classes and case-sensitivity? It seems like BPLoadClass is case sensitive, yet all the in-game commands are not case sensitive. This means people can test a blueprint string in game and have it work, but when used with BPLoadClass it will fail. Is there any way around this?
4:47 AM
And another question.... has anyone found a solution to the issue of servers "freezing" when their console window is in foreground? You can hit enter a couple of times and the server will continue, otherwise it will eventually be killed by the hang detection. This only seems to happen with servers running the API, not vanilla servers. It's almost like the main thread pauses waiting for console input of some kind?
Avatar
jraServerAPI 2/2/2022 5:22 AM
I know that if you accidently click on the server console/window it will pause it, because that's a behavior of Windows, to allow you to select and copy (by pressing enter) what's in the command window. (edited)
Avatar
Avatar
jraServerAPI
I know that if you accidently click on the server console/window it will pause it, because that's a behavior of Windows, to allow you to select and copy (by pressing enter) what's in the command window. (edited)
🐨Dream Doctor🦘 2/2/2022 7:11 AM
That would explain it. Thank you. I wonder why I never see it in vanilla servers though, only API. Maybe because most of our servers are running the API.
Avatar
Different type of console.
Avatar
Avatar
🐨Dream Doctor🦘
Has anyone had any experience with loading classes and case-sensitivity? It seems like BPLoadClass is case sensitive, yet all the in-game commands are not case sensitive. This means people can test a blueprint string in game and have it work, but when used with BPLoadClass it will fail. Is there any way around this?
They are case sensitive and the commands are all forced lowercase.
7:39 AM
You could resolve it.
Avatar
Avatar
🐨Dream Doctor🦘
And another question.... has anyone found a solution to the issue of servers "freezing" when their console window is in foreground? You can hit enter a couple of times and the server will continue, otherwise it will eventually be killed by the hang detection. This only seems to happen with servers running the API, not vanilla servers. It's almost like the main thread pauses waiting for console input of some kind?
if you right click on the console top bar, click on properties and then disable quick edit mode, it should fix your issue
ThankYou 1
Avatar
🐨Dream Doctor🦘 2/2/2022 12:36 PM
I'm getting myself all into knots here. lol I have a UClass for a structure. I need to get ConsumesPrimalItemField from a APrimalStructure of the type in UClass. If I create a new instance of APrimalStructure, how do I set it to the class that I have in UClass so that I can then get the correct ConsumesPrimalItemField back again?
Avatar
Avatar
🐨Dream Doctor🦘
I'm getting myself all into knots here. lol I have a UClass for a structure. I need to get ConsumesPrimalItemField from a APrimalStructure of the type in UClass. If I create a new instance of APrimalStructure, how do I set it to the class that I have in UClass so that I can then get the correct ConsumesPrimalItemField back again?
🐨Dream Doctor🦘 2/2/2022 12:53 PM
Maybe this? APrimalStructure* MyPrimalStructure = static_cast<APrimalStructure*>(_this->GetDefaultObject(true)); UClass* PrimalItemClass = MyPrimalStructure->ConsumesPrimalItemField().uClass;
12:53 PM
I'll give that a try tomorrow when my brain is working lol
Avatar
So you have the UClass of an object and you'd like to get the default obj to access a data member on the object? (edited)
Avatar
Avatar
WETBATMAN
if you right click on the console top bar, click on properties and then disable quick edit mode, it should fix your issue
🐨Dream Doctor🦘 2/3/2022 2:21 AM
That's amazing information, thank you. Do you think it be possible for a plugin to access the properties of the window its running in, and programmatically disable edit mode? This would solve so many crashes it's not funny.
Avatar
🐨Dream Doctor🦘 2/3/2022 2:57 AM
Yep just found that same article! Trying it now, and it seems to work.
3:02 AM
Yeah seems to work fine at disabling quick edit mode. Thanks @WETBATMAN and @Frigoff
👍 1
Avatar
@Foppa, I'm sorry to disturb you, but do you perhaps have any updates about the issue regarding not receiving the verification mail? As I am waiting for a few weeks now but still havent received any.
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone have an example of serialising/deserializing an item that they would be willing to share?
jraServerAPI 2/4/2022 11:20 AM
Could we still see this example 😄 We're you able to get it working?
Avatar
I tried like this: // save data TArray<unsigned char> item_bytes; item->GetItemBytes(&item_bytes); // create item auto* item = UPrimalItem::CreateFromBytes(&item_bytes); https://github.com/2bite/ARK-Server-Plugins-public/blob/main/DumpCryopods/DumpCryopods/DumpCryopods.cpp
ThankYou 2
Avatar
Avatar
jraServerAPI
Could we still see this example 😄 We're you able to get it working?
🐨Dream Doctor🦘 2/4/2022 1:20 PM
Sorry, I haven't gotten to it yet, but the example above looks interesting!
1:24 PM
Does anyone know which functions are used when a player locks and unlocks a PrimalItemStorageContainer? Not with the pin number, but where you can "unlock" a storage container so that anyone can access it without a pin.
1:25 PM
I know how to lock and unlock it with bUnlocked, but I'm wondering what functions are used when players do it in-game.
Avatar
Try multi use, it's generic when the radial menu is triggered, there's no specific funcion
Avatar
Avatar
Pelayori
Try multi use, it's generic when the radial menu is triggered, there's no specific funcion
🐨Dream Doctor🦘 2/4/2022 1:27 PM
OK, I'll take a look, thanks!
Avatar
I am not home to give you the use index, but if you hook try multi use, and print use index you'll get it, it's always the same
Avatar
🐨Dream Doctor🦘 2/4/2022 1:28 PM
Yeah I'll do that, thanks again.
Avatar
I want to know how to get tribeId using Hook_AShooterPlayerState_ServerRequestCreateNewTribe_Implementation(AShooterPlayerState* _this, FString* TribeName, FtribeGovernment TribeGovernment). auto* player_state = static_cast<AShooterPlayerState*>(_this); Log::GetLog()->Error(player_state->MyPlayerDataStructField()->TribeIDField()); Log::GetLog()->Error(player_state->IsInTribe()); Log::GetLog()->Error(player_state->MyTribeDataField()->TribeIDField()); Log::GetLog()->Error(player_state->MyPlayerDataField()->GetTribeTeamID); I tried printing 4 types, but all of them are 0 or different values.. Please help.
Avatar
Well if they are requesting to make a tribe, they don't currently have one.
7:58 PM
You could try letting the original call first and then see if it's filled after the server has handled whatever it needs to.
Avatar
Avatar
Frigoff
You could try letting the original call first and then see if it's filled after the server has handled whatever it needs to.
How should I do it?
Avatar
void Hooked_ServerRequestCreateNewTribe_Implementation(AShooterPlayerState* _this, FString* TribeName, FTribeGovernment TribeGovernment) { original_ServerRequestCreateNewTribe_Implementation(_this, TribeName, TribeGovernment); Log::GetLog()->Error(_this->MyPlayerDataStructField()->TribeIDField()); Log::GetLog()->Error(_this->IsInTribe()); Log::GetLog()->Error(_this->MyTribeDataField()->TribeIDField()); Log::GetLog()->Error(_this->MyPlayerDataField()->GetTribeTeamID); }
8:03 PM
If it returns a value
8:03 PM
You need to return whatever value it wants
8:03 PM
Or you will crash.
8:03 PM
but since I don't know the type I just used void in the example
Avatar
Avatar
Frigoff
but since I don't know the type I just used void in the example
huh thank you so much I'm sure you'll get the results you want. Thank you very much.
Avatar
Can can either do that or make a separate part loop through all playerstates
Avatar
Are all players an online player?
Avatar
Depends how you get them.
Avatar
aha thank you
Avatar
Avatar
Frigoff
Depends how you get them.
Thanks, I solved it.
Avatar
AShooterGameMode* I need a way to change this to AShooterPlayerState or AShooterPlayerController.
6:43 AM
void Hook_AShooterGameMode_AddToTribeLog(AShooterGameMode* _this, int TribeId, FString* NewLog) I want to use that hook to get the tribe name.
Avatar
You can’t turn a GameMode into a PlayerState
6:49 AM
They are completely different
6:50 AM
If you want to see which tribe name is what you will have to loop through where they are stored and compare them
Avatar
Ah, making a log is harder than I thought. Let's try a little bit more first. Thank you.
Avatar
I downloaded the api and compiled Ark it and it gives an error version/Core/Public/API/UE/UE.h Error c++ enum EResourceSizeMode { Exclusive = 0x0, Inclusive = 0x1, Open = 0x2, }; struct FRenderResource { }; struct FTexture : FRenderResource { }; struct FTextureResource : FTexture { }; struct UTexture : UObject { static UClass* StaticClass() { return NativeCall<UClass*>(nullptr, "UTexture.StaticClass"); } }; struct UTexture2D: UTexture { static UClass* StaticClass() { return NativeCall<UClass*>(nullptr, "UTexture2D.StaticClass"); } void GetMipData(int FirstMipToLoad, void** OutMipData) { return NativeCall<void, int, void**>(this, "UTexture2D.GetMipData", FirstMipToLoad, OutMipData); } void UpdateResourceW() { return NativeCall<void>(this, "UTexture2D.UpdateResourceW"); } FTextureResource* CreateResource() { return NativeCall<FTextureResource*>(this, "UTexture2D.CreateResource"); } ------> __int64 GetResourceSize(EResourceSizeMode type) { return NativeCall<__int64, EResourceSizeMode>(this, "UTexture2D.GetResourceSize", type); } float GetSurfaceHeight() { return NativeCall<float>(this, "UTexture2D.GetSurfaceHeight"); } int& SizeX_DEPRECATED() { return *GetNativePointerField<int*>(this, "UTexture2D.SizeX_DEPRECATED"); } int& SizeY_DEPRECATED() { return *GetNativePointerField<int*>(this, "UTexture2D.SizeY_DEPRECATED"); } }; (edited)
Avatar
You need a hook to join a tribe, but you can't find it. help.
Avatar
Avatar
돌드민
You need a hook to join a tribe, but you can't find it. help.
I found it.
Avatar
🐨Dream Doctor🦘 2/6/2022 8:33 AM
I have a more general C++ question. I'm trying to work out the most efficient way of doing something. I have a TArray of storage containers. I need to loop through each storage container and count a specific class of item, counting the total, then add that total to a grand total for the tribe that owns that container, then move on to the next container. I'd love to hear any suggestions on the most efficient ways of doing this?
Avatar
Handle all storage types and tribes in one iteration. It shouldn't take long.
Avatar
Is there a way to get tribe information on the current map?
Avatar
GetOrLoadTribeData
Avatar
Is it possible to get ids for all tribes repeatedly or automatically?
Avatar
ArkApi::GetApiUtils().GetShooterGameMode()->TribesIdsField()
1:22 PM
do not use GetOrLoadTribeData often it will leak memory
Avatar
Avatar
WETBATMAN
do not use GetOrLoadTribeData often it will leak memory
aha thank you
Avatar
🐨Dream Doctor🦘 2/7/2022 5:52 AM
I'm getting myself all tied up in JSON knots. I'm trying to construct a Discord webhook post. I've done it many times before, but this situation is a little different. This is the example JSON format for a Discord webhook. { "username": "Webhook", "avatar_url": "https://i.imgur.com/4M34hi2.png", "content": "Text message. Up to 2000 characters.", "embeds": [ { "author": { "name": "Birdie♫", "url": "https://www.reddit.com/r/cats/", "icon_url": "https://i.imgur.com/R66g1Pe.jpg" }, "title": "Title", "url": "https://google.com/", "description": "Text message. You can use Markdown here. *Italic* **bold** __underline__ ~~strikeout~~ [hyperlink](https://google.com) `code`", "color": 15258703, "fields": [ { "name": "Text", "value": "More text", "inline": true }, { "name": "Even more text", "value": "Yup", "inline": true }, { "name": "Use `\"inline\": true` parameter, if you want to display fields in the same line.", "value": "okay..." }, { "name": "Thanks!", "value": "You're welcome :wink:" } ], "thumbnail": { "url": "https://upload.wikimedia.org/wikipedia/commons/3/38/4-Nature-Wallpapers-2014-1_ukaavUI.jpg" }, "image": { "url": "https://upload.wikimedia.org/wikipedia/commons/5/5a/A_picture_from_China_every_day_108.jpg" }, "footer": { "text": "Woah! So cool! :smirk:", "icon_url": "https://i.imgur.com/fKL31aD.jpg" } } ] } Normally I have fixed values for the "fields" which is easy, however I now need to add two fields per element of a struct array I have. For each array element I need to add this to the ["embeds"]["fields"] section of my JSON. { "name": "Tribe Name", "value": array.tribename, "inline": false }, { "name": "Count", "value": array.count, "inline": true } I can't seem to get my head around how to do this 😦
Avatar
Well if you're using nlohmann json
6:14 AM
["fields"][index]["value"] = array.tribename; (edited)
6:15 AM
On count you might have to convert to a string
6:15 AM
Since Discord looks like it's only accepting strings but idk
Avatar
Avatar
Frigoff
Well if you're using nlohmann json
🐨Dream Doctor🦘 2/7/2022 7:16 AM
Hey, thanks for the reply, but I'm still confused. How would I use your example in the situation above?
Avatar
Well assuming you have the rest of the json done
7:20 AM
Fields is an array
7:21 AM
So you use the index to access the json object
7:21 AM
then you can write to the member within that object
7:21 AM
If that makes sense
7:26 AM
There are some examples from the library itself
Avatar
Avatar
🐨Dream Doctor🦘
I have a more general C++ question. I'm trying to work out the most efficient way of doing something. I have a TArray of storage containers. I need to loop through each storage container and count a specific class of item, counting the total, then add that total to a grand total for the tribe that owns that container, then move on to the next container. I'd love to hear any suggestions on the most efficient ways of doing this?
substitute 2/7/2022 7:47 AM
Are there mixed sets of containers?
7:47 AM
Like different tribes?
7:47 AM
I would use an unordered map with the tribe Id as the key
7:48 AM
Tribe ids should be unique and I don’t think integers need to be hashed for their key computation (since that’s the point of a hash)
7:49 AM
As for iterating them not much you can do here
7:49 AM
You’re going to have to have O(n) with n being n*m
7:51 AM
Unfortunately you’re going to have to accept that this will be a jagged array and require nested loops :/
7:52 AM
Use this for taking the summation
7:52 AM
A reduce is super useful (for example, if the item isn’t the right class just return the previous state, else previous++)
Avatar
Avatar
Frigoff
["fields"][index]["value"] = array.tribename; (edited)
🐨Dream Doctor🦘 2/7/2022 8:07 AM
I finally got there. Nlohmann was throwing errors because I was trying to add data to the json object in two different ways and it didn't seem to be able to cope with that. Thanks for your help!
Avatar
Avatar
substitute
Are there mixed sets of containers?
🐨Dream Doctor🦘 2/7/2022 8:08 AM
Thanks Sub! I'll have a read through those! Much appreciated!
Avatar
🐨Dream Doctor🦘 2/7/2022 1:58 PM
I've got a plugin which has an RCON Command that triggers a very heavy bunch of functions that take about 7 seconds to complete on a very large 2GB save file. That's fine as it will only be called rarely, but I'm having an issue where one RCON command is sent, but the function referenced by AddRconCommand is called multiple times, and it's a random number of times before it finally stops. This only happens on this very large savefile. Smaller maps don't have the problem. Is there a buffer somewhere that's timing out and repeating or something? (edited)
Avatar
Impossible to tell without knowing the plugin and source code.
Avatar
Avatar
🐨Dream Doctor🦘
Thanks Sub! I'll have a read through those! Much appreciated!
substitute 2/7/2022 8:31 PM
something like this containers.foreach(x => { counts[x.targettingTeam] += x.inventoryItems.reduce((a, y) => a += y.staticClass() == classToSearch, 0); }) (edited)
8:32 PM
make sure to init your reducer with 0
Avatar
substitute 2/7/2022 8:48 PM
@🐨Dream Doctor🦘
8:49 PM
here it some working C++ code
8:49 PM
#include <iostream> #include <algorithm> #include <unordered_map> #include <numeric> #include <execution> std::unordered_map<int, int> counts; class container { public: int team; std::vector<int> objects; }; std::vector<container> containers; int main() { containers = { container{.team = 1, .objects = {1,2,3,4,5,6,7,8,9}}, container{.team = 2, .objects = {5,2,1,4}}, container{.team = 3, .objects = {7,1,3,6,1,5,8,4,4,4,1,5}}, container{.team = 2, .objects = {1,5,8,3,2}}, container{.team = 2, .objects = {3,2}}, container{.team = 1, .objects = {9,3,7,1}}, container{.team = 4, .objects = {8,3,1,5,1,2}}, container{.team = 3, .objects = {7,4,1,5,8,1}}, }; for (auto container : containers) { std::cout << "Container is for team " << container.team << " and contains " << container.objects.size() << " items, iterating now.\n"; counts[container.team] += std::reduce(std::execution::seq, container.objects.begin(), container.objects.end(), 0, [](auto sum, auto next) { return sum + (next == 3); }); } for (auto count : counts) { std::cout << "And now we have the counts, for team " << count.first << " we have a total of " << count.second << " items where item equals 3.\n"; } }
8:49 PM
(requires C++20)
Avatar
Avatar
substitute
#include <iostream> #include <algorithm> #include <unordered_map> #include <numeric> #include <execution> std::unordered_map<int, int> counts; class container { public: int team; std::vector<int> objects; }; std::vector<container> containers; int main() { containers = { container{.team = 1, .objects = {1,2,3,4,5,6,7,8,9}}, container{.team = 2, .objects = {5,2,1,4}}, container{.team = 3, .objects = {7,1,3,6,1,5,8,4,4,4,1,5}}, container{.team = 2, .objects = {1,5,8,3,2}}, container{.team = 2, .objects = {3,2}}, container{.team = 1, .objects = {9,3,7,1}}, container{.team = 4, .objects = {8,3,1,5,1,2}}, container{.team = 3, .objects = {7,4,1,5,8,1}}, }; for (auto container : containers) { std::cout << "Container is for team " << container.team << " and contains " << container.objects.size() << " items, iterating now.\n"; counts[container.team] += std::reduce(std::execution::seq, container.objects.begin(), container.objects.end(), 0, [](auto sum, auto next) { return sum + (next == 3); }); } for (auto count : counts) { std::cout << "And now we have the counts, for team " << count.first << " we have a total of " << count.second << " items where item equals 3.\n"; } }
🐨Dream Doctor🦘 2/8/2022 1:17 AM
Sub that's so cool!!! Thank you so much!
Avatar
Avatar
🐨Dream Doctor🦘
I've got a plugin which has an RCON Command that triggers a very heavy bunch of functions that take about 7 seconds to complete on a very large 2GB save file. That's fine as it will only be called rarely, but I'm having an issue where one RCON command is sent, but the function referenced by AddRconCommand is called multiple times, and it's a random number of times before it finally stops. This only happens on this very large savefile. Smaller maps don't have the problem. Is there a buffer somewhere that's timing out and repeating or something? (edited)
🐨Dream Doctor🦘 2/8/2022 1:29 AM
Regarding this issue, I decoupled the big function that took a long time to complete from the Rcon function using a DelayExecute timer with a 1 second delay, and the problem of repeating went away. So there must be something in the API or the server somewhere that deals with RCON commands that repeats the execution after some short timeout?
1:31 AM
So this caused a random number of repeats: void RunCountRcon(RCONClientConnection* rconclient, RCONPacket* packet, UWorld* world) { Log::GetLog()->debug("RunCountRcon Triggered."); DoCount(); } And this stops those repeats: void RunCountRcon(RCONClientConnection* rconclient, RCONPacket* packet, UWorld* world) { Log::GetLog()->debug("RunCountRcon Triggered."); API::Timer::Get().DelayExecute(&DoCount, 1); } (DoCount() takes between 6 and 7 seconds to complete on a very large map. On smaller maps, where it takes a much shorter time, the repeats do not occur.)
Avatar
attach a debugger and analyze the callstack
Avatar
also if you run the function inside the callback the RCON client doesn't get any response till it completes (your DoCount())
12:46 PM
so maybe your RCON tool is resending the command since it thinks the server hasn't received it?
Avatar
Avatar
WETBATMAN
so maybe your RCON tool is resending the command since it thinks the server hasn't received it?
🐨Dream Doctor🦘 2/9/2022 5:02 AM
Yeah that ended up being the issue. Thanks for the reply. Lesson learned: Don't do things that take a long time inside an RCON command function. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Yeah that ended up being the issue. Thanks for the reply. Lesson learned: Don't do things that take a long time inside an RCON command function. (edited)
substitute 2/9/2022 6:33 AM
Just keep an internal state
6:33 AM
And ignore requests from the same rcon client if the game is counting
6:33 AM
Could work
6:36 AM
Could also decouple it into two rcon commands (edited)
Avatar
Avatar
substitute
Just keep an internal state
🐨Dream Doctor🦘 2/9/2022 6:37 AM
Yeah I added a state to ignore further requests while it was running, but you still have to decouple the processing function from the rcon function. If you don't, then it doesn't help, because you don't get to process any further RCON requests while your processing function is running, but they are still queued somewhere, so as soon as you finished your processing and allow the command again, they keep coming in one after the other. (edited)
Avatar
substitute 2/9/2022 6:37 AM
BeginCount, GetCount
Avatar
Avatar
🐨Dream Doctor🦘
Yeah I added a state to ignore further requests while it was running, but you still have to decouple the processing function from the rcon function. If you don't, then it doesn't help, because you don't get to process any further RCON requests while your processing function is running, but they are still queued somewhere, so as soon as you finished your processing and allow the command again, they keep coming in one after the other. (edited)
substitute 2/9/2022 6:37 AM
Fair
Avatar
Avatar
substitute
BeginCount, GetCount
🐨Dream Doctor🦘 2/9/2022 6:38 AM
Hmm that sounds like a good idea!
Avatar
substitute 2/9/2022 6:38 AM
If you do that then GetCount should have 2 states
6:38 AM
Counting (and return that it is) and the last count (return the values and date/time for reference)
Avatar
🐨Dream Doctor🦘 2/9/2022 7:05 AM
I can't believe that it's taken until C++20 to get this added to the compiler... #include <format> int main() { std::string s = std::format("{:.2f}", 3.14159265359); // s == "3.14" }
Avatar
Good day i wonder if someone can recommend or help with a cross chat only in between my game ark servers and a player active player counter (how many online on the server) link in discord itself like in the picture below Maybe with a discord bot like the anouncement of server shotdown and restart plugin in asm Prefer NL (edited)
6:59 PM
Avatar
substitute 2/9/2022 8:17 PM
@Pelayori I was recently made aware that you can overload new and delete operators (they're not just keywords) and this is how UE4 uses their own internal memory management system
8:17 PM
8:18 PM
I think we should add a header for FMemory and add operator overloads for classes so that users can just new instead of having to manually FMalloc
Avatar
Hello All! New to Server Management / API Config, I was trying to set up an account on arkserverapi but it won’t send me the verification email?
Avatar
Are there any hooks that occur when throwing items away?
Avatar
Shooter PlayerController, AshooterPlayerState, shooter GameMode ,Shooter Character I've been looking for 4, but I still can't find them...
3:08 PM
All the drops are there, but I can't find any personal ones.
Avatar
Avatar
Lethal
Click to see attachment 🖼️
Ah.. I thought it was in the player information because it was an action by the player. thank you.
Avatar
The Permissions plugin Foppa. Does this command only work when the user is logged in into the server? Permissions.Add <SteamID> <Group> - Adds player to a existing group permanently.
Avatar
@Foppa @WETBATMAN @Lethal @🐨Dream Doctor🦘 @Pelayori
7:34 AM
Something you guys might find interesting
7:34 AM
parseservertojson in your start args
7:34 AM
dumps your server to a JSON blob
Avatar
Avatar
substitute
dumps your server to a JSON blob
🐨Dream Doctor🦘 2/11/2022 7:36 AM
You mean the entire save file?
Avatar
Yes
Avatar
🐨Dream Doctor🦘 2/11/2022 7:37 AM
Good grief. I hate to think what a 2GB save file would look like in JSON! lol
Avatar
Avatar
substitute
@Foppa @WETBATMAN @Lethal @🐨Dream Doctor🦘 @Pelayori
🐨Dream Doctor🦘 2/11/2022 7:47 AM
Thanks for the tip Sub. I'll definitely have a play with that one!
Avatar
🐨Dream Doctor🦘 2/11/2022 10:57 AM
Trying to control what items players can place into certain storage containers. I can hook UPrimalInventoryComponent.RemoteInventoryAllowAddItems and just return false in the cases I need to, which is great. However the S+ transfer tools don't use this function and so on S+ servers it's pointless to use that hook. Does anyone know which functions the S+ tools use?
Avatar
Avatar
🐨Dream Doctor🦘
Good grief. I hate to think what a 2GB save file would look like in JSON! lol
Ark breaks after 1.5 i think i read somewhere 😛
Avatar
Avatar
🐨Dream Doctor🦘
Trying to control what items players can place into certain storage containers. I can hook UPrimalInventoryComponent.RemoteInventoryAllowAddItems and just return false in the cases I need to, which is great. However the S+ transfer tools don't use this function and so on S+ servers it's pointless to use that hook. Does anyone know which functions the S+ tools use?
yes i just did a fix on that for my server to block items. BUT not entirely with S+ as they will try to execute but item will be lost.
11:45 AM
Hook_UPrimalInventoryComponent_RemoteInventoryAllowAddItems Hook_UPrimalInventoryComponent_AllowAddInventoryItem I used those two together (edited)
Avatar
Avatar
Foppa
Ark breaks after 1.5 i think i read somewhere 😛
🐨Dream Doctor🦘 2/11/2022 11:47 AM
After 2GB it definitely starts to break. It will randomly crash during world saves, even when running on the fastest possible dedicated CPU and NVME drives. Zen from WC said they were aware of such a bug and he thought they had fixed it, but obviously not. lol
Avatar
Avatar
Foppa
yes i just did a fix on that for my server to block items. BUT not entirely with S+ as they will try to execute but item will be lost.
🐨Dream Doctor🦘 2/11/2022 11:48 AM
Yeah those are the two I've been playing with, but as you say, AllowAddInventoryItem causes the item to just vanish into thin air. RemoteInventoryAllowAddItems at least blocks the transfer completely, but doesn't work for S+.
Avatar
Avatar
substitute
dumps your server to a JSON blob
this could be very interesting for updating the save game toolkit for ArkBot
Avatar
i have been looking into it a bit, it's not working well with big save files lol
7:38 PM
crash on start up
7:38 PM
and takes much longer to start up the server with maps that has many active players / structures (edited)
Avatar
Avatar
substitute
dumps your server to a JSON blob
where, how, tell me !
😅 1
Avatar
Avatar
Frigoff
used /Message Info
Reaction Roles BOT 2/12/2022 8:35 PM
Reaction Roles - Message Information
Message ID
941583046522585108
Channel ID
513432877904691205
Guild ID
513432877904691202
Avatar
Well I didn't mean to use that
8:36 PM
But it works.
Avatar
Avatar
Foppa
crash on start up
🐨Dream Doctor🦘 2/13/2022 2:51 AM
Yeah my 2GB save files crash the server on startup too with that option.
2:55 AM
I'm having more nlohmann headaches. Trying to read this JSON file. { "LimitedItems": [{ "ItemClass": "ExampleClass_1", "AllowedInventories": [ "ExampleInventory_1", "ExampleInventory_2", "ExampleInventory_3" ] }, { "ItemClass": "ExampleClass_2", "AllowedInventories": [ "ExampleInventory_1", "ExampleInventory_2", "ExampleInventory_3" ] }], "ExtraDebug": true } I have this code (simplified): struct LimitedItem { std::string ItemClass; std::vector<std::string> AllowedInventories; }; std::vector<LimitedItem> LimitedItems; void from_json(const nlohmann::json& j, LimitedItem& it) { j.at("ItemClass").get_to(it.ItemClass); j.at("AllowedInventories").get_to(it.AllowedInventories); } const std::string config_path = ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/TestPlugin/config.json"; std::ifstream file{ config_path }; auto json = nlohmann::json::parse(file); file.close(); auto ExtraDebug = config["ExtraDebug"].get<bool>(); auto LimitedItems = json["LimitedItems"].get<std::vector<LimitedItem>>(); However the plugin fails to load with a 1114 error. It works if I comment out everything that doesn't just read "ExtraDebug". Can anyone see where I went wrong? Or how I can better debug these JSON errors? (edited)
Avatar
nlohmann json throws exceptions
3:11 AM
so reading those would be important
3:14 AM
json::parse takes a InputType&&
3:14 AM
You're closing your file after parsing it
3:14 AM
I can't recall if that's making a copy to read from or not but if it's not
3:15 AM
You're trying to read an "empty" file
Avatar
also as Im reading this again
3:25 AM
You're not accessing the json
3:25 AM
For ExtraDebug
3:25 AM
You're accessing config?
3:25 AM
So unless you init config or something somewhere else
Avatar
🐨Dream Doctor🦘 2/13/2022 4:51 AM
Yeah, thanks, it was just those couple of silly typos. Thanks for the help!
Avatar
Anyone know of any fixes for the unable to get an email confirmation to become part of the website?
Avatar
It's a known issue that Floppa has said they are working on but with no estimated time.
Avatar
@Foppa
11:02 AM
Delivering your transactional and marketing emails through the world's largest cloud-based email delivery platform. Send with confidence.
11:03 AM
I doubt you get over 50k email confirmations a month
Avatar
Thank you, i'll be using my own however. the mails will be sent from "Foppasgaming" as a temp solution. (edited)
👍 1
Avatar
Hello All. where do u guys host your ark server that support API
Avatar
Avatar
Hawk3ye
Hello All. where do u guys host your ark server that support API
🐨Dream Doctor🦘 2/14/2022 12:59 AM
There are many server hosts that support API plugins. A quick Google search will hook you up.
Avatar
LegioAbrams 2/14/2022 2:24 AM
@Foppa the issue im having with the api confirmation email to finish setting up my account (so i can try some of these cool apis for ark) its often taking hours for the confirmation to send once it took almost a day....) then i get the confirmation link click it and.... Get this message every single time... So i resend and try to start the process over.... But still havent been able to access the site as far as free downloads and such (one of the mods im trying to use is custom shop requiring the api for it .. but cant download till confirmation. (Ps my apologies i didnt know where to send this i didnt see a "support channel and generally try not blowing up peoples inboxes ran a server on ark mobile lol i know the feel of being flooded with help me pee type people lol)
Avatar
That's message that indicates your email isn't located in the system, try re-create your account or dm me the info and i'll have a closer look at your case
Avatar
LegioAbrams 2/14/2022 2:27 AM
Hmmm weird cause i logged ...
2:28 AM
Avatar
Avatar
Foppa
That's message that indicates your email isn't located in the system, try re-create your account or dm me the info and i'll have a closer look at your case
LegioAbrams 2/14/2022 2:32 AM
Ok this is odd lol trying to send you the info and claiming we dont share a server 😆
Avatar
i have added you as a friend
Avatar
🐨Dream Doctor🦘 2/14/2022 10:00 AM
Following on from the discussions about tribe data and memory leaks, since tribe data is something that I imagine a huge percentage of plugins would benefit from having simple access to, is it something worth adding to the api? Maybe the api could keep its own tribe records, or find a solution to the memory leak issues?
Avatar
well, the api isn't suppose to "store" anything. It should just be the gateway. But what are we looking for that we need to access?
Avatar
Avatar
Foppa
well, the api isn't suppose to "store" anything. It should just be the gateway. But what are we looking for that we need to access?
🐨Dream Doctor🦘 2/14/2022 11:54 AM
Well, access to all tribe data regardless of whether players are online or not. So, tribe names from tribe ids, and lists of tribe members, for example. So GetOrLoadTribeData provides FTribeData which has everything, but that apparently has memory leak issues.
Avatar
Avatar
Foppa
well, the api isn't suppose to "store" anything. It should just be the gateway. But what are we looking for that we need to access?
🐨Dream Doctor🦘 2/14/2022 12:01 PM
Doesn't the API already do something like this anyway, with ArkApi::ApiUtils::steam_id_map_? Keeps a "store" or "cache" or whatever you call it of player id vs steam id?
Avatar
Avatar
🐨Dream Doctor🦘
Doesn't the API already do something like this anyway, with ArkApi::ApiUtils::steam_id_map_? Keeps a "store" or "cache" or whatever you call it of player id vs steam id?
🐨Dream Doctor🦘 2/14/2022 12:02 PM
I guess I'm asking if we could do something similar but with tribe information? It's something people seem to struggle with all the time, and I've seen multiple solutions from people here that involve workarounds that often would add some load to servers. So why have multiple plugins running on a server, all implementing their own variations of workarounds to get the same information, when the API could do it in an efficient way and make that information available easily to all plugins in a consistent, repeatable and safe way? (edited)
Avatar
Avatar
🐨Dream Doctor🦘
I guess I'm asking if we could do something similar but with tribe information? It's something people seem to struggle with all the time, and I've seen multiple solutions from people here that involve workarounds that often would add some load to servers. So why have multiple plugins running on a server, all implementing their own variations of workarounds to get the same information, when the API could do it in an efficient way and make that information available easily to all plugins in a consistent, repeatable and safe way? (edited)
this is very possible and i know of a great way to do it without calling GetOrLoadTribeData all the time
12:23 PM
i could just dereference the struct and store it every time tribe data is updated
Avatar
Avatar
WETBATMAN
i could just dereference the struct and store it every time tribe data is updated
Doesn’t work for offline tribes
Avatar
why
Avatar
Avatar
WETBATMAN
why
How are you gonna store the data if no one comes online
1:19 PM
The server just won’t load it
Avatar
call GetOrLoadTribeData for all tribes on server boot
1:20 PM
and use the tribe data updated callback function from the game to keep all data up to date
Avatar
I don’t think that’s a great option
1:20 PM
Leaked memory is leaked memory
Avatar
rewriting this func is another solution 😛
Avatar
🐨Dream Doctor🦘 2/14/2022 1:45 PM
Couldn't you just hook the functions related to tribes and use the data from those events to build a database?
1:47 PM
Maybe use GetOrLoadTribeData once on startup to prefill the data?
Avatar
Avatar
🐨Dream Doctor🦘
Maybe use GetOrLoadTribeData once on startup to prefill the data?
I would suggest just hooking that and making a version that doesn’t leak memory
Avatar
Avatar
substitute
I would suggest just hooking that and making a version that doesn’t leak memory
🐨Dream Doctor🦘 2/14/2022 1:49 PM
Sure that would work too. Are you volunteering Sub? ;)
Avatar
Avatar
🐨Dream Doctor🦘
Sure that would work too. Are you volunteering Sub? ;)
I don’t even have ark installed right now
Avatar
If you are only getting online tribe data there is no memory leak with that function. Only if accessing tribe data that is not already loaded by ARK does the memory leak come into play. Not many plugins should need to access offline tribe data in its entirety anyways. If you need online tribe data get it from GameMode via a loop to avoid the leaky file load issue.
Avatar
Good afternoon, is anyone having problems with the ark that the servers close by themselves? I ask to find out if a plugin is giving me problems
12:13 AM
Can you tell me which api authentication server? My ddos ​​protection is blocking and crashing the server due to it not communicating.
12:13 AM
because of this my plugin gets an error.
Avatar
each developer uses own authentication server (edited)
Avatar
I'm using the official website.
Avatar
so?
12:21 AM
API doesn't send any we requests, only plugins do it
Avatar
Ata, and because there are some plugins that are crashing with this error there.
12:23 AM
This is one that uses authentication server but I don't know which one.
Avatar
AntiStructureMesh
Avatar
Yes and because my ddos ​​protection is blocking the auth server, more I need to know which one to add to the wiltlist.
Avatar
You'd have to talk to the plugin developer to find out the auth server.
Avatar
Yes, I sent a message to him but so far it hasn't happened to me, I imagined it could be the most evident api and the plugin.
Avatar
Hi @Foppa, Apologies for the ping, I got an alert saying that the emails have been fixed from the Website, but I still have not gotten said confirmation email after trying to get it re-sent
2:00 AM
not in spam folder or anything 😰
Avatar
I'm still looking at it, sorry i'll update the announcement
Avatar
Avatar
Lethal
If you are only getting online tribe data there is no memory leak with that function. Only if accessing tribe data that is not already loaded by ARK does the memory leak come into play. Not many plugins should need to access offline tribe data in its entirety anyways. If you need online tribe data get it from GameMode via a loop to avoid the leaky file load issue.
🐨Dream Doctor🦘 2/15/2022 3:56 AM
Hey Lethal, what is "offline" tribe data exactly? So if there is a single tribe member online and the other five are offline, and you run GetOrLoadTribeData, does that count as online or offline?
Avatar
Online
4:04 AM
easy to verify if the tribe data is all there
Avatar
🐨Dream Doctor🦘 2/15/2022 5:18 AM
Oh that's good info. I think that does cover a lot of the possible situations. Thanks Lethal!
Avatar
🐨Dream Doctor🦘 2/15/2022 5:32 AM
Could someone point me towards the permissions source to build against? I can't seem to find it anywhere? It's not on the website page like it used to be, nor is it on the support discord, or this discord anywhere?
5:32 AM
Nevermind, found it in Mich's GitHub one level down.
Avatar
Avatar
DEX
Click to see attachment 🖼️
Port 443
Avatar
hello I have all the libraries installed and I have windows server 2019, permissions error 126 02/15/22 21:32 [API][warning] (API::PluginManager::LoadAllPlugins) Failed to load plugin - Permissions Error code: 126
Avatar
Avatar
Fenix
hello I have all the libraries installed and I have windows server 2019, permissions error 126 02/15/22 21:32 [API][warning] (API::PluginManager::LoadAllPlugins) Failed to load plugin - Permissions Error code: 126
The plugin called "Permissions" failed to load. Install the latest akrserverapi plugin and try again. https://ark-server-api.com/index.php?resources/ark-server-api.4/ (edited)
Avatar
@ehiu it is the same error code 126 , windows server 2019 , I have reinstalled Microsoft Visual C++ Redistributable 2019, in debug mode with visual studio std::exception memory
Avatar
std::runtime_error in memory location
Avatar
Avatar
Fenix
std::runtime_error in memory location
🐨Dream Doctor🦘 2/16/2022 1:11 AM
Hey there, this discord is for people developing plugins, not for supporting using those plugins. If you go to this link, it's the discord specifically for people having trouble using plugins including Permissions. You'll have better luck there I'm sure. https://discord.gg/zZQmHGwjQA
Invite to join a server
Guild icon
📜information📌
Avatar
🐨Dream Doctor🦘 2/16/2022 3:00 AM
My VS is doing weird things this morning. I compiled a plugin last night which did APlayerController::TargetingTeamField() which I compiled and tested and it all worked fine. I shut down and did nothing else until this morning, when I open VS and it won't compile because it says TargetingTeamField() doesn't exist on APlayerController. Unless I'm wrong, AACtor is the base class for APlayerController and AActor definitely has TargetingTeamField(). So I go away for twenty minutes, come back and suddenly it will compile again without any issues and without any changes. VS doing weird things lol
Avatar
🐨Dream Doctor🦘 2/16/2022 8:59 AM
I have a more general C++ question. I'm trying to count matching elements in a vector of this struct: struct PlacedStructure { std::string PrimalItemString; uint64 TribeID; }; I thought I could use std::count like this, but it won't work. std::vector<PlacedStructure> PlacedStructures; PlacedStructure TestStructure; TestStructure.TribeID = 123456; TestStructure.PrimalItemString = "SomePrimalItemString"; TribeStructureCount = std::count(PlacedStructures.begin(), PlacedStructures.end(), TestStructure); Obviously I can just iterate and count manually, but I was hoping to do it more efficiently.
Avatar
Avatar
🐨Dream Doctor🦘
I have a more general C++ question. I'm trying to count matching elements in a vector of this struct: struct PlacedStructure { std::string PrimalItemString; uint64 TribeID; }; I thought I could use std::count like this, but it won't work. std::vector<PlacedStructure> PlacedStructures; PlacedStructure TestStructure; TestStructure.TribeID = 123456; TestStructure.PrimalItemString = "SomePrimalItemString"; TribeStructureCount = std::count(PlacedStructures.begin(), PlacedStructures.end(), TestStructure); Obviously I can just iterate and count manually, but I was hoping to do it more efficiently.
First of all std::count is iterating over the vector to do its job. Therefore I don't think you would gain a lot of performance by using it over doing it manually. At first glance I would suspect this to not even compile because std::count wants to check if the PlacedStructure are equal. But c++ has no way of knowing if they are since the struct doesn't have a operator== defined.
9:47 AM
If you want to use the stl to count you could do TribeStructureCount = std::count_if(PlacedStructures.begin(), PlacedStructures.end(), [&](const PlacedStructure& s) { return s.TribeID == TestStructure.TribeID && s.PrimalItemString == TestStructure.PrimalItemString; }); (edited)
Avatar
Avatar
Wumpus
First of all std::count is iterating over the vector to do its job. Therefore I don't think you would gain a lot of performance by using it over doing it manually. At first glance I would suspect this to not even compile because std::count wants to check if the PlacedStructure are equal. But c++ has no way of knowing if they are since the struct doesn't have a operator== defined.
🐨Dream Doctor🦘 2/16/2022 9:59 AM
Thank you! That's exactly what I was looking for 🙂
Avatar
if you wanted to edit the crypod timer could you do it using api a lone ?
Avatar
🐨Dream Doctor🦘 2/17/2022 3:04 AM
Does anyone know which functions are involved in actually writing the save game file to disk? I want to alter the name and path of the save game file, but the only thing I can find in the API that looks like it might be involved (UWorld::PreSaveRoot) doesn't seem to be called when saving.
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone know which functions are involved in actually writing the save game file to disk? I want to alter the name and path of the save game file, but the only thing I can find in the API that looks like it might be involved (UWorld::PreSaveRoot) doesn't seem to be called when saving.
There’s a launch arg to do this
3:11 AM
I believe
3:12 AM
You can also hook create file a
3:12 AM
From win api
Avatar
Avatar
substitute
From win api
🐨Dream Doctor🦘 2/17/2022 4:11 AM
Can we hook winapi functions from an api dll?
Avatar
Avatar
🐨Dream Doctor🦘
Can we hook winapi functions from an api dll?
yea
Avatar
Avatar
🐨Dream Doctor🦘
Can we hook winapi functions from an api dll?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
4:36 AM
this is how I implemented a virtual file system (for swapping which assets to load) for a game
Avatar
🐨Dream Doctor🦘 2/17/2022 4:38 AM
Oh wow thanks Sub. That might be a bit beyond me, but I'll take a look 🙂
Avatar
Avatar
🐨Dream Doctor🦘
Oh wow thanks Sub. That might be a bit beyond me, but I'll take a look 🙂
I should say "virtual file system" (edited)
4:39 AM
it just redirects which file is loaded from disk
4:39 AM
very simple vfs
4:41 AM
top 10 photos taken moments before disaster
Avatar
🐨Dream Doctor🦘 2/17/2022 4:42 AM
So this is like the DECLARE_HOOK that we use in the API? hookable<HANDLE(LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE), stdcall_t> create_filea;
Avatar
Avatar
🐨Dream Doctor🦘
So this is like the DECLARE_HOOK that we use in the API? hookable<HANDLE(LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE), stdcall_t> create_filea;
yea
4:42 AM
it is my own compile time template class
4:42 AM
no macros (outside of enabling certain compiler features depending on compiler) (edited)
Avatar
🐨Dream Doctor🦘 2/17/2022 4:43 AM
And this is the function? static auto __stdcall create_file(LPCSTR a, DWORD b, DWORD c, LPSECURITY_ATTRIBUTES d, DWORD e, DWORD f, HANDLE g) -> HANDLE { auto which = convert_to_vfs(a); if (vfs_map.contains(which)) return create_filea.original(vfs_map[which].string().c_str(), b, c, d, e, f, g); return create_filea.original(a, b, c, d, e, f, g); }
Avatar
that's the callback, my hook
4:43 AM
static auto enable() -> void { build_vfs(); v---- this is the win api function create_filea.reset(CreateFileA); <---- this sets the internal pointer to where the original is DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(create_filea.get(), hook(&create_file)); <---- this hooks the original (from the internal pointer on create_filea) DetourTransactionCommit(); } (edited)
4:44 AM
static auto __stdcall create_file(LPCSTR a, DWORD b, DWORD c, LPSECURITY_ATTRIBUTES d, DWORD e, DWORD f, HANDLE g) -> HANDLE { auto which = convert_to_vfs(a); if (vfs_map.contains(which)) return create_filea.original(vfs_map[which].string().c_str(), b, c, d, e, f, g); <---- this calls the original after swapping files return create_filea.original(a, b, c, d, e, f, g); <---- this calls the original from my hook with untouched data. }
4:44 AM
hope that clarifies some things
4:45 AM
since we are in x64 land you can probably just do hookable<HANDLE(LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE)> create_filea;
4:45 AM
the default is cdecl which is the same as stdcall when in x64
4:45 AM
the inclusion of stdcall is mostly for 32 bit code
4:46 AM
@🐨Dream Doctor🦘
4:46 AM
hook(&create_file) is also not really required for this
4:46 AM
you could just do create_file
4:47 AM
hook exists for when I want to do member functions (and I know the this will be passed from the existing program), it's just a work around to trick the compiler to forget that I'm giving it a member method
4:47 AM
template<typename T> static inline auto hook(T member) { return *(void**)(&member); }
4:47 AM
void casting removes type info 😉
4:47 AM
but like I said, since you're doing a static function as your callback in this situation, you don't need hook on the callback (edited)
Avatar
🐨Dream Doctor🦘 2/17/2022 4:47 AM
I'll have a go at trying to work through that, but you are a very long way above my current level Sub 🙂 Thanks for your help.
Avatar
the SaveWorld function has the serialize and write to file logic inside it i believe
Avatar
oldschool_vinc 2/17/2022 1:25 PM
does anyone know why I can not upload resources in the forum? I already have a tool online. Just wanted to upload a second but get the error that I do not have permissions for it? Error message: "Oops! We ran into some problems. You do not have permission to view this page or perform this action. "
Avatar
Someone know how to fix? Solved with other my.ini file (edited)
Avatar
I want to be able to limit and control some resource rates on my cluster. I already know of the resource multipliers in the server config, but I am looking for a more advanced controlling. Could someone let me know which hooks I need to tap into. When a player harvests, dino harvests, etc. (edited)
Avatar
@🐨Dream Doctor🦘
6:36 AM
blursed C++
Avatar
Avatar
substitute
blursed C++
🐨Dream Doctor🦘 2/19/2022 7:05 AM
lol what is that?
Avatar
Hi Someone available to make a plugin and bot for me, I'm paying. I need the following things for him to do: Buying vip packages through Discord or a website, after making the purchase, the Bot adds a command to activate Vip in the Game. It would be just for that. I know there is Tebex today, but recently I am having a lot of problems, tebex is charging very high fees for me to stay there. contact me in private whoever is willing to receive a value for making this plugin.
Avatar
Avatar
DEX
Hi Someone available to make a plugin and bot for me, I'm paying. I need the following things for him to do: Buying vip packages through Discord or a website, after making the purchase, the Bot adds a command to activate Vip in the Game. It would be just for that. I know there is Tebex today, but recently I am having a lot of problems, tebex is charging very high fees for me to stay there. contact me in private whoever is willing to receive a value for making this plugin.
🐨Dream Doctor🦘 2/19/2022 7:19 AM
Tebex is far from perfect, but they are usually very relaxed about payments. If you're saying they've raised your fees above standard, then it's because you're getting a lot of chargebacks or cancellations, and any other payment provider will do the same.
7:20 AM
There isn't a legitimate payment provider on earth who will tolerate many chargebacks before they either hike your rates through the roof or cancel your service really fast.
Avatar
Yes they are charging me an absurd fee, I had to close my store and sell manually. But if anyone knows of anyone who knows how to make a discord plugin or bot I'm paying for it.
7:29 AM
how bad it is, that even my country's coin they removed.
Avatar
Avatar
DEX
Yes they are charging me an absurd fee, I had to close my store and sell manually. But if anyone knows of anyone who knows how to make a discord plugin or bot I'm paying for it.
🐨Dream Doctor🦘 2/19/2022 7:49 AM
Yes, sure, but what I'm trying to tell you is you can't fix it with a plugin. You still need a payment provider, and if Tebex are causing you issues then so will every other payment provider.
7:51 AM
Unless someone here knows of a less.... mainstream... payment provider, but they will still likely cost you a large percentage.
Avatar
Avatar
Raptross
used /Message Info
Reaction Roles BOT 2/19/2022 9:18 AM
Reaction Roles - Message Information
Message ID
944464181581709362
Channel ID
513432877904691205
Guild ID
513432877904691202
Avatar
Sorry about that, was trying to hit Reply.
Avatar
Avatar
Raptross
I want to be able to limit and control some resource rates on my cluster. I already know of the resource multipliers in the server config, but I am looking for a more advanced controlling. Could someone let me know which hooks I need to tap into. When a player harvests, dino harvests, etc. (edited)
Anyone got any information/suggestion on this?
Avatar
Avatar
🐨Dream Doctor🦘
lol what is that?
A string literal in a template parameter
9:21 AM
It works with C++20
Avatar
I'm trying to sign up for the website and I have waited quite a while and the confirmation email has not shown up in my email inbox or in the spam box
Avatar
Avatar
darkx239
I'm trying to sign up for the website and I have waited quite a while and the confirmation email has not shown up in my email inbox or in the spam box
oldschool_vinc 2/20/2022 9:21 AM
Its a known bug. Team is working on it.
Avatar
is there another way I can access the site? because I was going to get the server api and some plugins
Avatar
oldschool_vinc 2/20/2022 9:23 AM
i dont know. if u pm me what plugins i can download it and send it to you.
Avatar
🐨Dream Doctor🦘 2/20/2022 1:28 PM
@Foppa If there's anything I can do to help you with the website issues, please just say the word. I'd be very happy to be able to help.
Avatar
Because when I compile the project I put it on the server it gives me error 126
Avatar
Avatar
🐨Dream Doctor🦘
@Foppa If there's anything I can do to help you with the website issues, please just say the word. I'd be very happy to be able to help.
if it's needed i will let you know
Avatar
foppa can you confirm my email since im not getting the email (edited)
Avatar
Avatar
darkx239
foppa can you confirm my email since im not getting the email (edited)
Henry Every <FG co owner> 2/21/2022 2:48 PM
Nobody is, I’ve been waiting almost a week now
Avatar
jraServerAPI 2/21/2022 3:55 PM
While you wait, let us know what plugins you want from the site and we can get you those files if we can
Avatar
Hello, trying to register so that I can get the color token plugin but having the confirmation error, can someone contact me or tell me what I can do to get this for my server? I will also need the help of how to send this to my server owner as he is the one that will have to set it up.
Avatar
🐨Dream Doctor🦘 2/22/2022 1:17 AM
Hey @Foppa , could you please add me as a friend so I can DM you and help you with the website issues? This has gone on way too long and should be simple to fix. It's really damaging for the community.
👍 1
Avatar
Well it's not the technical that is the problem, it's on another level. Sort of. Can explain more in dm (edited)
👍 1
ThankYou 1
1:32 AM
Friend Request sent
Avatar
oldschool_vinc 2/22/2022 5:40 PM
@Foppa Where to create a Ticket? Cant find it.
Avatar
if you need help with one my plugins, you find the invitation link in one of them! check there for the "support" button! (edited)
Avatar
Is there a hook that an admin can check when logging into the console? DECLARE_HOOK(AShooterPlayerController_ConsoleCommand, FString, AShooterPlayerController, FString, FString, bool); This hook is only acquired by the admin command. I need another hook
Avatar
Are you asking for a hook that gets called whenever someone uses a console command?
Avatar
Avatar
Wumpus
Are you asking for a hook that gets called whenever someone uses a console command?
Yes ..
Avatar
I think the non cheat commands are just client side and don't get send to the server. Therefore no way to hook them
Avatar
Avatar
Wumpus
I think the non cheat commands are just client side and don't get send to the server. Therefore no way to hook them
That's right. Thank you
Avatar
🐨Dream Doctor🦘 2/23/2022 6:33 AM
This keeps happening to me randomly in a project I'm working on. Sometimes when I open the project, it won't compile with the error message below, which is obviously incorrect. Other times when I open it it compiles perfectly. No changes in between. Any ideas?
6:34 AM
(This only started happening after I upgraded to VS 2022)
6:35 AM
I don't know if it's related, but I also get about 170 warnings like the below every time I open a project in VS 2022.
Avatar
jraServerAPI 2/23/2022 7:08 AM
ooh snap.. I'm still on Community 2019 7613733c24fe4a6182a7809b2b993273 (at what point do I have to upgrade?) Also.. Are you launching the solution via the Application? or Double clicking on the sln file?
7:08 AM
7:11 AM
I know the application behaves a little differently depending on how you launch the project, as far as the $(directories) go
Avatar
Avatar
jraServerAPI
ooh snap.. I'm still on Community 2019 7613733c24fe4a6182a7809b2b993273 (at what point do I have to upgrade?) Also.. Are you launching the solution via the Application? or Double clicking on the sln file?
you never have to update. Sometimes it is better to not update.
7:35 AM
I have a copy of VS 2008 for when I do Xbox 360 development
Avatar
Avatar
🐨Dream Doctor🦘
This keeps happening to me randomly in a project I'm working on. Sometimes when I open the project, it won't compile with the error message below, which is obviously incorrect. Other times when I open it it compiles perfectly. No changes in between. Any ideas?
might be IDE bug
7:35 AM
I used to have intellisense bug in VS 2022 that was recently fixed
7:36 AM
but for general stuff
7:36 AM
7:36 AM
I use VS 2022
Avatar
Avatar
substitute
I used to have intellisense bug in VS 2022 that was recently fixed
🐨Dream Doctor🦘 2/23/2022 9:56 AM
Yeah I am a couple versions behind. I'll do an update and see how it goes. Thanks Sub.
Avatar
Avatar
돌드민
Is there a hook that an admin can check when logging into the console? DECLARE_HOOK(AShooterPlayerController_ConsoleCommand, FString, AShooterPlayerController, FString, FString, bool); This hook is only acquired by the admin command. I need another hook
The answer to this question is to hook the SERVERDATA_AUTH packet of the rcon protocol. hm... I have a question about the above question. Only Unreal-related APIs can Hook, Are there any Hooks related to RCON Protocol?
Avatar
Avatar
🐨Dream Doctor🦘
I don't know if it's related, but I also get about 170 warnings like the below every time I open a project in VS 2022.
Those warnings are just because the api is using enum and not enum classes. You can either pop the warning and push it back after if you’re aware and would like to ignore it. You can straight up disable the warning or you can just ignore it. Each have their downsides and it’s up to you how you want to handle that. (edited)
10:20 AM
You can swap them over to enum classes too. That’s another option.
Avatar
Accelerator 2/23/2022 8:16 PM
Is it maybe possible to increase the healing of deadon for example ? And if it is possible could some1 help me a bit ? I have some experience in coding but not much.
Avatar
Avatar
ehiu
The answer to this question is to hook the SERVERDATA_AUTH packet of the rcon protocol. hm... I have a question about the above question. Only Unreal-related APIs can Hook, Are there any Hooks related to RCON Protocol?
Although you have to look for it. There will be a connection with RCON.
Avatar
@Foppa
Avatar
Deleted and banned. This forum has nothing to do with political, war, violence, racism topics. (edited)
Avatar
Avatar
Foppa
Deleted and banned. This forum has nothing to do with political, war, violence, racism topics. (edited)
Henry Every <FG co owner> 2/24/2022 8:05 PM
Thank you
Avatar
I'm unable to register my account because I haven't received an email. I've tried resending the conformation and have tried making a new account with a different email.
7:22 AM
Is there anyway to fix this so I can download plugins?
Avatar
@WETBATMAN
Avatar
Hello? How do new users use your website if we don't receive a email to confirm our account??? (edited)
Avatar
The website cofirmation is broken at the moment. They are working on fixing it (edited)
11:12 AM
If you need a plugin in particular drop me a message and I can download it for you ^^
Avatar
Can they not just change user permissions until it is resolved? (edited)
Avatar
Alternatively you can download it from the GitHub, under releases https://github.com/Michidu/ARK-Server-API (edited)
12:53 PM
that just links me back to the original https://ark-server-api.com/index.php?resources/ark-server-api.4/ link
1:37 PM
Should be able to download the .zip there
Avatar
So I've been messing with my ark server trying to get the ark server api to loadup but it just isn't working.. I've followed the installation guide but still no luck
3:01 PM
3:04 PM
server loads up but nothing
Avatar
Avatar
Josh
So I've been messing with my ark server trying to get the ark server api to loadup but it just isn't working.. I've followed the installation guide but still no luck
Accelerator 2/25/2022 3:05 PM
Wich platform are you on ?
Avatar
my own dedi through ovh (edited)
Avatar
Accelerator 2/25/2022 3:05 PM
I mean win or linux
Avatar
Accelerator 2/25/2022 3:06 PM
Thats why
3:06 PM
plugins only work on win
Avatar
Accelerator 2/25/2022 3:07 PM
had that same problem with my server. had to switch to an win server bcs of that.
Avatar
Avatar
Accelerator
had that same problem with my server. had to switch to an win server bcs of that.
You know DLL is only used by Windows right ? https://en.wikipedia.org/wiki/Dynamic-link_library
Avatar
Avatar
Natsu
You know DLL is only used by Windows right ? https://en.wikipedia.org/wiki/Dynamic-link_library
Accelerator 2/25/2022 3:10 PM
I didnt know back then
3:11 PM
It was my first server
Avatar
guess my noob players can enjoy the vanilla ark experience for now
🤣 1
Avatar
Avatar
Josh
guess my noob players can enjoy the vanilla ark experience for now
Accelerator 2/25/2022 3:13 PM
xD
Avatar
Avatar
Josh
guess my noob players can enjoy the vanilla ark experience for now
Microsoft has Windows server docker images
5:54 PM
you could use those as your baseline as it seems you're using Docker anyways
Avatar
email verification not working? Didnt receive one for 30 mins now. Checked all spam folders and resent it.
Avatar
@Niels Please create a ticket and i'll sort it out for you
Avatar
LegioAbrams 2/26/2022 2:26 AM
Lol im still waiting for it to function too 😂 would really like to put this shop ui mxe on my server but cant get the api it needs to run till i get verification (also couldnt create a ticket on the website till having verification.... But thank the stars theres a discord option now)
2:27 AM
Im going to bed a though havent been feeling well today so if someone figures out the email verification step problem just let me know (i created a ticket think its number 4 idk) Yall have a great night/day
Avatar
Avatar
Foppa
@Niels Please create a ticket and i'll sort it out for you
i did
👍 1
Avatar
Avatar
LegioAbrams
Lol im still waiting for it to function too 😂 would really like to put this shop ui mxe on my server but cant get the api it needs to run till i get verification (also couldnt create a ticket on the website till having verification.... But thank the stars theres a discord option now)
Create a ticket mate, i'll sort it out for you as well
Avatar
Was there already a plugin to fix spawn falling ? After you login you could spawn in the air and fall to your death.
Avatar
Avatar
Natsu
Was there already a plugin to fix spawn falling ? After you login you could spawn in the air and fall to your death.
Avatar
cant open the link 😮 Fixed. Foppa thank you for fixing this annoying bug 🙂 Guess it disables all Fall damage not just on login ? Would be nice if there was a timer after login (1min) no fall damage. After that normal fall damage. (edited)
Avatar
Does anyone know how to solve this problem, server works perfect. But when the turrets start shooting the ping goes to 255 and the player falls. I've tested without plugin and without mod and the same problem, does anyone know what it could be?
Avatar
Supposedly tek turrets are very bad for the server.
Avatar
even with 10 turret causes the problem.
6:41 AM
it looks like the player is receiving too many packets from the network.
Avatar
Avatar
Frigoff
Supposedly tek turrets are very bad for the server.
Cool thing is they’re implemented in blueprint
7:32 AM
So someone could rewrite them as a plugin 😉
Avatar
Avatar
substitute
Cool thing is they’re implemented in blueprint
That's all I know about it, I think one of the admins in here went into better depth about it.
Avatar
Aaurizon (Ryan) 2/28/2022 10:48 AM
Hello, where can I find a doc or func list ? The hook generator doesn't seem to work anymore.
Avatar
Foppa your plugin for fall damage, could you add a timer so it's only active for 1 minute upon login.
Avatar
Don't do request atm
12:10 PM
you can suggest it how ever
12:10 PM
in that discord
Avatar
Aaurizon (Ryan) 2/28/2022 1:05 PM
@Foppa There is no documentation or function list?
Avatar
There is a documentation
1:05 PM
which is inside the API's source code
1:05 PM
Where you also find functions.
1:06 PM
The rest is up to you 🙂
Avatar
Aaurizon (Ryan) 2/28/2022 1:51 PM
Ok thanks !
Avatar
javiluna123 3/1/2022 1:07 AM
Hi, I'm new to the ark plugin creation theme and I'd like to start programming but I don't know what I need. I have visual 2022.
Avatar
Avatar
javiluna123
Hi, I'm new to the ark plugin creation theme and I'd like to start programming but I don't know what I need. I have visual 2022.
substitute 3/1/2022 1:13 AM
You would need to have an understanding of C++
Avatar
TrickyBlade 3/1/2022 1:17 AM
maybe you guys can help me. I want to use some plugins for my server. I downloaded ark api and placed it in the correct location, however, when i launch ark it starts and then shuts down almost immediately. any ideas?
Avatar
Avatar
substitute
You would need to have an understanding of C++
javiluna123 3/1/2022 1:18 AM
yes visual has for c++ what I don't know what library I need
Avatar
Avatar
javiluna123
yes visual has for c++ what I don't know what library I need
substitute 3/1/2022 1:35 AM
No, I mean the language
Avatar
javiluna123 3/1/2022 1:37 AM
which one do you recommend
Avatar
javiluna123 3/1/2022 2:15 AM
I have programming knowledge what I need to know is what I need to use its libraries or dependencies
2:16 AM
because I have started but I get an error in the include and in some methods
Avatar
You can use the template that Substitute made
Avatar
javiluna123 3/1/2022 10:24 AM
where is it
Avatar
javiluna123 3/1/2022 12:29 PM
but I don't need to have as a dependency to use the functions?
Avatar
You will need the ark server api headers and you will need to link against the library. But otherwise there is no dependency
Avatar
javiluna123 3/1/2022 3:55 PM
where can i download it?
Avatar
javiluna123 3/1/2022 7:23 PM
ok thx
Avatar
Hello, just tried to register on the website, and I'm awaiting on the confirmation email. It's been a good 10 minutes and nothing yet, could something be broken with that process?
Avatar
jraServerAPI 3/1/2022 7:51 PM
#deleted-channel
Avatar
Done, thanks!
Avatar
javiluna123 3/2/2022 12:27 AM
When I have created the code, how do I add the plugin to my server?
12:28 AM
is there a tutorial?
Avatar
jraServerAPI 3/2/2022 12:59 AM
ArkApi is a plugin which allows you to create your own server-side plugins for ARK using C++ language. Installation: Extract everything to "ARK\ShooterGame\Binaries\Win64". All files like "version.dll" should be in "Win64" folder. Start your...
Avatar
javiluna123 3/2/2022 1:14 AM
but that is to add it to the server I have created a plugin but I don't know how to create it or if I have to put only the project folder
Avatar
You need to know the basics of coding with C++. Have you compiled it?
Avatar
javiluna123 3/2/2022 1:50 AM
I have seen a tutorial and it was what I was missing thanks anyway
Avatar
TrickyBlade 3/2/2022 3:57 AM
Can anyone assist me with this issue? this loads and then opens ark, only to shut it down right after opening it.
Avatar
jraServerAPI 3/2/2022 4:55 AM
are you using Ark Server Manager?
4:56 AM
Latest Server Manager is 1.1.417 Installers Latest version:
Avatar
javiluna123 3/2/2022 1:11 PM
I have a question and it is how I can recognize if you have the admin on the server
Avatar
Avatar
javiluna123
I have a question and it is how I can recognize if you have the admin on the server
F.J. Blazkowicz III 3/2/2022 5:38 PM
if you have admin you should be able to do commands like cheat fly or enable commands first with enablecheats [serveradminpassword]
Avatar
Buffleman420 3/2/2022 10:11 PM
How long does it take to receive the verification email? i've waited 15 minutes so far and still nothing.
Avatar
I also have not yet received a verification email. using a gmail account.
1:05 PM
been trying for 2 days or so, resending, never works.
Avatar
Avatar
Wasteoide
I also have not yet received a verification email. using a gmail account.
open ticket the admins verifiy u
Avatar
Avatar
Niels
open ticket the admins verifiy u
Buffleman420 3/3/2022 3:27 PM
I’ve had one open for 12 hours, still no response
Avatar
hello, I can't verify my email, I try to resend the verification but the email never arrives.
Avatar
Avatar
AnjoCaido
hello, I can't verify my email, I try to resend the verification but the email never arrives.
Buffleman420 3/3/2022 6:27 PM
Having the same issue here, have a ticket open still no response
Avatar
jraServerAPI 3/3/2022 6:44 PM
6:45 PM
everyone is busy these day... but he will get back to you
Avatar
is there any tutorial for clion or someone that can help me set it up?https://docs.google.com/document/d/1U4kRBevkLbXxcVMzKTmsjRKFkCEjtG46bfi5TdHNluQ/edit
Avatar
TheMollusk 3/5/2022 1:41 AM
int configCacheDecayMins = 15; FString damClassPath = "Blueprint'/Game/PrimalEarth/CoreBlueprints/Inventories/PrimalInventoryBP_BeaverDam.PrimalInventoryBP_BeaverDam'"; UClass* damClass; FString woodClassPath = "Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_Wood.PrimalItemResource_Wood'"; UClass* woodClass; void Hook_UPrimalInventoryComponent_ServerCloseRemoteInventory(UPrimalInventoryComponent* _this, AShooterPlayerController* ByPC) { bool isOnlyWood = true; APrimalStructureItemContainer* cache; UPrimalInventoryComponent_ServerCloseRemoteInventory_original(_this, ByPC); if (!damClass) damClass = UVictoryCore::BPLoadClass(&damClassPath); if (_this->IsA(damClass) && (_this->InventoryItemsField().Num() > 0)) { if (!woodClass) woodClass = UVictoryCore::BPLoadClass(&woodClassPath); for (UPrimalItem* item : _this->InventoryItemsField()) { if (item && !item->IsA(woodClass)) { isOnlyWood = false; break; } } if (isOnlyWood) _this->DropInventoryDeposit(ArkApi::GetApiUtils().GetWorld()->GetTimeSeconds() + (configCacheDecayMins * 60), false, false, nullptr, nullptr, &cache, nullptr, FString(""), FString(""), -1, 300, false, -1, false, nullptr, false); } } Hey guys! I just got into writing ARK plugins. Whole new world for me, but I've done a few cool things (in my opinion at least). This hook makes beaver dams drop their inventory into an item cache when they are left containing only wood. I thought it could be worth publishing as a plugin. Also possible I've made some bad novice mistakes, in which case I'd certainly appreciate any feedback. I haven't had success getting access on the website so I finally tried opening a ticket here yesterday. Is this the right place for support? If anyone with the appropriate website permissions wants to put this in a plugin, go for it.
Avatar
Avatar
TheMollusk
int configCacheDecayMins = 15; FString damClassPath = "Blueprint'/Game/PrimalEarth/CoreBlueprints/Inventories/PrimalInventoryBP_BeaverDam.PrimalInventoryBP_BeaverDam'"; UClass* damClass; FString woodClassPath = "Blueprint'/Game/PrimalEarth/CoreBlueprints/Resources/PrimalItemResource_Wood.PrimalItemResource_Wood'"; UClass* woodClass; void Hook_UPrimalInventoryComponent_ServerCloseRemoteInventory(UPrimalInventoryComponent* _this, AShooterPlayerController* ByPC) { bool isOnlyWood = true; APrimalStructureItemContainer* cache; UPrimalInventoryComponent_ServerCloseRemoteInventory_original(_this, ByPC); if (!damClass) damClass = UVictoryCore::BPLoadClass(&damClassPath); if (_this->IsA(damClass) && (_this->InventoryItemsField().Num() > 0)) { if (!woodClass) woodClass = UVictoryCore::BPLoadClass(&woodClassPath); for (UPrimalItem* item : _this->InventoryItemsField()) { if (item && !item->IsA(woodClass)) { isOnlyWood = false; break; } } if (isOnlyWood) _this->DropInventoryDeposit(ArkApi::GetApiUtils().GetWorld()->GetTimeSeconds() + (configCacheDecayMins * 60), false, false, nullptr, nullptr, &cache, nullptr, FString(""), FString(""), -1, 300, false, -1, false, nullptr, false); } } Hey guys! I just got into writing ARK plugins. Whole new world for me, but I've done a few cool things (in my opinion at least). This hook makes beaver dams drop their inventory into an item cache when they are left containing only wood. I thought it could be worth publishing as a plugin. Also possible I've made some bad novice mistakes, in which case I'd certainly appreciate any feedback. I haven't had success getting access on the website so I finally tried opening a ticket here yesterday. Is this the right place for support? If anyone with the appropriate website permissions wants to put this in a plugin, go for it.
Buffleman420 3/5/2022 2:02 AM
This the correct place, admins should respond soon hopefully. Let me know when you get this put in as a plug in man, would love to have this on my server! (edited)
Avatar
Spikeydragoon 3/5/2022 5:56 AM
any one running into error 1114 on the arkshopui plugin?
Avatar
Avatar
Mr. Alpaca
is there any tutorial for clion or someone that can help me set it up?https://docs.google.com/document/d/1U4kRBevkLbXxcVMzKTmsjRKFkCEjtG46bfi5TdHNluQ/edit
substitute 3/5/2022 8:17 AM
Hey
8:17 AM
I made a template for visual studio
8:18 AM
I might make a cmake template soon
8:18 AM
Which should work with CLion
Avatar
Avatar
Spikeydragoon
any one running into error 1114 on the arkshopui plugin?
it should only throw this if your ArkShop is out of date or if you're running a modified version of ArkShop
10:41 AM
the UI plugin will only load with an official ArkShop release downloaded from the forum
Avatar
Avatar
substitute
Hey
please dm me if you do 🙂 (edited)
Avatar
Avatar
WETBATMAN
the UI plugin will only load with an official ArkShop release downloaded from the forum
Spikeydragoon 3/5/2022 5:15 PM
ah made a few additions so explains that, thank you.
Avatar
If you wan to add to the ArkShop project you need to submit pull requests on GitHub so the changes can be considered.
Avatar
Heyo all. How's the support for the website here on the discord? No verification link being sent my way
Avatar
Avatar
WETBATMAN
the UI plugin will only load with an official ArkShop release downloaded from the forum
substitute 3/5/2022 7:12 PM
Is there an internal check in the mod?
Avatar
Avatar
substitute
Is there an internal check in the mod?
in the plugin, yeah
Avatar
Avatar
WETBATMAN
in the plugin, yeah
substitute 3/5/2022 7:13 PM
Not in the client side mod?
7:13 PM
Because checks in a plugin would be trivial to circumvent
Avatar
it's packed with themida
7:13 PM
entry point is virtualized
Avatar
substitute 3/5/2022 7:14 PM
What’s the check?
7:14 PM
Is the file signed or something?
7:14 PM
Lol
Avatar
pm me, don't really want to discuss that in the public channel here 😄
Avatar
substitute 3/5/2022 7:15 PM
Fair
Avatar
Avatar
Lethal
If you wan to add to the ArkShop project you need to submit pull requests on GitHub so the changes can be considered.
Spikeydragoon 3/5/2022 8:53 PM
yeah might do that since with the new changes only two things are different now. 1: adds options to purchase colors 2: adds option to pass in saddle quality from config. Will have to see when I get time since i just pulled the codes zip file instead of forking from git. (edited)
Avatar
The Ticket tool doesn't work ore bether nobody answer so i'm asking here. So im trying to confirm my account on ARK: Server API but i dont get any message on my email acc. Alreddy checkt everything: spam, advertising, social networks, junk. There is nothing I also tried a different address and I didn't get anything there either.
4:29 AM
it's an ongoing issue, still
Avatar
... and then what can i do to download something
Avatar
🐨Dream Doctor🦘 3/6/2022 5:30 AM
Trying to get my head around template parameter packs and this example from the API: template <typename T, typename... Args> FORCEINLINE void SendServerMessage(AShooterPlayerController* player_controller, FLinearColor msg_color, const T* msg, Args&&... args) { if (player_controller) { FString text(FString::Format(msg, std::forward<Args>(args)...)); player_controller->ClientServerChatDirectMessage(&text, msg_color, false); } } I understand that typename... Args allows any number of parameters to be supplied to allow, for example, a large number of strings. I think I understand that std::forward is forwarding all those arguments to FString::Format which I assume will accept them. And I think I understand that typename T is used for msg to allow for different types of strings to be used for the message. Am I getting anything wrong there?
Avatar
Avatar
JoSeRvUs
The Ticket tool doesn't work ore bether nobody answer so i'm asking here. So im trying to confirm my account on ARK: Server API but i dont get any message on my email acc. Alreddy checkt everything: spam, advertising, social networks, junk. There is nothing I also tried a different address and I didn't get anything there either.
You should try follow your picture more 🙂
Avatar
Avatar
🐨Dream Doctor🦘
Trying to get my head around template parameter packs and this example from the API: template <typename T, typename... Args> FORCEINLINE void SendServerMessage(AShooterPlayerController* player_controller, FLinearColor msg_color, const T* msg, Args&&... args) { if (player_controller) { FString text(FString::Format(msg, std::forward<Args>(args)...)); player_controller->ClientServerChatDirectMessage(&text, msg_color, false); } } I understand that typename... Args allows any number of parameters to be supplied to allow, for example, a large number of strings. I think I understand that std::forward is forwarding all those arguments to FString::Format which I assume will accept them. And I think I understand that typename T is used for msg to allow for different types of strings to be used for the message. Am I getting anything wrong there?
That's correct
Avatar
PRINCE HOTROD 3/8/2022 3:07 AM
howam isupposed to use plugins
3:08 AM
if the the email comformation dont work?
Avatar
🐨Dream Doctor🦘 3/8/2022 5:06 AM
How would I check whether the world has finished loading or not? I use the SGM:InitGame hook to run some code, which works fine when the plugin is loaded normally at server startup, but I want have that same code run when the plugin is loaded after startup with the plugins.load command. (edited)
Avatar
jraServerAPI 3/8/2022 5:19 AM
I just use this after I load my config file: c++ if (ArkApi::GetApiUtils().GetStatus() == ArkApi::ServerStatus::Ready) { // plugin was loaded while server was running }
Avatar
Avatar
jraServerAPI
I just use this after I load my config file: c++ if (ArkApi::GetApiUtils().GetStatus() == ArkApi::ServerStatus::Ready) { // plugin was loaded while server was running }
🐨Dream Doctor🦘 3/8/2022 5:20 AM
Perfect! Thank you!
Avatar
Since this is an ongoing issue, is there a work around for new people who register? Can't do much on the site if I can't get it to register.
Avatar
jraServerAPI 3/8/2022 6:23 PM
Honestly, I'm not in the loop as to what is exactly going on, and why it's taking so long to fix. But I do think that we should host a channel here, with the latest ArkApi download, and maybe some plugins etc, until this is resolved
6:23 PM
@Foppa ☝️ thoughts?
Avatar
It would really help since it seems to be a tough problem to solve.
Avatar
unfortunately the main site admin resides in russia and since the internet there is 99% filtered at this point, it's challenging to get a hold of him
6:27 PM
at least that's what we suspect is going on
ThumbsUpAO 1
Avatar
Guess no plugins for me for a while lol
Avatar
Avatar
HappyNem
Since this is an ongoing issue, is there a work around for new people who register? Can't do much on the site if I can't get it to register.
GSH | MrOwlSky 3/8/2022 6:54 PM
I'm working with Michidu now and Foppa to resolve that bug. It will be resolved entirely hang tight Foppa will be able to manually activate it via tickets for short time being. The bug in general is going to be resolved soon.
ThumbsUpAO 1
Avatar
Avatar
WETBATMAN
unfortunately the main site admin resides in russia and since the internet there is 99% filtered at this point, it's challenging to get a hold of him
substitute 3/9/2022 4:00 AM
The site isn't hosted in Russia is it?
😂 1
Avatar
Avatar
GSH | MrOwlSky
I'm working with Michidu now and Foppa to resolve that bug. It will be resolved entirely hang tight Foppa will be able to manually activate it via tickets for short time being. The bug in general is going to be resolved soon.
🐨Dream Doctor🦘 3/9/2022 4:55 AM
This is way too little, way too late I'm afraid. I was talking to Foppa about the issue, but he's now not responding to my messages either. That site is the heart of this community. Without it devs cannot upload plugins, and nobody new can download anything at all. That site has been effectively down for a MONTH now. That is just shockingly damaging to our community. Mich is a hero of this community, and somebody we all look up to, but this isn't the first time the site has been down for weeks at a time. If he's not willing or not able to deal with the community any longer, then he needs to let it go now and allow the many other people here who are both willing and able to take over to do so. Even if this is "resolved soon" how long before it happens again and we wait another month for it to be fixed? I could have a replacement site made in a few days that is faster, much more user friendly and can be fixed in minutes not weeks or months, and I'm sure many other people here could do the same. When can this be fixed once and for all? (edited)
4:58 AM
I'll add that (with my cluster admin hat on) the cluster I work with is the second largest donor to the api website, and we've purchased paid plugins from most of the main devs. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
This is way too little, way too late I'm afraid. I was talking to Foppa about the issue, but he's now not responding to my messages either. That site is the heart of this community. Without it devs cannot upload plugins, and nobody new can download anything at all. That site has been effectively down for a MONTH now. That is just shockingly damaging to our community. Mich is a hero of this community, and somebody we all look up to, but this isn't the first time the site has been down for weeks at a time. If he's not willing or not able to deal with the community any longer, then he needs to let it go now and allow the many other people here who are both willing and able to take over to do so. Even if this is "resolved soon" how long before it happens again and we wait another month for it to be fixed? I could have a replacement site made in a few days that is faster, much more user friendly and can be fixed in minutes not weeks or months, and I'm sure many other people here could do the same. When can this be fixed once and for all? (edited)
Cause i have also have a life 🙂
9:10 AM
Outside of this
9:10 AM
And it's taking a lot of my free time to balance everything.
9:10 AM
As soon as I don't do something somewhere this kind of messages shows up. (edited)
9:11 AM
So, with me, im here and loyal, we have a workaround i'll try to setup a team as i said @🐨Dream Doctor🦘
9:11 AM
And it's a bit overdramatic to call it down for a month. It's being have a register issue yes. But not down.
Avatar
Avatar
Foppa
Cause i have also have a life 🙂
🐨Dream Doctor🦘 3/9/2022 9:40 AM
With all due respect to you, "cause I also have a life" is a pretty disrespectful response to me. The last response I had from you was the 23rd of February. I've twice followed up since then, and it's now the 9th of March. That's a full two weeks whilst the site continues to be down. And to clarify, I wasn't contacting you to complain, I was contacting you to offer help in getting the issue resolved. I don't think you understand the severity of the situation. Just count the number of new people who've come to this Discord to ask why they can't do anything on the API website. How many of them left and gave up? And how many never made it to this Discord to ask? If that doesn't count as broken then I don't know what does. As I also said to you, if these issues aren't sorted then there is a serious danger that others will fix the problem for you by setting up their own systems, and then you'll have the disastrous situation of community fragmentation. I'm not seeking to sit here and complain. I'm seeking to try and help get the problems fixed once and for all, so that we never again have to endure something like this. (edited)
👍 1
Avatar
Avatar
🐨Dream Doctor🦘
This is way too little, way too late I'm afraid. I was talking to Foppa about the issue, but he's now not responding to my messages either. That site is the heart of this community. Without it devs cannot upload plugins, and nobody new can download anything at all. That site has been effectively down for a MONTH now. That is just shockingly damaging to our community. Mich is a hero of this community, and somebody we all look up to, but this isn't the first time the site has been down for weeks at a time. If he's not willing or not able to deal with the community any longer, then he needs to let it go now and allow the many other people here who are both willing and able to take over to do so. Even if this is "resolved soon" how long before it happens again and we wait another month for it to be fixed? I could have a replacement site made in a few days that is faster, much more user friendly and can be fixed in minutes not weeks or months, and I'm sure many other people here could do the same. When can this be fixed once and for all? (edited)
GSH | MrOwlSky 3/9/2022 2:08 PM
That's a valid concern and question. I can ensure you this we are currently in the works of providing a positive solution here very soon. It'll be one that everyone will enjoy.
Avatar
Smugger | STAG 3/9/2022 2:32 PM
Anyone else run into a problem getting the confirmation email for signing up for a new account to come through @ gmail? Is this a known issue? I checked my spam also, and no it is not there either. I have waited for about 45 min now. (edited)
2:34 PM
Okay, this does seem to be a known issue. I just searched. I guess I will do what others suggest and create a ticket
Avatar
Avatar
Smugger | STAG
Okay, this does seem to be a known issue. I just searched. I guess I will do what others suggest and create a ticket
GSH | MrOwlSky 3/9/2022 2:37 PM
Yeah please create a support ticket and Foppa will be able to confirm the email directly for you. We have a fix being released soon.
Avatar
Smugger | STAG 3/9/2022 2:37 PM
Thanks
Avatar
GSH | MrOwlSky 3/9/2022 2:37 PM
No problem
Avatar
Smugger | STAG 3/9/2022 2:38 PM
In the mean time, can someone send me the ARK API file and the Ark Shop file?
Avatar
GSH | MrOwlSky 3/9/2022 2:39 PM
I'll post them inside your ticket for you.
Avatar
Smugger | STAG 3/9/2022 2:39 PM
Thank you
👍 1
2:43 PM
One more question, does anyone know if it supports the updated MySQL Authentication SHA256 password method (caching_sha2_password) or if I need to use the 5.x Compatibility mode?
Avatar
Standard/Legacy is the only supported password for any plugins that i'm aware of (edited)
Avatar
Smugger | STAG 3/9/2022 2:52 PM
Thanks Lethal...
Avatar
Smugger | STAG 3/10/2022 12:16 AM
Well F. I probably should have read the FAQ before, and did not think about it until now. No Linux Support for it. 😢 This is a sad day.
Avatar
Just wondering, have there been any serious efforts to reverse engineer the Linux version of the server? Been getting a little interested in that lately. I guess the lack of debug symbols is generally considered a roadblock not worth dealing with when you can just switch to Windows instead?
Avatar
Avatar
TheMollusk
Just wondering, have there been any serious efforts to reverse engineer the Linux version of the server? Been getting a little interested in that lately. I guess the lack of debug symbols is generally considered a roadblock not worth dealing with when you can just switch to Windows instead?
Smugger | STAG 3/10/2022 1:52 AM
There a many reason why using Windows may not be a viable option for everyone: 1. Licensing Cost [ Even though you can technically use Windows 10 for Free and have the Activate Windows Watermark, using it for this purpose is against their ToS. ] 2. Resources [ Running Linux CLI only is a lot less resource intensive than Windows, and depending on your distro can be fairly significant ] 3. Management in Headless Environment [ Using SSH to connect to your server is far more simple and quicker than Remote Desktop or VNC ] 4. Automation [ Personally I find it easier to script in Bash or Python than writing Powershell or batch scripts. That with setting up Cron jobs seems faster and simpler than using Windows Task Scheduler, especially making or editing multiple jobs at once. That on top of easier to check logs. Now, just because I listed these reason, I do not expect anyone to actually develop a Linux Version of this API It just made me a bit sad is all. (edited)
1:55 AM
Also, I can get a Linux VM up and running and fully installed in under 10 min. Windows would take me a lot longer. Although I will agree, this is not a very good reason 😄 (edited)
Avatar
Avatar
TheMollusk
Just wondering, have there been any serious efforts to reverse engineer the Linux version of the server? Been getting a little interested in that lately. I guess the lack of debug symbols is generally considered a roadblock not worth dealing with when you can just switch to Windows instead?
It wouldn’t be hard to find out the address functions and stuff, but you couldn’t use the pdb reader like the current project is doing to have automatic updates. You’d have to really on pattern scanning and UE4 replication.
1:59 AM
It’s not that very hard it’s that supporting it is very burdensome.
2:02 AM
The maintainers would have to keep updating broken patterns, though eventually you could make really good ones and yeah. Idk if anyone is willing to provide that level of support
Avatar
Avatar
TheMollusk
Just wondering, have there been any serious efforts to reverse engineer the Linux version of the server? Been getting a little interested in that lately. I guess the lack of debug symbols is generally considered a roadblock not worth dealing with when you can just switch to Windows instead?
It’s not too hard if you don’t need native code access
2:14 AM
UE4 has a very robust reflection system
2:14 AM
If you reverse enough to use it, you can do almost anything
Avatar
Ahh I'm not familiar enough with UE4 reflection, got some learning to do. I was afraid I'd have to rely on signature heuristics to find certain functions or something, but I was hoping a well understood Windows executable would make that easier to develop.
Avatar
Patterns are likely not the same between the binaries for Linux and Windows
Avatar
I think it might offer at least some clues as to what kind of analysis to perform, but it could be a pure fantasy of mine.
Avatar
Yeah. Maybe my dreams of sophisticated analysis and heuristics are unnecessary. They really lay out everything you need in their property system. Thats awesome. Thanks for the pointers.
Avatar
Avatar
TheMollusk
Just wondering, have there been any serious efforts to reverse engineer the Linux version of the server? Been getting a little interested in that lately. I guess the lack of debug symbols is generally considered a roadblock not worth dealing with when you can just switch to Windows instead?
🐨Dream Doctor🦘 3/10/2022 5:43 AM
Personally I'd LOVE to see a Linux API, as Ark servers run so much better on Linux. I've spoken to someone from WC about releasing the debug info for the Linux server version, which they do for the Windows build, however I don't think it's something they will do, at least not without a lot more outspoken people demanding it. It adds time and complexity to their Linux build/release process, which is already fairly low in their priority list, and it significantly increases build size as well. As I understand it the release of the Windows debug info was a mistake, and was only discovered once people were already using it. I don't know if they ever had a discussion with Mich, but if so I'd assume that was a confidential discussion.
Avatar
Well there's more information there that's easily accessible than I expected. But like others said, there would be serious challenges getting a full ArkApi style system going on Linux. Plus it's not like existing plugins would port directly. Maybe I have time to learn more for ARK2 in case they stop publishing symbols on Windows too lol.
Avatar
Avatar
🐨Dream Doctor🦘
Personally I'd LOVE to see a Linux API, as Ark servers run so much better on Linux. I've spoken to someone from WC about releasing the debug info for the Linux server version, which they do for the Windows build, however I don't think it's something they will do, at least not without a lot more outspoken people demanding it. It adds time and complexity to their Linux build/release process, which is already fairly low in their priority list, and it significantly increases build size as well. As I understand it the release of the Windows debug info was a mistake, and was only discovered once people were already using it. I don't know if they ever had a discussion with Mich, but if so I'd assume that was a confidential discussion.
I don't think it was entirely a mistake
6:41 AM
I highly question if WC would have been able to fix a lot of the issues without the extra nice crash logs that debug symbols deliver
Avatar
Avatar
substitute
I highly question if WC would have been able to fix a lot of the issues without the extra nice crash logs that debug symbols deliver
🐨Dream Doctor🦘 3/10/2022 6:41 AM
Yeah you're not wrong there.
Avatar
imagine if they compiled the server for Linux/OS X for the M1 ARM chip
6:42 AM
could be nice
Avatar
🐨Dream Doctor🦘 3/10/2022 6:45 AM
I wonder how a game server would run on risc architecture.
Avatar
Avatar
TheMollusk
Well there's more information there that's easily accessible than I expected. But like others said, there would be serious challenges getting a full ArkApi style system going on Linux. Plus it's not like existing plugins would port directly. Maybe I have time to learn more for ARK2 in case they stop publishing symbols on Windows too lol.
I asked them last month if they were planning on shipping debug symbols for ark2 for windows and as of right now they do plan on it
Avatar
Should be server be v344.4 since the client has recently updated to 344.4? (edited)
1:30 PM
I've tried auto updating it but the server is staying on 344.3
Avatar
The server has been working fine the last few days and after not changing anything I keep getting this message
2:59 PM
Avatar
did any1 get arkapi working on linux coz performance waay better on linux is there like any way with wine or something
Avatar
Avatar
Mr. Alpaca
did any1 get arkapi working on linux coz performance waay better on linux is there like any way with wine or something
no, this would require a full rewrite of ArkApi and pretty much all plugins, this is not planned at all at this moment (edited)
Avatar
im not talking about planned but workarounds coz mabe wine
5:05 PM
coz i've heard rumors of people getting it working
Avatar
if you virtualize windows, it will work ofc
Avatar
do you know any open source panel that works on windows in place of pterodactyl
Avatar
If your goal is to take advantage of better performance of Linux, I'm not sure you're going to achieve that by running Windows software with Wine or virtualized environments.
Avatar
i like linux more but i want to sell servers with arkapi installed but i dont know if there is any panel on windows and im already using pterodactyl
Avatar
you're only adding extra overhead this way.
Avatar
wdym
Avatar
since you cannot run the windows version of the ARK server natively, you're going to have to virtualize it, which adds extra overhead
5:16 PM
it's better to run on windows directly in this case
Avatar
yes so maybe there is any way to run it on windows with a panel where i can sell servers (edited)
Avatar
not sure what you mean by a panel
Avatar
just like hosting but with arkapi support
Avatar
you want to rent a server?
Avatar
i have my own servers but i want to make my server accesable trough a panel on the web
Avatar
you could try something like TCAdmin maybe
Avatar
its payed
Avatar
you want a free service that will allow you to make money off of it? 😄
Avatar
no i want something open source so i can change everyting
5:20 PM
Avatar
Avatar
WETBATMAN
you could try something like TCAdmin maybe
TCAdmin sounds like what you want
5:22 PM
It's not expensive
Avatar
its not open source
Avatar
i'm not aware of any free and open source solutions for this, you will most likely have to write your own
Avatar
ok
Avatar
TCAdmin is popular. I wouldn't be surprised if there are others. Like I've never heard of Pterodactly. Kind of a whole different topic from plugins.
Avatar
ye i found this but cant find on how to install it on windows https://gameap.ru/en/
Avatar
this discord is for ArkApi and plugin support.
Avatar
im not asking for support
Avatar
regardless, what you're asking for is off topic
Avatar
Avatar
Mr. Alpaca
im not asking for support
Exactly, here is where you request support 😄
Avatar
"GLOBAL TALK"
🤷‍♂️ 2
Avatar
GSH | MrOwlSky 3/10/2022 8:32 PM
Great news, bunch of new features are coming to website and discord #【📩】ᴄʜᴀɴɢᴇʟᴏɢꜱ The bug reported with mail server should be resolved and the "MEGA" update will go live within the next 72hours.
Avatar
jraServerAPI 3/10/2022 9:04 PM
Avatar
How can I put safe zones In my ark, I have this
Avatar
jraServerAPI 3/10/2022 9:29 PM
This discord is primarily for development support. SafeZone support can be found here https://discord.gg/m4SmPdvd
Avatar
Could someone please send me this plugin cause there are some problems with the website
Avatar
that sure is a lot of members
😂 2
Avatar
Avatar
JoSeRvUs
Could someone please send me this plugin cause there are some problems with the website
GSH | MrOwlSky 3/10/2022 10:37 PM
Working now on resolving the permissions for resources
Avatar
Everytime I try to download a resource
Avatar
We are solving it, please stand by as this has been a massive migration.
Avatar
ye no pressure I dont need to download anything - just wanted to see the new site and saw this. came here to report 👍🏽 the update seems awesome 😊 (edited)
❤️ 1
Avatar
Are we to create a new account?
Avatar
No, accounts are the same. You would just login with arkapi credentials
Avatar
Cool update, nice to see stuff accessible again. What's the relationship like between this community and WildCard? I know they're generally aware of ArkApi and try to keep the PDB up-to-date. Have there ever been concerns over paid plugins? Seems like game studios tend to notice and take steps to lock things down when paid 3rd party software gets too organized. WildCard had rules against paid mods, and plugins are even less supported to begin with. Maybe the fact they're not officially supported allows WildCard to ignore it despite their other rule.
Avatar
They have noticed, but they do not have any TOS against it nor they have the intention to remove PDB file.
Avatar
Avatar
Nexxa
Cool update, nice to see stuff accessible again. What's the relationship like between this community and WildCard? I know they're generally aware of ArkApi and try to keep the PDB up-to-date. Have there ever been concerns over paid plugins? Seems like game studios tend to notice and take steps to lock things down when paid 3rd party software gets too organized. WildCard had rules against paid mods, and plugins are even less supported to begin with. Maybe the fact they're not officially supported allows WildCard to ignore it despite their other rule.
GSH | MrOwlSky 3/10/2022 11:15 PM
Wildcard went on stream a few times talking about ArkServerAPI. They talked quite a bite about woolies anti-mesh when it came out and showed support towards it. ArkServerAPI isn't official endorsed or afflicted with Wildcard in any manor.
Avatar
Right, it's basically 3rd party hacks when it comes down to it. It's cool they seem supportive though. Hoping it stays that way for ARK2
11:18 PM
Seems unlikely they'd change anything too significantly for ARK1 at this point. Especially with larger clusters using plugins.
Avatar
It's pretty disingenuous to say the API is 3rd party hacks. They only modify the server, which is self hosted and self managed. It's no different than installing a mod except the mod can modify the client as well.
11:44 PM
WC pretty much can't support 3rd party plugins without deploying some type of verification system and managing it themselves. Which with a team their size they've accepted isn't a viable solution. (edited)
Avatar
I'm not sure what's disingenuous. I'm not being negative. In my mind, developing and injecting code without access to source can usually be called hacking.
11:48 PM
Seems a good word to describe making a game server do stuff it wasn't originally designed to.
Avatar
Avatar
Nexxa
I'm not sure what's disingenuous. I'm not being negative. In my mind, developing and injecting code without access to source can usually be called hacking.
It's disingenuous as there is a massively negative connotation to the phrase "hack"
12:05 AM
It is more akin to a modification than a hack, there is no advantage or "cheating" being done, a user is instead simply modding software they own to enhance it's functionality
12:06 AM
Essentially, modding and hacking are technically the same, but there is a definitive difference between the intent of the two
Avatar
Fair enough
12:06 AM
Im less of a gamer more of a programmer
12:06 AM
Hacking isnt a bad thing where I come from
Avatar
Would you consider hooking/monkey patching hacking or modding 😉
Avatar
Avatar
Nexxa
Hacking isnt a bad thing where I come from
This might also be a cultural difference. I come from a heavy programming background as well.
Avatar
Avatar
substitute
Would you consider hooking/monkey patching hacking or modding 😉
welll haha. like you said it depends
Avatar
and then there's cracking
12:08 AM
which is technically the same, but with a different intent
12:08 AM
to remove copy protection
Avatar
Yeah I see that as simply revealing hidden information/removing encryption
12:08 AM
again
12:09 AM
not necessarily negative
12:10 AM
My intent here was not to be negative or to offend. Just to point out the devs could see it that way. And I'm glad they don't.
Avatar
They've been pretty supportive. Which is rare and really cool.
Avatar
🐨Dream Doctor🦘 3/11/2022 1:05 AM
I have a lot of concerns about today's news. The idea that the API has been sold by Mich to another organisation of some sort that we all know nothing about, when essentially all the work done on the project in the last 12 months or more was freely contributed by other developers doesn't sit right with me. The level of commercialization also doesn't sit right either. If you think WC won't notice this, or that they don't care, you are very wrong. I'm going to try very hard to reserve judgement, but I'd really love to know exactly who and what this new organisation is made up of. I'd also really love to hear from the people who've actually contributed code to the API, and what they think of all this.
Avatar
Avatar
🐨Dream Doctor🦘
I have a lot of concerns about today's news. The idea that the API has been sold by Mich to another organisation of some sort that we all know nothing about, when essentially all the work done on the project in the last 12 months or more was freely contributed by other developers doesn't sit right with me. The level of commercialization also doesn't sit right either. If you think WC won't notice this, or that they don't care, you are very wrong. I'm going to try very hard to reserve judgement, but I'd really love to know exactly who and what this new organisation is made up of. I'd also really love to hear from the people who've actually contributed code to the API, and what they think of all this.
GSH | MrOwlSky 3/11/2022 1:15 AM
when essentially all the work done on the project in the last 12 months or more was freely contributed by other developers doesn't sit right with me. The same team is the one running ArkServerAPI. but I'd really love to know exactly who and what this new organisation is made up of. Same as before, the same support team members are still running it as normal. I'd also really love to hear from the people who've actually contributed code to the API, and what they think of all this. The API team is still active and will still provide support. If anything the API will now have more support since the support team members will now be paid for their services and time.
Avatar
🐨Dream Doctor🦘 3/11/2022 1:18 AM
I think you're going to need to be a LOT more transparent. Saying "the same" isn't transparent. Why aren't these people mentioned anywhere? Because all I've seen so far are you and Foppa, and, while you are both obviously very talented devs who've both written some great plugins, as far as I know, and I could be wrong, neither of you have written any code that is currently in the API source?
1:25 AM
I see @Pelayori has some comments above, which is comforting. What is their involvement? I'd love to hear from them as they have contributed a lot. I'd also love to hear from @Lethal, and @WETBATMAN, and @substitute , as I know they have all made contributions to code, as well as being incredibly important parts of this community. What do they think?
Avatar
Avatar
🐨Dream Doctor🦘
I think you're going to need to be a LOT more transparent. Saying "the same" isn't transparent. Why aren't these people mentioned anywhere? Because all I've seen so far are you and Foppa, and, while you are both obviously very talented devs who've both written some great plugins, as far as I know, and I could be wrong, neither of you have written any code that is currently in the API source?
GSH | MrOwlSky 3/11/2022 1:27 AM
The level of commercialization also doesn't sit right either. The support team that is helping run and keeping updates to the official API will be paid as before they weren't being paid for their services. We're actually building and working on new requirements for "Paid Plugins" where devs will have to contribute an "X" amount of "FREE" plugins or content before they can upload "PAID" plugins. This will create a system where there are more "FREE" plugins for the public rather then privatized and paid plugins controlling the marketplace. We're gonna explore this more in-depth as a staff team together to make sure we find the right balance between all of that. It's a good thing that the new system can support and allow support team members to earn monthly cash incentives for helping grow and keep the project alive it's the least we can do to show support for their hard work. The overall goal and objective is to provide more "FREE" content rather then content hidden behind subscriptions and paywalls. I think you're going to need to be a LOT more transparent. Saying "the same" isn't transparent. I agree with you, with the new updates we should be 100% transparent about everything. I don't disagree with you at all on that, I support that 100% and that will happen going forward. Why aren't these people mentioned anywhere? Yeah that's a great question, the question being how can we showcase the devs working behind the scenes to support ArkServerAPI. We'll have to discuss that with the staff team and see which staff members want to be credited publicly, that's a great idea I support that. Maybe we can do a section on site to include them as credit with a short bio or something. Because all I've seen so far are you and Foppa, and, while you are both obviously very talented devs who've both written some great plugins, as far as I know, and I could be wrong, neither of you have written any code that is currently in the API source? That's another great question, Yeah Foppa is active in the API development, we also have an amazing team now that works together to push out "official" API updates. In the past it was strictly restricted to Michidu producing updates, in the past 6 months or so Foppa and the other support team members have been getting together to provide regular quality of life updates to API. We're always growing the support team and now with the support team officially being "paid" for their services we can really start to plan out a future strategy for Ark 2 and beyond.
Avatar
Avatar
GSH | MrOwlSky
The level of commercialization also doesn't sit right either. The support team that is helping run and keeping updates to the official API will be paid as before they weren't being paid for their services. We're actually building and working on new requirements for "Paid Plugins" where devs will have to contribute an "X" amount of "FREE" plugins or content before they can upload "PAID" plugins. This will create a system where there are more "FREE" plugins for the public rather then privatized and paid plugins controlling the marketplace. We're gonna explore this more in-depth as a staff team together to make sure we find the right balance between all of that. It's a good thing that the new system can support and allow support team members to earn monthly cash incentives for helping grow and keep the project alive it's the least we can do to show support for their hard work. The overall goal and objective is to provide more "FREE" content rather then content hidden behind subscriptions and paywalls. I think you're going to need to be a LOT more transparent. Saying "the same" isn't transparent. I agree with you, with the new updates we should be 100% transparent about everything. I don't disagree with you at all on that, I support that 100% and that will happen going forward. Why aren't these people mentioned anywhere? Yeah that's a great question, the question being how can we showcase the devs working behind the scenes to support ArkServerAPI. We'll have to discuss that with the staff team and see which staff members want to be credited publicly, that's a great idea I support that. Maybe we can do a section on site to include them as credit with a short bio or something. Because all I've seen so far are you and Foppa, and, while you are both obviously very talented devs who've both written some great plugins, as far as I know, and I could be wrong, neither of you have written any code that is currently in the API source? That's another great question, Yeah Foppa is active in the API development, we also have an amazing team now that works together to push out "official" API updates. In the past it was strictly restricted to Michidu producing updates, in the past 6 months or so Foppa and the other support team members have been getting together to provide regular quality of life updates to API. We're always growing the support team and now with the support team officially being "paid" for their services we can really start to plan out a future strategy for Ark 2 and beyond.
I noticed there is a fee to be allowed to upload plugins and (unless something is changing) there’s still the flat distribution tax.
1:28 AM
Why is this? — I feel an upfront cost might come off poorly to newer devs looking to release their software on the site.
Avatar
GSH | MrOwlSky 3/11/2022 1:28 AM
Which are you referring to?
Avatar
Avatar
GSH | MrOwlSky
Which are you referring to?
1:29 AM
I was also confused about the removal of ads as from what I understand users can do paid advertising (edited)
1:29 AM
Allowing other users to bypass paid advertising seems like the only winner is the site
Avatar
🐨Dream Doctor🦘 3/11/2022 1:29 AM
So it sounds like you're going to try and exert a lot more control over the API. Will it remain fully free and fully open source?
Avatar
Username changes will be abused too
1:30 AM
That shouldn’t be allowed lol
Avatar
Avatar
substitute
Allowing other users to bypass paid advertising seems like the only winner is the site
GSH | MrOwlSky 3/11/2022 1:30 AM
Ah those, yeah that's a great question. Those aren't setup as of yet those will be getting changed and modified. Those mainly will be cosmetic ranks (discord color and website coloring).
1:31 AM
Everything listed on those are a placeholder.
Avatar
Avatar
🐨Dream Doctor🦘
So it sounds like you're going to try and exert a lot more control over the API. Will it remain fully free and fully open source?
GSH | MrOwlSky 3/11/2022 1:31 AM
It will always remain free and open source yes.
Avatar
So as far as my 2 cents goes
1:32 AM
I think this site is fine, but it should’ve been a separate endeavor
1:32 AM
It’s adds a lot of scope (other games) and loses focus on the api
1:32 AM
It also centralizes heavily while I think most devs would prefer a less central distribution method, similar to apt or npm
1:33 AM
I would like to see plugin validation as well; to an extent that plugins are at least cryptographically signed to prevent tampering
1:34 AM
Personally I think the developer community and a market place clash a bit, which is why 2 sites would’ve been fine
1:34 AM
We don’t see WC for example selling server hosting
Avatar
Avatar
🐨Dream Doctor🦘
I see @Pelayori has some comments above, which is comforting. What is their involvement? I'd love to hear from them as they have contributed a lot. I'd also love to hear from @Lethal, and @WETBATMAN, and @substitute , as I know they have all made contributions to code, as well as being incredibly important parts of this community. What do they think?
ArkApi was created by a single developer and it never had the intention of getting this big, obviously now that it did a single person is not enough to deal with it, as @GSH | MrOwlSky mentioned already, the site is still being set-up and all of the data from the main API website is currently being migrated as of what i think of the website itself, i think it's a good change, there are alot of quality of life features that were just added with the new features and more are to come out of course, like for example an auto plugin update tool is now possible.
Avatar
They just have an official partner with Nitrado
Avatar
Avatar
WETBATMAN
ArkApi was created by a single developer and it never had the intention of getting this big, obviously now that it did a single person is not enough to deal with it, as @GSH | MrOwlSky mentioned already, the site is still being set-up and all of the data from the main API website is currently being migrated as of what i think of the website itself, i think it's a good change, there are alot of quality of life features that were just added with the new features and more are to come out of course, like for example an auto plugin update tool is now possible.
I still believe this site will cause a loss of focus for the api — to the extent it aims to support multiple games and act as more of a central hub for admins and not developers
1:35 AM
Separate sites that are directly linked is totally fine
Avatar
Avatar
substitute
I still believe this site will cause a loss of focus for the api — to the extent it aims to support multiple games and act as more of a central hub for admins and not developers
🐨Dream Doctor🦘 3/11/2022 1:35 AM
Yeah this is a concern for me too.
Avatar
Avatar
substitute
I would like to see plugin validation as well; to an extent that plugins are at least cryptographically signed to prevent tampering
i actually implement something like this in my plugins.
Avatar
But a do-it-all can get out of hand
Avatar
it won't load if modified
1:36 AM
all of Lethal's plugins and Pelayori's plugins should have this too, since they utilize a packer
Avatar
ALSO final thing — this won’t fix some issues we have like needing to go to many different places for updates ( @Lethal uses their discord for distribution) and the focus on commercialization is a big turn off
1:36 AM
Open source projects usually have two separate commercial and community platforms
1:36 AM
Example: Fedora and Red Hat Linux
1:37 AM
(Hell, Linux in general)
1:37 AM
Another: git and GitHub/GitLab
1:37 AM
Like I said, a site that does all of this is fine
1:37 AM
But there should be a separation of concerns
1:37 AM
Community vs commercial
1:38 AM
Well that was a little more than 2 cents but I digress
1:39 AM
(Also minimum free releases to paid releases might turn off developers or encourage low quality free plugins that are contrasted by high quality paid plugins 😉 )
1:39 AM
No1 likes being told what to do and all that
1:40 AM
None of this is to discourage or put anyone down — I’m just looking at it from my perspective. (edited)
Avatar
Avatar
substitute
(Also minimum free releases to paid releases might turn off developers or encourage low quality free plugins that are contrasted by high quality paid plugins 😉 )
GSH | MrOwlSky 3/11/2022 1:42 AM
If you got suggestions like that on things you'd like see added/changed feel free to create a list in #【👏】ꜱᴜɢɢᴇꜱᴛɪᴏɴꜱ The community isn't going commercialized at all. It's staying free and open source with more FREE content being added. Main focus will be providing better solutions for the devs to work with when creating content.
Avatar
🐨Dream Doctor🦘 3/11/2022 1:43 AM
Thanks for everyone's responses. I'd love to hear Lethal's thoughts too if they feel like it.
Avatar
Avatar
GSH | MrOwlSky
If you got suggestions like that on things you'd like see added/changed feel free to create a list in #【👏】ꜱᴜɢɢᴇꜱᴛɪᴏɴꜱ The community isn't going commercialized at all. It's staying free and open source with more FREE content being added. Main focus will be providing better solutions for the devs to work with when creating content.
I’ll start with the ugly yellow color — it burns my eyes on my hdr monitor!
1:43 AM
pepe_kek
1:43 AM
We need a dark mode !
GOGCHECK 1
1:43 AM
(Haven’t actually checked if there is one)
Avatar
Avatar
substitute
I’ll start with the ugly yellow color — it burns my eyes on my hdr monitor!
🐨Dream Doctor🦘 3/11/2022 1:44 AM
Avatar
Avatar
🐨Dream Doctor🦘
Click to see attachment 🖼️
Basically
Avatar
Avatar
substitute
We need a dark mode !
Browser plugin called "Dark Reader" works great for all websites.
Avatar
Here is my highly sought after feedback lethalkek
Working website with email confirmations this will be great Some nice team related features for group projects are available now Expanded payment options (I only plan to use PayPal still since I have that automated) Everything is being done in good faith I believe and no malicious intent There will be bugs for a few days as there was a lot of data and platform upgrades required most likely I rely on my discord heavily because it is easier for me to manage a large community using my plugins but all good changes happening here. Everyone take a breath and use the suggestion system if you think something can be done a better way Not sure if I missed anything as there was a lot of chatter in here
Avatar
Avatar
Lethal
Browser plugin called "Dark Reader" works great for all websites.
jraServerAPI 3/11/2022 2:30 AM
Looks like they have a dark mode on the home page, but it doesn't work anywhere else
Avatar
GSH | MrOwlSky 3/11/2022 2:31 AM
Once forums is finished and stable. I'll knock out the homepage last. Homepage will require some javascript for displaying real time data from forum stats.
2:31 AM
Forums will have a dark mode added, the coloring will be improved too. (edited)
Avatar
Avatar
Lethal
Here is my highly sought after feedback lethalkek
Working website with email confirmations this will be great Some nice team related features for group projects are available now Expanded payment options (I only plan to use PayPal still since I have that automated) Everything is being done in good faith I believe and no malicious intent There will be bugs for a few days as there was a lot of data and platform upgrades required most likely I rely on my discord heavily because it is easier for me to manage a large community using my plugins but all good changes happening here. Everyone take a breath and use the suggestion system if you think something can be done a better way Not sure if I missed anything as there was a lot of chatter in here
🐨Dream Doctor🦘 3/11/2022 3:36 AM
Thanks Lethal..great to see your thoughts.
Avatar
I think the version of the api plugin on the site download is the wrong version.
4:01 AM
It's downloading version 3.5
4:01 AM
I think we're on .54 right?
4:04 AM
Wait this link has 3.54 but it doesn't work - https://ark-server-api.com/forums/resources/ark-server-api.12/
4:04 AM
Avatar
Avatar
Kizz
The link in the featured resources is - https://ark-server-api.com/forums/resources/ark-server-api.5/
GSH | MrOwlSky 3/11/2022 4:20 AM
Working on that now
Avatar
No worries! Just didn't know if it was brought up yet. 😛
Avatar
GSH | MrOwlSky 3/11/2022 4:27 AM
Should be good now
Avatar
So what's the story now on new plugin authors uploading resources? When I click the "Add Resource" button it brings me to an Add Resource page, which is farther than I got on the old site but I'm not sure I'm allowed to post. I've had a ticket open here on Discord for a few days where I agreed to a code of conduct and I provided some source code. Wasn't expecting quick action, I know admins are busy, but now the ticket has vanished.
Avatar
Avatar
TheMollusk
So what's the story now on new plugin authors uploading resources? When I click the "Add Resource" button it brings me to an Add Resource page, which is farther than I got on the old site but I'm not sure I'm allowed to post. I've had a ticket open here on Discord for a few days where I agreed to a code of conduct and I provided some source code. Wasn't expecting quick action, I know admins are busy, but now the ticket has vanished.
Do you have the plugin dev rank on the site?
Avatar
I don't have any rank as far as I can tell.
8:40 AM
Oh I need to make a new ticket. In #【🚫】ɪꜱꜱᴜᴇꜱ-ʙᴜɢꜱ-ʙ they say they cleared out tickets
Avatar
🐨Dream Doctor🦘 3/11/2022 8:55 AM
So I guess my first feedback on the new site is that there really needs to be some simple landing page for people looking to download the Ark API and some plugins. For people new to the whole thing, it's a bit bewildering to land on your main page and find their way to download the Ark API. A simple page that explains what the API is, where to download it with simple directions, and where to look for plugins. I know there is https://www.gameservershub.com/forums/resources/ark-server-api.12/, but that isn't easy to get to from the current landing page.
Avatar
Hi guys, how will this new site affect the actual website api? This change seems kinda breaking for certain services
Avatar
Hey! IDK if I can post it here but the Account upgrades section need a little fix .thmonetize_upgradeHeader__price { z-index: 0; } .thmonetize_upgradeHeader__price:before { z-index: -1; }
👍 1
Avatar
Avatar
substitute
that sure is a lot of members
Smugger | STAG 3/11/2022 3:44 PM
😂 🤦‍♂️
3:45 PM
That would make a great meme for programmers! 😄
😆 1
Avatar
Avatar
AnotherMax
Hi guys, how will this new site affect the actual website api? This change seems kinda breaking for certain services
GSH | MrOwlSky 3/11/2022 3:49 PM
Shoot me a dm on what you need from new system to integrate and I'll get it for you.
Avatar
Avatar
TheMollusk
So what's the story now on new plugin authors uploading resources? When I click the "Add Resource" button it brings me to an Add Resource page, which is farther than I got on the old site but I'm not sure I'm allowed to post. I've had a ticket open here on Discord for a few days where I agreed to a code of conduct and I provided some source code. Wasn't expecting quick action, I know admins are busy, but now the ticket has vanished.
GSH | MrOwlSky 3/11/2022 3:50 PM
Yeah you can upload if you got plugin dev rank. If not create a ticket and the team can get you squared away.
Avatar
Avatar
🐨Dream Doctor🦘
So I guess my first feedback on the new site is that there really needs to be some simple landing page for people looking to download the Ark API and some plugins. For people new to the whole thing, it's a bit bewildering to land on your main page and find their way to download the Ark API. A simple page that explains what the API is, where to download it with simple directions, and where to look for plugins. I know there is https://www.gameservershub.com/forums/resources/ark-server-api.12/, but that isn't easy to get to from the current landing page.
GSH | MrOwlSky 3/11/2022 3:52 PM
Agreed, what did you have in mind, a landing page? Or something more along the lines of a development documentation page?
Avatar
Avatar
GSH | MrOwlSky
Agreed, what did you have in mind, a landing page? Or something more along the lines of a development documentation page?
The original url has the page explaining everything, and then a link to a wiki and a link to your forums
4:16 PM
That’s what makes the most sense in this setup
Avatar
Looking great. I like the direction this will go. I'm happy the support staff will get some type of compensation now, as in my opinion, those guys helping 1000 people with plugin issues and configs is 10x more work than creating the actual plugin lol
lethaltrue 1
👍 1
Avatar
Hello, i want to get into ark plugin making any tips to get into it i have base knowledge of cpp and i want to use clion
Avatar
GSH | MrOwlSky 3/11/2022 9:32 PM
Speaking of configuration files. The website now has a section to support configuration files for upload. Should allow users to share lengthy configuration files and improved JSON formatting overall. Hopefully that'll inspire some new faces to start learning the basic syntax and get further into development side of things.
Avatar
TheOwlSky did you use gamedig for your discord counter bot? Nvm found out you used steam-server-stats (edited)
👍 1
Avatar
GSH | MrOwlSky 3/11/2022 10:35 PM
The open source should be on github for that bot
Avatar
man this new server hurts me feelings lol i cant find the download links i need 😦
Avatar
Avatar
eyecuoy
man this new server hurts me feelings lol i cant find the download links i need 😦
GSH | MrOwlSky 3/12/2022 12:12 AM
If you need help let us know. Everything is still under Resources tab
Avatar
yea i tried looking there and went to the the one i wanted it just sending me back to main page or just gives me the discussing
12:14 AM
Avatar
Avatar
eyecuoy
Click to see attachment 🖼️
GSH | MrOwlSky 3/12/2022 12:14 AM
This is a Cross Ark Chat system with tribe chat and two-way discord. The discord integration is completely optional and requires a self hosted discord bot. This plugin & bot communicate through MySql You will need to set up a Sql server if you...
Avatar
Avatar
GSH | MrOwlSky
Agreed, what did you have in mind, a landing page? Or something more along the lines of a development documentation page?
🐨Dream Doctor🦘 3/12/2022 4:09 AM
Well both.... I think a development docs page would be great, but in my comment I was thinking of a page for users wanting to install and use the API and plugins on their servers.
4:11 AM
I guess I'm also a little worried about directing users from the website to this Discord. I think there is a danger in having this Discord end up as a support resource for end users, rather than a resource and meeting place for developers. I think they are two very different functions, and having users turn up here wanting support from devs will really turn devs off. Right now it's a relatively "safe" space where devs aren't constantly hounded by demanding end users wanting their attention.
Avatar
Avatar
🐨Dream Doctor🦘
Well both.... I think a development docs page would be great, but in my comment I was thinking of a page for users wanting to install and use the API and plugins on their servers.
GSH | MrOwlSky 3/12/2022 4:13 AM
Yeah that's a great idea, We finished the REST API today it's live on site and it's also setup in a staff discord channel. We're gonna have a development docs wiki setup hopefully in the coming weeks that will include the API itself and the other developer tools. It's definitely a feature being planned and slowly worked on right now. I guess I'm also a little worried about directing users from the website to this Discord.
  • Agreed, there will be a separate discord entirely for the rest of the site. API will remain API.
Avatar
Avatar
GSH | MrOwlSky
Yeah that's a great idea, We finished the REST API today it's live on site and it's also setup in a staff discord channel. We're gonna have a development docs wiki setup hopefully in the coming weeks that will include the API itself and the other developer tools. It's definitely a feature being planned and slowly worked on right now. I guess I'm also a little worried about directing users from the website to this Discord.
  • Agreed, there will be a separate discord entirely for the rest of the site. API will remain API.
🐨Dream Doctor🦘 3/12/2022 4:14 AM
What is the REST API exactly?
Avatar
Avatar
🐨Dream Doctor🦘
What is the REST API exactly?
GSH | MrOwlSky 3/12/2022 4:16 AM
Description: Developers or third party services can use this REST API key to display real-time JSON data directly from the website. They can use this JSON data inside their plugins or third party services and convert the JSON data to be read-able. This gives developers more power and control over creating custom content such as custom licensing systems they can use to automatically generate license keys the second someone purchases their resource. It opens up the doors to more creative freedom and control for developers. In a gist you can GRAB | PULL | READ | VALIDATE any site data in real time with your content. Very helpful for plugins/licenses/discord bots and other personal website integrations.
4:17 AM
You can setup systems like automatic license creation. Or have conditional logic in your code to validate if the user actually purchased the plugin and check/validate it.
Avatar
Avatar
GSH | MrOwlSky
Description: Developers or third party services can use this REST API key to display real-time JSON data directly from the website. They can use this JSON data inside their plugins or third party services and convert the JSON data to be read-able. This gives developers more power and control over creating custom content such as custom licensing systems they can use to automatically generate license keys the second someone purchases their resource. It opens up the doors to more creative freedom and control for developers. In a gist you can GRAB | PULL | READ | VALIDATE any site data in real time with your content. Very helpful for plugins/licenses/discord bots and other personal website integrations.
🐨Dream Doctor🦘 3/12/2022 4:19 AM
Sounds great. Is there any documentation for it yet?
Avatar
GSH | MrOwlSky 3/12/2022 4:19 AM
It's written up on discord. Once the staff team debugs and thoroughly test it to make sure no exploits with selected scopes it will be pushed visible on discord channel and built into the wiki section on dev docs on site.
Avatar
GSH | MrOwlSky 3/12/2022 5:40 AM
Classic theme is added back as a option. Dark theme is also added. (edited)
👌 1
Avatar
how is everyone doing this early morning?
Wave 1
Avatar
Are there problems with the page to download the plugins?
Avatar
Avatar
Daymad
Are there problems with the page to download the plugins?
GSH | MrOwlSky 3/12/2022 2:59 PM
Shouldn't be. If you find a plugin that needs updating let us know.
4:32 PM
why I can't download plugins
Avatar
Avatar
Daymad
Click to see attachment 🖼️
GSH | MrOwlSky 3/12/2022 4:43 PM
Send me the plugin your having trouble downloading
Avatar
Avatar
GSH | MrOwlSky
Send me the plugin your having trouble downloading
It happens to me with all the accessories
5:15 PM
If you locate more that don't download let me know and Ill fix them aswell
Avatar
Nice work on the latest #【📩】ᴄʜᴀɴɢᴇʟᴏɢꜱ 👍 that helps a lot
👍 1
Avatar
Avatar
GSH | MrOwlSky
If you locate more that don't download let me know and Ill fix them aswell
🎮 Stevie 3/13/2022 8:46 PM
Hey, I can't download atlas shop plugin from the website. Can you fix it as well? https://ark-server-api.com/forums/resources/atlas-shop-currency-kits.80/
Features: Add any item, dino, beacon or experience points to the shop Points trading system Create custom kits with items and dinos inside Players can receive points for the time spent on server SQLite or MySQL Database Customizable config...
Avatar
GSH | MrOwlSky 3/13/2022 8:48 PM
Let me check it out
030 1
031 1
8:48 PM
Fixed
Avatar
🎮 Stevie 3/13/2022 8:49 PM
Thank you very much 012
Avatar
GSH | MrOwlSky 3/13/2022 8:49 PM
No problem anytime
Avatar
Avatar
GSH | MrOwlSky
No problem anytime
🎮 Stevie 3/14/2022 4:55 AM
Sorry to bother you again, wanted to check with you it says version 1.9 for atlas permissions on the website. But when I download and extract it the plugininfo says is 1.6. Is this v1.9 or 1.6? https://ark-server-api.com/forums/resources/atlas-permissions.79/ (edited)
Default plugin for AtlasApi that allows you to manage group permissions. It's mostly used by other plugins and controls which players have access to certain features. Default groups are 'Admins' and 'Default'. You can't remove those groups but...
Avatar
Avatar
🎮 Stevie
Sorry to bother you again, wanted to check with you it says version 1.9 for atlas permissions on the website. But when I download and extract it the plugininfo says is 1.6. Is this v1.9 or 1.6? https://ark-server-api.com/forums/resources/atlas-permissions.79/ (edited)
GSH | MrOwlSky 3/14/2022 5:05 AM
The last update was 1.6 for it but both ark/atlas are labeled 1.9 to keep a better standardization for file uploads.
👌🏻 1
Avatar
There seems to be some problems with the new URL. Where did the introduction interface of the plugin go?
11:10 AM
11:10 AM
Click here to jump directly to this URL
11:11 AM
@GSH | MrOwlSky
Avatar
We are working on fixing as many links as possible, there is some to go through. thanks for reporting !
Avatar
Aaurizon (Ryan) 3/14/2022 11:31 PM
Does someone know how to get the epicgames ID ?
Avatar
same way as you get the steam id!
Avatar
Aaurizon (Ryan) 3/14/2022 11:39 PM
That return a weird id like that "8630902019737339971" instead of a long id like "147708865711569908251034723374985041324"
Avatar
how did you do it?
Avatar
Aaurizon (Ryan) 3/14/2022 11:42 PM
const uint64 playerId = ArkApi::IApiUtils::GetSteamIdFromController(playerController);
Avatar
Avatar
Aaurizon (Ryan)
That return a weird id like that "8630902019737339971" instead of a long id like "147708865711569908251034723374985041324"
epic id's look like that
11:43 PM
it's correct
Avatar
Avatar
WETBATMAN
it's correct
Aaurizon (Ryan) 3/14/2022 11:44 PM
Really ? But on my epic games account i have a bigger id like that (and i want to give the possibility to the epic games player to connect to my website with them epicgames account with oauth2 to get them stats)
11:45 PM
But the ids, from ark and epic games arn't the sames, a little bit hard to sync the accounts
Avatar
there are multiple epic id fields from what i know, this is the ID that ArkApi fetches for you
11:48 PM
there are 2 structs for id's
11:48 PM
one for epic
11:48 PM
one for steam
Avatar
Aaurizon (Ryan) 3/14/2022 11:48 PM
Oh ok, i will check on the epic games api doc about other ids
Avatar
if you get the access to the whole struct you might be able to read out the ID you're looking at in your screenshot there
Avatar
Aaurizon (Ryan) 3/14/2022 11:48 PM
In the ARKApi ?
Avatar
FUniqueNetIdEOS
11:53 PM
all functions in it are virtual
11:53 PM
this might just return the same ID as ArkApi though 😄
Avatar
Aaurizon (Ryan) 3/14/2022 11:55 PM
Ok thank you, I will look about that, and read the doc if EpicGames provide another id
Avatar
looking for developer for my server
Avatar
🐨Dream Doctor🦘 3/16/2022 3:01 AM
Has anyone done any work with AI and plugins?
Avatar
GeertDeBakker 3/16/2022 1:08 PM
artificial intelligence?
Avatar
Avatar
🐨Dream Doctor🦘
Has anyone done any work with AI and plugins?
funny thought, whatd you have in mind?
Avatar
Avatar
Kal
funny thought, whatd you have in mind?
🐨Dream Doctor🦘 3/17/2022 1:35 AM
Funny thought? All NPCs in Ark use the existing AI functionality in the engine. My question was whether anyone had used that functionality in a plugin.
Avatar
Avatar
🐨Dream Doctor🦘
Funny thought? All NPCs in Ark use the existing AI functionality in the engine. My question was whether anyone had used that functionality in a plugin.
🐨Dream Doctor🦘 3/17/2022 1:35 AM
You have access to the AI func in the dev kit.
Avatar
probably a dumb question to ask but iv been trying to setup plugins on my server its on nitrado how tf do u do it iv seen other ppl with them on there servers how do they do it iv downloaded ark api and lethals orp plugin and used file zilla to install it on my server and it just keeps restarting its kinda pissing me of making me think u cant use nitrado or something and iv tried many other ways to do it any help would be appreciated thanks
Avatar
Avatar
shaggy
probably a dumb question to ask but iv been trying to setup plugins on my server its on nitrado how tf do u do it iv seen other ppl with them on there servers how do they do it iv downloaded ark api and lethals orp plugin and used file zilla to install it on my server and it just keeps restarting its kinda pissing me of making me think u cant use nitrado or something and iv tried many other ways to do it any help would be appreciated thanks
Nitrado doesn't support plugins, nor ark api
Avatar
yeah fuck what does how does the other big server do it
Avatar
Other providers which allow it, or dedicated machines
Avatar
yeah thanks mate thats fucked shit happens
Avatar
Nitrado is to avoid if possible
Avatar
who would u recommend
Avatar
GameServerApp, or ServerBlend
1:45 PM
logic servers as well, etc...
1:45 PM
just not nitrado lol
Avatar
lol thanks saves me pulling my hair out trying to work out y my plugins dont work
Avatar
Those I said either have a 1-click-install system, or allows uploading trough ftp
Avatar
ok thanks ill give one of them ago
1:47 PM
life saver
🤟 1
Avatar
How can you make a simple export function?
Avatar
Does someone has a cracked version of AuthLib since root is banned?
10:54 PM
I need it for extendedAPI
10:54 PM
A non malware version
Avatar
no, we do not distribute cracks or cracked products, anyone doing so will be banned and removed from the discord/forum
👆 2
Avatar
Avatar
Tsjollin
Does someone has a cracked version of AuthLib since root is banned?
You know root has a discord right?
Avatar
Yeah i contacted
2:18 PM
its okay now
👍 1
Avatar
Hey, what is the "best" and most"consistent" way to connect 2 clusters on different machines? Found several methods, but all of em are like meh. Wanted to ask if anyone in here has experience with that. Im currently using GoodSync (edited)
Avatar
Foppa, The update you made on Extended Rcon is the same?
10:22 PM
reupload
10:23 PM
as we had to do with all plugins after we merged 🙂
👍 1
Avatar
Hi i can not find the permission plugin on the website. Can someone help me pls?
Avatar
What's the command to reload plugins without restarting the server?
Avatar
Avatar
Niels
Hey, what is the "best" and most"consistent" way to connect 2 clusters on different machines? Found several methods, but all of em are like meh. Wanted to ask if anyone in here has experience with that. Im currently using GoodSync (edited)
jraServerAPI 3/21/2022 12:53 AM
I've used GoodSync, it works great if you have it setup properly
Avatar
Avatar
jraServerAPI
I've used GoodSync, it works great if you have it setup properly
Kk ty, its working fine for me but wanted to know if there are game breaking alternatives i dont know of haha
Avatar
🐨Dream Doctor🦘 3/21/2022 2:00 AM
I know I said it before, but this Discord being turned into an end-user support forum is going to rapidly alienate developers.
Avatar
Avatar
🐨Dream Doctor🦘
I know I said it before, but this Discord being turned into an end-user support forum is going to rapidly alienate developers.
GSH | MrOwlSky 3/21/2022 2:01 AM
Zero plans to do that. Separate discord for that is already done #【👑】ᴘᴀʀᴛɴᴇʀꜱ
Avatar
Avatar
GSH | MrOwlSky
Zero plans to do that. Separate discord for that is already done #【👑】ᴘᴀʀᴛɴᴇʀꜱ
🐨Dream Doctor🦘 3/21/2022 2:04 AM
Then can we please start referring end users to that Discord instead of supporting them here? No dev wants to wade through all these dozens of messages about why someone can't make Nitrado work to see if there are any dev related messages. Please and thank you Sir :)
Avatar
Avatar
🐨Dream Doctor🦘
Then can we please start referring end users to that Discord instead of supporting them here? No dev wants to wade through all these dozens of messages about why someone can't make Nitrado work to see if there are any dev related messages. Please and thank you Sir :)
GSH | MrOwlSky 3/21/2022 2:04 AM
Who's message are you referring to exactly?
Avatar
🐨Dream Doctor🦘 3/21/2022 2:05 AM
This channel starting at the 17th, for example.
2:05 AM
Today with messages about how to get cross cluster chat working
2:06 AM
The messages asking Foppa about his plugin.
Avatar
GSH | MrOwlSky 3/21/2022 2:07 AM
I'll create a system where only Developer roles can see the channels. Developer role will sync directly to forum rank to lower those chat messages.
2:07 AM
Should prevent any guest from seeing the channels and asking those support related questions
2:07 AM
We'll setup a discord bot to also help automate some replies and redirects and such
Avatar
Avatar
GSH | MrOwlSky
Should prevent any guest from seeing the channels and asking those support related questions
🐨Dream Doctor🦘 3/21/2022 2:08 AM
That sounds awesome. Thank you again.
👍 1
Avatar
Quick question about the merger, I asked in #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ but may have been the wrong place... Did the commission fee for paid plugins change in the transition?
Avatar
Avatar
Haragon
Quick question about the merger, I asked in #【👓】ᴘʟᴜɢɪɴ-ᴛᴏᴘɪᴄꜱ but may have been the wrong place... Did the commission fee for paid plugins change in the transition?
GSH | MrOwlSky 3/21/2022 2:55 AM
The plugin FEE is will be lowered to 5% the old system was 8-10%
2:55 AM
Developers will earn more income instead of losing more income.
Avatar
Avatar
GSH | MrOwlSky
The plugin FEE is will be lowered to 5% the old system was 8-10%
Understood, it said 15% when I was looking at it yesterday and I thought that seemed higher than before. Might have been a typo/placeholder though.
Avatar
GSH | MrOwlSky 3/21/2022 2:56 AM
It won't be 15%
Avatar
Awesome, ty for the info.
👍 1
Avatar
GSH | MrOwlSky 3/21/2022 6:59 AM
Website should now officially be moved to new machine. Still have to apply security updates but the forums are re-opened.
6:59 AM
Should be much faster compared to before
Avatar
any plans that arkapi supports mysql ssl connection, wanna use digital ocean 😦 (edited)
Avatar
Avatar
Niels
Kk ty, its working fine for me but wanted to know if there are game breaking alternatives i dont know of haha
via windows network drive or Syncthing its free and works perfect
Avatar
Avatar
Sly
any plans that arkapi supports mysql ssl connection, wanna use digital ocean 😦 (edited)
this is something that individual developers will have to implement in their plugins
11:52 AM
not in ArkApi
11:52 AM
as far as i know everyone uses the same mysql connector right now in plugins, which doesn't have ssl support
Avatar
Avatar
Sly
via windows network drive or Syncthing its free and works perfect
u using it for bloody too? Or everything on one machine there?
12:19 PM
imma test it but seems to be better. Windows server version of goodsync is only 30d trial YIKES If i didnt miss any free version (edited)
Avatar
any eta when the website maintenance is done? I was just importing the data through the api (which is still operational) 😄 No rush btw, i'll continue my work tomorrow (edited)
Avatar
Avatar
AnotherMax
any eta when the website maintenance is done? I was just importing the data through the api (which is still operational) 😄 No rush btw, i'll continue my work tomorrow (edited)
I believe the migration is completed just some patching left todo.
👍 1
Avatar
Avatar
AnotherMax
any eta when the website maintenance is done? I was just importing the data through the api (which is still operational) 😄 No rush btw, i'll continue my work tomorrow (edited)
GSH | MrOwlSky 3/21/2022 5:56 PM
Yeah everything is good. The #【📢】ᴀɴɴᴏᴜɴᴄᴇᴍᴇɴᴛꜱ from last night was just to upgrade machine hardware. REST API and everything else is stable. Outside of minor bug fixes here and there everything is working smoothly.
5:57 PM
You should notice a huge difference in the website load speed and performance today compared to the old machine.
Avatar
yeah no worries. I just wanted to check some of my data against the website. I noticed some plugins had no files etc. So wanted to double check whether this was due to versioning conventions being wrong or something else
Avatar
GSH | MrOwlSky 3/21/2022 5:59 PM
All good, yeah some of the developers need to update their plugin files. I think kal/haragon files are outdated.
Avatar
yeah i was gonna check those out, so i guess the data was fetched alright. thanks for the confirmation! (edited)
👍 1
Avatar
Avatar
GSH | MrOwlSky
All good, yeah some of the developers need to update their plugin files. I think kal/haragon files are outdated.
WoolyPenguin 3/22/2022 12:22 AM
impossible to upload atm^^
12:22 AM
sent you description of issue 🙂
Avatar
Avatar
WoolyPenguin
sent you description of issue 🙂
GSH | MrOwlSky 3/22/2022 1:04 AM
Should be fixed now
Avatar
i noticed that the new site doesnt appear to have the Ark Permissions plugin listed anymore. Was the name changed to something else or is it removed?
Avatar
Avatar
AnotherMax
i noticed that the new site doesnt appear to have the Ark Permissions plugin listed anymore. Was the name changed to something else or is it removed?
Avatar
i was trying to verify, but it seems to be in maintenance mode still
12:04 PM
nvm, i see the maintenance mode is only active on the promo
Avatar
it took me a while. But i now understand that it's listed under a different category. Thats why it wasnt showing up in my data 🙂
12:41 PM
is there any way I can determine automatically that Ark Permissions is a plugin and ARK: Server API is the framework? Since they're both in the same category. Maybe by some sort of tag you can add. So i know which items to ignore. (same goes for ATLAS) (edited)
12:42 PM
otherwise ARK: Server API is gonna show up as a downloadable plugin
Avatar
Avatar
AnotherMax
otherwise ARK: Server API is gonna show up as a downloadable plugin
Do you have the option to just filter that single entry from your data?
Avatar
i'd prefer a less janky solution if possible
12:47 PM
previously the Ark Permissions plugin was listed under the free category. So that worked fine
Avatar
Janky is all I can offer this morning 🙂
Avatar
alright, i'll have the system ignore that category for now 👍
Avatar
Avatar
AnotherMax
alright, i'll have the system ignore that category for now 👍
Foppa or OG | TheOwlSky would be needed for anything beyond my suggestion since I can't change anything on the website.
Avatar
no worries, i'll wait for either of them to come online. Appreciate your help!
Avatar
Avatar
AnotherMax
is there any way I can determine automatically that Ark Permissions is a plugin and ARK: Server API is the framework? Since they're both in the same category. Maybe by some sort of tag you can add. So i know which items to ignore. (same goes for ATLAS) (edited)
GSH | MrOwlSky 3/22/2022 5:14 PM
Done. They now have a prefix tag called Framework you can filter this via your end.
cheers 1
Avatar
@substitute im gonna reply here to keep #【👏】ꜱᴜɢɢᴇꜱᴛɪᴏɴꜱ clean. I agree that in theory it should be easy to fix. As long as everyone does it. And besides willingness, we're also human so mistakes will be made
Avatar
GSH | MrOwlSky 3/22/2022 5:20 PM
Plan on adding that feature soon.
👍 1
Avatar
for my info, is the migration to a bigger machine done? In #【📩】ᴄʜᴀɴɢᴇʟᴏɢꜱ i read its done but the forum shows an alert still. I'm migrating thursday so i hope there is no maintenance planned for that day
Avatar
GSH | MrOwlSky 3/22/2022 5:51 PM
It's already done. The alert just needs updating.
👍 1
Avatar
okay what happened to all my help pages? I'm a server owner who has relied heavily on the ARK Shop command page and the Extended RCON pages? Why are they gone? Or can someone direct me to where they are - that first page I go to now is jibberish to me.
Avatar
Wow this project is growing up fast 🥰
Avatar
Avatar
Malgor
okay what happened to all my help pages? I'm a server owner who has relied heavily on the ARK Shop command page and the Extended RCON pages? Why are they gone? Or can someone direct me to where they are - that first page I go to now is jibberish to me.
GSH | MrOwlSky 3/22/2022 9:33 PM
The commands are still located on the resources page. Please #deleted-channel if you are having issues.
Avatar
Avatar
Malgor
okay what happened to all my help pages? I'm a server owner who has relied heavily on the ARK Shop command page and the Extended RCON pages? Why are they gone? Or can someone direct me to where they are - that first page I go to now is jibberish to me.
If you had bookmarks to the old domain the resource id's changed you just need to navigate to the new pages then bookmark them again.
Avatar
i need help doing this
12:47 AM
ark api
Avatar
jraServerAPI 3/23/2022 1:00 AM
I would goto #deleted-channel and select the Begginner role (#1) and ask your questions there. And supply a lot more detail, other than "you just need help" (edited)
Avatar
This discord is for Developer support not Server support.
Avatar
Any eta when the website will start working? 90% of the plugin links are broken and bring you straight to API download page. You can't even view commands by clicking on "Read more about this resource..."
Avatar
Avatar
Ronnie
Any eta when the website will start working? 90% of the plugin links are broken and bring you straight to API download page. You can't even view commands by clicking on "Read more about this resource..."
Old links are not yet redirected to new links, and about pages, which ones are not working?
Avatar
every single one of foppas
5:04 PM
5:04 PM
all of yours
5:05 PM
All of lethals
Avatar
Yeah, those are old links not yet redirected properly, I believe they are looking into it
Avatar
I havent clicked on 100% of them, but the ones I have they are broken and bring you to api download
5:05 PM
I havent found any that work to be honest
Avatar
This is a @GSH | MrOwlSky thing I guess
Avatar
Avatar
Ronnie
I havent found any that work to be honest
GSH | MrOwlSky 3/23/2022 5:13 PM
You able to #deleted-channel for us to review?
Avatar
I thought I had fixed all the links for my plugins 😦
5:42 PM
Links in my forum signature are correct at least.
Avatar
I am not able to buy anything from you atm from the website
5:42 PM
Avatar
Only through my discord ATM because I can't automate licenses on the new website.
Avatar
Ah ok
Avatar
Also I updated to allow multiple licenses on a single purchase.
Avatar
oh really? nice
lethaltrue 1
Avatar
WoolyPenguin 3/23/2022 7:42 PM
you just became russian @Ronnie
7:43 PM
they've had this problem for a long time^^
7:46 PM
but you should check ur paypal, cause for them the payment often went through, even tho site had error
7:46 PM
making some buy 2-3 copies before they realized.
Avatar
Any idea why Defaults discord crap is popping up on my resource?
Avatar
He's paid for advertising
Avatar
WoolyPenguin 3/24/2022 7:49 AM
that ad was placed a little bit right into the info box for kal's stuff tho
7:49 AM
it should've been a little more standing out from the rest in some way, imo
Avatar
bit weird it says "Plugin" while it should be the paid tag.
Avatar
BearGryllsTV 3/24/2022 5:04 PM
Where has FAQ's gone I cant find it
5:04 PM
I always forget the command to unload a plugin :/
5:04 PM
so just goto that page
Avatar
plugins.unload PluginName
Avatar
Avatar
Pelayori
plugins.unload PluginName
BearGryllsTV 3/24/2022 5:05 PM
thank you ❤️
Avatar
I recall seeing the faq, one sec
Avatar
Avatar
Pelayori
I recall seeing the faq, one sec
BearGryllsTV 3/24/2022 5:13 PM
where did you find the link for that?
Avatar
BearGryllsTV 3/24/2022 5:14 PM
dam thats a mission to find I hope they add it back to the nav
5:14 PM
or even in the footer
Avatar
Could be pinned as well
5:20 PM
@BearGryllsTV add it as a suggestion in #【👏】ꜱᴜɢɢᴇꜱᴛɪᴏɴꜱ
Avatar
Avatar
WoolyPenguin
it should've been a little more standing out from the rest in some way, imo
have to agree, seemed like part of my plugin
Avatar
Avatar
BearGryllsTV
I always forget the command to unload a plugin :/
Your not the only one 😄
Avatar
Hello, does anyone know if plugins can be inserted into a gporta server?
Avatar
jraServerAPI 3/27/2022 10:45 PM
search the group on gportal
10:46 PM
👍
Avatar
Aaurizon (Ryan) 3/31/2022 7:34 AM
Hello guys, does your clamp config work ? Mines sound doesn't working... I can level up dinos over 500, and craft weapons over 300% damgaes... I want to limit the stats like official servers, but idk why isn't working ClampItemStats=true DestroyTamesOverLevelClamp=450 ItemStatClamps[1]=19800 ItemStatClamps[3]=19800
Avatar
Does anyone know any plugin that does the same utility as this mod?
Avatar
Avatar
FERGOK
Does anyone know any plugin that does the same utility as this mod?
plugins cannot display graphics on screen 🙂
Avatar
and something that has a similar utility to give information to the players?
Avatar
Avatar
FERGOK
and something that has a similar utility to give information to the players?
Aaurizon (Ryan) 3/31/2022 10:46 AM
You can display text on the screen of the players
Avatar
Avatar
Aaurizon (Ryan)
Hello guys, does your clamp config work ? Mines sound doesn't working... I can level up dinos over 500, and craft weapons over 300% damgaes... I want to limit the stats like official servers, but idk why isn't working ClampItemStats=true DestroyTamesOverLevelClamp=450 ItemStatClamps[1]=19800 ItemStatClamps[3]=19800
Aaurizon (Ryan) 3/31/2022 10:47 AM
ItemStatClamps Work only if you have 1 pts or more in crafting skill, if you have 0 pts, you can craft over the cap... DestroyTamesOverLevelClamp I think that doesn't work anymore and official servers have hard coded level cap of dinos, will try to do same with plugins
Avatar
Avatar
Aaurizon (Ryan)
Hello guys, does your clamp config work ? Mines sound doesn't working... I can level up dinos over 500, and craft weapons over 300% damgaes... I want to limit the stats like official servers, but idk why isn't working ClampItemStats=true DestroyTamesOverLevelClamp=450 ItemStatClamps[1]=19800 ItemStatClamps[3]=19800
you need to add the ClampItemStats to command line
Avatar
Avatar
Uaca
you need to add the ClampItemStats to command line
Aaurizon (Ryan) 3/31/2022 5:00 PM
I put it in the command line, sorry if my message was not specific enough After various tests, it's bugged when the player has 0 points in crafting skill, that work only if he have 1 or more pts
Avatar
so, there is a blueprint over the cap?
Avatar
Aaurizon (Ryan) 3/31/2022 5:02 PM
From beacon, idk, but if i spawn an item with high quality, that can spawn me a blueprint over the cap
5:02 PM
The blueprint will get capped after the server reboot
Avatar
The item stat clamp and dino level clamp have never completely prevented you from spawning in (or obtaining through normal gameplay) higher quality items and higher level dinos. It applies on server restart and when you transfer things. There are cases where it affects item generation, but the patch notes are always vague when they make changes related to those clamps. I wish it was documented better.
Avatar
Avatar
WETBATMAN
plugins cannot display graphics on screen 🙂
Only partially true
6:10 PM
You could theoretically write a UI framework as a mod and allow plugins to utilize it
💯 1
Avatar
Avatar
substitute
You could theoretically write a UI framework as a mod and allow plugins to utilize it
i wish i knew more about c++ so i can remove the json i am using 😦
Avatar
jraServerAPI 3/31/2022 8:49 PM
C++ programming reference for users of Microsoft C++ and Visual Studio.
Avatar
Avatar
TheMollusk
The item stat clamp and dino level clamp have never completely prevented you from spawning in (or obtaining through normal gameplay) higher quality items and higher level dinos. It applies on server restart and when you transfer things. There are cases where it affects item generation, but the patch notes are always vague when they make changes related to those clamps. I wish it was documented better.
Aaurizon (Ryan) 4/1/2022 4:36 AM
Yeah I know, but i was talking about crafting, you can't craft over the cap if you have more than 0 pts in crafting skill, but if you have 0 points you can exceed the cap (it's a bug) And the DestroyTamesOverLevelClamp doesn't work anymore since they have hard cap the dinos level on official servers
Avatar
TheMollusk 4/1/2022 4:52 AM
Yeah maybe I'm misunderstanding. DestroyTamesOverLevelClamp still works as expected for me. If you have tames over the clamp they get destroyed on restart. WC also improved it over the years so that you can't manually level your tames past the clamp or release dinos from cryos if they're above the clamp. I thought that was the behavior on official now, but I don't play much official anymore. Similar to item stats, it's still incomplete/buggy/whatever you want it call it.
Avatar
Avatar
TheMollusk
Yeah maybe I'm misunderstanding. DestroyTamesOverLevelClamp still works as expected for me. If you have tames over the clamp they get destroyed on restart. WC also improved it over the years so that you can't manually level your tames past the clamp or release dinos from cryos if they're above the clamp. I thought that was the behavior on official now, but I don't play much official anymore. Similar to item stats, it's still incomplete/buggy/whatever you want it call it.
Aaurizon (Ryan) 4/1/2022 5:47 AM
Yes it's like that on officials For me that doesn't work... I have put the "DestroyTamesOverLevelClamp=450" in Game.ini and after 10 restarts dinos still there, and i can level up over the clamp You have some specifics configs ? Like something to disable cache or idk ?
Avatar
This is not a general ARK support discord it is for ARK plugin development. (edited)
6:38 PM
Posting this in every discord will not get you an answer any faster as the same people are seeing it in multiple discords.
6:39 PM
If you don't get help in the Game Server Owners Discord you probably will not get an answer anywhere else.
Avatar
Where is the option to update paypal so that my plugins work again?
Avatar
Avatar
Haragon
Where is the option to update paypal so that my plugins work again?
GSH | MrOwlSky 4/3/2022 5:24 PM
Avatar
Found it, I was looking at my profile. TY
👍 1
Avatar
Hey 😊 , Don't know if you aware of it, but everytime I am searching on Google for some specific Plugin and click on the result, its ALWAYS leading me to the ARK Server API page instead of the one I wanted. (edited)
Avatar
Avatar
Neryos
Hey 😊 , Don't know if you aware of it, but everytime I am searching on Google for some specific Plugin and click on the result, its ALWAYS leading me to the ARK Server API page instead of the one I wanted. (edited)
Correct google uses the old url. (ArkserverApi.com)
pLol 1
Avatar
Hey, someone know how to fix that? this message on the console 04/05/22 22:52 [Permission][error] (d:\programs\ark\plugins\permissions\permissions\private\hooks.cpp Permissions::Hooks::Hook_AShooterGameMode_HandleNewPlayer) Couldn't add player
9:55 PM
hmmmm I see someone said to update, lets try that
Avatar
Hello I'm ashamed, but I'm here to ask a question. list of engrams on the server Set as optional engrams. After setting the optional engram There are several mod engrams in the engram list. Some of these mod engrams are It doesn't show up on the server. Has anyone experienced this problem? (edited)
8:02 PM
8:02 PM
8:02 PM
ARKOMATIC VAULT where did this go ?
8:03 PM
I need help..🥲
Avatar
Avatar
참치
ARKOMATIC VAULT where did this go ?
GSH | MrOwlSky 4/7/2022 8:35 PM
I would suggest checking the Game.INI file directly to see if the configuration edit is successfully added into the configuration file. In addition to that you should go to the steam workshop mod page for that mod and ensure that's the correct engram_bp_path otherwise it won't work. I personally would highly suggest using https://usebeacon.app/ over ASM as beacon has more support and handles the configuration editing much easier then ASM.
Beacon is Ark's easiest server manager that can update and control your Xbox, PS4, and PC Ark servers with a couple clicks.
Avatar
@GSH | MrOwlSky I'm sorry I didn't understand that go to that site ABOUT ARKOMATIC VAULT OverrideNamedEngramEntries= Can I get the code?
Avatar
Avatar
WETBATMAN
cache it
Hello WETBATMAN, I was trying to set this up and I don't know if I'm getting the shooter PC properly in this function (called at server init) : void Startup_LoadActorsHWID() { FString bpPath = "Blueprint'/Game/Mods/HWIDBans/Actor_BP_HWIDBans.Actor_BP_HWIDBans'"; UClass* actorBpHWID = MyBPLoadClass(&bpPath); if (actorBpHWID != nullptr) { TArray<AActor*> foundActorsHWID; UGameplayStatics::GetAllActorsOfClass(ArkApi::GetApiUtils().GetWorld(), actorBpHWID, &foundActorsHWID); int nbActorsFound = foundActorsHWID.Num(); if (nbActorsFound > 0) for (int i = 0; i < nbActorsFound; i++) { AActor* actorHWID = foundActorsHWID[i]; // Is this how to get the AShooterPlayerController* for this actor? AShooterPlayerController* shooterPC = static_cast<AShooterPlayerController*>(actorHWID->GetOwnerController()); CacheActorHWIDForPlayer(shooterPC, actorHWID); } } } (edited)
7:49 PM
PS: See the commented line in the middle x)
Avatar
the actor won't have any owner on server init 😄
👌 1
11:59 PM
you have to call the BP function on player connect to get their info
Avatar
ahhh
Avatar
Avatar
WETBATMAN
the actor won't have any owner on server init 😄
so there is only one HWID AActor?
Avatar
Avatar
WETBATMAN
you have to call the BP function on player connect to get their info
Yes I had that I think ^^ But I thought there was one HWID AActor per player, and that I had to call the BP function on each of these HWID actors. (edited)
9:00 AM
But now with what you say I think there's only one HWID AActor and I have to call its BP function for each players. (edited)
9:01 AM
In other words, all the GetterComponent mods (from clients) are sending their data to the same HWID AActor (from server)? 🤔 Correct me if I'm wrong please. (I'm still in the writing process but I'll go to test phase soon) (edited)
Avatar
Avatar
OSubMarin
But now with what you say I think there's only one HWID AActor and I have to call its BP function for each players. (edited)
correct
👌 1
Avatar
Hello, I have a small question regarding the gameserverhub.com website. I registered a few days ago, but I haven't received a confirmation email even after repeated attempts if someone works with the website. Would be grateful to be unlocked on the site.
Avatar
Only a couple people have access to that you will need to wait for a response from one of them.
Avatar
Avatar
Acrysis
Hello, I have a small question regarding the gameserverhub.com website. I registered a few days ago, but I haven't received a confirmation email even after repeated attempts if someone works with the website. Would be grateful to be unlocked on the site.
Best would be to open a ticket & state your username there. #deleted-channel
Avatar
They have a ticket open already. Asking in multiple places won't make it go any faster.
Avatar
Ah lol
Avatar
Is there any function to force players to recreate characters?
Avatar
since it's not even in the base game mechanics that will require some deep investigation 😄 only the players can do that normally (edited)
11:21 PM
I think this call/event is supposed to come from the client for that (probably with all the character properties like height, eye color, skin color...)
11:21 PM
but who knows..
Avatar
There are a couple functions that I could see on IDA, I believe some of them are meant to be called server side
Avatar
yes I was thinking of calling such functions and erase the profile by force ^^ (edited)
11:22 PM
but then client might not appreciate
11:22 PM
since action is supposed to come from him
11:23 PM
maybe it is smart enough to adapt tho
11:23 PM
I have no idea
Avatar
I am fairly sure some of them are meant to fully work from server, overriding the current character (edited)
Avatar
interesting 🙂
11:28 PM
I don't see a particular usage with the base game for that but why not
11:29 PM
maybe some gen 2 missions or noglin needs that, or spectating mode (edited)
11:29 PM
or maybe cross references in IDA gives nothing haha (old testing code) (edited)
Avatar
When someone buys a plugin from the site, it does not show as bought and does not enable the download button. Do I have to do anything to allow the buyers to download from the site?
Avatar
Check here https://ark-server-api.com/forums/resources/market-place-dashboard/view-sales
10:04 PM
@Uaca
Avatar
it list as Unpaid, but on paypal it is
10:11 PM
do i have to set it as paid on the website??
Avatar
Avatar
Uaca
do i have to set it as paid on the website??
GSH | MrOwlSky 4/14/2022 10:19 PM
You do not please #deleted-channel if you need help with site functions.
👍 1
Avatar
🐨Dream Doctor🦘 4/17/2022 10:35 AM
Not API specific, but does anyone happen to know how to disable the error dialog box when a server crashes? (edited)
Avatar
Add the following to your server command line -useautoreporter I think this will do that.
Avatar
Hey @𝓐𝓭𝓻𝓲𝓪𝓷𝓖𝓪𝓶𝓲𝓷𝓰, about your Family Share plugin, it's basically not working since WC added the ini option? I tried both Disable/Enable the AllowSharedConnections option but its like the plugin not exist anymore. AllowSharedConnections = True - Every shared player can join no matter what I set in the plugin config. AllowSharedConnections = False - Every shared player can't join no matter what I set in the plugin config. I want the plugin cus its know to whitelist between me as admin and the other players.
Avatar
I thought family share was allowed through steam?
Avatar
yup but I want to disallow it so ppl I ban can't access from family sharing.
4:21 PM
and I want my brother could play from my family sharing.
9:54 PM
download no longer works
Avatar
I am having some issues with plugins connecting to MySQL. The MySQL is running in legacy mode and I can connect to it with the credentials I added in the config files. But I am just getting a Failed to open connection!. Tried with two different MySQL Servers now. (MySQL 8.0.28). I setup that server pretty fresh, so I am not sure if it's a problem with MySQL 8.0 or if there is any C++ Redistributable or something missing. Anyone got a idea where I can check what's not working anymore? Even tried to dump the error_code or error_message from the daotk::mysql lib. code is 0, message is empty
12:48 PM
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -uark -park ark mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5898 Server version: 8.0.28 MySQL Community Server - GPL Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show tables; +-----------------------+ | Tables_in_ark | +-----------------------+ | xxxxxxxxx | | xxxxxxxxxxx | | xxxxxxxxx | +-----------------------+ 3 rows in set (0.01 sec) can connect via mysql command line
12:51 PM
Hm, ok, tried yet another mysql server, that works, strange
12:56 PM
ok, installed another mysql 5.7 on that machine, that works. so I will just use that as development machine. Sorry ;_;
Avatar
anyone know where the documentation / tutorials are to make mods/plugins with the ark server api?
6:54 AM
feeling incredibly dumb that i cant even find this on google
Avatar
Avatar
Lethal
Click to see attachment 🖼️
MySQL pre 8.0.29 is a bad idea you should update mysql because there are 11 pre auth remote exploits (8.0.28 -> 8.0.29). Best idea with less problems: MariaDB
Avatar
If the mysql server is not exposed to outside connections doesn't matter.
Avatar
Pod cooldown due to pvp settings You need a plugin that can remove this buy with paypal Please contact Discord: Tunaman#0695
Avatar
This may be a really dumb question but our server constantly suffers from buffer overflow, we are debating moving to a Windows machine so we can get ark API , are there plugins that fixes this?
Avatar
jraServerAPI 4/29/2022 12:40 AM
yes
Avatar
What is the best way to pass lots of information, say like item lists from a database to a mod?
Avatar
Has anyone here gotten "Frozen by ID: ..." messages in their server consoles? Do you guys know what that means?
Avatar
1 question what can you do in plugins that you cant do in mods ciz i really want to run my server on linux
Avatar
Avatar
Mr. Alpaca
1 question what can you do in plugins that you cant do in mods ciz i really want to run my server on linux
GSH | MrOwlSky 5/13/2022 10:56 PM
Plugins are server sided. Mods require client side to download.
  • Plugins can offer faster load in times compared to mods.
  • Plugins let the server boot online quicker compared to mods.
Both mods and plugins have their own pros and cons.
10:57 PM
The key is to find a balance for both mods and plugins to work together
Avatar
oh ok
11:12 PM
i really like plugins but i want to run my server on linux so i think i need to forget about it
Avatar
Baalcast (Piotrek) 5/15/2022 3:39 PM
hellow guys
3:40 PM
i have a problem with api plugin in nitrado servers, they loop when i update the plugin files why ?
Avatar
I'm not sure nitrado supports plugins yet.
Avatar
Baalcast (Piotrek) 5/15/2022 5:08 PM
No, unfortunately it does not
5:08 PM
According to them, your files are dangerous
5:09 PM
Nitrado : " Hello! Sadly Ark Server API has serious security vulnerabilities. As the plugins are 3rd party and not required to be open source, and the Ark Server API does not restrict their access to critical files, the only way we would be able to add the Ark Server API is if: 1. The plugins were open source and vetted manually before they could be used on the Ark Server API platform 2. Ark Server API restricted access to critical files."
5:10 PM
And the second one : "Slightly longer answer: We don't allow it because of security implications. This is in regards to plugins and that they're closed source (so we don't know what code they're running), they're from potentially unreputable sources, and ArkAPI doesn't limit what they can do last we spoke to the developer of ArkAPI, so theoretically you could access other files of the machines that your server is running on, outside of what we normally allow (i.e. your server saves/configs etc)."
5:11 PM
Any chance that you would update these files to be compatible with the nitrado file?
Avatar
Avatar
Baalcast (Piotrek)
And the second one : "Slightly longer answer: We don't allow it because of security implications. This is in regards to plugins and that they're closed source (so we don't know what code they're running), they're from potentially unreputable sources, and ArkAPI doesn't limit what they can do last we spoke to the developer of ArkAPI, so theoretically you could access other files of the machines that your server is running on, outside of what we normally allow (i.e. your server saves/configs etc)."
GSH | MrOwlSky 5/15/2022 5:53 PM
I've been attempting to reach and booker a deal between Nitrado, I have not heard back from partnership manager on their terms. G-Portal on the other hand has been more willing to work with ArkServerAPI and potentially add integration into their web panel. I'm in the middle of getting a new partnership worked out with G-Portal to help support the ArkServerAPI community. The issue with Nitrado is they have a contract with Wildcard studios directly for their console release so they have fears and concerns about allowing .dll files on their machines as if any of the hidden console files were taken from a machine it could result in legal action between Nitrado and Wildcard studios. They know it's something that would benefit their customers but it comes at a risk of not knowing how safe plugin files are. I have plans down the road to establish built in virus protection scanning and more safe guards into the resource downloads to ensure user safety is priority. I personally would suggest avoid them entirely and getting a dedicated machine or use a service like GameServerApp that has better reputation and supports ArkServerAPI integration directly.
Avatar
Avatar
GSH | MrOwlSky
I've been attempting to reach and booker a deal between Nitrado, I have not heard back from partnership manager on their terms. G-Portal on the other hand has been more willing to work with ArkServerAPI and potentially add integration into their web panel. I'm in the middle of getting a new partnership worked out with G-Portal to help support the ArkServerAPI community. The issue with Nitrado is they have a contract with Wildcard studios directly for their console release so they have fears and concerns about allowing .dll files on their machines as if any of the hidden console files were taken from a machine it could result in legal action between Nitrado and Wildcard studios. They know it's something that would benefit their customers but it comes at a risk of not knowing how safe plugin files are. I have plans down the road to establish built in virus protection scanning and more safe guards into the resource downloads to ensure user safety is priority. I personally would suggest avoid them entirely and getting a dedicated machine or use a service like GameServerApp that has better reputation and supports ArkServerAPI integration directly.
There’s nothing to stop malicious plugins
1:41 AM
As anyone can make their own plugin
1:41 AM
Honestly Nitrado should segregate the pc servers
1:41 AM
That’s their best bet for security
GOGCHECK 1
Avatar
would be cool to see server providers build some of the open source plugins and support those
2:17 AM
probably too much effort for them for a limited number of plugins
2:17 AM
so many reasons to just get an unmanaged dedicated server and set up your own environment
Avatar
Avatar
substitute
There’s nothing to stop malicious plugins
GSH | MrOwlSky 5/16/2022 2:58 AM
Agreed, you can never 100% stop an outside attack. There are security measures we can add on the site itself to scan plugins and have stricter upload requirements to help reduce the chances of an outside attack. At some point in near future that will be added to the sites security.
Avatar
Avatar
GSH | MrOwlSky
Agreed, you can never 100% stop an outside attack. There are security measures we can add on the site itself to scan plugins and have stricter upload requirements to help reduce the chances of an outside attack. At some point in near future that will be added to the sites security.
I meant that a malicious user could make and upload their own plugin
5:35 AM
For their own server
Avatar
hi guys regarding that command
1:53 PM
Permissions.AddTimed <SteamID> <Group> <Hours> <DelayHours> - Adds player to a existing group time based.
1:53 PM
what's the DelayHours ?
Avatar
Probably how long to wait before assigning the permissions
Avatar
hello mysql:TryAddNewPlayer DB ERROR Mysql server has gone away and mysql:IsPlayerExists DB ERROR Mysql server has gone away , when the server has been on for 1 hour
6:27 AM
when it is freshly turned on it does not give faults
Avatar
Hi everyone! I'm new in this world of API and Plugins. I would like to know if someone can help me, if possible speak Spanish, I have very basic questions that I need to solve.
Avatar
@Pelayori
Avatar
Good afternoon. Can you tell me where to see the commands for the discord? To slip the tribe, etc.
Avatar
Avatar
Zarlorg
Good afternoon. Can you tell me where to see the commands for the discord? To slip the tribe, etc.
GSH | MrOwlSky 5/30/2022 10:25 PM
The discord server doesn't really have any commands at the moment outside of moderation commands
Avatar
@GSH | MrOwlSky Previously, you could link commands to see a tribe message in a discord chat or just a "kickme" command, how to use them now?
Avatar
GSH | MrOwlSky 5/30/2022 10:33 PM
I assume your asking about a plugin that has discord commands. You would need to contact the developer directly in relation to their plugins. This discord server doesn't offer any in-game tribe commands this discord server is for developers learning the API framework.
Avatar
@GSH | MrOwlSky It is clear that I made a mistake with discord. Thank you for your time. Have a nice evening.
👍 1
Avatar
spielerratte 6/2/2022 11:03 AM
Hey guys, i get an error after Restart, all Plugins loeaded but there are 2 Erros with No Message received Anyone knows where they came from or where i can look to?
Avatar
Lucas Santana 6/5/2022 8:23 PM
what to put here?
Avatar
Avatar
Lucas Santana
what to put here?
GSH | MrOwlSky 6/5/2022 9:38 PM
Depending on the developer you put a license key there. You'd need to contact that developer directly as this discord isn't for plugin support.
Avatar
hello, good afternoon, I'm a bit new to this ark thing and the truth is I created a server but I have one thing that doesn't work for me in the chat I only get local chat I can't send global messages or messages to the tribe could someone help me so that people can send global messages and their tribes
Avatar
Has anyone had a problem with the API on the new map?
☝️ 1
Avatar
yeah
8:53 PM
crashing
8:53 PM
on start, with Hook_AGameMode_StartPlay errors
Avatar
Avatar
Gunnsen
on start, with Hook_AGameMode_StartPlay errors
do you have a problem, leave it like this?
8:56 PM
Yeah, a little problem as Fjordur is crashing on start due to those errors ^^
Avatar
Copying the error message in its' entirety and providing it the developer who made the plugin will give them the best chance at fixing it. (edited)
Avatar
it is different plugins in the same crash stack but you are right
9:19 PM
Avatar
Avatar
DEX
Has anyone had a problem with the API on the new map?
jraServerAPI 6/12/2022 10:40 PM
I am not having any issues yet
Avatar
Avatar
Gunnsen
Click to see attachment 🖼️
sorry, my bad, we found the problem, it was due to a corruption in our update. after reinstalling the server everything works fine
Avatar
Avatar
DEX
Has anyone had a problem with the API on the new map?
not giving us a known issue yet but all 24 maps have this line when loading up
Avatar
Avatar
Jumper
not giving us a known issue yet but all 24 maps have this line when loading up
The on impact event for netgun seems to be removed, that's why there's that error
Avatar
I try to select an online player and get a steamid random but I crash c++ const auto iter = std::find_if(online_players_.begin(), online_players_.end(), [steamid](const std::shared_ptr<OnlinePlayersData>& data) -> bool { return data->steam_id == steamid; });
Avatar
i cant open a ticket
10:55 AM
I get an error message on every server: [API][error] Failed to create hook for APrimalProjectileNetGun.OnImpact How can I fix this? (edited)
Avatar
Avatar
Pelayori
The on impact event for netgun seems to be removed, that's why there's that error
cheers pel, be an update shortly to fix this? not that its a huge problem if its been removed
Avatar
Avatar
Zerb3rus
I get an error message on every server: [API][error] Failed to create hook for APrimalProjectileNetGun.OnImpact How can I fix this? (edited)
11:16 AM
TLDR: dont worry about it
Avatar
ok thank you 👍
👌 1
Avatar
Avatar
Jumper
cheers pel, be an update shortly to fix this? not that its a huge problem if its been removed
Not an API issue
2:02 PM
Is a per plugin issue
Avatar
Avatar
Pelayori
Is a per plugin issue
oh.. any ideas what one off hand?
Avatar
Any plugin which outputs the hook error needs updating
Avatar
Avatar
Pelayori
Any plugin which outputs the hook error needs updating
could be a fair list of plugins. will compare to PVE and update as needed, cheers
Avatar
@GSH | MrOwlSky please elaborate on this
6:24 AM
6:25 AM
Are you stating you intend to go closed source for ark2?
Avatar
Avatar
substitute
@GSH | MrOwlSky please elaborate on this
GSH | MrOwlSky 6/22/2022 6:31 AM
Not sure how that rumor keeps getting spread lol. Absolutely not, the first sentence itself states that Ark 2 framework will be open sourced when it drops live.
6:31 AM
There's zero plans to take any framework closed source now or in the future.
Avatar
Avatar
GSH | MrOwlSky
Not sure how that rumor keeps getting spread lol. Absolutely not, the first sentence itself states that Ark 2 framework will be open sourced when it drops live.
The phrasing is poor, to “drop” something usually means to stop supporting it
6:35 AM
You can easily change the remote origins of an existing git repo
6:35 AM
Which would also bring the entire git history over
Avatar
Avatar
substitute
Which would also bring the entire git history over
GSH | MrOwlSky 6/22/2022 6:38 AM
Ticket bot is live atm go ahead and create one if you don't mind and post that bug report inside it so we can review.
Avatar
Provide would be a better verb
6:48 AM
🤭
Avatar
What's the motivation for moving from MIT to Apache license? Seems like the original copyright notices haven't made it to the new repo?
Avatar
Avatar
TheMollusk
What's the motivation for moving from MIT to Apache license? Seems like the original copyright notices haven't made it to the new repo?
GSH | MrOwlSky 6/22/2022 3:31 PM
Good find, the license itself didn't change that would be a bug similar to what substitute located with some things needing to be updated. I plan on updating the Repo today to fix it ran out time last night. (edited)
Avatar
Rogue Leader 6/23/2022 3:19 PM
@GSH | MrOwlSky, @Foppa Is there information available on the revenue generated from ad sales, memberships, donations, and the costs of hosting the server hub site and staff compensation? (edited)
3:20 PM
I know you've mentioned wanting to be transparent, and you already know my feelings on monetization. I feel like if that information was publicly shared and accurate, it would alleviate some of the feelings people like me may have on Game Server Hub feeling like a money grab.
3:21 PM
For the record, I am 100% for generating revenue to keep the site running and to pay staff relative to their contributions. (edited)
Avatar
Avatar
Rogue Leader
@GSH | MrOwlSky, @Foppa Is there information available on the revenue generated from ad sales, memberships, donations, and the costs of hosting the server hub site and staff compensation? (edited)
GSH | MrOwlSky 6/23/2022 4:36 PM
Good morning, yeah that's a great question. I dont have any issues setting up a discord channel or something to make it more transparent. In a nutshell the site isnt generating profits at all, I'm paying out of pocket for everything. I'll see if we can get a channel setup today or some data spread spreadsheet sheet for that.
👍 1
4:37 PM
I do agree with making it public and transparent 100%
Avatar
jraServerAPI 6/26/2022 4:23 PM
Looking for advice.. I recently built up a new machine and it only has 16 cores, so I'm running 7 maps on it and the rest of my cluster I have on the another machine and I sync them up no problems there. They both the have the exact same plugin configuration etc. However my new machine is constantly crashing, silently too. And I check the event viewer and it's always the same exception code (Exception code: 0xc0000005), and the source is usually unknown, however there have been multiple times where it will tell me the source dll in the report, but it just appears to be any random dll because each time it's a different one. I'm trying to think out of the box now, could this be a faulty memory stick? The other half of the cluster on the other machine does not crash at all.. 🤷‍♂️ I appreciate any feedback, thank you! (edited)
4:25 PM
(also there used to be a server config channel in here.. it appears to be gone now) (edited)
Avatar
Avatar
jraServerAPI
Looking for advice.. I recently built up a new machine and it only has 16 cores, so I'm running 7 maps on it and the rest of my cluster I have on the another machine and I sync them up no problems there. They both the have the exact same plugin configuration etc. However my new machine is constantly crashing, silently too. And I check the event viewer and it's always the same exception code (Exception code: 0xc0000005), and the source is usually unknown, however there have been multiple times where it will tell me the source dll in the report, but it just appears to be any random dll because each time it's a different one. I'm trying to think out of the box now, could this be a faulty memory stick? The other half of the cluster on the other machine does not crash at all.. 🤷‍♂️ I appreciate any feedback, thank you! (edited)
Use memtest86
5:20 PM
Do at least 3 full tests
Avatar
Avatar
jraServerAPI
Looking for advice.. I recently built up a new machine and it only has 16 cores, so I'm running 7 maps on it and the rest of my cluster I have on the another machine and I sync them up no problems there. They both the have the exact same plugin configuration etc. However my new machine is constantly crashing, silently too. And I check the event viewer and it's always the same exception code (Exception code: 0xc0000005), and the source is usually unknown, however there have been multiple times where it will tell me the source dll in the report, but it just appears to be any random dll because each time it's a different one. I'm trying to think out of the box now, could this be a faulty memory stick? The other half of the cluster on the other machine does not crash at all.. 🤷‍♂️ I appreciate any feedback, thank you! (edited)
Heat issues, mem issues. I had to throw out 128gb of rams on of my servers 😦
monkaW 1
Avatar
jraServerAPI 6/27/2022 2:15 PM
Thank you for your feedback. I actually discovered the problem, turns out it was a plugin after all.
Avatar
What is the best place to report an API crash? Executed a command over RCON and the server blew up.
Avatar
Avatar
DarkJester
What is the best place to report an API crash? Executed a command over RCON and the server blew up.
What is the crash stack
8:12 PM
It could be a plugin and not the api itself
Avatar
Fatal error! VERSION: 346.16 VERSION.dll!ArkApi::Commands::CheckCommands<ArkApi::Commands::Command<void __cdecl(RCONClientConnection *,RCONPacket *,UWorld *)>,RCONClientConnection * &,RCONPacket * &,UWorld * &>() (0x00007fff79ec7625) + 83 bytes [J:\ARK-Server-API-master\ARK-Server-API\version\Core\Private\Commands.h:115] VERSION.dll!ArkApi::Hook_RCONClientConnection_ProcessRCONPacket() (0x00007fff79ec3c34) + 0 bytes [J:\ARK-Server-API-master\ARK-Server-API\version\Core\Private\Ark\HooksImpl.cpp:145] CommandLogger.dll!UnknownFunction (0x00007fff70e4d547) + 0 bytes [UnknownFile:0] ShooterGameServer.exe!RCONClientConnection::Tick() (0x00007ff7a886b77f) + 0 bytes [f:\build\lostisland\projects\shootergame\source\shootergame\private\rconserver.cpp:104] ShooterGameServer.exe!URCONServer::Tick() (0x00007ff7a886d409) + 0 bytes [f:\build\lostisland\projects\shootergame\source\shootergame\private\rconserver.cpp:324] ShooterGameServer.exe!AShooterGameMode::Tick() (0x00007ff7a8a63a51) + 0 bytes [f:\build\lostisland\projects\shootergame\source\shootergame\private\shootergamemode.cpp:5223] ShooterGameServer.exe!AActor::TickActor() (0x00007ff7aa10c00e) + 0 bytes [f:\build\lostisland\engine\source\runtime\engine\private\actor.cpp:789] ShooterGameServer.exe!FActorTickFunction::ExecuteTick() (0x00007ff7aa10a7aa) + 30 bytes [f:\build\lostisland\engine\source\runtime\engine\private\actor.cpp:154] ShooterGameServer.exe!TGraphTask<FTickTaskSequencer::FTickFunctionTask>::ExecuteTask() (0x00007ff7aa3d81bc) + 28 bytes [f:\build\lostisland\engine\source\runtime\core\public\async\taskgraphinterfaces.h:871] ShooterGameServer.exe!FNamedTaskThread::ProcessTasksNamedThread() (0x00007ff7a9b59c25) + 0 bytes [f:\build\lostisland\engine\source\runtime\core\private\async\taskgraph.cpp:939] ShooterGameServer.exe!FNamedTaskThread::ProcessTasksUntilQuit() (0x00007ff7a9b5954e) + 0 bytes [f:\build\lostisland\engine\source\runtime\core\private\async\taskgraph.cpp:680] ShooterGameServer.exe!FTaskGraphImplementation::WaitUntilTasksComplete() (0x00007ff7a9b5b424) + 0 bytes [f:\build\lostisland\engine\source\runtime\core\private\async\taskgraph.cpp:1777] ShooterGameServer.exe!FTickTaskSequencer::ReleaseTickGroup() (0x00007ff7aa3aa693) + 0 bytes [f:\build\lostisland\engine\source\runtime\engine\private\ticktaskmanager.cpp:205] ShooterGameServer.exe!FTickTaskManager::RunTickGroup() (0x00007ff7aa3ad56c) + 0 bytes [f:\build\lostisland\engine\source\runtime\engine\private\ticktaskmanager.cpp:867] ShooterGameServer.exe!UWorld::RunTickGroup() (0x00007ff7aa2707fe) + 0 bytes [f:\build\lostisland\engine\source\runtime\engine\private\leveltick.cpp:697] ShooterGameServer.exe!UWorld::Tick() (0x00007ff7aa271dfb) + 13 bytes [f:\build\lostisland\engine\source\runtime\engine\private\leveltick.cpp:1210] ShooterGameServer.exe!UGameEngine::Tick() (0x00007ff7aa1dc801) + 0 bytes [f:\build\lostisland\engine\source\runtime\engine\private\gameengine.cpp:1195] ShooterGameServer.exe!FEngineLoop::Tick() (0x00007ff7a7fc7c12) + 0 bytes [f:\build\lostisland\engine\source\runtime\launch\private\launchengineloop.cpp:2647] ShooterGameServer.exe!GuardedMain() (0x00007ff7a7fc39cc) + 0 bytes [f:\build\lostisland\engine\source\runtime\launch\private\launch.cpp:140] ShooterGameServer.exe!GuardedMainWrapper() (0x00007ff7a7fc8b9a) + 5 bytes [f:\build\lostisland\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] ShooterGameServer.exe!WinMain() (0x00007ff7a7fc8ce9) + 8 bytes [f:\build\lostisland\engine\source\runtime\launch\private\windows\launchwindows.cpp:213] ShooterGameServer.exe!__tmainCRTStartup() (0x00007ff7ab275799) + 21 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] KERNEL32.DLL!UnknownFunction (0x00007fffad167974) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007fffadafa2f1) + 0 bytes [UnknownFile:0] ntdll.dll!UnknownFunction (0x00007fffadafa2f1) + 0 bytes [UnknownFile:0] 慌瑳删灥楬慣整⁤捁潴⁲汐祡牥慐湷敔瑳䙟浥污彥彃ㄱ਍慌瑳删浥瑯⁥畆据楴湯䌠楬湥䅴正潇摯潍敶਍
Avatar
That is something from a plugin but the api isn't able to handle it. Do you have any weird character in a custom command?
Avatar
The command that was run was addpoints steamid amount.
8:56 PM
Ran the exact same command again and it went through fine.
Avatar
I have no experience with plugins guys, and my gf and I just want to use api to run a few plugins on our gportal server. I tried for hours to figure out how to get it done but Im stumped. If anyone can please advise in anyway much love!
Avatar
Avatar
Blacteria
I have no experience with plugins guys, and my gf and I just want to use api to run a few plugins on our gportal server. I tried for hours to figure out how to get it done but Im stumped. If anyone can please advise in anyway much love!
Using hosts you either ask them to install it for you, use an auto install panel (if the host has one) or you install it trough ftp
Avatar
does anyone have the last version of NewPlayerProtection from Otter discord? it looks like the version from the ark api website is a old one
3:00 PM
I've done some updates on it
3:00 PM
You find the updates in his discord I believe
Avatar
his discord does not exits anymore
Avatar
This is my latest build (2022-02-27) Only some crash fixes/quality update (edited)
Avatar
Avatar
Uaca
his discord does not exits anymore
I noticed that as well.
Avatar
Avatar
Foppa
This is my latest build (2022-02-27) Only some crash fixes/quality update (edited)
Ty!
Avatar
Deleted User 7/2/2022 6:11 AM
Hello I want to know if I am at the right place
6:12 AM
We want to set up point system and kits for ark survival evolved for our server
Avatar
Avatar
Deleted User
We want to set up point system and kits for ark survival evolved for our server
substitute 7/2/2022 6:14 AM
Wrong place
Avatar
Deleted User 7/2/2022 6:15 AM
Not sure why it sent me here
6:15 AM
You guys do mods for ark or no?
Avatar
Avatar
Deleted User
You guys do mods for ark or no?
substitute 7/2/2022 6:30 AM
This is the developer support discord
Avatar
Deleted User 7/2/2022 6:31 AM
Ahh ty
Avatar
help me please I'm giving a permission and it's not granting access anyway could someone explain it better permissions.grant Vip DinoColorCommand
Avatar
Permissions.Grant Vip DinoColorCommand this will add the permission DinoColorCommand to the Vip group
12:45 PM
to check if you are in the group in the game type /group
12:46 PM
it will list the groups you are part of
Avatar
🐨Dream Doctor🦘 7/8/2022 6:54 AM
So I've been away from things for a while, but was just looking through the new website and found this plugin that mentions that it runs on LINUX servers??!!??... Is that a thing now? Can I PLEASE have a piece of that? I've been championing a Linux API for as long as I've been doing plugins! https://ark-server-api.com/forums/resources/tidydams-windows-and-linux.547/
TidyDams When a player leaves a beaver dam with only wood and no other items, the beaver dam is automatically destroyed. Any remaining wood is dropped into an item cache. The decay timer on the item cache is configurable. Console/RCON Commands...
6:55 AM
Just found this also.... Does anyone know any more about this? https://github.com/MolluskARK/MolluskARK-Plugins
MolluskARK's plugins for ARK: Survival Evolved. Contribute to MolluskARK/MolluskARK-Plugins development by creating an account on GitHub.
6:55 AM
@TheMollusk Is this you? Could you please tell us more! This is so amazing!
6:56 AM
I mean it's game changing. There are SO MANY big clusters and hosts that would LOVE to use Linux servers but are stuck with Windows because they want to use the plugin system. (edited)
Avatar
jraServerAPI 7/8/2022 7:26 AM
Pretty sure that's a typo
7:26 AM
9877_umwhat
Avatar
Avatar
🐨Dream Doctor🦘
Just found this also.... Does anyone know any more about this? https://github.com/MolluskARK/MolluskARK-Plugins
Most of the plugins in that repo are not nearly finished/polished enough. Stuff I messed around with when I started learning about ArkServerApi, (the next plugin I actually release will probably be related to Gen2 space zone/asteroids). I manage blueprint script function hooking somewhat differently now.
Avatar
As for plugins on Linux, that's also somewhat different from ArkServerAPI since we don't get debug symbols in Linux. You won't have access to all the game classes that ArkServerApi can detect, but Unreal Engine reflection makes it pretty easy to get an awful lot of property offsets and functions (native and Blueprint script) to call/hook. There are existing ARK SDKs out there based on UE reflection, but they typically don't offer a great hooking solution or automatic updates to property offsets. I want to create a plugin loader sort of like ArkServerApi where you really only need to update/recompile your plugins if the signatures change to the game functions you're using.
10:28 AM
Could potentially (carefully) write plugins that you could compile for both Windows and Linux. Porting existing plugins wouldn't be straightforward or always possible. (edited)
10:32 AM
I had to update my TidyDams plugin on the website because it broke recently (Fjordur release changed the DropInventoryDeposit function). I added a compiled Linux .so version of the plugin because I wanted to start testing some of what I'm doing on Linux.
Avatar
Avatar
TheMollusk
As for plugins on Linux, that's also somewhat different from ArkServerAPI since we don't get debug symbols in Linux. You won't have access to all the game classes that ArkServerApi can detect, but Unreal Engine reflection makes it pretty easy to get an awful lot of property offsets and functions (native and Blueprint script) to call/hook. There are existing ARK SDKs out there based on UE reflection, but they typically don't offer a great hooking solution or automatic updates to property offsets. I want to create a plugin loader sort of like ArkServerApi where you really only need to update/recompile your plugins if the signatures change to the game functions you're using.
🐨Dream Doctor🦘 7/8/2022 12:27 PM
I have spoken with a couple of WC staff about getting the debug symbols released for Linux, but unfortunately I didn't get very far. I think there are a number of members of this community who would love to keep up to date with any and all efforts you make in the Linux realm.
Avatar
Avatar
🐨Dream Doctor🦘
I have spoken with a couple of WC staff about getting the debug symbols released for Linux, but unfortunately I didn't get very far. I think there are a number of members of this community who would love to keep up to date with any and all efforts you make in the Linux realm.
I'll get source code published eventually. I'm not a big fan of putting out closed source libraries like my TidyDams.so, but I was thinking it might help to find some bugs/etc while I figure out some of the other initial design. The biggest roadblock, as usual, is finding the time to get it done.
Avatar
Avatar
TheMollusk
As for plugins on Linux, that's also somewhat different from ArkServerAPI since we don't get debug symbols in Linux. You won't have access to all the game classes that ArkServerApi can detect, but Unreal Engine reflection makes it pretty easy to get an awful lot of property offsets and functions (native and Blueprint script) to call/hook. There are existing ARK SDKs out there based on UE reflection, but they typically don't offer a great hooking solution or automatic updates to property offsets. I want to create a plugin loader sort of like ArkServerApi where you really only need to update/recompile your plugins if the signatures change to the game functions you're using.
substitute 7/8/2022 4:43 PM
Nothing is stopping us from generating our own symbols
4:43 PM
From reflection info
Avatar
Avatar
substitute
Nothing is stopping us from generating our own symbols
TheMollusk 7/8/2022 5:17 PM
Hey, that could be a cool option to explore some more! My early implementation for detecting a native function's address was to take the UFunction's Func value, which is a pointer to an "exec" method that interfaces between the Unreal VM call stack and native calling conventions. Then I'd use Zydis to disassemble the exec function at runtime and automatically detect the native address (for virtual functions I would grab the class's default object from the global objects array). More recently, I'm wondering if I can avoid the disassambler and just do hooking/calling using the UFunction's Func field. It's not quite as fast but it's more reliable and easier to implement, especially since I'll be doing it for blueprint hooking anyways. One concern I have about this method is that I think there are cases where some of those native functions get called natively instead of as UFunctions, so the hooking may not always be reliable.
Avatar
Avatar
TheMollusk
Hey, that could be a cool option to explore some more! My early implementation for detecting a native function's address was to take the UFunction's Func value, which is a pointer to an "exec" method that interfaces between the Unreal VM call stack and native calling conventions. Then I'd use Zydis to disassemble the exec function at runtime and automatically detect the native address (for virtual functions I would grab the class's default object from the global objects array). More recently, I'm wondering if I can avoid the disassambler and just do hooking/calling using the UFunction's Func field. It's not quite as fast but it's more reliable and easier to implement, especially since I'll be doing it for blueprint hooking anyways. One concern I have about this method is that I think there are cases where some of those native functions get called natively instead of as UFunctions, so the hooking may not always be reliable.
🐨Dream Doctor🦘 7/9/2022 3:26 AM
I'm afraid a lot that is beyond me, but something like our Windows API that allows those of us with less god-like powers to produce plugins would be incredible. Although nice, I don't think things like cross-compilation between Windows and Linux, or supporting all the Windows capabilities, are at all necessary. Even a very early prototype with minimal hooks could be incredibly useful and very well received by the community.
Avatar
Avatar
🐨Dream Doctor🦘
I'm afraid a lot that is beyond me, but something like our Windows API that allows those of us with less god-like powers to produce plugins would be incredible. Although nice, I don't think things like cross-compilation between Windows and Linux, or supporting all the Windows capabilities, are at all necessary. Even a very early prototype with minimal hooks could be incredibly useful and very well received by the community.
substitute 7/9/2022 7:58 AM
you can do almost everything with just reflection info, at least stuff that matters in the confines of the game
7:58 AM
every single function that the game processes for example is at some point run through ProcessEvent as a UFunction if I'm remembering correctly
7:59 AM
with just finding GObjects and GNames you can dump almost everything with reflection (and you can find those on Windows initially)
Avatar
Avatar
substitute
every single function that the game processes for example is at some point run through ProcessEvent as a UFunction if I'm remembering correctly
There's UObject::ProcessEvent( UFunction* Function, void* Parms ), but the engine also sometimes invokes UFunctions through UObject::CallFunction( FFrame& Stack, RESULT_DECL, UFunction* Function ). Both of those functions eventually call UFunction::Invoke(UObject* Obj, FFrame& Stack, RESULT_DECL), which calls the function pointed to by the UFunctions Func field. For native UFunctions, Func points to the function's "exec" helper function that eventually calls the actual function. For script functions, Func points to UObject::ProcessInternal( FFrame& Stack, RESULT_DECL ), which executes the VM bytecode. So (I think) you can use ProcessEvent to call any UFunction (how other ARK SDKs work), but you won't be able to hook every single UFunction call with it. That's why I like the idea of just modifying the Func field of hooked UFunctions so they call into my own hook dispatcher function. But that technique only works if every native function that is reflected as a UFunction always gets called as a UFunction, which I'm not sure is the case. Then you have many native engine functions that don't make it into the reflection system (e.g., all the functions I just mentioned). ArkServerApi can get at them through debug symbols, but we're not so lucky on Linux. ProcessInternal()'s address is easy to find at least because you can read it from a script UFunction's Func field.
Avatar
The ArkServerApi headers used to be generated with IDA scripts? Are those scripts available anywhere?
Avatar
Avatar
TheMollusk
The ArkServerApi headers used to be generated with IDA scripts? Are those scripts available anywhere?
Some python scripts were used for IDA yeah, Michidu wrote them but I am not aware of anyone having them.
Avatar
Avatar
Pelayori
Some python scripts were used for IDA yeah, Michidu wrote them but I am not aware of anyone having them.
I see, thanks
Avatar
np (edited)
Avatar
Hey 😊 Is that possible to allow 1 player to use one specific admin command in the Permissions plugin? (edited)
Avatar
Avatar
Neryos
Hey 😊 Is that possible to allow 1 player to use one specific admin command in the Permissions plugin? (edited)
This plugin allows you to give only a certain console commands to other players. Chat Commands: /cheat - Executes console command if player has enough permissions. Example: /cheat infinitestats. Permissions...
🙏🏽 1
Avatar
does anyone here know how to run a ark server in linux with wine
Avatar
Hello, guys
Avatar
Since I couldn't find anything against it in the rules, is it ok discussing ark discord server helper tools other than the api or the plugins for it in this discord? (edited)
Avatar
Or if I need to be more specific, my question might wind up to an api data exposure request from the api trough rcon. (edited)
Avatar
I found myself trying to wrap my head around the GetPrivateStaticClass() function. I also see a couple mentions of it crashing in the Discord history. In ArkServerAPI headers, some classes define it with UClass* GetPrivateStaticClass(), some classes define it with UClass* GetPrivateStaticClass(const wchar_t* Package), and a few classes overload it with both forms. The overloading confused me because IDA only finds one instance of the function per class and ArkServerAPI doesn't appear to handle overloaded functions well anyways. IDA always shows the name of the function as [Class]::GetPrivateStaticClass(const wchar_t*) with an arg. However, IDA also ends up showing some variation in the function type between classes: UClass *__fastcall(const wchar_t *Package) or UClass *__fastcall() or UField *__fastcall(TClassCompiledInDefer<UPrimitiveComponent> *this). I guess that's how the different forms ended up in the headers? Sometimes GetPrivateStaticClass() uses the Package arg, sometimes it just gets the string from elsewhere in memory (I don't know if that's because of how the classes are defined in UE or a quirk of compilation or what). The second case is when IDA shows the arg-less type.
3:20 PM
In UE 4.5.1 source (corroborated by IDA), GetPrivateStaticClass() is defined as: c++ UClass* TClass::GetPrivateStaticClass(const TCHAR* Package) { static UClass* PrivateStaticClass = NULL; if (!PrivateStaticClass) { /* this could be handled with templates, but we want it external to avoid code bloat */ GetPrivateStaticClassBody<TClass>( Package, (TCHAR*)TEXT(#TClass) + 1 + ((StaticClassFlags & CLASS_Deprecated) ? 11 : 0), PrivateStaticClass, StaticRegisterNatives##TClass ); } return PrivateStaticClass; } So the Package arg often ends up not mattering, even when IDA does show it in the function type. Looks to me like it's always safe to use the form with the Package arg and the arg-less form can sometimes be a problem?
Avatar
I bring up the GetPrivateStaticClass() functions because I re-generated the ARK API headers for myself (nothing new, just updating the existing function definitions, hasn't been done in a while). I was going to submit a PR but I wasn't sure how to handle GetPrivateStaticClass(). Seems correct to me to always use GetPrivateStaticClass(const wchar_t*). But I wonder if that's too high-impact. For example, ArkServerAPI has code that uses APrimalDinoCharacter::GetPrivateStaticClass() even though IDA shows that function taking an arg. Not sure how intentional it is. Maybe I should just leave GetPrivateStaticClass() as the dev team already has it and update the other functions. (edited)
Avatar
Avatar
TheMollusk
I bring up the GetPrivateStaticClass() functions because I re-generated the ARK API headers for myself (nothing new, just updating the existing function definitions, hasn't been done in a while). I was going to submit a PR but I wasn't sure how to handle GetPrivateStaticClass(). Seems correct to me to always use GetPrivateStaticClass(const wchar_t*). But I wonder if that's too high-impact. For example, ArkServerAPI has code that uses APrimalDinoCharacter::GetPrivateStaticClass() even though IDA shows that function taking an arg. Not sure how intentional it is. Maybe I should just leave GetPrivateStaticClass() as the dev team already has it and update the other functions. (edited)
The neat thing about argless functions in C is that you can pass any amount of args
4:03 PM
They’re just discarded (edited)
4:04 PM
I think the best middle ground is to have both forms
4:05 PM
And let the user optionally pass that arg
Avatar
Its a function with one arg, which still happens to work out. Except in cases that the function hasn't been called yet to populate the static variable. In which case you potentially segfault.
Avatar
Avatar
TheMollusk
Its a function with one arg, which still happens to work out. Except in cases that the function hasn't been called yet to populate the static variable. In which case you potentially segfault.
Yes but in the cases wheee it reads from the static variable, the user would still have to supply something
4:06 PM
Unless you have both forms available
Avatar
The same function gets called either way. And SOMETHING gets passed in rcx. It just may or may not have been provided by the author
Avatar
You mean the caller?
4:07 PM
So the callee always has something in rcx?
4:07 PM
We should see what this mystery rcx value is :-)
Avatar
The called function always expects an argument. It just doesn't always get around to using it
Avatar
You said there were definitions in IDA where it didn’t have it?
4:09 PM
Optimizations could be why
Avatar
Depends on the class. For each class theres only a single GetPrivateStaticClass()
Avatar
If the arg is discarded then there’s no reason to include it when compiling
4:11 PM
Of course there’s also no harm in just making it need the arg and placing it on something like UObject
Avatar
But in some classes it isn't discarded even though the API provides an argless call to it
4:15 PM
I think it works well enough as is most of the time. just wasn't sure if people wanted to keep it that way
Avatar
Like ArkServerApi provides static UClass* GetPrivateStaticClass() and static UClass* GetPrivateStaticClass(const wchar_t* Package) for this function
Avatar
If you’re passing in the package name. It should first find the correct package by iterating the object array. Then give you it’s static class. If you pass in no params and you already have the package. It will grab its own static class.
6:45 PM
Hopefully that makes sense @TheMollusk
6:47 PM
Pretty sure it’s just a wrapper for convenience.
6:49 PM
I would have to pop open idea to double check but since this is a class function
6:49 PM
Rcx should always be this ptr
6:50 PM
But I’m blind on my phone for the last one
Avatar
Avatar
Frigoff
If you’re passing in the package name. It should first find the correct package by iterating the object array. Then give you it’s static class. If you pass in no params and you already have the package. It will grab its own static class.
The issue is if you call a GetPrivateStaticClass() that's been compiled like that without explicitly giving it an argument, what value does the function ends up using as Package?
6:51 PM
You could segfault
6:51 PM
I would think at least
Avatar
It should use its own.
6:55 PM
APrimalCharacter::GetPrivateStaticClass() should return APrimalCharacters private class. Without needing to grab it’s FName
Avatar
It's own what from where? It's supposed to be passed in
7:03 PM
The function uses the argument whaether the caller sets it properly or not
7:05 PM
And as far as I can tell, the API def doesn't set it in one of it's overloads
7:11 PM
Maybe I'm just reading the code wrong and need to revisit this tomorrow lol
Avatar
From my understanding, though it’s been a while since I dug into UE4’s UClass. GetPrivateStaticClassBody takes in the Package name. If it has a package name. Find the package, then return its static class. If you don’t supply a package name take the current FName and use that
7:13 PM
But that’s just from my current memory
7:14 PM
I’m having a hard time to properly remember every part without it in front of me
7:17 PM
@GSH | MrOwlSky your discord application should always use discord ID instead of Name#Number. Name#Number changes. Uses Unicode.
GOGCHECK 1
Avatar
Avatar
Frigoff
@GSH | MrOwlSky your discord application should always use discord ID instead of Name#Number. Name#Number changes. Uses Unicode.
GSH | MrOwlSky 7/15/2022 7:18 PM
Good point. I'll add that aswell (Added) (edited)
Avatar
Avatar
TheMollusk
Maybe I'm just reading the code wrong and need to revisit this tomorrow lol
As always. I’m interested to see where this goes.
7:22 PM
😋
Avatar
Avatar
Frigoff
As always. I’m interested to see where this goes.
I think if it was an issue, people would have noticed. A case of not being technically "correct" maybe, but working out anyways. In some classes the function doesn't actually use the arg (like Substitute suggested, I think the compiler may optimize it out), and for the classes where the function DOES include the pointer arg, it only gets around to using the arg on the first invocation when the function initializes a static variable. So maybe by the time plugins are calling the function it doesn't matter. I just wanted to understand what was going on.
Avatar
Yeah it's an interesting question as to how and why it works.
9:11 PM
I was more trying to answer why it might work that way and how people might interact with it.
Avatar
can someone help me with this? I already connected the database I don't understand why it still doesn't work 07/16/22 06:56 [Permission][critical] Failed to open connection! 07/16/22 06:56 [API][warning] (API::PluginManager::LoadAllPlugins) Failed to load plugin - Permissions Error code: 1114
Avatar
jraServerAPI 7/16/2022 12:43 AM
possible error in your config file
Avatar
can you give me a hand? i can't find the problem
12:47 AM
I created the database for permissions and put it as is in the config
Avatar
jraServerAPI 7/16/2022 12:48 AM
yeah..did you forget a comma?
12:48 AM
the json may not be correct.. that is a common 1114 error
Avatar
Paste your json into a validator online
Avatar
Original message was deleted or could not be loaded.
You posted your password and username
12:49 AM
You should probably change those
Avatar
its ok i can change it i am testing now
Avatar
Avatar
zbrencis
its ok i can change it i am testing now
JSONLint is the free online validator and reformatter tool for JSON, a lightweight data-interchange format.
12:51 AM
Paste your json there
12:51 AM
And see if it says any error
12:52 AM
Also did you mean to have a leading ; in your password?
12:52 AM
Usually ; is used to delimit the connection string
Avatar
I did everything on my personal computer and then I just copied everything to one that I prepared for the server, on my personal computer everything worked perfectly with this same data
Avatar
Are they both the same os?
12:54 AM
Also is the sql server actually running on local host?
Avatar
yes and yes
Avatar
Need more info then
12:57 AM
Unfortunately
Avatar
jraServerAPI 7/16/2022 12:57 AM
is the file config UTF-8 or ansi?
Avatar
utf8
Avatar
jraServerAPI 7/16/2022 12:57 AM
cuz is if it turns ANSI, you get that error too
12:57 AM
i would double check hehe
Avatar
We should fix config loading to not care about text encoding
12:58 AM
Silly it is such an issue
Avatar
jraServerAPI 7/16/2022 12:58 AM
it's cost me a few hours 2236_keka
12:58 AM
"OH, SO THAT's IT!"
12:58 AM
peepoClown
Avatar
solved
1:16 AM
its a problem with MySQL 8.0.27+
1:17 AM
just edit the my.ini file and add ssl=false to the bottom of the file
Avatar
Hey, in the Permissions plugin, there is a way to rank permissions levels? Example: Every server admin auto getting inside the "Admin" Group. Now I want to have let's say ""Owner" group to be above the "Admin" one, mostly for the cross chat plugin. (Prefix [Admin] / [Owner]) wanna know if its possible cus I cant be removed from the Admins Group without join back auto. (edited)
Avatar
🐨Dream Doctor🦘 7/17/2022 11:38 AM
Hey all, I'm trying to do a ADroppedItemEgg::GetPrivateStaticClass() like I normally do with something like APrimalStructureItemContainer::GetPrivateStaticClass(), however the first is asking for an argument const wchar_t* Package. Can someone help me understand what that is?
Avatar
Avatar
🐨Dream Doctor🦘
Hey all, I'm trying to do a ADroppedItemEgg::GetPrivateStaticClass() like I normally do with something like APrimalStructureItemContainer::GetPrivateStaticClass(), however the first is asking for an argument const wchar_t* Package. Can someone help me understand what that is?
It's the class's Unreal Engine package name (which I'm not sure how to get off the top of my head, maybe just from the class's path?). But it seems to usually (always?) be safe to just pass in nullptr. I want to play with it a little more later when I have some free time, been messing around with the GetPrivateStaticClass() functions myself lately.
Avatar
Avatar
TheMollusk
It's the class's Unreal Engine package name (which I'm not sure how to get off the top of my head, maybe just from the class's path?). But it seems to usually (always?) be safe to just pass in nullptr. I want to play with it a little more later when I have some free time, been messing around with the GetPrivateStaticClass() functions myself lately.
🐨Dream Doctor🦘 7/17/2022 1:59 PM
OK, thanks for the info. I just ended up using ::StaticClass() instead, which seems to get the same result as ::GetPrivateStaticClass?
Avatar
Updated the template to point to the new git https://github.com/SubstituteR/ArkServerAPI-Template
12:30 AM
I will update the template to fix any compilation errors
Avatar
Is there any program or software that would help me make a api I’m very very new to all of this
Avatar
The template right above you
Avatar
Hey Folks, if you've been around for a long time, you might remember me asking about UPrimalInventoryComponent->AddCustomFolder
6:54 PM
it seems as though the game ONLY expects that in the context of an RPC, ServerNotifyEditText which is why it is so particular and problematic and why it always crashes when trying to call it from plugin code.
6:55 PM
FServerCustomFolder folder; folder.FolderName = <text>; folder.InventoryCompType = 768; UPrimalInventoryComponent->CustomFolderItemsField().Add(folder); UPrimalInventoryComponent->ServerCustomFolderField().Add(<text>); (edited)
6:55 PM
works to achieve the same result, without any crashing.
Avatar
Avatar
Neryos
Hey, in the Permissions plugin, there is a way to rank permissions levels? Example: Every server admin auto getting inside the "Admin" Group. Now I want to have let's say ""Owner" group to be above the "Admin" one, mostly for the cross chat plugin. (Prefix [Admin] / [Owner]) wanna know if its possible cus I cant be removed from the Admins Group without join back auto. (edited)
?
Avatar
Avatar
substitute
Hey Folks, if you've been around for a long time, you might remember me asking about UPrimalInventoryComponent->AddCustomFolder
jraServerAPI 7/18/2022 8:35 PM
Interesting, this works for me without crashing c++ void AddCustomFolder(UPrimalInventoryComponent* Comp, FString FolderName) { FServerCustomFolder Folder; Folder.FolderName = FolderName; Folder.InventoryCompType = 512;// crafting tab Comp->CustomFolderItemsField().Add(Folder); } (edited)
Avatar
Avatar
jraServerAPI
Interesting, this works for me without crashing c++ void AddCustomFolder(UPrimalInventoryComponent* Comp, FString FolderName) { FServerCustomFolder Folder; Folder.FolderName = FolderName; Folder.InventoryCompType = 512;// crafting tab Comp->CustomFolderItemsField().Add(Folder); } (edited)
Yea, but that's not the function in the game
8:40 PM
🙂
8:40 PM
I assume that folder can't be deleted?
Avatar
jraServerAPI 7/18/2022 8:40 PM
yes it can
8:41 PM
lol
8:41 PM
text is a little too long
Avatar
jraServerAPI 7/18/2022 8:41 PM
hahahahaha
8:41 PM
3389_peepoDetective
Avatar
Avatar
substitute
Yea, but that's not the function in the game
jraServerAPI 7/18/2022 8:43 PM
no it's not.. I struggled forever with that crash, trying to make a folder.. and then @WETBATMAN took a look at it and sent me that code
8:44 PM
and He rocks btw! (ty ty ty)
Avatar
Avatar
jraServerAPI
no it's not.. I struggled forever with that crash, trying to make a folder.. and then @WETBATMAN took a look at it and sent me that code
Yeah the code I posted is as close to the original as possible I think
Avatar
jraServerAPI 7/18/2022 8:45 PM
nice.. i'll add the missing lines and see if there's any change for me
8:47 PM
like, maybe that is why i'm get a random silent crash on my servers! lol 🤞
Avatar
Avatar
TheMollusk
I had to update my TidyDams plugin on the website because it broke recently (Fjordur release changed the DropInventoryDeposit function). I added a compiled Linux .so version of the plugin because I wanted to start testing some of what I'm doing on Linux.
jraServerAPI 7/18/2022 9:44 PM
what was the change to DropInventoryDeposit ?
Avatar
Avatar
jraServerAPI
what was the change to DropInventoryDeposit ?
Well I noticed it had an additional bIncludeHotbarSlots arg: c++ bool DropInventoryDeposit(long double DestroyAtTime, bool bDoPreventSendingData, bool bIgnorEquippedItems, TSubclassOf<APrimalStructureItemContainer> OverrideInventoryDepositClass, APrimalStructureItemContainer* CopyStructureValues, APrimalStructureItemContainer** DepositStructureResult, AActor* GroundIgnoreActor, FString CurrentCustomFolderFilter, FString CurrentNameFilter, unsigned __int64 DeathCacheCharacterID, float DropInventoryOnGroundTraceDistance, bool bForceDrop, int OverrideMaxItemsDropped, bool bOverrideDepositLocation, FVector* DepositLocationOverride, bool bForceLocation, bool bIncludeHotbarSlots) instead of: c++ bool DropInventoryDeposit(long double DestroyAtTime, bool bDoPreventSendingData, bool bIgnorEquippedItems, TSubclassOf<APrimalStructureItemContainer> OverrideInventoryDepositClass, APrimalStructureItemContainer* CopyStructureValues, APrimalStructureItemContainer** DepositStructureResult, AActor* GroundIgnoreActor, FString CurrentCustomFolderFilter, FString CurrentNameFilter, unsigned __int64 DeathCacheCharacterID, float DropInventoryOnGroundTraceDistance, bool bForceDrop, int OverrideMaxItemsDropped, bool bOverrideDepositLocation, FVector* DepositLocationOverride, bool bForceLocation) But even after fixing the definition it didn't seem to work for me. I didn't spend any time on it though, just switched to using this instead: c++ void BPDropInventoryDeposit(long double DestroyAtTime, int OverrideMaxItemsDropped, bool bOverrideCacheLocation, FVector CacheLocationOverride)
Avatar
Avatar
TheMollusk
Well I noticed it had an additional bIncludeHotbarSlots arg: c++ bool DropInventoryDeposit(long double DestroyAtTime, bool bDoPreventSendingData, bool bIgnorEquippedItems, TSubclassOf<APrimalStructureItemContainer> OverrideInventoryDepositClass, APrimalStructureItemContainer* CopyStructureValues, APrimalStructureItemContainer** DepositStructureResult, AActor* GroundIgnoreActor, FString CurrentCustomFolderFilter, FString CurrentNameFilter, unsigned __int64 DeathCacheCharacterID, float DropInventoryOnGroundTraceDistance, bool bForceDrop, int OverrideMaxItemsDropped, bool bOverrideDepositLocation, FVector* DepositLocationOverride, bool bForceLocation, bool bIncludeHotbarSlots) instead of: c++ bool DropInventoryDeposit(long double DestroyAtTime, bool bDoPreventSendingData, bool bIgnorEquippedItems, TSubclassOf<APrimalStructureItemContainer> OverrideInventoryDepositClass, APrimalStructureItemContainer* CopyStructureValues, APrimalStructureItemContainer** DepositStructureResult, AActor* GroundIgnoreActor, FString CurrentCustomFolderFilter, FString CurrentNameFilter, unsigned __int64 DeathCacheCharacterID, float DropInventoryOnGroundTraceDistance, bool bForceDrop, int OverrideMaxItemsDropped, bool bOverrideDepositLocation, FVector* DepositLocationOverride, bool bForceLocation) But even after fixing the definition it didn't seem to work for me. I didn't spend any time on it though, just switched to using this instead: c++ void BPDropInventoryDeposit(long double DestroyAtTime, int OverrideMaxItemsDropped, bool bOverrideCacheLocation, FVector CacheLocationOverride)
What happened?
Avatar
Avatar
substitute
What happened?
I had a plugin using that function and after the Fjordur release a user pointed out that inventories were no longer dropping when they were supposed to. So I switched to using that other function and it was all good again.
Avatar
jraServerAPI 7/18/2022 10:03 PM
hmmm I use both functions
10:03 PM
but I am now experiencing a silent crash
10:03 PM
i wonder
10:03 PM
(i will always be wondering about that dang thing thou)
10:08 PM
I use it like so, not sure if it helps or not: c++ APrimalStructureItemContainer* dropAllCharacter(APrimalCharacter* char1, UPrimalInventoryComponent* inv, bool bIgnoreEquippedItems = false) { if (inv) { APrimalStructureItemContainer* deathCache = nullptr; auto Location = myTools::GetGroundLocation(&char1->RootComponentField()->RelativeLocationField()); bool bForceDrop = true; bool bOverrideDepositLocation = true; bool bForceLocation = true; inv->DropInventoryDeposit(ArkApi::GetApiUtils().GetWorld()->TimeSecondsField() + 3600, false, bIgnoreEquippedItems, nullptr, nullptr, &deathCache, nullptr, FString(""), FString(""), -1, 300, bForceDrop, -1, bOverrideDepositLocation, &Location, bForceLocation); return deathCache; } return nullptr; } (edited)
Avatar
Avatar
jraServerAPI
but I am now experiencing a silent crash
Can you attach a debugger
10:44 PM
If you can, you might get the instruction of the crash
10:44 PM
Usually EIP is available
10:44 PM
Though I think on x64 it’s called RIP
10:45 PM
Yeah RIP is EIP on x64
10:45 PM
Both are the instruction pointer
10:46 PM
So anything that would trigger a crash, assuming the debugger catches it, should let you see where it crashed
10:46 PM
And afaik debuggers can catch almost anything.
Avatar
Assuming the crash is within the problem dll. Sometimes with the silent crashes it's because you've messed something up with the internal engine. So the call stack would also be important to have
Avatar
Avatar
Frigoff
Assuming the crash is within the problem dll. Sometimes with the silent crashes it's because you've messed something up with the internal engine. So the call stack would also be important to have
It’s a silent crash
Avatar
If you've allocated some memory without using FMalloc for example.
Avatar
Debugger should show the whole stack either way
Avatar
Avatar
substitute
It’s a silent crash
Yeah, you'd want both
Avatar
Avatar
substitute
Can you attach a debugger
jraServerAPI 7/19/2022 12:42 AM
well actually I did set up a debugger, when it did finally catch the error i was excited! but I quickly discovered I had no idea what I was looking at lol I am a bit out of my league when it comes to that using the x64dbg / debugger
12:43 AM
but the error is always the same (100) in the event viewer (the only place it records)
12:43 AM
12:43 AM
I need more training on what to do with a debugger.. any recommended videos out there for an old guy like me? pepeold
Avatar
Go to details please.
12:50 AM
And screenshot that
12:50 AM
With a debugger you'll be using call stack, the instruction ptr, and the error code
12:50 AM
In your case it looks like something is trying to read an invalid ptr.
Avatar
Avatar
jraServerAPI
Click to see attachment 🖼️
That’s a null ptr
Avatar
jraServerAPI 7/19/2022 1:54 AM
most of the time is anonymous like above... but when it does mention a plugin it seems to be random
1:54 AM
and i wonder if thats because of Themida becuase doesnt that give out false errors
Avatar
Can you stop using Themida?
1:55 AM
Lol it’s not even that good
Avatar
jraServerAPI 7/19/2022 1:55 AM
not in Event Viewer
1:55 AM
oh i know alot of the guys here use it
1:55 AM
I heard it was good
1:55 AM
🤦‍♂️
1:55 AM
i know the chinese guys cant crack it
Avatar
But it’s your code that’s crashing?
Avatar
jraServerAPI 7/19/2022 1:56 AM
i have no idea..i run 40+ plugins
1:56 AM
thats the prob
1:56 AM
ever since Fjordur release I've been experiencing this
Avatar
Haha maybe one of them uses something that got changed
1:56 AM
This is why I’m an advocate for open source
Avatar
jraServerAPI 7/19/2022 1:57 AM
it was really bad before.. crashing like 15 times a day, but since my last maintenance update.. it's gone down dramatically (edited)
Avatar
Maybe you’ll have luck here
1:57 AM
GitHub is where people build software. More than 83 million people use GitHub to discover, fork, and contribute to over 200 million projects.
Avatar
jraServerAPI 7/19/2022 1:58 AM
monkaW
Avatar
Avatar
jraServerAPI
I heard it was good
I’m biased
Avatar
Avatar
substitute
I’m biased
jraServerAPI 7/19/2022 2:01 AM
can u check your dms
Avatar
Good morning/afternoon/evening (depending on where you all are in the world), I'm looking for a helping hand on getting visual studio set up correctly for plugin development. Just a brief background about me, I started programming before there was an IDE to speak of, I have a background in C, Pascal, Cobol and Fortran, but relatively little in C++. I have the fundamentals down for C++ and a few years ago I did a little work on a modded GTA V server but I haven't been in an IDE in a long time and cannot seem to get Visual Studio configured correctly to compile and begin working on small plugins for Ark. If anyone has the time and patience to help me through setting this up, please send me a DM? I'm an older guy and I'm a little slow but I'm patient and willing to learn.
Avatar
Substitute, a fellow member, has provided a base template that should get you up and running. The github repo found here: https://github.com/SubstituteR/ArkServerAPI-Template should have everything you need, as for getting Visual Studio set up you'll be installing the desktop development tools for C++. The Visual Studio Installer should have everything you need to get started. If you put any errors or output here someone should be able to direct you to what you might need to do.
Avatar
Sounds good, I'll give it a shot again in a few, I followed that using the 2019 release like it suggested and it just didn't give me an option to compile as a .dll hehe figured I'd misread or misunderstood something.
Avatar
You should just click build and it will build the dll.
Avatar
hmmm.. alrighty I'll give that a shot 🙂 thanks for the speedy reply!
Avatar
You're welcome. Let us know if you have any more questions :)
Avatar
Avatar
Rio
Sounds good, I'll give it a shot again in a few, I followed that using the 2019 release like it suggested and it just didn't give me an option to compile as a .dll hehe figured I'd misread or misunderstood something.
Hi, you will probably need VS2022 now
8:34 PM
I retargeted to C++20
8:34 PM
Which may be available in VS2019 but I’m not sure
8:34 PM
I will update the readme soon
8:36 PM
I also want to rewrite the sample stuff too … eventually
Avatar
Sounds good, I'll uninstall and do a fresh install later tonight, I was looking at it originally and thought "hmmm maybe I should be safe" lol
Avatar
Avatar
Rio
Sounds good, I'll uninstall and do a fresh install later tonight, I was looking at it originally and thought "hmmm maybe I should be safe" lol
If you have any questions, don’t hesitate to ask.
Avatar
I'm starting to build out middleware to implementing HTTP apis
3:52 AM
1037_hehepepe 1
👍 1
3:52 AM
if anyone would like to assist, let me know.
Avatar
samara morgan 7/21/2022 3:51 PM
3:51 PM
Can someone help me
3:51 PM
When I try booting the server this pops up and I can't find this plugin anywhere
Avatar
Avatar
samara morgan
When I try booting the server this pops up and I can't find this plugin anywhere
Try verifying or re-installing your game files. That probably has nothing to do with ArkServerApi plugins.
Avatar
Avatar
substitute
Click to see attachment 🖼️
That's cool, is that served up directly by the game server?
Avatar
Avatar
substitute
I'm starting to build out middleware to implementing HTTP apis
jraServerAPI 7/21/2022 4:55 PM
yes, that is awesome! great idea!
Avatar
Avatar
TheMollusk
That's cool, is that served up directly by the game server?
Yep
Avatar
Avatar
TheMollusk
Try verifying or re-installing your game files. That probably has nothing to do with ArkServerApi plugins.
samara morgan 7/21/2022 5:26 PM
I think I fixed it
5:27 PM
I just removed the mods and verified my game and server
Avatar
@jraServerAPI@TheMollusk
lethalhype 1
👍 1
Avatar
jraServerAPI 7/21/2022 7:33 PM
Sick!
Avatar
@jraServerAPI @Lethal
3:45 AM
with a (very) simple front end
3:45 AM
just to kind of show how powerful it can be
👍 2
😲 1
blobmuscles 1
Avatar
🐨Dream Doctor🦘 7/22/2022 11:54 AM
Has anyone managed to create a mindwipe plugin at all? In particular, one that could wipe tek engrams as well?
Avatar
Hello, does anyone have an updated NPP plugin?
Avatar
Avatar
substitute
@jraServerAPI@TheMollusk
nice!
Avatar
Avatar
substitute
just to kind of show how powerful it can be
is it ready? can I use it?
Avatar
🐨Dream Doctor🦘 7/24/2022 1:44 PM
Is it possible to use custom actor lists in plugins? Like this for example?
Avatar
🐨Dream Doctor🦘 7/24/2022 2:12 PM
Also, I still struggle to work out the correct way to interact with blueprint classes from a plugin. I've seen a bunch of different ways over the last couple of years, but they all seem very confusing. Here's an example of one situation. I'd appreciate any example anyone is willing to give on how to achieve this. I want to modify the StructureSpawnPointMaxDistance float variable on a Deinonychus_Character_BP actor. Then I'd like to run the Spawn Nest Egg bp function. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Also, I still struggle to work out the correct way to interact with blueprint classes from a plugin. I've seen a bunch of different ways over the last couple of years, but they all seem very confusing. Here's an example of one situation. I'd appreciate any example anyone is willing to give on how to achieve this. I want to modify the StructureSpawnPointMaxDistance float variable on a Deinonychus_Character_BP actor. Then I'd like to run the Spawn Nest Egg bp function. (edited)
You need a reference to the UObejct
6:42 PM
But you should be able to use Get/Set on it with the data type to change the blueprint value
6:53 PM
There is currently nothing built in for calling bp functions, but I could help walk you through it.
Avatar
🐨Dream Doctor🦘 7/25/2022 5:25 AM
Thanks @substitute . Any help is appreciated. Seems like you're the only one around these days? What happened to this big relaunch?
Avatar
Hello, is there a plugin that disable damage to structures but not to players ? (edited)
Avatar
can anyone help me with shop and kits idk how to add it to my gui
10:23 AM
pls dm me
Avatar
Avatar
Dodo
can anyone help me with shop and kits idk how to add it to my gui
🐨Dream Doctor🦘 7/25/2022 11:13 AM
This Discord is for developers of plugins. There is another Discord for users of the main plugins, including ArkShop. https://discord.gg/23DXbar6
11:13 AM
They should be able to help you there 🙂
Avatar
Avatar
Jguate
Hello, is there a plugin that disable damage to structures but not to players ? (edited)
🐨Dream Doctor🦘 7/25/2022 11:29 AM
I think there is a config option to do that.
Avatar
Avatar
🐨Dream Doctor🦘
I think there is a config option to do that.
But its in server config ?
Avatar
Avatar
🐨Dream Doctor🦘
Thanks @substitute . Any help is appreciated. Seems like you're the only one around these days? What happened to this big relaunch?
For calling you will need to use FindFunction on the UObject
5:54 PM
When I am home later I can try to send you an example
5:54 PM
The data goes in as a void*
5:54 PM
But is in the layout of a structure of the args and return types
5:55 PM
I had made a dynamic memory builder at one point that you could just provide the function name and chain add args (name + value) and it would build the block of memory (edited)
5:55 PM
If I ever clean it up, I’ll make a PR
5:55 PM
But it was like
5:56 PM
Function(“function”,object).arg(“arg”,val).arg(“another”, val2).execute(); (edited)
Avatar
is host havoc trust worthy server hosting website?
Avatar
Avatar
Dodo
is host havoc trust worthy server hosting website?
This isn’t the place for that
7:10 PM
where
Avatar
Avatar
Dodo
where
Probably a server hosting admin discord
Avatar
Avatar
substitute
When I am home later I can try to send you an example
🐨Dream Doctor🦘 7/26/2022 2:07 PM
Thanks Sub. A simple example would be amazing. No matter how much I search this Discord, I can't seem to find a single simple example.
Avatar
Avatar
🐨Dream Doctor🦘
Thanks Sub. A simple example would be amazing. No matter how much I search this Discord, I can't seem to find a single simple example.
Server Plugins for ARK: Server API. Contribute to Pelayori/Ark-Server-Plugins development by creating an account on GitHub.
2:18 PM
Both property usage and function calling, with only one input arg
Avatar
🐨Dream Doctor🦘 7/26/2022 2:25 PM
Thank you! That's awesome! So just looking at your code, you need is an actor reference, and you use FindProperty for a variable and assign it to a UProperty*, then Set that property to change it? I assume you need to know the variable type beforehand?
Avatar
Yes, you need to know the variable type, or the size at least
Avatar
Avatar
Pelayori
Yes, you need to know the variable type, or the size at least
🐨Dream Doctor🦘 7/26/2022 2:43 PM
OK, and for functions, if it's just a normal function with no arguments, you would start with the actor ref, use FindFunctionChecked to assign it to a UFunction*, then ProcessEvent to run the function?
Avatar
If no args, then you'd use the process event, with nullptr in parameters
Avatar
Avatar
🐨Dream Doctor🦘
Is it possible to use custom actor lists in plugins? Like this for example?
Also this is also possible. I have done it already, let me find an example.
3:18 PM
AActor* ModComm::GetModSingleton() { ACustomActorList* customList = UVictoryCore::GetCustomActorList(ArkApi::GetApiUtils().GetWorld(), FName("CustomActorListName", EFindName::FNAME_Add)); if (customList) { return customList->ActorListField()[0]; } return nullptr; }
3:20 PM
I have the actor list field read by pdb reader instead of raw struct as well. struct ACustomActorList : AInfo { TArray<AActor*> ActorListField() { return *GetNativePointerField<TArray<AActor*>*>(this, "ACustomActorList.ActorList"); } };
Avatar
Avatar
Pelayori
Also this is also possible. I have done it already, let me find an example.
🐨Dream Doctor🦘 7/27/2022 12:51 AM
That's fantastic! Thank you so much!
Avatar
+login anonymous +force_install_dir ..\ARK_Server +app_update 376030 validate +quit How to update the MODID command
Avatar
Avatar
Trustp
+login anonymous +force_install_dir ..\ARK_Server +app_update 376030 validate +quit How to update the MODID command
Wrong discord
Avatar
jraServerAPI 7/27/2022 6:02 PM
🤦‍♂️
Avatar
Avatar
substitute
Wrong discord
jraServerAPI 7/27/2022 6:03 PM
I don't know what people are seeing when they join here.. I know discord has made alot of updates you can have welcome messages and rule agreement forms etc.. maybe that needs a facelift.. idk
6:04 PM
@GSH | MrOwlSky
Avatar
??
Avatar
Avatar
jraServerAPI
@GSH | MrOwlSky
GSH | MrOwlSky 7/27/2022 6:48 PM
Agreed. Good idea.
Avatar
🐨Dream Doctor🦘 7/28/2022 12:30 AM
Just regarding the new auto-update features... Great feature and much needed, but I assume there are options to disable this if required? I can think of a number of situations where this might cause some issues.
Avatar
I would agree it should have an option to disable
Avatar
Avatar
🐨Dream Doctor🦘
Just regarding the new auto-update features... Great feature and much needed, but I assume there are options to disable this if required? I can think of a number of situations where this might cause some issues.
GSH | MrOwlSky 7/28/2022 12:36 AM
Should be a config called auto_update_config.json that gives you the boolean for true/false to enable.
Avatar
Sorry if this was mentioned already, but I just updated to ArkApi_3.55.zip and the logs are still reporting 3.54: 07/27/22 19:06 [API][info] ----------------------------------------------- 07/27/22 19:06 [API][info] ARK: Server Api V3.54 07/27/22 19:06 [API][info] Loading... Is this intended?
Avatar
Avatar
🐨Dream Doctor🦘
Just regarding the new auto-update features... Great feature and much needed, but I assume there are options to disable this if required? I can think of a number of situations where this might cause some issues.
inside the win64 folder there is a file called auto_update_config.json inside it you can toggle the auto update feature on or off (it comes enabled by default)
Avatar
Avatar
ViperGeek
Sorry if this was mentioned already, but I just updated to ArkApi_3.55.zip and the logs are still reporting 3.54: 07/27/22 19:06 [API][info] ----------------------------------------------- 07/27/22 19:06 [API][info] ARK: Server Api V3.54 07/27/22 19:06 [API][info] Loading... Is this intended?
the API version is the same, the bump is due to the release of the Automatic Update tool
thumbup 1
Avatar
Avatar
WETBATMAN
inside the win64 folder there is a file called auto_update_config.json inside it you can toggle the auto update feature on or off (it comes enabled by default)
🐨Dream Doctor🦘 7/28/2022 2:01 AM
That's great! Thanks for all the hard work!
Avatar
Avatar
WETBATMAN
inside the win64 folder there is a file called auto_update_config.json inside it you can toggle the auto update feature on or off (it comes enabled by default)
Why is there a separate config ?
Avatar
the auto update is supposed to be a separate tool from the API itself
Avatar
Avatar
WETBATMAN
the auto update is supposed to be a separate tool from the API itself
Why tho
Avatar
packaging separate tools into the web resource and losing version parity with the actual API is confusing
Avatar
wait a second
12:41 AM
@WETBATMAN you guys didn't proxy d3d9 for the updater did you?
Avatar
i did
12:42 AM
why
Avatar
I think moving away from dll proxying would be better in the long term (edited)
Avatar
definitely, but this is a solution for the current project
Avatar
dll proxying is asking for a race condition
Avatar
i proxied this specific dll because it always loaded before version.dll
Avatar
load order is not guaranteed
Avatar
yeah but in this case it should not matter
12:45 AM
because the auto update process reboots the server if it replaces or installs version.dll
Avatar
killing the process from dllload isn't safe either
12:45 AM
if you're waiting until after dlload, then all dlls are loaded at that point
Avatar
even if version.dll is not loaded at the point of running auto update code the file is still locked
12:46 AM
i rename the present dll in the folder (if any) place a new updated version.dll reboot the server and then delete the renamed file
Avatar
Avatar
WETBATMAN
i rename the present dll in the folder (if any) place a new updated version.dll reboot the server and then delete the renamed file
Your GitHub repo is missing a LICENSE
Avatar
right, i'll fix that
Avatar
Avatar
WETBATMAN
right, i'll fix that
you also don't proxy every exported method in d3d9
1:13 AM
if they ever use another method, the updater will break :\
Avatar
are you sure?
1:21 AM
it should be proxying everything
Avatar
There are a LOT more than 9 methods in d3d9
1:22 AM
that's the entire dx9 library
Avatar
right but it should be proxying everything in use right now
Avatar
yes, I said if they use another d3d9 method
1:24 AM
it would be problematic
Avatar
ty for the feedback i'll add the other exported functions (edited)
Avatar
Digital Death 7/31/2022 11:06 AM
Can you guys help me understand the new api auto update feature? Does this mean that the api will update itself and permissions, but not the other 3rd party plugins? If it does update the other plugins, what about config changes in the config files?
Avatar
Avatar
Digital Death
Can you guys help me understand the new api auto update feature? Does this mean that the api will update itself and permissions, but not the other 3rd party plugins? If it does update the other plugins, what about config changes in the config files?
it will auto update ArkApi and it will install permissions if it's not present but it won't update or install anything else
Avatar
Digital Death 7/31/2022 3:12 PM
It sounds cool, but what if it breaks the plugins being used? My workflow doesn't seem to change much but my risk for downtime seems to have increased unless I disable the new feature.
Avatar
Avatar
Digital Death
It sounds cool, but what if it breaks the plugins being used? My workflow doesn't seem to change much but my risk for downtime seems to have increased unless I disable the new feature.
then disable it, if you don't wish to use it
Avatar
Digital Death 7/31/2022 3:18 PM
I want to use it. Just overly concerned with uptime. Is it possible for the plugin developers to make use of the auto update in the same way?
Avatar
we plan to eventually add some kind of plugin auto updating but we have to sort out how to merge/update configs when a new config version is released
3:19 PM
right now it is not possible to update plugins with this tool
Avatar
Digital Death 7/31/2022 3:21 PM
I'm excited for the new developments and very much appreciate all the time and effort going into it all. Thanks for your time and keep up the good work!
Avatar
Good news everyone!
12:39 AM
@Pelayori soon there will be NO need for the api to use ANY dll proxying
12:40 AM
it was REALLY annoying ... but I've found a way to defeat ASLR and to be able to inject the api into the server process prior to the VERY first instruction executing in the entry point
👍 3
Avatar
If it works it's good 🙂
1:40 AM
🙂
1:40 AM
some clean up
Avatar
substitute 8/1/2022 4:18 AM
@Pelayoriworking
4:18 AM
4:20 AM
4:20 AM
unfortunately this does mean plugins will have to be rebuilt
4:21 AM
we've all been linking against "version.dll"
4:22 AM
cuz ya know
4:22 AM
without updating linker references
4:22 AM
it gonna be borked
4:23 AM
4:23 AM
but works besides that
Avatar
Not sure if another breaking change is something we want at this point
Avatar
🐨Dream Doctor🦘 8/1/2022 1:46 PM
Does anyone know how I can get the Day Cycle Manager? It has an event I'd like to try and hook.
Avatar
Avatar
Pelayori
Not sure if another breaking change is something we want at this point
Probably best to incorporate this with ARK2 since the current method is well established and in use already. It is already hard enough to get some of the older plugins updated to work from devs that are not active anymore.
this 1
Avatar
Avatar
🐨Dream Doctor🦘
Does anyone know how I can get the Day Cycle Manager? It has an event I'd like to try and hook.
I can look it up for you in a couple
Avatar
Avatar
Pelayori
I can look it up for you in a couple
🐨Dream Doctor🦘 8/1/2022 3:01 PM
Thank you! This is what is done in the dev kit.
Avatar
Avatar
🐨Dream Doctor🦘
Thank you! This is what is done in the dev kit.
UPrimalGlobals::GetDayCycleManager(ArkApi::GetApiUtils().GetWorld());
Avatar
Avatar
Lethal
Probably best to incorporate this with ARK2 since the current method is well established and in use already. It is already hard enough to get some of the older plugins updated to work from devs that are not active anymore.
substitute 8/1/2022 3:41 PM
Old plugins can have their IAT updated
Avatar
substitute 8/1/2022 7:55 PM
or even more simply, we can inject a version.dll that just points to the new one so that old plugins continue to work
Avatar
Avatar
Lethal
Probably best to incorporate this with ARK2 since the current method is well established and in use already. It is already hard enough to get some of the older plugins updated to work from devs that are not active anymore.
substitute 8/2/2022 4:35 AM
If I write in backwards compatibility and make it not a breaking change
4:35 AM
How about that
4:36 AM
Nothing stops me from overriding the loaded version.dll
Avatar
Avatar
Pelayori
UPrimalGlobals::GetDayCycleManager(ArkApi::GetApiUtils().GetWorld());
🐨Dream Doctor🦘 8/2/2022 5:27 AM
Thank you!
5:28 AM
Next question.... am I able to use the api to dump a list of all variables and functions in a particular BP?
Avatar
🐨Dream Doctor🦘 8/2/2022 5:47 AM
Just trying to put your two pieces of info together. I want to access some variables and a function on DayCycleManager. Using your example, it returns a ADayCycleManager which is only defined in the API as an empty struct in the Atlas code. How would I get from there to being able to call FindProperty and FindFuctionChecked on that class?
Avatar
Tiểu Thiên 8/2/2022 5:49 AM
08/02/22 10:47 [API][warning] (API::PluginManager::LoadAllPlugins) Failed to load plugin - ArkShopUI Error code: 1114
5:49 AM
somebody help me :((
Avatar
substitute 8/2/2022 5:50 AM
Usually that means there’s an error somewhere, probably in your json
5:51 AM
There’s a discord server dedicated to solving your issue though
5:51 AM
This one is primarily for developers
Avatar
Avatar
Tiểu Thiên
08/02/22 10:47 [API][warning] (API::PluginManager::LoadAllPlugins) Failed to load plugin - ArkShopUI Error code: 1114
🐨Dream Doctor🦘 8/2/2022 5:52 AM
Please go to the Discord that supports those plugins for end users. https://discord.gg/FJAEKKZF
Avatar
Avatar
substitute
If I write in backwards compatibility and make it not a breaking change
first of all, thank you for all the great work on this, but i personally think it's better to adapt this change once the API is released for ARK 2
2:38 PM
i feel other team members would agree with me
Avatar
Avatar
🐨Dream Doctor🦘
Just trying to put your two pieces of info together. I want to access some variables and a function on DayCycleManager. Using your example, it returns a ADayCycleManager which is only defined in the API as an empty struct in the Atlas code. How would I get from there to being able to call FindProperty and FindFuctionChecked on that class?
Reparent it to AActor, it's missing the inheritance chain.
Avatar
Avatar
WETBATMAN
first of all, thank you for all the great work on this, but i personally think it's better to adapt this change once the API is released for ARK 2
substitute 8/2/2022 3:17 PM
Why, there’s so much more that can be done when it’s properly loaded
3:17 PM
For starters you could easily remove crash stack less crashes and actually get a dump log (edited)
3:19 PM
There’s zero guarantee ark2 will ship with PDB and there’s zero guarantee making plugins will even be worth anyones time with ark2. Ark2 could just be a small co-op with friends instead of mmo design, in which case plugins would be nearly pointless
3:19 PM
If it’s possible to improve the api without breaking backwards compatibility; I see no reason to freeze it.
Avatar
Avatar
substitute
Why, there’s so much more that can be done when it’s properly loaded
Dev team is having a discussion about it. Thanks for the extra info.
Avatar
Avatar
Lethal
Dev team is having a discussion about it. Thanks for the extra info.
substitute 8/2/2022 4:45 PM
if I may make one more request (this one can also have backwards compatibility ... but it's harder)
4:45 PM
we NEED to define an ABI for Ark API
4:46 PM
right now ....... every exported symbol from ArkApi and Permissions (and probably a LOT of other plugins) uses MSVC name mangling
4:46 PM
if someone builds the api lib themselves and links against that, with say GCC, their plugin would fail to load with the official dll download as the linker will use GCC mangled names for linking against
4:46 PM
brought this to my attention
4:46 PM
we should be using a .def file to get unmangled names for exports
4:47 PM
it may be possible to .def two exports, one with the old name mangling and one with unmangled for backwards compatibility though, I'm not 100% sure yet.
4:47 PM
but for example, GetBitField should be exported as just ... that
4:48 PM
but right now it's all mangled
Avatar
🐨Dream Doctor🦘 8/3/2022 7:47 AM
Thanks to @Pelayori for all the help with BPs so far.... My next question for Blueprints is: Can I actually hook a BP event/function?
Avatar
Hi there, excuse me , can i hook this BP Event
Avatar
I want to some dino not allowed to be cloned,But I didn't find a function to do it
Avatar
Avatar
🐨Dream Doctor🦘
Thanks to @Pelayori for all the help with BPs so far.... My next question for Blueprints is: Can I actually hook a BP event/function?
yes
10:05 AM
most BP functions/events all go through ProcessEvent
Avatar
Avatar
substitute
most BP functions/events all go through ProcessEvent
🐨Dream Doctor🦘 8/3/2022 10:35 AM
I don't suppose you'd have any examples of this at all?
Avatar
Avatar
🐨Dream Doctor🦘
I don't suppose you'd have any examples of this at all?
I do
10:36 AM
this was for a mod for spongebob
10:36 AM
but same thing, UE4
10:36 AM
auto spongehax::process_event(sdk::UObject* who, sdk::UFunction* what, void* how) -> void { while(!tick_queue.empty()) { tick_queue.front()(); tick_queue.pop(); } const auto func = what->GetName(); auto handled = false; for (auto [_, callback] : process_event_handlers[func]) { handled = callback(who, how); if (handled) return; } process_event_.original(who, what, how); }
10:36 AM
a lot of people check the function by the internal index
10:37 AM
I used a callback system though
10:37 AM
static std::unordered_map<std::string, std::unordered_map<std::string, std::function<bool(sdk::UObject*, void*)>>> process_event_handlers;
10:37 AM
process_event_handlers["ReceiveBeginPlay"]["add_tracked"] = [](sdk::UObject* who, void*) -> bool { if (is_default(who)) return false; for (auto tracked : tracked_classes) if (who->IsA(tracked)) actor_lists[tracked].insert(who); return false; }; process_event_handlers["ReceiveEndPlay"]["removed_tracked"] = [](sdk::UObject* who, void*) -> bool { if (is_default(who)) return false; for (auto tracked : tracked_classes) if (who->IsA(tracked)) actor_lists[tracked].erase(who); return false; };
10:37 AM
example hooks for BP events
10:37 AM
I added two named callbacks for two BP events
10:38 AM
I needed arbitrary actor lists 😛
Avatar
Avatar
substitute
this was for a mod for spongebob
🐨Dream Doctor🦘 8/3/2022 2:11 PM
Thanks Sub. I don't suppose you have anything done with our dev kit? My pea brain is struggling fit that example into context.
Avatar
Avatar
🐨Dream Doctor🦘
Thanks Sub. I don't suppose you have anything done with our dev kit? My pea brain is struggling fit that example into context.
What I have done sometimes is the following:
  • On init game hook use UVictoryCore::BPLoadClass() to load the class we want to get the function in
  • Get the default object of the loaded class and use FindFunctionChecked to find the funtion we are looking for
  • Store the InternalIndexField in a variable for further usage on ProcessEvent hook
  • Hook UObject::ProcessEvent, then inside the hook check if the Function->InternalIndexField() equals the one you saved earlier. If it matches then you are on the function you need
5:24 PM
Skimmed over some details but they can be figured out depending on the usage wanted (edited)
Avatar
jraServerAPI 8/3/2022 5:28 PM
3389_peepoDetective
Avatar
TheMollusk 8/3/2022 9:41 PM
I may just be unlucky, but I found that many of the BP script functions I wanted to hook in my plugins were only invoked through CallFunction(), not ProcessEvent(). Even then, you can still access the arguments and variables through the UE VM stack if you define a few additional structures (stuff like UFunction, FFrame, FOutParmRec) that ArkServerAPI doesn't currently fully provide.
9:42 PM
I've been trying to create an SDK that makes it easy to hook any UFunction by generating intermediate helper functions that unpack arguments from the VM stack and then call the hook function with those args passed in natively (like the execFoo() functions that UE generates for native UFunctions). Still got several kinks to work out though.
Avatar
Avatar
TheMollusk
I've been trying to create an SDK that makes it easy to hook any UFunction by generating intermediate helper functions that unpack arguments from the VM stack and then call the hook function with those args passed in natively (like the execFoo() functions that UE generates for native UFunctions). Still got several kinks to work out though.
Would love seeing this.
Avatar
TheMollusk 8/3/2022 9:46 PM
I hope it works out, might be too optimistic to hope I'll get it working for all UFunctions.
Avatar
Avatar
TheMollusk
I hope it works out, might be too optimistic to hope I'll get it working for all UFunctions.
substitute 8/3/2022 9:52 PM
Your largest hurdle will probably be in-out args
Avatar
Avatar
substitute
Your largest hurdle will probably be in-out args
TheMollusk 8/3/2022 9:54 PM
yep, the outparms in particular are a little tricky (edited)
9:56 PM
also @substitute , nice orange name 😃 (edited)
Avatar
Avatar
TheMollusk
yep, the outparms in particular are a little tricky (edited)
Thanks!
12:17 AM
I ended up not doing compile time stuff when I had to deal with in-out args...ended up using property iterator at run time lol
Avatar
@🐨Dream Doctor🦘 Until some more refined solutions are released, here's what I use when I need it: int FunctionIdx = -1; void LoadFunction() { static FString f("Blueprint'/Game/...'"); UClass* loadedClass = UVictoryCore::BPLoadClass(&f); if (loadedClass) { UObject* CDO = loadedClass->GetDefaultObject(true); if (CDO) { UFunction* func = CDO->FindFunctionChecked(FName("FuncName", EFindName::FNAME_Add)); if (func) { FunctionIdx = func->InternalIndexField(); } } } } DECLARE_HOOK(AActor_ProcessEvent, void, AActor*, UFunction*, void*); void Hook_AActor_ProcessEvent(AActor* _this, UFunction* Function, void* Parameters) { if (_this && Function && Function->InternalIndexField() == FunctionIdx) { // it's what we need } }
Avatar
Avatar
Pelayori
@🐨Dream Doctor🦘 Until some more refined solutions are released, here's what I use when I need it: int FunctionIdx = -1; void LoadFunction() { static FString f("Blueprint'/Game/...'"); UClass* loadedClass = UVictoryCore::BPLoadClass(&f); if (loadedClass) { UObject* CDO = loadedClass->GetDefaultObject(true); if (CDO) { UFunction* func = CDO->FindFunctionChecked(FName("FuncName", EFindName::FNAME_Add)); if (func) { FunctionIdx = func->InternalIndexField(); } } } } DECLARE_HOOK(AActor_ProcessEvent, void, AActor*, UFunction*, void*); void Hook_AActor_ProcessEvent(AActor* _this, UFunction* Function, void* Parameters) { if (_this && Function && Function->InternalIndexField() == FunctionIdx) { // it's what we need } }
void LoadFunction() { static FString f("Blueprint'/Game/...'"); UClass* loadedClass = UVictoryCore::BPLoadClass(&f); if(!loadedClass) return; UObject* CDO = loadedClass->GetDefaultObject(true); if(!CDO) return; UFunction* func = CDO->FindFunctionChecked(FName("FuncName", EFindName::FNAME_Add)); if(func) FunctionIdx = func->InternalIndexField(); }
11:53 PM
you should do early returns where you can (edited)
Avatar
🐨Dream Doctor🦘 8/5/2022 9:33 AM
@Pelayori @substitute Thanks so much guys. I'll give this a go asap.
Avatar
Interesting, didn't think about it until now. Thanks
Avatar
void ReloadConfigRcon(RCONClientConnection* rcon_connection, RCONPacket* rcon_packet, UWorld* /unused/) { FString reply; try { ReadConfig(); FVector SpawnLocation(0, 0, 0); FRotator SpawnRotation(0, 0, 0); AShooterPlayerController* playes = static_cast<AShooterPlayerController*>(ArkApi::GetApiUtils().GetShooterGameMode()->SpawnPlayerController(&SpawnLocation, &SpawnRotation)); FString result; FString fcommand("ScriptCommand ReloadJson"); playes->bIsAdmin() = true; playes->ConsoleCommand(&result, &fcommand, false); playes->bIsAdmin() = false; } }
1:09 PM
You don't need a player to enter commands,What's the way to do that ,thank
1:10 PM
Or RCON input command, how do you do that
Avatar
Avatar
TheMollusk
I may just be unlucky, but I found that many of the BP script functions I wanted to hook in my plugins were only invoked through CallFunction(), not ProcessEvent(). Even then, you can still access the arguments and variables through the UE VM stack if you define a few additional structures (stuff like UFunction, FFrame, FOutParmRec) that ArkServerAPI doesn't currently fully provide.
I've came accross a function that only runs trough CallFunction(), so I was wondering if you had some example on how to read parameters and write the return value?
Avatar
🐨Dream Doctor🦘 8/6/2022 4:43 AM
Is the 'CallFunction' and 'ProcessEvent' issue anything to do with the difference between an event and a function in the Dev kit?
Avatar
Avatar
Pelayori
I've came accross a function that only runs trough CallFunction(), so I was wondering if you had some example on how to read parameters and write the return value?
TheMollusk 8/6/2022 5:18 PM
I went into a little detail about getting BP function argument addresses while back here: https://discord.com/channels/513432877904691202/513822106639794196/968219440497954856 I was just figuring it out at the time so some of the details may be a little weird. For inputs and local vars you need the FFrame to tell you where locals are stored plus Offset_Internal from the UProperty. For outputs, you can get the address directly from the FOutParmRecs PropAddr field.
Avatar
Avatar
Pelayori
I've came accross a function that only runs trough CallFunction(), so I was wondering if you had some example on how to read parameters and write the return value?
TheMollusk 8/6/2022 5:19 PM
A couple months ago I wrote an ArkServerApi plugin to provide centralized BP script function hooking for other plugins: https://github.com/MolluskARK/MolluskARK-Plugins/blob/master/Projects/BlueprintHooks/BlueprintHooks.h I defined some templates in that header that I would use to get pointers to UFunction args
MolluskARK's plugins for ARK: Survival Evolved. Contribute to MolluskARK/MolluskARK-Plugins development by creating an account on GitHub.
5:21 PM
I don't use that style of hooking (modifying the BP script) anymore though since that technique only works for script functions, not native ones.
Avatar
Avatar
🐨Dream Doctor🦘
Is the 'CallFunction' and 'ProcessEvent' issue anything to do with the difference between an event and a function in the Dev kit?
TheMollusk 8/6/2022 5:23 PM
I haven't dug into finding out exactly why one gets called vs the other. I've seen things that look like an event in the dev kit that get called through CallFunction(). I think basically if there is a UE FFrame stack available, CallFunction() is used. And ProcessEvent() is called when a new stack needs to be created.
Avatar
hello. We are currently developing a chat log plugin. The function is made normally, but an error occurs that the characters are normally entered at first, but the characters are broken over time. Can you figure out the cause?
Avatar
Avatar
돌드민
hello. We are currently developing a chat log plugin. The function is made normally, but an error occurs that the characters are normally entered at first, but the characters are broken over time. Can you figure out the cause?
substitute 8/6/2022 7:03 PM
You didn’t post any code
Avatar
Avatar
substitute
You didn’t post any code
jraServerAPI 8/6/2022 8:28 PM
also, probably should be redirected to the Beginners chat (which i can't link because of the weird text) (edited)
Avatar
Avatar
jraServerAPI
also, probably should be redirected to the Beginners chat (which i can't link because of the weird text) (edited)
substitute 8/6/2022 8:57 PM
#【💬】ᴅɪꜱᴄᴜꜱꜱɪᴏɴ-ʙ
Avatar
jraServerAPI 8/6/2022 8:58 PM
you savage!
Avatar
substitute 8/6/2022 8:58 PM
<#channelid> (edited)
Avatar
jraServerAPI 8/6/2022 8:58 PM
#513432877904691205
8:59 PM
🤦‍♂️
Avatar
substitute 8/6/2022 8:59 PM
You need the <>
Avatar
jraServerAPI 8/6/2022 8:59 PM
oooh.. kewl
Avatar
Avatar
jraServerAPI
oooh.. kewl
substitute 8/6/2022 8:59 PM
No; what’s cool is cross server links
8:59 PM
#deleted-channel
Avatar
jraServerAPI 8/6/2022 9:00 PM
3389_peepoDetective
Avatar
Avatar
TheMollusk
I went into a little detail about getting BP function argument addresses while back here: https://discord.com/channels/513432877904691202/513822106639794196/968219440497954856 I was just figuring it out at the time so some of the details may be a little weird. For inputs and local vars you need the FFrame to tell you where locals are stored plus Offset_Internal from the UProperty. For outputs, you can get the address directly from the FOutParmRecs PropAddr field.
I did in fact dig into your messages, however couldn't find anything that worked for me. I will check your repo though, thank you!
Avatar
Avatar
TheMollusk
A couple months ago I wrote an ArkServerApi plugin to provide centralized BP script function hooking for other plugins: https://github.com/MolluskARK/MolluskARK-Plugins/blob/master/Projects/BlueprintHooks/BlueprintHooks.h I defined some templates in that header that I would use to get pointers to UFunction args
I tested this, and various variations already and none seemed to work. I am trying to modify the output of a bp pure function
Avatar
Avatar
Pelayori
I tested this, and various variations already and none seemed to work. I am trying to modify the output of a bp pure function
Hard to say without knowing exactly what you're doing. The method I described and use requires that the UFunction be intercepted when its stack FFrame has been created and populated and is still valid (i.e., in the middle of ProcessEvent() or CallFunction()). So you can't just hook CallFunction() and access the args like you've seen with hooking ProcessEvent(). CallFunction() and ProcessEvent() both eventually call ProcessInternal() for script UFunctions (not native UFunctions), so hooking that function might be one option.
12:22 AM
Simple example that modifies the output of the cryopod's CanCapture BlueprintPure script function to prevent cryopods from capturing any dino: c++ // WeapEmptyCryopod_C CanCapture() // Public, HasOutParms, BlueprintCallable, BlueprintEvent, BlueprintPure // // Parameters (0x0009) // 0x0000 (0x0008) Dino ObjectProperty Parm, ZeroConstructor, IsPlainOldData, NoDestructor // 0x0008 (0x0001) Capture BoolProperty Parm, OutParm, ZeroConstructor, IsPlainOldData, NoDestructor DECLARE_HOOK(UObject_ProcessInternal, void, UObject*, FFrame*, void* const); void Hook_UObject_ProcessInternal(UObject* _this, FFrame* Stack, void* const Result) { // If this is not our function, process the script normally and return if (Stack->NodeField()->NameField().ToString().ToString() != "CanCapture") { UObject_ProcessInternal_original(_this, Stack, Result); return; } bool* outputCapture = nullptr; int outParmCount = 0; FOutParmRec* currOutParm = Stack->OutParmsField(); for (UProperty* currProperty = Stack->NodeField()->PropertyLinkField(); currProperty; currProperty = currProperty->PropertyLinkNextField()) if ((currProperty->PropertyFlagsField() & 0x080) && (currProperty->PropertyFlagsField() & 0x100)) outParmCount++; for (int i = 0; currOutParm && (i < outParmCount); ++i) { if (currOutParm->PropertyField() && currOutParm->PropertyField()->NameField().ToString().ToString() == "Capture") { outputCapture = reinterpret_cast<bool*>(currOutParm->PropAddrField()); break; } currOutParm = currOutParm->NextOutParmField(); } if (!outputCapture) { Log::GetLog()->error("Capture OutParm not found"); return; } *outputCapture = false; }
Avatar
Avatar
TheMollusk
Simple example that modifies the output of the cryopod's CanCapture BlueprintPure script function to prevent cryopods from capturing any dino: c++ // WeapEmptyCryopod_C CanCapture() // Public, HasOutParms, BlueprintCallable, BlueprintEvent, BlueprintPure // // Parameters (0x0009) // 0x0000 (0x0008) Dino ObjectProperty Parm, ZeroConstructor, IsPlainOldData, NoDestructor // 0x0008 (0x0001) Capture BoolProperty Parm, OutParm, ZeroConstructor, IsPlainOldData, NoDestructor DECLARE_HOOK(UObject_ProcessInternal, void, UObject*, FFrame*, void* const); void Hook_UObject_ProcessInternal(UObject* _this, FFrame* Stack, void* const Result) { // If this is not our function, process the script normally and return if (Stack->NodeField()->NameField().ToString().ToString() != "CanCapture") { UObject_ProcessInternal_original(_this, Stack, Result); return; } bool* outputCapture = nullptr; int outParmCount = 0; FOutParmRec* currOutParm = Stack->OutParmsField(); for (UProperty* currProperty = Stack->NodeField()->PropertyLinkField(); currProperty; currProperty = currProperty->PropertyLinkNextField()) if ((currProperty->PropertyFlagsField() & 0x080) && (currProperty->PropertyFlagsField() & 0x100)) outParmCount++; for (int i = 0; currOutParm && (i < outParmCount); ++i) { if (currOutParm->PropertyField() && currOutParm->PropertyField()->NameField().ToString().ToString() == "Capture") { outputCapture = reinterpret_cast<bool*>(currOutParm->PropAddrField()); break; } currOutParm = currOutParm->NextOutParmField(); } if (!outputCapture) { Log::GetLog()->error("Capture OutParm not found"); return; } *outputCapture = false; }
I was trying to do this but was hooking CallFunction.
Avatar
Avatar
Pelayori
I was trying to do this but was hooking CallFunction.
Yeah that won't work with the way I do it, since the way I do it requires the stack to already be constructed for me, which happens inside of CallFunction().
Avatar
Ahh, that's it then 🙂
12:24 AM
I didn't know that 😅
Avatar
Hooking ProcessInternal() is pretty similar to the way people use ProcessEvent() though. Then you can catch any script function whether it came through ProcessEvent() or CallFunction().
12:30 AM
I've been using other methods to just intercept specific UFunctions (modifying the UFunction's Func field for native UFunctions, or modifying the bytecode for script UFunctions) instead of hooking ProcessInternal().
Avatar
In that example, keep in mind that string comparing every function that is passed through is going to cause slowdowns, better to use either the internal index or the function pointer.
Avatar
Yeah I definitely wouldn't want to use it as shown in the example
Avatar
Avatar
TheMollusk
I've been using other methods to just intercept specific UFunctions (modifying the UFunction's Func field for native UFunctions, or modifying the bytecode for script UFunctions) instead of hooking ProcessInternal().
I see no issue with just using process internal
12:38 AM
You can make a callback map and use the internal index as your key
Avatar
Avatar
substitute
I see no issue with just using process internal
TheMollusk 8/8/2022 2:23 AM
Yeah it's a good way hook script UFunctions. I was hooking script functions by modifying the bytecode before I was familiar with ProcessInternal() and I just stuck with that. Plus I've mostly been doing this on Linux where I'm not currently doing any native function hooking since I don't have debug symbols (although ProcessInternal() is easy to find even without debug symbols since script UFunctions point to it in their Func field).
Avatar
Avatar
TheMollusk
Yeah it's a good way hook script UFunctions. I was hooking script functions by modifying the bytecode before I was familiar with ProcessInternal() and I just stuck with that. Plus I've mostly been doing this on Linux where I'm not currently doing any native function hooking since I don't have debug symbols (although ProcessInternal() is easy to find even without debug symbols since script UFunctions point to it in their Func field).
substitute 8/8/2022 7:40 AM
If you find GNames and GObjects
7:40 AM
You can dump an sdk using reflection info
Avatar
Avatar
substitute
You can dump an sdk using reflection info
TheMollusk 8/8/2022 3:36 PM
I can detect global objects and names pretty reliably by scanning memory for data patterns that don't change between updates. I've written an SDK dumper that: 1. Allows plugins to access class and struct properties based on the reflection system rather than compiled-in offsets 2. Generates some code for easy UFunction hooking
3:37 PM
What I don't have is a really robust way to call UFunctions. I've seen other SDKs use ProcessEvent(), which would work well enough on Windows with the .pdb. But I don't have a nice, reliable way yet to detect ProcessEvent() on Linux. I've written my own function to do some stack handling and then I call ProcessInternal(), but it's not as nice as letting UE do the work for me.
Avatar
I haven't opened an ark server for a few months. When I type /shop, only the kits appear. Does anyone know why now the store does not appear? I only see the kits.
Avatar
Avatar
Arxon
I haven't opened an ark server for a few months. When I type /shop, only the kits appear. Does anyone know why now the store does not appear? I only see the kits.
This discord is for developers. Plugin usage issues are to be handled in: https://discord.gg/3QKxmUEe8q
Invite to join a server
Guild icon
📜information📌
✅ 1
Avatar
Avatar
TheMollusk
What I don't have is a really robust way to call UFunctions. I've seen other SDKs use ProcessEvent(), which would work well enough on Windows with the .pdb. But I don't have a nice, reliable way yet to detect ProcessEvent() on Linux. I've written my own function to do some stack handling and then I call ProcessInternal(), but it's not as nice as letting UE do the work for me.
You’d pattern scan the binary. Also it’s address in the VTable of every UObject
👍 1
4:10 PM
You’d pattern scan for the address if you can’t find it. Dump the whole VTable. From the VTable you’d put those addresses into IDA
4:11 PM
It’s going to be index 40ish~70ish
4:12 PM
But a reliable enough pattern shouldn’t break often. It’s not like ARK would be updating their engine or touching an internal function like that
Avatar
Avatar
Frigoff
You’d pattern scan the binary. Also it’s address in the VTable of every UObject
TheMollusk 8/8/2022 4:19 PM
I looked into those options a little bit and had some concerns about patterns changing over time or VTable offsets shifting so I would have to update my plugin loader. Maybe that is the way to go though. I'd probably have fewer issues that way than I currently have with replacing ProcessEvent() with my own code.
Avatar
Avatar
TheMollusk
I looked into those options a little bit and had some concerns about patterns changing over time or VTable offsets shifting so I would have to update my plugin loader. Maybe that is the way to go though. I'd probably have fewer issues that way than I currently have with replacing ProcessEvent() with my own code.
Pattern scanning would be better than VTable, if you saved 5-6 binaries over updates. You would eventually come up with a resilient enough pattern for release
4:30 PM
I don’t have 100% certainty about this but Linux and Windows may have the same VTable indexs (edited)
4:30 PM
If they do, could parse the pdb anyways for that information and use that
4:30 PM
I would have to reverse the linux build further to verify that though ^^
Avatar
Avatar
Frigoff
Pattern scanning would be better than VTable, if you saved 5-6 binaries over updates. You would eventually come up with a resilient enough pattern for release
TheMollusk 8/8/2022 4:38 PM
I think it's possible to download old versions of the server by getting depot information from SteamDB. It used to be possible at least. So that's a nice way to get some history.
Avatar
Avatar
Frigoff
I don’t have 100% certainty about this but Linux and Windows may have the same VTable indexs (edited)
TheMollusk 8/8/2022 4:38 PM
That could be the case. I think I've seen them in IDA before for the Windows build at least
Avatar
I’ve never tried but yeah if that’s working well. That would be nice
Avatar
Avatar
TheMollusk
That could be the case. I think I've seen them in IDA before for the Windows build at least
If they’re using the same compiler, I would hope it’s the same for both builds but I have never personally verified
Avatar
Avatar
TheMollusk
What I don't have is a really robust way to call UFunctions. I've seen other SDKs use ProcessEvent(), which would work well enough on Windows with the .pdb. But I don't have a nice, reliable way yet to detect ProcessEvent() on Linux. I've written my own function to do some stack handling and then I call ProcessInternal(), but it's not as nice as letting UE do the work for me.
you can find ProcessEvent via the vtable
10:06 PM
this is one way that I've done it (Windows) for an UE4 game
10:06 PM
while(!sdk::UObject::FindClass("Class CoreUObject.Object")) { using namespace std::chrono_literals; std::this_thread::sleep_for(250ms); //Let's let the CPU get work done in the mean time. printf("Waiting for UObject.\n"); } spongehax::load();
10:06 PM
auto spongehax::load() -> void { //snip process_event_.reset(sdk::UObject::StaticClass(), 66); DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(process_event_.get(), process_event); DetourTransactionCommit();
10:07 PM
static hookable<void(sdk::UObject*, sdk::UFunction*, void*)> process_event_;
Avatar
^ this solution works fine for when you know the index and is unlikely to change often.
10:14 PM
Though ARK has changed their ProcessEvent index a couple of times. (edited)
Avatar
🐨Dream Doctor🦘 8/9/2022 8:55 AM
@Pelayori @substitute Sorry for another question, but I'm trying to use UFunction::InternalIndexField however I'm getting Class UFunction has no member InternalIndexField. Did you modify your source somehow?
Avatar
Avatar
🐨Dream Doctor🦘
@Pelayori @substitute Sorry for another question, but I'm trying to use UFunction::InternalIndexField however I'm getting Class UFunction has no member InternalIndexField. Did you modify your source somehow?
I'm pretty sure GitHub headers have UFunction inheriting from UStruct
Avatar
Avatar
Pelayori
I'm pretty sure GitHub headers have UFunction inheriting from UStruct
🐨Dream Doctor🦘 8/9/2022 9:02 AM
Yeah it seems it does compile, but intellisense throws an error. Ok, sorry to have bothered you.
Avatar
Yeah Intellisense is dumb for me as well
Avatar
🐨Dream Doctor🦘 8/9/2022 9:18 AM
This is the inheritance: (sorry, not sure of the correct way to document inheritance) UObjectBase -> UObjectBaseUtility -> UObject -> UField -> UStruct -> UFunction UObjectBase is where InternalIndexField is defined. Seems like something goes wrong for Intellisense after UObject, as Intellisense/Autocomplete works for UObject::InternalIndexField but not UField::InternalIndexField.
Avatar
My guess is that intellisense doesn't like __declspec(dllexport) UProperty* FindProperty(FName name); within UObject
Avatar
Never had an issue myself
Avatar
🐨Dream Doctor🦘 8/10/2022 6:51 AM
Trying to hook some BP functions on Blueprint'/Game/Genesis2/CoreBlueprints/Environment/DayCycleManager_Gen2.DayCycleManager_Gen2' on Gen 2. I've tried two events and a function. I can get the index of those two events and the function, however I'm not having any luck actually hooking them. I've used Pelayori's examples of Hook_AActor_ProcessEvent. I've checked that that hook is actually being triggered, which it is, and I am able to get the InternalIndexField, however the indexes I'm after don't ever seem to be returned. Is there anything I might be missing?
6:55 AM
Test code: void Hook_AActor_ProcessEvent(AActor* _this, UFunction* Function, void* Parameters) { if (_this && Function && Function->InternalIndexField() == MyIndex) { Log::GetLog()->debug("Hook_AActor_ProcessEvent worked."); } AActor_ProcessEvent_original(_this, Function, Parameters); }
Avatar
🐨Dream Doctor🦘 8/10/2022 8:56 AM
Doing some testing, it looks like a couple of the functions from that blueprint are going through Hook_AActor_ProcessEvent, but most of them don't seem to be?
Avatar
Avatar
TheMollusk
I may just be unlucky, but I found that many of the BP script functions I wanted to hook in my plugins were only invoked through CallFunction(), not ProcessEvent(). Even then, you can still access the arguments and variables through the UE VM stack if you define a few additional structures (stuff like UFunction, FFrame, FOutParmRec) that ArkServerAPI doesn't currently fully provide.
🐨Dream Doctor🦘 8/10/2022 9:00 AM
^ I guess this is what you're mentioning here?
Avatar
🐨Dream Doctor🦘 8/10/2022 9:25 AM
So I worked backwards instead. I made a test plugin that got the blueprint string from _this for every call to Hook_AActor_ProcessEvent, filtered them all for Blueprint'/Game/Genesis2/CoreBlueprints/Environment/DayCycleManager_Gen2.DayCycleManager_Gen2', then did Function::GetFullName to find the name of the function and dumped the index and function name to debug. By looking through that I found one BP function that was invoked through ProcessEvent that was what I needed. I guess I was lucky this time, but I'd love it if someone could share how they hook CallFunction as I'm certain I won't always be that lucky. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
So I worked backwards instead. I made a test plugin that got the blueprint string from _this for every call to Hook_AActor_ProcessEvent, filtered them all for Blueprint'/Game/Genesis2/CoreBlueprints/Environment/DayCycleManager_Gen2.DayCycleManager_Gen2', then did Function::GetFullName to find the name of the function and dumped the index and function name to debug. By looking through that I found one BP function that was invoked through ProcessEvent that was what I needed. I guess I was lucky this time, but I'd love it if someone could share how they hook CallFunction as I'm certain I won't always be that lucky. (edited)
As it's been mentioned, there's some blueprint functions that get called from Process Event, and some others from Call Function. We do not know why yet but Mollusk mentioned something about process event constructing a new FFrame when it was called, and CallFunction when the FFrame was already constructed, but this is all not confirmed. But for functions called trough CallFunction, it's better to hook UObject::ProcessInternal, Mollusk shared an example here: https://discord.com/channels/513432877904691202/513432877904691205/1005964066474430514
Avatar
Avatar
Pelayori
As it's been mentioned, there's some blueprint functions that get called from Process Event, and some others from Call Function. We do not know why yet but Mollusk mentioned something about process event constructing a new FFrame when it was called, and CallFunction when the FFrame was already constructed, but this is all not confirmed. But for functions called trough CallFunction, it's better to hook UObject::ProcessInternal, Mollusk shared an example here: https://discord.com/channels/513432877904691202/513432877904691205/1005964066474430514
🐨Dream Doctor🦘 8/10/2022 3:59 PM
Yes I did see that example, however Mollusk mentioned he wouldn't use that example in practice because it compares strings at every call, which is less than ideal.
Avatar
You could check if _this is what you want
Avatar
🐨Dream Doctor🦘 8/10/2022 4:27 PM
I also think there are some definitions, life FFrame, missing from the dev kit, that are needed to use 'ProcessInternal'. I'm not sure where to find those.
Avatar
Avatar
🐨Dream Doctor🦘
Yes I did see that example, however Mollusk mentioned he wouldn't use that example in practice because it compares strings at every call, which is less than ideal.
The string comparison was just to keep the example simple and easy to read. You could just replace that with an index comparison or map lookup like Substitute mentioned.
4:45 PM
I'm not at my computer now, but I'll point you to the other structures you need later (FFrame, etc)
Avatar
WillowTheWisp 8/10/2022 6:04 PM
is it possible for weekend rates api to trigger PvP on that weekend, so we can have pve during the week until it triggers, then have it return back to pve when weekend rates releases it self from the weekend?
6:04 PM
my apologies if this is not the right place, my searching has lead me here this afternoon.
Avatar
Avatar
WillowTheWisp
is it possible for weekend rates api to trigger PvP on that weekend, so we can have pve during the week until it triggers, then have it return back to pve when weekend rates releases it self from the weekend?
Avatar
WillowTheWisp 8/10/2022 6:32 PM
Cheers mate
Avatar
Avatar
🐨Dream Doctor🦘
Yes I did see that example, however Mollusk mentioned he wouldn't use that example in practice because it compares strings at every call, which is less than ideal.
Let's say you want to hook DayCycleManager_Gen2's TriggerWarp() function (which is called through UObject::CallFunction()) and modify the index parameter to control the incoming asteroid zone. // Function TriggerWarp // BlueprintCallable, BlueprintEvent // // Parameters (0x0004) // 0x0000 (0x0004) index UIntProperty Parm, ZeroConstructor, IsPlainOldData, NoDestructor
9:00 PM
You would add these definitions to UE.h: c++ struct FOutParmRec { UProperty*& PropertyField() { return *GetNativePointerField<UProperty**>(this, "FOutParmRec.Property"); } unsigned __int8*& PropAddrField() { return *GetNativePointerField<unsigned __int8**>(this, "FOutParmRec.PropAddr"); } FOutParmRec*& NextOutParmField() { return *GetNativePointerField<FOutParmRec**>(this, "FOutParmRec.NextOutParm"); } }; struct FFrame : FOutputDevice { UFunction*& NodeField() { return *GetNativePointerField<UFunction**>(this, "FFrame.Node"); } UObject*& ObjectField() { return *GetNativePointerField<UObject**>(this, "FFrame.Object"); } unsigned __int8*& CodeField() { return *GetNativePointerField<unsigned __int8**>(this, "FFrame.Code"); } unsigned __int8*& LocalsField() { return *GetNativePointerField<unsigned __int8**>(this, "FFrame.Locals"); } UProperty*& MostRecentPropertyField() { return *GetNativePointerField<UProperty**>(this, "FFrame.MostRecentProperty"); } unsigned __int8*& MostRecentPropertyAddressField() { return *GetNativePointerField<unsigned __int8**>(this, "FFrame.MostRecentPropertyAddress"); } FFrame*& PreviousFrameField() { return *GetNativePointerField<FFrame**>(this, "FFrame.PreviousFrame"); } FOutParmRec*& OutParmsField() { return *GetNativePointerField<FOutParmRec**>(this, "FFrame.OutParms"); } UField*& PropertyChainForCompiledInField() { return *GetNativePointerField<UField**>(this, "FFrame.PropertyChainForCompiledIn"); } UFunction*& CurrentNativeFunctionField() { return *GetNativePointerField<UFunction**>(this, "FFrame.CurrentNativeFunction"); } };
9:00 PM
Then in your plugin you can hook UObject::ProcessInternal() and get parameters from the FFrame: c++ // Find the TriggerWarp UFunction during your plugin's init and save its InternalIndex int triggerWarpIdx; DECLARE_HOOK(UObject_ProcessInternal, void, UObject*, FFrame*, void* const); void Hook_UObject_ProcessInternal(UObject* _this, FFrame* Stack, void* const Result) { // The Stack's Node field is the UFunction that this FFrame was constructed for if (Stack->NodeField()->InternalIndexField() != triggerWarpIdx) { // Process the function normally and return if this is not the function we're looking for UObject_ProcessInternal_original(_this, Stack, Result); return; } int* parmIndex = nullptr; // Get the pointer to the "index" input parameter for (UProperty* prop = Stack->NodeField()->PropertyLinkField(); prop; prop = prop->PropertyLinkNextField()) { if (prop->NameField().ToString().Equals("index")) { parmIndex = reinterpret_cast<int*>(Stack->LocalsField() + prop->Offset_InternalField()); break; } } // Warp to black pearl asteroids if (parmIndex) *parmIndex = 7; else Log::GetLog()->error("\"index\" parm not found"); UObject_ProcessInternal_original(_this, Stack, Result); }
Avatar
Avatar
TheMollusk
You would add these definitions to UE.h: c++ struct FOutParmRec { UProperty*& PropertyField() { return *GetNativePointerField<UProperty**>(this, "FOutParmRec.Property"); } unsigned __int8*& PropAddrField() { return *GetNativePointerField<unsigned __int8**>(this, "FOutParmRec.PropAddr"); } FOutParmRec*& NextOutParmField() { return *GetNativePointerField<FOutParmRec**>(this, "FOutParmRec.NextOutParm"); } }; struct FFrame : FOutputDevice { UFunction*& NodeField() { return *GetNativePointerField<UFunction**>(this, "FFrame.Node"); } UObject*& ObjectField() { return *GetNativePointerField<UObject**>(this, "FFrame.Object"); } unsigned __int8*& CodeField() { return *GetNativePointerField<unsigned __int8**>(this, "FFrame.Code"); } unsigned __int8*& LocalsField() { return *GetNativePointerField<unsigned __int8**>(this, "FFrame.Locals"); } UProperty*& MostRecentPropertyField() { return *GetNativePointerField<UProperty**>(this, "FFrame.MostRecentProperty"); } unsigned __int8*& MostRecentPropertyAddressField() { return *GetNativePointerField<unsigned __int8**>(this, "FFrame.MostRecentPropertyAddress"); } FFrame*& PreviousFrameField() { return *GetNativePointerField<FFrame**>(this, "FFrame.PreviousFrame"); } FOutParmRec*& OutParmsField() { return *GetNativePointerField<FOutParmRec**>(this, "FFrame.OutParms"); } UField*& PropertyChainForCompiledInField() { return *GetNativePointerField<UField**>(this, "FFrame.PropertyChainForCompiledIn"); } UFunction*& CurrentNativeFunctionField() { return *GetNativePointerField<UFunction**>(this, "FFrame.CurrentNativeFunction"); } };
🐨Dream Doctor🦘 8/11/2022 2:26 AM
Thank you so much! Can't wait to give it a try!
Avatar
FString MapName; ArkApi::GetApiUtils().GetShooterGameMode()->GetMapName(&MapName); Just adding the above code causes error code 1114. Does anyone know what the cause is? If I remove the code, it works fine. When the server starts, you need to find out the name of the map.
Avatar
Avatar
돌드민
FString MapName; ArkApi::GetApiUtils().GetShooterGameMode()->GetMapName(&MapName); Just adding the above code causes error code 1114. Does anyone know what the cause is? If I remove the code, it works fine. When the server starts, you need to find out the name of the map.
Are you doing this in DLLMain?
7:13 PM
If you are that’s the wrong place, try in Plugin_Init (make sure to export this symbol)
Avatar
Anyone with free time to create plugins? Paid for customizable plugins. send me a DM
Avatar
Avatar
substitute
If you are that’s the wrong place, try in Plugin_Init (make sure to export this symbol)
Ah, I'll try it. thank you
Avatar
🐨Dream Doctor🦘 8/13/2022 6:35 AM
What's the recommended solution to this error the first time you download a new copy of the api source? Error C1047 The object or library file '..\lib\libMinHook.x64.lib' was created by a different version of the compiler than other objects like 'x64\Ark\Core\Private\Ark\ApiUtils.obj'; rebuild all objects and libraries with the same compiler version I normally have to go and download the libMinHook library, then compile and install it manually. Is there an automated way of doing this?
Avatar
🐨Dream Doctor🦘 8/13/2022 6:48 AM
Having added my own compiled libminhook, I'm now getting all these linker errors in VS2022. I was able to compile the previous version of the source I had without any issues. Was something added recently that isn't compatible with VS2022?
Avatar
🐨Dream Doctor🦘 8/13/2022 7:02 AM
Nevermind. I could work around it by disabling vcpkg for this project. It now compiles properly. Obviously there were some conflicts with something vcpkg was doing.
Avatar
Avatar
🐨Dream Doctor🦘
What's the recommended solution to this error the first time you download a new copy of the api source? Error C1047 The object or library file '..\lib\libMinHook.x64.lib' was created by a different version of the compiler than other objects like 'x64\Ark\Core\Private\Ark\ApiUtils.obj'; rebuild all objects and libraries with the same compiler version I normally have to go and download the libMinHook library, then compile and install it manually. Is there an automated way of doing this?
it is an issue with minhook not being built against newer VS
7:14 AM
it is mostly an issue with minhook itself
7:14 AM
@🐨Dream Doctor🦘 I'm currently writing a GitHub action to automatically build the api from source when a commit is made against the repo
7:15 AM
Just trying to find a modular way to distribute msdia140.dll
Avatar
🐨Dream Doctor🦘 8/13/2022 7:16 AM
Oh wow, I was starting from scratch with the source to try and overcome those intellisense issues I was having, and now it's so much worse! Here are all the intellisense errors I'm getting now in my project lol Error (active) E0393 pointer to incomplete class type "UObject" is not allowed Error (active) E0393 pointer to incomplete class type "UProperty" is not allowed Error (active) E0254 type name is not allowed Error (active) E0393 pointer to incomplete class type "UObject" is not allowed Error (active) E0393 pointer to incomplete class type "UProperty" is not allowed Error (active) E0254 type name is not allowed Error (active) E0167 argument of type "ADayCycleManager *" is incompatible with parameter of type "UObjectBase *" Error (active) E0135 class "ADayCycleManager" has no member "FindFunctionChecked" Error (active) E0135 class "ADayCycleManager" has no member "FindFunctionChecked" Error (active) E0135 class "ADayCycleManager" has no member "FindFunctionChecked" Error (active) E0393 pointer to incomplete class type "UFunction" is not allowed Error (active) E0393 pointer to incomplete class type "UFunction" is not allowed Error (active) E0393 pointer to incomplete class type "UFunction" is not allowed Error (active) E0393 pointer to incomplete class type "UFunction" is not allowed Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObject *" Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObject *" Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObject *" Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObject *" Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObject *" Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObjectBase *" Error (active) E0393 pointer to incomplete class type "UFunction" is not allowed Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObject *" Error (active) E0167 argument of type "AActor *" is incompatible with parameter of type "UObject *" Error (active) E0393 pointer to incomplete class type "UFunction" is not allowed Error (active) E0393 pointer to incomplete class type "UFunction" is not allowed Error (active) E0393 pointer to incomplete class type "UProperty" is not allowed Error (active) E0393 pointer to incomplete class type "UProperty" is not allowed Error (active) E0393 pointer to incomplete class type "UProperty" is not allowed
Avatar
does your code compile?
Avatar
🐨Dream Doctor🦘 8/13/2022 7:17 AM
Yes, it compiles fine.
Avatar
wild
7:17 AM
tried restarting vs?
Avatar
🐨Dream Doctor🦘 8/13/2022 7:18 AM
Yeah, the whole computer actually.
7:19 AM
On the plus side, the original single issue I was having, which was UFunction::InternalIndexField throwing an intellisense issue, is now fixed! lol
Avatar
have you updated VS?
Avatar
🐨Dream Doctor🦘 8/13/2022 7:20 AM
I think I'm a couple of minor versions behind. I'll try an update.
Nodders 1
🤞 1
Avatar
🐨Dream Doctor🦘 8/13/2022 9:04 AM
So funny. A complete uninstall/reinstall clears those errors above, but gets me back to one of the original errors I was getting. Error (active) E0135 class "UProperty" has no member "NameField" (edited)
Avatar
🐨Dream Doctor🦘 8/14/2022 8:23 AM
I'm wondering if there's any point in modifying a variable in an AShooterWeapon in AShooterWeapon_OnEquip, or would a change like that not be replicated to the client?
Avatar
Avatar
🐨Dream Doctor🦘
I'm wondering if there's any point in modifying a variable in an AShooterWeapon in AShooterWeapon_OnEquip, or would a change like that not be replicated to the client?
OnEquip gets called after equip if that's what you are asking. But if a setting is replicated you can force replicate it and see if it has any effect.
Avatar
🐨Dream Doctor🦘 8/16/2022 3:28 AM
Anyone happen to know the function involved when a player renames a structure? Can't seem to find anything other than AActor::Rename but that isn't triggered when renaming either a structure or a dino.
Avatar
jraServerAPI 8/16/2022 3:58 AM
You're going to want to hook: DECLARE_HOOK(APrimalStructure_TryMultiUse, bool, APrimalStructure, APlayerController, int); and evaluate UseIndex (edited)
Avatar
Avatar
jraServerAPI
You're going to want to hook: DECLARE_HOOK(APrimalStructure_TryMultiUse, bool, APrimalStructure, APlayerController, int); and evaluate UseIndex (edited)
🐨Dream Doctor🦘 8/16/2022 4:07 AM
Thank you 🙂 I found a couple of others that can be used in specific cases. If it's a bed, you can hook APrimalStructureBed_ProcessEditText, and if it's a storage container you can use APrimalStructureItemContainer_NetUpdateBoxName.
Avatar
Hello! Does anyone know a way to get a player's online duration? Like A2S_PLAYER in Server queries. I only found StartTimeField in APlayerState but that's not it
Avatar
Avatar
AHTUxPK
Hello! Does anyone know a way to get a player's online duration? Like A2S_PLAYER in Server queries. I only found StartTimeField in APlayerState but that's not it
You could track it yourself
8:06 AM
Hook the function for when they connect as 0 and on every tick increase the time by the tick delta
Avatar
Avatar
substitute
Hook the function for when they connect as 0 and on every tick increase the time by the tick delta
Thank you 🙂 Although I hoped that such information was already known
Avatar
Is there a guide to start making plugins?
Avatar
jraServerAPI 8/27/2022 5:20 PM
I would start here with reviewing some open source plugins https://github.com/Michidu/Ark-Server-Plugins
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Avatar
jraServerAPI
I would start here with reviewing some open source plugins https://github.com/Michidu/Ark-Server-Plugins
With which program can I read the files containing these plugins?
Avatar
jraServerAPI 8/27/2022 5:45 PM
you'll need VisualStudio Community version (free) https://visualstudio.microsoft.com/downloads/ You'll need to know c++, so if you don't have any c++ experience.. you should start there.. there's plenty of videos on youtube to get you started.. but it's a looong journey 😆 (edited)
Download Visual Studio IDE or VS Code for free. Try out Visual Studio Professional or Enterprise editions on Windows, Mac.
Avatar
Avatar
jraServerAPI
you'll need VisualStudio Community version (free) https://visualstudio.microsoft.com/downloads/ You'll need to know c++, so if you don't have any c++ experience.. you should start there.. there's plenty of videos on youtube to get you started.. but it's a looong journey 😆 (edited)
I have made video games in Unity, will it be the same?
Avatar
Avatar
Mac
Is there a guide to start making plugins?
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
6:28 PM
Here’s a template (edited)
Avatar
Hello! Is it possible to find out what asteroid is now on genesis 2? Or a hook for asteroid update event?
Avatar
jraServerAPI 8/27/2022 8:47 PM
it is possible, i believe somebody has already released a plugin that does that
Avatar
Avatar
AHTUxPK
Hello! Is it possible to find out what asteroid is now on genesis 2? Or a hook for asteroid update event?
Take a look at this example: https://discord.com/channels/513432877904691202/513432877904691205/1007000368158343279 The server always passes index = -1 into that particular function to make it choose a random asteroid zone. But you could modify that example slightly and try hooking a different function like DayCycleManager_Gen2's LoadAsteroids or EndWarp BP functions (which also both take an "index" parameter). Different "index" values correspond to the various asteroid configurations.
👍 1
Avatar
hello. I want to count the Items in APrimalStructureItemContainer. Dedicated Storage has an empty UPrimalInventoryComponent. Should I approach the Inventory in a different way?
Avatar
Avatar
ehiu
hello. I want to count the Items in APrimalStructureItemContainer. Dedicated Storage has an empty UPrimalInventoryComponent. Should I approach the Inventory in a different way?
TheMollusk 9/3/2022 6:44 PM
Dedicated storage's inventory component class (PrimalInventory_DedicatedStorage_C) has a CurrentResourceCount property. c++ // itemContainer points to a dedicated storage PrimalStructureItemContainer void ShowDedicatedCount(APrimalStructureItemContainer* itemContainer, AShooterPlayerController* spc) { UPrimalInventoryComponent* inventoryComponent = itemContainer->MyInventoryComponentField(); UProperty* count = inventoryComponent->FindProperty(FName("CurrentResourceCount", EFindName::FNAME_Find)); if (!count) return; ArkApi::GetApiUtils().SendChatMessage(spc, "", "Count = {}", count->Get<__int32>(inventoryComponent)); }
👍 1
❤️ 1
Avatar
Oh thank you so much. Can I get the item name or bp as well?
6:46 PM
And is this a function that can be seen when devkit is installed?
6:47 PM
Or do I have to reverse it?
Avatar
jraServerAPI 9/3/2022 6:58 PM
all this info is available in the dev kit 👆
👍 1
Avatar
thank you so much. I've tried it before, but the Primal file open took too long to proceed. I'll try again.
Avatar
Avatar
ehiu
Oh thank you so much. Can I get the item name or bp as well?
TheMollusk 9/3/2022 7:01 PM
PrimalInventory_DedicatedStorage_C does have a SelectedResourceType that points to the UClass. But ArkServerApi's UProperty* FindProperty(FName name) returns null when you try to find it 😦
7:02 PM
Looks like ArkServerAPI's FindProperty() skips the first property: c++ __declspec(dllexport) UProperty* UObject::FindProperty(FName name) { for (UProperty* Property = this->ClassField()->PropertyLinkField(); Property = Property->PropertyLinkNextField();) if (Property->NameField().Compare(&name) == 0) return Property; return nullptr; } Should be: c++ for (UProperty* Property = this->ClassField()->PropertyLinkField(); Property; Property = Property->PropertyLinkNextField())
👍 2
7:04 PM
f so, you need to re-build it by modifying arkserverapi.
Avatar
Avatar
ehiu
Or do I have to reverse it?
TheMollusk 9/3/2022 7:04 PM
Sometimes I find this stuff in the dev kit, but I also verify it in a dump (like an SDK dump) from Unreal Engine's reflection info. I'm not sure the names in the dev kit always match the actual names in code.
Avatar
You can also use the PDB.
Avatar
If I remember correctly the APrimalStructure* from the dedicated storage also has both SelectedResourceClass and ResourceCount UProperty* selectedResourceProp = structure->FindProperty(FName("SelectedResourceClass", EFindName::FNAME_Add)); UClass* itemClass = selectedResourceProp->Get<UClass*>(structure); UProperty* itemCountProp = structure->FindProperty(FName("ResourceCount", EFindName::FNAME_Add)); int32 availableAmount = itemCountProp->Get<int32>(structure);
Avatar
Avatar
TheMollusk
Sometimes I find this stuff in the dev kit, but I also verify it in a dump (like an SDK dump) from Unreal Engine's reflection info. I'm not sure the names in the dev kit always match the actual names in code.
Thank you very much. Thanks to you, I found a way to investigate the item. I'll try installing devkit as well and try a few things.
Avatar
Avatar
Pelayori
If I remember correctly the APrimalStructure* from the dedicated storage also has both SelectedResourceClass and ResourceCount UProperty* selectedResourceProp = structure->FindProperty(FName("SelectedResourceClass", EFindName::FNAME_Add)); UClass* itemClass = selectedResourceProp->Get<UClass*>(structure); UProperty* itemCountProp = structure->FindProperty(FName("ResourceCount", EFindName::FNAME_Add)); int32 availableAmount = itemCountProp->Get<int32>(structure);
In the arkserverapi I have, the SelectedResourceClass and ResourceCount methods are not found. Let's try this too. Thank you very much.
Avatar
Avatar
ehiu
In the arkserverapi I have, the SelectedResourceClass and ResourceCount methods are not found. Let's try this too. Thank you very much.
TheMollusk 9/3/2022 7:10 PM
ResourceCount is found
Avatar
I do use those 2 properties in one of my plugins, and I personally tested them, at least it used to work.
Avatar
Avatar
Frigoff
You can also use the PDB.
TheMollusk 9/3/2022 7:11 PM
Dedicated storage's inventory component is blueprint generated so I think you have to go through reflection. Not sure if there's a way with PDB?
Avatar
I believe you're correct on that 👍
Avatar
Avatar
Pelayori
I do use those 2 properties in one of my plugins, and I personally tested them, at least it used to work.
TheMollusk 9/3/2022 7:13 PM
You can traverse the property linked list and find SelectedResourceClass. But I think the provided FindProperty() doesn't work becuase of this: https://discord.com/channels/513432877904691202/513432877904691205/1015668142468505630
Avatar
Hmm not sure, I'm pretty sure it's in the dedi storage rather than on the inventory, though
Avatar
TheMollusk 9/3/2022 7:16 PM
Ah yeah, both those fields are on BP_DedicatedStorage_C as well. So you don't even need to get the inventory component @ehiu
Avatar
Okay. I'll try.
Avatar
DECLARE_HOOK(UPrimalItem_FinishCraftingBlueprint, UPrimalItem, UPrimalItem); UPrimalItem* Hook_UPrimalItem_FinishCraftingBlueprint(UPrimalItem* _this) { return UPrimalItem_FinishCraftingBlueprint_original(_this); } This was generated using the Server Api Hooker Creator, the declare hook has two UPrimalItem parameters. Is the the generated function missing one parameter?
Avatar
RIO (Александр) 9/5/2022 6:08 PM
Hello. I am trying to give dino in soul trap (Dino Storage v2) in my plugin and I am having such problems. Can someone help me fix this? I watched how it was done in ArkShop plugin and there are exactly the same problems 😦
Avatar
Avatar
RIO (Александр)
Hello. I am trying to give dino in soul trap (Dino Storage v2) in my plugin and I am having such problems. Can someone help me fix this? I watched how it was done in ArkShop plugin and there are exactly the same problems 😦
There you go 🙂
6:13 PM
Server Plugins for ARK: Server API. Contribute to ServersHub/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Avatar
Pelayori
There you go 🙂
RIO (Александр) 9/5/2022 6:21 PM
I tried it yesterday. But got the same issue. I even installed the ArkShop plugin and tried to get the Dino from the store in soul trap 😦
Avatar
Hmm, not sure. Arkshop has got souls working as far as I know
Avatar
Avatar
Pelayori
Hmm, not sure. Arkshop has got souls working as far as I know
RIO (Александр) 9/5/2022 6:41 PM
Avatar
Ah that, sorry I thought you meant spawning dino in souls 😅
6:42 PM
You would have to ask the mod developer to know how to populate that data correctly
Avatar
Avatar
Pelayori
You would have to ask the mod developer to know how to populate that data correctly
RIO (Александр) 9/5/2022 6:45 PM
oh... thank u 🙂
Avatar
RIO (Александр) 9/7/2022 12:20 PM
Hi everyone! Could you help me find information on how to fix this? I will be grateful for any help Error (active) E0135 class "UProperty" has no member "NameField"
Avatar
This is a separate question from plugins. Thank you very much for your reply. I don't speak English, so I'm using a translator. First of all, I apologize for this. Is there a way to connect the server with two computers? Errors due to missing cluster files want to prevent
Avatar
https://syncthing.net/ usually works very well
Avatar
Avatar
Pelayori
https://syncthing.net/ usually works very well
It cannot keep up with the file creation speed that occurs when the server is moved.
7:22 PM
Synchronization takes about 5 seconds.
Avatar
That is due to wrong configuration
Avatar
Have you run a server with this?
Avatar
Yes I have
Avatar
you ever notice how the icon for Ark is messed up?
8:56 PM
8:56 PM
the red and green crystals are missing
8:59 PM
9:00 PM
lol, It really is. Your discovery is so interesting.
Avatar
it should be this
9:02 PM
9:03 PM
if I had to guess, maybe they cropped it to keep it square
👍 1
9:06 PM
the upcropped icon has a ratio of 1.531
9:06 PM
or 1.531 pixels across to each pixel down
9:07 PM
I can see how that would cause problems at different icon sizes
Avatar
Is there not a Git of the source for a few of the free plugins like Permissions still? I wanted to take a look at how hard it would be to add Timed Permissions that remove after X days.
Avatar
Avatar
Vysse
Is there not a Git of the source for a few of the free plugins like Permissions still? I wanted to take a look at how hard it would be to add Timed Permissions that remove after X days.
Server Plugins for ARK: Server API. Contribute to ServersHub/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Also I think you can already add a timed permission for X days
👍 1
10:47 PM
Just need to convert days to hours
Avatar
Avatar
Pelayori
Also I think you can already add a timed permission for X days
Really? I figured it didn't work like that given that there is nothing in the database to manage it. Maybe I am wrong but I will take a look.
Avatar
If you are using latest permissions there is. TimedPermissions column.
10:49 PM
Syntax would be permissions.addtimed <id> <group> <hours> <delay>
Avatar
Doesn't that just store the Permissions name? I guess I never actually tried it because of some of the wording it shows.
Avatar
Yes, but you could make a group with the desired permission
Avatar
OH I remember what the issue was now. It wasn't that you couldn't do timed permissions properly it was that it didn't ADD to the time already on it.
Avatar
Ah yeah. That doesn't does it.
10:53 PM
I did have a draft for that, but wasn't able to finish it.
☹️ 1
10:54 PM
I will look into it soon, when I finally sort all the things I have to do
👍 1
Avatar
Seems like an easy add-on but C++ isn't my strong suit.
Avatar
Hello, I need to force respawn a user from player controller, could you please help me with a function? (Solved this with player_controller->ServerRequestRespawnAtPoint_Implementation(0, 0);) (edited)
Avatar
Another question, how to hide respawn UI? (edited)
Avatar
@substitute
Avatar
Why are you tagging me
Avatar
sorry for tag no one just answers
Avatar
Why don’t you try to figure it out yourself?
5:59 PM
No one here is going to just know everything off the top of their head
Avatar
maybe someone did something similar
5:59 PM
but searching a bit in this channel gave nothing
Avatar
Avatar
SR
maybe someone did something similar
That doesn’t mean you’re entitled to them answering
6:00 PM
If someone knows and they feel like sharing they will
6:00 PM
You just have to be patient
Avatar
Avatar
substitute
You just have to be patient
Ok
Avatar
What are you even trying to do
6:01 PM
Why do you need to respawn the character?
Avatar
Avatar
substitute
Why do you need to respawn the character?
I'm doing stuff for admins so they can go off the spectator and spawn exactly in the place where they were in it.
6:03 PM
Right now it automatically respawns you and teleports you in the right position after using the command. The only problem is appearing UI you can just hide it but it is uncomfortable.
Avatar
Then try and look at how beds spawns work
6:04 PM
Since those are at a location
Avatar
Avatar
substitute
Then try and look at how beds spawns work
Solved it with player_controller->ClientShowSpawnUI(-1);
👍 1
Avatar
Hello, I wanted to ask if anyone has ever tried to include a websocket client in a plugin and respond to events. I'm currently stuck with my c++ knowledge because I can't find a lib that I can include without compilation errors.
Avatar
Avatar
Amadon
Hello, I wanted to ask if anyone has ever tried to include a websocket client in a plugin and respond to events. I'm currently stuck with my c++ knowledge because I can't find a lib that I can include without compilation errors.
I haven't tried it, but I expect there will be errors. It's clear that the library doesn't follow the Unreal Engine's Thread method. So there will be an error. It would be annoying if you had to use websocket, but it is to implement the websocket client in the thread method of Unreal Engin. A simple way is to share data with db(mysql).
Avatar
You can integrate some socket libraries into the plugin, just need to do correct linkage and initialization of them (edited)
Avatar
I think on the webpage the linked arkserver-api version is 3.54 and is not up to date
Avatar
Since websockets are event-based, threads will be essential. It is different from normal socket .
Avatar
Avatar
Amadon
Hello, I wanted to ask if anyone has ever tried to include a websocket client in a plugin and respond to events. I'm currently stuck with my c++ knowledge because I can't find a lib that I can include without compilation errors.
I have and you can but I highly advise against it
10:42 PM
HTTP and not web socket but not much different
10:42 PM
10:42 PM
My main issue to plugins doing it is if a lot use it then there should be an api to reduce the excessive use of random sockets
Avatar
Avatar
ehiu
Since websockets are event-based, threads will be essential. It is different from normal socket .
Also they aren’t really any different
10:44 PM
Most connections are event based
10:44 PM
Stuff like http is the weirdo protocol that terminates the socket once the resource is read 🙂
Avatar
So thank you very much for the answers. would not have thought that is so koplex with c++ websockets to install. But I will try the idea with the Mysql since I wanted to install sooner or later anyway a database.
Avatar
@substitute at the moment i use a netjs backend for the communication between website and ark server. but this only works one way because i realized the whole thing via rcon. through the websockest i had hoped for a clean connection but that should be possible via mysql too.
Avatar
Avatar
Amadon
@substitute at the moment i use a netjs backend for the communication between website and ark server. but this only works one way because i realized the whole thing via rcon. through the websockest i had hoped for a clean connection but that should be possible via mysql too.
Depends on how real time you want it
11:33 PM
If it’s a private plugin you can use whatever protocol you want
11:33 PM
Even just a raw socket
Avatar
immediately of course 😄
11:34 PM
at the moment it's all still on a private server when everything works and i'm satisfied i actually wanted to publish it
Avatar
Consider if you really need real time
11:35 PM
If you do, you can make a socket and use that
Avatar
i think the main problem is that i've only been working with c++ for 2 weeks. i've been thinking about writing the dll in go and binding it but i'm not convinced yet that it will work properly with the UE.
Avatar
Avatar
Amadon
i think the main problem is that i've only been working with c++ for 2 weeks. i've been thinking about writing the dll in go and binding it but i'm not convinced yet that it will work properly with the UE.
If you’re that new to C++ you are going to probably struggle with sockets
11:39 PM
There’s no c++ sockets standard library
11:40 PM
So you are stuck with C sockets and whatever you can find online for C++ (edited)
11:40 PM
Personally I like crow for http and I think it can do web socket
11:41 PM
A Fast and Easy to use microframework for the web.
Avatar
that's the problem i found a lot about boost /beast and tried it but i can't get it to compile with ArkApi in a project ... i think it's related to the c++ standard since beast was built for 11 and ArkApi for 17
Avatar
17 is backwards compatible with 11
11:42 PM
If you use vcpkg it compiles the libraries using whatever standard your project uses
Avatar
that's what i thought too only as soon as i put beast in a project with 17 i get >100 errors 😦
Avatar
Dunno
11:43 PM
I got crow to work without issues
11:43 PM
It’s what I used for this
🔥 1
11:43 PM
Where crow was a web api
11:43 PM
The web page just made post requests to the server
Avatar
I will definitely try it out about such tips I am always happy
11:44 PM
reads similar to a golang script 🙂
Avatar
How does the velocity work in FVector? Found it in this function AShooterPlayerController->ClientAddFloatingText_Implementation
Avatar
Avatar
SR
How does the velocity work in FVector? Found it in this function AShooterPlayerController->ClientAddFloatingText_Implementation
It’s directional
4:40 PM
A vector matrix is just one representation of a vector
4:40 PM
The other is magnitude + angle
Avatar
Avatar
substitute
A vector matrix is just one representation of a vector
So... to set speed I need to set any axis with a number?
9:42 PM
For example FVector(0, 1, 0) or it needs to be a direction like FVector::up? (edited)
Avatar
Avatar
SR
So... to set speed I need to set any axis with a number?
Let’s assume in the vector, we have xyz where y is up/down, x is forward/backward (relative to no rotation) and z is left/right
11:14 PM
Let’s also assume FVector::Up is [0,1,0] (unit vector)
11:14 PM
And let’s assume you want to apply a 10 unit force in the up direction
11:15 PM
You first get the unit vector of your direction (magnitude = 1) and scale it by your force scalar to get your vector (edited)
11:15 PM
So in our case 10[0,1,0] -> [0,10,0]
Avatar
I'm just curious maybe someone used this function? Can't find out what is wrong with my arguments. AShooterPlayerController::ClientAddFloatingText_Implementation Visual Studio doesn't give any errors. No text in ARK and logs/console. player_controller->ClientAddFloatingText_Implementation(player_controller->DefaultActorLocationField(), &pp, FColorList::Green, 100, 100, 100, FVector(0, 1, 0), 100, 5, 5);
Avatar
Pretty sure functions starting with “Client” execute on clients only
Avatar
If I remember from testing, that function only works with the non implementation one, not sure why. Hooks don't fire in the impl version either
Avatar
Avatar
substitute
Pretty sure functions starting with “Client” execute on clients only
Yeah I'm executing it with client
Avatar
Avatar
Pelayori
If I remember from testing, that function only works with the non implementation one, not sure why. Hooks don't fire in the impl version either
True, this thing wasn't working because of _implementation
7:01 PM
strange
Avatar
The impl one is probably client code, and the normal one is a RPC that is sent to client
Avatar
How to get AShooterPlayerController from AActor?
Avatar
AActor may not be a shooter player
10:34 PM
You need to downcast from AActor to AShooterCharacter
10:35 PM
And then if it casts, you can access the controller variable
Avatar
Avatar
substitute
You need to downcast from AActor to AShooterCharacter
I've got the controller out of aactor and casted it into the thing I wanted. (I'll edit this message tmrw and attach code for people like me) UPD: AShooterPlayerController* causer = static_cast<AShooterPlayerController*>(AActor->GetInstigatorController()); (edited)
Avatar
🐨Dream Doctor🦘 10/14/2022 6:57 AM
Can anyone help me understand why this code fails only when it's in a class? void TestClass::DoCallBack(bool Success, std::string Response) { // Do Something } void TestClass::SubmitRequest(std::string URL, AShooterPlayerController* player) { API::Requests::Get().CreateGetRequest("http://www.testurl.com", &TestClass::DoCallBack); } Fails with this message: no suitable constructor exists to convert from "void (TestClass::*)(bool Success, std::string Response)" to "std::function<void (bool, std::string)>" This code works: void DoCallBack(bool Success, std::string Response) { // Do Something } void SubmitRequest(std::string URL, AShooterPlayerController* player) { API::Requests::Get().CreateGetRequest("http://www.testurl.com", &DoCallBack); } (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Can anyone help me understand why this code fails only when it's in a class? void TestClass::DoCallBack(bool Success, std::string Response) { // Do Something } void TestClass::SubmitRequest(std::string URL, AShooterPlayerController* player) { API::Requests::Get().CreateGetRequest("http://www.testurl.com", &TestClass::DoCallBack); } Fails with this message: no suitable constructor exists to convert from "void (TestClass::*)(bool Success, std::string Response)" to "std::function<void (bool, std::string)>" This code works: void DoCallBack(bool Success, std::string Response) { // Do Something } void SubmitRequest(std::string URL, AShooterPlayerController* player) { API::Requests::Get().CreateGetRequest("http://www.testurl.com", &DoCallBack); } (edited)
It’s in a class?
7:55 AM
And it’s not static?
7:56 AM
Then it fails because there’s an implicit first arg of the type named “this”
7:56 AM
Class foo { void bar(int arg); } (edited)
7:56 AM
Is actually
7:56 AM
void bar(foo* this, int arg); (edited)
7:57 AM
Not void bar(int arg);
Avatar
Avatar
substitute
It’s in a class?
🐨Dream Doctor🦘 10/14/2022 8:30 AM
Thanks Sub. Yes it's in a class. That would explain it. Any idea how I would work around that, given CreateGetRequest expects the first two arguments to be bool and string? (edited)
8:36 AM
Nvm, this seems to work: API::Requests::Get().CreateGetRequest("http://www.testurl.com", std::bind(&TestClass::DoCallBack, this, std::placeholders::_1, std::placeholders::_2));
Avatar
You're going to crash.
8:46 AM
You're not passing in the pointer to the instance of the class then
8:47 AM
Just make the function static
Avatar
Avatar
Frigoff
You're not passing in the pointer to the instance of the class then
It could work with bind assuming the callback isn’t doing a raw function pointer
9:05 AM
But I still advise against it
9:06 AM
Since it’s not really any better than marking it static
9:06 AM
Since the only “this” that’ll be passed in is the bound instance
9:06 AM
Which to me, sounds like static with extra steps 🙂
9:07 AM
@🐨Dream Doctor🦘 is there a reason you don’t want the function to be static?
Avatar
Avatar
substitute
@🐨Dream Doctor🦘 is there a reason you don’t want the function to be static?
🐨Dream Doctor🦘 10/14/2022 9:10 AM
No, I guess not. Will make it static then. Thanks guys.
Avatar
How to check if AActor is a player?
Avatar
Avatar
SR
How to check if AActor is a player?
Controller: if (actor != nullptr && actor->IsA(AShooterPlayerController::GetPrivateStaticClass())) Character: if (actor != nullptr && actor->IsA(AShooterCharacter::GetPrivateStaticClass())) How ever sometimes this can fail if the actor is in a different state and so on (edited)
Avatar
Avatar
substitute
Pretty sure functions starting with “Client” execute on clients only
For my latest discover it's not all lol
Avatar
Avatar
Foppa
Controller: if (actor != nullptr && actor->IsA(AShooterPlayerController::GetPrivateStaticClass())) Character: if (actor != nullptr && actor->IsA(AShooterCharacter::GetPrivateStaticClass())) How ever sometimes this can fail if the actor is in a different state and so on (edited)
Thank you
11:11 AM
How to use mysql for ark plugins? When I compile with mysql++.h library it gives 100+ errors. Any guides? (Fixed it after some struggling and adding everything from arkshop :D) (edited)
Avatar
Not really no 🙂
11:57 AM
But check the arkshop it has a good example on how it could be done
Avatar
RIO (Александр) 10/14/2022 6:31 PM
Hi! What function I can hook, which run at moment when player click transfer button? I found void Hook_AShooterPlayerController_ClientOnCurrentCharacterAndItemsUploaded(AShooterPlayerController* _this, unsigned __int64 TransferringPlayerDataId) but it is so late... player inventory is not valid 😦 I need player inventory at this moment
Avatar
Avatar
RIO (Александр)
Hi! What function I can hook, which run at moment when player click transfer button? I found void Hook_AShooterPlayerController_ClientOnCurrentCharacterAndItemsUploaded(AShooterPlayerController* _this, unsigned __int64 TransferringPlayerDataId) but it is so late... player inventory is not valid 😦 I need player inventory at this moment
This is client function here's the reason why it is so late, try using server one. (edited)
8:15 PM
DECLARE_HOOK(AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation, void, AShooterPlayerController*, UPrimalInventoryComponent*); void Hook_AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation(AShooterPlayerController* _this, UPrimalInventoryComponent* inventoryComp) { AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation_original(_this, inventoryComp); } ArkApi::GetHooks().SetHook("AShooterPlayerController.ServerUploadCurrentCharacterAndItems_Implementation", &Hook_AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation, &AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation_original); ArkApi::GetHooks().DisableHook("AShooterPlayerController.ServerUploadCurrentCharacterAndItems_Implementation", &Hook_AShooterPlayerController_ServerUploadCurrentCharacterAndItems_Implementation);
Avatar
Avatar
SR
This is client function here's the reason why it is so late, try using server one. (edited)
RIO (Александр) 10/14/2022 8:30 PM
thank u so much for help! have a nice day 🙂
Avatar
anyone help me . how to wipe ARK server and the database plugin
Avatar
Avatar
EviL
anyone help me . how to wipe ARK server and the database plugin
wrong server
Avatar
Avatar
SR
wrong server
where i can ask about my problem plz 😦
Avatar
Avatar
EviL
where i can ask about my problem plz 😦
GSH | MrOwlSky 10/16/2022 7:12 PM
For general tech support you would need to go to #【👑】ᴘᴀʀᴛɴᴇʀꜱ discord. This one is for plugin and resource development revolving around the API framework.
Avatar
What is error 1114? Any possible ways to fix it? (Additional info: Permissions and mysql lib from ark shop used as dependencies config is valid) (edited)
Avatar
Avatar
SR
What is error 1114? Any possible ways to fix it? (Additional info: Permissions and mysql lib from ark shop used as dependencies config is valid) (edited)
Error 1114 is a plugin is failing to load properly
Avatar
Avatar
substitute
Error 1114 is a plugin is failing to load properly
Load event?
10:06 PM
oh well
10:06 PM
it is error 126 now (edited)
Avatar
What is error 126?
Avatar
jraServerAPI 10/17/2022 2:40 PM
search this discord for: 126
Avatar
Avatar
jraServerAPI
search this discord for: 126
doesn't give info for my case
3:08 PM
When I get rid of 1114 it gives me 126
3:08 PM
When I'm trying to get rid of 126 it gives me 1114 :D
Avatar
126 is a missing dependency
Avatar
Avatar
Lethal
126 is a missing dependency
How to know what dependency? I've added mysqllibrary to the plugin recently.
6:36 PM
Where to add dependency?
Avatar
You are missing another plugin required for that to work or a DLL etc on your windows box.
Avatar
Avatar
Lethal
You are missing another plugin required for that to work or a DLL etc on your windows box.
Is it possible to find out what's missing?
10:44 PM
I've included mysql and permissions for the plugin. (Permissions was working before so it isn't the main problem) Things started to get buggy after adding mysql.
Avatar
If you copied how to do mysql from ArkShop it was probably the beta code which required OpenSSL. I just merged in the new beta code removing the SSL code so you may want to pull that down and replace the mysql lib and includes. (edited)
Avatar
How to reject player join with reason? (using HandleNewPlayer Event with kick function just crashes the game, not server) (edited)
Avatar
I did something like that here
5:15 PM
Substitute submitted a new resource: Anti-FamilyShare - Kicks users that are using Steam Family Share. Tired of banned players coming back by exploiting Steam's family share? Wish to only allow accounts that actually own Ark to join? This plugin preforms the check that Official Servers use to...
5:15 PM
I’ll look for the code
Avatar
Avatar
substitute
I’ll look for the code
Did you find the code?
Avatar
Avatar
SR
Did you find the code?
I am not home
Avatar
Is it possible to log the server crash/error/world unload?
Avatar
Any ideas? (edited)
Avatar
To log a crash you’d have to make the server a child process of your monitor program
5:22 PM
Or attach your monitor program as a debugger
Avatar
Avatar
substitute
To log a crash you’d have to make the server a child process of your monitor program
need to do something that triggers on crash but on server side. Not something external
8:37 PM
I saw people doing this and saving the world right on server crash.
Avatar
jraServerAPI 10/27/2022 8:47 PM
Plugin will automatically restart your server when it crashed. It will also attempt to save the world after the crash (no rollbacks anymore). Notice: Make sure you do a regular backups if you want to use save world function. Configuration: {...
Avatar
This doesn’t catch fatal crashes I think
9:19 PM
Stuff like plugin error
9:19 PM
Only should catch UE4 crashes
9:19 PM
Would need to see the code to really know what it can and can’t handle
Avatar
Avatar
substitute
Would need to see the code to really know what it can and can’t handle
yea it will be good to see the code too.
Avatar
Avatar
substitute
Only should catch UE4 crashes
It should be ok for the player-sided crashes that need to be logged in the first place.
Avatar
It logs crashes that are reported by the ue4 crash reporter, which includes most plugin crashes in the main game thread
Avatar
Avatar
Pelayori
It logs crashes that are reported by the ue4 crash reporter, which includes most plugin crashes in the main game thread
Won’t handle a segfault due to a null ptr 😛
9:26 PM
I assume the restart step is just a fork()?
Avatar
its a new process with the same command line args passed
9:27 PM
and then after creating that new process the old one is closed
9:27 PM
9:31 PM
This plugin is very good for unexpected stuff.
Avatar
Avatar
Pelayori
and then after creating that new process the old one is closed
Yea
9:49 PM
That’s fork() basically
👍 1
Avatar
Is it possible to edit lava golem cooldown timer? (edited)
Avatar
Not from a plugin.
Avatar
Avatar
Pelayori
Not from a plugin.
Ok then. How to get blueprint name from a AShooterWeapon or anything else that can get "UClass"? (edited)
Avatar
Avatar
SR
Ok then. How to get blueprint name from a AShooterWeapon or anything else that can get "UClass"? (edited)
jraServerAPI 10/31/2022 6:30 PM
Use the API of course 🙂 Have you looked through any of the open source examples?
Avatar
Avatar
jraServerAPI
Use the API of course 🙂 Have you looked through any of the open source examples?
yeah but didn't see this stuff
6:31 PM
or I'm just blind
Avatar
jraServerAPI 10/31/2022 6:32 PM
search this discord?
6:33 PM
a lot of answers can also be found in here you just have to search for them
6:33 PM
the word "blueprint" alone has over 9 pages of results 🙂
6:36 PM
the api has functions for getting blueprint paths ArkApi::GetApiUtils().GetBlueprint() etc...
Avatar
Avatar
jraServerAPI
the api has functions for getting blueprint paths ArkApi::GetApiUtils().GetBlueprint() etc...
oh wait didn't think about that
Avatar
Turret filler, Turret Manager.... and then the free option soon to be released Turret Controller 🙂
Avatar
Avatar
SR
Is it possible to edit lava golem cooldown timer? (edited)
I didn't test it much at all, but adjusting the Golem's cooldown timer (that gets set in the cave's event graph) seems to get the job done. I tried setting the cooldown to 10 minutes. The client "Boss is on cooldown for X minutes" notification accurately reflected my change and the boss was available again after just 10 minutes. c++ // void __fastcall UKismetSystemLibrary::K2_SetTimer(UObject *Object, FString FunctionName, float Time, bool bLooping) DECLARE_HOOK(UKismetSystemLibrary_K2_SetTimer, void, UObject*, FString, float, bool); void Hook_UKismetSystemLibrary_K2_SetTimer(UObject* Object, FString FunctionName, float Time, bool bLooping) { float newTime = Time; if ((Object->NameField().ToString().ToString() == "Ragnarok_A1_Cave_C_0") && (FunctionName.ToString() == "Cooldown Timer")) newTime = 600; // 10 minute cooldown UKismetSystemLibrary_K2_SetTimer_original(Object, FunctionName, newTime, bLooping); }
Avatar
Avatar
TheMollusk
I didn't test it much at all, but adjusting the Golem's cooldown timer (that gets set in the cave's event graph) seems to get the job done. I tried setting the cooldown to 10 minutes. The client "Boss is on cooldown for X minutes" notification accurately reflected my change and the boss was available again after just 10 minutes. c++ // void __fastcall UKismetSystemLibrary::K2_SetTimer(UObject *Object, FString FunctionName, float Time, bool bLooping) DECLARE_HOOK(UKismetSystemLibrary_K2_SetTimer, void, UObject*, FString, float, bool); void Hook_UKismetSystemLibrary_K2_SetTimer(UObject* Object, FString FunctionName, float Time, bool bLooping) { float newTime = Time; if ((Object->NameField().ToString().ToString() == "Ragnarok_A1_Cave_C_0") && (FunctionName.ToString() == "Cooldown Timer")) newTime = 600; // 10 minute cooldown UKismetSystemLibrary_K2_SetTimer_original(Object, FunctionName, newTime, bLooping); }
6:51 PM
Thank you
Avatar
Avatar
TheMollusk
I didn't test it much at all, but adjusting the Golem's cooldown timer (that gets set in the cave's event graph) seems to get the job done. I tried setting the cooldown to 10 minutes. The client "Boss is on cooldown for X minutes" notification accurately reflected my change and the boss was available again after just 10 minutes. c++ // void __fastcall UKismetSystemLibrary::K2_SetTimer(UObject *Object, FString FunctionName, float Time, bool bLooping) DECLARE_HOOK(UKismetSystemLibrary_K2_SetTimer, void, UObject*, FString, float, bool); void Hook_UKismetSystemLibrary_K2_SetTimer(UObject* Object, FString FunctionName, float Time, bool bLooping) { float newTime = Time; if ((Object->NameField().ToString().ToString() == "Ragnarok_A1_Cave_C_0") && (FunctionName.ToString() == "Cooldown Timer")) newTime = 600; // 10 minute cooldown UKismetSystemLibrary_K2_SetTimer_original(Object, FunctionName, newTime, bLooping); }
Oh hmm, I didn't even bother since I thought the cooldown wouldn't update on client.
8:35 PM
I am a bit dumb on how does the set timer from server updates the client one though.
Avatar
How to handle http requests sent to the server? For example: https://127.0.0.1/stop
Avatar
Avatar
SR
How to handle http requests sent to the server? For example: https://127.0.0.1/stop
Write or use an http server as a plugin lol
Avatar
Avatar
substitute
Write or use an http server as a plugin lol
Wait I can do a server in a plugin? Sounds interesting 😂
Avatar
Avatar
SR
Wait I can do a server in a plugin? Sounds interesting 😂
Avatar
Avatar
TheMollusk
I didn't test it much at all, but adjusting the Golem's cooldown timer (that gets set in the cave's event graph) seems to get the job done. I tried setting the cooldown to 10 minutes. The client "Boss is on cooldown for X minutes" notification accurately reflected my change and the boss was available again after just 10 minutes. c++ // void __fastcall UKismetSystemLibrary::K2_SetTimer(UObject *Object, FString FunctionName, float Time, bool bLooping) DECLARE_HOOK(UKismetSystemLibrary_K2_SetTimer, void, UObject*, FString, float, bool); void Hook_UKismetSystemLibrary_K2_SetTimer(UObject* Object, FString FunctionName, float Time, bool bLooping) { float newTime = Time; if ((Object->NameField().ToString().ToString() == "Ragnarok_A1_Cave_C_0") && (FunctionName.ToString() == "Cooldown Timer")) newTime = 600; // 10 minute cooldown UKismetSystemLibrary_K2_SetTimer_original(Object, FunctionName, newTime, bLooping); }
This hook doesn't fire for some unknown reasons.
Avatar
hi guys, is it possible to disable a plugin update and enable it back without shutting down the server ?
Avatar
jraServerAPI 11/6/2022 6:07 PM
not sure what you mean, but you can load and unload plugins during runtime (if they support it) using plugins.load PluginName plugins.unload PluginName
👌 1
6:08 PM
the PluginName is case sensitive
6:12 PM
however, some plugins will crash when you do this ..soo good luck!
Avatar
Avatar
jraServerAPI
not sure what you mean, but you can load and unload plugins during runtime (if they support it) using plugins.load PluginName plugins.unload PluginName
btw how to make it supported? :d
Avatar
Detach all your hooks
Avatar
Hooks, timer callbacks, tick callbacks and threads (if you use any)
Avatar
jraServerAPI 11/12/2022 7:45 AM
I mentioned this before to Wetbatman a while back, and he liked the idea, but I don't think it went much further than that. Using the real time save/unload/load ability with the PluginName.dll.arkapi file works great, but sometimes it's more convenient to perform the update on next server restart. Could we get something like a PluginName.dll.arkapinext extension that would do just that? Many thanks!
Avatar
Avatar
jraServerAPI
I mentioned this before to Wetbatman a while back, and he liked the idea, but I don't think it went much further than that. Using the real time save/unload/load ability with the PluginName.dll.arkapi file works great, but sometimes it's more convenient to perform the update on next server restart. Could we get something like a PluginName.dll.arkapinext extension that would do just that? Many thanks!
You can do that already
10:07 AM
Just disable plugin reloading on arl API config json
Avatar
Is it possible to check if player is in attacker(other player) sight?
Avatar
Yes, the easiest way is to use UVictoryCore::ActorHasLineOfSight
10:22 PM
You pass from actor, and to actor, and it returns true/false. Also AActor** OutBlockingActor (out parameter) will return the actor that is blocking the LOS (edited)
10:23 PM
More cumbersome way: do a line trace yourself and handle it
Avatar
Avatar
Pelayori
Yes, the easiest way is to use UVictoryCore::ActorHasLineOfSight
Is it working if player is only in FOV (for example) or in a straight line where actor is looking at?
10:24 PM
just to be sure
Avatar
Both approaches will work the way you want, but the first one is easier, as in the second one you have to calculate start and end yourself, and to calculate the end location forward vectors are involved
Avatar
Avatar
Pelayori
Yes, the easiest way is to use UVictoryCore::ActorHasLineOfSight
Can't find the function
Avatar
Probably not defined
10:26 PM
bool UVictoryCore::ActorHasLineOfSight( AActor *FromActor, AActor *ToActor, AActor **OutBlockingActor, FVector *ToActorOffset, ECollisionChannel Channel, float DebugDrawDuration)
Avatar
Still tries to throw out strange errors.
10:27 PM
Maybe I need to include something?
Avatar
You need to define the function
Avatar
Avatar
Pelayori
You need to define the function
I'm a bit new to C++ how to do this? 😅
Avatar
bool ActorHasLineOfSight(AActor* FromActor, AActor* ToActor, AActor** OutBlockingActor, FVector* ToActorOffset, ECollisionChannel Channel, float DebugDrawDuration) { return NativeCall<bool, AActor*, AActor*, AActor**, FVector*, ECollisionChannel, float>(nullptr, "UVictoryCore.ActorHasLineOfSight", FromActor, ToActor, OutBlockingActor, ToActorOffset, Channel, DebugDrawDuration); }
10:37 PM
Add that to UVictoryCore
Avatar
Avatar
Pelayori
bool ActorHasLineOfSight(AActor* FromActor, AActor* ToActor, AActor** OutBlockingActor, FVector* ToActorOffset, ECollisionChannel Channel, float DebugDrawDuration) { return NativeCall<bool, AActor*, AActor*, AActor**, FVector*, ECollisionChannel, float>(nullptr, "UVictoryCore.ActorHasLineOfSight", FromActor, ToActor, OutBlockingActor, ToActorOffset, Channel, DebugDrawDuration); }
How to get the ToActorOffset? Also what the ECollisionChannel does?
10:44 PM
Is it ok to put just actor position?
Avatar
actor offset should be a pointer to a vector full of zeros usually
10:50 PM
for channel use channel 2 (weapon channel) (edited)
Avatar
Avatar
Pelayori
actor offset should be a pointer to a vector full of zeros usually
is it ok to set 0 for checktime?
Avatar
Checktime?
Avatar
Avatar
Pelayori
Checktime?
DebugDrawDuration
Avatar
You can pass 0 to that yeah
Avatar
Avatar
Pelayori
bool ActorHasLineOfSight(AActor* FromActor, AActor* ToActor, AActor** OutBlockingActor, FVector* ToActorOffset, ECollisionChannel Channel, float DebugDrawDuration) { return NativeCall<bool, AActor*, AActor*, AActor**, FVector*, ECollisionChannel, float>(nullptr, "UVictoryCore.ActorHasLineOfSight", FromActor, ToActor, OutBlockingActor, ToActorOffset, Channel, DebugDrawDuration); }
Looks like it works but there is a small problem. When you fly far away it starts throwing false.
11:38 AM
here's how I tried to fix it. (tried setting actual actor offset) but it doesn't help. bool boolean = UVictoryCore::ActorHasLineOfSight(DamageCauser, _this, &b, &_this->DefaultActorLocationField(), ECollisionChannel::ECC_GameTraceChannel2, 0);
11:39 AM
it works different* (edited)
11:41 AM
When you are nearby zero coordinate or the place where you joined everything works. But then it stops.
11:41 AM
so it is somehow bound to the antimesh system.
Avatar
You should not pass default actor loc as an offset
Avatar
Avatar
Pelayori
You should not pass default actor loc as an offset
Setting 0 0 0 gives nothing
6:34 PM
Still the same result
Avatar
You can try tracing yourself then
Avatar
Avatar
Pelayori
You can try tracing yourself then
is it possible to get exact player position?
Avatar
_this->RootComponentField()->RelativeLocationField()
6:38 PM
This and much more is shown in open source repo of ark plugins
Avatar
Avatar
Pelayori
This and much more is shown in open source repo of ark plugins
I don't know why but it still counts my last saved position :/
7:01 PM
maybe there is an easy way to verify gunshot?
7:01 PM
just need to be sure that attacker points at this person to get rid of lag switches. (edited)
Avatar
Game uses actor has line of sight, so not sure
Avatar
Avatar
SR
I don't know why but it still counts my last saved position :/
jraServerAPI 11/14/2022 7:15 PM
you should use GetWorldLocation() instead from AShooterCharacter c++ FVector vLoc; auto player = static_cast<AShooterCharacter*>(player_controller->CharacterField()); player->RootComponentField()->GetWorldLocation(&vLoc); // get location (edited)
Avatar
Avatar
SR
maybe there is an easy way to verify gunshot?
I suggest you hook the shot and check there
7:20 PM
Then you get all the data you need from the hitresult
Avatar
Avatar
Frigoff
I suggest you hook the shot and check there
Let me try the idea with lines
Avatar
Not sure with what shooting has to do with lag switches?
Avatar
Avatar
Frigoff
Not sure with what shooting has to do with lag switches?
shooting is client side drunkcard
7:22 PM
I don't know how this works but even if you JUST disable the internet and beam someone
Avatar
Avatar
SR
Let me try the idea with lines
You’ll always be using a line trace
Avatar
it regs everything
Avatar
Your fix won’t fix that, you’ll need to implement the fix that WC did for official
7:24 PM
You’ll be taking what the client sends you
7:25 PM
Computing and verifying and then continuing
7:26 PM
Keep in mind any additional latency you add will affect all shots since ARK doesn’t have any backwards network shot lag compensation
Avatar
I'm trying to do the first fix just to try. Then I'll be playing with different settings and different fixes.
👍 1
Avatar
How to get actor from FHitResult?
Avatar
Should be a FWeakObjectPtr iirc and you can do can call the Get method on it
Avatar
Avatar
Frigoff
Should be a FWeakObjectPtr iirc and you can do can call the Get method on it
Yeah, ActorField().Get(false) is the solution. (edited)
Avatar
Hi, is there a documentation where we can find an API reference?
Avatar
There isn't a wiki, the api is source code, and there's a open source repo full of examples of how to create plugins
Avatar
For example plugin do you mean an already made plugin or a skeleton?
Avatar
Already made plugins. But there's a template around from Substitute, let me find it
8:39 PM
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
8:39 PM
(From @substitute )
Avatar
Thank you
Avatar
Also there's a google doc on how to setup visual studio for plugins, #【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ
Avatar
is the website down?
Avatar
Yep
9:14 PM
@GSH | MrOwlSky
Avatar
GSH | MrOwlSky 11/16/2022 9:15 PM
Yeah it's being worked on at the moment. OVH is doing some maintenance on the VPS to upgrade storage space
👍 2
Avatar
Hi, is there a way to reload the plugins without having to restart the server (for development) (ARK)? (edited)
Avatar
unload and reload the plugin
Avatar
Avatar
Frigoff
unload and reload the plugin
is it commands?
Avatar
Avatar
EnoPM
Hi, is there a way to reload the plugins without having to restart the server (for development) (ARK)? (edited)
plugins.unload <pluginname> & plugins.load <pluginname>
Avatar
Thank you
Avatar
Avatar
Foppa
plugins.unload <pluginname> & plugins.load <pluginname>
in ark console?
11:39 PM
because i can't replace my dll file
Avatar
unload, replace, load
Avatar
Avatar
Frigoff
unload, replace, load
I tried, I typed plugins.unload NameOfPlugin in ARK console
11:48 PM
Maybe I misunderstood something, is it in this console that I have to type my command?
Avatar
Avatar
EnoPM
Maybe I misunderstood something, is it in this console that I have to type my command?
RCON
11:50 PM
Also if you type plugins.load [pluginname] it is bound to tHiS be careful.
Avatar
Avatar
EnoPM
Hi, is there a way to reload the plugins without having to restart the server (for development) (ARK)? (edited)
rename your new DLL to be whateverplugin.dll.arkapi and put in the plugin folder the api will auto load the new dll for you
Avatar
Avatar
EnoPM
Maybe I misunderstood something, is it in this console that I have to type my command?
if you are doing it in-game, you need to add "Cheat" or "AdminCheat" cheat plugins.unload <pluginname> cheat plugins.load <pluginname> By RCON it's only: plugins.unload <pluginname> plugins.load <pluginname>
11:32 AM
Or do as Lethal suggested it's practically the same
Avatar
Thank you for your answers, Adding the .arkapi extension to my new .dll file seems to work however when I try to unload my plugin with the command plugins.unload EnoPlugin I get this error message: Failed to unload plugin - Plugin enoplugin is not loaded and I cannot overwrite my dll file. Here is my test code: c++ #include "EnoPlugin.h" /** * -- Header file contains -- * #include "API/Ark/Ark.h" * #pragma comment(lib, "ArkApi.lib") **/ namespace Colors { const FLinearColor Red = *new FLinearColor(255, 0, 0); const FLinearColor Green = *new FLinearColor(102, 255, 51); } void HandleTestCommand (AShooterPlayerController* player, const FString* arguments, EChatSendMode::Type mode) { FString text = L"Command /test executed with arguments \"" + *arguments + "\""; player->ClientServerChatDirectMessage(&text, Colors::Green, false); } void Load() { Log::Get().Init("EnoPlugin"); ArkApi::GetCommands().AddChatCommand("/test", &HandleTestCommand); } void Unload() { ArkApi::GetCommands().RemoveChatCommand("/test"); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); break; default: break; } return TRUE; }
12:39 PM
I think I'm doing something wrong but I tried to follow the structure of other plugins
Avatar
I tried with the ArkShop plugin and I have the same problem. I think it comes from the latest version of ARK API
Avatar
Avatar
EnoPM
Thank you for your answers, Adding the .arkapi extension to my new .dll file seems to work however when I try to unload my plugin with the command plugins.unload EnoPlugin I get this error message: Failed to unload plugin - Plugin enoplugin is not loaded and I cannot overwrite my dll file. Here is my test code: c++ #include "EnoPlugin.h" /** * -- Header file contains -- * #include "API/Ark/Ark.h" * #pragma comment(lib, "ArkApi.lib") **/ namespace Colors { const FLinearColor Red = *new FLinearColor(255, 0, 0); const FLinearColor Green = *new FLinearColor(102, 255, 51); } void HandleTestCommand (AShooterPlayerController* player, const FString* arguments, EChatSendMode::Type mode) { FString text = L"Command /test executed with arguments \"" + *arguments + "\""; player->ClientServerChatDirectMessage(&text, Colors::Green, false); } void Load() { Log::Get().Init("EnoPlugin"); ArkApi::GetCommands().AddChatCommand("/test", &HandleTestCommand); } void Unload() { ArkApi::GetCommands().RemoveChatCommand("/test"); } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: Load(); break; case DLL_PROCESS_DETACH: Unload(); break; default: break; } return TRUE; }
try plugins.unload enoplugin
10:36 PM
it is case-sensitive
Avatar
Avatar
SR
it is case-sensitive
same issue
Avatar
Avatar
EnoPM
same issue
is it loaded?
Avatar
Avatar
SR
is it loaded?
I can execute my chat command but in rcon when I do plugins.unload enoplugin I have Failed to unload plugin - Plugin enoplugin is not loaded
10:49 PM
If I load or I unload my plugin that doesn't prevent it from working
Avatar
Avatar
EnoPM
I can execute my chat command but in rcon when I do plugins.unload enoplugin I have Failed to unload plugin - Plugin enoplugin is not loaded
plugins.load enoplugin
Avatar
Avatar
SR
plugins.load enoplugin
it tells me that the plugin has been loaded successfully
Avatar
Avatar
EnoPM
it tells me that the plugin has been loaded successfully
try unloading it
Avatar
Avatar
SR
try unloading it
it unloads it but I still can't delete/overwrite the file
Avatar
Avatar
EnoPM
it unloads it but I still can't delete/overwrite the file
147 bytes
Avatar
I make this change and restart the server, I'll let you know
Avatar
Avatar
SR
Click to see attachment 🖼️
same issue
Avatar
Avatar
EnoPM
same issue
can't load?
11:00 PM
where did you put the config.json
11:00 PM
..\ShooterGame\Binaries\Win64?
Avatar
Avatar
SR
..\ShooterGame\Binaries\Win64?
yes
Avatar
Avatar
EnoPM
yes
interesting
11:00 PM
try load/unload
Avatar
Avatar
SR
try load/unload
always not
Avatar
Avatar
EnoPM
always not
it is case sensitive
11:01 PM
try
11:01 PM
plugins.unload EnoPlugin
Avatar
Avatar
SR
plugins.unload EnoPlugin
ok it works from the game console, I think the problem was with the software I was using to run the RCON commands (ARKon)
Avatar
How to handle web requests with C++? For example: click a button on a website and it gives you a dodo.
Avatar
Avatar
SR
How to handle web requests with C++? For example: click a button on a website and it gives you a dodo.
there are some plugins that do that for you
Avatar
Avatar
x3R07YP3
there are some plugins that do that for you
link?
9:09 PM
I need some source code
Avatar
I think extended rcom can do that, it's on the official github
Avatar
Avatar
x3R07YP3
I think extended rcom can do that, it's on the official github
this plugin adds some external commands for RCON
9:13 PM
nothing that I need
Avatar
https://fremnet.net/article/199/source-rcon-class you can make the requests from rcon on the web server with this
Avatar
SuperboySebi 11/23/2022 9:16 PM
Hi All, I'm experiencing issues since the last official ark update which was released yesterday in the evening. After my hosted g-portal servers got the update they are not booting up any more. Always just stops after loading Ark API. Right before loading the savegame I assume? Getting a crashstack which I can't really read anything out of. Also in the last log which is from before the restart there are no issues. Already tried to unload the API but the servers still don't start up. Also with older savegames loaded. Any experience which is similar or any ideas how I could move on to fix it? (edited)
Avatar
jraServerAPI 11/23/2022 9:30 PM
post the crashstack anyway
Avatar
SuperboySebi 11/23/2022 9:42 PM
Here you go:
Avatar
SuperboySebi 11/23/2022 9:55 PM
And this is the API log, which suddenly ends after loading, actually I don't exactly know what happens at this time in the loading order: 11/23/22 20:39 [API][info] ----------------------------------------------- 11/23/22 20:39 [API][info] ARK: Server Api V3.54 11/23/22 20:39 [API][info] Loading... 11/23/22 20:39 [API][info] Dumping structures.. 11/23/22 20:39 [API][info] Dumping functions.. 11/23/22 20:39 [API][info] Dumping globals.. 11/23/22 20:39 [API][info] Successfully read information from PDB 11/23/22 20:39 [API][info] Initialized hooks 11/23/22 20:39 [API][info] API was successfully loaded 11/23/22 20:39 [API][info] -----------------------------------------------
Avatar
Try starting with a fresh map save if that fails then verify server files.
10:13 PM
Once you can boot with a fresh save switch back to your existing map save and try once more.
Avatar
SuperboySebi 11/23/2022 10:14 PM
That sounds like a plan, will instantly try this 🙏
Avatar
Avatar
Lethal
Try starting with a fresh map save if that fails then verify server files.
SuperboySebi 11/23/2022 10:50 PM
This also didn't work. Backed up my save files, deleted them all on the server, tried to boot, didn't work. Verified server files, tried to boot, didn't work. Also I just figured out that the server doesn't even create a new save file before it crashes. Currently it has no savegame at all.
Avatar
SuperboySebi 11/23/2022 11:25 PM
Again tried to uninstall Ark API and the server still doesn't boot. I think the time of the crash (right after loading the API) is coincidence and the crashes are more dependent on another module that is being loaded in the background. Any more ideas?
Avatar
jraServerAPI 11/23/2022 11:26 PM
reboot the server? look for failures?
Avatar
SuperboySebi 11/23/2022 11:27 PM
Server was rebooted just now, still the same issue :/
Avatar
Avatar
SuperboySebi
Again tried to uninstall Ark API and the server still doesn't boot. I think the time of the crash (right after loading the API) is coincidence and the crashes are more dependent on another module that is being loaded in the background. Any more ideas?
that stacktrace points to the issue being from the game server
11:28 PM
the entire stacktrace starting at __tmainCRTStartup all the way to the crashing function ULinkerLoad::Preload() are all from ShooterGameServer.exe
Avatar
Avatar
substitute
the entire stacktrace starting at __tmainCRTStartup all the way to the crashing function ULinkerLoad::Preload() are all from ShooterGameServer.exe
SuperboySebi 11/23/2022 11:30 PM
So I assume this error should be fixed by verifying game files right? But that didn't work either... Also the files should not be corrupt from WC since the problem seems to be very uncommon right now.
Avatar
Avatar
SuperboySebi
So I assume this error should be fixed by verifying game files right? But that didn't work either... Also the files should not be corrupt from WC since the problem seems to be very uncommon right now.
No, not at all
11:30 PM
remove any mods and any save data
11:31 PM
or alternatively, completely nuke your install and reinstall the server
👍 1
😭 1
11:31 PM
verifying files doesn't help if the game crashes when reading save/config/mod data (edited)
Avatar
Avatar
substitute
or alternatively, completely nuke your install and reinstall the server
SuperboySebi 11/23/2022 11:39 PM
Will consider this after a few more tries... That's so much work right now 😕
Avatar
jraServerAPI 11/23/2022 11:40 PM
just create a new vanilla server in ASM (edited)
11:40 PM
and see if that runs
Avatar
SuperboySebi 11/24/2022 8:25 AM
Thank you for all your support, the issue was resolved by gportal support by redeploying the update. But it was a pain in the $%& to tell the support that not the api and the plugins are the reason and that they should check their host 😄
Avatar
yup,
9:19 AM
funny that they wouldn't just use their eyes and read the stack trace
Avatar
Hello I always get these error messages on different cards. If I restart the server then it is gone, but comes sooner or later when restarting again. Sometimes a few days everything is ok then there are again 2 or 3 at once. I have the probelm with almost all maps. Hatt gemand an idea what that could be or how I can fix it? (edited)
Avatar
jraServerAPI 11/25/2022 7:21 PM
are you using the latest version of the ArkApi?
Avatar
3.55
Avatar
jraServerAPI 11/25/2022 7:42 PM
I'm still on 3.54 but it looks like something is up with the API..
7:42 PM
maybe @substitute can chime in 🙂
Avatar
the funny thing is once everything fits and another time the error is displayed
Avatar
Avatar
jraServerAPI
maybe @substitute can chime in 🙂
Only have seen the error when compiling the api / minhook with a newer VS
Avatar
Avatar
xxCPMxx
3.55
Try 3.54 if you can
Avatar
do I have to recreate the servers and delete the old ones or is there another way?
Avatar
Avatar
substitute
Try 3.54 if you can
The official releases of 3.55 and 3.54 are exactly the same version.dll build , 3.55 just includes the auto-updater
9:54 PM
Would be easy to add the MinHook error to ArkApi output, could be helpful to list successfully set hooks too.
Avatar
ok then there is probably no point I think if I restart the servers without updating them first the error message does not come up
Avatar
I'm pretty sure I've seen that from time to time on people (and even on my case), ever since I installed the api back in 2019
Avatar
Avatar
Pelayori
I'm pretty sure I've seen that from time to time on people (and even on my case), ever since I installed the api back in 2019
yes as said this error also does not come constantly So do you think I can ignore it???
Avatar
Well you should not ignore it as core features of plugin usually rely on hooks
Avatar
Avatar
Pelayori
I'm pretty sure I've seen that from time to time on people (and even on my case), ever since I installed the api back in 2019
Then we should drop minhook
10:01 PM
And use detours
10:01 PM
Never seen the issue on detours
Avatar
It could be a good thing yeah, I did not know minhook before fiddling with the api, so I am not aware of detours benefits 😄
10:02 PM
But it's true it's a common issue, specially worse this last year
Avatar
ok so i didn't do anything wrong is this just a bug?
Avatar
Avatar
xxCPMxx
ok so i didn't do anything wrong is this just a bug?
Correct, it's a bug and restarting / redownloading the dlls usually helps
Avatar
ok so good for me, bad for you 😅
10:10 PM
thanks for the answers, and good luck with the fix.
Avatar
Avatar
Pelayori
It could be a good thing yeah, I did not know minhook before fiddling with the api, so I am not aware of detours benefits 😄
Unfortunately a large quantity of plugins all rely on minhook
10:12 PM
So they’d break
Avatar
Wouldn't it be enough to change the underlying implementation of the base API, since you use helper functions to register / disable a hook (edited)
10:17 PM
Since you just pass the hook, and the trampoline
Avatar
Avatar
Pelayori
Since you just pass the hook, and the trampoline
mmmm, maybe
8:17 AM
depends on the developer I guess
8:18 AM
Personally, we should move away from SET_HOOK and DISABLE_HOOK and make them into proper functions imo
Avatar
Avatar
TheMollusk
The official releases of 3.55 and 3.54 are exactly the same version.dll build , 3.55 just includes the auto-updater
i wrote a plugin to notify me if updates were available by comparing the version returned by ArkApi::Tools::GetApiVersion() to the version in the REST API. then the version was bumped to 3.55 but the framework kept showing 3.54. at least my plugin got to do its job one time 😆 now it always thinks an update is avaiable
Avatar
There is an official updater that does this automatically.
Avatar
blackandbuewolf 11/26/2022 10:23 PM
someone know what engram entry id for awesome teleporter, remote and dino tracker is ? for ark
Avatar
automatically download mods is good. im not happy with automatically download dlls onto my server. my plugin checked for updates every few hours so i could vet them myself in source code or at least in Ida. now my tools to check specifically for updates from 3.55 since GetApiVersion() isnt up to date
Avatar
blackandbuewolf 11/26/2022 10:50 PM
im manualy typing all engrams, mod wont work since i dont have the engram typed in the ini
Avatar
Avatar
Colden
automatically download mods is good. im not happy with automatically download dlls onto my server. my plugin checked for updates every few hours so i could vet them myself in source code or at least in Ida. now my tools to check specifically for updates from 3.55 since GetApiVersion() isnt up to date
Mods have the technical ability to be as dangerous as dlls fyi
11:26 PM
It’s just significantly harder
Avatar
i can live with significantly harder with the few mods i use. been burnt too many times by unstable plugins, even the paid ones, not to mention the security risk. mod updates mean i need to update my server to keep the same version as players, no such concern with plugins
Avatar
Im attempting to use api for the first time today and followed a guide for the initial download, but somethings gone wrong and now i cant open ark
11:23 PM
When i try to open Ark now, it says "Blocked loading of file, version.dll
11:23 PM
Anyone know whats happened? I followed the guide on gameservershub (edited)
Avatar
Are you trying to use it on the ARK client?
11:24 PM
Because it only works on the server
Avatar
I guess so, oh i just read a note on the guide that says this "Please note when installing plugins into the "ARK\ShooterGame\Binaries\Win64\ArkApi\Plugins" folder, you must make sure the ".DLL" plugin name matches the same "folder" name. Changing the folder name to something different or unique will prevent the ".DLL" from reading the folder and preventing it from starting." ]
11:27 PM
That might be my issue? idk
Avatar
What is giving you the error, please post a screenshot.
Avatar
Yes, so the ARK client is protected by BattlEye and you can't use the API on it. (edited)
11:31 PM
You want to load the API on the server component
Avatar
Alright, how do i do that and how do i get rid of the api on my client side?
11:32 PM
Thanks for the help btw, i was getting very frustrated lol
Avatar
Remove the Version.dll inside that file folder
11:32 PM
If you want to host a server
11:33 PM
You will need the ARK: Survival Evolved Dedicated Server
11:33 PM
You'll put the Version.dll inside that folder
Avatar
Im using server blend to host a server, but wasnt sure how to set the api up
Avatar
You'll be putting the Version.dll wherever you're running the server binary from
11:34 PM
So if that's on a server
11:34 PM
You'll put it on your server
Avatar
I still don't know where that location is? Is the server file on my computer or in the serverblend site?
Avatar
It’s on the website
this 1
11:38 PM
Ask them to install the api
11:39 PM
For other inquiries please use something like this discord
11:40 PM
this (the one we are talking in) discord is for plugin developers and isn’t the place to ask for help with server administration
11:40 PM
The one I linked is general server help I believe
Avatar
OK thanks!
Avatar
Avatar
jraServerAPI
you should use GetWorldLocation() instead from AShooterCharacter c++ FVector vLoc; auto player = static_cast<AShooterCharacter*>(player_controller->CharacterField()); player->RootComponentField()->GetWorldLocation(&vLoc); // get location (edited)
Avatar
_this is an actor itself so you don't need to read the character field variable
Avatar
Avatar
Pelayori
_this is an actor itself so you don't need to read the character field variable
yup i fixed it thanks
9:50 PM
its c++ _this->GetInstigatorController()->CharacterField();
9:51 PM
c++ auto DamagedPlayer = static_cast<AShooterCharacter*>(_this->GetInstigatorController()->CharacterField()); _this->RootComponentField()->GetWorldLocation(&PPosition);
Avatar
You don't need the GetInstigatorController() either
9:52 PM
_this is an AActor
9:52 PM
So you could just cast to ShooterCharacter
9:53 PM
static_cast<AShooterCharacter*>(_this)
Avatar
so u mean c++ auto DamagedPlayer = static_cast<AShooterCharacter*>(_this)->CharacterField()); _this->RootComponentField()->GetWorldLocation(&PPosition); (edited)
9:57 PM
You don't need at all the CharacterField() part
9:58 PM
As _this is a Shooter Character (you check on the if)
9:58 PM
auto DamagedPlayer = static_cast<AShooterCharacter*>(_this); _this->RootComponentField()->GetWorldLocation(&PPosition);
Avatar
oh ok thanks
Avatar
Avatar
Pelayori
auto DamagedPlayer = static_cast<AShooterCharacter*>(_this); _this->RootComponentField()->GetWorldLocation(&PPosition);
yup thanks but what if i want to get the position of a structure ?
10:02 PM
i have APrimalStructure (edited)
10:02 PM
c++ float Hook_APrimalStructure_TakeDamage(APrimalStructure* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this) { uint64 attacked_tribeid = _this->TargetingTeamField(); FVector DamagedPosition = _this->DefaultActorLocationField(); } }
Avatar
Structures have a root component as well so you do it the same way using GetWorldLocation
Avatar
i found plugin using this but i think its not working for me
Avatar
jraServerAPI 11/29/2022 10:04 PM
structures will be structure->RootComponentField()->RelativeLocationField();
Avatar
Avatar
jraServerAPI
structures will be structure->RootComponentField()->RelativeLocationField();
Relative Not GetWorldLocation ?
10:10 PM
the GetWorldLocation is Exist
Avatar
jraServerAPI 11/29/2022 10:10 PM
GetWorldLocation is used on players because if you use RelativeLocationField() it will just return the last spawned position I haven't tried it on structures.. you're welcome to test and share your results (edited)
Avatar
RelativeLocation and GetWorldLocation are expected to output the same results, I tend to use RelativeLocation more but both should do the trick. It's true some devs have reported issues with relative location when operating on maps that have different level layers like valguero (ab zone, surface, etc).
10:12 PM
tl;dr; you can use whichever you like, and if causes problems you can always switch
Avatar
jraServerAPI 11/29/2022 10:14 PM
i was recently using RelativeLocationField() with a player to show the debug sphere and it always displayed where i spawned and not where i was currently standing 🙂 so thats when I switched after seeing Lethal's comment about using GetWorldLocation 🙂 (edited)
Avatar
yup i will try them now
Avatar
Avatar
jraServerAPI
i was recently using RelativeLocationField() with a player to show the debug sphere and it always displayed where i spawned and not where i was currently standing 🙂 so thats when I switched after seeing Lethal's comment about using GetWorldLocation 🙂 (edited)
I saw Lethal's comment, however I still use relative location since I use it on a variety of plugins without issues yet
10:17 PM
The root component is attached to the pawn, so it makes no sense that it stays still when it should be moving along the player's pawn (edited)
Avatar
jraServerAPI 11/29/2022 10:42 PM
yeah i just ran a test to make sure it wasnt all a dream lol
10:42 PM
https://www.youtube.com/watch?v=J5pSCGyH4BI I had already moved my character before i ran /test1 as you can see the bubble is not on center /test1 is using RelativeLocationField() (update: was using AShooterPlayerController which is why it did not move, should use AShooterCharacter instead) /test2 is using GetWorldLocation() (edited)
Avatar
jraServerAPI 11/29/2022 10:51 PM
👆 okay nevermind.. hahah this is what happens when you get the RelativeLocationField from the AShooterPlayerController and not the AShooterCharacter
10:51 PM
🤷‍♂️ 🤦‍♂️ oops 🙂
Avatar
That seems more reasonable, because if I was wrong my plugins would be all wonky lol
Avatar
jraServerAPI 11/29/2022 11:07 PM
once you said that I knew something must be up on my end.. sure enough 😂
Avatar
location of player controller is a mistery 👻
Avatar
Hehe... i think many has went through those different variants lol 😄
Avatar
Avatar
Pelayori
location of player controller is a mistery 👻
Last time I checked the PlayerController location is based off where you first login at. Most likely due to the first replication. Though I don't know how reliable that is and it's pretty useless.
Avatar
Yeah, don't really need to replicate location of PC
1:31 AM
Oddly enough, DefaultActorLocation of player controller does indeed return current location lol
😆 1
Avatar
That's funny
1:33 AM
I wonder if the newer engines keep this behavior
Avatar
Is it possible to get chibi data and put custom level values with binding to character, how to color it? How to manage weapon attachments and check them? (edited)
Avatar
The chibi level is a blueprint int field
Avatar
Anyone have a decently complex server setup? @jraServerAPI maybe?
7:09 PM
I just moved the api off of VS2017 toolset (C++17) to VS2022 with C++20 and replaced minhook with Detours
7:09 PM
it should be a drop-in replacement but I would like to verify nervousowo
Avatar
jraServerAPI 12/6/2022 7:28 PM
I'd be happy to help
Avatar
hello, a dummy newbie question. Are Linux servers supported for ArkServerAPI or I should forget hosting server on Linux? (edited)
Avatar
Ark api is not suppoted on Linux as of now
Avatar
okey, thanks, than i'm out, i hope one day i'll be able to make server on Linux. (edited)
3:05 PM
no one is offering windows servers on my country for reasonable price xD
Avatar
LordBossel1 12/12/2022 1:12 PM
Does anybody know how you can add custom skins to your server?
Avatar
LordBossel1 12/12/2022 1:20 PM
And is there maybe a new fix for a server with daily changing IP, so that people don’t have to use a website or a static IP that redirects them to the dynamic IP?
Avatar
as always... IOOMM 🙄 seem to be getting a lot of api error time out messages when restarting servers recently? doesnt seem to matter if its full cluster restart or just 1 map, logs show nothing obvious from checking and besides WC updates nothing has changed on the clusters/machines inc networking. 2 different machines, 3 different clusters.
Avatar
Avatar
LordBossel1
Does anybody know how you can add custom skins to your server?
This isn’t the place for these types of questions
7:17 PM
The answers however are, 1. Use mods 2. Use a dynamic dns service
Avatar
Hello, everyone, someone knows UPrimalItem::GetRepairingRequirementsString(UPrimalItem *this,FString *result,UPrimalInventoryComponent*compareInventoryComp,bool bUseBaseRequeriments,Float OverrideRepairPercent) When bUseBaseRequirements is false, the result is correct. If it is true, the result is incorrect
9:47 PM
Does anyone know the usage of it
Avatar
jraServerAPI 12/17/2022 10:30 PM
i assume you're trying to repair stuff.. i posted some information about this a while back.. read this and the next two messages (and 2 messages before this one), should give you a good idea what those are https://discord.com/channels/513432877904691202/745040653582336120/948664522611240990 (edited)
Avatar
I can't access this channel
Avatar
Avatar
jraServerAPI
i assume you're trying to repair stuff.. i posted some information about this a while back.. read this and the next two messages (and 2 messages before this one), should give you a good idea what those are https://discord.com/channels/513432877904691202/745040653582336120/948664522611240990 (edited)
I don't have permission to access this channel, can you send it again
Avatar
jraServerAPI 12/18/2022 6:05 AM
#deleted-channel
6:05 AM
it's in intermediate
Avatar
Original message was deleted or could not be loaded.
Only if you have source code or plugin is open source.
12:09 AM
The thing you can do but you shouldn't is reverse engineering. This is hard on C++
Avatar
where is the api docs
8:56 PM
and the source code?
Avatar
Avatar
Mr. Alpaca
where is the api docs
no docs
Avatar
Avatar
Mr. Alpaca
and the source code?
somewhere on github (edited)
Avatar
Avatar
Mr. Alpaca
and the source code?
ArkServerAPI is open source software you can install directly into windows versions of Ark Survival Evolved this software allows you to manage and create plugins to enhance your video game servers....
Avatar
is it safe to use Ark-Api in ARk Survival Of The Fittest server ?
Avatar
Avatar
NT Diesel
is it safe to use Ark-Api in ARk Survival Of The Fittest server ?
It’s probably fine
3:32 PM
Most plugins might have issues though
Avatar
Most ready plugins not the custom one right ?
Avatar
What should I include to access ArkApi::Requests?
9:27 PM
Including Requests.h doesn't work.
Avatar
🐨Dream Doctor🦘 12/31/2022 6:40 AM
@Foppa Congratulations on the new vote rewards plugin you just released. It looks amazing and must have been a monumental amount of work. Can I make a small suggestion though, and maybe this is just me, but calling your rightfully commercial plugin "Vote Rewards" is to me more than a little confusing when it comes to the original, fully open source "Vote Rewards" plugin. I think maybe people could be confused about whether you're taking the original plugin and removing it from open source and making it commercial, which I think is problematic, or whether yours is effectively a whole new plugin and should be treated as such, which seems like the case to me. Sorry for the ping, and congratulations again on all that work that is much needed! (edited)
6:42 AM
Maybe even just call it "Foppa's Vote Rewards" to make it clear it's a different plugin? (edited)
Avatar
Hench the complete overhaul, the maintenance isn't is just by writing code is very much around it as well.
6:42 AM
There will be a free verison if it as well.
Avatar
Avatar
Foppa
Hench the complete overhaul, the maintenance isn't is just by writing code is very much around it as well.
🐨Dream Doctor🦘 12/31/2022 6:45 AM
Yeah I totally understand, I started looking at making a new version myself about a year ago and quickly realised how much work was required. The source for the original Vote Rewards is not great and so would really have required virtually a complete rewrite. I just think using the exact same name as the original plugin is confusing and might wrongly look to people like you've taken a previously free, open source plugin written by someone else and made it commercial and closed source. I know that's not the case at all but it's kind of how it looks. Like I said, maybe just change the name slightly to make it clear yours is a completely different plugin now.
Avatar
Will not change the name lol
6:47 AM
And since i took over the version it has never been open source, it ended already at back at version 2.0
Avatar
Avatar
SR
What should I include to access ArkApi::Requests?
#include "Requests.h" Should be used. Then to call functions API::Requests::Get().
Avatar
Avatar
Foppa
#include "Requests.h" Should be used. Then to call functions API::Requests::Get().
I dont know why including requests does nothing
11:01 AM
Should I make it upper than api??
Avatar
Avatar
WETBATMAN
this is how i can even tell if the match begun in sotf 2
is there hook to check if the match has been ended or do we have a winner or not ? or this not yet discovered ?
Avatar
Avatar
SR
I dont know why including requests does nothing
It's done in async, so it might be a bit confusing, how does your request look like?
Avatar
Avatar
Foppa
It's done in async, so it might be a bit confusing, how does your request look like?
No no
1:37 PM
I mean
1:38 PM
ArkApi::Requests simply doesn't appear to be a class name (edited)
Avatar
Avatar
SR
ArkApi::Requests simply doesn't appear to be a class name (edited)
It's API::Requests
1:39 PM
😅
1:39 PM
Probably this is my problem. I'll test it.
Avatar
Avatar
NT Diesel
is there hook to check if the match has been ended or do we have a winner or not ? or this not yet discovered ?
I spent a few minutes looking at SotF the other day after they re(-re?)-released it. If you're up for exploring a little in IDA, some of the native classes like AGameState, AShooterGameMode, AShooterGameState might be useful. ACustomGameState has TArray<struct FSOTFScorePlayerData> PlayerScoreData and TArray<struct FSOTFScoreTribeData> TribeScoreData fields that might help you determine the winner. AGameMode has void AGameMode::EndMatch() that might get triggered when a match ends. There's also a bunch of BP-generated SotF classes that will likely be more useful. There's no dev kit I'm aware of, so you're probably left with using the reflection system to explore/dump at runtime. The APrimalGameState_TSOTF class is particularly interesting with a bunch of properties and functions including void SetMatchPhase(TEnumAsByte<MatchPhases_TSOTF> NewPhase) and void EndMatch(). Just some potential starting points. I haven't tried it so I don't know if any of this is useful (could all be unused junk leftover from earlier versions of the game for all I know).
Avatar
Avatar
TheMollusk
I spent a few minutes looking at SotF the other day after they re(-re?)-released it. If you're up for exploring a little in IDA, some of the native classes like AGameState, AShooterGameMode, AShooterGameState might be useful. ACustomGameState has TArray<struct FSOTFScorePlayerData> PlayerScoreData and TArray<struct FSOTFScoreTribeData> TribeScoreData fields that might help you determine the winner. AGameMode has void AGameMode::EndMatch() that might get triggered when a match ends. There's also a bunch of BP-generated SotF classes that will likely be more useful. There's no dev kit I'm aware of, so you're probably left with using the reflection system to explore/dump at runtime. The APrimalGameState_TSOTF class is particularly interesting with a bunch of properties and functions including void SetMatchPhase(TEnumAsByte<MatchPhases_TSOTF> NewPhase) and void EndMatch(). Just some potential starting points. I haven't tried it so I don't know if any of this is useful (could all be unused junk leftover from earlier versions of the game for all I know).
Thanks for ur help brother but if we dont have a specific dev kit for the fittest how can we try to figure out some data about it. How can we look deeper in their code I just wanted to make something like hall of fame based on how many times player has won the game but i am stuck in lacking of resources
4:27 PM
Also do u know any way so i can download the normal dev kit with smaller download size 285gb downloading size is too much
4:30 PM
🤡
4:34 PM
if this person contacts you you can straight block him ^^ (edited)
Avatar
Avatar
OSubMarin
if this person contacts you you can straight block him ^^ (edited)
I don't really know this person but he was in my blacklist since 2019 kekw_a
😂 1
Avatar
Avatar
TheMollusk
I spent a few minutes looking at SotF the other day after they re(-re?)-released it. If you're up for exploring a little in IDA, some of the native classes like AGameState, AShooterGameMode, AShooterGameState might be useful. ACustomGameState has TArray<struct FSOTFScorePlayerData> PlayerScoreData and TArray<struct FSOTFScoreTribeData> TribeScoreData fields that might help you determine the winner. AGameMode has void AGameMode::EndMatch() that might get triggered when a match ends. There's also a bunch of BP-generated SotF classes that will likely be more useful. There's no dev kit I'm aware of, so you're probably left with using the reflection system to explore/dump at runtime. The APrimalGameState_TSOTF class is particularly interesting with a bunch of properties and functions including void SetMatchPhase(TEnumAsByte<MatchPhases_TSOTF> NewPhase) and void EndMatch(). Just some potential starting points. I haven't tried it so I don't know if any of this is useful (could all be unused junk leftover from earlier versions of the game for all I know).
I think there might be a sotf dev kit for the original sotf
7:59 PM
I’ll have to look
Avatar
Avatar
OSubMarin
Click to see attachment 🖼️
It’s not illegal
8:00 PM
Not even close
8:00 PM
But it is unethical (edited)
Avatar
Avatar
substitute
It’s not illegal
that is why I added "almost" if you notice, I'm not a lawyer or attorney (and I believe you're not one too lmao, you should not be so confident imo) (edited)
3:17 AM
so botting in a game (that in addition is a competitive game) for you is not illegal, that's an interesting point of view, not sure I understand it tho ^^ (edited)
Avatar
Avatar
NT Diesel
Thanks for ur help brother but if we dont have a specific dev kit for the fittest how can we try to figure out some data about it. How can we look deeper in their code I just wanted to make something like hall of fame based on how many times player has won the game but i am stuck in lacking of resources
TheMollusk 1/1/2023 4:57 AM
If there's no dev kit, you can still get a lot of information from the sever at runtime using UPropertys and UFunctions. Here's a super-ugly, not fully complete/correct example plugin you can use with Ark or SotF to dump classes, enums, and structs from the reflection system. It creates a Dump\ directory under ShooterGame\Binaries\Win64\ and populates it with subdirectories named after packages. Each package directory has a .txt file for each class in the package and an Enums.txt and a Structs.txt if the package has enums or structs. There are A LOT of files, the Engine and ShooterGame packages should look familiar after working with ArkServerApi.
23.01 KB
👍 2
Avatar
Thanks i should give it a try
Avatar
Avatar
OSubMarin
so botting in a game (that in addition is a competitive game) for you is not illegal, that's an interesting point of view, not sure I understand it tho ^^ (edited)
substitute 1/1/2023 8:37 AM
Show me the specific laws that say modifying software you own on your personal computer is illegal
8:37 AM
I’m not lawyer but I do understand the DMCA
8:38 AM
It’s not at all an interesting point of view, it’s just how it is
Avatar
Avatar
substitute
Show me the specific laws that say modifying software you own on your personal computer is illegal
I don't have to show anything, I do not assert anything, contrary to you. (edited)
4:21 PM
Still an interesting point of view for me yes, and I don't share it.
4:24 PM
You can keep defending unfair and unethical practices if you want, I won't bother any longer.
Avatar
Avatar
🐨Dream Doctor🦘
Yeah I totally understand, I started looking at making a new version myself about a year ago and quickly realised how much work was required. The source for the original Vote Rewards is not great and so would really have required virtually a complete rewrite. I just think using the exact same name as the original plugin is confusing and might wrongly look to people like you've taken a previously free, open source plugin written by someone else and made it commercial and closed source. I know that's not the case at all but it's kind of how it looks. Like I said, maybe just change the name slightly to make it clear yours is a completely different plugin now.
I see the point, it's done.
Avatar
Avatar
Foppa
I see the point, it's done.
🐨Dream Doctor🦘 1/2/2023 1:14 AM
Oh cool! Congratulations on your new plugin. It looks fantastic. I'm sure it will be the only vote plugin anyone uses.
Avatar
Avatar
🐨Dream Doctor🦘
Oh cool! Congratulations on your new plugin. It looks fantastic. I'm sure it will be the only vote plugin anyone uses.
Thank you! I even have more plans for it, but the new 3.0 face lift was a good start! 😄 (edited)
Avatar
Avatar
substitute
I think there might be a sotf dev kit for the original sotf
sotf was integrated in devkit before
1:58 PM
don't know if they are going to do this again now.
2:00 PM
here
Avatar
I'm trying to fix some stuff with unicode and getting very strange results (screenshot) Encoding in UTF8 gives "??????" Global font is used here I can see letters and words fine. Here's my code ArkApi::GetApiUtils().SendNotification(player_controller, { 0,255,0,0 }, 1.6f, 15, nullptr, *FString(L"яблоко"));
Avatar
jraServerAPI 1/4/2023 5:33 PM
use ArkApi::Tools::Utf8Decode()
Avatar
Avatar
jraServerAPI
use ArkApi::Tools::Utf8Decode()
bruh_what
5:36 PM
Fixed it
Avatar
jraServerAPI 1/4/2023 5:36 PM
search this discord for Utf8Decode, and you will find plenty of examples
Avatar
Avatar
jraServerAPI
search this discord for Utf8Decode, and you will find plenty of examples
I'm trying to figure it out for 2 hours ;d
5:38 PM
But if it is that simple
Avatar
jraServerAPI 1/4/2023 5:38 PM
just a search of "utf8" would have got you there
Avatar
Avatar
jraServerAPI
just a search of "utf8" would have got you there
was searching for this
5:38 PM
tried everything
5:38 PM
not working
5:39 PM
decoding works fine
5:39 PM
Avatar
jraServerAPI 1/4/2023 5:39 PM
and this conversation really belongs in the beginners area 😉 just sayin 🙂 (edited)
Avatar
Avatar
SR
I'm trying to fix some stuff with unicode and getting very strange results (screenshot) Encoding in UTF8 gives "??????" Global font is used here I can see letters and words fine. Here's my code ArkApi::GetApiUtils().SendNotification(player_controller, { 0,255,0,0 }, 1.6f, 15, nullptr, *FString(L"яблоко"));
substitute 1/4/2023 7:21 PM
Have you tried using a u16 string literal
7:21 PM
Pretty sure Ark is UTF-16
Avatar
Avatar
substitute
Have you tried using a u16 string literal
Tried everything lol decoding is only one thing that worked perfectly.
Avatar
Avoid using FString for unicode
8:02 PM
Is my experience at least
Avatar
FString handles encoding correctly for me, just need to decode and encode where necessary (edited)
Avatar
Avatar
Foppa
Avoid using FString for unicode
It needs to be used in a function veggies
Avatar
How to delete/find a struct from TArray? Maybe a silly question but this is real dead end for me now. done
1:00 AM
This documentation gives literally nothing in my case
1:01 AM
I'm trying to use a struct and it just errors always with the same reasons.
Avatar
jraServerAPI 1/5/2023 1:01 AM
1:02 AM
can't use ==
Avatar
Avatar
jraServerAPI
can't use ==
languagepaths.Remove(l);
1:02 AM
Don't know where did it find ==
1:02 AM
probably in the function itself
Avatar
jraServerAPI 1/5/2023 1:03 AM
if you want help you have to post enough code so we can see what you are doing
Avatar
struct Langs { std::string SteamID; std::string Culture; }; TArray<Langs> languagepaths; for (Langs l : languagepaths) { if (l.SteamID == std::to_string(steamid)) { languagepaths.Remove(l); // Error } } (edited)
1:04 AM
Here
1:04 AM
I'm trying to delete player from the array when he logs out (edited)
Avatar
jraServerAPI 1/5/2023 1:11 AM
c++ struct Langs { std::string SteamID; std::string Culture; }; TArray<Langs*> languagepaths; for (Langs* l : languagepaths) if (l.SteamID == std::to_string(steamid)) languagepaths.Remove(l); // Error See if this works (edited)
Avatar
Avatar
jraServerAPI
c++ struct Langs { std::string SteamID; std::string Culture; }; TArray<Langs*> languagepaths; for (Langs* l : languagepaths) if (l.SteamID == std::to_string(steamid)) languagepaths.Remove(l); // Error See if this works (edited)
wait how
1:15 AM
I did try making it static
1:15 AM
1:16 AM
This is why I like C++ 😄
Avatar
Hi, Could someone help with a snippet of how I could achieve infinite ammo for Turrets, for enemies and not wild. I tried using the hook Hook_APrimalStructureTurret_NotifyItemQuantityUpdated, but I don't know how to check conditions for what it is shooting. I only want infinite when its an enemy player/dino. Thanx (edited)
Avatar
Avatar
Raptross
Hi, Could someone help with a snippet of how I could achieve infinite ammo for Turrets, for enemies and not wild. I tried using the hook Hook_APrimalStructureTurret_NotifyItemQuantityUpdated, but I don't know how to check conditions for what it is shooting. I only want infinite when its an enemy player/dino. Thanx (edited)
substitute 1/5/2023 8:23 AM
You’ll probably have to rewrite the shooting logic to skip updating the ammo when firing at a player
8:24 AM
You can use your hook (+ remote debugger) with a breakpoint to get the stack trace
8:24 AM
And then you can figure out the caller function and work backwards
Avatar
Avatar
SR
I'm trying to use a struct and it just errors always with the same reasons.
You need to overload == operator in your struct
Avatar
Avatar
SR
How to delete/find a struct from TArray? Maybe a silly question but this is real dead end for me now. done
There is several ways of finding the index of an array. 1. Looping through and try to find matching index in the array 2. Using TArrays function like "IndexOfByPredicate" and more... struct myStruct { std::string MyString; int MyInt; uint64 MyInt64; } TArray<myStruct> myArrayList; So looping through is easier sometimes //add data myStruct = ms; ms.MyString = somestring; ms.MyInt = someint; ms.MyInt64 = someotherint; myArrayList.Add(ms); // Loop through for(auto entry : myArrayList) { Log::GetLog()->info("MyString: {}", entry.MyString) // and so on... } // Empty the Array of all entries. myArrayList.Empty(); // Remove just one of match for(auto entry : myArrayList) { Log::GetLog()->info("MyString: {}", entry.MyString) if(entry.MyString == someotherstring) { myArrayList.RemoveAt(entry.MyString); } } Or you can find the index and then delete it... auto index = myArrayList.IndexOfByPredicate([somestring](myStruct ms) { return ms.MyString == somestring; }); myArrayList.RemoveAt(index); Hope that helps... might ofc need to adjust the examples for your fitting and code logic ! 🙂 (edited)
Avatar
Avatar
Foppa
There is several ways of finding the index of an array. 1. Looping through and try to find matching index in the array 2. Using TArrays function like "IndexOfByPredicate" and more... struct myStruct { std::string MyString; int MyInt; uint64 MyInt64; } TArray<myStruct> myArrayList; So looping through is easier sometimes //add data myStruct = ms; ms.MyString = somestring; ms.MyInt = someint; ms.MyInt64 = someotherint; myArrayList.Add(ms); // Loop through for(auto entry : myArrayList) { Log::GetLog()->info("MyString: {}", entry.MyString) // and so on... } // Empty the Array of all entries. myArrayList.Empty(); // Remove just one of match for(auto entry : myArrayList) { Log::GetLog()->info("MyString: {}", entry.MyString) if(entry.MyString == someotherstring) { myArrayList.RemoveAt(entry.MyString); } } Or you can find the index and then delete it... auto index = myArrayList.IndexOfByPredicate([somestring](myStruct ms) { return ms.MyString == somestring; }); myArrayList.RemoveAt(index); Hope that helps... might ofc need to adjust the examples for your fitting and code logic ! 🙂 (edited)
Amazing! Thank you for your help.
2:18 PM
Sticker
Avatar
Avatar
Foppa
There is several ways of finding the index of an array. 1. Looping through and try to find matching index in the array 2. Using TArrays function like "IndexOfByPredicate" and more... struct myStruct { std::string MyString; int MyInt; uint64 MyInt64; } TArray<myStruct> myArrayList; So looping through is easier sometimes //add data myStruct = ms; ms.MyString = somestring; ms.MyInt = someint; ms.MyInt64 = someotherint; myArrayList.Add(ms); // Loop through for(auto entry : myArrayList) { Log::GetLog()->info("MyString: {}", entry.MyString) // and so on... } // Empty the Array of all entries. myArrayList.Empty(); // Remove just one of match for(auto entry : myArrayList) { Log::GetLog()->info("MyString: {}", entry.MyString) if(entry.MyString == someotherstring) { myArrayList.RemoveAt(entry.MyString); } } Or you can find the index and then delete it... auto index = myArrayList.IndexOfByPredicate([somestring](myStruct ms) { return ms.MyString == somestring; }); myArrayList.RemoveAt(index); Hope that helps... might ofc need to adjust the examples for your fitting and code logic ! 🙂 (edited)
Doing it like this causes an error even if you add identifier.
3:47 PM
with simple C4700
3:48 PM
don't really know how to fix this but without doing Struct* nothing happens, array is empty.
Avatar
How to make player an admin for a microsecond to execute consolecommand? I've searched a little bit for issues and tried few methods but I can't admin player. Tried with AShooterPlayerController and APlayerController. With .Set(true) and without.
Avatar
jraServerAPI 1/5/2023 9:36 PM
ArkShop does that
Avatar
Avatar
jraServerAPI
ArkShop does that
My problem was in writing "cheat" wow
Avatar
jraServerAPI 1/5/2023 10:41 PM
🤦‍♂️
Avatar
Hi, I'd like to know how to solve this problem, please,thank The server is showing 0/0, the player cannot enter, the firewall is down
Avatar
Avatar
Trustp
Hi, I'd like to know how to solve this problem, please,thank The server is showing 0/0, the player cannot enter, the firewall is down
This server is for development. Ask this question on support server please.
12:41 PM
@SRCan I be invited to the official server,Thank
Avatar
Sent in DM's
Avatar
Is it possible to respawn player at exact location? The only thing I found allows me to respawn player only on spawn point.
Avatar
You could respawn and teleport them
7:56 PM
Or replace the functionality of respawning with your own
Avatar
Avatar
SR
Is it possible to respawn player at exact location? The only thing I found allows me to respawn player only on spawn point.
Safezones does that, if you want to check it out it's on the public repo.
Avatar
Avatar
Pelayori
Safezones does that, if you want to check it out it's on the public repo.
It is working like my current method but looks like yours has more improvements with finding nearest spawn point. (edited)
Avatar
I'm pretty sure it covers most if not all the spawn cases
Avatar
🐨Dream Doctor🦘 1/7/2023 10:33 AM
This is off topic, but how difficult might it be to port this API to another game... Icarus. It's a UE4 game which does include the pdb in its distribution. It's about a year old and is under very active development, but they only just released their dedicated server and its incredibly limited in functionality. It's crying out for its own API.
Avatar
Avatar
🐨Dream Doctor🦘
This is off topic, but how difficult might it be to port this API to another game... Icarus. It's a UE4 game which does include the pdb in its distribution. It's about a year old and is under very active development, but they only just released their dedicated server and its incredibly limited in functionality. It's crying out for its own API.
Probably trivial, given you’d need a script to dump the fields as Michidu did back in the day. But the pdb reader is kinda similar for any pdb, not just ark
Avatar
Avatar
🐨Dream Doctor🦘
This is off topic, but how difficult might it be to port this API to another game... Icarus. It's a UE4 game which does include the pdb in its distribution. It's about a year old and is under very active development, but they only just released their dedicated server and its incredibly limited in functionality. It's crying out for its own API.
substitute 1/7/2023 2:44 PM
Extremely easy
2:45 PM
I wouldn’t port this api though
2:45 PM
Mich did a lot of good stuff
2:45 PM
But it’s definitely a product of it’s time (2015)
2:45 PM
C++14 is so much different than C++20
Avatar
Avatar
substitute
But it’s definitely a product of it’s time (2015)
🐨Dream Doctor🦘 1/7/2023 2:49 PM
Wow is it really that long ago? 8 years. Geez.
Avatar
Avatar
🐨Dream Doctor🦘
Wow is it really that long ago? 8 years. Geez.
substitute 1/7/2023 2:49 PM
I think the api existed either 2016 or 2017
2:49 PM
But the latest standard for C++ then (with major compiler support) would have been C++14
2:50 PM
I also believe C++14 is the default in MSVC blobglareannoyed
Avatar
I am trying to use sockets inside the plugin, for some reason everytime i try to read the socket with ''''int tempdata = recv(socket, (char*)&packetsize, sizeof(int), 0);'''' it never returns, using the non blocking version with "select" always return zero.
12:20 AM
does anyone ever used sockets inside the plugin?
Avatar
jraServerAPI 1/10/2023 12:20 AM
what library are you using?
12:22 AM
This is a popular one that was referred to me before https://github.com/fpagliughi/sockpp
Modern C++ socket library. Contribute to fpagliughi/sockpp development by creating an account on GitHub.
Avatar
just winsock. is is a simple rcon client. when i create the .exe it works, from inside the plugin it does not.
Avatar
Avatar
Uaca
just winsock. is is a simple rcon client. when i create the .exe it works, from inside the plugin it does not.
code?
Avatar
rconpacket* netrecvpacket(int socket) { int packetsize; rconpacket packet = { 0, 0, 0, {0x00} }; int tempdata = recv(socket, (char*)&packetsize, sizeof(int), 0); if (tempdata == 0) { printf("connection lost\n"); connect_alive = 0; return nullptr; } if (tempdata != sizeof(int)) { printf("Receive failed. invalid packet size(%d)\n", tempdata); connect_alive = 0; return nullptr; } if (packetsize < 10 || packetsize > 4096) { printf("Warning: Invalid packet size (%d). Must be greater than 10 and less than %d.\n", packetsize, 4096); if (packetsize > 4096 || packetsize < 0) packetsize = 4096; net_clean_incoming(socket, packetsize); return nullptr; } packet.size = packetsize; int received = 0; while (received < packetsize) { tempdata = recv(socket, (char*)&packet + sizeof(int) + received, packetsize - received, 0); if (tempdata == 0) { printf("connection lost\n"); connect_alive = 0; return nullptr; } received += tempdata; } rconpacket* ret = &packet; return ret; } This is the function is hang on int tempdata = recv(socket, (char*)&packetsize, sizeof(int), 0); but only inside the plugin, i've put a timeout on the socket and it return, but with no data.
Avatar
it only returns after the timeout has expired? if yes you could try the MSG_DONTWAIT flag and check for errors, also I can see you're using a 0 flag so you might be interested in looking this: https://man7.org/linux/man-pages/man2/recv.2.html#NOTES (edited)
2:55 PM
And how do you open the socket? (edited)
3:00 PM
Anyway I think select is a better approach for listening on a socket some rcon commands. (edited)
Avatar
select always returns zero, but only from within the plugin. what I find odd is if a create a new process from within the plugin to start a new cpp executable, it the same problem happens. The same thing happens with a c# executable
3:52 PM
int tempdata; struct addrinfo info {}; struct addrinfo* server_info, * sinfo; memset(&info, 0, sizeof info); info.ai_family = 2; info.ai_socktype = SOCK_STREAM; info.ai_protocol = IPPROTO_TCP; WSA(); int ret = getaddrinfo(hostname, hostport, &info, &server_info); if (ret != 0) { printf("Name resolution failed. Erro:%d: %s", ret, gai_strerror(ret)); exit(1); } for (sinfo = server_info; sinfo != nullptr; sinfo = sinfo->ai_next) { tempdata = socket(sinfo->ai_family, sinfo->ai_socktype, sinfo->ai_protocol); if (tempdata == -1) { continue; } timeval tv; tv.tv_sec = 10; tv.tv_usec = 1600; if (setsockopt(tempdata, SOL_SOCKET, SO_RCVTIMEO, reinterpret_cast<char*>(&tv), sizeof(timeval))) ret = connect(tempdata, sinfo->ai_addr, sinfo->ai_addrlen); if (ret == -1) { net_close(tempdata); continue; } break; } if (sinfo == nullptr) { printf("Connection failed\n"); freeaddrinfo(server_info); exit(1); } freeaddrinfo(server_info); return tempdata; this is the code to connect
Avatar
what i find odd is that creating a executable works, but inside the plugin it does not and calling the executable from the plugin also hangs on the same place
Avatar
In your dll where are the calling this from
Avatar
is is a callback from API::Requests::Get().CreateGetRequest, it runs o the main thread
Avatar
Avatar
Uaca
is is a callback from API::Requests::Get().CreateGetRequest, it runs o the main thread
Try detaching thread.
10:35 PM
I've got some problems with this too while I was trying to create web API.
Avatar
Avatar
Uaca
is is a callback from API::Requests::Get().CreateGetRequest, it runs o the main thread
it's running async and it's using a separated thread but the result it's returned in the main thread
Avatar
it worked! My guess is that the rcon server in ark is running on the main thread, when I try to send/recv on the main thread it causes a deadlock
Avatar
Anyone know what causes this? I've checked the json config, validated and proper format, and replaced the .dll but still nothing changed
Avatar
jraServerAPI 1/12/2023 11:06 PM
are you using a database with these?
11:12 PM
mysql
Avatar
jraServerAPI 1/12/2023 11:18 PM
I'm going to use @Lethal's discord reference for this one More than likely you need to disable ssl in mysql Read this https://discord.com/channels/703368268890636401/720970355220676638/934123470508413070
Avatar
Avatar
jraServerAPI
I'm going to use @Lethal's discord reference for this one More than likely you need to disable ssl in mysql Read this https://discord.com/channels/703368268890636401/720970355220676638/934123470508413070
Thx!
Avatar
How to know if a dino is being mounted/ridden by a player from APrimalDinoCharacter ?
Avatar
Avatar
Raptross
How to know if a dino is being mounted/ridden by a player from APrimalDinoCharacter ?
Dinos have a ‘RiderField’, can check that
Avatar
@GSH | MrOwlSky , this is yours right? https://github.com/ServersHub/Ark-Server-Plugins/tree/master/GamingOGs%20Plugins/gogprotection-master If so i never saw it on the ArkApi website so do you have a list of feature's and known bugs for me?
Server Plugins for ARK: Server API. Contribute to ServersHub/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
Avatar
Natsu
@GSH | MrOwlSky , this is yours right? https://github.com/ServersHub/Ark-Server-Plugins/tree/master/GamingOGs%20Plugins/gogprotection-master If so i never saw it on the ArkApi website so do you have a list of feature's and known bugs for me?
GSH | MrOwlSky 1/14/2023 3:40 PM
Yes the old GamingOGs plugins were my old plugins. You can send me a DM or create a support ticket to inquire further.
👍 1
Avatar
i am trying to send a string to Ue4 from the plugin but it doesn't work should i use a different way? Integer works fine with set but String does not. UProperty - > buff->FindProperty Set(buff, value); buff->MulticastProperty
Avatar
Avatar
Natsu
i am trying to send a string to Ue4 from the plugin but it doesn't work should i use a different way? Integer works fine with set but String does not. UProperty - > buff->FindProperty Set(buff, value); buff->MulticastProperty
What issue
Avatar
Avatar
substitute
What issue
The string never arrived (dont get any loggin from the mod) back plugin does login correctly. got it 🙂 made a mistake (edited)
👍 1
Avatar
URCONServer ListenAddrField points to a empty struct
4:05 PM
is there any other way to get the IP the server is bound to?
Avatar
If i use this method without the command handeling mod side, will it allow me to send chat commands from the mod to the plugins. /help for example? https://docs.google.com/document/d/1jBVcXX6qzjCY3lKyO5fguRYsMWwq_3rXP6-9BS2mQ2U/edit#heading=h.nxtvmeleetnt
Contents Contents 1 Overview 2 How it works 2 Stackability 2 Prerequisites 2 Creating the Mod 3 Preparation 3 Copying the Chatbox Widget 3 Creating the Buff Blueprint 4 Preparing a reference to the Command Buff. 4 Setting up variables on the Command Buff 6 Creating the Intercept Event on the Com...
Avatar
Doesn’t seem like since the commands are handled from the player controller and not from the chat box
5:16 PM
You could send net exec commands mod side, and hook bp server handle net exec command
Avatar
If you follow that mod tutorial through the "Sending commands to the server" section, then you should have a OnCommand_Server event that gets called on the server with the command string as an argument when the mod detects a command on the client. Instead of implementing the "Handling commands on the server" section in the mod, you could hook UObject::ProcessEvent() in a plugin to intercept that event and implement your command handling in C++.
Avatar
Avatar
TheMollusk
If you follow that mod tutorial through the "Sending commands to the server" section, then you should have a OnCommand_Server event that gets called on the server with the command string as an argument when the mod detects a command on the client. Instead of implementing the "Handling commands on the server" section in the mod, you could hook UObject::ProcessEvent() in a plugin to intercept that event and implement your command handling in C++.
Although I don't think the event will get called from the client to the server if the graph for OnCommand_Server is completely empty. So you might still have to put something there, even if it never actually gets run. Or do something like Pelayori suggested.
Avatar
Avatar
Pelayori
You could send net exec commands mod side, and hook bp server handle net exec command
Thanks for the answers. is it faster or better using net exec commands then using Console Commands? 🤔
Avatar
It’s easier to do net exec method since it is all native and it’s been proven to work out of the box, but the solution Mollusk suggested is more suitable for complex hooking
Avatar
Avatar
TheMollusk
Although I don't think the event will get called from the client to the server if the graph for OnCommand_Server is completely empty. So you might still have to put something there, even if it never actually gets run. Or do something like Pelayori suggested.
A simple log statement would probably be best
👍 1
8:56 PM
Also helps with debugging issues
Avatar
Avatar
Pelayori
It’s easier to do net exec method since it is all native and it’s been proven to work out of the box, but the solution Mollusk suggested is more suitable for complex hooking
Should i use the Following exec command from the client or server? and what hook would i need to use i can only find a SendExecCommand in AActor
Avatar
The mod sends data from server or from client?
Avatar
I want to send a string from the mod/client to the server/plugin (edited)
Avatar
Avatar
Natsu
I want to send a string from the mod/client to the server/plugin (edited)
Then you want the client to send the command to the server
Avatar
Avatar
substitute
Then you want the client to send the command to the server
What hook should i use with this? i couldnt find anything close in the hook generator
Avatar
jraServerAPI 1/16/2023 9:00 AM
@substitute you've already answered this at least once 🤭
Avatar
Avatar
jraServerAPI
@substitute you've already answered this at least once 🤭
Ha i tough it was a hook , for the function name i can use the command name i guess?
Avatar
WC teasing ARK1 on UE5? Can't wait to see how that affects mods and plugins 😬
Avatar
Avatar
TheMollusk
WC teasing ARK1 on UE5? Can't wait to see how that affects mods and plugins 😬
GSH | MrOwlSky 1/16/2023 1:33 PM
Will be interesting some think they wont do it while others think they are going to
Avatar
Avatar
GSH | MrOwlSky
Will be interesting some think they wont do it while others think they are going to
Looks like that we can get some MORE laggy stuff than it was before.
2:08 PM
1 frame in big official breedzone
2:08 PM
#plsadddlss (edited)
Avatar
I have a question currently i use HTTPRequest (mod) to grab a json and make a save file on the server side and i will load it and replicate the data to the client. I notice some delay sometimes. will sending this data from a plugin that loads the json and send the data be faster? (edited)
Avatar
Avatar
Natsu
I have a question currently i use HTTPRequest (mod) to grab a json and make a save file on the server side and i will load it and replicate the data to the client. I notice some delay sometimes. will sending this data from a plugin that loads the json and send the data be faster? (edited)
yes
10:13 PM
everything is always faster in a plugin
Avatar
Avatar
WETBATMAN
everything is always faster in a plugin
Thanks then I know what to do next
Avatar
Avatar
Natsu
Thanks then I know what to do next
are you sending to an endpoint?
Avatar
Avatar
WETBATMAN
are you sending to an endpoint?
Endpoint as in api?
10:40 PM
I am sending static data like rules ect
Avatar
yeah you can send a get request to the url via ArkApi and then call a function from your mod to save the data in your mod
10:43 PM
or you can also directly set a var in your mod with the data
Avatar
Avatar
WETBATMAN
or you can also directly set a var in your mod with the data
Ya I did send points from a dB to a int. In this case it's all static data and was wondering if rewriting was worth it.
Avatar
I already send a string/array and int to my mod from the plugin, how would i send a custom Variable Type/Structure that contains Strings/Integer?
Avatar
Make a struct in C++ that contains the same fields, on the same order
👍 1
Avatar
i might be blind but what am i doing wrong it keeps saying "serverInformation: refinition; different basic types" and "EnRules" is not a member of tagServerInformation struct ServerInformation { FString EnRules; }; void Information() { ServerInformation serverInfo; serverInfo.EnRules = FString(Data::config["Information"]["Rules"]); }
Avatar
jraServerAPI 1/17/2023 9:32 PM
You can't use ServerInformation. I think it's already being used by the API. Change that name and it compiles fine
Avatar
Avatar
jraServerAPI
You can't use ServerInformation. I think it's already being used by the API. Change that name and it compiles fine
Sorry for the late response , i changed the name and the error changed aswell so it seems like it helped a bit. not quite sure why i get (see photo) now. tried to change Fstring to string ect but nothing helped.
Avatar
jraServerAPI 1/17/2023 10:06 PM
I removed Data::config["Information"]["Rules"] in my test and just replaced it with a "String"
10:06 PM
I would assume you have an issue with your json in Data::config["Information"]["Rules"] (edited)
Avatar
Avatar
Natsu
i might be blind but what am i doing wrong it keeps saying "serverInformation: refinition; different basic types" and "EnRules" is not a member of tagServerInformation struct ServerInformation { FString EnRules; }; void Information() { ServerInformation serverInfo; serverInfo.EnRules = FString(Data::config["Information"]["Rules"]); }
most likely cause json is parsing it to string and not fstring (edited)
Avatar
solved the problem thanks guys it seems like i had double code somewhere when testing before 😅
Avatar
@Pelayori can u dm me plis
5:20 PM
Im at work and would appreciate it if you had time for a minute
Avatar
Can anyone help (edited)
8:40 AM
UClass and UScriptStruct not found
10:29 AM
This guide is based on the Visual Studio Community 2019 version install Prerequisites: 1. https://visualstudimicrosofto..com/vs/ 2. https://github.com/Michidu/ARK-Server-API/archive/master.zip Step N1: Install Visual Studio by the link given on the first prerequisite. When the inst...
10:30 AM
wrong ArkApi url
Avatar
i am using substite code , to hook into Hook_UObject_ProcessEvent. i am using "Client Send Net Exec Command to Server" in my mod. Is it possible to get the player_controller and if so , how would i do this?
Avatar
You probably didn't change from debug to release in your configuration
Avatar
nonono
12:24 PM
old download link for arkhapi (edited)
Avatar
Where are you from?
12:39 PM
@anton
Avatar
Ukraine
Avatar
Гайд правильный
Avatar
Там ссылка старая
Avatar
Я по нему делал проект
12:39 PM
там всё рабочее
Avatar
у меня не билдилось
Avatar
какая из ссылок там старая?
12:40 PM
Поставь на релиз "ARK"
Avatar
вторая
12:40 PM
там зайди в репу
Avatar
Ща сек
12:40 PM
Fixed crashes when reloading plugins with .ArkApi files. Fixed "SaveWorldBeforePluginReload" config option. If true it will auto save world if any .ArkApi file is found. Removed "Per...
12:41 PM
Можешь ещё взять рандомную репу отсюда https://github.com/Michidu/Ark-Server-Plugins
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
12:41 PM
И просто библиотеки попихать
Avatar
ну я короч заменл на ласт релзную все собралось
Avatar
ну бывает
12:42 PM
тут гайдам больше чем мамонтам
Avatar
была бы дока нормальная
Avatar
Avatar
anton
была бы дока нормальная
не слушай, её вообще нет по факту.
12:42 PM
раньше была сейчас уже вообще не вижу.
Avatar
да я в шоке был
12:42 PM
сижу такой
12:42 PM
втф
12:42 PM
как с этим работать
Avatar
Avatar
anton
как с этим работать
Пальцем в небо
12:43 PM
griefer
Avatar
да походу
12:43 PM
да и арк еще с приколами 😄
12:44 PM
и clion юзать нельзя
12:44 PM
или можно как-то
Avatar
да сюда хоть что пихай заработает если не в основном потоке то в другом
Avatar
а можно как-то юзать не vs а от jetbrains что-то
Avatar
Avatar
anton
а можно как-то юзать не vs а от jetbrains что-то
тут только vs
Avatar
печалька
12:47 PM
вообще что угодно можно использовать
12:47 PM
помню чел мне в блокноте скомпилил
Avatar
ну командой
12:47 PM
компилить
12:47 PM
тут просто больше вопрос в удобстве
12:48 PM
вскод немного неадекватно показывает подсказки по коду
12:49 PM
а можешь подсказать как взаимодействовать с данными игрока
12:49 PM
то что в луч чел пихает
Avatar
Avatar
anton
а можешь подсказать как взаимодействовать с данными игрока
ну слушай как в арке оно и сделано тут похоже работает
12:49 PM
если ты работал с ADK
12:49 PM
то будет понятно
Avatar
Да я вообще первый раз си юзаю
Avatar
зря ты выбрал С++ как первое знакомство с семейством
12:50 PM
этот язык любит твои страдания
12:50 PM
не первое
12:51 PM
я уже 6 лет работаю
12:51 PM
просто нужно 1 плагин написать
Avatar
кому?
Avatar
себе
Avatar
а что ты хочешь сделать?
Avatar
выгрузку живки на сайт и загрузку обратно
Avatar
подожди так это уже реализовано самой игрой
12:53 PM
или ты хочешь сохранить данные динозавра допустим в команду?
Avatar
тип через апишки веб ?
12:53 PM
не мне нужно выгрузить его из игры
12:53 PM
через данные
12:53 PM
или команду
Avatar
а ну так
12:53 PM
возьми все данные дино
12:53 PM
раскраски уровень седло и др.
12:53 PM
статы не забудь
12:53 PM
задеспавни закинь в JSON и всё
Avatar
да я так и хотел сделать
12:54 PM
на беке сайта уже с этим проще работать
12:55 PM
правда как быть с откатами сервера и т д
Avatar
Avatar
anton
правда как быть с откатами сервера и т д
сервак прямо во время краша можно сохранить держу в курсе.
12:56 PM
вот единственный минус
Avatar
кст а есть плагин
Avatar
что есть краши которые не просто убивают анрил
12:56 PM
а к чертям сносят что-то в движке и даже крашрепорта нет
Avatar
от того что тебя крашит на клиенте
12:56 PM
и сервак тебя держит 5 минут
Avatar
Avatar
anton
и сервак тебя держит 5 минут
только выяснить от клиента о краше и отправить данные на сервер
12:57 PM
модификацией решается. (edited)
Avatar
просто 5 минут чела держать
Avatar
Avatar
anton
просто 5 минут чела держать
можно уменьшить время физического тайм-аута
1:06 PM
вроде на клиенте или где-то на сервере таковой валяется
1:06 PM
поищи в GUS
1:09 PM
1:09 PM
Game.ini
Avatar
Avatar
anton
UClass and UScriptStruct not found
Same problem
2:19 PM
Were you able to find a fix?
Avatar
Avatar
Foppa
You probably didn't change from debug to release in your configuration
Followed the document and it's on release.
Avatar
Although I have 2022 version instead of 2019
2:48 PM
Could that be the problem?
Avatar
Avatar
HighWorks
Although I have 2022 version instead of 2019
i upgraded from 2019 to 2022 so no that should not be the problem
Avatar
Hmmm
2:53 PM
I took one of the open source plugins and I want to edit it so I can understand the elements of coding faster. The plugin I choose was Custom Chat
Avatar
Build started... 1>------ Build started: Project: Test, Configuration: Release x64 ------ 1>Test.cpp 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Fields.h(166,20): error C2027: use of undefined type 'UClass' 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Base.h(590,8): message : see declaration of 'UClass' 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Fields.h(186,24): error C2027: use of undefined type 'UScriptStruct' 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Base.h(638,8): message : see declaration of 'UScriptStruct' 1>Done building project "Test.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Elapsed 00:06,777 ==========
Avatar
Avatar
HighWorks
Same problem
ArkServerAPI is open source software you can install directly into windows versions of Ark Survival Evolved this software allows you to manage and create plugins to enhance your video game servers....
5:31 PM
download master branch
5:32 PM
This guide is based on the Visual Studio Community 2019 version install Prerequisites: 1. https://visualstudimicrosofto..com/vs/ 2. https://github.com/Michidu/ARK-Server-API/archive/master.zip Step N1: Install Visual Studio by the link given on the first prerequisite. When the inst...
Avatar
I did all that
Avatar
I used the guide and the open source api from GitHub
Avatar
Avatar
HighWorks
Build started... 1>------ Build started: Project: Test, Configuration: Release x64 ------ 1>Test.cpp 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Fields.h(166,20): error C2027: use of undefined type 'UClass' 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Base.h(590,8): message : see declaration of 'UClass' 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Fields.h(186,24): error C2027: use of undefined type 'UScriptStruct' 1>C:\Users\brijk\ARK Plugin\ARK-Server-API-master\version\Core\Public\API\Base.h(638,8): message : see declaration of 'UScriptStruct' 1>Done building project "Test.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Elapsed 00:06,777 ==========
You aren't using the newest version of the API. Those lines you have errors on don't exist in Fields.h anymore. Download the newest version from the Game Server Hub repo that was linked above.
Avatar
Bet
8:40 PM
Imma try that
8:41 PM
Because I have 3.54
8:41 PM
If 3.55 fixed it
Avatar
Or you can use MSVC 142 instead of 143. That old code doesn't compile in the newest version of visual studio. (edited)
Avatar
Gotcha
8:43 PM
Thanks for the advice
8:43 PM
Will give it a shot tomorrow at work
Avatar
Avatar
Natsu
i am using substite code , to hook into Hook_UObject_ProcessEvent. i am using "Client Send Net Exec Command to Server" in my mod. Is it possible to get the player_controller and if so , how would i do this?
Does anyone know if this is possible or not?
Avatar
Avatar
Natsu
Does anyone know if this is possible or not?
If you have void Hook_UObject_ProcessEvent(UObject* _this, UFunction* Function, void* Parms), then _this is the object the function is being called on. Which is a APlayerController for Client Send Net Exec Command to Server.
👍 1
Avatar
Avatar
TheMollusk
If you have void Hook_UObject_ProcessEvent(UObject* _this, UFunction* Function, void* Parms), then _this is the object the function is being called on. Which is a APlayerController for Client Send Net Exec Command to Server.
For the client send exec , i would need to look for the command name right? i got it working with custom events, but not for client send exec* (edited)
Avatar
Except I don't think Client Send Net Exec Command to Server runs on the server. It calls ServerProcessNetExecCommand, which does run on the server. I would think you'd just want to hook APlayerController::ServerProcessNetExecCommand_Implementation() natively instead of dealing with ProcessEvent
Avatar
Avatar
TheMollusk
Except I don't think Client Send Net Exec Command to Server runs on the server. It calls ServerProcessNetExecCommand, which does run on the server. I would think you'd just want to hook APlayerController::ServerProcessNetExecCommand_Implementation() natively instead of dealing with ProcessEvent
Would it matter much performance wise compared to custom events?
Avatar
Avatar
Natsu
Would it matter much performance wise compared to custom events?
Well as far the the hook itself goes, using ArkApi to hook a native function is going to be slightly faster than hooking ProcessEvent and adding code to check if it's calling the function you're looking for. But I use hooks on CallFunction and ProcessEvent in my plugins to intercept UFunction calls and there's no noticeable performance hit, just don't do anything like using string comparisons to check if the function name is what you're looking for.
9:57 PM
The net exec command functions are going to do some extra processing you probably don't care about though, which might be a little slower than just capturing the custom event in ProcessEvent?
Avatar
Avatar
TheMollusk
The net exec command functions are going to do some extra processing you probably don't care about though, which might be a little slower than just capturing the custom event in ProcessEvent?
yea i used pelayori code above in the chat to get the InternalIndexField and use it inside ProcessEvent. it seems quite fast the only problem is that i want to get the steamID aswell. AShooterPlayerController* player = static_cast<AShooterPlayerController*>(_this); will return 0 for me inside the processevent hook
Avatar
The approach I suggested was something like this: 1) Send data from mod to plugin:
  • If the data is client side, use Client Send Net Exec Command To Server
  • If the data is server side already, call BPServerHandleNetExecCommand
2) Add the below hook, Pass parameters as appropiate. I use this approach since it's easy for me at least, not sure about in depth performance implications. Net exec params are not called at the same frequency as process event so I use string comparison for command name DECLARE_HOOK(AActor_BPServerHandleNetExecCommand, bool, AActor*, APlayerController*, FName, FBPNetExecParams*); bool Hook_AActor_BPServerHandleNetExecCommand(AActor* _this, APlayerController* FromPC, FName CommandName, FBPNetExecParams* Params) { if (_this && CommandName.ToString().Contains("MyCustomFunction")) { // do stuff return true; } return AActor_BPServerHandleNetExecCommand_original(_this, FromPC, CommandName, Params); }
(edited)
👍 1
Avatar
Avatar
Pelayori
The approach I suggested was something like this: 1) Send data from mod to plugin:
  • If the data is client side, use Client Send Net Exec Command To Server
  • If the data is server side already, call BPServerHandleNetExecCommand
2) Add the below hook, Pass parameters as appropiate. I use this approach since it's easy for me at least, not sure about in depth performance implications. Net exec params are not called at the same frequency as process event so I use string comparison for command name DECLARE_HOOK(AActor_BPServerHandleNetExecCommand, bool, AActor*, APlayerController*, FName, FBPNetExecParams*); bool Hook_AActor_BPServerHandleNetExecCommand(AActor* _this, APlayerController* FromPC, FName CommandName, FBPNetExecParams* Params) { if (_this && CommandName.ToString().Contains("MyCustomFunction")) { // do stuff return true; } return AActor_BPServerHandleNetExecCommand_original(_this, FromPC, CommandName, Params); }
(edited)
Going to try it out thanks 😍
Avatar
As I said that is my preferred approach and possibly not the best in terms of performance, although I haven't noticed any performance issue with doing a few dozens of calls per second
Avatar
Avatar
Natsu
Going to try it out thanks 😍
Forgot about this, if you gonna use it you have to define the bp net exec params: struct FBPNetExecParams { int IntParam1; int IntParam2; int IntParam3; float FloatParam1; float FloatParam2; float FloatParam3; UObject* ObjParam1; UObject* ObjParam2; UObject* ObjParam3; FString StringParam1; };
👍 1
Avatar
Avatar
Pelayori
Forgot about this, if you gonna use it you have to define the bp net exec params: struct FBPNetExecParams { int IntParam1; int IntParam2; int IntParam3; float FloatParam1; float FloatParam2; float FloatParam3; UObject* ObjParam1; UObject* ObjParam2; UObject* ObjParam3; FString StringParam1; };
This should probably get defined in the api 😉
Avatar
Wouldn't hurt for sure
11:42 PM
indeed
Avatar
How to get json string as mysql database query result? (edited)
Avatar
jraServerAPI 1/20/2023 12:08 AM
something like c++ auto str_data = db_.query(fmt::format("SELECT jsonField FROM {} WHERE SteamId = {};", my_table_, steam_id)).get_value<std::string>(); auto jsonParsed = nlohmann::json::parse(str_data); (edited)
Avatar
Avatar
jraServerAPI
something like c++ auto str_data = db_.query(fmt::format("SELECT jsonField FROM {} WHERE SteamId = {};", my_table_, steam_id)).get_value<std::string>(); auto jsonParsed = nlohmann::json::parse(str_data); (edited)
getting this
Avatar
jraServerAPI 1/20/2023 12:34 AM
I've updated my code, maybe try that?
Avatar
Forgot to say I'm trying to get all data from the database. (SELECT * FROM {})
12:42 AM
and put it somewhere in JSON
12:44 AM
It is only throwing out my steamid
12:44 AM
When there are more columns
Avatar
Does anyone know why one may not be able to connect to mysql? I set it up right just refuses to connect not sure why
Avatar
Avatar
anton
Thanks. It worked.
🍪 1
Avatar
Avatar
jraServerAPI
something like c++ auto str_data = db_.query(fmt::format("SELECT jsonField FROM {} WHERE SteamId = {};", my_table_, steam_id)).get_value<std::string>(); auto jsonParsed = nlohmann::json::parse(str_data); (edited)
After some investigating functions with .get_value<std::string>() give only last value they've got. Example: Id's: 679, 678 (it selects 678 even if you get only this column) I want to get all database rows limited by 20 and get them inside JSON (edited)
Avatar
Usually a select returns a collection of rows
8:40 AM
Not a single row
Avatar
Avatar
substitute
Usually a select returns a collection of rows
how to store them?
Avatar
I've found out that I can get all row values by using .fetch() but the main question remains how to get array of them or something. (edited)
Avatar
Avatar
SR
how to store them?
i use chatGPT 😄 to ask him basic questions like that the answer you get will really help
Avatar
Avatar
Natsu
i use chatGPT 😄 to ask him basic questions like that the answer you get will really help
when there are no documentation no ChatGPT helps you 😂
Avatar
your asking a mysql question right?
Avatar
Avatar
Pelayori
Forgot about this, if you gonna use it you have to define the bp net exec params: struct FBPNetExecParams { int IntParam1; int IntParam2; int IntParam3; float FloatParam1; float FloatParam2; float FloatParam3; UObject* ObjParam1; UObject* ObjParam2; UObject* ObjParam3; FString StringParam1; };
Fixed (edited)
Avatar
Avatar
Natsu
your asking a mysql question right?
yes
10:48 AM
I need to select all from the database
10:48 AM
and get it as json file.
Avatar
Avatar
SR
and get it as json file.
for example if you feed it your code it will return it the way you want 🙂
Avatar
Avatar
Natsu
for example if you feed it your code it will return it the way you want 🙂
there is also a problem that ChatGPT isn't available in my country
😔 1
Avatar
Avatar
Natsu
for example if you feed it your code it will return it the way you want 🙂
Could you try feeding it some of my code? 😄
11:17 AM
I'm using mysql++11.h
Avatar
you can pm me sure
Avatar
Avatar
Natsu
you can pm me sure
Check your dms (edited)
Avatar
Avatar
substitute
Usually a select returns a collection of rows
Is it possible to get that collection somehow?
Avatar
@substitute
Avatar
Avatar
SR
@substitute
You will have to do it yourself I'm pretty sure. Use something like: nlohmann::json j; db_.query("SELECT ... FROM ...").each( [&](rowType first, rowType2 second...) { nlohmann::json object; object["param"] = first; object["param2"] = second; ... j.push_back(object); return true; } ); (edited)
7:50 PM
rowType must be replaced by each column's data type, and add as many arguments as the select query will return (edited)
Avatar
Erm sorry to ask for help again but what node do i need to use for Client Send Net Exec Command? when using Primal Buff Class. i tried multiple nodes : Get Owner Controller -> Cast To ShootPlayerController Get Owner Controller -> Get Owner
Avatar
The function is in PlayerController
7:58 PM
If you can't find it turn off context sensitive
Avatar
You mean this one right?
Avatar
yes
8:00 PM
Pass something to For Actor, like the buff (self)
8:00 PM
Since that is the actor that will handle the net exec
Avatar
For some reason it never arrived at the server the send command is a testing node
Avatar
that's not how you test net exec calls
8:04 PM
On the buff/actor you send the command to, implement the function BPServerHandleNetExecCommand (edited)
Avatar
Command_name calls custom events as well i used it inside my structure 🤔
Avatar
I don't think that's reliable
Avatar
net exec != normal rep events (edited)
Avatar
ok going to compile and see if it works 🙂
8:07 PM
Thanks for the help again pelayori
Avatar
@Pelayori looks like this mysql function just crashes the server
8:38 PM
what can be the reason?
8:39 PM
bool b = db_.query(fmt::format("SELECT SteamId FROM {} LIMIT 20;", table_players3_)).each( [](uint64 steamid, std::string nickname, int kills, int deaths) { std::cout << std::to_string(steamid); return true; });
8:39 PM
Here's modified code.
8:39 PM
Just to test the returnable.
Avatar
Because you are just selecting the steam id, not all the fields
8:41 PM
And the callback would just need the first argument
8:42 PM
Either you remove the nickname, kills, deaths params, or make it select everything
Avatar
let me try.
Avatar
also, add into a try and add catch
Avatar
Avatar
Foppa
also, add into a try and add catch
it is here
8:43 PM
but it instacrashes
Avatar
Avatar
Pelayori
Either you remove the nickname, kills, deaths params, or make it select everything
yes this thing works.
Avatar
The parameters for the each function must the same same as the columns extracted by the query
8:44 PM
So if you just select 1 column, add 1 param, etc...
8:44 PM
And I would recommend checking some basic sql tutorials so you don't fall in basic errors
Avatar
Avatar
Natsu
For some reason it never arrived at the server the send command is a testing node
When sending this + the hook BPServerHandleNetExecCommand should give me some kind of feedback right ? right now it doesnt seem like it's called at all
Avatar
Do you have any log print on the hook?
8:52 PM
i guess the hook is correct but i made an error in the dev kit with the above node's
Avatar
nlohmann::json j; bool b = db_.query(fmt::format("SELECT SteamId FROM {} LIMIT 20;", table_players3_)).each([&](uint64 steamid, std::string nickname, int kills, int deaths) { nlohmann::json object; object["SteamId"] = steamid; object["Nickname"] = nickname; object["Kills"] = kills; object["Deaths"] = deaths; j.push_back(object); return true; }); return j.dump(); (edited)
8:52 PM
yay
8:52 PM
it is crashed again
Avatar
jraServerAPI 1/20/2023 8:54 PM
change it to SELECT * FROM
8:54 PM
instead of SELET SteamId FROM
8:54 PM
😂
8:54 PM
biggest facepalm ever
8:55 PM
wasn't watching at it
8:55 PM
this is why it nullptr'd before
Avatar
Avatar
Natsu
Yup
is it enabled/set? (edited)
Avatar
Avatar
Pelayori
is it enabled/set? (edited)
Yup the hook is set
Avatar
In the mod try calling bp server handle net exec command on the buff (server side) to see if the hook is correct, or on devkit try printing something mod side on the net exec
Avatar
Avatar
Pelayori
In the mod try calling bp server handle net exec command on the buff (server side) to see if the hook is correct, or on devkit try printing something mod side on the net exec
Tested it with my structure the hook is called fine ingame
Avatar
I'm pretty sure I've used it client side on a mod
9:54 PM
Make sure it is reliable set as true
Avatar
Avatar
SR
nlohmann::json j; bool b = db_.query(fmt::format("SELECT SteamId FROM {} LIMIT 20;", table_players3_)).each([&](uint64 steamid, std::string nickname, int kills, int deaths) { nlohmann::json object; object["SteamId"] = steamid; object["Nickname"] = nickname; object["Kills"] = kills; object["Deaths"] = deaths; j.push_back(object); return true; }); return j.dump(); (edited)
это же не в основном потоке ?)
Avatar
Avatar
anton
это же не в основном потоке ?)
Avatar
и можешь подсказать как тут с тредами быть
Avatar
Avatar
anton
и можешь подсказать как тут с тредами быть
ну тут в одном потоке 90% работает
Avatar
чтоб игру ну убить ))
10:19 PM
ааа
10:19 PM
жесть
Avatar
и на удивление
10:19 PM
работает без лагов
10:19 PM
ахахха
Avatar
бдха с ответом минимум 18 мс вроде (edited)
10:24 PM
хотя мб и быстрее
Avatar
Avatar
Pelayori
I'm pretty sure I've used it client side on a mod
did you also use a buff ? i checked BP handle mod side in the dev kit and the server calls it when printing when ingame (using gamelog) it never get called.
Avatar
I used it from a weapon i believe
Avatar
Avatar
Pelayori
I used it from a weapon i believe
Yea widget/structure is working fine for me for some reason buff doesn't
Avatar
Avatar
Natsu
did you also use a buff ? i checked BP handle mod side in the dev kit and the server calls it when printing when ingame (using gamelog) it never get called.
devkit 402Gb 💀
Avatar
Avatar
anton
devkit 402Gb 💀
Yea ark all maps + dev kit + windows is my entire SSD 😄
Avatar
Avatar
Natsu
Yea ark all maps + dev kit + windows is my entire SSD 😄
Ark + devkit 1Tb ))
Avatar
Accelerator 1/21/2023 8:48 PM
this may be not about plugin but I hope that someone will still be able to help me: As you can see on the pic I tried uploading my own Center map Extension for custom caves and some meshole fixes.
8:48 PM
So far that all worked but when I go on steam it looks like this:
8:49 PM
8:49 PM
No name no pic no anything, file size is 0MB and you can add it to your mods.
8:49 PM
(Ignore the German)
8:50 PM
I tried to follow yt tutorials but it still doesn't work. Hope anyone can help me.
Avatar
This discord is not for mod development
Avatar
Avatar
Accelerator
I tried to follow yt tutorials but it still doesn't work. Hope anyone can help me.
You may want to try here
Avatar
@Accelerator what resolution it is?
Avatar
Avatar
substitute
You may want to try here
Accelerator 1/21/2023 10:30 PM
ty
Avatar
Avatar
substitute
This discord is not for mod development
Accelerator 1/21/2023 10:30 PM
sry didn't know where to ask else
Avatar
Avatar
SR
@Accelerator what resolution it is?
Accelerator 1/21/2023 10:30 PM
wdym by that?
Avatar
Avatar
Accelerator
wdym by that?
widthxheight
Avatar
Avatar
SR
widthxheight
Accelerator 1/21/2023 10:32 PM
I'm not just talking abt the image the whole mod doesn't work...
Avatar
Avatar
Accelerator
I'm not just talking abt the image the whole mod doesn't work...
Bro 💀
10:32 PM
say your image resolution
10:32 PM
just say it
10:33 PM
Use 512x512
10:33 PM
or try accessing the console
10:33 PM
wont let me copy
Avatar
and watching what causes this error
Avatar
Fixed (edited)
Avatar
Usually it happens after picture resolution (edited)
Avatar
Avatar
Natsu
Fixed (edited)
Structs are broken for arrays
10:34 PM
don't know why
Avatar
Avatar
SR
and watching what causes this error
Accelerator 1/21/2023 10:35 PM
In fact the steam console didn't even open when I uploaded it... and the normal console that starts at the beginning wont open at all even if I click on ti for some reason...
Avatar
Avatar
Accelerator
In fact the steam console didn't even open when I uploaded it... and the normal console that starts at the beginning wont open at all even if I click on ti for some reason...
you need
10:35 PM
the ue4 console
10:35 PM
it is open
Avatar
Avatar
SR
Usually it happens after picture resolution (edited)
Accelerator 1/21/2023 10:35 PM
So without pic it should work?
Avatar
always when you run ue4
Avatar
Avatar
SR
always when you run ue4
Accelerator 1/21/2023 10:35 PM
Ik
10:35 PM
but i catn acces it
Avatar
Avatar
SR
Structs are broken for arrays
i doubt it's broken because people are using them, i just think i am using incorrect code somewhere
Avatar
Accelerator 1/21/2023 10:36 PM
its there but also not idk
Avatar
Are you logged into steam @Accelerator ?
Avatar
Avatar
Natsu
Are you logged into steam @Accelerator ?
Accelerator 1/21/2023 10:36 PM
the steam consoel to log in doesnt even open idk why
Avatar
Avatar
Accelerator
Click to see attachment 🖼️
Accelerator 1/21/2023 10:37 PM
same for this if I press it nothing happens its always running in the back round
Avatar
Avatar
Accelerator
same for this if I press it nothing happens its always running in the back round
maximize window from taskbar
Avatar
Accelerator 1/21/2023 10:38 PM
10:38 PM
ok doesn show task bar
Avatar
Avatar
SR
maximize window from taskbar
Accelerator 1/21/2023 10:38 PM
exactly what I do
10:38 PM
doesn't work
10:38 PM
I don't fkn know why
Avatar
Avatar
Accelerator
I don't fkn know why
here
10:39 PM
click on console
10:39 PM
and RMB
10:39 PM
then "Maximize"
Avatar
Accelerator 1/21/2023 10:39 PM
Avatar
Avatar
Accelerator
Click to see attachment 🖼️
you need to open it in taskbar and click RMB
10:40 PM
to open context menu (edited)
Avatar
try changing pic
Avatar
Accelerator 1/21/2023 10:41 PM
k can I also do none ? Or what resolution should it be?
Avatar
Avatar
Accelerator
k can I also do none ? Or what resolution should it be?
you need anything
Avatar
Accelerator 1/21/2023 10:42 PM
k tyvm I'll try it
Avatar
Avatar
SR
Structs are broken for arrays
fixed it should be using TArray and not vector
Avatar
I'm having this problem, i can't compile the plugin, can some one guide me please? I use the sustitute's template to try, but i cant make it to compile.
Avatar
Avatar
Asrafel
I'm having this problem, i can't compile the plugin, can some one guide me please? I use the sustitute's template to try, but i cant make it to compile.
Avatar
Thanks Friend! i will try!
Avatar
AttackerShooterController->GetPlayerCharacter()->CurrentWeaponField() Can anyone explain how this works? Where do I find more information on this because it seems essential to define thing.
Avatar
What information do you want on it?
7:37 AM
It works by accessing the controller class, going to their current character and getting the weapon if they have one.
Avatar
ArkApi::GetApiUtils().SendChatMessage( This I can understand. I can easily find more information about this as its classed under ArkApi. But where do I find that attackershootercontroller.
7:38 AM
Is it in files? Is it on the API? And getplayercharacter seems with a lot of functions. Where can I find those.
Avatar
There's not enough information to answer that question. My best guess would be it's a hook that one of the parameters is a PlayerController and they've grabbed that to get the data from it.
7:40 AM
The API is the "files", so I'm not sure what you mean by that. (edited)
Avatar
Let me put it as this. AttackerShooterController->GetPlayerCharacter()->... It seems you can define that under: ...IsConscious() ...IsSitting() ...CurrentWeaponField() ...bIsCarried() Etc. Where do I find more. (edited)
Avatar
You'd find it where that class is defined
7:42 AM
Those are called member functions.
7:42 AM
You might want to have some better understanding of the C++ language to follow along better. (edited)
Avatar
I understand part of C++ as I followed tutorials.
7:43 AM
I can understand the -> part
7:43 AM
Like you said its class defined. But where do I find that.
Avatar
If you're on MSVC, you can click F12 while hovering the type.
7:44 AM
That will take you to it.
7:44 AM
I cannot recall the file path off the top of my head, I would have to grep for it.
Avatar
jraServerAPI 1/24/2023 7:45 AM
There is no official Ark API documentation, i think thats what he is looking for
Avatar
Oh that makes sense. So yeah there are no docs, we use reverse engineering knowledge as well as Unreal Engine knowledge to find that information out. 👍
Avatar
Any place you can give me info about that getplayercharacter?
Avatar
could someone explain to me what i might be doing wrong? I load json data using Utf8Decode and words like "Ремесло" are seen normally ingame. now i am trying to get mysql data (Lethal_quest plugin data). And for some reason the Utf8Decode wont work for the tribename / name, it will always return ????. The colum has a character set of utf8mb4, do i need to Encode and then decode it again?
Avatar
Avatar
HighWorks
Any place you can give me info about that getplayercharacter?
Figured it out. It was under Actor.h.
Avatar
Avatar
Natsu
could someone explain to me what i might be doing wrong? I load json data using Utf8Decode and words like "Ремесло" are seen normally ingame. now i am trying to get mysql data (Lethal_quest plugin data). And for some reason the Utf8Decode wont work for the tribename / name, it will always return ????. The colum has a character set of utf8mb4, do i need to Encode and then decode it again?
Try adding .c_str() to the string value you read from the database then put it into an FString.
Avatar
Avatar
Lethal
Try adding .c_str() to the string value you read from the database then put it into an FString.
This is how i am calling it currently from mysql player["Name"] = FString(ArkApi::Tools::Utf8Decode(result.get_value<std::string>(1).c_str()));
Avatar
Remove the decode
2:16 PM
try player["Name"] = FString(result.get_value<std::string>(1).c_str());
Avatar
Avatar
Lethal
try player["Name"] = FString(result.get_value<std::string>(1).c_str());
sill get a return of ????? when reading the value of the DB
Avatar
i do have to say i do decode when i put it inside my struct.
Avatar
Avatar
Natsu
sill get a return of ????? when reading the value of the DB
What is value inside db?
Avatar
Avatar
SR
What is value inside db?
Avatar
Avatar
Natsu
Click to see attachment 🖼️
Oh
4:06 PM
Try using "encode"
4:06 PM
Or sending already encoded value in db
4:07 PM
You are getting std::string
4:07 PM
And it doesn't support UTF-16
Avatar
Avatar
SR
You are getting std::string
no using FString i am doing the following. 1) Load Data from Mysql into a map 2) Load map into a struct 3) Send struct to client for data coming from Json it works fine
Avatar
Avatar
Natsu
no using FString i am doing the following. 1) Load Data from Mysql into a map 2) Load map into a struct 3) Send struct to client for data coming from Json it works fine
Are you sure that you GET FString?
Avatar
Avatar
SR
Are you sure that you GET FString?
yup player["Name"] = FString(ArkApi::Tools::Utf8Decode(result.get_value<std::string>(1).c_str()));
Avatar
Why are you passing 1 to the get value?
Avatar
Avatar
Pelayori
Why are you passing 1 to the get value?
i am grabbing the data with a mysql query. and grabbing multiple data like kills tribe and steamid
Avatar
Don't think that does what you think
4:30 PM
What's your query like
Avatar
Fixed problem was because i read the data as utf8 while it should be read as utf8mb4 (edited)
Avatar
Yeah that doesn't work like that
4:31 PM
The int parameter is to get the T value if you have multiple rows returned
4:32 PM
so passing 1 gets the 2nd row, 2 the 3rd...
4:32 PM
Use result.fetch(param1, param2...) to get the current row's values (edited)
4:32 PM
The string is like that because you are feeding it garbage probably
Avatar
Avatar
Natsu
yup player["Name"] = FString(ArkApi::Tools::Utf8Decode(result.get_value<std::string>(1).c_str()));
isn't it std::string?
Avatar
So I'm thinking about submitting a PR to improve UProperty::Get() and UProperty::Set() in ArkServerApi. My primary motivation is to fix this snippet: c++ T Get(UObject* object) { if (!object->StaticClass()->HasProperty(this)) throw std::invalid_argument("Object does not contain this property."); ... object->StaticClass() calls the static UObject::StaticClass(), which returns the UClass for UObject, not the UClass of object. You'd think HasProperty() would return false when called with a UProperty not in the UObject UClass, but it turns out UClass::HasProperty() was flawed before UE4.22 and basically always returns true. I'd also like some input from the dev team or other users on whether or not I should enhance these functions to handle bools more nicely. In a UClass, UBoolProperty values are packed into a bitfield. You might expect to be able to use uBoolProperty->Get<bool>(object) or uBoolProperty->Set(object, true) to get or set a single bool property, but you would potentially be getting/overwriting an entire byte's worth of bools. You'd have to mask out other bits to get the value you care about after a Get(). Or do a Get(), then modify, then Set() to properly set/unset the value you care about. I could add code to the Get() and Set() functions to do this when called on a UBoolProperty. It would be a change in behavior, but I think it may be a welcome one.
Avatar
Any improvement is appreciated, specially from those who have deeper engine knowledge 🙂
4:08 PM
Substitute was the one that pushed those bits of code a while ago
Avatar
Avatar
TheMollusk
So I'm thinking about submitting a PR to improve UProperty::Get() and UProperty::Set() in ArkServerApi. My primary motivation is to fix this snippet: c++ T Get(UObject* object) { if (!object->StaticClass()->HasProperty(this)) throw std::invalid_argument("Object does not contain this property."); ... object->StaticClass() calls the static UObject::StaticClass(), which returns the UClass for UObject, not the UClass of object. You'd think HasProperty() would return false when called with a UProperty not in the UObject UClass, but it turns out UClass::HasProperty() was flawed before UE4.22 and basically always returns true. I'd also like some input from the dev team or other users on whether or not I should enhance these functions to handle bools more nicely. In a UClass, UBoolProperty values are packed into a bitfield. You might expect to be able to use uBoolProperty->Get<bool>(object) or uBoolProperty->Set(object, true) to get or set a single bool property, but you would potentially be getting/overwriting an entire byte's worth of bools. You'd have to mask out other bits to get the value you care about after a Get(). Or do a Get(), then modify, then Set() to properly set/unset the value you care about. I could add code to the Get() and Set() functions to do this when called on a UBoolProperty. It would be a change in behavior, but I think it may be a welcome one.
How dare you write out a completely rational design plan to improving my code!!1!
9:32 PM
Yeah go ahead and submit the PR
9:32 PM
better safety and more compliant code is always welcome
9:33 PM
Especially the stuff with clobbering bools (edited)
9:34 PM
One suggestion though for bit fields. Don’t change the behavior of the bool primitive, we can instead create a positional bit field type that knows which bit it should read
9:35 PM
As long as it’s the size of a bool, reading/setting it should be fine as long as modification operators operate on the single bit
9:35 PM
This is particularly useful since you can’t read < 1 byte anyways
9:36 PM
We could also just write a template specialization for a positional bit field type that does the manipulation at read/set time
9:36 PM
Both options work 🙂
9:36 PM
I can actually do that later today if I have time
Avatar
Avatar
substitute
We could also just write a template specialization for a positional bit field type that does the manipulation at read/set time
C++ isn't my best language, so I don't know about rational haha. I was doing something like this with specialization: c++ struct UProperty : UField { template<typename T> T Get(UObject* object); template<typename T> void Set(UObject* object, T value); ... }; template<typename T> T UProperty::Get(UObject* object) { if (ClassField()->ClassCastFlagsField() & static_cast<uint64>(ClassCastFlags::CASTCLASS_UBoolProperty)) throw std::invalid_argument("Non-bool type expected from UBoolProperty."); ... } template<> bool UProperty::Get(UObject* object) { if (!(ClassField()->ClassCastFlagsField() & static_cast<uint64>(ClassCastFlags::CASTCLASS_UBoolProperty))) throw std::invalid_argument("Bool type expected from non-UBoolProperty."); ... } (edited)
Avatar
That’s pretty close
Avatar
Yeah a specific bitfield type is better
Avatar
Instead we’d use T as positional_bit_field<int>
9:38 PM
You can pass integers as type args in a template
9:39 PM
It’s how std::array<T,U> works
9:39 PM
As for parsing out the positional bit value, that will be a little tricky but I can probably do it with a pattern match template
9:39 PM
Something like
9:41 PM
template<int T> Get<positional_bit_field<T>>
9:41 PM
I’ll play around with it
Avatar
Avatar
substitute
You can pass integers as type args in a template
In my bool Get() specialization I was using this: c++ UBoolProperty* boolProperty = static_cast<UBoolProperty*>(this); uint8* bytePtr = reinterpret_cast<uint8*>(object) + boolProperty->Offset_InternalField() + boolProperty->ByteOffsetField(); return !!(*bytePtr & boolProperty->FieldMaskField()); And for Set(): c++ UBoolProperty* boolProperty = static_cast<UBoolProperty*>(this); uint8* bytePtr = reinterpret_cast<uint8*>(object) + boolProperty->Offset_InternalField() + boolProperty->ByteOffsetField(); uint8 newByte = (*bytePtr & ~boolProperty->FieldMaskField()) | (value ? boolProperty->ByteMaskField() : 0); *(reinterpret_cast<uint8*>(object) + Offset_InternalField()) = newByte; (edited)
Avatar
Avatar
substitute
As long as it’s the size of a bool, reading/setting it should be fine as long as modification operators operate on the single bit
Technically, the ElementSize for UBoolProperty values can be greater than 1 btw. The bitfields are allowed to span multiple bytes. But when I traversed global objects, they seemed to all just be 1 byte.
Avatar
Avatar
TheMollusk
Technically, the ElementSize for UBoolProperty values can be greater than 1 btw. The bitfields are allowed to span multiple bytes. But when I traversed global objects, they seemed to all just be 1 byte.
Frightening
Avatar
hey ho Guys when i show on GameServerHub for the teleport.11 https://ark-server-api.com/resources/teleport.11/ than i was forwarded to Ark Server Api .. i ask i will use this to teleport offline players to my position https://ark-server-api.com/forums/threads/admin-cleanup-plugin.967/post-11359 can anybody help me with that problem? i have run ARK Server API and Arkbot on my server
Ark Server API Original Author: @Michidu Maintainer: @Lethal @Pelayori @Foppa @WETBATMAN Product Description: This tool allows you to load plugins into your gaming communities; this is an open-source community-supported "API" required for...
There are a lot of useful plugins on here but I feel a good player/tribe finding plugin is sorely needed. Most server admins go the manual route and use showmyadminmanager and others use ACM which is outdated and unstable sometimes. A successor named EMS is in the works however this mod may take...
Avatar
Avatar
tuvok
hey ho Guys when i show on GameServerHub for the teleport.11 https://ark-server-api.com/resources/teleport.11/ than i was forwarded to Ark Server Api .. i ask i will use this to teleport offline players to my position https://ark-server-api.com/forums/threads/admin-cleanup-plugin.967/post-11359 can anybody help me with that problem? i have run ARK Server API and Arkbot on my server
GSH | MrOwlSky 1/29/2023 4:32 PM
Old ArkServerApi links don't work you have to use the proper GameServersHub url. You can locate the plugin by using the resource search function on the site.
Avatar
Ok i will check it when i finish with sleep 😉
😂 1
Avatar
ok i think the teleport.11 is removed from the plattform
Avatar
The second Link in the plugintutorial channel "Creating Hooks with ArkApi" seems to be outdated. Any body got an alternative link? Edit: Every "https://ark-server-api.com/..." link seems to not work anymore. (edited)
Ark Server API Original Author: @Michidu Maintainer: @Lethal @Pelayori @Foppa @WETBATMAN Product Description: This tool allows you to load plugins into your gaming communities; this is an open-source community-supported "API" required for...
8:54 PM
i have dude
8:54 PM
how i can spawn unbreakeable wall?
8:54 PM
for mod caves
Avatar
How to properly intercept messages sent in chat? What is the hook for it?
Avatar
Avatar
SR
How to properly intercept messages sent in chat? What is the hook for it?
AShooterPlayerController::ServerSendChatMessage_Implementation
Avatar
Avatar
Pelayori
AShooterPlayerController::ServerSendChatMessage_Implementation
this one doesn't even fire
6:52 PM
😛
Avatar
Well it does
6:52 PM
It's the one on the api
Avatar
interesting
Avatar
for chat commands
6:53 PM
Are you trying to intercept chat commands?
Avatar
I'm trying to intercept only the user gets.
6:53 PM
For example
6:54 PM
Client sends: "Hello" It is still "Hello" on the server But end client gets: "Goodbye"
Avatar
Then you should have no issue
6:55 PM
I said that because for commands it gets returned from the api so the message never arrives
Avatar
I'll try it then. Thank you for your help.
Avatar
@Pelayori is it possible to get player inactivity timer?
Avatar
Not sure. Check the game mode it might have something
Avatar
Original message was deleted or could not be loaded.
Import the lib and other data you need #pragma comment(lib, "Permissions.lib") Then use it like this Permissions::IsPlayerInGroup(steam_id, "Admins") (edited)
Avatar
is there any tutorial for start programing ark plugins?
Avatar
jraServerAPI 2/7/2023 5:01 AM
not really, are you familiar with c++? that's going to be the biggest challenge if you are not
Avatar
Avatar
jraServerAPI
not really, are you familiar with c++? that's going to be the biggest challenge if you are not
a little bit, but I am familiar with other programming languages
Avatar
jraServerAPI 2/7/2023 5:03 AM
okay, well than you're off to a good start.. Have you installed the api and run any plugins on your server?
Avatar
yes ofc
Avatar
jraServerAPI 2/7/2023 5:04 AM
cool.. then I would start by looking at the open source examples
5:04 AM
and downloading Visual Studio
5:04 AM
and start playing
5:05 AM
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
okay, thanks ツ
Avatar
jraServerAPI 2/7/2023 5:05 AM
when you get stuck.. just search this discord
5:06 AM
your questions most likely have already been asked, you just have to find them (edited)
✅ 1
Avatar
Avatar
Loki
yes ofc
substitute 2/7/2023 5:54 PM
Here’s a template
5:54 PM
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
Avatar
hello, on ARK DEV KIT i want create a buttom to get a item to the player inventory who can help me ? i have creat the menu and the buttom i juste want to click and get item (for exemple pickaxe) to the player inventory
5:59 PM
who can help me ?
Avatar
Avatar
warneur
hello, on ARK DEV KIT i want create a buttom to get a item to the player inventory who can help me ? i have creat the menu and the buttom i juste want to click and get item (for exemple pickaxe) to the player inventory
go tu the ark moddeing comunety amd ask for help there
8:09 AM
Avatar
Hey, how'd it be possible to obtain the information displayed with the View Players button in the Steam in-game overlay? Here's an example:
2:06 PM
Afaik there isn't any REST API for this
Avatar
Avatar
Dan
Hey, how'd it be possible to obtain the information displayed with the View Players button in the Steam in-game overlay? Here's an example:
Avatar
Yeah I've messed around with that endpoint, the steam ID expects a Steam user, not the ID of a server.
5:05 PM
(whereas I'm trying the get the list of players, including steam name/id/play time on a server)
5:06 PM
this is the feature i need to be using https://partner.steamgames.com/doc/features/multiplayer/game_servers but i'm 99% sure this is not possible to use with a basic HTTP request
Avatar
Avatar
Dan
(whereas I'm trying the get the list of players, including steam name/id/play time on a server)
Try getting everyone's controllers and just getting them all into a json.
5:07 PM
You can get any sort of info here
5:07 PM
except (probably) playtime
Avatar
You can query the server for connected player names and how long they've been connected, like the Steam server browser does. But that doesn't give SteamIDs, and I don't think Steam/Steamworks provides an interface for externally querying a server for SteamIDs. ARK has the ListPlayers RCON command, which returns SteamIDs (and IDs for Epic players). Or if you write a server plugin, ArkServerApi has utilities for getting SteamIDs. (edited)
Avatar
i was using the following hook to try and check what dino's / supply drops are spawned, but crashed. Should i use a different hook? AActor* Hook_UWorld_SpawnActor(UWorld* _this, UClass* Class, FVector* Location, FRotator* Rotation, FActorSpawnParameters* SpawnParameters)
Avatar
jraServerAPI 2/11/2023 7:00 PM
show us your code.. why did it crash?
7:00 PM
lethalkek 1
Avatar
Avatar
jraServerAPI
Click to see attachment 🖼️
AActor* Hook_UWorld_SpawnActor(UWorld* _this, UClass* Class, FVector* Location, FRotator* Rotation, FActorSpawnParameters* SpawnParameters) { AActor* SpawnedActor = UWorld_SpawnActor_original(_this, Class, Location, Rotation, SpawnParameters); FString HumanReadableName; SpawnedActor->GetHumanReadableName(&HumanReadableName); if (SpawnedActor != nullptr && HumanReadableName.Equals("SupplyCrate_Cave_QualityTier1_C")) { Log::GetLog()->info("{} Spawned at X:{} Y:{}", SpawnedActor->GetHumanReadableName(&HumanReadableName)->ToString(), ArkApi::GetApiUtils().FVectorToCoords(*Location).x, ArkApi::GetApiUtils().FVectorToCoords(*Location).y); return UWorld_SpawnActor_original(_this, Class, Location, Rotation, SpawnParameters); } return UWorld_SpawnActor_original(_this, Class, Location, Rotation, SpawnParameters); }
Avatar
jraServerAPI 2/11/2023 7:25 PM
can you just run your plugin and permissions? (if you need it) but no other plugins (i see safezone in there etc..) and ALSO add the pdb file to your plugin folder.. then when it crashes again.. you will have a function name, and a line number here telling you what line it crashed on (edited)
7:25 PM
Avatar
Avatar
jraServerAPI
Click to see attachment 🖼️
Added pdb now , but the plugin itself is really small only has that hook. nothing else 😄
7:30 PM
Avatar
jraServerAPI 2/11/2023 7:30 PM
is it the log->info line?
Avatar
no it's the return bottom one
Avatar
jraServerAPI 2/11/2023 7:31 PM
oh.. you already called UWorld_SpawnActor_original once
7:31 PM
thats probably why
Avatar
removed that one let me try again only 1 return now
Avatar
jraServerAPI 2/11/2023 7:31 PM
maybe return SpawnedActor ?
7:32 PM
I've never messed with this hook
Avatar
You have the Class already why do you need something else?
7:54 PM
FString GetBlueprintFromClass(UClass* object) { if (object != nullptr) { FString path_name; object->GetDefaultObject(true)->GetFullName(&path_name, nullptr); if (int find_index = 0; path_name.FindChar(' ', find_index)) { path_name = "Blueprint'" + path_name.Mid(find_index + 1, path_name.Len() - (find_index + (path_name.EndsWith( "_C", ESearchCase:: CaseSensitive) ? 3 : 1))) + "'"; return path_name.Replace(L"Default__", L"", ESearchCase::CaseSensitive); } } return FString(""); } (edited)
Avatar
Avatar
Lethal
FString GetBlueprintFromClass(UClass* object) { if (object != nullptr) { FString path_name; object->GetDefaultObject(true)->GetFullName(&path_name, nullptr); if (int find_index = 0; path_name.FindChar(' ', find_index)) { path_name = "Blueprint'" + path_name.Mid(find_index + 1, path_name.Len() - (find_index + (path_name.EndsWith( "_C", ESearchCase:: CaseSensitive) ? 3 : 1))) + "'"; return path_name.Replace(L"Default__", L"", ESearchCase::CaseSensitive); } } return FString(""); } (edited)
Thanks that solved the crash issue.
Avatar
Avatar
Dan
Afaik there isn't any REST API for this
There isn’t
9:18 PM
That data is replicated to your steam client directly
Avatar
Avatar
TheMollusk
You can query the server for connected player names and how long they've been connected, like the Steam server browser does. But that doesn't give SteamIDs, and I don't think Steam/Steamworks provides an interface for externally querying a server for SteamIDs. ARK has the ListPlayers RCON command, which returns SteamIDs (and IDs for Epic players). Or if you write a server plugin, ArkServerApi has utilities for getting SteamIDs. (edited)
They don’t
9:19 PM
I was able to get the same info externally by emulating the steam client and preforming the steam auth handshake with the server
9:19 PM
And then aggregating the incoming data
Avatar
Oh wow, is the data even accurate enough to be worth doing that? It doesn’t seem to match what A2S returns
Avatar
How works "StaticCreateBabyDino" Hook? i copy them from Server Api Hooker Creator and dont copiles
Avatar
Avatar
Loki
How works "StaticCreateBabyDino" Hook? i copy them from Server Api Hooker Creator and dont copiles
The first argument to DECLARE_HOOK has to be the name you're using for the function. So if you use DECLARE_HOOK(Foo, ...) you'll have Foo_original(...) and Hook_Foo(..)
Avatar
oh okay
12:57 AM
thanks
12:57 AM
PeepoLove
Avatar
Avatar
jraServerAPI
https://www.youtube.com/watch?v=J5pSCGyH4BI I had already moved my character before i ran /test1 as you can see the bubble is not on center /test1 is using RelativeLocationField() (update: was using AShooterPlayerController which is why it did not move, should use AShooterCharacter instead) /test2 is using GetWorldLocation() (edited)
i know is a old video but i searching for that, how you create that bubble?
Avatar
jraServerAPI 2/17/2023 4:00 AM
player_controller->MulticastDrawDebugSphere
Avatar
is it possible to change a structure name? as in "TekForcefield"
Avatar
item containers have "boxname"
Avatar
Avatar
Lethal
item containers have "boxname"
thanks i was looking at namefield
Avatar
what is the hook to check when promote to tribe admin/owner? DECLARE_HOOK(AShooterPlayerState_PromoteToTribeAdmin, void, AShooterPlayerState*, APlayerController*); dont works for me
12:57 AM
forget, i found it, if smthing want it is DECLARE_HOOK(AShooterPlayerState_ServerRequestPromotePlayerInMyTribe_Implementation, void, AShooterPlayerState*, int);
Avatar
Hello, I would like to force the player to upload the current character to the arkdata. Is this even possible? I really would appreciate any tips where to start looking !
Avatar
just find it in gsh
Avatar
how i can get the server enablecheats password? Or hook when smthing uses enablecheats and password is correct? DECLARE_HOOK(AShooterPlayerController_EnableCheats, void, AShooterPlayerController*, FString); dont works for me. Also DECLARE_HOOK(AShooterPlayerController_CheckCheatsPassword_Implementation, void, AShooterPlayerController*, FString*); works but it runs every time than player do "enablecheats" even password is correct or no (edited)
Avatar
There isn’t a “cheats enabled” event if that’s what you’re looking for
7:51 PM
You’ll have to check how the checkcheats actually validates (edited)
Avatar
If the player is flagged as an admin they have the ability to use cheat commands.
Avatar
Avatar
substitute
There isn’t a “cheats enabled” event if that’s what you’re looking for
and theres any hook when players send a tab command?
Avatar
You mean when open the console?
8:29 PM
No, that’s client sided
8:29 PM
The only time it isn’t is when the command is a server command
8:29 PM
From what I remember
Avatar
okay thanks
Avatar
If you mean a hook for a console command this should be it. However other plugins that give command rewards would also run through this when issuing commands on behalf of a player etc. DECLARE_HOOK(AShooterPlayerController_ConsoleCommand, FString*, AShooterPlayerController*, FString*, FString*, bool); FString* Hook_AShooterPlayerController_ConsoleCommand(AShooterPlayerController* _this, FString* result, FString* Command, bool bWriteToLog) { return AShooterPlayerController_ConsoleCommand_original(_this, result, Command, bWriteToLog); } ArkApi::GetHooks().SetHook("AShooterPlayerController.ConsoleCommand", &Hook_AShooterPlayerController_ConsoleCommand, &AShooterPlayerController_ConsoleCommand_original); ArkApi::GetHooks().DisableHook("AShooterPlayerController.ConsoleCommand", &Hook_AShooterPlayerController_ConsoleCommand);
Avatar
Avatar
Lethal
If you mean a hook for a console command this should be it. However other plugins that give command rewards would also run through this when issuing commands on behalf of a player etc. DECLARE_HOOK(AShooterPlayerController_ConsoleCommand, FString*, AShooterPlayerController*, FString*, FString*, bool); FString* Hook_AShooterPlayerController_ConsoleCommand(AShooterPlayerController* _this, FString* result, FString* Command, bool bWriteToLog) { return AShooterPlayerController_ConsoleCommand_original(_this, result, Command, bWriteToLog); } ArkApi::GetHooks().SetHook("AShooterPlayerController.ConsoleCommand", &Hook_AShooterPlayerController_ConsoleCommand, &AShooterPlayerController_ConsoleCommand_original); ArkApi::GetHooks().DisableHook("AShooterPlayerController.ConsoleCommand", &Hook_AShooterPlayerController_ConsoleCommand);
thanks 😃 one hook more than i looking for and i cant find it, a hook for when you do the tek chestplate jump, Exist?
Avatar
What hook do you need to handle post post join before any checks?
10:40 AM
For example - to allow player join before he gets "server full" error.
Avatar
yall know this double counter thing is literally teaching people to do what they should never be doing - clicking links from unsolicited dms like that.
6:43 AM
was really hesistant to do it but figured least see what it did in an incognito
Avatar
so is there any hope in running modded linux servers?
6:57 AM
does ark on linux run on wine?
Avatar
Avatar
Aikar
so is there any hope in running modded linux servers?
It's possible, but not as nice writing plugins for the Windows version of the server. I ran a cluster on Linux with my own plugins for several months before recently switching back to Windows. There's no public API/SDK for Linux ARK plugins. And if there was, existing plugins would still have to be modified and re-compiled since they're specific to the ArkServerApi/Windows platform. The Windows version of the ARK server ships with debug symbols, making it easy to get addresses to hook/call functions and read/write variables. We don't get debug symbols on Linux, but it is possible to reliably detect and take advantage of Unreal Engine's reflection system which provides access to many (but not all) gameplay-relevant functions and variables.
Avatar
guess ima have to suck it up and buy a windows server, i run many dedis for mc so was wanting to reuse my spare hw lol. man i was windows free for a decade, and now here i am about to even have a windows server. feels dirty!
4:55 PM
im happy there is a community / project like this for ark. i led one for minecraft too but always loved ark but mainly been console and just have never looked into getting into ark at this level for PC, but the probable lie of ark2 coming out soon got the hype up and figured do some modded ark until then.
4:55 PM
and figure why not try to grow a community to go into 2 when ever it comes out in 5 years
Avatar
Avatar
Aikar
guess ima have to suck it up and buy a windows server, i run many dedis for mc so was wanting to reuse my spare hw lol. man i was windows free for a decade, and now here i am about to even have a windows server. feels dirty!
Hypothetically it should be possible to run the servers on Linux through Wine
5:33 PM
But the performance hit is probably not worth it
Avatar
jraServerAPI 2/25/2023 6:32 PM
6:32 PM
sorry couldn't help myself 😆
Avatar
🐨Dream Doctor🦘 2/27/2023 7:31 AM
There's a game server management platform called "Pterodactyl" that runs on Linux and supports many games, including Ark. It runs all it's games, including Ark instances, in their own Docker containers, and runs the Windows version of Ark. They claim the performance hit is only 2-3%. I don't know if it's possible it add this API to that mix, but it might be. https://pterodactyl.io/ (edited)
Pterodactyl is an open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
7:32 AM
@Aikar
Avatar
is there also a isTribeOwner value? IsTribeAdmin(); IsTribeFounder() (edited)
Avatar
what do i need to do to run it on linux
2:48 PM
linux is superior
Avatar
@🐨Dream Doctor🦘 yeah ive worked with the creator of that extensively 😛 everyone uses my tuning values in minecraft yet their panel ends up setting bad memory settings for the container causing issues 😦 so was a chore trying to get it adjusted to give more overhead memory. But ill prob end up doing what I did before and just write my own tools for config and deployment and setup inheritance/shared configs. but i prefer command line so gotta see if openssh is an option or something but still launch windows apps. dont wanna manage a dang server with remote desktop.
Avatar
@Mr. Alpaca imnew here too but ive already seen enough that many plugins only build/work for windows :/ so while "modded" ark prob runs fine on linux, seems might be a bit more limited for plugins.
Avatar
Avatar
Aikar
@Mr. Alpaca imnew here too but ive already seen enough that many plugins only build/work for windows :/ so while "modded" ark prob runs fine on linux, seems might be a bit more limited for plugins.
when running ark with wine the paths should be fine, the plugins run as ark so it should work
Avatar
yeah but if any of the hooks use stuff wine hasnt implemented could be an issue - i dunno i see people marking plugins as windows only
4:35 PM
guess would be good if anyone here has been running it under linux can chime in, as i would totally prefer to use linux
4:36 PM
since it seems windows servers has an additional cost too for license :/
Avatar
I've never used wine for ark, but is it worth the performance hit?
Avatar
prob not :/ we have enough perf issues as-is
Avatar
Also for windows licenses, I get OEM licenses for 2€, lifetime and never had any issue
4:40 PM
I also think there's some ark provider using ssh servers to manage anything ark related within windows
4:40 PM
So that's always an option
Avatar
where do you get your licenses from?
4:42 PM
i've seen windows core wich as far i know is free, maybe its possible to run ark on there
Avatar
I search what windows server license I want from allkeyshop.com and it lists all the sites that sell them, and the price
4:43 PM
Never had an issue buying from there, and always worked fine
Avatar
thanks
Avatar
Last week I bought 2 win server 2019 standard and both worked fine first try
Avatar
why 2019?
Avatar
I use that one for my servers
4:44 PM
But I've also bought win server 2022
Avatar
oh ok
4:46 PM
are the licenses not like cpu core bound?
Avatar
Yes those OEM are valid for the current hardware, if you change you need to buy them again
Avatar
ok thnks
Avatar
but is windows server better or should i just buy a normal windopws liscenesese
Avatar
If you are use it solely for hosting software/games, use windows server
5:06 PM
Has less bloat
Avatar
k
5:06 PM
imagine installing windows server on a laptop
Avatar
lol
5:07 PM
Can't say I haven't done it 😉
Avatar
haha lol
5:10 PM
linux is better tho
Avatar
Everything has its use case (edited)
5:17 PM
For servers I'd 100% go with linux as well (edited)
Avatar
why would you use windows server, i dont see the positive stuff
Avatar
I just use them for ark cause plugins 😄
Avatar
only for ark servers
5:18 PM
🙂
Avatar
any know how i can hook when player try to deploy dino in cryopod and cancel it? Im using: FString path = "Blueprint'/Game/Extinction/CoreBlueprints/Weapons/PrimalItem_WeaponEmptyCryopod.PrimalItem_WeaponEmptyCryopod'"; UClass* cryoClass = UVictoryCore::BPLoadClass(&path); if (!cryoClass) { Log::GetLog()->critical("No cryopod class found!"); return; } UFunction* function = cryoClass->FindFunctionByName(FName("CanDeploy", EFindName::FNAME_Find), EIncludeSuperFlag::ExcludeSuper); if (!function) { Log::GetLog()->critical("No function 'CanDeploy' found!"); return; } FunctionIndex = function->InternalIndexField(); void Hook_UObject_ProcessInternal(UObject* _this, FFrame* Stack, void* const Result) { if (Stack->NodeField()->InternalIndexField() != FunctionIndex) { UObject_ProcessInternal_original(_this, Stack, Result); return; } //Do stuff return; } (edited)
6:39 PM
but I want to get the ShooterPlayerCharacter, of player than is deploying the dino
6:40 PM
or just the tribe id?¿
6:40 PM
idk if is possible
Avatar
I assume the hook is working already to prevent the deployment right? (edited)
Avatar
Avatar
Pelayori
I assume the hook is working already to prevent the deployment right? (edited)
yes, but i want get the ShooterPlayerCharacter so i can do a few conditions to prevent it or no
6:50 PM
or the "tribe id" too works me
Avatar
Right, so you could cast _this to an UPrimalItem*, which would give you the cryopod item. Then from the item you get the owner inventory, and from the owner inventory you can get the pawn owner.
6:50 PM
Tribe id could be obtained from the inventory's owner pawn.
Avatar
thanks man! It work fine GOGHEART1
Avatar
In process internal / process event, etc..., _this is always the object calling the function, so if you know the type you can cast to it to access it's data.
Avatar
@Aikaryou're the guy behind the minecraft tuning flags?
Avatar
@substitute yes
8:18 PM
Nice to see you here
Avatar
yeah most of my minecraft haitus's was due to ark lol
8:19 PM
just been console player until recent
8:19 PM
console = forced break from code
Avatar
Btw, plugins should work fine-ish if you manage to get it working on Linux with Wine
8:19 PM
Wine is just an implementation of the Windows loader/libraries
8:19 PM
the plugins are loaded via LoadLibrary
Avatar
yeah im ultimately trying to keep it simple and just work now lol
8:20 PM
yeah but you can totally enter areas wine hasnt implemented support for
8:20 PM
i managed a project like 15 years ago that also hooked into game (Final Fantasy 11) and loaded plugins, and iirc wine wasnt the happiest then, but wine has came a long ways since then
Avatar
It also depends on how the hooking is implemented
8:21 PM
Right now we are using Microsoft Detours
8:21 PM
which just inserts a trampoline for hooking
8:21 PM
I know there are some System-wide hooks in Windows, and I know you can mess with EAT and IAT
8:21 PM
but Detours is the easiest to use for most people
Avatar
wait so ms inserted support for hooking concepts into the win api lol? i remember the days of madchook triggering anti virus!
Avatar
It's a package that used to be proprietary but they've opened it up
8:22 PM
Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form. - GitHub - microsoft/Detours: Detours is a software package for monitori...
Avatar
ive been out of windows world for over a decade until recent, went 100% linux back in like 2012
Avatar
If Wildcard would just provide symbols for Linux
8:23 PM
we could port the API to use either depending on the execution context
8:23 PM
but they haven't been willing to provide symbols
Avatar
but i built a new pc and kinda wanted to be able to do some gaming on it for a change so reluctantly installed windows. ironically, my windows 7 key still gave me a free win10 install.
Avatar
Yeah, that's how most people pirate Windows 10/11
8:24 PM
basically does that
8:24 PM
lul
Avatar
thought they stopped it but i had read something about offline installs can still do it, and conveniently, the default nic drivers for mobo didnt work lol.
Avatar
They will never stop it, hell they won't even DMCA those scripts (edited)
8:25 PM
even though they OWN Github
8:25 PM
Market share >>> $100 per home user
Avatar
130 for retail price 😛
Avatar
I won't even pay for Windows Server 2022
8:25 PM
I just use the key I got from college
8:26 PM
they gave us like 200 MS products and it keeps updating w/ new products
8:26 PM
I'm also not using it for any commercial stuff though
Avatar
well an ark server that has a store would be considered commercial 😛
Avatar
I only run an ark server to test plugins and vulnerabilities
Avatar
yeah i was a rare case for minecraft where I was a lead developer who actually owned a server too lol
8:27 PM
hence why i drove so much development into the community, as i had a drive behind it
Avatar
I run a few smaller servers (MC, Rust) for people at my University
8:28 PM
I just have them behind a wireguard frontend VPS
Avatar
i still run the server but one of my people help maintain it though now. just got too burned out
Avatar
how's your C++?
Avatar
rusty, did C++ back for the plugin framework we had for FF11, i was a project lead back then too
8:29 PM
that was in 2006-2008 lol
Avatar
oof
8:29 PM
C++20 is an entirely different language
8:29 PM
and I love it
Avatar
ive seen hints. does CLion work well?
8:29 PM
im a jetbrains fan >_>
Avatar
I use Visual Studio for Windows development
Avatar
afk bit 1-1 with boss
Avatar
but CLion isn't bad
8:30 PM
Visual Studio is just really good on Windows
8:30 PM
and MSVC has really good C++20 support
8:30 PM
Clang has the worst, GCC is in the middle.
8:30 PM
I had to use macros in a library because of GCC and Clang #if defined(__clang__ ) /* Clang does not support B(A)(C...) syntax, only A B(C...) and refuses to compile otherwise. */ #define FUNCTION_SIGNATURE(x,y,z) x y (z) #define FUNCTION_SIGNATURE_VA(x,y,z) x y (z, ...) #elif defined(__GNUC__) || defined(_MSC_VER) || defined(__INTEL_COMPILER) /* GCC Supports A B(C...) and B(A)(C...) but produces wrong T* for T under A B(C...) */ #define FUNCTION_SIGNATURE(x,y,z) y(x)(z) #define FUNCTION_SIGNATURE_VA(x,y,z) y(x)(z,...) #endif (edited)
8:31 PM
Feelsbad
Avatar
ok back, yeah I do recall VStudio being decent, and its free now right?
Avatar
there's a community version
9:35 PM
you can also google for Enterprise keys
9:36 PM
I wrote a header-only library to make working with function calling/hooking easier
9:36 PM
it's a C++20 idiomatic way of handling it
Avatar
lol i try to keep things a bit legit these days, gets a bit hypocritical to be a software engineer/architect who wants to get paid for writing code to then pirate software 😛
Avatar
instead of typedefs or (in the case of this api) DECLARE_HOOK macros
Avatar
this project use signature scanning for access to structs and function hooks? common signatures shared?
Avatar
Avatar
Aikar
this project use signature scanning for access to structs and function hooks? common signatures shared?
this api or ?
Avatar
arkserverapi
Avatar
the api uses the PDB which has all of the addresses
9:39 PM
PDB is the debugging symbols
Avatar
is that file reliably distributed every server update?
Avatar
not always, but usually
9:39 PM
I would say 15/20 times
Avatar
Once they're aware it's not, they do their best to release it.
Avatar
WC kind of needs it because the game sucks ass and crashes
Avatar
unlike the dev kit it seems lol?
Avatar
and most people don't submit crash dumps
9:40 PM
so they just get the error messages
9:40 PM
which would be unresolved without the PDB
Avatar
i hear dev kits been missing stuff for months
Avatar
they do devkit in batches
9:41 PM
devkit is a lot harder to update than to simply include the debug symbols that are automatically built 😛
Avatar
all the dang tek suit mods being broken atm unless you skin them, playing primal fear atm having to constantly share gen2 skins for people who dont have gen2
Avatar
lol
9:41 PM
you could probably fix that with a plugin
9:42 PM
maybe
Avatar
i guess always send the exo suit skin to client
Avatar
that or apply the skin to unskinned items
9:42 PM
when applied/removed
Avatar
i dont think tek suit has any skin but exo suit lol, but yeah would want to keep peoples dyed skin
9:48 PM
well nice it can be done through pdb, http://aikar.github.io/SigScan/ is what we had to deal with in the past. I jumped in FF14 and saw there was a similar project there too and thankfully they were using signature scanning. Shudder at the idea of trying to maintain static offsets per build.
Avatar
if we had to, we would only need two signatures to cover most things in the API
9:49 PM
all you really need is FNames and GObjects for UE4
9:49 PM
then you can use reflection
Avatar
so all the engine functions are registered into a map?
Avatar
not exactly
Avatar
yeah ive never gone into UE development, but on fence how deep i wanna dive, just trying to keep things simpler and just get something going for now until whatever year ark2 comes out
Avatar
well, since we have PDB
Avatar
gotta learn wtf is all new with C++ though
Avatar
you don't need to worry about GObjects or FNames
Avatar
is there any generic api docs like javadocs for the api?
Avatar
there is not
Avatar
what events/hooks avail etc
9:52 PM
damn
Avatar
the ark devkit helps though
9:52 PM
or you can load the exe into something like IDA pro
9:52 PM
to get an idea on how a function works
9:52 PM
I'm building a prototype to remove hooking entirely from the API in the future
9:53 PM
and instead allow for users to register pre/post callbacks
Avatar
been any fuss from wildcard on this project?
Avatar
no fuss from WC
Avatar
yeah its helpful its already open to mods, Final fantasy MMO's entered a "fight club" scene lol. Minecraft people getting all nervous when Mojang themselves really wanted to encourage it, hopefully thats all laid to rest now. Third parties always win in the end. Been around the block in the third party dev ecosystem the past 18 years lol.
Avatar
there isn't much WC can do anyways
9:55 PM
if they stop ship PDB, we can use old exe and PDB to generate signatures
9:55 PM
at least for GObjects and FNames
Avatar
legally go after projects for reverse engineering game, some games have gone that approach
Avatar
legally they'd have no ground 😄
Avatar
WoW is hardcore against it all
9:56 PM
well wow's shutdown some projects
Avatar
yes, projects that negatively impact their official servers
9:56 PM
trinitycore still exists
Avatar
its def still a legally grey area lol
Avatar
cheating software has precedent to lose since it causes damages to the company running the game services
9:57 PM
modifying a binary on your computer falls under fair use in the DMCA (within an extent)
9:57 PM
such as for interoperability
Avatar
maybe in that regard i guess
Avatar
like, if I wrote a hack for WoW to integrate discord, there isn't any legal stance Blizzard could really take
9:58 PM
since it was for interoperability and doesn't negatively impact them
9:58 PM
they could ban me though
9:58 PM
it is why stuff like Steam overlay exists
9:58 PM
the Steam overlay is a hack
Avatar
minecraft took an interesting approach to servers doing things they dont like with shops, client side blacklisting, so sure you may run the server, but anyone on official clients now cant connect to your server, killing your playerbase and growth potential.
Avatar
yes, which is totally fine and dandy
9:59 PM
legally they can't stop them from doing that to their servers afaik
10:00 PM
but they can make it a total pain in the ass for end-users to interact with those servers
10:00 PM
at the end of the day though
10:00 PM
WC has bigger fish to fry
10:00 PM
like MoE
Avatar
myth of empires
Avatar
wth is that
Avatar
they allegedly stole source code from WC
10:02 PM
it's another survival type game
Avatar
oh i think i read something like that
10:02 PM
that been a while ago right
Avatar
yeah but lawsuits take awhile
10:03 PM
Suzhou Angela Online Game Technology Co., Ltd. et al v. Snail Games USA Inc. et al (2:21-cv-09552), California Central District Court, Filed: 12/09/2021
Avatar
🐨Dream Doctor🦘 2/28/2023 2:11 AM
I just asked ChatGPT a question about DLL injection, and it refused to answer the question on the grounds that DLL injection was used for illegal or immoral purposes! lol
Avatar
That's because injection part is, normal applications load dlls not inject them lol
Avatar
yes bc "injection" uses for cheats
Avatar
🐨Dream Doctor🦘 2/28/2023 4:20 AM
4:22 AM
There are many legitimate purposes for dll injection, and chatgpt seems to know that already. I just thought it was interesting that an AI was making ethical decisions based on some framework either provided to it or that it developed on its own, or both.
Avatar
can try to let ChatGpt translate ArkApi into c # Code
Avatar
🐨Dream Doctor🦘 2/28/2023 6:34 AM
DLL Injection is well supported in C#, and it's true that it might enable a much wider audience to write plugins, but as the real experts here have told us many times, the work involved in porting this API into C# would be monumental.
Avatar
🐨Dream Doctor🦘 2/28/2023 6:42 AM
Also, although .NET 7 and 8 have MASSIVE performance improvements, it's still much slower than C++. Adding the whole CLR JIT stuff into the mix might cause issues? The gurus here would know much better than me.
6:44 AM
Although apparently with .NET 7 you can now compile C# directly into native machine code without any JIT. https://www.youtube.com/watch?v=sa3XsvSiMtk
Avatar
why are plugins having trouble with SSL for MySQL? whats the hurdle to making it work?
Avatar
Mainly the library everyone uses doesn't support it. The newer version requires openssl which people struggled to get installed etc.
Avatar
ugh windows, im spoiled from a world where openssl being on the system is just kind of an expected thing.
Avatar
we could ship openssl with ArkApi tbh because the requests library in the API also requires it
Avatar
Avatar
WETBATMAN
we could ship openssl with ArkApi tbh because the requests library in the API also requires it
🐨Dream Doctor🦘 3/1/2023 2:24 AM
Be aware of the Apache v2 license attached to the latest versions of OpenSSL.
Avatar
🐨Dream Doctor🦘 3/1/2023 2:32 AM
Mainly that the API would need to include the LICENSE file in it's distribution, and if any changes are made to any OpenSSL code then every change must be listed and included in the distribution.
Avatar
Avatar
🐨Dream Doctor🦘
I just asked ChatGPT a question about DLL injection, and it refused to answer the question on the grounds that DLL injection was used for illegal or immoral purposes! lol
most plugins get false positives from antivirus for that reason
Avatar
yeah you don't touch openssl to modify it anyways, thats a big nono 🙂 top rule of secure development is don't write your own encryption code
5:54 AM
but yeah id agree this is a good one for the platform itself to provide
Avatar
Avatar
🐨Dream Doctor🦘
Also, although .NET 7 and 8 have MASSIVE performance improvements, it's still much slower than C++. Adding the whole CLR JIT stuff into the mix might cause issues? The gurus here would know much better than me.
It seems that we must learn c++more deeply to write better plugins. If the. net implementation efficiency cannot be solved, even if the ARKAPI conversion is completed, the running quality of the plugins written will vary greatly.
Avatar
Avatar
Invoker
It seems that we must learn c++more deeply to write better plugins. If the. net implementation efficiency cannot be solved, even if the ARKAPI conversion is completed, the running quality of the plugins written will vary greatly.
🐨Dream Doctor🦘 3/1/2023 8:38 AM
It's absolutely true, the more you know the better, however that shouldn't put people off who want to get started in plugin development. You don't need to be a max-level superstar in C++ like Substitute or Lethal to make a basic plugin.
8:39 AM
Also, I've had to learn some C# over the last few months for a particular project, and I've found that it has actually helped me understand some of the more advanced concepts in C++ that I've struggled with in the past.
Avatar
Avatar
🐨Dream Doctor🦘
Also, I've had to learn some C# over the last few months for a particular project, and I've found that it has actually helped me understand some of the more advanced concepts in C++ that I've struggled with in the past.
Yes, the programming idea of C # pays more attention to concepts, but this also hinders my learning of C++. I always use C # to understand C++. In general, C # can find many "scaffolding" around the world. A complete program can be packaged by layers of frameworks.
8:48 AM
Now that I see the source code of the plug-in, I don't know where to start. I plan to write a simple test program first. When HOOK is triggered, only one announcement will be sent in the game world.
Avatar
Avatar
Invoker
Now that I see the source code of the plug-in, I don't know where to start. I plan to write a simple test program first. When HOOK is triggered, only one announcement will be sent in the game world.
🐨Dream Doctor🦘 3/1/2023 10:08 AM
I think it's @substitute that has an excellent basic template for a plugin. It's a great place to start.
Avatar
so has no one done extensive digging into what exactly starts to get slow when server performance tanks and tried to optimize by plugin? tried to search for some performance optimizing plugin but couldn't find anything. Performance is big area I usually work in, but man i still got a steep learning curve here before I could really get involved there. Sub you mentioned decompiling the server, any guide on that? my eyes are gonna open 40x if i can just see some damn code.
8:22 PM
also any chance in modifying then recompiling the entire server to fix performance issues?
8:28 PM
everyone always blames building size for lag, but its never made sense to me, what is the server doing ticking every block placed per tick or something? or is this just another super ark myth that has spread forever. if it is doing something per tick, that would be something to look into optimizing. Some of my biggest work in minecraft has been optimizing entities and 'block entities' (blocks that do need to be ticked, usable/functional blocks but not generic building blocks) . ie popular one I did was entities not near any player reduce their tick rate 95%, and in that 5% (1 in 20 tick rate) if their AI engages something like attack structure/player, then they gain temp immunity. Stuff like that can have minimal gameplay impact but huge performance gains.
8:30 PM
i recall ark has some region hiberation system too right, is the core problem of a lot of players on simply that more regions are active, entities are being processed more spread out? is there regions staying active longer than they need to be?
Avatar
Ark has what is called "stasis", as far as I know it does pause ticks, timers, and any render, physics, etc... That's for structures and dino in dedicated servers, in Single Player dinos have "hibernation" which I believe they are destroyed and respawned when the region is loaded.
8:36 PM
And structures can cause some stress on the server, specially destroying a big chunk of snapped structures.
8:36 PM
I have not do much investigation on performance of structures alone when ticking, so I do not have more info on that regard.
Avatar
yeah i get destruction etc, but i mean say a base just sitting idle. so like main question is when you have 20 players on, wheres most the time spent. and why do people think wiping maps 'solves problems'. i do notice save spikes seem to get worse, but would like to understand the technicals of why.
9:03 PM
large base being heavier to render makes sense, but so many people always blame server tick rate on building too. but if thats not the case, building rules could be more relaxed around RP Style builds that are lots of smaller builds etc, not make such a big deal about how much exact space they use etc.
Avatar
if wipes do legitly help something and thats not a myth, id like to know what is that something, and can we do something to simulate the reset without actually wiping.
9:11 PM
official clearly has something being done since it doesnt wipe heh
Avatar
Avatar
Aikar
yeah i get destruction etc, but i mean say a base just sitting idle. so like main question is when you have 20 players on, wheres most the time spent. and why do people think wiping maps 'solves problems'. i do notice save spikes seem to get worse, but would like to understand the technicals of why.
substitute 3/1/2023 9:13 PM
the hits from large bases are when people are in them
9:13 PM
as most have hundreds of dinos
Avatar
so propogator resulting in dinos not needing to be out for breeding has huge benefits?
Avatar
substitute 3/1/2023 9:14 PM
you mean cryopods?
Avatar
no, the SS/S+ Propagator where you breed inside the structure with dino in the pod/trap
Avatar
substitute 3/1/2023 9:15 PM
oh, no idea, I've never used SS/S+
Avatar
It helps for sure. I've implemented my own one for my cluster due to different needs but it has improved a bit.
Avatar
https://www.youtube.com/watch?v=F_qlvZSDq5c it's pretty amazing. server im on disabled it so looking forward to using it on my own (edited)
Avatar
substitute 3/1/2023 9:16 PM
btw, big plans at some point
9:16 PM
when I can finish a new launcher for the sever api
9:16 PM
it'll be available on Steam similar to SKSE
Avatar
ARK not being capitalized is kind of triggering 😛
9:17 PM
"One of these things is not like the others"
9:19 PM
so are you gonna bundle openssl with server api?
Avatar
substitute 3/1/2023 9:42 PM
that's not entirely up to me
9:42 PM
I think we should
Avatar
its def pretty bad to be recommending disabling ssl, i fear for people who dont have vlans and have their mysql traffic going over public addresses heh
Avatar
substitute 3/1/2023 9:44 PM
Yes, but we could also just take the stance of
9:44 PM
you manage your 3rd party integrations
9:44 PM
😛
Avatar
oh yeah def not saying its anyones fault lol, just should be a serious attempt to solve it, bundle ssl, and ensure that mysql client can then work with it.
Avatar
substitute 3/1/2023 9:45 PM
I think an optional software package that has openssl would be better
9:45 PM
with a guide and recommendation
Avatar
whats harm in just always including it?
Avatar
substitute 3/1/2023 9:45 PM
adding openssl to the base api would be a little bloaty
9:45 PM
as not everyone uses MySQL
Avatar
yeah but can solve other stuff needing ssl too, like any http clients
Avatar
substitute 3/1/2023 9:45 PM
imagine if you run a network of like 10 servers with no MySQL or HTTP
9:46 PM
why bundle it for that person
9:46 PM
Minecraft doesn't bundle openssl afaik
Avatar
the files not that large, not like were talking about a 5gb addon
Avatar
substitute 3/1/2023 9:46 PM
does PaperMC?
Avatar
java implemented its own SSL lol
9:46 PM
crazypeople
Avatar
substitute 3/1/2023 9:46 PM
makes sense
Avatar
and actually we do push openssl with the proxy
9:46 PM
for people on linux
9:47 PM
i think openssl was faster than native java ssl iirc
9:47 PM
i could be mistaken there though
9:47 PM
i didn't do much work on the proxy
9:47 PM
though since i was like the most known head of the project everyone still asked me for support for the dang thing
Avatar
substitute 3/1/2023 9:47 PM
this is the kind of disassembly you can expect btw
9:47 PM
from IDA w/ PDB
Avatar
hey thats better than early days minecraft, back before we convinced microsoft to release the decompiler mappings lol
9:48 PM
you say that until you find a lambda function
Avatar
basically had to reverse engineer wtf a method was and give it a name ourselves
Avatar
substitute 3/1/2023 9:48 PM
Kek
Avatar
last time i touched C++ lambda wasnt a thing
Avatar
substitute 3/1/2023 9:49 PM
btw
9:49 PM
9:49 PM
if I understand IDA here correctly
9:49 PM
v7 isn't UObjectMap*
9:49 PM
it is UObjectMap&
9:49 PM
which (when compiled) is just a pointer
9:50 PM
but usage (in code) is a reference
9:50 PM
rsp and rbp are stack pointer and base pointer
Avatar
https://gist.github.com/aikar/a46b1efaa86472b16919 im not a stranger to the horrors, back from the FFXI days
Avatar
substitute 3/1/2023 9:51 PM
If this library I wrote existed back then
Avatar
thankfully someone else figured out all that shit before me but just had to work around fixing things on it lol
Avatar
substitute 3/1/2023 9:51 PM
your code would have been a lot more readable
Avatar
the hardest parts was all the offsets there
Avatar
substitute 3/1/2023 9:52 PM
void main() { moar::function_ptr<int(int, int)> my_ptr(0xdeadbeef); int result = my_ptr(2, 3); //result is 5. return 0; }
Avatar
it prob should have had a struct
Avatar
substitute 3/1/2023 9:52 PM
yeah but imagine if you could just interact with it like it was all native C++ (edited)
9:52 PM
would've been a lot lot easier back then
Avatar
that was 15 years ago though, i was def not as experienced then to have as deep opinions as I do now 😛
9:53 PM
PepeHands
9:53 PM
at least consumers of my library don't have to read it
9:53 PM
but man it was a pain in the ass
9:54 PM
static inline auto from_virtual(void* object, int vfti) -> void* { return (*reinterpret_cast<void***>(object))[vfti]; }
9:54 PM
also
9:54 PM
I call this the free headache machine
9:54 PM
class function_ptr<RT(A...), T2, T3> : public extern_ptr<typename signature<RT(A...), typename type_traits::SelectCallingConvention<T2,T3>::type, typename type_traits::SelectVariadic<T2, T3>::type>::type> /* typename not declared yet. */
9:55 PM
which is a partial specialization of template<concepts::Function T1, concepts::CommonType T2 = types::default_calling_convention, concepts::CommonType T3 = typename type_traits::SelectDefaultT3<T2>::type> class function_ptr {};
9:55 PM
PepeHands
9:55 PM
but you can swap the T2 and T3 order (or omit either) and it works and deduces everything
9:55 PM
which is really nice
9:55 PM
like if you have a cdecl variadic you can omit the calling convention in the type declaration
Avatar
i come from java, that looks normal to me 😛
Avatar
substitute 3/1/2023 9:56 PM
the length sure
Avatar
the T2, T3 etc too
Avatar
substitute 3/1/2023 9:57 PM
but none of that code is actual C++ code at that point
Avatar
generic hell lol
Avatar
substitute 3/1/2023 9:57 PM
it's all templates
9:57 PM
which is code to generate C++ code
9:57 PM
template<typename T> struct SelectDefaultT3 { static_assert(sizeof(T) == 0, "Incorrect Usage of SelectDefaultT3 (T missing.)"); using type = void; }; template<concepts::Variadic T> struct SelectDefaultT3<T> { using type = types::default_calling_convention; }; template<concepts::CallingConvention T> struct SelectDefaultT3<T> { using type = types::default_variadic; };
Avatar
yeah similar case for java, generic info isnt avail at runtime
Avatar
substitute 3/1/2023 9:57 PM
like how T3 is deduced from T2
Avatar
its more compiler helpers
Avatar
substitute 3/1/2023 9:57 PM
templates are generics on actual crack
9:58 PM
you can literally compute like an entire sin lookup table as a template
Avatar
yeah i think i recall using templates ages ago too
9:58 PM
lot of my old FFXI code got corrupted in a drive crash though
Avatar
substitute 3/1/2023 9:58 PM
that's why I use GitHub
Avatar
man github was barely a thing back then 😛
Avatar
substitute 3/1/2023 9:58 PM
git was still a thing though
Avatar
we used svn lol
Avatar
substitute 3/1/2023 9:58 PM
yeugh
Avatar
in 2007?
Avatar
substitute 3/1/2023 9:58 PM
git is old as hell man
9:58 PM
not github
9:58 PM
git
Avatar
yeah everyone was still on svn then though 😛
Avatar
substitute 3/1/2023 9:59 PM
git initial release date: April 7, 2005
Avatar
but i dont have access to those repos anymore
Avatar
substitute 3/1/2023 9:59 PM
svn doesn't even do branches man
Avatar
i passed the project on, and hell they are still maintaining that shit
9:59 PM
FFXI is still popular
Avatar
substitute 3/1/2023 9:59 PM
at least the svn my work used to use doesn't
10:00 PM
__int64 __fastcall APrimalDinoCharacter::IsBossDino(APrimalDinoCharacter *this) { return *((_WORD *)this + 3901) & 1; } Thank you IDA, very cool
Avatar
yeah i recently finished moving everything at work to git, so nothing my team actually touches is on svn anymore. great milestone to hit
10:00 PM
got jenkins all updated and standardized
Avatar
this + 3901 so something at offset 3901
Avatar
Avatar
Aikar
yeah i recently finished moving everything at work to git, so nothing my team actually touches is on svn anymore. great milestone to hit
very nice
10:01 PM
my job uses tfs2
10:01 PM
which is just git but annoying
Avatar
yeah we're linux shop, every dev and server is on linux 😛
Avatar
The second bit at 3901. Thouhh ida can mess up with offsets and bits so it’s better to check the Asm :)
Avatar
I do php/js/nodejs for dayjob work, and man building js projects on windows is painful
Avatar
oh, you probably know this
10:02 PM
but in C++
10:02 PM
member functions have an implicit first parameter
10:02 PM
__int64 __fastcall APrimalDinoCharacter::IsBossDino(APrimalDinoCharacter *this) is actually class APrimalDinoCharacter { uint64_t IsBossDino(); };
Avatar
basically the methods are just functions that take the instance as a this param right?
Avatar
yeah
10:03 PM
if you also see a billion casts on an object into a function
10:03 PM
it's extremely like that function is a virtual function
Avatar
which is nice that its not some magical 'this exists dont worry about where it comes from'
Avatar
overloadable methods in C++ aren't stored directly on the class at a specific offset. (edited)
Avatar
one thing ive enjoyed about java, its verbose, but it avoids magic
Avatar
and when you call an overloaded method, it actually goes into what's known as the virtual function table
10:04 PM
and finds the specific implementation for that object from that table
10:05 PM
10:05 PM
here's an example
10:05 PM
before if ( v0 )
10:05 PM
that is a virtual function
10:05 PM
v0 is the instance of the object (assuming here), and 12 is the offset in the virtual function table
10:06 PM
it is important to know this because virtual functions are popular in OOP code
Avatar
bringing back memories of crashes around virtual function calls now lol
Avatar
my library can resolve them for you as long as you have an object instance and the index
10:06 PM
static inline auto from_virtual(void* object, int vfti) -> void* { return (*reinterpret_cast<void***>(object))[vfti]; }
10:06 PM
it's pretty easy
10:08 PM
10:08 PM
here's an example from Ark
Avatar
any preference/requirements for windows server version? I get 2016, 2019, 2022 as options so rather go with 2022 if it doesnt have known issues.
Avatar
2022 should be fine (edited)
Avatar
Avatar
substitute
__int64 __fastcall APrimalDinoCharacter::IsBossDino(APrimalDinoCharacter *this) is actually class APrimalDinoCharacter { uint64_t IsBossDino(); };
🐨Dream Doctor🦘 3/2/2023 1:23 AM
This is a subject that I find so confusing in C++.... I've seen many recommendations not to use inline member functions because it negatively affects performance, and many people saying the exact opposite. Like so many things in C++ you seem to be able to find people with just about any opinion you want lol
Avatar
Avatar
🐨Dream Doctor🦘
This is a subject that I find so confusing in C++.... I've seen many recommendations not to use inline member functions because it negatively affects performance, and many people saying the exact opposite. Like so many things in C++ you seem to be able to find people with just about any opinion you want lol
substitute 3/2/2023 1:27 AM
inline just means take this function and paste it in the assembly code
1:27 AM
instead of doing a call
1:27 AM
inline has a lot of speed benefits for stuff, like avoiding a stackframe (and function prologue and epilogue)
1:27 AM
but inline also increases the size of the binary
1:28 AM
small stuff should be inlined (stuff like computing the dot product of two vectors) since it isn't really that much code that gets inlined
1:28 AM
that's my opinion at least
Avatar
Avatar
🐨Dream Doctor🦘
This is a subject that I find so confusing in C++.... I've seen many recommendations not to use inline member functions because it negatively affects performance, and many people saying the exact opposite. Like so many things in C++ you seem to be able to find people with just about any opinion you want lol
substitute 3/2/2023 1:31 AM
also, afaik all member functions are inline
1:31 AM
at least if they're declared in the header file
Avatar
TheMollusk 3/2/2023 1:51 AM
inline is a hint to the compiler that it may optimize a function by "inlining" it into the caller in assembly instead of actually calling it (although the compiler may choose not to). The cool thing about inline in C++ is that it lets you have more than one definition of functions (and variables since C++17) as long as the definitions are all the same. So you can have inline functions defined in a header file and include them in multiple source files without breaking the one definition rule and they'll all have the same address. https://en.cppreference.com/w/cpp/language/inline https://en.cppreference.com/w/cpp/language/definition (edited)
Avatar
Avatar
🐨Dream Doctor🦘
I think it's @substitute that has an excellent basic template for a plugin. It's a great place to start.
ohhh,that s not entirely up to me I think we should
4:43 AM
@substitutehi, Are the plugins you developed open source? If it is open source, I want to learn to develop plugins through it.
Avatar
Avatar
Invoker
ohhh,that s not entirely up to me I think we should
🐨Dream Doctor🦘 3/2/2023 4:43 AM
I found the link. I've used this template created by the master @substitute for all my plugin work. Thank you Sub! https://github.com/SubstituteR/ArkServerAPI-Template
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
Avatar
ty ty ty
Avatar
Avatar
Invoker
@substitutehi, Are the plugins you developed open source? If it is open source, I want to learn to develop plugins through it.
🐨Dream Doctor🦘 3/2/2023 4:44 AM
There are many open source plugins. The original creator of the API, @Michidu , kindly released a large library of his plugins as fully open source. https://github.com/Michidu/Ark-Server-Plugins
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
This is really the information I need
Avatar
🐨Dream Doctor🦘 3/2/2023 4:45 AM
Both those links should be permanently posted somewhere in this Discord, IMHO. (edited)
Avatar
Avatar
Invoker
This is really the information I need
🐨Dream Doctor🦘 3/2/2023 4:47 AM
Another superstar of the API, @OwnProx , also released his own library of open source plugins. https://github.com/ownprox/ArkServerApi
4:48 AM
Between those two libraries you can find an example to get you started with most things in the API. Just be aware some things have changed since those plugins were released, so you might need to update some of the code, but many of them still work perfectly as they are.
Avatar
These superstars have helped us grow
4:50 AM
ty Great Open Source Project
4:52 AM
@🐨Dream Doctor🦘 thank you for your help, otherwise I don't know where to start now
4:57 AM
C + + doesn't seem like an easy way to build an ORM. I tried to use the SUB template to write a plug-in that wouldn't hurt a land creature underwater, a feature that doesn't require database support.
Avatar
🐨Dream Doctor🦘 3/2/2023 5:14 AM
Ok, so ChatGPT isn't completely blocked from discussing DLL injection lol
Avatar
🐨Dream Doctor🦘 3/2/2023 5:23 AM
And this is a "general example" it provided.... Define the function you want to hook in the C++ executable. For example, let's say you want to hook the MessageBox function: (C++) int MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType); Create a C# DLL that will contain the hook function. The DLL should have a public static function with the same signature as the function you want to hook: (C#) using System; using System.Runtime.InteropServices; namespace HookTest { public static class HookFunctions { [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern int MessageBox(IntPtr hWnd, string text, string caption, uint type); public static int HookedMessageBox(IntPtr hWnd, string text, string caption, uint type) { // Implement your custom code here return MessageBox(hWnd, "Hooked: " + text, caption, type); } } } Load the C# DLL into the address space of the C++ executable using DLL injection. There are different ways to do this, but one common approach is to use the LoadLibrary function to load the DLL and the GetProcAddress function to get a pointer to the hook function. (C++) HMODULE hHookDll = LoadLibrary(TEXT("HookTest.dll")); if (hHookDll == NULL) { // handle error } HOOKPROC pHookFunc = (HOOKPROC)GetProcAddress(hHookDll, "HookedMessageBox"); if (pHookFunc == NULL) { // handle error }
5:23 AM
Use a hooking technique, such as API hooking or function hooking, to intercept the function call and redirect it to the hook function. One common approach is to use the DetourTransactionBegin, DetourUpdateThread, and DetourAttach functions from the Microsoft Detours library: (C++) typedef int(WINAPI *PMSGBOXA)(HWND, LPCSTR, LPCSTR, UINT); PMSGBOXA pMessageBoxA = &MessageBoxA; LONG AttachHook() { LONG result = DetourTransactionBegin(); if (result != NO_ERROR) { return result; } result = DetourUpdateThread(GetCurrentThread()); if (result != NO_ERROR) { return result; } result = DetourAttach(&(LPVOID&)pMessageBoxA, (PMSGBOXA) pHookFunc); if (result != NO_ERROR) { return result; } result = DetourTransactionCommit(); if (result != NO_ERROR) { return result; } return NO_ERROR; } LONG DetachHook() { LONG result = DetourTransactionBegin(); if (result != NO_ERROR) { return result; } result = DetourUpdateThread(GetCurrentThread()); if (result != NO_ERROR) { return result; } result = DetourDetach(&(LPVOID&)pMessageBoxA, (PMSGBOXA)pHookFunc); if (result != NO_ERROR) { return result; } result = DetourTransactionCommit(); if (result != NO_ERROR) { return result; } return NO_ERROR; } Finally, call the function you want to hook, and the hook function should be called instead.
5:23 AM
@substitute I'd love to hear your thoughts on the above 😉
Avatar
LoadLibrary - C++should be able to call C # functions directly, so that the processing logic can be written in C # DLLs. But ARK Server should pay attention to the code execution speed, will this affect the code execution efficiency?
Avatar
🐨Dream Doctor🦘 3/2/2023 6:46 AM
It's something that might be worth testing, but it would require some time and effort from those wiser and more experienced than myself, and they may not consider it worth the time.
Avatar
FWIW, FF14 plugin api is all C# based and doesnt seem to be big issues there.
7:14 AM
FFXIV plugin framework and API. Contribute to goatcorp/Dalamud development by creating an account on GitHub.
Avatar
This proves that writing an API in C # is possible, but it definitely requires a very high level of skill.
Avatar
substitute 3/2/2023 7:52 AM
It was never impossible, it's just an unbelievable amount of work to translate between the CLR layer and the native layer
👍 1
7:53 AM
and C# plugins would be essentially limited to the interfaces that are exposed to them from a native library
Avatar
If use C++to develop a WebSocket-like interactive interface, the plug-in may realize cross-language development, but this is extremely challenging for communication efficiency, and you may need to hook all functions in C++and forward them to the interface. This is also a huge workload.
Avatar
Avatar
substitute
It was never impossible, it's just an unbelievable amount of work to translate between the CLR layer and the native layer
🐨Dream Doctor🦘 3/2/2023 9:41 AM
Yes I wasn't meaning to suggest it was something that should be done. I was just interested in the response from ChatGPT.
Avatar
Lolll, hopefully in the near future, will be able to write plugins through CHATGPT.
Avatar
i imagine wouldnt be that difficult to port C# variants of the structs provided in the api repo to a C# layer, surely Dalamud I linked has good examples of that as pretty sure FFXIV itself isn't .NET based, so its a CLR to native layer there. Some potentially relevant files: https://github.com/goatcorp/Dalamud/blob/master/Dalamud/Hooking/Hook.cs https://github.com/goatcorp/Dalamud/blob/master/Dalamud/Hooking/AsmHook.cs https://github.com/goatcorp/Dalamud/blob/master/Dalamud/Hooking/Internal/HookManager.cs#L59 Looks like they may be generating ASM to process the hooks. We actually did similar in Paper for minecraft to generate java asm methods to fire the event handlers In MC we hook every core part of the game and fire off events, then plugins listen to the events, mutate event data, then the event data is copied back into the game or impacts game behavior, so the plugins themselves never get this low level and never break from updates unless game changes so much we can no longer support the old contract. https://github.com/goatcorp/Dalamud/blob/master/Dalamud/Game/ClientState/Objects/Types/GameObject.cs#L94 https://github.com/goatcorp/Dalamud/blob/master/Dalamud/Game/ClientState/Objects/Types/Character.cs Seems like they are mapping raw structs to native code, maybe with the unsafe keyword there? Way to inexperienced on c# to know there.
Avatar
🐨Dream Doctor🦘 3/3/2023 1:29 AM
Maybe it would be simpler than we think? The existing API just loads any DLL in the plugins directory. Does it matter if it's a .net DLL? C# code can easily utilise C++ code. Maybe it would be relatively simple to load all the definitions from the existing API? Or maybe we could automate a way to create C# definitions from the existing C++ API code?
Avatar
it is possible using com interop, but what do we have to gain from using c#?
Avatar
Avatar
Uaca
it is possible using com interop, but what do we have to gain from using c#?
🐨Dream Doctor🦘 3/3/2023 2:51 AM
I suppose the existing community here that are already proficient might not get a lot out of it, however C# does have a much lower barrier of entry than C++, and it also allows people with less experience to write better code more easily and more quickly.
Avatar
a have a few years working with C# and find it very good, what I find hard working with the ARK API is not the C++ part. Everything is hard to find
Avatar
🐨Dream Doctor🦘 3/3/2023 2:59 AM
I know things are very quiet around here right now due to the Ark community overall shrinking a lot, however with the impending release of Ark 2, and the re-release of Ark 1 in UE5, I would expect a significant influx of new people wanting to make plugins. Them having the option of C# would be a huge plus. However I really do understand the reluctance of the existing team to devote all the required effort towards this when they already have everything they need.
Avatar
Avatar
Uaca
a have a few years working with C# and find it very good, what I find hard working with the ARK API is not the C++ part. Everything is hard to find
🐨Dream Doctor🦘 3/3/2023 3:01 AM
Yes that is definitely the biggest issue we all face. I assume you already use the official dev kit? I found a lot of missing details there. Of course the best resource is all the amazing people in this Discord who so generously share their huge amount of knowledge.
Avatar
yeah, most of what I've learned was here. The dalamud looks very interesting
Avatar
Avatar
🐨Dream Doctor🦘
Maybe it would be simpler than we think? The existing API just loads any DLL in the plugins directory. Does it matter if it's a .net DLL? C# code can easily utilise C++ code. Maybe it would be relatively simple to load all the definitions from the existing API? Or maybe we could automate a way to create C# definitions from the existing C++ API code?
I think this is going to be hard only because of the some unreal engine stuff connected with API.
Avatar
🐨Dream Doctor🦘 3/3/2023 10:22 AM
I was on some C# forums earlier, and someone mentioned there might be a way to compile the existing API project so that it can easily be imported into a C# project, including all the existing definitions. Does anyone here know if that's true or not? (edited)
Avatar
@Pelayori I have some issues with blocking player character download. I did find a working hook AShooterPlayerController_ServerRequestDownloadPlayerCharacter_Implementation but it is broken if you pass. Even if it is empty. (edited)
12:41 PM
Are there any ways to fix it?
Avatar
In "broken" I mean it fires but doesn't proceed to the character spawning.
Avatar
What's your hook signature for that?
Avatar
Avatar
Pelayori
What's your hook signature for that?
what do you mean by signature
Avatar
The params of the hook
Avatar
DECLARE_HOOK(AShooterPlayerController_ServerRequestDownloadPlayerCharacter_Implementation, void, AShooterPlayerController*, FArkTributePlayerData, int, int); void Hook_AShooterPlayerController_ServerRequestDownloadPlayerCharacter_Implementation(AShooterPlayerController* _this, FArkTributePlayerData DownloadedCharacter, int spawnPointID, int spawnRegionIndex) { std::cout << "SRDPC_I \n"; AShooterPlayerController_ServerRequestDownloadPlayerCharacter_Implementation_original(_this, DownloadedCharacter, spawnPointID, spawnRegionIndex); } (edited)
Avatar
The character data is a pointer, not passed by value (edited)
2:31 PM
Change FArkTributePlayerData to FArkTributePlayerData*
2:35 PM
I hate those * in C++
2:35 PM
it works now
Avatar
thank you
Avatar
Did you make the hook yourself or got it from the hook creator?
Avatar
hook creator
2:35 PM
last version
Avatar
Hmm, so it means the api definition is wrong most likely
2:35 PM
I will check that out
Avatar
is there a hook that checks if your inside a boss arena when giving engrams or does it use , DECLARE_HOOK(APrimalDinoCharacter_Die, bool, APrimalDinoCharacter, float, FDamageEvent, AController, AActor); ?
Avatar
Avatar
🐨Dream Doctor🦘
Maybe it would be simpler than we think? The existing API just loads any DLL in the plugins directory. Does it matter if it's a .net DLL? C# code can easily utilise C++ code. Maybe it would be relatively simple to load all the definitions from the existing API? Or maybe we could automate a way to create C# definitions from the existing C++ API code?
substitute 3/3/2023 7:22 PM
It matters a lot
7:22 PM
The dotnet CLR barrier needs to be handled
7:22 PM
Either by the api for by each plugin
7:23 PM
Every object in dotnet uses a different malloc and free scheme for example, so objects have to be marshaled from managed to unmanaged (and unmanaged to managed) contexts
7:28 PM
I understand the temptation of lowering the barrier of entry
7:28 PM
But anyone that can’t or refuses to learn the little bit of C++ required for writing plugins
7:29 PM
Is going to have a horrible time trying to understand IDA pseudo code and how to reverse engineer things
7:32 PM
I really think focusing on the C++ development side and improving things there first is way more important than adding another layer of complexity and massive maintenance overhead
7:33 PM
Especially since a large portion of developers that have used the API unfortunately don’t submit PRs or feed back into the project. (This is fine as it’s open source with a permissive license, it just is unfortunate.)
Avatar
GSH | MrOwlSky 3/3/2023 7:40 PM
I'm gonna make an official announcement sometime soon but the GSH site is gonna be getting a major rehaul here soon for an SEO upgrade. Site is finally gonna add a news/articles section with tutorials and resources. That's been a requested feature for awhile now server admins and developers wanting a section on site where they can have step by step detailed visual tutorials, I intend to include that in the SEO upgrade. (edited)
👍 2
Avatar
@TheMollusk
10:45 PM
Resolved intellisense bug
10:46 PM
This new class I wrote wraps around a function (by pointer) and provides a globally unique static callback
10:46 PM
So plugins could in the future bypass hooking entirely and instead register callbacks to these wrappers
10:52 PM
Hopefully with C++26 we can deconstruct Tuples into parameter packs, it’ll simplify so so much of this work (edited)
10:52 PM
We can fold a parameter pack into a tuple but not the other way around 😭
Avatar
Cool! That's pretty slick
Avatar
I still have a lot of actual code to add to it
11:12 PM
But the initial prototype is working
11:14 PM
If you were curious, this is what IDA sees for the generated callback
11:14 PM
int __cdecl _callback___native_event__2U__StringLiteral__0BF__moar__3D0FF__0EP__0GC__0GK__0GF__0GD__0HE__0CO__0FA__0HC__0GP__0GD__0GF__0HD__0HD__0EF__0HG__0GF__0GO__0HE__0A______A6AHPAX0_ZUcdecl_t_types_2_X_moar__SAHPAX0_Z( void *<args_0>, void *<args_1>)
11:14 PM
kekw_a
Avatar
Avatar
substitute
I really think focusing on the C++ development side and improving things there first is way more important than adding another layer of complexity and massive maintenance overhead
🐨Dream Doctor🦘 3/3/2023 11:20 PM
Yeah totally understand Sub. Just wishful thinking from me I think.
Avatar
Avatar
substitute
Is going to have a horrible time trying to understand IDA pseudo code and how to reverse engineer things
🐨Dream Doctor🦘 3/3/2023 11:26 PM
Even when sticking to C++, I'd like to think the idea of the API is to try and ensure the average person never has to do any of that, and we can leave that really low level stuff to the superstars like yourself. 🙂
Avatar
🐨Dream Doctor🦘 3/4/2023 3:11 AM
Has anyone here ever tried pursuing some documentation of the API code? I did a quick run of Docker on the API source, and without a single modification I think this makes a very useful resource. Being able to easily search all classes, structs etc and then see their specifics is a really useful thing when you're trying to find something but don't know exactly what you're looking for. https://apidocs.dreamjam.co (edited)
3:12 AM
Docker even does a nice class inheritance diagram for you.
👍 1
Avatar
@🐨Dream Doctor🦘 yeah been looking for something along those lines
4:16 AM
could we get that pinned lol ^
Avatar
Avatar
Aikar
@🐨Dream Doctor🦘 yeah been looking for something along those lines
🐨Dream Doctor🦘 3/4/2023 4:16 AM
The more I dig into what doxygen created, the more I wish I'd done it three years ago! lol
Avatar
i dont see any plugin to do this, thoughts on something to auto grant all ascensions/level cap raises on char creation so everyone can just do the grind and not need to go do ascensions?
Avatar
Avatar
Aikar
i dont see any plugin to do this, thoughts on something to auto grant all ascensions/level cap raises on char creation so everyone can just do the grind and not need to go do ascensions?
substitute 3/4/2023 4:40 AM
I had written a plugin for that a long time ago
4:40 AM
idk if I still have the source code for it
4:40 AM
but it was pretty easy
Avatar
figured so on principle
4:40 AM
if you could find it would be lovely 😛
4:40 AM
was gonna do the ascension for all mod but if i can just auto grant can skip that
Avatar
substitute 3/4/2023 4:44 AM
@Aikar
4:44 AM
you lucky dog
4:44 AM
I found it on my NAS
4:44 AM
COMMANDS.AddChatCommand(L"/to135", to135Command); COMMANDS.AddChatCommand(L"/to140", to140Command); COMMANDS.AddChatCommand(L"/to155", to155Command); COMMANDS.AddChatCommand(L"/evolve", evolveCommand); COMMANDS.AddChatCommand(L"/defeatboss", defeatBossCommand);
4:45 AM
setting the Chibi Level Ups
4:45 AM
void SetChibi(AShooterPlayerController* playerController, int value) { AShooterCharacter* myPawn = static_cast<AShooterCharacter*>(playerController->PawnField()); if (!myPawn) return; UPrimalPlayerData* data = myPawn->GetPlayerData(); if (!data) return; UProperty* prop = data->FindProperty(FName(L"NumChibiLevelUpsData", EFindName::FNAME_Find, false)); if (!prop) return; prop->Set<int>(data, value); data->SavePlayerData(ArkApi::GetApiUtils().GetWorld()); ArkApi::GetApiUtils().SendChatMessage(playerController, FString("Server Message"), "You now have {0} bonus levels from Chibis.", value); } (edited)
4:45 AM
oh, there's some garbage in here
4:45 AM
let me clean it up, this was a test bed plugin
Avatar
cant just auto add them to the implant?
Avatar
substitute 3/4/2023 4:47 AM
you could on the player spawn
4:47 AM
chibi levels are entirely BP variables
4:47 AM
and for defeating bosses
4:47 AM
void DefeatBoss(std::wstring boss, int difficulty, AShooterPlayerController* playerController) { auto player = (static_cast<AShooterCharacter*>(playerController->PawnField())); UPrimalPlayerData* data = (static_cast<AShooterCharacter*>(playerController->PawnField()))->GetPlayerData(); ExecBP(data, L"DefeatedBoss", nullptr, difficulty, FName(boss.c_str(), EFindName::FNAME_Add, false), playerController); AShooterPlayerState* state = playerController->GetShooterPlayerState(); UClass* theClass = UVictoryCore::BPLoadClass(&BossNameToBP(boss, difficulty)); if (!state || !theClass) return; auto BossDino = static_cast<APrimalDinoCharacter*>(theClass->GetDefaultObject(true)); if (!BossDino) return; for (auto gram : BossDino->DeathGiveEngramClassesField()) state->ServerUnlockEngram(gram, true, true); std::string bossLevel = ""; switch (difficulty) { case 0: bossLevel = "Gamma"; break; case 1: bossLevel = "Beta"; break; case 2: bossLevel = "Alpha"; break; } ArkApi::GetApiUtils().SendChatMessage(playerController, FString("Server Message"), "Defeated boss {0} {1}.", bossLevel, ArkApi::Tools::ConvertToAnsiStr(boss)); } (You should cache the boss classes)
4:48 AM
oh wait, you might need the ExecBP after all
Avatar
yeah im def a bit from point of making plugins still lol
Avatar
substitute 3/4/2023 4:48 AM
which executes a BP function
Avatar
still trying to get a server started lol
Avatar
substitute 3/4/2023 4:49 AM
void giveRagnarokTekgrams(AShooterPlayerController* playerController) { const wchar_t* tekGrams[] = { L"Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Structures/Misc/PrimalItemStructure_TekLight.PrimalItemStructure_TekLight'", L"Blueprint'/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponTekSword.PrimalItem_WeaponTekSword'", L"Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Armor/Shields/PrimalItemArmor_ShieldTek.PrimalItemArmor_ShieldTek'" }; AShooterPlayerState* state = playerController->GetShooterPlayerState(); for (const wchar_t* gram : tekGrams) { TSubclassOf<UPrimalItem> tekGram; tekGram.uClass = UVictoryCore::BPLoadClass(&FString(gram)); state->ServerUnlockEngram(tekGram, true, true); } }
4:49 AM
let me just clean this up
4:49 AM
or just make it myself
4:49 AM
there's actually a lot more in here than I remember
Avatar
yeah i think this could be very popular
Avatar
substitute 3/4/2023 4:49 AM
since the game has a lot of various boss things
Avatar
the whole ascension process is great from a single player point of view for progressing the game
4:50 AM
just gets messy in servers when not everyone has the maps etc :/
Avatar
substitute 3/4/2023 4:50 AM
I'm playing wow right now
4:50 AM
but I'll download the game and I'll work on making this a plugin
4:50 AM
from my original code
Avatar
lmao you uninstalled ark?
Avatar
substitute 3/4/2023 4:50 AM
Ark is 500gb
Avatar
yeah its a big one
4:51 AM
kept my old ssd to act as additional ssd storage and got a 2tb for main drive nvme
4:51 AM
😛
Avatar
holy hell
4:52 AM
you got an actual rack dont you 😛
Avatar
substitute 3/4/2023 4:52 AM
yea
4:52 AM
with a poweredge
4:52 AM
4:52 AM
2tb of ssd cache
Avatar
my coworker has one behind his desk lol. i should but i end up just storing shit on my desktop
Avatar
substitute 3/4/2023 4:52 AM
70tb of spinning rust
😆 1
4:53 AM
I'm planning on a second rack for my gaming consoles
4:53 AM
so I can organize everything in my living room in a nice condensed form factor
4:53 AM
4:53 AM
there are companies that make rack mounts for like everything
Avatar
wow thats cool
4:53 AM
gonna have to send that to coworker tomorrow
4:54 AM
or i guess can do it now
4:54 AM
this is my inspiration
4:55 AM
4:55 AM
with this to handle the video feed from my consoles
Avatar
yeah i had some shelvesi nstalled in corner to put consoles/sound system on, for wall mounted tv
Avatar
substitute 3/4/2023 4:55 AM
and from that into a splitter that can remove HDCP
4:56 AM
with one going to my capture card PC and the other to my TV
Avatar
Avatar
Aikar
yeah i had some shelvesi nstalled in corner to put consoles/sound system on, for wall mounted tv
substitute 3/4/2023 4:56 AM
yeah but I want it all condensed and hidden away
4:56 AM
it looks so clean in rack
Avatar
agreed, i just dont care to that level haha, though i did paint the wire white to blend in wall lol, so it doesnt catch your attention. though when i got new tv lost that.
4:57 AM
but i keep consoles plugged into the sound receiver, then just arc hdmi to the tv
Avatar
substitute 3/4/2023 4:58 AM
my main desktop is rack mounted too
4:58 AM
it's just close enough that 25ft cables bunched together work fine
4:58 AM
otherwise I'd be paying hand over fist for optical hdmi
Avatar
https://aikar.co/gibson.jpg was super old pic of old system, yeah wasnt mounting that shit, but after like 10 years of life, water cooling failed and uh leaked for months w/o me knowing until temps started rapidly rising one day.
Avatar
substitute 3/4/2023 4:59 AM
a good portion of the used space on my nas is for my physical media collection
Avatar
Avatar
Aikar
https://aikar.co/gibson.jpg was super old pic of old system, yeah wasnt mounting that shit, but after like 10 years of life, water cooling failed and uh leaked for months w/o me knowing until temps started rapidly rising one day.
substitute 3/4/2023 4:59 AM
too many monitors for me
4:59 AM
three is like the perfect amount 😄
Avatar
yeah i didnt stare at top ones much, they for monitoring
4:59 AM
be able to just look up at logs/status
Avatar
substitute 3/4/2023 4:59 AM
I have 2 24" 1080p side monitors and one 27" 4k main one
4:59 AM
if I don't monitor the logs
Avatar
im currently at 3 didnt get 4th plugged into new system
Avatar
substitute 3/4/2023 4:59 AM
then nothing can be wrong
Avatar
2 of those was powered by a laptop which has finally prob died off too lol. was using some tool i forgot name now for kvm over ip to just move mouse/kb to the other system
5:02 AM
got new system on desk now where the external radiator use to be, so less dust now
5:02 AM
just kind of had to push monitors more to the left
5:02 AM
and got me a nice 28" 4k in middle
5:03 AM
one of these days ill clean desk some for new pic lol
Avatar
substitute 3/4/2023 5:03 AM
between movies, tv, and anime
5:03 AM
on my nas so far
5:03 AM
I don't reencode them, I just copy them from disc as-is into mkv
Avatar
i can feel my brother detecting the word anime through me
Avatar
substitute 3/4/2023 5:04 AM
anime is an overwhelming minority of my content
5:04 AM
half of what's on here is probably InuYasha
Avatar
that ones old school enough ive least heard of it haha
Avatar
substitute 3/4/2023 5:05 AM
half of this is for my wife and her sister
5:05 AM
and the other half is mine
5:06 AM
that's all there is right now lol
Avatar
yeah my wifes intoanime, she weebs out with brother talking about it and such, i just nod my head
Avatar
Avatar
substitute
70tb of spinning rust
🐨Dream Doctor🦘 3/4/2023 5:15 AM
I used to have a really nice NAS, until a mouse got inside it and built a nest, which then caught fire and destroyed the NAS and all my data. Luckily the rack was in a small concrete storeroom with nothing else in it, so the fire couldn't spread. Unluckily I had about $500k worth of bitcoin on there, at today's prices.
Avatar
substitute 3/4/2023 5:16 AM
that's unlucky
5:16 AM
we don't really have mice where I live
Avatar
🐨Dream Doctor🦘 3/4/2023 5:17 AM
We have huge mice plagues here in Australia. They get absolutely everywhere.
5:17 AM
And they bring with them all the wonderful snakes we have here lol
Avatar
substitute 3/4/2023 5:17 AM
just another common wildlife L for Australia
Avatar
🐨Dream Doctor🦘 3/4/2023 5:18 AM
Yup lol
5:22 AM
Definitely only an experiment and not intended to be in any way permanent, but I added the logo and the information from the GitHub page to the doxygen page from above, just so anyone looking at it has all the official information.
Avatar
does auto save do any diffing to only saved whats changed in a way that reducing from 15 to 10 might make spikes less intensive?
6:43 AM
and does anyone know much about UE save states and how auto save works, could it be optimized to be incremental? another huge gain I did in minecraft performance was getting rid of interval based save states and incrementally processing it so it would do like 1 chunk in this tick then another chunk in a diff tick etc and spread out the chunk saves over many ticks, and save world metadata on the interval only (edited)
6:50 AM
and wouldnt per-player damage text be possible by plugin? kind of shocked to not find a plugin for this. Lethals PvP+ looks usful to least cut out other players damage, so i might do that still on PVE. (edited)
Avatar
Is there any hook that can reject you with "Server full" reason in server browser for example?
Avatar
Isn't that in the AShooterGameMode::Prelogin
10:37 AM
If so, you could easily hook that. Though... you'd either have to remove that check or reimplement the whole function, which... good luck. I'm pretty sure those are beefy functions.
Avatar
Avatar
Aikar
and does anyone know much about UE save states and how auto save works, could it be optimized to be incremental? another huge gain I did in minecraft performance was getting rid of interval based save states and incrementally processing it so it would do like 1 chunk in this tick then another chunk in a diff tick etc and spread out the chunk saves over many ticks, and save world metadata on the interval only (edited)
Players can disable seeing any damage also. Each player can setup their own options and if they don't the server defaults you set in the config are used.
Avatar
Avatar
Frigoff
If so, you could easily hook that. Though... you'd either have to remove that check or reimplement the whole function, which... good luck. I'm pretty sure those are beefy functions.
🐨Dream Doctor🦘 3/4/2023 3:15 PM
Can't you just call the original function in your hook? Why do you need to reimplement it?
Avatar
Avatar
Lethal
Players can disable seeing any damage also. Each player can setup their own options and if they don't the server defaults you set in the config are used.
Did you mean in ARK or specifically for PVP+? thats ultimately what i want, but theres no option i see for it beyond hiding hud in ark but hiding hud isnt a real solution as client still receives the packets then just replays everything they missed soon as hud turns back on.
5:51 PM
people on PF server literally keep hud hidden until they xfer servers lol
Avatar
PvP+ lets players choose. It replaces the built in ARK damage popup.
Avatar
k ill be grabbing that then
Avatar
Avatar
Frigoff
If so, you could easily hook that. Though... you'd either have to remove that check or reimplement the whole function, which... good luck. I'm pretty sure those are beefy functions.
substitute 3/4/2023 6:40 PM
It’s not too bad
Avatar
Avatar
🐨Dream Doctor🦘
Can't you just call the original function in your hook? Why do you need to reimplement it?
because if you call the original it will perform the same as if you didn't hook it? and if you want to change the original implementation you wouldn't want to do that.
Avatar
Avatar
substitute
It’s not too bad
Nice, good for him lol
Avatar
@Pelayori do you know how to get steamid from prelogin hook? This is my code, returns empty: FString steamid; static_cast<FUniqueNetIdSteam*>(UniqueId->Get())->ToString(&steamid); std::cout << steamid.ToString() + "\n";
Avatar
FUniqueNetIdSteam has a UniqueNetId field
11:31 PM
struct FUniqueNetIdSteam : FUniqueNetId { unsigned __int64 UniqueNetId; // Functions int GetSize() { return NativeCall<int>(this, "FUniqueNetIdSteam.GetSize"); } FString* ToString(FString* result) { return NativeCall<FString*, FString*>(this, "FUniqueNetIdSteam.ToString", result); } bool IsValid() { return NativeCall<bool>(this, "FUniqueNetIdSteam.IsValid"); } FString* ToDebugString(FString* result) { return NativeCall<FString*, FString*>(this, "FUniqueNetIdSteam.ToDebugString", result); } };
11:33 PM
Which should be the steam id 64.
Avatar
Avatar
Pelayori
Which should be the steam id 64.
well it isn't
Avatar
What does it output
Avatar
Avatar
Pelayori
What does it output
some big number
11:38 PM
161..................
11:40 PM
uint64 steamid = static_cast<FUniqueNetIdSteam*>(UniqueId->Get())->UniqueNetId;
11:42 PM
16140901064495857664
11:42 PM
here it is
11:42 PM
it is crashing too
11:42 PM
void Hook_AShooterGameMode_PreLogin(AShooterGameMode* _this, FString* Options, FString* Address, TSharedPtr<FUniqueNetId, 0>* UniqueId, FString* authToken, FString* ErrorMessage) { uint64 steamid = static_cast<FUniqueNetIdSteam*>(UniqueId->Get())->UniqueNetId; std::cout << std::to_string(steamid) + "\n"; AShooterGameMode_PreLogin_original(_this, Options, Address, UniqueId, authToken, ErrorMessage); }
Avatar
FUniqueNetId does not necessarily need to be a FUniqueNetIdSteam
11:44 PM
You could try casting it to FUniqueNetIdUInt64
11:45 PM
IOnlinePlatformData doesn't seem to give anything usable at all
Avatar
same uint64 steamid = static_cast<FUniqueNetIdUInt64*>(UniqueId->Get())->UniqueNetIdField(); (edited)
11:48 PM
16140901064495857664
Avatar
Is it an Epic User?
Avatar
Avatar
Frigoff
Is it an Epic User?
no
11:49 PM
steam
Avatar
@Pelayori tried some different stuff and it looks like this uniqueid always gets the default value 16140901064495857664
Avatar
Maybe it isn't initialized before calling PreLogin
12:34 AM
Interesting thing
12:34 AM
authtoken contains steamid in the start values
Avatar
Is it possible to reject on prelogin?
Avatar
Not sure, maybe if you return without executing original it will send them to main menu
Avatar
Avatar
Pelayori
Not sure, maybe if you return without executing original it will send them to main menu
it doesn't
Avatar
🤷‍♂️
Avatar
everything is simple
1:02 AM
it does*
1:02 AM
but server goes crash
1:02 AM
so
1:02 AM
:D
Avatar
Why do you need to do it on prelogin though
Avatar
Avatar
Pelayori
Why do you need to do it on prelogin though
To kick players faster.
1:03 AM
Maybe there is a way to do it through transfer?
1:03 AM
This is not necessary to block people always.
Avatar
If you want to kick them you could do it on handle new player, or force enabled exclusive join and reject them on the check if they are allowed to join
Avatar
"handle new player" isn't it postlogin?
1:04 AM
Never seen it casted.
Avatar
Avatar
Pelayori
If you want to kick them you could do it on handle new player, or force enabled exclusive join and reject them on the check if they are allowed to join
Both are not the thing I wanted. Is it possible to track server player is trying to join through transfer menu? (edited)
Avatar
jraServerAPI 3/5/2023 1:16 AM
Did you try PostLogin?
1:16 AM
void PostLogin(APlayerController* NewPlayer)
Avatar
Avatar
jraServerAPI
Did you try PostLogin?
this one is too late
Avatar
Avatar
SR
Both are not the thing I wanted. Is it possible to track server player is trying to join through transfer menu? (edited)
🐨Dream Doctor🦘 3/5/2023 1:27 AM
I think you would have to do what you're wanting on the client.
Avatar
Avatar
🐨Dream Doctor🦘
I think you would have to do what you're wanting on the client.
I think it is not possible through mod too if plugin doesn't work. (edited)
Avatar
Avatar
SR
I think it is not possible through mod too if plugin doesn't work. (edited)
🐨Dream Doctor🦘 3/5/2023 1:30 AM
You would have to recreate the whole server browser in your mod, which would be very difficult.
1:32 AM
It is annoying that there is no way to stop someone jumping before they leave the server though. I tried to work out a way myself for a particular plugin, without success.
1:35 AM
Lethal did a lot of amazing work for his transfers plugin. Maybe he knows some tricks.
Avatar
And last thing I want to ask, is it possible to find out if player is in "There is already a player with this account connected!" error state? (edited)
1:37 AM
Maybe something nulls out when it happens. (edited)
1:38 AM
Or is it possible to lower the timeout from 300 seconds?
1:38 AM
(impossible through config afaik)
Avatar
Avatar
SR
authtoken contains steamid in the start values
substitute 3/5/2023 6:13 AM
auth tokens always contain the steam id
6:13 AM
those auth tokens are sent to Steam for user validation, they're actually auth blobs
Avatar
Avatar
SR
Is it possible to reject on prelogin?
substitute 3/5/2023 6:13 AM
you can
6:14 AM
I did it in my plugin that disallowed family shared users (before this was available for non-official servers.)
6:17 AM
actually, looks like I used AShooterGameMode.PostLogin
f2b1931abb214095a0e739d606cc41d8 1
6:17 AM
why can't you use this?
6:17 AM
Even the game uses AShooterGameMode.PostLogin for kicking for stuff like whitelist
6:19 AM
Even the global ban list happens in PostLogin (edited)
6:19 AM
did you make sure to send the FNetControlMessage and then flush and close the player network connection?
Avatar
🐨Dream Doctor🦘 3/5/2023 7:20 AM
Anyone seen this before? https://ark.dumps.host
Get all the latest ARK: Survival Evolved info dumped as soon as the game updates!
Avatar
Avatar
substitute
why can't you use this?
🐨Dream Doctor🦘 3/5/2023 7:21 AM
I think he was wanting to reject before the player left the original server.... so when selecting from the server browser.
Avatar
Avatar
🐨Dream Doctor🦘
Anyone seen this before? https://ark.dumps.host
🐨Dream Doctor🦘 3/5/2023 7:23 AM
It looks like it has a C++ and a C# tab for everything in the game?
Avatar
🐨Dream Doctor🦘 3/5/2023 7:33 AM
Looking at their Discord, it appears to be a community for people looking to "mod" the clients.
Avatar
🐨Dream Doctor🦘 3/5/2023 8:26 AM
There was quite a few hits on the temp docs site I posted yesterday, so I went ahead and published a more permanent version. It's still very early and entirely auto-generated without any documentation comments in the code, so it's usefulness is limited, but if, over time, we could start adding some doc comments to the api code, it could become a very useful resource. If anyone has any feedback I'd REALLY love to hear it. Anything at all. https://arkserverapi.wiki
8:27 AM
8:27 AM
I've used the project's README.md as the main page for now, so that everyone has all the official links to everything important. I hope that's ok. (edited)
8:29 AM
I'll work towards auto-updating the site as any changes are made to the project's GitHub. That might take me a while though, and since there's very few changes I can just update it manually for now.
8:31 AM
The inheritance graphs are really nice though. I wish I'd had these when I was doing more plugin work. https://arkserverapi.wiki/struct_a_actor.html
8:31 AM
Avatar
Avatar
🐨Dream Doctor🦘
I think he was wanting to reject before the player left the original server.... so when selecting from the server browser.
substitute 3/5/2023 8:47 AM
Then I wonder what the rejection requirements are
8:48 AM
It might make more sense to reject on the sending server instead of the receiving server
Avatar
Avatar
substitute
It might make more sense to reject on the sending server instead of the receiving server
🐨Dream Doctor🦘 3/5/2023 8:51 AM
I tried for weeks to find a way, however I don't think it works the way it should. The client does some really basic checks, then hands everything off to the receiving server.
8:53 AM
I don't remember which one it was, but there is a hook you can use that rejects the connection before the character is downloaded, so they just need to reconnect to the original server again.
8:56 AM
I think it was Hook_AShooterGameMode_HandleNewPlayer that I used, and I had to pay attention to the bIsFromLogin parameter.
8:57 AM
I think bIsFromLogin indicated if it was a player directly connecting to the server or one that was transferring from another server.
Avatar
Avatar
substitute
It might make more sense to reject on the sending server instead of the receiving server
Server transfers are client side connections I am 99% sure. The server has no idea what server the player is transferring to. (edited)
Avatar
Lethal what hook did you use in your tribelog relay to call things after the server is booted up? was it Initgame?
Avatar
Avatar
🐨Dream Doctor🦘
I don't remember which one it was, but there is a hook you can use that rejects the connection before the character is downloaded, so they just need to reconnect to the original server again.
about rejecting - everything bugs out on ApproveLogin() (edited)
6:05 PM
function in AGameSession (edited)
6:05 PM
it is returned btw not just executed (edited)
6:05 PM
I think we need to rewrite it or copy "server full" reject or something.
Avatar
@Pelayori How does UpdateSessionJoinability work?
Avatar
No idea
Avatar
ok is it possible to change server password/joinability midgame?
Avatar
I am not sure but maybe yes
Avatar
I've checked AShooterGameState AShooterGameMode AShooterGameSession and nothing I can do with it. (edited)
7:15 PM
What do you think where it can be?
Avatar
Does someone know why i can start a ark server headless on win 11 but not on withdows core with this command: Start-Process -FilePath "./ShooterGameServer.exe" -ArgumentList "TheIsland?listen?SessionName=test?ServerAdminPassword=test?Port=27015?QueryPort=27016?MaxPlayers=70" -WindowStyle Hidden -Wait
10:20 PM
or does someone know how to run it headless
Avatar
or has anyone got arkserver working on linux with wine?
Avatar
Avatar
Mr. Alpaca
Does someone know why i can start a ark server headless on win 11 but not on withdows core with this command: Start-Process -FilePath "./ShooterGameServer.exe" -ArgumentList "TheIsland?listen?SessionName=test?ServerAdminPassword=test?Port=27015?QueryPort=27016?MaxPlayers=70" -WindowStyle Hidden -Wait
What error code do you get
Avatar
Avatar
Mr. Alpaca
or has anyone got arkserver working on linux with wine?
🐨Dream Doctor🦘 3/6/2023 1:47 AM
If you have a look at the Pterodactyl project, they run Ark on Linux with wine. https://pterodactyl.io/
Pterodactyl is an open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
Avatar
GSH | MrOwlSky 3/6/2023 1:51 AM
Pterodactyl is a solid linux panel. https://wisp.gg/ is a great paid pterodactyl panel. I use wisp to host all of our servers outside of ark.
WISP will provide hosting companies with more features than ever; at a fraction of the cost. 'Basically Ptero on roids' - Dane Everitt
Avatar
Avatar
🐨Dream Doctor🦘
If you have a look at the Pterodactyl project, they run Ark on Linux with wine. https://pterodactyl.io/
and that works with plugins?
Avatar
Avatar
Uaca
and that works with plugins?
🐨Dream Doctor🦘 3/6/2023 5:01 AM
I don't know, sorry. You'd have to test it yourself.
5:02 AM
Or you could try asking that community. I'm sure someone has tried it.
Avatar
Avatar
🐨Dream Doctor🦘
If you have a look at the Pterodactyl project, they run Ark on Linux with wine. https://pterodactyl.io/
C # is very suitable for writing the server management panel. Ark can manage various map configurations without occupying much server resources with some simple code. In the past, I collected the. net platform management panel developed by others, but the computer was lost after replacement.
Avatar
Avatar
Invoker
C # is very suitable for writing the server management panel. Ark can manage various map configurations without occupying much server resources with some simple code. In the past, I collected the. net platform management panel developed by others, but the computer was lost after replacement.
🐨Dream Doctor🦘 3/6/2023 7:26 AM
I'm sorry, I don't understand what this means?
Avatar
Pterodactyl It is not specially designed without the ark,Linux is not suitable for building ARK as Windows.
Avatar
🐨Dream Doctor🦘 3/6/2023 7:48 AM
I think there might be a language barrier here. Are you using a translator?
Avatar
I once found an ARK server management panel developed by. net on Github, but now my collection is lost after the computer is reset.
7:50 AM
yes. I can better express myself through translation. But that doesn't seem to be the case at present. I'm terribly sorry
7:54 AM
Tomorrow I'll replace the software with one that supports more translation engines so that I can pick and choose what I think is the best expression in the translation results.
Avatar
🐨Dream Doctor🦘 3/6/2023 8:52 AM
OK
Avatar
Avatar
Invoker
yes. I can better express myself through translation. But that doesn't seem to be the case at present. I'm terribly sorry
🐨Dream Doctor🦘 3/6/2023 8:53 AM
No problem! I understand what you're saying now. 🙂
Avatar
Avatar
substitute
What error code do you get
Mr. Alpaca 3/6/2023 9:53 AM
none (edited)
Avatar
Avatar
GSH | MrOwlSky
Pterodactyl is a solid linux panel. https://wisp.gg/ is a great paid pterodactyl panel. I use wisp to host all of our servers outside of ark.
Mr. Alpaca 3/6/2023 9:54 AM
what do you use for ark servers?
Avatar
Avatar
substitute
What error code do you get
Mr. Alpaca 3/6/2023 9:54 AM
if i run the command it just stops
9:55 AM
wait, ark server needs directx right?
Avatar
Avatar
Mr. Alpaca
none (edited)
🐨Dream Doctor🦘 3/6/2023 10:21 AM
You might need to be a bit (a lot) more specific about what is not working in order for anyone to be able to help you.
10:22 AM
Also, this isn't really a Discord for server hosting. There are other forums where you might more people to help.
Avatar
This may be helpful for you. https://arkservermanager.freeforums.net/
Visit our forum at: arkservermanager.freeforums.net
11:10 AM
as Dream Doctor says, this is the Discord for communication ARK plugin development and may not solve your problem.
Avatar
Mr. Alpaca 3/6/2023 1:18 PM
i got it to wirk
1:19 PM
the pc i was testing on win 11 had directx installed the windows core not, i sucsessfully dockerized a ark server on windows platform so it will be able to run arkapi correctly 🙂
Avatar
Avatar
SR
ok is it possible to change server password/joinability midgame?
if i remember correctly it is possible
1:54 PM
need to change the session info
1:54 PM
changing server name on runtime is definitely possible
1:56 PM
bool Hook_FOnlineSessionSteam_UpdateSession(FOnlineSessionSteam* _this, FName SessionName, FOnlineSessionSettings* UpdatedSessionSettings, bool bShouldRefreshOnlineData)
1:56 PM
i used this hook to change the session name
1:56 PM
_this->GetGameServerSession()->SessionPrefixField()
1:56 PM
might have the field you need too
Avatar
Mr. Alpaca 3/6/2023 3:20 PM
any1 have arkapi running on linux with or without wine?
Avatar
Avatar
Mr. Alpaca
any1 have arkapi running on linux with or without wine?
impossible
Avatar
Mr. Alpaca 3/6/2023 3:44 PM
whay
3:44 PM
why*
Avatar
Mr. Alpaca 3/6/2023 4:12 PM
i can program, where should i start to make it work on linux
Avatar
did someone already made a plugin for element veins / osd and preventing damage to them by player dino's? i am using ragnarok plus mod that has them. Found a mod Safe OSD & Element Veins that does it. (edited)
Avatar
Avatar
Mr. Alpaca
i can program, where should i start to make it work on linux
by rewriting almost the entire project + plugins lol
Avatar
Mr. Alpaca 3/6/2023 6:21 PM
does someone her run ark servers on windows server core
Avatar
Avatar
WETBATMAN
by rewriting almost the entire project + plugins lol
and finding signatures for every single function lol
Avatar
Avatar
WETBATMAN
by rewriting almost the entire project + plugins lol
🐨Dream Doctor🦘 3/7/2023 4:34 AM
Yep. The research I've done suggests it would be a lot more difficult than it is with Windows, especially as there's no debug symbols like there is with the windows version. Someone would have to manually go through the process with gdb and pick out each function. Yuck.
Avatar
any recommended free decompiler+guide on getting ahold of the games code to be able to understand what to replace when hooking?
Avatar
Ghidra
Avatar
How to send custom chat messages? I mean those that aren't sized up like server ones and without big "SERVER" text.
Avatar
You mean the notifications, the entry text one , or a chat message?
Avatar
Avatar
Frigoff
You mean the notifications, the entry text one , or a chat message?
Chat message
Avatar
RIO (Александр) 3/8/2023 12:12 AM
hello everyone. I really need help with FUniqueNetIdUInt64. I can't figure out how to create a variable normally and dont get a stack overflow Cat_sad
Avatar
RIO (Александр) 3/8/2023 12:38 AM
it is for GM->AllowPlayerToJoinNoCheck(PlayerID); UPD: I have looked through the documentation and header files in the api. I think I've figured out how it works 🙂 (edited)
Avatar
Original message was deleted or could not be loaded.
🐨Dream Doctor🦘 3/8/2023 2:31 AM
It would be more polite of you not to tag the team members with non-specific questions. If you have a specific question, post it here and allow everyone a chance to assist, rather than spamming a single person. The development team are incredibly generous with their time and knowledge in this Discord, but they all still lead very busy lives. Let's not overwhelm them unnecessarily.
Avatar
🐨Dream Doctor🦘 3/8/2023 6:57 AM
Just trying to increase my understanding of the inner workings of the API. Can I just get a confirmation from one of our gurus.... The PDBReader in the API reads ShooterGameServer.pdb to get the offets for all the structures and functions it finds there (except for a few it discards) and throws them into an unordered_map. All the definitions that are present in the API have previously been manually extracted and added to the API? (edited)
Avatar
Avatar
🐨Dream Doctor🦘
It would be more polite of you not to tag the team members with non-specific questions. If you have a specific question, post it here and allow everyone a chance to assist, rather than spamming a single person. The development team are incredibly generous with their time and knowledge in this Discord, but they all still lead very busy lives. Let's not overwhelm them unnecessarily.
Ok
Avatar
Avatar
🐨Dream Doctor🦘
Just trying to increase my understanding of the inner workings of the API. Can I just get a confirmation from one of our gurus.... The PDBReader in the API reads ShooterGameServer.pdb to get the offets for all the structures and functions it finds there (except for a few it discards) and throws them into an unordered_map. All the definitions that are present in the API have previously been manually extracted and added to the API? (edited)
not exactly, there is a script which can dump a whole class
Avatar
any know how i can use API::Timer::Get().RecurringExecute() without crash? I have a function that gets the player position every 5 seconds, but if i unload the plugin, server crash. c++ void Load() { API::Timer::Get().RecurringExecute(&ActualizePlayerPosition, 5, -1, true); } (edited)
5:04 PM
(crash without errors, just server cmd closes) (edited)
5:05 PM
I think it's because even though the plugin dll is unloaded, it tries to execute the function, but it can't then it crashes, but I don't know how to fix it (edited)
Avatar
Avatar
Loki
any know how i can use API::Timer::Get().RecurringExecute() without crash? I have a function that gets the player position every 5 seconds, but if i unload the plugin, server crash. c++ void Load() { API::Timer::Get().RecurringExecute(&ActualizePlayerPosition, 5, -1, true); } (edited)
first of all
5:13 PM
you should read what the params do
5:13 PM
you have async set to true
5:13 PM
which means the that function you passed will execute in another thread
5:13 PM
which will crash no matter what (eventually)
5:14 PM
you should instead use an on timer or on tick callback to do what you want
5:14 PM
if you want to keep the unloading functionality
Avatar
Avatar
WETBATMAN
you have async set to true
yes ik, I forgot to mention that, if i set to false crash too. I using tick callback rn and works fine, thanks
Avatar
you would prob want to check a plugin load state in the callback, but i guess if dll is unloaded that can still crash if the code isnt there anymore. Feels like a weakness in the API that the owning plugin of the task isnt passed/captured, like in Minecraft when a plugin unloads we also cancel all of their scheduled tasks/events so nothing is left to fire for it. But without that additional context, i dont see a way for an unload to go remove that reference. unless can wrap the task with something outside of the plugin that will still be loaded to do the plugin is loaded check.
Avatar
Since you pass a function to the add callback, I’m not sure you can get the owner module of it just with the callback (maybe checking addresses)
Avatar
Avatar
Aikar
you would prob want to check a plugin load state in the callback, but i guess if dll is unloaded that can still crash if the code isnt there anymore. Feels like a weakness in the API that the owning plugin of the task isnt passed/captured, like in Minecraft when a plugin unloads we also cancel all of their scheduled tasks/events so nothing is left to fire for it. But without that additional context, i dont see a way for an unload to go remove that reference. unless can wrap the task with something outside of the plugin that will still be loaded to do the plugin is loaded check.
this is actually a good idea, we could manually clean up timers and such on plugin unload
Avatar
Avatar
Pelayori
Since you pass a function to the add callback, I’m not sure you can get the owner module of it just with the callback (maybe checking addresses)
yeah it needs to be a param to the recurringExecute call or require wrapping the tasks with a wrapper function that does the check. so would require some form of new api and deprecate the no owner one
Avatar
Yeah a wrapper would be ideal imo, so plugins won’t need to change anything just recompile
Avatar
declaration: package: org.bukkit.scheduler, interface: BukkitScheduler
Avatar
But old plugins will not be registered
Avatar
well if you make a diff method than recurringExecute that requires a plugin ref/name before the task, that would be a tiny change. .recurringExecute(plugin, &task, ...)
Avatar
in theory what could be done is that we could obtain the imagebase of the plugin that's about to be unloaded, then calculate it's size and then check all functions for being in that memory space
Avatar
just need transition period to get plugins updated or just leave it and say you will have risk of crash if your plugin unloads until you change to it
Avatar
if anything is in that memory space remove those functions first, then unload the plugin
Avatar
that could work too
7:21 PM
java you can do some insanely hacky stuff so yeah not as reliable there 😛
7:21 PM
and mc community loves to ignore api and go into reflection
7:22 PM
then complain when you break their plugin
Avatar
the function address trick could work, just needs to be tested if it works with packed plugins IE (Themida, VMProtect)
Avatar
Someone has used libraries like D++ to create discord bots inside a plugin?
Avatar
Aikar did you start on a ascension plugin?
Avatar
Avatar
SR
Someone has used libraries like D++ to create discord bots inside a plugin?
You can for sure use them but it’s not recommended. Hard to maintain and linkage of those big libs inside dlls is sometimes tedious
Avatar
Avatar
Natsu
Aikar did you start on a ascension plugin?
no, i havent gotten into code yet still configuring many things for my server. and sounded like sub was gonna try to polish his code and either release it or just post it avail.
9:55 PM
and yeah using node like kals did is def my recommendation, and if you really needed you could spawn as child and use stdin/stdout as an ipc channel to communicate with the bot from plugin
Avatar
first plugin i want to make is auto activate awesome spyglass on respawn though lol
10:04 PM
really should be an option in awesome spyglass
Avatar
Avatar
Michidu
not exactly, there is a script which can dump a whole class
🐨Dream Doctor🦘 3/9/2023 1:15 AM
Thank you!
Avatar
@SR I was not online yesterday but saw your message. I read most of the messages here and I can answer your questions, so yeah as Dream Doctor said no need to ping me. Anyways what was the issue?
Avatar
Avatar
Pelayori
@SR I was not online yesterday but saw your message. I read most of the messages here and I can answer your questions, so yeah as Dream Doctor said no need to ping me. Anyways what was the issue?
Chat messages. I've found out how to do custom ones but now, is it possible to remove ":" from the start?
Avatar
Avatar
Aikar
first plugin i want to make is auto activate awesome spyglass on respawn though lol
what do you mean auto activate?
Avatar
Avatar
Pelayori
Since you pass a function to the add callback, I’m not sure you can get the owner module of it just with the callback (maybe checking addresses)
You can check the address space when you register the callback
12:24 PM
We know the base address of any module, and the sizeof that module, so we know the end address.
Avatar
Avatar
Aikar
well if you make a diff method than recurringExecute that requires a plugin ref/name before the task, that would be a tiny change. .recurringExecute(plugin, &task, ...)
Don’t need to pass any info about the plugin
12:25 PM
The address of the callback will resolve to the module it was loaded from.
12:26 PM
The only scenario where this doesn’t work is if the callback comes from a different module that then uses your module (and is created from your module), but honestly — that’s just bad design on the plugin dev.
Avatar
Avatar
WETBATMAN
the function address trick could work, just needs to be tested if it works with packed plugins IE (Themida, VMProtect)
It should work with packed plugins
12:27 PM
You don’t need to know anything other than x and the bounds of the module, don’t see why packing would be an issue.
Avatar
Avatar
substitute
You can check the address space when you register the callback
That’s great
Avatar
Avatar
substitute
It should work with packed plugins
because when it packs your plugin (themida at least) it injects it's own dll into your project and you have 2 dll's running although one is hidden
1:02 PM
it does some tricks to remap functions also
Avatar
substitute 3/9/2023 1:02 PM
Sounds like a skill issue to me
1:02 PM
angry_joy
1:03 PM
The addresses should exist in some module that is trackable
1:03 PM
If they’re outside valid module space then like good luck lol
Avatar
Avatar
SR
Chat messages. I've found out how to do custom ones but now, is it possible to remove ":" from the start?
I don't think so. Chat messages have a custom struct for them where you specify sender, message, and send mode (local, global, tribe...). And then ark internally parses that in the client, so you cannot remove the : unless you find a way to send messages with the formatting you want manually, but I am not sure wether that's possible or not
Avatar
Is it possible to add custom data to already existing struct like FChatMessage?
4:28 PM
For example FChatMessage.Map
Avatar
No, you can only modify the fields it has
4:29 PM
So you can add the map to either the sender or the message itself
Avatar
Avatar
Natsu
what do you mean auto activate?
simulate the player pressing E/hotbar on the spyglass to turn it on. Does anyone have any hints on how to do this?
6:29 PM
hate having to turn it on every respawn
Avatar
Avatar
Aikar
simulate the player pressing E/hotbar on the spyglass to turn it on. Does anyone have any hints on how to do this?
it's open source just open it in the dev kit and look at the values?
Avatar
im talking about arkapi, like what method on playercontroller to 'use item at index X in inventory/hotbar' would be used
6:30 PM
and finding the item
Avatar
Avatar
Aikar
im talking about arkapi, like what method on playercontroller to 'use item at index X in inventory/hotbar' would be used
i might be wrong here but the Server Sends the data to the client like coords / and when your looking at dino the dino stats. A player needs to send something to the server if they have the UI open or not, meaning this value is replicated and you can get it.
Avatar
im not trying to replicate the spyglass, i just want to 'activate'
6:36 PM
when player spawns and presses hotkey for the spyglass and it gets the blue hilight
6:37 PM
unless activation is purely clientside is only issue i could see
Avatar
Avatar
Aikar
unless activation is purely clientside is only issue i could see
my guess is that Activtion is a simple Bool inside the mod that says UIOpen and is replicated from client to server just try to grab and activate it
Avatar
i take it youve not used the mod lol
6:39 PM
there is no ui
6:39 PM
its like a buff
6:39 PM
this one right?
6:40 PM
you use it and it turns on gps coords etc
6:40 PM
i think the simplest approach is "on respawn, activate inventory slot that contains spyglass"
6:40 PM
simulate a "use"
6:42 PM
i got tired of wasting hotbar slot so i just open my inventory but have to keep using unsorted to ensure spyglass stays up top
Avatar
Avatar
Aikar
i got tired of wasting hotbar slot so i just open my inventory but have to keep using unsorted to ensure spyglass stays up top
6:45 PM
That is called when pressing use inside Blueprint'/Game/Mods/SuperSpyglassMod/SuperSpyGlass/BP_SuperSpyglass.BP_SuperSpyglass'
Avatar
yeah im new to all this, so are you saying theres a way to execute ToggleUILock that would be more efficient than finding the item?
7:21 PM
or just giving the buff
7:22 PM
ive got devkit installed but no idea how to use it yet really
Avatar
Avatar
Aikar
yeah im new to all this, so are you saying theres a way to execute ToggleUILock that would be more efficient than finding the item?
you can call the function from the mod directly
7:36 PM
by name
Avatar
im thinking i will want a on spawn hook, if player does not have buff Buff_SuperSpyglass, call function ToggleUILock, sound right? and i can add in a per player config setting to let them turn it off if they dont want it later. does the call function need a mod id passed or so? able to point me to desired methods for this? I do see the buff methods on APrimalCharacter, so maybe safe to try to do it by buffs?
Avatar
Avatar
Aikar
im thinking i will want a on spawn hook, if player does not have buff Buff_SuperSpyglass, call function ToggleUILock, sound right? and i can add in a per player config setting to let them turn it off if they dont want it later. does the call function need a mod id passed or so? able to point me to desired methods for this? I do see the buff methods on APrimalCharacter, so maybe safe to try to do it by buffs?
For on spawn hooks you can use AShooterGameMode::StartNewShooterPlayer (I think it fired for spawn), or AShooterCharacter::PossesedBy (this fired for spawn but also for a lot of other things like riding, noglin possibly, etc...) Then you could do this to get the Buff ref: AShooterWeapon* weap = character->CurrentWeaponField(); if (!weap) return; UProperty* buffProp = weap->FindProperty(FName("Buff Ref", EFindName::FNAME_Find)); if (!buffProp) return; APrimalBuff* buff = buffProp->Get<APrimalBuff*>(weap); UFunction* toggleFunc = buff->FindFunctionChecked(FName("Toggle Target Lock", EFindName_FNAME_Find)); buff->ProcessEvent(toggleFunc, nullptr);
Avatar
ty! that helps a ton
8:48 PM
this felt like a great first task to get started learning this api
Avatar
But I think it is unlikely they have the spyglass right at spawn, unless using some sort of keep inventory
Avatar
Avatar
Aikar
this felt like a great first task to get started learning this api
Not the easiest, though 😛
8:49 PM
Working with mods can be cumbersome from C++
Avatar
ah yeah we do have keep inventory but there is a delay there that may be an issue
8:49 PM
yeah ive done C++ plugins for a framework I led back 15 years aog
8:49 PM
just super rusty
8:51 PM
oh yeh i got a Q for you about all engrams, is this discord ok since its about potential code change for it and question on a wtf im seeing. Read over code last night and I cant understand why its doing what I see it doing.
Avatar
Yeah sure
Avatar
guess first one is semi suggestion but i can try to PR it if its possible, Is it possible to detect special unlock engrams and auto ignore them by config for auto detect? ended up having to restore my char file 3 times last night as ended up unlocking things that are special unlocks, so i had to build the exclude list, but figure if this could be automated maybe most people wouldnt need to use the manual list 2nd issue: https://github.com/Michidu/Ark-Server-Plugins/blob/master/AllEngrams/AllEngrams/AllEngrams.cpp#L106 I am lvl 49, and it keeps unlocking a lvl 100 engram, but only 1 specific one from ARK Omega (Godlike Arrow). Verified in Beacon that engram is proper set to lvl 100. Nothing else seems to be doing that, and even adding it to the exclude list still didnt stop it. But overall very happy with the plugin as got a super lag free auto engram w/o engram tab lag now and doesn't lag server during levelup/mindwipe, even with Lethals awesome mindwipe
Server Plugins for ARK: Server API. Contribute to Michidu/Ark-Server-Plugins development by creating an account on GitHub.
8:57 PM
the level required config was set to 100, with autodetectlevel
8:58 PM
posssible that engram is buggy and is not registering the 100 correctly to AllEngrams even though it shows up just fine at level 100 in Engrams tab?
Avatar
Some engrams end up in top or bottom of the engram list since they are special unlocks and not per level. If they are on top or bottom they might get unlocked as those have level requirement = 0
9:00 PM
And about the auto exclusion list, it's not suitable for everyone in my opinion, some people want to have everything unlocked by default, while others prefer the usual route. I won't debate the exclusion list is not something pretty, it was not my plugin at first and I would go with a json file as of now
Avatar
yeah i get that for specials, thats what the Q is, is there a reliable way to detect it, ie level = 0, and ignore those if a config is set. I Was wondering if the _0 suffix had anything to do with it but i see a ton of stuff has _0 so i dont think it does
Avatar
Avatar
Aikar
yeah i get that for specials, thats what the Q is, is there a reliable way to detect it, ie level = 0, and ignore those if a config is set. I Was wondering if the _0 suffix had anything to do with it but i see a ton of stuff has _0 so i dont think it does
Yeah, I believe it could be. If level = 0 and give bp to player inventory = false it's usually a special one
9:02 PM
The _0 suffix it's because how the game handles the engrams
9:02 PM
The game data has objects of each primal item, and since they usually the first ones to be created they have the _0 as they are the first object to be created of that item class
Avatar
actually does that repo get maintained for PR's lol
9:04 PM
I see it is michidu's and they are gone now right?
9:04 PM
ah looks like yall got push access to it
Avatar
We now use the GSH repo, which is basically a fork. https://github.com/orgs/ServersHub/repositories
This will be used to release open source products created by the gameservershub community. - Game Servers Hub
9:05 PM
You can submit PR to any of those, we will merge them into master
Avatar
can anyone add a plugin there or is it just mainly for the teams plugins?
Avatar
It's mainly for the legacy plugins made by Michidu, and the official ones yeah
9:08 PM
Going back to your issue I misunderstood it and it's a bit more different: API::Timer::Get().DelayExecute(&HandleSpawned, 5, GetWeakReference(_this)); // delays execute of the HandleSpawned function for 5 seconds void HandleSpawned(TWeakObjectPtr<AShooterCharacter> character) { if (!character) return; UPrimalInventoryComponent* inventory = character->MyInventoryComponentField(); UPrimalItem* spyglassItem = nullptr; for (UPrimalItem* item : inventory->InventoryItemsField()) { if (item && item->NameField().ToString().Contains("BP_SuperSpyglass")) // checks if the item is an spyglass { spyglassItem = item; break; } } AShooterPlayerController* SPC = ArkApi::GetApiUtils().FindControllerFromCharacter(character); SPC->ServerRequestInventoryUseItem(inventory, spyglassItem->ItemIDField()); // request use item }
9:09 PM
You can just tell the weapon to be equiped, and that will likely be handled as the mod always does
Avatar
https://github.com/ServersHub/Ark-Server-Plugins/blob/master/AllEngrams/AllEngrams/AllEngrams.cpp#L113 this is good candidate to extract to top and cache boolean state and only send the multicast once right
Server Plugins for ARK: Server API. Contribute to ServersHub/Ark-Server-Plugins development by creating an account on GitHub.
9:09 PM
right thats what my original thought process was, just 'equip' it and let it handle it as normal
Avatar
Avatar
Aikar
https://github.com/ServersHub/Ark-Server-Plugins/blob/master/AllEngrams/AllEngrams/AllEngrams.cpp#L113 this is good candidate to extract to top and cache boolean state and only send the multicast once right
Yeah you could cache config, but need to update after reload config command
Avatar
but in theory couldnt the buff method work even w/o needing a spyglass in their inventory?
Avatar
If you wanted to add the buff itself you could without needing the spyglass yes
Avatar
I meant that MulticastProperty line, that can be done once after the loop is done (but keep the += cost in the loop), currently its going to multicast for every single engram unlocked
Avatar
Ah yeah you could just call it by the end of the unlocks
Avatar
yeah i wanna play with that, as that wouldnt need to worry about timing with keep inventory on death being returned or things like transfers downloading items
9:12 PM
just 'everyone gets a spyglass!'
Avatar
You need the blueprint path of the buff, use UVictoryCore::BPLoadClass, and then on you can use APrimalBuff::StaticAddBuff to add it with the class you just loaded. The class can be cached but load class needs to be called after server startup (AShooterGameMode::InitGame or setting a DelayExecute from the load function works well enough
9:13 PM
Then you can use the method I showed you before to get the toggle function and call it
Avatar
How to stop std::thread? Are there any alternatives to std::thread if it is not stoppable?
Avatar
You need to keep a reference to it and join it when you want to wait for it
9:14 PM
Also if you are doing an infinite loop you can use an atomic bool to signal it to stop (edited)
Avatar
yeah signal then wait is typical pattern on any programming language
9:15 PM
though if the task isn't critical, wait part can be optional depending on what the task is doing
Avatar
Avatar
Pelayori
You need to keep a reference to it and join it when you want to wait for it
It is referenced and joined but doesn't unload properly.
Avatar
In ark plugins I like to join them always so when it says plugin unloaded, it's actually unloaded by the time it shows the message
Avatar
yeah for C++ prob a bit more critical especially to handle reloads
Avatar
Avatar
SR
It is referenced and joined but doesn't unload properly.
What are you doing on it
Avatar
Avatar
Pelayori
What are you doing on it
starting some external stuff 😁
Avatar
Avatar
Aikar
yeah for C++ prob a bit more critical especially to handle reloads
Or if people want to update to a new version, if the threads aren't awaited it says dll is still in use
Avatar
that hangs ark when it is in the main thread
Avatar
Avatar
SR
that hangs ark when it is in the main thread
Like an external application, discord bot or something similar?
9:17 PM
And it is getting detached
Avatar
If you detach it you cannot join it anymore I believe
Avatar
so it needs to stop itself somehow? (edited)
Avatar
if the spawned process is detached, whats the thread waiting on?
Avatar
You dont need to detach it, keep a reference to it, and find a way to signal the things running on the thread to stop fully
Avatar
Avatar
Aikar
if the spawned process is detached, whats the thread waiting on?
It probably causes undefined behaviour
Avatar
Avatar
Pelayori
You dont need to detach it, keep a reference to it, and find a way to signal the things running on the thread to stop fully
But if I don't detach it ARK just goes hang.
Avatar
I use threads with while(true) loops without detaching just fine
Avatar
do you use some async io to handle process stdin/stderr/stdout?
9:22 PM
i see boost has an asio package
Avatar
Avatar
Aikar
do you use some async io to handle process stdin/stderr/stdout?
i think no
Avatar
are you needing to communicate to it or simply start/stop with the plugin
Avatar
start/stop
Avatar
then prob fine to do what pela said they are doing
Avatar
Oh wait after adding join on unload it doesn't hang anymore
Avatar
have the thread start it, hold ref to the process, use an atomic boolean for requestShutdown, and while (!requestShutdown) { sleep } then when loop exits, send process request to stop, join and wait for process to finish, then let the thread exit
Avatar
then your dll unload sets requestShutdown to true then joins thread
Avatar
My plugin isn't unloading still
9:38 PM
I did join thread and even stop the inside stuff.
9:39 PM
Could it be because of MySQL? (edited)
Avatar
Does it say plugin unloaded or does it hang
Avatar
it says "plugin unloaded"
Avatar
Did you remove the thread detach?
Avatar
Avatar
Pelayori
Did you remove the thread detach?
yes
Avatar
Where do you join the thread?
Avatar
Avatar
Pelayori
Where do you join the thread?
on unload
Avatar
try defining this function and doing it there: extern "C" __declspec(dllexport) void Plugin_Unload() { // join thread }
Avatar
You mean merge the entire unload here?
9:45 PM
or just join the thread?
Avatar
Just the thread unload is necessary
Avatar
and it should be in Unload()?
9:46 PM
or in DLLMain?
Avatar
Avatar
Pelayori
try defining this function and doing it there: extern "C" __declspec(dllexport) void Plugin_Unload() { // join thread }
Define this function and do the thread unload inside
Avatar
It just generated .exp and .lib files
9:47 PM
is it supposed to be like that??
Avatar
Yes since you are exporting a function
9:48 PM
You still just need dll and pdb
9:48 PM
lib and exp are for linkage
Avatar
Now it just hangs
9:54 PM
the entire server
9:54 PM
lol
Avatar
Waiting for threads should be done on that Plugin_Unload function since if I am right you cannot wait for threads on dll main
9:55 PM
So that means the thread might not be stopping
Avatar
pressing CTRL+C stopped it sus
9:56 PM
Do you know how to send SIGINT to console in C++? (edited)
Avatar
I do not
Avatar
Avatar
SR
Do you know how to send SIGINT to console in C++? (edited)
Don’t send SIGINT
11:17 PM
you need to handle the thread properly
Avatar
How to do something when server is ready?
Avatar
2 main ways: 1. Hook AShooterGameMode::InitGame 2. Include "Timer.h", and on load, call API::Timer::Get().DelayExecute(&YourFunction, 0);
Avatar
Avatar
Pelayori
2 main ways: 1. Hook AShooterGameMode::InitGame 2. Include "Timer.h", and on load, call API::Timer::Get().DelayExecute(&YourFunction, 0);
Delaying it at zero casts only when server is loaded?
Avatar
Avatar
SR
Delaying it at zero casts only when server is loaded?
i think the Timer.h functions start running when server is ready
5:47 PM
if you set it at "10" the function will cast 10 seconds after server start
Avatar
Avatar
Loki
i think the Timer.h functions start running when server is ready
I was also thinking about it but not sure.
5:48 PM
Going to check it out.
Avatar
Avatar
SR
Delaying it at zero casts only when server is loaded?
Yes, as the on timer callback it uses first fires after everything is ready
5:49 PM
Seconds don’t matter, since it will be a while until server starts
5:49 PM
So setting 10 will also cast it at server start
Avatar
Avatar
Pelayori
Yes, as the on timer callback it uses first fires after everything is ready
Same thing with API::Requests?
Avatar
Yes
Avatar
@Aikar I'm working on the plugin now
11:32 PM
I got the WoW out of my system for now
Avatar
lol nice
Avatar
Avatar
Pelayori
2 main ways: 1. Hook AShooterGameMode::InitGame 2. Include "Timer.h", and on load, call API::Timer::Get().DelayExecute(&YourFunction, 0);
we can probably add a wrapper for this
11:33 PM
something like ScheduleForStart(void* fn); { API::Timer::Get().DelayExecute(fn, 0); }
Avatar
Wouldn't be too bad, to add a wrapper for start schedule
Avatar
and have a check or cache when the server has started
11:34 PM
so it can warn the user (for development/debugging) (edited)
Avatar
Log->info("Processing startup tasks")
Avatar
@Aikar
Avatar
Contribute to SubstituteR/ArkAutoBosses development by creating an account on GitHub.
6:49 AM
initial 1.0
Avatar
Contribute to SubstituteR/ArkAutoBosses development by creating an account on GitHub.
6:49 AM
so it's user configurable
Avatar
savesm e trouble of switching ascension mods
6:50 AM
i was using 1 that didnt support gen1/gen2 so i was gonna need to wap to a diff mod
Avatar
you also can put extra engrams (for stuff that isn't tied to a normal boss, like tek sword)
6:50 AM
This will work for any
6:50 AM
the only issue, players that are currently spawned will need to respawn to have their unlocks
Avatar
its omega people die every few mins 😛
Avatar
new players (when created) should have them automatically as it eagerly applies the boss stuff
6:51 AM
is the plugin if you wanted to learn
6:51 AM
unlocks (engrams) are cached on server boot
Avatar
man im torn between offering you 20$ to make another plugin for me thatll prob take you 5 minutes, or keeping to idea of doing it myself to learn lol.
Avatar
I still have to add a command so that you can reload the config without rebooting the server
Avatar
Avatar
Aikar
man im torn between offering you 20$ to make another plugin for me thatll prob take you 5 minutes, or keeping to idea of doing it myself to learn lol.
$20 would be too low 😉
Avatar
pel was guiding me on the path
6:52 AM
just havent gotten to trying it yet
Avatar
that code file has kinda covers everything you'll need in C++
6:52 AM
custom json stuff for nlohmann
6:53 AM
and a custom hashing function (so you can use std containers on a custom class)
6:53 AM
etc.
Avatar
i see so many plugins including the json file, maybe arkapi needs to ship that lol
Avatar
I disagree
6:54 AM
that json file is a header-only include
6:54 AM
there's no library for it
Avatar
i think ive seen cpp or hpp in a few repos
Avatar
hpp is a header file with code, it's all self contained
6:55 AM
but hpp is kinda made up
Avatar
i could have been wrong
Avatar
it's still just h
6:55 AM
by allowing the developer to chose the library they use for json stuff
Avatar
yeah i know, thats why i said it, as in i think i saw cases where its not just a header file
Avatar
you don't vendor lock the developer to a specific implementation and version
Avatar
well i was thinking the api could ship a common one and people could still roll their own if they wanted
6:55 AM
that's what we did in minecraft
6:56 AM
everyone used yaml for standard configs
Avatar
there's not really anything to ship, since it's not a library unto itself
6:56 AM
the file could be included with the library, but we'd have to check the licensing for that
6:56 AM
this is the library
Avatar
thats whtat i meant, have api static link the json then export the symbols for plugins to see them
Avatar
there's nothing to static link
6:57 AM
it's a header and a lot of template magic
6:57 AM
there are no exports
6:57 AM
since the code is compiled at compile time
Avatar
for json parsing?
Avatar
yes
Avatar
guess its tiny anyways, too small to micro optimize
7:00 AM
no I mean you literally can't statically link
7:01 AM
templates don't exist until compile time, and even if you knew exactly what specific specializations that need to exist for a plugin
7:01 AM
the exported names would be total garbage (type info is embedded into the exported symbols) (edited)
Avatar
interesting
7:01 AM
never thought to design a library that way lol
7:02 AM
guess ive just mostly been in a world that isnt a thing
Avatar
yeah, to static/dynamic link, the code has to be compile ahead of time and exported
7:02 AM
and then you just link against the existing objects
7:03 AM
but that isn't really going to be possible with a templated header-only library
7:03 AM
and again, the exported symbols would be garbage
7:06 AM
for example, this code template<StringLiteral S, concepts::Function T1, concepts::CommonType T2 = types::default_calling_convention, concepts::CommonType T3 = type_traits::select_default_t3_t<T2>> class native_event {}; template<StringLiteral S, typename RT, concepts::CommonType T2, concepts::CommonType T3, typename ...A> class native_event<S, RT(A...), T2, T3> { public: static RT callback(A... args) { } }; Which generates a unique static callback function thru templates (there's a lot more going on, edited for brevity)
7:06 AM
will produce something like this for the callback (as the symbol name)
7:07 AM
int __cdecl _callback___native_event__2U__StringLiteral__0BF__moar__3D0FF__0EP__0GC__0GK__0GF__0GD__0HE__0CO__0FA__0HC__0GP__0GD__0GF__0HD__0HD__0EF__0HG__0GF__0GO__0HE__0A______A6AHPAX0_ZUcdecl_t_types_2_X_moar__SAHPAX0_Z( void *<args_0>, void *<args_1>)
7:07 AM
an extreme example but point stands
Avatar
Nice Plugin, i saw that the RuneStone from fjurdor are inside (GeneralizedUnlockedAchievementTags). Do you know what's more inside the AchievementTags?
Avatar
Pelyaori, in the hordeshield that you use in SafeZone's can you also remove the buzzing noise ?
Avatar
Don't think so
11:36 PM
It's an emitter which is only client side I believe
Avatar
yeah @substitute plugin works great but this line was a big issue i had to get rid of: //playerController->ServerRestartPlayer(); - that was causing me to spawn as a lvl 1 Survivor which caused huge issues for keep inventory on death as my tombstone was on the temp char. but when I removed that line, everythings working good. transfers sees it immed, but new players and login gets the unlocks but just doesnt see it in their inventory until the next respawn which is perfectly fine.
5:25 AM
it also triggered the new player experience on me for ark omega lol
Avatar
Avatar
Aikar
yeah @substitute plugin works great but this line was a big issue i had to get rid of: //playerController->ServerRestartPlayer(); - that was causing me to spawn as a lvl 1 Survivor which caused huge issues for keep inventory on death as my tombstone was on the temp char. but when I removed that line, everythings working good. transfers sees it immed, but new players and login gets the unlocks but just doesnt see it in their inventory until the next respawn which is perfectly fine.
When was that happening
9:44 AM
On transfer or on log in?
Avatar
transfer
Avatar
It can be tweaked to not run for transfers
9:44 AM
So that new players won’t have to respawn
Avatar
its working perfect w/o that line
Avatar
I’ll make the adjustment
9:45 AM
The line is needed for new chars to force the unlocks
9:45 AM
But the conditional for running it can be tweaked to avoid transfer characters
Avatar
yeah but them dying once to see it on implant doesnt urt much
9:45 AM
not like they need it those first few mins lol
Avatar
Sure, but I still wanna make it as seamless as possible
Avatar
but make sure it doesnt do the survivor thing w/o the proper name lol, as that messed with playerid i guess
Avatar
I didn’t setup two servers to test transfer chars
Avatar
inventory belonged to wrong body
Avatar
Because the game created your body and then you were restarted (edited)
9:46 AM
It should be fixable
Avatar
when it did it my inventory was in the tmep body, just on death, items still were owned by old and i respawned in my proper id
Avatar
Restarting a player without a body shouldn’t be an issue (new chars)
9:47 AM
So I’ll just filter transfer chars (edited)
Avatar
well omega gives you like starter items
Avatar
Do they not get those starter items either?
Avatar
im not sure i didnt test new chars with the line of code there
9:48 AM
just tested w/ it removed to make sure no one loses anything
Avatar
If you can test, let me know
9:48 AM
I can see how implants are computed and maybe force it to refresh
9:48 AM
But that will require me to get the devkit
9:54 AM
9:54 AM
dripku
Avatar
Avatar
Michidu
not exactly, there is a script which can dump a whole class
🐨Dream Doctor🦘 3/12/2023 1:05 PM
I don't suppose you know where I can find that script Mich?
1:10 PM
I found a few, but they all either crash with files as big as the Ark pdb file, or they don't work otherwise. This one looked promising but it only handles C, not C++. https://github.com/wbenny/pdbex
pdbex is a utility for reconstructing structures and unions from the PDB into compilable C headers - GitHub - wbenny/pdbex: pdbex is a utility for reconstructing structures and unions from the PDB ...
Avatar
It was a script for IDA, i've sent it to some people over there long time ago. Probably i still have old version, but they might have an updated one (script is pretty ugly too)
Avatar
🐨Dream Doctor🦘 3/12/2023 1:14 PM
Ok thanks. Maybe someone else here has it.
Avatar
@Aikar@Natsu
😍 1
3:17 AM
Releasing an update that adds runes and explorer note (it's a flag) levels as auto unlocks
3:17 AM
also should handle new characters more gracefully
3:18 AM
runes are via GeneralizedAchievementTagGrants so as WC (or modders) add stuff, you can update it in the config
3:18 AM
or just disable it by making it an empty json array
3:20 AM
I'll also be making a small PR to the API as I've added a few fields/functions that were missing.
3:28 AM
also added genesis 2 to config (edited)
3:34 AM
anyways, latest is on GH
Avatar
🐨Dream Doctor🦘 3/13/2023 4:20 AM
Has anyone ever used this before? It seems to be able to neatly dump a whole bunch of different data from a pdb file. It has a ton of different options. And IDA and all its difficulties are not required. https://llvm.org/docs/CommandGuide/llvm-pdbutil.html
4:21 AM
Sample from ShooterGameSever.pdb: struct TCallTraitsParamTypeHelper<FVector2D,1> [sizeof = 1] { typedef class FVector2D ParamType typedef class FVector2D ConstParamType } Total padding 1 bytes (100% of class size) Immediate padding 1 bytes (100% of class size) struct TIsArithmeticType<TSharedPtr<FNavigationQueryFilter const ,0> > [sizeof = 1] { enum <unnamed-enum-Value> { Value = 0 } } Total padding 1 bytes (100% of class size) Immediate padding 1 bytes (100% of class size) struct FGenericPlatformTypes [sizeof = 1] { typedef unsigned char uint8 typedef unsigned short uint16 typedef unsigned int uint32 typedef unsigned __int64 uint64 typedef char int8 typedef short int16 typedef int int32 typedef __int64 int64 typedef char ANSICHAR typedef wchar_t WIDECHAR typedef unsigned char CHAR8 typedef unsigned short CHAR16 typedef unsigned int CHAR32 typedef wchar_t TCHAR typedef unsigned __int64 UPTRINT typedef __int64 PTRINT typedef unsigned __int64 SIZE_T typedef int TYPE_OF_NULL typedef void* TYPE_OF_NULLPTR } Total padding 1 bytes (100% of class size) Immediate padding 1 bytes (100% of class size) (edited)
4:27 AM
It's the only tool I've found (apart from IDA scripts) so far that can produce formatted output directly from the pdb without crashing on large files like the ark server pdb.
Avatar
What is the command you used for that?
4:32 AM
it could be possible to write a script to dump the types (just their file names) and then dump the specific type into it's file
Avatar
🐨Dream Doctor🦘 3/13/2023 4:34 AM
This is from the API's BasicTypes.h /** * Generic types for almost all compilers and platforms **/ struct FGenericPlatformTypes { // Unsigned base types. typedef unsigned char uint8; // 8-bit unsigned. typedef unsigned short int uint16; // 16-bit unsigned. typedef unsigned int uint32; // 32-bit unsigned. typedef unsigned long long uint64; // 64-bit unsigned. // Signed base types. typedef signed char int8; // 8-bit signed. typedef signed short int int16; // 16-bit signed. typedef signed int int32; // 32-bit signed. typedef signed long long int64; // 64-bit signed. // Character types. typedef char ANSICHAR; // An ANSI character - 8-bit fixed-width representation of bit characters. typedef wchar_t WIDECHAR; // A wide character - In-memory only. ?-bit fixed-width representation of the typedef uint8 CHAR8; // An 8-bit character type - In-memory only. 8-bit representation. Should really be typedef uint16 CHAR16; // A 16-bit character type - In-memory only. 16-bit representation. Should typedef uint32 CHAR32; // A 32-bit character type - In-memory only. 32-bit representation. Should really be typedef WIDECHAR TCHAR; // A switchable character - In-memory only. Either ANSICHAR or WIDECHAR, depending on a typedef SelectIntPointerType<uint32, uint64, sizeof(void*)>::TIntPointer UPTRINT; // unsigned int the same size as a pointer typedef SelectIntPointerType<int32, int64, sizeof(void*)>::TIntPointer PTRINT; // signed int the same size as a pointer typedef UPTRINT SIZE_T; // unsigned int the same size as a pointer typedef PTRINT SSIZE_T; // signed int the same size as a pointer typedef int32 TYPE_OF_NULL; typedef decltype(nullptr) TYPE_OF_NULLPTR; };
4:34 AM
Seems like it matches pretty well.
Avatar
Avatar
substitute
it could be possible to write a script to dump the types (just their file names) and then dump the specific type into it's file
🐨Dream Doctor🦘 3/13/2023 4:35 AM
Yeah, a simple python script could run the commands, make some edits to the text and dump it all out neatly.
Avatar
Avatar
🐨Dream Doctor🦘
Yeah, a simple python script could run the commands, make some edits to the text and dump it all out neatly.
what command did you use?
Avatar
Avatar
substitute
what command did you use?
🐨Dream Doctor🦘 3/13/2023 4:42 AM
Downloaded the LLVM-15.0.7-win64.exe package from here: https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.7 Then ran llvm-pdbutil pretty -classes ShooterGameServer.pdb
4:44 AM
It has excellent inbuilt help. Start with --help
4:45 AM
pretty is the option to dump as formatted output, so if you run llvm-pdbutil pretty --help it gives you a ton of options. (edited)
5:01 AM
After vs2022 was updated, this message was pushed to me.
Avatar
@🐨Dream Doctor🦘
5:04 AM
output can be like func [0x0166b8b0+ 6 - 0x0166b8db- 6 | sizeof= 43] (FPO) void __cdecl execUseAlternateStandingAnim(FFrame& Stack, const void* Result)
5:04 AM
0x0166b8b0 exists in the compiland
5:04 AM
as f:\build\lostisland\projects\shootergame\source\shootergame\classes\shootercharacter.h (MD5: D23BAAF6F99E7E718CB639BEE0831768) Line 52, Address: [0x0166b8b0 - 0x0166b8da] (43 bytes)
5:04 AM
so it is parsable
Avatar
Avatar
substitute
output can be like func [0x0166b8b0+ 6 - 0x0166b8db- 6 | sizeof= 43] (FPO) void __cdecl execUseAlternateStandingAnim(FFrame& Stack, const void* Result)
🐨Dream Doctor🦘 3/13/2023 5:05 AM
I just noticed the command I posted above doesn't produce any of the highest level classes/structs like AActor or UObject, so there's some more investigated needed.
Avatar
Avatar
substitute
as f:\build\lostisland\projects\shootergame\source\shootergame\classes\shootercharacter.h (MD5: D23BAAF6F99E7E718CB639BEE0831768) Line 52, Address: [0x0166b8b0 - 0x0166b8da] (43 bytes)
🐨Dream Doctor🦘 3/13/2023 5:06 AM
What command did you use for that?
Avatar
Avatar
🐨Dream Doctor🦘
What command did you use for that?
5:07 AM
works fine for me
5:07 AM
llvm-pdbutil pretty -all -compilands -lines ShooterGameServer.pdb > text.txt
5:07 AM
produces a lot of repetitive info though
5:07 AM
could be optimized
Avatar
🐨Dream Doctor🦘 3/13/2023 5:09 AM
Oh that's why... it's produced class UObject where it's struct UObject in the API files.
5:10 AM
I don't think that matters does it?
Avatar
not really
5:10 AM
struct makes members public by default
5:10 AM
class makes members private by default
5:10 AM
that's the main difference
Avatar
🐨Dream Doctor🦘 3/13/2023 5:12 AM
It would be really nice to be able to update the API definitions. I don't know if they were done recently, but I used to find a LOT of things missing.
Avatar
I just added a few definitions manually
5:12 AM
3 functions and 1 field
Avatar
Hook_AShooterCharacter_Die(AShooterCharacter* _this, float KillingDamage, FdamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) Is there a way I can check what can be checked in this hook? ex) Death by a turret, death by a nearby dinosaur
Avatar
Avatar
돌드민
Hook_AShooterCharacter_Die(AShooterCharacter* _this, float KillingDamage, FdamageEvent* DamageEvent, AController* Killer, AActor* DamageCauser) Is there a way I can check what can be checked in this hook? ex) Death by a turret, death by a nearby dinosaur
🐨Dream Doctor🦘 3/13/2023 6:42 AM
Yes, by hooking it with some log output then testing it in game. (edited)
Avatar
Avatar
🐨Dream Doctor🦘
Yes, by hooking it with some log output then testing it in game. (edited)
Hmm, what should I check?
Avatar
Avatar
돌드민
Hmm, what should I check?
🐨Dream Doctor🦘 3/13/2023 10:07 AM
Whatever it is you want to know if it does or not?
Avatar
Avatar
🐨Dream Doctor🦘
Whatever it is you want to know if it does or not?
no i found it thank you !
Avatar
hi guys, i can't remember, is it possible to send a direct message to a specific player using RCON ? (edited)
Avatar
Avatar
Shadow
hi guys, i can't remember, is it possible to send a direct message to a specific player using RCON ? (edited)
wouldnt see why not
Avatar
Is it possible to catch "There is already a player with this account connected" error?
Avatar
Avatar
SR
Is it possible to catch "There is already a player with this account connected" error?
1:53 PM
void __fastcall AShooterGameMode::PreLogin(AShooterGameMode *this, const FString *Options, const FString *Address, const TSharedPtr<FUniqueNetId,0> *UniqueId, const FString *authToken, FString *ErrorMessage, UNetConnection *Connection)
1:54 PM
i guess you could hook it and check the error by ErrorMessage string
Avatar
Error message can be updated right, as I want to kick person when this happens. Really surprised Noone has made a plug in to do that yet
2:59 PM
This already connected issue was so easy to fix for wildcard
3:00 PM
In minecraft our pre login is threaded so I'm able to kick and wait for the disconnect and never error at all
Avatar
Avatar
Aikar
Error message can be updated right, as I want to kick person when this happens. Really surprised Noone has made a plug in to do that yet
🐨Dream Doctor🦘 3/15/2023 3:50 PM
You might have issues with the client if you try and kick the zombie user while the real user is trying to connect. I believe there was a reason why they've left it the way it is.
Avatar
what would it matter about the old client thats done and gone on the zombie user? but at min kick old and tell them to retry connecting in 15s
Avatar
most likely signature is wrong
4:29 PM
actually wait
4:29 PM
you should call original first
4:29 PM
otherwise message is probably empty (edited)
Avatar
Avatar
WETBATMAN
otherwise message is probably empty (edited)
I did try calling original first but it is still broken
Avatar
looks like the signature is wrong then
5:18 PM
you're missing a parameter in your function
5:18 PM
yeah
Avatar
does it work now?
Avatar
Avatar
WETBATMAN
does it work now?
yeah
Avatar
Morning peeps Not an API related question, but maybe somebody still may help. Is there any way to make the dodorex tameable ++ permanent?
Avatar
Avatar
idk tho
Morning peeps Not an API related question, but maybe somebody still may help. Is there any way to make the dodorex tameable ++ permanent?
The DodoRex is a fictional creature that has been implemented as part of the ARK: Fear Evolved event. It also appears during various other events, and as a summoned creature in missions within Genesis: Part 2.
Avatar
Yep. This fluffer
Avatar
did you play with the annunki mod back when it was functional?
3:40 PM
😄
Avatar
Never heard of it 👀
Avatar
Avatar
idk tho
Morning peeps Not an API related question, but maybe somebody still may help. Is there any way to make the dodorex tameable ++ permanent?
🐨Dream Doctor🦘 3/19/2023 3:03 AM
That's probably something best done with a mod imho. There are several mods that use those assets to make tameable creatures.
3:07 AM
Replication has been massively messed with in this game, and you'll find some variables that replicate, some that are supposed to but don't, and some that do sometimes and not others. It's a huge mess. Since those changes would need to be present on the client and it's unlikely you'll be able to replicate the changes consistently from a plugin, the best way to do it is in a mod. (edited)
Avatar
Alright buddy, thanks a lot! Might gonna look deeper into that. Have a good one 💪🏻
Avatar
I didn't know this, but it is actually so cool
7:49 PM
7:49 PM
void* my_ptr; if(my_ptr = find_ptr()) { //my_ptr != null }else{ //my_ptr == null }
7:49 PM
is a legal way to assign my_ptr and validate that my_ptr isn't null
7:49 PM
@Lethal did you know about this?
7:49 PM
most languages treat if(x = y) as disallowed since the user usually meant if(x == y)
Avatar
it makes writing a null check so much easier
7:58 PM
Avatar
I can't find the write-up now, but I remember reading about cases where malicious programmers have intentionally put assignments in if statements like that to insert backdoors in open source projects (and the maintainers didn't catch it in code review). I think if ((my_ptr = find_ptr()) != nullptr) is generally preferred to clarify intent if you really want to do assignment in an if condition.
Avatar
Avatar
TheMollusk
I can't find the write-up now, but I remember reading about cases where malicious programmers have intentionally put assignments in if statements like that to insert backdoors in open source projects (and the maintainers didn't catch it in code review). I think if ((my_ptr = find_ptr()) != nullptr) is generally preferred to clarify intent if you really want to do assignment in an if condition.
I think it depends
7:59 PM
if anything if ((my_ptr = find_ptr()) != nullptr) hides malicious code even better imho
7:59 PM
as it looks like a very purposeful statement
8:00 PM
while if (my_ptr = find_ptr()) should raise additional questions in a code review to ensure it wasn't supposed to be if (my_ptr == find_ptr())
8:00 PM
in most environments nullptr is just 0, so the check would pass the same
Avatar
Avatar
substitute
while if (my_ptr = find_ptr()) should raise additional questions in a code review to ensure it wasn't supposed to be if (my_ptr == find_ptr())
At least one would hope 🙂
Avatar
Avatar
🐨Dream Doctor🦘
Replication has been massively messed with in this game, and you'll find some variables that replicate, some that are supposed to but don't, and some that do sometimes and not others. It's a huge mess. Since those changes would need to be present on the client and it's unlikely you'll be able to replicate the changes consistently from a plugin, the best way to do it is in a mod. (edited)
I just want to expand on this real quick and provide some introductory links for other plugin developers who may have struggled with replicated properties. Epic's UE documentation isn't phenomenal, but here are some starting points at least. Just because a property can be replicated from the server to the client, doesn't mean it always will replicate. UE provides a few different tools to manage how and when properties get replicated. This lets game developers conserve bandwidth and CPU cycles in large games like ARK. Not all clients always need to have up-to-date values for every property. https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Networking/ One important concept is net relevancy, which dictates whether or not an actor is relevant to a particular client. https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Networking/Actors/Relevancy/ Another concept is net dormancy, which lets an actor go into a low bandwidth mode for all clients. https://docs.unrealengine.com/4.26/en-US/API/Runtime/Engine/Engine/ENetDormancy/ We can modify these systems with server plugins to force replicatable properties to replicate. But as with any plugin, it's prudent to understand exactly what it is you're changing and what the potential costs are.
Setting up networked games for multiplayer.
Information about Actor relevancy and priority
Describes if an actor can enter a low network bandwidth dormant mode
Avatar
Additional note (@TheMollusk you'll like this)
9:12 PM
I added this definition (and another helper one) to the API on GitHub static UClass* BPLoadClass(const FString& PathName) { return NativeCall<UClass*, const FString&>(nullptr, "UVictoryCore.BPLoadClass", PathName); } /* Manual Definition */
9:12 PM
you can pass a string directly to BPLoadClass now
9:12 PM
technically it should have always been const FString& but I left the original (dumped from IDA) which uses FString*
9:13 PM
because FString& is fundamentally the same type as FString* when compiled
9:13 PM
static UClass* myClass = UVictoryCore::BPLoadClass("Blueprint'/Game/PrimalEarth/.../Blueprint'"); (edited)
Avatar
@Aikar
Avatar
Avatar
substitute
I added this definition (and another helper one) to the API on GitHub static UClass* BPLoadClass(const FString& PathName) { return NativeCall<UClass*, const FString&>(nullptr, "UVictoryCore.BPLoadClass", PathName); } /* Manual Definition */
Nice!
10:54 PM
Sort of similar. Sometimes in my plugins I modify the definitions for functions that return a value that the caller has to allocate space for. Like for UObject::GetFullName() c++ FString GetFullName(UObject* StopOuter) { FString result; NativeCall<FString*, FString*, UObject*>(this, "UObjectBaseUtility.GetFullName", result, StopOuter); return result; } Instead of the existing c++ FString* GetFullName(FString* result, UObject* StopOuter) { return NativeCall<FString*, FString*, UObject*>(this, "UObjectBaseUtility.GetFullName", result, StopOuter); } (edited)
Avatar
Avatar
TheMollusk
Sort of similar. Sometimes in my plugins I modify the definitions for functions that return a value that the caller has to allocate space for. Like for UObject::GetFullName() c++ FString GetFullName(UObject* StopOuter) { FString result; NativeCall<FString*, FString*, UObject*>(this, "UObjectBaseUtility.GetFullName", result, StopOuter); return result; } Instead of the existing c++ FString* GetFullName(FString* result, UObject* StopOuter) { return NativeCall<FString*, FString*, UObject*>(this, "UObjectBaseUtility.GetFullName", result, StopOuter); } (edited)
Yeah, I left the original and wrapped it
11:15 PM
for this definition I added
11:15 PM
FString LinkedPlayerIDString() { FString result; return *LinkedPlayerIDString(&result); }
👍 1
11:15 PM
since plugins probably already are using FString* LinkedPlayerIDString(FString* result) { return NativeCall<FString*, FString*>(this, "AShooterPlayerController.LinkedPlayerIDString", result); }
Avatar
Avatar
TheMollusk
I just want to expand on this real quick and provide some introductory links for other plugin developers who may have struggled with replicated properties. Epic's UE documentation isn't phenomenal, but here are some starting points at least. Just because a property can be replicated from the server to the client, doesn't mean it always will replicate. UE provides a few different tools to manage how and when properties get replicated. This lets game developers conserve bandwidth and CPU cycles in large games like ARK. Not all clients always need to have up-to-date values for every property. https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Networking/ One important concept is net relevancy, which dictates whether or not an actor is relevant to a particular client. https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Networking/Actors/Relevancy/ Another concept is net dormancy, which lets an actor go into a low bandwidth mode for all clients. https://docs.unrealengine.com/4.26/en-US/API/Runtime/Engine/Engine/ENetDormancy/ We can modify these systems with server plugins to force replicatable properties to replicate. But as with any plugin, it's prudent to understand exactly what it is you're changing and what the potential costs are.
🐨Dream Doctor🦘 3/20/2023 12:09 AM
I'm certainly not an expert, but I'd add to that it's important to note that WC has made significant modifications to the replication system that was present in v4.5. Take general UE documentation with a large grain of salt.
Avatar
@Aikar
12:16 AM
This plugin will automatically enable the awesome spyglass item when a user logs in (and has one) or picks the item up. Additionally, it prevent losing the awesome spyglass features when dropping a spyglass while still having at least one...
Avatar
Substitute did you make logo's as well? they are fitting 😊
Avatar
I discovered a very interesting feature using the debugger. It is a very fast function for returning specific arrays of actors. However, sometimes the actors may already be invalid. struct AWorldSettings : AInfo{ ... std::array<TArray<AActor*>, 33>& ActorListsField() { return *GetNativePointerField<std::array<TArray<AActor*>, 33>*>(this, "AWorldSettings.ActorLists"); } } Quick example: int GetNumTamedDinos(AShooterGameMode* _this) { auto* settings = _this->GetWorldSettings(); if (settings == nullptr) { return 0; } auto tamed_dinos = settings->ActorListsField()[EActorListsBP::AL_TAMED_DINOS]; return tamed_dinos.Num(); } Note that "EActorListsBP" has already been defined in "Enums.h". namespace EActorListsBP { enum Type { AL_PLAYERS = 0x0, ... AL_BEDS = 0x9, ... AL_NPC_DEAD = 0xb, ... AL_TAMED_DINOS = 0x16 }; }
Avatar
Avatar
Natsu
Substitute did you make logo's as well? they are fitting 😊
For the plugins? Yeah
Avatar
Avatar
substitute
For the plugins? Yeah
haha yea
Avatar
Avatar
WETBATMAN
struct FOnlineSessionSteam : IOnlineSession { FNamedOnlineSession* GetGameServerSession() { return NativeCall<FNamedOnlineSession*>(this, "FOnlineSessionSteam.GetGameServerSession"); } };
wait how does that work
9:04 PM
What did you get for FNamedOnlineSession and IOnlineSession and where this one is located?
Avatar
it's not i've dumped those manually
Avatar
I understood
9:06 PM
but what did you put in it (edited)
Avatar
wdym
11:29 PM
the struct is already in the message you replied too
Avatar
I want to make a simple function. When a player uses a specified item, I want to output SteamId -- player map location -- item class name on the console. Now I don't know how to get the player's map location. Can you help me?
Avatar
jraServerAPI 3/22/2023 6:56 AM
yes! Search this discord for: player location
6:57 AM
3389_peepoDetective
Avatar
ty,I will try this
Avatar
Avatar
WETBATMAN
the struct is already in the message you replied too
but the other stuff is not.
Avatar
Avatar
SR
Click to see attachment 🖼️
Avatar
Avatar
SR
Click to see attachment 🖼️
struct __cppobj __declspec(align(8)) FNamedOnlineSession : FOnlineSession { FString SessionPrefix; const FName SessionName; int HostingPlayerNum; bool bHosting; bool bRestarted; TArray<TSharedRef<FUniqueNetId,0>,FDefaultAllocator> RegisteredPlayers; EOnlineSessionState::Type SessionState; };
Avatar
with as many potential hooks there are for experience, what do you recommend hooking to set a cap on how much XP is earned for killing a dino, on a per player level. I want to cap it so the exp is min(expNeededForLevel * someModifier, expEarned) so players cant jump from 100 to 150 from a single boss kill.
5:11 PM
im sure theres a few valid but i figure it might over hook, but i guess i also dont really go giving players exp by admin really (only had to do that once when testing plugin reset my XP back to 0 lol)
Avatar
Avatar
Aikar
with as many potential hooks there are for experience, what do you recommend hooking to set a cap on how much XP is earned for killing a dino, on a per player level. I want to cap it so the exp is min(expNeededForLevel * someModifier, expEarned) so players cant jump from 100 to 150 from a single boss kill.
I would hook all of them
5:22 PM
At least the ones that tell you the info
5:23 PM
You may find yourself in a hard scenario where the XP is calculated in the caller and sent to the callee
Avatar
i just care for w/e one is used by mob kills, avoiding admin based exp would be ok
Avatar
In which case …. It will be harder
Avatar
i was digging in the decompiled code but seems they call functions to calculate stuff and wasnt clear on what hook it would end up on
5:24 PM
as i want to fix this issue before i update to your newest autoendgame lol
5:24 PM
so that people least gotta grind out the last levels
5:25 PM
omega bosses with omega exp pot is like instant exp cap 😦 i got our level curve to reach 4 billion exp and hit 165 like nothing
5:26 PM
the 1-100 grind before bosses was actually nice and slow, so it was quite shocking how quick that turned around in bosses
Avatar
Avatar
Aikar
the 1-100 grind before bosses was actually nice and slow, so it was quite shocking how quick that turned around in bosses
Did you try to hook into AllowAddXP ?
Avatar
that sounds like a boolean?
Avatar
Yea it is
Avatar
i dont want to block xp llol, just nerf it
Avatar
UPrimalStatusComponent is the ultimate responsible for XP and I am pretty sure there is a AddExperience function in it
Avatar
Avatar
Pelayori
UPrimalStatusComponent is the ultimate responsible for XP and I am pretty sure there is a AddExperience function in it
void Hook_UPrimalCharacterStatusComponent_AddExperience(UPrimalCharacterStatusComponent* _this, float HowMuch, bool bShareWithTribe, EXPType::Type XPType)
5:45 PM
yeah this^^
5:45 PM
you can tell what kind of xp it is also
Avatar
cool thanks ill look into this after work
5:58 PM
so UE does provide an ECS system, does ark use it well? can you do some crafty things tacking on your own comps to things? ie can we make our own behavior comp and write custom actor behaviors
Avatar
hmm, random idea, do you think it would be possible to remove collision/propulsion from tek shields to players for pve servers by plugin? basically wherever the current code checks if player is Allianced with the tribe, just return true for everyone.
Avatar
Avatar
Aikar
so UE does provide an ECS system, does ark use it well? can you do some crafty things tacking on your own comps to things? ie can we make our own behavior comp and write custom actor behaviors
I don't think it's true ECS (I'm no expert on game design patterns), but UE4 has actor components which is sort of similar. https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/Components/ You can see an actor class's components in the dev kit under the "Components" tab when you open a Blueprint. It's possible to go into those components with a plugin and make changes, but ArkServerApi is missing some of the definitions you'd need to use. I can throw together some quick example code later when I'm in front of a workstation.
Explanation of Components and descriptions of the various types available.
Avatar
oh no need, thats def way past prob what id care to get involved to, was just curious on potentials
7:30 PM
like id love a polished dino raid system where your base gets under real threat. there is TC's Brutal Ark that does this but i ended up not trying it because I could tell it was going to confuse people as it restricts building system.
Avatar
I want to control the permission of players to use items. When players use items, they should hook that function.
Avatar
What hook is used when dino harvests something??
9:44 AM
Everything in APrimalDinoCharacter doesn't work.
Avatar
Avatar
Invoker
I want to control the permission of players to use items. When players use items, they should hook that function.
Try UPrimalInventoryComponent::ServerUseInventoryItem
Avatar
Avatar
SR
What hook is used when dino harvests something??
Depends on what you mean by Harvesting. I would definitely try UPrimalHarvestingComponent::GiveHarvestResource
10:04 AM
I was reversing how they handled harvesting nodes and bodies a while back and I think I landed there.
Avatar
Avatar
Frigoff
Depends on what you mean by Harvesting. I would definitely try UPrimalHarvestingComponent::GiveHarvestResource
Do you have its signature? (edited)
10:09 AM
or just a hook?
Avatar
Not sure what you mean by just a hook? You can take that function and get it's signature from IDA though.
10:10 AM
And if you want to hook it you'll need to match it's signature.
Avatar
I wasn't using IDA before 😅
Avatar
What hook will be triggered when a player uses consumables?
Avatar
The one I posted above should work.
10:12 AM
Doing almost anything in your inventory is called "Using"
Avatar
ok Find "Using" Should be able to tell,
10:17 AM
Thank you very much.
Avatar
They use Use
10:17 AM
Not Using
10:17 AM
But yes, that should get you on the right path.
Avatar
Thank you.I see how to start.
Avatar
I've encountered some problems with this hook (edited)
10:37 AM
Flint does modify and stone doesn't (edited)
Avatar
This one also happens with stryder
Avatar
Avatar
SR
I've encountered some problems with this hook (edited)
i tough wetbatman made a plugin that changed the harvest by tribe members ? 🤔
Avatar
Avatar
Natsu
i tough wetbatman made a plugin that changed the harvest by tribe members ? 🤔
I need to decrease it by a dino
Avatar
Avatar
SR
I need to decrease it by a dino
`wouldnt it be better to set a default 1x and increase it by dino ?
Avatar
Avatar
Natsu
`wouldnt it be better to set a default 1x and increase it by dino ?
Needs to be done for specific resources
Avatar
any knows where is stored the dino base stats or how i can get it?
Avatar
jraServerAPI 3/24/2023 5:00 PM
UPrimalCharacterStatusComponent* statusComp = dino->MyCharacterStatusComponentField(); auto currentStatusValues = statusComp->CurrentStatusValuesField()(); // 0: health 1: stamina 2: torpor 3: oxygen 4: food 5: water // 6: temperature 7: weight 8: melee damage 9: movement speed 10: fortitude 11: crafting speed auto health = currentStatusValues[0]; //etc... (edited)
5:00 PM
hope that helps
5:01 PM
oh no..Pelayori is gonna correct me 😛
5:01 PM
🤦‍♂️ haha jk
5:03 PM
10 and 11 probably don't apply to dinos
Avatar
There’s a better way to obtain them rather than accessing the array directly, statusComp->GetLevelupPoints(bool TamedLevels) if the bool is true it gives you the levelup wild points, and if true it returns how many levels the player applied to the dino post tame
Avatar
jraServerAPI 3/24/2023 5:04 PM
ooh nice
Avatar
Avatar
jraServerAPI
oh no..Pelayori is gonna correct me 😛
Not really a correction, but there’s a more friendly way to get them
pepe_noted 2
Avatar
thanks mate! int HP = statusComp->GetLevelUpPoints(EPrimalCharacterStatusValue::Health, false); works fine
Avatar
game calls UPrimalItem.GetItemNetInfo statically but API has it marked as instance method, bug in api?
Avatar
It is not static
8:54 PM
Would not make sense since the item net info is a class attribute
8:55 PM
Well not an attribute, rather all the fields from the item net info are inside each UPrimalItem
Avatar
this_00 = UPrimalItem::AddNewItem (local_358,(UPrimalInventoryComponent *)0x0,false,false,0.0,false,0,false , 0.0,false,(TSubclassOf<UPrimalItem>)0x0,0.0,false,false); UPrimalItem::GetItemNetInfo(this_00,&local_1c8,false); is what I see in ghidra, is all decompile syntax just in this format?
Avatar
That isn't a static call, it's just what the call looks like to a compiler, it's calling the function with the hidden parameter this, which is the object instance
8:57 PM
FItemNetInfo* UPrimalItem::GetItemNetInfo( UPrimalItem *this, FItemNetInfo *result, bool bIsForSendingToClient)
Avatar
yeah im still rusty on c++, that just being the static format for like so many other langs lol, but we typically use foo->bar() still in source code.
Avatar
But yeah decompiled code will look like that in ghidra, ida, etc
8:58 PM
Functions that do not have a *this first param are indeed static, rest of class functions that have this param are instance
8:59 PM
Normal code you write does not have that parameter, though. That is how it works under the hood
Avatar
Avatar
Aikar
this_00 = UPrimalItem::AddNewItem (local_358,(UPrimalInventoryComponent *)0x0,false,false,0.0,false,0,false , 0.0,false,(TSubclassOf<UPrimalItem>)0x0,0.0,false,false); UPrimalItem::GetItemNetInfo(this_00,&local_1c8,false); is what I see in ghidra, is all decompile syntax just in this format?
Yo, that's not a C++ construct but rather a native code construct
9:24 PM
in machine code land there is no concept of an object
Avatar
guess its up to decompiler of trying to put it back in c++ format
9:25 PM
and its simply not
Avatar
when you write code like class A { public: void test(int, int); }; and invoke it with A a; a.test(10,10) under the hood the compiler creates a static function, such as A__test where the signature is A__test(A* this, int, int) and each instance call, a.test(10,10) becomes A a; A__test(&a, 10, 10);
9:26 PM
this same type of transformative behavior is how virtual functions (and overloads) work in C++
9:26 PM
where when you call a virtual function, it goes to a virtual function table that contains a pointer to the implementation for the object class
9:28 PM
in the C++ type system, the signature of class A { public: void test(int, int); }; test would be void (__thiscall A::*)(int,int) which can be decayed into void (__thiscall *)(A*, int,int)
9:28 PM
but fortunately, Ark is x86_64, so you don't have to actually worry about __thiscall since x86_64 uses __fastcall for basically everything.
Avatar
Avatar
Aikar
guess its up to decompiler of trying to put it back in c++ format
IDA doesn't generate C++ pseudo code (edited)
9:29 PM
it generates C pseudo code (edited)
9:29 PM
Objects are a C++ construct
9:30 PM
Same with virtual functions, which is why they look like this
Avatar
yeah i get it
Avatar
The full size image actually shows exactly what the C++ compiler is generating under the hood (and then converted back into pseudo C)
9:30 PM
Avatar
Anyone know how feeding troughs work? I'm looking to change the range, but can't seem to find it in the dev kit.
Avatar
Avatar
Tobias
Anyone know how feeding troughs work? I'm looking to change the range, but can't seem to find it in the dev kit.
The actual feeding part happens in C++ in the APrimalDinoCharacter class, not in the dev kit. APrimalDinoCharacter::GetBestInventoryFoodItem() finds the best food item for the dino to eat, either from a trough or from the dino's inventory, etc. Then APrimalDinoCharacter::ConsumeInventoryFoodItem() consumes the item from whatever inventory it was found in. You could probably hook GetBestInventoryFoodItem() to increase the range, but the visuals on the client (the feeding trough range indicator, the feeding trough symbols over a dino) won't reflect your change.
Avatar
The range of the feeding trough is tied to the stasis component size or something similar, strange enough lol
Avatar
Is that for the actual feeding part or just for the client visuals? I assumed for feeding it was hardcoded here in APrimalDinoCharacter::GetBestInventoryFoodItem(). I could definitely be wrong. Either way I think it's possible to effectively change it somehow with a plugin, but I assume you can't change the client side graphics.
Avatar
This is the required setting on an structure to make it a feeding trough
12:25 AM
12:26 AM
It does stasis comp radius + 3000
Avatar
Huh that's interesting. Do mesh components even exist on the server? I guess it makes sense to use the location of the stasis component.
Avatar
Thanks! 🙂 Looking into if I can change the range using the stasis component. I read on a mod page that introduced a new trough that the range had something to do with the stasis component, but I could not find it in the dev kit not really knowing where to look.
Avatar
Avatar
TheMollusk
Is that for the actual feeding part or just for the client visuals? I assumed for feeding it was hardcoded here in APrimalDinoCharacter::GetBestInventoryFoodItem(). I could definitely be wrong. Either way I think it's possible to effectively change it somehow with a plugin, but I assume you can't change the client side graphics.
Considering hard coded values - do you guys ever edit the method bodies in memory to change values like this one? I sometimes wish there was a sig matcher/patcher in the api.
Avatar
I've modified the script bytecode of compiled Blueprint graphs, never tried modifying the machine code of compiled C++ functions though. It seems like feeding is based off the location of the statis component + a hardcoded radius of 3000? So I'm not sure modifying the location of the stasis component will help you. I guess what I would do is hook APrimalDinoCharacter::GetBestInventoryFoodItem(), call _original in your hook, and then run your own check for feeding troughs with acceptable food in a larger range, and change the return value of the function if you find food in a nearby (within your new range) trough.
1:10 AM
Or add your new check first then only call _original if necessary.
Avatar
The ARK wiki says that the regular feeding trough range is 11 foundations horizontally and 15 walls vertically, but the Tek trough range is 11 foundations horizontally and 17 walls vertically. Which seems odd. So either the wiki is wrong or I am with the hardcoded 3000 lol (I didn't look TOO close).
Avatar
Thanks again 🙂 Will try that and see where it get's me. But it'll have to wait until tomorrow. Currently crashing on c++ UProperty* prop = actor->FindProperty(FName("StasisComponent", EFindName::FNAME_Find)); USphereComponent& val = prop->Get<USphereComponent>(actor); Crashes here which makes sense but not sure how to solve it. C++ Get(UObject* object) { ... if (sizeof(T) != this->ElementSizeField()) throw std::invalid_argument("Expected size does not match property size."); (edited)
Avatar
It expects a pointer to USphereComponent
1:26 AM
So USphereComponent*
Avatar
Avatar
TheMollusk
The ARK wiki says that the regular feeding trough range is 11 foundations horizontally and 15 walls vertically, but the Tek trough range is 11 foundations horizontally and 17 walls vertically. Which seems odd. So either the wiki is wrong or I am with the hardcoded 3000 lol (I didn't look TOO close).
Yeah. Since I saw mods that add new troughs with larger ranges and none of it seem to be controlled through blueprint scripts I feel it would be odd if the range was hardcoded.
1:28 AM
Oh. I'll try that 🙂
Avatar
Avatar
TheMollusk
I've modified the script bytecode of compiled Blueprint graphs, never tried modifying the machine code of compiled C++ functions though. It seems like feeding is based off the location of the statis component + a hardcoded radius of 3000? So I'm not sure modifying the location of the stasis component will help you. I guess what I would do is hook APrimalDinoCharacter::GetBestInventoryFoodItem(), call _original in your hook, and then run your own check for feeding troughs with acceptable food in a larger range, and change the return value of the function if you find food in a nearby (within your new range) trough.
never tried modifying the machine code of compiled C++ functions
That's what you're doing when hooking ;) So if it is hardcoded and you'd want to change it. You'd just need to get it's offset with a sig and change it SmirKid
Avatar
Yeah I think SS/S+ increase the range don't they? I'm not sure how that would work based on what I'm thinking.
Avatar
The mod I found just stated they increased the size of the stasis component. It has a radius of 16.0 in the dev kit but dunno how that works with the wiki sizes either.
Avatar
You can test if it's hardcoded easily by finding the function in x64dbg and patching that 3000 without doing too much work.
Avatar
Avatar
Frigoff
never tried modifying the machine code of compiled C++ functions
That's what you're doing when hooking ;) So if it is hardcoded and you'd want to change it. You'd just need to get it's offset with a sig and change it SmirKid
True lol. I let ArkServerApi's hooking library do the work for me though. I've run into a couple cases where I wished ArkServerApi API would export a function to get a function address, instead of just adding hooks.
Avatar
Avatar
TheMollusk
True lol. I let ArkServerApi's hooking library do the work for me though. I've run into a couple cases where I wished ArkServerApi API would export a function to get a function address, instead of just adding hooks.
I highly recommend Detours for that
1:35 AM
DetoursFindFunction can find any object and function with the PDB
1:36 AM
Detours is light weight and easy to include.
Avatar
ArkServerApi in GitHub uses Detours now! I've actually been running that on my cluster instead of the released version (with MinHook) and it's been working really nicely. Props @substitute (edited)
Avatar
Yeah Minhook was a weird choice Kek
Avatar
Changed the radius of the stasis component but didn't seem to work so I'll check the 3000 tomorrow and hopefully it works 🙂
1:40 AM
I think I added function offsets to my local ArkServerApi at some point when trying to implement patching. But got stuck realizing that getting method sizes from the pdb was impossible(?)
Avatar
Yeah you can't do that haha
1:40 AM
IDA and other tool guess on where the end is
1:41 AM
The binary doesn't store any size info on functions
1:43 AM
The easiest way to implement patching is to hook and never call the original.
Avatar
Do you know any libs that work for patching the compiled code in memory? I don't usually code much in C/C++. I have changed things like the chance for offspring to inherit the better stat but I simply do it manually at this point.
1:44 AM
Sure. But some functions are huge and you would need to reimplement all of it no..?
Avatar
Avatar
Frigoff
Yeah Minhook was a weird choice Kek
I think Detours was only freely available for x32, not x64 until sometime in 2016, so maybe that's why Michidu started with MinHook? (edited)
Avatar
Avatar
TheMollusk
I think Detours was only freely available for x32, not x64 until sometime in 2016, so maybe that's why Michidu started with MinHook? (edited)
Ah I didn't start programming until 2019 so idk Kek
Avatar
Avatar
Tobias
Sure. But some functions are huge and you would need to reimplement all of it no..?
If there are areas of the function you want to remove you can patch it
Avatar
madchook gang represent from 2000's
Avatar
Avatar
Frigoff
never tried modifying the machine code of compiled C++ functions
That's what you're doing when hooking ;) So if it is hardcoded and you'd want to change it. You'd just need to get it's offset with a sig and change it SmirKid
or you can reimplement the function assuming you match the original
Avatar
Avatar
Tobias
Changed the radius of the stasis component but didn't seem to work so I'll check the 3000 tomorrow and hopefully it works 🙂
Okay I overcomplicated it slightly yesterday (there was tequila involved 🍾). You can update the stasis component radius to modify the feeding range, probably don't need to do any gameplay hooking. I don't know if there are other side effects from modifying that radius. Here's code that goes into the FeedingTroughBaseBP class and increases the radius of the component. It only affects newly placed troughs and those troughs revert to the default radius after a server restart. So you'll also need to modify the stasis component on each existing trough structure, not just the UClass. It also doesn't affect the visual client-side range indicators, just allows dinos to feed at a greater range. (edited)
Avatar
bob q: cannot open source file API/ARK/Ark.h - this is basic, im trying to get a simple environment setup to start working but this is very non intuitive (developer but not C++...chatGPT is not as helpful as you guys could be im sure) -- help? guidance? a link to a vid tut? a link to a "how to configure your VS env for ark plugin dev" ... anything?
Avatar
Avatar
XANAX
bob q: cannot open source file API/ARK/Ark.h - this is basic, im trying to get a simple environment setup to start working but this is very non intuitive (developer but not C++...chatGPT is not as helpful as you guys could be im sure) -- help? guidance? a link to a vid tut? a link to a "how to configure your VS env for ark plugin dev" ... anything?
#【🔶】ᴘʟᴜɢɪɴ-ᴛᴜᴛꜱ scroll to the top there's a doc on how to setup VS2019 for ark api, will work on VS2022 too
Avatar
thnx! followed...seems to be missing something. also, big fan @Pelayori ur stuff rocks
cheers 1
Avatar
What's the issue you are facing now?
Avatar
Try configuring it for the release x64 configuration, it might be you are trying to configure the x86 version
6:56 PM
Also change your configuration used (where it says debug x64, click the drop down and select release)
6:57 PM
Or, Substitute has a template to get started quicker
6:57 PM
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
Avatar
love it, that was almost faster then chatGPT output too 🤣 ill try all these things THNX
Avatar
I tested wether ChatGPT had been trained with any ark server api data and it sucks lol
6:59 PM
So it would need training with such environment, as it's very specific
6:59 PM
GPT4 is worse than GPT3.5 for this framework
6:59 PM
at least as of now
Avatar
im expecting it to be difficult, but im a developer so i intend to start a proj slow and add features and explore as i learn...gpt is a tool, and im good at googling so its enough for me to feel comfortable to try anyway. im deving with fingers crossed lol
Avatar
As long as you got C++ basics right, it's matter of spending time learning UE4 and how ark makes use of it
Avatar
longer adventure then anticipated im sure. ill keep u posted then lol
Avatar
yeah debug build just didnt work
7:14 PM
only release has worked for me
7:14 PM
and if you wanna use cmake with CLion lemme know i got a project working for that
7:15 PM
GitHub Gist: instantly share code, notes, and snippets.
Avatar
im just tripping on env stuff...its gonna be something silly like a space in a path or something...i just cloned SubstituteR template repo and thats not building unchanged...settings arent coming through so relinking the public api dependancy and adjusting release x64 etc...what a headache, how do you guys live like this
Avatar
Once you get it right the first time, it's always the same 😛
7:17 PM
I have a script to create a new plugin from a personal template I have with my own configurations and predefined stuff I usually use
Avatar
need a VM lol
Avatar
whats a good way to filter to player tames only and not wild, currently have: void Hook_UPrimalCharacterStatusComponent_AddExperience(UPrimalCharacterStatusComponent* _this, float howMuch, bool bShareWithTribe, EXPType::Type type) { auto character = _this->GetPrimalCharacter(); auto isPlayer = character->IsA(AShooterCharacter::StaticClass()); auto isDino = character->IsA(APrimalDinoCharacter::StaticClass()); if ((type == EXPType::MAX || type == EXPType::XP_KILL || type == EXPType::XP_ALPHAKILL) && (isPlayer || isDino)) { and apparently wild dinos get XP too lol
Avatar
i cant wait until my problems sound more like yours xD
Avatar
yeah taken me a bit to get here lol
Avatar
keep at it man
7:19 PM
imma take a break, needs a fresh set of eyes
7:19 PM
thnx guys, ciao for now
Avatar
Avatar
Aikar
whats a good way to filter to player tames only and not wild, currently have: void Hook_UPrimalCharacterStatusComponent_AddExperience(UPrimalCharacterStatusComponent* _this, float howMuch, bool bShareWithTribe, EXPType::Type type) { auto character = _this->GetPrimalCharacter(); auto isPlayer = character->IsA(AShooterCharacter::StaticClass()); auto isDino = character->IsA(APrimalDinoCharacter::StaticClass()); if ((type == EXPType::MAX || type == EXPType::XP_KILL || type == EXPType::XP_ALPHAKILL) && (isPlayer || isDino)) { and apparently wild dinos get XP too lol
Players and tamed dinos / player owned structures always will have a TargetingTeam > 50000
7:20 PM
Wild dinos/structures (supply crates, etc...) are always < 50000, even less most likely but 50000 is a safe assumption
Avatar
if ((type == EXPType::MAX type == EXPType::XP_KILL type == EXPType::XP_ALPHAKILL) && (isPlayer || isDino) && character->TargetingTeamField() >= 50000) { So this?
Avatar
Yep, will work
7:21 PM
Also dinos have a BPIsTamed function but that just returns the same comparison
Avatar
Avatar
XANAX
im just tripping on env stuff...its gonna be something silly like a space in a path or something...i just cloned SubstituteR template repo and thats not building unchanged...settings arent coming through so relinking the public api dependancy and adjusting release x64 etc...what a headache, how do you guys live like this
Possibly a silly question: Did you also clone the ARK-Server-API submodule in his template? That's where the API/ARK/Ark.h file actually is.
Avatar
k yeah that seems to be working fine
7:25 PM
and yeah if you forget to git submodule update --init (or clone recursive) template repo wont work
7:26 PM
got some good progress on my custom changes ive been wanting to do, mutations capped to 20, xp capped per kill, next up i want to filter out garbage from loot bags, any tips on best hook for when a loot bag is created to filter out implants from death corpe, and stuff like apex(tribute) drops, stone hatchets, skins, recipes etc? i want to just remove all the trash items
7:26 PM
tributes arent needed for my server
Avatar
Lootbag as in Supply Crate?
Avatar
no, mob kills/player death
7:27 PM
dino corpse/player corpse etc
7:28 PM
all these dinos dropping trash items like primitive stone hatchets i wanna get rid of
Avatar
1sec I'll look it up
Avatar
but if a player wants to craft it, i want to allow that
7:28 PM
as on omega there is recipes for modded weapons requires crafting like 50+ freaking hatchets to make the BP lol
7:29 PM
but while out in field looting bodies man inventory gets slammed with trash
Avatar
When dead wild dinos do have a DinoDropInventoryComponent that is created upon death, you could hook one of the inventory init functions and remove the items after it's been initialized, or remove them before even initializing. dino drop inventories generate random items from ItemSets field so you could mess with possible items to be generated.
7:37 PM
All drop inventories likely inherit from Blueprint'/Game/PrimalEarth/CoreBlueprints/Inventories/DinoDropInventoryComponent_BP_Base.DinoDropInventoryComponent_BP_Base' so you could cache the UClass* and compare it when you need to
7:38 PM
(after all those dino drop inventories are normal inventories, not sure if they are set to the dino's MyInventoryComponentField upon death, but it for sure is in the component list of the dino after it dies)
Avatar
Avatar
TheMollusk
Okay I overcomplicated it slightly yesterday (there was tequila involved 🍾). You can update the stasis component radius to modify the feeding range, probably don't need to do any gameplay hooking. I don't know if there are other side effects from modifying that radius. Here's code that goes into the FeedingTroughBaseBP class and increases the radius of the component. It only affects newly placed troughs and those troughs revert to the default radius after a server restart. So you'll also need to modify the stasis component on each existing trough structure, not just the UClass. It also doesn't affect the visual client-side range indicators, just allows dinos to feed at a greater range. (edited)
Wow, nice! Thanks so much 🙂 Do you have any idea why the code I wrote yesterday did not appear to modify the range of the troughs? The previously placed trough still fed dinos a normal distance away when I set the range to 1 (expecting it to only feed dinos very close or not at all). c++ UGameplayStatics::GetAllActorsOfClass(ArkApi::GetApiUtils().GetWorld(), typeToFind, &FoundActors); for (uint32_t i = 0; i < FoundActors.Num(); i++) { AActor* actor = FoundActors[i]; FString bp = ArkApi::GetApiUtils().GetBlueprint(actor); if ((bp.Contains("FeedingTrough") || bp.Contains("TekTrough")) == false) continue; UProperty* prop = actor->FindProperty(FName("StasisComponent", EFindName::FNAME_Find)); if (prop) { USphereComponent* val = prop->Get<USphereComponent*>(actor); val->SetSphereRadius(1.0, true); } }
Avatar
Well I think it's still the "radius value + 3000". So you have to increase the radius by a fairly large value to notice any impact. And to decrease it you maybe have to make the radius negative? Not sure if that works or causes other problems.
8:20 PM
Also: c++ UProperty* prop = actor->FindProperty(FName("StasisComponent", EFindName::FNAME_Find)); Does that return anything? I don't know that there's a property called "StasisComponent".
8:21 PM
But you can try AActor::GetAllSceneComponents(TArray<USceneComponent*>* OutComponents), then loop over the array to find the stasis component, sort of like in my example.
Avatar
That makes sense. I only tested it with dinos a few foundations away so could very well have overlooked if the range was reduced rather than basically zero.
8:23 PM
It does return the sphere component. It is what the component is called in the devkit
Avatar
The default radius value was only 16, so by default, the hardcoded 3000 in C++ is a bigger factor. (edited)
Avatar
Is 16 still unreal units (so 16 cm?). I'm not that familiar with unreal engine so figured it would be foundations or something.
Avatar
That might be right. I haven't done a whole lot with those units. I think a foundation is 300 across.
Avatar
Avatar
Aikar
only release has worked for me
I’m fairly certain debug doesn’t work because debugging libraries aren’t pulled in automatically
8:30 PM
It could probably be made to work
Avatar
Avatar
TheMollusk
Is that for the actual feeding part or just for the client visuals? I assumed for feeding it was hardcoded here in APrimalDinoCharacter::GetBestInventoryFoodItem(). I could definitely be wrong. Either way I think it's possible to effectively change it somehow with a plugin, but I assume you can't change the client side graphics.
Out of pure interest - how can you tell that the 3000.0 value is added to the range here? Are you looking at the vtables/field offsets or something to make sense of the pseudo c code?
Avatar
Avatar
XANAX
im just tripping on env stuff...its gonna be something silly like a space in a path or something...i just cloned SubstituteR template repo and thats not building unchanged...settings arent coming through so relinking the public api dependancy and adjusting release x64 etc...what a headache, how do you guys live like this
Did you make sure to also clone the sub-modules (edited)
8:31 PM
In the readme is the full clone command
8:31 PM
git clone https://github.com/SubstituteR/ArkServerAPI-Template.git --recursive
Avatar
Avatar
Tobias
Out of pure interest - how can you tell that the 3000.0 value is added to the range here? Are you looking at the vtables/field offsets or something to make sense of the pseudo c code?
Just an educated guess based on IDA's disassembly here: https://discord.com/channels/513432877904691202/513432877904691205/1089328007837139036 I could be wrong. But radius + 3000 basically aligns with what the wiki says about the feeding range being 11 foundations.
Avatar
Here's the stasis component of the FeedingTroughBaseBP in the dev kit.
Avatar
Avatar
TheMollusk
Just an educated guess based on IDA's disassembly here: https://discord.com/channels/513432877904691202/513432877904691205/1089328007837139036 I could be wrong. But radius + 3000 basically aligns with what the wiki says about the feeding range being 11 foundations.
Okay. Yeah that makes a lot of sense when I think about it.
Avatar
Also, the event graph in the dev kit for FeedingTroughBaseBP uses 3000 for the radius of the visual indicator. (edited)
Avatar
It does? Haven't found 3000.0 in the dev kit 🤔
8:40 PM
Oh, it is in the graph.
Avatar
Well now that I'm looking at it again, the 3000 I saw in the event graph is the range for the "Toggle all OFF in area" multi-use option lol
Avatar
There's also one in the Throttled tick > Draw Debug Sphere function 🙂
Avatar
I think the actual circle effect in-game is based on the FeedingTroughBaseBP's EffectField component, which uses a "DinoTroughArea" material, getting outside my dev kit comfort zone now though. (edited)
Avatar
Probably correct. Your code worked to change the area. My code to change already placed troughs did not though.
Avatar
Weird how I can't get the same change to the stasis component to work on a server restart.
Avatar
Okay so AFeedingTroughBaseBP does have a property called "StasisComponent" that points to the stasis component (just because a class has a component doesn't mean you can always get it directly with FindProperty() though). But yeah, when I change the radius the dinos still won't eat from it. So there must be something else going on.
Avatar
I wonder if we have to update the octree in UWorld after setting the new range for the overlap search to find it. (edited)
Avatar
I'm not sure. Maybe time to take a more serious look at the psuedocode and figure out what's actually happening.
Avatar
Avatar
Tobias
I wonder if we have to update the octree in UWorld after setting the new range for the overlap search to find it. (edited)
UpdateComponentToWorld() seems to do the trick when updating existing structure's stasis components. c++ UProperty* stasisCompProp = troughStructure->FindProperty(FName("StasisComponent", EFindName::FNAME_Find)); if (!stasisCompProp) return; USphereComponent* stasisComp = stasisCompProp->Get<USphereComponent*>(troughStructure); if (!stasisComp) return; float currentRadius = *GetNativePointerField<float*>(stasisComp, "USphereComponent.SphereRadius"); Log::GetLog()->info("Original Radius = {}", currentRadius); stasisComp->SetSphereRadius(10000, true); stasisComp->UpdateComponentToWorld(true); currentRadius = *GetNativePointerField<float*>(stasisComp, "USphereComponent.SphereRadius"); Log::GetLog()->info("New Radius = {}", currentRadius);
Avatar
Oh, man, how did you figure that out..? Here I am trying to find out if OverlapMultiInternalOctree can find the component or not 😅
Avatar
Lucky guess pretty much lol. I was looking at APrimalDinoCharacter::GetBestInventoryFoodItem() in IDA, but the assembly and pseudocode for that function is pretty ugly. I got the impression it was using something that had been registered with the dino character, part of some system I didn't want to spend too much time deciphering. We knew it worked if the radius was set in the trough class's template stasis component before placing a trough, so I figured there was something happening in the USphereComponent constructor or some update function. So I glanced through the USphereComponent class functions and the inherited USceneComponent::UpdateComponentToWorld() sounded promising. Tested it and it worked! (edited)
Avatar
Luck or skill 😃 I was trying UWorld::UpdateInternalOctreeTransform after following the assembly to UPrimitiveComponent::OnUpdateTransform but no luck there. Then couldn't tell in the debugger is the octree was indeed the issue so made a command to call it but had to get the structs from unreal source. Then realized I'm probably wasting a lot of time restarting the server each attempt so tried to remember how the plugin reloading was working again.
Avatar
void SpectatorUseItem(int Index) { NativeCall<void, int>(this, "AShooterPlayerController.SpectatorUseItem", Index); }
9:53 AM
Hook this fun : Can I control the items used?
9:58 AM
I looked all over the actor. H. This method is the closest, but it should be triggered when an onlooker uses the item. I want the character to eat raw meat. He is limited to five.
Avatar
is shared tribe xp considered EXPType::SPECIAL or something?
9:26 PM
I am capping KILL/ALPHA KILL and seems the shared exp didnt get included to tribe mates.
Avatar
jraServerAPI 3/28/2023 2:57 AM
Anybody run unofficial servers on here? Are you able to find your servers on Unofficial when you search? None of my clusters are showing up anymore and I don't recall changing anything that would effect that. It seems like it happened this past month or so.
2:58 AM
^ using Steam ARK
Avatar
jraServerAPI 3/28/2023 4:00 AM
I figured it out, it was because I needed to update my SteamCMD
Avatar
Servers showing or not is random
Avatar
anyone where to look for things around mating hitbox size? id like to boost the minimum to improve things like shinehorns etc with small radius to just like make the min radius for any dino 6 or so foundations.
Avatar
There's a Female Mating Range Addition which can increase the range. Not sure if negatives decrease it though.
7:28 PM
And this is the vanilla formula for the mating range if interested on it: if (GetWorld()->OverlapMultiInternalOctree(HitPrimitives, FBoxCenterAndExtent(GetActorLocation(), FVector(0.75f*Mesh->Bounds.SphereRadius + FemaleMatingRangeAddition)), OCTREEGROUP_DINOPAWNS_TAMED)) { // process for viable mates }
7:28 PM
Seems negatives can affect the range
Avatar
nice, and this will hold the vanilla values by default right, so i can just say range = max(minDesired, range);
7:32 PM
though i guess id need to hook where it looks it up, as i wouldnt wanna go change it per dino
Avatar
The range itself is calcualted by: 0.75f*Mesh->Bounds.SphereRadius + FemaleMatingRangeAddition
7:32 PM
So you can just modify it with female mating range addition as you like
7:32 PM
On begin play, for example
Avatar
whats it call to obtain the addition value so i can hook that
Avatar
It's a variable, not a function
7:33 PM
So you can't hook the getter of it
7:33 PM
I would change it on begin play
7:35 PM
And the range check happens every dino tick
Avatar
but isnt this per-dino specific?
7:37 PM
i was considering how each species has its own mating radius
Avatar
Yes, you could change it per dino instance
Avatar
you can modify the base dino bp and everything else will then inherit the new val
Avatar
man was hoping there was like a GetAttribute I could hook and say if key == FemaleMatingRangeAddition, modify value lol
Avatar
hooking BeginPlay would be very close to what you need
7:39 PM
the BeginPlay function is called when an actor spawns on the map
7:39 PM
you can just get the dino pointer and check the value after it was constructed (adding code after original function) (edited)
Avatar
hmm, and so thats on like AActor?
7:42 PM
or i can just hook APrimalDinoCharacter::BeginPlay to pre-filter
Avatar
APrimalDinoCharacter has own beginPlay function
Avatar
so you don't have to filter if it's a dino by yourself
7:43 PM
then just check if it's a female after original
7:43 PM
and check if tamed ofc
7:44 PM
actually if you want to adjust for a specific dino you don't even have to check if tamed
Avatar
Just a tip, I would do a delay execute for 0.2-1s because spawn tamed will spawn it wild and after a small fraction of time actually set the tame up, but it won't be tamed in begin play off the bat
7:44 PM
My experience at least
Avatar
i think hooking the tame function should be a better option in this case
Avatar
lol it re-tames each server start/unpod?
Avatar
I believe so
Avatar
i would have expected to just restore the dino state as it was saved.
Avatar
But it happens in the next frame so you dont notice it being wild firstly
7:46 PM
Been a while since I last did research on that so I don't remember every detail 🙂
Avatar
it is def nice being able to make quality of life improvements to breeding though. got rid of random mutations too lol, so no more random +2 food muts while your trying to breed cleans.
7:47 PM
so it only mutates when using mutator
Avatar
1 sec I'll look up the detail on unpod at least
Avatar
ill roll with that attribute idea when i get done with work
Avatar
Yes, it does spawn wild (uses the UE4 spawn actor function, and that will spawn a wild dino always), and then does the setup tamed
7:52 PM
So you could indeed hook setup tamed for tamed dinos
Avatar
another thing im looking at is an area youve touched on before , the async saving of world, do you use that plugin @Pelayori ? code scares me because doesnt seem thread safe at all. would be much safer to snapshot game state on main and only thread the File IO Portion, which FileIO typically tends to be the real slow part of a games save operation. so i was looking at UWorld::SaveToFile or w/e that method is named and boy that things a beast, but im still not 100% if thats actually the proper disk write method as i see sooooo many blocks that seem to maybe deal with converting the world format? unless thats just handling writing it in older formats when operating on an older world.
Avatar
Do not use it, there was an attempt recently at it again and it just corrupts the save games
7:53 PM
I have plans to tackle something to attempt better saves, but I have no eta
Avatar
well if i can get a better understanding i can assist with this too, this is an area we made great improvements to Minecraft for. keep game state on main and focus on the IO itself.
Avatar
The main saving happens on AShooterGameMode::SaveWorld
Avatar
yeah, thats what i saw, and seems it jumps to SaveToFile for IO portion
7:55 PM
so i was trying to hook SaveToFile to thread that portion but its using a struct FNetFileInfo or something (not at my PC atm) that isnt in ArkAPI
7:55 PM
and couldnt find the struct in the disassembler for it correctly
7:55 PM
lemme jump pc real quick
7:56 PM
TSharedPtr<FWriteFileTaskInfo,0>* Hook_UWorld_SaveToFile(UWorld *world, TSharedPtr<FWriteFileTaskInfo,0> *result, FString *param_1,FString *param_2, TArray<TSubclassOf<AActor>,FDefaultAllocator> *param_3) (edited)
Avatar
FWriteFileTaskInfo this?
Avatar
struct __cppobj FWriteFileTaskInfo { TArray<unsigned char,FDefaultAllocator> FileContent; TArray<unsigned char,FDefaultAllocator> EXTRA_FileContent; TArray<unsigned char,FDefaultAllocator> EXTRA2_FileContent; TArray<unsigned char,FDefaultAllocator> EXTRA3_FileContent; TArray<unsigned char,FDefaultAllocator> EXTRA4_FileContent; TRefCountPtr<FGraphEvent> CompletionHandle; };
7:56 PM
howd you find that 😮
7:57 PM
IDA? lol
Avatar
yeah 😄
Avatar
i was gonna try switching to IDA Free today
7:57 PM
as atm using ghidra
7:57 PM
guess need that FGraphEvent now too
7:58 PM
but yeah i was gonna start with hooking it and verifying that is the method that takes up the most time
Avatar
struct __cppobj __declspec(align(8)) FGraphEvent { TClosableLockFreePointerListUnorderedSingleConsumer<FBaseGraphTask,0> SubsequentList; TArray<TRefCountPtr<FGraphEvent>,TInlineAllocator<4,FDefaultAllocator> > EventsToWaitFor; FThreadSafeCounter ReferenceCount; };
7:58 PM
this?
Avatar
because threading the IO isnt that difficult, just gotta handle closing thread and avoiding concurrent writes, so figure could block on an async write pending for saveWorld too
7:59 PM
yeah boy this is gonna be a chain huh lol
7:59 PM
or is some of this stuff exposable by import
8:01 PM
k so looks like FBaseGraphTask should be last in stack there
8:02 PM
ah no theres more, is any of this in some unreal import?
Avatar
Possibly, but this engine version is very old you'd need to go to the 4.51 engine version source
8:05 PM
struct FBaseGraphTask { void *__vftable /*VFT*/; ENamedThreads::Type ThreadToExecuteOn; FThreadSafeCounter NumberOfPrerequistitesOutstanding; };
8:06 PM
struct FThreadSafeCounter { volatile int Counter; }; (edited)
8:08 PM
You can find TClosableLockFreePointerListUnorderedSingleConsumer in: https://github.com/EpicGames/UnrealEngine/tree/4.5/Engine/Source/Runtime/Core/Public/Containers (edited)
Avatar
that repo seems to be private?
Avatar
You need to join the epic games org to access it
Avatar
Avatar
Pelayori
I have plans to tackle something to attempt better saves, but I have no eta
Most of the saving is just serializing the game
8:15 PM
Player and tribe data can be done first, as those can probably be flat out written to a database
Avatar
really? damn wouldnt of expected that
Avatar
It’s why official has transfer timers
Avatar
well portion of it yeah but memory vs disk io
Avatar
Because the player data and the world data aren’t even close to synced
Avatar
yeah im aware, ive actually had worse spikes lately from xfering in than general world saves
Avatar
So it can only verify that items you picked up aren’t duplicated on crash by forcing you to wait until the game saves the map
8:18 PM
Honestly the only way to improve the saving would be a custom file entirely
8:18 PM
That can do diffs/deltas for the various in game events
Avatar
world isnt regionized at al right, like minecraft has chunks, allows us to incrementally save only 1 chunk at a time, so it spreads it out over time. at worse creates some risk if a chunk rolls back to pre an entity joining it can lose the entity, but with players having their own file, if they moved at least body data to the player file too would avoid risk for bodies
8:25 PM
id also love for players who xfer off to just rename file vs deleting, so you can always least have a copy of the last time they were on said map during a backup, so if they lose char due to crash right as transferring in, can have something to roll back to I currently can grab their data from backup of another server then they just fix tribe, but loses body bag.
Avatar
The game world is a single massive file
8:47 PM
If you migrated user data to a database then the file deletion issue goes away
8:47 PM
I would consider a database layout similar to the WoW database layout that TrinityCore uses
8:47 PM
The server a player is on would be a field on their player entity row
Avatar
yeah could work and db will keep active players in cache
9:45 PM
i do an absolute ton of db queries on my minecraft server and able to keep majority < 10ms
9:46 PM
but I do async the logic as much as possible but when a db result is needed to decide to cancel a game event, cant avoid it there
Avatar
Looks like the UE5 update will be a separate re-release of ARK. Not an update to the current game. At least the the UE5 update won't be breaking existing mods/plugins. https://survivetheark.com/index.php?/articles.html/community-crunch-355-ark-roadmap-evo-event-and-more-r2075/ (edited)
Hey there Survivors! We’re ready to reveal ARK's roadmap for the next year, covering various game-related initiatives, new platforms, and media. The community’s support continues to be incredibly humbling and inspiring for the team, and that enthusiasm helps drive us toward creating the ultimate ...
Avatar
Avatar
TheMollusk
Looks like the UE5 update will be a separate re-release of ARK. Not an update to the current game. At least the the UE5 update won't be breaking existing mods/plugins. https://survivetheark.com/index.php?/articles.html/community-crunch-355-ark-roadmap-evo-event-and-more-r2075/ (edited)
GSH | MrOwlSky 4/1/2023 1:07 AM
I'm excited, We might for the first time be able to do plugins on cross platform such as PSN/XBOX.
1:08 AM
Combining those communities together will bring a massive influence of new players. Very exciting stuff
Avatar
jraServerAPI 4/1/2023 1:24 AM
only If they give us the pdb right? 7243_cat_yawn
Avatar
TheMollusk 4/1/2023 1:24 AM
It'll be interesting to see how the player base splits between the two versions of the game. Crossplay for all platforms with mods will be nice. Having to pay for the new version plus the story DLCs is unfortunate but unsurprising. This is basically the path I was hoping WC would take (separate release) once they made the UE5 plans known. I have a new cluster planned and I'm still leaning towards just launching it on the original game (but personally I also like that the original version won't have any more content updates I have to adjust around). Now to wait and see if the new version ships with pdb. (edited)
Avatar
Avatar
jraServerAPI
only If they give us the pdb right? 7243_cat_yawn
no, game could be dumped another way too
1:25 AM
just like there exist unreal dumpers for any unreal game 😛
Avatar
jraServerAPI 4/1/2023 1:26 AM
pepe_noted
Avatar
I can't believe they made a version that no one asked for just to kill off their old version to milk more money from the players.
1:29 AM
Just my two cents GWcmeisterPeepoShrug
Avatar
TheMollusk 4/1/2023 1:29 AM
Those other dumps aren't quite as nice though (only get what's in the UE reflection system). One significant difference is that it's harder to modify stuff like TArrays (which FStrings are based on) and TMaps that have been allocated by the game engine since the reflection system doesn't expose UE's memory allocator. I haven't looked at the UE5 source code, but on the UE4 Linux version (not Windows though), it was possible to force the server to use system malloc instead of the UE implementation, which made that less of an issue (on Linux).
Avatar
You can make the implementations use the FMemory functions. You just have to assign the addresses of the functions first.
Avatar
no doubt, shipping pdb would be ideal but i just pointed out that the API would work one way or the other anyway
Avatar
TheMollusk 4/1/2023 1:31 AM
Yeah that's what ArkServerApi does using pdb
Avatar
It's no different without PDB. You'll just need good sigs.
1:32 AM
Really not shipping the PDB just slows down reversing. But there are ways to construct "bad" pdbs using UE4s reflection system.
Avatar
GSH | MrOwlSky 4/1/2023 1:34 AM
I'm hopeful they will but only time will tell
Avatar
TheMollusk 4/1/2023 1:41 AM
I haven't personally used signatures to develop plugins (except for detecting global names and objects on Linux using data signatures). Using code signatures seems a little scary to me. But I imagine you could come up with reliable ones as long as WC is using the same build toolchain between updates. I'd think you'd want to use signature detection in ArkServerApi itself and export the address for commonly needed functions rather than in plugins themselves. Then if a sig breaks, you just need to fix ArkServerApi and re-compile rather than fix individual plugins.
Avatar
Yes unless they go changing the tool chain a lot, they will be similar. It's not hard to make patterns that are both unique and update proof. Most likely the best way I can see the API going is if I understand Sub correctly would be instead of having the users all hook what they want. They register stuff that they want to be called either before / after the original call and have that be the interface.
Avatar
i think this could be taken further and sigs could be loaded from a webpage or some other endpoint 🙂
Avatar
TheMollusk 4/1/2023 1:44 AM
Ooh fancy. I like that
Avatar
that's what i did for my league of legends skin changer lol
Avatar
Yeah that or some cfg file that gets loaded per server version.
Avatar
TheMollusk 4/1/2023 1:48 AM
Actually I lied. I have used code signatures (but a little more involved than detecting machine code patterns). On Linux I would detect the VTable offset of ProcessEvent() by disassembling a particular function (found in the reflection system) at runtime and extracting the offset from assembly.
Avatar
Why were you getting the VTable offset
Avatar
TheMollusk 4/1/2023 1:49 AM
Then I could call either UObject::ProcessEvent or AActor::ProcessEvent as appropriate (edited)
Avatar
Ah I supposed you picked that up from the SDKs
Avatar
TheMollusk 4/1/2023 1:50 AM
But finding the address for both would work too
Avatar
ye ^
1:51 AM
Anyways the API can be done for sure. I have some ideas too that I will try when it(the game) comes out. (edited)
Avatar
TheMollusk 4/1/2023 1:53 AM
Well I'm not a huge fan of the existing SDKs, but I learned from them and their generator's source code and then I learned a lot more writing my own generator from the ground up. In my SDKs I use the reflection system at runtime, so I don't have to worry about offsets changing between updates (almost like using pdb).
Avatar
Yeah most people who have a clue do that. SDKs that are public are a hack job for low iq cheaters. (edited)
1:54 AM
If they don't release the PDB I will(hopefully if I have enough time) make rudimentary one for the community.
1:55 AM
And make it work with a Binary Ninja plugin.
1:55 AM
GWcmeisterPeepoShrug
1:55 AM
Since it definitely won't be a "pdb" replacement.
1:55 AM
But you'll have most function addresses and types.
Avatar
TheMollusk 4/1/2023 1:56 AM
I spent a little bit of time reading the UnknownCheats forums. Then I realized most of the people there were just parroting information that they had seen once that didn't apply in most situations lol. And I started basing my work off the UE4 source code and IDA.
Avatar
UnknownCheats is a diamond in the rough forum.
1:56 AM
Anyone who knows most info isn't going to be posting it because they're too busy.
Avatar
TheMollusk 4/1/2023 1:56 AM
Yeah theres some good information there. But you have to sort through a lot of BS
Avatar
I still highly recommend Binary Ninja if you're going to do any type extraction.
1:58 AM
For some reason IDA dies on the templated types unlike Binary Ninja
1:58 AM
And Binary Ninja is multi-threaded so it doesn't take forever to load and it's cheap lol.
1:58 AM
Honestly they should hire me for their marketing team. All I do is sell their stuff blobfeelsevil
1:59 AM
Here's an example:
1:59 AM
Avatar
damn
2:00 AM
that's sick
Avatar
The only thing that sucks is they don't have a fast sig searching tool built in. I was making one but it was in Python and I really needed to use their C++ plugin tools
2:01 AM
IDA's is pretty quick and reliable that's the only thing I've noticed.
2:02 AM
Both still break on Bitfields though...
2:06 AM
https://binary.ninja/ Definitely check them out.
2:06 AM
Did I also mention it works on Linux 🌬
Avatar
substitute 4/1/2023 2:18 AM
@Frigoff I’ll have to at least get a completed x64 version of that system
2:19 AM
Instead of just a prototype
Avatar
Get to working 😠
Avatar
Avatar
Frigoff
If they don't release the PDB I will(hopefully if I have enough time) make rudimentary one for the community.
TheMollusk 4/1/2023 2:34 AM
I've been planning on eventually publishing a robust ArkServerApi-based SDK (sort of a replacement/supplement for the existing ArkServerApi public headers) that includes all classes exposed in the UE reflection system that makes it easy to read/write properties in native and Blueprint-generated classes and to easily hook native/Blueprint functions. But I keep coming up with improvements I want to make on it before making it public. (Just ask @jraServerAPI, I've been talking about it for a few months lol). (edited)
Avatar
Yeah
2:42 AM
That’s the fun part about the
2:42 AM
UE platform
2:43 AM
It’s really nice to work on
2:43 AM
Have you looked at UE5 yet?
Avatar
TheMollusk 4/1/2023 2:50 AM
Not really yet. I have the impression that the plugin-relevant server-side code hasn't changed as much as it did between UE3 and UE4. I could be wrong though.
Avatar
Their reflection system has different types
2:54 AM
That’s about it
Avatar
TheMollusk 4/1/2023 3:07 AM
I'll have to check that out
Avatar
Anyone here tried to put newly hatched or born dinos in cryopods? I've seen the code for cryopodding a tame, but to do the same for a baby dino you have to know when it is born, figure out the most likely owner, possibly claim it etc. So far I know that unclaimed baby dinos do not seem to belong to a particular targeting team. They can be either 1 or 2 for hatched and born respectively and at least 1 is shared with other wild dinos. I previously made a mod that checked baby age == 0.0 in SetBabyAge and delayed processing 250 ms which would allow BeginPlay and other vital functions to complete setup before modifying the dino. Not sure if that is the best approach.
Avatar
jraServerAPI 4/2/2023 5:49 PM
yes, before you cryopod them, you need to claim them. I just claim them via TryMultiUse before I cryo them: dino->TryMultiUse(player_controller, 122);
Avatar
Can't claim with TryMultiUse if the player is not online, right..? I'm kinda stuck and wonder how the dev kit mods do it 🤔
Avatar
If the player is only and you have a tribe id you could change targeting team of dino
6:37 PM
And if you later want to give imprint to player there’s some update imprinting details functions
Avatar
There are a bunch of calls and fields that are set so I'm not sure if changing the targeting team is enough to make it claimed.
Avatar
It is pretty much on baby dinos
Avatar
Turns out you don't even have to set a targeting team. You can pick up unclaimed dinos in a cryopod and everything will be set when they are released.
👍 1
Avatar
ChewbaccaFR 4/3/2023 12:05 AM
Hello, I am looking for a developer or even a plugin that allows me to give rewards or points when a player votes for my server (on the site: top-serveurs.net) My mps are open for any proposition. (it's urgent).
Avatar
any way around dev kit wanting VS 2013?
2:50 AM
to see headers and such
Avatar
Avatar
ChewbaccaFR
Hello, I am looking for a developer or even a plugin that allows me to give rewards or points when a player votes for my server (on the site: top-serveurs.net) My mps are open for any proposition. (it's urgent).
there is a plugin for it already ?
Avatar
Avatar
Natsu
there is a plugin for it already ?
ChewbaccaFR 4/3/2023 9:33 AM
No, no plugin is available for that... That's why I'm looking for a developer to do this for me.
Avatar
Avatar
ChewbaccaFR
No, no plugin is available for that... That's why I'm looking for a developer to do this for me.
Avatar
Avatar
Lethal
Click to see attachment 🖼️
ChewbaccaFR 4/3/2023 1:59 PM
Don't work with top-serveurs.net
Avatar
Sounds like it does since recently doesn't it 🤔
Avatar
ChewbaccaFR 4/3/2023 4:50 PM
Yes, Foppa told me he was on the problem and in discussion with top-serveurs.net to solve the problem and get everything up and running quickly
Avatar
Would it be possible to change the boss difficulty based on tribe members doing the boss fight? i know i could nerf the boss completely by using DinoClassDamageMultipliers=(ClassName="Manticore_Character_BP_Easy_C",Multiplier=0.90) DinoClassResistanceMultipliers=(ClassName="Manticore_Character_BP_Easy_C",Multiplier=0.90) For example.
Avatar
possible sure, should be able to hook spawning of the boss mob, then count how many players are nearby
5:32 PM
then apply some metadata to it, then hook damage/resistance calculations to apply it
5:33 PM
that leads me to a question, if i want to store my own arbitrary key/values on a dino/player, what would I use for that, and it persists restarts right?
5:33 PM
i want to do something like store spawn time of a wild dino, and implement a smarter dino wipe that more aggressively wipes out lower level stuff but lets higher level stuff live longer.
Avatar
Avatar
Aikar
that leads me to a question, if i want to store my own arbitrary key/values on a dino/player, what would I use for that, and it persists restarts right?
substitute 4/4/2023 6:41 PM
Probably custom data tags
Avatar
Avatar
Aikar
possible sure, should be able to hook spawning of the boss mob, then count how many players are nearby
boss is spawned with Hook_UWorld_SpawnActor right or does it use a different hook ?
Avatar
im not the one to ask for that lol
8:53 PM
but thats a logical sounding name
Avatar
what hook would i look for on a player trying to either pick up or press T/E/O w/e to move an item out of a trophy slot on a structure. I want to make it so players can unlock structures but no one can take items out of trophy slot unless they are in same tribe as the structure. (edited)
10:40 PM
i suspect i would need to skip calling original then send a replication to sync the client
Avatar
Moving items is removing them from the source and adding them to destination, there isn't a fancy move item function sadly
10:44 PM
So it can be a bit tricky
Avatar
yeah iwant to cancel the picking up part
10:58 PM
so it never leaves the source inventory at all
10:58 PM
so im hoping all methods at least start with a 'remove item from slot'then what it does with it for the various actions would then vary
Avatar
UPrimalInventoryComponent::RemoveItem is one of the core remove functions
Avatar
does that indicate whos trying to remove it
Avatar
Nope
Avatar
k ill least use that to find refs to find where in the stack players known at
Avatar
Is there a way to built-in way to store things between plugin reloads? I need to store default values to fetch if the plugin is reloaded so that I can rebuild the state.
Avatar
Avatar
Tobias
Is there a way to built-in way to store things between plugin reloads? I need to store default values to fetch if the plugin is reloaded so that I can rebuild the state.
RIO (Александр) 4/5/2023 7:13 PM
Upload it to database maybe? SQLite or MySQL
Avatar
I'm using json right now and it feels a bit clunky. Figured an in-memory state storage of some kind would be a lot better.
Avatar
It depends on what you need to store
7:54 PM
There are not right answers without knowing 🙂
Avatar
Right now, base stat values for different species, so just value types.
Avatar
Json is simple and works good for that, you could use sqlite as well or mysql if you need cluster wide data
Avatar
Yeah. I'll continue with json then 🙂
Avatar
Avatar
Pelayori
It depends on what you need to store
We could probably have a container for arbitrary data storage in the api
11:06 PM
So that a plugin can persist state between loads without having to do stuff like writing to disk
Avatar
Yeah, I am 100% in favour of that
11:08 PM
But if you need cluster wide you'd need mysql or other service either way
11:08 PM
Would be useful for server specific data
Avatar
wouldnt the custom data tags persist if you store info there
1:42 AM
but how do you access these data tags
Avatar
Can someone tell me what a Getter Component is? What is the effect of this mod on the server?
Avatar
Avatar
MoGu
Can someone tell me what a Getter Component is? What is the effect of this mod on the server?
throw hwid in pluginside
Avatar
ok ty so much
Avatar
can you link to wtf you are talking about lol, a getter component sounds like a concept, whats it to do with mods or hwid's?
Avatar
It's a companion mod for Wetbatman's hwid bans system
4:11 PM
It obtains the hwid of the client part, which cannot be obtained by the server
Avatar
Avatar
Aikar
can you link to wtf you are talking about lol, a getter component sounds like a concept, whats it to do with mods or hwid's?
Avatar
Avatar
Aikar
wouldnt the custom data tags persist if you store info there
TheMollusk 4/6/2023 7:57 PM
I think you're referring to the AActor::Tags field when you say "custom data tags"? That's a TArray<FName>, so it's not really suited to storing arbitrary data (plus it's just on AActor classes). Those tags would persist between plugin reloads, but I think not between server restarts.
7:58 PM
If you only care about saving data between plugin reloads (not server restarts) there are other options similar to AActor::Tags that involve calling UE/ARK functions to allocate & store certain types of data. If you really wanted to live dangerously you could probably allocate data on the heap directly from your DLL, save a pointer to it somewhere commonly accessible, and access it again on the next reload (at the very least you'd want to build your DLL in a way that ensures you're using the same copy of the C runtime between reloads: https://learn.microsoft.com/en-us/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries). But that's not a path I think anyone would recommend. Saving to a file/DB as others suggested would be a better choice.
Avatar
so the UE doesnt provide a metadata store....?! how the hell can you call yourself a game engine w/o a metadata store. like mods like ARK Omega, its storing SOMETHING thats persisted to tell 'this is an Omega Meteor Raptor' as it doesnt use unique classes. W/e its storing is what I wanted to also be able to store in same fashion
8:14 PM
as that stuff is also persisted in cryo/soul pods etc
8:14 PM
I did see That TArray<fname> is filled with the :SpyGlass: stuff that Omega adds to integrate with Awesome Spyglass, but didnt see any other data.
Avatar
Does anyone know how im able to get a discord bot to communicate with the ark shop plugin.
Avatar
communicate in what way
8:17 PM
like list whats for sale?
Avatar
Avatar
Aikar
so the UE doesnt provide a metadata store....?! how the hell can you call yourself a game engine w/o a metadata store. like mods like ARK Omega, its storing SOMETHING thats persisted to tell 'this is an Omega Meteor Raptor' as it doesnt use unique classes. W/e its storing is what I wanted to also be able to store in same fashion
Well yeah it has a metadata storage, but you cannot do it from a plugin
8:18 PM
Mods can force a variable from an instance to serialize to save game, but that's a flag we cannot force at runtime I'm pretty sure
8:18 PM
So we need our own stuff
Avatar
where ever those things are registered to serialize, should be able to register our own to that same array?
8:20 PM
does it register a deserialize hook that copies it back to some instance? where are these mod state instances stored?
8:20 PM
on the actor object
Avatar
Mollusk probably has an actual answer
8:20 PM
:p
Avatar
Avatar
Aikar
I did see That TArray<fname> is filled with the :SpyGlass: stuff that Omega adds to integrate with Awesome Spyglass, but didnt see any other data.
TheMollusk 4/6/2023 8:20 PM
So in that particular case, your Omega mod is probably populating the "Tags" field in the dev kit, cooking the mod, and the Tags field gets populated from the static mod assets during initialization, it's not something that's modified at runtime and saved.
Avatar
i did that TagsField array and only saw a single entry in it, but thats all string based
8:22 PM
i suspected maybe it was a custom component
8:23 PM
but i wanna do things like on boss spawn, store its spawn location, make it so boss cant leave that area. but id need to handle server restarts etc to make sure that info is retained. sure could do by DB, but does the game have reliable UUID's for the mobs?
Avatar
Avatar
Pelayori
Mollusk probably has an actual answer
TheMollusk 4/6/2023 8:23 PM
Probably not lol. I haven't looked at the serialization and saving systems too much
Avatar
thats consistent across restarts, and unique
8:24 PM
but then cleanup sucks too, dotn want dead stuff staying in db
8:24 PM
storing in the actor data object is the simplest way
8:24 PM
so when it dies, data is gone
Avatar
I believe the save game flag is computed at compile time to tell the serialization function what to save
8:28 PM
Not sure if you can force enable it at will
Avatar
what is this flag set on
8:29 PM
what struct?
Avatar
On the UProperty would be my guess (edited)
8:32 PM
Since it's an UPROPERTY macro flag
8:33 PM
UPROPERTY(EditAnywhere, SaveGame)
Avatar
Avatar
TheMollusk
I think you're referring to the AActor::Tags field when you say "custom data tags"? That's a TArray<FName>, so it's not really suited to storing arbitrary data (plus it's just on AActor classes). Those tags would persist between plugin reloads, but I think not between server restarts.
substitute 4/6/2023 8:34 PM
That’s not what he’s referring to
Avatar
Would make sense for each property to know wether they should serialize
Avatar
substitute 4/6/2023 8:35 PM
@TheMollusk @Aikar
8:35 PM
This is what I mean by custom data tags
Avatar
That's just for UPrimalItem
Avatar
Avatar
Pelayori
That's just for UPrimalItem
substitute 4/6/2023 8:35 PM
It works for other objects too
8:35 PM
It’s how ascension data is stored on the player
Avatar
ohh so i can look at your plugin for a reference
Avatar
substitute 4/6/2023 8:36 PM
It just isn’t exposed as a native C++ function
Avatar
Avatar
substitute
It’s how ascension data is stored on the player
TheMollusk 4/6/2023 8:36 PM
I think that's stored on the "StartingNote" UPrimalItem
8:36 PM
or implant item, whatever it's called
Avatar
but yeah thats exactly kind of stuff i was looking for, are those maps?
Avatar
That's a struct containing different array types
8:37 PM
Maps are not exposed to bp graphs
Avatar
does dinos have some hidden item if thats case?
8:37 PM
i mean dont you have a key for name of whats stored in there and a value
Avatar
Avatar
TheMollusk
I think that's stored on the "StartingNote" UPrimalItem
substitute 4/6/2023 8:37 PM
It is but I’m fairly certain it exists for Dinos too
Avatar
clearly mod dinos are storing special reqs that then stay preserved in the ball/pod
Avatar
substitute 4/6/2023 8:38 PM
A collection of open source Ark Server API Plugins I have written. - ArkServerPlugins/plugin.h at 00ecb6b05ab32ab1692857ef04d165825e2fd0f4 · SubstituteR/ArkServerPlugins
Avatar
lot of doors open up when you have generic k/v stores on entities(actors)
Avatar
substitute 4/6/2023 8:39 PM
This is how I used it for the specimen implant
Avatar
ive done some crazy stuff in minecraft from the plugin level
Avatar
TheMollusk 4/6/2023 8:40 PM
I wonder when the game is saved, is EVERYTHING in the custom item data saved (including plugin-added stuff)? or just specific entries?
Avatar
substitute 4/6/2023 8:40 PM
Everything should save
8:40 PM
It’s arbitrary key/value data
Avatar
TheMollusk 4/6/2023 8:40 PM
So that could be a nice way to save extra data associated with items at least. There could be something similar for actors/dinos, but I don't know what it is.
Avatar
Yeah anything will save, as with mods you can store anything in there
Avatar
Avatar
TheMollusk
So that could be a nice way to save extra data associated with items at least. There could be something similar for actors/dinos, but I don't know what it is.
substitute 4/6/2023 8:41 PM
I know there is for buffs
Avatar
Too much data will cause client buffer overflow, though
Avatar
substitute 4/6/2023 8:41 PM
The same thing
Avatar
https://github.com/SubstituteR/ArkServerPlugins/blob/00ecb6b05ab32ab1692857ef04d165825e2fd0f4/AutoEndgame/Plugin/plugin.h#L217 so this does gender, steamid, playername, is the indexes reserved for specific stuff? what maps index 0 = gender, 1 = steamid
A collection of open source Ark Server API Plugins I have written. - ArkServerPlugins/plugin.h at 00ecb6b05ab32ab1692857ef04d165825e2fd0f4 · SubstituteR/ArkServerPlugins
Avatar
Avatar
Aikar
https://github.com/SubstituteR/ArkServerPlugins/blob/00ecb6b05ab32ab1692857ef04d165825e2fd0f4/AutoEndgame/Plugin/plugin.h#L217 so this does gender, steamid, playername, is the indexes reserved for specific stuff? what maps index 0 = gender, 1 = steamid
substitute 4/6/2023 8:42 PM
It’s just reverse engineered from what the actual item uses
Avatar
but if we stored something at index 4, then something else also tried to use 4, wed have an issue
8:43 PM
i think storing objects and and using ISA checks or some kind of type check a safer approach
Avatar
substitute 4/6/2023 8:43 PM
Yes, so instead you would use your own key
8:43 PM
For your own data structure
Avatar
well that strings seems to be numerical indexed
8:43 PM
array
Avatar
substitute 4/6/2023 8:43 PM
On the structure yes
8:44 PM
But the structure is retrieved by key
8:44 PM
You have one entire structure per key
Avatar
but doesnt it need to be on "InitData"
Avatar
substitute 4/6/2023 8:44 PM
For the specific thing I am doing, yes
8:44 PM
Because I’m replacing that existing data
Avatar
so your saying register our own property to the UE system
Avatar
substitute 4/6/2023 8:44 PM
You could use whatever name you wanted for custom data
Avatar
I just checked all the SaveGame propreties for APrimalDinoCharacter and there's nothing like that, unless it's on a different place
Avatar
substitute 4/6/2023 8:46 PM
It probably isn’t exposed in C++
8:46 PM
It’s mostly used in BP stuff
8:46 PM
You’ll have to dig around in the devkit to see all the supported classes
Avatar
so in theory could register your own class like a mod does that stores stuff long as format is done right
Avatar
substitute 4/6/2023 8:48 PM
Yes, you could for example use a persistent buff that isn’t shown and does nothing
8:48 PM
Since I’m fairly certain buffs get custom data tags too
8:48 PM
i was thinking maybe it was stored in a buff
8:50 PM
what id like to do is have a serializeable object, with getter/setters like getBoolean(String key) and you ultimately should know what the type is for your key, then have the save/load simply store entire map as a serialized json blob or w/e, but runtime access is standard map based lookups
8:50 PM
so serialization only happens at save/load
Avatar
TheMollusk 4/6/2023 8:50 PM
APrimalBuff has a UPrimalBuffPersistentData* MyBuffPersistentData field
Avatar
oh yeah i was looking up the GetAimedActor stuff last night, i noticed internally the code uses a TWeakRefPtr<A, B, C> format (I may have that class name wrong but you know what i mean) but Api has it as just <A>
8:55 PM
whats up with that
8:56 PM
for like actor field
8:56 PM
on FHitResult
8:56 PM
I was first using the wrong one that uses the FHitResult object so was trying to make that work, but i did find there was an alt one that just returns the actor
Avatar
Avatar
Aikar
whats up with that
TheMollusk 4/6/2023 9:54 PM
TWeakObjectPtr probably? It's used to represent a pointer to an object that could become null (if it's garbage collected). ArkServerApi has a very minimal TWeakObjectPtr implementation. It can be used to call into UE code to attempt to dereference the pointer: c++ template <typename T> struct TWeakObjectPtr { T* Get(bool bEvenIfPendingKill = false) { return NativeCall<T*, bool>(this, "FWeakObjectPtr.Get", bEvenIfPendingKill); } ... } In Unreal Engine, the template class is defined like: c++ template<class T=UObject, class TWeakObjectPtrBase=FWeakObjectPtr, class TUObjectArray=FIndexToObject> struct TWeakObjectPtr : private TWeakObjectPtrBase { ... } If you tried to use ArkServerApi's implementation on a TWeakObjectPtr in the server that doesn't use the default types (TWeakObjectPtrBase=FWeakObjectPtr and TUObjectArray=FIndexToObject), it may not work. But I think those defaults are always used (at least in ARK). (edited)
Avatar
Avatar
TheMollusk
TWeakObjectPtr probably? It's used to represent a pointer to an object that could become null (if it's garbage collected). ArkServerApi has a very minimal TWeakObjectPtr implementation. It can be used to call into UE code to attempt to dereference the pointer: c++ template <typename T> struct TWeakObjectPtr { T* Get(bool bEvenIfPendingKill = false) { return NativeCall<T*, bool>(this, "FWeakObjectPtr.Get", bEvenIfPendingKill); } ... } In Unreal Engine, the template class is defined like: c++ template<class T=UObject, class TWeakObjectPtrBase=FWeakObjectPtr, class TUObjectArray=FIndexToObject> struct TWeakObjectPtr : private TWeakObjectPtrBase { ... } If you tried to use ArkServerApi's implementation on a TWeakObjectPtr in the server that doesn't use the default types (TWeakObjectPtrBase=FWeakObjectPtr and TUObjectArray=FIndexToObject), it may not work. But I think those defaults are always used (at least in ARK). (edited)
It shouldn’t work if the defaults aren’t used
10:00 PM
I’d argue any functionality or expectation of “working” would be undefined behavior
Avatar
well based on the proxy native call, id expect the defaults dont matter for 2nd/3rd since they arent used in the Get() call, but yeah thats part i was questioning, safety of having such a mismatch
Avatar
The ArkServerApi TWeakObjectPtr::Get() is explicitly calling FWeakObjectPtr::Get() (basically it's hardcoded in instead of using a template parameter), so if the FWeakObjectPtr default type wasn't used, it's calling the wrong thing
Avatar
yeah i see that now, makes sense. so the api's TWeak could add multiple Get methods for other common types yeah or could maybe even be TFWeakObjectPtr and use diff names for diff setups.
Avatar
Avatar
Aikar
yeah i see that now, makes sense. so the api's TWeak could add multiple Get methods for other common types yeah or could maybe even be TFWeakObjectPtr and use diff names for diff setups.
substitute 4/7/2023 5:58 PM
You don’t need to add multiple, just need a templated version with defaults for <?,B,C>
Avatar
but would that template work to generate the proper string to NativeCall? (edited)
6:20 PM
i dont know much about the power of templates
6:20 PM
though i know macros can expand to string, i use it in my own hook macros
Avatar
@substitute this syntax FCustomItemData implantData{ .CustomDataName = FName("InitData", EFindName::FNAME_Find) }; is this the same as FCustomItemData implantData; implantData .CustomDataName = FName("InitData", EFindName::FNAME_Find);
Avatar
Avatar
Aikar
@substitute this syntax FCustomItemData implantData{ .CustomDataName = FName("InitData", EFindName::FNAME_Find) }; is this the same as FCustomItemData implantData; implantData .CustomDataName = FName("InitData", EFindName::FNAME_Find);
substitute 4/7/2023 7:33 PM
Yes
Avatar
How can i make a player execute a chat command, notably to run /kit on new character creation.
5:45 PM
unless arkshop default kit isnt gonna spam you dont have kits remaining if i set up that default one, it was giving it to me every spawn vs every char creation so had to stop using that
Avatar
A chat command is essentially a chat message
5:47 PM
So you could use AShooterPlayerController::ServerSendChatMessage_Implementation
Avatar
k, and is there any preferred way to read startup arguments, or is the -serverkey a standard that is already stored somewhere? so i can identify what the server id is
Avatar
It is not an standard
5:50 PM
You can check how is it read in arkshop's source code
Avatar
thanks got it
👍 1
Avatar
huge improvement i can see to the GSH website is to fix redirects for all those old resource urls to try to get them to the correct place. Finding so many old urls that send you to the wrong place has made a lot of the info on the forums give useless links.
Avatar
Avatar
Aikar
huge improvement i can see to the GSH website is to fix redirects for all those old resource urls to try to get them to the correct place. Finding so many old urls that send you to the wrong place has made a lot of the info on the forums give useless links.
GSH | MrOwlSky 4/8/2023 7:38 PM
Any chance you'd be able to help compile a list of the old URLs and put them inside #【🐞】ʀᴇᴘᴏʀᴛ-ᴀ-ʙᴜɢ?
Avatar
err prob not, unless i run into it again in future, but i think the main one is that hook creator, i know when i was reading thread on that i could never find the download
Avatar
Pretty much any arkserverapi.com link doesn't work anymore.
Avatar
GSH | MrOwlSky 4/8/2023 7:40 PM
Where are you finding the old URLs at? Is it ones that were bookmarked on private browser or are you finding them on forum sites / third party sites.
Avatar
on various forum threads to say resource urls
7:41 PM
they all redirect to the api resource download
Avatar
GSH | MrOwlSky 4/8/2023 7:42 PM
When you say forum threads are you talking about threads on the GSH website or other sites like arkforums?
Avatar
GSH | MrOwlSky 4/8/2023 7:51 PM
Little bit context by the way on why the old urls broke during the migration. When we transfered the database from old site to new site it failed to transfer the endpoint URLs so we had to manually update the old URLs in database. The way the domain works is it's a domain that links to a DNS record such as A-Record or CNAME Record. Since the old endpoints don't match up with the current endpoints if I put ArkServerApi.com on the DNS record for IP address instead of a force redirect then it'll still only work with new URLs rather then old endpoints. The other element is I don't know what the old endpoints where for each resource so that'd be tricky to find them.
Avatar
How to get dino in a cryopod item?
Avatar
Avatar
SR
How to get dino in a cryopod item?
It's in the ArkShop source code
Avatar
Avatar
Matisse
It's in the ArkShop source code
I mean not spawning one
11:01 AM
I need getting dino already in existing cryopod
Avatar
Oh mb, can't help you with that unfortunately, still learning how all of this works.
Avatar
Avatar
SR
I need getting dino already in existing cryopod
Do you want to spawn it, or just get its class?
Avatar
Avatar
Pelayori
Do you want to spawn it, or just get its class?
get class
Avatar
There's a function in the cryopod item, I can write some code for it in a few mins
Avatar
Avatar
SR
get class
UClass* FindDinoClass(UPrimalItem* cryopod) { if (!cryopod) return nullptr; if (!cryopod->NameField().ToString().Contains("Cryopod")) return nullptr; struct ReturnParams { FCustomItemData data UClass* returnedClass = nullptr; }; ReturnParams params; UFunction* GetContainedDinoFunction = cryopod->FindFunctionChecked(FName("GetContainedDinoClass", EFindName::FNAME_Add)); if (!GetContainedDinoFunction) return nullptr; cryopod->ProcessEvent(GetContainedDinoFunction, &params); return params.returnedClass; } (edited)
1:07 PM
Something like that would suffice, it's better to use that function rather than the class arrays in the custom item data because the cryopod itself attempts to load the class from string references it has if the class itself is not valid
Avatar
Avatar
Pelayori
UClass* FindDinoClass(UPrimalItem* cryopod) { if (!cryopod) return nullptr; if (!cryopod->NameField().ToString().Contains("Cryopod")) return nullptr; struct ReturnParams { FCustomItemData data UClass* returnedClass = nullptr; }; ReturnParams params; UFunction* GetContainedDinoFunction = cryopod->FindFunctionChecked(FName("GetContainedDinoClass", EFindName::FNAME_Add)); if (!GetContainedDinoFunction) return nullptr; cryopod->ProcessEvent(GetContainedDinoFunction, &params); return params.returnedClass; } (edited)
Thank you
Avatar
Do we know how to check if a wild dino is tamable or not? I know there's a collection of untamable classes in gamemode(..?) but not sure how NPCZoneManager bForceUntameable is transferred to the spawned dinos.
Avatar
There's an APrimalDinoCharacter::bCanBeTamed bitfield value you could try
Avatar
No clue how I did not find that one 😮 Thanks!
Avatar
There's also AShooterGameState::AllowDinoTame and AShooterGameState::AllowDinoClassTame I am not sure if the bitfield on the dino factors in the tame prevention by INI server settings.
Avatar
The dino bitfield bCanBeTamed is probably set from AShooterGameState::AllowDinoTame and AShooterGameState::AllowDinoClassTame. I'm trying to check if dinos in caves are tamable and it returns true for all the high level dinos that are not tamable but where the species can be tamed.
Avatar
APrimalDinoCharacter::bForceDisablingTaming for future reference.
Avatar
Its possible to change this? I couldnt do it with dino->DescriptionNameField() = FString("text ") + dino->DescriptionNameField() + FString(" text");
Avatar
@RMod if you made that change, im sure youll need to trigger a replication to make client see it
Avatar
Descriptive Name is not replicated therefore you cannot use that approach to change the dino name I'm pretty sure
Avatar
Hello, its possible get stats from a dino in cryopod? If so, there easy aproach?
Avatar
Stat values are stored in the floats array of the CustomItemData of the cryopod, if that's what you want
12:22 AM
Stat points are not, you must spawn the dino to check it
Avatar
Any idea to edit it? Thanks
Avatar
There might be some DinoName or similar
1:32 AM
There should be at least 1 replicated field
Avatar
Avatar
Pelayori
Stat values are stored in the floats array of the CustomItemData of the cryopod, if that's what you want
Ty
Avatar
Have anyone here successfully changed the base stats for a dino type? When I change the base stats on the status component default object and rescale the stat the stat changes in game but leads to some weird bugs like passive tames drop to 0 food after being fed once and then starve (even when food was not changed at all).
4:51 PM
Code is basically this c++ std::map<FString, bool> modifiedCreatureTypes; void Hook_UPrimalCharacterStatusComponent_InitializeComponent(UPrimalCharacterStatusComponent* statusComponent) { // ... APrimalCharacter* primalCharacter = static_cast<APrimalCharacter*>(statusComponent->GetPrimalCharacter()); if (primalCharacter == nullptr) return; FString bp = ArkApi::GetApiUtils().GetBlueprint(primalCharacter); if (modifiedCreatureTypes.find(bp) != modifiedCreatureTypes.end()) return; UPrimalCharacterStatusComponent* defaultStatusComponent = static_cast<UPrimalCharacterStatusComponent*>(statusComponent->ClassField()->GetDefaultObject(true)); if (defaultStatusComponent == nullptr) return; // ... // get the base value from the default object float& value = defaultStatusComponent->MaxStatusValuesField()()[EPrimalCharacterStatusValue::Stamina]; // save the base value float baseValue = value; // calculate the compensated base value (if our creature had x more base levels in this stat) float newBaseValue = baseValue * 2; // set the new base value on the default object value = newBaseValue; modifiedCreatureTypes.emplace(bp, true); // ... UPrimalCharacterStatusComponent_InitializeComponent_original(statusComponent); } void Hook_APrimalDinoCharacter_BeginPlay(APrimalDinoCharacter* _this) { APrimalDinoCharacter_BeginPlay_original(_this); // ... UPrimalCharacterStatusComponent* statusComponent = _this->MyCharacterStatusComponentField(); // ... statusComponent->RescaleMaxStat(EPrimalCharacterStatusValue::Stamina, 1.0, true); } (edited)
Avatar
jraServerAPI 4/13/2023 4:53 PM
here is what I found/use: c++ void ModifyDinoBaseStats(APrimalDinoCharacter* dino, AShooterPlayerController* PC, std::vector<int> baseLevelMods) { UPrimalCharacterStatusComponent* status = dino->MyCharacterStatusComponentField(); if (status) { // 0: health // 1: stamina // 2: torpor // 3: oxygen // 4: food // 5: water // 6: temperature // 7: weight // 8: melee damage // 9: movement speed // 10: fortitude // 11: crafting speed // ModifyDinoBaseStats(APrimalDinoCharacter* dino, AShooterPlayerController* PC, std::vector<int> baseLevelMods) // [health, stamina, torpor, oxygen, food, water, temperature, weight, melee damage, movement speed, fortitude, crafting speed] if (baseLevelMods.size() == 12) { auto levelUpPointsAppliedBase = status->NumberOfLevelUpPointsAppliedField()(); auto baseCharacterLevel = 1; for (auto i = 0; i < 12; i++) { auto newBaseLevel = baseLevelMods[i]; if (newBaseLevel < 0) newBaseLevel = 0; else if (newBaseLevel > 255) newBaseLevel = 255; levelUpPointsAppliedBase[i] = newBaseLevel; baseCharacterLevel += newBaseLevel; } status->BaseCharacterLevelField() = baseCharacterLevel; } status->RescaleAllStats(); auto maxStatusValues = status->MaxStatusValuesField()(); auto status_component = reinterpret_cast<UActorComponent*>(status); dino->BPNotifyLevelUp(0); auto func_ClientNotifyLevelUp = dino->FindFunctionChecked( FName("ClientNotifyLevelUp", EFindName::FNAME_Find)); if (func_ClientNotifyLevelUp) dino->ProcessEvent(func_ClientNotifyLevelUp, nullptr); auto func_ClientNotifyLevelUpPC = PC->FindFunctionChecked( FName("ClientNotifyLevelUp", EFindName::FNAME_Find)); if (func_ClientNotifyLevelUpPC) PC->ProcessEvent( func_ClientNotifyLevelUpPC, &TArray<unsigned short>()); status->CharacterUpdatedInventory(true); status->ServerSyncReplicatedValues(); auto baseLevelMaxStatusValues = status->BaseLevelMaxStatusValuesField()(); auto func_NetSyncMaxStatusValues = status_component->FindFunctionChecked( FName("NetSyncMaxStatusValues", EFindName::FNAME_Find)); if (func_NetSyncMaxStatusValues) { TArray<float> aMaxStatusValues, aBaseLevelMaxStatusValues; for (auto i = 0; i < 12; i++) { aMaxStatusValues.Add(maxStatusValues[i]); aBaseLevelMaxStatusValues.Add(baseLevelMaxStatusValues[i]); } TArray<float> Args[] = { aMaxStatusValues, aBaseLevelMaxStatusValues }; status_component->ProcessEvent(func_NetSyncMaxStatusValues, Args); } status->UpdateWeightStat(true); dino->ForceNetUpdate(false, true, false); } } (edited)
Avatar
I'm not looking to change the stat levels on individual creatures but rather the base stats for each dino type (as seen on the devkit for the quetz here).
5:06 PM
When I run float& value = defaultStatusComponent->MaxStatusValuesField()()[EPrimalCharacterStatusValue::Stamina]; and then set value = x; I get the feeding bug with passive dinos.
Avatar
jraServerAPI 4/13/2023 5:13 PM
oops, read that wrong 🙂
5:13 PM
👴 is my excuse
Avatar
Thanks tho 😃
Avatar
Not sure why that doesn't work. I've looked at initialize component and it seems to be correct to do it before
8:18 PM
Have you printed the max status values again after the original call?
8:18 PM
So you are certain they are not being modified again
8:18 PM
Ah, well
8:19 PM
You are modifying the CDO after the instance has been created, which not sure if it's really good
8:19 PM
Theorically it should start working after the 2nd instance has been created
8:20 PM
Reescale takes the values from the CDO, hmm...
Avatar
It works well as far as changing the base stats goes. I have used it for probably a month to scale the base weight/stamina stats on diff 0.2 to be more in line with maxlevel 150 and to undo the flyer nerfs. The weird thing is I get the food issue and I can't figure out why. The short code snippet I posted above plus the setting up the relevant hooks is enough to make all passive tames bug out.
9:08 PM
When I change the values in the CDO I do so knowing that I will call rescale on them later. The CDO changes make the changes persist after APrimalDinoCharacter_BeginPlay on levelups etc. If you skip calling rescale after the CDO changes they won't show up in the game tho.
9:14 PM
I just don't get how changing stamina and weight has any bearing on food. They are not even adjacent in the array :/ Maybe rescale is not safe to call on a wild creature or something.
9:14 PM
But rescale is used in APrimalBuff::Tick and I assume wild creatures can have buffs too.
Avatar
Do you have any idea at what point I could change the values in the CDO to make it propagate correctly to all creatures without calling rescale?
Avatar
How to get item icon as string?
Avatar
is there a default command to send a notification or do i really gotta add my own command to do this by rcon lol
Avatar
you can broadcast a message to a specific player with ServerChatToPlayer i believe
Avatar
I want the ArkApi::GetApiUtils().SendNotification so it pops up the top but NOT broadcast, trying to stop use of broadcast as its super damn annoying it resets mouse cursor to center of screen
2:31 AM
so was gonna turn off ASM's auto save and just do my own
2:32 AM
just surprising me if theres nothing built in to do that support already
Avatar
hmm, looks like notifs are delayed on packet send
6:54 AM
void* Hook_UWorld_SaveToFile(UWorld *_this, void *result, FString *filename, FString *tempFilename, const void *typesToSave) { auto color = FLinearColor(255, 0, 0, 255); ArkApi::GetApiUtils().SendNotificationToAll(color, 1, 5, nullptr, "Server is performing an auto save."); return UWorld_SaveToFile_original(_this, result, filename, tempFilename, typesToSave); is sending it after the save lol
Avatar
this worked: void Hook_AShooterGameMode_SaveWorld(AShooterGameMode *_this, bool forceWaitOnSave) { if (!forceWaitOnSave) { auto color = FLinearColor(255, 0, 0, 255); ArkApi::GetApiUtils().SendNotificationToAll(color, 1, 5, nullptr, "Server is performing a world save."); DELAYEXECUTE([_this]() { AShooterGameMode_SaveWorld_original(_this, false); },0); } else { AShooterGameMode_SaveWorld_original(_this, true); } }
7:13 AM
so itll only delay the async saves
7:14 AM
i was gonna try to disable any ingame saves andh andle it by rcon, but this solves that. ASM has a save that happens on backup that defaults to broadcast and those broadcasts are causing peoples mouse cursor to jump to the middle of screen, so switched it to chat instead then hooking chat to ignore its messages void Hook_UShooterCheatManager_ServerChat(UShooterCheatManager* _this, FString* msg) { if (!msg->Contains("A world save is about to be performed")) { UShooterCheatManager_ServerChat_original(_this, msg); } }
Avatar
I'm trying to get UTexture2D as their string path but when I go ClassField() it just does crash without reason.
9:33 AM
Anything like GetFullName gives "None" as answer. (edited)
9:33 AM
Did someone get UTexture2D as string??
Avatar
Avatar
Aikar
i was gonna try to disable any ingame saves andh andle it by rcon, but this solves that. ASM has a save that happens on backup that defaults to broadcast and those broadcasts are causing peoples mouse cursor to jump to the middle of screen, so switched it to chat instead then hooking chat to ignore its messages void Hook_UShooterCheatManager_ServerChat(UShooterCheatManager* _this, FString* msg) { if (!msg->Contains("A world save is about to be performed")) { UShooterCheatManager_ServerChat_original(_this, msg); } }
if you make the ASM message empty it will disable the broadcast btw
Avatar
Avatar
SR
Did someone get UTexture2D as string??
This is what you mean? // UPrimalItem* item = .... UTexture2D *item_icon = item->GetItemIcon(shooter_pc); FString icon_path; item_icon->GetPathName(item, &icon_path); Log::GetLog()->warn("Path icon: {}", icon_path.ToString()); (edited)
Avatar
🌟 Khadeus 🌟 4/15/2023 4:24 AM
hello help please install ark api in win64 folder then install permission 2.0 plugin in plugin folder besides installing ark shop 3.02 plugin doesn't work.
Avatar
Avatar
Unknown
This is what you mean? // UPrimalItem* item = .... UTexture2D *item_icon = item->GetItemIcon(shooter_pc); FString icon_path; item_icon->GetPathName(item, &icon_path); Log::GetLog()->warn("Path icon: {}", icon_path.ToString()); (edited)
Problem we encountered is the best wildcards items. Our icon is not loaded and it is null. Fix was very simple - block any icon that is null.
Avatar
How to get supply crate spawned and get its inventory right after spawn or before spawn to build one?
10:29 PM
If it is possible through some existing functions and not building something like "get all inventory components in 200 radius"
Avatar
You could hook the begin play of it.
Avatar
Avatar
Frigoff
You could hook the begin play of it.
and... how to check if it is the crate I need?
Avatar
@SR some related code worked with others to get working the other day https://gist.github.com/aikar/93e09c9758b8ebe124b23981aa4ce47d may not be as closely to this but its along those patterns, youd want to hook into loot crates though instead of dinos. https://discord.com/channels/513432877904691202/745040653582336120/1092611367594369135 for related context.
GitHub Gist: instantly share code, notes, and snippets.
8:01 AM
in the context link lot of my earlier snippets wasnt working as i didnt realize i was getting bit by implicit copys of the TArray
8:03 AM
but begin play and copy some of that code - the API has the FSupplyCrateItemSet as blank so im redefining it in the plugin code there then FORCECAST to point it to the local struct instead of the empty API one #define CAST(as, from) reinterpret_cast<as>(from) #define FORCECAST(as, from) *CAST(as*, CAST(void*, &from))
8:04 AM
though this code is targetting modifying the source loot pools, not after its spawned and chosen the items
8:04 AM
so maybe its not what you need unless your desire can be done asmodifying the pool
Avatar
How to upload unicode text to the database?
Avatar
mainly ensure your encoding is supportive of the data, if using utf8 just make sure utf8, preferrably utf8mb4 encoding on the column/table
10:13 PM
utf8mb4 mainly if you want the possibility of storing emojis
10:15 PM
so ugh why the hell does unreal engine store all the buildings in the global object array, is literally every building piece a UObject? or only tickable things? Is there a separate tick list? Starting to really appreciate minecrafts game engine
10:16 PM
MC stores building data as a separate struct on the chunk level, and generic building blocks have no impact on server performance, only 'functional' blocks do, and get registered into a separate block entity tick list, where as npc's and players are in a separate entity tick list.
Avatar
Pretty much everything except structs is an UObject
Avatar
and does the server tick iterate that same global object?
Avatar
I'm not 100% familiar with tick implementation but I believe there's no separate tick lists
Avatar
ok so thats something worth looking into for performance optimization, see if structures doing anything stupid we can skip ticks for
10:19 PM
i was able to make HUGE performance gains in minecraft by implementing smart tick skipping, where some things really just ticked more often than it needed to ,others was no impact to skipping tick due to logic being wall time.
10:20 PM
but i had stuff to trigger immunities so if it was nearby a player, or attacking something, or mating etc, it would be immune to skipping
10:20 PM
skipping 95% of ticks of distant entities was huge benefit
Avatar
Structures don't tick by default
10:23 PM
At least none of the tick functions are implemented nor c++ nor mod side
Avatar
ok so they got an empty tick method or is it skipping it in the loop?
10:23 PM
what about inventory based structures
Avatar
Item containers do tick when handling crafting queue I believe
Avatar
They do
👍 1
Avatar
ive done some more research into saving too @Pelayori and yeah i confirmed it is the serialization thats taking most the time, and not the file io. i even suspect they have some form of async io already as i see stuff about tasks and callbacks, or else they were prepping for it either one. so what im gonna look into doing is either A) cache serializations if nothings changed, stuff like foundations and such, so each save op can reuse the last save if nothings changed B) before it does the iterate global objects calling the method to serialize the object, suspend main, then serialize all of the objects in parallel into a temp FArchive, then resume main and when it calls the serialize, copy it from the temp farchive to the real one.
10:26 PM
are FArchives like zip files or some super special format? how much does order matter
Avatar
Avatar
Aikar
are FArchives like zip files or some super special format? how much does order matter
I'm not sure, so good question lol
Avatar
i question could it go to a parallel processor to build data, then linear processor to write it in the farchive, then when all is done return to main. But if order is important, could do it as a Promise for every uboject and wait until all promises are fulfilled, then write them in same order
10:28 PM
as i want to invoke save every time a player xfers, just lost like 3 more peoples shit today cause they xferred to a server that was shutting down, i guess AFTER the save for the shutdown. so that leads me to my next question:
10:29 PM
any hints on hook points if i want to kill off new connections to the server as well as kill responses to the pings that the server list does? i want to say when the 1 minute countdown is triggered on a pending reboot, make the server invisible to new connections.
10:29 PM
stop responding to pings or accepting new connections
Avatar
You probably can stop accepting new connections with one of the login functions, PreLogin / PostLogin
Avatar
ah yeah and can give the proper reason why
10:31 PM
but prelogin wont trigger until after they disconnect from source server though right, so i prob still want to hide it from the transfer list
Avatar
As far as I can remember PreLogin fires when you click the join button to a server
10:32 PM
That's how they reject connections on officials, at least
Avatar
but if connection fails to that server, are you still on source server, or sent to title screen
Avatar
Probably title screen
10:33 PM
Although never tested that scenario
Avatar
in mc i had to deal with this situation cause the cross server change code we had would try to wait until you get a successsful connection first but that caused me chaos in enforcing unique sessions
Avatar
some things ive learned, AActor::tick isnt called much really, maybe once on render/exit stasis? There is a "Tickable" list that is iterated, but there is the global object array that is iterated too - however that global array only ticks segments per tick, to divide it over multiple ticks. It seems the primry ticking though comes from actors registering components with a TickTaskFunction Actually had an interesting stack print to logs as a player got d/c'd and died but it didnt crash server, just logged:
6:29 AM
but this was interesting to see a lower hook point for cancelling attacks:
6:30 AM
as im looking into if i can avoid dinos being killed too early for like ARK Omega it takes a moment for dino to be 'upgraded' seeing if i can intercept low enough to give it immunity until its proper stats are in place.
Avatar
Anyone have code to rotate, lower and raise structures that are placed in the world?
Avatar
Tried modifying the rootcomponent location and rotation?
9:46 PM
I had some issues doing any of rotation/teleport of structures
Avatar
Haven't tried it myself yet but I'm going to. Though I would ask first as it seems like something people might have already done and figured out.
Avatar
Is the issue that is wont replicate on the client?
Avatar
Whats the hook for claim a dino?
Avatar
jraServerAPI 4/21/2023 6:41 PM
APrimalDinoCharacter_TryMultiUse
Avatar
so from research looks like FEngineLoop::Exit is best hook for shutting down yeah?
4:01 AM
or are plugins unloaded before shutdown
Avatar
DECLARE_HOOK(FWindowsPlatformMisc_RequestExit, void, bool);
Avatar
thats just the request, doesnt really time best to when the loop is actually stopping
Avatar
I am trying to figure out the BabyChanceOfTwinsField, the default is 0.02, setting it to 1 does not make always make twins
4:56 AM
does anyone have any info on how to always make twins ?
Avatar
Added a thread, and im joining it in plugin unload (I am using extern C Plugin_Unload() and not the DLL hooks), shutting it down in plugin unload, and i am getting the unloaded log line, but getting file in use by another process on reloads now.. The load was me manually deleting the file and renaming ArkApi to just .dll and loading it, but def want the automatic reload every time i copy the .ArkApi in, was working fine before. Did i miss something to shut it down? the SafeQueue does void shutdown() { _shutdown = true; c.notify_one(); } SafeQueue<std::function<void()>> taskQueue; volatile bool isShuttingDownTaskQueue = false; void taskThreadRun() { while (!isShuttingDownTaskQueue) { try { auto task = taskQueue.dequeue(); if (task) task(); } catch (std::exception& e) { LOG->error("Error Task: " + std::string(e.what())); } } } std::thread taskThread(taskThreadRun); void shutdownTaskQueue() { if (!isShuttingDownTaskQueue) { isShuttingDownTaskQueue = true; taskQueue.shutdown(); taskThread.join(); LOG->info("Task Queue Shutdown"); } } void addThreadTask(std::function<void()> task) { if (isShuttingDownTaskQueue) { try { task(); } catch (std::exception& e) { LOG->error("Error Task: " + std::string(e.what())); } } else { taskQueue.enqueue(task); } }
7:19 AM
so the file handle is getting released ,but seems like its a small delay breaking auto reload?
Avatar
Avatar
Uaca
does anyone have any info on how to always make twins ?
Are you setting it on the default object?
1:02 PM
hosting servers would be way easier and nicer using this
Avatar
Avatar
Tobias
Are you setting it on the default object?
I am setting on the do mate hook, on both creatures. What is the default object?
Avatar
You have to do something like this before DoMate is called. c++ TSubclassOf<APrimalDinoCharacter> EggDinoClassToSpawn; // this is from the DoMate arguments APrimalDinoCharacter* defaultObject = static_cast<APrimalDinoCharacter*>(EggDinoClassToSpawn.uClass->GetDefaultObject(true)); defaultObject->BabyChanceOfTwinsField() = 1.0; defaultObject->BabyChanceOfTripletsField() = 0.0; (edited)
Avatar
99% sure this isn't going to happen Linux version doesn't get a PDB released I have no reason to believe WC will do it any different for 1.5 (edited)
Avatar
Avatar
Aikar
Added a thread, and im joining it in plugin unload (I am using extern C Plugin_Unload() and not the DLL hooks), shutting it down in plugin unload, and i am getting the unloaded log line, but getting file in use by another process on reloads now.. The load was me manually deleting the file and renaming ArkApi to just .dll and loading it, but def want the automatic reload every time i copy the .ArkApi in, was working fine before. Did i miss something to shut it down? the SafeQueue does void shutdown() { _shutdown = true; c.notify_one(); } SafeQueue<std::function<void()>> taskQueue; volatile bool isShuttingDownTaskQueue = false; void taskThreadRun() { while (!isShuttingDownTaskQueue) { try { auto task = taskQueue.dequeue(); if (task) task(); } catch (std::exception& e) { LOG->error("Error Task: " + std::string(e.what())); } } } std::thread taskThread(taskThreadRun); void shutdownTaskQueue() { if (!isShuttingDownTaskQueue) { isShuttingDownTaskQueue = true; taskQueue.shutdown(); taskThread.join(); LOG->info("Task Queue Shutdown"); } } void addThreadTask(std::function<void()> task) { if (isShuttingDownTaskQueue) { try { task(); } catch (std::exception& e) { LOG->error("Error Task: " + std::string(e.what())); } } else { taskQueue.enqueue(task); } }
I think unless your plugin can be immediately available for the API to overwrite the DLL this happens. I don't think the reload process is waiting for confirmation the unload was finished before it continues. (edited)
Avatar
It's supposed to though isn't it, that's main reason it's recommended to use the export over the dll method isn't it
Avatar
You can add in some console output in the api's pluginmanager code and your plugin's plugin_unload to determine where the issue might be happening to be sure.
Avatar
In your VS Solution what do you have defined here?
8:23 PM
I noticed that the API calls the plugin_unload as __fastcall and c++ standard convention is __cdecl and if you don't set your export explicitly to __fastcall as the API is calling it I believe you can have unknown behavior.
8:23 PM
8:28 PM
I believe this is technically what should be what is defined in our plugins to match the calling convention the API is using. extern "C" __declspec(dllexport) void __fastcall Plugin_Unload() { // Stop threads here }
8:30 PM
Not including __fastcall is going to default to the project defined setting which is __cdecl by default I believe.
Avatar
Avatar
Lethal
I noticed that the API calls the plugin_unload as __fastcall and c++ standard convention is __cdecl and if you don't set your export explicitly to __fastcall as the API is calling it I believe you can have unknown behavior.
It’s undefined behavior to call by incorrect convention
11:00 PM
Though it usually results in a corrupted stack
Avatar
So, you are confirming I didn't state anything wrong 🙂
11:09 PM
Not sure if it is the cause of the issue he is seeing but could be related possibly.
Avatar
yeah mine is extern "C" __declspec(dllexport) void Plugin_Unload() { So adding fastcall there could fix it?
1:06 AM
for both right
Avatar
Not sure what you mean by "for both"?
Avatar
load too
1:10 AM
or Init i mean
1:14 AM
as for calling convention I have: if(MSVC) target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Release>: /Ot > /permissive-; /Oi; /sdl; /Gy; /W3; ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; ${DEFAULT_CXX_EXCEPTION_HANDLING}; /Y- ) so i assume thats default for cdecl
1:14 AM
as i dont have any of the other flags
Avatar
I didn't look for the init calling convention but its probably __fastcall also.
1:23 AM
cdecl is the default so assuming since its not listed as being changed it is cdecl
1:23 AM
i'm not familiar with the toolset you are using so can't really answer that for sure
Avatar
changing to fastcall didnt fix that issue
1:27 AM
its actually now seeming to crash process on reload
Avatar
ok lesson learned, do not hook UWorld::Tick, that was causing the crashes.
3:37 AM
im guessing the reload operation occurs inside of uworldtick, so the ptrs getting changed during the tick causes chaos (edited)
3:37 AM
i saw there is an AddOnTickCallback and using that now
3:38 AM
hooking it didnt seem to work right anyways,
3:39 AM
disabled thread pool use, NOT using __fastcall on unload, and no uworldhook im back to reliable reloads, so gonna test 1 thing at a time, fastcall first.
3:41 AM
IMO API should special detect uworld_tick hook and refuse/error
Avatar
I don't imagine the hook is the issue. And rather what you might be doing in your hook.
3:54 AM
Also instead of using a volatile bool
3:54 AM
I would suggest std::atomic_bool
Avatar
nah def not that, auto now = timestamp(); if (now - lastTickStatus > 15) { lastTickStatus = now; writeFile("tick.txt", STR(now)); } works fine as a tick callback it makes total sense that if the state of the uworld tick detours change while in middle of executing it, things can get funky
3:54 AM
yeah i was gonna look into what atomic options was avail here
3:54 AM
though i doubt it matters here since itll only be 1 write operation ever
3:57 AM
but getting rid of uworldtick def solved crash issues.
3:58 AM
think of it like this, if something else hooks uworldtick after my plugin, their _original points to mine, but if my plugin now reloads, i unhook, when the stack unwinds back to the previous plugins, and they try to call _original() which should be my plugin, my plugins now gone, and boom
Avatar
Well yeah you'd definitely not want to be double hooking a function then you would need to worry about order.
Avatar
i think its more so the fact the API itself hooks it, but yeah if plugins also hooks it. i think that one is just potentially risky for reloads since the reload behavior occurs inside of the tick, is at least my best guess. its def very unstable to reload with that hook, soon as i got rid of it, golden
Avatar
Avatar
Lethal
cdecl is the default so assuming since its not listed as being changed it is cdecl
I think cdecl might decay to fastcall on x64
4:51 AM
You’d have to double check
4:52 AM
Afaik basically everything in x64 is fastcall
4:53 AM
Calling conventions are a much larger deal in x32 land
Avatar
Avatar
substitute
I think cdecl might decay to fastcall on x64
https://learn.microsoft.com/en-us/cpp/cpp/cdecl?view=msvc-170
On ARM and x64 processors, __cdecl is accepted but typically ignored by the compiler. By convention on ARM and x64, arguments are passed in registers when possible, and subsequent arguments are passed on the stack. In x64 code, use __cdecl to override the /Gv compiler option and use the default x64 calling convention.
(edited)
Avatar
yeah the decl stuff didnt have any impact, all my issues appear were due to the uworld tick hook, thread pool shuts down fine and reloads now
Avatar
ok so code appears to be working now, im shocked this wasnt a 5 min stack overflow example or built into stdlib man lol, this is like childs play stuff in java. am i missing anything / anything stand out of concern with the shared ptr stuff? never done this stuff yet. https://gist.github.com/aikar/df289a7ab1e3cb0425c89dacbe3bf082
GitHub Gist: instantly share code, notes, and snippets.
Avatar
Avatar
Aikar
ok so code appears to be working now, im shocked this wasnt a 5 min stack overflow example or built into stdlib man lol, this is like childs play stuff in java. am i missing anything / anything stand out of concern with the shared ptr stuff? never done this stuff yet. https://gist.github.com/aikar/df289a7ab1e3cb0425c89dacbe3bf082
Hi
8:24 AM
You can improve performance of this function by reserving the space in the vector prior to emplacement
8:24 AM
This avoids > 1 reallocations if a reallocation is required
8:26 AM
I would avoid the while(true) and instead use https://gist.github.com/aikar/df289a7ab1e3cb0425c89dacbe3bf082#file-threadtaskqueue-cpp-L54 as your conditional
GitHub Gist: instantly share code, notes, and snippets.
8:27 AM
You can do a && in a while
8:27 AM
So you can check those two conditions
8:28 AM
This lock is immediately released on exception (it may never even be locked if that’s where the exception occurred) (edited)
8:29 AM
If that’s intended then that’s fine, just wanted to give you a heads up
8:29 AM
A lock_guard is released when it goes out of scope
8:29 AM
So for example at
8:30 AM
The mutex is unlocked
8:30 AM
(I’m on my phone btw, trying my best to read it)
Avatar
I also foresee a potential deadlock
8:45 AM
void ThreadTaskQueue::run() { std::string threadId = getThreadId(); do { try { std::shared_ptr<ThreadTask> task; { std::unique_lock<std::mutex> lock(mutex); if(queue.empty()) { signal.wait(lock); } task = queue.front(); queue.pop(); } task->operator()(); } catch (std::exception& e) { Log::GetLog()->error(getThreadId() + " Error Task run: " + std::string(e.what())); } } while (!isShuttingDownTaskQueue); }
8:45 AM
Oh my phone but that should achieve the same results
8:46 AM
Once the signal is notified we can assume that there is at least 1 queued task
8:46 AM
Per your current implementation
8:47 AM
The real concern I have is enqueue tries to get the mutex
8:47 AM
This function can lock it, and then indefinitely wait for the signal
8:47 AM
So I don’t see how enqueue is supposed to acquire the lock and notify
8:50 AM
I also don’t like how enqueue executes immediate if the queue is shutting down
8:50 AM
It moves the last enqueued task to the front of the queue
8:51 AM
I would add it to the end of the queue, break the loop and execute a flush_queue() function to run everything in order while disallowing new entries
Avatar
Avatar
substitute
I would add it to the end of the queue, break the loop and execute a flush_queue() function to run everything in order while disallowing new entries
You can do this via the mutex so that the next enqueue is stuck waiting
Avatar
Anyone here know why engrams show in most structures but not in the cooking pot, and if we can fix that?
Avatar
jraServerAPI 4/24/2023 2:29 PM
the engrams are there, just hidden, you need to unhide them
Avatar
How do you do that? Haven't worked with engrams before.
2:40 PM
I can see they exist under DefaultInventoryItems
2:41 PM
Oh, maybe bHideDefaultInventoryItemsFromDisplay. I'll test.
👍 1
Avatar
Avatar
Tobias
You have to do something like this before DoMate is called. c++ TSubclassOf<APrimalDinoCharacter> EggDinoClassToSpawn; // this is from the DoMate arguments APrimalDinoCharacter* defaultObject = static_cast<APrimalDinoCharacter*>(EggDinoClassToSpawn.uClass->GetDefaultObject(true)); defaultObject->BabyChanceOfTwinsField() = 1.0; defaultObject->BabyChanceOfTripletsField() = 0.0; (edited)
It worked, thanks!
Avatar
I've noticed that permissions plugin spams this... Anyone knows how to fix it?
Avatar
@substitute the while true was so it can flush the task queue during shutdown still, and the boolean will avoid adding more to the queue. so soon as the queue is flushed, all the threads should exit. the lock is intentionally scoped where I added the { } so were only locking during manipulating the queue object but not during task execution (though the enqueue during a shutdown state does currently execute during the lock) But regarding your concern over the lock during empty check, c.wait() releases the lock, waiting to be notified, then re-acquires the lock once woken up. this similar concept is done in java too, and i found this logic on an SO for thread safe queues and someone brought up that same concern but it was explained that it is not a concern due to how .wait() works. But yeah tldr my main goal is only lock during push/pop/empty of the queue itself as well as to send notifies (As if it works like java does, you need to be locked to properly notify)
Avatar
defaultObject->BabyChanceOfTwinsField() = 1 works, defaultObject->RandomMutationChanceField() = 1 does not. Is there something I am missing here?
Avatar
Avatar
Uaca
defaultObject->BabyChanceOfTwinsField() = 1 works, defaultObject->RandomMutationChanceField() = 1 does not. Is there something I am missing here?
You basically have to look at the decompiled code to know what values are used. In the case with random mutations you have to change it on this in DoMate_Implementation(APrimalDinoCharacter *this
4:55 PM
Or you could change it to the values you want when the creatures are first created rather than in the DoMate hook.
4:59 PM
@jraServerAPI Have you been able to change existing structures, or only newly placed?
Avatar
jraServerAPI 4/24/2023 5:10 PM
yes you can change existing structures to show the hidden engrams, i assume that is what you are talking about
Avatar
Avatar
jraServerAPI
yes you can change existing structures to show the hidden engrams, i assume that is what you are talking about
Yeah. Nothing happens when I change already placed cooking pots but placing new ones work fine. Is there something you have to call to get it to update after changing the setting to show the hidden engrams?
Avatar
Avatar
Tobias
Yeah. Nothing happens when I change already placed cooking pots but placing new ones work fine. Is there something you have to call to get it to update after changing the setting to show the hidden engrams?
jraServerAPI 4/24/2023 5:40 PM
"placing new ones work fine" - Q: when you restart your server are they still there?
Avatar
Avatar
substitute
I also don’t like how enqueue executes immediate if the queue is shutting down
well this queue is not designed for guaranteed execution order, since multiple threads polling will result in undefined order. its designed for "run this task off main thread" and any sort of defined execution order will be controlled through the next framework class ill build. but yeah i was considering the idea of aborting the threads faster and then flush queue after the threads join, but that would be slower to flush the queue as itll go single thread at that time so dont see real need. and i want the queue state and exit the while loop checks to be done in the lock but execution out of the lock is also why i did the do while true.
Avatar
Avatar
jraServerAPI
here is what I found/use: c++ void ModifyDinoBaseStats(APrimalDinoCharacter* dino, AShooterPlayerController* PC, std::vector<int> baseLevelMods) { UPrimalCharacterStatusComponent* status = dino->MyCharacterStatusComponentField(); if (status) { // 0: health // 1: stamina // 2: torpor // 3: oxygen // 4: food // 5: water // 6: temperature // 7: weight // 8: melee damage // 9: movement speed // 10: fortitude // 11: crafting speed // ModifyDinoBaseStats(APrimalDinoCharacter* dino, AShooterPlayerController* PC, std::vector<int> baseLevelMods) // [health, stamina, torpor, oxygen, food, water, temperature, weight, melee damage, movement speed, fortitude, crafting speed] if (baseLevelMods.size() == 12) { auto levelUpPointsAppliedBase = status->NumberOfLevelUpPointsAppliedField()(); auto baseCharacterLevel = 1; for (auto i = 0; i < 12; i++) { auto newBaseLevel = baseLevelMods[i]; if (newBaseLevel < 0) newBaseLevel = 0; else if (newBaseLevel > 255) newBaseLevel = 255; levelUpPointsAppliedBase[i] = newBaseLevel; baseCharacterLevel += newBaseLevel; } status->BaseCharacterLevelField() = baseCharacterLevel; } status->RescaleAllStats(); auto maxStatusValues = status->MaxStatusValuesField()(); auto status_component = reinterpret_cast<UActorComponent*>(status); dino->BPNotifyLevelUp(0); auto func_ClientNotifyLevelUp = dino->FindFunctionChecked( FName("ClientNotifyLevelUp", EFindName::FNAME_Find)); if (func_ClientNotifyLevelUp) dino->ProcessEvent(func_ClientNotifyLevelUp, nullptr); auto func_ClientNotifyLevelUpPC = PC->FindFunctionChecked( FName("ClientNotifyLevelUp", EFindName::FNAME_Find)); if (func_ClientNotifyLevelUpPC) PC->ProcessEvent( func_ClientNotifyLevelUpPC, &TArray<unsigned short>()); status->CharacterUpdatedInventory(true); status->ServerSyncReplicatedValues(); auto baseLevelMaxStatusValues = status->BaseLevelMaxStatusValuesField()(); auto func_NetSyncMaxStatusValues = status_component->FindFunctionChecked( FName("NetSyncMaxStatusValues", EFindName::FNAME_Find)); if (func_NetSyncMaxStatusValues) { TArray<float> aMaxStatusValues, aBaseLevelMaxStatusValues; for (auto i = 0; i < 12; i++) { aMaxStatusValues.Add(maxStatusValues[i]); aBaseLevelMaxStatusValues.Add(baseLevelMaxStatusValues[i]); } TArray<float> Args[] = { aMaxStatusValues, aBaseLevelMaxStatusValues }; status_component->ProcessEvent(func_NetSyncMaxStatusValues, Args); } status->UpdateWeightStat(true); dino->ForceNetUpdate(false, true, false); } } (edited)
Would this also work for a boss dino without a valid AShooterPlayerController?
Avatar
Avatar
jraServerAPI
"placing new ones work fine" - Q: when you restart your server are they still there?
Yes, when I restart the server they still show the hidden engrams. And they keep showing the hidden engrams even if I remove the plugin. This is the code I use: c++ void Hook_APrimalStructure_BeginPlay(APrimalStructure* _this) { APrimalStructure_BeginPlay_original(_this); if (_this->IsA(APrimalStructureItemContainer::StaticClass())) { APrimalStructureItemContainer* itemContainer = static_cast<APrimalStructureItemContainer*>(_this); UPrimalInventoryComponent* invComponent = itemContainer->MyInventoryComponentField(); if (invComponent != nullptr) { static UBlueprintGeneratedClass* cookingPotBaseClass = (UBlueprintGeneratedClass*)Globals::FindClass("BlueprintGeneratedClass /Game/PrimalEarth/Structures/CookingPot.CookingPot_C"); //FString bp = ArkApi::GetApiUtils().GetBlueprint(_this); //if (bp.Contains("/Game/PrimalEarth/Structures/CookingPot.CookingPot") == true) if (cookingPotBaseClass != nullptr && actor->IsA(cookingPotBaseClass)) { invComponent->bHideDefaultInventoryItemsFromDisplay() = false; } } } }
Avatar
jraServerAPI 4/24/2023 5:59 PM
oh, you are not looping through the engrams?
5:59 PM
UPrimalItem::bHideFromInventoryDisplay().Set(false); (edited)
5:59 PM
i thought you were (edited)
6:00 PM
try setting each engram property too/instead (edited)
Avatar
When I place a new cooking pot the hidden engrams show up. When I restart the server the code is executed for all cooking pots that are loaded from the save, but it has no effect and the only cooking pots that show hidden engrams are the ones that already did. I also put the same code in a command and run it when I am connected but it will not update the previously placed cooking pots.
6:02 PM
What engram property? DefaultInventoryItems?
Avatar
jraServerAPI 4/24/2023 6:02 PM
UPrimalItem::bHideFromInventoryDisplay()
6:04 PM
you could also try setting: UPrimalInventoryComponent::bForceInventoryBlueprints UPrimalInventoryComponent::bForceInventoryNonRemovable
Avatar
Both of those are set to true in the devkit already. Looped the engrams and set bHideFromInventoryDisplay to false and didn't work either. 😞 Pretty weird that changing existing structures have no effect at all.
6:23 PM
Setting other properties like MaxInventoryItems works on existing structures so I guess there is some behind the scenes type setup on engrams that I am missing when bHideDefaultInventoryItemsFromDisplay is not set when the structures are created and placed in the world.
Avatar
Avatar
substitute
It moves the last enqueued task to the front of the queue
also on this note, with how i will use it, requests would prob for most part be on main thread, which main thread is where the queue will shutdown too, so in my specific scenario, the only time the 'execute immediately on enqueue during a shutdown queue' is if I ran any more shutdown logic during Plugin unload/ Platform exit. Notably I am hooking ExitLoop so I can shutdown the task queue too so it cleanly shuts down on game closing, since it doesnt seem like plugins unload on exit so they arent really given opportunity to hold up the shutdown? unless im just missing the unloads due to window closing too fast?
6:25 PM
but i pretty much wont be running anything more after it shuts down, just kind of a safety net
6:26 PM
at the moment doing file writes on the thread pool, then will do SQL queries too. hopefully get all this to a good framework state to get some of yall using this too and get some of these damn queries off main lol. (edited)
6:27 PM
but sadly will always be some scenarios it cant be avoided
6:27 PM
i need to profile the queries here when i get mysql integration going as im so use to linux im scared how bad is windows gonna be
6:28 PM
if i get me another box with this host for non ark stuff might move db over to it
6:29 PM
on my minecraft servers I get queries in the 1-10ms range for many of them
Avatar
Avatar
Aikar
but i pretty much wont be running anything more after it shuts down, just kind of a safety net
If you don’t expect to run tasks after queue shutdown
6:29 PM
I would make enqueue throw an exception
Avatar
i could yeah, its question of do you want it a fixed usecase or a "Try your best to run this async, but in the end, i want this task ran" use
6:30 PM
the current design ensures its executed, and TRIES to make it safely async
Avatar
Yes but it isn’t enqueued
6:30 PM
So the behavior isn’t honest to the function name
6:30 PM
It’s a side effect
Avatar
i guess, thats more suggesting rename function to tryAsyncTask or something
6:32 PM
tryAsyncFallbackSyncJustRunTheDamnThing()
6:32 PM
I will be rebuilding something along these lines in c++: https://github.com/aikar/TaskChain/wiki/Usage
TaskChain Control Flow framework. Helps facilitate running tasks on an application's "Main Thread" (such as a game), and tasks off the main (async). - aikar/TaskChain
6:33 PM
this library of mine was SUPER powerful for doing complex execution chains where you switch context between async and game thread multiple times for the execution pipeline
6:33 PM
made things really nice and clean to get safe operations implemented
Avatar
Avatar
Aikar
i guess, thats more suggesting rename function to tryAsyncTask or something
shrug
6:34 PM
I really dislike functions with unexpected behavior
Avatar
expected behavior = this task will run eventually, no guarantee on when
Avatar
Avatar
Aikar
I will be rebuilding something along these lines in c++: https://github.com/aikar/TaskChain/wiki/Usage
Wow Java as a language blows
😆 1
Avatar
Avatar
Aikar
expected behavior = this task will run eventually, no guarantee on when
I would argue that’s not true at all
Avatar
how so? java is pretty great to work in
Avatar
You’re using a FIFO queue (edited)
6:35 PM
Order should be maintained
6:35 PM
I would never expect the state of a boolean to move last in to first out
Avatar
you can not guarantee order with multiple threads
Avatar
Yes you can
Avatar
2nd task can finish before 1st task finishes, then pulls third task, which finishes before first
Avatar
Time to finish isn’t the same as time to begin executing
6:37 PM
If you need multiple tasks to wait for the previous to finish, then you want single threading
6:37 PM
Or some form of semaphore to pause the dependent threads until the others are done
6:37 PM
Which is just single threading with extra steps
Avatar
well currently order will still be maintained, UNLESS another thread calls enqueue while main thread is in the middle of the shutdown, thats only way I can see out of order executions.
6:40 PM
as while its in the middle of shutdown, the boolean has been flipped, so enqueue will start self-invocating, but the queue may not be empty yet
Avatar
Avatar
Aikar
well currently order will still be maintained, UNLESS another thread calls enqueue while main thread is in the middle of the shutdown, thats only way I can see out of order executions.
Anything that can have side effect will have side effects
Avatar
but FYI this is the same behavior as one of the most popular executors in java. https://www.baeldung.com/java-rejectedexecutionhandler#2-caller-runs-policy
Learn about what happens when a thread pool can't accept any more tasks and how to control this by applying saturation policies
Avatar
Avatar
Aikar
but FYI this is the same behavior as one of the most popular executors in java. https://www.baeldung.com/java-rejectedexecutionhandler#2-caller-runs-policy
Yes and Java is a mess
Avatar
i guess benefit here is the executor lets user define behavior
Avatar
Still can’t new up an array of a generic type without an Object cast
6:44 PM
Btw I’m nitpicking because I want to force you to approach it differently to see if there’s anywhere you could improve
6:44 PM
It probably works fine in 95% of cases
6:44 PM
And the other 5% could be blamed on user error
Avatar
i think letting caller decide on rejection policy is reasonable
6:46 PM
depends on how important your task is, can return bool and bool executeOnRejection = true as param, then if you pass false to the param, method can return false (vs exception) if it ignores the task.
6:47 PM
but main thing i was questioning is memory safety, thats part im totally new at, is the make_shared the correct way to handle the std::function ref so nothing mem leaks here?
Avatar
jraServerAPI 4/24/2023 6:47 PM
I remember back in '98, my first programming job, we spent days just trying to get Java IDE to work.. it was a painful experience.. but we did it pepeold
Avatar
before I added that make_shared, everything failed with invalid function refs
Avatar
Avatar
Aikar
depends on how important your task is, can return bool and bool executeOnRejection = true as param, then if you pass false to the param, method can return false (vs exception) if it ignores the task.
I have something that may shock you
Avatar
as i guess the std::function got cleaned up, but thankfully it didnt crash lol.
Avatar
@jraServerAPI yeah well java has came a long ways since then lol.
Avatar
Might have the same utility
Avatar
ah shit cpp has coroutines?
Avatar
wait arent we not on c++20
Avatar
We are on C++20
Avatar
ah cool some reason i thought we was 1 level behind
Avatar
Anyways I have not personally used them so I can’t say how well they work
Avatar
Avatar
Aikar
ah cool some reason i thought we was 1 level behind
The api was written for like C++14
6:49 PM
But the language is backwards compatible usually
6:49 PM
I have no issues compiling under C++20 on VS2022
Avatar
I work in javascript too, and heavily experienced in concurrent development, so all this stuff is super familiar to me 😛
Avatar
jraServerAPI 4/24/2023 6:50 PM
Not to change the topic or anything.. but does anyone know why my Beaver dams all of a sudden are empty all the time? lol
Avatar
we pretty much rewrote the minecraft game engine to be multi threaded
👍 1
6:50 PM
would be nice if Unreal Engine 6 copied the things weve done lol
6:50 PM
was a good design
6:51 PM
the trickiest part really is plugin/mod integration, forcing them to be concurrent safe
6:51 PM
my team whos taking over after i bounced out finally just got a new project released of our dream vision
6:51 PM
Fork of Paper which adds regionised multithreading to the dedicated server. - GitHub - PaperMC/Folia: Fork of Paper which adds regionised multithreading to the dedicated server.
Avatar
Avatar
Aikar
the trickiest part really is plugin/mod integration, forcing them to be concurrent safe
Just replace every container with a thread safe container
6:52 PM
KAPPA
Avatar
https://github.com/PaperMC/Paper/issues/1001 was some of my old brainstorming on it
Goal This issue is to serve as a note holder and idea registry for an idea I had today on being able to tick entities in a parallel fashion, safely (at least, safe enough) - Please read entire issu...
6:53 PM
Folia is the realization of those old ideas
6:54 PM
though they prob did a few things different, but same general principle, divide world up into isolated regions, tick regions concurrently, handle scenarios where regions can merge, handle entities traveling between regions, etc
6:55 PM
this is def the kind of stuff UE itself has to implement, not really good for an individual game to try to force in
6:55 PM
i live right beside Epics office, lemme go drop off some design docs 😛
Avatar
Avatar
Aikar
this is def the kind of stuff UE itself has to implement, not really good for an individual game to try to force in
UE isn’t really designed for mmo style games
6:56 PM
I could see it as a plugin though
Avatar
doesnt have to be mmo style. its same fit for even arks world. stasis is already in the right mindset at least of having stasis grids
6:56 PM
this is about how you handle Actor ticks
6:57 PM
safely ticking actors concurrently
Avatar
UE wasn’t designed for Ark, which is basically an MMO on official
6:57 PM
It was mostly designed for SP and small MP
Avatar
ark least has benefit of a fixed size world though
Avatar
Like UT
Avatar
minecraft is a different beast of unbounded PG world
Avatar
Avatar
Aikar
minecraft is a different beast of unbounded PG world
It has bounds (edited)
6:57 PM
They’re just super far away
Avatar
extreme bounds lol
6:58 PM
nothing you can rely on to keep everything in mem
6:58 PM
my minecraft servers are like 200GB x10, believe me, i know
Avatar
Avatar
Aikar
nothing you can rely on to keep everything in mem
Build a super computer
6:58 PM
awesome
Avatar
disk space is actually one of my biggest concerns for my MC servers
Avatar
My server has 70TB hdd and 2tb ssd
6:59 PM
So space for me isn’t a concern (edited)
6:59 PM
this is a 12 year old world
Avatar
Someone needs to fix this shit
6:59 PM
Completely unusable on mobile
6:59 PM
😂
Avatar
lol shit isnt designed for mobile but that least did load
7:00 PM
but thats not our software 😛
Avatar
Maybe I can make it mobile and desktop compatible
7:00 PM
It’s not hard guys
7:00 PM
We have grid now
7:00 PM
It’s just a slippy map
7:01 PM
Leaflet handles the map part
Avatar
thats what that map uses
7:01 PM
A set of Minecraft mods that provide a real time web-based map system for various Minecraft server implementations. - GitHub - webbukkit/dynmap: A set of Minecraft mods that provide a real time web...
Avatar
Yeah I know dynmap
7:01 PM
It runs like dookie
7:02 PM
But it works the best
Avatar
ive really not had much perf issues with it, but i do have render rates jacked way down, it renders way less than default configs
7:02 PM
and thats what prob hits most people
7:02 PM
as you see the different shaders of tiles, we dont re-render entire map
Avatar
Omfg
7:04 PM
Feature Description: Instead of clicking the copy location button in the bottom corner. It would be nice if it did it live in the URL bar like google maps does. It would make it easier to share or ...
7:04 PM
Dude
7:04 PM
It’s called a router
7:04 PM
You use deep linking
7:04 PM
Pls
7:04 PM
This guy must not be a webdev
7:05 PM
Agghh
7:05 PM
You don’t even need routing support if you use an anchor
Avatar
its not even that, that request is just using html5 history api to push a url change
7:08 PM
but regarding shutdown of the game, do plugins stay loaded, or are they being unloaded at the last second before I can see logs? if they dont unlog, then we have to manually hook to control the game exit process to do cleanup / thread flushes. if it doesnt, would be nice if api provided something thats reliably called before game closes or plugin unloads to do cleanup operations.
7:08 PM
as right now i have task queue shutdown in exitloop and plugin unload
Avatar
Avatar
Aikar
but regarding shutdown of the game, do plugins stay loaded, or are they being unloaded at the last second before I can see logs? if they dont unlog, then we have to manually hook to control the game exit process to do cleanup / thread flushes. if it doesnt, would be nice if api provided something thats reliably called before game closes or plugin unloads to do cleanup operations.
I’m not sure, I’d have to look at the code
Avatar
i dont recall seeing a hook for exit in the api's hooksimpl file
Avatar
DECLARE_HOOK(FWindowsPlatformMisc_RequestExit, void, bool);
7:11 PM
here
Avatar
dont use that lol
7:11 PM
that would not be good for what im doing
7:11 PM
thats just a signal to the main thread to request an exit
7:11 PM
the hook i mentioned is at least on main thread when it is performing the exit
7:12 PM
if i had hooked that ,timing would not be accurate and main loop could still be running
7:12 PM
that call is done on the signal handler thread i believe
7:14 PM
the hook i have is fine, it was just more question of would be good if the api handled this as a standard thing, maybe unloading plugins in this hook
7:14 PM
so plugins can keep cleanup work to single unload method
7:15 PM
also isnt there a stop command or something id imagine? that would also not trigger the WindowsPlatformMisc_RequestExit
Avatar
Avatar
Aikar
also isnt there a stop command or something id imagine? that would also not trigger the WindowsPlatformMisc_RequestExit
server exit and pressing the windows X button on the server window both call this
Avatar
interesting, but yeah if you look at the impl to that, all it does is set a request exit boolean
7:18 PM
and special case for a force exit to redirect tasks to the current thread as main
7:18 PM
exitloop looked best for when you want to hook into when its properly unwinding the engine loop
7:20 PM
does server kick players itself or is ASM doing that
7:21 PM
though i feel like its pretty unreliable for players to even get a proper kick msg, so i kinda want to hook in early of the exit and kick them myself so they get a proper disconnect message
7:27 PM
DECLARE_HOOK(FEngineLoop_Exit, void, void*);
7:27 PM
thats the on im using
7:29 PM
void Hook_FEngineLoop_Exit(void* _this) { exiting = true; taskQueue.shutdown(); if (shuttingDown) { writeStatus("cleanshutdown"); } else { writeStatus("unexpectedshutdown"); } SAOmega::WorldSave::Exit(); FEngineLoop_Exit_original(_this); } so i guess i actually was calling that method post shutdown, in this case those writeStatus are by desire executing on caller thread as the taskQueue is now shutdown.
7:29 PM
shuttingDown bool is set when it detects a broadcast msg about a desired shutdown that comes from ASM
7:29 PM
so itll be unexpected if we for some reason exit loop without a broadcast occurring
7:32 PM
the guardedmain does this: so looked like a pretty clean hook point
Avatar
but yeah ima rename this class to mimic the java task executor, then ill look at the coroutine stuff to build the api for task chains. the task chain is responsible for switching execution context between main thread and thread pools, passing the response from 1 task to the param of the next These are mainly useful in contexts where your execution can be asynchronous, such as pulling things out of a DB on thread, to then give to the player on main, to then switch back to thread to mark them as delivered. Task Pipeline is maybe better name for it than chain. might switch up my name here.
Avatar
is there a simple way to identify if a dino is subject to ORP? in testing omega bosses ransacking base, it seemd like it ignores ORP for dinos, so want to fix that.
Avatar
Hello, I have a question. I am using stack mode. My unofficial server allows users to keep up to 150 arc data. However, some users save like they've exceeded their capacity and when they open arc data, they get thrown off the server. In response, I responded like this. I preferred the method of retrieving user steam codes and deleting them cluster-wide. without deleting the user's character Is there a good way to delete only the entries in arkdata?
Avatar
Avatar
Aikar
is there a simple way to identify if a dino is subject to ORP? in testing omega bosses ransacking base, it seemd like it ignores ORP for dinos, so want to fix that.
Are you referring to the built in Offline Protection or something else?
Avatar
Avatar
Tobias
Setting other properties like MaxInventoryItems works on existing structures so I guess there is some behind the scenes type setup on engrams that I am missing when bHideDefaultInventoryItemsFromDisplay is not set when the structures are created and placed in the world.
Did you get this working? Item visibility is set (and saved) with properties on individual items. The UPrimalInventory has properties like bHideDefaultInventoryItemsFromDisplay, but that's just used to set individual default items as visible/invisible when they are added to the inventory. So if you want visibile default engrams/blueprints on existing structures, you'll have to loop through and update/replace the existing UPrimalItems in those inventories.
Avatar
Avatar
TheMollusk
Did you get this working? Item visibility is set (and saved) with properties on individual items. The UPrimalInventory has properties like bHideDefaultInventoryItemsFromDisplay, but that's just used to set individual default items as visible/invisible when they are added to the inventory. So if you want visibile default engrams/blueprints on existing structures, you'll have to loop through and update/replace the existing UPrimalItems in those inventories.
I wasn't able to get it working and couldn't figure out how it worked using IDA. Your solution makes a lot of sense though, and give it a try in a bit. Thank you! 🙂
Avatar
Avatar
Lethal
Are you referring to the built in Offline Protection or something else?
yes
8:30 PM
and man no one has ever discussed kicking all players in this discord lol?
8:31 PM
wanting to proper kick people on shutdown to help ensure they are saved better, as im noticing the game has a flaw in anyone still connected during shutdown isnt logged out gracefully the normal way
Avatar
Never looked at the built in ORP code in IDA. I built my own free ORP that has a bunch of features not possible with the built in version.
Avatar
on exit it logs them as "transferred to another ark" when they didnt
8:32 PM
and i found if you save the world after they are kicked in that abnormal state, it deletes their body :/
8:33 PM
gotta love ARK quirks
Avatar
so i want to kick everyone THEN save lol
Avatar
Avatar
Aikar
wanting to proper kick people on shutdown to help ensure they are saved better, as im noticing the game has a flaw in anyone still connected during shutdown isnt logged out gracefully the normal way
const auto& PCS = ArkApi::GetApiUtils().GetWorld()->PlayerControllerListField(); for (TWeakObjectPtr<APlayerController> APC : PCS) { AShooterPlayerController* PC = static_cast<AShooterPlayerController*>(APC.Get()); if (PC) //kick the player }
Avatar
thanks
8:33 PM
racing between solving ark problems and work back and forth lol so didnt have time to look up how to do that so i just stopped that final save i was doing
Avatar
I think its like PC->KickPlayer(); or something to add into that code.
Avatar
trying to get these improvements in to reduce how much people get "ARK'd"
Avatar
ArkApi::GetApiUtils().GetShooterGameMode()->KickPlayerController(PC, &KicKMessage);
8:35 PM
KickMessage is FString
Avatar
Avatar
Aikar
and i found if you save the world after they are kicked in that abnormal state, it deletes their body :/
jraServerAPI 4/25/2023 9:03 PM
this has happened to my players soo many times lol.. i just tell them they got Farked
Avatar
Avatar
Lethal
99% sure this isn't going to happen Linux version doesn't get a PDB released I have no reason to believe WC will do it any different for 1.5 (edited)
oh bummer, is there any way to run a ark server as a console application because its not a console application
Avatar
@Mr. Alpaca yeah i wish i knew, basically its ark process doing it so wed have to analyze startup code to figure out how to make it a stdout/stderr redirect only. if i can find that out ill prob replace ASM with my own scripts, as i mainly used ASM to save time building scripts just to even get started
Avatar
Avatar
Aikar
@Mr. Alpaca yeah i wish i knew, basically its ark process doing it so wed have to analyze startup code to figure out how to make it a stdout/stderr redirect only. if i can find that out ill prob replace ASM with my own scripts, as i mainly used ASM to save time building scripts just to even get started
I kow that the game hosting tcadmin actually catches the terminal but no clue how they do it since its closed source, is there any way you can let me kow about progress with it?
Avatar
You can do this to capture console information to a file instead of the console window someprocess.exe > console.txt
2:42 PM
> console.txt basically says to write all console output to the file console.txt
Avatar
yes but ark is not a console app right?
Avatar
It is a console app
Avatar
if i try to run it in console it always opens a new windows
Avatar
anything without a UI is a console app techincally
Avatar
i want it to be intergrated into the same console
Avatar
oh i see
Avatar
like, games like rust have a server with console that is able to intergrate but ark and unturned and maybe more can not do that for some reason
Avatar
Avatar
Aikar
@Mr. Alpaca yeah i wish i knew, basically its ark process doing it so wed have to analyze startup code to figure out how to make it a stdout/stderr redirect only. if i can find that out ill prob replace ASM with my own scripts, as i mainly used ASM to save time building scripts just to even get started
You can redirect stdout and stdin
Avatar
Avatar
Mr. Alpaca
i want it to be intergrated into the same console
You can do this with a plugin
5:55 PM
Case in point
5:56 PM
When I was working on a custom launcher for the ark api
Avatar
Avatar
substitute
You can redirect stdout and stdin
how can you do that?
Avatar
Illidan Stormrage 4/27/2023 11:00 PM
Who can make me a mod?
Avatar
Avatar
Illidan Stormrage
Who can make me a mod?
ask in the modding discord
Avatar
Illidan Stormrage 4/28/2023 2:36 PM
@Natsu where modding discord?
Avatar
Avatar
Illidan Stormrage
@Natsu where modding discord?
Avatar
Illidan Stormrage 4/28/2023 2:51 PM
@Natsu And they told me they make mods here
😂 2
Avatar
Anyone know how the shock immunity on Basilosaurus works? Is it a buff or a field we could set on other dinos too?
Avatar
Figured it out. For reference c++ struct FDamageTypeAdjuster { TSubclassOf<UDamageType> DamageTypeClass; float DamageMultiplier; unsigned __int32 bIgnoreMultiplierIfWildDinoAttacker : 1; unsigned __int32 bIgnoreMultiplierIfTamedDinoAttacker : 1; unsigned __int32 bOnlyUseMultiplierIfWildDinoAttacker : 1; unsigned __int32 bOnlyUseMultiplierIfTamedDinoAttacker : 1; unsigned __int32 bOnlyUseMultiplierIfTamed : 1; }; void Hook_APrimalDinoCharacter_BeginPlay(APrimalDinoCharacter* _this) { FString bp = ArkApi::GetApiUtils().GetBlueprint(_this); APrimalDinoCharacter_BeginPlay_original(_this); if (bp.Equals("Blueprint'/Game/PrimalEarth/Dinos/Mosasaurus/Mosa_Character_BP.Mosa_Character_BP'")) { static FString DmgTypeBpPath(FString("Blueprint'/Game/PrimalEarth/CoreBlueprints/DamageTypes/DmgType_Melee_Dino_Carnivore_Small_Electrocute.DmgType_Melee_Dino_Carnivore_Small_Electrocute'")); static UClass* DmgType = UVictoryCore::BPLoadClass(&DmgTypeBpPath); FDamageTypeAdjuster stunImmunity; stunImmunity.DamageTypeClass = TSubclassOf<UDamageType>(DmgType); stunImmunity.DamageMultiplier = 0.0; stunImmunity.bIgnoreMultiplierIfTamedDinoAttacker = false; stunImmunity.bIgnoreMultiplierIfWildDinoAttacker = false; stunImmunity.bOnlyUseMultiplierIfTamed = false; stunImmunity.bOnlyUseMultiplierIfTamedDinoAttacker = false; stunImmunity.bOnlyUseMultiplierIfWildDinoAttacker = false; TArray<FDamageTypeAdjuster>& damageTypeAdjusters = *GetNativePointerField<TArray<FDamageTypeAdjuster>*>(_this, "APrimalCharacter.DamageTypeAdjusters"); damageTypeAdjusters.Add(stunImmunity); } } (edited)
Avatar
anyone know how to reverse engineer/decompile mods?
10:37 PM
this loot picker up mod seems like it may store data directly into the character file as it has some bug that it copies the servers config to the character and if you adjust config after the character has seen it, it doesnt pick up your new config
10:38 PM
so people having to delete characters to fix it but would love if can figure a way to force it to update
Avatar
How to send RCON commands to the server from a plugin?
Avatar
Avatar
substitute
You can redirect stdout and stdin
so how do you do this and disable console?
Avatar
Avatar
Aikar
so how do you do this and disable console?
my process spawned the game process and the game process attached it's stdout to the parent console
8:48 AM
I modified the ark api in this particular instance
8:49 AM
See reference information about the AttachConsole function, which attaches the calling process to the console of the specified process.
Avatar
oh so isnt a flag way to do it
Avatar
The following process creation flags are used by the CreateProcess, CreateProcessAsUser, CreateProcessWithLogonW, and CreateProcessWithTokenW functions. They can be specified in any combination, except as noted.
8:50 AM
CREATE_NO_WINDOW
Avatar
i was just meaning from standard launch params
8:50 AM
start $C -ForceAllowCaveFlyers -useautoreporter -serverkey=$id -stdout >> launch.log 2>&1
Avatar
you might be able to do it by writing a tool to launch the game and forward the parameters (this is what I was working on)
Avatar
i tried that
Avatar
and then you can write a custom plugin to attach to the parent process
Avatar
the stdout didnt seem to do anything
8:51 AM
i was ultimately just trying to background it entirely and only view console by a log file/screen like session
Avatar
you might want to check the flags of the binary and see how it ultimately works
8:51 AM
it might be using DETACHED_PROCESS or CREATE_NEW_CONSOLE
Avatar
i did, thats where i found stdout
Avatar
no, not the startup args
8:52 AM
I mean specifically the flags set on the process
8:52 AM
Process Hacker, A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.
8:52 AM
this tool can show a lot of info
8:52 AM
8:55 AM
They use AllocConsole
Avatar
i still dont got acccess to that yet
8:55 AM
i gotta figure out how to sign up lol
Avatar
@Aikar doesn't matter
9:07 AM
the api explicitly creates a console
9:07 AM
void OpenConsole() { AllocConsole(); FILE* p_cout; freopen_s(&p_cout, "conout$", "w", stdout); SetConsoleOutputCP(CP_UTF8); }
9:07 AM
I will implement logic to search for a parent and to attach instead of creating
9:11 AM
CreateToolhelp32Snapshot should be safe in dllmain as it is located in kernel32
9:11 AM
most functions in kernel32 are safe-ish in dllmain
9:11 AM
anything else though, not so much
9:12 AM
honestly a LOT of people here should read this^
9:12 AM
it's actually really important stuff to help prevent weird inconsistent behavior
9:18 AM
@Lethal we need to add this to our documentation
9:18 AM
if you have poco installed from VCPKG, you MUST uninstall it before building the api
9:18 AM
c:\vcpkg>vcpkg list bzip2:x64-windows 1.0.8#3 bzip2 is a freely available, patent free, high-q... bzip2[tool]:x64-windows Builds bzip2 executable expat:x64-windows 2.5.0#3 XML parser library written in C fmt:x64-windows 9.1.0#1 Formatting library for C++. It can be used as a ... pcre2:x64-windows 10.40#1 Regular Expression pattern matching using the sa... poco:x64-windows 1.12.4#3 Modern, powerful open source C++ class libraries... vcpkg-cmake-config:x64-windows 2022-02-06#1 vcpkg-cmake:x64-windows 2022-12-22 zeromq:x64-windows 4.3.4#6 The ZeroMQ lightweight messaging kernel is a lib... zlib:x64-windows 1.2.13 A compression library c:\vcpkg>vcpkg remove poco:x64-windows The following packages will be removed: poco:x64-windows Removing 1/1 poco:x64-windows c:\vcpkg>
9:18 AM
once I removed poco:x64-windows, everything built fine
9:18 AM
but I was getting compiler errors prior
Avatar
@WETBATMAN
9:38 AM
your updater opens the console (edited)
9:38 AM
doesn't it?
9:41 AM
yeah, it does 😠
9:42 AM
I propose you make this change DWORD GetParentProcessId() { const DWORD InvalidParentProcessId = 0; HANDLE Snapshot = 0; PROCESSENTRY32 ProcessEntry; DWORD PID = GetCurrentProcessId(); Snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (Snapshot == INVALID_HANDLE_VALUE) return InvalidParentProcessId; ZeroMemory(&ProcessEntry, sizeof(ProcessEntry)); ProcessEntry.dwSize = sizeof(ProcessEntry); if (!Process32First(Snapshot, &ProcessEntry)) return InvalidParentProcessId; do { if (ProcessEntry.th32ProcessID == PID) return ProcessEntry.th32ParentProcessID; } while (Process32Next(Snapshot, &ProcessEntry)); return InvalidParentProcessId; } void OpenConsole() { if (GetConsoleWindow()) return; DWORD parentProcessId = GetParentProcessId(); if (parentProcessId && AttachConsole(parentProcessId)) return; AllocConsole(); FILE* p_cout; freopen_s(&p_cout, "conout$", "w", stdout); SetConsoleOutputCP(CP_UTF8); }
9:42 AM
this will prevent AttachConsole and AllocConsole entirely if the console already exists
9:43 AM
@Aikar
9:43 AM
Avatar
@Aikar
10:25 AM
pull the latest commit, build and remove the auto updater
10:25 AM
then add AttachToParent to the config.json under settings as "true" to have it attach to the parent console if available.
10:26 AM
{ "settings":{ "AutomaticPluginReloading":true, "AutomaticPluginReloadSeconds":5, "SaveWorldBeforePluginReload":true, "AttachToParent":true } }
Avatar
Hi ! It is normal that SteamCMD uses 100 % disk ?
Avatar
Any know how to hook server events? Like when starts meteors rain in extintion / gen1 lunar, start OSD in extintion, etc?
12:19 AM
or where i can find it
Avatar
Avatar
Loki
Any know how to hook server events? Like when starts meteors rain in extintion / gen1 lunar, start OSD in extintion, etc?
Guessing without looking here. Some of that might be in the Extinction or Gen1 DayCycleManager BP classes. Or maybe if you open the Blueprint for the Extinction or Gen1 levels themselves and check the graphs.
Avatar
Avatar
Schopfer
Hi ! It is normal that SteamCMD uses 100 % disk ?
Are you downloading something
Avatar
Avatar
substitute
Are you downloading something
that is the thing . I’m not (edited)
Avatar
couldnt the pdb reader code be used to write code thatll generate every struct to generate everything to be accurate in the api? then it can be very easdy to just run once any time an update is out to check for struct changes and push updated structs.
Avatar
also, GetNativePointerField() is quite a few instructions of hops to get that offset, as well as a map lookup vs a constant time O(1) operation, I have a very simple pattern that would make everything O(1) for performance past the first call inline long long calculateFieldOffset(void* _this, const char *field) { size_t *actualPtr = reinterpret_cast<size_t *>(GetNativePointerField<void*>(_this, field)); return actualPtr - reinterpret_cast<size_t *>(_this); } struct FSupplyCrateItemSet { uint8 _padding[0x40]; TArray<FSupplyCrateItemEntry, FDefaultAllocator>& ItemEntriesField() { static auto offset = calculateFieldOffset(this, "FSupplyCrateItemSet.ItemEntries"); return *((TArray<FSupplyCrateItemEntry, FDefaultAllocator>*)((size_t*)this + offset)); } }; would be very easy to apply that pattern to the helper methods and cache the offset and im sure yall know how to clean the pattern up more. And can get the padding blocks in there so it works fine for TArray I think it was said is where that matters yeah? with that, the risk then would only be if size of a struct changed and that struct is used in an array Though this could be automated too and then send a ping in a discord channel for devs to be aware of changed structs and know if they use it in their plugin.
3:27 AM
though this kind of change would have to be a semver major due to change of signatures for things like where other template params were left off. but would be nice to have a clean 1 to 1 mapping to actual structs
Avatar
Avatar
Aikar
couldnt the pdb reader code be used to write code thatll generate every struct to generate everything to be accurate in the api? then it can be very easdy to just run once any time an update is out to check for struct changes and push updated structs.
I'm not too familiar with exactly what's in the PDB or how to use MS's DIA SDK. So far I've invested my time in learning IDAPython instead. I suspect that you could generate definitions for struct/class member variables pretty reliably, but I wonder if function signatures aren't as straightforward. IDA gets function sigs wrong sometimes even with the PDB provided. With IDAPython (plus a slightly modified PDBReader in ArkServerApi plus some info dumped from the UE reflection system) I've been able to generate a nice set of native struct/class variable definitions that are more complete and up-to-date than the current headers. I haven't refined the function definition generation to a point I'm comfortable with yet though. I've thought about submitting pull requests for some of my generated definitions. One obstacle to easy generated updates is that the ArkServerApi header files were originally generated, but now they've been modified by hand by multiple contributors and include things that aren't normally generated. Personally, my choice would probably be to have a separate generated header for each class. Idk if the dev team or community are interested in such a reorganization.
Avatar
yeah i feel like 'extras' should be separate imo, keep structs a match to actual game and then provide helper methods elsewhere
👍 1
5:57 AM
like StructHelper::foo(Struct)
5:58 AM
and fair on functions, but another idea is the code generator can find place in existing files, then have markers for the generated fields, then you must put anything special outside of them, like struct Foo : Bar { // ##GENERATED:START - DO NOT MODIFY code // ##GENERATED:END - DO NOT MODIFY other stuff }
Avatar
One thing I've done in the past is just use a lot of python pattern matching and regex to detect which lines in the headers should be replaced with generated code and leave the rest as is. (edited)
Avatar
Avatar
TheMollusk
I'm not too familiar with exactly what's in the PDB or how to use MS's DIA SDK. So far I've invested my time in learning IDAPython instead. I suspect that you could generate definitions for struct/class member variables pretty reliably, but I wonder if function signatures aren't as straightforward. IDA gets function sigs wrong sometimes even with the PDB provided. With IDAPython (plus a slightly modified PDBReader in ArkServerApi plus some info dumped from the UE reflection system) I've been able to generate a nice set of native struct/class variable definitions that are more complete and up-to-date than the current headers. I haven't refined the function definition generation to a point I'm comfortable with yet though. I've thought about submitting pull requests for some of my generated definitions. One obstacle to easy generated updates is that the ArkServerApi header files were originally generated, but now they've been modified by hand by multiple contributors and include things that aren't normally generated. Personally, my choice would probably be to have a separate generated header for each class. Idk if the dev team or community are interested in such a reorganization.
Separate headers I don’t think would work
8:36 AM
Unless you find a way to do partial definitions of a class, maybe possible
8:37 AM
C# has partial class
Avatar
Avatar
Aikar
yeah i feel like 'extras' should be separate imo, keep structs a match to actual game and then provide helper methods elsewhere
Any major rewrite will require splitting the api
8:38 AM
If we go the major rewrite route then I want to completely drop the current auto updater in favor of a custom launcher executable
Avatar
Avatar
substitute
Separate headers I don’t think would work
Idk, I think the big challenge is declaring/defining the required the required types for each class header right? Forward declaring certain classes and including struct definitions? So far I've been able to do that without too much trouble. Another option is a header for each UE package, like the existing UE4 SDK generator does. I don't like that quite as much though.
Avatar
Recently I've been thinking about grouping the headers
Avatar
Definitely in favor of refactoring the whole auto-updater/ArkServerApi separate DLL situation though
Avatar
So basically a Weapons.hpp
9:15 AM
Instead of every weapon being in one
👍 1
9:15 AM
And a Dinos.hpp
9:15 AM
Engrams.hpp (edited)
9:15 AM
Items.hpp
9:15 AM
etc
Avatar
Avatar
Frigoff
Recently I've been thinking about grouping the headers
What I do in my own private SDK is generate directories for each UE package, basically match the paths you see in the dev kit, and create a file for each class in the package. Then create one file for any structs in the UE package and one for enums.
9:17 AM
Un-reflected types would also need to be handled for ArkServerApi, but that shouldn't be too difficult
Avatar
Avatar
TheMollusk
Idk, I think the big challenge is declaring/defining the required the required types for each class header right? Forward declaring certain classes and including struct definitions? So far I've been able to do that without too much trouble. Another option is a header for each UE package, like the existing UE4 SDK generator does. I don't like that quite as much though.
Specifically the larger issue is shoving helpers and generated things into the same class definition
9:32 AM
if you can spread a class definition over several headers then it is not an issue
9:33 AM
For example
9:34 AM
///AShooterCharacter_gen.h class AShooterCharacter { //generated methods } ///AShooterCharacter.h class AShooterCharacter { public std::uint64 UniqueIdFromCharacter(); } (edited)
Avatar
Ahh I see. Maybe something like the UE4 SDK generator that lets you specify hardcoded lines for certain classes then. (edited)
9:36 AM
I fucking hate C# man
9:36 AM
what the fuck
9:37 AM
cockblocked on multiple inheritance (can only do this with interfaces), can't freaking specify the data structure layout as I can use fields and properties aren't fields
9:37 AM
this is so obnoxious
Avatar
I don't know C# lol
Avatar
I'm not even doing something that radical
9:38 AM
I'm writing a webapi to verify a WiiU nand dump, stuff like the OTP is broken int 8 banks (contiguous)
9:38 AM
bank0 is wii data
9:38 AM
bank 1-7 is wiiu
9:38 AM
I would like to define each Bank
9:38 AM
and then just do
9:38 AM
struct WiiUData : Bank1, ..., Bank7
9:38 AM
how hard is this man
9:38 AM
C++ can do it
9:41 AM
9:41 AM
bro
9:41 AM
come on
9:41 AM
this is so stupid lmao
10:27 AM
Java has it
10:27 AM
pensive_cowboy
Avatar
Avatar
substitute
what the fuck
I think you need to make it static
1:14 PM
because C# usually wants to have everything static.
1:17 PM
also try to pass default value for it
Avatar
Avatar
SR
I think you need to make it static
That’s not the issue at all here
1:22 PM
And it can’t be static, the data it represents isn’t static
Avatar
It’s just a failure of the language wherein intersection types don’t exist
Avatar
That happens sometimes.
Avatar
C# flat out disallows multiple inheritance
1:24 PM
It also disallows any struct inheritance
1:24 PM
It’s too strict
Avatar
Because it is too simple :)
Avatar
@substitute Time to learn rust >:)
1:25 PM
hehe xd
Avatar
If I would write this in Rust
1:25 PM
I would just write it in C
Avatar
Avatar
substitute
I would just write it in C
try assembly if it goes like that
1:26 PM
😆
Avatar
C# has interop with C
Avatar
I saw some people using both C++ and C in C# executable.
1:27 PM
with some sort of dark magic.
Avatar
Avatar
SR
try assembly if it goes like that
Hey, you laugh but some of us still write primarily C and even the occasional assembly (those are some of my favorite tasks lol) at our day jobs
Avatar
Avatar
TheMollusk
Hey, you laugh but some of us still write primarily C and even the occasional assembly (those are some of my favorite tasks lol) at our day jobs
I know that 😉
Avatar
What function does write text from engine in server console? Like this one.
Avatar
does it attacht the ark console too and not only the arkapi console
7:04 PM
?
Avatar
is there a way we can potentially make logger also really write to the log file?
8:56 PM
as ive got background processes auto restarting servers now but no console window, and if i do pull subs latest commit could just null route the console all together
8:56 PM
but need console to access the current plugin loggers, so can route that to a file, but itll now be a dupe lol
8:57 PM
@SR your plugin logger can unless your asking same question as me to also actually log it to file lol
Avatar
Avatar
Aikar
@SR your plugin logger can unless your asking same question as me to also actually log it to file lol
wdym
Avatar
Log::GetLog()->error("foo");
8:58 PM
but that is in green and doesnt go to log file
8:58 PM
or well red for error
8:59 PM
would FMessageLog::Info maybe do it?
9:00 PM
looks like void __fastcall FOutputDevice::Log(FOutputDevice *this, const wchar_t *Str) is it
Avatar
It goes to a different log file, though
9:03 PM
if ( GIsOfficialServer ) { v3 = FOutputDeviceRedirector::Get(); FOutputDevice::Log( v3, L"AShooterPlayerController::ReceivedPlayerState() how could this be called on the server?"); }
Avatar
Under Binaries/Win64/logs
9:04 PM
well sucks its separate context but that is good to know (edited)
9:04 PM
would be nice to still be mixed with ark logs to know order of things like in console
Avatar
Avatar
Mr. Alpaca
does it attacht the ark console too and not only the arkapi console
There’s no reason it shouldn’t
Avatar
Is there a better way to find out the weapon used for a particular a damage event than the below code? I could switch weapons before the hit and get it registered as something else. c++ float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->TargetingTeamField() < 10000) // wild dinos { FString targetName, damageCauserName, eventInstigatorName, weaponName; FName damageTypeFName; _this->GetHumanReadableName(&targetName); DamageCauser->GetHumanReadableName(&damageCauserName); EventInstigator->GetHumanReadableName(&eventInstigatorName); DamageEvent->DamageTypeClassField().uClass->GetDefaultObjectName(&damageTypeFName); if (EventInstigator->IsA(AShooterPlayerController::GetPrivateStaticClass())) { AShooterPlayerController* shooterPlayerController = static_cast<AShooterPlayerController*>(EventInstigator); AShooterWeapon* weapon = shooterPlayerController->GetPlayerCharacter()->CurrentWeaponField(); if (weapon != nullptr) weapon->GetHumanReadableName(&weaponName); } SendConsoleMessageToAll("{} damage of type {} to {} from {} by {} using {}", Damage, damageTypeFName.ToString().ToString(), targetName.ToString(), damageCauserName.ToString(), eventInstigatorName.ToString(), weaponName.ToString()); } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
3:07 AM
Also tried changing the values on the weapon but the problem becomes that a lot of damage sources use the same damage type and afaik I can't create a new damage type without a devkit mod. c++ static UBlueprintGeneratedClass* ProjArrowTranqBoltClass = (UBlueprintGeneratedClass*)Globals::FindClass("BlueprintGeneratedClass /Game/PrimalEarth/CoreBlueprints/Projectiles/ProjArrow_Tranq_Bolt.ProjArrow_Tranq_Bolt_C"); static UBlueprintGeneratedClass* DmgTypeProjectileWithImpactFXTranqClass = (UBlueprintGeneratedClass*)Globals::FindClass("BlueprintGeneratedClass /Game/PrimalEarth/CoreBlueprints/DamageTypes/DmgType_ProjectileWithImpactFX_Tranq.DmgType_ProjectileWithImpactFX_Tranq_C"); AShooterProjectile* projCDO = static_cast<AShooterProjectile*>(ProjArrowTranqBoltClass->GetDefaultObject(true)); UDamageType* dmgTypeCDO = reinterpret_cast<UDamageType*>(DmgTypeProjectileWithImpactFXTranqClass->GetDefaultObject(true)); if (projCDO == nullptr || dmgTypeCDO == nullptr) return; FProjectileWeaponData& weaponConfig = *GetNativePointerField<FProjectileWeaponData*>(projCDO, "AShooterProjectile.WeaponConfig"); weaponConfig.DirectDamage = damage; float& damageTorpidityIncreaseMultiplier = *GetNativePointerField<float*>(dmgTypeCDO, "UShooterDamageType.DamageTorpidityIncreaseMultiplier"); damageTorpidityIncreaseMultiplier = 10.0; TArray<FDamagePrimalCharacterStatusValueModifier>& damageCharacterStatusValueModifiers = *GetNativePointerField<TArray<FDamagePrimalCharacterStatusValueModifier>*>(dmgTypeCDO, "UShooterDamageType.DamageCharacterStatusValueModifiers"); FDamagePrimalCharacterStatusValueModifier& mod = damageCharacterStatusValueModifiers[0]; mod.DamageMultiplierAmountToAdd = 10.0;
Avatar
Avatar
Tobias
Is there a better way to find out the weapon used for a particular a damage event than the below code? I could switch weapons before the hit and get it registered as something else. c++ float Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser) { if (_this->TargetingTeamField() < 10000) // wild dinos { FString targetName, damageCauserName, eventInstigatorName, weaponName; FName damageTypeFName; _this->GetHumanReadableName(&targetName); DamageCauser->GetHumanReadableName(&damageCauserName); EventInstigator->GetHumanReadableName(&eventInstigatorName); DamageEvent->DamageTypeClassField().uClass->GetDefaultObjectName(&damageTypeFName); if (EventInstigator->IsA(AShooterPlayerController::GetPrivateStaticClass())) { AShooterPlayerController* shooterPlayerController = static_cast<AShooterPlayerController*>(EventInstigator); AShooterWeapon* weapon = shooterPlayerController->GetPlayerCharacter()->CurrentWeaponField(); if (weapon != nullptr) weapon->GetHumanReadableName(&weaponName); } SendConsoleMessageToAll("{} damage of type {} to {} from {} by {} using {}", Damage, damageTypeFName.ToString().ToString(), targetName.ToString(), damageCauserName.ToString(), eventInstigatorName.ToString(), weaponName.ToString()); } return APrimalCharacter_TakeDamage_original(_this, Damage, DamageEvent, EventInstigator, DamageCauser); }
where did this < 10k come from? Players are >= 50000, so curious if theres another magic # and 10-50k is unused.
Avatar
I usually search through the history and pickup snippets of code related to what I want to do. I believe the 10k number was this message https://discord.com/channels/513432877904691202/513432877904691205/693948864851345539
Avatar
Avatar
Aikar
where did this < 10k come from? Players are >= 50000, so curious if theres another magic # and 10-50k is unused.
That’s just Wildcards special number
4:23 PM
You’ll see it all over in ida when dealing with Dino’s
4:24 PM
Basically though your “tribe or team” is indicated by your targeting team number
4:24 PM
Tribes and specimen implants generate above 50000 and wilds depending on their group can be 0-49999
Avatar
right thats the part i knew, i was questioning why tobias had 10k
4:54 PM
as that could be excluding wild if a wild did get say 20k, so i was curious is 10000-49999 a special range
Avatar
jraServerAPI 5/1/2023 6:05 PM
it's my understanding that it used to be >= 10K was players, and at some point that changed (probably with genesis) to >= 50K
Avatar
Does not seem to be a thing anymore at least. Looking through IDA there is absolutely no reference to 10000 in anything that has to do with teamids.
Avatar
What hook does print all that text?
Avatar
Either way wilds are just below 20 most of the time
6:30 PM
10000 or 50000 will likely not make a difference
Avatar
yeah i was curious what would the diff ids the wilds use mean?
7:48 PM
is it maybe classification for boss, etc?
7:48 PM
also, could we potentially register completely custom components to actors to store metadata in and have it serialized?
Avatar
You could instantiate already existing components, I don't think you can inject your own components or maybe creating a new UClass, I am not sure
Avatar
i ultimately jut want to store a an std::map of arbitrary key/value stores.
Avatar
Maybe someone else with better low level engine knowledge can help you
8:20 PM
It's out of my expertise area
Avatar
yeah i feel like its gonna be around the area Sub was doing for the Auto Endgame stuff, just i wanna apply it to all actors
9:02 PM
i wanna be able to do stuff like track when a dino spawned, where it spawned (so i can leash it), who's attacked it recently (make bosses not damage tribes who had not attacked it), etc, open ended key value stores are so fundamental to building lots of cool things 🙂
Avatar
Anyone know if UE5 works the same way as current ARK with all ::Tick happening on a single thread?
Avatar
i didnt see anything about world being ticked, just the network manager it seemed
12:15 AM
from quick research looks like nothing was done to break world ticking up, it is a very complicated beast, we actually touched on that convo the other day in here about how we did a breakdown of rewriting minecraft to regionize multithread tick the world. i was hoping UE5 would have something like that but doesnt seem like it does. (edited)
12:17 AM
is stasis a ue concept or anark concept? ultimately it would rely on stasis, creating regions based off unsuspended areas, combining nearby ones, and separating ticking by regions who are distant enough they have no risk of AI Colliding between separate regions. (ie, whos attack landed first?)
Avatar
I'm pretty sure it's ark's
Avatar
but then youd go into downstream of mods and plugins also have to understand the thread risks there too
12:18 AM
supporting third party content is the hardest part of threading world ticking of any game
12:19 AM
so, if its arks, dont expect that kind of fancyness from ark devs 😛
Avatar
Yeah no 😛
Avatar
Is there a way to import and open another map's backsub file on the newly created map? I'd like to tour the bass from the previous season.
Avatar
RIO (Александр) 5/5/2023 5:48 AM
hello everyone. how can I get a player controller that kills a dinosaur with an admin rifle? I have tried using Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser), but EventInstigator and DamageCauser is nullptr when dino is killed using admin rifle 😦
Avatar
Avatar
RIO (Александр)
hello everyone. how can I get a player controller that kills a dinosaur with an admin rifle? I have tried using Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser), but EventInstigator and DamageCauser is nullptr when dino is killed using admin rifle 😦
This is direct damage without owner.
Avatar
Avatar
RIO (Александр)
hello everyone. how can I get a player controller that kills a dinosaur with an admin rifle? I have tried using Hook_APrimalCharacter_TakeDamage(APrimalCharacter* _this, float Damage, FDamageEvent* DamageEvent, AController* EventInstigator, AActor* DamageCauser), but EventInstigator and DamageCauser is nullptr when dino is killed using admin rifle 😦
This is why, the damage causer is not connected therefore you cannot go that route
4:36 PM
You can search for how to detect blueprint events like that one, and hook ServerRequestDestroyTarget
4:36 PM
That includes the dino parameter
Avatar
RIO (Александр) 5/6/2023 2:37 AM
Thanks
Avatar
substitute 5/6/2023 4:31 AM
@Pelayori
4:31 AM
4:31 AM
4:32 AM
such an arbitrary decision
Avatar
lol
10:40 AM
That is kind of simple though? Why is having msvc a stroke
10:40 AM
Or is it just intellisense
Avatar
Avatar
Pelayori
That is kind of simple though? Why is having msvc a stroke
No the error is correct
10:49 AM
You can declare but not define a function from a typedef
10:49 AM
Defining means supplying the actual implementation
10:50 AM
It’s just an arbitrary restriction imo
10:50 AM
The only argument I can see for it is that you won’t have named args using current C++ syntax
Avatar
My template knowledge is limited but I tried 😛
Avatar
since rust compiles down to native, it should be possible to build plugins in rust right?
Avatar
Avatar
Aikar
since rust compiles down to native, it should be possible to build plugins in rust right?
substitute 5/6/2023 7:55 PM
You may have to fight calling conventions
7:55 PM
But yes
Avatar
AdminAlphaWolf20 5/9/2023 12:38 AM
Hi, I'm not sure if this is where I should ask this, but this morning I restarted the servers and everything was fine. Now I have this problem. Does anyone know how I can solve it? Thanks!
Avatar
Avatar
AdminAlphaWolf20
Hi, I'm not sure if this is where I should ask this, but this morning I restarted the servers and everything was fine. Now I have this problem. Does anyone know how I can solve it? Thanks!
substitute 5/9/2023 3:07 AM
You would want to ask here
3:08 AM
If I had to guess, one of your plugins is unable to make a request and is timing out
3:08 AM
but there's no clear indication on which plugin is having that issue
3:43 AM
ah damn still doesnt provide as nice of a high lvl api i was hoping.
3:43 AM
cant find a good connection pool
Avatar
AdminAlphaWolf20 5/9/2023 6:29 AM
I can't figure out the problem, I'll try again, thanks.
Avatar
uh api has this: #define check(expr) {} breaking boost
6:47 AM
#undef check fixed it it seems
Avatar
Avatar
Aikar
uh api has this: #define check(expr) {} breaking boost
AdminAlphaWolf20 5/9/2023 6:54 AM
Hello, is this for me? Because if it is, I don't understand anything lol.
Avatar
no i ran into an issue but resolved it
Avatar
Avatar
Aikar
no i ran into an issue but resolved it
AdminAlphaWolf20 5/9/2023 6:55 AM
ah¡ ok
Avatar
no idea on your issue
6:56 AM
blow pc up, build a new one, try again, nuclear option
Avatar
AdminAlphaWolf20 5/9/2023 6:56 AM
It seems that something is blocking the address against the API, but I don't know which IP it is to verify it.
Avatar
Avatar
Aikar
blow pc up, build a new one, try again, nuclear option
Seems like the right call from the perspective of a developer 😃 Turn everything that blocks network traffic off, still not working..? Go on vacation for a week. If the problem still exist when back rebuild everything.
Avatar
well prob should rebuild everything even if it works as the machines now probably compromised 😛
6:42 PM
if you turned off every firewall lol
Avatar
Haha 😛 Maybe skip the inbound hardware firewall.
Avatar
how i can convert the data of dino in cryo in a APrimalDinoCharacter?
1:36 AM
c++ `FCustomItemData ItemData; if (!cryopod->GetCustomItemData(FName("Dino", EFindName::FNAME_Find), &ItemData)) { return; }
Avatar
or where i can find the DinoID in "ItemData"
Avatar
Avatar
Loki
or where i can find the DinoID in "ItemData"
The id is not one of the properties that get saved in the custom item data. You have to get it from the serialized dino data in CustomDataBytes.ByteArrays which is not as easy. The game uses this byte array to recreate the dino by calling APrimalDinoCharacter::SpawnFromDinoData which in turn uses UObjectSerializer::DeSerializeObject to deserialize the data and spawn the dino.
Avatar
RIO (Александр) 5/13/2023 8:10 AM
Maybe, u can spawn dino from data with APrimalDinoCharacter::SpawnFromDinoData at 0 0 0 coords, get it IDs and destroy 79
Avatar
RIO (Александр) 5/13/2023 11:48 AM
hello everyone. does anyone know what else can be checked in this case? players load mods, a map, but at the very end they are kicked with such an error. I tried to look at the check in AShooterGameMode with Hook_AShooterGameMode_IsPlayerAllowedToJoinNoCheck, but it returns true there. At what point does the server disconnect the player?
Avatar
Avatar
RIO (Александр)
hello everyone. does anyone know what else can be checked in this case? players load mods, a map, but at the very end they are kicked with such an error. I tried to look at the check in AShooterGameMode with Hook_AShooterGameMode_IsPlayerAllowedToJoinNoCheck, but it returns true there. At what point does the server disconnect the player?
AGameSession::ApproveLogin references that string. It calls AGameSession::AtCapacity and shows that message if the result is non-zero. (edited)
Avatar
Avatar
Tobias
AGameSession::ApproveLogin references that string. It calls AGameSession::AtCapacity and shows that message if the result is non-zero. (edited)
RIO (Александр) 5/13/2023 5:08 PM
79 thanks. that is, if AtCapacity returned true, then it will write Server Full? (edited)
5:09 PM
I can't understand at all why players get such an error
Avatar
Yeah. I though it returned a char but it's a bool.
5:11 PM
What the heck, now it's a char again :p Either way, if it returns anything but zero.
Avatar
Avatar
Tobias
What the heck, now it's a char again :p Either way, if it returns anything but zero.
RIO (Александр) 5/13/2023 5:14 PM
do you know what this function does?
Avatar
Avatar
Tobias
Yeah. I though it returned a char but it's a bool.
IDA does it's best to infer the type. This will lead to some incorrect guesses. You are supposed to help guide it along. Most likely it is a bool.
Avatar
Avatar
Frigoff
IDA does it's best to infer the type. This will lead to some incorrect guesses. You are supposed to help guide it along. Most likely it is a bool.
Yeah. It was just funny to see it jump between bool and char every other time.
Avatar
It does this because IDA doesn't decompile and analyze every function as that would take a very long time. Instead they do it the lazy way and decompile what you ask them to. Which can lead to wrong results. As you decompile more and more functions it will lead to more correct results. You can force this to happen but it takes a very long time.
Avatar
RIO (Александр) 5/13/2023 5:19 PM
in ue5.1 docs it looks like this virtual bool AtCapacity
Avatar
As you're decompiling it's making up to date guesses
Avatar
Avatar
RIO (Александр)
do you know what this function does?
Not in detail. But it checks AGameSession::MaxPlayers and AGameSession::MaxSpectators. Calls IOnlineSession::GetNumConnectedPlayersExcludingAuthToken
Avatar
Avatar
Frigoff
As you're decompiling it's making up to date guesses
The behavior is just weird in this case because I can jump between two functions and it will change the return type every time. So it goes bool then char, then bool, then char, and so on. (edited)
Avatar
Avatar
Tobias
Not in detail. But it checks AGameSession::MaxPlayers and AGameSession::MaxSpectators. Calls IOnlineSession::GetNumConnectedPlayersExcludingAuthToken
RIO (Александр) 5/13/2023 5:25 PM
79 thank you. you've been very helpful. may I ask how you knew that?)
Avatar
Avatar
RIO (Александр)
79 thank you. you've been very helpful. may I ask how you knew that?)
Just decompiling in IDA and with the debug information from the pdb.
Avatar
Avatar
Tobias
Not in detail. But it checks AGameSession::MaxPlayers and AGameSession::MaxSpectators. Calls IOnlineSession::GetNumConnectedPlayersExcludingAuthToken
RIO (Александр) 5/13/2023 5:40 PM
and the server may not perform this check? I don't remember this happening before. it completely ignores the white list 79
Avatar
Avatar
RIO (Александр)
and the server may not perform this check? I don't remember this happening before. it completely ignores the white list 79
The decompilation is pretty bad so you'd have to spend a lot more time to figure out the details and specifically what all the vtable pointers are. Is whitelist supposed to be able to ignore max players?
7:31 PM
If you have not decompiled things with IDA before. This is what it looks like: https://pastebin.com/096DAjwP
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Avatar
Avatar
Tobias
The decompilation is pretty bad so you'd have to spend a lot more time to figure out the details and specifically what all the vtable pointers are. Is whitelist supposed to be able to ignore max players?
RIO (Александр) 5/13/2023 7:31 PM
maybe. its AllowPlayerToJoinNoCheck. I think, before load mods call bool IsPlayerAllowedToJoinNoCheck` and if a player is not added to the AllowPlayerToJoinNoCheck.txt, the number of players is checked. If added, it is not executed. Previously, everything was fine, but now even if I added a player to the AllowPlayerToJoinNoCheck.txt, he can download mods, but when connected, he disconnected it with the error that he threw above "server full"
Avatar
Avatar
Tobias
If you have not decompiled things with IDA before. This is what it looks like: https://pastebin.com/096DAjwP
RIO (Александр) 5/13/2023 7:33 PM
oh... thanks
7:34 PM
I tried hook AGameSession::AtCapacity with API, but have crash 😦
Avatar
How do you hook it?
Avatar
Avatar
Tobias
How do you hook it?
RIO (Александр) 5/13/2023 7:39 PM
I found in HookCreator. bool AtCapacity(bool bSpectator, FString* AuthToken) { return NativeCall<bool, bool, FString*>(this, "AGameSession.AtCapacity", bSpectator, AuthToken); } GameState.h
7:40 PM
and it first in stack after crash ShooterGameServer.exe!AGameSession::AtCapacity() (0x00007ff6f72a8dab) + 11 bytes [f:\build\lostisland\engine\source\runtime\engine\private\gamesession.cpp:214]
Avatar
Avatar
Tobias
If you have not decompiled things with IDA before. This is what it looks like: https://pastebin.com/096DAjwP
RIO (Александр) 5/13/2023 7:41 PM
but here I see UNetConnection arg char __fastcall AGameSession::AtCapacity(AGameSession *this, bool bSpectator, const FString *AuthToken, UNetConnection *Connection)
Avatar
Yeah. It's probably out of date. c++ DECLARE_HOOK(AGameSession_AtCapacity, bool, AGameSession*, bool, const FString*, UNetConnection*); bool Hook_AGameSession_AtCapacity(AGameSession* _this, bool bSpectator, const FString* AuthToken, UNetConnection* Connection) { return AGameSession_AtCapacity_original(_this, bSpectator, AuthToken, Connection); }
Avatar
RIO (Александр) 5/13/2023 7:44 PM
I`ll test it
7:44 PM
25
Avatar
Avatar
Tobias
If you have not decompiled things with IDA before. This is what it looks like: https://pastebin.com/096DAjwP
RIO (Александр) 5/13/2023 7:45 PM
I need to learn how to do xD it's very useful
Avatar
Yeah, have to decompile to figure out how things work 🙂
Avatar
Avatar
Tobias
Yeah. It's probably out of date. c++ DECLARE_HOOK(AGameSession_AtCapacity, bool, AGameSession*, bool, const FString*, UNetConnection*); bool Hook_AGameSession_AtCapacity(AGameSession* _this, bool bSpectator, const FString* AuthToken, UNetConnection* Connection) { return AGameSession_AtCapacity_original(_this, bSpectator, AuthToken, Connection); }
RIO (Александр) 5/13/2023 8:00 PM
crash Fatal error! VERSION: 357.18 ShooterGameServer.exe!AGameSession::AtCapacity() (0x00007ff737ad8dab) + 11 bytes [f:\build\lostisland\engine\source\runtime\engine\private\gamesession.cpp:214] AdminFastCommands.dll!Hook_AGameSession_AtCapacity() (0x00007ff96387e3ae) + 0 bytes [C:\Projects\Plugins\AdminFastCommands\Hooks.cpp:11] ShooterGameServer.exe!AGameSession::ApproveLogin() (0x00007ff737ad87e7) + 30 bytes [f:\build\lostisland\engine\source\runtime\engine\private\gamesession.cpp:121] AdminFastCommands.dll!Hook_AGameSession_ApproveLogin() (0x00007ff96387e4a0) + 9 bytes [C:\Projects\Plugins\AdminFastCommands\Hooks.cpp:18] ShooterGameServer.exe!AShooterGameSession::ApproveLogin() (0x00007ff7363a0a60) + 359 bytes [f:\build\lostisland\projects\shootergame\source\shootergame\private\shootergamesession.cpp:566] ShooterGameServer.exe!AGameMode::PreLogin() (0x00007ff737ad04c2) + 39 bytes [f:\build\lostisland\engine\source\runtime\engine\private\gamemode.cpp:1289] ShooterGameServer.exe!AShooterGameMode::PreLogin() (0x00007ff73630feb2) + 0 bytes [f:\build\lostisland\projects\shootergame\source\shootergame\private\shootergamemode.cpp:2962] ...
8:00 PM
Cat_sad
8:01 PM
maybe it return char? XD
Avatar
nah
8:03 PM
your sig is correct
8:04 PM
bool __fastcall AGameSession::AtCapacity(AGameSession *this, bool bSpectator, const FString *AuthToken, UNetConnection *Connection)
Avatar
RIO (Александр) 5/13/2023 8:04 PM
79
Avatar
Added any code in the hook?
Avatar
Avatar
Tobias
Added any code in the hook?
RIO (Александр) 5/13/2023 8:09 PM
yes
Avatar
Attach a debugger
8:09 PM
To the server
8:09 PM
You should see what the underlying crash is
8:09 PM
You can attach Visual Studio debugger to the server process
Avatar
RIO (Александр) 5/13/2023 8:10 PM
yeah. I'll start debugging now
Avatar
RIO (Александр) 5/13/2023 8:26 PM
79
8:26 PM
at local server no crash (edited)
8:29 PM
at host - crash... (edited)
Avatar
Sure you got the same version of the plugin on both?
Avatar
Avatar
Tobias
Sure you got the same version of the plugin on both?
RIO (Александр) 5/13/2023 8:43 PM
yes
8:43 PM
ctrl+c -> ctrl+v
Avatar
I got nothing sorry 😐 It doesn't make any sense.
Avatar
Avatar
RIO (Александр)
yes
What is the code you added?
Avatar
Avatar
Tobias
What is the code you added?
RIO (Александр) 5/13/2023 9:09 PM
bool Hook_AGameSession_AtCapacity(AGameSession* _this, bool bSpectator, const FString* AuthToken, UNetConnection* Connection) { auto Result = AGameSession_AtCapacity_original(_this, bSpectator, AuthToken, Connection); Log::GetLog()->info("AGameSession::AtCapacity called!"); Log::GetLog()->info("Result: {}", Result); return Result; }
9:10 PM
at my PC it work. at server on host it doesnt work
9:13 PM
line 11. it is result
Avatar
Everything looks fine there.
9:16 PM
Are you running the same version on your local server? 357.18
Avatar
RIO (Александр) 5/13/2023 9:16 PM
357.18
9:17 PM
the same is installed on the host
Avatar
Avatar
Tobias
Everything looks fine there.
RIO (Александр) 5/13/2023 9:20 PM
omg... I turned off the on timer callback in the plugin and it worked. whaaaaaat?
Avatar
A timer callback completely unrelated to the login stuff?
Avatar
RIO (Александр) 5/13/2023 9:23 PM
yes
9:24 PM
I just do this
9:24 PM
xD
Avatar
Maybe some threading issue.
Avatar
Avatar
WETBATMAN
if (!dinoConf["AttackSpeedModifiers"].empty()) { for (auto &element : dinoConf["AttackSpeedModifiers"]) { _this->AttackInfosField()[element["Index"].get<int>()].RiderAttackIntervalField() = element["AttackSpeed"].get<float>(); } }
how i can get AttackInfos? when i execute this code auto& attacks = dino->AttackInfosField(); Log::GetLog()->info("attacks: {}", attacks.Num()); for (FDinoAttackInfo& attack : attacks) { Log::GetLog()->info("attack stamina cost: {}", attack.StaminaCostField()); } i get only the first value, others contain bullshit
Avatar
Avatar
AHTUxPK
how i can get AttackInfos? when i execute this code auto& attacks = dino->AttackInfosField(); Log::GetLog()->info("attacks: {}", attacks.Num()); for (FDinoAttackInfo& attack : attacks) { Log::GetLog()->info("attack stamina cost: {}", attack.StaminaCostField()); } i get only the first value, others contain bullshit
The problem is that FDinoAttackInfo is not the correct size so the second offset will be trash. You would have to get the size of the struct and then manually offset the pointer or something like that. There are helpers for getting the real size of a struct. See https://discord.com/channels/513432877904691202/513822201145982976/925546807159824456 (edited)
👍 1
Avatar
Technically he is using the pdb reader so the offsets should not be the issue I believe
Avatar
Maybe the api has changed from what I am currently using
Avatar
Avatar
Pelayori
Technically he is using the pdb reader so the offsets should not be the issue I believe
Not on the loop
8:32 PM
auto& attacks = dino->AttackInfosField(); read from PDB attacks.Num() Is accurate (read from PDB) Log::GetLog()->info("attack stamina cost: {}", attack.StaminaCostField()); read from PDB, accurate as long as attack is accurate
8:33 PM
for (FDinoAttackInfo& attack : attacks) { } is the iterator version of for(int i = 0; i < attacks.Num(); ++i) { }
8:33 PM
if the underlying type of auto& attacks = dino->AttackInfosField(); is TArray and is not read/sized correctly then
8:34 PM
attacks[n] n > 0 can produce garbage
8:37 PM
The reason for this is for(int i = 0; i < attacks.Num(); ++i) { auto this_attack = attacks[i]; } where attacks[i] produces *(attacks + i) which is actually result = *(address of attacks + sizeof(FDinoAttackInfo) * i) (edited)
8:37 PM
I'm willing to bet sizeof(FDinoAttackInfo) is not accurate
Avatar
Something like this probably. c++ static int FDinoAttackInfoStructSize = GetStructSize<FDinoAttackInfo>(); auto& attacks = dino->AttackInfosField(); Log::GetLog()->info("attacks: {}", attacks.Num()); auto ptr = reinterpret_cast<char*>(&attacks[0]); for (int i = 0; i < attacks.Num(); i++) { auto attack = reinterpret_cast<FDinoAttackInfo*>(ptr + i * FDinoAttackInfoStructSize); Log::GetLog()->info("attack stamina cost: {}", attack->StaminaCostField()); }
🫶 1
Avatar
Avatar
Tobias
Something like this probably. c++ static int FDinoAttackInfoStructSize = GetStructSize<FDinoAttackInfo>(); auto& attacks = dino->AttackInfosField(); Log::GetLog()->info("attacks: {}", attacks.Num()); auto ptr = reinterpret_cast<char*>(&attacks[0]); for (int i = 0; i < attacks.Num(); i++) { auto attack = reinterpret_cast<FDinoAttackInfo*>(ptr + i * FDinoAttackInfoStructSize); Log::GetLog()->info("attack stamina cost: {}", attack->StaminaCostField()); }
it worked, thanks
Avatar
Avatar
AHTUxPK
it worked, thanks
above explanation is why
👍 1
Avatar
I'm new to C++ and was looking into making a plugin that uses MySQL. Are there any recommended ways of doing this? Or anything i should avoid? I'm pretty sure it would need to be done asynchronously, but not sure. Any recommendations?
Avatar
@Necronym yeah thats part im working through, lot of the plugins with example are doing it on main thread, but bringing in threads introduces new complications of needing a connection pool and the lib everyone uses doesnt have it, so im trying to get a pool going myself.
Avatar
hey, any know whats the hook of rex tek saddle fire? I would like search it in the devkit but its 400+gb and I had to uninstall it
Avatar
We saw your question the 3 times you posted it 🙂
1:22 AM
Maybe no one knows exactly
1:23 AM
Try yourself hookin dino attack, or maybe you have to download devkit 😉 (edited)
Avatar
Avatar
Pelayori
We saw your question the 3 times you posted it 🙂
i posted it on Discussion-I but i saw than this is the channel where people do more questions, so i send the message here too, sorry.
Avatar
Avatar
Pelayori
Try yourself hookin dino attack, or maybe you have to download devkit 😉 (edited)
Yes i was looking for attack hooks or shoot in APrimalDinoCharacter but i dont found a hook for rex tek fire proyectiles
1:38 AM
I think I'm going to have to buy another hdd disk and download the devkit (edited)
Avatar
Avatar
Necronym
I'm new to C++ and was looking into making a plugin that uses MySQL. Are there any recommended ways of doing this? Or anything i should avoid? I'm pretty sure it would need to be done asynchronously, but not sure. Any recommendations?
Server Plugins for ARK: Server API. Contribute to ServersHub/Ark-Server-Plugins development by creating an account on GitHub.
1:56 AM
permissions has a pretty good example of async mysql
👍 1
Avatar
@WETBATMAN i dont see anything async in that entire file
3:58 PM
i see a ton of db queries being executed outside of a mutex here
4:00 PM
it is not safe to use same connection over multiple threads concurrently.permissions is prob just low volume enough to not be bit by it and most of it is probably hitting all on main thread.
4:00 PM
to safely do mysql concurrently you need a connection per thread
4:00 PM
which is why im trying to do a pool
4:01 PM
on mysql access, obtain connection from pool, the pool itself is thread safe, do queries, return it to pool.
Avatar
I'm just here struggling to get MYSQL connector to work within my project lmao. bob moment
Avatar
that file is a good example for that
4:02 PM
the mysql++ lib isnt bad, though there is a newer version than what lot of these plugins have, i had the newer version working in my plugin
4:03 PM
i had found some nicer solutions but they dont support windows 😦
Avatar
I can get mysql connector to work within an empty C++ project, but when i build it within my plugin project it creates errors. (edited)
Avatar
what was the error, did you copy connector C from that plugin or download it yourself?
4:04 PM
there was some issues with the winsock2 stuff that was hack patched in some of those
Avatar
Avatar
Aikar
what was the error, did you copy connector C from that plugin or download it yourself?
downloaded it myself and tried following this tutotrial. https://www.youtube.com/watch?v=a_W4zt5sR1M&pp=ygUVdmlzdWFsIHN0dWRpbyBteXNxbCsr new to C++ so this is a bit above my head ngl.
Avatar
Avatar
Aikar
@WETBATMAN i dont see anything async in that entire file
write requests are async and reads are performed from cache
Avatar
yeah key thing here is ensuring connector c is in include and library paths, the #include lib file is in place, and the mysql++ file is in place. you can prob copy the files from one of those plugins to get it right
4:06 PM
@WETBATMAN so ultimately the thread contexts are done outside of that file?
4:07 PM
though most risks come from transactions and it doesnt seem like this code is using them any, so prob also why it ends up safer
4:11 PM
but man i have so much db queries going on in my minecraft code and tons and tons of transactions, tons of concurrent queries risk, this kind of code would have blown up on me lol
4:14 PM
https://github.com/ServersHub/Ark-Server-Plugins/blob/master/Permissions/Permissions/Private/Database/MysqlDB.h#L214 like this method, it is not thread safe, nor multiple server safe. lot of issues with this code running in a cluster where multiple servers could change the data, can result in a lot of desync risk
Avatar
I find it strange that there is very limited tutorials for c++ and mysql.
4:14 PM
sad
Avatar
yeah because people who had the objective to make a friendlier ecosystem did it as different languages lol
4:16 PM
I'm a Senior Software Architect, been doing this for 20 years, and this shits even making me scream on whys it gotta be this complicated. CMake seems to be trying to improve things at least, but its still nowhere near as easy as other ecosystems
4:16 PM
made me consider looking into Rust to see what its like there
4:16 PM
even windows is rewriting the core OS to rust now
Avatar
Avatar
Aikar
even windows is rewriting the core OS to rust now
i did not know that
4:17 PM
interesting
4:18 PM
https://dev.mysql.com/downloads/connector/cpp/ This is the correct MYSQL connector right?
Avatar
for the mysql++ you need the C version
4:18 PM
i was considering looking at the cpp connector though since it does include a pool
4:19 PM
the mysql++ was a single header file wrapper api around the connector
4:19 PM
to simplify some things
Avatar
look at the link wetbatman gave, copy the file out of the repo
4:20 PM
but yes it is that one i believe
Avatar
Not CMake 😩
4:20 PM
Stands for cry while making
Avatar
ive not ran into issues with it so far lol (edited)
Avatar
I used it for the first time like a month ago
4:21 PM
I was so confused lol
4:21 PM
babytype
Avatar
yeah of course itll be a learning curve
4:22 PM
https://gist.github.com/aikar/7ff0a9360246dd80c68b0a3a33b7aff9 was a previous working state i had, mines changed a bit since of course lol
GitHub Gist: instantly share code, notes, and snippets.
4:22 PM
but its nice just having all your build configuration details in a clear to read file
4:22 PM
easier to copy to setup new projects
4:23 PM
i have clion that invokes cmake to build then visual studio to link
4:23 PM
then it invokes a script file to auto upload with scp the binary to my server so i can then copy it into test server
4:24 PM
im a huge jetbrains fan so visual studio was eating me alive in productivity being different, switching to clion let me focus on code/project rather than IDE
Avatar
@Aikar This has a section that mentions how to do connection pools with threads, with some example code. https://tangentsoft.com/mysqlpp/doc/html/userman/threads.html
4:36 PM
Not sure if this is what you're after
Avatar
@Necronym lol now i dont believe that link is same thing as what people are using in plugins
4:40 PM
yeah namespace is different
4:41 PM
Lightweight header-only wrapper for MySQL with simple and convenient usage in modern C++ (C++11 or later) - GitHub - daotrungkien/mysql-modern-cpp: Lightweight header-only wrapper for MySQL with si...
Avatar
loosing my mind here lol
Avatar
yeah its a disaster
4:43 PM
well mainly the fact you got so much cross os dep issues too, i found some decent looking solutions, doesnt support windows lol
Avatar
i thought the entire point of C++ was that it was readable by most things
4:43 PM
i miss c# :V
Avatar
jraServerAPI 5/15/2023 4:44 PM
1529_pepe_ok
👌 1
4:45 PM
dm me Necro, i can try to help you with your mysql problem if you want, no promises tho 😆
Avatar
i think they are just working through project setup issues in general
Avatar
Avatar
jraServerAPI
dm me Necro, i can try to help you with your mysql problem if you want, no promises tho 😆
will do ty
Avatar
but yeah im not much help there either since idont even use visual studio, im in reverse boat of cant ask for much help since i do things diff than everyone else 😛
Avatar
jraServerAPI 5/15/2023 4:46 PM
4:46 PM
😛
Avatar
because clion 😛
4:46 PM
and i like the style better
👍 1
4:47 PM
scripted build systems are nice, vs really should move to it
Avatar
jraServerAPI 5/15/2023 4:47 PM
I'll talk to Bill
Avatar
moving java from maven xml to gradle groovy/kotlin was huge improvement too
4:48 PM
being able to write code to build your code
Avatar
jraServerAPI 5/15/2023 4:49 PM
sounds cool.. i love automation 🙂
Avatar
heres copy of my mysql+++.h that i had patched to work in modern env w/o errors: https://gist.github.com/aikar/e7bac07b9ff269ad4fe2327c1d15c962
GitHub Gist: instantly share code, notes, and snippets.
4:57 PM
using the latest 1.2 version off their repo
4:57 PM
you need that polyfill folder off the repo too
4:58 PM
Lightweight header-only wrapper for MySQL with simple and convenient usage in modern C++ (C++11 or later) - mysql-modern-cpp/mysql+++ at master · daotrungkien/mysql-modern-cpp
5:00 PM
i made a libs folder, tossed polyfill and that .h file in it, added libs to include path, added mysql c connector latest from mysql site to the libs folder, then also added libs/mysql to the include path: target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/ARK-Server-API/version/Core/Public;" "${CMAKE_CURRENT_SOURCE_DIR}/.;" "${CMAKE_CURRENT_SOURCE_DIR}/libs;" "${CMAKE_CURRENT_SOURCE_DIR}/libs/mysql;"
🍻 1
5:01 PM
think also need the mysql connector c .lib file too, which i tossed into libs target_link_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/ARK-Server-API/out_lib" "${CMAKE_CURRENT_SOURCE_DIR}/libs" )
5:01 PM
think thats the key things to getting it working
Avatar
and thats why i like cmake, its very clear what instructions the build tool is receiving to make things work, vs vstudio its mixed over multiple GUI's and who knows what in the XML File, and i wouldnt trust just copying snippets out of the XML anyways.
5:14 PM
i think vstudio can use cmake too, so its also portable to let the dev chose their IDE vs forcing vstudio 😛
5:15 PM
windows devs are just so used to vstudio i guess its not usually a concern/consideration though. but man coming from so many other languages, tooling choice is key
Avatar
how to get server ip address?
Avatar
Avatar
SR
how to get server ip address?
Would the server even know? It is probably bound to an internal ip. Suppose you could use Steam Source API to get it.
Avatar
Avatar
SR
how to get server ip address?
make a request to https://api.ipify.org
5:52 PM
but yeah internal ips can be NAT or bound 0.0.0.0 so crawling external detection is best, but in complex network setups that can be messy, but the real question is, what are you doing @SR ? maybe what your doing shouldnt be using external ip, as people keep telling people to set the IP explicitly on the server launch and thats really bad practice to be doing, but it seems like people are telling people to do that because somethings maybe are setup to almost require it
5:53 PM
RCON Should never be going over the public network, and should be firewalled off, so if you're wanting it for RCON, you are going down wrong path
Avatar
Avatar
Aikar
RCON Should never be going over the public network, and should be firewalled off, so if you're wanting it for RCON, you are going down wrong path
RCON should be lan only and accessed remotely over vpn
6:53 PM
Same with any sensitive stuff
Avatar
That's what I was meaning
Avatar
My home network is extremely firewalled haha
6:54 PM
My firewall only allows cloudflare ips through to my web server
6:54 PM
Game servers are proxied via wireguard and a gateway on OCI
6:55 PM
I did recently actually migrate some to a local vps to reduce in round trip latency
6:55 PM
What’s an extra 20 ms
6:55 PM
kekw
Avatar
i had someone tell me 'its a game server stop worrying about security' when i complained about ASM opening rcon to outside world
6:59 PM
it adds firewall rules to open it, then they encourage everyone to use the configuration to expose it
Avatar
There’s a lot of people that consider convenience more important than security
7:01 PM
These people are all wrong
7:02 PM
Minimum attack surface is like rule 1
Avatar
im slowly dismantling my need of ASM, atm its mainly handling updates for me.
7:24 PM
but to get server launched i didnt want to have to wait to build tooling to just even get it going so i went with it. (edited)
Avatar
i cant figure out what im doing wrong, every docs i see for boost lockfree stack it says to use it this way
2:41 AM
oh ffs i imported queue
2:42 AM
of course i figure it out soon as i paste it lol
2:42 AM
why the hell was it still coming out like that though, weird
2:43 AM
though prob better to do a FIFO queue so the connections cycle through
Avatar
hey, i have a question, how i can use hook with mods? I want to hook the deploy of soul traps in Dino Storage Mod
4:51 AM
I didn't find a documentation of the mod for that
Avatar
Avatar
substitute
These people are all wrong
I've had a couple "run ins" with the convenience vs security dilema while hosting servers for ark. I can promise anybody who doubts it, attackers are actively scanning ark servers at all times for vulnerabilities. be very careful out there lol
Avatar
Avatar
Loki
hey, i have a question, how i can use hook with mods? I want to hook the deploy of soul traps in Dino Storage Mod
You would have to hook the ufunction calls if any exist. It's more complex than creating hooks for compiled functions, but there is a bunch of examples here if you search for "ufunction". You'd also have to get the function names, indices, arguments etc. For that you could probably use TheMollusks Blueprint dump function from here: https://discord.com/channels/513432877904691202/513432877904691205/1058957205761687632
Avatar
got me a good pool class going now hope to wrap up tonight after i verify it doesnt blow up lol
4:02 PM
but might as well drop boost since i was trying to use lockfree to avoid ever even using a mutex, but mysql+++ uses a mutex lol
4:04 PM
as locks do have all kinds of hidden costs to settle memory state, dunno how much from java translates to native envs like C++, but i recall someone mentioning cpu level caches could be cleared. (edited)
Avatar
How to check if there's any obstacle between two objects?
Avatar
LineTrace
Avatar
Avatar
Frigoff
LineTrace
where it is?
12:06 PM
and what collision channel should be used?
Avatar
Avatar
SR
and what collision channel should be used?
ECC_WorldDynamic or ECC_WorldStatic probably.
Avatar
Is API::Timer::Get().RecurringExecute know to cause crashes? I am adding the log into a queue and sending over a rest request. I am getting a few odd crashed like this
1:15 PM
ShooterGameServer.exe!TSet<TPair<FName,UCanvas * ptr64>,TDefaultMapKeyFuncs<FName,UCanvas * ptr64,0>,FDefaultSetAllocator>::FindId() (0x00007ff657b66f9e) + 8 bytes [f:\build\lostisland\engine\source\runtime\core\public\containers\set.h:505] ShooterGameServer.exe!UClass::FindFunctionByName() (0x00007ff6597a42e4) + 20 bytes [f:\build\lostisland\engine\source\runtime\coreuobject\private\uobject\class.cpp:3563] ShooterGameServer.exe!UObject::FindFunction() (0x00007ff6597dfb3d) + 0 bytes [f:\build\lostisland\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:798] ShooterGameServer.exe!AShooterPlayerController::ClientChatMessage() (0x00007ff658c11fbe) + 20 bytes [f:\build\lostisland\projects\shootergame\intermediate\build\win64\shootergameserver\inc\shootergame\shootergame.generated.1.cpp:5802] KalsCrossChat.dll!UnknownFunction (0x00007fffcf59c194) + 0 bytes [UnknownFile:0]
Avatar
Avatar
Uaca
ShooterGameServer.exe!TSet<TPair<FName,UCanvas * ptr64>,TDefaultMapKeyFuncs<FName,UCanvas * ptr64,0>,FDefaultSetAllocator>::FindId() (0x00007ff657b66f9e) + 8 bytes [f:\build\lostisland\engine\source\runtime\core\public\containers\set.h:505] ShooterGameServer.exe!UClass::FindFunctionByName() (0x00007ff6597a42e4) + 20 bytes [f:\build\lostisland\engine\source\runtime\coreuobject\private\uobject\class.cpp:3563] ShooterGameServer.exe!UObject::FindFunction() (0x00007ff6597dfb3d) + 0 bytes [f:\build\lostisland\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:798] ShooterGameServer.exe!AShooterPlayerController::ClientChatMessage() (0x00007ff658c11fbe) + 20 bytes [f:\build\lostisland\projects\shootergame\intermediate\build\win64\shootergameserver\inc\shootergame\shootergame.generated.1.cpp:5802] KalsCrossChat.dll!UnknownFunction (0x00007fffcf59c194) + 0 bytes [UnknownFile:0]
It looks like function does not exist.
2:26 PM
or just not found/included.
Avatar
jraServerAPI 5/18/2023 9:08 PM
Would anyone (that is somewhat seasoned with the API) like to collaborate on a project with me? I have a couple really cool plugin ideas that I would love to get working on but I think It would be easier with some help 🙂 Anyway, send me a DM if you are interested at all and we can discuss 🙂 thanks!
This 1
Avatar
Had a weird bug just now where c++ API::Timer::Get().DelayExecute()didn't seem to run on some maps, but on others it ran fine. I've changed up my code to hook onto "AShooterGameMode.InitGame" and that seems to have fixed it.. i think lol. Just wondered if anybody would happen to know anything about that. From what i read from checking this discord (albeit briefly) DelayExecute is supposed to run when the server is ready anyway right?
Avatar
it's supposed to be ran after the timer callbacks start which is after the server is ready, yeah
Avatar
Avatar
WETBATMAN
it's supposed to be ran after the timer callbacks start which is after the server is ready, yeah
Weird, it's probably my code lol. I'll mention if i find anything else out lol.
Avatar
Hello, does anyone know if it's possible to know if a player is in asgard for example? getting the name or class of the level or something? or if it's inside a specific cave
Avatar
Avatar
RMod
Hello, does anyone know if it's possible to know if a player is in asgard for example? getting the name or class of the level or something? or if it's inside a specific cave
I dunno about Fjordur and Asgard specifically but you can get the name of a level like this: c++ AActor* actor = ...; FVector pos; FString biomeZoneName = ""; actor->RootComponentField()->GetWorldLocation(&pos); auto GetBiomeZoneVolume = [](UWorld* World, const FVector* Location) { return NativeCall<ABiomeZoneVolume*, UWorld*, const FVector*>(nullptr, "ABiomeZoneVolume.GetBiomeZoneVolume", World, Location); }; ABiomeZoneVolume* biome = GetBiomeZoneVolume(ArkApi::GetApiUtils().GetWorld(), &pos); if (biome != nullptr) { biomeZoneName = (*GetNativePointerField<FString*>(biome, "ABiomeZoneVolume.BiomeZoneName")); } (edited)
Avatar
is there a way to cancel the CreatePostRequest? it looks like it will crash the game if the plugin is unloaded and there is still requests to com complete !
Avatar
Duster_drUAGON 5/20/2023 11:12 PM
Hi i was wondering if anyone could help me, i have no idea on how to resolve this issue. I have an FString variable as you can see this correspond to this->config.orderReceivedText and you'll be able to see that i'm trying to write the content of the variables to a file but i can't manage to write it correctly. Sometimes this variable will have some content in UTF-8 and i'll need of course to save the content of this FString in utf-8 and here is what currently happening : àèùéâîôûêçû😀 -> ?????????????????????????? How can i write the content of an FString in utf-8 in a file? c++ this->config.orderReceivedText = FString(startup_config["my_text"].get<std::string>()); //debugging stuff... std::ofstream debugUTF(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/MyPlugin/debug.txt"); debugUTF << this->config.orderReceivedText.ToString(); debugUTF.close(); //debugging stuff
Avatar
Avatar
Duster_drUAGON
Hi i was wondering if anyone could help me, i have no idea on how to resolve this issue. I have an FString variable as you can see this correspond to this->config.orderReceivedText and you'll be able to see that i'm trying to write the content of the variables to a file but i can't manage to write it correctly. Sometimes this variable will have some content in UTF-8 and i'll need of course to save the content of this FString in utf-8 and here is what currently happening : àèùéâîôûêçû😀 -> ?????????????????????????? How can i write the content of an FString in utf-8 in a file? c++ this->config.orderReceivedText = FString(startup_config["my_text"].get<std::string>()); //debugging stuff... std::ofstream debugUTF(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/MyPlugin/debug.txt"); debugUTF << this->config.orderReceivedText.ToString(); debugUTF.close(); //debugging stuff
FString is UTF-16
11:17 PM
You need to convert to UTF-8
Avatar
Duster_drUAGON 5/20/2023 11:17 PM
Which function converts it to UTF-8?
Avatar
You’ll have to write your own most likely
Avatar
I think you can use API::Tools::Utf8Encode
11:48 PM
Or you could also use a utf16 stream
Avatar
Avatar
Pelayori
I think you can use API::Tools::Utf8Encode
Duster_drUAGON 5/21/2023 12:19 PM
Thank you very much it happened to be the solution it works perfectly now
Avatar
Hey guys! Im a new ark plugins developer and I'm pretty excited to start making plugins, I already have some ideas. Is there a tutorial to get started?
Avatar
Duster_drUAGON 5/23/2023 2:52 PM
Hi i'm having a new issue i know this one is more related to classic c++ issue but i have no idea why my program keep crashing here is all the parts of code which is related to this variables (By the way i've set the compiler to C++20) MyClass.h std::vector<std::unique_ptr<int>> customers; MyClass.cpp std::unique_ptr<int> new_customer = std::make_unique<int>(5); this->customers.push_back(std::move(new_customer)); i've made a new c++ console program to see if the issue is related to my code but on plain c++ it works just fine. (It's not a compilation error by the way my program just crash when calling this->customers.push_back(std::move(new_customer));) (edited)
2:57 PM
3:01 PM
Oh!
Avatar
std::unique_ptr cannot be moved Well yeah :p (edited)
3:01 PM
I was gonna reply
Avatar
Duster_drUAGON 5/23/2023 3:01 PM
Then it that case i will use shared_ptr?
Avatar
shared pointer can be moved, and copied etc as far as I'm concerned
3:02 PM
unique ptr should be created, and not rellocated
Avatar
Duster_drUAGON 5/23/2023 3:03 PM
Well thank you very much for the quick reply and for enlightening me i've forgot that unique_ptr weren't allowed to be moved it seems like today isn't a smart day for me
Avatar
You can, however
3:03 PM
create a new unique ptr and pass it the old one, if that is what you want (edited)
3:03 PM
The copy constructor of unique ptr transfers the ownership from old pointer to the newly constructed one
3:04 PM
unique ptr means there cannot be more than 1 owner of the raw pointer, which copying would do as you were doing
Avatar
Duster_drUAGON 5/23/2023 3:05 PM
i knew that it was unique but i think i've fallen in the mistake that thinking std::move would "move" and not "copying"
Avatar
I'm not sure if I'm correct but what I think it's std move nulls it
Avatar
Duster_drUAGON 5/23/2023 3:11 PM
Well that's odd i've changed the container to shared_ptr and im still having the same exact issue c++ std::shared_ptr<int> new_customer = std::make_shared<int>(5); this->customers.push_back(new_customer);
Avatar
Not sure then
Avatar
Duster_drUAGON 5/23/2023 3:21 PM
I think the issue is competly different actually
3:21 PM
i've tried to log this->customers.size()
3:22 PM
and i know it's empty because there is not a single push
3:22 PM
but it printed me 18
Avatar
Avatar
Duster_drUAGON
Click to see attachment 🖼️
Can’t really help with an obscured crash stack
Avatar
Duster_drUAGON 5/23/2023 6:42 PM
I know but still thank you for trying, i appreciate all of your efforts i'm going to dig further and look up where the error comes from
Avatar
Hey guys, is there any way to hook when player press any key of keyboard and get the pressed key?
Avatar
jraServerAPI 5/23/2023 7:33 PM
i'm guessing no, that is client side only
7:33 PM
probably do it with a mod
Avatar
🐨Dream Doctor🦘 5/24/2023 6:04 AM
Wish we had something like this for Unreal games! https://github.com/kremnev8/UnityExplorer
An in-game UI for exploring, debugging and modifying IL2CPP and Mono Unity games. - GitHub - kremnev8/UnityExplorer: An in-game UI for exploring, debugging and modifying IL2CPP and Mono Unity games.
Avatar
Could write a server plugin that lets you inspect and modify the contents of the reflection system. ArkServerApi already partially supports accessing reflected properties, and dumping everything in reflection to text files is easy enough. Making it interactive in-game might be kind of painful with just text commands depending on what you want to do and also due to the volume of the reflection system contents. If you want a GUI, you'd pretty much need to couple the plugin with a mod (actually I bet you could basically do the whole thing in a mod with no plugin involved). (edited)
Avatar
Does anyone know the hook that check if flyers are allowed to fly? For example Fjordur area's
Avatar
Avatar
Natsu
Does anyone know the hook that check if flyers are allowed to fly? For example Fjordur area's
bool APrimalDinoCharacter::CanFly (edited)
💯 1
Avatar
Avatar
TheMollusk
Could write a server plugin that lets you inspect and modify the contents of the reflection system. ArkServerApi already partially supports accessing reflected properties, and dumping everything in reflection to text files is easy enough. Making it interactive in-game might be kind of painful with just text commands depending on what you want to do and also due to the volume of the reflection system contents. If you want a GUI, you'd pretty much need to couple the plugin with a mod (actually I bet you could basically do the whole thing in a mod with no plugin involved). (edited)
🐨Dream Doctor🦘 5/26/2023 6:20 AM
How amazing is this though! Just add this plugin to the client and this entire GUI interface is added to the game!
6:21 AM
I have no idea what any of it means, but it looks amazing! lol
Avatar
When setting bIsAdmin to true to a player would that be enough for them to use cheat commands? or should i do something more
Avatar
As far as I'm concerned, yes
Avatar
gave them the admin password now but new_player->bIsAdmin() = true; new_player->SetAdminIcon(true); ((APlayerController*)new_player)->EnableCheats("Passwordhere!"); Did not work atleast that's what they said did not test it myself yet 😄
Avatar
Pelayori, could you tell me how you made foundations turn red (not placeable) with your mod/plugin?
Avatar
Avatar
Natsu
Pelayori, could you tell me how you made foundations turn red (not placeable) with your mod/plugin?
I replicate the data I need, and then detect what structure is trying to place client side, and enable/disable collision at will on client
👍 1
Avatar
Avatar
Natsu
Pelayori, could you tell me how you made foundations turn red (not placeable) with your mod/plugin?
Where he did it?
7:47 PM
How do you make a small delay to execute something? I've tried with std::chrono but this one causes massive ping. std::chrono::milliseconds delayTime(430); auto startTime = std::chrono::high_resolution_clock::now(); while (true) { auto currentTime = std::chrono::high_resolution_clock::now(); auto elapsedTime = std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - startTime); if (elapsedTime >= delayTime) { // Function break; } }
7:48 PM
Delaying with inbuilt API timer doesn't allow me to use values that are not int.
7:48 PM
I need to do something like 0.45
Avatar
Avatar
SR
How do you make a small delay to execute something? I've tried with std::chrono but this one causes massive ping. std::chrono::milliseconds delayTime(430); auto startTime = std::chrono::high_resolution_clock::now(); while (true) { auto currentTime = std::chrono::high_resolution_clock::now(); auto elapsedTime = std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - startTime); if (elapsedTime >= delayTime) { // Function break; } }
7:54 PM
I use that for timers
Avatar
Avatar
Pelayori
I use that for timers
How is it used in a function?
Avatar
Tools::Timer::Get().DelayExec
Avatar
Strange crash from delayexec. void Hook_AShooterWeapon_BPFiredWeapon(AShooterWeapon* _this) { Tools::Timer::Get().DelayExec(shooted, 450, true, ArkApi::GetApiUtils().GetSteamIdFromController(_this->AssociatedPrimalItemField()->OwnerInventoryField()->GetOwnerController())); AShooterWeapon_BPFiredWeapon_original(_this); }
Avatar
you have to pass a pointer to the function
8:15 PM
&shooted
Avatar
and dont do it async
8:15 PM
High chances of not knowing what that can cause
Avatar
Avatar
Pelayori
&shooted
Thanks Pelayori, always the best!
Avatar
it will probably not be 450 ms exactly, as ticks do what they please lol
8:22 PM
but it will be near that
Avatar
Avatar
Pelayori
it will probably not be 450 ms exactly, as ticks do what they please lol
What if server goes hard with 5 TPS?
8:23 PM
That's what I'm afraid of, ticks are not stable.
8:23 PM
If diff is not that big then it is fine.
8:23 PM
but shouldn't be high from the main result (>20ms) (edited)
Avatar
5 tps = 200 ms per tick, so it would check every 200ms rather than 33ms
8:23 PM
(33ms in 30 tps)
Avatar
sooo if it goes under 5 tps we could get 600 ms instead of 450?
Avatar
you can check the internal of checks by doing 1000 / tps
8:24 PM
the result is time in ms between ticks
8:24 PM
aka, the delta time
Avatar
Avatar
Pelayori
aka, the delta time
Could it be used to do some stuff with it and minimise problems connected with tps?
Avatar
you could estimate the next delta time and if it's too late to execute the function you could force its execution
8:29 PM
like, if it's left 20ms, and the delta time is 0.2s, you could execute it rather than wait too much
Avatar
like deltatime = 1000 / tps if(deltatime > timeleft) Update()?
Avatar
Could do that yeah, but delta time is given to you on update function
8:31 PM
it's that float in the update
8:31 PM
but it's in seconds
Avatar
What could be done to properly check it? (edited)
8:32 PM
Is it required to be somewhere in your functions or edited in my? Did this if() inside update to check for next execution and if it is higher than required then force update it. if(function && now + std::chrono::milliseconds((int)round(deltatime * 1000)) > function->execTime && function->callback) (edited)
Avatar
Better to lose some ms in my case but if you know how to do it better I can try it. (edited)
Avatar
I mean I would not bother, it is not designed to be a real time timer anyways
8:46 PM
It's an aprox
Avatar
Avatar
SR
Where he did it?
see his plugins 🙂
Avatar
Duster_drUAGON 5/26/2023 9:09 PM
Hi it's great that you guys are talking about timer because i'm currently having this type of issue
9:09 PM
I've been trying to use this library for DelayExec
9:10 PM
so i have a function let's call it x() if i call it 10 times on main x(); it works perfectly fine BUT i don't know why when i'm calling x(); in DelayExec() it crashes because there is a member variable in my class which becomes null when using the timer
9:13 PM
by the way my member variable becomes null when reaching the callback of this function API::Requests::Get().CreateGetRequest(statusUrl,callbackBridge,HTTPHeaders);
Avatar
Then check for nulls?
Avatar
Duster_drUAGON 5/26/2023 9:15 PM
it should never become nulls
9:15 PM
i will send a part of the code
9:16 PM
9:16 PM
where OK is present the variable is still available
9:16 PM
but once we're reaching API_callback() it becomes null
9:16 PM
and it happens when im calling x(); in timer
Avatar
Is the object even the same? you are calling this->key_parts, then whatever::me->key_parts
9:17 PM
Doesn't sound too crazy the array is modified until the callback arrives
Avatar
Duster_drUAGON 5/26/2023 9:18 PM
yeah it sames im using a static object me design the same object as this
Avatar
Avatar
Pelayori
Doesn't sound too crazy the array is modified until the callback arrives
Duster_drUAGON 5/26/2023 9:18 PM
i know but i think it has to do something again with the stack (edited)
Avatar
I cannot help further without knowing more parts of the code, it's too broad of an issue
Avatar
Duster_drUAGON 5/26/2023 9:20 PM
Sure no problem, i will come back if i have more information
Avatar
Duster_drUAGON 5/26/2023 9:29 PM
I think i have an idea why it becomes null and if it's the case i literally have 2 iq
9:29 PM
i don't have a loop
9:30 PM
so when x() is done and API_callback isn't called yet
9:30 PM
it goes to return TRUE;
9:30 PM
and my object gets deleted
9:35 PM
and now it works when allocating on the heap instead of the stack the issue doesn't have anything to do with the library (edited)
Avatar
The library wouldn't be responsible for your program's objects, so that's for granted
Avatar
Avatar
Duster_drUAGON
Click to see attachment 🖼️
don't use just 1 HWID for authentication 😛
Avatar
Duster_drUAGON 5/27/2023 3:48 PM
I have a question about the api this time c++ target->ServerSendChatMessage(&this->message, EChatSendMode::LocalChat); As you can see it sends a message in the local chat and i wanted to know if there is a way to send from the server to send a Private message to the player and if it isn't the case is the localChat only visible for the player im targeting? (edited)
Avatar
template <typename T, typename... Args> FORCEINLINE void SendChatMessage(AShooterPlayerController* player_controller, const FString& sender_name, const T* msg, Args&&... args) { if (player_controller) { const FString text(FString::Format(msg, std::forward<Args>(args)...)); FChatMessage chat_message = FChatMessage(); chat_message.SenderName = sender_name; chat_message.Message = text; player_controller->ClientChatMessage(chat_message); } } from api utils, sends a private chat message
Avatar
Duster_drUAGON 5/27/2023 4:29 PM
Thank you very much, you're awesome!
Avatar
UWorld* world = ArkApi::GetApiUtils().GetWorld(); FString tek_path = FString("Blueprint'/Game/PrimalEarth/Structures/StorageBox_TekShield.StorageBox_TekShield'"); UClass* structure_class = UVictoryCore::BPLoadClass(&tek_path); if (!structure_class) Log::GetLog()->critical("There was an error while processing new structures"); AActor* new_actor = world->SpawnActor(structure_class, &loc, &rot, &params); Tek shield wont spawn, a metal foundation works. Is there any secret to spawn a tek shield?
Avatar
There isn't any secret to spawn an actor
Avatar
Duster_drUAGON 5/27/2023 7:19 PM
I have a question about AShooterPlayerController i'm guessing that when you spawn a player controller it doesn't despawn automatically so i wanted to know for optimisation purposes how to despawn it? c++ FVector SpawnLocation(0, 0, 0); FRotator SpawnRotation(0, 0, 0); AShooterPlayerController* god = static_cast<AShooterPlayerController*>(ArkApi::GetApiUtils().GetShooterGameMode()->SpawnPlayerController(&SpawnLocation, &SpawnRotation));
Avatar
Avatar
Duster_drUAGON
I have a question about AShooterPlayerController i'm guessing that when you spawn a player controller it doesn't despawn automatically so i wanted to know for optimisation purposes how to despawn it? c++ FVector SpawnLocation(0, 0, 0); FRotator SpawnRotation(0, 0, 0); AShooterPlayerController* god = static_cast<AShooterPlayerController*>(ArkApi::GetApiUtils().GetShooterGameMode()->SpawnPlayerController(&SpawnLocation, &SpawnRotation));
Why are you spawning a controller?
Avatar
Duster_drUAGON 5/27/2023 7:31 PM
I want to execute console commands
7:31 PM
but i don't want to do it on a player
Avatar
There's no feasible way to do that
7:45 PM
The engine internally always look for a valid player controller
Avatar
Duster_drUAGON 5/27/2023 7:50 PM
so how can i execute admin commands?
Avatar
Firstly you need at least 1 online player, you can get the first player controller with ArkApi::GetApiUtils().GetWorld()->GetFirstPlayerController()
7:51 PM
If the controller is not null, you can use APlayerController::ConsoleCommand
7:52 PM
Alternatively, the UShooterCheatManager has some functions that are executed by commands without the need of players, might do what you want
Avatar
Duster_drUAGON 5/27/2023 7:53 PM
and when i selected the player to execute commands as admin can i just do this ? c++ p->bIsAdmin() = true; p->ConsoleCommand(&result, &fcommand, false); p->bIsAdmin() = false;
Avatar
Yes
Avatar
how do i link a structure with another one? structure->LinkStructure(another); does nothing!
Avatar
That does work
12:06 PM
But there's probably steps you are missing
12:07 PM
My guess is that you do not associate it with the floor it's placed on by adding it to the structure->PlacedOnFloorField(), and floor->StructuresPlacedOnFloorField()
Avatar
How to check for clustered structures?
3:37 PM
Maybe there is an array with all linked structures data?
Avatar
Avatar
Pelayori
My guess is that you do not associate it with the floor it's placed on by adding it to the structure->PlacedOnFloorField(), and floor->StructuresPlacedOnFloorField()
will check those out, thanks!
Avatar
Avatar
SR
Maybe there is an array with all linked structures data?
GetAllLinkedStructures in PrimalStructure
Avatar
How is it possible to replicate structures data to a client? (Not placeable, etc)
5:49 PM
Hook a function that checks for placement?
Avatar
It’s not easy to do so, if even possible
5:51 PM
You can deny placement but not replicate it without helper mods
Avatar
Is it possible to add teleport location (public teleporter) from s+ to be added to the teleport list without spawning in the structure itself?
Avatar
🐨Dream Doctor🦘 5/30/2023 2:54 AM
Regarding the new announcement. Are you sure that it's a good idea? I don't really understand the whole Discord partner thing, but throwing development channels into the huge mess that is a bunch of channels for people playing on games servers seems like a crazy idea to me. I don't know what the benefits are, but the negatives seem immense. Firstly, the first onboarding question forces me to say I want to play on one or more games servers, and then activates all those channels and the associated noise they come with. Secondly, what happens when all those end users start saying "yes" to the development option and we start getting endless noise from end users instead of the clean dev-only environment we have now?
Avatar
Avatar
🐨Dream Doctor🦘
Regarding the new announcement. Are you sure that it's a good idea? I don't really understand the whole Discord partner thing, but throwing development channels into the huge mess that is a bunch of channels for people playing on games servers seems like a crazy idea to me. I don't know what the benefits are, but the negatives seem immense. Firstly, the first onboarding question forces me to say I want to play on one or more games servers, and then activates all those channels and the associated noise they come with. Secondly, what happens when all those end users start saying "yes" to the development option and we start getting endless noise from end users instead of the clean dev-only environment we have now?
It does seem crazy to me too but I think you can flat out remove those channels from existing by not using the role
Avatar
🐨Dream Doctor🦘 5/30/2023 2:57 AM
I know I've said this before, and I say it with the most extreme respect to everyone here, but the more you try and forcefully integrate this previously independent, open source project into your other businesses, the more likely people are going to become resentful and eventually just fork the project and start their own independent project again, which as I've said would be a HUGE disaster for this community.
Avatar
I think it will allow people to cross pollinate ideas and feedback
Avatar
Avatar
🐨Dream Doctor🦘
I know I've said this before, and I say it with the most extreme respect to everyone here, but the more you try and forcefully integrate this previously independent, open source project into your other businesses, the more likely people are going to become resentful and eventually just fork the project and start their own independent project again, which as I've said would be a HUGE disaster for this community.
I agree with the sentiment but I also think if anything it’s an experiment worth trying. We already get a lot of lost people joining here when the Q/A on the other server should help keep them in the right channels
Avatar
Avatar
🐨Dream Doctor🦘
Regarding the new announcement. Are you sure that it's a good idea? I don't really understand the whole Discord partner thing, but throwing development channels into the huge mess that is a bunch of channels for people playing on games servers seems like a crazy idea to me. I don't know what the benefits are, but the negatives seem immense. Firstly, the first onboarding question forces me to say I want to play on one or more games servers, and then activates all those channels and the associated noise they come with. Secondly, what happens when all those end users start saying "yes" to the development option and we start getting endless noise from end users instead of the clean dev-only environment we have now?
GSH | MrOwlSky 5/30/2023 2:59 AM
Great questions Firstly, the first onboarding question forces me to say I want to play on one or more games servers,
  • Should give an option to skip that, I'll double check on my end.
Secondly, what happens when all those end users start saying "yes" to the development option and we start getting endless noise from end users instead of the clean dev-only environment we have now?
  • This will be using our own discord bot to automod it alongside discords new auto-mod feature and the staff team is much larger on the official discord. Same rules here will apply there. Any trolls/idiots will be removed entirely. It'll actually be more heavily moderated then this one as the staff team is much larger.
You'll always have the option to stay exclusively in this discord server but understand it won't be getting future support or moderation. The partnered one will be heavily moderated to keep the channels clean.
Avatar
There’s a fine line to walk and we’ll just have to see how it goes 🙂
3:00 AM
I kinda see what owlsky is doing as like sponsoring the open source stuff with his commercial stuff atm, kinda like redhat
3:01 AM
As long as both sides properly respect each other and stay out of each others business then it can be a healthy relationship
Avatar
🐨Dream Doctor🦘 5/30/2023 3:02 AM
Ok, well I'm really happy to try anything if it's what everyone else thinks is best, as long as there's a commitment to manage any issues. I think it's critical to do everything possible to keep this amazing community we have together as these two new games are released. The last thing anyone needs is new forks being released with the new games and this community splitting apart.
Avatar
Avatar
🐨Dream Doctor🦘
I know I've said this before, and I say it with the most extreme respect to everyone here, but the more you try and forcefully integrate this previously independent, open source project into your other businesses, the more likely people are going to become resentful and eventually just fork the project and start their own independent project again, which as I've said would be a HUGE disaster for this community.
GSH | MrOwlSky 5/30/2023 3:02 AM
Understandable and fair POV. ServerAPI will always remain 100% free and open source under our team. There will never be plans to take ServerAPI private thankfully.
Avatar
Avatar
🐨Dream Doctor🦘
Ok, well I'm really happy to try anything if it's what everyone else thinks is best, as long as there's a commitment to manage any issues. I think it's critical to do everything possible to keep this amazing community we have together as these two new games are released. The last thing anyone needs is new forks being released with the new games and this community splitting apart.
Now the real challenge will be how opinionated we’ll all be when it comes to porting over to 1.5
3:03 AM
Since we can drop old baggage at that point
3:03 AM
😛
Avatar
Avatar
GSH | MrOwlSky
Understandable and fair POV. ServerAPI will always remain 100% free and open source under our team. There will never be plans to take ServerAPI private thankfully.
GSH | MrOwlSky 5/30/2023 3:06 AM
I know you did mention that awhile back in the merge but hopefully you've saw over the past year or so that if anything ServerAPI has gotten more and better updates since the merge. Entire official plugins have been reworked from ground up by Foppa, Pelayori and Lethal and all provided much needed quality of life updates to the plugins. Same with the official API releases they've gotten better overtime, Wetbatman has done some incredible work with the auto update features. The goal is to grow together we'll never take it private/paid, I stand firm in keeping ServerAPI free and fair for everyone. I agree with your opinion on that 100%.
3:07 AM
Also to add to that, If you see anything like trolls like you mentioned feel free to DM anytime my DMs are always open. I'm more then happy to bounce trolls bothering the development channels. (edited)
Avatar
All respect to Batman but for 1.5 I’m just gonna make an updater program 😂, using double dll proxy is so wack
💪 1
Avatar
Avatar
GSH | MrOwlSky
I know you did mention that awhile back in the merge but hopefully you've saw over the past year or so that if anything ServerAPI has gotten more and better updates since the merge. Entire official plugins have been reworked from ground up by Foppa, Pelayori and Lethal and all provided much needed quality of life updates to the plugins. Same with the official API releases they've gotten better overtime, Wetbatman has done some incredible work with the auto update features. The goal is to grow together we'll never take it private/paid, I stand firm in keeping ServerAPI free and fair for everyone. I agree with your opinion on that 100%.
🐨Dream Doctor🦘 5/30/2023 3:09 AM
Thank you for the replies 🙂 Yes the team at the moment is fantastic. I've been working with some other modding communities over the last year, and none have come close to being as skilled and generous with their time and expertise as this community has been for years now.
Avatar
GSH | MrOwlSky 5/30/2023 3:22 AM
Agreed 100%
Avatar
There is a big problem with migrating everything to GSH. This server is going to be legacy like a book just to CTRL+F or ask if someone answers. But newbies are going to be in GSH and they don't even know "wtf this function does?!?!?" when in this server if you search a little you'll see complete references for this function.
🔝 2
Avatar
Is it possible to get player skeleton and check its bones, get their position?
8:32 AM
It looks like some functions from this are missing.
Avatar
Duster_drUAGON 5/30/2023 11:22 AM
What's the hook when a player is connecting to the server ?
Avatar
🐨Dream Doctor🦘 5/30/2023 2:00 PM
Just a gentle reminder that this is still here: The search function works pretty well and can help you find that hook you're trying to find. https://arkserverapi.wiki
❤️ 3
Avatar
Duster_drUAGON 5/30/2023 2:01 PM
Thank you, i couldn't find the link
Avatar
Avatar
SR
There is a big problem with migrating everything to GSH. This server is going to be legacy like a book just to CTRL+F or ask if someone answers. But newbies are going to be in GSH and they don't even know "wtf this function does?!?!?" when in this server if you search a little you'll see complete references for this function.
GSH | MrOwlSky 5/30/2023 3:45 PM
I'll pin the wiki dream provided in the new GSH discord and I'll include that on the website itself. Important chat will be attempted to be exported/imported on new GSH to make finding past questions easier. Though really we need a questions channel dedicated to that rather then general chat imo.
Avatar
Avatar
🐨Dream Doctor🦘
Just a gentle reminder that this is still here: The search function works pretty well and can help you find that hook you're trying to find. https://arkserverapi.wiki
when did we have this? 🤔
Avatar
why not just keep dev community separate, i dont see value in merging it into a larger discord where you now gotta scroll down farther to find the channels and way less categorization (though tier system here is prob a bit unnecessary)
Avatar
Avatar
Aikar
why not just keep dev community separate, i dont see value in merging it into a larger discord where you now gotta scroll down farther to find the channels and way less categorization (though tier system here is prob a bit unnecessary)
GSH | MrOwlSky 5/30/2023 8:49 PM
With discords Onboarding system you can hide all channels and only show API channels.
Avatar
yeah but i want to see them when i do want to go to them, just the niceness of separate communities i click on the one i want to see (edited)
8:51 PM
since most the time im only caring for dev lol
Avatar
🐨Dream Doctor🦘 6/1/2023 3:09 AM
So far the new Discord isn't going well. It's already full of questions from end users. It's critical that the developers area is effectively quarantined away from end users, or it ruins the entire point of having a development area.
3:13 AM
At the moment, people like myself can come to this Discord each day and easily read through the messages from the day to keep up to date with whatever is happening. If I have to wade through end users asking how to run the API then it quickly becomes tedious or impossible.
Avatar
Avatar
🐨Dream Doctor🦘
So far the new Discord isn't going well. It's already full of questions from end users. It's critical that the developers area is effectively quarantined away from end users, or it ruins the entire point of having a development area.
GSH | MrOwlSky 6/1/2023 3:19 AM
Make sure you are using the right channels. The actual API channels have only API related topics and questions. You are looking at the tech support channels. I would advice you use onboarding and hide those channels to avoid confusion.
3:19 AM
#deleted-channel
Avatar
Avatar
GSH | MrOwlSky
Make sure you are using the right channels. The actual API channels have only API related topics and questions. You are looking at the tech support channels. I would advice you use onboarding and hide those channels to avoid confusion.
🐨Dream Doctor🦘 6/1/2023 3:21 AM
These are the only API channels I can see. Am I missing some? I followed the onboarding process.
Avatar
Avatar
🐨Dream Doctor🦘
These are the only API channels I can see. Am I missing some? I followed the onboarding process.
GSH | MrOwlSky 6/1/2023 3:22 AM
That's the right one yeah. I'm not seeing any off-topic questions in that chat.
Avatar
🐨Dream Doctor🦘 6/1/2023 3:23 AM
Seems like that channel has been cleaned 🙂
Avatar
Avatar
🐨Dream Doctor🦘
Seems like that channel has been cleaned 🙂
GSH | MrOwlSky 6/1/2023 3:24 AM
It's been that way what text exactly where you referring to?
Avatar
TheMollusk 6/1/2023 3:28 AM
My biggest concern is that this existing Discord server remain accessible for new developers. It's an invaluable resource for learning plugin development. There are years worth of questions, answers, discussion, and examples here. This Discord basically is the ArkServerApi documentation and it would take massive effort to begin to reproduce the information here somewhere else. (Are all channels here still accessible to new users? @Natsu was saying earlier that he can't see the intermediate channels. And I don't see the role selection channel anymore)
Avatar
Avatar
TheMollusk
My biggest concern is that this existing Discord server remain accessible for new developers. It's an invaluable resource for learning plugin development. There are years worth of questions, answers, discussion, and examples here. This Discord basically is the ArkServerApi documentation and it would take massive effort to begin to reproduce the information here somewhere else. (Are all channels here still accessible to new users? @Natsu was saying earlier that he can't see the intermediate channels. And I don't see the role selection channel anymore)
GSH | MrOwlSky 6/1/2023 3:29 AM
Yeah that's a valid point. There are tools like https://github.com/Tyrrrz/DiscordChatExporter where we can export/import the chat history into the new discord I intend to do this. That way new users can still take advantage of the discords Search feature.
Exports Discord chat logs to a file. Contribute to Tyrrrz/DiscordChatExporter development by creating an account on GitHub.
3:31 AM
(Are all channels here still accessible to new users? natsu was saying earlier that he can't see the intermediate channels. And I don't see the role selection channel anymore)
  • New users no, Current users still have access. New users will be forwarded to the updated discord. But the question above for new users not having access to search past history. That will be resolved in the coming weeks just need to sit down and export/import it.
3:33 AM
I believe there are some bots that can do the export/import aswell. If you know any off your head feel free to DM me them. Otherwise most likely will use one of the github repos of a stable build. Some are sketchy cause they require your discord auth token.
Avatar
🐨Dream Doctor🦘 6/1/2023 3:34 AM
Maybe that message history could be exported to a wiki instead? It can be a pain trying to find things in Discord history.
Avatar
Avatar
🐨Dream Doctor🦘
Maybe that message history could be exported to a wiki instead? It can be a pain trying to find things in Discord history.
GSH | MrOwlSky 6/1/2023 3:35 AM
So we have two wikis already https://articles.gameservershub.com/ <-- Official wiki but is missing content. (Need writers to help write/fill it) https://arkserverapi.wiki/ <- Unofficial wiki created by fellow developer. I would be happy with having it imported to a wiki we just need someone whos active and can work on it. Can provide some type of incentives for their time given. (edited)
The homepage for all your gaming related news and articles.
Avatar
Avatar
GSH | MrOwlSky
So we have two wikis already https://articles.gameservershub.com/ <-- Official wiki but is missing content. (Need writers to help write/fill it) https://arkserverapi.wiki/ <- Unofficial wiki created by fellow developer. I would be happy with having it imported to a wiki we just need someone whos active and can work on it. Can provide some type of incentives for their time given. (edited)
🐨Dream Doctor🦘 6/1/2023 3:37 AM
Yeah the second one is me. I'd be happy to have look and see if it can be done. The issue I can think of is making sure people can follow a reply chain. Not sure how that would work in wiki format, but I'm sure there's a way.
Avatar
Avatar
🐨Dream Doctor🦘
Yeah the second one is me. I'd be happy to have look and see if it can be done. The issue I can think of is making sure people can follow a reply chain. Not sure how that would work in wiki format, but I'm sure there's a way.
GSH | MrOwlSky 6/1/2023 3:39 AM
Cool with me brother. I believe those discord export tools should actually work for you. I don't believe you need to have any admin perms or anything special to use those tools. Should be able to download the history and if you feel up to playing around and adding it to the wiki, That'd be a huge help. I can give you write access on the official wiki if you sign up on it.
Avatar
🐨Dream Doctor🦘 6/1/2023 3:41 AM
Ok. I've got an unrelated Discord of my own with some history in it, so I'll have a try with that and see what I can do.
👍 1
Avatar
Exist some mesh hook or something that detects when player is under mesh ?
Avatar
jraServerAPI 6/1/2023 4:55 AM
if only it was that simple 🙂
4:55 AM
you can detect mesh via line tracing
4:55 AM
but it's not a perfect art
Avatar
Avatar
jraServerAPI
if only it was that simple 🙂
Hahah I was hopping
Avatar
Avatar
jraServerAPI
you can detect mesh via line tracing
Can you explaining to me pls ?
Avatar
jraServerAPI 6/1/2023 5:02 AM
search this discord for: line tracing
5:02 AM
i posted something a while back
Avatar
Okey man I will search !! Thanks
Avatar
jraServerAPI 6/1/2023 5:03 AM
and so have others
Avatar
Someone know a good hook for sending notifications to a player when they connect..? Anything better than PostLogin with a delay?
Avatar
Avatar
GSH | MrOwlSky
Cool with me brother. I believe those discord export tools should actually work for you. I don't believe you need to have any admin perms or anything special to use those tools. Should be able to download the history and if you feel up to playing around and adding it to the wiki, That'd be a huge help. I can give you write access on the official wiki if you sign up on it.
🐨Dream Doctor🦘 6/2/2023 3:55 AM
I've been looking at various export tools and it's looking like a very compilcated task. The "Discord Chat Exporter" app you linked will only export a single channel to a single HTML file. It does export everything correctly, and when opened the HTML basically works the same way as it would if you were viewing the channel in Discord. You can see attachments, and follow reply chains (which is REALLY important in this case), but searching would be a huge pain. I've also looked at a few Chrome extensions. They are against Discord terms, and can get your account banned though. They can export to CSV though, which would give us more flexibility, but attachments (like important Screen Shots so often used in this Discord) don't work, and reply chains are ommitted as well. I'll keep looking and see if I can find anything else more appropriate.
Avatar
Avatar
🐨Dream Doctor🦘
I've been looking at various export tools and it's looking like a very compilcated task. The "Discord Chat Exporter" app you linked will only export a single channel to a single HTML file. It does export everything correctly, and when opened the HTML basically works the same way as it would if you were viewing the channel in Discord. You can see attachments, and follow reply chains (which is REALLY important in this case), but searching would be a huge pain. I've also looked at a few Chrome extensions. They are against Discord terms, and can get your account banned though. They can export to CSV though, which would give us more flexibility, but attachments (like important Screen Shots so often used in this Discord) don't work, and reply chains are ommitted as well. I'll keep looking and see if I can find anything else more appropriate.
GSH | MrOwlSky 6/2/2023 3:56 AM
Thanks for the update
Avatar
🐨Dream Doctor🦘 6/2/2023 7:53 AM
The Discord Chat Exporter is fully open source, so we could probably modify it to dump into a database instead of an html file. I'll have a look when I can.
Avatar
Lethal, what hook did you use for OSD and determine when a OSD has been completed?
Avatar
something to do ListActiveHordeEvents i assume ?
Avatar
Hi guys. Someone have the discord link of ArkBot Helper ?? . It Is broken in the github repo (edited)
Avatar
Avatar
Schopfer
Hi guys. Someone have the discord link of ArkBot Helper ?? . It Is broken in the github repo (edited)
Click Here For Source Code Supports quick load and unload with: plugins.load ArkBotHelper plugins.unload ArkBotHelper No Config Required! What is this? ArkBotHelper is required if you want to destroy a tribes structures/creatures within the...
Avatar
Thanks but I mean the support discord . The link is wrong in the repo
Avatar
Avatar
Schopfer
Thanks but I mean the support discord . The link is wrong in the repo
it's not wrong, the tool was discountinued and is no longer in development
Avatar
I found these methods in ARKAPI. Can they be used to send and receive Post/Get requests?
10:48 AM
It seems that it will be deleted in the next version.
Avatar
Poco may have some stuff marked as deprecate, but as far as I'm concerned we are fine
10:55 AM
To send post/get requests you use the API::Requests class
10:55 AM
Like the following: API::Requests::Get().Create[Get/Post]Request();
10:56 AM
You can input url, data, callback func, etc etc
Avatar
Avatar
Pelayori
Poco may have some stuff marked as deprecate, but as far as I'm concerned we are fine
Using the code you provided here, I found that Requests is not under API.
Avatar
Sorry, you need to include "Requests.h" (edited)
Avatar
Thank you. I'll try it according to your method.
11:04 AM
If he can really send/receive Post requests normally, I don't think he should abandon it.
Avatar
We are not using any of the deprecated flags
Avatar
Avatar
Pelayori
Sorry, you need to include "Requests.h" (edited)
Thank you. I learned how to use it with your help.
Avatar
Remember to call the post/get request from the API::Requests::Get()
11:08 AM
Otherwise you will have an error (edited)
Avatar
I hope I don't abandon this function. It is really useful. I can write more complex business logic in c# and use post for data interaction.
Avatar
Avatar
Pelayori
Otherwise you will have an error (edited)
Thank you, Get () is a bit like New Object () in C#. Is he used to instantiate the Requests object?
Avatar
Yes, it's a singleton pattern where there's a single requests object that handles all of the requests, so there's no duplicate objects
GOGHEART1 1
Avatar
Avatar
Pelayori
Yes, it's a singleton pattern where there's a single requests object that handles all of the requests, so there's no duplicate objects
I get it. Thank you very much, Pelayori.
👍 1
Avatar
@PelayoriAPI also provides a DeleteRequest, I do not quite understand the role of DeleteRequest, generally speaking, Http requests are not only Get and Post?
Avatar
There are multiple types of http requests
11:37 AM
Get, Post, Delete, Put ...
Avatar
Avatar
Pelayori
Get, Post, Delete, Put ...
I get it, I almost thought it was the function of deleting the requested object. Fortunately, I asked you this question. In the C# project I participated in, I have never used any request types other than Post and Get. Thank you very much.
Avatar
Yeah it depends on the project needs, not necessarily you need to use all of them
GOGHEART1 1
Avatar
Avatar
Pelayori
Yeah it depends on the project needs, not necessarily you need to use all of them
I wrote a token serious test interface in c# and tried to use post to request it. But there is an error code in C++: E0245 non-static member reference must be relative to a specific object.
Avatar
You did not call it from the instanced object Get()
12:09 PM
And the callback has 2 params, bool and string
12:09 PM
You also need to pass a pointer to the callback, &ReqCllback (edited)
Avatar
Avatar
Pelayori
And the callback has 2 params, bool and string
Thank you very much. That should be no problem.
Avatar
😫 Unsuccessful headers parameter does not support string type, and the source code is std::vector<std::string >. Is there any way to convert the string into std::vector<std::string >?
Avatar
{ headerString }
Avatar
Avatar
Pelayori
{ headerString }
I get it, It's kind of like List < string > in C #.
12:54 PM
GOGHEART1 Thank you
Avatar
What hook is used to cancel console commands?? (edited)
Avatar
jraServerAPI 6/9/2023 6:47 PM
I don't think there is a hook, i think that is client side
Avatar
Avatar
jraServerAPI
I don't think there is a hook, i think that is client side
so, executing "cheat fly" is client-side? (edited)
Avatar
Avatar
SR
so, executing "cheat fly" is client-side? (edited)
no
7:57 PM
the console command function is under AShooterPlayerController
Avatar
Avatar
WETBATMAN
the console command function is under AShooterPlayerController
But that one returns a value
7:58 PM
is it possible to null it?
Avatar
jraServerAPI 6/9/2023 8:00 PM
if you are talking about Hook_AShooterPlayerController_AdminCheat, perhaps you can change value of Msg? you'll have to test it... make sure you change it before the hook
Avatar
Avatar
jraServerAPI
if you are talking about Hook_AShooterPlayerController_AdminCheat, perhaps you can change value of Msg? you'll have to test it... make sure you change it before the hook
Oh wait that one exists
8:01 PM
let me try using it
Avatar
jraServerAPI 6/9/2023 8:01 PM
i thought you wanted to intercept just any commands written in the console
8:01 PM
eg.. custom /commands
8:01 PM
but yeah..try that with that hook..it mght work
Avatar
Avatar
jraServerAPI
i thought you wanted to intercept just any commands written in the console
I want to intercept actual commands executed from users and cancel them
8:02 PM
like if it is "DoExit" then cancel it.
8:02 PM
I know it is possible to do with CheatManager
Avatar
APlayerController::ConsoleCommand
8:02 PM
AShooterPlayerController::ConsoleCommand calls this
Avatar
Avatar
WETBATMAN
APlayerController::ConsoleCommand
still returns a value
Avatar
jraServerAPI 6/9/2023 8:02 PM
yeah change it to "" or maybe another command like Walk or something 😆
Avatar
just return null then
Avatar
jraServerAPI 6/9/2023 8:03 PM
👆
8:03 PM
they return null themselves in this certain condition
Avatar
Avatar
WETBATMAN
they return null themselves in this certain condition
lol
Avatar
RIO (Александр) 6/9/2023 8:21 PM
what a hello. after a recent update ran into a problem with FUniqueNetIdUInt64. The plugin just crashes when the constructor is called. both FString and uint64. it worked well before. Apparently something has changed with the update. can anyone suggest?
Avatar
Avatar
RIO (Александр)
what a hello. after a recent update ran into a problem with FUniqueNetIdUInt64. The plugin just crashes when the constructor is called. both FString and uint64. it worked well before. Apparently something has changed with the update. can anyone suggest?
after the latest PDBDumper update the API only has the address of one constructor inside the binary for each class, it could be that the order of the constructors changed, resulting in this
8:23 PM
should also check if maybe the constructor now needs an extra param
Avatar
Avatar
WETBATMAN
should also check if maybe the constructor now needs an extra param
RIO (Александр) 6/9/2023 8:25 PM
I did not see extra parameters, I looked through IDA
Avatar
Avatar
WETBATMAN
after the latest PDBDumper update the API only has the address of one constructor inside the binary for each class, it could be that the order of the constructors changed, resulting in this
RIO (Александр) 6/9/2023 8:29 PM
where can I find information to help with this?
Avatar
Avatar
WETBATMAN
just return null then
returning null to this crashes the server with memory allocating error
9:08 PM
9:11 PM
any empty symbol does this
9:11 PM
not sure about returning fake commands. (UPD: They're crashing too) (edited)
Avatar
what does your implementation look like
Avatar
Avatar
WETBATMAN
what does your implementation look like
FString* Hook_APlayerController_ConsoleCommand(APlayerController* _this, FString* result, FString* Cmd, bool bWriteToLog) { std::cout << Cmd->ToString() + "\n"; if (Cmd->ToString() == "fly") { FString rt = "walk"; return &rt; } return APlayerController_ConsoleCommand_original(_this, result, Cmd, bWriteToLog); }
Avatar
you're returning an address to a local variable 😄
Avatar
and what should I do? 😅
Avatar
jraServerAPI 6/9/2023 9:28 PM
catconfused
Avatar
after the function exits the stack for this function will be deleted which means that the address of rt now points to garbage (edited)
9:29 PM
and you're returning an address to it
9:29 PM
change the result variable
9:34 PM
or just try returning nullptr
Avatar
Avatar
WETBATMAN
or just try returning nullptr
I've tried
9:35 PM
memory allocating error
Avatar
you can try to modify the result variable and return that
Avatar
Avatar
WETBATMAN
you can try to modify the result variable and return that
well it is still the same.
9:36 PM
just crashing
Avatar
you're changing the value of result right?
9:36 PM
not the address
Avatar
hm, in the source they set result to nullptr and return it
Avatar
Repost your code
Avatar
like this?
Avatar
Avatar
WETBATMAN
Click to see attachment 🖼️
yeah
9:38 PM
if that doesn't work try setting it to an empty string maybe
Avatar
Avatar
WETBATMAN
if that doesn't work try setting it to an empty string maybe
returning nullptr comes in the same error when you're just returning nullptr
Avatar
What if you just empty the string prior calling original? Cmd->Empty()
9:44 PM
And don't do any return yourself
Avatar
Avatar
Pelayori
What if you just empty the string prior calling original? Cmd->Empty()
That one works.
Avatar
Avatar
SR
That one works.
Share me your code and I’ll see what can be done to do it properly
4:33 AM
Doing the workaround seems fine but it’s better to know why the other way causes a crash
Avatar
Duster_drUAGON 6/10/2023 9:41 AM
how can i create a custom command like /hello ? (commands which are used ingame not on rcon) (edited)
Avatar
Guys, does anyone know how to reduce a player's level, I try to reduce the level will revert after the player respawn
Avatar
void onTest(AShooterPlayerController* player, FString*, EChatSendMode::Type) { const int subtractPercentage = 10; if (!player)return; auto pCharacter = player->GetPlayerCharacter(); if (!pCharacter)return; auto status = pCharacter->GetCharacterStatusComponent(); if (!status)return; int level = status->GetCharacterLevel(); float currentEXP = status->ExperiencePointsField(); if (level <= 1 || currentEXP <= 0)return; float lastEXP = status->GetExperienceRequiredForPreviousLevelUp(); int exLevel = status->GetExtraCharacterLevel(); float newEXP = currentEXP - (currentEXP * ((float)subtractPercentage / 100)); status->ExperiencePointsField() = newEXP; while (newEXP < lastEXP || exLevel>0) { status->SetExtraCharacterLevel(exLevel - 1); resetPlayerLevelUpPoints(status); status->RescaleAllStats(); lastEXP = status->GetExperienceRequiredForPreviousLevelUp(); exLevel = status->GetExtraCharacterLevel(); } ArkApi::GetApiUtils().SendChatMessage(player, CHAT_MESSAGE_NAME, L"test"); }
Avatar
Avatar
MR_OldY
void onTest(AShooterPlayerController* player, FString*, EChatSendMode::Type) { const int subtractPercentage = 10; if (!player)return; auto pCharacter = player->GetPlayerCharacter(); if (!pCharacter)return; auto status = pCharacter->GetCharacterStatusComponent(); if (!status)return; int level = status->GetCharacterLevel(); float currentEXP = status->ExperiencePointsField(); if (level <= 1 || currentEXP <= 0)return; float lastEXP = status->GetExperienceRequiredForPreviousLevelUp(); int exLevel = status->GetExtraCharacterLevel(); float newEXP = currentEXP - (currentEXP * ((float)subtractPercentage / 100)); status->ExperiencePointsField() = newEXP; while (newEXP < lastEXP || exLevel>0) { status->SetExtraCharacterLevel(exLevel - 1); resetPlayerLevelUpPoints(status); status->RescaleAllStats(); lastEXP = status->GetExperienceRequiredForPreviousLevelUp(); exLevel = status->GetExtraCharacterLevel(); } ArkApi::GetApiUtils().SendChatMessage(player, CHAT_MESSAGE_NAME, L"test"); }
Dodo Enthusiast 6/10/2023 6:12 PM
You could try calling UPrimalPlayerData::SavePlayerData(UWorld *) on the players UPrimalPlayerData after you made the changes.
Avatar
I found a way to successfully remove the level
4:41 AM
pCharacter->GetPlayerData()->MyDataField()->MyPersistentCharacterStatsField()->CharacterStatusComponent_ExperiencePointsField() = newEXP; pCharacter->GetPlayerData()->MyDataField()->MyPersistentCharacterStatsField()->CharacterStatusComponent_ExtraCharacterLevelField() = exLevel - 1;
4:43 AM
In addition, I would like to ask you a question, how should I modify the FieldArray type
4:43 AM
FieldArray<char, 12> CharacterStatusComponent_NumberOfLevelUpPointsAppliedField() { return { this, "FPrimalPersistentCharacterStatsStruct.CharacterStatusComponent_NumberOfLevelUpPointsApplied" }; }
Avatar
Avatar
MR_OldY
In addition, I would like to ask you a question, how should I modify the FieldArray type
jraServerAPI 6/11/2023 4:53 AM
Avatar
ok thank you.
Avatar
Why is it that Plugins dont work with MYSQL versions higher then 8.0.27
1:02 PM
that version is so buggy and so flawed!
Avatar
They forced ssl and usually people don’t have ssl libraries installed, or at least the ones we tried with
1:07 PM
Many people could not get the ssl version to work (lethal did a test with arkshop for a long time)
1:08 PM
So MySQL itself is not buggy
1:08 PM
In fact, it is more secure
Avatar
Mysql is not as convenient to use on ARK server as sqlite, and there seems to be no difference in efficiency between them.
Avatar
Avatar
Invoker
Mysql is not as convenient to use on ARK server as sqlite, and there seems to be no difference in efficiency between them.
🐨Dream Doctor🦘 6/14/2023 7:20 AM
Well that's not correct. SQLite is a local database that writes directly to a single file. The point of using MySQL is to allow multiple servers to access the same database and share data between them.
Avatar
I get it
Avatar
This request method is executed asynchronously. Can it be configured as synchronous?
Avatar
Avatar
Invoker
This request method is executed asynchronously. Can it be configured as synchronous?
no
Avatar
wildcard forgot to turn off logging again?
Avatar
Avatar
Invoker
This request method is executed asynchronously. Can it be configured as synchronous?
Duster_drUAGON 6/15/2023 7:30 PM
your only solution is to recreate a GET request yourself using WIN32 API
Avatar
Avatar
Duster_drUAGON
your only solution is to recreate a GET request yourself using WIN32 API
why lol there is a one header request library for c++
7:55 PM
making it synchronous will cause the server to lock up for an extended period of time though
Avatar
Duster_drUAGON 6/15/2023 7:56 PM
I mean it's probably a idea but if he is really sure about what he is doing then he can do that (edited)
7:56 PM
it's not like he has any other solution after all for making syncrhonous requests
Avatar
A C++ header-only HTTP/HTTPS server and client library - GitHub - yhirose/cpp-httplib: A C++ header-only HTTP/HTTPS server and client library
Avatar
Avatar
Duster_drUAGON
your only solution is to recreate a GET request yourself using WIN32 API
No not at all
10:27 PM
You don’t even need another library
10:28 PM
You can use a signal like a conditional_variable and have a blocking wait until the callback executes. (edited)
Avatar
Is there something i can do about these crashes? or is reboot often the only thing ?
Avatar
Avatar
Natsu
Is there something i can do about these crashes? or is reboot often the only thing ?
i used WinDBG to find the issue on what plugin is causing this, could someone help me further on what to do now?
Avatar
Hello i have doubts about how player identification works for ark
9:20 PM
Afaik It uses the FUniqueNetId thing but i want an overall on how it works from online subsystem login to server connection
9:21 PM
And if It behaves the same for Steam and Epic or not
Avatar
I'm not sure someone has all that info
10:19 PM
As for the steam and epic, epic has a formula to get the uint64 id from the hex epic account id string
10:19 PM
There's also some pre/post login functions, and such
Avatar
Yeah i need someone that has deep understanding on all this
Avatar
Avatar
tweakeroo
Yeah i need someone that has deep understanding on all this
Why? (edited)
Avatar
To explain to me
Avatar
Why do you need to know how the authentication protocol works though?
Avatar
Im want to do a fix for a already player conected
Avatar
You don’t need anything with authentication to do that.
11:30 PM
FUnqiueNetId should be enough
Avatar
I want to understand how it works for player identification, after a succesfull logging attemt on OSS
11:32 PM
When a player connects to a server what information is passed?
11:32 PM
Such things
11:33 PM
Whats the difference between FUniqueNetId nada FUniqueNetId Repl
Avatar
Sure but that isn’t really in the scope of the api
Avatar
Avatar
substitute
Sure but that isn’t really in the scope of the api
You guys cant help me with that?
Avatar
Avatar
tweakeroo
You guys cant help me with that?
It’s not really needed for what you are trying to achieve with a plugin
11:34 PM
If you want to learn how unreal engine works, that’s separate
Avatar
Not unreal just this
11:34 PM
UniqueNetId thing
11:34 PM
Whats that and how it works
11:35 PM
What information is passed to the server
11:35 PM
Regarding player identification
Avatar
Just find the check that tells them if there is anoter player connected to the server
11:43 PM
There they will compare ids
11:43 PM
If you find the same id
11:43 PM
Kcik them from the server
Avatar
Avatar
tweakeroo
UniqueNetId thing
Yes, this is Unreal Engine specific stuff
Avatar
Ok but you cant help then? (edited)
Avatar
@Frigoff already told you what you needed to check out.
Avatar
I was hoping just some information about that which wont take more than 5 min
12:09 AM
I have done some research about that and asked in few discords
12:11 AM
But theres almost no info or atleast any documentation for people with less knowledge
12:11 AM
Thats why im asking
Avatar
So since 2 weeks, maybe 3 theres a bug/cheat/idk what going on that just deletes random strucutres, removes loot froms structures etc. Did you hear anything about this problem?
2:42 PM
Just only that
2:42 PM
For someone with 0 experience in networking code
Avatar
Avatar
Lethal
lethalfacepalm
Can lead a horse to water (edited)
lethalkek 2
Avatar
https://github.com/SubstituteR/ArkServerAPI-Template I use this template to learn development. I am testing the information I can get when I enter the game, but when I enter the game, the server will crash, and I add a log. The error may be API utils. getSteamidFromcontroller (new player); The exception that was thrown. Because there is nothing in the log after Hook_JoinPlayer.
Contribute to SubstituteR/ArkServerAPI-Template development by creating an account on GitHub.
Avatar
Won't trycatch intercept this error code?
Avatar
Thank you, but I have to give up this way, because the post request to the business interface written by C# will lead to lower efficiency, so I have to study C++ in depth.
Avatar
Avatar
Invoker
https://github.com/SubstituteR/ArkServerAPI-Template I use this template to learn development. I am testing the information I can get when I enter the game, but when I enter the game, the server will crash, and I add a log. The error may be API utils. getSteamidFromcontroller (new player); The exception that was thrown. Because there is nothing in the log after Hook_JoinPlayer.
If you want to use the logger, you have it initialize it
9:17 AM
Log::Get().Init(“YourPluginName”)
Avatar
Avatar
Pelayori
If you want to use the logger, you have it initialize it
I initialized Log when the plug-in was loaded.
Avatar
What’s the log on line 76
Avatar
Does Log.Init () need to be initialized in every method that uses it?
9:30 AM
9:31 AM
const uint64 steam_id = API_UTILS.GetSteamIdFromController(new_player);
9:33 AM
old code ths ArkApi::IApiUtils::GetSteamIdFromController(new_player);
Avatar
Are those ptrs even valid at that point?
Avatar
API_UTILS is a quick use method that I learned in this open source framework. He pointed to ArkApi::IApiUtils
Avatar
Especially the controller (edited)
Avatar
The output of the controller is normal, and only when the player enters the game will the server exception be triggered.
Avatar
The crash log is incoherent with your source code, there is no log in line 76
10:16 AM
Is that source the one being used in that crash?
Avatar
Avatar
Pelayori
Is that source the one being used in that crash?
I focused on 76 lines of code and found this problem. ArkApi::GetApiUtils () does not replace ArkApi::IApiUtils.
10:23 AM
But they can all access GetSteamIdFromController normally.
Avatar
LOG->info("steam_id:" + steam_id); Line 76 error solved. But the 77-line log output throws an exception. Won't string splicing be automatically converted in C++?
Avatar
I don't think that's the case, no. There's std::to_string(), but you can also write a string to be formatted in the logger. LOG->info("steam_id: {}", steam_id);
Avatar
Unless you overload the operator. No. Which I don't think the API does.
Avatar
Avatar
Pelayori
I don't think that's the case, no. There's std::to_string(), but you can also write a string to be formatted in the logger. LOG->info("steam_id: {}", steam_id);
Thank you. This code is better than what I wrote.
Avatar
Also, you will probably run into more issues, as you assume all pointers are valid
10:40 AM
Which rarely happens
10:41 AM
I would do some sanity check just in case
10:41 AM
The try will not catch nullptr exceptions as far as I'm concerned
Avatar
Avatar
Pelayori
The try will not catch nullptr exceptions as far as I'm concerned
I found this problem. The try is not triggered, and there is no record in the log output catch.
Avatar
You would need a __try __except
10:47 AM
Though you'll need to worry about stack unwinding
Avatar
Avatar
Frigoff
You would need a __try __except
When this goes wrong. The server will crash and will not output the log of catch.
Avatar
Yes... because C++ exception only catch when there is something thrown.
10:51 AM
try catch isn't the same as __try __except
Avatar
Dodo Enthusiast 6/26/2023 10:53 AM
What helped me in such cases when I use a new hook is something like if(!player_controller){ log("controller invalid"); return orignal_func(_tthis and stuff); } // and so on for all pointers so you get a first feeling what is even valid and useable in the hook. If its really only for checking at first and you do nothing with the pointer you could also remove the return. (edited)
Avatar
Also a uint64_t isn't a type of pointer. It's an integer.
11:00 AM
This hook executes everything normally.
11:00 AM
ArkApi::IApiUtils::GetCharacterName (new_player). But the return from getting the role name is empty
11:02 AM
@Frigoff@PelayoriThank you for helping me.Now the server has finally stopped collapsing.
Avatar
Avatar
Invoker
ArkApi::IApiUtils::GetCharacterName (new_player). But the return from getting the role name is empty
At that point the controller has not possessed the player character yet I believe (edited)
Avatar
Dodo Enthusiast 6/26/2023 11:10 AM
Maybe I'm missing something but wouldn't a catchable error still probably crash the server because it would then skip the original callback?
Avatar
I wouldn't ever put the original call in the try
11:12 AM
But yes, you're right.
11:15 AM
put the callback outside the trycatch, and execute the callback whether there is an exception or not.
Avatar
FString output, some languages will appear garbled, is there any way to solve this problem?
12:24 PM
Google search recommends using TCHAR_TO_UTF8, but additional reference packages are needed in this project.
Avatar
Avatar
Invoker
Google search recommends using TCHAR_TO_UTF8, but additional reference packages are needed in this project.
Dodo Enthusiast 6/26/2023 1:54 PM
You could play around with ArkApi::Tools::Utf8Decode and ArkApi::Tools::Utf8Encode.
Avatar
Avatar
Dodo Enthusiast
You could play around with ArkApi::Tools::Utf8Decode and ArkApi::Tools::Utf8Encode.
UE4 uses UTF-16
12:29 AM
At least it was when I last checked
Avatar
Avatar
substitute
UE4 uses UTF-16
Dodo Enthusiast 6/27/2023 12:55 AM
I think I remember some issues I had with ArkApi::GetApiUtils().SendNotification() with some special characters that got fixed by using ArkApi::Tools::Utf8Decode() on the message to send. Maybe my fault was to use std::string instead of FString in the first place. Just seemed related to the issue. (edited)
Avatar
Dodo Enthusiast 6/27/2023 1:14 AM
If I had to guess the correct way to do it would probably be something like this? FString crazyString = FString("aaäßßüüöö"); ArkApi::GetApiUtils().SendNotification(playerController, FColor(53, 194, 17), 1.6, 10,nullptr, *crazyString);
Avatar
I think that constructor still takes an ansi string
Avatar
Avatar
Pelayori
I think that constructor still takes an ansi string
Dodo Enthusiast 6/27/2023 1:25 AM
Maybe that connects the dots. If I use an FString at runtime I can use the version above but if I have a custom string with bad characters (e.g. from json) I need the decode?
Avatar
I guess
Avatar
Dodo Enthusiast 6/27/2023 1:29 AM
My bad than for mixing the topics and giving a misleading answer.
Avatar
std::wstring Utf8Decode(const std::string& str) { if (str.empty()) return std::wstring(); const int size_needed = MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast<int>(str.size()), nullptr, 0); std::wstring wstr(size_needed, 0); MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast<int>(str.size()), wstr.data(), size_needed); return wstr; }
2:30 AM
@Dodo Enthusiast
2:30 AM
Utf8 Decode takes a UTF 8 string and converts it
Avatar
I tried many conversion methods, but I couldn't convert FString into string. If there are special characters, they will always be displayed in garbled form.
8:55 AM
UE4 document has many descriptions of other types of conversion FString. FString converts other types rarely.
Avatar
Avatar
Invoker
I tried many conversion methods, but I couldn't convert FString into string. If there are special characters, they will always be displayed in garbled form.
itemDesc.ToString()
Avatar
Avatar
Pelayori
itemDesc.ToString()
I have tested that Fstring.Tostring can't convert special languages normally.
Avatar
That's correct
11:57 AM
You can try using API::Tools::Utf8Decode
11:58 AM
But the logger, and probably the server console doesn't support such characters
Avatar
Avatar
Pelayori
That's correct
console does not support utf8? It seems that it is necessary to store the data in the database for testing.
Avatar
Avatar
Invoker
I tried many conversion methods, but I couldn't convert FString into string. If there are special characters, they will always be displayed in garbled form.
You could take a look into ArkShop and see how they log things into a txt file if that's what you wanted.
Avatar
Avatar
Invoker
console does not support utf8? It seems that it is necessary to store the data in the database for testing.
Windows console does not support Unicode.
5:50 PM
If you are on windows 11 you can try the new windows terminal, which does support Unicode.
5:51 PM
Windows uses UTF-16 btw.
Avatar
Avatar
Natsu
You could take a look into ArkShop and see how they log things into a txt file if that's what you wanted.
ArkShop content displayed is from config.json, and the string read in this box is no problem. Is there a place for ArkShop to read the equipment name or character name in the game?
Avatar
Avatar
substitute
If you are on windows 11 you can try the new windows terminal, which does support Unicode.
I understand. I plan to skip the process displayed on the console and directly store the character name and equipment name that is read from the game into the database for testing.
5:43 AM
I hope this can solve the problem, but I have to first address the MySQL issue. It's also a challenge for me. Using C++ reference libraries is much more complicated than using C#.
Avatar
Avatar
Invoker
console does not support utf8? It seems that it is necessary to store the data in the database for testing.
SetConsoleOutputCP(CP_UTF8);
3:12 PM
try setting the output mode on server start as such
Avatar
Would this be an efficiënt way to get all structure's/dino's in range? const int MinFoundations = 3200; UWorld* world = ArkApi::GetApiUtils().GetWorld(); TArray<AActor*> new_actors; TArray<AActor*> actors_ignore; TArray<TEnumAsByte<enum EObjectTypeQuery>> types; UKismetSystemLibrary::SphereOverlapActors_NEW(world, player_controller->RootComponentField()->RelativeLocationField(), static_cast<float>((MinFoundations * 300)), &types, APrimalStructure::GetPrivateStaticClass(), &actors_ignore, &new_actors); for (AActor* actor : new_actors) { APrimalStructure* structure = static_cast<APrimalStructure*>(actor); float TribeID = structure->TargetingTeamField(); Log::GetLog()->info(""); }
Avatar
Api utils has a get all actors in range function, which uses octrees that perform faster than sphere overlaps
6:20 PM
But yeah, that also works
6:21 PM
You might have to find what Object types you want, though
Avatar
Avatar
Pelayori
Api utils has a get all actors in range function, which uses octrees that perform faster than sphere overlaps
i want the following. player uses a command it needs to check X foundations just in case there is a enemy foundation near by if not do X.
Avatar
Yeah both will work
6:22 PM
Sphere overlaps and octrees must be optimized, they are kinda the core of the game engine
Avatar
oh i forgot to tell you, if i am correct you had a problem with stryders inside zone's right?
Avatar
That's not due to sphere overlaps / octrees (edited)
6:23 PM
Safe zones uses Trigger Spheres, that trigger begin/end overlap events
6:23 PM
Which somehow breaks the stryder
Avatar
i found the solution it's because of this if (!stryder) { comp->SetCollisionEnabled(ECollisionEnabled::QueryOnly); } else { comp->SetCollisionEnabled(ECollisionEnabled::NoCollision); }
6:24 PM
it works for what i use it for (just blocking building)
Avatar
Anyway to "Hide myself" from the playerlist ?
Avatar
jraServerAPI 6/29/2023 9:53 PM
log off? 1037_hehepepe
Avatar
Avatar
jraServerAPI
log off? 1037_hehepepe
Funny xD i want to spectate people without them knowing
Avatar
jraServerAPI 6/29/2023 9:54 PM
log in as a normal player 123 steam name 🙂
9:54 PM
then hide yourself via plugin
Avatar
Avatar
jraServerAPI
then hide yourself via plugin
what do you mean hide yourself with plugin as in steam profile?
Avatar
jraServerAPI 6/29/2023 9:57 PM
welll i mean..just in game, you can hide your character and still play (edited)
9:57 PM
probably not quite what you want
Avatar
does anyone know how to prevent opening inventory's? i am hooking into Hook_UPrimalInventoryComponent_ServerViewRemoteInventory, the log will be called but if i return; the inventory still opens. tried to ServerCloseRemoteInventory but it does not work here is the code. void Hook_UPrimalInventoryComponent_ServerViewRemoteInventory(UPrimalInventoryComponent* _this, AShooterPlayerController* ByPC) { if (CheckActorActionInventory(_this, ByPC)) { _this->ServerCloseRemoteInventory(ByPC); return; } UPrimalInventoryComponent_ServerViewRemoteInventory_original(_this, ByPC); }
Avatar
There’s a is allowed inventory access function that works for most things
👍 1
Avatar
Avatar
WETBATMAN
SetConsoleOutputCP(CP_UTF8);
Thank you. I'll try.
Avatar
AActor* Hook_ChoosePlayerStart_Implementation(AShooterGameMode* _this, AController* Player) { int PlayersLevel = 1; UPrimalCharacterStatusComponent* char_component = static_cast<APrimalCharacter*>(Player->CharacterField())->MyCharacterStatusComponentField(); if (char_component != nullptr) { PlayersLevel = char_component->BaseCharacterLevelField() + char_component->ExtraCharacterLevelField(); // Players Level LOG->info("Hook_ChoosePlayerStart_Implementation->PlayersLevel:" + PlayersLevel); char_component->UpdateStatusValue(EPrimalCharacterStatusValue::Type::Health, 5, false);// Health char_component->UpdateStatusValue(EPrimalCharacterStatusValue::Type::Water, 5, false);// Water char_component->UpdateStatusValue(EPrimalCharacterStatusValue::Type::Weight, 5, false);// Weight } return ChoosePlayerStart_Implementation_original(_this, Player); }
5:04 AM
I tried to modify the character's health and weight, UPrimalCharacterStatusComponent* char_component = static_cast<APrimalCharacter*>(Player->CharacterField())->MyCharacterStatusComponentField(); After the role was created, this line of code caused the server to crash.
Avatar
Avatar
Invoker
I tried to modify the character's health and weight, UPrimalCharacterStatusComponent* char_component = static_cast<APrimalCharacter*>(Player->CharacterField())->MyCharacterStatusComponentField(); After the role was created, this line of code caused the server to crash.
🐨Dream Doctor🦘 7/3/2023 8:26 AM
Unfortunately I can't help you on specifics in this case, but in my experience server crashes are usually due to invalid/null references. You might try breaking down the offending line into smaller parts to get a better idea of where the issue is, and add as many null checks as you can until you find the problem reference.
8:27 AM
I'm sure one of our amazing gurus could be more helpful though.
Avatar
Avatar
🐨Dream Doctor🦘
Unfortunately I can't help you on specifics in this case, but in my experience server crashes are usually due to invalid/null references. You might try breaking down the offending line into smaller parts to get a better idea of where the issue is, and add as many null checks as you can until you find the problem reference.
This line of code is to get an UprimalCharacterstatus Component object, which is very concise. I really don't know how to disassemble it.
Avatar
Avatar
🐨Dream Doctor🦘
I'm sure one of our amazing gurus could be more helpful though.
However, thank you for helping me put forward this scheme. I can use this method to troubleshoot bugs in other problems I encounter in the future.
Avatar
Avatar
Invoker
This line of code is to get an UprimalCharacterstatus Component object, which is very concise. I really don't know how to disassemble it.
🐨Dream Doctor🦘 7/3/2023 8:35 AM
Well you can certainly check each of those references for null as a start 🙂
Avatar
static_cast<APrimalCharacter*>(Player->CharacterField())->MyCharacterStatusComponentField(); If the problem is caused by null, it is most likely that the target converted to APrimalCharacter here has not been obtained.
Avatar
Avatar
🐨Dream Doctor🦘
Well you can certainly check each of those references for null as a start 🙂
When I was studying c++,I wrote this function under the guidance of teacher Kals. I have changed the function of the hook, which may cause some loss.
Avatar
I saw these codes in arkshop source code, which is not quite the same as the c++ I studied. mysql and sqlite inherit IDatabase respectively. Why are mysql and sqlite not .cpp files as implementation classes? They are all .h files like IDatabase.
Avatar
Is it possible for server to regenerate players auth token?
Avatar
Avatar
Invoker
I saw these codes in arkshop source code, which is not quite the same as the c++ I studied. mysql and sqlite inherit IDatabase respectively. Why are mysql and sqlite not .cpp files as implementation classes? They are all .h files like IDatabase.
They could be self contained
Avatar
Avatar
SR
Is it possible for server to regenerate players auth token?
To add context to @SR's question: We were trying to figure out if it's possible to send a player from one server to another with a server plugin. There are some functions like APlayerController::ClientTravel() that sort of get the job done. The player is sent to the other server, but some things are in a bad state (e.g., no auth token). I figure it's (at least partially) because some necessary online session management is getting skipped over. I'm not sure if it's possible to handle it all from the server though, looks like the client might need to initiate some calls to do it properly. Haven't spent a ton of time on it, but I'd be curious if anyone else has accomplished this (or knows for a fact that it's not possible). (edited)
Avatar
I'm not sure that will be possible since the client initiates the connection to the server. The only thing the server handles in that process is uploading the character to ARKData I believe.
Avatar
Yeah we were just trying to transfer the client from one server to another without uploading a character or anything, but I'm afraid that isn't completely possible. With APlayerController::ClientTravel() the client gets connected to the other server and is able to play, but there are a few issues. UE's ClientTravel() can be called from the server to the client, but at least in ARK it seems to only ever be called locally on the client (in addition to some other calls we can't do directly on the server).
Avatar
Also tried to be clever and make the client do all the work with: c++ // Replace the IP and port as appropriate FString cmd = "open 127.0.0.1:7777"; spc->ClientRunLocalConsoleCommand(&cmd, false); But got the same behavior as just calling APlayerController::ClientTravel() directly (at least with the Steam client, didn't try Epic)
Avatar
You could create a mod to facilitate your commands on the client side.
Avatar
Yeah that could be an option. My servers all have Epic crossplay so I don't do mods, but this is mostly @SR 's project. Most of the functions I was looking didn't seem to be directly exposed to the dev kit, but maybe we can see what the transfer UI is triggering or something. I modified ArkServerApi to load on the client and was working on getting it to transfer from that side, but that's really just for personal learning.
Avatar
You’ll have to disable the anticheat to make that work.
Avatar
Yeah it's not for use on actual servers. Just testing/experimenting (edited)
12:15 AM
And I wouldn't make players download local client-side plugins either. Technically you could also load mods on Epic-enabled servers, but that's too many hoops for people to jump through lol.
Avatar
Avatar
TheMollusk
And I wouldn't make players download local client-side plugins either. Technically you could also load mods on Epic-enabled servers, but that's too many hoops for people to jump through lol.
long-term it could be viable once official goes down
Avatar
https://discord.com/channels/513432877904691202/513440481984774145/1127695685769232424 I think we are going to get more questions like this than related to API in a new server
Avatar
I fully expect to have to implement at some juncture a private server type of system when Wildcard fully drops support for Ark 1.0
12:31 AM
afaik the game has issues if their text feeds don't load properly.
12:32 AM
#deleted-channel
Avatar
Avatar
SR
https://discord.com/channels/513432877904691202/513440481984774145/1127695685769232424 I think we are going to get more questions like this than related to API in a new server
you can cross-server link a channel
Avatar
Avatar
substitute
I fully expect to have to implement at some juncture a private server type of system when Wildcard fully drops support for Ark 1.0
I hope that doesn't become necessary. But knowing WildCard....
Avatar
Avatar
TheMollusk
I hope that doesn't become necessary. But knowing WildCard....
You can do 90% of all of it with a dns redirect
Avatar
Duster_drUAGON 7/13/2023 5:45 PM
How to convert APlayerController to AShooterPlayerController?
Avatar
Avatar
Duster_drUAGON
How to convert APlayerController to AShooterPlayerController?
static_cast<AShooterPlayerController>(my_player_controller);
Avatar
Duster_drUAGON 7/13/2023 5:47 PM
Thank you!
Avatar
If you have pointers, add * to the end of AShooterPlayerController (edited)
Avatar
Duster_drUAGON 7/13/2023 5:54 PM
I've also had another question so i've configured a function for ArkApi::GetCommands().AddConsoleCommand() how do i print strings inside the client console?
5:54 PM
arguments are APlayerController* a, FString* b, bool c
Avatar
jraServerAPI 7/13/2023 6:17 PM
use Log::GetLog()->info() or warn() etc...
6:18 PM
to send messages to the server console window
6:19 PM
for client chat in game you need to use ArkApi::GetApiUtils().SendChatMessage() or SendChatMessageToAll() etc...
Avatar
Original message was deleted or could not be loaded.
GSH | MrOwlSky 7/13/2023 10:29 PM
Make sure to post the updated links https://github.com/ServersHub/Ark-Server-Plugins is the up to date Github repo.
Server Plugins for ARK: Server API. Contribute to ServersHub/Ark-Server-Plugins development by creating an account on GitHub.
Avatar
jraServerAPI 7/13/2023 10:43 PM
🤦‍♂️
Avatar
I tried to convert AController to APrimalCharacter to call MyCharacterStatusComponentField () to return UPrimalCharacterStatusComponent
9:15 AM
When it triggers, the server crashes
Avatar
Avatar
substitute
static_cast<AShooterPlayerController>(my_player_controller);
Hi,Substitute. Static_cast < > convert the types supported by any format?
Avatar
Avatar
Invoker
Hi,Substitute. Static_cast < > convert the types supported by any format?
9:39 AM
You’re asking a general C++ question
Avatar
Avatar
substitute
You’re asking a general C++ question
Sorry, I'm learning c++.
Avatar
Hello, I wanted to ask if it is possible to permanently add a visual effect to a dinosaurs, such as the beam of a transmitter or the red dot of a Parasaur scan?
Avatar
*over a plugin
Avatar
Original message was deleted or could not be loaded.
is this a mod already made or your looking for someone wanting to make a mod?
Avatar
Original message was deleted or could not be loaded.
This isn’t the place to advertise work
👍 1
Avatar
Original message was deleted or could not be loaded.
You'd have better luck posting it on the modding discord. They have a "Jobs Board" channel
👍 1
Exported 30,011 message(s)
Timezone: UTC+1