The Resource Overflow Bug- Is there any other way?

You can use the Civ3 Multi Tool (C3MT, available in utilities forum) to re-order the resources (and units etc.) inside the BIQ without deleting anything!
 
Resource overflow is where you have over 32 resources in the game, the bug makes extra resources appear in a city that already has a resource and is not connected to the capital. See EmbryoDead's post in an old thread if you want to know more. See post 8 in this thread for a link.
 
@ Hi embryodead, it´s great that you are here back again and that just in time to help us. :) :thumbsup:

@ Hi Slava_sky,

first: welcome to CFC. [party]

That bug is especially a problem for bigger Civ 3 mods and it kills all systems of a development of civs by resources. I hope embryodead, that you allow me to citate your post about that bug:

"It happens only if you have more than 32 resources in game, and a city (or group of cities) not connected to a capital, is connected to a resource(s). Then, that city/cities will get a magical resource out of nowhere (resource nr x+32, where x is the existing resource nr). This resource will appear in all city/trade boxes.. if it's a luxury it will provide happy faces etc.

Just do it:
Build a lone city (not a capital of course) on a Horse resource. You should get a "bonus" Jade. Build a city on Iron.. you should get a Tar too. These magical resources are cumulative, and appear even if you don't know the tech to see them." (So far a part of embryodead´s posting).

Just one thought of me: May be that bug is part of a willingly bad programming by FIRAXIS. FIRAXIS didn´t want that there are more than 8 luxury resources working in a CIV 3 game. Therefore older versions of Civ 3 crashed with the luxuryicons small graphic. In C3C this was changed and you are now allowed to have more than 8 of these resources, but only eight are working for you.

So may be the programming that connects the resources is still there and may be this programming is causing that trouble (only a guess). So it could be, that the attached luxuryicons small graphic (in the vanilla Civ 3) is a clue for solving that problem for someone with programming abilities.
 

Attachments

  • Luxury icons small.PNG
    Luxury icons small.PNG
    18.3 KB · Views: 109
You can use the Civ3 Multi Tool (C3MT, available in utilities forum) to re-order the resources (and units etc.) inside the BIQ without deleting anything!
I have never used that tool thans for the heads up. BTW there were to many pages to read in that post does it work correctly with Civ3Complete? From the skimming I did some people were reporting problems with using it in the complete version.
 
resource nr x+32, where x is the existing resource nr.

