![]() |
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] |
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?
|
Quote:
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. |
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:
edit: to align the script better in the quote. [ 12-30-2003, 05:42 AM: Message edited by: philip ] |
Ah cool That is similar but differnet to my first attempt:
</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">void main() { itemproperty ip = ItemPropertyAttackBonus(1); object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, GetPCSpeaker()); AddItemProperty(DURATION_TYPE_PERMANENT, ip, oItem); }</pre>[/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. |
<font face="COMIC Sans MS" size="3" color="#7c9bc4">
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....</font> [ 12-30-2003, 02:08 PM: Message edited by: MagiK ] |
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 ] |
<font face="COMIC Sans MS" size="3" color="#7c9bc4">
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.</font> [ 12-30-2003, 02:29 PM: Message edited by: MagiK ] |
You can check if an item is valid in the chest with this:
Quote:
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. |
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 :D 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] |
All times are GMT -4. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved