Jump to content

Small Valygar issue


Guest Luigirules

Recommended Posts

Guest Luigirules

When you talk to Valygar the very first time and turn him hostile, he attacks you, everyone knows that.

 

However, when I was doing this, I fought him with only my bard, so I didn't kill him very quickly. As a result, he started casting a healing spell.

 

Imagine my surprise when he healed my character instead of himself.

 

TL;DR: When Valygar casts healing spells when you are attacking him, he heals you instead of himself.

Link to comment

This particular abuse of object parameters broke in a different and less interesting way when I'd tested it.

 

/edit

 

Better reweight planksuck.cre's LastSeenBy too - juuuuuust in case.

 

COPY_EXISTING ar0602.bcs   override
 DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~^  \(HPPercentLT(\)MostDamagedOf(Myself)\(,25)\)~
~ OR(6) \1Player1\2 \1Player2\2 \1Player3\2 \1Player4\2 \1Player5\2 \1Player6\2~
 COMPILE_BAF_TO_BCS
BUT_ONLY

COPY_EXISTING ~scripts/fighter2.bs~ scripts
		  devaevil.bcs override
		  devagood.bcs override
		  fighter2.bcs override
		  plangood.bcs override
 DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~^  \(ActionListEmpty()\)%lnl%  \(HPPercentLT\)~ ~ \1 See([PC]) \2~
REPLACE_TEXTUALLY ~^  \(HPPercentLT(MostDamagedOf(Myself),25)\)%lnl%  \(See(\[PC\])\)~ ~ HaveSpell(CLERIC_HEAL) \2 \1~
REPLACE_TEXTUALLY ~MostDamagedOf(Myself)~ ~MostDamagedOf(LastSeenBy(Myself))~
 COMPILE_BAF_TO_BCS
BUT_ONLY

COPY_EXISTING minscx.bcs   override
		  valvsed.bcs  override
		  valygx.bcs   override
 REPLACE_TEXTUALLY ~^0 0 0 0 0 0 0 1 6 0 0 0 ""OB~ ~0 0 0 0 0 0 0 1 0 0 0 0 ""OB~
BUT_ONLY

COPY_EXISTING mistho.bcs   override
		  mistva.bcs   override
 DECOMPILE_BCS_TO_BAF
REPLACE_TEXTUALLY ~(\(MostDamagedOf\|WeakestOf\|WorstAC\)(Myself)~ ~(\1(NearestEnemyOf(Myself))~
 COMPILE_BAF_TO_BCS
BUT_ONLY

Link to comment

MostDamagedOf() should be fine (MostDamagedOf(LastSeenBy()) shouldn't make any difference). This object will only ever return PCs. (Same with Weakest/Strongest/Best|WorstAC.)

 

Fighter2.BCS should be unused (player scripts ended up in BCS for whatever reason).

 

AR0602 should be fine; the planetars could just use an Allegiance(Myself,4) check; the NPCX combats can just target self (that looks like your BCS change); and the mists could just check Allegiance(Myself,255) (although they could also just check See(NearestEnemyOf()) so they don't wander across the entire map to get you when nobody is even around).

Link to comment

MostDamagedOf(DontBotherFillingThisOut) should be fine, yeah. I'm not sure it always is.

 

COPY_EXISTING neeber.cre ~override/nuuber.cre~
 WRITE_ASCIIE 0x248 ~%DEST_RES%~ #8
 WRITE_ASCIIE 0x280 ~%DEST_RES%~ #32

<<<<<<<<nuuber.baf
IF
 True()
THEN
 RESPONSE #100
DisplayString(MostDamagedOf([EVILCUTOFF]),1)
END
>>>>>>>>

COMPILE nuuber.baf

 

Consoling nuuber in after a fresh game start, no string is displayed on anyone at all.

 

What specs it's really looking at, I don't know, but it seemed easier to smash this business with a hammer than figure out where it's going south.

 

I'll look at it some more, though, if I'm not beaten to it.

 

/edit

 

Second try, nuuber still runs no string. Console in Valygar, tick him off, scrap a bit - when he gets injured enough he heals Player1 and then nuuber starts piping up.

 

I don't get it.

 

/more edits

 

Hmm, MostDamagedOf([EVILCUTOFF]) appears to require a hostile creature be in visible range of the actor running the script or it's undefined - after which it refers to Player[1-6] normally.

 

/ex POST facto

 

This is twice I've gotten valygx.bcs to make Valygar stand around uselessly when it's time for him to do his healing, and both Immy and Charname are standing, visible, right next to him.

Link to comment

Okies, I'm taking my freakout off of the boards for a bit for some privacy.

 

minscx.bcs, valvsed.bcs, valygx.bcs, are genuine and simple bugs.

 

A See(NearestEnemyOf()) is much better than what I was doing for the mist scripts, let's go with that.

 

The celestials really do need an allegiance check in addition to whatever else might be done, otherwise they wander into their own firestorms, go hostile, and then heal the party anyway.

 

ar0602.bcs worked (with a sample size of one whole test), but it's the one I'm worried about, even though no one will ever see it.

Link to comment

Use MostDamagedOf() (shortcut to (Myself) is ()) when testing. That should return true either always or when a damaged PC is in sight (can't remember if this is one of the "static" ones or not).

 

I suspect MostDamagedOf([200]) is giving you screwy behavior because the engine is looking for MostDamagedOf(null) until an EVILCUTOFF creature is in sight (until there's a living, visible EA redcircle actor nearby, it's not a valid object). (E.g., engine algorithm #82 = first look for [200], then look for MostDamagedOf and laugh at you for supplying worthless args.)

 

The area script will always always always work (although the percentage *is* a bit low for an L7 mage, but what can you do?). Area "objects" are HOT.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...