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  Functional PC Copy
Author  Jeff Robertson
Submitted / Updated  11-30-2005 / 11-22-2006
Category  Creature AI
Expansions  Works on all versions
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Combat
Includes  BioWare Standard
Forums  Link
Description
This script creates a PC Copy with a script for all events. Previous attempts to make a functional PC attempts to make use of the "dummy" script. This approach uses the Dominate Person effect on a PC copy to give the copy a set of scripts. It then makes a copy of the copy which results in a non-dominated PC copy which has the scripts assigned to dominated NPC's. These scripts are the same scripts assigned to associates.

Files

NameTypeSizeDownloads
NO FILES
SCORE OUT OF 10
10
4 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 (20):

Posted by Nostrebor at 2006-04-19 14:01:21    Voted 10.00 on 04/19/06
An unashamed vote for myself

Posted by Nostrebor at 2006-04-19 13:59:11    Voted 10.00 on 04/19/06
The second question about destroying the object on death of the copy is a bit trickier. It requires modifying the "NW_CH_AC7" onDeath script to do the following:
1) recognize that this is a PC copy that is dying.
2) delete the placeable that needs to be deleted.
To do this you need to need to create a local object on the final copy that points to the object to be deleted. NW_CH_AC7 is modified to fetch this local object and if valid destroy it if it is valid (it won't be valid on a non-copy because it won't exist).

If your not a scripter this probably won't help much. I will try and put an example together.



Posted by Nostrebor at 2006-04-19 13:49:58    Voted 10.00 on 04/19/06
DD asked about using this script in a placable. I believe you need to replace "GetEnteringObject()" with "GetLastUsedBy()"

Posted by DD at 2006-04-13 11:00:07    Voted 10.00 on 04/13/06
amazing work... absolutely ingenious
request: i need the script to work on a placeable object / when pc_copy is killed, destroys object
any help would be extremely appeciated... thanks in advance

Posted by DD at 2006-04-13 10:53:27    Voted 10.00 on 04/13/06
absolutely amazing script.. love it.
first off, i'm not a scripter, but i am a builder - pretty much a copy and paste master (don't worry, i always leave thanks to all people i borrow from)

my problem here is, i have your script, but i want it to react just a tad different and i don't have the scripting knowledge needed to change it myself

what i really need is when the Pc_copy is finally killed it destroys an object
i know how to do this otherwise with regular creatures, but this is FAR beyond my comprehension - any help would most certainly be appreciated

also, it says your script acts accordingly for all events, yet i cannot get it to work by clicking on a placeable - i've tried putting it into onused and onopened, which would seem to make the only bit of sense to me

thanks in advance

Posted by EvilDaveCanada at 2006-04-10 15:29:35    
Disregard my post. I found the answer by scouring the BIOWARE site. It seems that nw_ch_aca.nss DOES NOT EXIST!! Henchmen do not rest so it is a dead name and the script was never created. Posts on BIOWARE say to either disregard the error or create an empty script to stop the error.

Posted by EvilDaveCanada at 2006-04-10 14:40:51    
I have a slightly off topic question. Where are these NW_CH_AC* scripts found? I have the Diamond Edition with only the CEP hack and no other patches installed and I can not find script NW_CH_ACA. I loaded the OC Prelude and looked at the blueprint for "Boddyknock". When I tried to edit "nw_ch_aca" listed under "OnRested" it said "Resource 'nw_ch_aca' not found, creating a new script." Could someone please explain what is wrong as I have no idea what could have nuked this script from basicly a virgin 1.66 Diamond install.

Posted by OldMansBeard at 2006-04-09 05:51:45    Voted 10.00 on 12/01/05
Just something to be aware of, an undocumented change in Patch 1.67.

In Patch 1.66 clones executed their OnSpawn scripts when created whereas in Patch 1.67 they won't. This doesn't matter for the first clone, of course, because PC's don't normally have OnSpawn scripts, but if you were relying on the second clone executing nw_ch_ac9 for any reason, you will need to force it with an ExecuteScript().

OMB
_________________________
[OHS Henchman System] [CTP Tilesets] [CleanModels 3.2]

Posted by Stonepig at 2005-12-25 20:55:13    Voted 10.00 on 12/25/05
Genius.

Posted by Stonerpig ( 69.137.xxx.xxx ) at 2005-12-25 20:53:16    
A truly excellent script.

Posted by Stonepig ( 69.137.xxx.xxx ) at 2005-12-25 20:42:45    
Thank you for the quick response, taking time out from Christmas Dinner:)
I'll try the code and give it a run. Much appreciated.

Posted by Nostrebor at 2005-12-25 17:11:03    Voted 10.00 on 04/19/06
Ok, the comment field is to short to for the code I was trying to attached. I updated the example code instead. It now makes all of the copy's items undroppable and takes away its gold.

Posted by Nostrebor at 2005-12-25 16:58:31    Voted 10.00 on 04/19/06
Last post was truncated:
void Make_Unlootable(object copy)
{
//FloatingTextStringOnCreature(GetName(copy) + " Lootable contains nothing droppable" , GetFirstPC());
object item = GetFirstItemInInventory(copy);
while (GetIsObjectValid(item))
{
SetDroppableFlag(item, FALSE);
item = GetNextItemInInventory(copy);
}
int slot;
for (slot=INVENTORY_SLOT_HEAD; slot

Posted by Nostrebor at 2005-12-25 16:54:58    Voted 10.00 on 04/19/06
Making the copy so that it does not drop anything is annoyingly complicated. Basically you must make all items in the inventory and in equipment slots undroppable. The following code will do that:


void Make_Unlootable(object copy)
{
FloatingTextStringOnCreature(GetName(copy) + " Lootable contains nothing droppable" , GetFirstPC());
object item = GetFirstItemInInventory(copy);
while (GetIsObjectValid(item))
{
SetDroppableFlag(item, FALSE);
item = GetNextItemInInventory(copy);
}
int slot;
for (slot=INVENTORY_SLOT_HEAD; slot

Posted by Stonepig ( 69.137.xxx.xxx ) at 2005-12-24 20:34:35    
Thanks for the great script, well beyond my scripting abilities.
One question though, how do I set the evilcopy to be unlootable and leave no inventory behind? I know I will need to change the default nw_ch_ac7 script, but what do I need to delete/add? Thanks again.

Posted by Nostrebor at 2005-12-22 08:32:05    Voted 10.00 on 04/19/06
The following lines (which are in the script) should make the PC-Copy hostile:

object hostile=GetObjectByTag("HOSTILE");
// make the copy hostile
ChangeFaction(evilcopy, hostile);

However for them to work a creature with the tag "HOSTILE" must exists somewhere in your module and it must be in a faction which is hostile to PC's.

If when you place your cursor on the PC-Copy and the copy shows up red, but it does not seem to attack, you may have to enable the copy to accept commands. To do this call:

SetCommandable(1, pc_copy);

Posted by elvishpiper42 ( 24.229.xxx.xxx ) at 2005-12-18 11:18:46    
I've been looking for a script like this, thanks! I am having a problem though. I can get a copy of the PC, but they aren't hostile. I put this script in front of a doorway, so the PC walks in and their copy appears. They are suppose to attack them, but no fighting going on. Any suggestions??

Posted by Nostrebor at 2005-12-01 04:36:23    Voted 10.00 on 04/19/06
Yes, the local variable is a good idea. I figured I would just show the technology to get to unique scripts for each event and other people would fill in the blanke (i.e. I left them as exercises for the student).

Posted by OldMansBeard at 2005-12-01 01:40:04    Voted 10.00 on 12/01/05
Brilliant idea !
_________________________
[OHS Henchman System] [CTP Tilesets] [CleanModels 3.2]

Posted by OldMansBeard at 2005-12-01 01:36:03    Voted 10.00 on 12/01/05
That's brilliant. I use PC clones to make custom henchmen in the OHS Henchman system and use a complicated default.nss script to give them event-driven behaviour. But your trick of clone-dominate-clone to give them scripts is a masterstroke.

Just a thought - if we set a local variable on the first clone "IsClone", say, we could use that in a switch inside customised versions of the NW_CH_AC* scripts that would trap out to special behaviour whilst leaving the behaviour of ordinary NPCs that use those scripts unchanged.

_________________________
[OHS Henchman System] [CTP Tilesets] [CleanModels 3.2]

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