Player only usable items
#1
Posted 15 February 2008 - 09:14 PM
#2
Posted 15 February 2008 - 11:17 PM
Also if the player moves the item to another character transfer it back to player1 via script.
There is no option in files to make player1 only items.
#3
Posted 16 February 2008 - 12:33 AM
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#4
Posted 16 February 2008 - 01:04 AM
Then, when it's time to drop the item(give it to a villain, put it into a container or a store, give it to PC in dialogue, whatever), you check PC's class and stats, and give him an according item.
It is complex, and it's a lot of work, and it's probably isn't worth it. But it will more or less ensure nobody else will use the item.
IWD NPC, Xan, The Sellswords, Back to Brynnlaw, Assassinations, Dungeon Crawl, Reunion, Branwen, Coran, Tiax, Xan BG1 Friendship
BG1 NPC, Romantic Encounters
#5
Posted 16 February 2008 - 07:53 AM
#6
Posted 16 February 2008 - 08:31 AM
If you really must, how about a spell which calls forth the item? The only person to have the spell/ability is Player1, and log everything off of that.
Or, set up a block in the PC's script leveraging
0x4061 HasItem(S:ResRef*,O:Object*)
Returns true only if the specified object has the specified item in its inventory.
or
0x407F HasItemEquiped(S:ResRef*,O:Object*) //check for spelling - this is from IESDP
like this:
IF
OR(5)
HasItemEquiped(MyItem,Player2)
HasItemEquiped(MyItem,Player3)
HasItemEquiped(MyItem,Player4)
HasItemEquiped(MyItem,Player5)
HasItemEquiped(MyItem,Player6)
THEN RESPONSE #100
SetGlobal("NotYourItem","GLOBAL",1)
ActionOverride(Player1,DisplayStringHead(Myself,%hey there - give me my item back, please.%)
END
IF
Global("NotYourItem","GLOBAL",1)
HasItemEquiped(MyItem,Player1)
THEN RESPONSE #100
SetGlobal("NotYourItem","GLOBAL",0)
ActionOverride(Player1,DisplayStringHead(Myself,%Thank you.%)
END
#7
Posted 16 February 2008 - 10:22 AM
Say you give Player1 the item via script. You're going to have to do it by GiveItemCreate("item",Player1,0,0,0). That will put the item in Player1's inventory, in the first available spot. If the item is undroppable, there it stays. If this is, say, a weapon, it won't work, because it can never be equipped.
As an example of this, consider Keto's bottle of wine.
"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde
berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum
#8
Posted 17 February 2008 - 04:15 AM
Oh and B yes the creation goes like that but I also used ActionOverride(Player1,FillSlot(SLOT_ARMOR)) commands to put the items where they were to be used but now thinking on it not being able to change the item, at least to put it from equiped into their pack is not so good so I'll get rid of the unmoveable flag
Edited by Oldwolf, 17 February 2008 - 04:20 AM.
#9
Posted 17 February 2008 - 06:20 AM
Players might not appreciate that.
#10
Posted 17 February 2008 - 09:36 AM
Seriously, most players are willing to work with you. If they take the armor to a shopkeep for identification, say a special shopkeep who is used to seeing weird things, like Cromwell, and he says "Aye, it don't look like much now, but I'd hang onto it if I were ye. Armor like this has a way o' growin' on ye" the player will probably keep it.
"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde
berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum
#11
Posted 17 February 2008 - 04:49 PM
W_GUI - a GUI replacement for Baldur's Gate 2/TUTU/BGT/CA
W_PackMule - Your own pack mule for Baldur's Gate 2/Tutu/BGT/CA, BGEE and BG2:EE
Psionics Unleashed - play as a Psion, mod for Baldur's Gate 2/Tutu/BGT/CA
#12
Posted 17 February 2008 - 05:32 PM
Though it'd be pretty easy to test.
With that you would have to have a script that checks the party every so often using Player2-6 because party members change and casting on all known npc's would need to be updated everytime a new npc appeared on the scene.
#13
Posted 18 February 2008 - 05:53 AM
W_GUI - a GUI replacement for Baldur's Gate 2/TUTU/BGT/CA
W_PackMule - Your own pack mule for Baldur's Gate 2/Tutu/BGT/CA, BGEE and BG2:EE
Psionics Unleashed - play as a Psion, mod for Baldur's Gate 2/Tutu/BGT/CA
#14
Posted 18 February 2008 - 06:22 AM