alloc8or / gta5-nativedb-data

A database of all GTAV script commands ("natives"). Strictly for educational purposes! https://alloc8or.re/gta5/nativedb/
177 stars 98 forks source link

new leak #208

Closed yasmasdas closed 1 year ago

yasmasdas commented 1 year ago

can someone parse https://github.com/gta-source/gta-source to update all parameters and descriptions

hzhutuqiz commented 1 year ago

i had a go. it is ok. little discrepancies with a few return types like GET_BLIP_INFO_ID_ENTITY_INDEX (0x4BA4E2553AFEDC2C). nativedb records as Entity but new data source says a Vehicle is returned. i'll make a list and see how many differences there are later.

updating descriptions is easy (if you want easy DMCA 😆). to avoid that attention you need to strip any reference to t2 workers or any of the gifted sch files from the comments. also need to change some parameter names to keep consistency with existing community research. "player" instead of "PlayerIndex", etc.

yasmasdas commented 1 year ago

might not wanna do description alot extra not needed info with some of them. and I dont not mean type. I mean only parameter name

kagikn commented 1 year ago

I wonder if @alloc8or had the repo locally cloned so he can verify if some of the leak info is correct.

yasmasdas commented 1 year ago

@kagikn they all real and correct. it rockstars their function definitions

yasmasdas commented 1 year ago

i will make parser maybe soon if nobody else do

kagikn commented 1 year ago

@yasmasdas I’m sure most of the leaked info is correct, but it looks like some of it contradicts how some of the game scripts use natives. Here’s that doc of TASK_PLANE_MISSION.

//  VEHICLE_INDEX TargetVehicleIndex (If a target vehicle needs to be specified it is done here)
//  PED_INDEX TargetPedIndex (If a target ped needs to be specified it is done here)
//  FLOAT TargetX, TargetY, TargetZ (specify targetcoordinates here in needed.)
//  VEHICLE_MISSION Mission (Mission to be exectuted. ie MISSION_GOTO, MISSION_ATTACK, MISSION_FOLLOW) in commands_vehicle.sch

//  FLOAT CruiseSpeed (in m/s)
//  FLOAT TargetReachedDist (distance (in meters) at which plane thinks it's arrived.)
//                          ALSO used as the hover distance for MISSION_ATTACK and MISSION_CIRCLE
//  FLOAT Orientation (orientation plane tries to be in. (0-360) Use -1 if not bothered. -1 Should be used in 99% of the times) 
//  INT FlightHeight (z coordinate the plane tries to maintain. ie 30 == 30 meters above sea level)
//  INT MinHeightAboveTerrain (height in meters that the plane will try to stay above terrain. ie 20 == always tries to stay at least 20 meters above ground.) 
//PURPOSE: Gives the plane a mission. More info..
NATIVE PROC TASK_PLANE_MISSION( PED_INDEX PedIndex, VEHICLE_INDEX PlaneIndex, VEHICLE_INDEX TargetVehicleIndex, PED_INDEX TargetPedIndex, VECTOR VecCoors, VEHICLE_MISSION Mission, FLOAT CruiseSpeed, FLOAT TargetReachedDist, FLOAT PlaneOrientation, INT FlightHeight, INT MinHeightAboveTerrain, bool bPrecise = TRUE) = "0xcdaacb23d43f080d"

~~Considering how some game scripts use this native, FlightHeight and MinHeightAboveTerrain are supposed to be float. I removed the irrelevant drive path from this doc fyi.~~ I was wrong about TASK_PLANE_MISSION. After I tested by calling the native and reinterpret casting values for either parameter to int, both parameter are supposed to be int as well as TASK_HELI_MISSION. There’s no legitimate way to support both float and int values put at the same parameter, tho (How tf could you detect properly if the value isn’t NaN as float?).

yasmasdas commented 1 year ago

The game accepts both for your knowledge (looking at game scripts), and this is rockstar definitions and any mistake is r*'s fault TASK::TASK_PLANE_MISSION(..... SYSTEM::CEIL((50f + 5f)), 2.8E-44f, true);

I will making parser tommorow or today since nobody is doing