Freeciv version:
* 3.2 or better
Level needed -
* Ruleset: Basics+
* Scipt LUA: Basics+
------------------------------------------------------------------------
Hello everyone! I bring you a script that I have had for some time.
Previously, control was done by buildings, due to the lack of reqs in the unit section.
After the release of FreeCiv 3.2-beta1 I managed to make the final adjustments and now I would like to share these rules (along with the script AND the tileset) with you so that everyone can change accordingly with your own rules.
This script is a complete change of perspective on resources.
The rule is simple, the resource that is WITHIN (i.e: INSIDE) the radius of your city needs 2 things:
1) Must have appropriate infrastructure (Mine, Irrigation, etc.)
2) Roads (or even rivers) between the resource tile and the tile in the center of your city.
Only then will it be possible to construct units or buildings and also share this resource with other cities that are connected (by roads or rivers) to this one!
And there's more!
- Export resources to those cities that are inaccessible by road;
- Build factories that need other resources to generate NEW resources.
- Choose which buildings can automatically share what resources you want, when two cities have this same building.
- Create units that can reveal hidden resources;
- Hide resources from the player and only reveal them when the tech is hit and/or by a specific unit! (get a little crazy here, i know, but we’ll get there!)
But you may now be asking: what about the AI?
We know that it does not have this connection capability, so as soon as it creates the infrastructure, it will have the connection to the resource.
I think that's fair, don't you think?
However, it still needs to create roads (or take advantage of rivers) between the cities to share the resources, which will happen soon.
And remember, it will eventually create a building that shares all the resources the city has! In my ruleset, Harbour improvement can share the first most important resources of the game.
So I suggest you hurry up with the basics first, Wood from some Forest or Jungle and Rocks from some Mountain.
I leave the rest for you to find out!
Frequently Asked Questions
Question: Where are the resources?
Answer: Wood and Rocks are the only ones I chose that don't need symbols (extras) on the map. Just build a Lumber in any Forest or Jungle to get Wood and a Mine in any Mountain to get Rocks. Resources that are within the radius of your city will be automatically revealed when you have the corresponding technology. Gold and Gems are always revealed as they do not require any technology.
If you want to reveal resources that are outside the city radius, you need to create a specific unit that can reveal them and use the action:
* "Search resource (1 turn without moving)"
Example of this ruleset:
The Explorer can reveal Gold and Gems.
The Alchemist can also reveal Sulfur and Saltpeter, essential to create Niter(Gunpowder).
Question: How do I see if my city is connected to the resource?
Answer: Use the mouse middle-click on the city. The resource will appear with the # symbol.
Example: #Bauxite, #Clay, #Coal, etc.
Question: I have a resource that is outside the city radius! Can I connect it?
Answer: No, you can't! If you can't create another city near the resource, forget it!
Question: I have a resource that is WITHIN the city radius, but not accessible by road and it is outside my border! Can I connect it?
Answer: If it is WITHIN the city radius, so Yes, there are three ways to connect:
1) Roads or rivers;
2) No roads at all, only infrastructure, such as Oil Platforms in Deep Oceans;
3) Or use the "Connect/Disconnect resource outside the border" action. Any unit with "Settlers" flag in the city center will do.
Question: How to use the "Connect/Disconnect resource outside the border" action?
Answer: Do the following:
1) Build the infrastructure on the resource outside the border.
2) Take any unit with the "Settlers" flag to the CITY CENTER. (i.e. Workers)
3) Press "D" (Do action...) and click on the resource outside the border.
4) Use the "Connect/Disconnect resource outside the border" action.
Question: How to connect to other cities?
Answer: There are three ways to connect cities:
1) Roads and/or rivers connecting the center of the two cities. Take advantage of the rivers at the beginning of the game to connect your resources and cities;
2) Export/Import. If the city is connected to that resource, directly or indirectly, and is not yet exporting or importing that resource, it can export to another city;
3) Build Harbours (early game) or Airports (late game) in both cities to share all the resources that this building allows.
You can set up your own buildings and resources to share.
Question: How to export a resource?
Answer: The city must follow two rules!
1) Be connected directly (resource within the radius of the city itself) or indirectly (coming from another city);
2) Not be Exporting or Importing that resource yet.
If the city is allow to build the unit, take it to the city that wants the resource and then use the action:
* "Export Resource to this city"
In these rules of mine, not all resources can be exported, only those necessary to construct units or buildings. Choose your own resources to export.
Question: I already have the resource connected and shared. However, there are more of the same resource without connecting in some cities. Do I need to connect them too?
Answer: No, you don't. Just 1(ONE) resource of this type is enough to share with all your cities. However, each connection brings effects and bonuses and still guarantees another source of this resource if the first one breaks. So I recommend making all of them with ALL the resources. The AI will do it.
Question: How to manufacture new resources?
Answer: Factories must be directly or indirectly connected to the resources they consume.
As soon as they are built, they start generating the new resource.
Example: The Charcoal Kiln factory can generate Coal through Wood.
To make Iron, the Forge(Iron) factory needs Coal and Iron Ore.
Question: How to break a connection?
Answer: Any unit with the "Pillage" action can destroy the infrastructure or the road.
Question: How to break an Export connection?
Answer: Any unit with the "Pillage" action can destroy the extra Resource (Exportation) located in the center of the city as well as the extra Resource (Importation) located in the city that is importing.
IMPORTANT: The other city (Importation) must be destroyed as well. But if you don't destroy it, another city that is exporting that same resource will be connected by it again.
Even better don´t you think?, but unfair! I couldn't avoid this trick due to the lack of commands in LUA to check which city exports and who receives them.
In other words, it is possible for a city to export the same resource to more cities. Unfair! Don't use it!
In short, to cancel an export, destroy the two Extras with 'Pillage' (Exportation and Importation).
Question: Can I share resources with a player on my team or an ally?
Answer: Not yet! But in the near future (maybe in v3.3) it will be possible with the command "player:diplstate()".
Come back here later and maybe there will be news.
------------------------------------------------------------------------
Attached I provide a rule based on civ2civ3 that I always play single and multiplayer with a friend.
It contains the necessary changes to run the script and also some other small changes such as:
- New units and actions (Convert, Heal, etc.)
- City radius to 10 (3 tiles radius)
- Changed Storm Unit to Storm Extra
- Added volcanoes
- Added Animals
- among other effects
And most importantly, the file contains the tileset, which mainly contains a transparent (invisible) image that allows you to hide the resources and then reveal them.
Before playing, change your tileset in:
-- Client Options/Graphics
* Tileset(Square): connections_iso
* Tileset(Iso-Hex): connections_hex
EDIT:
* Issue on terrain.ruleset file from civ2civ3_connections.zip file.
In the 'terrain.ruleset' file is showing 'Sulfur' in the 'Jungle' terrain. (line 711). This resource does not have an infrastructure to be collected in a Jungle. Only in 'Hills', 'Mountains' and 'Volcanoes'. Please remove it (and also the comma) so you can collect it in the places that are already configured! Sorry and thanks!
Have fun guys!
* 3.2 or better
Level needed -
* Ruleset: Basics+
* Scipt LUA: Basics+
------------------------------------------------------------------------
Hello everyone! I bring you a script that I have had for some time.
Previously, control was done by buildings, due to the lack of reqs in the unit section.
After the release of FreeCiv 3.2-beta1 I managed to make the final adjustments and now I would like to share these rules (along with the script AND the tileset) with you so that everyone can change accordingly with your own rules.
This script is a complete change of perspective on resources.
The rule is simple, the resource that is WITHIN (i.e: INSIDE) the radius of your city needs 2 things:
1) Must have appropriate infrastructure (Mine, Irrigation, etc.)
2) Roads (or even rivers) between the resource tile and the tile in the center of your city.
Only then will it be possible to construct units or buildings and also share this resource with other cities that are connected (by roads or rivers) to this one!
And there's more!
- Export resources to those cities that are inaccessible by road;
- Build factories that need other resources to generate NEW resources.
- Choose which buildings can automatically share what resources you want, when two cities have this same building.
- Create units that can reveal hidden resources;
- Hide resources from the player and only reveal them when the tech is hit and/or by a specific unit! (get a little crazy here, i know, but we’ll get there!)
But you may now be asking: what about the AI?
We know that it does not have this connection capability, so as soon as it creates the infrastructure, it will have the connection to the resource.
I think that's fair, don't you think?
However, it still needs to create roads (or take advantage of rivers) between the cities to share the resources, which will happen soon.
And remember, it will eventually create a building that shares all the resources the city has! In my ruleset, Harbour improvement can share the first most important resources of the game.
So I suggest you hurry up with the basics first, Wood from some Forest or Jungle and Rocks from some Mountain.
I leave the rest for you to find out!
Frequently Asked Questions
Question: Where are the resources?
Answer: Wood and Rocks are the only ones I chose that don't need symbols (extras) on the map. Just build a Lumber in any Forest or Jungle to get Wood and a Mine in any Mountain to get Rocks. Resources that are within the radius of your city will be automatically revealed when you have the corresponding technology. Gold and Gems are always revealed as they do not require any technology.
If you want to reveal resources that are outside the city radius, you need to create a specific unit that can reveal them and use the action:
* "Search resource (1 turn without moving)"
Example of this ruleset:
The Explorer can reveal Gold and Gems.
The Alchemist can also reveal Sulfur and Saltpeter, essential to create Niter(Gunpowder).
Question: How do I see if my city is connected to the resource?
Answer: Use the mouse middle-click on the city. The resource will appear with the # symbol.
Example: #Bauxite, #Clay, #Coal, etc.
Question: I have a resource that is outside the city radius! Can I connect it?
Answer: No, you can't! If you can't create another city near the resource, forget it!
Question: I have a resource that is WITHIN the city radius, but not accessible by road and it is outside my border! Can I connect it?
Answer: If it is WITHIN the city radius, so Yes, there are three ways to connect:
1) Roads or rivers;
2) No roads at all, only infrastructure, such as Oil Platforms in Deep Oceans;
3) Or use the "Connect/Disconnect resource outside the border" action. Any unit with "Settlers" flag in the city center will do.
Question: How to use the "Connect/Disconnect resource outside the border" action?
Answer: Do the following:
1) Build the infrastructure on the resource outside the border.
2) Take any unit with the "Settlers" flag to the CITY CENTER. (i.e. Workers)
3) Press "D" (Do action...) and click on the resource outside the border.
4) Use the "Connect/Disconnect resource outside the border" action.
Question: How to connect to other cities?
Answer: There are three ways to connect cities:
1) Roads and/or rivers connecting the center of the two cities. Take advantage of the rivers at the beginning of the game to connect your resources and cities;
2) Export/Import. If the city is connected to that resource, directly or indirectly, and is not yet exporting or importing that resource, it can export to another city;
3) Build Harbours (early game) or Airports (late game) in both cities to share all the resources that this building allows.
You can set up your own buildings and resources to share.
Question: How to export a resource?
Answer: The city must follow two rules!
1) Be connected directly (resource within the radius of the city itself) or indirectly (coming from another city);
2) Not be Exporting or Importing that resource yet.
If the city is allow to build the unit, take it to the city that wants the resource and then use the action:
* "Export Resource to this city"
In these rules of mine, not all resources can be exported, only those necessary to construct units or buildings. Choose your own resources to export.
Question: I already have the resource connected and shared. However, there are more of the same resource without connecting in some cities. Do I need to connect them too?
Answer: No, you don't. Just 1(ONE) resource of this type is enough to share with all your cities. However, each connection brings effects and bonuses and still guarantees another source of this resource if the first one breaks. So I recommend making all of them with ALL the resources. The AI will do it.
Question: How to manufacture new resources?
Answer: Factories must be directly or indirectly connected to the resources they consume.
As soon as they are built, they start generating the new resource.
Example: The Charcoal Kiln factory can generate Coal through Wood.
To make Iron, the Forge(Iron) factory needs Coal and Iron Ore.
Question: How to break a connection?
Answer: Any unit with the "Pillage" action can destroy the infrastructure or the road.
Question: How to break an Export connection?
Answer: Any unit with the "Pillage" action can destroy the extra Resource (Exportation) located in the center of the city as well as the extra Resource (Importation) located in the city that is importing.
IMPORTANT: The other city (Importation) must be destroyed as well. But if you don't destroy it, another city that is exporting that same resource will be connected by it again.
Even better don´t you think?, but unfair! I couldn't avoid this trick due to the lack of commands in LUA to check which city exports and who receives them.
In other words, it is possible for a city to export the same resource to more cities. Unfair! Don't use it!
In short, to cancel an export, destroy the two Extras with 'Pillage' (Exportation and Importation).
Question: Can I share resources with a player on my team or an ally?
Answer: Not yet! But in the near future (maybe in v3.3) it will be possible with the command "player:diplstate()".
Come back here later and maybe there will be news.
------------------------------------------------------------------------
Attached I provide a rule based on civ2civ3 that I always play single and multiplayer with a friend.
It contains the necessary changes to run the script and also some other small changes such as:
- New units and actions (Convert, Heal, etc.)
- City radius to 10 (3 tiles radius)
- Changed Storm Unit to Storm Extra
- Added volcanoes
- Added Animals
- among other effects
And most importantly, the file contains the tileset, which mainly contains a transparent (invisible) image that allows you to hide the resources and then reveal them.
Before playing, change your tileset in:
-- Client Options/Graphics
* Tileset(Square): connections_iso
* Tileset(Iso-Hex): connections_hex
EDIT:
* Issue on terrain.ruleset file from civ2civ3_connections.zip file.
In the 'terrain.ruleset' file is showing 'Sulfur' in the 'Jungle' terrain. (line 711). This resource does not have an infrastructure to be collected in a Jungle. Only in 'Hills', 'Mountains' and 'Volcanoes'. Please remove it (and also the comma) so you can collect it in the places that are already configured! Sorry and thanks!
Have fun guys!
Statistics: Posted by leo.priori — Mon Jan 13, 2025 6:04 pm