Jump to content


Photo

Any way to reflect the caster's statistics in an effect?


  • Please log in to reply
5 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 21 September 2016 - 03:22 PM

I'm trying to make a spell that would be more or less effective depending on the caster's Charisma. I don't know any way to represent that statistic in the spell itself, so instead I'm spawning an invisible creature who will follow up with extra effects on the target for a charismatic caster. First I have to mark the target somehow so the creature, who is fucking blind, can find it through Nearest, SecondNearest and so on. But the whole thing is unreliable and rickety like a forgotten scaffold. Sometimes the creature sees the target, sometime it doesn't. It's just not going anywhere.

 

Can you think of other ways to represent Charisma or other stats, guys? Through outside tricks, Weidu, anything?

 

This is the simplest version of the script for the invisible creature. It doesn't mention Charisma. For now I'm just trying to get the creature to react to a property of the target (class in this case) so that it casts a spell on him about half of the time and just destroys itself silently otherwise. If this worked, I could put extra triggers for Charisma. But it doesn't. The spell makes a wild dog out of the target... don't ask, but it does... and then, after the 2-second wait, the creature is supposed to do its thing. Well, it does jack.

 

It's not helping that the creature is visible right now and is a beer-sipping peasant on a chair. This is extra aggravating. :new_bottom:

 

IF
	True()
THEN
	RESPONSE #100
		Wait(2)
		Continue()
END

IF
	Class(Nearest,DOG_WILD)
	RandomNumLT(20,10)
THEN
	RESPONSE #100
		Wait(2)
		ReallyForceSpellRES("SPWI105",Nearest) // Color Spray
		DestroySelf()
END

IF
	Class(Nearest,DOG_WILD)
	RandomNumGT(20,9)
THEN
	RESPONSE #100
		DestroySelf()
END


Edited by temnix, 21 September 2016 - 03:29 PM.


#2 Himself

Himself

    CEO of the ENDLESS WAVES OF BAD DOGGIE

  • Member
  • 230 posts

Posted 22 September 2016 - 05:11 AM

Try using LastSummonerOf(Myself) for the creature to tag/identify the caster.

For attribute checking use CheckStat based on stats.ids, it has charisma listed, you'll obviously need to break the blocks so that each one does a different effect based on the charisma value.

Anyway, hope it helps... I've a thing for not understanding what ppl are saying ^^


...to be isn't important, we're no longer than we're :)

#3 temnix

temnix
  • Member
  • 983 posts

Posted 22 September 2016 - 01:56 PM

Well, trying goes a long way. :) Sure, I can identify the caster... it's other people those invisible creatures fail to see half of the time! But I think I know a different way. I think.



#4 Himself

Himself

    CEO of the ENDLESS WAVES OF BAD DOGGIE

  • Member
  • 230 posts

Posted 22 September 2016 - 02:16 PM

Maybe have the invisible creature cast (back upon the caster) a spell (different versions based on the charisma) so the spell will affect whoever the caster is seeing. Is the spell to affect the caster, allies, enemies, neutrals, everyone, etc?

Should it affect only one (any creature) specific target, hmm.. maybe try using LastTargetedBy with LastSummonerOf(Myself). EDIT - That was, assuming the caster will target a creature. If, on another case, the spell can be cast over any ground/area, can the invis cre cast the spell on itself, targeting whichever group it should?

Again, hope it helps ^^


Edited by Himself, 22 September 2016 - 02:25 PM.

...to be isn't important, we're no longer than we're :)

#5 temnix

temnix
  • Member
  • 983 posts

Posted 23 September 2016 - 04:17 AM

There are the two problems one keeps coming back to with this: one is that creatures don't reliably cast all spells and run all script commands, so even a solution that should work sometimes plain doesn't; and the other is that while it's possible to make a creature servant cast different versions of a spell, it's impossible to have a PC scribe different, stat-reflecting versions of a spell in the spellbook (and even if that could be done, what would happen if his Charisma changed, as indeed I want it to with the Friends spell?) What I realized I can do, however, is leave invisibles out of this and include a Self effect in the spell, leading to Apply filters, which will therefore reflect the caster's stats. They can then trigger further effects. This is half of the solution, and I think I know the other half to make it useful. :lol2:

 

I should have something cooked fairly soon. And, if it works, that will be a pretty big thing. Outside of my own intention, people will be able to have effects that, for example, work only if cast by a female, or do damage equal to the caster's Strength score, or have diverse effects for casters of different alignments and so on. The only question is, will the engine be robust enough to support a series of manipulations without failing somewhere in the middle?



#6 temnix

temnix
  • Member
  • 983 posts

Posted 23 September 2016 - 11:56 AM

I fucking did it.

 

Oh, there is no smilie for this.