You must be logged in to post messages.
Please login or register

Modding Discussions
Moderated by Alexastor, MosheLevi, Mister SCP

Hop to:    
Welcome! You are not logged in. Please Login or Register.36 replies
Age of Empires III Heaven » Forums » Modding Discussions » AoE3 UnHardcode Patch
Bottom
Topic Subject:AoE3 UnHardcode Patch
« Previous Page  1 2  Next Page »
danielpereira
Skirmisher
posted 08-12-16 11:41 AM EDT (US)         

AoE3 Unhardcode Patch

This is the official discussion and support thread for the AoE3 Unhardcode Patch.

The AoE3 UnHardcode is a project started by AoE3 Modders to investigate, research and eliminate the hardcoded issues, also known as "no-nos", which are faced by many modders, like the AI amount limit, in example. The patch will change your AoE3:TAD .exe to apply the code needed to eliminate some of those limitations.

Available Patches
  • AI Limit: Removes the hardcoded 14 AI/Civilization limit by making the game read all .personality files in the from the AI directory defined in the .exe (which should be \AI3, by default)
  • Revolution Banners: Allows new revolutions to have banners above the revolutionary's portrait in the Revolution UI.
  • Ignore Registry Path: Makes the game read the AoE3 files from the folder in which the AoE3 .exe is located, instead of looking for a working path in the registry.
  • Team Limit: Enables team options 3 and 4 for Single Player and Multiplayer games.
  • Resource Restriction: Allows the usage of the Fame Resource in ProtoActions, like AutoGather and ModifyGather, and enables proper displaying of Fame, Experience and Shipment costs in the politicians screen and HC cards.
  • Conversion Restriction: Allows the usage of the ConvertGuardian tactic unit action on units that aren't linked to a treasure, which effectively allows the usage of that action in powers that affect classes other than the Guardian class.
Besides of those features, the UHC Patch also allows the unhardcoding of additional properties through the use of the UHC Configuration file. For more details and information, please refer to the "UHC Configuration File" document, which is included with the release.

Changelog
  • v1.9:
    • A new patch option, which allows the usage of the ConvertGuardian tactic unit action on units that aren't linked to a treasure (which effectively allows the usage of that action in powers that affect classes other than the Guardian class) has been added!
  • v1.8:
    • The bug that would cause the farmingRadius property to not work properly in case more than one unit was assigned to it has been fixed.
    • Three new properties have been added for the UHC configuration file: attackTypeIcons, explorerUnits, and twoScoutCivs. More information about them can be found at the "UHC Configuration File" document.
  • v1.7:
    • The addition of new Native and Asian civilizations no longer causes crashes. Thanks to Takatmo Yereoc and Hoop Thrower, from AoE3H, for reporting!
    • The “Fame Restriction” patch option ( “Resource Restriction”, as of UHC 1.7) now enables the proper displaying of Fame, Experience and Shipment costs in the politician screen and in HC cards
    • Some changes have been made to the UHC Plugin System API. Make sure to use the latest UHCPlugin.h hearder file in your plugin projects and refer to the “UHC Plugin System” document for more information
    • customCheats and customSyscalls settings are no longer removed from the Configuration File by the Patcher after patching an executable.
  • v1.6:
    • The bug that caused the “Team ?” and “Team 4” team options to not work properly in Multiplayer, after applying the Team Limit patch, has been fixed.
    • A new patch option to allow the usage of the Fame resource in ProtoActions, like AutoGather and ModifyGather, has been added!
    • Two new properties have been added for the UHC configuration file: tacticSwitching and farmingRadius. More information about them can be found at the "UHC Configuration File" document.
    • The documentation has been updated to reflect the fact that, in order to the new team options to show up in ESO, the file data\uimpesogamesetuppage2.xml has to be changed. Thanks to Mandos, from AoE3H, for reporting!
    • The Patcher will now create the parent directory for a custom UHC Configuration File relative path, in case it doesn’t exist. Thanks to Mandos, from AoE3H, for reporting!
    • The Patcher has been changed to remove the digital signature from an executable, after patching it, in order to prevent it from being detected as a potential threat by some AVs.
    • The include files related to the UHC Plugin System have been updated, with some bugfixes and improved commentaries.
  • v1.5:
    • A brand-new plugin system, which allows the implementation of custom patches, syscalls and cheats has been implemented. Refer to the "UHC Plugin System" for more information.
    • The patcher now has a proper graphical user interface.
    • The code of both DLLs has been merged into one single UHC.dll.
    • All patch options are now defined in the configuration file of the UHC Patch.
    • The patch configuration file format has been changed. Refer to the "UHC Configuration File" document for more information.
    • The bug that prevented the basePop configuration file property from working properly has been fixed.
    • The option to add more native civilizations no longer removes the native properties of XPSPC civilization.
  • v1.4:
    • Support to new civilizations with the same features of the Native civilizations (Fire Pit UI and Council/Five Politician Aging Up) has been added through the NativeCivs property of the UHC Configuration File. More information about it can be found at the "UHC Configuration File" document.
    • Game won't start if the UHC Configuration File patch was applied, but no configuration file exists or if it could not be loaded.
  • v1.3:
    • Three new properties have been added for the UHC configuration file: AsianCivs, BigButtonCivs and NotBigButtonBlds. More information about them can be found at the "UHC Configuration File" document, which is included with the patch.
    • Fixed the bug that would allow all buildings to have proper Market behaviour, if there was no valid cfg files or no valid entries in the MarketUnits property.
  • v1.2:
    • The bug that would cause the game to fail to load UHC.dll in some systems has been fixed.
  • v1.1:
    • The patches Unlimited Population, Ignore Registry Path and Deck Card Limit have been added.
    • A bug was fixed in the AI Limit patch.
    • Support for the UHC configuration file has been added.
  • v1.0:
    • Initial release
