Project

General

Profile

Bug #650195

civ2civ3: missing requirements to build Oil Platform extra

Added by David Fernandez (bard) 8 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rulesets
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This patch adds missing requirements to build Oil Platform (terrain extra):
- Tech Miniaturization as pointed in the current helptexts.
- Deep Ocean terrain, because it has no effect in coastal Ocean.
- Conflits with Buoy, because both gfx in same tile does not look good.

The bug affects v2.6 and later. I made the patch for trunk version, but tested it on S2_6.

I was going to add the requirement:
"CityTile", "Claimed", "Local"

But it seems to include tiles that are inside national borders, no matter if the city can work them or not. Please let me know if there is an alternative condition to check if the tile is inside city workable radius, else it would be possible to fill the ocean with useless oil platforms.

I wanted to allow transports to build buoys too, but that would require changes to helptexts, so I leave it for another ticket.

civ2civ3-oil_platform_reqs-trunk.patch (858 Bytes) civ2civ3-oil_platform_reqs-trunk.patch David Fernandez (bard), 2017-04-04 11:26 PM
civ2civ3-oil_platform_reqs-v2git-trunk.patch (1.67 KB) civ2civ3-oil_platform_reqs-v2git-trunk.patch David Fernandez (bard), 2017-07-02 07:00 PM

History

#1 Updated by Jacob Nevins 7 months ago

Please let me know if there is an alternative condition to check if the tile is inside city workable radius

I don't think this is possible currently.

I wanted to allow transports to build buoys too, but that would require changes to helptexts

S2_6 is far from a string freeze, if that's what you're worried about.

#2 Updated by David Fernandez (bard) 7 months ago

Please let me know if there is an alternative condition to check if the tile is inside city workable radius

It is not really important.
I just thought to give to transports the chance to gain veterancy by work, but this would allow them to mine useless deep tiles until they reach elite status. So better we keep them veteran by combat only.

S2_6 is far from a string freeze, if that's what you're worried about.

Ok, I'll do another patch to allow transports to build buoys, and I'll include the same changes for sandbox.

#3 Updated by Jacob Nevins 5 months ago

  • Target version set to 2.6.0-beta1

#4 Updated by David Fernandez (bard) 5 months ago

I forgot this one. Let me do the patch with the same changes for sandbox.

#5 Updated by David Fernandez (bard) 5 months ago

Tested patch for trunk, made with git. Please, let me know if you prefer a different format for my patches.

This patch adds missing requirements to build Oil Platform (terrain extra):
- Tech Miniaturization as pointed in the current helptexts.
- Deep Ocean terrain, because it has no effect in coastal Ocean.
- Conflits with Buoy, because both gfx in same tile does not look good.
- Same changes for civ2civ3 and sandbox.

#6 Updated by Jacob Nevins 4 months ago

  • Status changed from New to Closed
  • Assignee set to Jacob Nevins

Apart from the conflict with Buoy, I think this doesn't change gameplay, as the following in effects.ruleset was already enforcing the requirements:

[effect_mining_ocean]
type    = "Mining_Possible" 
value   = 1
reqs    =
    { "type", "name", "range", "present" 
      "Terrain", "Deep Ocean", "Local", TRUE
      "Tech", "Miniaturization", "Player", TRUE
    }

However, it does improve the generated help (and also makes it easier to find the requirement -- it took me a while to realise the relevance of Mining_Possible).

#7 Updated by Jacob Nevins 4 months ago

Please, let me know if you prefer a different format for my patches.

The patch is fine except that it sets the executable bit on the files for some reason:

old mode 100644
new mode 100755

I don't know why this might be happening, but it'd be more convenient to apply if it didn't.

#8 Updated by David Fernandez (bard) 4 months ago

Jacob Nevins wrote:

Please, let me know if you prefer a different format for my patches.

The patch is fine except that it sets the executable bit on the files for some reason:

[...]

I don't know why this might be happening, but it'd be more convenient to apply if it didn't.

Thanks for pointing it out. I'll check it for future patches.

Apart from the conflict with Buoy, I think this doesn't change gameplay, as the following in effects.ruleset was already enforcing the requirements...

I didn't notice it, then the patch is not as important as I thought. I remember to test it in editor mode where it allowed to place the extra regardless of the Mining_Possible.

#9 Updated by Jacob Nevins 4 months ago

I remember to test it in editor mode where it allowed to place the extra regardless of the Mining_Possible.

Huh. The reason I went looking for Mining_Possible was because the editor didn't let me place Oil Platform in shallow ocean.
Maybe the editor's been fixed to honour the rules more since you looked; I haven't checked.

#10 Updated by Marko Lindqvist 4 months ago

Jacob Nevins wrote:

Maybe the editor's been fixed to honour the rules more since you looked; I haven't checked.

The rule about xxx_Possible is that they prevent/allow unit activities. They may indirectly affect extra placement (since the extra would be result from the activity in question), but they are not directly controlling extra placement. It's a bug if editor cares about xxx_Possible when placing extras.

#11 Updated by David Fernandez (bard) 4 months ago

Huh. The reason I went looking for Mining_Possible was because the editor didn't let me place Oil Platform in shallow ocean.

I confirm you are right. The editor, at least current S2_6 version, does not allow Oil Platform in shallow ocean (even without this patch to requirements of Oil Platform extra).

I can't tell for sure if it was possible in previous versions, it was just my memory of why I decided to make this patch in the first place, but I'm not sure.

#12 Updated by Marko Lindqvist 4 months ago

That's because terrain.ruleset has
mining_result = "no"
preventing any kind of mining of regular Ocean terrain.

#13 Updated by David Fernandez (bard) 4 months ago

Jacob Nevins wrote:

The patch is fine except that it sets the executable bit on the files for some reason:
[...]
I don't know why this might be happening, but it'd be more convenient to apply if it didn't.

I found the cause, in case it happens to anyone else. It was because my working copy was placed in an NTFS drive mounted with executable permission (it seems all files are considered executable in this case, since NTFS does not store permissions for each file).
It happened to all my recent patches. I'll redo them.

Marko Lindqvist wrote:

That's because terrain.ruleset has
mining_result = "no"
preventing any kind of mining of regular Ocean terrain.

Right, sorry, then everything seems right.

Also available in: Atom PDF