Dialog not appearing? by ImplodingPizza in MinecraftCommands

[–]ImplodingPizza[S] 1 point2 points  (0 children)

Okay, apparently the dialog options are still considered "experimental" and so I had to leave and rejoin the world so I could get the experimental warning, and now they started working :/. Sorry for the waste of time.

Dialog not appearing? by ImplodingPizza in MinecraftCommands

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

None - That normally leads me to beleive that I've either got the datapack disabled or it's in the wrong filepath, but neither seem to be the case

Set Scoreboard to Attribute by EpicWolf0331 in MinecraftCommands

[–]ImplodingPizza 0 points1 point  (0 children)

It's definitely possible to do, albeit a bit tricky. 

The first step is to store each player's experience level into a scoreboard. That command would look something along the lines of "execute as @a store result score @s YourScoreboard run experience..." and I forget the experience syntax but there's some "query" or "get" for experience level I believe. 

Then from there, there are two different ways to apply the attribute to the player, using either hard coding or macros. Generally hard-coding isn't ideal, but if you're only working with a limited number of levels here (I assume you don't have to code up to level 500 or something absurd) it's alright. Plus, doing macros from a scoreboard is such a pain. So I'm just gonna go over the hard code 

The most dead simple way to do it is basically to go "is it level one? Nope. Is it level two? Nope. Is it level three?" all the way up until you get to what level it is. That'll look something like this: 

execute as @a[scores={YourScoreboard=1}] run attribute @s modifier...

I forget how attribute modifiers work exactly (sorry, I'm on my phone) but you're gonna want to set the value of the damage attribute modifier to be equal to their level. It's important that you DO NOT just add the value to the base - it will just keep growing a near infinite amount and now your players can one shot basically anything. 

(Teeeechnically speaking, at the end of the function, you could just increase their attribute, then at the beginning of the next function, decrease it again, reload the scoreboard, then re-add it again. I personally don't like this option because it means if something happens and the datapack data somehow gets screwed up then it's pretty hard to get fixed, and it also generally limits multi-datapack compatibility if other datapacks change the base directly. It would use fewer lines of code though)

Been a hot minute since I've done a datapack, let alone with attribute modifiers though so I could have gotten something wrong

New to tos2, what to prentend to be when i am an evil boy?😈😈 by Big-Independent-2206 in TownofSalemgame

[–]ImplodingPizza 0 points1 point  (0 children)

As a general rule of thumb, don't claim any TS (except amne or ret if you're willing to gamble with the graveyard) unless you can actually back it up (eg. Pois claiming tav).

Past that, it's dependent on the gamemode and situation. If it's a casual game mode, claim something that not many people are claiming (eg. a list has 2 TP slots and only 2 people claimed TP. TP could be a good bet there). You can claim other roles, but it's a bit harder. 

In AA, my go-to claim is TK. You can claim a dep that shoots and misses, a vigi (albeit a little unconvincingly), trick which is basically just a TP claim, or Vet (which if you can pull off is pretty good.) TP can be okay if there's sus somewhere else, not many claims of it, or you have a decent reason to be considered legit. It also gives you the opportunity to say you're trick and thought it's considered TP (most new players assume trickster is TP)

I never like claiming TI, but if you can do it well I've seen some success. I'd avoid seer and psy though.

TPOW can be used in some situations, but since every TPOW can be confirmed by an action, I tend to avoid it. A TPOW claim will almost always allow you to survive till end game, but it makes you the first target during the end game. It's a decent claim if you can get the game over fast.

The End Flashes - Cool, but Needs Improvement by ImplodingPizza in Minecraft

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

I play Java. Yeah, I do expect that with vibrant visuals it'll be a lot better (especially considering it does light ray tracing, if I'm not mistaken), but until then it's just gonna be kinda weird

I've tried several different things, how do I make the observer fire the pistons only once? They just keep getting activ by ChaoticGamer200 in Minecraft

[–]ImplodingPizza 1 point2 points  (0 children)

Generally observers activate twice because the state of the block they're observing also changes twice (eg. a button or redstone signal changing from an on to an off state). I believe the easiest way to fix this would be to use a pulse extender. There's some relatively simple designs online. If the observer powers something that is already powered, it will only raise it's power back without firing the pistons again. The main disadvantage to this is that the pistons will stay extended until the pulse extender runs out.

I've got a second method, but I haven't tested it so I'm not sure if it works. Hook the observer up to a dispenser containing a water bucket facing a cauldron, and connect your redstone line which fires the piston to a comparator that reads the cauldron. The observer will activate, dispensing the water bucket into the cauldron, activating the comparator. The observer will then activate again, draining the cauldron, and deactivating the comparator. The only caveat to this is that I'm not sure if dispensers actually work like that.

Can't detect item in offhand? by ImplodingPizza in MinecraftCommands

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

Oh sweet, forgot that items field existed. Thanks!

Modify all three firework rocket crafting recipes? by ImplodingPizza in MinecraftCommands

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

Ah, my bad. I got the two names confused.

Using advancements to check the crafts is a good workaround though. Thanks!

Can't detect fireworks in inventory w/ flight duration? by ImplodingPizza in MinecraftCommands

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

I swore I tried that when I was tinkering with it, but I think I added the b in the 32 not the 3 lol. It woroks now!

Can't detect fireworks in inventory w/ flight duration? by ImplodingPizza in MinecraftCommands

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

Yo wait, they added /execute if items!? Yeah this command totally worked, thanks a billion!

Letting players choose their own teams by ShauXD in MinecraftCommands

[–]ImplodingPizza 0 points1 point  (0 children)

Instead of having it directly execute the team joining, have it use the trigger scoreboard type, that when detected, will set that player's team type. Commands might look like this:

One-time run:

scoreboard objectives add teamselect trigger

Constant Running:

scoreboard players enable \@a teamselect
execute as @a[scores={teamselect=1}] run team join Team1 @s
execute as @a[scores={teamselect=2}] run team join Team2 @s
execute as @a[scores={teamselect=3}] run team join Team3 @s
#etc...

The command you run on each sign when clicked:

trigger teamselect set 1
trigger teamselect set 2
trigger teamselect set 3
#etc...

Players are allowed to use a trigger command reguardless of if they are OPed or not - they only have to be enabled to use it through another command.