RetroAchievements / docs-archive

RADocs
https://docs-archive.retroachievements.org
52 stars 10 forks source link

Real Example Suggestions #39

Open televandalist opened 3 years ago

televandalist commented 3 years ago

I think we can all agree that we need more of these. Source: #13 #14 #15 #23 #28 #36

So let's just start a project to list what we need and the examples we can use for the docs. Having multiple examples per category would showcase and stress the point that there are often multiple ways to get the same results. Not to mention what works in one game may not work in another.

I'd also like to see in-depth case studies documented at some point. :)

StingX2 commented 3 years ago

Ryudo — https://retroachievements.org/achievement/473 The Desert in Aladdin (Mega Drive) Aladdin (Mega Drive) - Reach 'The Desert'

1 And Next Delta 8-bit 0x007278 = Value 0x00004e (0) 2 Pause If Mem 8-bit 0x007278 = Value 0x000050 (1) ^These check if you entered the last correct 'cheat input' for debug menu cheat

3 And Next Mem 8-bit 0x00f159 = Value 0x0000ff (0) 4 And Next Delta 8-bit 0x007278 = Value 0x000034 (0) 5 Pause If Mem 8-bit 0x007278 = Value 0x000036 (1) ^These check if you paused the game , and how far you are in entering the level skip cheat

6 Or Next Mem 8-bit 0x00efae = Value 0x000016 (0) 7 Or Next Mem 8-bit 0x00efae = Value 0x000017 (0) 8 Or Next Mem 8-bit 0x00efae = Value 0x000018 (0) 9 And Next Mem 8-bit 0x00efae = Value 0x000019 (0) 10 Pause If Mem 16-bit 0x007268 = Value 0x008ff2 (1) ^These check if you are hovering over any of the debug menu options, while also checking if you're actually in the debug menu itself , if 6-10 are true it'll pause lock

StingX2 commented 3 years ago

Tatoonie — Today at 4:49 PM https://retroachievements.org/achievement/155956 Mission 01 Challenge in Silent Bomber (PlayStation) Silent Bomber (PlayStation) - Defeat Mission 01 boss without taking damage or using liquid bombs (no upgrades)

1 Mem 8-bit 0x0b5c58 = Value 0x000002 (0) 2 Mem 8-bit 0x0d7e39 = Value 0x000002 (0) 3 Delta 8-bit 0x0d7e39 = Value 0x000001 (0) These check if you defeat the boss and are in the correct level 4 And Next Mem 8-bit 0x0d7e39 = Value 0x000001 (0) 5 Pause If Mem 16-bit 0x0d73bd < Delta 16-bit 0x0d73bd (1) These check if you got damaged while fighting the boss 6 And Next Mem 8-bit 0x0d7e39 = Value 0x000001 (0) 7 Pause If Mem 8-bit 0x0d7e2a < Delta 8-bit 0x0d7e2a (1) 8 And Next Mem 8-bit 0x0d7e39 = Value 0x000001 (0) 9 Pause If Mem 8-bit 0x0d7e2b < Delta 8-bit 0x0d7e2b (1) 10 And Next Mem 8-bit 0x0d7e39 = Value 0x000001 (0) 11 Pause If Mem 8-bit 0x0d7e2c < Delta 8-bit 0x0d7e2c (1) These check if you used a liquid bomb while fighting the boss 12 And Next Mem 8-bit 0x0d7e39 = Value 0x000001 (0) 13 Add Source Mem 8-bit 0x0d7e2e 14 Add Source Mem 8-bit 0x0d7e30 15 Pause If Mem 8-bit 0x0d7e2f > Value 0x000000 (1) These check if you have upgrades equiped while fighting the boss for the alt group 1 Reset If Mem 8-bit 0x0c7e80 = Value 0x000088 (0) resets if you die 2 Reset If Mem 8-bit 0x0c7e80 = Value 0x0000a8 (0)

StingX2 commented 3 years ago

https://retroachievements.org/achievement/146247 Ready to Upgrade in Kamen Rider Agito (PlayStation) Kamen Rider Agito (PlayStation) - Earn 400 coins in one sitting

