Jump to content
Age of History 3
Chairman Baad

4 Code Editing Techniques for Android (DELETED. LIPAAAAAAAARK!!!)

Recommended Posts

Just cross-posting this code editing tutorial from Lipark here. Lipark shows you how to edit the code in the AoH2 .dex file. He explains how you can change the minimum army count to attack, the cost of the army required to attack, the effects of buildings, and the minimum limit to AI aggressiveness.

 

Share this post


Link to post
Share on other sites

Wait a minute...

On 8/31/2021 at 11:11 AM, avensis said:

This part is sus. Are you a spam-bot, @avensis? If you're not a spam-bot, go to this website and send me a screenshot of the captcha after you complete it.

Edited by Chairman Baad

Share this post


Link to post
Share on other sites

On 5/24/2023 at 8:27 AM, uwut said:

do you have a screenshot at this topic i need liparks code tutorial 😞

you can go to wayback machine
here's the link to the post: http://www.ageofcivilizationsgame.com/topic/188471-coding-tutorial/
now you paste it into wayback machine.

there was a time i tried to change the minimum army required but i gave up. them now i tried again, but saddly the tutorial wasn't online anymore. then i decided to use wayback machine and now i finally learned. god bless the guy that decided to save that page

Edited by Holy Roman Empire

Share this post


Link to post
Share on other sites

1 hour ago, Holy Roman Empire said:

you can go to wayback machine
here's the link to the post: http://www.ageofcivilizationsgame.com/topic/188471-coding-tutorial/
now you paste it into wayback machine.

there was a time i tried to change the minimum army required but i gave up. them now i tried again, but saddly the tutorial wasn't online anymore. then i decided to use wayback machine and now i finally learned. god bless the guy that decided to save that page

That was a old post. i made my own engine now 😄

Edited by uwut

Share this post


Link to post
Share on other sites

1 minute ago, Holy Roman Empire said:

wow i never understood how to change the minimum army required on pc, only in phone. how did you managed to do that?

its little bit complex i will make tutorial about it

Share this post


Link to post
Share on other sites

Just now, uwut said:

its little bit complex i will make tutorial about it

yay finally! something i dont like about the comunity is how small it is so there isn't many media/tutorials around on how to mess with the base game. are you going to post here in the forums or it is going to be a video?
also thanks for making a tutorial about this. i've tried for a long time to manage to do this. 🙂

Share this post


Link to post
Share on other sites

Just now, Holy Roman Empire said:

yay finally! something i dont like about the comunity is how small it is so there isn't many media/tutorials around on how to mess with the base game. are you going to post here in the forums or it is going to be a video?
also thanks for making a tutorial about this. i've tried for a long time to manage to do this. 🙂

i will open a tutorial topic about that

Share this post


Link to post
Share on other sites

On 8/2/2023 at 4:06 PM, uwut said:

i will open a tutorial topic about that

 hey, now that you cancelled uwut engine, can you make the tutorial on how to change minimum army requirement to attack a province on pc before you leave the comunity (assuming you wanna leave the community)? i need to know and nobody talk about it. 😞

Share this post


Link to post
Share on other sites

(·∀·) (clatter sound) This Game is very fun

 

(・へ・) What game are you playing?

( ´ ∀ ` )ノ Hi. Im just played the game called "age of history ii"

( ゚o゚) Age of History? you mean a shit old strategy game?

(´∀`) yes. but this isn't vanila. ive just played its mod. 
Not only does this mod contain a lot of scenarios and content,
but the author has also changed the code! if i could change the code....

(^^) that's sounds fan. fortunally i know parts of coding. do you wanna know?

(°o°) Why not?

(^v^) Ok Let's go

1. How to change minimum army required to attack

▶Menu_InGame_Slider.smali / Menu_InGame_Slider.smali (show alert in moving army)

