Server Totals
Mikona - (1)
Le'Or - (0)
Ferrell - (0)
Elysia - (0)
M'Chek - (0)
Deglos - (0)
Wilderness - (0)
Visimontium - (0)
Underdark - (0)
Total players: 1
Gallery
  • Search for the Spiritkin Thistle
    Album name: DM Events
    Uploaded by: Ronan
    Uploaded: Wed Aug 20, 2014 12:07 am

Links Menu

HElp: Spawning Cats (CEP) with AI from an item.

Moderators: Nighthawk4, Dungeon Masters

HElp: Spawning Cats (CEP) with AI from an item.

PostAuthor: Starslayer_D » Wed Nov 17, 2004 12:23 pm

Ok, I seek to create a script wich spawns one of the CEP cats or kittens with the AI enabled. This script can then be atatched to an item.

Cats spawned from the DM creator seem to lack the AI.

(Item as DM reward for someone who posetively smothered all cats found with adoration and attention. :) Reward: Item spawn cat/1* day).. I just can't script it correctly. :(.
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly

Starslayer_D
Master Sage
 
Posts: 5182
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)

PostAuthor: Krator » Wed Nov 17, 2004 1:34 pm

Create a creature in the palette with the appropiate tag/res ref and scripts, (the x2_def_(name) scripts work fine for me most of the time) and let item spawn it? Like:

Code: Select all
object oCat = CreateObject((stuff))


I guess it's more a creature palette thing than a code thing.

Oh, and you cannot edit blueprints from a hak pak so you have to edit copy the cat instead of editing the blueprint.
Playing as: Sir Douglas Hope of Gorethar, old school paladin | Krator Blackfist, gold mage | Warren, half nymph barbarian
User avatar
Krator
Elder Sage
 
Posts: 4947
Joined: Thu Jun 10, 2004 6:44 pm
Location: Amsterdam
Timezone: GMT

PostAuthor: Sindol » Wed Nov 17, 2004 1:43 pm

Might be a better idea to use EffectSummonCreature() for this, so the cat ends up in your party as a summon fully automatically, instead of just being a random critter. The latter requires you keep a close eye on the faction you assign to it, the former doesn't.

edit: basic idea by Krator was right though, just make a new cat blueprint with the AI you want it assigned. Much easier than mucking around with AI scripts of critters in runtime.
So much fun,
yet so little time to enjoy it.
- Sindol
User avatar
Sindol
Team Member; Retired with Honors
 
Posts: 6487
Joined: Mon Jan 06, 2003 4:23 pm
Location: Nijmegen - Netherlands (GMT+1)

PostAuthor: Xandor Amakiir » Wed Nov 17, 2004 3:04 pm

Wauw, i would really love to have such a wand :D ... I'm a real cat lover, and think my bard would love to have one as a compannion, and if you make it so that the cat poses no threat to anything larger then mice. It would give me no extra perks...
Journeyman to the AKN
Skald of Fury
Owner of the Lore Shop "Elysia"

Stories of a 1001 planes...

Image

Image
User avatar
Xandor Amakiir
Silver Member
 
Posts: 664
Joined: Sun Jun 20, 2004 10:09 am
Location: Holland gmt +2

PostAuthor: Starslayer_D » Wed Nov 17, 2004 3:29 pm

CEP Cats: ~ 4 HP, a bit of damage. They can chew up a rat, a dire rat chews them up.

It's supposed to be a RP prop reward for excelent RP... in defense of Shroediger's kittens.. *evil grin* (not on avlis, though)
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly

Starslayer_D
Master Sage
 
Posts: 5182
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)

PostAuthor: Starslayer_D » Sat Nov 20, 2004 7:14 pm

OK, took a look at the cat in the CEP demo module. It has a walk WP script on spawn.

How do I tell a critterto simply use standard random behavor upon creation? Or rather, what Ai script should I use? (drawing a blank here :( )
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly

Starslayer_D
Master Sage
 
Posts: 5182
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)

PostAuthor: Krator » Sat Nov 20, 2004 9:00 pm

Starslayer_D wrote:OK, took a look at the cat in the CEP demo module. It has a walk WP script on spawn.

How do I tell a critterto simply use standard random behavor upon creation? Or rather, what Ai script should I use? (drawing a blank here :( )


Take a look at x2_inc_switches for nice things.

All creatures autmaticly walk their waypoints (if they have BioWare onSpawn scripts) (Right click and select "create waypoint, or for spawned creatures set waypoints with WP_(creature tag)_##), if no waypoints are present with that tag it does nothing.
Playing as: Sir Douglas Hope of Gorethar, old school paladin | Krator Blackfist, gold mage | Warren, half nymph barbarian
User avatar
Krator
Elder Sage
 
Posts: 4947
Joined: Thu Jun 10, 2004 6:44 pm
Location: Amsterdam
Timezone: GMT

PostAuthor: Aloro » Sat Nov 20, 2004 9:04 pm

Starslayer_D wrote:OK, took a look at the cat in the CEP demo module. It has a walk WP script on spawn.

How do I tell a critterto simply use standard random behavor upon creation? Or rather, what Ai script should I use? (drawing a blank here :( )


The simplest approach, and the most robust, is to make a new version of the creature with the AI you want (you'll want to edit the OnSpawn script, which is nw_c2_default9). Anything you do in the module switches will affect every creature in the module, which is too global a fix for most situations.

- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
User avatar
Aloro
Team Member; Retired with Honors
 
Posts: 12810
Joined: Sat Dec 28, 2002 5:11 am
Location: Rainbow's End

PostAuthor: Starslayer_D » Sat Nov 20, 2004 11:20 pm

Thank you Aloro.
ashzz: at the very core of the problem is that good characters and organizations can do much more EVIL in the name of good than evil can do evil.
Daerthe: There is only room for so much realism before things start to get silly

Starslayer_D
Master Sage
 
Posts: 5182
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)

PostAuthor: Gairus » Thu Dec 16, 2004 6:53 am

You get the cat wand working, star? I'd love to be able to make use of yer work and modify it slightly for something similar :)

Gairus
Team Member; Retired with Honors
 
Posts: 4009
Joined: Tue Sep 16, 2003 3:15 pm
Location: East Australia GMT +10


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]