Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Stageplay Interpreter System for Shared/Continuable Action Queues (v1.01)
Author  Red Golem
Submitted / Updated  09-13-2003 / 11-22-2006
Category  Scripting routines
Expansions  SOU-1.31
View Code  

Select All Text | View Code in separate window
Format  Module and Code
Type  Type - Other
Includes  None
Description
This is essentially an in-game interpreter that allows scenes to be written in a much easier-to-understand stageplay script format, and played out. It provides for a shared interruptable and continuable action queue for the actors in the scene. It allows the writer of the scene to embed entire scenes inside objects, or fetched from a database. Also it allows the novice non-scripter playwright to be able to easily craft scenes. (version 1.01.2) There is a help forum at: http://nwn.bioware.com/guilds_registry/viewguild.html?gid=5740

Files

NameTypeSizeDownloads
stageplayv101.2.zipstageplayv101.2.zip
Submitted: 09-13-2003 / Last Updated: 10-18-2003
zip136.76Kb822
--
SCORE OUT OF 10
9.83
5 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (32):

  1  2 Next>

Posted by Elethir at 2007-04-07 14:14:14    Voted 9.50 on 04/07/07
Simply genious

Posted by Tichondrius at 2004-09-27 08:32:32    Voted 10.00 on 09/27/04
I definitly love this. Damn easy to use, very userfriendly, endless possibilities and totaly easily expandable via plugins. I vote 10, thats for sure.

Posted by mysterd at 2004-08-24 14:49:00    
I hope something like this is available in NWN2, if NWN2 doesn't support a GUI system for Cut-Scenes.

This is so easy to use and write a scene in. This is good stuff; it's like writing a play and is so simple to use. :)

For the [camera facing ], what value would work good for putting the cam...
1.up close in front of a character?
2.right up behind the character?
3.right up beside the character?
4.a distance away in front of a character?
5.a distance away behind a character?

Posted by Sethai at 2004-08-21 03:54:00    
Sorry, I am completely clueless. How is this .erf stuff supposed to work? Will anyone who uses my mod need to have it as well?

Posted by Dantreige at 2004-05-30 18:44:53    Voted 10.00 on 05/30/04
This is the easiest way to add "cool scenes and ambience to modules. Hopefully someone will make a plugin for Gestaults camera functions to make camera angles a breeze as well.

Posted by shouzama at 2004-04-06 00:25:58    Voted 10.00 on 04/06/04

Posted by shouzama at 2004-04-06 00:25:00    Voted 10.00 on 04/06/04
THIS * IS * WONDERFUL!
Thank you very much RedGolem!

Posted by Old_Scores_Transfered at 2004-02-20 10:29:30    Voted 9.00 on 02/20/04
This is a compilation of the old system into a single score. There were 14 that made this score of 9.21 then rounded to 9.

Posted by Whalebones ( ..xxx.xxx ) at 2003-12-24 04:50:00    
very great work !.. i use it a lot as it's more simple than cutscene system for party

Posted by Daeorn ( ..xxx.xxx ) at 2003-10-11 17:39:00    
Heh... I am not good at making this plugin thing... how can I make the cutscene invs for the plugin?

Posted by Daeorn ( ..xxx.xxx ) at 2003-10-10 12:57:00    
Ahh... lol ok thanks Red the system is wounderful I love it. Do you use it in abyss? Well keep the good scripts coming! See you in abyss! (btw I voted 10 :P)

Posted by Red Golem ( ..xxx.xxx ) at 2003-10-09 11:27:00    
Hey who's the joker who just voted a 1? Probably some scripter who was envious of this system, or some kid who is too dumb to figure the system out. They obviously didn't have the balls to put down who they were or why they voted a 1 while the other 5 people voted 10's.

Daeorn:
To teleport a PC, you just need to use the jump behavior on the PC like you would with any NPC actor, (use INITIATOR or NEAREST_PC for the role). And for getting a PC to go invis, simply write a plugin command for going invis and non-invis. The plugin command would not even need any parameters, and just uses the OBJECT_SELF for the actor. Or it might be simpler for you to make a new plugin command that both jumps someone to a new area and makes them invisible if that is what you want.

Posted by Daeorn ( ..xxx.xxx ) at 2003-10-09 10:35:00    
Hey Red,

