Help! I'm looking for a certain utility.

Darius

Smith, Wesson, and me
Joined
Jul 20, 2001
Messages
3,516
Location
Duluth, MN, USA
This may be redundantly bringing up a discussion that has already occurred here, but I searched hard and saw no parallel thread.

I just realized that Julius Brenzaida's "No Limits" utility does not change the limit of cities that can be built in scenario creation. Is there some utility out there that would tweak my game and allow me to build more than 255 cities? My current scenario project is halted until I could find such a thing, since if it doesn't exist I kinda have to start over.

Have any of you heard of any utility that can edit the cities limit? If not, is there any known way to hex-edit the limit?

Thanks in advance!
 
This is a map of Eurasia, Africa, and the southwest Pacific in my scenario. As you can see, the limit of 255 has already been met even though I still have all of North and South America to put cities. Unless I can change the limit I'm going to have to spread out cities to such a point that it would become unrealistic historically. :(
 

Attachments

  • untitled.gif
    untitled.gif
    10.9 KB · Views: 382
Thanks, but it seems they aren't gonna crack it. I guess the scenario will just be inadequate, and I'll have fortresses represent cities. :mad: I can't believe the best minds on Civ hex-editing couldn't get around this. :(
 
Well there is an easy solution: get a compiler program, re-write the relevant code (in fact, why can't you tidy things up a bit as well), re-compile the code, and distribute the modified .exe file with your scenario. Of course, that's actually illegal... :lol:
 
Well, if it means more cities!....

How do you hex edit more units?

Tips on how to do it?

Anyone?
 
Actually it was part of my original plan to distribute "no limits" with the scenario until I found out it doesn't do this. Anyhow, Brenzaida and many other hex-editors tried just that, as it seemed logical. But somehow the entire limit of two bytes in the .exe made the city limit uneditable as apparently a third byte would be needed, unless someone were expert enough to reconfigure the entire way the lines of code are read.

I dunno, unfortunately I am new to hex-editing. :crazyeye: I have done it several times with instructions in hand; I haven't been able to improvise yet. If you could be more specific on that process though I think I could give it a shot.

BTW Curt, on the thread in the link above, Brenzaida said that he did manage to get rid of the units limit. He is considering distributing a new version of the no limits utility with the units limit off, but not the city limit, as there seems to be no chance of success there.
 
Well the problem is this:

The highest possible Decimalvalue on one offset is 255 (which means FF in Hexvalue). You can work around this regulation by using more offsets but also here the possibilities aren't endless. You can use maximal three offsets. Unfortunately the Civ programmer squeezed all the city information into one offset and therefore it is rather difficult to expand that value. The only option is you have to rewrite the whole column or perhaps a bigger part of the file to split up the value and using more offsets. To do this you have to analyse at least every offset surrounding the questionable value. I've tried it one time but quit it after it took me more and more month. Perhaps I can convince my colleagues to help me and I will also try to establish a connection with Julius here so I think we may find a solution together.

I know this sounds a little bit complicated but I think this will clear all questions. This is a typical value:
00 00 00 FF 00 00 00

I've coloured the main part red. Each value consist of a block with two figures. And every block we call offset the figures in it value. So the problem is you have to activate the two offsets left and right from the "FF" so the engine can recognize it as one value. I've done such amendments very often but most of the time it was a work from me or one of my colleagues so I had the source code. To work with a file which was done by a unknown person is always a difficult task because before you can do anything you have to analyze the whole structure of the file so you know exactly which offset do what otherwise it would completely senseless. Hope I could explain it to you in an understandable way.
Well even hexediting is not limitless but it sounds like a big challenge and I like challenges.
 
That's exactly what they were talking about. After your post on the ZWK game I was hoping this thread is one of the things you would have touched on. :) Also you brought up an idea that no one else had on the other thread, with editing the entire column. It made me think, if your problem was that you would have to tediously edit every line up the column to three, couldn't you just design a program that would do so? The algorithm would seem pretty straightforward.

Also, you say it is true that you can edit it to three but the disadvantage is that you have to do it to every one of thousands of lines. If indeed a direct program cannot do so, I could. If you gave me instructions as to which column and what to change things to, I could hop on my hex-editor and do it. It would take awhile, but I have the mental patience to just keep on doing it. Plus my scenario is important enough to me to be worth the sacrifice.

Yet another alternative is to divide up such a task. Recruit perhaps 50 dedicated people throughout Apolyton and Civfan, assign each of them a certain number of lines, and have all of them editing to three offsets for an hour a day or whatever fits their schedules. Then, when they are finished with their assignments, they would e-mail the resulting copies of the .exe file to one person. He would combine all of them, based on their assignments, into one final, edited version. The organization would be a challenge, but it would work.

Regardless of our options, I'm just glad we've got another expert on the team. Just as a source of motivation, I must remind you that there are dozens of other scenario creators that are dying for such a breakthrough. If you and the others achieve this, it could usher in a whole new generation of scenarios, for which everyone in the community will remember your names. Prepare to be a legend. :goodjob:
 
BTW, as you said that you have touched on this limit before, could you tell me which particular offsets refer to the 255? I'd be interested in at least looking at what we are dealing with, and perhaps pick around at a test .exe file. Also, if you could give me instructions on how to edit the whole column, I could at least get started and see if it is possible.
 
Originally posted by Imperial-Markus
Well the problem is this:

The highest possible Decimalvalue on one offset is 255 (which means FF in Hexvalue). You can work around this regulation by using more offsets but also here the possibilities aren't endless. You can use maximal three offsets. Unfortunately the Civ programmer squeezed all the city information into one offset and therefore it is rather difficult to expand that value. The only option is you have to rewrite the whole column or perhaps a bigger part of the file to split up the value and using more offsets. To do this you have to analyse at least every offset surrounding the questionable value. I've tried it one time but quit it after it took me more and more month. Perhaps I can convince my colleagues to help me and I will also try to establish a connection with Julius here so I think we may find a solution together.

I know this sounds a little bit complicated but I think this will clear all questions. This is a typical value:
00 00 00 FF 00 00 00

I've coloured the main part red. Each value consist of a block with two figures. And every block we call offset the figures in it value. So the problem is you have to activate the two offsets left and right from the "FF" so the engine can recognize it as one value. I've done such amendments very often but most of the time it was a work from me or one of my colleagues so I had the source code. To work with a file which was done by a unknown person is always a difficult task because before you can do anything you have to analyze the whole structure of the file so you know exactly which offset do what otherwise it would completely senseless. Hope I could explain it to you in an understandable way.
Well even hexediting is not limitless but it sounds like a big challenge and I like challenges.

I hope you can find a solution, Imperial-Markus!
My faith is with our awesome CIV hex-editing men!

The goodwishes of many scenario makers are with you!
 
Ok here we go. This is our current situation: At first thank you for your support with guys like you around working on this is double the fun.

Now to business. I was able to recruit two of my colleagues (and good friends). We established a little network a long time ago with an FTTP-server. So we have unlimited access to eachothers harrddrive. This is a great improvement for our work as we don’t need to send us files but just save it on the harddrive and the next one picks it up. Easy :) I read you have hexediting skills Darius so this would mean we could delegate some work over to you. Perhaps we could find also some other editors so we could split the work and make faster progress. We would also need some testers who would like to play Civ II which we could send the files. Well I've explained this tricky situation about the file to my colleagues and we've decided to try and work around the Civengine so that it will recognize more than one offset as Citylimitparameter. We will begin with two and if it works expanding it to full three offsets will be no problem anymore so in the end you will be able to build more than 16.000.000 cities hope this will be enough ;). We've borrowed some nice utilities from our firm like disassemblers, debuggers and other neat and cool programs (licence what? ;)) and we started yesterday with the analysis of the file structure. At the moment our progress is to unstable to post it here but as soon as we could cut the possibilities to let's say 8 or 9 we would be glad to distribute it to some hobbyeditors. Perhaps some of you might also had the same good feeling I had when starting with hexediting and soon we might have one or more new information scientists in our ranks. I've also tried to contact Julius so he could send me his progress he made so far so that we cán continue where he stopped this would save us a lot of time.

