April 25, 2002, 08:18
|
#1
|
Settler
Local Time: 23:32
Local Date: October 31, 2010
Join Date: May 2001
Location: London
Posts: 25
|
Theoretical solution to sea city sprite bug
I'm going to be brief-ish (I've got an exam in an hour's time!). I'm assuming you know what this bug is and that no-one has a solution yet (sorry if you do, I'm clearly not observant enough).
Well, the solutionI had ages ago was to create a trigger that fired when a sea city was created. It changed the underlying terrain to an exact copy of the terrain with one exception: the new terrain was one on which undersea tunnels could not be built. The sea cities then showed up as expected (which makes sense as undersea tunnels fool land units, including cities, into thinking that the sea tile is land, and sea cities automatically have undersea tunnels built beneath them if allowed - hence a normal city sprite).
The problem is that this solution screws up some tile graphics; specifically graphics with an orientation like continental shelf and rift tiles. There was no solution to the new problem that I could find (and I tried loads of other things) until I recently took a look at the tileedit program (which I'm assuming you're familiar with). The rules for continental shelf tiles (as an example) include references to deep, shallow and shelf water tiles. The problem is that the new terrain (a copy of the original) is not considered as any of these, so the shelf tile defaults to one orientation - hence the mess up. This occurs regardless of the new terrain's internaltype in terrain.txt.
The solution is theoretical because I haven't tried it, but it works in my head (not much to go on I know, but it might be worth a try if you use sea cities a lot). Simply(!) duplicate all the appropriate tile rules to incude the new terrain types as well. This would take ages and ages unless you take a few shortcuts. Noting that all sea terrain has the same effect on food/production/etc. for cities only a few extra terrain types may be needed: one for deep water, one for shallow water etc.
There are a few other things to consider like changing the terrain back if the city is destroyed and what happens to the colours of the new terrains (there aren't even enough colours for the all the normal terrain types) etc. but I'm not too bothered about them because I don't use sea cities much at all.
That's my idea, it may or may not work. Good luck if you plan to try it. Give me a shout and I'll help if you want.
Off to the joys of Electromagnetic wave theory . . .
MATT:-)
|
|
|
|
April 26, 2002, 03:23
|
#2
|
Emperor
Local Time: 09:32
Local Date: November 1, 2010
Join Date: Dec 2000
Posts: 3,944
|
*does the great Aussie footbal handball*
Sounds like a good idea. Good luck implementing it. I think all the current modders have too many projects at the moment. (I know I do)
|
|
|
|
April 26, 2002, 05:10
|
#3
|
Super Moderator
Local Time: 01:32
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
|
One question if the sea city has no under sea road on its tile, cna you than move or put a land unit on it from land or from another undersea tunnel. IIRC than this was the reason why I didn't look into it any more.
-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
|
|
|
|
April 26, 2002, 06:27
|
#4
|
Settler
Local Time: 23:32
Local Date: October 31, 2010
Join Date: May 2001
Location: London
Posts: 25
|
Good thinking Martin. Looks like my plan is stuffed yet again. Oh well back to the real world I fall . . .
MATT:-)
|
|
|
|
April 26, 2002, 09:34
|
#5
|
Emperor
Local Time: 09:32
Local Date: November 1, 2010
Join Date: Dec 2000
Posts: 3,944
|
Matt/Martin:
In terrain.txt, for the "new" terrain type why not just add these lines:
Code:
|
EnvCity {
Score 0
Food 10
Shield 15
Gold 15
Movement 10
Freight 33
} |
That was ripped straight from WATER_DEEP with modification of movement to undersea tunnels.
And also at the bottom of the terrain type:
That should solve any probs with land units not moving through and also the movement points.
|
|
|
|
April 28, 2002, 14:52
|
#6
|
Super Moderator
Local Time: 01:32
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
|
Maybe that could work Dale, that should be tested but the problem I see here is that we will turn the new terrains into land terrains, and than the game has the possibility treat these terrains as real land terrains, as they have the movement type land, actual the same problem as you put an undersea tunnel on the terrain.
-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
|
|
|
|
April 28, 2002, 16:48
|
#7
|
Prince
Local Time: 00:32
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
|
Code:
|
HandleEvent(MoveOrder) 'no_swimming_with_sharks' pre{
if(TerrainType(location[0]) == TerrainDB(FAKE_DEEP_WATER)){
if(!HasImprovement(TerrainImprovementDB(TILEIMP_UNDERSEA_TUNNEL)){
return STOP;
}
}
} |
Untried, untested, not very well thought through...
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
|
|
|
|
April 29, 2002, 08:45
|
#8
|
Settler
Local Time: 23:32
Local Date: October 31, 2010
Join Date: May 2001
Location: London
Posts: 25
|
From my very small amount of testing (another exam tomorrow!) land units *can* move onto the square containing the city. The problem comes with the movement cost. Changing the movecost t 10 (as Dale suggests) would help. The only problem I invisage with that is that sea units would get the bonus too? I think Martin is right about using movementtype land, but that isn't a problem any more as far as I can see.
Apart from that, the only other annoyance I've found is that of graphics for undersea tunnels. When placed next to a sea city (on the new terrain), the tunnels have a link going towards the city as if the city has tunnels under it. However (as you'd expect) the graphics stop at the edge of the square with the city on leaving a bit of a confusing gap in front of the city. I'm not sure how to get around this one. Can tile improvements be put under cities with their graphics still showing? If so then you could create some random improvement with the graphics of tunnels and place them under the city as required. If not then a change in the sea city graphics (have to think how) could be useful.
Anyways, I've got some spare time at the end of the week so I'll see what I can do.
MATT:-)
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 19:32.
|
|