 |
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:15
|
|
Isn´t the units limit 2048? And I have to concur with William on the cities limit. Even if you´d be able to change this, that would make the no-limits patch incompatible with all other Civ2 versions.
Oh, yes, and some notes about your current no-limits thingy. The game.txt files you included seem to be changed in more ways than just the 10,000 changed into 32,767 (which is the only change required, right?). For instance, in picking the number of civs in the extended original, it says something like "7 civs (2 aliens race)" and "6 civs (1 alien race)". I assume you made some changes to your rules etc?
And perhaps you could let the different game.txt files already be contained in their subfolders in the ZIP, so extracting the zip will automatically put them in the correct dirs. That way users don´t have to rename them first.
And thirdly, solving the previous two "problems". Perhaps you could have a small program instead of the game.txt files which simply finds all occurences of 10,000 and changes them into 32,767. That way, people´s own changed files wil remain intact and the same version can be used for all different language versions of ToT.
|
|
|  |
 |
|
Mercator
|
 |
Sorekara no Nanimo
Jan 1970 time: 06:15
|
|
I didn´t know about that 1948 per civ limit.Anotehr thing about the 255 cities limit. AFAIK, the city ID in a savegame (and the civ2 memory for that matter) is only one byte. That´s what´s causing that city 257 creates units supported by city 1. Somehow you´d have to change that one byte to two, but I don´t think that will be as "easy" as changing, say, FF00 into FFFF. Apart from that, this change will drastically change the structure of savegames etc., making them incompatible with other ToT versions. And depending on how the executable itself finds the different sections in the savegames even the executable itself might not be able to locate them correctly.
About the Deity +5, is saving only impossible at that level, or does the problem already start at Deity +3? Originally, there are 6 difficulty levels, adding 3 more, makes it 9, which can´t be saved anymore in one byte, this "overflow" may be causing the trouble.
And about the 128 cities, I think that was a problem of version 1.x only, and was solved with the 2.42 patch.
And as for whether you should release a new patch if it only lifts the unit limit, I don´t know. I´m not making scenarios and I´ve never run into the limit yet... But I´m sure some scenario makers will appreciate it.
By the way, William, how´s the Hobbit?
|
|
|  |
 |
|
Angelo Scotto
|
|
Milan, Italy
Oct 1999 time: 05:15
|
|
Hello Julius, and compliments for your CSPL! (William, have a look at cradle utilities page...)
quote: I can try to change all the ff00 (256) in the programm, but it’s going to take monthes, I am afraid. |
As always, i have to agree with Mercator and William:
the real limit here is not 256 but 8, more precisely its due to data structure of units and not of cities;
The problem is that Civ2.exe reads a single byte (8 bit) from memory when searching for city number in unit data structure, if you want to make it work with 256 cities you should force it to read two bytes instead of one;
in other words
Unit data structure has a particular field (1 byte in size)
00 means unit is supported by city 0
..
..
..
FE means unit is supported by city 255
FF means unit is supported by NONE
This explains why Civ2 acts in the strange way you described:
If you simply break the limit of 255 cities you allow Civ2 to create city 256, 256 is FF in hex,
obviously when Civ2 examine a NONE unit it notice that it is supported by FF, the problem is that a city FF EXISTS in your game and so Civ2 happily decides that it is the home of all NONE units.
The same applies for city 257, 257 = 01FF (FF01 in reverse notation), this means that it uses 2 bytes to store the correct value, BUT Civ2 is programmed to read only a single byte, so from FF01 it reads only 01 and so it assigns units built in city FF01 to city 01, units built in city FF02 to city 02 and so on.
A correct approach requires to find each instruction which reads from unit data structure the home city number and change it so that it can read 2 bytes instead of one but this requires a disassembler, a debugger and a lot of rainy days outside;
It's the same approach i'm following to break the 7-civ limit in Tot, but, even if the approach theorically works it requires a HUGE number of weeks of boring work and i'll quit soon.
quote: What’s raging is that the trading works ! |
The trading works because programmers of city data section were less greedy than programmers of unit section:
Look at Allard Hex Edit document:
8. CITIES INFORMATION
(source Andrew Livings and Xin Yu)
...
...
69-74 = 1st, 2nd and 3rd trade route partner city number (city number is 85th-86th position)
..
from byte 69 to byte 74, this means bytes 69,70,71,72,73,74: 6 bytes for 3 cities index, this means that city index was supposed 2 bytes long (and Allard confirms this writing that city number is in bytes 85,86).
The problem is not there, the problem is that no one warned unit section programmer which allocated just 1 byte for city number as explains always by Allard:
7. UNITS INFORMATION
(source Allard Höfelt)
..
..
17 home city with number is city number (FF is none)
..
byte 17, just one byte for city number.
Do you understand the problem now? programmers of unit section has condemned the whole game to 256 cities even if the game itself can support 'till FFFF-1 (65534) cities (THIS makes me raging! )
Greetings,
Angelo
|
|
|  |
 |
|  |
 |
|
Julius Brenzaida
|
 |
Currently cleaning the 9000 rooms of Sticky Mouse's Palace
Aug 2000 time: 05:15
|
|
Mercator, as the levels are concerned, it is hard to explain.
Already Deity+1 crashes. And until civ2 FW 2.72, it works
It is raging, too
I think the problem comes when the programm wants to calculate score, it doens't know what multiplier come with the new levels.
So my theory is the following. It was implemented but not used for civ 2.42, then forgotten, and we're only picking remains of it with ToT and MGE (where they did modify many things)
Maybe only one number change is required but I don't even know it
And maybe it has something to do with the save file, as saved files from 2.42 are different from MGE and ToT.
Anyway, I have no new idea and the solution certainly is not to be found only in the .txt files as it is for 2,42 
|
|
|  |
All times are GMT. The time now is 05:15. Apolyton Time is 00:15. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|