Packaging GetAmped2 class files into an executable jar?

Programming related discussions related to game research
Amped
Posts: 14
Joined: Wed Jun 24, 2015 12:23 pm

Packaging GetAmped2 class files into an executable jar?

Post by Amped »

Hello once again!

Thanks to this forum, I have been able to extract online game GetAmped2's files and after being really excited and doing extensive research I am very intrigued by what I have found. Although many of GetAmped2's extracted files were filetypes that I could not view or edit correctly like .scm and .agi, (albeit minimally with a hex editor of course) it seems as though GetAmped2 has stored all of its java class files into a file called classes.kxr. After extracting, I viewed these classes with a decompiler and it was essentially the game's source code! But aside from that, the most interesting part is that there were class files for the tools used to create and edit the many filetypes I could not view normally: namely, the ScriptModel Editor which controls parameters and associations between models and textures and exports to ".scm"

Image

Everything seems to be there. So...

my question is this: since I essentially have the compiled source code for this tool, how can I package the class files into an executable to run the tool?

Many thanks.
puggsoy
Posts: 161
Joined: Sat Dec 13, 2014 1:01 am

Re: Packaging GetAmped2 class files into an executable jar?

Post by puggsoy »

You should be able to run .class files using the Java VM, provided you have all the necessary files. Could you upload them for me to test (all the ones related to the program you want to run)?
Amped
Posts: 14
Joined: Wed Jun 24, 2015 12:23 pm

Re: Packaging GetAmped2 class files into an executable jar?

Post by Amped »

Sure thing. The dilemma is that the tool/program-related classes also import from the game-related classes (of course, because the tool needs to load up models, textures, and seems to have test play features, etc. so this makes sense) so I'm going to have to send you all of the classes.

You'll find the program-related classes in tool which seems to contain the code for the ScriptModel Editor in subdirectory tool.scm and AGIViewer (views .agi textures) in subdirectory tool.agiview. They seem to import classes from kotori and ga2.

The code to run these programs are here!...so if there was just some way to get them to run. I've uploaded a zip of the class files for you here.

Many thanks for your help!
puggsoy
Posts: 161
Joined: Sat Dec 13, 2014 1:01 am

Re: Packaging GetAmped2 class files into an executable jar?

Post by puggsoy »

Hmm. Well first off these are actually compiled files that should be runnable using the Java VM. The problem is I can't actually run them, I might be doing it wrong but there are so many files it's an issue to know which ones are necessary and which contains the main method.

It might be simpler to just look at the source code with a decompiler and make a program for file conversion myself. Which files in particular are you looking to convert? If you could upload samples and tell me the kind of data you're looking for, that would help.
Amped
Posts: 14
Joined: Wed Jun 24, 2015 12:23 pm

Re: Packaging GetAmped2 class files into an executable jar?

Post by Amped »

That's the dilemma! I can't run the tool itself because I can't find/don't know what to use as the Main class! It's infuriating because everything else is there. Is there no way to recreate the main class? And yeah, I've been using Java Decompiler to look at these files. I'm looking to convert .scm files particularly, and I've been able to edit them minimally with a Hex editor, but there's only so much you can do with that. .scm files link together model file information (.kmd) with texture file information (.agi) but they are also in charge of when to play certain sounds, what particle effects to use when, and weapon properties/stats like damage, knockback, etc. With the ScriptModel Editor tool, I could make my own .scm the same way the developers make their .scm files--it's crazy.

Anyway, if you're looking to make your own file conversion program for .scm files, I would check out tool.scm.ScriptModelDataExporter to see what they did. It references kotori.io.Resource (possibly also kotori.io.CacheFile?) on how to deal with exporting byte information, etc. so maybe that holds the key to converting these files.

Here is an example .scm file- it is for a weapon in the game called Basketball Shoes (the game calls them accessories so if you see "acc" or "accs" in the file that's what they're talking about.) Anyway, you'll see what I mean once you open up the file. The download for that .scm file is here: https://db.tt/mEYH0hcc
(Its actual location is in 1.kxr, and the directory is action\accs\basket_shoes.scm once you extract it.)

This is another .scm file- it is a fighting style (it's sort of like a class like Warrior, Mage, etc.-- it's not an accessory) called Fighter located in 1.kxr, and the directory for that is action\style\fighter.scm.
You can download that one here: https://db.tt/ckiFqCyW

I just wish there was a way to get their own tool to run, though, since all that code is there ready to go and all it's lacking is a Main class. (How difficult/time-consuming/possible would it be to make one?)

Once again, thank you so so much for your help.
Pata
Posts: 1
Joined: Thu Dec 03, 2015 2:37 pm

Re: Packaging GetAmped2 class files into an executable jar?

Post by Pata »

Hey hey, i'm new on the forum '^'

I'm sorry if i do mistakes when i'm speaking, i'm not english^^'

SO, i'm rlly happy to know pll are interested by editing/extract ga2 kxr files, i already tryed to do this, but it's kinda difficult for me^^'

So, my question is: How can i open .kxr content on an editor, like you did on your screenshot
I tryed with Aluigi's software, and the kxr file was extracted as i see.
I have some docs named "accs" "actions", but i can't open ".agi" files, or other ".mop", yeah, i wanna try to edit these files, my project is to update the solo mode :p How can i open them?

and then, how can i compile modified files?

thanks for reading, and i'm sorry again, i'm not english >.<

have a good day :)
Amped
Posts: 14
Joined: Wed Jun 24, 2015 12:23 pm

Re: Packaging GetAmped2 class files into an executable jar?

Post by Amped »

@Pata that is hopelessly unrelated to this specific thread.

You can go here to learn how to do what you want to do.

As for the classes.kxr file, I just opened up its extracted .class files in a decompiler program.

Anybody have any insights on this? Help would be greatly appreciated!