Skip to content
Permalink
Browse files

some changes I don't remember

  • Loading branch information
burner1024 committed Dec 15, 2019
1 parent a91a90f commit 3b329c02dbdc31de91826f8cff7761d54a7d3887
@@ -75,12 +75,14 @@ END
ACTION_IF ((FILE_EXISTS_IN_GAME ~thsw2h01.itm~) AND NOT (FILE_EXISTS_IN_GAME ~g_ua_pr2.itm~)) BEGIN //only when ring +2 is unique
PRINT @16
OUTER_SET offending_state = STATE_WHICH_SAYS @101 FROM ~thalan.dlg~ //Show me what you have, and I'll tell you if it can be altered.
<<<<<<<< .../uniqueartifacts-inlined/thalan.d
REPLACE_TRANS_TRIGGER thalan BEGIN %offending_state% END BEGIN END
PRINT offending_state
PRINT ~%offending_state%~
<<<<<<<< .../ua-inlined/thalan.d
REPLACE_TRANS_TRIGGER thalan BEGIN 82 END BEGIN END
~PartyHasItem("ring06")~
~False()~
>>>>>>>>
COMPILE EVAL ~.../uniqueartifacts-inlined/thalan.d~ //Make ring +1 branch always false
COMPILE EVAL ~.../ua-inlined/thalan.d~ //Make ring +1 branch always false
END
ACTION_DEFINE_ASSOCIATIVE_ARRAY source_item_compat BEGIN
THALAN.DLG => DUMMY //don't touch Thalantyr otherwise
@@ -91,25 +93,25 @@ END
ACTION_IF (FILE_EXISTS_IN_GAME ~d1ilbrat.itm~) BEGIN
PRINT @17
OUTER_SET offending_state = 13 //Hmmmn... I couldn't rightly say. Let me have a look into yer goods, then. A minute of rummagin' and I'll know fer sure, aye?
<<<<<<<< .../uniqueartifacts-inlined/wsmith01.d
<<<<<<<< .../ua-inlined/wsmith01.d
REPLACE_TRANS_TRIGGER wsmith01 BEGIN %offending_state% END BEGIN END
~PartyHasItem("amul14")~
~False()~
>>>>>>>>
COMPILE EVAL ~.../uniqueartifacts-inlined/wsmith01.d~ //make this branch always false
COMPILE EVAL ~.../ua-inlined/wsmith01.d~ //make this branch always false
END
//Daulmakan item pack: More work for Cromwell - forbid Ring +1 > +2, Cloak of protection +1 > +2
ACTION_IF ((FILE_EXISTS_IN_GAME ~d1ilbrat.itm~) AND NOT (FILE_EXISTS_IN_GAME ~g_ua_pr2.itm~)) BEGIN //only when +2 are uniques
OUTER_SET offending_state = 13 //Hmmmn... I couldn't rightly say. Let me have a look into yer goods, then. A minute of rummagin' and I'll know fer sure, aye?
<<<<<<<< .../uniqueartifacts-inlined/wsmith02.d
<<<<<<<< .../ua-inlined/wsmith02.d
REPLACE_TRANS_TRIGGER wsmith01 BEGIN %offending_state% END BEGIN END
~PartyHasItem("ring06")~
~False()~
REPLACE_TRANS_TRIGGER wsmith01 BEGIN %offending_state% END BEGIN END
~PartyHasItem("clck01")~
~False()~
>>>>>>>>
COMPILE EVAL ~.../uniqueartifacts-inlined/wsmith02.d~
COMPILE EVAL ~.../ua-inlined/wsmith02.d~
END

