Jump to content
Age of History Games
Meah

How to change Ai aggressiveness to 0%?

Recommended Posts

The minimum available AI aggressiveness value is 50%. I want to change it but I don't know how. I saw this possibility in some mods, but I could not change it myself. I could not find the file responsible for the aggressiveness value. Łukasz Jakowski is kidding me :d. 

Edited by Meah

Share this post


Link to post
Share on other sites

Hop in a game and before you start,on the left bottom corner there's a button to the opposite side of the start button "options"

Click that scroll down and there you have a bunch of options including "sandbox"(unlimited resources)

"Game speed" and the ai aggressiveness.

Share this post


Link to post
Share on other sites

On 1/19/2022 at 12:32 PM, Albert speer said:

Hop in a game and before you start,on the left bottom corner there's a button to the opposite side of the start button "options"

Click that scroll down and there you have a bunch of options including "sandbox"(unlimited resources)

"Game speed" and the ai aggressiveness.

I may not have explained correctly, but the minimum value available is 50. I need to set this to 0 by editing the desired game file, but I do not know which file is responsible for this value. I am not a native English speaker, so we might have a little misunderstanding

Aggressiveness.png

Share this post


Link to post
Share on other sites

You need to decompile game or modify .dex files in AoC. You can open --- of AoC in MT manager and just find Menu_CreateNewGame_Options_v2 in some .dex. Tbh I kinda forgot how to modify android software but it's not that hard.

Share this post


Link to post
Share on other sites

On 5/20/2022 at 1:09 AM, Marshxx said:

hey friend, do you know how to modify it on PC?

Yes, it's easy. You just need IntellijIDEA. Then open AoC in winrar and find Menu_CreateNewGame_Options_v2. Then you can you need to place this .class file into IntellijIDEA. Program will decompile class. Anyway you can use other decompilers for big classes like Province.class. So, then on 548 line you need to find this:
 

Quote

        var4.add(new Slider_BG_CNG("", CFG.PADDING * 2, var3 * 8 + CFG.PADDING, var1 - CFG.PADDING * 4, var3 - CFG.PADDING * 2, 50, 100, (int)(Game_Calendar.AI_AGGRESSIVNESS * 100.0F)) {
            protected Color getColorLEFT() {
                return new Color(CFG.COLOR_TEXT_MODIFIER_NEGATIVE2.r, CFG.COLOR_TEXT_MODIFIER_NEGATIVE2.g, CFG.COLOR_TEXT_MODIFIER_NEGATIVE2.b, 0.65F);


 

After var3 - CFG.PADDING * 2 you can see number 50 and 100. Logically we can understand that 50 - min number of aggressivity and 100 - max number. So after you corrected values you can compile file.

To compile this you need to go in the Project structure and in libraries add you AoC.jar file. Also you need to add project artifacts to obtain .jar after compiling. Then you need to go C:\Users\(username)\IdeaProjects\(project name)\out\artifacts and open your .jar in winrar. After just drag modified classes into AoC file with replacement.

I have tried to record small video tutorial how to add new library and make project artifact. Maybe it would be useful for you.

Anyway you can check guides on youtube how to decompile files with IntellijIDEA.

Edited by Cvekla

Share this post


Link to post
Share on other sites

On 5/23/2022 at 10:00 PM, Cvekla said:

Yes, it's easy. You just need IntellijIDEA. Then open AoC in winrar and find Menu_CreateNewGame_Options_v2. Then you can you need to place this .class file into IntellijIDEA. Program will decompile class. Anyway you can use other decompilers for big classes like Province.class. So, then on 548 line you need to find this:
 


 

After var3 - CFG.PADDING * 2 you can see number 50 and 100. Logically we can understand that 50 - min number of aggressivity and 100 - max number. So after you corrected values you can compile file.

To compile this you need to go in the Project structure and in libraries add you AoC.jar file. Also you need to add project artifacts to obtain .jar after compiling. Then you need to go C:\Users\(username)\IdeaProjects\(project name)\out\artifacts and open your .jar in winrar. After just drag modified classes into AoC file with replacement.

I have tried to record small video tutorial how to add new library and make project artifact. Maybe it would be useful for you.

Anyway you can check guides on youtube how to decompile files with IntellijIDEA.

 

hello, you seem like a knowledgeable person about .jar. About 1 year ago, I changed the game codes from the mt manager program. And again I converted the .dex file to .jar file via mt manager and put it on my computer and tried to run it, but nothing happened, the game neither opened and closed nor gave an error, do you think the reason is what is it and how can i fix this problem?

Share this post


Link to post
Share on other sites

23 hours ago, Hacktor said:

hello, you seem like a knowledgeable person about .jar. About 1 year ago, I changed the game codes from the mt manager program. And again I converted the .dex file to .jar file via mt manager and put it on my computer and tried to run it, but nothing happened, the game neither opened and closed nor gave an error, do you think the reason is what is it and how can i fix this problem?

Well, I know Mt manager, but working with bytecode is much harder than with decompiled one. I can't clear say where is problem. Maybe you changed something that not affects on game or your changes was incorrect. My experience in game modding shows that second variant is more believable. I'm not java programmer, so some of my changes just like in your case don't affect on game.

Share this post


Link to post
Share on other sites

Try to search var4.add by Ctrl+F until you find code like I posted previously.

On 6/2/2022 at 2:05 AM, Lahwa said:

Where is "AI AGGRESSIVENESS"?

스크린샷(79).png

 

Share this post


Link to post
Share on other sites

On 5/24/2022 at 5:00 AM, Cvekla said:

Yes, it's easy. You just need IntellijIDEA. Then open AoC in winrar and find Menu_CreateNewGame_Options_v2. Then you can you need to place this .class file into IntellijIDEA. Program will decompile class. Anyway you can use other decompilers for big classes like Province.class. So, then on 548 line you need to find this:
 

 

After var3 - CFG.PADDING * 2 you can see number 50 and 100. Logically we can understand that 50 - min number of aggressivity and 100 - max number. So after you corrected values you can compile file.

To compile this you need to go in the Project structure and in libraries add you AoC.jar file. Also you need to add project artifacts to obtain .jar after compiling. Then you need to go C:\Users\(username)\IdeaProjects\(project name)\out\artifacts and open your .jar in winrar. After just drag modified classes into AoC file with replacement.

I have tried to record small video tutorial how to add new library and make project artifact. Maybe it would be useful for you.

Anyway you can check guides on youtube how to decompile files with IntellijIDEA.

 

bro why do that video have the n word

 

Share this post


Link to post
Share on other sites

does anyone know where Menu_CreateNewGame_Options_v2 is? I was not able to find it normally or thru using winrar.

It would be very nice if anyone could tell me how to find it as i need 0% ai agressiveness for a mod i am making. 

Thanks!

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
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.



  • Tell a friend

    Love Age of History Games? Tell a friend!

  • Posts

×
×
  • Create New...