683    const/16 v2, 0x{number}
          ☝In this case, number must be written in hex number.
           for example ; 10→a, 100→64, 1000→3e8, 3000 →bb8

▶Game_Action.smali

43911 const/16 v2, 0x{number}
                                       ☝☟Same as above
45871 const/16 v9, 0x{number}
48635 const/16 v9, 0x{number}

2. How to change cost of army required to attack

23186 rsub-int/lit8 v0, v0, 0x{number of cost of general army}

and there are same option in the below. it's instant-recruit one

3. How to change effects of buildings

Share this post


Link to post
Share on other sites

0% AI aggressiveness

 

Menu_CreateNewGame_Options_v2

Find the first line with the word AI_AGGRESSIVENESS in it

The two lines above it will be

const/16 v16, 0x32 (0x32 is the min ai aggressiveness written in hexadecimal)

   const/16 v17, 0x190 (0x190 is the max ai aggressiveness written in hexadecimal)

Change 0x32 to 0x0

Share this post


Link to post
Share on other sites

The .jar (aka .exe) file has compiled classes inside it, which need to be decompiled first before you can do any serious changes to them. There are several offline decompilers to do so (I use CFR), use them instead of the 500 trillion nearly identical online decompilers, and because of the complete mess of code Lukasz left behind, not all files may decompile properly (CFG.java has a quite important function that doesn't decompile, at least with CFR).

BTW, decompile the entire .jar (decompiling just a single class doesn't work properly when doing so), and also copy the original classes to the directory where you have your code, with the same code structure (overwrite if asked). Also, back up the original code files in another folder so you can reset in case things go really wrong.

Share this post


Link to post
Share on other sites

  On 8/13/2021 at 3:33 PM, Magolor said:

So have you succeeded in recompiling the codes?

We are facing, like, 1000+ compiling errors...

Yup, enough so to add a color randomization feature to the WotEC mod.

When doing your compiling, make sure your current folder is the root (whatever you named it), which should have "age", "com", "javazoom" and a couple of other folders in it, if you extracted the entire .jar into the root folder. Just one of the "features" there of the default Java compiler (javac), if the folder you are working in is .../[root]/age/of/.../lukasz, then the classpath is .../[root]/age/of/.../lukasz/age/of/.../lukasz... which doesn't exist.

Also, have all your source files in one folder, just to better organize things. I'll do my best to assist you if any more problems appear.

P.S. There's a very versatile program called Bytecode Viewer (BCV), official link: https://bytecodeviewer.com/, with several kinds of decompilers, including CFR, which I'm not fully familiar with yet (that is, with BCV). The best thing is that you don't have to screw with Command Prompt or something to compile your classes, though, use at your own risk, and always keep backups!!! You'll have to provide the javac executable path (which should be somewhere in the JDK installation folder) if you want to compile in BCV.

Share this post


Link to post
Share on other sites

2 hours ago, Emir of Granada said:

The .jar (aka .exe) file has compiled classes inside it, which need to be decompiled first before you can do any serious changes to them. There are several offline decompilers to do so (I use CFR), use them instead of the 500 trillion nearly identical online decompilers, and because of the complete mess of code Lukasz left behind, not all files may decompile properly (CFG.java has a quite important function that doesn't decompile, at least with CFR).

BTW, decompile the entire .jar (decompiling just a single class doesn't work properly when doing so), and also copy the original classes to the directory where you have your code, with the same code structure (overwrite if asked). Also, back up the original code files in another folder so you can reset in case things go really wrong.

the problem is: i dont know how to decompile them
you just reposted old lipark's old tutorial which i already know on mobile

but thanks anyways

Edited by Holy Roman Empire

Share this post


Link to post
Share on other sites

6 hours ago, Holy Roman Empire said:

the problem is: i dont know how to decompile them
you just reposted old lipark's old tutorial which i already know on mobile

but thanks anyways

hi you can edit codes pc on recaf or editing source code with itellijidea

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Age of History Games