Ships sinking?

Dasta

Chieftain
Joined
Apr 20, 2013
Messages
62
Title basically says it all.
After doing a quick test in a game with only CiVUP and GEM mods, I discovered that ships are sinking when they enter the ocean. When I exit to menu and load the game up, they appear to be sitting idle on top of the ocean again, but as soon as they move, they sink. On the coast, they have no issues.

Doesn't affect movement, combat, etc. Just a weird visual bug.

Link to show a comparison of coast and ocean.

Edit:
Some additional info that might help?
Its something in the Gods & Kings Enhanced mod, cause CiVUP on its own doesn't sink. I tried looking through the GEM mod in a separate folder to see if I could find some value that's altering ocean tiles, but I'm pretty new to mods so I wasn't really sure what I was looking for.

This effect also happens with submarines, but honestly, that works really well. Submarines along the surface on coast, then dive underwater in the ocean? Its awesome. If there's a way to keep that while making other ships stay afloat, that would be amazing.

It also does not affect Embarked units. Galleons, Frigates, Ironclads, Carriers, Battleships, Submarines (which looks good doing it), etc. all go underwater. But not embarked units. Hopefully that helps narrow it down?
 

Attachments

  • c0tpu.jpg
    c0tpu.jpg
    312.5 KB · Views: 67
I only had R.E.D. Modpack installed. I disabled it, tried a new game with only CiVUP and GEM, they still sank. Tried CiVUP on its own, as well as with R.E.D., and both times they worked fine. So either its something with GEM, or something with CiVUP that only happens when GEM is on.
 

Attachments

  • Lua.7z
    1,012 bytes · Views: 23
Bump.

If it helps any, the issue also happens with Ice tiles. Regardless of whether its on the coast or the ocean, ice tiles make ships sink. Maybe its something in the Astronomy tech that's causing the issue? It does allow ships to cross both ocean and ice tiles, and those are the two cases in which ships sink.
 
It actually does sound like an unintended effect of the ice-crossing promotions for ships. I'd guess the vanilla game uses the submerged effects on submarines by default for their ice-crossing abilities, and for some reason tags that promotion for graphics (probably because subs are the only unit that uses it in the main game).

Might be fixable by altering the graphics tag to a different sub-only promotion, but I don't see where the game tags it that way. Maybe a core-function?
 
Hm, yeah, that does make a lot of sense. I wonder then if there's a way to link the submerged effect to happen only with INVISIBLE units, instead of units that cross ice? Since Submarines are the only ship that can do that, it then wouldn't affect the normal ships (in theory). If anyone knows how to do this, I would really appreciate it. I'm still really new to the modding scene, so I wouldn't know where to begin, but I can follow a list of directions easily enough.
 
Sea domain units (ships/subs) always sink if they have a promotion with the <CanMoveImpassable> feature set to true. It appears to be hard-coded into the UI DLL (which we do not have the code for) and as such can't be fixed via XML, LUA or a DLL mod. It is however possible to code an alternative ice-crossing promotion into the DLL, although it is non-trivial - see posts 17 thru 21 of http://forums.civfanatics.com/showthread.php?t=492061
 
Thank you for the information whoward69! I'm curious if this would work or break the game though;

In the GEM\Armies\Promotions\GEA_Ships.xml I noticed A few things.

<Update>
<Where Type="PROMOTION_CAN_MOVE_IMPASSABLE" />
<Set IgnoreTerrainCost="true" />
</Update>

As well as

<Row>
<Type>PROMOTION_ASTRONOMY</Type>
<Description>TXT_KEY_PROMOTION_ASTRONOMY</Description>
<Help>TXT_KEY_PROMOTION_ASTRONOMY_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<CanMoveImpassable>true</CanMoveImpassable>
<PortraitIndex>58</PortraitIndex>
<IconAtlas>ABILITY_ATLAS</IconAtlas>
<PediaType>PEDIA_ATTRIBUTES</PediaType>
<PediaEntry>TXT_KEY_PEDIA_PROMOTION_HOVERING_UNIT</PediaEntry>
</Row>

And in at least one other spot I think I saw the CanMoveImpassible code thrown in as well. Would it be possible to turn the CanMoveImpassible codes to false and therefore stop submerging ships? I understand it would mean that I couldn't travel ice, but I'm okay with that. And I wouldn't want to outright remove the Astronomy promotion since it allows ocean travel.

Now assuming that that would work, would it be possible to then create your Ice-Breaking promotion in the same XML or a separate mod?

Apologies if I'm missing something blatantly obvious, I know it can be frustrating. ^^" Just trying to understand how mods work.
 
UPDATE!!

So, in the second code I set <CanMoveImpassable> to false, tested game. Basically solved it. Ships can now move over ocean without submerging, submarines submerge in the ocean (which is perfect), and Submarines can also still traverse ice. It doesn't allow ships to traverse ice, however, but I'm okay with that for now.

So I end off with, anybody having this same issue:

C:\...\My Games\Sid Meier's Civilization 5\MODS\GEM\Armies\Promotions\GEA_Ships.xml

Find:

<Row>
<Type>PROMOTION_ASTRONOMY</Type>
<Description>TXT_KEY_PROMOTION_ASTRONOMY</Description>
<Help>TXT_KEY_PROMOTION_ASTRONOMY_HELP</Help>
<Sound>AS2D_IF_LEVELUP</Sound>
<CanMoveImpassable>true</CanMoveImpassable>
<PortraitIndex>58</PortraitIndex>
<IconAtlas>ABILITY_ATLAS</IconAtlas>
<PediaType>PEDIA_ATTRIBUTES</PediaType>
<PediaEntry>TXT_KEY_PEDIA_PROMOTION_HOVERING_UNI T</PediaEntry>
</Row>

And change <CanMoveImpassable>true</CanMoveImpassable> to false. This WILL NOT let you travel through ice (except with submarines) but WILL fix the submerging issue.

Those wanting to travel through ice, looks like whoward69 is working on a promotion that can do that. Fingers crossed for a naval CanCrossIce trait so a promotion doesn't need to be used on it. ^^ Looked through the CustomModOptions.xml but the only ice crossing I could find was for land units, so not sure if I missed something. :p
 
Top Bottom