View Full Version : Resource Refinement
Afforess Jul 24, 2009, 09:01 PM Resource Refinement
Sarkyn's Horse stud (http://forums.civfanatics.com/showthread.php?t=328967) module inspired yet another idea. Cities should be able to refine the resources in the vicinity of their usable area (the cross-like section) to produce more. Especially since many resources that are valuable in Rise of Mankind are also rare. That way, if you have access to the only stone on the map, you can increase your stone production so you can trade it for other rare resources without losing access to it. This idea was made possible by the SDK changes in Shqype's Vicinity Mod (http://forums.civfanatics.com/showthread.php?t=270539).
Also note that this addon is only partially modular. It will overwrite the existing CvGameCore.dll.
For Modders:
The SDK changes add the following lines the Civ4BuildingsInfo.xml file
<VicinityBonus>BONUS_XYZ</VicinityBonus>
This declares that Bonus XYZ is needed to construct the building
<PrereqVicinityBonuses>
<VicinityBonus>BONUS_XYZ</VicinityBonus>
<VicinityBonus>BONUS_YZX</VicinityBonus>
<VicinityBonus>BONUS_ZYX</VicinityBonus>
</PrereqVicinityBonuses>
This declares that Either Bonus XYZ, YZX OR ZYX is needed.
The SDK changes also add the following lines of code to the UnitInfos.xml file. I didn't use any of them, but will include an updated schema for them, in case others have ideas.
<VicinityBonus>BONUS_XYZ</VicinityBonus>
This declares that Bonus XYZ is needed to construct the building
<PrereqVicinityBonuses>
<VicinityBonus>BONUS_XYZ</VicinityBonus>
<VicinityBonus>BONUS_YZX</VicinityBonus>
<VicinityBonus>BONUS_ZYX</VicinityBonus>
</PrereqVicinityBonuses>
This declares that Either Bonus XYZ, YZX OR ZYX is needed.
They basically are the same code, but for units instead of buildings. That way, swordsman, theoritically could only be built in a city next to Iron. I don't use the modified UnitInfos code in this addon, but feel free to in yours. Just make sure to include the updated CvGameCore.dll I provide
These building are just like regular buildings, except that they can only be built if the required resource is in the city's vicinity.
New Buildings:
Bauxite Strip mine
Requires Bauxite in Vicinity
Produces 2 Bauxite Resource
+2 unhealthiness
+20% Maintenance
Coal Refinery
Requires Coal in Vicinity
Produces 2 Coal Resource
+2 unhealthiness
+20% Maintenance
Copper Pit Mine
Requires Copper in Vicinity
Produces 2 Copper Resource
+2 unhealthiness
+20% Maintenance
Iron Foundry
Requires Iron in Vicinity
Produces 2 Iron Resource
+2 unhealthiness
+20% Maintenance
Oil Refinery
Requires Oil in Vicinity
Produces 2 Oil Resource
+2 unhealthiness
+20% Maintenance
Stone Pit
Requires Stone in Vicinity
Produces 2 Stone Resource
+2 unhealthiness
+20% Maintenance
Uranium Purifier
Requires Uranium in Vicinity
Produces 2 Uranium Resource
+2 unhealthiness
+20% Maintenance
Marble Quarry
Requires Marble in Vicinity
Produces 2 Marble Resource
+2 unhealthiness
+20% Maintenance
Symeralds Factory
Requires Gems in Vicinity
Produces 1 Gems Resource
+1 unhealthiness
+30% Maintenance
Gold Purifier
Requires Gold in Vicinity
Produces 1 Gold Resource
+30% Maintenance
+2 Unhealthiness
Silver Processing Plant
Requires Silver in Vicinity
Produces 1 Silver Resource
+30% Maintenance
+2 Unhealthiness
Suger Cane Plantation
Requires Sugar in Vicinity
Produces 2 Sugar Resource
+30% Maintenance
+1 Unhappiness
Sulphur Distillery
Requires Sulphur in Vicinity
Produces 2 Sulpher Resource
+15% Maintenance
+3 Unhealthiness
Any other rare resources that should be included? Any other comments or suggestions?
Download Here (http://forums.civfanatics.com/downloads.php?do=file&id=12838)
Nightguard Jul 25, 2009, 01:35 AM I guess I'm a bit nervous about allowing you to take one resource in a city's work radius and turn it into three or four. Maybe bring it back down to just adding a second instance of a given resource? I'm just seeing how this could potentially interact with things like corporations, and it can get pretty powerful very quickly.
Additionally, were you considering implementing these as one instance only national wonders, like the ironworks, or were these going to be normal buildings?
Afforess Jul 25, 2009, 01:56 AM I guess I'm a bit nervous about allowing you to take one resource in a city's work radius and turn it into three or four. Maybe bring it back down to just adding a second instance of a given resource? I'm just seeing how this could potentially interact with things like corporations, and it can get pretty powerful very quickly.
I understand. I am only making buildings available for rarer resources. Common resources like corn or fish will not receive buildings, as I realize you could use these with corporations to your advantage. However, these buildings do come with some disadvantages, the health penalty, the increased costs , and the buildings will have a 100% conquer rate. Anyways, the more resources a corporation consumes, the more it costs, so I feel that it won't too detriment the game. The whole point of these was to make it so players could trade for/with the rare resources with other players/AI. If you haven't changed your bonus spawns basic resources like Stone will appear only once per continent or worse, on a small map, once per map.
Additionally, were you considering implementing these as one instance only national wonders, like the ironworks, or were these going to be normal buildings?
No, I did not want to use up more national wonder slots. They are regular buildings. However, their probably be only one (maybe two) cities that can build each one of these, so they will be as rare as national wonders.
Sarkyn Jul 25, 2009, 06:02 AM To my thinking, this is an excellent idea.
There will be a balance to be found, of course. Maybe 2 resources, maybe 3. Maybe costs in other ways, as discussed (negative health is one, increased maintenance is another, unhappiness is another, pollution).
I like the core idea very much though, I'd use this.
Nightguard Jul 25, 2009, 11:08 AM Okay, I can understand these types of buildings being non-wonder, as you're already putting in a reasonable limiting factor of needing the resource present in the city already. The last concern, then is what happens if the improvement that provides the resource is destroyed? Does the building still provide the resource as normal? This would make razing improvements to cut off resource access during a war much less effective, as to truly cut off the resource from your opponent, you'd need to both remove the improvement, then cut off all routes to the city with the building in.
Dancing Hoskuld Jul 25, 2009, 03:17 PM @Afforess, (spelling correct this time) I have been trying to get someone with SDK capabilities interested in adding this mod to RoM for awhile. Along with the resource affecting tech research mod which I see you are experimenting with.:goodjob:
@Nightguard, I can see a way of doing this in Python for any building that requires resources but it would further slow the game down and I wont be able to get to it until latter this year as I have made a breakthrough on bringing back the piracy stuff from Civ III and R&R which RoM is based on.
Afforess Jul 25, 2009, 03:42 PM @Afforess, (spelling correct this time) I have been trying to get someone with SDK capabilities interested in adding this mod to RoM for awhile.
Completely self-taught SDK skills thus far. I only can thank Kael's DLL guides and others work. I haven't actually created anything, just expanded existing ideas.
Along with the resource affecting tech research mod which I see you are experimenting with.
I have great plans for that. A complete rewrite of the tech tree. I plan on making tech paths that encourage and discourage certain research paths. For example, researching several religious techs, all religious techs will be cheaper, but scientific techs will cost more. And Vice Versa. Also, similar ideas for defensive and offensive techs.
Dancing Hoskuld Jul 25, 2009, 03:51 PM What I like about the effect of resources on tech research is that a civ with horses but no metals would naturally tend to study the horse related tech because they would be so cheap. Thus each civ could be really different :)
Afforess Aug 05, 2009, 02:16 PM Finished. Available with Afforess's Addon pack.
Avka Aug 06, 2009, 10:46 AM Trying it out , so far so good , seems like trade will liven up. Could you also include salt\coffee\incense\obsidian and maybe one of livestock (cow\sheep\pig) , maybe some water resource like crab\clam\shrimp\pearls ? Or just salt and incense :) , theres never enough of those. Well actually i would prefer to have one for each resource but the amount of building in the city bar..... probably too much clutter. Would be great if single building could double any resource in city vicinity but it doest seem like it would be possible with this code. Thx for the mod anyway ))
--------------
Small bug? (or could be me not handling it properly) on the city icons when they are grayed out under maintenance 20% text there is additional line - TXT_KEY_REQUIRES_VICINITY_BONUS , but when building icon is lit up it doesn't show up.
Afforess Aug 06, 2009, 10:53 AM --------------
Small bug? (or could be me not handling it properly) on the city icons when they are grayed out under maintenance 20% text there is additional line - TXT_KEY_REQUIRES_VICINITY_BONUS , but when building icon is lit up it doesn't show up.
Good catch, It shouldn't affect gameplay; it's just that I forgot to include a text file. Silly me. I'll reupload in a second.
Afforess Aug 06, 2009, 12:40 PM Could you also include salt\coffee\incense\obsidian and maybe one of livestock (cow\sheep\pig), maybe some water resource like crab\clam\shrimp\pearls ? Or just salt and incense :) , theres never enough of those.
I may add ones fro Salt and Incense. I originally planned to add an aquaculture plant, but limitations with the coding prevented it from working correctly. Also, I don't really want to add resource buildings for common resources.
Civ Fuehrer Aug 07, 2009, 07:57 PM I think this is a rather wonderful idea, however my only objection is the oil building. Since there is already a building that turns oil into petroleum that is needed to make units, this building would be rather redundant. On top of that, there's also the corporation that also turns rice, corn, etc. into petroleum. Plus the oil shortage that the US and China are bringing upon the earth, I think that it would rather make more sense if oil had a slightly higher chance of being used up.
Afforess Aug 07, 2009, 08:07 PM I think this is a rather wonderful idea, however my only objection is the oil building. Since there is already a building that turns oil into petroleum that is needed to make units, this building would be rather redundant. On top of that, there's also the corporation that also turns rice, corn, etc. into petroleum. Plus the oil shortage that the US and China are bringing upon the earth, I think that it would rather make more sense if oil had a slightly higher chance of being used up.
After checking, I have to agree with you. In fact, I think there is already a building with the same name too. I'll remove it in the next version.
betto212 Aug 09, 2009, 09:37 AM a building for add 1 salt and would be nice ... in some maps salt and incense are too rare
... but large amount of salt is a basic need for conserve meat.
about incense ,almost all religions and cults use aromatics . add a building that import some incense or add a new resource ( aromatic wood) that would work like incense.
Dancing Hoskuld Aug 09, 2009, 06:52 PM about incense ,almost all religions and cults use aromatics . add a building that import some incense or add a new resource ( aromatic wood) that would work like incense.
Currently (2.71) the AI does not see any point in working incense. My Tea mod tried to fix that problem by making incense a optional requirement for bazars like pearls are, but it did not work completely. The AI now builds roads to incense but still does not work it. :( So a building which produced a resource like incense would probably not get built by the AI!
vincentz Aug 10, 2009, 04:10 AM Currently (2.71) the AI does not see any point in working incense. My Tea mod tried to fix that problem by making incense a optional requirement for bazars like pearls are, but it did not work completely. The AI now builds roads to incense but still does not work it. :( So a building which produced a resource like incense would probably not get built by the AI!
I think the AI doesnt work incense because it is on dessert and therefore doesnt have either production or food. Try, for testing, giving it 1 production and 1 happiness
Dancing Hoskuld Aug 10, 2009, 04:34 AM I think the AI doesnt work incense because it is on dessert and therefore doesnt have either production or food. Try, for testing, giving it 1 production and 1 happiness
In any other mod the AI does work it because it gives a +1 happiness whereas in RoM you only get benefit for the resource from buildings and the AI doesn't always "think" two steps ahead. RoM really needs a better AI ;)
betto212 Aug 10, 2009, 09:49 AM so the easier way is give back +1 happy bonus to incense
and for geografic balance add aromatic wood (+1 happy)to appear in any forest terrais .
Dancing Hoskuld Aug 10, 2009, 03:07 PM so the easier way is give back +1 happy bonus to incense
and for geografic balance add aromatic wood (+1 happy)to appear in any forest terrais .
But then you get back to the to much health/happiness problem. So you have to remove incense bonuses from all the religion buildings. However the AI will pay you more for them :)
JosEPh_II Aug 19, 2009, 05:02 PM I think we've pushed zappara too far into the negative happiness and heath side. It's doubly hard to keep cities happy and healthy now in RoM 2.71. I really would like to see a few more + or a few less - in these two areas.
If it needs to come from a ModMod that's fine with me.
JosEPh
Afforess Aug 19, 2009, 06:21 PM You've seen my modmod called the Beautification Project, right? It adds healthiness. Plus, I rather like the unhappiness problems, It forces me for the first time ever to use the culture slider above 0%. Now, in the industrial era it is 15%
JosEPh_II Aug 20, 2009, 05:34 PM I use the Culture slider as soon as it becomes available with the research of Drama. But before that for all the Ancient Eraand a good bit of the Classical the continued red and green faces above every city becomes quite troublesome. Greatly reduces research and productivity for player and AI alike. At least it does in my games.
And no I've not looked into your BP mod ...yet. Adding the MLF entries has stopped me from using quite a few of the ModMods. And will probably keep me from doing so.
JosEPh :)
Supercheese Aug 20, 2009, 08:40 PM ...Adding the MLF entries has stopped me from using quite a few of the ModMods. And will probably keep me from doing so.
JosEPh :)
You know Afforess has created A Universal MLF Controls File (http://forums.civfanatics.com/showthread.php?t=330806), right? You might wanna check it out!
Afforess Aug 20, 2009, 08:57 PM You know Afforess has created A Universal MLF Controls File (http://forums.civfanatics.com/showthread.php?t=330806), right? You might wanna check it out!
My modmod installer installs the Universal MLF too, so I am not sure what your problem is...
Supercheese Aug 21, 2009, 01:17 PM My modmod installer installs the Universal MLF too, so I am not sure what your problem is...
Ah, yes. Well, then I truly don't know how he could be having problems.
JosEPh_II Aug 21, 2009, 05:33 PM My modmod installer installs the Universal MLF too, so I am not sure what your problem is...
Fear of not wanting to break what already works, I suppose.
If it's not a simple install process I shy away.
If what you have done is simple to implement I may give it a go. But.....I do know that you and I don't agree on some of the ModMods directions that they take RoM. As I've stated before I'm Not a REV fan. The DCM part is ok. As is the SaM amd CivBarb options as long as they are bug free. And I don't play with Vassals either.
So you see I'm a bit picky over my way of playing RoM. That's what happens when you get "Old and Slow.......Watch out!" :D
JosEPh ;)
Afforess Aug 21, 2009, 06:52 PM If it's not a simple install process I shy away.
Please, check out my installer. It's very easy, defaults to the right place unless you installed Civ4 in a weird spot, and is very customizable. I won't force you to install anything you don't want to install.
So you see I'm a bit picky over my way of playing RoM. That's what happens when you get "Old and Slow.......Watch out!" :D
So what, I'm picky too. I don't play with all the modmods that are out there, just play with what is fun for you. After all, that's the whole reason we make modmods. Not for fame or glory, just pleasure.
JosEPh_II Aug 23, 2009, 07:57 AM I've D/L'd the ModMod but havn't installed yet as I want to finish my current Vincent Mod game.
JosEPh
Civ Fuehrer Dec 05, 2009, 06:05 PM Playing RoM i noticed an area of buildings that this mod left out; aquatic resources, a fish farm, clam farm, etc.
Afforess Dec 05, 2009, 06:11 PM Playing RoM i noticed an area of buildings that this mod left out; aquatic resources, a fish farm, clam farm, etc.
I originally intended to do this, but complications arose. Now, people are complaining about this modmod, so I have no real incentive to go back and patch any holes. :(
Dancing Hoskuld Dec 06, 2009, 12:06 AM I originally intended to do this, but complications arose. Now, people are complaining about this modmod, so I have no real incentive to go back and patch any holes. :(
What I think he means is that I am working on some stuff on this which better fits with RoM. :) See my thread (http://forums.civfanatics.com/showthread.php?t=344028). I am getting to the stage where I need some graphics.
AncientSion Dec 06, 2009, 02:08 PM Would it be possible to make ressources more useful in multiplies ? i.e. could a city with an iron tile in its radius get a permanent 5 % bonus which would get doubles with a refinery ? Because frankly, once you get a decent amount of cities you dont need a sulphur refinery when you already have 2 sulphur tiles in your empire.
Afforess Dec 06, 2009, 02:15 PM Would it be possible to make ressources more useful in multiplies ? i.e. could a city with an iron tile in its radius get a permanent 5 % bonus which would get doubles with a refinery ? Because frankly, once you get a decent amount of cities you dont need a sulphur refinery when you already have 2 sulphur tiles in your empire.
Yes, I can add that.... (http://forums.civfanatics.com/showthread.php?t=343761)
AncientSion Dec 06, 2009, 04:05 PM Cool. Will you add this feature (bonus on # of ressources in general) to your Dawn modpack ?!
|
|