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  Visual Cloaks in Cloak Slot
Author  Temrek
Submitted / Updated  04-15-2003 / 11-22-2006
Category  Inventory Item
Expansions  Works on all versions
View Code  

Select All Text | View Code in separate window
Format  Module and Code
Type  Type - Other
Includes  None
Description
This script allows a builder to set up a module so any cloaks the pcs put in there cloak slot will show up on the 3d model, see readme for more details. Designed to with Kinarr Graycloaks cloak Hak (http://nwvault.ign.com/Files/hakpacks/data/1027727564467.shtml)

Files

NameTypeSizeDownloads
VisualCloaks1.zipVisualCloaks1.zip
Submitted: 04-15-2003 / Last Updated: 05-01-2003
zip76.39Kb1231
--
SCORE OUT OF 10
9.5
2 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 (24):

Posted by NewGuy ( 165.21.xxx.xxx ) at 2005-06-29 08:31:08    
I downloaded both the script and the cloak. Now i'm trying to get them to work in the OC. Added the clock hakpak into the OC, but I dun understand how to get this script to work. Can someone pls help me. What am I supposed to do with the .ERF file? I am hoping that a cloak will show up on whatever armor i equip on. Help ME! thanks

Posted by Cuthbert503 at 2005-06-11 08:04:45    Voted 10.00 on 06/11/05
.

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

Posted by Qel Chamyaar ( ..xxx.xxx ) at 2003-09-01 17:11:00    
Hi Temrek,

This is a really cool idea. I script and build for a persistent world and a couple of things about your script would not have been good for us. Too resource intensive.

I have rewritten it. Taking it off a pseudo module heartbeat and placing it on each player, given it an initial check so it won't do anything if the cloak and armor are the same as last check and some other little tweaks here and there.

If you are cool with that, I will email you a copy of my two scripts for you to check over and incorporate in your release.

And a quick question. From what I can gather the cloak hak doesn't matter. The key is that all of the armors and clothing (and cloakfiller) have a duplicate ending in "c" with a cloak model attached. Of course its easier to use Kinarr's cloaks as you have done the work for that.

Cheers

Q'el
RR-Nordock

Posted by wolfchow ( ..xxx.xxx ) at 2003-07-28 13:18:00    
nevermind. didnt realise that Lisa has removed cloaks from her padded edition. so i needed Kinarrs anyway. heh. All is working great now..

Thankyou for a great hak. :)

Posted by wolfchow ( ..xxx.xxx ) at 2003-07-28 11:33:00    
Oops had forgoten this requires Kinarrs Cloaks hak. I got it working now.. What would I have to change to make this work with Lisa's clothes horse padded?

Thanks for the good work.

Posted by wolfchow ( ..xxx.xxx ) at 2003-07-28 11:17:00    
How many files are there supposed to be with this download? When I download it I get 4. A module, 2 erfs and a readme. I assume there has to be a hak file as well? I know the module calls for one..

Thanks

Posted by Phoenix ( ..xxx.xxx ) at 2003-07-13 14:37:00    
Thanks again for fixing the problems.

You're a STAR!!!

11/10 (the extra +1 is for your great responses) :P

Good luck in whatever you are doing now.

Posted by Temrek ( ..xxx.xxx ) at 2003-07-10 16:36:00    
Another problem (and hopefully the last one) has appered and been killed, the problem was: If you equipped an item you had ID to use, the replacment of the armor could not be equipped. This code takes care of that by ID the replacement.

Replace all code in the script called checkequipment with this code:

void main()
{

object oPC=GetFirstPC();
string sArmorref;
int nArmorrefl;
while (oPC!=OBJECT_INVALID)
{
//Destoy any items PC is not supposed to have unequipped
object oItem=GetFirstItemInInventory(oPC);
while (oItem!=OBJECT_INVALID)
{
sArmorref=GetResRef(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
nArmorrefl=GetStringLength(sArmorref);
if (GetResRef(oItem)=="cloakfiller")
{
DestroyObject(oItem);
}
oItem=GetNextItemInInventory(oPC);
}
string sTag=GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
//Check if pc has a cloak.
if (FindSubString(GetTag(GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC)), "CLOAK")!=-1)
{
if (GetSubString(sArmorref, nArmorrefl - 1, nArmorrefl) == "c" || sArmorref=="cloakfiller")
{

}
else if (GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)==OBJECT_INVALID)
{
object oFiller=CreateItemOnObject("cloakfiller", oPC);
AssignCommand(oPC, ClearAllActions(FALSE));
AssignCommand(oPC, ActionEquipItem(oFiller, INVENTORY_SLOT_CHEST));
}

else if (GetSubString(sTag, GetStringLength(sTag) -1, GetStringLength(sTag)) != "c")
{
object oCA=CreateItemOnObject(GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)) + "c", oPC);
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
AssignCommand(oPC, ClearAllActions(FALSE));
SetIdentified(oCA, TRUE);
AssignCommand(oPC, ActionEquipItem(oCA, INVENTORY_SLOT_CHEST));
}


}
else if (GetSubString(sArmorref, nArmorrefl - 1, nArmorrefl) == "c")
{
object oA=CreateItemOnObject(GetSubString(sArmorref, 0 , nArmorrefl-1), oPC);
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
AssignCommand(oPC, ClearAllActions(FALSE));
SetIdentified(oA, TRUE);
AssignCommand(oPC, ActionEquipItem(oA, INVENTORY_SLOT_CHEST));
}
else if(sArmorref=="cloakfiller")
{
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
}
oPC=GetNextPC();
}
DelayCommand(3.0, ExecuteScript("checkequipment", OBJECT_SELF));
}

Posted by Temrek ( ..xxx.xxx ) at 2003-07-10 04:16:00    
Ok, unable to retive my password :(

To make it work, replace all code in the script called checkequipment with this code:

void main()
{
object oPC=GetFirstPC();
string sArmorref;
int nArmorrefl;
while (oPC!=OBJECT_INVALID)
{
//Destoy any items PC is not supposed to have unequipped
object oItem=GetFirstItemInInventory(oPC);
while (oItem!=OBJECT_INVALID)
{
sArmorref=GetResRef(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
nArmorrefl=GetStringLength(sArmorref);
if (GetResRef(oItem)=="cloakfiller")
{
DestroyObject(oItem);
}
oItem=GetNextItemInInventory(oPC);
}
string sTag=GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
//Check if pc has a cloak.
if (FindSubString(GetTag(GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC)), "CLOAK")!=-1)
{
if (GetSubString(sArmorref, nArmorrefl - 1, nArmorrefl) == "c" || sArmorref=="cloakfiller")
{

}
else if (GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)==OBJECT_INVALID)
{
object oFiller=CreateItemOnObject("cloakfiller", oPC);
AssignCommand(oPC, ClearAllActions(FALSE));
AssignCommand(oPC, ActionEquipItem(oFiller, INVENTORY_SLOT_CHEST));
}

else if (GetSubString(sTag, GetStringLength(sTag) -1, GetStringLength(sTag)) != "c")
{
object oCA=CreateItemOnObject(GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)) + "c", oPC);
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
AssignCommand(oPC, ClearAllActions(FALSE));
AssignCommand(oPC, ActionEquipItem(oCA, INVENTORY_SLOT_CHEST));
}


}
else if (GetSubString(sArmorref, nArmorrefl - 1, nArmorrefl) == "c")
{
object oA=CreateItemOnObject(GetSubString(sArmorref, 0 , nArmorrefl-1), oPC);
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
AssignCommand(oPC, ClearAllActions(FALSE));
AssignCommand(oPC, ActionEquipItem(oA, INVENTORY_SLOT_CHEST));
}
else if(sArmorref=="cloakfiller")
{
DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
}
oPC=GetNextPC();
}
DelayCommand(3.0, ExecuteScript("checkequipment", OBJECT_SELF));
}

Posted by Temrek ( ..xxx.xxx ) at 2003-07-09 14:53:00    
For some reason I had an (probubly) bug free version laying on my system that I seemed to have missed to upload, now lets see if I can retrive my password...

Posted by Phoenix ( ..xxx.xxx ) at 2003-07-07 14:52:00    
I have exactly the same problem - it constantly removes and applies the cloak over and over :\

also why when I drop a CloakFiller into the toolset and pick it up in game does it automatically delete the CloakFiller item from inventory ??

Posted by RealmForge ( ..xxx.xxx ) at 2003-07-05 10:07:00    
Hmm. I tried out the demo module. Looks like a nice script, but when I put on the clothes, then the cloak, it keeps switching between cloaked and uncloaked. Any thoughts?

Posted by Temrek ( ..xxx.xxx ) at 2003-05-04 07:38:00    
The script is updated (It might still say its 1.1 though, might have forgotten to change its name):

- Added fix below

- If the proper counterpart of an item is not found, the PC will not lose the armor just becouse they have a cloak equipped.

- Fixed issue where loading a savegame would provide worse performance.

Posted by Temrek ( ..xxx.xxx ) at 2003-04-20 14:15:00    
I have discovered a bug that was introduced in 1.1.

It causes some items to not be recognized as having a cloak and therefor may cause problems.

If you have this problem replace line 35 with:

else if (GetSubString(sTag, GetStringLength(sTag) -1, GetStringLength(sTag)) != "c")

The script to change is called "checkequipment".

As extra info: If you check the line near the end (or the last line depeding on how you see it), Starting with DelayCommand. You can see it has 3.0 by default after the first (. That is how many second between each time it checks for cloaks and changes gear accordingly. It was tested at 1.5 sec and 2.0 secm both was noticibly preformance hitting on my low end system. You are free to change that.

Redcap: Im flattered, thanks a lot. Wasnt the PC pack final? I might have missed something. Again thank you.

Posted by Redcap037 ( ..xxx.xxx ) at 2003-04-18 01:26:00    
Temrek, first off excellent work, i would like to add this to the PC PACK V3.10, which will hopefully help spread this much awaited script to a lot of PW's. and single player mod's. thank you. 10/10

Posted by Temrek ( ..xxx.xxx ) at 2003-04-17 02:26:00    
Ok, version 1.1 is out.

Changelog:
-Fixed problem decribed below.
-Fixed Demo.
-Updated readme file to relect the fix.
-Included a package with a copy of all default armors
to work with this (the default armor is named in the
right manner so all you have to do is to import the
erf for this script to work with the armor)

Posted by Temrek ( ..xxx.xxx ) at 2003-04-16 14:34:00    
I cant just stop posting messages can I?

Anyway, this is instructions on how to work around an
unexcpected error.

You see, it appers that when an item is bought from a store
its blueprint reference changes, causing the script to malufunction.

To fix the error. Replace line 36 in the script called "checkequipment"
with:
object oCA=CreateItemOnObject(GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)) + "c", oPC);

Also the naming of items becomes quite different. First,
the armor must have the same tag as it has blueprint reference, second the copy of the armor must have a blueprint reference like the tag of the original but with a c at the end.

Tested and its fixed, enjoy.

NOTE: This fix will not be necsasery for v 1.1
That version will also contain all the default bioware armor changed to fit this system.

Posted by Temrek ( ..xxx.xxx ) at 2003-04-16 13:57:00    
I just made a discovery:

The script works fine, but the demo module does not.
I forgot to attach some scripts.

To make the demo module work just open it in the toolset and follow the instructions on the part where you attach scripts to the correct event handlers. Thats what I forgot to do lol.

Posted by Temrek ( ..xxx.xxx ) at 2003-04-16 11:40:00    
And as for creating a copy of each standard armor. I might just do that tonight.

Posted by Temrek ( ..xxx.xxx ) at 2003-04-16 11:38:00    
To Dyss:

Its not so much extra work to make a copy of each piece of armor. Unless you have tons of different armors or a few have blueprint references to long to add 1 letter.

Also, in a game without 100% accurate decriptions. Visuals to help.

Lets say you play on a PW. You meet a PC with a cloak in the cloak slot, can you tell that the pc wears a cloak? No.
Grafhics just help enchance roleplaying.

Posted by Dyss ( ..xxx.xxx ) at 2003-04-16 11:29:00    
*sigh* is this WORTH it?

C'mon, nice graphics are a good addition, but I could very well live with a cape that's included in the armor slot.
There are certainly some very, very nice added visuals that coud be considered manditoray (Greycloaks own cape & hood), and yes it is quite a shame that such things as dreses and cloaks aren't included, but it is possible to make a game without them.

Now I am not at all trying to discourage moddelers but there are a lot more things to concentrate on.
Ah well just my 2cents :\

Posted by Ray ( ..xxx.xxx ) at 2003-04-16 11:18:00    
About time someone did the scripting for the cloaks. Have-not tried it yet but looking forward to it. Now it would be nice to have someone use your script as a base to come up with another script to add tunic and coat of arms to the equipment. The possibilities are open now.

Posted by lllsnakeeyeslll ( ..xxx.xxx ) at 2003-04-16 11:09:00    
Any posibility of someone creating all the required duplicate armors for all NWN standard available armors, and exporting them in an ERF. That way anyone who wants to use this script will have the default armor sets already taken care of, and then only have to deal with the ones they create.

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 Tools


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