this is a big one 1 Sub Source Delta 16-bit 0x089b5a
2 Add Hits Mem 16-bit 0x089b5a >= Value 0x000002 (0) 3 Sub Source Delta 16-bit 0x089b5a
4 Add Hits Mem 16-bit 0x089b5a >= Value 0x000003 (0) 5 Sub Source Delta 16-bit 0x089b5a
6 Add Hits Mem 16-bit 0x089b5a >= Value 0x000004 (0) 7 Sub Source Delta 16-bit 0x089b5a
8 Add Hits Mem 16-bit 0x089b5a >= Value 0x000005 (0) 9 Sub Source Delta 16-bit 0x089b5a
10 Add Hits Mem 16-bit 0x089b5a >= Value 0x000006 (0) 11 Sub Source Delta 16-bit 0x089b5a
12 Add Hits Mem 16-bit 0x089b5a >= Value 0x000007 (0) 13 Sub Source Delta 16-bit 0x089b5a
14 Add Hits Mem 16-bit 0x089b5a >= Value 0x000008 (0) 15 Sub Source Delta 16-bit 0x089b5a
16 Add Hits Mem 16-bit 0x089b5a >= Value 0x000009 (0) 17 Sub Source Delta 16-bit 0x089b5a
18 Add Hits Mem 16-bit 0x089b5a >= Value 0x00000a (0) 19 Sub Source Delta 16-bit 0x089b5a
20 Add Hits Mem 16-bit 0x089b5a >= Value 0x00000b (0) 21 Sub Source Delta 16-bit 0x089b5a
22 Add Hits Mem 16-bit 0x089b5a >= Value 0x00000c (0) 23 Sub Source Delta 16-bit 0x089b5a
24 Add Hits Mem 16-bit 0x089b5a >= Value 0x00000d (0) 25 Sub Source Delta 16-bit 0x089b5a
26 Add Hits Mem 16-bit 0x089b5a >= Value 0x00000e (0) 27 Sub Source Delta 16-bit 0x089b5a
28 Add Hits Mem 16-bit 0x089b5a >= Value 0x00000f (0) 29 Sub Source Delta 16-bit 0x089b5a
30 Add Hits Mem 16-bit 0x089b5a >= Value 0x000010 (0) 31 Sub Source Delta 16-bit 0x089b5a
32 Add Hits Mem 16-bit 0x089b5a >= Value 0x000011 (0) 33 Sub Source Delta 16-bit 0x089b5a
34 Add Hits Mem 16-bit 0x089b5a >= Value 0x000012 (0) 35 Sub Source Delta 16-bit 0x089b5a
36 Add Hits Mem 16-bit 0x089b5a >= Value 0x000013 (0) 37 Sub Source Delta 16-bit 0x089b5a
38 Add Hits Mem 16-bit 0x089b5a >= Value 0x000014 (0) 39 Sub Source Delta 16-bit 0x089b5a
40 Add Hits Mem 16-bit 0x089b5a >= Value 0x000015 (0) 41 Sub Source Delta 16-bit 0x089b5a
42 Add Hits Mem 16-bit 0x089b5a >= Value 0x000016 (0) 43 Sub Source Delta 16-bit 0x089b5a
44 Add Hits Mem 16-bit 0x089b5a >= Value 0x000017 (0) 45 Sub Source Delta 16-bit 0x089b5a
46 Add Hits Mem 16-bit 0x089b5a >= Value 0x000018 (0) 47 Sub Source Delta 16-bit 0x089b5a
48 Add Hits Mem 16-bit 0x089b5a >= Value 0x000019 (0) 49 Sub Source Delta 16-bit 0x089b5a
50 Add Hits Mem 16-bit 0x089b5a >= Value 0x00001a (0) 51 Sub Source Delta 16-bit 0x089b5a
52 Add Hits Mem 16-bit 0x089b5a >= Value 0x00001b (0) 53 Sub Source Delta 16-bit 0x089b5a
54 Add Hits Mem 16-bit 0x089b5a >= Value 0x00001c (0) 55 Sub Source Delta 16-bit 0x089b5a
56 Add Hits Mem 16-bit 0x089b5a >= Value 0x00001d (0) 57 Sub Source Delta 16-bit 0x089b5a
58 Add Hits Mem 16-bit 0x089b5a >= Value 0x00001e (0) 59 Sub Source Delta 16-bit 0x089b5a
60 Add Hits Mem 16-bit 0x089b5a >= Value 0x00001f (0) 61 Sub Source Delta 16-bit 0x089b5a
62 Add Hits Mem 16-bit 0x089b5a >= Value 0x000020 (0) 63 Sub Source Delta 16-bit 0x089b5a
64 Add Hits Mem 16-bit 0x089b5a >= Value 0x000021 (0) 65 Sub Source Delta 16-bit 0x089b5a
66 Add Hits Mem 16-bit 0x089b5a >= Value 0x000022 (0) 67 Sub Source Delta 16-bit 0x089b5a
68 Add Hits Mem 16-bit 0x089b5a >= Value 0x000023 (0) 69 Sub Source Delta 16-bit 0x089b5a
70 Add Hits Mem 16-bit 0x089b5a >= Value 0x000024 (0) 71 Sub Source Delta 16-bit 0x089b5a
72 Add Hits Mem 16-bit 0x089b5a >= Value 0x000025 (0) 73 Sub Source Delta 16-bit 0x089b5a
74 Add Hits Mem 16-bit 0x089b5a >= Value 0x000026 (0) 75 Sub Source Delta 16-bit 0x089b5a
76 Add Hits Mem 16-bit 0x089b5a >= Value 0x000027 (0) 77 Sub Source Delta 16-bit 0x089b5a
78 Add Hits Mem 16-bit 0x089b5a >= Value 0x000028 (0) 79 Mem 16-bit 0x089b5a > Delta 16-bit 0x089b5a (400) so in game there are some coins you can get while playing, when you get them there is a little animation and goes up one by one, however you can skip this animation and the coin value will go up to the amount you should get every two lines it checks if it went up by X amount and adds a hit, when it reaches 400 hits means that you got 400 coins 80 And Next Mem 8-bit 0x078874 = Value 0x000000 (0) 81 Reset If Mem 16-bit 0x089b5a > Delta 16-bit 0x089b5a (0) these last two lines are save protection, if the amount of coins goes up when stage is 0 means you loaded a save, coins only go up when you beat the story mode or in arcade so stage should always be above 0

