 |
|  |
 |
|
Fromafar
|
|
When generating a list of candidate tile improvements, each candidate is assigned a value (utility) based on the terrain, improvement, and city properties.
I have now multiplied this utility value with the worker utilisation percentage applied to the tile when determining the city production.
So when you have a size 7 city: the 8 inner ring tiles have unmodified utility values (100% utilisation - for some reason the game requires only 6 workers to make the first ring being 100% ), while the second ring has a reduced utility value (IIRC it is (7 - 6) / (18 - 6) = 1/12 = 8.3%), which will go up when the city grows.
After generating the list, it will be ordered on descending utillity value, and PW spending will start from the beginning of the list. So, there is no fixed % where you don't work a tile. But it will prevent spending PW on improvements that are not really contributing.
So, Flinx was correct.
I think this is a forgotten issue from the CTP1 to CTP2 conversion. In CTP1, a placed worker meant 100% utilisation, regardless of the distance of the tile to the city or the number of available workers.
|
|
|  |
 |
|
Maquiladora
|
|
quote: for some reason the game requires only 6 workers to make the first ring being 100% |
Isnt that because of the city size 1-6 for inner ring, 7-18 (12) for second ring etc. but i thought that could be changed in citysize*.txt so why is it hardcoded?
|
|
|  |
 |
|  |
 |
|
Fromafar
|
|
User profile option + repaired memory leaks.
ui\interface\GreatLibrary.cpp
Repaired more memory leaks that were caused by reloading the great library data.
gs\database\ProfileDB.cpp
gs\database\ProfileDB.h
ctp\civapp.cpp
Added a "ColorSet" option to userprofile.txt, to make variation between the colors##.txt files easier.
Note: I undid some previous changes by Martin in civapp.cpp. Those were no longer needed now that the great library memory leaks have been repaired at the root.
OT/late reply: the tile improvement placement change has no impact on how many workers are in a ring. The citysize#.txt values are being used - nothing is hardcoded.
[Edit: link removed. Included in the 2004.06.05 source collection.]
Last edited by Fromafar on 13-06-2004 at 19:34
|
|
|  |
 |
|
Fromafar
|
|
Bug fix: tile improvements without Freight cost modification no longer have 0 Freight cost for the trade route computation. This should prevent funny paths from being computed.
gs\newdb\terrimprove.cdb
gs\world\cell.cpp
[Edit: link removed. Included in the 2004.06.05 source collection.]
Last edited by Fromafar on 13-06-2004 at 19:35
|
|
|  |
 |
|
Fromafar
|
|
Bug fixes
gs\newdb\CTPDatabase.cpp
gs\newdb\CTPDatabase.h
Repaired memory leaks and cleaned up the government modification code somewhat.
ui\interface\sci_advancescreen.cpp
(Activision patch 1.1 reimplementation) Start the "change research" screen with the current research selected.
[Edit: link removed. Included in the 2004.06.05 source collection.]
Last edited by Fromafar on 13-06-2004 at 19:37
|
|
|  |
 |
