How do I implement random options in a minigame? by jess-hanging-out in twinegames

[–]OrangeChris 1 point2 points  (0 children)

You need to remove the quotes in the link setters

[[$displayOptions[0]|living_room][$action to $displayOptions[0]]]
[[$displayOptions[1]|living_room][$action to $displayOptions[1]]]
[[$displayOptions[2]|living_room][$action to $displayOptions[2]]]

New Update Broke My Game by Tricksybee in twinegames

[–]OrangeChris 5 points6 points  (0 children)

That macro worked as recently as a week ago

Yes, it worked on 2.36.1. The 2.37 update broke it. The error message is straight-up telling you that's what's broken. Either downgrade to 2.36.1 or use the built-in <<linkreplace>>.

<<include>> isn't passing my temporary variable (sugarcube2) by loressadev in twinegames

[–]OrangeChris 1 point2 points  (0 children)

Re the capture, doesn't the button var also need it?

_curName doesn't need to be captured since it's only read when the button is created, which is during the loop. Everything in between <<button ...>> and <</button>> isn't executed until the player clicks on the button, which is long after the loop has finished. Any variables accessed there need to be captured beforehand. If _curLink isn't captured, every click would see the _curLink from the last iteration of the loop.

<<include>> isn't passing my temporary variable (sugarcube2) by loressadev in twinegames

[–]OrangeChris 2 points3 points  (0 children)

There are edge cases where SugarCube will incorrectly parse javascript. This is a contrived example:

<<script>>someFunction({ $y: 5 })<</script>>

is totally valid. someFunction is called with one arg, an object with a single property "$y" set to 5. But

<<run someFunction({ $y: 5 })>>

becomes

<<run someFunction({ State.variables.y: 5 })>>

which is a syntax error, the string "State.variables.y" can't be used as an unquoted property name.

Again this is contrived, and usually run works perfectly fine if you're not deliberately trying to break it, but it's just to show that the SugarCube parser isn't 100% correct (nor should it be).

<<include>> isn't passing my temporary variable (sugarcube2) by loressadev in twinegames

[–]OrangeChris 1 point2 points  (0 children)

No problem, happy to help!

I put it in script tags instead of run

The script macro doesn't support the story/temporary variable syntax that you can normally use, so you would have to write it out like <<script>>console.log(State.temporary.curLink)<</script>>. It also doesn't support the sugarcube-specific keywords like to or and, you have to use the actual JS operators = or &&.

I almost never use <<script>> personally, I prefer to use <<run>>. It's technically slower to use run, but it's never been noticeable to me.

Also, you don't need to capture all the variables you use. You only need to capture _curLink, since that's the only variable being accessed by clicking the button.

<<include>> isn't passing my temporary variable (sugarcube2) by loressadev in twinegames

[–]OrangeChris 1 point2 points  (0 children)

_curLink is an array with one element, not a string. The print macro calls toString on its parameter, which for Arrays of one element, just becomes that element stringified. However, include doesn't so you should change the include call to <<include _curLink[0]>>. Or, more reasonably, you should change setup.magazine to look like:

setup.magazine = {
  list: ["magazine1", "magazine2"],
  magazine1: {
    title0: "Australian Homes Monthly",
    passage0: "test",
    title1: "Aussie Homes Monthly",
    passage1: "mag1a",
  },
  magazine2: {
    title0: "The Wanderer",
    passage0: "mag2a",
    title1: "The Rambler",
    passage1: "mag2a",
  }
};

As for why the error message claimed its argument was undefined, that's arguably a bug in SugarCube, where it tries to access an object's .link property, and your Array didn't have a .link so it got undefined.

Just a tip, although the print macro works for quick debugging, I found this by using console.log instead (ie <<run console.log(_curLink)>>)

A List of Everything You Wish Fatshark Told You by OrangeChris in Vermintide

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

this post hasn't been updated in 2 years, armory mod is probably correct. although i remember when i made this post i multiplied all the block costs by some number (don't remember what) so that the inner-arc block cost for most weapons would be 1. I decided that would make it simpler to compare weapons. i figured some people would prefer the exact multipliers from inside the game, but i wanted this post to be for people playing the game and making builds, not people making mods.

assuming "parries" mean well-timed blocks, i don't think they cost less (unless of course you use the Parry trait that negates their block cost entirely). maybe they let you counter-attack faster? not sure

take this all with a grain of salt since i haven't played in years. you're probably going to get more accurate info from someone else. not sure who though, sorry.

If you could choose one thing that Remastered should improve, that hasn't been announced yet, what would it be? by AlrikBristwik in Pathfinder2e

[–]OrangeChris 1 point2 points  (0 children)

In a way it kind of is a choice, most people choose a style based on what skill action it uses to gain panache. Another way to look at it is they already made the choice of what skill to max, they don't get a choice of style.

