arc spell
A mod that allows spells to track enemies in parabolic arches. Also allows for other spell casting trajectories, such as rotating around the caster.
Screenshots 1 screenshots
About this mod Machine translation
A mod that allows spells to track enemies in parabolic arches. Also allows for other spell casting trajectories, such as rotating around the caster.
3465/5000 This mod enables projectile type spells to move in various non-linear paths. Currently, three different paths are supported. The first is an outward spiral trajectory around the caster. The second is the path forward as it spins in a circle. The third is a parabolic arc that begins at the caster and moves towards the target. Switching between these and vanilla casting is managed via hotkeys assignable via the MCM.
The arc trajectory is the main target of this module. If you've ever played Mass Effect 2 and 3, think about this. During development the other two were simple proofs of concept that I decided to leave in case people found them interesting.
How it works:
When casting a spell in arcing mode, the mod first selects the hostile target closest to what you are aiming at. If this target is close enough, and the angle between the aiming position and the target is small enough, a secondary arc is inserted between the caster and the target. The projectile then follows that trajectory until it collides with something. This means that it is still very likely to miss when thrown in arc mode because the projectile is aimed at where the target is, not where the target is. I did this so that this mod would be able to make the aiming arc take some practice and not just hit automatically when the spell is cast. Currently, this mod is only available for players, all other actors will still cast spells normally.
compatibility:
This mod should be compatible with everything. It works by overriding the GetLinearVelocity method on MissileProjectiles, so anything else that does this will obviously be incompatible. However, I don't know of any other way to override this method, so everything else should be compatible.
Is it safe to add midstream like this?
As far as I know, yes.
Is it safe to eliminate midstream like this?
Well, nothing better than most mods. The MCM and toggle keys are very succinctly scripted, and using scripts to remove anything always poses a risk. If you don't like it, just use the toggle switch to change it back to normal mode and assign the hotkeys to functions you never use.
This is my first mod ever, so any feedback would be greatly appreciated. I'm also open to any requests for other trajectories.
The math behind arc light:
Let vector v be the vector that represents the target you are aiming at.
Let p0 be the player's position.
Let P be the set of positions of all hostile actors in the cell.
Let d(p) = min || (This optimization problem has a clear solution in terms of p0, v and p)
Let p1 = argmin {d(p): p in P}.
Let v2 = p1-p2.
If || v2 || is small enough, and v.v1 / (|| v || * || v1 ||) is large enough (i.e. the angle between them is small enough), then keep going, otherwise let the projectile follow the vanilla trajectory.
Graham-Schmidt processing steps:
Let q1 = v
Let q2 = v1-(v1.q1/q1.q1)*q1
Let e1 = q1 / / || q1 ||
Let e2 = q2 / || q2 ||
Interpolation step (Newton interpolation with difference):
Let f0 = 0
Let f1 = 0
Let f00 = sqrt(1-(v.v1/(|| v|| * || v1 ||))^2)/v.v1/(|| v|| * || v1 ||)
Let f01 = (f1- f0)/ || v2 ||
Let f001 = (f01-f00)/ || v2 ||
Let x(t) = f0 + f00(x-0) + f001(x-0)^2
Let p(t)=p0+t*e1+x(t)*e2
Then p(t) is the trajectory————————————————————————————————————————————————————
This mod enables projectile-type spells to move in various non-linear paths. Currently, there are three different paths supported. The first is an outward spiraling trajectory centered around the caster. The second is a path that moves forward while spinning in circles. The third is a parabolic arc starting at the caster and moving towards a target. Toggling between these and vanilla casting is managed via hotkeys which can be assigned via the MCM.
The arcing trajectory is the primary goal of this mod. If you've ever played Mass Effect 2 & 3, think something …
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
- Place the files exactly as the readme says; mods with listed dependencies need those installed too.
- Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.
Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.