Exiled Kingdoms

Ask about cheats/tables for single player games here
BringChaos
Noobzor
Noobzor
Posts: 9
Joined: Tue Mar 13, 2018 9:45 pm
Reputation: 10

Re: Exiled Kingdoms

Post by BringChaos » Thu Mar 22, 2018 12:31 pm

Sigan wrote:
Thu Mar 22, 2018 4:06 am
P.S. If you could show me how you ripped all that information into such a clean, neat document on google, I'd appreciate knowing that little trick too... ;)
To top all of this off, if you showed me how you accessed the game files in that way, I could write mods that would negate the need to cheat. I mod some of my games as well, if that's the path of less resistance to achieving my goals.
The game is using a wrapper around a jar to make it look like a normal program ("exiledkingdoms.exe") but like a jar you can open the executable with WinRAR and browse its contents (Don't steal assets okay guys? :'( ). I found the items in data/rules/items.txt. You can easily mod the game through assets but through code would be harder as the source is obfuscated, though you can edit java methods directly from CE while its running but that requires java bytecode knowledge.

I actually first looked for XP of the character to start off with. I found it pretty easy. I used java_getObjectHandleToAddress(address), java_getObjectClass(jObject), java_getClassSignature(jClass) and ended up with the class Lnet/fdgames/GameEntities/CharacterSheet/CharacterStats;
Then I used the Java->Dissect Classes and found it in the list to see what else that Class held.

Honestly I haven't played the game for longer than killing 3 goblins dudes over and over again. So I don't know how the game functions. I can tell you that it goes STR,END,AGI,INT,AWA,PER in the code itself.

If you are willing to learn from others code. You can try this table out, all it does it print the characters XP to the output. I left some functions commented out that will be useful.
exiled_testtable.ct
(3.25 KiB) Downloaded 45 times

Sigan
Cheater
Cheater
Posts: 31
Joined: Fri May 26, 2017 1:23 am
Reputation: 1

Re: Exiled Kingdoms

Post by Sigan » Thu Mar 22, 2018 3:14 pm

Thank you very much, I'll try this out and tell you what I learned.

Sigan
Cheater
Cheater
Posts: 31
Joined: Fri May 26, 2017 1:23 am
Reputation: 1

Re: Exiled Kingdoms

Post by Sigan » Thu Mar 22, 2018 3:20 pm

Alright, so I'm completely lost in how your code works. It clearly does work, but I don't think I understand Java enough to look at that code and tell what's going on. I think if I had a better understanding of java basics, I could just read it like a book, but this is well out of my depth right now.

I'm not sure how you created a script that, when activated, makes another script.

You're clearly a valuable asset to these forums, though. You should be posting more often. LoLz

As well, I've found all the files you mentioned within the exe using WinRar. Thanks for that. I'd like to edit some values in one of the text files, but when I go to update the archive, it tells me the archive is corrupt and I can't do it. How do I do this correctly?

I'm also trying to edit them in Notepad ++, but it looks like they're meant to be viewed and edited in a spreadsheet software. Does any of this stuff have an effect on the file and how it's handled?

BringChaos
Noobzor
Noobzor
Posts: 9
Joined: Tue Mar 13, 2018 9:45 pm
Reputation: 10

Re: Exiled Kingdoms

Post by BringChaos » Fri Mar 23, 2018 12:55 pm

Sigan wrote:
Thu Mar 22, 2018 3:20 pm
Alright, so I'm completely lost in how your code works. It clearly does work, but I don't think I understand Java enough to look at that code and tell what's going on. I think if I had a better understanding of java basics, I could just read it like a book, but this is well out of my depth right now.
The script is in lua. See "Cheat Engine 6.7/celua.txt" and "Cheat Engine 6.7/autorun/java.lua" for general lua functions and specific ones for java programs.
Function ListShow

Code: Select all

function java_getCapabilities()
function java_StartListeneningForEvents()
function java_getLoadedClasses()
function java_pushLocalFrame(count)
function java_popLocalFrame(result) --result can be nil
function java_dereferenceLocalObject(object)
function java_cleanClasslist(classlist)
function java_getClassMethods(class)
function java_getClassFields(class)
function java_getAllClassFields(class)
function java_getImplementedInterfaces(class)
function java_findReferencesToObject(jObject)
function java_redefineClassWithCustomData(class, memory)
function java_redefineClassWithCustomClassFile(class, filename)
function java_getClassData(class)
function java_writeClassToDisk(class, filename)
function java_getMethodName(methodid)
function java_parseSignature_type(sig, i)
function java_parseSignature_method(sig, i, result)
function java_parseSignature(sig)
function java_invokeMethod_sendParameter(typeid, a, skiptypeid)
function java_invokeMethod(object, methodid, ...)
function java_findMethod(class, name, sig)
function java_findClass(signature)
function java_findAllObjectsFromClass(jClass)
function java_addToBootstrapClassLoaderPath(segment)
function java_addToSystemClassLoaderPath()
function java_getFieldDeclaringClass(klass, fieldid)
function java_getFieldSignature(klass, fieldid)
function java_getField(jObject, fieldid, signature)
function java_setField(jObject, fieldid, signature, value)
function java_search_start(value, boolean)
function java_search_refine(scantype, scanvalue)
function java_search_getResults(maxresults)
function java_search_finish()
function java_foundCodeDialogClose(sender)
function java_MoreInfoDblClick(sender)
function java_foundCodeDialog_MoreInfo_OnDestroy(sender)
function java_createEntryListView(owner)
function java_foundCodeDialogLVDblClick(sender)
function java_findWhatWrites(object, fieldid)
function java_stopFindWhatWrites(id)
function java_getMethodDeclaringClass(methodid)
function java_getObjectHandleToAddress(address)
function java_getObjectClass(jObject)
function java_getClassSignature(jClass)
function java_getSuperClass(jClass)
function java_OpenProcessAfterwards()
function java_OpenProcess(processid)
function java_settingsClose(sender)
function java_settingsShow(sender)
function java_initialize()
In the lua integration there are the object types: address ("0x00000000"), jObject, jClass, field, method (these four exist as they do in Java), and then signature follows the package you see at the top java classes when programming in java.

Right click "Enable Java Agent" and check the bottom-most setting "Group config". It isn't making a script, its hiding its children when deactivated.

I was active on the original Cheat Engine forums. I never moved over to FRF, I just had my friend CompactDisc post anything I did for me.

I've never updated a jar before myself but https://docs.oracle.com/javase/tutorial ... pdate.html ("java jar" in commandline) should be how you do it.

No clue what software they used to edit their files. The format is each entry is separated by a tab. In notepad++ you can use View -> Show Symbol -> Show All Character to help you understand.

Sigan
Cheater
Cheater
Posts: 31
Joined: Fri May 26, 2017 1:23 am
Reputation: 1

Re: Exiled Kingdoms

Post by Sigan » Fri Mar 23, 2018 8:36 pm

I see... without what software they used to edit their files, it's impossible to modify it accurately? Would that be a correct assumption?

And, I appreciate the effort you're putting in to help me understand, but at this point I have to say I'm a bit lost in it all. In the beginning, we were talking about the ABC's, and then you decided to regale me in the finer, poetic version of the English language. I was hanging in there when I said, "I think that's a B, and that one's a C. Why is K before L?"

LoLz... I think I need more of the basics of understanding code in a more general sense, I guess, to fully understand what I'm looking at.

For instance, when it says "function java_parseSignature_method(sig, i, result)" I have no context for anything about what that means. I can read all those words, and I know what a signature is in a general sense, but I'm not sure how to even call on that function correctly, let alone what it would do for me. It might as well be written in German. And... that's just one of those phrases that I don't have enough context to understand.

Not that any of this is your fault. Like I said, I appreciate you making such an obvious effort and, for the benefit of the community, I'd love to keep you talking about this because, although I don't comprehend everything you're painstakingly writing, it might be good for the community to see an open dialogue about how to hack a java game. Especially considering one comment was that you can't make a table for a java game, because they're too difficult.

Such a statement may have some kinds of truth to it, but figuring out the best way to modify a game like this together, and documenting the reasons, could be helpful.

Anyway, let me see... I have an example of a table that I made here. Let me upload it so you can see what my basic understanding of how to inject a code is, and that should give you an idea of how little I'm ready for up front. Haha...

You'll notice in both of these cheat tables (for different, outdated versions of Subnautica), that some of the codes on the table aren't mine. I have no idea how they work, I just knew they did. On 59783, everything under the "Activate Cheat Table" code is someone else's, from either this forum or the old one. Vehicle Health Base Script and down is my codes that I searched for and found good injection points for, and made pointers for. On the older table, 49182, everything under the title, "Open," was written by someone else. Everything from, "Infinite Oxygen," and down is my coding. Notice I put all the scripts together in a section, and grouped all the pointers those scripts created in their own, collapsible section. That's how I prefer to organize things. I like the scripts that prevent losing health, but I'd also like to see the pointer and the exact value of my health at times, and I prepare for that.

Anyway, the strategy involved for creating the pointers and the scripts is all based off Stephen Chapman's stuff on YouTube. If you watch his videos, you'll see the exact same pattern he taught being applied to all of my codes.

This is the pattern I'd like to set up for any kinds of cheats I'd be able to write. What do you think?
Attachments
Subnautica 49182.CT
(661.36 KiB) Downloaded 8 times
Subnautica - 59783.CT
(1.4 MiB) Downloaded 14 times

sprygary
What is cheating?
What is cheating?
Posts: 3
Joined: Mon Feb 26, 2018 7:56 am
Reputation: 3

Re: Exiled Kingdoms

Post by sprygary » Sat Mar 24, 2018 8:01 am

Sigan wrote:
Mon Mar 19, 2018 3:56 am
Ok, I figured out to just find the code for strength, and then add it to my list. Then I just copy it and paste the next code with an offset of 4, repeat 5 more times or whatever, and I get all 6 values for my traits. I changed them all to 210 (The equivalent of 20 points worth) and it capped out at 12 for everything... Oh well :)

Now I'm trying to figure out how to find attack speed on a specific item, and change it.
It's quicker if you just right click the address and "Browse this Memory Region". It's all in hex but a right click and Display Type will display it however you like.

BringChaos
Noobzor
Noobzor
Posts: 9
Joined: Tue Mar 13, 2018 9:45 pm
Reputation: 10

Re: Exiled Kingdoms

Post by BringChaos » Sun Mar 25, 2018 3:26 pm

Sigan wrote:
Fri Mar 23, 2018 8:36 pm
ping
Just putting this table out there. I tried to make small debug scripts to reverse engineer the java and then put a large pointer chain as a table.
To use starts the game, load into a save, attach to process, click "Enable Java Agent", run around in game as it can take awhile, then it should eventually load the symbol list and allow the pointers to work.

exiled_testtable.ct
(15.14 KiB) Downloaded 35 times

Image


For an example of how to use the debug scripts:
Let's say I wanted to dissect what CharacterStats
Image

Here its base address is 0x0C1D6658, I can plug it into "Address to Object" then run the script
Image

If it prints out a non-zero number then I know it worked, next I run the scripts "Object info" and "Class info"
Image

If you expand CharacterStats on the table you can see that all the fields printed out have been placed in its table.
5 66 XP I means 5th field, 66 offset, "XP" signature, "I" type (Integer)
To find the pointer offset I divide 66 by 4, then convert to hexadecimal (66/4 = 16 -> 0x10)

