The Resource Overflow Bug- Is there any other way?

Well rechecked and realized that I haven't been bldg towns on resources .. so did a couple and yep I now have almost all the resources my capital has (when not connected to other cities). Should have known it was to good to be true, now to go back to the way I was doing it before, unfortunately have added 50+ resources since then. Oh well we all miss the obvious at times or forget what read a yr ago .. I try not to bld on resources so forgot to check.

Did note that the AI likes to bld on resources in test game playing, hmm wonder if it is aware of the bug or just happenstance.

I'll look at the pcx referencing...probably the issue as both were old lux resources that i changed.
 
From what I've tested, I'm pretty sure the 32 S/L -> 32 Bonus -> 32 S/L strategy does not work :(
Nope, because the bug loops, giving you not just the resource 32 places later but 64, 96, etc, even back around to the beginning of the list

@Weasel: I've though of doing something like that myself before, but decided it would probably be a little tricky to set up...
Indeed, it requires a lot of thought and some careful planning for minimal effect. I have a special case that makes it more useful though: I'm going to have several minor civilizations as strategic resources, which will increase tradeable resources to over 32. The minor civs are only useful when connected to the capital (to build a wonder to spawn special units), so getting them as ghosts won't hurt anything. If I stick them at the beginning and the end of the tradeable resources, with the <32 others in the middle, then the only possible ghosts would be minor civs from other minor civs, and they would be completely useless.
So, I suppose the most effective solution would be that if you have some resources that are only useful at the capital, to let those ones experience the bug.
 
A question ... unlike the bug that produces say 1 or 2 ghost resources, I've now had the case as indicated previously occur twice, where built a city on a resource and get access to all resources available in my capital. The city has no connection via sea or air yet gets everything not just the 1 or 2 was expecting???? I am still testing for this in the mod working, is this part of the resource bug or something else ..
 
So, I suppose the most effective solution would be that if you have some resources that are only useful at the capital, to let those ones experience the bug.
That actually sounds like an elegant solution.

Perhaps it would be possible to have a true "ghost" resource - put one in the buggy slot that has 0 bonus values & a blank icon ?
 
My apologies for the bump, but I have spent about 3 hours tracking down the question of the "Resource Bug", and I want to make sure that I correctly understand it in relation to what I am doing.

Embryodead, CornPlanter and SWalker,

thank you very much for your outstanding work in recognizing and understanding the "Resource Overflow Bug". Now it´s time to draw the final conclusions from your great work for the normal civmoder from the street (like me). :)

Please correct me if something is wrong with the following:

1. The maximum number for C3C strat./luxury resources without running in this bug is 32.
2. The strat./luxury resources must be placed in special resourceslots to get the maximum number of 32.
3. For standard C3C resources (1-8: strategic; 9-16 luxury and 17-26 bonus resources ending with tobacco) and maps depending on them, the places for additional strat./luxury resources without the bug are:

a) In the resource graphics (starting with 1): 27,28,29,30,31,32,49,50,51,52,53,54,55,56,57,and 58.

b) in the editor (starting icons with 0): 26,27,28,29,30,31,48,49,50,51,52,53,54,55,56 and 57.


4. For C3C maps without the standard resource settings you must look in which slots the strat./luxury resources are placed and use free places including to number 32 in the resource graphics (or 31 in the editor resource icons) and all slots from bonus graphics up to number 32 (or 31 in the editor resource icons) by adding 32 to get the number of the slot for the strat./luxury resource without that bug.

5. All other resources must be bonus resources to avoid the bug.

a) Reported by CasusBelli a total of 999 resources is possible.
b) Dummy bonus resources, that are not placed on the map, can be used to receive the slots for the strat./luxury resources without the bug.

1. From this, it appears that you can have considerably more than 32 bonus resources as long as you do not exceed 32 tradable resources? Is this correct?

2. If you exceed 32 resources, any additional tradable resources must appear within the first 32 resource slots so that the bug will not appear. Is this correct?

What I am trying to do is produce some modifications to the game, using the existing resource icons to start with, but with additional resources similar to what TETurkhan did in his classic Test of Time mod. To start with, I have added an Iron 25 resource that does not function as Iron for the purposes of building anything, but does supply a major shields boost for the city that has it within its radius. I have also added a "Hot Springs" bonus resource, available only in Tundra, to make the Tundra more suitable for building in. I would like to add additional fish resources, using the existing fish icon, but differentiating them in the resource editor by calling them Herring, Salmon, Tuna, etc, and giving them different resource values and locations, along with a variety of other resources of different types, the fish is only an example. I suspect that I will exceed 32 resources reasonably soon, and I do not want to produce problems for myself and any users.

I am also planning on converting the Sea Cities scenario to Conquests, and I am looking at adding a number of seabed resources, some of which will be tradable, and want to make sure that as long as I stay below the 32 tradable resource limit, that I will not have problems.


I also came across the following quote, again by Civinator, and thought that I would pass along an idea for him and the rest of the modding community that may work to solve his problem.

Hi SWalker,

thank you for your reply. The problem is, I want to use a highly cut down tradenet (microzones) not only for improvements, but to force the AI to build different units in different regions of the map on the same continent (p.e. : in a WW 2 scenario no road, harbour and airport connection possible between Germany and France, so the German AI is forced to build in the French occupied region units with minor value ( p.e. a French S 35 tank with German emblems on it) to the units they can build in Germany (p.e. a Panther tank). Here the (like you said ugly and confusing) corection for imps with the "resources in city radius" doesn´t work.

As I have indicated, my Iron 25 cannot be used to build anything that requires Iron, such as the Swordsman, as I discovered very shortly after adding it. It was quite frustrating having that in the city radius of Byzantium, and not being able to build Swordsman. I needed a straight Iron resource. Based on that, I wonder if the following changes would work, if you wish to have certain areas only be able to produce certain units.

If you want to have French factories only build French tanks, what you can do is have is have the German Tanks require something like Iron G107 to be built in addition to Oil and Rubber, but have the resource Iron G107 listed as a bonus resource, so it is not traded, and only have the G107 resource located in within the German city radius, since these are scenarios with preset resource and building locations. French tanks would require Iron F106 to be built, also a bonus resource only located in the radius of French cities. Therefore, in France you can only build French tanks, and in Germany, you can only build German tanks, and do likewise for the other countries. The key to this working is using it in a preset scenario, where all resources are set in advance.

I would appreciate any feedback to the above idea, as I am planning to use something like in some of the mods that I am working on.
 
As far as I understand it, from studying this thread, and from having to rework a map to avoid the overflow problem...

1. From this, it appears that you can have considerably more than 32 bonus resources as long as you do not exceed 32 tradable resources? Is this correct?

You can avoid the bug completely: if you have no more than 32 Luxury/Strategic resources. You must also have AT LEAST 32 Bonus Resources. This will avoid the Overflow bug. Easiest way is to have the first 32 resources set as lux/strat, then the rest bonus.

2. If you exceed 32 resources, any additional tradable resources must appear within the first 32 resource slots so that the bug will not appear. Is this correct?

If you exceed 32 luxury/strategic resources, the bug will show up. There is no way around it. The bug may only show up for cities that are not connected to the Capital. If the city is connected to the Capital, the there is no resource overflow bug.

I suspect that I will exceed 32 resources reasonably soon, and I do not want to produce problems for myself and any users.

From what Civinator has said, if you have the first 32 resources lux/strat, and have at least 32 bonus resources after this, you can continue adding as many bonus resources as you wish with no additional problems (up to 999 is the limit I believe).


If you want to have French factories only build French tanks, what you can do is have is have the German Tanks require something like Iron G107 to be built in addition to Oil and Rubber, but have the resource Iron G107 listed as a bonus resource, so it is not traded, and only have the G107 resource located in within the German city radius, since these are scenarios with preset resource and building locations. French tanks would require Iron F106 to be built, also a bonus resource only located in the radius of French cities. Therefore, in France you can only build French tanks, and in Germany, you can only build German tanks, and do likewise for the other countries. The key to this working is using it in a preset scenario, where all resources are set in advance.

That does work in certain situations, but those areas would have to not be connected at all (via road, harbor, or airport trade).
So if a civ has access to both G-Iron and F-Iron, and the whole civ is connected via trade routes, then the whole civ would be able to build both German and French tanks.
In order to have only certain cities of the same civ build the French tank (and not the German), those cities would have to be completely seperated (no trade routes at all, including road) from the rest; and they would have the F-Iron resource available (but not the G-Iron). Civinator did something of this sort in SOE (can't remember what he called it though :) )

For requiring resources to be within city radius, this can only be applied to improvements/wonders, and not to buildable units. So it may have a use for auto-producing units, but you wouldn't be able to have a certain city only be able to build certain units based on what resources are in the city limit (unfortunately!).

Hope this helps.

Tom
 
That does work in certain situations, but those areas would have to not be connected at all (via road, harbor, or airport trade).
So if a civ has access to both G-Iron and F-Iron, and the whole civ is connected via trade routes, then the whole civ would be able to build both German and French tanks.
In order to have only certain cities of the same civ build the French tank (and not the German), those cities would have to be completely seperated (no trade routes at all, including road) from the rest; and they would have the F-Iron resource available (but not the G-Iron). Civinator did something of this sort in SOE (can't remember what he called it though :) )

For requiring resources to be within city radius, this can only be applied to improvements/wonders, and not to buildable units. So it may have a use for auto-producing units, but you wouldn't be able to have a certain city only be able to build certain units based on what resources are in the city limit (unfortunately!).

Hope this helps.

Tom

Tom, you misunderstood. The additional F-Iron and G-Iron resources are not strategic or luxury resources, therefore they would not be tradable, and not appear in any resource box, regardless of the communications net. In the unit editor, you can have up to three resources required for any given unit. They would be like cattle or gold or fish. You can have 4 cattle, and 3 fish at one city, and that is the only city they effect. Right now, the Iron 25 I have added shows up as a strategic resource, but since it does not allow you to build anything requiring iron, it has no effect on the mods that I am using it in, beyond increasing city production.

What I probably need to do is work up a simple mod showing my idea and post it for people to play with, so that they can understand what I mean. I will try to get up later today a modification of the Pacific War scenario so that everyone can get a better idea of what I mean.
 
Tom, you misunderstood. The additional F-Iron and G-Iron resources are not strategic or luxury resources, therefore they would not be tradable, and not appear in any resource box, regardless of the communications net. In the unit editor, you can have up to three resources required for any given unit. They would be like cattle or gold or fish. You can have 4 cattle, and 3 fish at one city, and that is the only city they effect. Right now, the Iron 25 I have added shows up as a strategic resource, but since it does not allow you to build anything requiring iron, it has no effect on the mods that I am using it in, beyond increasing city production.

What I probably need to do is work up a simple mod showing my idea and post it for people to play with, so that they can understand what I mean. I will try to get up later today a modification of the Pacific War scenario so that everyone can get a better idea of what I mean.


32 strat./lux. resources is the maximum without running in that bug, if these resources are placed properly. 999 bonus resources as a maximum was reported long ago by casus belli and I citated that in one of my posts. I haven´t tested if this is really the maximum number for bonus resources. may be if the resource graphics file is big enough there can be even more. So let´s say, that there can be many, many bonus resources be used. :)

I think your idea of limiting unit production to a certain region, doesn´t work that way on a pc, as bonus resources can´t be set as perequisites for a unit (may be on a Mac this is different??). The methode I created to solve this problem is as a completely isolated tradenet for that region as tom2050 did describe it. I named that a "microzone" and described a way to do that at the SOC site in the New SOE-thread: http://www.stormoverciv.org/forums/showpost.php?p=15587&postcount=1 Unfortunately the screenshots attached to that post are gone due to a server change of that site.

To explain all details about microzones in this important thread would be a little bit "off topic" in my eyes, as this is something different as the phantom resources bug.
 
I think your idea of limiting unit production to a certain region, doesn´t work that way on a pc, as bonus resources can´t be set as perequisites for a unit (may be on a Mac this is different??).
Yes, you cannot have bonus resources as prerequesite for units.

I tried to add it in my editor, as the file format should allow it, but it was ignored by the regular editor, and ignored in game.
 
I think your idea of limiting unit production to a certain region, doesn´t work that way on a pc, as bonus resources can´t be set as perequisites for a unit (may be on a Mac this is different??)
Since the masters have already answered the main question, I'll just address this. There only 2 important differences between the two versions. The Mac version has no editor. There are some differences in directory structure affecting where game data need to be stored. Gameplay is virtually identical.
 
32 strat./lux. resources is the maximum without running in that bug, if these resources are placed properly. 999 bonus resources as a maximum was reported long ago by casus belli and I citated that in one of my posts. I haven´t tested if this is really the maximum number for bonus resources. may be if the resource graphics file is big enough there can be even more. So let´s say, that there can be many, many bonus resources be used. :)

I think your idea of limiting unit production to a certain region, doesn´t work that way on a pc, as bonus resources can´t be set as perequisites for a unit (may be on a Mac this is different??). The methode I created to solve this problem is as a completely isolated tradenet for that region as tom2050 did describe it. I named that a "microzone" and described a way to do that at the SOC site in the New SOE-thread: http://www.stormoverciv.org/forums/showpost.php?p=15587&postcount=1 Unfortunately the screenshots attached to that post are gone due to a server change of that site.

To explain all details about microzones in this important thread would be a little bit "off topic" in my eyes, as this is something different as the phantom resources bug.

Thanks Civinator and Steph for your information on the bonus resources not being able to be used as prerequisites for unit construction. So, for what I want to do, I am going to have to fall back on Plan B, and use Strategic/Luxury resource slots for my idea to restrict production of certain units to certain areas.

Civinator, I looked at your post on "microzones" and you certainly did come up with a good way of attacking the problem. I was looking more at the Pacific War scenario, and ways of limiting the production of some types of military equipment, such as tanks and ships to certain areas, rather than every city in your empire. In the Pacific, it looks like it would be easier to utilize the "microzone" idea, as by eliminating Air and Sea trade, you would essentially restrict production of most units to Japan per se, Australia, the US and China, eliminate the Netherlands pretty much immediately, and I would have to see how much that would hurt British India. Since I would like to keep the Netherlands as a player in my mod, I would rather use the concept of a needed resource within the city radius as my means of control.

I will do some work on a sample map and post my ideas for further comment.
 
Civinator, I looked at your post on "microzones" and you certainly did come up with a good way of attacking the problem. I was looking more at the Pacific War scenario, and ways of limiting the production of some types of military equipment, such as tanks and ships to certain areas, rather than every city in your empire. In the Pacific, it looks like it would be easier to utilize the "microzone" idea, as by eliminating Air and Sea trade, you would essentially restrict production of most units to Japan per se, Australia, the US and China, eliminate the Netherlands pretty much immediately, and I would have to see how much that would hurt British India. Since I would like to keep the Netherlands as a player in my mod, I would rather use the concept of a needed resource within the city radius as my means of control.

Its slightly easier to seperate available units to be built in something such as a Pacific War scenario. When dealing with a civ that owns various landmasses, you can do something as such:
British Commonwealth...
Australia - units that can only be built in Australia/New Zealand would require the 'Australia' strategic resource
India - units in the British Commonwealth in India require the 'India' strategic resource
etc... doing this though would require no air/sea trade routes.

Tom
 
Its slightly easier to seperate available units to be built in something such as a Pacific War scenario. When dealing with a civ that owns various landmasses, you can do something as such:
British Commonwealth...
Australia - units that can only be built in Australia/New Zealand would require the 'Australia' strategic resource
India - units in the British Commonwealth in India require the 'India' strategic resource
etc... doing this though would require no air/sea trade routes.

Tom

Yes, Tom, I had already been considering that, just not sure if I want to take out the trade routes, as then Singapore is basically isolated from everything, along with the Philippines and all of Indonesia. The Japanese holdings in Indo-China are also cut of without trade routes. I could maybe go with air routes, and have additional airports only being able to be built after Advanced Flight is researched. I will need to spend some time in the editor looking things over.
 
If you want to use the resource in the city radius, then you need to use building autoproducing units.

If you use the requirement for units themselves, then you can create it in any city with access to the resource
 
If you want to use the resource in the city radius, then you need to use building autoproducing units.

If you use the requirement for units themselves, then you can create it in any city with access to the resource

I have been giving thought to the auto-producing buildings, Steph. I was just looking for the simplest way of doing it, and it is beginning to look like there is no simple way. So, I will need to find a way that works for what I would like to do, which might be a combination of things.

Am I correct that in a war, no trade routes exist between enemy civilizations? Because of the sea communications in the Pacific, I do not want to take out the trade routes if I can possibly avoid it.
 
The problem is different with other civ.

If we exclude other civs to start with, you have access to a resource if it is connected to your city via a road, or via a city with an improvment allowing water trade, or via a city with an improvment allowing air trade.

Suppose you want to force the British player to build Indian units in India only.
So you put a "Indian" resource in India. When it is connected to a city by road (or better, put the resource in the same tile as the city!), then you can build Indian units in Indian city. However, if you move east in Burma or Indochina, or if the Japanese capture a Chinese city and you "liberate" it, you could be able to build Indian units in the Chinese city: you just need to build a road to India.
To prevent this, you would need to disable the possibility to build road, and use only preplaced roads, except they could be destroyed or pillaged.

If you want to disable the building of Indian units in Australia it's easier: if no improvment has the "allow water trade" or "allow air trade", the resource will not be available in Australian cities, and so you'll be able to build only Australian units with the ANZAC resource.

But then, it means you could not trade oil, iron, etc...

When another civ is involved, it's not a real problem. You can just use a requirement for "India", or "Anzac" that only the British player has in his tech tree (using non era tech). And when at war, the current trade deals are cancelled.
 
The problem is different with other civ.

If we exclude other civs to start with, you have access to a resource if it is connected to your city via a road, or via a city with an improvment allowing water trade, or via a city with an improvment allowing air trade.

Suppose you want to force the British player to build Indian units in India only.
So you put a "Indian" resource in India. When it is connected to a city by road (or better, put the resource in the same tile as the city!), then you can build Indian units in Indian city. However, if you move east in Burma or Indochina, or if the Japanese capture a Chinese city and you "liberate" it, you could be able to build Indian units in the Chinese city: you just need to build a road to India.
To prevent this, you would need to disable the possibility to build road, and use only preplaced roads, except they could be destroyed or pillaged.

If you want to disable the building of Indian units in Australia it's easier: if no improvment has the "allow water trade" or "allow air trade", the resource will not be available in Australian cities, and so you'll be able to build only Australian units with the ANZAC resource.

But then, it means you could not trade oil, iron, etc...

When another civ is involved, it's not a real problem. You can just use a requirement for "India", or "Anzac" that only the British player has in his tech tree (using non era tech). And when at war, the current trade deals are cancelled.

Thank you for all of your comments, Steph and Civinator. I plan on spending some time working on my ideas for the Pacific War scenario and then I will post the results here, so as to give modders a range of ideas to work from. I like the idea of putting the needed resource under the city tile. I had not thought of that. Thank you again.
 
I like the idea of putting the needed resource under the city tile. I had not thought of that. Thank you again.
There is just a small problme if you do that. The graphics will show under the city, and it can look weird. You could make the graphics transparent, but then you would not see them in the city screen.
In the Napoleonic scenario I'm working on, I solved that by using a small flag graphics, 16x16 instead of 32x32, so the city graphics usually completly hide it, but it's still visible in the city screen
 
Back
Top Bottom