Knights of the Old Republic (1) - Address viewing Request

Add topics here with methods, analysis, code snippets, mods etc. for a certain game that normally won't make it in the Tables or Requests sections.
Post Reply
MicManGuy
What is cheating?
What is cheating?
Posts: 4
Joined: Sat Jun 15, 2019 8:56 am
Reputation: 0

Knights of the Old Republic (1) - Address viewing Request

Post by MicManGuy » Sat Jun 15, 2019 9:21 am

Game Name: Knights of the Old Republic
Game Engine: Odyssey Engine
Game Version: 1.03.514077 English
Options Required: view Level Up Skill Point variables
Game/Steam Website:
Other Info: It's the best Star Wars story to date. If you don't know about it, instead of helping me, you must go play this game. Now. Also, they're adapting it to film
https://www.starwarsnewsnet.com/2019/05 ... riter.html

So in learning about a certain glitch, I sought the help of the speedrunning community. Yes, I could easily just cheat the game, but I love glitches! Speedrunners are about the only people who know about the glitches in this game because you can easily get whatever you want by using the console or editing the save file.

They spent their time to help me out, and I want to return the favor.

Context:

There is a glitch known as a "Fake Level Up" (FLU). I'm trying to research its effects for the speedrunning community. A certain version of the glitch happens seemingly at random: the Skill Point glitch. And they don't know why. I want to find out.

The glitch gives an absurd amount of skill points to the player during the level up process. I have a theory for why it happens. So to confirm it, I decided to look at memory with Cheat Engine. The glitch involves using 2 characters. And I found that each character has 3 variables that keep track of their skill points during a level up. I believe the glitch involves those skill point counters being desynced and then, spending the points causes the skill points remaining to be reduced too much and go into negatives, which underflows the value. Resulting in huge skill points.

Short version

I need to look at 3 variables while performing the glitch, to see why it happens. 6, actually. All 9 would be better. To find the variables, I need to level up a few times to change them. But to perform the glitch, I need those levels. So I can't do the glitch after finding the variables. Which would be fine if I could find them and then just revert to an earlier save. Trouble is... Every time I load the game's save file, the variables change their location. And I load the save files A LOT.

I've found the pointer for one of the variables, but it only points at the variable the moment after I've already began the glitch.

I really don't know what I'm doing with Cheat Engine. I don't even know how to make an Address that I'm watching be relative to another Address.

I could use some guidance. I tried following a guide, but the game crashes whenever I attach the debugger.

User avatar
TheyCallMeTim13
Administration
Administration
Posts: 1626
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 597

Re: Knights of the Old Republic (1) - Address viewing Request

Post by TheyCallMeTim13 » Sat Jun 15, 2019 1:19 pm

Try changing the CE debugger. Edit -> Settings -> Debugger Options -> Debugger Method. And change to VEH or the windows debugger.

As for the address. You need to either make it a pointer and change the offset(s), or you can just copy and paste it and change the "adjust address by" value; depending on what you mean by "relative to another address".

As for the changing locations, this is where pointers come in. You'll need to either reverse the structure to create a pointer like the game uses, or you can try the CE pointer scanner (right click an address in the address list and select "scan for pointer").

https://www.youtube.com/playlist?list=P ... 0tCCKD7Ffs


But I'd try to find the skill points address, then (after getting the debugger working) you can "see what accesses this address" and see how the game is changing the value, but you'll need some ASM knowledge to understand what's going on. If it's a floating point then numeric underflow could be what's happening. If it's an integer then it would be more of a thing where the engine uses signed values and the custom code the devs added only deals with unsigned values, thus a negative is seen as a large number.
CE wiki - Tutorials CE wiki - Auto Assembler Basics - CE wiki - Lua Basics If it's not a Personal Message don't PM me, use the forum. I ignore PMs that should be asked on the forum.

MicManGuy
What is cheating?
What is cheating?
Posts: 4
Joined: Sat Jun 15, 2019 8:56 am
Reputation: 0

Re: Knights of the Old Republic (1) - Address viewing Request

Post by MicManGuy » Mon Jun 17, 2019 10:23 pm

Ok, so I basically have 3 issues I need to know how to solve at this point. Each one of these issues involves a different address that the game uses to track skill points during a level up.
  • 1st - tracks the unallocated Skill Points in the Skill Points menu
  • 2nd - tracks the maximum Skill Points you can spend during the level up
  • 3rd - tracks the number of unspent Skill Points from your last level up
Each address for these values have their own issues that make it hard to automate their addition to the Cheat Table.