And it's cumulative :D I have like 80 resources, so it goes like this: an unconnected city has a strategic resource, say Iron. Via this bug system it also gains Iron+32, say, Silver. Now, silver is a luxury resource, so the city also gains Silver + 32, say, Olives. It's really funny, "buy Iron and get Silver plus Olives free!". :( :( :(
 
I think I went wrong somewhere, because I was playnig as Egypt, and it had:
1. Egyptains (That's good!)
2. Nubian Pyramids (That's bad, and a bonus)
3. I THINK that it was Iron

I'm not sure if these resources could be used to build units/wonders or not :(
(I'd done something to **** that bit up...)
 
And it's cumulative :D I have like 80 resources, so it goes like this: an unconnected city has a strategic resource, say Iron. Via this bug system it also gains Iron+32, say, Silver. Now, silver is a luxury resource, so the city also gains Silver + 32, say, Olives. It's really funny, "buy Iron and get Silver plus Olives free!". :( :( :(

I'm wondering - using this example - if Silver was a bonus resource rather than strat/lux, then would you still get the Olives? I must get round to testing sometime. I'm at 62 resources in my mod ATM, so it may be sooner than I think. :D
 
I'm not sure if these resources could be used to build units/wonders or not

Those "ghost" resources? They definitely could. This morning I hit F7 to see a situation with wonders and found out that like 5 different civs were building Kaaba - arabians (my civ!) "unique" wonder. I got really mad :D The problem was, Arabians - 32 = Olives, and just about every Mediterranean civ had an unconnected city with olives.

I'm wondering - using this example - if Silver was a bonus resource rather than strat/lux, then would you still get the Olives?
I believe no. Bonus resources are like a stop point. Otherwise it would go eternal loop :D
 
Those "ghost" resources? They definitely could. This morning I hit F7 to see a situation with wonders and found out that like 5 different civs were building Kaaba - arabians (my civ!) "unique" wonder. I got really mad :D The problem was, Arabians - 32 = Olives, and just about every Mediterranean civ had an unconnected city with olives.
Yep, they can be used. In my mod it was possible to build Scythian horse archers with unconnected cities when the city had an (IIRC) olives resource.

I believe no. Bonus resources are like a stop point. Otherwise it would go eternal loop :D
That's good news. I'll test further soon, but hopefully this will deal with the overflow problem once and for all. :D Let us all know the results of any tests that you make.
 
Let us all know the results of any tests that you make.

Well basically everything was already said. The ghost resource G is X + 32 where X is either luxury or strategic resource (not Bonus) unconnected city has. If G is also luxury or bonus resource, the city gains another resource G + 32 (provaided that it's not a bonus one) and so on until the loop hits bonus resource. It doesn't matter if those ghost resources have any prerequisite or not, you can see them and use them anyway.

I believe they all disappear as soon as the city is connected to the capital, but I'm not quite sure about this part yet.

For those who are going to rearrange resources so that every strat/lux + 32 would be a bonus resource: be aware that you will have a mess in the Terrain properties window and, following, a mess on the map. Ofcourse if you distribute resources random way, then it doesn't matter much.

Those are the results of my morning's tests.
 
For those who are going to rearrange resources so that every strat/lux + 32 would be a bonus resource: be aware that you will have a mess in the Terrain properties window and, following, a mess on the map. Ofcourse if you distribute resources random way, then it doesn't matter much.

After I put all those resources back I realized I miscounted a bit and I need to rearrange them once more. Possibility to have a mess on a map again improved my thinking and after a while I came to a good and simple workaround :D If you distribute resources manually anyway, there's no need to have, say, hills not allowing fish. So i just allowed any resource on any terrain. Now I can rearrange them in any way, no mess on the map. :goodjob:
 
CornPlanter said:
I believe no. Bonus resources are like a stop point. Otherwise it would go eternal loop

:blush: :mad: might be yes indeed. At the recent test I had a city with Gold and it somehow also had a Tea. Now, Gold + 32 is a Whale, a bonus resource. But a Whale + 32 is exactly Tea, luxury resource. :crazyeye: I cannot count what I have in Tea +32 position because at some point soft starts counting from the beginning again, and this point is not the number of the resources I have. I still need to find out at which place it starts from the beginning and then I'll post final conclusions :D Keep up with the news :p
 
OK guys, welcome to the sad reality, or

CornPlanters research on Resource Overflow Bug

The following conclusions are supported by lots of testing and I'm afraid they are completely true :(

So, as it was said before, this happens when you have more than 32 resources, including luxury, bonus and strategic ones, and when you have a city, connected to the strategic or luxury resource but unconncted to the capital. Now, how exactly it works:
  • X is the real strat/lux resource unconnected to capital city has got.
  • T is the total number of resources you have.
  • R is the remainder of your total number of resources divided by 32. E. g. If you have 91 resources, R is 27.
  • i is the number of the current resource in the loop.


So, the city has got a resource X. The loop starts and the city also gains every 32nd resource from the list, doesn't matter if it's strategic, luxury or bonus. Ofcourse if it's bonus, it has no effect and the loop just continues to the next one. When it reaches the end of the list, it overflows from the beginning again. So, if X = 3 (i=3 as well now); city also gains a resource 35 (i=35); a resource 67 (i=67); a resource 99 (i=99) and so on.

When i comes close to T, that is, when i is at the position when after one more step i + 32 would become > T (but NOT equal to T!), increasement changes. This can happen in two cases: a) when i + R > T and b) when i + R < T. In the a) case increasement is no longer 32 but R instead. So then i doesnt increase by 32 but increases by R instead and, ofcourse, overflows from the beginning. After that loop just continues, increasement becomes 32 again. E.g. if T = 90 and i = 88, the next resource city gets is 24th one, then 56th, so on.

In the b) case, however, increasement becomes equal to R + 32. So if we have T = 90 (R then is 26) and i = 63; the increasement becomes (26 + 32 = 58). The next resource city gains is 31th one.

And the last case is when i becomes equal to T at some point. Actually it is the same case as a): i+32 > T so the same rule applies and increasement becomes R. Effectively meaning that the city will receive R'th resource next.

It doesn't matter if the would-be ghost resource is placed on the map somewhere or not. It doesn't matter if you have a prerequisite tech for it or not. The city has the resource and may use it in any normal way: gain happy faces, may build improvements and units which require that resource.

The very good question is, when the loop stops. The very good answer is: only when it hits the same resource twice. Now I didn't bother to write the calculation on how many different ghost resources city can receive when the total number of resources is T, but the maximum possible number M is (T divided by 32 rounded up) minus 1. Chances are some of them will be Bonus ones, so effectively city will receive one or, on a rare case, two additional "ghost" resources. And you must have a really high T number to receive 3+. If you have no bonus resources, M is no longer "maximum possible number" but the "exact number" instead, because bonus resources is the only factor which could affect M. Because when the loop comes to the T and starts from the beginning again, it always hits the X resource on this iteration. Meaning that the loop always stops at the second iteration. I could prove this mathematically but then again I see no need to bother.

By the way I used terms like "the next resource city gains", but from the players point of view there is no time factor. Player sees all the ghost resources at once, no loops, no "next".

Thanks to MultiTool which made my study possible. I hope this will help to those of you who still wants to have more than 32 resources.

Now the solution. I don't have one :D probably because I'm just a bit tired right now. The very first idea which comes into mind is, make sure that R is equal to zero. Makes things much simpler :) E. g. if you have 64 resources, make sure first 32 slots are for strat/lux and 33 - 64 slots are for bonus. Loop starts from the strat/luxury resource, hits bonus one and hits starting resource again. The end.
 
So (if I read you correctly), to simplify:

There are only 32 indexes for resources available to a city (0-31)

Each resource in the game will have index of n mod 32 (where n is the resources position in the game resource list, n=0,1,2,...)

If a city is not connected to the capital, and it has a strategic/luxury resource in its resource box, then it will have all the other resources with the same index.

i.e. having one member of the following sets (of resource numbers), implies that it has all members of the same set - regardless of all other factors.

{0,32,64,96,128,...}
{1,33,65,97,129,...}
{2,34,66,98,130,...}
{3,35,67,99,131,...}
etc

Note: This only applies to strategic/luxury resources, since bonus resources do not appear in the cities resource box.
 
Exactly! Thanks for translating ;)

Now, any solution for the situation with 33+ strategic/luxury resources? :(

Umm I directed you the first and this thread because there are solutions in them... The first one (for 33-43 resources) definitely does work. Others worked on the second one (for 44+ resources, with a mixed blocks of 32), so I cannot say if that works as well, but no reason why it shouldn't. Have you tried it?
 
Now, any solution for the situation with 33+ strategic/luxury resources? :(

Yes (but not any good ones)

1: give every civ a (cheap) wonder (req palace) that puts an airport in every city.

2: put a unique resource under all capitals, and reqire that resource as well for anthing that requires resources.

3: use multiple resources to show the spread of availablity with technology. I.e. multiple resources all called oil that appear in different places as technology improves.

#edit

just finished testing, the method with mixed blocks of 32 (to get more than 32 strategic/luxury resources) definitly does not work. Tried 0-31 strat, 32-63 bonus, 64-95 strat, 66-127 bonus; resource 0 gives 64 as well, and 64 gives 0 as well.This confirms what CornPlanter said.
 
1: give every civ a (cheap) wonder (req palace) that puts an airport in every city.

Setting the palace as a wonder (don´t forget the wondersplash) could do that job. But this methode doesn´t work for scenarios and mods that are using the "El Justo-methode" and cut down the trade-net to gain much higher gamespeed.
 
Top Bottom