Contractor - Remote Mining !

Redox

Warlord
Joined
Jun 15, 2011
Messages
134
Overview:

Mine resources in the neutral territory - as expensive and dangerous as it might be! Gods and Kings, Vanilla compatible.

Adds two new units: Contractor and Factory Ship. They allow you to build mines, plantations, oil platforms, fishing boats outside your borders, to connect luxury and strategic resources to your empire's network.

The main purpose is to avoid building a little miserable city just to get access to much-needed Aluminum or some other resource when the only nearby deposit of it is in the Antarctic.

Spoiler :
Civ5Screen0001_resize0.jpg


But the situation could be more interesting: the resource which you really want could be close to other nation's borders, in which case you want to prevent that nation from expanding borders. This makes a particular patch of land of strategic importance, and gives you new reasons for going to war.

Spoiler :
Civ5Screen0000_resize0.jpg


Finally, you can gather luxury resources and then sell them to other civs for profit!


How it works:

A Contractor is a worker who can build a mine, plantation or an oil well outside your borders. Once built, an installation needs to be constantly operated by contractor. Click "operate" in contractor's builds menu and he will start operating the mine or oilwell. Starting from next turn, the resource will become connected to your empire's network. Contractor requires Currency tech. Also, it has 3 moves considering that it might need to cover significant distance through the wilderness.

A Factory Ship is a workboat which can build an offshore platform or fishing boats outside your borders. This doesn't consume the Factory Ship. After it is built, the Factory Ship needs to operate the installation in the same way as with the Contractor. Factory Ship requires Navigation tech.

A Contractor and a Factory Ship can repair improvements in case they are pillaged.

If any nation's borders expand to include the remote installation, it is converted into an ordinary mine/oilwell/offshore platform in possession of that nation. Your contractor loses the ability to operate it.

Costs involved: building a remote installation costs a single payment of 80 :c5gold:, a Contractor has an extra upkeep of 10 :c5gold: per turn, and factory ship - 6 :c5gold: per turn.


Why these units are expensive:
Spoiler :
Initial idea behind this mod was to allow connecting vital strategic resources which are close to your borders, but in a very unattractive terrain, so you (or any other player) wouldn't want to build a city there. Building a city costs you happiness/culture, so I decided to allow to instead pay gold for getting that resource. Because of high cost, you wouldn't be able to easily build mines all over the map. Over 30 turns a contractor will cost 80 :c5gold: for building a mine plus a significant upkeep (about 300 - 450 :c5gold:, but could be higher for a big empire).

If you use a Contractor / Factory Ship to operate on luxury resources, you get 8 :c5gold: back each turn. This makes a strategy of colonizing remote luxury resources with a purpose of selling them to other civs viable.


If you want to change costs:
Spoiler :

Open the folder with mod's source files: \MyDocuments\My Games\Sid Meier's Civilization 5\MODS\RemoteMining (v XX)

Contractor/Factory Ship upkeep can be changed in RemoteMining\XML\Units.xml:
line 24: <ExtraMaintenanceCost>10</ExtraMaintenanceCost> for Contractor - these numbers roughly correspond to the increase in gold-per-turn unit maintenance that you will incur
line 48: <ExtraMaintenanceCost>6</ExtraMaintenanceCost> for Factory Ship

One-off installation building cost in RemoteMining\XML\Builds.xml:
line 10: <Cost>80</Cost> for Remote Mine
... and so on ...



Compatibility:

- Compatible with G&K, Vanilla.
- Modifies save files.
- Properly handles saving/loading, uses SaveUtils by Whys.

Version History:
Spoiler :

Version 2.3:
- Made compatible with G&K, latest patches
- Reduced maintenance cost of contractors and drillships

Version 2.1:
- Contractors can build a remote Plantation.
- 8 :c5gold: refunds for contractors/factory ships operating Luxury resources. Gathering luxury resources is still not free, but now they can be sold to other civs with profit.
- One-off cost of building a remote installation is reduced to 80 :c5gold:
- Factory Ship requires Navigation instead of Refrigeration.

Version 2.2:
- Fixed the improvement icons in the Contractor build menu and Tech Tree.



Credits:
Special thanks to whoward69 for his code and know-how.


Where to Get:

- attached to this post
- on Steam Workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=84039760
 

Attachments

This represents another area where corporations could have been great.

Just a thought: Maybe you should let AI build it, but maybe give a handicap to players until they reach a certain difficulty.

Also, maybe make it an see to others as an independent unit which needs defending. Have the unit create the plant or extractor and then you are responsible for defending it and maintenance cost.

Just a thought, I don't think it maybe doable though.
 
Thanks for the replies :)

I forgot to mention here that AI is discouraged from building them. I have set FLAVOR_TILE_IMPROVEMENT value for them of -50, so that should work. I'll make an auto game in LiveTuner to further verify.

And yeah, I have never tried giving unit to AI, because I was very pessimistic about the outcome.

helpless_writer said:
Also, maybe make it an see to others as an independent unit which needs defending. Have the unit create the plant or extractor and then you are responsible for defending it and maintenance cost.

Currently the unit is recognized by AI as a high-priority civilian target, like GG, artist etc. Also, once the mine is built, the unit needs to remain on top of it to operate. So yes, you'll have to defend it all the time. Same with the factory ship. I have put maintenance cost on the unit and not on the mine, so you can disband the unit if you no longer need the resource and save the money this way.

helpless_writer said:
Maybe you should let AI build it, but maybe give a handicap to players until they reach a certain difficulty.

Sorry, could you explain a little more?
 
Thanks for the replies :)

I forgot to mention here that AI is discouraged from building them. I have set FLAVOR_TILE_IMPROVEMENT value for them of -50, so that should work. I'll make an auto game in LiveTuner to further verify.

And yeah, I have never tried giving unit to AI, because I was very pessimistic about the outcome.



Currently the unit is recognized by AI as a high-priority civilian target, like GG, artist etc. Also, once the mine is built, the unit needs to remain on top of it to operate. So yes, you'll have to defend it all the time. Same with the factory ship. I have put maintenance cost on the unit and not on the mine, so you can disband the unit if you no longer need the resource and save the money this way.



Sorry, could you explain a little more?

In some games there is a handicap which is something that supports the player, or gives them a favorable position, while the AI plays to a normal standard.
 
In some games there is a handicap which is something that supports the player, or gives them a favorable position, while the AI plays to a normal standard.

Currently this unit is really only available to the Human player, so it's up to you to build it or not to build. You have a choice, which means that you have advantage over AI. I tried to minimize this advantage by making unit cost a lot of gold. This way I tried to avoid the need to buff AI or handicap the human player (because that's difficulty-dependent, and becomes much more non-trivial)
 
I dont suppose the same type of coding could be used to create a "colonizer" a Renaissance unit that could claim luxury resources on other continents? (I'm thinking Terra here)
 
I dont suppose the same type of coding could be used to create a "colonizer" a Renaissance unit that could claim luxury resources on other continents? (I'm thinking Terra here)

Contractor is available after currency tech, which is at the beginning of Medieval period. I guess, "colonizer" would be the same unit, just with a name that better corresponds to the epoch? I called unit contractor, because as soon as you have currency, you should have contracts and be able to pay people for work :)
 
But does it work for other luxury resources other than mined?

I've started a game with your mod btw, good stuff!
 
But does it work for other luxury resources other than mined?

I've started a game with your mod btw, good stuff!

You can build fishing boats, so you get pearls and whales (but you need Refrigeration for Factory Ship).

Contractor cannot build Plantation, only mines. I think I will enable it, the reason why I didn't in the first place is because gathering luxury resources wasn't the original intention of the mod.

Let me know what do you think about upkeep cost of contractor when you have a feel for it.
 
Version 1.2: Bug Fix

I have updated the link in OP and upload on Mod Hub to version 1.2

There was a bug in version 1.1: SaveUtils weren't hooked up properly, so unless you used some other mod which uses SaveUtils, the whole Lua part of Contractors mod wouldn't function, making Contractor units just a deadweight.

Sorry if this affected you.

I will be updating contractors to be able to build Plantation, and to make gathering luxury resources cheaper than strategic. So, there should be a non-bug-related update soon ;)
 
