I noticed that the ip number displayed in a room hosted by me was different than the hamachi's one, and i supposed that had to be the problem.
I googled some more specific terms and i found here the steps to fix it:
- Go to your My Documents/Documents folder.
- Go to your My Games folder.
- Go to the Age of Empires III folder.
- Go to the Startup folder.
- If there is not a user.cfg file, open Notepad. Do File > Save As… and save it as user.cfg (make sure to use “All Files", not "*".txt) in that folder.
- In user.cfg (right-click, Open With Notepad) add the following line: OverrideAddress="5.x.x.x"
- Change “5.x.x.x" to your Hamachi address. This can be found by opening up Hamachi and seeing what the big numbers at the top say.
- This will force AOE 3 to use the Hamachi address instead of your LAN IP address.
Now start AOE 3 and host a LAN game. You should see your Hamachi address now, and your friend can join you!