The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2013-08-28 23:59:49

ukuko
Member
Registered: 2013-04-06
Posts: 333

Replacing 'up' trapdoors

If you return to your house and a trapdoor is in its 'up' state, deleting it and replacing it (for testing purposes) will charge you for a brand new trapdoor.

It's rather noticeable now they have a $1800 price tag!

Not sure if this affects any other objects.

Offline

#2 2013-08-29 00:31:19

dalleck
Member
Registered: 2013-04-13
Posts: 250

Re: Replacing 'up' trapdoors

ukuko wrote:

If you return to your house and a trapdoor is in its 'up' state, deleting it and replacing it (for testing purposes) will charge you for a brand new trapdoor.

It's rather noticeable now they have a $1800 price tag!

Not sure if this affects any other objects.

On that note, another quirk with trapdoors is that they will remain up in edit mode if they were powered at the end of a successful robbery on your house.  I didn't want to say anything because I like this behaviour and I only wish trapdoors would be up all the time in edit mode wink

Last edited by dalleck (2013-08-29 00:31:46)


The rich aren't safe. Nobody is safe. -jere                   ...but the smell wafts out from the pit, obviously. - Jason Rohrer

And the more dickish they are, the more I feel like beating a house to destruction after finally figuring it out. -bey bey

Offline

#3 2013-08-29 00:55:19

largestherb
Member
From: england
Registered: 2013-05-27
Posts: 381

Re: Replacing 'up' trapdoors

long have we wanted up trapdoors in edit mode!

also this is unrelated but made me giggle.. http://i.imgur.com/YJu6dpp.jpg clicky click

Offline

#4 2013-08-29 01:34:44

joshwithguitar
Member
Registered: 2013-07-28
Posts: 538

Re: Replacing 'up' trapdoors

Yeah, I've had houses where I am very glad after the first robbery because I can finally walk around them in edit mode. It would be nice if this was the normal way. I think the only reason to replace a trapdoor is to get rid of a dead pet that might causing problems.

Offline

#5 2013-08-29 07:25:18

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,231

Re: Replacing 'up' trapdoors

The idea is that everything is "powered off" when you place it in edit mode, for consistency.  Doors are open, trapdoors are open, electric floors are off.  Yes, this makes trapdoors uncrossable.  But it is consistent.  Otherwise, as soon as you switched to self-test mode, the trapdoors would spring open.

NOW.... why do they remain shut at the end of a robbery?  Well, there's a chance that a mobile is standing on one of them!  If they popped open, then the mobile would be floating there in edit mode, and that would look weird.

Some of this is a consequence of the "general" way that the engine handles everything.  I'm not coding in a bunch of special cases, but trying to make everything follow the same rules.  So, a trapdoor becomes "stuck" closed (just in case an animal is standing on it), which means that its state is not reset for Edit mode.  "Stuck" is normally used for destroyed stuff, but it doesn't block the object from further transitions being triggered later (like the trapdoor opening again later when power changes), so it works fine in this case as well.

On the other hand, "Stuck" objects must be paid for when they are replaced with unstuck ones.  So, that's why the weird "pay for the trapdoor again" thing happens.  This is a consequence of the way the server handles map diffs and decides what to charge you for.

When the game works this way, it means that everything can be defined in the gameElements text files (instead of in code).  This is a really nice way for it to work.

There might be a way to make this slightly better (so that the trapdoor doesn't become stuck closed unless an animal is on top of it).  However, the trapdoor's interactions are already pretty complicated (because of the way that dead animals must change state when they are inside of it as it opens and closes), so it's a polish point that I'm going to punt down the field for now.

Offline

#6 2013-08-29 08:29:42

ukuko
Member
Registered: 2013-04-06
Posts: 333

Re: Replacing 'up' trapdoors

Ah, so it was that pesky :2! that cost me $1800. I opted to close the client rather than undo my zillion edits.

Offline

#7 2013-08-29 15:01:07

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Replacing 'up' trapdoors

Don't some things such as sticking pressure plate act like trapdoors should in terms of being stuck, but also don't require money to replace?

Last edited by colorfusion (2013-08-29 15:01:23)

Offline

#8 2013-08-30 06:47:47

jasonrohrer
Administrator
Registered: 2013-04-01
Posts: 1,231

Re: Replacing 'up' trapdoors

No, sticking buttons are actually not stuck.

Everything is shown in it's post-robbery state to you once, during your first edit (sticking buttons shown down, etc.).  But as soon as you go into self-test, everything that is not stuck "pops up" back to the default state, and remains in that state even if you return to edit.

Offline

#9 2013-08-30 06:50:44

colorfusion
Member
Registered: 2013-04-02
Posts: 537

Re: Replacing 'up' trapdoors

Ah I see.

Offline

Board footer

Powered by FluxBB 1.5.8