Sweet!

You should make the AI priorities Luxuries, and start wars of colonies!
 
Sweet!

You should make the AI priorities Luxuries, and start wars of colonies!

That would be awesome actually. If you an AI competed for resources in unclaimed territories all over the map. Then you could also hire barbarians to destroy AI's remote mines, so you can take them over :)

I tried setting all the correct AI and Flavor settings for contractors, and gave them to AI. Poor PC was running them around trying to build farms and pastures. In his own territory. They never travelled outside AI's borders *sigh*. More reasons to hope for DLL release I guess.
 
Version 2.1 out

Changes:
- Contractors can now build a remote Plantation.
- 8 :c5gold: refunds for contractors/factory ships operating Luxury resources. Gathering luxury resources is still not free, but now they can be sold to other civs with profit.
- One-off cost of building a remote installation is reduced to 80 :c5gold:
- Factory Ship requires Navigation instead of Refrigeration.
 
i like it BUT... one thing of annoyance... lets say digging for Iron for example... when after the remote mining and the beginning of the 2nd choice... it takes 5,332 turns to complete kinda TOO long.

Joey
 
i like it BUT... one thing of annoyance... lets say digging for Iron for example... when after the remote mining and the beginning of the 2nd choice... it takes 5,332 turns to complete kinda TOO long.

Joey

haha it's too long indeed. The point is that once you start to Operate (2nd choice), from next turn you get the resource. Just keep the contractor operating on top of resource for 5332 turns and you'll have access to resource for that long :). If you move the contractor away, you lose access to resource, but can return and operate again when you need.

I did it on purpose that you need to keep contractor on top of resource: otherwise this remote mining would be totally imba I think.
 
That would be awesome actually. If you an AI competed for resources in unclaimed territories all over the map. Then you could also hire barbarians to destroy AI's remote mines, so you can take them over :)

I tried setting all the correct AI and Flavor settings for contractors, and gave them to AI. Poor PC was running them around trying to build farms and pastures. In his own territory. They never travelled outside AI's borders *sigh*. More reasons to hope for DLL release I guess.

Exactly! But how would you hire barbarians? Another mod?

Too bad about the AI, the devs really need to create a better expanding AI for off continent exploration and colonization. It seems like a slap in the face that they include terra as a map but don't let the AI make use of it.

One way to increase the value of off continent luxury grab would be to include luxuries on other continents that cannot be found on the "old world". Is this possible with your mod or would you have to change the map scripts and create a map mod?

Its raining like a mofo today so I was able to cancel plans with friends, will try out the new version today!
 
Exactly! But how would you hire barbarians? Another mod?

Too bad about the AI, the devs really need to create a better expanding AI for off continent exploration and colonization. It seems like a slap in the face that they include terra as a map but don't let the AI make use of it.

One way to increase the value of off continent luxury grab would be to include luxuries on other continents that cannot be found on the "old world". Is this possible with your mod or would you have to change the map scripts and create a map mod?

Its raining like a mofo today so I was able to cancel plans with friends, will try out the new version today!

I think a mod which spawns several barbarians in exchange for a little gold wouldn't be too difficult. Actually, this might be not a bad mod idea. After all, we always have neighbors whom we don't like :D

Yeah, on Terra the map script does a good job at making sure the resources are localized on your starting continent, so you have to trade or conquer. But other islands and continents don't have that much on them. Also, I feel that you get a bit too many in the old world, like if you have 5 silver, you can trade for pretty much everything else you need.

There is a .lua map script which generates Terra, and it seems to have a specific function which places all of the luxuries on the map. I've never touched map scripts before, but I'll take a quick look and see if something can be done about it!
 
Ok, I looked at the resource placing script. It's in the AssignStartingPlots.lua, a 10k lines long file, and consists of a dozen functions which determine resource placement in different ways. Unfortunately, getting anything done here will require a significant amount of time. Now I understand why there aren't any mods adding new resources.
 
Back
Top Bottom