Jump to content

Script for addspell to race


Semtex

Recommended Posts

I created a mod that adds to all khajiits character new paws. Exchange of body parts provides scripted spell - added as new racial ability for khajiit race.

But there is problem - khajiit race is set by this plugin to "basic setting", overrides all settings made by other plugins. (I know - its dirty method.)

Add spell to each NPC namely is complicated, error-prone and does not include NPC added by plugins.

I'm seek for an "simple" method (OBSE scripts) that would allow add spell (or object) to ALL khajiit characters (or to all characters in game) without editing racial or individual settings.

 

Another possible way to add spell to each khajiit characters is continuously tested NPC around the player's character (i.e. from an quest script?) and if the NPC is khajiit and has not certain spell, add this spell to NPC. Procedure which could allow it to be indicated on http://cs.elderscrolls.com/constwiki , but I'm not so good scripter, so I can not made it appropriate to set up.

 

Any HELP, please?

_____________________

Im not english speaker...

Link to comment
Share on other sites

Not especially good this I think, but what about changing the AbRaceArgonianResistDisease ability to add a new script effect. That script could just add your new spell to that race when the conditions require it. Problem is it would run every frame, I haven't thought especially about it but there may be a solution based on a variation of this idea.
Link to comment
Share on other sites

Hm ... I have a similar idea, where I work and it seems that it could work.

If does not change the spells ID, i can "with impunity" change the type of spells (Lesser Power <-> Power <-> Ability). It is therefore possible to change one of the two "racial" spells (for Khajiit race) from Lesser Power or Power to Ability. And ability type spell can be compiled as a scripted spell, able to add and remove objects and spells continuosly for all Khajiits. The effect of such spells and scripts would probably be apparent only when loading or re-loaded cells and NPCs in them, not immediately, but by time "infected" all khajiit (and perhaps other characters, using the same Lesser Power spell) :whistling:

 

This could to allow add ability type spell that would ensure the exchange of paws for all khajiit NPC. For a player's character - if the character just created will ensure that the exchange system and for an existing character that I would have done differently, probably as an "silent quest" with one short scripts, which starts immediately in high priority, add necesery spell and ends immediately after the script ends

 

I watched the script in plugin Scripted Argonian Feet from DrakeTheDragon. Use these scripts was one of my the first ideas. It's obviously done well, but my ability to work with the script is weak and I am not able to understand all the features of this group of large scripts. It's too complicated for me.

 

_____________________

Im not english speaker...

Link to comment
Share on other sites

  • 3 weeks later...

Script for ability type spell common to all khajiits

ScriptName SMTXabKhajiitPawsAddScript
ref whatiswear

Begin ScriptEffectUpdate
set whatiswear to GetEquippedObject 5

If (whatiswear ==  0 ) || (getDead == 1)
AddItemNS SMTXKhajiitPawsRFRM01 1
EquipItemNS SMTXKhajiitPawsRFRM01
else	
if (whatiswear != SMTXKhajiitPawsRFRM01) && (GetItemCount SMTXKhajiitPawsRFRM01 != 0)
	RemoveItemNS SMTXKhajiitPawsRFRM01 1
endif
endif
End

 

Quest script (orginaly writed by The Viper) continously search all actors around player character, and if actor is khajiit race NPC, give him ability type spell and an control token

ScriptName SMTXabKhajiitPawsAddQuestScript

ref XActor

Begin GameMode
;__________
; for player 
;--------------------
If player.getisrace khajiit		
					; for "DesuChan's Kawa-Khajiits.esp" add this: || DCKawa ||   DCKawaKuro ||   DCKawaShiro || DCKawaZZPale 
					; for "Elsweyr Anequina.esp" add this: || ANQKhajiitCathay || ANQKhajiitCathayRaht || ANQKhajiitOhmes || ANQKhajiitOhmesFurred || ANQKhajiitOhmesRaht || ANQKhajiitOhmesTattooed01 || ANQKhajiitSuthay ||  ANQKhajiitTojay
		If (player.getitemcount SMTXKhajiitPawsControlToken == 0) 	
			player.addspellNS SMTXabKhajiitPawsAdd						
			player.additemNS SMTXKhajiitPawsControlToken 1
		endif
endif

;__________
; for NPC 
;--------------------
set XActor to Apple
set XActor to GetFirstRef 69 1

While (XActor != 0)	
If XActor.GetIsRace khajiit		
						; for "DesuChan's Kawa-Khajiits.esp" add this: || DCKawa ||   DCKawaKuro ||   DCKawaShiro || DCKawaZZPale 
						; for "Elsweyr Anequina.esp" add this: || ANQKhajiitCathay || ANQKhajiitCathayRaht || ANQKhajiitOhmes || ANQKhajiitOhmesFurred || ANQKhajiitOhmesRaht || ANQKhajiitOhmesTattooed01 || ANQKhajiitSuthay ||  ANQKhajiitTojay
	If (IsFormValid XActor == 1)
		If (XActor.getitemcount SMTXKhajiitPawsControlToken == 0) 	
			XActor.addspellNS SMTXabKhajiitPawsAdd						
			XActor.additemNS SMTXKhajiitPawsControlToken 1
		endif
	endif
endif
set XActor to Apple
set XActor to GetNextRef
loop

End

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...