Domhnall Posted March 29, 2006 Share Posted March 29, 2006 I'd like spells that, for example, harm only undead, or harm only Evil-Factioned characters. Can these spells be easily made? Link to comment Share on other sites More sharing options...
foo-bar Posted March 29, 2006 Share Posted March 29, 2006 I'd like spells that, for example, harm only undead, or harm only Evil-Factioned characters. Can these spells be easily made? This seems very possible. Harming undead creatures can be done with a call to GetIsFaction. GetIsFaction should return 1 if the calling reference is a member of the specified faction. Undead creatures should be in the Undead faction, daedric creatures in the daedric faction, and so on (there are many factions, and it's just a matter of checking the faction of the spell target and if it matches the desired faction, carry on with spell damage / effects). If you have any specific spells in mind, let me know and I will see if I can throw something together, and either email them to you or just release them here. Link to comment Share on other sites More sharing options...
Domhnall Posted March 30, 2006 Author Share Posted March 30, 2006 Excellent. I am intent on learning to script, but haven't gotten around it to. Yes, I'd love a spell that harms undead beings, regardless of their level/magic resistance. I've noted that through all the games that the traditional "Good" characters are absent (Paladins, for example). So, I'd like to make a class of the holy warrior variety and allow him to have spells that harm abonimations. Also like to employ harm undead effects on weapons. It'd be great to see what you can create. Thanks. Link to comment Share on other sites More sharing options...
foo-bar Posted March 30, 2006 Share Posted March 30, 2006 I played around with this idea and found it to be very easy to accomplish. Just create a new spell, give it a script effect, and use something like this for the code: begin ScriptEffectStart if GetInFaction UndeadFaction ModActorValue Health -5 ; do whatever else you would like endif end Or, to harm any evil NPC, something like the following would work: begin ScriptEffectStart if IsActorEvil ModActorValue Health -5 ; do anything else endif end The above code would probably affect bandits, skeletons, and any other faction marked evil. After writing the script, just give the new spell a graphical effect (I used Turn Undead for the Harm Undead spell, and Drain Life for the Harm Evil spell, but you can use anything you want). By the way, these spells would be marked hostile when you create them. A better way to use them would be to uncheck this, because when the spell is hostile it will cause other (non-undead or non-evil) NPC's to attack you for it. Link to comment Share on other sites More sharing options...
Domhnall Posted March 31, 2006 Author Share Posted March 31, 2006 Thanks a lot. I tried it and it works. But, I need to know more about scripting to continue the work. Where can I look at a list of more functions to put into these spells? I remember from years ago the "Scripting for Dummies" pdf. Is that still the same code used in Obl? I'd like spells that increase in power with a character's level or Base Skill. Can the script be made so that the Harm Undead will increase this way. It also seems that Vampires are not 'Undead' since it is not affecting them. I take it there's an easy way to make them a target as well? Thanks again. Link to comment Share on other sites More sharing options...
foo-bar Posted March 31, 2006 Share Posted March 31, 2006 Thanks a lot. I tried it and it works. But, I need to know more about scripting to continue the work. Where can I look at a list of more functions to put into these spells? I remember from years ago the "Scripting for Dummies" pdf. Is that still the same code used in Obl? I'd like spells that increase in power with a character's level or Base Skill. Can the script be made so that the Harm Undead will increase this way. It also seems that Vampires are not 'Undead' since it is not affecting them. I take it there's an easy way to make them a target as well? Thanks again. Vampires must have their own faction (or the IsActorEvil function should catch vampires, but if you want to harm solely vampires use GetInFaction VampireFaction) To scale the spell damage by level, I would use either multiple spells (which seems to be the way the developers did things), or a big if / elseif statement. Something like the following would work, if you only wanted to create one spell that scales with the PC level: begin ScriptEffectStart ; This will harm BOTH undead creatures and vampires. if GetInFaction UndeadFaction || GetInFaction VampireFaction if Player.GetLevel < 10 ModActorValue Health -5 elseif Player.GetLevel > 10 && Player.GetLevel < 15 ModActorValue Health -10 elseif Player.GetLevel > 15 && Player.GetLevel < 20 ModActorValue Health -15 elseif Player.GetLevel > 20 ModActorValue Health -20 ModActorValue Strength -10; this is just to show how to modify the NPC's stats ; Any attribute that a player has, an NPC has (things like strength, intellegence, wisdom, etc..) ; To modify them, just use ModActorValue <Attribute> <Modifier> endif endif end Other effects can be added to the spells as well, such as draining attributes or absorbing life. I gave an example of draining an attribute in the above code. To absorb life, just do something like the following: ModActorValue Health -10 Player.ModActorValue Health 10 If you give me some ideas for spells you would like to see, I'll gladly script them up for you. Link to comment Share on other sites More sharing options...
Domhnall Posted March 31, 2006 Author Share Posted March 31, 2006 That’s be fantastic, and I hope to learn as I incorporate these spells. As I’ve said, the whole little plug I wish to make is for the “holy” characters. So, all these spells are aimed at “Abominations”—IE, all undead creatures and then for all demonic creatures. I do not think that I’d want all “Evil” factions to be viable targets. There’s a huge difference between a Wight and a Bandit! But, if I can learn it, I would want to be able to target Necromancers, demon worshippers, etc. even if they are mortals. So, with the CS, I can make varieties of spells (Touch, Target, etc), but on the Scripting end of things, I need these specific spells (that I’ve thought of so far): 1) Harm Undead health.2) Harm Undead health and chance of Turn Undead.3) Shield from Undead (possible?, a damage absorption if it comes from an Undead source). 4) Shield from Undead and cause damage if they strike PC (Possible?)5) Detect Undead. And then, 1-5 which includes Vampires, then Demon types (Imps, Scamps, etc). then true Demons. I'm too tired to mess with it now...perhaps the examples you game are sufficient for me to get it going. Thanks again, you'll get the credit. Hope I can learn it. Link to comment Share on other sites More sharing options...
foo-bar Posted March 31, 2006 Share Posted March 31, 2006 That’s be fantastic, and I hope to learn as I incorporate these spells. As I’ve said, the whole little plug I wish to make is for the “holy” characters. So, all these spells are aimed at “Abominations”—IE, all undead creatures and then for all demonic creatures. I do not think that I’d want all “Evil” factions to be viable targets. There’s a huge difference between a Wight and a Bandit! But, if I can learn it, I would want to be able to target Necromancers, demon worshippers, etc. even if they are mortals. So, with the CS, I can make varieties of spells (Touch, Target, etc), but on the Scripting end of things, I need these specific spells (that I’ve thought of so far): 1) Harm Undead health.2) Harm Undead health and chance of Turn Undead.3) Shield from Undead (possible?, a damage absorption if it comes from an Undead source). 4) Shield from Undead and cause damage if they strike PC (Possible?)5) Detect Undead. And then, 1-5 which includes Vampires, then Demon types (Imps, Scamps, etc). then true Demons. I'm too tired to mess with it now...perhaps the examples you game are sufficient for me to get it going. Thanks again, you'll get the credit. Hope I can learn it. I'm positive that the first 4 things on your list can be done. I'm fairly sure a new detection spell can be made, I just havent tried it yet. Those spells shouldnt be very hard to incorporate for the different factions. Just look in the CS (after you load in the Oblivion master file) and check Character -> Factions (in the main menu). This will bring up a list of all the factions in the game, and you can then use these names to affect only members of that faction in scripts using the GetInFaction function. As soon as I get home I'll throw some of these together and test them a bit. If you PM me with your email address I can send you anything I get finished so you can play around with it and see how I made it. These shouldnt be very hard scripts to implement, so I'm sure I can get them done today. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.