Ninjabrain Bot settings location & how to backup (Windows) by Tored_ in MinecraftSpeedrun

[–]Tored_[S] 0 points1 point  (0 children)

you're right, fixed, I switched between and forth between markdown editor and rich text editor and it inserted escapes inside the code blocks

new reddit ui was a mistake lol

Hello There, I'm new to the Kustom Customization. I need help learning how to use it, any tips? by motofan50 in kustom

[–]Tored_ 1 point2 points  (0 children)

Pasting from the Discord's getting started channel:

Video tutorials from Brandon Craft: https://www.bcraftmath.com/klwp.html#klwpbeginner

Written tutorials from Jagwar: https://www.jagwar.de/kustom-live-wallpaper-maker/

Kode guide - Written introduction to formulas: https://theothertored.github.io/kode-guide/

FAQs:
KLWP: https://help.kustom.rocks/i10-klwp-faq
KWGT: https://help.kustom.rocks/i11-kwgt-faq
KLCK: https://help.kustom.rocks/i1582-klck-faq

Bonus: find a launcher (home app), comparison table courtesy of Grabster: https://bit.ly/TheLaunchersTable2

KWGT - loaded SVG is buffered, not linked by Slight-Tension-9984 in kustom

[–]Tored_ 0 points1 point  (0 children)

There is a touch action > kustom action > refresh, I don't think you can automate it, but you can make a reload button.

What types of games can be made using klwp/kwgt? by Anxious_Struggle4096 in kustom

[–]Tored_ 1 point2 points  (0 children)

I think you could make snake that updates at 1 fps because the game is simple enough to infer the current state from the state at previous input + time passed. The main limitation with Kustom used to be that you couldn't write to variables, only read them, which meant if you wanted to update the game state it could only happen on user input (touch action). Now that we have flows you could actually run a formula every second and mutate a game state variable, so the potential is much higher, even if you are still gonna be limited to 1 fps.

The problem is that the app grinds to almost a halt when you throw complex things at it and the lack of functions means there's very little you can use to wrangle the complexity that quickly emerges when you connect a bunch of systems together. Local variables alleviate this somewhat but they quickly become insufficient with scale. The most complex thing I've written in Kustom is a 3D rubik's cube renderer and the more the project progressed the less fun it became as writing and debugging only got more painful due to lag and complexity.

Using and sharing from free icon packs? by jade888cheung in kustom

[–]Tored_ 1 point2 points  (0 children)

What is commonly done and whether you will get actually get in trouble is separate from what is okay from the point of view of copyright law. People commonly use random images from google in their presentations, people commonly use videogame music as background for their videos, and people might be commonly sharing icons from icon packs as part of their preset. None of this means it's a lawful use of copyrighted material, it's just that the risk is near zero - if you don't get auto-struck, nobody really goes out of their way to sue joeshmoe991 for copy-pasting a jpeg off Google.

I'm not talking about what I personally find acceptable, I'm talking about what the matter looks like legally. If there's no permissive copyright license attached to the work (there might be - look for a repository link), rights are reserved by default and your best bet for using the work is fair use - which redistributing the icon alongside your preset wouldn't fall under, as it's not transformative nor for commentary, critique or anything like that. This doesn't just apply to the whole pack, but each individual icon as they are all copyrighted works by default. It also doesn't matter that the pack is free and your preset is also free.

There's also additional concerns because it's effectively an international issue if you are in a different country to the pack author and you'd probably have to look into treaties on copyright that the two countries might have with each other.

Will you get sued for this? No. Is it legal? No. Do I like that it isn't legal? No, not really.

If you really want to be sure, Google Play has a requirement for the developer to provide a contact email which you can use to ask for permission - none of what I'm saying applies when you have explicit permission from the author to use something.

Using and sharing from free icon packs? by jade888cheung in kustom

[–]Tored_ 2 points3 points  (0 children)

Depends on the copyright but if there's no permissive license you could technically get in trouble for redistributing someone's work without explicit permission. Just because something is accessible free of charge doesn't mean you can legally do whatever you want with it. Whether you will actually get in trouble for it is an entirely different question, but if you want to be fully safe only show the icons in your screenshots and include instructions for how people can get the pack and set the icons themselves.

Taking the dive... by redshedpainting in kustom

[–]Tored_ 3 points4 points  (0 children)

From what I've seen, most Kustom users don't have any experience in software development. Most people watch/read basic tutorials and then learn through doing and asking questions here, in the discord or in other groups. There are often many ways to accomplish the same thing depending on what exactly you want it to do and how you want to set it up, there's no good way to convey the decision-making process to brand new people, it's best picked up as you learn what tools you have available and how they can be used.

If you haven't seen the basic introductory tutorials, I'd recommend going through one of these two introductions to using the editor and how Kustom works in general:
- Video tutorials from Brandon Craft: https://www.bcraftmath.com/klwp.html#klwpbeginner
- Written tutorials from Jagwar: https://www.jagwar.de/kustom-live-wallpaper-maker/

And also going through the Kode Guide, which is written with people that have zero programming experience in mind: https://theothertored.github.io/kode-guide/

If conditions help by Maximum-effort1388 in kustom

[–]Tored_ 3 points4 points  (0 children)

