Amiibo drops: Difference between revisions
Jump to navigation
Jump to search
→Notes on AmiiboMgr
imported>Leoetlino (→Logic) |
imported>Leoetlino |
||
Line 21: | Line 21: | ||
|} | |} | ||
== | == amiibo registering == | ||
amiibo | amiibo are registered<ref>0x710064B564 on Switch 1.5.0</ref> every time an amiibo is used. | ||
* [[AIDef:Action/CreateEpona]] | * [[AIDef:Action/CreateEpona]] does so after Epona has been spawned. | ||
* [[AIDef:AI/WolfLinkAmiibo]] | * [[AIDef:AI/WolfLinkAmiibo]] does it after spawning Wolf Link. | ||
* [[AIDef:Action/ItemAmiiboSelectDropTable]] registers an amiibo as soon as it is scanned. | * [[AIDef:Action/ItemAmiiboSelectDropTable]] registers an amiibo as soon as it is scanned, even before spawning the drops. | ||
Whenever an amiibo is registered: | |||
* | *AmiiboMgr determines if it should reset its daily amiibo use history (stored in the AmiiboTouchHistory flag)<ref>0x710064B3C8</ref>. | ||
**If less than 86400 seconds (1 day) have elapsed since the game was launched, don't do anything.{{check}} | **If less than 86400 seconds (1 day) have elapsed since the game was launched, don't do anything.{{check}} | ||
**AmiiboMgr then computes <code>10000 * now.year + 100 * now.month + now.day</code>. If the value is different from AmiiboLastTouchDate (which would mean that a day has elapsed), the AmiiboTouchHistory array is cleared. | **AmiiboMgr then computes <code>10000 * now.year + 100 * now.month + now.day</code>. If the value is different from AmiiboLastTouchDate (which would mean that a day has elapsed), the AmiiboTouchHistory array is cleared. | ||
*The amiibo UID is inserted into AmiiboTouchHistory. Only the last 100 entries are kept. | *The amiibo UID is inserted into AmiiboTouchHistory. Only the last 100 entries are kept. | ||
*It is also inserted into AmiiboTouchHistoryTotal. Only the last 200 entries are kept. | *It is also inserted into AmiiboTouchHistoryTotal. Only the last 200 entries are kept. | ||
*Finally, AmiiboLastTouchDate is set to <code>10000 * now.year + 100 * now.month + now.day</code>. | *Finally, AmiiboLastTouchDate is set to <code>10000 * now.year + 100 * now.month + now.day</code> to update the last amiibo usage date. | ||
== Logic<ref>[[AIDef:Action/ItemAmiiboCreateFromDropTable]]</ref> == | == Logic<ref>[[AIDef:Action/ItemAmiiboCreateFromDropTable]]</ref> == |