Download

The patch can be downloaded at the Downloads Section of AoE3H. More details about it can be found at the download page and in the readme, which is included with the release.

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)

[This message has been edited by danielpereira (edited 01-05-2018 @ 07:55 PM).]

AuthorReplies:
danielpereira
Skirmisher
posted 07-11-17 00:23 AM EDT (US)     26 / 36       
Hello everyone!

We are glad to announce that UnHardcode Patch v1.6 has been released! This update fixes a bug found in the Team Limit patch, that prevented the "Team ?" and "Team 4" team options from working properly. Additionally, it also includes new features that allow chaning the farming radius of a farming building, adding Factory-like tactics in buildings and the use of the 'Fame' resource in ProtoActions (to generate resource trickles, in example)!

As usual, the UHC Patch can be obtained in the downloads section of AoE3H!

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)
WyteRaven
Skirmisher
posted 07-12-17 08:29 AM EDT (US)     27 / 36       
Hi danielpereira,

That's a divine work!! Really brilliant. Unhardcode is truly one the best things happened to AOE 3.
You are solving all our problems & struggles with modding AOE 3 Thanks for sharing it with other modders.
SkyOne578
Skirmisher
posted 07-16-17 04:12 AM EDT (US)     28 / 36       
Hi everyone,

The v1.6 was fast, wow!
I have some questions:
Firstly, if we plan to make an expansion, do we have to apply the patch before using any resource editor? For changing the suffixes and the executable's icon for example.
Also, in future versions of the patch, will it be possible to define new resources and abilities...?
And finally: thank you very much, keep up the good work!
danielpereira
Skirmisher
posted 07-16-17 11:29 PM EDT (US)     29 / 36       
@WyteRaven: Hey!

I'm really glad you liked our work and that it has been useful for you! Thanks for the kind words

@SkyOne578: Hello!

Regarding your questions:
Firstly, if we plan to make an expansion, do we have to apply the patch before using any resource editor? For changing the suffixes and the executable's icon for example.
The order in which the patch is applied does not matter, since it doesn't revert changes previously made to the executable, it just edits it.
Also, in future versions of the patch, will it be possible to define new resources and abilities...?
I have been doing some researches around some code related to resources and, theoretically, if the game data has storage for additional resources beyond the 7 default resources, it would be possible to add new resources.

Regarding abilities, the code that seems to handle them is a bit... complicated. So, well, unfortunately, I can't make any promises on that, at least not for now. On the other hand, most of the code that handles properties like those is quite similar to the code that handles protounit commands, so, if we manage to figure out that hardcoding, we might be able to do that!

Anyway, thanks for the kind words and for the suggestions! ^^

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)

[This message has been edited by danielpereira (edited 07-16-2017 @ 11:29 PM).]

alincarpetman
Royal Guard
posted 08-13-17 11:34 PM EDT (US)     30 / 36       
Just wanted to say thanks, this is great to see , it seems that in recent years more older games are getting unique patches and support done by the players themselves.

AOE1, AOE2 and RON:EE got "user patches" in recent years, now this AOE3 patch which is also like a User Patch.

Is there a description somewhere of the knowledge needed to work on such a project?

We are trying to do the same for ROL here if anyone is interested and has any tips or help.

There are also hardcoded limits in RON which some players discuss here.

[This message has been edited by alincarpetman (edited 08-13-2017 @ 11:37 PM).]

MikeBriceno
Skirmisher
posted 09-17-17 12:06 PM EDT (US)     31 / 36       
Hey guys,

I got the following message:

the supplied executable doesnt seen to be a valid AOE3 TAD executable.
Do you want to proceed with patching this file, anyway?

and then...

Failed to open the supplied executable file.

Can I copy paste the files manually? if so, where should I place them all?

Any ideas how to fix it?

[This message has been edited by MikeBriceno (edited 09-17-2017 @ 12:21 PM).]

danielpereira
Skirmisher
posted 09-19-17 06:28 PM EDT (US)     32 / 36       
@alincarpetman: Hello!

First of all, sorry for taking too long to answer (I have been busy lately), and thanks for your kind words

