Jump to content


Photo

subcomponents and scripts


  • Please log in to reply
83 replies to this topic

#61 Turambar

Turambar
  • Modder
  • 935 posts

Posted 08 March 2011 - 07:04 AM

I have finally some time, and I've started working on BP again.
I've finished Orcus wand; apparently, it works (although only few characters can actually use it; it took me hours to find an npc who could use it to test it)!
A part from the icon (thanks!), I've changed the following things: I have removed dependency from main component (orcus can use a script from demogorgon if the main component isn't there and his own script can't be compiled), and added 'bypass resistance' to the darkness spell.
Have you made any other subcomponents yet (a part from the crypt king)? Otherwise, I'll re-check the dragons and move on to kangaxx

////////////////////WAND OF ORCUS//////////////////////////////
BEGIN @377

COPY ~BPv180/Orcus/COPY~   ~override~

COPY_EXISTING ~dglab01.eff~     ~override~
	WRITE_LONG 0x18 8
	WRITE_LONG 0x20 2
	WRITE_ASCII 0x30 ~DGLAB01~ #8
BUT_ONLY

COPY_EXISTING ~demnab01.cre~ ~override/orctnari.cre~
	WRITE_ASCII 0x280 ~bporctnari~ #18	//orctnari.cre, called by orctnari.eff, did not exist! It has become a nabassu; hope it's nasty enough...

COMPILE ~BPv180/Orcus/COMPILE~

ACTION_IF FILE_EXISTS_IN_GAME ~BPBAG04.sto~ BEGIN		//BPcore
	COMPILE ~BPv180/Orcus/BPorcus.baf~					//requires all IDS modifications
END

//copy existing like spellhold pile; add_area_item to container num+1
COPY_EXISTING ~ar3020.are~      ~override~         
  //SAY 0x4dc @378 it will remain as it is
	//create container
	LAUNCH_PATCH_FUNCTION fj_are_structure
		INT_VAR
			fj_type        = 2 //chest
			fj_loc_x       = 689
			fj_loc_y       = 1064
			fj_lock_diff   = 130
			fj_flags       = 0b00000001	//locked
			fj_trap_detect = 130
			fj_trap_remove_diff = 130
			fj_trap_active = 1			//trapped
			fj_box_left    = 663
			fj_box_top     = 1006
			fj_box_right   = 716
			fj_box_bottom  = 1059
			fj_trap_loc_x  = 689
			fj_trap_loc_y  = 1064
			fj_vertex_0    = 702 + (1006 << 16)
			fj_vertex_1    = 716 + (1051 << 16)
			fj_vertex_2    = 679 + (1059 << 16)
			fj_vertex_3    = 663 + (1021 << 16)
			fj_vertex_4    = 671 + (1006 << 16)
			fj_vertex_5    = 702 + (1006 << 16)
		STR_VAR
			fj_structure_type = container
			fj_name           = ~OrcusPot~
			fj_trap_script    = ~GTORC~
	END
	READ_SHORT 0x74 num	//number of containers
	//fill it
	LAUNCH_PATCH_FUNCTION ADD_AREA_ITEM//: adds an item to a container of an area. This is a PATCH macro and function.
		INT_VAR container_to_add_to = %num%	//last=newest
				charges2 = 3
				charges3 = 1
		STR_VAR item_to_add = ~WANDORC~
	END
BUT_ONLY

COPY ~BPv180/Orcus/BLUN665.ITM~     ~override/BLUN665.ITM~
  SAY NAME1 @379 
  SAY NAME2 @380

PRINT ~Adding new spells to the game ...~
SILENT
//really need spin form? could use prefix...
COPY ~BPv180/Orcus/BPSPINOR.SPL~     ~override/BPSPINOR.SPL~
  SAY NAME1 @381 
  SAY UNIDENTIFIED_DESC @382 

ADD_SPELL ~BPv180/Orcus/SPWI540.SPL~ 2 5 WIZARD_DARKNESS_15_RADIUS
  SAY NAME1 @383 
  SAY UNIDENTIFIED_DESC @384 
  SAY 0xce @385

//get the spell's new name
OUTER_SET WIZARD_DARKNESS_15_RADIUS -= 2000
OUTER_SPRINT darkness ~SPWI%WIZARD_DARKNESS_15_RADIUS%~

VERBOSE
  
COPY ~BPv180/Orcus/WANDORC.ITM~     ~override/WANDORC.ITM~
  SAY NAME1 @386 
  SAY NAME2 @380 
  SAY UNIDENTIFIED_DESC @387 
  SAY DESC @388
  WRITE_EVALUATED_ASCII 0x48e ~%darkness%~ #8

COPY ~BPv180/Orcus/ORCUS.CRE~       ~override/ORCUS.CRE~
  PATCH_IF NOT FILE_EXISTS_IN_GAME ~bporcus.bcs~ BEGIN
  	WRITE_ASCII %SCRIPT_DEFAULT% ~demogor2~		//if not BP use demogorgon's script
  END
  SAY NAME1 @389
  SAY NAME2 @389
  SAY 0xc8 ~ ~  
  SAY 0xcc ~ ~  
  SAY 0xec ~~ [DEMOG04] 
  SAY 0xf0 ~~ [DEMOG05] 
  SAY 0x10c @394
  WRITE_EVALUATED_ASCII 0x828 ~%darkness%~ #8
  WRITE_EVALUATED_ASCII 0x834 ~%darkness%~ #8
  WRITE_EVALUATED_ASCII 0x40c ~%darkness%~ #8

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#62 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 08 March 2011 - 11:00 PM

I started to look at the Ascension-related components (by fixing the original Ascension and patching those components where necessary) but didn't get too far with that, because I noticed the main component still overwrote a lot of mod-added CREs when it should be patching them. So feel free to carry on with other subcomponents. Eventually we should look to gathering together what we have, if we get to the point where that makes sense.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#63 DavidWallace

DavidWallace
  • Validating
  • 337 posts

Posted 09 March 2011 - 03:28 AM

I started to look at the Ascension-related components (by fixing the original Ascension and patching those components where necessary) but didn't get too far with that, because I noticed the main component still overwrote a lot of mod-added CREs when it should be patching them. So feel free to carry on with other subcomponents. Eventually we should look to gathering together what we have, if we get to the point where that makes sense.


