Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [40c] Edges, Inside, Outside, Light, and Dark  (Read 1490 times)

Noble Digger

  • Bay Watcher
    • View Profile
[40c] Edges, Inside, Outside, Light, and Dark
« on: September 07, 2008, 04:13:24 pm »

I'm having some problems placing walls underground near the edge of the map. I was trying to surround my fort with a 4-wide moat 4 units from the edge and initially had some success placing 4 floodgates to create blocks in places where I wanted them.

However, after I cut the roof off the moat tunnel, I can't place walls or floodgates (or any other colliding objects) on tiles I was previously able to. I've attached my save, but note that this was a heavily modded build so I've also included that. Any viruses also included are free of charge!

I read a thread saying that the edges are only restricted when above ground, so I tried to do my construction during winter when ice covered the channel, but I still couldn't place anything. I floored over the entire channel where I wanted to build and it still won't let me. After investigation I found that no matter what I do, those tiles are still considered "Light", even with cielings (floors) built over them.

Because the tiles in question (in the upper right corner of the map near the river source, you can see where I'm having trouble) are considered "Inside, Light" it seems like the tile data isn't getting updated. It's all got opaque cielings over it, so it should probably be "Inside, Dark" unless it's this way due to mechanics I'm unfamiliar with.

You can see a few places on the map (in the channel) where I was able to do what I wanted, but it seems as if once a tile is touched by sunlight the engine never considers it 'inside, dark' again. Note that the region affected was once covered by a bridge, if that matters.

Download link, ~17mb, sorry!

http://rapidshare.com/files/143453865/demongate_full_build_40c.rar.html

If anyone knows of a kludge that'll let me bypass this problem, I'll be happy to use it. :)
Logged
quib·ble
1. To evade the truth or importance of an issue by raising trivial distinctions and objections.
2. To find fault or criticize for petty reasons; cavil.

Draco18s

  • Bay Watcher
    • View Profile
Re: [40c] Edges, Inside, Outside, Light, and Dark
« Reply #1 on: September 07, 2008, 05:14:36 pm »

All that stuff is tied to "light" not "inside" and things are working as Toady made them.
Logged

Exponent

  • Bay Watcher
    • View Profile
Re: [40c] Edges, Inside, Outside, Light, and Dark
« Reply #2 on: September 07, 2008, 05:21:21 pm »

A)  Note that outside and above ground are two different things.  Outside is the opposite of inside, and above ground is the opposite of subterranean.  But since normally light and above ground always coincide, and dark and subterranean also always coincide (at least from my experience), it can be easy to get things confused.  (Apologies if you already knew all this; just trying to cover everything.)

B)  The light/dark flag definitely does need to be updated correctly, in the same way that the inside/outside tag already is.  My guess is that Toady is waiting for when he does significant work on the fire/lighting arc to mess with light.  Regardless, I believe the problem in your case is that the subterranean flag is what is relevant, and once a tile is above ground, it can never become subterranean again, and that might be a perfectly legitimate game design.

C)  My For Each Tile Tweak module can turn large quantities of tiles into dark/subterranean tiles quickly.  In your case, you might be able to get away with executing the following operation set with my utility:

Condition:
Code: [Select]
is_inside and not (is_dark and is_subterranean) and (x <= 5 or x >= map_width - 5 or y <= 5 or y >= map_height - 5)Operations:
Code: [Select]
make_dark;
make_subterranean;

This will cause all tiles near the edge that are inside but not both dark and subterranean to become dark and subterranean.

Alternatively, you can use my program (and I believe Dtil and TileEdit can do this as well) to just alter the few individual tiles where you need to construct stuff.  For my program, you'd simply set the condition to "at_cursor", and then loo(k) in the game and move the cursor to the tile you want to alter.  With the operations set to "make_dark; make_subterranean", you'll set that single tile to be dark/subterranean.  Move the cursor elsewhere, and execute the operation set again.  Repeat as necessary.
« Last Edit: September 07, 2008, 05:24:38 pm by Exponent »
Logged

Noble Digger

  • Bay Watcher
    • View Profile
Re: [40c] Edges, Inside, Outside, Light, and Dark
« Reply #3 on: September 07, 2008, 07:57:33 pm »

Thanks for the useful reply! I'm confident that your utility or a similar one will help me fix this.
Logged
quib·ble
1. To evade the truth or importance of an issue by raising trivial distinctions and objections.
2. To find fault or criticize for petty reasons; cavil.