Jump to content


Photo

Continue()'s !!!


  • Please log in to reply
33 replies to this topic

#21 ronin

ronin
  • Modder
  • 2114 posts

Posted 04 September 2006 - 10:54 AM


So its not on every block preceding the OnCreation, just the one before it?


EVERY block before any OnCreation().


Thank You

ronin

#22 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 04 September 2006 - 10:58 AM

Folks, I am back to my original question. I think King Diamond is very clear, but I must be misunderstanding something.

This is what I think the rule is:

I have a mod that adds to an area script. The best way to insure I don't mess something up is to EXTEND_BOTTOM. If for some reason I need to EXTEND_TOP, the safest way to insure that I don't mess up someone else's work is to add Continue() to every block which goes into that E_T.

It is my responsibility as a modder to make sure that the code I write does not dramatically slow things down, by tightening conditions and only adding absolutely neccesary code to the E_T; if necessary, split stuff to E_B and only put absolutely critical blocks at the top of the script.

If it is a relatively benign set like the one I have posted above, add Continue() and be done with it.


How close am I :)?

Edited by cmorgan, 04 September 2006 - 10:59 AM.


#23 Azazello

Azazello

    The Anti-Spammer

  • Staff
  • 1912 posts

Posted 04 September 2006 - 07:13 PM

I'm sure there's massive duplication of effort going on. To contribute to it, here's a list of corrections I'm maintaining.
It shows the area script which contains OnCreation(), then mod-files that did EXTEND_TOP and thus needed updating. It should be fairly obvious which is the relevant mod.

Obviously, this list is not exhaustive. I will expand it as needed, especially if I'm missing files, or am incorrectly updating others.

Hoping you all are willing to share your updates.

~*~* AR0300 *~*~
\questpack/encounters/ding0/et_0300.baf
\ub/suna/u!0300.baf

~*~* AR0400 *~*~
\questpack/coronet/scripts/ar0400.baf
\NeJ2/Leina/scripts/aAR0400.baf
\NeJ2/Leina/scripts/aAR0400.bcs

~*~* AR0411 *~*~
\bg2fixpack\baf\ar0411.baf
\BPv176/SNIP/tAR0411.BCS
\NEJPortal/sAR0411.baf

~*~* AR0500 *~*~
\questpack/reynald/ar0500.baf
\questpack/potion/ar0500.baf

~*~* AR0700 *~*~
\AshesofEmbers\ArmourStore\AdAr0700.baf
\AshesofEmbers\ArmourStore\AdAr0700.bcs
\com_encounters\bafs\ucmg700.baf
\ruad/ruad/soaruad.baf
\ub/Kalah/U!K0700.baf
\NeJ2/Melora/sExt/aAR0700.bcs

~*~* AR0800 *~*~
\aPack\aRogue\COMPILE\AR080X.bcs
\com_encounters\bafs\ucmg800.baf
\questpack/reynald/ar0800.baf
\Xan/Scripts/AR0800.baf

~*~* AR0902 *~*~
\BG2_Tweaks/baf/ar0902.baf
\dark/scriptsadd/addmerch.bcs
\Divine_Remix/cleric/ar0902.baf
\Divine_Remix/cleric/tempus/ar0904.baf
\oversight/clerics/Kish0902.baf

~*~* AR0904 *~*~
\BG2_Tweaks/baf/ar0904.baf
\Divine_Remix/cleric/ar0904.baf
\Divine_Remix/cleric/shar/ar0904.baf
\oversight/clerics/Kish0904.baf

~*~* AR1000 *~*~
\Xan\Scripts/AR1000.baf
\CtB/scripts/append/aptp1000.BAF
\NeJ2/Leina/scripts/aAR1000.bcs

~*~* AR1200 *~*~
\com_encounters\bafs\ucmg1200.baf

~*~* AR1202 *~*~
\dark/scriptsadd/addenco.bcs
\FR_ROV\bcs\patch\AR1202.baf

~*~* AR2200 *~*~
\com_encounters\bafs\ucmg2200.baf
\Z#Misc\UstNatha\Z#UNA2200.baf

~*~* AR2500 *~*~
\solarom\sola2500.baf

~*~* AR4500 *~*~
\ascension/bcs/ar4500.bcs
\com_encounters/bafs/ucmg4500.baf
\questpack/helltest/data/ar4500.baf
\ruad/ruad/tobruad.baf
\tashia/tash4500.bcs
\ub/powers/u!4500.baf
\BPv176/ASCEND/SNIP/tAR4500.BCS

Edited by Azazello, 30 March 2008 - 09:05 AM.

"I gladly simp for jastey" -- Aza
==========================================================
"You ever notice that "What the hell?!" is the answer to just about everything?"
==========================================================

"Girls are like phones, they like to be held and talked too, but if you press the wrong button, you will be disconnected!" DJ Nikodemus
================================================================
Community Contributions
* Level 1 NPCs * gMinion: expanded TP2 for MegaInstalls * PSM (PSQM): expanded scripts for Melanthium * Shar Nadal (DSotSC-BGT) revision * non-detectable Cloak of Non-Detection ?? * Weimer's-Tactics: revised TP2 for MegaInstalls * a directory of Mega-Installation Guides *

   
   
   


#24 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 05 September 2006 - 12:59 AM

Xan/Scripts/AR0800.baf

Right. This script only comes alive in Chapter 6, after PC have visited the graveyard in Chapter 3. So it stays as it is.

Xan/Scripts/AR1000.baf

This one is updated.

#25 seanas

seanas
  • Modder
  • 1906 posts

Posted 05 September 2006 - 02:03 AM

This is what I think the rule is:

I have a mod that adds to an area script. The best way to insure I don't mess something up is to EXTEND_BOTTOM. If for some reason I need to EXTEND_TOP, the safest way to insure that I don't mess up someone else's work is to add Continue() to every block which goes into that E_T if the area script has an OnCreation() block, or if any mod with which compatibility is desired adds an OnCreation() block to that area script


"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#26 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 05 September 2006 - 01:54 PM

darn it... that means I need to do some considerable research on the Tutu front. For BG2 and BGT, I can check in here and make sure noone hits those area scripts; until then I guess I should take out those Continue() calls. Time to do some decompiling...

thak you for clarifying (I'm a liitle slow sometimes :) ).

#27 Azazello

Azazello

    The Anti-Spammer

  • Staff
  • 1912 posts

Posted 05 September 2006 - 02:05 PM

Xan/Scripts/AR0800.baf

Right. This script only comes alive in Chapter 6, after PC have visited the graveyard in Chapter 3. So it stays as it is.

AR0800.bcs contains a OnCreation().
Xan/Scripts/AR0800.baf is EXTENDed_onTOP of this.
So shouldn't Xan/Scripts/AR0800.baf get a Continue()?
Maybe it should use EXTENDed_ontheBOTTOM.

#28 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 05 September 2006 - 03:21 PM

OK, I'll contribute to match Azazello on the Tutu side, since I will be stealing all the research for BGT/BG1NPC compatability from this thread...

Decompiling all area scripts and baldur.bcs on EasyTutu_TOB after BG1NPC, Sirine's Call, Song & Silence, BG2-Tweaks, etc., etc. and running a full binary check for Continue() came up with the folowing:

---------- Find in Files ----------
> Searching for the string 'OnCreation()'...
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0100.baf(24,3):   Oncreation() //2 blocks added by TGCep1 for Tutu
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0114.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0114.baf(14,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0200.baf(15,3):   Oncreation() //1 block added by TGCep1 for Tutu
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0200.baf(27,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0307.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0308.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0500.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0600.baf(20,3):   Oncreation() //2 blocks added by TGCep1 for Tutu
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0607.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0608.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0608.baf(14,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0612.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0612.baf(14,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0613.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0614.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0615.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0616.baf(10,3):   Oncreation() //BioWare created conflict, adds 1 block
IF
  Global("EnteredIronThrone","GLOBAL",0)
THEN
  RESPONSE #100
	Startmovie("_RONTHRN")
	Setglobal("EnteredIronThrone","GLOBAL",1)
END
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0616.baf(22,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR0700.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1000.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1000.baf(11,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1100.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1100.baf(14,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1200.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1200.baf(14,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1200.baf(26,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR1300.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR2300.baf(26,3):   Oncreation() //2 blocks added by TGCep1 for Tutu
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR2600.baf(10,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR2631.baf(2,3):   Oncreation()
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR3300.baf(112,3):   Oncreation()  //8 blocks added by TGCep1 for Tutu
D:\Black Isle\BaldursGateTutu\script compiler\decompiled\_AR5001.baf(2,3):   Oncreation()
> 33 occurrence(s) have been found.
I will go back and start on NPCs next weekend, but relatively good news. Only The Grey Clan episode 1 has blocks added into area files by EXTEND_TOP where original .bcs used OnCreation(). Bioware did once, but I assume it works; it is the area movie call.

#29 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 05 September 2006 - 10:20 PM

AR0800.bcs contains a OnCreation().
Xan/Scripts/AR0800.baf is EXTENDed_onTOP of this.
So shouldn't Xan/Scripts/AR0800.baf get a Continue()?
Maybe it should use EXTENDed_ontheBOTTOM.


No, it shouldn't: blocks above "OnCreation" are false at all times when PC enters the area the first time.

#30 jastey

jastey
  • Administrator
  • 3219 posts

Posted 21 May 2007 - 11:53 AM

No, it shouldn't: blocks above "OnCreation" are false at all times when PC enters the area the first time.

I do not think what you stated is true, actually. The first block will be executed; If the first one is no "OnCreation()" it will be executed nonetheless if true; And: Without a "Continue()" in the block before a block containing "OnCreation()" this latter block will never be true.

"OnCreation()" only means it should be performed the first time the area is entered. How should a block containing "OnCreation()" disable a block before it, when the scripts are read top to bottom and the first true one is executed?

EDIT: Reading your post twice incontext lets me guess you are referring to the Xan's Mod blocks that are added to AR0800.bcs? My apologies if this is the case, but your statement is easily misunderstood if read out of context.

[I edited twice for spelling. Boy, I [i]am[/i] tired.]

Edited by jastey, 21 May 2007 - 11:58 AM.


#31 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 21 May 2007 - 12:01 PM

1) Xan mod adds a few blocks to the top of AR0800;
2) These blocks are false at all times before meeting Bodhi in chapter 6;
3) The player always enters the graveyard for the first time before meeting Bodhi in chapter 6;
4) Therefore, all these blocks will be false when the player enters the graveyard for the first time;
5) Therefore, these particular blocks added to the top of AR0800 will not interfere with OnCreation block.

#32 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 21 May 2007 - 12:02 PM

EDIT: Reading your post twice incontext lets me guess you are referring to the Xan's Mod blocks that are added to AR0800.bcs? My apologies if this is the case, but your statement is easily misunderstood if read out of context.


:) Yes, and when taken in context - that is, if you read the entire post, with the quotes and everything - it makes perfect sense.

#33 jastey

jastey
  • Administrator
  • 3219 posts

Posted 22 May 2007 - 05:00 AM

Kulyok: Not for me, as "blocks above.." sound like: "any block above" for my ESL ears. Never mind.

#34 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 24 May 2007 - 11:25 PM

~*~* AR0800 *~*~
\aPack\aRogue\COMPILE\AR080X.bcs


Fixed as of v3.5 by using EXTEND_BOTTOM instead.