Hard to think right now, so feel free to ask any questions. I might make a video later to make the whole thing from scratch.

Sigan
Cheater
Cheater
Posts: 31
Joined: Fri May 26, 2017 1:23 am
Reputation: 1

Re: Exiled Kingdoms

Post by Sigan » Mon Mar 26, 2018 1:01 am

Two things:

1. Excellent job, I'm sure the video is necessary for everyone to benefit from. As well, you've given the people what they've asked for. I haven't tested it yet but, if it doesn't work, you're waaay further toward a functional copy of a table for this game than anyone else took the time to do. You have my respect. As well, your last thing that you did worked as you advertised, so I'm ready to believe that this works without bothering testing it.

2. I'm still confused because, although you seem to be speaking the correct language, and with basic concepts presented, I don't have time to get into the game right now, so I can't test it out and see your words in practice at the moment.

I look forward to testing this out and seeing where this conversation goes. Thank you.


sprygary - I'm sure that's a better way. I didn't know how to do that. Pictures might help, but again, with some time to tinker around I can probably figure out what you're words are telling me to do. Thank you for your insight. :)

sprygary
What is cheating?
What is cheating?
Posts: 3
Joined: Mon Feb 26, 2018 7:56 am
Reputation: 3

Re: Exiled Kingdoms

Post by sprygary » Tue Mar 27, 2018 12:42 pm


