Jump to content

[SOLVED] How to extend a cloak spell range (area of effect)


SAC

Recommended Posts

Posted

Hi,

 

I have managed to create a cloak spell / magic effect that works as intended, it runs a script on surrounding NPCs. However, it only works on NPCs that are close to my PC (close = a few steps away). I want to extend the range, but I don't know how. I googled a lot on this, still cannot find a solution that works.

 

Anyone has any experience on this?

 

Ty!

Posted

Do you have some more info on the spell/magic object that you are using?

Can you post the definition here? Perhaps a copy of the script as well, then I can take a look.

Posted
7 hours ago, Reginald_001 said:

Do you have some more info on the spell/magic object that you are using?

Can you post the definition here? Perhaps a copy of the script as well, then I can take a look.

 

Thank you very much for taking an interest. I have tried to document my workflow in the screenshots attached.

 

Basically, the way I understand it (it's been a while since I developed it and I followed a tutorial pretty blindly):

 

1. there's a quest starting up when the game is loaded

2. the quest calls for a spell

3. the spell calls for a cloak MGEF

4. the cloak MGEF calls for another spell

5. the other spell calls for the MGEF which actually has the script "payload"

 

Also attaching the script, however not sure how relevant - the script works, the problem is that the cloak "touches" only nearby NPCs and I want to expand its area of effect

 

Again, thank you! :)

 

 

1 Quest.jpg

2 cloak spell.jpg

3 cloak MGEF.jpg

4 payload spell.jpg

5 payload - script MGEF.jpg

 

 

 

SACDirt.psc

 

 

Posted
32 minutes ago, SAC said:

 

Thank you very much for taking an interest. I have tried to document my workflow in the screenshots attached.

 

<snip>

I took a gander at the Magic Effect documentation in the creation kit docs and found this:

Spellmaking

  • Power Affects Magnitude/Duration: Determines whether the magic effect's magnitude and/or duration will be scaled when dual-casting, or by the player's Alchemy and Enchanting skill and perks when making potions and enchantments containing the magic effect.
  • Area: If the effect has an area associated with it, it is indicated here. Area is measured in feet, not units.
  • Casting Time: The number of seconds the casting button needs to be held down before the spell can be cast. Usually 0.5 seconds. For spells with lengthy cast times and using two hands, using the keyword RitualSpellEffect is recommended: this keyword changes the cast animation to a more appropriate animation.

 

There's also a correlation with the "No Area: The effect does not use the Area field. " flag (which is flagged in your Magic Effect):

Notes

  • No Magnitude, No Area and No Duration do not actually affect the inner workings of the effect, checking them just makes it so these parameters will be unavailable when you assign the effect to a Spell, Scroll, Potion, Shout or Enchantment. (The area is always unavailable when creating a Spell unless Auto Calculate is turned off in the Spell dialog.)

 

Looks like you'll need to adjust the BarefootDirtMGEF Spellmaking area (mid-bottom) first and change the area from 1 (feet) into something more larger, say 16 feet (or whatever size, depending on the desired effect). And see if that works.

 

If that doesn't work, it looks like you need to assign something called an 'area' which likely describes the area of effect.

I don't what that area is, but I'm pretty sure if you set it to something larger than 1 the area of effect will increase. :)

Posted
On 2/25/2019 at 7:34 PM, Reginald_001 said:

I took a gander at the Magic Effect documentation in the creation kit docs and found this:

 

Thank you. I needed a little time to test and it's bizarre (of course, it is papyrus and CK and fallout, bizarre is the name of the game)

 

Step 1: changed 1 to 1000, removed the "no area" flag from the MGEF => no apparent difference

 

Step 2: started experimenting with the script, adding "killsilent" and "debug.messagebox" 

 

Surprise: for a faraway NPC, some script commands work (killsilent and messagebox), no matter how far, some others don't (playeffectshader, ondying event)

 

To summarize so far:

- if I spawn an NPC far away, killsilent and messagebox work, playeffectshader and the ondying event do not, even though they are in the same script, triggered by the same MGEF

- if I spawn the exact same NPC just in front of me, all "features" work

 

At this point, I'm stumped (again)

 

 

Posted

I have just tested it briefly, so it needs more testing, but I think I solved it by completely scrapping my initial implementation (so, I can't really pinpoint what was wrong with it in the first place), then re-doing it by following this worflow to the letter (minus the optimizations section, I'll see if they are actually needed)

 

https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts

 

It is even more convoluted than my initial version, involving 3 layers of SPEL/MGEF instead of two, but at least it seems to work properly.

 

Thank you to @Reginald_001for your interest in the topic :)

 

Posted

I'm really glad you solved it, I replied only because I know how hard it can be to try to solve an issue and no one is either able to help, or wants to. I didn't do anything but ask some questions, though, so all kudos goes to yourself!

Posted
53 minutes ago, Reginald_001 said:

I'm really glad you solved it, I replied only because I know how hard it can be to try to solve an issue and no one is either able to help, or wants to. I didn't do anything but ask some questions, though, so all kudos goes to yourself!

 

Indeed, it is hard, and your support was most appreciated

Archived

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

  • Recently Browsing   0 members

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