StingX2 commented 3 years ago

https://retroachievements.org/achievement/148940 Force Ghost in Star Wars Episode I: Jedi Power Battles (PlayStation) Star Wars Episode I: Jedi Power Battles (PlayStation) - Reach a skill of 100 in one sitting with any starting character

for this one core is just a single condition 1 Mem 8-bit 0x0b23fe = Value 0x000001 (0) which checks if you're in single player alts work like this 1 Add Hits Mem 8-bit 0x08c9af >= Value 0x000001 (1) 2 Add Hits Mem 8-bit 0x08c9b0 >= Value 0x000001 (1) 3 Add Hits Mem 8-bit 0x08c9b1 >= Value 0x000001 (1) 4 Add Hits Mem 8-bit 0x08c9b2 >= Value 0x000001 (1) 5 Add Hits Mem 8-bit 0x08c9b3 >= Value 0x000001 (1) 6 Add Hits Mem 8-bit 0x08c9b4 >= Value 0x000001 (1) 7 Add Hits Mem 8-bit 0x08c9b5 >= Value 0x000001 (1) 8 Add Hits Mem 8-bit 0x08c9b6 >= Value 0x000001 (1) 9 Add Hits Mem 8-bit 0x08c9b7 >= Value 0x000001 (1) 10 Add Hits Mem 8-bit 0x08c9b8 >= Value 0x000001 (1) 11 Add Hits Mem 8-bit 0x08c9af >= Value 0x000002 (1) 12 Add Hits Mem 8-bit 0x08c9b0 >= Value 0x000002 (1) 13 Add Hits Mem 8-bit 0x08c9b1 >= Value 0x000002 (1) 14 Add Hits Mem 8-bit 0x08c9b2 >= Value 0x000002 (1) 15 Add Hits Mem 8-bit 0x08c9b3 >= Value 0x000002 (1) 16 Add Hits Mem 8-bit 0x08c9b4 >= Value 0x000002 (1) 17 Add Hits Mem 8-bit 0x08c9b5 >= Value 0x000002 (1) 18 Add Hits Mem 8-bit 0x08c9b6 >= Value 0x000002 (1) 19 Add Hits Mem 8-bit 0x08c9b7 >= Value 0x000002 (1) 20 Add Hits Mem 8-bit 0x08c9b8 >= Value 0x000002 (1) 21 Add Hits Mem 8-bit 0x08c9af >= Value 0x000003 (1) 22 Add Hits Mem 8-bit 0x08c9b0 >= Value 0x000003 (1) 23 Add Hits Mem 8-bit 0x08c9b1 >= Value 0x000003 (1) 24 Add Hits Mem 8-bit 0x08c9b2 >= Value 0x000003 (1) 25 Add Hits Mem 8-bit 0x08c9b3 >= Value 0x000003 (1) 26 Add Hits Mem 8-bit 0x08c9b4 >= Value 0x000003 (1) 27 Add Hits Mem 8-bit 0x08c9b5 >= Value 0x000003 (1) 28 Add Hits Mem 8-bit 0x08c9b6 >= Value 0x000003 (1) 29 Add Hits Mem 8-bit 0x08c9b7 >= Value 0x000003 (1) 30 Add Hits Mem 8-bit 0x08c9b8 >= Value 0x000003 (1) 31 Value 0x000001 = Value 0x000002 (30) each level has 3 bonuses you can get which upgrades your character, you can get a maximum of three but for some reason the game also has an extra upgrade per level memory-wise which does nothing, so this part checks if you get each bonus in every stage and adds a hit per bonus, so if you get 3 or 4 bonuses in one level you get three hits once it reaches 30 you get the cheevo

StingX2 commented 3 years ago

Delmaru — Today at 4:50 PM https://retroachievements.org/achievement/146730

1 And Next Delta 16-bit 0x23b484 = Value 0x00013f (0) 2 Mem 16-bit 0x23b484 = Value 0x000206 (1) Small example, but this makes sure you're on a specific route, going into the grotto. Since each grotto has the same ID, the AndNext is to ensure the hit is when you enter the grotto on that route.

3 And Next Delta 16-bit 0x23b484 = Value 0x000141 (0) 4 Or Next Delta 16-bit 0x23b48a = Value 0x0002d9 (0) 5 And Next Delta 16-bit 0x23b48a = Value 0x0002d8 (0) 6 Mem 16-bit 0x23b484 = Value 0x000206 (1) Similar to the first example, but this checks route and X-Position. When there's multiple grottos in a route, a little more creativity was needed to differentiate which one. So the first line here checks the route, the next two is either position for the entrance, and the last one is for entering the grotto.

The rest of the achievement is coded in much of the same way, until all of the grottos have been accounted for. Hidden Grotto Expert in Pokemon - White Version 2 (Nintendo DS) Pokemon - White Version 2 (Nintendo DS) - Find and step inside all hidden grottos during a single session

https://retroachievements.org/achievement/146695

This is an extreme example of an AddSource chain, but quite common for collectible-esque achievements. This particular one is checking every single bitflag for Pokedex entries and counting them up. The reasoning behind each one twice, is one set for the actual total, and one just under the total, as to protect against loading saves. It checks when you catch the last available Pokemon, to award you the achievement then. It also counts the choices you can make, so it'll work with any combination of whatever the player chooses to take.

StingX2 commented 3 years ago

Alright, here's an example for Add Hits: https://retroachievements.org/achievement/146780 1 Add Hits Mem 8-bit 0x0fa9c8 >= Value 0x01 (1) 2 Add Hits Mem 8-bit 0x0fa9cc >= Value 0x01 (1) 3 Add Hits Mem 8-bit 0x0fa9d0 >= Value 0x01 (1) ... 307 Add Hits Mem 8-bit 0x0fae90 >= Value 0x01 (1) 308 Value 0x00 = Value 0x01 (76) ^The first chain checks that the player has defeated 76 unique enemies. Conditions 1 to 307 is the address for the kill count on an enemy. We want this to be >=1 for it to count the hit. Condition 308 will have every true condition add a single hit to it

309 Add Hits Delta 8-bit 0x0fa9c8 >= Value 0x01 (1) 310 Add Hits Delta 8-bit 0x0fa9cc >= Value 0x01 (1) 311 Add Hits Delta 8-bit 0x0fa9d0 >= Value 0x01 (1) ... 615 Add Hits Delta 8-bit 0x0fae90 >= Value 0x01 (1) 616 Value 0x00 = Value 0x01 (75) ^This is the second chain which will be using Deltas for save protection. The goal of this chain is 75 total enemies -- So we're checking that the player goes from 75 to 76 after defeating a new unique enemy

617 Add Hits Delta 8-bit 0x0fa9c8 >= Value 0x01 (1) 618 Add Hits Delta 8-bit 0x0fa9cc >= Value 0x01 (1) 619 Add Hits Delta 8-bit 0x0fa9d0 >= Value 0x01 (1) ... 923 Add Hits Delta 8-bit 0x0fae90 >= Value 0x01 (1) 924 Reset If Value 0x00 = Value 0x01 (76) ^The last chain is a near copy of the second chain. The hit goal is 76 which is the same as our goal from the first chain. We're now using a Reset If in this chain; this is for another line of protection. This stops an unwanted trigger when loading a save that may have >76 unique defeats on it

https://imgur.com/eQENj9R