Does anyone know if the NativeDB is under maintainance?
-
I have just been checking the NativeDB at http://www.dev-c.com/nativedb/ and have noticed that some natives seem to have been removed from the list, _GET_RAYCAST_RESULT and _CAST_3D_RAY_POINT_TO_POINT are two that have gone for certain.
I am sure they used to be there, especially as the _CAST_RAY_POINT_TO_POINT native tells you to use _GET_RAYCAST_RESULT for the result. So that made me wonder if this latest update hasn't changed a lot more that we were expecting, causing some Natives to become unavailable to us.
That would be a huge concern for mods like my own, which rely on raycast results to function.
-
It looks like there still there just renamed to shape test. START_SHAPE_TEST_LOS_PROBE exc.
-
@aimless Yeah, I've just had a reply from someone on GTAForums saying the same thing. My concern now is that those changes might break existing mods... I really hope it doesn't.
-
@LeeC2202 If you do get any information about certain mods that are broken because of this, please share.
-
@Weirdoutworld I will... guaranteed.
-
@LeeC2202 Luckily, .NET mods won't be affected unless a new version of scripthookvdotnet is released with an updated .hpp file. But most mods use World.Raycast instead of directly calling natives, so even then they wouldn't be affected by this.
-
@CamxxCore But as I asked on Gitter, what happens if ScriptHookV is released using the new hashes for those natives? What happens when I use World.Raycast and SHVDN uses Native::Hash::_GET_RAYCAST_RESULT and it no longer exists?
Edit: Just had it explained on Gitter, about the hash tables etc... I understand now and can rest easy without the panic of expecting an angry mob wanting to know why my mod doesn't work. I guess I should be thankful my name isn't Alexander Blade.
-
If the natives are renamed, it is possible that Alexander Blade is going to put something in there that converts it in memory, so the mod ends up calling the native under the new name rather than the old. I would hate to see natives get removed, because I have a lot of mods, and I would hate to reinstall a bunch of them.
This may be why it is taking longer than usual for the new ScriptHookV, but then again, it usually takes a day longer when updates are large like this one.
-
@nkjellman From what was said on Gitter, even if the names change, the hashes don't and that's what the calls are made based on.
This is the quote from Mark Ludwig:
Here's the thing, SHVDN uses an enum table of hashes. The only thing that changes are the names. The hashes don't change.
Unless I'm missing something here and the hashes are going to be updated? Lol
If someone thinks hash X is _KILL_VEHICLE_ENGINE but turns out it was DISABLE_VEHICLE_ENGINE, mods using _KILL_VEHICLE_ENGINE would still work.
So it looks like things will be fine... thankfully.
-
@LeeC2202 Not exactly. If scripthookvdotnet updates the names, it will in fact break mods that use those natives. You can avoid it if you explicitly cast the hash to GTA.Native.Hash or just use the unnamed version of the native in the enum, but of course this can make your code less readable..
-
You do need to keep in mind that all native names starting with an underscore are community-named. If in the future the real internal R* naming is found, the name will be changed to that. So, depending on how many native calls you make to community-named natives you need to update your usage of natives.h every so often.
If you let things build online for whatever reason you can/should just use your current natives.h and update it every so often when people complains it won't build for them
-
@ikt I didn't realise that about the ones starting with the underscore. I wondered why they were named like that... thanks, that's useful to know.