RPGDot Network    
   

 
 
The Roots
Display full image
Pic of the moment
More
pics from the gallery
 
 
Site Navigation

Main
   News
   Forums

Games
   Games Database
   Top 100
   Release List
   Support Files

Features
   Reviews
   Previews
   Interviews
   Editorials
   Diaries
   Misc

Download
   Gallery
   Music
   Screenshots
   Videos

Miscellaneous
   Staff Members
   Privacy Statement

FAQ
Members
Usergroups
Mod writing.
  View previous topic :: View next topic
RPGDot Forums > Neverwinter Nights - General

Author Thread
Kiff
Protector of the Realm
Protector of the Realm




Joined: 27 Oct 2002
Posts: 257
Location: Indiana
Mod writing.
   

I just started making my first mod. I have pretty much everything down; quests, conversations, exp., zones and zoning, but I can't figure out Waypoints. Question: Is it possible to have npc's walking around, really without a point, just for looks? I mean, can I make waypoints for npc's whom I may never interact with, just so my town or city looks more lively? If so how do I do that? I can't figure waypoints. Is that the way waypoints work? Please help, it's all i'm missing.

My mod currently has 11 zones and I've placed over 1000 items/objests, and so far have 7 working quests and one is an eqic. I never thought writing a mod would be so much fun.
Post Thu Feb 19, 2004 3:11 pm
 View user's profile
goshuto
Wanderer
Wanderer




Joined: 29 May 2002
Posts: 1142
Re: Mod writing.
   

quote:
Originally posted by Kiff
Is it possible to have npc's walking around, really without a point, just for looks? I mean, can I make waypoints for npc's whom I may never interact with, just so my town or city looks more lively?


I'm not very experienced with the toolset, but making NPCs walk to waypoints is very easy.

There are several ways to do that. I think the easiest way to do that is to select a NPC in the toolset (make sure the NPC has an unique tag), then right click anywhere on the map and choose "Create Waypoint." Repeat to create more waypoints. That will create a path which the NPC will automatically travel.

For more info on waypoints, go to the NWN Lexicon and search for Walkwaypoints.
_________________
"Tree stuck in cat. Firemen baffled."--Simcity 3K
"Life can only be understood backwards; but it must be lived forwards."--Soren Aabye Kierkegaard
Post Thu Feb 19, 2004 8:07 pm
 View user's profile
Kiff
Protector of the Realm
Protector of the Realm




Joined: 27 Oct 2002
Posts: 257
Location: Indiana
   

Ok, thanks. Does the NPC go back to it's original staring position once it reaches the end of the waypoint, and then start all over? If now is there a way to make them do that? Thanks.
Post Fri Feb 20, 2004 7:51 pm
 View user's profile
ScOut3R
Tempered Warlord
Tempered Warlord




Joined: 15 Feb 2002
Posts: 299
Location: Hungary
   

Yes, if he/she reaches the last waypoint, than he/she will return to the beginning and starts it over again. Just circling around:)
_________________
Post Fri Feb 20, 2004 10:01 pm
 View user's profile
konny666
Noble Knight
Noble Knight




Joined: 03 Jul 2003
Posts: 219
Location: Babylon 6
Re: Mod writing.
   

quote:
Originally posted by Kiff
I just started making my first mod. I have pretty much everything down; quests, conversations, exp., zones and zoning, but I can't figure out Waypoints. Question: Is it possible to have npc's walking around, really without a point, just for looks? I mean, can I make waypoints for npc's whom I may never interact with, just so my town or city looks more lively? If so how do I do that? I can't figure waypoints. Is that the way waypoints work? Please help, it's all i'm missing.

My mod currently has 11 zones and I've placed over 1000 items/objests, and so far have 7 working quests and one is an eqic. I never thought writing a mod would be so much fun.


Yes, it is rather easy to make NPCs to randomly walk around without any fixed order in their movements. Walkpoints are best left for guards and the like.

First of all, make sure you are on patch version 1.61 (or higher). This adds some very useful features which makes it even easier to build mods with activity.

Now, paint down a creature you have created. Or a default BioWare creature. Since you were talking about creatures randomly walking around, it sounds like human commoners. So paint down a "Commoner, Male". Doesn't he look like a goof? Anyways, after you've painted him down, do this:

- right click him
- select "Variables"
- you will get this spreadsheet-like screen
- type "X2_L_SPAWN_USE_AMBIENT" as name, leave Type as int, put "1" into Value and then press Add
- your variable will be added and show up on the list. Press OK to close that.