At last I would ask Darius if he could send me the scen-file of his scenario. So we don't have to build 255 cities manually (phu would've taken you a lot of time to build them I assume). We could use this file as a template for our experiments. If you don't want to post it here you can send it via E-Mail and I will distribute it among my colleagues if it's ok. So that’s it for now and happy hunting to all of us.
 
This is great news!

Imperial-Markus, I would be honoured to test any files you produce,

Im at; curtsibling@ntlworld.com

I wish you and the other coders the very best of luck in your mission!

:goodjob:
 
Ok, here is a savegame of the scenario so far. There is an engineer in the position where Capetown, Sout Africa would be, and when he attempts to build a city he gets the "too many cities" message, so it will be good to test with just by using that little guy.

Also, just in case you haven't read that other thread just yet, I forgot to say that they did somehow manage to get rid of the limit, but the problem is that the way they did it made the units built by city 256 be supported by city 1, and the units built by city 257 be supported by city 2, and so on. I suggest you go there and see what happened there to make sure you don't run into the same wall.
 
techumseh, you speak true!

Imperial Markus, here is a almost full map, for ToT!

(It is also full of Axis hardware!)

I would be nice if we could crack that accursed unit limit too!
2000 units is NOT enough!

Is there any way to create more unit slots?
Tricky, I know...
 
Hmm might be a good idea. I understand that the unitlimit in TOT was increased but how about the city limit? Still the same? I assume TOT based on the files of MGE. The only thing which is different is the fancy graphic and some other little improvements (unitlimit, increased events,....). So comparing these two files (mostly we are observing in which way values are changing in particular offsets when we build new cities and units) might help us locating the offsets corresponding to the unit-support.
 
So any news here?
 
:(
 
Top Bottom