Shtivi 40 Posted October 8, 2020 Share Posted October 8, 2020 Hi everyone! Been a while since I had time to write any script... missed it. I think there is lack of knowledge about ped task ids. Which ones do you know? I'm talking about the task index parameter for this native function: I know only that 399 = is ped hogtied. (Thanks to LMS) Which ones do you know? To be more specific, I'm looking (for a lot of time actually) for a way to find out whether the player holds up a ped with his lasso, and which ped it is. I am not aware of any built-in way to do it, so I've implemented a workaround in one of my mods (TieYourLasso). But it is a bit flakey and could work much better. Thanks! Quote Link to comment Share on other sites More sharing options...
LMS 673 Posted October 8, 2020 Share Posted October 8, 2020 It will be much harder to gather the IDs in RDR2 unfortunately, as the tasks no longer have their RTTI names available. The way I did it so far was match them to natives or have a loop with all task IDs, printing out the active ones, and then guessing which one is which based on what the ped is doing. Also note that 399 is now 400, quoting myself from a conversation with @DoctorBones: Quote what happened in the last update was that task 0x266 became task 0xF and hence all task IDs starting from 0xF have shifted up by one. Why the ID was changed and what the task does, I am not sure. It was also modified a bit. The easiest way to get the numbers is to loop from 0 to 999 on a given ped and run GET_IS_TASK_ACTIVE. If you trial and error a bit you should be able to assign a specific ped assign to a task ID. This is what I have: 7 - CTaskPersistentCharacter 76 - CTaskSwapWeapon 152 - CTaskScriptMelee 154 - Ped being dragged down? 223 - Horse task, whether they are part of a wagon 341 - Ped being tackled on the ground 400 - Is hogtied 451 - CTaskCarriable 1 Quote Link to comment Share on other sites More sharing options...
Shtivi 40 Posted October 9, 2020 Author Share Posted October 9, 2020 20 hours ago, LMS said: It will be much harder to gather the IDs in RDR2 unfortunately, as the tasks no longer have their RTTI names available. The way I did it so far was match them to natives or have a loop with all task IDs, printing out the active ones, and then guessing which one is which based on what the ped is doing. Also note that 399 is now 400, quoting myself from a conversation with @DoctorBones: This is what I have: 7 - CTaskPersistentCharacter 76 - CTaskSwapWeapon 152 - CTaskScriptMelee 154 - Ped being dragged down? 223 - Horse task, whether they are part of a wagon 341 - Ped being tackled on the ground 400 - Is hogtied 451 - CTaskCarriable Thanks, this is a lot. And I have to admit that I didn't think about this technique to find them out. Although it's still guessing. Also, in one of my mods I'm using the is hogtied, and it is still working for me (after the last patch). Strange. Quote Link to comment Share on other sites More sharing options...
LMS 673 Posted October 9, 2020 Share Posted October 9, 2020 1 hour ago, Shtivi said: Thanks, this is a lot. And I have to admit that I didn't think about this technique to find them out. Although it's still guessing. Also, in one of my mods I'm using the is hogtied, and it is still working for me (after the last patch). Strange. Perhaps what is now 399 is also related to being hogtied and hence it still works. I know for RDRFR I had to change the ID as it did not quite do what we needed anymore. If you guess a few, it'd be great if you could post them here. I am always looking for more. Quote Link to comment Share on other sites More sharing options...
DoctorBones 8 Posted October 11, 2020 Share Posted October 11, 2020 399 is now having a PED lassoed but not hogtied. On 10/9/2020 at 7:12 PM, LMS said: Perhaps what is now 399 is also related to being hogtied and hence it still works. I know for RDRFR I had to change the ID as it did not quite do what we needed anymore. If you guess a few, it'd be great if you could post them here. I am always looking for more. 1 Quote Link to comment Share on other sites More sharing options...
Shtivi 40 Posted October 11, 2020 Author Share Posted October 11, 2020 On 10/9/2020 at 8:12 PM, LMS said: Perhaps what is now 399 is also related to being hogtied and hence it still works. I know for RDRFR I had to change the ID as it did not quite do what we needed anymore. If you guess a few, it'd be great if you could post them here. I am always looking for more. Don't worry, I will 🙂 7 hours ago, DoctorBones said: 399 is now having a PED lassoed but not hogtied. Cool, I'll check this one out. Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted November 17, 2020 Share Posted November 17, 2020 Do we know what the task for the arterial bleeding stumbling is? (I want to check if a ped is in this bleeding mode) What does this mean: CTaskPersistentCharacter Quote Link to comment Share on other sites More sharing options...
LMS 673 Posted November 18, 2020 Share Posted November 18, 2020 11 hours ago, HughJanus said: Do we know what the task for the arterial bleeding stumbling is? (I want to check if a ped is in this bleeding mode) What does this mean: CTaskPersistentCharacter No idea, the list I posted above is all I have currently. Try the method I explained though to log tasks and see if you can narrow it down. While I am not entirely sure what CTaskPersistentCharacter is, it seems to be used for "scenario/stationary" peds for the most part, such as the sheriff in town. Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted November 18, 2020 Share Posted November 18, 2020 (edited) 14 hours ago, LMS said: No idea, the list I posted above is all I have currently. Try the method I explained though to log tasks and see if you can narrow it down. While I am not entirely sure what CTaskPersistentCharacter is, it seems to be used for "scenario/stationary" peds for the most part, such as the sheriff in town. 582 and 594 seem to be fleeing tasks. When someone is drawing his weapon and fighting me, there are tasks in this order: 343, 355, 364 and 428 (I think the 428 is the fighting one, the others are for drawing guns or going into some stance, I suppose). When NPCs are walking around and I shoot them, tasks I get are 47 and 320 (I guess 320 is the walking one and 47 is being hit or so?). Have not found the bleeding one yet 😕 Edit: 603 seems to be writhing on the ground. 121 is in a chain of multiple tasks when someone is dying. 608 seems to be the last task in a chain when dying on the ground while writhing. When someone is burning, its 39 then 588. I suppose bleeding out (at least some versions of them) is one of those: 56, 57, 243 (more tests necessary, though - cant say anything right now) Here is the code for drawing the tasks on screen, in case anyone wants to try stuff (draws a list of tasks on the screen, the ped you are aiming at is doing): char c[40]; std::string text = "NPC Task ID: "; Player player = PLAYER::PLAYER_ID(); Ped playerPed = PLAYER::PLAYER_PED_ID(); strcpy(c, text.c_str()); DrawText(0.15, 0.15, c); if (WEAPON::IS_PED_WEAPON_READY_TO_SHOOT(playerPed)) { Entity playerTarget; if (PLAYER::GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(player, &playerTarget)) { for (int g = 0; g < 999; g++) { if (g != 582 && g != 594 && AI::GET_IS_TASK_ACTIVE(playerTarget, g)) { if (text.find("," + std::to_string(g) + ",") == string::npos) { if (text == "NPC Task ID: ") text += std::to_string(g); else text += "," + std::to_string(g); strcpy(c, text.c_str()); DrawText(0.15, 0.15, c); } } } } } Edit 2: Could it be that there is no task for the artery shot behavior? It seems to me that every time I think I have the right task id, it turns out not being it^^ Edited November 18, 2020 by HughJanus Quote Link to comment Share on other sites More sharing options...
LMS 673 Posted November 21, 2020 Share Posted November 21, 2020 It could be that the artery shot behavior is part of a "parent" task and has no individual task. Hence you cannot find it. Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted November 22, 2020 Share Posted November 22, 2020 23 hours ago, LMS said: It could be that the artery shot behavior is part of a "parent" task and has no individual task. Hence you cannot find it. Thats unfortunate :/ Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted November 26, 2021 Share Posted November 26, 2021 Does anybody know the task id of the "hands up" task? I figured its 532 out of some tests fitfondue did and recorded, but I am not sure. Quote Link to comment Share on other sites More sharing options...
crossed99 43 Posted November 27, 2021 Share Posted November 27, 2021 I'm getting these tasks as active when they're idle compared to when I make them do the hand up task with TASK_HANDS_UP: 2021-11-27 15:48:42.==== player idle ===== 2021-11-27 15:48:42. - 18 2021-11-27 15:48:42. - 21 2021-11-27 15:48:42. - 25 2021-11-27 15:48:42. - 48 2021-11-27 15:48:42. - 53 2021-11-27 15:48:42. - 320 2021-11-27 15:48:42. - 332 2021-11-27 15:48:42. - 335 2021-11-27 15:48:44.==== npc idle ===== 2021-11-27 15:48:44. - 48 2021-11-27 15:48:44. - 53 2021-11-27 15:48:44. - 244 2021-11-27 15:48:44. - 266 2021-11-27 15:48:44. - 270 2021-11-27 15:48:44. - 291 2021-11-27 15:48:44. - 320 2021-11-27 15:48:44. - 335 2021-11-27 15:48:46.==== pl hands up ===== 2021-11-27 15:48:46. - 0 2021-11-27 15:48:46. - 47 2021-11-27 15:48:46. - 320 2021-11-27 15:48:46. - 335 2021-11-27 15:48:47.==== npc hands up ===== 2021-11-27 15:48:47. - 0 2021-11-27 15:48:47. - 47 2021-11-27 15:48:47. - 320 2021-11-27 15:48:47. - 335 So 0 or 47 maybe? Or maybe it's a different task when they do it "naturally" and not with TASK_HANDS_UP... 1 Quote Link to comment Share on other sites More sharing options...
HughJanus 244 Posted December 2, 2021 Share Posted December 2, 2021 Havent found out yet, but the problem with some things not working was solved another way. Thanks for you input, @crossed99! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.