Jump to content

[LE] Turning script spells into AOE?


Recommended Posts

I've recently made a bunch of scripts that I'm using to create new spells from console commands, such as actor.kill, actor.resurrect, pushactoraway, etc.

 

However, these are all reliant on either AkTarget() or ConsoleUtil.ExecuteCommand(). Both require actors to function, and although the spells will fire at target locations, they will not activate unless they hit an actor specifically.

 

Here's an example of one of my AkTarget spells:

ScriptName revivalscript extends activemagiceffect
 
Event OnEffectStart(Actor AkTarget, Actor akCaster)
akTarget.Kill()
EndEvent
 
and here's one of my ConsoleUtil spells:

Scriptname recycleactor extends activemagiceffect  
 
Event OnEffectStart(Actor AkTarget, Actor akCaster)
ConsoleUtil.SetSelectedReference(akTarget)
ConsoleUtil.ExecuteCommand("recycleactor")
EndEvent

As you can see, changing both MGEF and spell to Target Location won't change the way it checks for a hit. So is there a command that does the same thing as AkTarget but for an area?

Link to comment
Share on other sites

You will need to look at how AOE spells are done in the game. Pretty sure that the spell casts a projectile that makes an impact on any surface and triggers an "explosion" which can place effects or objects. But beyond that, I am not certain off the top of my head. And in any event, those functions that you have require a specified target. So you would need to run those functions for each actor caught in your AOE. And I am not certain how to do that either.

Link to comment
Share on other sites

The

 

You will need to look at how AOE spells are done in the game. Pretty sure that the spell casts a projectile that makes an impact on any surface and triggers an "explosion" which can place effects or objects. But beyond that, I am not certain off the top of my head. And in any event, those functions that you have require a specified target. So you would need to run those functions for each actor caught in your AOE. And I am not certain how to do that either.

They do rely on a projectile, and I'm using a fireball projectile, which does work for AOE effects. I know because when my spells bug and fail to execute the script, they kill actors ina close radius with a fire effect.

 

I've tried them with both MGEF and spell set to target location and set to aimed with an area, as the base game does.

 

The second point is why I was hoping there was a command like AkTarget but for an area.

Link to comment
Share on other sites

Magic Effect are hard coded to respond ONLY when they "Touch" an actor, with the exception of a few, which again they are hard coded to work only inside their parameters.


What you want to do and what Ishara tried to explain you is that:

- In order to have a spell's projectile to have an 'Area' of influence, you need to:

a) Create a magic effect and the enchantment holding the damage

b) Create an explosion and insert the enchantment into the explosion's parametrs

c) According with the radius of the area impact effect of the explosion that is what your actual enchantment's 'area of damage effect' will be.


But again your magic effect will ONLY respond to actors, if you want to respond to object, then you will need to extend your set up, plus your script to a point that it becomes a little bit more complicated than having just 2 lines of code.



EDIT: It should be 'Enchantment' and not spell in my post. Replaced all.

Edited by maxarturo
Link to comment
Share on other sites

I've got the MGEF- those are the above codes. They work as spells for their respective effects, and often even together as pure MGEF on weapons. The enchantment is super basic- insert MGEF into box and match delivery to Target Location.

 

Explosions... I got one duplicated and edited the enchantment to the one I just created.

 

I added it to my MGEF, so now the MGEF is calling the explosion which calls the enchantment which calls the MGEF. Circular logic, but sounds right for SSE/SAE.

The result is that the spell now works on the player as well as NPC's, and it no longer fires a projectile, but it still has no AOE despite the explosion having 320 and the MGEF having 100.

 

Functionally, it's the same as Target Actor. It's better now since it actually does stuff, but still no AOE, whether with damage spells or non-damage spells.

 

The MGEF is also setting area to 0 despite having a set area of 100- I assume the explosion is overriding the MGEF.

 

How is radius/area calculated in SAE? It seems arbitrary since distance isn't measured in an observable way.

 

Edit: I made a new projectile and added the enchantement. Now it works somewhat but has started dealing damage despite no damage on the MGEF, explosion, enchantment, spell, or projectile. It does do its job sporadically, but it's 4:30 AM and I need to sleep.

Link to comment
Share on other sites

"How is radius/area calculated in SAE?"

Unfortunately I can't help you here, I would need to check CK to remember again those things, but I don't have installed the game and neither its tools.


"but has started dealing damage despite no damage on the MGEF"

Remove the damage applied by the explosion itself, it should be the first or second option in the explosion editor menu.

Edited by maxarturo
Link to comment
Share on other sites

As I said in my post, there is no damage attached to the explosion. Nor is it attached to the enchantment or spell. The entire setup has 0 damage. I have checked everything. The explosion has a radius of 320, an IS radius of 320, and a damage of 0.

 

Edit: got it working. For reasons I can only guess at and never fathom, SSE ties damage to the impact set and impact set radius, despite neither one having any visible damage. I disabled the IS and now it's not nuking Dawnstar every time I use it. The projectile seemed problematic as well, so I made a new one and now it works even better. The visual effects are horrendous, but I can deal with those as long as it doesn't blow up everything in the hold when I fire it.

 

Edit 2: The lingering problems were because I was using Fireball as the base spell, and Fireball has weird stuff coded into it that I can't find. It does fire damage even with 0 damage set, and it triggers hostile effects even when the spell is set to not hostile. I switched to pacify and resurrect effects, and it stopped doing that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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