#(cyrulean) complex particle animations
129 messages · Page 1 of 1 (latest)
(cyrulean) complex particle animations
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
is it just a lot of math
yes
libraries? i dont think there are any atm, but the entire active community has been talking about making one in the near future
in that case, are there any resources that can help me learn how to start?
mmmmmm not really, i mean you could go on people's scripts and see how they do their particles, but the general concept is not hard to get
playeffect just plays a particle on a location, so to get fancy looking particles, all you'll need to do is 1) pick the right particle(s), and 2) manipulate locations according to what you want
i can give you some useful tags of the tip of my tongue, but you'll need to look into the meta docs to see what's possible
i'm not the best at math or geometry, especially in 3d space so i'd like to know the math behind creating common kinds of particle effects, such as like a particle loop that draws a trail in a circle or something.
as for the meta docs, besides playeffect what else should i look into?
i also don't really know how to do math in denizen at all to be honest besides simple .div[] or whatever
for the meta docs, besides playeffect what else should i look into?
everything related to LocationTags. here u go have some links
https://meta.denizenscript.com/Docs/Tags#locationtag
https://meta.denizenscript.com/Docs/ObjectTypes/#locationtag
maybe in the future some vector math but that's not really useful for particles since almost none accept vectors
dont worry, tags make most of the hard work
example:
this one i like and use a lot, stupidly useful
!t points_around_y
Returns a list of points in a circle around a location's y axis with the specified radius and number of points.
For example: <player.location.points_around_y[radius=10;points=16]>
math
ListTag(LocationTag)
try the example in it's description yourself, you'll quickly understand what it does
there's also the around_x and around_z variations of that
also one really nice tag
!t points_between.distance
Finds all locations between this location and another, separated by the specified distance each.
math
ListTag(LocationTag)
built in line maker! woohoo
oh damn!!
yeah these are super useful ty
what is find_path and how is it different than points_between ?
i think find_path is for a walkable path like an npc or mob might walk, idk i never really tested it
but points_between just draws a straight line from one point to another going through everything in between
you can also rotate locations (this is more tricky and can sometimes be difficult) with .rotate_around_x and it's y and z variants
!t rotate_around_x
Returns the location-vector rotated around the x axis by a specified angle in radians.
Generally used in a format like <player.location.add[<location[0,1,0].rotate_around_x[<[some_angle]>]>]>.
math
LocationTag
there's also rotate_yaw and rotate_pitch
you can do everything
how do I search for all of the tags like this?
i dont know how to make the bot link it for me so have this copy pasted url to the meta docs https://meta.denizenscript.com/Docs/Tags#locationtag
Tag List
(which i already had sent before)
that's a list of all tags appliable to locations
right what i mean is
how do i search within that for only the tags relevant to particle math
you dont, there's no "useful for particles" section, you just look at them and think "wow could i use this for particles?" if you're not sure, go test them
there are an overwhelming number of avaliable tags haha
that being said... you can skip over all find blablabla tags xD
going to take a while to scroll thru
i think it would be useful for each tag documentation block to include a list of all the attributes and subtags, sort of like this:
it already does, take for example this one that was already opened in my browser:
LocationTag.below
that means the tag.belowtakes a locationtag behind it
[(<#.#>)]
this means that while optional (hence the parenthesis), you can give it a decimal (thats why #.# ) as input, so it knows how below it should be
Returns: LocationTag
oh sweet! it gives me another LocationTag. so any tag appliable to a location is also appliable to this!
and it even has a sweet sweet description
i hope your tone isn't supposed to be sarcastic because that's completely not what i meant
oh it wasnt, im sorry, i misunderstood you then
oop,, sorry lol
lmfao but yeah what did you mean
what i mean is right now, if I want to find "all the things i can do with locationtag" the best way I found right now is to search <locationtag. in the search browser, this gives me every single property / attribute that the locationtag has, but it includes all the documentation associated with it as well, which means there's a lot of scrolling I have to do to explore what I want
in the screenshot I sent above, only the name of every property / subtag is displayed, which makes it really easy to scan and explore "ooh what does this do?"
it's also seperated into 2 categories so if I'm trying to see "does the ListTag have a way to check whether an item is inside the list?" i can scan the list really easily
mmm yeah seems interesting
this is especially helpful because denizen doesn't exactly name their functions inline with conventions that other programming languages use, so it can be sometimes difficult to find the name of the thing I want to do, even though I know it exists
just search up "locationtag" it'll bring more things kek
no that's what I do, it takes a lot of scrolling to find what I'm looking for
oh! in this case,
!t list.contains
Returns whether the list contains all of the given elements.
See also !tag ListTag.contains_single for safer single-value checks.
ElementTag(Boolean)
that's why a condensed list with just the link and names would be useful to me
yea i found it eventually, luckily it starts with C which is early enough in the alphabet
it really takes some reading to start knowing/remembering which tag does what, but you'll get there sometime
if you wanna make a separate thread for discussing that then, it'd be perfect
I also explicitly include the < at the start to omit all of the mechanisms that happen to have locationtag in the documentation description
LMAO i said to just search locationtag exactly bc it would show mechanisms
imagine how simple it would be if like in the screenshot, just like "Attributes" and "Methods"
you have "Subtags" "Mechanisms" "Properties"
you know?
yea i got what you meant
but like i said, if you want that to actually get some traction make a separate post for it, here it'll eventually get buried or just not seen because title not clickbaity enough
it's not too big of a deal lol
but yeah ur prob right
anyway thanks for the help with those particle methods!
one thing is, when it comes to really complex particle effects with tons of particles, does like 500 calls of playeffect for all of the particles become inefficient?
only for your fps lmao, server will be totally fine
also! playeffect accepts lists, so you might be using a foreach when you dont need to, just a heads up
oh my god i didn't know that
world
playeffect [effect:<name>] [at:<location>|...] (data:<#.#>) (special_data:<data>) (visibility:<#.#>) (quantity:<#>) (offset:<#.#>,<#.#>,<#.#>) (targets:<player>|...) (velocity:<vector>)
Plays a visible or audible effect at the location.
Allows the playing of particle effects anywhere without the need of the source it comes from originally.
The particles you may use, can come from sources such as a potion effect or a portal/Enderman with their particles respectively.
Some particles have different data which may include different behavior depending on the data. Default data is 0
Specifying a visibility value changes the sight radius of the effect. For example if visibility is 15; Targeted players won't see it unless they are 15 b...
at:<location>|...
that|...thing indicates it accepts a list
ahh,, it's in the syntax
ye
the devil's in the details xD
yeah, beware of pre-optimization
thats the only good advice on performance when coding
basically rule of thumb is dont care about it unless it starts to become a problem/nuisance
yeah that's fair
is recursion unperformant btw?
because i have one of those in my code and it reliably causes slowdowns when it runs for too long
a function that calls itself, don't worry abt it tho
ok another thing, i'm currently using the take command in a for loop to make players drop a portion of their items.
even though i double check that the probability and chances are all correct, it still will sometimes not take all of the items correctly
my best guess is that when multiple take commands are used in rapid succession there's some bug that causes the instruction to skip? such as a race condition.
do you know how i can work around this?
i should mention this also only happens when the server has some considerable amount of load
if you dont add any delay in it with a wait or whatever yeah it'll make an instant loop and crash your server
although it does look like a job for the delta time event
!e delta time
Core
delta time hourly|minutely|secondly
every:<count> to only run the event every *count* times (like "on delta time secondly every:5" for every 5 seconds).
every <count> seconds, minutes, or hours of game calculation time. Default repetitions count of 1.
This is specifically based on the rate of time advancement in the game server,
which is not necessarily equivalent to the real passage of time (for example, this event may fire slower if the server is lagging).
For real time, see !event system time.
<context.second> returns the exact delta time since system start.
it's a function where a block is supposed to artifically spread to other blocks
oooo oh that'll lag
its exponential growth, it will be heavy in n time
the tag only starts to get heavy at like, 50 radius or more
i mean you definitely can do that, but it will take some clever thinking which i am NOT capable of rn bc its 3am to avoid lagging the server
in this case,
!info haste debug
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
read em both and follow instructions
gotcha
Group
math
Can use groups to search in the meta, I.e. search for math to bring up all math-related tags
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@steel parrot