View Full Version : "Hyperlink Limit Exceeded" bug fix


embryodead
Jan 23, 2009, 03:19 PM
I'm sure everyone encountered this abomination at least once - you're playing a mod, click on "Iron" or other popular resource and get spammed with "Hyperlink limit exceeded" 50+ times. Pressing enter for a couple of seconds usually helps, but doesn't work for everyone.

Here's a permanent fix. Unfortunately, it only works with the NoCD or NoRaze exe. For legal reasons I cannot post the patched version, but it's easy to do on your own, if you have such an exe already.

1. Backup your Civ3Conquests.exe in case something goes wrong.
2. Open Civ3Conquests.exe in Notepad++ (http://notepad-plus.sourceforge.net/).
3. Use CTRL-F to find the phrase MessageBoxA . Ignore the first occurrence and click "Find Next" to jump to the next one.
4. Select the whole MessageBoxA phrase and one following character (which is a NUL character).
5. Type PostMessageA (if you did it right, your selected text will be replaced by this one).
6. Save and play.

What it does is that it changes the function that shows the "Hyperlink..." message to a function that dumps it into application's internal message system, where it is unused.

I know it's likely that most people won't use it because it doesn't work with the original cd-protected exe, but some may find it convenient I guess. I do!

Also, thanks for Civinator & Yoda Power for help with testing :)

EDIT: Whoever tried to follow it - it doesn't work with Notepad, sorry. You need to use Notepad++ which is a free text editor available here: http://notepad-plus.sourceforge.net/

WildWeazel
Jan 23, 2009, 03:33 PM
Very nice! Does it require the NoRaze patch, or will just the NoCD exe do?

Hikaro Takayama
Jan 23, 2009, 03:33 PM
I wonder if you could thusly edit the original .exe file using Notepad ++ or some other Hex-editing capable tool..........

embryodead
Jan 23, 2009, 03:54 PM
Very nice! Does it require the NoRaze patch, or will just the NoCD exe do?

Like I said, both plain NoCD exe and NoRaze patched exe will do.
EDIT: Actually you're right, it wasn't clear, I edited original post for clarity.

I wonder if you could thusly edit the original .exe file using Notepad ++ or some other Hex-editing capable tool..........

It's not that - the original file can be edited with plain Notepad as well in the same way, the problem is that the game doesn't start, likely because the copy protection system doesn't allow the file to be modified.

Hikaro Takayama
Jan 23, 2009, 05:40 PM
It's not that - the original file can be edited with plain Notepad as well in the same way, the problem is that the game doesn't start, likely because the copy protection system doesn't allow the file to be modified.

I wouldn't be so sure about that: My Hexing experience goes back to the MS-DOS days, and there were programs that, if edited using Notepad's precursors, would not run either, but worked just fine if you Hexed them.

....As a matter of fact, supposedly "unhackable" EXE files that had been PK-Lite-ed could still be successfully Hexed.

I could give it a try and see if it works.....

Ares de Borg
Jan 23, 2009, 05:55 PM
Wow. Thanks mate!

embryodead
Jan 23, 2009, 06:18 PM
I wouldn't be so sure about that: My Hexing experience goes back to the MS-DOS days, and there were programs that, if edited using Notepad's precursors, would not run either, but worked just fine if you Hexed them.

....As a matter of fact, supposedly "unhackable" EXE files that had been PK-Lite-ed could still be successfully Hexed.

I could give it a try and see if it works.....

Holy . .. .. .. ., I'm a moron. Reading your post I just realized I've been using Notepad++ myself (in text mode though, not hex) so I just assumed it works with Windows Notepad. Of course it doesn't, cause Notepad sucks and encodes the file differently.

So, everyone, the tutorial doesn't work :p Or rather, it does, but you have to use Notepad++ :mischief: And yeah, what you posted might work. I updated the original post with a link to Notepad++.

Civinator
Jan 23, 2009, 06:42 PM
Notepad++, that is it. :)

Thank you very much for finding this, embryodead and Hikaro Takayama. :goodjob::hatsoff::bowdown:

Tank_Guy#3
Jan 23, 2009, 06:49 PM
This could almost go in the Tutorials subforum.

embryodead
Jan 23, 2009, 07:19 PM
Notepad++, that is it. :)

Thank you very much for finding this, embryodead and Hikaro Takayama. :goodjob::hatsoff::bowdown:

Did you make it to work with the normal exe?

This could almost go in the Tutorials subforum.

But no one would notice it then :p

BadKharma
Jan 23, 2009, 09:04 PM
I was going to say regular notepad does not work, cases a command line to open when you start C3C and then closes.

WildWeazel
Jan 23, 2009, 09:46 PM
I was going to say regular notepad does not work, cases a command line to open when you start C3C and then closes.
FWIW, Notepad2 doesn't work either.

kairob
Jan 23, 2009, 10:30 PM
Just to say that I did what ya said and it worked. Thanks ED :):):)

Steph
Jan 24, 2009, 02:12 AM
That is VERY useful!!!

I will try it ASAP with my mod... With 3000 units, many given by oil or iron, it should be significant.

againsttheflow
Jan 24, 2009, 03:07 AM
Wow! That's going to be really useful. Thanks ED.

Vuldacon
Jan 24, 2009, 03:09 AM
This is Helpful Embryodead... Question: I understand getting rid of the Game Warning message but how does the game handle more Links than will fit in the Civilopedia Window? Can you have it scroll or what? What I have seen is the Entries moving into the Civilopedia Frame when there are more than will fit in the Window.

Uaargh!?
Jan 24, 2009, 05:41 AM
Excellent work :thumbsup:

embryodead
Jan 24, 2009, 07:11 AM
This is Helpful Embryodead... Question: I understand getting rid of the Game Warning message but how does the game handle more Links than will fit in the Civilopedia Window? Can you have it scroll or what? What I have seen is the Entries moving into the Civilopedia Frame when there are more than will fit in the Window.

Well, they're added till the frame ends and cut off. It's just a hack, can't have them scroll without the source code.

Vuldacon
Jan 24, 2009, 07:20 AM
Well, they're added till the frame ends and cut off. It's just a hack, can't have them scroll without the source code. Yes, I thought perhaps you also found a way around the Space Limitation as well. Still, this hack is at least helpful and the available space can be Optimized to fit in more links.

Wotan49
Jan 24, 2009, 10:27 AM
Hello

:crazyeye:
Thank you
no CD file amended i.O. :cool:

:old:
MfG Wotan49

Hikaro Takayama
Jan 24, 2009, 10:46 AM
On a somewhat related note:

Notepad++ has been a BIG help with editing the pedia text files (I can have Civilopedia.txt open in one tab and Pediaicons.txt open in another, and search both files simultaneously for an entry), as well as all the other Civ 3 text files... I no longer use Notepad anymore except for quick edits to unit .ini files.....

BadKharma
Jan 24, 2009, 10:48 AM
I have to say since someone pointed me towards notepad++ for editing xml files it has become my text editor of choice.

againsttheflow
Jan 24, 2009, 12:27 PM
On the topic of notepad++ does anyone have plugins they've found particularly useful?

Hikaro Takayama
Jan 24, 2009, 03:15 PM
Not really, but maybe if we asked nice, Steph could make one that lets you simulate the Civilopedia functions when editing the Civilopedia.txt file (sort of like how you can simulate a web browser when editing HTML with the program or run C++ programs.....)