Now save the module and try it out. Go near to where you put the guy. He should be wandering around aimlessly.

Other variables (added the same way that I mentioned above):

X2_L_SPAWN_USE_AMBIENT_IMMOBILE
X2_L_SPAWN_USE_STEALTH
X2_L_SPAWN_USE_SEARCH
X2_SPELL_RANDOM

The first will make the creature stand where he is but use various silly animations like laughing out loud, scratching his bum, etc.
The second and third will put the NPC in those respective modes (Stealth, Search). You can use it to place down some rogues and make them stay in stealth mode so they ambush the PCs in sneak attack.
The last will randomize NPC's spell selection. I have not tried it myself. Try putting it on your spellcaster NPCs and see what happens. They should probably be pretty high level for it to make sense. It sounds like this will prevent NPCs from using the same predictable spells over and over again, maybe to throw the PC's party off-balance.

If this mini-tutorial wasn't clear, let me know so I can try to fix it up. Cheers
Post Fri Feb 27, 2004 4:01 am
 View user's profile
konny666
Noble Knight
Noble Knight




Joined: 03 Jul 2003
Posts: 219
Location: Babylon 6
   

Oh, and just to clarify: the method goshuto pointed out uses BioWare's built-in WalkWayPoints function to make NPCs walk their way points. It's pretty obvious that it can be a very useful function for certain things: it's great for guards, and providing the illusion of busy commoners who are running an errand. But the variables I posted are useful for other things such as:

- bunch of guys standing around in an inn/tavern goofing off
- people randomly walking around a marketplace which is probably what they'd normally do
- dumb ogres and goblins milling about their camp in a forest

etc.

So ideally, you would use a combination of these various techniques to make your areas really come alive.


Last edited by konny666 on Fri Feb 27, 2004 6:51 pm; edited 1 time in total
Post Fri Feb 27, 2004 4:08 am
 View user's profile
ScOut3R
Tempered Warlord
Tempered Warlord




Joined: 15 Feb 2002
Posts: 299
Location: Hungary
   

I have a question about the sitting script. Human NPC can sit on a chair perfectly, but when i told a goblin to sit, then he made the sit animation but behind the chair, not on it. He's sitting in the air. I've tried different things, like decreasing the chair's height, but it didn't work. Does anyone know a solution?

And konny666, you helped me too:) I didn't know how to make an NPC to walk around randomly:)
_________________
Post Fri Feb 27, 2004 10:24 am
 View user's profile
konny666
Noble Knight
Noble Knight




Joined: 03 Jul 2003
Posts: 219
Location: Babylon 6
   

Glad to be of service.

Post the sitting script. It's probably only 5-6 lines long so it shouldn't be too hard to bugfix.

Also note that - generally speaking - only the playable races were treated properly by BioWare with respect to having a full range of animations. It's possible since goblins are not a playable race, they're missing some of the animations, or they weren't implemented correctly, which is why they behave weird on chairs.

Try making all the various PC races sit on your chair, including the small stature ones. See if they screw it up or do it properly. BTW are you on 1.61 or higher? I think they added a goblin head to one of the short races. You could use that in conjunction with skin coloring to create a gnome/halfling who represents a goblin, but possess a full range of animations to allow you to make a more visually appealing NPC.
Post Fri Feb 27, 2004 6:55 pm
 View user's profile
ScOut3R
Tempered Warlord
Tempered Warlord




Joined: 15 Feb 2002
Posts: 299
Location: Hungary
   

konny666: Sorry, that i'm posting the script just now (after a month) I hope you can help me though

void main()
{
object oChair=GetObjectByTag("innchair3");
object oPlayer=GetObjectByTag("csibor");

AssignCommand(oPlayer, ActionSit(oChair));
}
_________________
Post Sat Mar 27, 2004 10:56 pm
 View user's profile
goshuto
Wanderer
Wanderer




Joined: 29 May 2002
Posts: 1142
   

Another easy way I found to make a NPC walk around randomly is to add the line

code:
AssignCommand( OBJECT_SELF, ActionRandomWalk() );



somewhere in the NPC's OnSpawn script. The NPC will walk randomly until some other action is placed in his action queue.
_________________
"Tree stuck in cat. Firemen baffled."--Simcity 3K
"Life can only be understood backwards; but it must be lived forwards."--Soren Aabye Kierkegaard
Post Sun Mar 28, 2004 12:21 am
 View user's profile