I love your script! and Abysus is looking good. ;) I do have one request though for future versions. First, can you put in a command that will allow us to teleport the PC to another area to START the stageplay? Also can you make another command that lets us set the VFX that makes the PC invisable for a cutscene... I think your system is perfect for cutscenes the only problem is I cant get the PC to disapear or teleport to another area for the cutscene to work.

Thank you
Daeorn

Posted by Shade Shadowbane ( ..xxx.xxx ) at 2003-10-01 16:13:00    
Red Golem. Congratulations on a spectacular addition. I think it may be a good idea to start an NWN Guild or some such so people can share some concepts, discoveries, questions, and improvements.

Simply awesome.

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-30 20:28:00    
DJR081871 (what's up with the hard-to-type name?):

Here's a few things to check:

1. Make sure your trigger's on_enter event is pointing to the stageplay_enter script. This is a simple one that is often overlooked.

2. Do the bandits appear at all? If not, then recheck to make sure the waypoint tags are right, as well as the resrefs for the creatures.

3. Try separating the attack commands:
BanditArcher: !(attack NEAREST_PC)
Bandit: !(attack NEAREST_PC)
BanditRogue: !(attack NEAREST_PC)

4. Add the line "continuable" right after the "run only once". Sometimes that helps.

5. If that doesn't work, turn on the debugging constant in stageplay_inc, and recompile the module. That should give you a wealth of information about what's going on. Also check your log file since it might put useful debug stuff in there as well.

Though if it is just a tiny scene like this that just makes the bandits pop out at certain locations and attack the PC right away, without having them say or do anything else, you might as well just do a short normal script for it that is hooked up to an on_enter event of a floor trigger. Or even simpler, just place down three special encounter triggers and have each of their spawn points be where you want the bandit.

If you are using the stageplay syste, it might be more interesting if you give the bandits some lines like the following before attacking:

BanditRogue: ![clear Bandit]
Bandit: ![voice laugh]
Bandit: !*snickers menacingly*

BanditRogue: ![clear BanditArcher]
BanditArcher: !*notches arrow*

As for the plugin template, remember, you only need it if you want to use parameters with the plugin command. Otherwise, it is just like a normal script, with the OBJECT_SELF as the actor who called it.

The code in the plugin template is just for getting the parameters. That's all it is. If you don't need parameters, then you don't need to start with the plugin template.

Posted by DJR081871 ( ..xxx.xxx ) at 2003-09-30 00:39:00    
Quick question! Why doesn't this work?

//***CONDITIONS***
run only for pc
run only once

//***THE CAST***
//CAST WILL BE CREATED IN SCENE

//***THE SCENE***
delay = 6
[enter BanditArcher BANDIT_WP001 nw_bandit002]
[enter Bandit BANDIT_WP002 nw_bandit001]
[enter BanditRogue BANDIT_WP003 nw_bandit003]

BanditArcher, Bandit, BanditRogue:!(attack NEAREST_PC)

END

I have a floor trigger set up with this scene in its Name field. I have all the waypoints set up, such as the BANDIT_WP001, etc.

I have my PC walk through the trigger, and hang around the area, but nothing happens at all. What am I doing wrong?

Also, I looked at the plugin template and I have no clue what to do with it. Could you possibly make a novice scripter documentation for it? Maybe a little more user-friendly? I love your idea, and would like to implement it, but I don't seem to be having much luck.

Thanks

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-29 16:30:00    
There's no built-in command for those pop up conversation windows. You'd need to do an external script plug-in.

If you are not using any parameters for the external script plug-in then it is basically just like any other script that you might call with an ExecuteScript command. So how would you regularly make an NPC initiate a conversation if you were not using the Stageplay Interpreter? (ActionStartConversation) Just place that inside a script and call it from within the scene's text.

I'll write out a simple plugin command with parameters for initiating a pop-up conversation dialogue window, and send a link when it is up.

Posted by Master Mymm ( ..xxx.xxx ) at 2003-09-28 17:07:00    
Thanks for the info Red Golem. It works fine now as long as the sound is put first.
I have another question. Sorry for being a pain in the ass, but I've been away from this stuff for too long.
How do you get an actor to initiate a conversation? I've already created the conversation file named pimp_convo, and I was trying to use the line:

Pimp: [pimp_convo]

which obviously didn't work. I did look at your plug-in template, but got a little dizzy trying to figure out exactly what to do.

Thanks again

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-28 16:35:00    
Mater Mymm:

The animations play as actions (ActionPlayAnimation) rather than direct execute (PlayAnimation) which is why it waits for the action to finish before doing the next action if it is all the same actor playing it. It is done this way to make sure actions are played in the right order.

However sounds are done with a non-action command (PlaySound) wrapped in an ActionDoCommand or two.

Thus to get them simultaneous, you'll want the sound first and then the animation right after without any delay:

Woman of ill repute: [sound as_pl_chokingf1]
Woman of ill repute: !(animation bow 1.0)

You might want to experiement with changing the "[" and "(" around to get the order right.

Or you might want to just search script stageplay_inc and find instances of "ActionPlayAnimation" and change them to PlayAnimation and see how it goes.

Best of luck,

- Red Golem

Posted by Master Mymm ( ..xxx.xxx ) at 2003-09-28 12:15:00    
By the way, whether or not you have little or no scripting experience, or even if you are an amazing scripter, this little compilation of excellence is the way to go. All it requires is at least half a brain, and reading through the manual in order to use it. I made a hard-copy of the manual to reference as I write, and I think it is one of the best tools to date.
Once you use it for a while, it will start to become second nature, and you will be able to breath life into your modules like never before.
My greatest of thanks to you Red Golem for creating this brilliant tool.
I highly recommend it for everyone.

Posted by Master Mymm ( ..xxx.xxx ) at 2003-09-28 12:01:00    
I am having a problem with an actor performing an animation and having a sound play simultaneously.

Woman of ill repute: [walk NEAREST_PC]
Woman of ill repute: I have a little surprise for you!
Woman of ill repute: *snickers*
Woman of ill repute: (animation bow 1.0)
Woman of ill repute: ![sound as_pl_chokingf1]

The sound is playing after the animation is completed, while I would like the animation and sound to play at the same time. From what I've read in the manual, unless I misunderstood (figures), this should work, right? wrong? no *blocked* idea?

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-19 00:58:00    
Version 1.01 is available now. It is just a quick fix.

Fixes and changes:
1. Fix for the bug with external plugin commands not working with parameters. (Thanks for Karol)

2. Demo module now includes a useful example of an external plugin command - a generic visual effects plugin! Though I'm hoping someone will make a better version of a generic visual effects plugin.

3. NEAREST_PC can now be assigned to a role. (thanks again to Karol for the idea).

Example:

Victim = NEAREST_PC

This would assign the nearest PC to the last actor or (the initiator if no actor has had any lines yet).

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-18 22:47:00    
I'll put out a new fix release with the external plugin fix as well as include the template for external plugins. It should be up tomorrow or the day after. That should help.

Chass: If that fix to stageply_inc on line 669 and line 673 changing 'behaviorCommand' to 'command', doesn't work, then try making "invisible" just a plugin script that uses no parameters and seeing if it works.

Posted by LazerPotatoe ( ..xxx.xxx ) at 2003-09-18 15:59:00    
Very cool scripts. I love them!

I see in your docs that you say you can't add a line-break in the Name section of the triggers/etc. You actually can, you just need to use CTRL-ENTER. Hope this helps.

Some suggestions for a future version:
- modify the walk action to allow cardinal directions and distance. (ie. ACTOR walk NW 3.0) This would remove necessity for large number of waypoints in complicated scenes.
- something like [scene change ]? This could jump the PC to the new area, and continue the scene. I thought this might be cool, since it fits with the screenplay idea.
- music/lighting/weather changes?

Anyways, thanks for this -- it's great,
LP.

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-18 11:28:00    
Phervers found a good bug that will be fixed in the next release. If you call an external plugin command that has less than 16 characters for it's length it won't work. So in the meantime, the workaround is to just make your script names 16 characters in length.

This is a bug in the stageply_inc on line 669 and line 673 as Phervers discovered. Just change 'behaviorCommand' to 'command', and it will work fine.

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-17 18:01:00    
I've posted a template script for the plugin commands for the Stageplay interpreter. It should be up by tomorrow.

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-17 01:12:00    
Just one minor little modification you'll need to make. You'll need to make someone else the active actor before issuing the exit command otherwise the action queue to parse the next command disappears with the one who is exiting.

This should do the trick:
----------
// * * * CONDITIONS * * *
run only for pc
continuable
run only once

// * * * THE CAST * * *
MW = MysteryWoman
Thug1 = Thug1

// * * * THE SCENE * * *
delay = 2.0
[enter Thug1 WP_ThugPost1 thug1]
[enter MW WP_MW1 mw]
MW: [run WP_MW2]

// make Thug1 the active actor before
// having MW exit
Thug1: // just blank, but transfers active actor

[exit MW]

Thug1: She's gone!
END

Posted by Hank.McCoy ( ..xxx.xxx ) at 2003-09-17 00:08:00    
I have a quick questions regarding this script. I seem to be having difficulty with the [exit ] command. I have created two custom NPCs who both spawn in correctly, and the second runs to the correct way point, however when the second one is told to exit, the script seems to hang up. I have read the documentation many times on the exit and enter commands but nothing seems to help. The Demo works fine and the three witches disappear as they should. Can you tell me what I'm doing wrong?



// * * * CONDITIONS * * *
run only for pc
continuable
run only once

// * * * THE CAST * * *
MW = MysteryWoman
Thug1 = Thug1

// * * * THE SCENE * * *
delay = 2.0
[enter Thug1 WP_ThugPost1 thug1]
[enter MW WP_MW1 mw]
MW: [run WP_MW2]
[exit MW]
Thug1: She's gone!
END

Thanks in advance!

Posted by Red Golem ( ..xxx.xxx ) at 2003-09-16 18:30:00    
CHASS: Yes you can refer to the PC to make the PC do stuff by using the role "NEAREST_PC" for the nearest PC to the last actor, or "INITIATOR" for the PC that is the initiator (usually the one that triggered the scene). But be careful though, you'll want to set the PC so they can't mess with the action queue since this is all based on action queues for parsing the next line in the scene. This means that if you want to do lots of stuff with the PC using the system, then you'll need to make the PC cutscene dominated mode or in cutscene mode. However don't use something like SetCommandable(FALSE, oPC) since that will disable the PC from getting new actions.

PHERVERS: Yeah I'll consider it for the next version. The only problem is how would you propose the scene's writer refer to the visual effect in the scene? To specify what one wants for the visual effect would be about the same as writing the custom script for it. They would need to specify the duration type, the visual effect id/constant name, the target, and the duration. Most of of it is simple except for the constant/id name. They could just use a number to refer to the VFX_ constant's value but that is unintuitive, and something they would have to look up. Or they could type in the VFX_ constant name, but that would be cumbersome to implement something that translates hundreds of strings to numbers. You have any ideas? Since the stageplay system allows you to call external scripts with multiple parameters, one could write a new generic stageplay visual effects plugin script that does what you want without modifying the existing code at all. This script would then be able to be used by any writer using the stageplay system.

I think this is the easiest way for now, since you need to know the VFX_ constant or id anyways and can have always have more control over the visual effect, or use other effect functions. What I'm hoping is that users will build up a library of external stageplay plugin scripts that tie into the Stageplay system.

I only built into the system functionality that is more commonly used. Other functionality can easily be done using external plugin scripts.

Look at the end of section 9 in the manual (the HTML doc), for how to access the parameters from an external plugin scripts and how to call external plugin scripts.

It would actually be pretty simple to write a stageplay plugin command that takes in 4 arguments (duration_type, visual_effect_id, target_role, and duration) and make it do the visual effect. But to make it easy and intuitive to use for those who don't want to look up the duration type id number or visual effect id number is much more difficult.

If you do end up making some plugin commands that you think would be useful to others, please post.

Enjoy,

- Red Golem

Posted by Chass ( ..xxx.xxx ) at 2003-09-16 16:11:00    
One thing I think it's missing is being able to control PC's .. this script is designed for like npc's mostly.. what if I want the PC to say soemthing? or move him somewhere?

Maybe i don't know how to do it yet.. think it can be implemented? to allow control over the pc?

  1  2 Next>

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Plug-Ins


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters