#(cyrulean) complex particle animations

129 messages · Page 1 of 1 (latest)

steel parrot
#

I don't have a lot of experience with particles, the most i can do is spawn some in a small area using playeffect
if I want to create spells with a lot of fancy effects going on, is it just a lot of math and playeffect?
what kinds of libraries and techniques should i know about?

upper jewelBOT
#

(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>

static eagle
#

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

steel parrot
#

in that case, are there any resources that can help me learn how to start?

static eagle
#

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

steel parrot
#

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

static eagle
static eagle
#

example:

#

this one i like and use a lot, stupidly useful

#

!t points_around_y

atomic dockBOT
static eagle
#

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

atomic dockBOT
static eagle
#

built in line maker! woohoo

steel parrot
#

oh damn!!

iron ironBOT
steel parrot
#

yeah these are super useful ty

#

what is find_path and how is it different than points_between ?

static eagle
#

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

atomic dockBOT
static eagle
#

there's also rotate_yaw and rotate_pitch

steel parrot
#

i see i see

#

these are exactly what i'm looking for

static eagle
#

you can do everything

steel parrot
#

how do I search for all of the tags like this?

static eagle
#

(which i already had sent before)

#

that's a list of all tags appliable to locations

steel parrot
#

right what i mean is

#

how do i search within that for only the tags relevant to particle math

static eagle
#

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

steel parrot
#

there are an overwhelming number of avaliable tags haha

static eagle
#

that being said... you can skip over all find blablabla tags xD

steel parrot
#

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:

static eagle
#

it already does, take for example this one that was already opened in my browser:

LocationTag.below
that means the tag .below takes 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

steel parrot
#

i hope your tone isn't supposed to be sarcastic because that's completely not what i meant

static eagle
#

oh it wasnt, im sorry, i misunderstood you then

steel parrot
#

oop,, sorry lol

static eagle
#

lmfao but yeah what did you mean

steel parrot
#

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

static eagle
#

mmm yeah seems interesting

steel parrot
#

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

static eagle
steel parrot
#

no that's what I do, it takes a lot of scrolling to find what I'm looking for

static eagle
#

!t list.contains

atomic dockBOT
steel parrot
#

that's why a condensed list with just the link and names would be useful to me

steel parrot
# atomic dock

yea i found it eventually, luckily it starts with C which is early enough in the alphabet

static eagle
#

it really takes some reading to start knowing/remembering which tag does what, but you'll get there sometime

steel parrot
#

exactly

#

i'm saying this would make the docs more accessible for beginners

static eagle
#

if you wanna make a separate thread for discussing that then, it'd be perfect

steel parrot
static eagle
steel parrot
#

oh lol

#

but like

steel parrot
#

you know?

static eagle
#

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

steel parrot
#

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?

static eagle
#

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

steel parrot
#

oh my god i didn't know that

static eagle
#

lmao

#

!c playeffect

atomic dockBOT
# static eagle !c playeffect
Group

world

Syntax

playeffect [effect:<name>] [at:<location>|...] (data:<#.#>) (special_data:<data>) (visibility:<#.#>) (quantity:<#>) (offset:<#.#>,<#.#>,<#.#>) (targets:<player>|...) (velocity:<vector>)

Short Description

Plays a visible or audible effect at the location.

Description

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...

static eagle
#

at:<location>|...
that |... thing indicates it accepts a list

steel parrot
#

ahh,, it's in the syntax

static eagle
#

ye

steel parrot
#

says nothing in the description ;-;

#

good to know though!

static eagle
steel parrot
#

lol

#

are there any other like performance quirks i might not know about

static eagle
#

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

steel parrot
#

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

static eagle
#

wym recursion

#

im too esl for this

steel parrot
#

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

static eagle
#

!e delta time

atomic dockBOT
# static eagle !e delta time
Group

Core

Event Lines

delta time hourly|minutely|secondly

Switches

every:<count> to only run the event every *count* times (like "on delta time secondly every:5" for every 5 seconds).

Triggers

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

<context.second> returns the exact delta time since system start.

steel parrot
#

it's a function where a block is supposed to artifically spread to other blocks

static eagle
#

oooo oh that'll lag

steel parrot
#

ah

#

is it the "search blocks around it" tag that is heavy?

static eagle
#

its exponential growth, it will be heavy in n time

#

the tag only starts to get heavy at like, 50 radius or more

static eagle
static eagle
#

!info haste debug

atomic dockBOT
#
Info: debug

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!

static eagle
#

read em both and follow instructions

steel parrot
#

gotcha

still bronze
#

Can use groups to search in the meta, I.e. search for math to bring up all math-related tags

covert glenBOT
#
Thread Closing Reminder

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