konny666
Noble Knight
Noble Knight




Joined: 03 Jul 2003
Posts: 219
Location: Babylon 6
   

goshuto,

Yup, that will work until the NPC gets bumped/blocked/attacked, engaged in conversation, etc. OnSpawn only fires once for each NPC (at creation), so the next event which fires for it may negate that action. Best way to get random walking is to enable the appropriate line in the OnSpawn file ("Mobile Ambient Animations"), or just use the Right-Click, Add Variable method I mentioned above.


ScOut3R,

Ok, so with that script you posted, it should make ANY character with tag "csibor" sit on the object with tag "innchair3". Make sure there aren't duplicate creatures/objects using the same tag! That script actually looks like it should work.

But if your problem is the goblin is sitting at a funny angle, there's not a lot you can do about it without editing the goblin/chair animations in 3DSMax!

Another thing you can try is by putting "invisible objects" inside built-in tileset chairs (chairs that are fixed onto certain tile pieces, and you can't normally sit on them). Tag the invisible object like above - and make sure it is located INSIDE the tileset-chair. Try running the sit script on that. You might have to manipulate the position of the invisible object a bit to get it to work right. You can change its co-ordinates, height, direction, etc. in the toolset until you get something that looks right. This might work better than using a placeable chair. "Invisible Object" is one of the placeables in the palette. When you place it on a map, it is normally unselectable by players. But, if you make it "Usable" then it will light up when they press TAB, and they'll be able to click on it.
Post Mon Mar 29, 2004 7:48 am
 View user's profile
goshuto
Wanderer
Wanderer




Joined: 29 May 2002
Posts: 1142
   

quote:
Originally posted by konny666
Yup, that will work until the NPC gets bumped/blocked/attacked, engaged in conversation, etc. OnSpawn only fires once for each NPC (at creation), so the next event which fires for it may negate that action. Best way to get random walking is to enable the appropriate line in the OnSpawn file ("Mobile Ambient Animations"), or just use the Right-Click, Add Variable method I mentioned above.



You're right, that method should not be used for having a NPC walk around randomly endlessly. However, it could be very useful when you want the NPC to do something, then wander around aimlessly for a bit, then do something else, etc, like a NPC daily schedule, for example. (then of course it wouldn't be used in the OnSpawn event)
_________________
"Tree stuck in cat. Firemen baffled."--Simcity 3K
"Life can only be understood backwards; but it must be lived forwards."--Soren Aabye Kierkegaard
Post Tue Mar 30, 2004 7:03 pm
 View user's profile
konny666
Noble Knight
Noble Knight




Joined: 03 Jul 2003
Posts: 219
Location: Babylon 6
   

Correct, goshuto.

Actually, the beauty of NWN (IMO) is that most of the game is implemented via open-scripting. If you actually were to open up the Bioware include files (library files which has all the functions Bioware uses) you can see that the way they implement random walking in all cases is by the line you posted.

Indeed, its really the open nature of NWN which has allowed it to remain alive all this time... and should allow it to stay alive for at least another year.

If you've played some user-made mods and thought they were cool and were "better than the OCs"... you ain't seen nothing yet. In a few months, 2 major mod groups will release their "total conversions" for NWN; Dragonlance Adventures and CODI. DLA is adapting the old TSR DL1-DL4 modules for NWN, but they're making up all new creatures, tilesets, graphics, sound, audio, voicesets, going the whole nine yards. CODI is doing the same, but for the Planescape setting. They're making Sigil, again with all custom-made components. Both of those projects will have a really amazing product when its released. Part of it has to do with the fact that at least half of each the team consists of actual professionals who have day jobs in the gaming or 3D animation industries, as opposed to just being talented hobbyists.

In fact, the DLA crew seems to think that their product is worthy of being sold, rumor is that they're in negotiations with BioWare to try and make that happen... that would be really cool, since there hasn't been a Dragonlance CRPG in almost a decade.
Post Wed Mar 31, 2004 8:36 pm
 View user's profile



All times are GMT.
The time now is Tue Apr 09, 2019 2:55 am



Powered by phpBB © 2001 phpBB Group
 
 
 
All original content of this site is copyrighted by RPGWatch. Copying or reproducing of any part of this site is strictly prohibited. Taking anything from this site without authorisation will be considered stealing and we'll be forced to visit you and jump on your legs until you give it back.