Switch for bridges CK4

Discussion and analysis of graphics, story, levels, and so on.
Post Reply
User avatar
troublesomekeen
Posts: 223
Joined: Fri Feb 03, 2012 7:56 pm
Location: Shadowlands
Contact:

Switch for bridges CK4

Post by troublesomekeen »

Hello! TroublesomeKeen here. This topic is in regards to NY00123's first abandoned CK4 level pack. It's the one with the "flipped perspective." NY00123 posted it on pckf in the Release Forum section, October 1st, 2011.

In my effort to undertake a gigantic mod project (also my very first mod), I've been trying to get my hands on every CK4 mod, so that I can learn from them and get more ideas. Yesterday I downloaded this level pack to take a look at it. Only a few levels were playable, but it gave me an idea. In the first level, there's a switch that makes a row of spikes disappear.
Image

That's brilliant! But how is it done? I've made two spike tiles in my Foreground tileset that animate to blank/transparent tiles but instead of the whole spike disappearing, only the tops do.
Image

If I can make this work properly, my plan is to use this trick to open up secret passages within the level. I'll try to figure out what I'm doing wrong. I don't understand it why it's not working even though I mimicked all the tile and sprite placements. Grr....
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Bridges are not a rectangle of tiles, the top line must be one shorter on the top left. This diagram of an actual bridge shows this: http://dl.dropbox.com/u/3940020/bridgework.bmp

The top shows the bridge as it appears, the bottom shows the bridge as it actually WORKS. Notice that the top left tile in the bridge doesn't actually change. In order to work properly a bridge must be set up so that there is one less bridge-type tile at the top left.

I usually do this with an invisible bridge tile I put on the bottom row.
User avatar
Gridlock
Posts: 71
Joined: Sat Feb 05, 2011 7:04 am

Post by Gridlock »

If you need any help, I've done heavy amounts of work with unique tile uses such as this. There are many ways you can manipulate bridge tiles/animated tiles/etc to produce neat effects.

I modified this bridge explanation picture I made a while ago to show how bridge tiles work:
Image

Each of the tiles with a red x over them are tiles that are affected by the bridge. In Keen 4, every tile you want affected by the bridge behavior should link to another tile with a 0 animation speed. Flipping a bridge switch causes the game to check each tile in each row, starting left and moving right. If one of the tiles in a row doesn't animate, then it stops changing tiles in that row.

There are many unique ways to use this behavior. Note that you can have animated tiles in the background behind bridge tiles. This allows you to do all sorts of neat things such as electric floors that turn on/off. I'm using this and many other ideas in my mod Atroxian Realm, but I'd gladly help you do so in your mod.
In my effort to undertake a gigantic mod project (also my very first mod)
Bad idea, start slowly with modding before you get too ambitious. Besides, large mods take a very long time even for experienced modders. I've been working on Atroxian Realm for almost 2 years now, and it's still got a lot more work left.
User avatar
troublesomekeen
Posts: 223
Joined: Fri Feb 03, 2012 7:56 pm
Location: Shadowlands
Contact:

Post by troublesomekeen »

Thanks a million, Levellass and Gridlock! With your help, I got the whole sequence of spikes (top and bottom rows) to disappear. It was the first tile in the bottom row that was tripping me up.
Gridlock wrote:Note that you can have animated tiles in the background behind bridge tiles. This allows you to do all sorts of neat things such as electric floors that turn on/off.
Wow.. I'll have to think about this. Thanks for the tip!
Gridlock wrote:Bad idea, start slowly with modding before you get too ambitious. Besides, large mods take a very long time even for experienced modders. I've been working on Atroxian Realm for almost 2 years now, and it's still got a lot more work left.
Hmm.. I believe you're quite right. It's almost too much for me. Maybe I should work on a regular level pack before doing something so grand. (I think it's grand. Maybe it's not. Depends on how well I execute my ideas.) I'm way in over my head, shooting for the moon already. Plus I'm not very good at spriting. After I finish the "Nowhere to be Seen!" trilogy, I'm going to make a medieval mod. And if Keen had an orange in the color palette, I would have started on a Star Wars mod by now. Yeah, I'm crazy. But I can't help it!
I'm looking forward to Atroxian Realm! Most anticipated mod evar!
Post Reply