Jump to content


Photo

EXTEND_BOTTOM Use in Interjections


  • Please log in to reply
No replies to this topic

#1 Sir_Carnifex

Sir_Carnifex

    Scourge of Kobolds

  • Member
  • 290 posts

Posted 12 August 2012 - 06:33 PM

I just got to the interjections I coded in my four-year old script.   I can't remember exactly how I came about the code since it was so long ago, but I'm guessing it was probably taken from some tutorial or I sneaked a peek at some other mod.  Most likely the former since I started out almost entirely just using tutorials alone.  Anyway, I had....


APPEND ARNGRL01
IF ~!NumTimesTalkedTo(0)
	!InPartySlot(LastTalkedToBy,0)
	Name("CXHalbo",LastTalkedToBy)
	Global("HalboMissy","LOCALS",0)~
THEN BEGIN HalboCommentMissy
SAY ~Drop that, stumpy! Get your paws off my coats! I'll not have another one go missing to a grubby little filcher!~
IF ~~ THEN DO ~SetGlobal("HalboMissy","LOCALS",1)~ EXTERN CXHALBOJ HalboCommentMissy2
END
END

-----------------------------These two sections are actually separated into different sections of the J file.-------------------------

IF ~~ THEN BEGIN HalboCommentMissy2
SAY ~insert witty (or not) retort.~
IF ~~ THEN EXIT
END

Now, I started comparing this to another mod to see what differences there were and also, hopefully, to get a better grasp of how to go about this.  I noticed that it was similar except.... mine is missing EXTEND_BOTTOM.  Also, there's a little difference with the THEN, and an extra END at the bottom.   I went ahead and just filled in the second code with the content of the first to make it more similar.   I left out the locals though...

EXTEND_BOTTOM ARNGRL01
  IF ~!InPartySlot(LastTalkedToBy,0) Name("CXHalbo",LastTalkedToBy)~ EXTERN ARNGRL01 HalboCommentMissy
END

APPEND ARNGRL01
IF ~~ HalboCommentMissy
  SAY ~Drop that, stumpy! Get your paws off my coats! I'll not have another one go missing to a grubby little filcher!~
  IF ~~ EXTERN CXHALBOJ HalboCommentMissy2
END
END

APPEND CXHALBOJ
IF ~~ HalboCommentMissy2
  SAY ~Insert witty (or not) retort.~
  IF ~~ EXIT
END
END

So is there something critical that I'm missing in the original?  Is EXTEND_BOTTOM a necessary thing, or is this matter of preference?  And about the END... would having the extra in the second be there possibly because of the order in which dialogues are done?  Originally I followed a tutorial that puts the externs all at the top and the appends at the bottom.  I'm not sure if that makes a difference in the number of ENDs that have to be added.

Also, I think I do actually prefer putting the APPENDs and EXTERNs together than doing them separately as I originally did.  It's much, much easier to edit the text.

Thanks for any help.
"A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." - Herm Albright