Regarding the knowledge and the tools required to start a project like this, first of all, you'll need Assembly programming language knowledge, and you'll need a disassembler and a hex editor.

A disassembler is a tool that can turn the binary machine code of a compiled executable into more readable ASM code, which allows one to analyze the procedures present in the executable and identify what particular parts of the compiled code do. I would recommend using the IDA disassembler.

Last but not least, I know that this may sound vague, but, in order to make patches for a game's executable, you need to know what you are looking for and how do you expect to find it in the executable. In example, if you are looking for the code that handles an aspect of the game that is somehow related to a string, it might be a good idea to look for references to that string in the disassembled code and analyze what is done to that string and how that may be linked to what you are looking for or what you are trying to do.

Unfortunately, there is no "universal" reverse engineering tutorial around, so, the best way to acquire knowledge about it is through practice.

Either way, I hope I helped you! If you have any more questions, feel free to ask

@MikeBriceno: Hello!

First of all, were you trying to apply the UHC Patch over a pure 1.03 TAD executable, or were you using some sort of fan patch? (Like the ESOC Patch or the Treaty Fan Patch?). Unfortunately, if this is the case, I have to tell you that, unfortunately UHC patch isn't compatible with such patches :/

If that's not the case, let me know!

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)
MikeBriceno
Skirmisher
posted 09-23-17 10:28 PM EDT (US)     33 / 36       
Thanks DanielPerreira,

Glad you answered me.

1. I am using a clean folder of the AOE3 TAD expansion. Version 1.03. No mods on it or anything.

2. Please please please, tell me what to do, what you guys achieved is what most people wanted. I really wanna test it out. Can I copy the files into the folders manually? is it possible?

3. I was trying to reach you. There is a recent Topic on the Dojo tactics that Mister SCP recommended me to get in touch with you. Could you take a look? how do I reach you privately?

Lv, Mike

PS: guys please help me on this

[This message has been edited by MikeBriceno (edited 09-30-2017 @ 10:40 AM).]

danielpereira
Skirmisher
posted 12-20-17 11:21 AM EDT (US)     34 / 36       
Hello everyone!

We are glad to announce that UnHardcode Patch v1.7 has been released! This update fixes a critical bug that would cause new Native and Asian civs to generate random crashes. Additionally, it also expands the "Remove Fame Restriction" patch option, by making it also enable proper displaying of Fame, Experience and Shipments in the politicians screen and in HC cards.

As usual, the UHC Patch can be obtained in the downloads section of AoE3H!

@MikeBriceno: Sorry for taking too long to answer, I have been busy, and I'll be honest: I have kind of forgotten to answer this thread!

Unfortunately, the patch has to edit the age3y.exe in order for it to work... Are you sure you are patching the TAD executable, and not the vanilla or the TWC one?

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)
danielpereira
Skirmisher
posted 01-04-18 07:18 AM EDT (US)     35 / 36       
Hello everyone!

We are glad to announce that UnHardcode Patch v1.8 has been released! This update fixes a bug that would cause the farmingRadius Configuration File property to not work properly in case more than one unit was assigned to it. Additionally, it also adds three new configuration file properties (attackTypeIcons, explorerUnits, and twoScoutCivs) , which allow assigning UI icons to existing attack types, having units that receive custom names and adding civs that use the two monk/explorer HC creation UI, respectively!

As usual, the UHC Patch can be obtained in the downloads section of AoE3H!

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)
danielpereira
Skirmisher
posted 01-05-18 07:39 PM EDT (US)     36 / 36       
Hello everyone!

We are glad to announce that UnHardcode Patch v1.9 has been released! This update adds a patch option that allows the ConvertGuardian tactic action type to be used over units that do not belong to a treasure, which effectively allows the usage of that action in powers that affect units that belongs to classes other than the Guardian class and, consequently, the replication of AoE2-like conversion on AoE3, with appropriate ability and tactic coding!

A small demonstration of the usage of such option can be seen in the video below
https://www.youtube.com/watch?v=eDkxLUYOA6c
(The ability was set in the .xml files to be applied to all units. With appropriate ability and tactic coding, it's possible to create abilities/powers and tactic unit actions that use the ConvertGuardian action type, but are limited to affect specific Unit Types)

As usual, the UHC Patch can be obtained in the downloads section of AoE3H!

The Portuguese Civ Mod III - Download at the Blacksmith
A mod that adds new civilizations, a new age, a new resource and introduces new gameplay features!
2nd place as Best Mod Pack in AoKH GOTY 2013 (PCM I) | 1st place as Best Mod Pack in AoKH GOTY 2015 (PCM II) | 2nd place as Best Mod Pack in AoKH GOTY 2017 (PCM III)


"And he that sat upon the throne said, Behold, I make all things new. And he said unto me, Write: for these words are true and faithful." - Revelation 21:5 (KJV)
« Previous Page  1 2  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Empires III Heaven | HeavenGames