Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : Development : scripting new monsters ? (possible with existing system, or require source code ?)
New Topic New Poll Post Reply
Poster Message
flapflap
Level: Roachling
Rank Points: 10
Registered: 02-16-2011
IP: Logged
icon scripting new monsters ? (0)  
Hello,

I was wondering : with the existing scripting system, is it possible to script new monsters behaviour ? Or if I wanted to do so, would I have to inject it straight into the source code ?

To be more specific, here is what I am trying to acheive : DRoD Infection, the old and tirer zombie team.
New creatures :
- Zombie : move toward the closest human or the player. When touches one, turns it into a zombie
- Human static : doesn't move. When a zombie is close enough, it turns into a scared human
- Scared human : runs away from zombies
- Angry human : if the player kills any human on the board, all of them turn into angry human, and they try to kill him (and to avoid zombies)
- Courageous human : when the player touches any "not angry" human with its body, it becomes courageous and moves toward zombies to kill them.

Special room rule :
- Kill all monsters (zombies and others), with a minimum number of humans alive (whether they are angry or not.

Scripting that would require :
- Monster to be aware of neighbouring monsters (for zombies to move toward humans intead of player)
- Monsters begin able to send message to each ohter (a zombie tells to the human that he as to turn into Z when he touches him)
02-16-2011 at 07:53 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Rheb
Level: Smitemaster
Avatar
Rank Points: 1211
Registered: 08-04-2006
IP: Logged
icon Re: scripting new monsters ? (+2)  
Scripting new and complex monsters is definitely possible in the editor. I'm just not sure if all the things you describe is possible yet.

To make a deadly and required target, just use the Imperatives: "Required Target" and "Deadly" and Move to: "Player" script in a goto loop. You can create a variable to keep count of how many humans are lost. Add one to it every time a human is turned into a zombie. You can use the "wait for event NPC killed" to check how many humans have been killed but that would also count the zombies, so you need to subtract for all the zombies in the room.

I'm afraid creating the zombies the way you want them is not possible though... It would be, (only kind of messy) using the RPG script editor which gives you access to the players and NPC:s position (x,y).

I'm no expert though, so maybe it is possible.

____________________________
Voligner is my very own DROD-like game. Please check it out!

[Last edited by Rheb at 02-16-2011 02:18 PM]
02-16-2011 at 02:12 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Tim
Level: Smitemaster
Avatar
Rank Points: 1979
Registered: 08-07-2004
IP: Logged
icon Re: scripting new monsters ? (+1)  
Hi,

There's a lot of stuff you can do with the existing scripting system, given the many new monsters that has already been created, even though the system is designed for storytelling.

There's also a lot of things you can't do with the current scripting. Like checking things in their proximity, or sending messages to each other, or going to the nearest human.

Now I don't think it's very difficult to add these things in the scripting system, but even if they were in there I don't think it will help you.

The problem is that what you're trying to do costs a lot of time to calculate. Just imagine, in a typical infection game, hundreds of monsters in a room, sending messages to each other, calculating the shortest path to every other monster, and checking for neighbouring monsters. That's not going to be fast.

So, I'd suggest that if you really want to do something like that, then you should get your hands dirty with the source code. Because that's the only way for you to get the monsters run fast enough. Or better, write your own game.

(One of your biggest problem is that the current scripting system cannot distinguish between different kinds of self created monsters. So you'll find yourself creating workarounds all the time just for checking all the monsters to see if they are either "humans" or "zombies".)

____________________________
The best way to lose customers is to let little kids running loose on a forum with too many mod points.
02-16-2011 at 02:44 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
flapflap
Level: Roachling
Rank Points: 10
Registered: 02-16-2011
IP: Logged
icon Re: scripting new monsters ? (0)  
Tim wrote:
So, I'd suggest that if you really want to do something like that, then you should get your hands dirty with the source code. (...) Or better, write your own game.

Then the way to go for me would be getting into the source. What I plan to change would probably not take more 5% of the existing code.

Also, which engine do you guies think that I should work on ? Drod:AE (with possibility to use full existing media), Drod 2 or Drod 3 (without being allowed to use the media).


[Last edited by flapflap at 02-16-2011 04:31 PM]
02-16-2011 at 04:31 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1978
Registered: 10-23-2003
IP: Logged
icon Re: scripting new monsters ? (+3)  
http://forum.caravelgames.com/viewtopic.php?TopicID=29182

I think the elements you describe are very possible to create, although difficult.

The best way to treat these five monster types is as one monster type. There's no way to directly change one monster to another, but what you describe is really one monster with five different states. One character with five different behavior loops should give you the behavior you seek. Unfortunately, you can't change graphics for a character on the fly, so you will probably need to forego orientation graphics and instead use those same graphics to represent a single frame of a different state of this monster.

The functionality you describe is very dependent on knowing monster coordinates. This can be obtained by tweaking the first script found at http://forum.caravelgames.com/viewtopic.php?TopicID=17750). Find and replace "player" with "self".

Once you have those coordinates, you've got a start. Remember that each monster in the room will need its own set of variables (e.g MonsterOneSelfX and MonsterTwoSelfX).

Your scripts will be huge since you'll have a lot of things to check. Generating them programmatically when possible is ideal. Learning how to copy from the editor to the clipboard (Ctrl-B) and then from the clipboard to the editor (Ctrl-Shift-B) is very helpful. (Of course, I'm assuming Windows, here.)

Have you scripted anything in DROD before?

____________________________
http://beepsandbloops.wordpress.com/
02-16-2011 at 06:42 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : Development : scripting new monsters ? (possible with existing system, or require source code ?)
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.