BringChaos
Noobzor
Noobzor
Posts: 9
Joined: Tue Mar 13, 2018 9:45 pm
Reputation: 10

Re: Exiled Kingdoms

Post by BringChaos » Tue Mar 27, 2018 3:06 pm

No feedback on whether it's worked for anyone else. but here's an update.
exiled_testtable.ct
(44.96 KiB) Downloaded 34 times
Image

Chae
Noobzor
Noobzor
Posts: 8
Joined: Thu Mar 02, 2017 8:58 pm
Reputation: 0

Re: Exiled Kingdoms

Post by Chae » Tue Mar 27, 2018 5:43 pm

I dont think its working for me. How long does it take before the addresses show up?

BringChaos
Noobzor
Noobzor
Posts: 9
Joined: Tue Mar 13, 2018 9:45 pm
Reputation: 10

Re: Exiled Kingdoms

Post by BringChaos » Tue Mar 27, 2018 6:58 pm

Chae wrote:
Tue Mar 27, 2018 5:43 pm
I dont think its working for me. How long does it take before the addresses show up?
20s, I guess I should have noted I'm on Ver 1.1.074 - 4, maybe thats why.

Chae
Noobzor
Noobzor
Posts: 8
Joined: Thu Mar 02, 2017 8:58 pm
Reputation: 0

Re: Exiled Kingdoms

Post by Chae » Tue Mar 27, 2018 7:36 pm

Ah. Ok. That explains it. I have 1.1.1084

User avatar
nihilism
What is cheating?
What is cheating?
Posts: 4
Joined: Thu Mar 29, 2018 1:28 am
Reputation: 1

Re: Exiled Kingdoms

Post by nihilism » Thu Mar 29, 2018 1:54 am

Sigan wrote:
Thu Mar 22, 2018 3:20 pm
As well, I've found all the files you mentioned within the exe using WinRar. Thanks for that. I'd like to edit some values in one of the text files, but when I go to update the archive, it tells me the archive is corrupt and I can't do it. How do I do this correctly?

I'm also trying to edit them in Notepad ++, but it looks like they're meant to be viewed and edited in a spreadsheet software. Does any of this stuff have an effect on the file and how it's handled?
If you use 7zip instead, you can right-click the file from within the archive and choose edit. After you save any changes, it will save the file in archive. Run game again, and your changes will be shown in game.

You can edit many things, like quest rewards, weapon/armor stats, modify skill affects (cooldown, damage, mp cost).

Careful when changing weapon stats, enemies who use that weapon will also have the same enhancements(bandits use iron daggers for example).

Image
Image

https://imgur.com/a/AdINm

Sigan
Cheater
Cheater
Posts: 31
Joined: Fri May 26, 2017 1:23 am
Reputation: 1

Re: Exiled Kingdoms

Post by Sigan » Thu Mar 29, 2018 4:18 pm

In response to nihilism, thank you for showing me that. I didn't know that 7zip had a different feature. I've used WinRar for decades, because of its stability and familiarity to me. Maybe it's time for a switch :) **Edit** It worked! Thank you! :)

In response to the table, with the update - I can report that it works. I need more explanation for how some of the scripts interact with the game, but the inventory slots work, stack amounts are correct, I can edit my gold on the fly... Everything is accurate, and very well done. Thank you. Sorry I've been away for a bit and couldn't test this out.

What I don't understand is the scripts that are labeled: XXX, Address to Object, and every script in that small section under Enable Java Agent. I understood that I needed to Enable the Java agent in order for everything to work correctly, but I don't know what those things are doing exactly. Game Time is accurate... it pulled up the correct player name... I don't know what the Character Sheet code is for (the base location?). Skill Set and bonus points seem to work, but needs more testing. Everything seems 100% though. I'd put this up as a release.

Character Race might be a fun thing to play with, if we knew the list of races we could fill in for that, and the codes to plug in. Class is the same... One thing everyone could enjoy, that I don't see on here, is the guild flag. If we could find the flag that we change in order to say whether we're part of the Warrior's, Mage's, Thief's, or Cleric's guilds people would be thrilled. That's a decision that can only be made once per game, and affects the quests and advanced training the character has access to. Picking one over the other is, in some cases, a difficult decision.

To conclude: Thank you, BringChaos, for breaking the game with this trainer. You've done a great job, and a great service to this community.

Post Reply