1st
I have a pointer on my Cheat Table. It points at the address I need to watch, but only some of the time. Specifically, while I'm in a specific point during the level up menu. Any other time, the pointer is pointing at completely different addresses. I need to sort of capture that address. It's very tedious to type out the whole address manually every time, give it a name, and remove my old, useless and outdated address from my Cheat Table.

It'd be great if I could have a script where I click a button and the Address that the pointer is looking at gets added to my Cheat Table. Or better yet, an address already in my Cheat Table gets replaced with the new address.

Is that possible? If so, how can I do that?


2nd
I have a second value that is always at an address that is +14 higher than the first value's address (the one above). Is there a way for me to add an address to my cheat table and make it so that it's always at a +14 from my other Address?

3rd
This is the big one. The third and final value is always unpredictable where it's going to be. I tried using the Pointer Scanner, as well as the "Find what accesses this address" options. But I can't seem to pin it down.

It seems like the game uses a double pointer to access this specific variable. So, I try to do the "find what accesses this address" again for the pointer of the pointer, and I get SO many things being tracked constantly in the debugger, that it crashes the game.

This is the one that I can't do manually without messing up the setup for the glitch. It's the one thing stopping me from seeing definitively how this all works

DrummerIX
ViP
ViP
Posts: 1514
Joined: Wed Mar 22, 2017 6:15 pm
Reputation: 1427

Re: Knights of the Old Republic (1) - Address viewing Request

Post by DrummerIX » Mon Jun 17, 2019 11:55 pm

I have the game but haven't played it in a long time. I'll see if I cannot get these pointers for you.


EDIT:
I came up with this so far. I have a pointer to Character EXP and I believe their Skill Points Remaining. I came up with a pointer to the remaining skill points in the level up screen.

I'm not sure if this relates to anything you found, but let me know what else you might need or if anything you found is close to these addresses.

Just view the character sheet to update these pointers.
Attachments
swkotor.CT
Some Pointers for SWKOTOR
(2.76 KiB) Downloaded 73 times

MicManGuy
What is cheating?
What is cheating?
Posts: 4
Joined: Sat Jun 15, 2019 8:56 am
Reputation: 0

Re: Knights of the Old Republic (1) - Address viewing Request

Post by MicManGuy » Sun Jun 30, 2019 5:43 am

Why the hell does that file get flagged as a virus by firefox? I've never seen this happen in ANY cheat table, before.

But back on topic, it sounds like the address pointer that you found is the one that I already found (#1). If you add +14 to the address that it points to during level up, you'll get another one (#2) which will be identical if you don't spend any skill points. Both values are used during the level up process.

#1) Current unallocated skill points
#2) Maximum allocateable skill points

There is a third value that gets updated after a level up completes (#3). This one, I can't find a pointer for.

#3) Unspent Skill Points to be used on next level up

DrummerIX
ViP
ViP
Posts: 1514
Joined: Wed Mar 22, 2017 6:15 pm
Reputation: 1427

Re: Knights of the Old Republic (1) - Address viewing Request

Post by DrummerIX » Sun Jun 30, 2019 9:16 am

You sure that the character pointer I found is not that? It appeared to affect the number of points you get when you level up next.

Anyway, the value controlling the level up screen is 2 bytes and the one with the character is 4 bytes, so I think that is the reason you can glitch it.

FirstofEden
Noobzor
Noobzor
Posts: 11
Joined: Wed May 10, 2017 10:14 pm
Reputation: 1

Re: Knights of the Old Republic (1) - Address viewing Request

Post by FirstofEden » Sun Jun 30, 2019 9:43 am

It's interesting that people are still messing with this glitch. I used it a lot back when game was new and I played it on the Xbox (before figuring out how to create/use mods on a modded Xbox) and I always wondered about the technical side of it. Anyway, GL.

MicManGuy
What is cheating?
What is cheating?
Posts: 4
Joined: Sat Jun 15, 2019 8:56 am
Reputation: 0

Re: Knights of the Old Republic (1) - Address viewing Request

Post by MicManGuy » Mon Jul 01, 2019 7:23 am

FirstofEden wrote:
Sun Jun 30, 2019 9:43 am
It's interesting that people are still messing with this glitch. I used it a lot back when game was new and I played it on the Xbox (before figuring out how to create/use mods on a modded Xbox) and I always wondered about the technical side of it. Anyway, GL.
If you are interested in figuring it out, you're welcome to try! It's on sale for a few bucks right now.

I really don't know what I'm doing here. After messing with it for days, I've basically given up figuring out what causes the skill point glitch.
DrummerIX wrote:
Sun Jun 30, 2019 9:16 am
the value controlling the level up screen is 2 bytes and the one with the character is 4 bytes, so I think that is the reason you can glitch it.
Why would that cause the glitch?

Post Reply

Who is online

Users browsing this forum: No registered users