Jump to content


Photo

Item replacement


3 replies to this topic

#1 Kish

Kish
  • Modders
  • 726 posts
  • Gender:Not Telling
  • Location:Rohnert Park, CA

Posted 29 January 2012 - 01:14 PM

I need a way to replace an item which already exists in the game with another item before anyone in the party touches it. Also, it needs to be done by script or by dialogue, because which version of the item exists needs to depend on something that won't be consistent from game to game. (That is, I need to replace MISC8I.itm, the note from Imnesvale, with a version addressed to Valygar if Valygar has the ranger cabin, to Minsc if Minsc has the ranger cabin, and not change it at all if the PC has the ranger cabin as per the unmodded game.)

Is there a way to do this?
"You are what you do. Choose again, and change."
--Miles Vorkosigan

"The really unforgivable acts are committed by calm men in beautiful green silk rooms, who deal death wholesale, by the shipload, without lust, or anger, or desire, or any redeeming emotion to excuse them but cold fear of some pretended future. But the crimes they hope to prevent in the future are imaginary. The ones they commit in the present--they are real."
--Aral Vorkosigan

#2 lynx

lynx
  • Modders
  • 1822 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 29 January 2012 - 01:41 PM

Use CreateItem with your logic (separate items) and DestroyItem on the original?

Edited by lynx, 29 January 2012 - 01:42 PM.

GemRB - IE anywhere.
Mages needed! Python tamers needed for iwd2!

#3 argent77

argent77
  • Members
  • 257 posts
  • Gender:Male

Posted 29 January 2012 - 03:38 PM

As lynx said, but you have to attach the script to the box which contains the item in question.

Imagination is more important than knowledge. Knowledge is limited; imagination encircles the world. - Albert Einstein

 

My contributions:


#4 Kish

Kish
  • Modders
  • 726 posts
  • Gender:Not Telling
  • Location:Rohnert Park, CA

Posted 29 January 2012 - 03:48 PM

Like putting this in the AR1107 script?

IF
GlobalGT("KishMinscRangerStronghold","GLOBAL",0)
Global("KishNoteChanged","GLOBAL",0)
THEN
RESPONSE #100
ActionOverride("Container1",CreateItem("ksminote",0,0,0))
ActionOverride("Container1",DestroyItem("misc8i"))
SetGlobal("KishNoteChanged","GLOBAL",1)
END

IF
GlobalGT("KishValygarRangerStronghold","GLOBAL",0)
Global("KishNoteChanged","GLOBAL",0)
THEN
RESPONSE #100
ActionOverride("Container1",CreateItem("ksvanote",0,0,0))
ActionOverride("Container1",DestroyItem("misc8i"))
SetGlobal("KishNoteChanged","GLOBAL",1)
END

This doesn't seem to work.

Edit: Got it! The problem is that the script for AR1107 is called AR1102.bcs, so the appending to AR1107.bcs I was doing was just trailing off into nowhere.

Thanks for your help.

Edited by Kish, 29 January 2012 - 04:57 PM.

"You are what you do. Choose again, and change."
--Miles Vorkosigan

"The really unforgivable acts are committed by calm men in beautiful green silk rooms, who deal death wholesale, by the shipload, without lust, or anger, or desire, or any redeeming emotion to excuse them but cold fear of some pretended future. But the crimes they hope to prevent in the future are imaginary. The ones they commit in the present--they are real."
--Aral Vorkosigan



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users