Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Switching NPCs instantaneously
New Topic New Poll Post Reply
Poster Message
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Switching NPCs instantaneously (0)  
I've got a problem with NPC move order, and I wonder if anyone has any suggestions. (I fear it's been discussed in some thread where I can't find it.)

Suppose you want, I don't know, a goblin king NPC who takes his crown off and puts it back on--which is to say, what you basically need to do is have the Goblin King NPC disappear and a Goblin NPC appear in his place. Well and good--except that one of them moves before the other. Suppose it's the king who moves before the regular goblin. Then when the GK disappears and the G appears, it happens nicely instantaneously. Unfortunately, when he "puts his crown back on", the G disappears, but because the GK has already moved that turn, he doesn't appear until the next turn.

Of course, you could have another GK NPC standing at the ready to appear. But supposing that you want, say, the king to take his crown off whenever Beethro's within three squares and put it back on when Beethro steps out ("Me? No, nozit kingz here! Heh heh am really kingz...ah! no kingzit here!"), you're going to need infinitely many NPCs. That's a problem.

So: is there any way around this?
05-02-2007 at 06:08 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Sillyman
Level: Smiter
Avatar
Rank Points: 339
Registered: 09-08-2006
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Hmm... Petition for a new script command to be included in the next patch, namely: "Change Graphics"?

____________________________
Who, me?
FNORD
05-02-2007 at 07:14 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Man, yeah, that would be nice, wouldn't it.
05-02-2007 at 07:31 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Pilchard VIII
Level: Smiter
Rank Points: 392
Registered: 01-21-2006
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
I'm not sure this would work from memory, but have it so the Goblin appears before Beethro arrives in the area. Then have the goblin king disappear when Beethro's present, then wait 1 turn, then appear at the same spot again. Then when he's gone, have the goblin disappear, wait 1 turn, then appear. Have this in an infinite loop. Hopefully that will do it. So this means the NPC it will change into has already appeared.

____________________________
The DROD Dragon

[Last edited by Pilchard VIII at 05-02-2007 04:07 PM]
05-02-2007 at 04:06 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Neathro
Level: Delver
Avatar
Rank Points: 41
Registered: 04-24-2007
IP: Logged
icon Re: Switching NPCs instantaneously (-1)  
You can't have 2 NPC's on 1 space I think?

:offtopic
whoa watch where you're signiture is going Pilchard VIII
:offtopic

____________________________
This is not a signature, it is a
collection of randomly selected
words. Teaspoon.

[Last edited by Neathro at 05-02-2007 06:17 PM]
05-02-2007 at 06:16 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Pilchard VIII wrote:
I'm not sure this would work from memory, but have it so the Goblin appears before Beethro arrives in the area. Then have the goblin king disappear when Beethro's present, then wait 1 turn, then appear at the same spot again. Then when he's gone, have the goblin disappear, wait 1 turn, then appear. Have this in an infinite loop. Hopefully that will do it. So this means the NPC it will change into has already appeared.
Oh, fascinating idea. Unfortunately, the actual situation I'm in involves more than just two characters--so A needs to disappear and be replaced by B or C, but which one depends on where the player goes. So I don't think this'll work in my case.
05-02-2007 at 07:31 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1306
Registered: 06-14-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
05-03-2007 at 12:10 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
OK, next question. Is there any easy way to (a) see and (b) change the move order of NPCs? (I know you can right-click on a visible NPC while playtesting, but if I have, say, a room with a couple hundred non-visible NPCs....)
05-03-2007 at 06:40 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Rabscuttle
Level: Smitemaster
Avatar
Rank Points: 2460
Registered: 09-10-2004
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Order is by placement, so you can fudge it by copy & pasting the one you want to move first, then the one you want to move second. I believe that is what I did when I was coding the reverse mimics.

That's not so helpful if you want to reorder a couple of hundred though.


05-03-2007 at 07:37 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Neathro
Level: Delver
Avatar
Rank Points: 41
Registered: 04-24-2007
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Feature request:

Imperative Move [not part of feature]say[\not part of feature], 2nd,

____________________________
This is not a signature, it is a
collection of randomly selected
words. Teaspoon.
05-03-2007 at 10:33 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Yeechh. Allowing that to be a command makes things complicated and confusing fast. For a Feature Request, I'd say:
1. Add a keyboard command to toggle whether little move-order numbers are displayed over every creature.
2. Make it so that when you hover the mouse over a creature and press Q/W or do the mouse scroll wheel, the creature gets moved up/down through the move order, as far as allowed by its type.

But yeah, messing with move order in the editor is currently a big pain. If it were me in the situation Tahnan describes, it would be time to break out my homemade *.hold editing tools....
05-03-2007 at 01:45 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
schep wrote:
If it were me in the situation Tahnan describes, it would be time to break out my homemade *.hold editing tools....
Since it's me instead, perhaps I'll break out your homemade *.hold editing tools. No, wait, I don't have your homemade tools.

In all seriousness, is there an easy way to edit holds outside of DROD itself?
05-03-2007 at 07:23 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Once you decompress them, monsters can be reordered pretty easily. Some things (like scripts and other tiles) are less trivial.

The files are compressed using zlib, in case you were wondering.
05-03-2007 at 10:13 PM
View Profile Show all user's posts Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2459
Registered: 11-14-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Oy. It's scripting that I'd most want to fiddle around with by hand. (Side note: oh, thank you, thank you, for including the ability to paste in commands from outside DROD. I've been writing Python scripts to generate series of scripting commands. It's still not fun to have to paste 140 different scripts in, but it's much easier than writing them all, or even writing one, copying the NPC, and making all the fiddling changes necessary.)
05-04-2007 at 03:00 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
The spitemaster
Level: Smiter
Rank Points: 354
Registered: 06-09-2005
IP: Logged
icon Re: Switching NPCs instantaneously (0)  
Um, if you hit wait zero, wouldn't that set the NPC to the back of the movement order?

____________________________
Last night upon a stair
I met a man that wasn't there
He wasn't there again today
I wish that man would stay away
05-05-2007 at 12:43 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Switching NPCs instantaneously
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.