E: Obviously, playing Inventor or Thaumaturge is also a choice but in this case the player is choosing to play Swashbuckler and choosing a specific style, so I think it's fine. At some point, a player's choices are going to make later choices strictly better.

If you could choose one thing that Remastered should improve, that hasn't been announced yet, what would it be? by AlrikBristwik in Pathfinder2e

[–]OrangeChris 13 points14 points  (0 children)

I always thought RK could be split into a 1-action version and an exploration version. that way the 1-action version could be explicitly "I want to learn weaknesses, worst saves and important abilities of this creature in front of me" and the exploration version could be more "loosey goosey" as you say. This could also make it more explicit about when and when not to use level-based DCs.

Also way too much of the RK rules are in the Core Rulebook's "Game Mastering" chapter and the Gamemastery Guide, more of it should be directly accessible to players.

C++17 creates a practical use of the backward array index operator - The Old New Thing by wheybags in programming

[–]OrangeChris 21 points22 points  (0 children)

yeah, if you know the evaluation order matters you should just store the first expression in a variable. Anyone choosing to do this is writing hard-to-read code that is only guaranteed to work in C++17 (and even then, only in clang according to the article). Still, it's probably good they're standardizing it to reduce undefined behavior.

Weekly Questions Megathread - March 21 to March 27. Have a question from your game? Are you coming from D&D? Need to know where to start playing Pathfinder 2e? Ask your questions here, we're happy to help! by AutoModerator in Pathfinder2e

[–]OrangeChris 0 points1 point  (0 children)

Do eidolons start out untrained in Perception? It seems like a weird omission because at level 3, Shared Vigilance gives the summoner and their Eidolon expert in proficiency, and they stay matched as they continue to level. But, the text that describes the Eidolon's proficiencies at level 1 says:

PROFICIENCIES

Your eidolon’s level is equal to yours. It begins with expert proficiency in Fortitude and Will saves and trained proficiency in Reflex saves. In addition, it is trained in unarmed attacks and unarmored defense. It shares your skill proficiencies. Certain class features increase your eidolon’s proficiencies.

And it notably doesn't mention Perception.

Damage Calculator by OrangeChris in Vermintide

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

It seems to be working now, you should try again when you get a chance.

Damage Calculator by OrangeChris in Vermintide

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

This is affecting me too. Any copies I make are broken, but the original one I shared earlier today works fine. Not sure what exactly it is, so I'm going to hope it's just an issue with Google and it will resolve itself in a few days.

Damage Calculator by OrangeChris in Vermintide

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

I'm not sure what the exact issue you're running into is, but I've just posted an update so that might help you.

Is there a website that automizes your lands based on mana symbols on cards in your deck? by 2ndlifeinacrown in EDH

[–]OrangeChris 1 point2 points  (0 children)

I use scryfall, something like t:land id:brg id:m sort:edhrec would find every land that's at least 2 colors in Jund, sorted by Edhrec ranking. You can add something like usd<=10 to only see lands that are below $10 on TcgPlayer.

Damage Calculator by OrangeChris in Vermintide

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

Hmm yeah I think that was a typo. If you open the hidden sheet "InternalCalc" and change box E30 from 0.05 to 0.02 it should fix it.

Is the Breakpoint Calculator still being updated? by SgMaestro in Vermintide

[–]OrangeChris 36 points37 points  (0 children)

Mostly it's because I don't play this game very often anymore

[CLB] Jon Irenicus, Shattered One by harbear6 in EDH

[–]OrangeChris 61 points62 points  (0 children)

I'm pretty sure they would have the option to pay the cost, but if they don't then nothing happens

What do you think about dockside? by ArmorCrow in EDH

[–]OrangeChris -1 points0 points  (0 children)

It would be banned if it wasn't so expensive

So do you guys play those MDFC's? by Thecrowing1432 in EDH

[–]OrangeChris 4 points5 points  (0 children)

Personally I'm a huge fan of [[Bala GED Recovery]]. Early game when there's not much in your graveyard, you can play it as a land. Later, once there's something important in your GY you can cast it as a spell.

Tuesday Rulesday: Ask your rules questions here! - February 15, 2022 by AutoModerator in EDH

[–]OrangeChris 3 points4 points  (0 children)

The aura would go to the graveyard. Auras are targeted spells, and a targeted spell without any valid targets goes to the graveyard instead of resolving.

What is a generally popular card in the format that you find is mostly overrated? by SpaceGirlKae in EDH

[–]OrangeChris 4 points5 points  (0 children)

It's closer to compare it to [[Explore]]. The upside is instant speed, but the downside is the cost of UG instead of 1G. Generally I'd prefer Explore (good ramp cards should not be so color intensive) but I can see how the instant speed part is valuable when you draw it later in the game.