//Tactics vs Daulmakan - Cloak of Balduran
@@ -130,12 +132,12 @@ END
ACTION_IF ((FILE_EXISTS_IN_GAME ~m#ruad.dlg~) AND NOT (FILE_EXISTS_IN_GAME ~g_ua_pr2.itm~)) BEGIN //only when ring +2 is unique
PRINT @20
OUTER_SET offending_state = STATE_WHICH_SAYS @102 FROM ~m#ruad.dlg~ //Just tell me what you have, and I'll tell you if it can be made better.
<<<<<<<< .../uniqueartifacts-inlined/ruad.d
REPLACE_TRANS_TRIGGER m#ruad BEGIN %offending_state% END BEGIN END
<<<<<<<< .../ua-inlined/ruad.d
REPLACE_TRANS_TRIGGER m#ruad BEGIN 5 END BEGIN END
~PartyHasItem("ring06")~
~False()~
>>>>>>>>
COMPILE EVAL ~.../uniqueartifacts-inlined/ruad.d~ //Make ring +1 branch always false
COMPILE EVAL ~.../ua-inlined/ruad.d~ //Make ring +1 branch always false
END
ACTION_DEFINE_ASSOCIATIVE_ARRAY source_item_compat BEGIN
M#RUAD.DLG => DUMMY //don't touch Ruad otherwise
@@ -4,12 +4,12 @@ ACTION_IF GAME_INCLUDES ~bg1~ BEGIN //BGT or BGEE
COPY_EXISTING ~nadari.cre~ ~override~
ADD_CRE_ITEM ~misc8j~ #0 #0 #0 ~NONE~ ~INV10~
BUT_ONLY
<<<<<<<< .../uniqueartifacts-inlined/nadari.d
<<<<<<<< .../ua-inlined/nadari.d
REPLACE_ACTION_TEXT ~nadari~
~GiveItem("boot02",LastTalkedToBy)~
~GiveItem("misc8j",LastTalkedToBy)~
>>>>>>>>
COMPILE ~.../uniqueartifacts-inlined/nadari.d~
COMPILE ~.../ua-inlined/nadari.d~

//Kondar: make unstealable from Aldeth
COPY_EXISTING ~aldeth.cre~ ~override~
@@ -21,10 +21,10 @@ REPLACE_ACTION_TEXT ~nadari~
BUT_ONLY

//Ordulinian reward for blood deeds switched from Cloak of non-detection to Cloak of protection
<<<<<<<< .../uniqueartifacts-inlined/orduli.d
<<<<<<<< .../ua-inlined/orduli.d
REPLACE_ACTION_TEXT ~orduli~ ~clck06~ ~clck01~
>>>>>>>>
COMPILE ~.../uniqueartifacts-inlined/orduli.d~
COMPILE ~.../ua-inlined/orduli.d~

END

@@ -33,14 +33,14 @@ END
ACTION_IF GAME_INCLUDES ~bg2~ BEGIN

//small bonus 2: Boots of Stealth from Samuel Thunderburp (for Mazzy) replaced with Boots of Lightning Speed or Boots of Elvenkind
<<<<<<<< .../uniqueartifacts-inlined/ffbart.d
<<<<<<<< .../ua-inlined/ffbart.d
REPLACE_ACTION_TEXT ~ffbart~
~GiveItemCreate("boot06",Player1,0,0,0)~
~GiveItemCreate("%ffbart_boot%",Player1,0,0,0)~
>>>>>>>>
ACTION_IF NOT (VARIABLE_IS_SET ffbart_boot) BEGIN // Boots of Elvenkind, set in compatibility - Almateria restored items
OUTER_SPRINT ffbart_boot ~boot10~ // default to Boots of Ligtning speed
END
COMPILE EVAL ~.../uniqueartifacts-inlined/ffbart.d~
COMPILE EVAL ~.../ua-inlined/ffbart.d~

END
@@ -22,12 +22,14 @@ ACTION_DEFINE_ASSOCIATIVE_ARRAY source_item BEGIN
BOTSMITH.BCS => DUMMY //and Cespenar
END
COPY_EXISTING_REGEXP GLOB ~^.+\.bcs$~ ~override~
PATCH_IF NOT (VARIABLE_IS_SET $source_item(~%SOURCE_FILE%~)) BEGIN
PATCH_IF NOT (VARIABLE_IS_SET $source_item(~%SOURCE_FILE%~)
AND (~%SOURCE_FILE%~ STRING_MATCHES_REGEXP "^dw#.*")) //skip long ass SCS scripts
BEGIN
DECOMPILE_AND_PATCH BEGIN
LPF REPLACE_D_AND_BAF_ITEM
STR_VAR
old_item = ~%all_items%~
new_item = ~ring06~ //ring of prot +1
new_item = ~ring10~ //gold ring
END
END
END
@@ -65,3 +65,57 @@ BEGIN
BEGIN END
~TakeItemReplace("%new_item%"%MATCH2%)~
END

DEFINE_ACTION_FUNCTION IS_ITEM_IN_RESOURCE
STR_VAR
item = ~~
resource = ~~
RET present
BEGIN
OUTER_SET present = 1
ACTION_IF ("%resource%" STRING_MATCHES_REGEXP ".*\.are$" = 0) BEGIN
LAF IS_ITEM_IN_AREA
STR_VAR item = ~%item%~ resource = ~%resource%~
RET present = present
END
END
// ACTION_IF ("%resource%" STRING_MATCHES_REGEXP ".*\.cre$" = 0) BEGIN
// LAF IS_ITEM_ON_CREATURE
// STR_VAR item = ~%item%~ resource = ~%resource%~
// RET present = present
// END
// END
// ACTION_IF ("%resource%" STRING_MATCHES_REGEXP ".*\.sto$" = 0) BEGIN
// LAF IS_ITEM_IN_STORE
// STR_VAR item = ~%item%~ resource = ~%resource%~
// RET present = present
// END
// END
// ACTION_IF ("%resource%" STRING_MATCHES_REGEXP ".*\.sto$" = 0) BEGIN
// LAF IS_ITEM_IN_DIALOG_OR_SCRIPT
// STR_VAR item = ~%item%~ resource = ~%resource%~
// RET present = present
// END
// END
END

DEFINE_ACTION_FUNCTION IS_ITEM_IN_AREA
STR_VAR
item = ~~
resource = ~~
RET present
BEGIN
COPY_EXISTING ~%resource%~ ~override~
present = 0
READ_LONG 0x78 item_off
READ_SHORT 0x76 item_num
item_size = 0x14
FOR (i=0;i<item_num;i+=1) BEGIN
READ_ASCII (item_off + i*item_size) item_name
PATCH_IF ~%item%~ STR_EQ ~%item_name%~ BEGIN
present = 1
i = item_num
END
END
BUT_ONLY
END
@@ -1,21 +1,50 @@
INCLUDE ~%MOD_FOLDER%/items/strict.txt~
ACTION_PHP_EACH source_item_strict AS index => value BEGIN
OUTER_TEXT_SPRINT $source_item(~%index%~) ~%value%~
END
COPY - ~%MOD_FOLDER%/items/strict.2da~ ~%MOD_FOLDER%-inlined/strict.2da~
READ_2DA_ENTRIES_NOW strict 2
FOR (i=1;i<strict;++i) BEGIN
READ_2DA_ENTRY_FORMER strict i 0 item
READ_2DA_ENTRY_FORMER strict i 1 source
TEXT_SPRINT $source_item("%source%") ~%item%~
TEXT_SPRINT $item_source("%item%") ~%source%~
END
BUT_ONLY

ACTION_IF (mode = 2) BEGIN
INCLUDE ~%MOD_FOLDER%/items/expanded.txt~
ACTION_PHP_EACH source_item_expanded AS index => value BEGIN
ACTION_IF VARIABLE_IS_SET $source_item_expanded(~%index%~) AND NOT VARIABLE_IS_SET $source_item_strict(~%index%~) BEGIN //expanded only
OUTER_TEXT_SPRINT $source_item(~%index%~) ~%value%~
END ELSE BEGIN //strict+expanded
OUTER_TEXT_SPRINT regex_strict $source_item_strict(~%index%~)
OUTER_TEXT_SPRINT regex_expanded $source_item_expanded(~%index%~)
OUTER_TEXT_SPRINT $source_item(~%index%~) ~%regex_strict%\|%regex_expanded%~
OUTER_SPRINT regex ~~
ACTION_PHP_EACH source_item AS source => item BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~%source%~ BEGIN //if source is from another platform, skip
OUTER_SET present = 0
LAF IS_ITEM_IN_RESOURCE
STR_VAR item = ~%item%~ resource = ~%source%~
RET present = present
END
ACTION_IF present == 1 BEGIN
ACTION_IF ~%regex%~ STR_EQ ~~ BEGIN //empty, initialize
OUTER_TEXT_SPRINT regex ~%item%~
END ELSE BEGIN
OUTER_TEXT_SPRINT regex ~%regex%\|%item%~ //append
END
END ELSE BEGIN
WARN ~UA WARNING: %item% is missing from %source%, skipping!~
END
END ELSE BEGIN
// ACTION_IF (GAME_IS ~bgt~ AND ~%source%~ STRING_MATCHES_REGEXP
WARN ~UA WARNING: %source% is not present in game, can't check for %item%!~
END
END
PRINT ~%regex%~

ACTION_PHP_EACH source_item_compat AS index => value BEGIN
OUTER_TEXT_SPRINT $source_item(~%index%~) ~%value%~
END
// ACTION_IF (mode = 2) BEGIN
// INCLUDE ~%MOD_FOLDER%/items/expanded.txt~
// ACTION_PHP_EACH source_item_expanded AS index => value BEGIN
// ACTION_IF VARIABLE_IS_SET $source_item_expanded(~%index%~) AND NOT VARIABLE_IS_SET $source_item_strict(~%index%~) BEGIN //expanded only
// OUTER_TEXT_SPRINT $source_item(~%index%~) ~%value%~
// END ELSE BEGIN //strict+expanded
// OUTER_TEXT_SPRINT regex_strict $source_item_strict(~%index%~)
// OUTER_TEXT_SPRINT regex_expanded $source_item_expanded(~%index%~)
// OUTER_TEXT_SPRINT $source_item(~%index%~) ~%regex_strict%\|%regex_expanded%~
// END
// END
// END

// ACTION_PHP_EACH source_item_compat AS index => value BEGIN
// OUTER_TEXT_SPRINT $source_item(~%index%~) ~%value%~
// END
@@ -1,25 +1,25 @@
//initialize functions
INCLUDE ~%MOD_FOLDER%/core/functions.tpa~

//compatibility
INCLUDE ~%MOD_FOLDER%/core/compatibility.tph~
INCLUDE ~%MOD_FOLDER%/core/compatibility.tpa~

PRINT @28

//custom adjustments
INCLUDE ~%MOD_FOLDER%/core/custom.tph~
INCLUDE ~%MOD_FOLDER%/core/custom.tpa~

//list items
INCLUDE ~%MOD_FOLDER%/core/items.tph~

//initialize functions
INCLUDE ~%MOD_FOLDER%/core/functions.tph~
INCLUDE ~%MOD_FOLDER%/core/items.tpa~

//remove from areas
INCLUDE ~%MOD_FOLDER%/core/areas.tph~
//remove from areas
// INCLUDE ~%MOD_FOLDER%/core/areas.tpa~

//remove from dialogs and scripts
INCLUDE ~%MOD_FOLDER%/core/d_and_baf.tph~
// //remove from dialogs and scripts
// INCLUDE ~%MOD_FOLDER%/core/d_and_baf.tpa~

//remove from stores
INCLUDE ~%MOD_FOLDER%/core/stores.tph~
// //remove from stores
// INCLUDE ~%MOD_FOLDER%/core/stores.tpa~

//remove from creatures
INCLUDE ~%MOD_FOLDER%/core/creatures.tph~
// //remove from creatures
// INCLUDE ~%MOD_FOLDER%/core/creatures.tpa~
@@ -1,5 +1,8 @@
ACTION_DEFINE_ASSOCIATIVE_ARRAY source_item_expanded BEGIN

xbow06 bernard2.sto light crossbow of speed
sw1h53 bernadr2.sto Sword of Flame +1
bgring08 sunin.cre | Evermemory | Sunin

RIBALD.STO => ~RING28\|BELT06\|SW1H53~ // Ring of Air Control, Girdle of Hill Giant Strength, Sword of Flame +1 | Ribald
TRMER02.STO => ~BELT10\|CLCK03~ // Belt of Inertial Barrier, Cloak of Displacement | Merchant in Trademeet

0 comments on commit 3b329c0

Please sign in to comment.
You can’t perform that action at this time.