Rikka Posted April 15, 2007 Share Posted April 15, 2007 Hello all, I'm working on an IWD2 mod and have been unable to add items to existing areas using the following method that supposedly works fine. Here is an example of the method that was suggested to be by veteran modders. This particular example is a test case that I created when I discovered that all of my own "official" addins failed to add the item to the proper containers, in spite of the IF block being properly appended to their ARxxxx BCS files. IF Global("NEWITEM_AR1001","LOCALS",0) THEN RESPONSE #100 ActionOverride("Hidden Brick",CreateItem("00RING11",1,0,0)) SetGlobal("NEWITEM_AR1001","LOCALS",1) END I also tried this slightly different version, without success. IF Global("NEWITEM_AR1001","LOCALS",0) THEN RESPONSE #100 GiveItemCreate("00RING11","Hidden Brick",0,0,0) SetGlobal("NEWITEM_AR1001","LOCALS",1) END I tried both EXTEND_BOTTOM and EXTEND_TOP for my BAF "compilation/adding to BCS" without success. I used the above Area (the warehouse) and container ("Hidden Brick") because it was very near the start of a new game and I knew EXACTLY which container it was. I also used the item "00RING11" in my tests because it's a very obvious and memorable item (a ruby ring) that can't be confused with the other early junk. Any suggestions as to why neither of these is working? Could this be some sort of IWD2 specific issue? And short of using DLTCEP to force my new items into the ARE files themselves, is there any other way of adding new items? FYI, I actually asked over at the WeiDU forum for them to add a new WeiDU command "ADD_ARE_ITEM", and they suggested the above (first) code fragment, rather than having to add a new command to WeiDU. Thanks in advance for any assistance that might be rendered. Link to comment
igi Posted April 15, 2007 Share Posted April 15, 2007 Which script are you appending into? If it's the area script, bear in mind that area scripts cannot have local variables... Link to comment
Nythrun Posted April 15, 2007 Share Posted April 15, 2007 You'd want Global("NEWITEM_AR1001","AR1001", 0). /edit igi is quick on the draw Link to comment
Rikka Posted April 15, 2007 Author Share Posted April 15, 2007 Thank you, thank you, thank you!!! I didn't know about Area scripts not being allowed local variables. I only copied a code fragment that I was given. Going off to test your suggestion. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.