Jump to content



Recommended Posts



I can't be of help because if you are a computer illiterate I am an analphabet but you should not think that your initial post was uninteresting.


It's just that often interesting posts go unnoticed for several reasons. Usually because the ones that answer look at it, do not have an answer right away and think to come back later. But then they forget. This is how it often goes so I hope that you will get some replies to this and that keep on investigating to bring more important aspects to our attention!



Link to comment
Chant does nothing at all to saving throws (the manual is just wrong, here) and I'm not changing that below (persuade me :D ?)


Removing the range from Chant (is this justified? I think so, but...) so it's centered on the caster.

In general, we try to make the spell files match the description. As the description mentions save bonuses and a range of zero... ;)


Adding a single new effect to the spell, which is to cast a new spell. This new spell uses the party-excluded version of the lavender pollen projectile (and the original Chant uses the party only version, so the net effect is no real change in the visuals) and applies the Negative Chant opcode to any non-party members in range. I'm not changing any scripting states (the spell by default doesn't), not changing the type (so bystanders don't try to kill you for singing some Hildegard von Bingen in their personal space) and not bypassing magic resistance.

Sounds good.


Apologies for spamming my own uninteresting topic :), but is there even any need to use the chant or negative chant opcodes? Seems like a waste of a perfectly good scripting state to me, especially when everything that Chant does can be replicated precisely by opcode54 (thac0 bonus), opcode250 (non-cumulative damage modifier), and a portrait icon. It's only a bugfix inasmuch as the extended feedback doesn't display properly when using Chant - that may be stretching things out of fixpack territory though. On the other hand, if adding the unimplemented opponent penalties is something that might be done anyway...

If it's working with the current opcode, I'm inclined to leave it be.



Link to comment

Hmm. Is it just me, or is the icon the same for both positive and negative chant effects? This is confusing in a no-holds-barred firefight. "Did I remember to cast chant, or is that icon a negative effect I should get rid of?"

Link to comment
There isn't an icon for negative chant in the unmodded game, and you'll never be under the effects of negative chant because it isn't used. The devs never got around to it :) The proposal above doesn't add a portrait icon to its negative chant effect...though that could certainly be done if thought to be appropriate.


Hehe. I added your patch to my current playthrough, since it sounded like a worthwhile thing to do. Thus the question. So the negative chant effect from this patch currently has no icon, or does it reuse the positive chant icon?


Sorry for any confusion :D

Link to comment

I don't think there's an icon appropriate to the negative chant effect--'chant' would be confusing, and while 'curse' may technically be correct it would probably send folks looking in their inventories for items. Introducing a new icon would definitely be beyond dev intent, and cause compatibility problems to boot. :)

Link to comment

I think I got distracted by the icon discussion and forgot to re-post the final version :)


I'm so very sorry, this one is completely my fault. Have I mentioned yet today that I'm an idiot?


I'll post inlined versions of the two subspells later when I get a chance. They're unfortunately quite necessary to have full control over magic resistance. Should look like the two supplied.


COPY_EXISTING ~sppr203.spl~  ~override~
 PATCH_IF (%SOURCE_SIZE%>0x71)							   BEGIN
READ_LONG	0x64 "ho"									// extended header offset
READ_SHORT   0x68 "hc"									// extended header count
READ_LONG	0x6a "eo"									// feature table offset
FOR ("i1"=0; "%i1%"<"%hc%"; "i1"+=1)					  BEGIN
  WRITE_BYTE	("%ho%"+(0x28*"%i1%")+0x0c) 0x05		  // target self
  WRITE_SHORT   ("%ho%"+(0x28*"%i1%")+0x0e) 0x00		  // range
  READ_SHORT	("%ho%"+(0x28*"%i1%")+0x1e) "ec"		  // effects for header i+1
  READ_SHORT	("%ho%"+(0x28*"%i1%")+0x20) "ei"		  // effect index for header i+1
  WRITE_SHORT   ("%ho%"+(0x28*"%i1%")+0x26) 0x01		  // projectile: none
  DELETE_BYTES  ("%eo%"+(0x30*"%ei%")+0x00) (0x30*"%ec%") // remove existing effects
  INSERT_BYTES  ("%eo%"+(0x30*"%ei%")+0x00) 0x60		  // add two new effects
  WRITE_ASCII   ("%eo%"+(0x30*"%ei%")+0x14) ~sppr203d~ #8 // positive chant
  WRITE_ASCII   ("%eo%"+(0x30*"%ei%")+0x44) ~sppr203e~ #8 // negative chant
  FOR ("i2"=0; "%i2%"<2; "i2"+=1)						 BEGIN
	WRITE_SHORT ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x00) 0x92 // cast spell
	WRITE_BYTE  ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x02) 0x01 // target self
	WRITE_BYTE  ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x03) 0x00 // power
	WRITE_LONG  ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x04) 0x00 // casting level
	WRITE_LONG  ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x08) 0x01 // cast instantly
	WRITE_BYTE  ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x0c) 0x01 // instant/permanent
	WRITE_BYTE  ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x0d) 0x00 // resistability
	WRITE_BYTE  ("%eo%"+(0x30*("%ei%"+"%i2%"))+0x12) 0x64 // min prob 100%
  END													 // FOR i2 effect fleshing
  WRITE_SHORT   ("%ho%"+(0x28*"%i1%")+0x1e) 0x02		  // effects for header i+1
  FOR ("i3"="%i1%"; "%i3%"<"%hc%"; "i3"+=1)			   BEGIN
	READ_SHORT  ("%ho%"+(0x28*"%i3%")+0x20) "ix"		  // search later header indices
	PATCH_IF ("%ix%">0)							  THEN BEGIN
	  WRITE_SHORT ("%ho%"+(0x28*"%l%")+0x20) (("%ix%"-"%ec%")+0x02)
	END												   // PATCH_IF
  END													 // FOR i3; rewriting ability effect indices
END													   // FOR i1
 END														 // PATCH_IF filesize check

Link to comment


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

  • Create New...