Jump to content


Optimal I_C_T coding?


  • Please log in to reply
5 replies to this topic

#1 -jcompton-

-jcompton-
  • Guest

Posted 11 August 2002 - 07:57 AM

Wes, can you take a look at this and tell me if there's a more "optimal" way to do it? The original code in Kelsey-TOB beta results in No Valid Links if Edwin isn't around. Here's my workaround, but if there's a more efficient way to go, please let me know.

Idea is that Kelsey always interjects, and if Eddie is there, he responds to Kelsey's interject, then we continue on.

INTERJECT_COPY_TRANS BAZMONK 11 FWkintbazmonk
== J#KLS25J IF ~IsValidForPartyDialog("J#Kelsey") IsValidForPartyDialog("Edwin")~ THEN @92
== EDWIN25J IF ~IsValidForPartyDialog("J#Kelsey") IsValidForPartyDialog("Edwin")~ THEN @93
END

INTERJECT_COPY_TRANS BAZMONK 11 FWkintbazmonk
== J#KLS25J IF ~IsValidForPartyDialog("J#Kelsey") !IsValidForPartyDialog("Edwin")~ THEN @92
END

#2 weimer

weimer
  • Member
  • 1569 posts

Posted 11 August 2002 - 09:39 AM

This should work:

INTERJECT_COPY_TRANS BAZMONK 11 FWkintbazmonk
== J#KLS25J IF ~IsValidForPartyDialog("J#Kelsey")~ THEN @92
== EDWIN25J IF ~IsValidForPartyDialog("J#Kelsey") IsValidForPartyDialog("Edwin")~ THEN @93
END

Of course, sometimes my own grasp of the semantics is fuzzy, but if you look in j#kls25j, the state where he says 92 should have 1+X branches: one where Edwin is also present, and the rest are copy_trans of bazmonk 11.

Let me know if that doesn't happen.

#3 -jcompton-

-jcompton-
  • Guest

Posted 11 August 2002 - 09:55 AM

This should work:

INTERJECT_COPY_TRANS BAZMONK 11 FWkintbazmonk
== J#KLS25J IF ~IsValidForPartyDialog("J#Kelsey")~ THEN @92
== EDWIN25J IF ~IsValidForPartyDialog("J#Kelsey") IsValidForPartyDialog("Edwin")~ THEN @93
END

Of course, sometimes my own grasp of the semantics is fuzzy, but if you look in j#kls25j, the state where he says 92 should have 1+X branches: one where Edwin is also present,  and the rest are copy_trans of bazmonk 11.

Let me know if that doesn't happen.

Nope. That is in fact the code that I originally wrote.

It generates only this:

IF ~~ THEN BEGIN 112 // from:
SAY #78673 /* ~If Balthazar needed something like that, I don't think it's something I would be able to power through with my magic... it would be too specialized.~ */
IF ~IsValidForPartyDialog("J#Kelsey")
IsValidForPartyDialog("Edwin")~ THEN EXTERN ~EDWIN25J~ 14
END

So it would seem that the COPY_TRANSing is only happening at the end of the I_C_T. That wasn't your intention?

#4 weimer

weimer
  • Member
  • 1569 posts

Posted 11 August 2002 - 11:12 AM

That's a bug. Next version (soon) will have the copy_trans bits in all of the states (but above any remaining interjection possibilities).

#5 weimer

weimer
  • Member
  • 1569 posts

Posted 11 August 2002 - 11:16 AM

New verison up. Can you verify that it works? And still works in old cases?

#6 -jcompton-

-jcompton-
  • Guest

Posted 11 August 2002 - 11:24 AM

I'll write something else up for it since my current Kelsey-TOB code is sort of a mess of the old and the new stuff. What do you want to know, exactly, when you say "still works in the old cases"?