Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > Neverwinter Nights 1 & 2 Also SoU & HotU Forum
FAQ Calendar Arcade Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 12-30-2003, 01:09 AM   #1
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Hey,
I'm making a blacksmith that can enhance items on the fly. Anyone succcessfully worked with the new functions yet? I'm looking for examples to reference or insight please. [img]smile.gif[/img]
Chewbacca is offline   Reply With Quote
Old 12-30-2003, 01:58 AM   #2
SpiritWarrior
Jack Burton
 

Join Date: May 31, 2002
Location: Ireland
Posts: 5,854
Haven't looked at it much myself (too busy PVPing) but I'd check out the OC for utilization tips (drow blacksmith and wizard enhancer). Worth a shot eh?
__________________
Still I feel like a child when I look at the moon, maybe I grew up a little too soon...
SpiritWarrior is offline   Reply With Quote
Old 12-30-2003, 02:05 AM   #3
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Quote:
Originally posted by SpiritWarrior:
Haven't looked at it much myself (too busy PVPing) but I'd check out the OC for utilization tips (drow blacksmith and wizard enhancer). Worth a shot eh?
Yeah, I did but its kinda funky and not straight forward the way they did it. I'm too much of a basic scripter to wrap my brain totally around how they did it in the OC.

I have been working on the seat of my pants in the script editor all day and night and have had success adding +1 to a weapon so I think I have the basics down. I plan on further expirimenting/testing and hope to find some other people's more or less basic scripts to compare my work too.
Chewbacca is offline   Reply With Quote
Old 12-30-2003, 05:40 AM   #4
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
I quickly did this to test with a lever. You could change the GetLastUsedBy() to GetPCSpeaker(), and change the item property to what you want and apply it to the Actions Taken tab.

Quote:

void main()
{
AddItemProperty(DURATION_TYPE_PERMANENT, ItemPropertyDamageBonus(
IP_CONST_DAMAGETYPE_ACID, IP_CONST_DAMAGEBONUS_2d8),
GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, GetLastUsedBy()));
}
The OC is so complicated cause there's the small cutscene in which you're weapon is taken out of your inventory. I think the OC is nice to see how some things work but that everything can be a lot shorter if you write it yourself

edit: to align the script better in the quote.

[ 12-30-2003, 05:42 AM: Message edited by: philip ]
philip is offline   Reply With Quote
Old 12-30-2003, 01:31 PM   #5
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Ah cool That is similar but differnet to my first attempt:

code:
void main()
{
itemproperty ip = ItemPropertyAttackBonus(1);

object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, GetPCSpeaker());

AddItemProperty(DURATION_TYPE_PERMANENT, ip, oItem);
}
[/QUOTE]my main issue, the one I am inexpirienced at, is the checks to insure it is a valid item, ect. I think I would use an "If/Then" type thingy (can you tell Im a novice coder?) but I just haven't gotten their yet.

Also I wonder how to do this by placing an item in, lets say a chest, and applying enhancments to it. That will be my next attempt/expiriment.
Chewbacca is offline   Reply With Quote
Old 12-30-2003, 02:06 PM   #6
MagiK
Guest
 

Posts: n/a

Chewey, are you only interested in creating items from within the game engine or creating them and then placing them in chests to be picked up by the person you want to have them?

There is a much easier way to create items if that is all you are trying to do....sorry if I missed the point. The scripting would be a handy skill, if you were going to make a whole module for people to run through but creating the items for specific characters is a quick and easy process....


[ 12-30-2003, 02:08 PM: Message edited by: MagiK ]
  Reply With Quote
Old 12-30-2003, 02:12 PM   #7
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
The idea is to have a placeable that when a player puts something in the placeables inventory a conversation starts up that provides various options to enchant the item based on what kind of item it is.

Its basically a blacksmith script driven by what is put in a placeables inventory rather than what is in the player's hand or on their back.

Make sense? [img]smile.gif[/img]

[ 12-30-2003, 02:12 PM: Message edited by: Chewbacca ]
Chewbacca is offline   Reply With Quote
Old 12-30-2003, 02:28 PM   #8
MagiK
Guest
 

Posts: n/a

Ohhh yeah that does sound cool. [img]smile.gif[/img]

I gave up on the scripting and just have been focused on making custom items with the tools and putting them in my leveler mod chests and armoir's to be picked up by whatever character I run through it.

If you ever get it working Id be interested in getting a copy of the code/mod.


[ 12-30-2003, 02:29 PM: Message edited by: MagiK ]
  Reply With Quote
Old 12-30-2003, 03:25 PM   #9
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
You can check if an item is valid in the chest with this:

Quote:

void main()
{
object oChest= GetObjectByTag("Chest");
object oItem = GetFirstItemInInventory(oChest);

if (oItem!=OBJECT_INVALID)
{
//do stuff here like starting a conversation
}
}
If you want to check the number of item properties you can make a loop through the item properties, counting it and making the option unavailable when there are 8 properties.

I think there's a GetFirstItemProperty and GetNextItemProperty. If you need I can take a look at that later but I have limited time now.

To look at the different items I think there's no other option than to divide all the BASE_ITEM_... constants into weapons armor etc and list them all in the check (that's going to be a huge list but I can't find any other way)

You can put the check if there are items in the chest in the OnClosed event, that'll be the right time to check and start a conversation if necessary.
philip is offline   Reply With Quote
Old 12-30-2003, 03:57 PM   #10
Chewbacca
Zartan
 

Join Date: July 18, 2001
Location: America, On The Beautiful Earth
Age: 50
Posts: 5,373
Hey thanks Philip, [img]smile.gif[/img] that helps a ton! I knew some of that already but having it laid out like that infront of me is quite handy and helpful!

There is an include file (x2_inc_itemprop.nss) that is referenced in a sticky thread concerning the new scripting functions here at the Bioware scripting forum. I was going through this include file last night and I beleive (iirc) it already has the BASE_ITEM_... check list made for easy cut n paste. I'll make an attempt and post my results for feedback later! I cant wait to get home and get busy1

Magik: I plan on including this blacksmith placeable in the character modifyer/epuiper module I am crafting, and I also plan to upload this blacksmith placeable and it accompanying scripts seperate from the mod as an prefab .erf to the vault as well. I will make a post when it is all said and done! [img]smile.gif[/img]
Chewbacca is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
anybody remember wiz 7 functions ashara Miscellaneous Games (RPG or not) 1 01-03-2004 04:56 PM
Editing right-click functions Nanobyte General Conversation Archives (11/2000 - 01/2005) 3 10-08-2003 01:17 AM
Math help (algebraic functions) Nanobyte General Conversation Archives (11/2000 - 01/2005) 4 08-13-2003 03:18 AM
item property description stuff Downunda Neverwinter Nights 1 & 2 Also SoU & HotU Forum 3 03-05-2003 07:54 PM
Scripting, Shops, and Advanced Item Questions Dakkon Darkblade Baldurs Gate II: Shadows of Amn & Throne of Bhaal 6 03-11-2002 09:08 AM


All times are GMT -4. The time now is 09:55 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved