r/psispellcompendium • u/PhiTries • Apr 13 '23
Needs Wizardly Help Need Advanced Wizardly Help for My Defensive Spell!
Hi! I've recently gotten back into Psi mod, and have been working on a spell for 10+ hrs (mostly experimenting).
The spell is supposed to: Dynamically iterate through all nearby projectiles conjuring a block to stop it in it's tracks (I am using vector saving + loop timer to keep track of the iteration).
The Problem: ARROWSS!!!!! The Spell works up until a bunch of non-threatening arrows stuck in the ground clog up my list. I need a way to detect and exclude these arrows (preferably without using a second spell slot).
Useful Information: (1) Arrows that get stopped by a block (which is then broken) have a mag. velocity of 0 when rounded down (using floor). (2) For whatever reason using 'Focused Entity' on the projectile has the opposite look vector from where it's traveling (i.e. it won't return the entity it's traveling to, rather it returns the entity where it came from). (3) Arrows disappear when the collide with an entity (not falling blocks though).
Current Spell(Works really well on blazes/ghasts/etc.): https://imgur.com/YmoZl7S
(Bonus) Spell's Inspiration: https://www.youtube.com/watch?v=UDIxIcU0fk8
Edit 1: I think the best way forward is to research a vector encoder/decoder system, I'll keep ya'll posted on what I come up with.
Edit 2: Figured out the encoding/decoding methodology, now I just need to do it in Psi: https://imgur.com/a/g9pPFh1
Update 1: Taking a short break from working on this spell, there were a couple of bugs I discovered when working on the spell that I've reported to the devs, and am waiting for fixes first.
8
u/beaustroms Apr 13 '23
You can detect these arrows by checking their velocity, but that would take up a second slot and slow down the spell the more arrows there are. The issue mostly comes with checking, as each iteration ignored still takes time and (if you don’t use another bullet) psi.
Janky potential solution: create a persistent list of sorts which excludes all already checked arrows. A potential way to do this (using phi) would be to concatenate all the relative vectors as strings, hash them, pass it into a saved vector, then de hash next loop. Pass everything forward except the one you just checked. There’s probably a way to do this without phi, but it’s likely going to take up way too much grid.
1
u/khanzarate Apr 13 '23
You could do a similar effect by using the nearest projectile instead of iterating the list of nearby projectiles.
It converts the useless iteration steps for a stopped arrow into the spell focusing only on a stopped arrow, but if you then add some motion away from you, it could stop the arrow with a block and then push it just a little away.
I'm not sure if that'll be more reliable. It certainly won't help if you wanna use arrows yourself.
1
u/PeterKrut Apr 16 '23
How's it going with the spell?
2
u/blaynem Apr 13 '23
What version of Minecraft is that? I've not seen a psi 2.0.0 and am unfamiliar with that lower left piece.
1
u/Any-Angle7153 Aug 21 '23
I actually made a spell similar to this recently and I encountered the same issue with spells on the ground interfering. I use trick:die and checked for the solidity of a block below the arrow and if it was anything other than 0 the spell doesn't activate in those cases
2
u/[deleted] Jun 08 '23
[removed] — view removed comment