Advertisement
dragonbane

Last Item ID

Jan 2nd, 2020
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. Last Item ID: 0x8040B177 (0 on initial game boot, not reset by softreset)
  2. Exclusively read by: 0x8011a8f0 d_a_alink::daAlink_c::procCoGetItemInit (only triggered when int(Link + 0x60c) = 0x100)
  3.  
  4. When called with int(Link + 0x60c) = 0x100, procCoGetItemInit uses the Last Item ID to spawn the item Link will receive via f_op_actor_mng::fopAcM_createItemForPresentDemo
  5. fopAcM_createItemForPresentDemo calls d_event::dEvt_control_c::setGtItm which stores the received item ID back in 0x8040B177
  6. d_event::dEvt_control_c::setGtItm is called by fopAcM_createItemForPresentDemo and fopAcM_createItemForTrBoxDemo
  7.  
  8. procCoGetItemInit is scheduled by the dialog text via daAlink_c::execute ---> daAlink_c::checkDemoAction
  9.  
  10. Only in the rare case of int(Link + 0x60c) = 0x100 instead of 0x00 (only some NPCs and situations where Link goes from still to holding an item asap) procCoGetItemInit makes use of the Last Item ID in a read sense.
  11.  
  12. fopAcM_createItemForPresentDemo or fopAcM_createItemForTrBoxDemo is always used first and then procCoGetItemInit is usually used to trigger the holding animation of Link and starting the created event. But some situations create a feedback loop by setting the item ID first by creating the event with fopAcM_createItemForPresentDemo and then scheduling it again from procCoGetItemInit because int(Link + 0x60c) = 0x100
  13.  
  14. Auro break skips fopAcM_createItemForPresentDemo, but still schedules Link's animation and because int(Link + 0x60c) = 0x100, it will use the last item ID instead to also schedule the event. int(Link + 0x60c) = 0x100 is an integer value coming from the event_data for this cutscene. Set by 0x8011789c daAlink_c::setDemoData
  15.  
  16. Requirements:
  17. -An event_data driven cutscene (like Auro initial cinematic) that triggers an get_item command with the item ID 0x100 (256) which orders Link to get the last item ID as the item instead as an override via procCoGetItemInit
  18. -Need to hit this point in the cinematic while skipping over any fopAcM_createItemForPresentDemo calls that can set the last item ID value properly as intended. This is done by skipping over the text that triggers this function via NPC callback
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement