Adding items to containers in Areas?
Greener
Member Posts: 434
This adds an item to a creature
COPY_EXISTING_REGEXP GLOB ~^_?hlkoshi\.cre$~ ~override~ REPLACE_CRE_ITEM ~katana4~ #0 #0 #0 ~NONE~ ~SHIELD~ EQUIPThis adds an item to a store
COPY_EXISTING ~wmart1.sto~ ~override/wmart1.sto~ ADD_STORE_ITEM ~Katana3~ AFTER ~wastaff~ #1 #0 #0 ~IDENTIFIED~ #1I'm trying to add an item to the container (pool 1) of area AR0310.ARE in BG2EE, how would I script this via a .tp2 file?
Post edited by Greener on
0
Comments
ar 0310.bcs
IF Global("IntoPool","ar0310",0) THEN RESPONSE #100 SetGlobal("IntoPool",ar0310",1) ActionOverride("Pool 1",CreateItem("MyItem",0,0,0)) ENDCurrently, I've written this (but it's not working)
//Added to my .tp2 file //AR0310.baf
IF Global("IntoPool","ar0310",0) THEN RESPONSE #100 SetGlobal("IntoPool","ar0310",1) ActionOverride("Pool 1",CreateItem("odachi",0,0,0)) //Odachi Continue() ENDCOPY_EXISTING AR0310.are override LPF fj_are_structure INT_VAR fj_con_itm_idx = 0 STR_VAR fj_structure_type = itm fj_name = odachi END BUT_ONLYThank you for all of your help!IF Global("IntoPool","ar0310",0) THEN RESPONSE #100 SetGlobal("IntoPool","ar0310",1) ActionOverride("Pool 1",CreateItem("odachi",0,0,0)) //Odachi Continue() ENDOne other tricky thing that happens with containers as objects in scripts is that they ignore spaces. So that ActionOverride should be directed at "Pool1" instead of "Pool 1".However, the big reason why you couldn't get this to work is that AR0310 is one of those very rare areas that doesn't have its area script assigned. You'd need to also add this to your tp2:
And sorry, the area script didn't work for you. I have an EET install and therefore every area in the game has a script assigned.
More info can be found in the WeiDU docs.
Thank you, for the examples I must admit I tried look in the WeiDU docs but got a little lost...
In you opinion is this better (or cleaner) than:
COPY_EXISTING AR0310.are override LPF fj_are_structure INT_VAR fj_con_itm_idx = 0 STR_VAR fj_structure_type = itm fj_name = odachi END BUT_ONLY