1 2 3
6 7
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
$250 214 for the ship. 36 for the droid. EDIT: If I remember correctly, if your last win on the slots would give you more than 250 the game sets your total buckazoids to 250.
Active player (378)
Joined: 9/25/2011
Posts: 652
DrD2k9 wrote:
$250 214 for the ship. 36 for the droid.
Great, and we start with $30 to play with. Looks like there's a nice set of values close together starting around seed value 4319. That means if we can start the game off with a seed of one of the following values, we should be able to cut down the slot section significantly: 63832 - 10 rng numbers for manipulation 40825 37734 48559 53668 32341 11154 53995 17584 59633 - 0 rng numbers for manipulation We can pick ones further up to allow you spots to manipulate away the guards if you like. Also, there's precedence for changing the initial RTC value, so I think we can do it!
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
c-square wrote:
DrD2k9 wrote:
$250 214 for the ship. 36 for the droid.
Great, and we start with $30 to play with. Looks like there's a nice set of values close together starting around seed value 4319. That means if we can start the game off with a seed of one of the following values, we should be able to cut down the slot section significantly: 63832 - 10 rng numbers for manipulation 40825 37734 48559 53668 32341 11154 53995 17584 59633 - 0 rng numbers for manipulation
I'm not sure I completely understand this... If we choose a given initial seed and then guards need manipulated, won't changing it to a different initial seed also change whether or not guards may need manipulated? Guards aren't hard to avoid at the speeds we're running. So if there's a tradeoff between being able to manipulate guards and getting the best initial seed for the slots; I'm leaning toward slots.
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
Also, Have we confirmed that the return values in my spreadsheet are correct for the slots when determining v64 for a spin? I haven't had a chance. EDIT: I'm thinking my math on the return value is incorrect. I'm not getting the spins I expect based on the seed value. Could either of you write a better return value formula for the spreadsheet (or figure out why I'm not matching up, if the math is correct)?
Active player (378)
Joined: 9/25/2011
Posts: 652
DrD2k9 wrote:
EDIT: I'm thinking my math on the return value is incorrect. I'm not getting the spins I expect based on the seed value. Could either of you write a better return value formula for the spreadsheet (or figure out why I'm not matching up, if the math is correct)?
I wrote my own and I'm not getting the expected results either. So either we're both wrong, or there's something else happening in the random function we're not aware of yet. For example: For seed value 2809, Random(1,100) should return 4, but the slot machine actually shows a loss. Similarly, for seed value 59622, Random(1,100) should return 7, but the slot machine only gives two cherries and a diamond, not three cherries.
DrD2k9 wrote:
I'm not sure I completely understand this...
Reading it again, I did a rather poor job of explaining myself. I'll give it a try again later, but first I want to figure out what's wrong with our slot results. EDIT: I can't find the code for the rand function in the recompiled code. I did find what Radiant posted on NAGI's code site, however there's no guarantee that NAGI generates random numbers the same way the original AGI did. JAGI's random number generator is much different.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
DrD2k9 wrote:
Unfortunately the random seed memory address isn't always the same distance from the variable memory address. :(
That's because the seed is in the engine and the variable is in game data. Anyway it should stay intact over the course of your run.
c-square wrote:
Woo hoo! I think we've got it.
Great!
DrD2k9 wrote:
214 for the ship. 36 for the droid.
Is that including the coupon?
c-square wrote:
EDIT: I can't find the code for the rand function in the recompiled code. I did find what Radiant posted on NAGI's code site, however there's no guarantee that NAGI generates random numbers the same way the original AGI did. JAGI's random number generator is much different.
Aw crap, seriously? Ok, I should be able to replicate that anyway, let me go check.
Active player (378)
Joined: 9/25/2011
Posts: 652
Got it! Just one slight change to what you wrote, Radiant: int random (int min, int max) { agi_rand_seed = 0x7C4D * agi_rand_seed + 1; return (((agi_rand_seed%256) ^ (agi_rand_seed>>8)) % (max - min + 1)) + min; } The seed contains two bytes. It's taking one byte and XORing it with the other byte. In my libreOffice spreadsheet I use =MOD(BITXOR(MOD(A18,256),BITRSHIFT(A18,8)),100)+1 to calculate the value, and it's matching the slot results so far. Next to find an ideal pattern. Onwards!
Active player (378)
Joined: 9/25/2011
Posts: 652
Okay, I've got my first proof of concept done. I set the seed value to 33416 before starting the slots. The result is breaking the machine in under 2 seconds: Link to video Doing this requires three extra slot pulls and six 'Y-enter' rng skips. It takes 8 frames for a losing slot pull, 10 frames for a winning slot pull and 7 frames to do a 'Y-enter' skip. In the end, this route costs 70 frames in RNG manipulation: There may be better starting seeds out there. I'll look tonight to see if I can find a better one. The big trick now is, how can you do the run to ensure you get to the slot machine with the right seed value loaded up?
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
Radiant wrote:
DrD2k9 wrote:
214 for the ship. 36 for the droid.
Is that including the coupon?
I believe so. I think it's like 44 or 45 without the coupon.
c-square wrote:
Okay, I've got my first proof of concept done.
SUCCESS!
c-square wrote:
The big trick now is, how can you do the run to ensure you get to the slot machine with the right seed value loaded up?
I don't think it's worth trying to manipulate initial seed to land on a good number when entering the slots. Isolating an initial seed that will yield a list of return values with a high percentage in the 3-16 range (actual wins with monetary increase) may be beneficial.
c-square wrote:
In the end, this route costs 70 frames in RNG manipulation:
That's a whole lot less time lost than in my original!
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
c-square wrote:
What's the minimum cash you need to be able to buy the ship and the droid?
250 36 for droid (with coupon) and 214 for the ship
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
So an Initial Seed of 2. Yields some promising return values around the 586th seed through the roughly 820th seed. This assumes that the 586 random calls doesn't change much. with a new RTC time and initial seed.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
So from 47 seconds to about 1.5? Awesome!
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
Radiant wrote:
So from 47 seconds to about 1.5? Awesome!
With a poked seed value. We'll still have to work out the best approach with either the current save or a new run using a new Initial RTC Time setting.
Active player (378)
Joined: 9/25/2011
Posts: 652
DrD2k9 wrote:
I don't think it's worth trying to manipulate initial seed to land on a good number when entering the slots.
I want to give it a try before writing it off. Since most random events are set, it should be fine. The big unknown is the Skimmer sequence.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
c-square wrote:
I want to give it a try before writing it off. Since most random events are set, it should be fine. The big unknown is the Skimmer sequence.
Ok, let's see what we can do with that. It is logic 33. On loading, random() is called twice to set v34 and v35 between 5 and 30. v34 is the delay until the next rock appears. It decrements, when it gets value 1 a rock is spawned; this calls random() to use v30 as the X coordinate from 80 to 136. Likewise, v35 is the delay until the other rock appears, which calls random() using v32 as the X coordinate between 20 and 70. When each rock stops moving, the delay v34 or v35 is reset to a value between 3 and 30, governing when the next rock appears. v42 is damage level. v43 and v44 combined are the distance; the sequence is indeed on a fixed length which cannot be manipulated. After 249 x 3 clock ticks, you arrive at your destination. Everything else is basically visuals (e.g. v46 for the village graphic in the distance). While the player is not moving sideways, random() is called each tick; there's a one-in-nine chance of something happening with your shadow. This doesn't otherwise affect anything. Since objects move at a fixed speed too (stored in v56) the main thing you can do here is e.g. manipulate so that no rocks appear in front of you and you can pass the sequence without moving at all. And, of course, the sequence calls random() a lot.
Active player (378)
Joined: 9/25/2011
Posts: 652
Radiant wrote:
On loading, random() is called twice to set v34 and v35 between 5 and 30. v34 is the delay until the next rock appears. It decrements, when it gets value 1 a rock is spawned. ... While the player is not moving sideways, random() is called each tick; there's a one-in-nine chance of something happening with your shadow. This doesn't otherwise affect anything.
Okay, I think we can work with this. Initially I thought this was bad because the rock countdowns are random, meaning when the next random call is made is random. However, that second part saves us because we can control whether or not random gets called for the shadow, simply by choosing to move or not move. I'll try another POC with the skimmer to see if it's possible to target ending at an exact seed value.
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
c-square wrote:
Okay, I think we can work with this. Initially I thought this was bad because the rock countdowns are random, meaning when the next random call is made is random. However, that second part saves us because we can control whether or not random gets called for the shadow, simply by choosing to move or not move. I'll try another POC with the skimmer to see if it's possible to target ending at an exact seed value.
I'll see what I can do tonight about looking through the path of rooms up to the skimmer and see which ones call the random function. If we could somehow get the run to avoid all guards on the Arcada, movement would not need delayed as it currently is for one guard. Also if it's possible, preventing the spider droid from appearing on Kerona, would also save time as a dialogue box would be eliminated. On another note, how do we change the initial time for JPC-rr?
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
DrD2k9 wrote:
I'll see what I can do tonight about looking through the path of rooms up to the skimmer and see which ones call the random function.
It strikes me you don't have a lot of choice in your route, though. In the Arcada, you start in logic 2, which calls random() once but doesn't act on it if it's the first time in the room. West to logic 1, which has no randomness. The scientist is on a timer. West to logic 4, which calls random() again upon entry. As long as you're on the top floor, you're safe. There's a 21% chance of a patrol appearing on the bottom; it may be fun to manipulate this happening, because many players don't know that this can occur. West to logic 3. No randomness. Grab keycard, return to 4. Logic 4 again. Turns out that if you come from the west on the top floor, no encounters can happen. East to logic 2 again. By the current pathing, a guard appears but you make it to the elevator before he does. This has a 50% chance of happening. Elevator to logic 5, which also calls random() upon entry. By the current pathing, you have to wait for the guard to leave. He has a 50% chance of showing up, so this could easily be manipulated away. It is notably the first point where randomness matters. East to logic 6, which has no randomness. East to logic 7, which again has a 50% chance for the guard to show up. And after that, you're clear. Now let me check on the spider droid. It strikes me that on Kerona you don't really have a choice of paths either.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
Spider droid. Ok, this took some research. Here's the thing: the spider is a timed event. When you first leave the escape pod (logic 30), random() is called to generate a value 130 to 250. This value, plus 6 x 252, equals the amount of clock ticks until the spider appears. I do see that if the spider appears, and you leave the room before the message pops up, the message will appear in the next room; so the message can't be avoided. Can the spider be avoided? Probably not. Even if your current run had the minimum delay value, you wouldn't be able to make it to the end of the mesa before the maximum value caused it to appear anyway. The countdown is halted inside Orat's room. The spider can't appear in the upper left room since the lower level isn't seen from there, but it'll simply appear in the next one. Flags 156 and 157 do halt the countdown, but they aren't set anywhere in these rooms.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
Radiant wrote:
West to logic 4, which calls random() again upon entry. As long as you're on the top floor, you're safe. There's a 21% chance of a patrol appearing on the bottom; it may be fun to manipulate this happening, because many players don't know that this can occur.
Wait, forget about this. Due to a coding bug, the guards cannot show up in logic 4.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
A thought. Would it be interesting to make a 100% run of this game, by which I mean full score? In this particular game it doesn't require a lot of detours. I think you just need to grab the cartridge in the second room, use it in the alien nest, drop the rock on the spider, and talk to a few Sariens while in disguise, and you'd be at max score. This also gives you the good ending, i.e. your planet doesn't die at the end.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
DrD2k9 wrote:
On another note, how do we change the initial time for JPC-rr?
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
Well look at that!...I'll learn to read someday.
DrD2k9
He/Him
Editor, Judge, Expert player (2221)
Joined: 8/21/2016
Posts: 1091
Location: US
Radiant wrote:
DrD2k9 wrote:
I'll see what I can do tonight about looking through the path of rooms up to the skimmer and see which ones call the random function.
It strikes me you don't have a lot of choice in your route, though. In the Arcada, you start in logic 2, which calls random() once but doesn't act on it if it's the first time in the room. West to logic 1, which has no randomness. The scientist is on a timer. West to logic 4, which calls random() again upon entry. As long as you're on the top floor, you're safe. There's a 21% chance of a patrol appearing on the bottom; it may be fun to manipulate this happening, because many players don't know that this can occur. West to logic 3. No randomness. Grab keycard, return to 4. Logic 4 again. Turns out that if you come from the west on the top floor, no encounters can happen. East to logic 2 again. By the current pathing, a guard appears but you make it to the elevator before he does. This has a 50% chance of happening. Elevator to logic 5, which also calls random() upon entry. By the current pathing, you have to wait for the guard to leave. He has a 50% chance of showing up, so this could easily be manipulated away. It is notably the first point where randomness matters. East to logic 6, which has no randomness. East to logic 7, which again has a 50% chance for the guard to show up. And after that, you're clear. Now let me check on the spider droid. It strikes me that on Kerona you don't really have a choice of paths either.
This is what I meant when I said I'd trace the path. Thanks for doing it for me. No there isn't much choice of paths anywhere in the game. Bummer it appears that we can't avoid the spider. Do you think we could we delay it's arrival until we get to the east portion of the mesa? If so, I wonder if the dialogue would show up if we made it underground before the spider lands and sprouts legs.
Radiant wrote:
A thought. Would it be interesting to make a 100% run of this game, by which I mean full score? In this particular game it doesn't require a lot of detours. I think you just need to grab the cartridge in the second room, use it in the alien nest, drop the rock on the spider, and talk to a few Sariens while in disguise, and you'd be at max score. This also gives you the good ending, i.e. your planet doesn't die at the end.
I don't know that it would be much more interesting than an 'any%', but I can see it being a valid run for vault purposes. Another option for 100% could be killing the spider droid and orat at the same time. If the spider droid is led into orat's cave, it kills him instead of you. I believe that the point values are equal. So if the minimum time to spawn the spider is short enough to spawn him before entering the cave, it could be done this way. It would come down to comparing time necessary to lead the spider to the cave, vs. the time necessary for the spider to walk to the kill point via boulder.
Active player (378)
Joined: 9/25/2011
Posts: 652
Wow.. I have even more respect for your run now, DrD2k9. That skimmer sequence is a real pain! I've made it through a couple times, but sometimes get stuck in situations where, no matter what I do, I get hit by a rock. One thing I noticed was that in your run, you were able to do small movements and stop in the middle. How did you do that? I'm finding I can only go all the way over to one side or all the way over to the other. I can't stop in the middle or do short adjustments.
1 2 3
6 7