|
Fromafar
|
|
Bug fix:
gs\gamedata\ArmyData.cpp
(Activision patch 1.1 reimplementation) Corrected a check that prevented sueing of franchises.
[Edit: link removed. Included in the 2004.06.05 source collection.]
Last edited by Fromafar on 13-06-2004 at 19:37
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:31
|
|
Well Fromafar, with the use of the STL for the government stuff I get now these warnings, is there a way to disable them?
quote:
c:\programme\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::reverse_iterator >::iterator const *,std::list >::iterator,std::list >::iterator const &,std::list >::iterator const *,int>' : Bezeichner wurde auf '255' Zeichen in den Debug-Informationen reduziert
c:\programme\microsoft visual studio\vc98\include\vector(39) : Bei der Kompilierung der Member-Funktion '__thiscall std::vector >::iterator,dbgallocator >::iterator> >::std::vector >::iterator,dbgallocator >::iterator> >(const dbgallocator >::iterator> &)' der Klassenvorlage
c:\programme\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::reverse_iterator >::iterator *,std::list >::iterator,std::list >::iterator &,std::list >::iterator *,int>' : Bezeichner wurde auf '255' Zeichen in den Debug-Informationen reduziert
c:\programme\microsoft visual studio\vc98\include\vector(39) : Bei der Kompilierung der Member-Funktion '__thiscall std::vector >::iterator,dbgallocator >::iterator> >::std::vector >::iterator,dbgallocator >::iterator> >(const dbgallocator >::iterator> &)' der Klassenvorlage
c:\programme\microsoft visual studio\vc98\include\vector(39) : warning C4786: 'std::vector >::iterator,dbgallocator >::iterator> >::vector >::iterator,dbgallocator >::iterator> >' : Bezeichner wurde auf '255' Zeichen in den Debug-Informationen verkürzt
c:\programme\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector >::iterator,dbgallocator >::iterator> >::~vector >::iterator,dbgallocator >::iterator> >' : Bezeichner wurde auf '255' Zeichen in den Debug-Informationen verkürzt
c:\programme\microsoft visual studio\vc98\include\vector(52) : warning C4786: 'std::vector >::iterator,dbgallocator >::iterator> >::vector >::iterator,dbgallocator >::iterator> >' : Bezeichner wurde auf '255' Zeichen in den Debug-Informationen verkürzt
|
-Martin
|
|
|  |
 |
|
Fromafar
|
|
To suppress this warning, you may add a
code: #pragma warning(disable: 4786)
preprocessor directive in the file, as in e.g. ai\diplomacy\Diplomat.h.
Maybe there is a project setting, but I don't know it.
|
|
|  |
 |
|
Fromafar
|
|
The reason is that the 'offending' piece of code is part of the compiler, and not of the Activision code.
Because of that, this warning does not really apply to us. It merely states (roughly translated from German) that the compiler has generated some symbols that contain more than 255 characters, and that for debugging purposes it has truncated these symbols to 255 characters.
As this is a piece of code that we are not going to modify at all, debugging it is not very interesting. And even with 'only' 255 characters, you probably would be able to find the correct symbol.
|
|
|  |
 |
|  |
 |
|
drulius
|
|
Lubbock, Tx USA
Jan 1970 time: 23:31
|
|
quote: code:--------------------------------------------------------------------------------#pragma warning(disable: 4786)-------------------------------------------------------------------------------- |
warning 4786 is very common when using STL containers, especially maps and sets. As FROMAFAR stated it is a truncation warning that can be safely ignored. Every time a container copies itself internally during code generation, it generates a unique name by concatenation and quickly surpasses the 255 char limit. At least this is the explanation I was given when we began studying STL containers this semester.
In Project->Settings [c/c++ tab, general category] you can set the warning level to NONE but it normally only reduces the number of warnings issued from hundreds to dozens.
Or you can use the #pragma in affected files, but note thatquote: From MSDN VC++6 documentation:
For warning numbers greater than 4699, those associated with code generation, the warning pragma has effect only when placed outside function definitions. The pragma is ignored if it specifies a number greater than 4699 and is used inside a function. The following example illustrates the correct placement of warning pragmas to disable, and then restore, the generation of a code-generation warning message:
int a;
#pragma warning( disable : 4705 )
void func()
{
a;
}
#pragma warning( default : 4705 )
|
Last edited by drulius on 18-05-2004 at 05:44
|
|
|  |
 |
|
Fromafar
|
|
Activision patch reimplementation:
gs\gameobj\GameSettings.cpp
Use the difficulty and barbarian risk level as selected by the user when starting a new (scenario) game.
[Edit: link removed. Included in the 2004.06.05 source collection.]
Last edited by Fromafar on 13-06-2004 at 19:40
|
|
|  |
 |
|
Fromafar
|
|
This error may occur when the TerrainImprovementRecord.h and .cpp files have not been updated from the terrimprove.cdb input.
Did you do a debug build first? IIRC some of the custom build steps are not executed properly in the other builds.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:31. Apolyton Time is 00:31. |
top of page
|
|
|
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
|
|
|
|
|
|