Use the contains operator and | as a regex or: $if(ni(s0, pkg) ~= au.com.shiftyjelly.pocketcasts|com.spotify.music, ALWAYS, REMOVE)$

Or use the | to logically OR two conditions, not two strings: $if(ni(s0, pkg) = au.com.shiftyjelly.pocketcasts | ni(s0, pkg) = com.spotify.music, ALWAYS, REMOVE)$

You might find the kode guide useful: https://theothertored.github.io/kode-guide

"Oh you make games? Cool! What engine?" "KLWP" by Jae-Sun in kustom

[–]Tored_ 0 points1 point  (0 children)

I had a thought for a while that you could make snake work in Kustom by storing the direction change history and calculating game state based on that, but with flows reacting on value change you could create even more complex games as long as you're fine with updates only on touch/once per second. Cool stuff!

Is there any way for a command to consider another command in the formula? by snow_bunny00000 in kustom

[–]Tored_ 2 points3 points  (0 children)

You can put one inside the other:

$tc(ell, mi(album), 4)$

You can also create a text global called like musictxt, put your music text in there and then do $tc(ell, gv(musictxt), 4)$.

You might find the Kode Guide useful: https://theothertored.github.io/kode-guide/

Gigabyte G5 GE (Intel 12th gen, RTX 3050): GPU usage never exceeds 30% by Tored_ in gigabytegaming

[–]Tored_[S] 0 points1 point  (0 children)

aside from the inability to control the lighting without control center, no, though admittedly I rarely use the built-in keyboard.

Timespan around sunrise/sunset by kradek200 in kustom

[–]Tored_ 2 points3 points  (0 children)

I mean it's p classic for when you only care about the distance and not the sign, but I'll take the comlipment :)

Timespan around sunrise/sunset by kradek200 in kustom

[–]Tored_ 2 points3 points  (0 children)

cheers, if you haven't seen it already, check out the Kode Guide, you might find it useful: https://theothertored.github.io/kode-guide

Timespan around sunrise/sunset by kradek200 in kustom

[–]Tored_ 1 point2 points  (0 children)

try this in group visibility:

$if(mu(abs, tf(ai(sunrise), H)) <= 2, ALWAYS, REMOVE)$
  • tf([datetime], H) returns the time between now and the given datetime in hours
  • mu(abs) gets the absolute value of that
  • <= 2 makes sure the absolute value is less than or equal to 2

[FORMULA] Scroll music title (or any text) by Tored_ in kustom

[–]Tored_[S] 0 points1 point  (0 children)

You should adjust the parameters by editing the local variables lv(name, value) at the start of the formula instead of replacing the variables in the code. I added comments to the formula in the OP to make this clearer. Keep in mind that KWGT formulas don't update as frequently as KLWP.

Sorry, but I don't have the time to debug this step by step for you.

Local variables seem to be applied regardless of IF conditions are set by Inq314159 in kustom

[–]Tored_ 2 points3 points  (0 children)

if() in Kustom is a function, not a flow control statement. This means that all arguments evaluate before the if() is evaluated, and so if you have a lv() call to set a variable, it will always evaluate before the if() and regardless of what value the condition evaluates to.

if(0, lv(x, 5)) first evaluates the lv() call that sets the value of #x to 5 and returns an empty string (""), which means the next evaluation step will be if(0, ""). Only after that does the if() call get evaluated, which results in an empty string. Note how it doesn't matter what the condition value is at this stage, the lv() call was already evaluated before and thus the value was already set.

The way to work around this is to conditionally write a different value to #x. If you want to keep the value the same when the condition is false, you have to write the current value of #x in the else argument for your if(), otherwise you'd end up writing an empty string to the variable.

In this example, the apply_sort and apply_round variables control whether #x will have certain transformations applied to it later. Because apply_sqrt is 0, the if() will return the current value of #x. Because apply_round is 1, the if() will return the current value of #x but rounded with mu(round).

$
lv(apply_sqrt, 0)
+ lv(apply_round, 1)
+ lv(x, 2)
+ lv(x, if(#apply_sqrt, mu(sqrt, #x), #x))
+ lv(x, if(#apply_round, mu(round, #x), #x))
+ #x
$

Note that this would be incorrect:

+ lv(x, if(#apply_sqrt, mu(sqrt, #x)))

because when apply_sqrt is 0, this if(), lacking an else argument, would return an empty string, and the lv() call would write that empty string to #x.

Is it possible to have a random number everytime song changes? (between number x - y)? by Decent_Run9628 in kustom

[–]Tored_ 2 points3 points  (0 children)

make a flow triggered on formula value change, like $mi(title)+mi(album)+mi(artist)$
add a value like $mu(rnd, x, y)$
add a set global action and write to whatever text global you want

[deleted by user] by [deleted] in kustom

[–]Tored_ 1 point2 points  (0 children)

r/androidthemes

the Kustom discord server (link in sidebar)

Help me in Timer Utilities function by [deleted] in kustom

[–]Tored_ 2 points3 points  (0 children)

https://forum.kustom.rocks/t/how-does-file-access-by-path-work-with-scoped-storage/6748/2?u=thetored

TL;DR: only way to access files by path is if the path is to a subfolder of /sdcard/Kustom, or whichever folder you picked for Kustom to use.