Where have you got to with the new version of vanilla Ascension? (I had the impression that Erebusant's version was all-but-done, but I know the devil is often in the details...)

#64 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 09 March 2011 - 03:58 AM

Honestly, I think erebusant's version was well-done, but I wanted to reconcile it with BP's fixes, many of which are valid universally and not included in erebusant's version, and others of which are BP-specific tweaks (which we would account for within BP). I haven't had the time for a more in-depth analysis though, but I would be happy to put it out there if someone else wants to look at it. (I got it from ScuD, who got it from erebusant, who got it from whomever, so I really doubt there would be any objection to making it public or at least semi-public.)

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#65 DavidWallace

DavidWallace
  • Validating
  • 337 posts

Posted 10 March 2011 - 01:03 AM

Honestly, I think erebusant's version was well-done, but I wanted to reconcile it with BP's fixes, many of which are valid universally and not included in erebusant's version, and others of which are BP-specific tweaks (which we would account for within BP). I haven't had the time for a more in-depth analysis though, but I would be happy to put it out there if someone else wants to look at it. (I got it from ScuD, who got it from erebusant, who got it from whomever, so I really doubt there would be any objection to making it public or at least semi-public.)


That would be great.

(I'm a strong believer in not letting the best be the enemy of the good. It would be extremely valuable to have a modern version of Ascension. Perhaps there are other fixes which are implementable too, but just having a non-overwriting version that fixes the egregious bugs would already be great.)

#66 J Beau

J Beau
  • Member
  • 85 posts

Posted 10 March 2011 - 02:11 AM


Honestly, I think erebusant's version was well-done, but I wanted to reconcile it with BP's fixes, many of which are valid universally and not included in erebusant's version, and others of which are BP-specific tweaks (which we would account for within BP). I haven't had the time for a more in-depth analysis though, but I would be happy to put it out there if someone else wants to look at it. (I got it from ScuD, who got it from erebusant, who got it from whomever, so I really doubt there would be any objection to making it public or at least semi-public.)


That would be great.

(I'm a strong believer in not letting the best be the enemy of the good. It would be extremely valuable to have a modern version of Ascension. Perhaps there are other fixes which are implementable too, but just having a non-overwriting version that fixes the egregious bugs would already be great.)


I think you mean "not letting the good be the enemy of the best." If you have the best, you have nowhere to go but down. I would also greatly appreciate a modern version of Ascension.
Tempus fugit - memento mori
Time flies - remember death

#67 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 10 March 2011 - 03:18 AM

I think you mean "not letting the good be the enemy of the best."

I actually understood DavidW's original statement. To rephrase it to a statement I use: "Let us not let perfection impede progress."

I don't have a problem with someone releasing erebusant's version of Ascension, and I strongly doubt he would (it's not his mod anyway, and he has always been a champion of continuously improving existing mods). I guess it's up to ScuD (from whom I got the mod, and who had some fixes of his own) whether he wants to make the revised Ascension available on PPG (jcompton already said he would upload it). It would take me at least a couple of weeks to go through and vet it for additional changes. And the mod might be improved by others having access to do the same.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#68 ScuD

ScuD
  • Member
  • 492 posts

Posted 10 March 2011 - 09:04 AM

Of course I want it to be available :) The only other mod I know which needs an update so desperately is the Quest Pack.
I'd like you to check for any current issues and after that send the updated package to jcompton.
I'm sure everyone will be happy to have a new version of Ascension.

#69 J Beau

J Beau
  • Member
  • 85 posts

Posted 11 March 2011 - 02:00 AM

And there was much rejoicing...
Tempus fugit - memento mori
Time flies - remember death

#70 DavidWallace

DavidWallace
  • Validating
  • 337 posts

Posted 11 March 2011 - 12:15 PM

I think you mean "not letting the good be the enemy of the best."

I actually understood DavidW's original statement. To rephrase it to a statement I use: "Let us not let perfection impede progress."


That's what I meant, yes.

#71 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 13 March 2011 - 03:49 AM

I'll try to have a quick look over it then.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#72 Leonardo Watson

Leonardo Watson
  • Modder
  • 531 posts

Posted 19 March 2011 - 12:21 AM

Why not add erebusant's version of Ascension to the BWP Fixpack instead of bury them on a disk?
This way you could share the fixes with other players (they would be very grateful) and would not offend any modder by offering a modified version of his/her mod.

The fixpack only includes patch files, that are nothing more than instructions what changes are to be done to fix the mod. It's the player himself/herself who modifies the mod (okay, he certainly would use the included batch file that applies the fix automatically).

#73 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 19 March 2011 - 02:53 AM

Why not add erebusant's version of Ascension to the BWP Fixpack instead of bury them on a disk?

The problem is that (last I checked, unless I missed something) BWP doesn't even offer Ascension as an option. It offers BP-Ascension if I'm not mistaken, so this would not apply to that (though I am making some effort to reconcile the two).

The goal is to make erebusant's edit the official version of Ascension, then you can include that in the BWP.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#74 Turambar

Turambar
  • Modder
  • 935 posts

Posted 10 April 2011 - 12:22 AM

Improved Kangaxx (even though I believe he's already improved enough) only overwrote one creature, so here's his new code...
Archlich.cre does not exist, but could it be useful to prefix him anyway?
/////////////////////IMPROVED KANGAXX//////////////////////////

BEGIN @396

COPY ~BPv180/KRLICH/ARCHLICH.cre~      ~override/ARCHLICH.cre~       

COPY_EXISTING ~hldemi.cre~        ~override~  //original demi-lich!!
	WRITE_BYTE 0x58 0xfe	//save vs spell
	ADD_CRE_ITEM ~vampreg1~ #0 #0 #0 ~none~ ~amulet~
BUT_ONLY

COPY ~BPv180/KRLICH/KRDUALWF.cre~      ~override/KRDUALWF.cre~       

COPY ~BPv180/KRLICH/krdwarf.cre~       ~override/krdwarf.cre~        

COPY ~BPv180/KRLICH/KRFIGHT.cre~       ~override/KRFIGHT.cre~

COPY ~BPv180/KRLICH/KRLICH2.cre~       ~override/KRLICH2.cre~        

COMPILE ~BPv180/KRLICH/COMPILE~

EXTEND_BOTTOM ~AR0330.BCS~  ~BPv180/KRLICH/AR0330.BAF~ //it automatically turns to compile if it doesn't exist

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#75 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 10 April 2011 - 12:44 PM

Archlich.cre does not exist, but could it be useful to prefix him anyway?

I don't know - this mod has been around so long, I probably wouldn't change any names unless there's a conflict with some other mod.

If you have time to look at other things, one of the next tasks is to update the Detectable Spells code in BP and maybe see if GeN1e's update works. I am still updating Ascension so that BP-Ascension need only patch the Ascension CREs instead of installing its own version of it.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#76 Ithildur

Ithildur
  • Member
  • 179 posts

Posted 01 August 2011 - 03:58 PM


Honestly, I think erebusant's version was well-done, but I wanted to reconcile it with BP's fixes, many of which are valid universally and not included in erebusant's version, and others of which are BP-specific tweaks (which we would account for within BP). I haven't had the time for a more in-depth analysis though, but I would be happy to put it out there if someone else wants to look at it. (I got it from ScuD, who got it from erebusant, who got it from whomever, so I really doubt there would be any objection to making it public or at least semi-public.)


That would be great.

(I'm a strong believer in not letting the best be the enemy of the good. It would be extremely valuable to have a modern version of Ascension. Perhaps there are other fixes which are implementable too, but just having a non-overwriting version that fixes the egregious bugs would already be great.)



Yes and amen; I'm still waiting to play Ascension with SCSII without having to deal with the old Weidu version of the mod after 9 years of playing this game! :)

Edited by Ithildur, 01 August 2011 - 03:59 PM.


#77 Turambar

Turambar
  • Modder
  • 935 posts

Posted 18 September 2011 - 12:47 PM

I have found some time for another subcomponent; this time it's Improved Encounters: not many problems with files being overwritten, but the way scripts were patched was completely broken.

Edit: in the end, there's something about other new subcomponents.

First of all, some functions I used, and why.
REPLACE_BCS_BLOCK, which would be the most obvious choice, fails if any detail inside the block is changed by any other mod.
REPLACE_TEXTUALLY, on the other hand, is only easy to use if you want to partially alter a trigger of action, and not if you want to completely change one block.
The following function looks for a small regexp (as REPLACE_TEXTUALLY), but replaces the whole block containing it, as R_BCS_BLOCK does
(actually, I've divided the function in two parts; the first one only looks for the string, the other performs the substitution after calling the first one):
DEFINE_PATCH_FUNCTION search_baf_block
INT_VAR exact = 0 instance = 1 logging = 1
STR_VAR search = ~~ 
RET block start
BEGIN
  INNER_PATCH_SAVE search ~%search%~ BEGIN
    EVALUATE_BUFFER
  END
  FOR ( start = 0
	i = 0 ; (( %i% < %instance% ) AND ( %start% + 1 )) ; i += 1 ) BEGIN
    PATCH_IF %start% BEGIN
      start +=1
    END
    PATCH_IF %exact% BEGIN
      start = INDEX_BUFFER ( CASE_INSENSITIVE EXACT_MATCH ~%search%~ %start% )
    END ELSE BEGIN
      start = INDEX_BUFFER ( CASE_INSENSITIVE EVALUATE_REGEXP ~%search%~ %start% )
    END
  END

  PATCH_IF ( %start% + 1) BEGIN
    stop = INDEX_BUFFER ( CASE_SENSITIVE EVALUATE_REGEXP ~^ *END *$~ %start%) + 4
    READ_ASCII 0 file (%start%)
    start = RINDEX (CASE_SENSITIVE EVALUATE_REGEXP ~^ *IF *$~ ~%file%~)
    length = %stop% - %start%
    READ_ASCII %start% block (%length%)
  END ELSE BEGIN
    PATCH_IF %logging% BEGIN
      PATCH_LOG ~SEARCH_BAF_BLOCK: %INSTANCE% instances of search pattern "%search%" NOT FOUND in current string.~
    END
    SPRINT block ~~
  END

END


DEFINE_PATCH_FUNCTION search_block_replace
INT_VAR exact = 0 position = 1 on_mismatch = 0
STR_VAR search = ~~ replace = ~~
BEGIN
  //evaluate replace variable; search will be directly passed to subfunction
  INNER_PATCH_SAVE replace ~%replace%~ BEGIN
    EVALUATE_BUFFER
  END
  INNER_PATCH_SAVE search ~%search%~ BEGIN
    EVALUATE_BUFFER
  END
  //detect if script is compiled
  READ_ASCII 0 test (2)
  PATCH_IF ~%test%~ STRING_EQUAL_CASE ~SC~ BEGIN
    DECOMPILE_BCS_TO_BAF
    is_bcs = 1
  END ELSE BEGIN
    is_bcs = 0
  END
  //delete all blocks above position
  FOR (i=0
	index = (0 - 1) ; ( %index% + 1 ) OR (i = 0) ; i += 1 ) BEGIN
    PATCH_IF i <= position BEGIN
      offset = %index%
    END
    LPF search_baf_block INT_VAR exact = %exact% logging = 0 STR_VAR search = EVALUATE_BUFFER ~%search%~ RET block=block index=start END
    
    PATCH_IF ( %index% + 1) BEGIN
      DELETE_BYTES %index% ( STRING_LENGTH ~%block%~ )
    END
  END //for
  //now, there are no more blocks matching %search%. The index should point to the correct offset. If there IS a replace file, insert it.
  PATCH_IF ( STRING_LENGTH ~%replace%~ ) BEGIN
    INNER_ACTION BEGIN
      COPY - ~%replace%~ ~inlined/search_block_replace.baf~
	READ_ASCII 0 test (2)
	PATCH_IF ~%test%~ STRING_EQUAL_CASE ~SC~ BEGIN
	  DECOMPILE_BCS_TO_BAF
	END
    END
    PATCH_IF ( %offset% + 1) BEGIN
      INSERT_FILE %offset% ~inlined/search_block_replace.baf~
      PATCH_IF i < position BEGIN
	PATCH_LOG ~search_block_replace: only %i% instances of the search pattern "%search%" were found. "%replace%" file replaced instance %i% instead of %position%.~
      END
    END ELSE BEGIN //the search pattern was not found
      PATCH_MATCH on_mismatch WITH
      1 BEGIN
	APPEND_FILE ~inlined/search_block_replace.baf~
      END
      2 BEGIN
	INSERT_FILE 0 ~inlined/search_block_replace.baf~
      END
      DEFAULT
	PATCH_WARN ~WARNING: search_block_replace: search pattern "%search%" NOT FOUND!~
      END
    END
  END
  //recompile script if needed
  PATCH_IF is_bcs BEGIN
    COMPILE_BAF_TO_BCS
  END
END
Do you have any suggestion to improve these functions? I think they could be useful for other mods as well

And here's the subcomponent (requires WeiDU 23000; thanks to the bigg for his flash-fix on ASSOCIATIVE arrays).
I usually put all function definitions into a separate file and then INCLUDE it, but of course, you can put them wherever you want...
//////Improved Encounters--Gebhard Blucher and Kensai Ryu//////

BEGIN @399

INCLUDE ~BPv180/lib.tph~ //DEFINITIONS for FUNCTIONS posted above

COPY ~BPv180/GBENC/COPY~ ~override~
COMPILE ~BPv180/GBENC/COMPILE~

ACTION_DEFINE_ASSOCIATIVE_ARRAY bcs BEGIN
ar0041 , ~CreateCreature("REBAND01",[488.558],10)~ , ~~ => 1
ar0042 , ~CreateCreature("REBAND01",[488.558],10)~ , ~~ => 1
ar0042 , ~CreateCreature("RERAK01",[488.558],10)~ , nar0042 => 1
ar0043 , ~CreateCreature("REBAND01",[488.558],10)~ , ~~ => 1
ar0043 , ~CreateCreature("RERAK01",[488.558],10)~ , nar0043 => 1
ar0044 , ~CreateCreature("REBAND01",[488.558],10)~ , ~~ => 1
ar0044 , ~CreateCreature("RERAK01",[488.558],10)~ , nar0044 => 1
ar0045 , ~CreateCreature("REBAND01",[488.558],10)~ , ~~ => 1
amntrp01 , ~DisplayString(Myself,[0-9]+).*%LNL%.*CreateCreatureObjectEffect("JOLUS","",.+)~ , ~~ => 0
amntrp01 , ~SetGlobalTimer("RepTrap","GLOBAL",.+).*%LNL%.*Wait([0-9]+).*%LNL%.*DisplayString(Myself,[0-9]+).*%LNL%.*CreateCreatureObject("AMNCEN1",.+,[0-9]+,[0-9]+,[0-9]+)~ , ~namntrp1~ => 0
END

ACTION_PHP_EACH bcs AS replace => exact BEGIN
  COPY_EXISTING ~%replace_0%.bcs~ ~override~
    PATCH_IF ( STRING_LENGTH ~%replace_2%~ ) BEGIN
      SPRINT replace_2 ~BPv180/GBENC/SNIP/%replace_2%.bcs~
    END
    LPF search_block_replace INT_VAR exact = %exact% STR_VAR search = ~%replace_1%~ replace = ~%replace_2%~ END
  BUT_ONLY
END

ACTION_BASH_FOR ~BPv180/GBENC/SNIP~ ~^b.*\.bcs~ BEGIN
  OUTER_INNER_PATCH_SAVE resource ~%BASH_FOR_FILE%~ BEGIN
    DELETE_BYTES 0 1 // "b" prefix
  END
  EXTEND_BOTTOM ~%resource%~ ~%BASH_FOR_FILESPEC%~
END

EXTEND_BOTTOM ~BODHITRP.BCS~  ~BPv180/GBENC/BODHITRP.BAF~
Finally, here's the GBENC folder as I have reorganized it. There are some resources which can be removed from other BP folders (such as BP/SNIP and BP/BAF):Attached File  gbenc.7z   16.16K   170 downloads

other subcomponents

Edit: I haven't forgotten about KR's Gnome fighter/illusionist, but that's all right. Actually, I think we could remove 2 or 3 lines:
////////////Gnome Fighter/Illusionist, by Kensai Ryu///////////

BEGIN @398

COPY ~BPv180/KRGNOME/KRFAM01.cre~       ~override/KRFAM01.cre~        

COPY ~BPv180/KRGNOME/KRFAM02.cre~       ~override/KRFAM02.cre~        

COPY ~BPv180/KRGNOME/KRGNOME.cre~       ~override/KRGNOME.cre~        

COMPILE ~BPv180/KRGNOME/COMPILE~

EXTEND_BOTTOM ~AR0326.BCS~  ~BPv180/KRGNOME/AR0326.BAF~
since, from what I have experimented, EXTEND_BOTTOM automatically falls back to COMPILE if the game resource doesn't exist yet.
Same for Lich in the Docks subcomponent.
Kuroisan does not require any modification (EXTENDING_TOP baldur.bcs should not be an issue)

Red Badge:
1. A (correctly prefixed) area is added, which uses, thugh, the wed, tis, mos,... of an existing area (ar0418). Can we leave it like that or is it better to duplicate all resources?
2. The ar3000 area script is EXTENDED_TOP. In order not to break any OnCreation() blocks, I'd put a Continue() after the first block (the other two blocks require a timer set by the first one to expire, so they shouldn't trigger until all OnCreation blocks have triggered).

Edited by Turambar, 19 September 2011 - 12:30 PM.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#78 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 22 September 2011 - 11:28 PM

That code is probably beyong my ability to read easily, but I think something similar to REPLACE_TEXTUALLY *does* need to work in place of REPLACE_BCS_BLOCK, which only works if another mod hasn't messed with the intended script block (which is unlikely in a modern/BWP-style install). I recoded a lot of the main component to use the R_T but I'll admit, it was tedious work, almost as tedious as patching items and spells (I'll have to see how far I got with all that).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#79 Turambar

Turambar
  • Modder
  • 935 posts

Posted 09 October 2011 - 09:24 AM

I've had a look again to the group of subcomponents which come from old KR and GB mods.
BTW: I've only tested installation yet, not playing, since that would require much more time.
I've tried installing them with MODDER enabled, and the result was not very nice, due to lots of POSSIBLE ERRORs: missing resources.
I've found some of them, but I can't find anywhere GBvamp1a and gbvamp1b.cre (needed for Improved Encounters) (bug already reported here)

The script KRLICH.baf in Improved Kangaxx has a reference to:
- KRLICH.cre, which does not apparently exist; could that be a typo (KRlich2 exists)?
- A misterious SPMISLED spell is used
- Moreover, that component appears to depend on KR's gnome illusionist

Most of those subcomponents are similar to many components from tactics, and installing BP over tactics could lead to the mod being installed twice (I don't think vice versa, since tactics mostly overwrites stuff). Should I use something like FORBID_COMPONENT or UNINSTALL?

And, here's the Ritual, slightly edited:
///////////////////THE RITUAL, by Westley Weimer///////////////////

BEGIN @414

//FORBID_COMPONENT ~Setup-Tactics.tp2~ ~1~ ~Mod has been installed through Tactics~

//Custom, used for ritual
COPY ~BPv180/RITUAL/ar0088.are~        ~override/ar0088.are~         

COPY ~BPv180/RITUAL/ritac1.cre~        ~override/ritac1.cre~         
  SAY NAME1 @415 
  SAY NAME2 @415 

COPY ~BPv180/RITUAL/ritb1.cre~         ~override/ritb1.cre~          
  SAY NAME1 @416 
  SAY NAME2 @416 

COPY ~BPv180/RITUAL/ritbear.cre~       ~override/ritbear.cre~        

COPY ~BPv180/RITUAL/ritcount.cre~      ~override/ritcount.cre~       
  SAY NAME1 @417 
  SAY NAME2 @417 

COPY ~BPv180/RITUAL/ritd1.cre~         ~override/ritd1.cre~          
  SAY NAME1 @418 
  SAY NAME2 @418 

COPY ~BPv180/RITUAL/ritdrag.cre~       ~override/ritdrag.cre~        
  SAY NAME1 @419 
  SAY NAME2 @419 

COPY ~BPv180/RITUAL/ritend.cre~        ~override/ritend.cre~         
  SAY NAME1 @420 
  SAY NAME2 @420 

COPY ~BPv180/RITUAL/ritgol0.cre~       ~override/ritgol0.cre~        
  SAY NAME1 @421 
  SAY NAME2 @421 

COPY ~BPv180/RITUAL/ritgol1.cre~       ~override/ritgol1.cre~        
  SAY NAME1 @422 
  SAY NAME2 @422 

COPY ~BPv180/RITUAL/ritgol2.cre~       ~override/ritgol2.cre~        
  SAY NAME1 @423 
  SAY NAME2 @423 

COPY ~BPv180/RITUAL/ritgol3.cre~       ~override/ritgol3.cre~        

COPY ~BPv180/RITUAL/ritguard.cre~      ~override/ritguard.cre~       
  SAY NAME1 @424 
  SAY NAME2 @424 

COPY ~BPv180/RITUAL/riti1.cre~         ~override/riti1.cre~          
  SAY NAME1 @425 
  SAY NAME2 @425 

COPY ~BPv180/RITUAL/ritkm1.cre~        ~override/ritkm1.cre~         
  SAY NAME1 @426 
  SAY NAME2 @426 

COPY ~BPv180/RITUAL/ritkt1.cre~        ~override/ritkt1.cre~         
  SAY NAME1 @427 
  SAY NAME2 @427 

COPY ~BPv180/RITUAL/ritlion.cre~       ~override/ritlion.cre~        

COPY ~BPv180/RITUAL/ritm1.cre~         ~override/ritm1.cre~          
  SAY NAME1 @428 
  SAY NAME2 @428 

COPY ~BPv180/RITUAL/ritpont.cre~       ~override/ritpont.cre~        
  SAY NAME1 @429 
  SAY NAME2 @429 

COPY ~BPv180/RITUAL/rits1.cre~         ~override/rits1.cre~          
  SAY NAME1 @430 
  SAY NAME2 @430 

COPY ~BPv180/RITUAL/ritsf1.cre~        ~override/ritsf1.cre~         
  SAY NAME1 @431 
  SAY NAME2 @431 

COPY ~BPv180/RITUAL/ritskul1.cre~      ~override/ritskul1.cre~       
  SAY NAME1 @432 
  SAY NAME2 @432 

COPY ~BPv180/RITUAL/ritw1.cre~         ~override/ritw1.cre~          
  SAY NAME1 @433 
  SAY NAME2 @433 

COPY ~BPv180/RITUAL/ritwolf.cre~       ~override/ritwolf.cre~        

COPY ~BPv180/RITUAL/mysboot.itm~       ~override/mysboot.itm~        
  SAY NAME2 @434 
  SAY DESC @435 

COPY ~BPv180/RITUAL/ritamul.itm~       ~override/ritamul.itm~        
  SAY NAME2 @436 
  SAY DESC @437 

COPY ~BPv180/RITUAL/ritdrag.itm~       ~override/ritdrag.itm~        
  SAY NAME2 @438 
  SAY DESC @439 

COPY ~BPv180/RITUAL/ritgol.itm~        ~override/ritgol.itm~         

COPY ~BPv180/RITUAL/ritamul.spl~       ~override/ritamul.spl~        

COPY ~BPv180/RITUAL/ritskul1.spl~      ~override/ritskul1.spl~       

COPY ~BPv180/RITUAL/ritual.spl~        ~override/ritual.spl~         
  SAY NAME1 @440 
  SAY NAME2 @440 

COPY_EXISTING   ~wolfspir.itm~  ~override/wolfspir.itm~
                ~bearspir.itm~  ~override/bearspir.itm~
                ~lionspir.itm~  ~override/lionspir.itm~
  LPF ~DELETE_ITEM_EQEFFECT~ INT_VAR opcode_to_delete = 65 END     // no blur -- bugfix
BUT_ONLY_IF_IT_CHANGES

COMPILE ~BPv180/RITUAL/D~

COMPILE ~BPv180/RITUAL/BAF~

EXTEND_BOTTOM ~AR0088.BCS~  ~BPv180/RITUAL/AR0088.BAF~

EXTEND_BOTTOM ~AR3000.BCS~           ~BPv180/RITUAL/bar3000.baf~

ACTION_IF NOT FILE_EXISTS_IN_GAME ~rat01.cre~ BEGIN
	COPY ~BPv180/RITUAL/ritdrag.spl~ ~override~
END
Finally, all other subcomponents are Ascension-related: what should I do with those? Should they all depend on BP main? or just on Ascension's main component? How should BP-Asc deal with other Ascension mods around?

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#80 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 09 October 2011 - 08:37 PM

The script KRLICH.baf in Improved Kangaxx has a reference to:
- KRLICH.cre, which does not apparently exist; could that be a typo (KRlich2 exists)?
- A misterious SPMISLED spell is used
- Moreover, that component appears to depend on KR's gnome illusionist

I have no clue about those, but it seems odd there would be a krlich2 but not a krlich.

Finally, all other subcomponents are Ascension-related: what should I do with those? Should they all depend on BP main? or just on Ascension's main component? How should BP-Asc deal with other Ascension mods around?

I started to look at those but ended up editing the WeiDU Ascension instead. BP's Ascension is an alternate version of that, but I think it should depend on the WeiDU Ascension instead, and just make those changes it needs. There's some threads around here on that and I've done some comparisons and code for it but nothing finished. I could put some of it up in the workroom or something, but I've forgotten the password - will have to ask Chev or someone to give it to us again.

Any idea why this might be an issue with the Ravager in BP but not WeiDU Ascension?

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle