Announcement: Remember: you are giving away your fantastic ideas for free, and somebody else might even make money from them (or appear to). That's just how the world works! If you're worried about it, maybe you shouldn't post your ideas here.


Caravel Forum : DROD Boards : Feature Requests : Changing the Entire Basis of Scripting (...and why this is a bad idea)
New Topic New Poll Post Reply
Poster Message
Swivel
Level: Master Delver
Avatar
Rank Points: 236
Registered: 09-14-2005
IP: Logged
icon Changing the Entire Basis of Scripting (+2)  
Say, I was thinking about scripting the other day. I do this every day. I thought about some sort of new coding line: a behavior (not behaviour :P) tag. What this would do would define the behavior of an NPC. For example, if an NPC had its behavior defined as being a roach, it would move towards Beethro, stand in the way of completing a room until Beethro killed it, and kill Beethro if given the chance. This is different from a complete character transformation because the graphic of the character would not change.

Perhaps the following code will whet your appetite for understanding.

This code is for a visible NPC guard.

Behavior: Mimic
Wait 5 Turn(s)
Speech Beethro "Hey! That guard is doing as I do!"
Speech Beethro "I'll bet that that brain is causing him"
Speech Beethro "to act like a mimic."
Wait while monster [brain] is at (13,18)
Behavior: Guard
Speech Guard "Wait, what just happened?"
End on death

End on death would mean that, when the guard dies, its script ends. I don't think that behavior tags should be implemented, but this one seems valuable.

This might render the "Turn into monster" tag obsolete, but with some complications. Consider the following script. The character is an NPC Halph at (10,10) with an orb at (20,20). Beethro will bump against a closed yellow door controlled by the orb.
Behavior: Halph
Wait while NPC is at (10,10)
Speech Beethro "Get the door!"
Speech Halph "Got it, Unka."
While for NPC at (18, 18)-(22, 22)
Behavior: Roach queen
Speech Halph "Get away from me, Beethro."
Wait for event roach egg hatched
Speech Halph "Help! I'm surrounded by roaches!"
Behavior: Scripting
Pathfind to [Beethro location]
Speech Halph "What caused the roaches to spawn, Unka Beethro?"
Speech Beethro "Obviously some mad architect who has nothing better"
Speech Beethro "to do with his time than invent stupid scripting things."

Invincibility might add a complication.

Anyway, despite thinking of this new thing, I am opposed to it because unfortunately it can be abused. There is only one way to implement this for me:

1. Learn C++ (easy)
2. Learn Windows programming (hard)
3. Code away!

Otherwise, it could really really be abused. But I said that. This post, anyway, isn't exactly a feature request. If it were implemented, if would not be in TCB. It's all silly. But thanks for reading, anyway.
01-19-2006 at 12:40 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
AlefBet
Level: Smitemaster
Rank Points: 979
Registered: 07-16-2003
IP: Logged
icon Re: Changing the Entire Basis of Scripting (0)  
"End on death" probably wouldn't be the most appropriate command in such a script. You probably really want "wait for room complete" and then "end". Otherwise, if you kill the character and leave without completing the room, when you come back the room won't be beaten, but the character will be gone.

____________________________
I was charged with conspiracy to commit jay-walking, and accessory to changing lanes without signaling after the fact :blush.

++Adam H. Peterson
01-19-2006 at 01:28 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Mattcrampy
Level: Smitemaster
Avatar
Rank Points: 2388
Registered: 05-29-2003
IP: Logged
icon Re: Changing the Entire Basis of Scripting (0)  
If it acts like a duck, and plays like a duck, it probably should be a duck.

...okay, that was horrendously butchered, but the point of DROD is that it should be immediately obvious what things are going to do, and a character that acts like a roach, or a roach that acts like a goblin, isn't fair on the player.

____________________________
What do you call an elephant at the North Pole?
Click here to view the secret text

01-19-2006 at 10:07 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
stigant
Level: Smitemaster
Avatar
Rank Points: 1182
Registered: 08-19-2004
IP: Logged
icon Re: Changing the Entire Basis of Scripting (+2)  
a character that acts like a roach, or a roach that acts like a goblin, isn't fair on the player.

Well, I have to agree and disagree with this statement. Definitly, if a (character that looked like a) roach started acting like a goblin, that would be very confusing. Especially if there were other "real" roaches in the room. But the confusion here is that I think it should be acting like a roach, not a goblin because it looks like a roach. However, if a particular character who doesn't look like any of the other creatures in the room starts acting like a roach (or a goblin or whatever) that's not any worse than the opacity that can curently be accomplished with scripting. In fact, I would go so far as to say that is considerably less opaque than some other scripts I've had the "good fortune" of playing through recently. (cough cough war7 cough) I can't really predict what ANY script is going to do. If I suddenly realize that he's acting like a roach, that simplifies things greatly.

I am opposed to it because unfortunately it can be abused

It seems to me that we shouldn't base decisions for new features on this criterion. There are lots of elements that can be abused. I've seen rooms with 100s of orbs opening/closing/toggling 100s of single yellow doors. I've seen rooms filled with roaches/roach queens/goblins etc where you just stand in one place and qw (or ctrl-q now). I saw a script yesterday in which one mimic stands still until you drop all the trap doors, and then he starts walking around the room killing things. Another one where a character stands still until all of the other characters are killed and then he goes and opens a door for you. Does this mean that those features should be taken out? No, not at all. The question of whether something should be implemented ought to rest on whether it can be used to create INTERESTING puzzles, not on how badly it can be abused. If an architect chooses to abuse a feature, people will stop playing his/her holds.

____________________________
Progress Quest Progress

[Last edited by stigant at 01-19-2006 01:28 PM]
01-19-2006 at 01:24 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Oneiromancer
Level: Legendary Smitemaster
Avatar
Rank Points: 2936
Registered: 03-29-2003
IP: Logged
icon Re: Changing the Entire Basis of Scripting (0)  
stigant wrote:
If an architect chooses to abuse a feature, people will stop playing his/her holds.
That is the crux of it. During JtRH and now with new features in TCB, we worried about people abusing scripting in this manner. But we realized that the public backlash, which includes voting on a hold, should take care of that. Testing should uncover what is just too unintuitive, and if the architect doesn't listen, then they will probably reap the consequences.

Game on,

____________________________
"He who is certain he knows the ending of things when he is only beginning them is either extremely wise or extremely foolish; no matter which is true, he is certainly an unhappy man, for he has put a knife in the heart of wonder." -- Tad Williams
01-19-2006 at 03:34 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Feature Requests : Changing the Entire Basis of Scripting (...and why this is a bad idea)
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.