#Custom System Builder

1 messages ยท Page 47 of 1

manic crypt
#

The description below the item entry is contained in the item.

#

The uuid key is always contained (along with 'name') in any item displayer, but it's not usually shown in the displayer

sonic marsh
#

Is there a way to assign initiative from within a character sheet?

#

We are using an initiative variant that has a fairly complex formula, including user input. I don't see how it can be done in the normal "Configure Settings" without using "${}$"

manic crypt
#
In the system settings, you can set your custom initiative formula. This formula must be formatted like a roll formula, returning only an integer. The ${}$ must not be set around the formula.```
#

that means you can use keys, surrounded by ::

#

I haven't experimented with it though, so I'm not sure if the individual initiative rolls are generated from the actor sheets or from the GM; I think the former though, so that you could use something along the lines of :dexmod: in them

sonic marsh
#

I can get it to work by accessing variables within the character sheet. For example "[1d20 + DexMod" works fine in "Configure Settings"

#

However, what I want to do is to allow someone to choose a different Initiative formula based on their plan during their turn. For example, the player choose a normal, slow or fast action. The initiative roll should be 1d20+0; 1d20-10; or 1d20+10

manic crypt
#

If it's a hot-change you might have to go with manual adjustment. Foundry doesn't roll initiative every round without a script.

sonic marsh
#

Inside the character sheet I can use the ? operator to select a different formula. But it doesn't work in "Configure Setting"

#

I'm OK to reroll initiative every round. I just need a way to allow the player to select which formula to use when rolling initiative.

manic crypt
#

have a dropdown with their selected action type and call that key in the initiative formula?

#

set the Keys on the dropdown entries to -10, 0, 10 and the associated labels to Slow, Normal, Fast and it should return the Key that's selected on the dropdown as part of the formula.

sonic marsh
#

Hmm. Clunkier than I was hoping since it takes 2 steps, but I think that could work. Thanks for the help.

manic crypt
#

No problem. There might be a more scripty answer to it, but that's what I can think of.

brave trench
#

That helps, thank you. I think i figured out my problem though. Since item displayers can only do labels, I am using a trick in the Wiki for equip buttons as labels. <i class="fa-regular fa-'square-check' " style="color: 'green';"></i>

I just realized that trying to use a a 'true' check box as a row filter for that column using that label trick probably doesn't work. What would that column return if checked? Is it still possible to use it as a filter?

manic crypt
#

for the filter you can just use the item.equippedkey value.

#

equippedkey being whatever key you're using on the item to indicate that it's equipped.

brave trench
#

Currently I was attempting to use lookup() or find() (still havent figured out the difference) in order to search through the columns of an item displayer and find the one checked off as equipped.

manic crypt
#

No, I thought that was a separate case. I used the same label bit for this:
<i class="fa-regular fa-${item.Readied ? 'square-check' : 'square'}$" style="color: ${item.Readied ? 'green' : 'red'}$; background-color: white;"></i>

To indicate if the item was equipped or not, but it toggles a checkbox on the item (visibility GM only) that is saved in the item.Readied key.

#

then I filter the item displayer by that key instead of by a column.

brave trench
#

oh ok. so for that method you need a separate item displayers for players to choose which is equipped, then a second displayer which is showing only the equipped one?

manic crypt
#

Yeah, I do have that. I have a different tab for Combat and it displays only the equipped weapons and armor. The fiter for the weapons looks like this:

#

They have a full displayer of all items on their character in a different tab. Mostly because I wanted a place for the combat rolls to be clear.

brave trench
#

Yeah, makes sense. I think i was just going about this the wrong way. Thank you!

manic crypt
#

No problem. And I know all about that. I spend a significant amount of time thinking the wrong way about stuff ๐Ÿ˜„

brave trench
#

If I did it your way it would show an arrow equipped, not a long bow.

manic crypt
#

The Projectile Attack Options table, is that a DT?

#

Must be.

brave trench
#

the top one, yeah, DT. but im trying to get rid of it and make use of the items in items method

manic crypt
#

And what do you want Test on the ID to be showing?

#

Ah, the bottom one on the Long Bow item is an Item Displayer showing "arrow" as an item.

#

And you want to pull that out.

#

to the parent table on the sheet to the left.

brave trench
#

Test on the actor side display on longbow? The one reading Error at the moment? Id like it to display the dmg total of the arrow inside the longbow

manic crypt
#

If you've pulled the information to an item displayer on the item, then you should be able to use the key addressing from the sheet to the longbow item displayer's key.

#

what's the key to the item displayer on the item?

brave trench
#

the key for the displayer on the item is ammoDisplayer

manic crypt
#

find('item.ammoDisplayer','DmgRoll'), assuming that's the key for the damage roll column

#

btw, find() is the same as first(lookup()); if you use lookup() it returns an array of all the values from the table that match.

brave trench
#

yeah that works, except there may be multiple arrows on the sheet, so Id have to filter to the equipped one. I think thats where I'm getting my error, is trying to filter via column from that checkbox trick.

#

I need to know what that checkbox actually returns in code (im no good at finding out how) or find a better way to filter. the equipped one, like your method. I guess I could do your method, and then do a hidden displayer that just shows the equipped arrow, then pull the information from that? lol.

manic crypt
#

so the filter would be on the item displayer containing the arrow; you don't need a hidden column for it if you have the checkbox on the ammunition items.

brave trench
#

you mean the display filter itself? I understand how to do that. Im tryining to get the weapon displayer on the left, where you said to do find('item.ammoDisplayer','DmgRoll') to find the dmg of only the 1 equipped arrow. if there are 10 diff arrows all with different dmg, wouldnt find('item.ammoDisplayer','DmgRoll') do an array? or first, rather than the equipped?

manic crypt
#

Ah, I see what you mean. It's going to be exclusive though, right? Noone is going to equip more than one arrow?

#

in that case, yeah, you might need a hidden column. That's what I had to do in order to make my armor equipping exclusive, like this:
(this is the armor Label Roll Message for the equip button)
${item.Readied ? setPropertyInEntity('item', 'Readied', "false") : equalText(string(first(lookup('Armor', 'armorhidReady', 'armorhidReady', 'true'), 'false')), 'true') ? notify('error','You cannot ready more than one set of armor') : setPropertyInEntity('item', 'Readied', "true")}$

brave trench
#

Correct. So I guess i could just do one displayer as say the quiver holding x different arrows, and equip from there. then the equipped displayer will only have 1 arrow in it and find('item.ammoDisplayer','DmgRoll') works fine

manic crypt
#

with this being the Label Text entry for the same thing:
<i class="fa-regular fa-${item.Readied ? 'square-check' : 'square'}$" style="color: ${item.Readied ? 'green' : 'red'}$; background-color: white;"></i>

#

the advantage being that at THAT point, I also have the armorhidReady key to use for find() filters.

#

so if you have that key available, the code from earlier would look like find('item.ammoDisplayer','DmgRoll', 'isEquipped', true, ===) (edited to fix looking at the wrong command syntax)

brave trench
#

I'll play around with it. I think talking to you gave me some ideas on how to handle it ^_^

manic crypt
#

Sounds good, good luck!

brave trench
#

find('item.ammoDisplayer','DmgRoll', 'item.ammoDisplayer','isEquipped','===',true) that finds the isEquipped key on any item in a displayer?

I'm still having a hard time wrapping my head around the new added formula options.

manic crypt
#

Yes. It's more of a placeholder with an obvious name about what I meant

#

You would have to create a checkbox with the 'isEquipped' key for it on each ammo item for it to work as written.

brave trench
#

and why use ===? I thought conditions used == for equal to

manic crypt
manic crypt
#

@formal goblet What's the use-case for ref() vs just calling the key? Is it just for the fallback value?

#

or could you use it to say, have a dropdown with a list of other key values in the Key column and have those called dynamically in a roll, rather than having to use a lookup?

formal goblet
manic crypt
#

Got it, thanks!

thorny ledge
#

I am trying this code and return actor undefined error:

%{const periciasMelee = actor.system.props?.periciasMeleeTabela;const thisRow = Object.values(periciasMelee).find(row => row.danoMelee === "1d10+1");const danoMelee1 = thisRow.currentValue;return await game.macros.getName(danoMelee1).execute();}%

sinful spade
#

const actor = game.actors.get(entity._id);
if ytou're running within a button in the character sheet this autofills idk about macros

formal goblet
#
entity // TemplateSystem
entity.entity // Actor | Item
thorny ledge
# formal goblet ```js entity // TemplateSystem entity.entity // Actor | Item ```

Ok now the code is:

%{const periciasMelee = entity.entity.system.props.periciasMeleeTabela;const thisRow = Object.values(periciasMelee).find(row => row.danoMelee === "1d10+1");const danoMelee1 = thisRow.currentValue;return await game.macros.getName(danoMelee1).execute();}%

TypeError: game.macros.getName(...) is undefined

brave trench
#

@formal goblet is it possible to target data of an item in an item from an actor? Example setPropertyInEntity, reducing the quantity of an arrow item, loaded on a bow item, from a roll button on an actor sheet?

formal goblet
brave trench
thorny ledge
# sinful spade gotta get the actor first

Like that?

%{const actor = game.actors.get(entity._id);const periciasMelee = actor.system.props?.periciasMeleeTabela;const thisRow = Object.values(periciasMelee).find(row => row.danoMelee === "1d10+1");const danoMelee1 = thisRow.currentValue;return await game.macros.getName(danoMelee1).execute();}%

formal goblet
thorny ledge
#

myTable

#

What I want to do is use the value of danoMelee to roll a macroDamage

frosty charm
#

I have a little problem. When player uses attack macro, that decresses HP of targeted token, error appear "User lack of permission to update actor". How i can solve it?

#

When i use this as a GM it all right

thorny ledge
formal goblet
frosty charm
#

What if token will not be attached to actor?

formal goblet
frosty charm
#

But how can i do macro to automate battles for players?

versed notch
#

So, I'm having issues with the dynamic table component; how do I call a part from the same line of the dynamic table to an equation at another column? I've tried using the keys, but I just get an error.

thorny ledge
#

Syntax: sameRow('base_value', 0)

#

I did it

#

Finally

versed notch
thorny ledge
#

Damage is easy this way: ${[:sameRow('danoMelee', 0):]}$

#

danoMelee == text field containing the damage in Dynamic Table

brave trench
# formal goblet `setValues(fetchFromUuid(find('weapons', 'uuid', 'name', 'Bow'), "find('ammoniti...

more questions about this, cant get it to work. 1. do I still need to find the uuid of the bow if I'm rolling from the displayer the bow is already in?

  1. its finding the uuid of the ammoDisplay item where equipped = true, correct? if thats based on the equipped column name, will it read true using your label trick for displayers (equipped check box)? Because I'm getting a blank field returned when trying to display the equipped check.
formal goblet
elfin laurel
#

Is there a way to replicate the sameRow or sameRowRef feature, but along a column instead of a row?

My thought was to use the sameRowIndex, set it equal to a variable, then increase or decrease that variable by however many I need. But then I don't know how to translate that updated variable into the correct/original column.

elder raft
#

does Math.abs() work in a rollcard?
And is that the easiest way to get an always-positive number in CSB?

What's the syntax on it, if so? I'm getting an Uncomputable Token on "Math"

formal goblet
elfin laurel
elfin laurel
formal goblet
#

0

elfin laurel
#

Thank you!!

elfin laurel
#

Using this function in the DEdge column: ${ref('item.AbilityResults',sameRowIndex() + 1, 'HEffect')}$

#

This item table:

#

And here is how it's displaying on the item:

ruby frigate
#

hey i have a quick question
I am trying to set a checkbox inside an item to false with the "setPropertyInEntity" Formula
However it shows error every time, is it something that can be done or am i just missing something
this is the formula i used and 'equip' is the key of the checkbox
${setPropertyInEntity('item' , 'equip' , "false" }$

waxen thorn
#

Hello Community. Could it be that scripts in roll messages are read-only and only work with local copies of objects so that you have to work with SetPropertyinEntity to write values?

formal goblet
final mural
#

i have a very basic understanding of programming so this might be a stupid question
is there a way to make a function accessible in any field that accepts formulas?
i'm currently using this
%{function errornt(x) {
if (isNaN(x)) {
return 0;
};
return x
};
return errornt(entity.system.currency.KR)}%
to filter out errors that were causing issues but would like to just use
%{return errornt(entity.system.currency.KR)}%

formal goblet
sinful spade
#

actually that's a fair point
martin can you explain world script to me?

final mural
#

is this doable with little programming expirience or should i just let it be?

final mural
#

so if i do it right i just need to put
function errornt(x) {
if (isNaN(x)) {
return 0;
};
return x
};
in a world script and it should work or am i missing something?

high stag
#

You guys are using monks little details to change active effects or something else?

#

Since I didn't find a way to change Foundry's default active effects

sinful spade
#

I just updated to the latest version since i have a need for items housing other items with my current project.
Does anyone have any experince setting up item containers within items? How do i get them to display properly?

high stag
#

explain what you wish

sinful spade
#

I tried the simple

  • create item container within housing item and filter for template of sub item
  • drag drop subitems

both within the actor and outside

#

I just want to make an item that has an item container in it for display purposes, the item container needs to filter by a few conditions but i think i can manage that once i get anything displaying.
Regardless of how i change settings, nothing appears within the container

high stag
#

I dont think that works well.
But i know two ways to do that.
Using Griddy or Item Piles

sinful spade
#

update 4.3 allows for items to contain other items ๐Ÿค” i should just be able to make a 'backpack' item natively no?

#

(its not actually a backpack but the concept applies)

sinful spade
sinful spade
#

can items only be added to an item within an actor or can i premptively do so?

#

(though i tried both)

formal goblet
#

There was a bug with 4.3.1, but got fixed with 4.3.2, where you couldn't drag Items from the Directory to an Item inside an Actor

sinful spade
#

im on 4.3.2 currently

#

just updated from 4.2.0

formal goblet
#

Anything in the console when you try?

sinful spade
#

no errors normal messages

#
Logger.js:33 Custom System Builder | Created items YlhjV6HgqcFrFDg0
Logger.js:33 Custom System Builder | All props for Beggar (YlhjV6HgqcFrFDg0) computed in 1 loops.
Logger.js:33 Custom System Builder | All props for Beggar (YlhjV6HgqcFrFDg0) computed in 1 loops.
Logger.js:33 Custom System Builder | All props for Beggar (YlhjV6HgqcFrFDg0) computed in 1 loops.```
formal goblet
#

Then idk

#

Does the Item disappear from the Actor at least?

sinful spade
#

cant tell by looking

#

the item displayers dont show anything

formal goblet
#

When you try to drag from an Actor to an Item inside the same Actor?

sinful spade
#

hold on. i think i found the error

#

do visability formulas apply before they're loaded into a character?

#

seems so.

formal goblet
#

They only decide, if an Item should be displayed or not. They do not prevent anything else

sinful spade
#

not filters

#

so my setup was:

  • the item displayer itself was checking if the character sheet was in the creator menues, if yes display this displayer if no display this other dispalyer
  • Neither displayed as it wasn't added to the character sheet
  • added to character sheet, neither item displayer displays still. possibly not updating after being added to the sheet? checking to see if i had a typo in my visaiblity formula currently.
#

ah wait, i think i got it.
i can't ref('key') as a visibility formula within an item can i facepalmpicard i need to identify checking the parent somehow.

#

fetchFromParent?

#

yep that worked. should have thought about that sooner. sorry

dusky mauve
#

Any Idea how to fix this
Trying drug and drop item to the compendium.

#

Even if I directrly create item in compendium - import it and trying drag and drop to compendium back

rocky sable
dusky mauve
rocky sable
silver lake
#

Bumping my question from a few days ago:

austere lantern
#

I found out my foundry install was a bit busted so I reinstalled it. I'm gonna check my CSB to see if I can get a number to spit out to chat when I click a stat now.

#

Yep, I no longer get errors now.

#

well, for just printing out a number from a stat that is.

#

This popup that I'm working on

${#Roll(
?{checkdifficulty: "Check Difficulty"[number]},
?{statchoice:'Which Stat'|"MEstat","Mind"|"BEstat","Body"|"CEstat","Community"})

checktotal:=(checkdifficulty - statchoice)
[(:checktotal:)]}$

gives me this error.

#

the keys for the stats are MEstat, BEstat, and CEstat. am I not calling them correctly?

#

do I need to surround them with colons?

sinful spade
#

dunno man, but is everything displaying? is a more helpful error in the console?

austere lantern
#

yeah, I'm poking around and this

${#Roll(
?{checkdifficulty: "Check Difficulty"[number]},
?{statchoice:'Which Stat'|MEstat,"Mind"|BEstat,"Body"|CEstat,"Community"})
}$
${statchoice - checkdifficulty}$

now gives me a number print out

sinful spade
silver lake
austere lantern
sinful spade
#

[] is usually called to roll something

austere lantern
#

ah oops

#

I forgot I don't need to roll anything currently

sinful spade
#

not sure if that's always the case but yeah [1d6] rolls a d6.
i think the colon has something to do with saving the variable for later use

austere lantern
#

ah ok

#

so now I just need to use the find function to compare the subtracted numbers total to my dynamic table and roll the correct value

austere lantern
#

ok, I've made this so far

${#Roll(
?{checkdifficulty: "Check Difficulty"[number]},
?{statchoice:'Which Stat'|MEstat,"Mind"|BEstat,"Body"|CEstat,"Community"})
}$

${find('rolltable', 'dicerollformula', 'checkdifnum', (statchoice - checkdifficulty))

}$

which ends up giving me this.

#

also it displays this

#

I feel like I'm fumbling in the right direction.

#

when I replace

${find('rolltable', 'dicerollformula', 'checkdifnum', (statchoice - checkdifficulty))

}$

with

${find('rolltable', 'dicerollformula', 'checkdifnum', '0')

}$

it gives me 2d8 which is correct

#

so I probably need to make new variable that equals statchoice - checkdifficulty and slot that in.

#

however it doesn't roll 2d8, but I'll figure out that issue next

thorny ledge
#

How may I decrease a number field value in a Dynamic Table?

formal goblet
formal goblet
sinful spade
austere lantern
sinful spade
austere lantern
#

k

sinful spade
#

dude no lie, i've trained a chatGPT chat on how to use CSB and use that to make 90% of my functions haha

#

im a UI guy at best

austere lantern
#

gotcha

thorny ledge
formal goblet
thorny ledge
austere lantern
fringe silo
#

${#setPropertyInEntity('item', 'item.cooldown_active', item.cooldowndrop)}$ is this possible and im not getting the location or the property right. So im trying to have a damge roll set a cool down number from an item drop down, to a number field on the item,

thorny ledge
#

How may I get and sum different columns from dynamic tables and values of outside from dynamic tables?

formal goblet
formal goblet
formal goblet
austere lantern
#

There is no error log for it either

formal goblet
#

If it still returns undefined, then you have no match and you should think about using fallback() when using find()

austere lantern
#

That seems to have done it!

#

The question is how do I pass that string value to a roll

austere lantern
#

Ah now it's working! Thank you very much!

fringe silo
#

ok, so setting the number worked, now im trying to use an end round button that currently reduces cool down by 1.

#

its a number field

formal goblet
final mural
#

i have 120 of these errors, seemingly for every instance of whatever it is
how do i start to look for the source, i couldn't find just 'BI' mentioned anywhere

fringe silo
#

getting this with that change

#

the orginal roll sets the number but this does not adjust it

austere lantern
#

Quick question. What is CSB Embedded Items Folder?

formal goblet
austere lantern
#

Items of other items? like a compendium?

fringe silo
#

@formal goblet any idea why this formula may not be working ive tried a bunch of adjustments to it and cant get it to work,

formal goblet
austere lantern
#

ok

formal goblet
fringe silo
#

yes

austere lantern
#

yeah

#

woops wrong chat

formal goblet
#

Then show me the error in the console if there's any

#

Try it this way: ${#setPropertyInEntity('item', 'cooldown_active', item.cooldown_active - 1)}$

fringe silo
#

same error

formal goblet
fringe silo
#

no

formal goblet
#

Well, that's the reason. Otherwise this approach won't work.

#

You'll have to use setValues(lookup('itemDisplayerKey', 'uuid'), 'cooldown_active', "target.cooldown_active - 1")

fringe silo
#

@formal goblet how do i get that uuid

formal goblet
fringe silo
#

oh ok i thought it was an id i had to put in, uuid is the entry

#

that is awsome thank you

misty terrace
#

with warpgate gone and done, is there an alternative way to automatically apply damage from a player-initiated roll to an NPC target?

thorny ledge
formal goblet
plush solstice
#

Is there a way to hide the sheet refresh and hidden attributes buttons from even the GM? I've built my templates and (for now) I'm happy with them, so as I'm running sessions I'd like a cleaner look. Basically if I could set this to "Hide from all" and then move it back to GM if I need changes later.

elfin laurel
#

How do you get the additional item filter formulas to work in item displayers? For example, I have an item template for weapons, and a dropdown in the item that indicates if it is ranged or melee. Or a dropdown that indicates if it's piercing, slashing, bludgeoning, or some other kind of damage type.

I want the item displayer to display only items of the weapon item template (which I can do just fine by selecting the template). But then in the Item filter formula, how would I get it to filter by that dropdown?

I tried using 'item.ComponentKey' == 'DropdownKey' and 'item.ComponentKey':= 'DropdownKey' but neither worked.

formal goblet
elfin laurel
#

Is equal text an actual formula? I didn't find it on the gitlab wiki anywhere. What does the formula do?

elfin laurel
manic crypt
elfin laurel
# plush solstice Is there a way to hide the sheet refresh and hidden attributes buttons from even...

If you set the minimum role to Game Master but don't change any other settings, you could run the game as a separate user account that is set to Assitant GM. By default, I think the only differences in Foundry for Assitant GM and regular GM accounts is being able to edit the World-level settings. So for running a game purposes, they should basically be the same, but you'd get that cleaner look you want.

sinful spade
elfin laurel
high stag
#

is it possible to make a macro inside a label text?

formal goblet
high stag
#

Thanks!

#

what did i do wrong?

#

im gonna macro this to be able to see something in the sheet

#

the macro make it works :p

#

so-so

#

how can i make it return another variable?
i want to make something like:
%{return currentLevel; await game.macros.getName('XP').execute({entity: entity})}%
then
%{return halfwayTonextlevel; await game.macros.getName('XP').execute({entity: entity})}%

elder raft
#

Howdy! (probably Martin, let's be honest, he's the help god)

I'm designing a chat/rollcard, and I was wondering if there is/what's the best way to only have text/a <tr> or <td> only display based on a computation?

I have "Focus Points" players can add to rolls for advantage, and I'd like the card to display the use of a focus only if they use one, otherwise the card display just skips the whole row.

1st is desired output (when a Focos is used or Fault Exploited)
2nd pic is desired output (with no Focus/Fault)
3rd is what I'm getting when trying to put the <tr><td> and text inside a formula. (${focus > 0? <tr><td><i>Focus: ... etc}$)

I have tried #none and '' as the "else" option when focus = 0, but it still displays that ERROR calculation up top.

#

Definitely a syntax error I'm not sure how to overcome... ๐Ÿค”

formal goblet
elder raft
#

Ooh okay, I'm playing with it!
Though, I'm not sure how to <tr> and <td> in there without it ignoring the span display formula.
I either get the table formatting lines (empty) when I don't want 'em to appear, or I can't apply any formatting. Do I need to be putting rows and td/alignment/colors etc in the span styling, or in some other syntax inside "Your content"?

#

Yeah, best I can get is displaying that content outside of the table... I might be able to work with that though,

elder raft
#

Oooh, think I got something with <tr style="display: ... >

elder raft
#

hah! got it

#

<tr style="display: ${!focus > 0 ? 'span' : 'none'}$;">
Allows me to still use <td> inside that row and have my fancy formatting, while keeping the row full-width

fringe silo
#

what would i add to this formula to make it set the value to 0 if it goes below zero, i have the field set as min 0 but it still goes below 0

#

${setValues(lookup('powess_ability_display', 'uuid'), 'cooldown_active', "target.cooldown_active - 1")}$

waxen thorn
fringe silo
#

getting an error

#

nevermind it work sry fogot part of it

fringe silo
#

onw more question for the evening whats the command to check a check box for true for an item displayer

formal goblet
#

It's all Labels, so equalText() (HTML counts as text)

fringe silo
#

err i want the item displayer to ref a chk box on a item to see if its true or false so it will know to display it our not

formal goblet
#

Or you directly check the Item itself with fetchFromUuid()

fringe silo
#

equalText('item.chkbox key',1) ?

formal goblet
elfin laurel
#

Very simple/silly question where I'm probably overlooking something right in front of me: is there a component key to reference the name of an actor?

#

For example, if I wanted a chat message to say 'Actor'sName used Fireball!' what would I use/reference to get the chat roll to pull the actor's name?

marble burrow
#

How would I combine a user input with table results in a roll label message? For this example, there should be a user input (checkbox) as to whether they have advantage (which gives a +1d6 to Hope).

manic crypt
manic crypt
#

(I didn't actually do that for the screenshot, I thought about it after I had taken it and was typing..)

marble burrow
marble burrow
misty terrace
#

Is there a way to do a simple multiline text entry without the Rich Text Area? Interacting with the control is clunky and awkward, and the toolbar area is visually distracting.

formal goblet
misty terrace
#

Here's the use case. Spells are items with a name, a mana cost, a damage type and I need a large field for the spell description.

The character sheet has a tabbed control. with a page dedicated to spells (which will be in an item display container). Most spells are several sentences in description.

How is everyone else handling similar stuff?

misty terrace
formal goblet
formal goblet
misty terrace
#

let me see what that looks like. Wish there was a way to surpress the WYSIWYG section at the top of the rich text area

manic crypt
#

If you don't need to edit it often, you could have the RTA somewhere else and the displayed description linked to a label.

misty terrace
#

Martin's tip will work for me, in this case. Thanks!

elfin laurel
#

Can you nest conditions? In other words, would this work?

${a==1 ? b==1 ? "A and B" : "Only A" : "A is not 1"}$

If a is 1, then check if b is 1. If b is 1, then show "A and B", otherwise show "Only A", and if A isn't 1, then show "A is not 1"

formal goblet
bleak wyvern
#

would there be anyone around who could help me write up some code for things for my character sheet?

bleak wyvern
sinful spade
#

๐Ÿ˜› sup buddy ahha

#

i know that comes off as a bit snarky but i am so serious.

bleak wyvern
#

to be frank with you............................ I've never used chat gpt... dont know how ๐Ÿ˜ถโ€๐ŸŒซ๏ธ ๐Ÿฅฒ

sinful spade
#

I hear you but it's like google

#

i can show you how i use it

#

if you want

bleak wyvern
#

yeeeeeeeeeeees plz

sinful spade
#

there's a free and a paid plan -- I'm on the $20/mo and it is worth if you do anything over the bare bone basics

#

i'll be free in like an hour

bleak wyvern
#

Im trying not to spend money... ๐Ÿ‘€ but if the free version will help me out then thats great ๐Ÿ˜‚ , then ill see yuh in an hour ๐Ÿ‘

sinful spade
#

free will get you by, tho there will be limitations -- should still be enough for most of what you want tho

bleak wyvern
#

hopefully the free version can do that much

sinful spade
#

that's actually so simple, but yes i can do that easy

#

i think the free plan limits how many messages you can send to it and you cant use the newer (better) versions till later

#

at the plan im on i can use the free models as much as i want, but have limits on new models, full access is like $200 a month ahha

bleak wyvern
waxen thorn
sinful spade
#

no point switching switching AI for less function and minimal quality diff

waxen thorn
manic crypt
formal goblet
#

I'm pretty confident, that I can beat the AI in terms of support for CSB ๐Ÿฑ

bleak wyvern
#

Thank you both, but I was just in call with Scyrizu and he set me up quite nice, Imma see what I can do with it for now and if I need more help I'll ask right in here for assistance ๐Ÿ‘Œ ๐Ÿซ‚

icy panther
#

I am stumped, I am trying to display the id of an item in a column of an item displayer alongside the item which is attached to an actor, using 'item.id' or ${sameRow('id')}$ errors

icy panther
formal goblet
#

id isn't

#

Although it should be present in the Item Displayer somehow

icy panther
#

ahh ok, just this bit made it more so ๐Ÿ™‚
Also, every entry in the Item Displayer comes with 3 hidden columns: name, uuid and id, which can be referenced from Formulas.

formal goblet
#

It is as you can see

icy panther
#

a quirk of foundry?

formal goblet
#

Because I've tested this ${sameRow('name')}$ ${sameRow('id')}$ ${sameRow('uuid')}$ and it works as expected

icy panther
#

undefined

formal goblet
#

Which version of CSB are you using?

icy panther
#

I am even more confused now, I just copied yours and it works

#

maybe I had a typo

high stag
#

never lucky with lookup. This time its a label, i think if its works on a label.

lookup('escondidos_boon', 'escondido_boon', 'keyescondido_bonus', '${pericia_atletismo}$')
icy panther
#

getting deep into the bowels of this now, so I will be back with more questions

elfin laurel
#

I'm referencing this table in an item:

#

This:

${BaseDamage:= lookupRange('item.AbilityResults', 'Damage', 'TierResult', FinalResult)}$

And this:

${BonusDamage:= lookupRange('item.AbilityResults', 'DmgBonus', 'TierResult', FinalResult)}$

both work. But this:

${Effect:= lookupRange('item.AbilityResults', 'Effect', 'TierResult', FinalResult)}$

doesn't work. What am I missing???

sinful spade
sinful spade
sinful spade
sinful spade
# icy panther maybe I had a typo

i once spent 3 hours debugging a csb error... because of an invisible \n that was left behind from a time i pressed enter and deleted out the new line it made.

elfin laurel
formal goblet
elfin laurel
#

I'm officially out of my depth looking at the console ๐Ÿ˜ฒ

sinful spade
ionic flax
#

Oh, lord...

formal goblet
sinful spade
# high stag nope

no clue then, but i'm still certian it's to do with '${pericia_atletismo}$'.

elfin laurel
ionic flax
# elfin laurel

I was just coming here to ask for help with my RPG system, just general ideas and trying to maybe use the Foundry to better organize it, and I see THAT.

high stag
formal goblet
sinful spade
ionic flax
#

This is exclusively dedicated to the programming side of things, right? I would rather not importunate anyone.

formal goblet
elfin laurel
sinful spade
formal goblet
sinful spade
#

just obey martin, sacrifice your free will, volunteer to be a sacrifice to making link's code work and you'll be just fine

ionic flax
#

That's fair. I've been trying to develop a system with a combat perspective similar to Mega Man Battle Network and One Step From Eden. I have some "sketches" done on Google Slides, but Foundry really got me for how organized things are and I like organized stuff. I'm just trying to figure some stuff out in the meantime.

formal goblet
elfin laurel
elfin laurel
sinful spade
sinful spade
formal goblet
#

Actually, nevermind. The lookup column is probably not a RTA. So it should work in theory.

Try out fromUuidSync('itemUuid').system.props.AbilityResults in the console and give a sample of the output.

formal goblet
formal goblet
elfin laurel
#

Wait, why does it say HEffect... I changed that

#

Because I clicked the wrong item uuid, hold on.

#

This is also wrong though, it's using keys that I updated on the template that look like they didn't get updated on the item.

formal goblet
elfin laurel
#

Just removed it and added a different item. It's working now. What a wild ride.

#

You're the best - thank you for walking me through all that!!!

sinful spade
#

can we please get a "we love martin" emoji

formal goblet
sinful spade
#

i mean your PFP is blackfrost anivia, maybe her holding a sign with a heart emoji ๐Ÿ˜ฎ

formal goblet
#

Good luck getting that through Foundry staff ๐Ÿ˜…

sinful spade
#

bureaucrats - bureaucrats everywhere!

formal goblet
#

And don't forget that there's a Readme AND Wiki on our page, where you can read through stuff.

formal goblet
high stag
#

how can i make it works?

for some reason using lookup to reach the ${fisico}$ value return the exact string.

${mstr:=sameRow('oficiotree_tree',0)}$

${atrr:= lookup('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', sameRow('oficiotree_atributo',fisico))}$

floor(${sameRow('oficiotree_tree',0)}$+${lookup('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', sameRow('oficiotree_atributo',fisico))}$/2)
fringe silo
#

im trying to put a conditional on an item modifier is this how it should be set, ${duration_active >= 1 ? '(item.bonus_damage* item.buff_rank) + item.buff_lv' : '0'}$

#

i think you need more ${

high stag
manic crypt
#

What's the error?

high stag
#

${fisico}$ must be a value like the 1.

formal goblet
high stag
#

thanks!

formal goblet
fringe silo
#

@formal goblet tried it with out the quates getting no error but getting this which is the same with

formal goblet
#

I suspect, that it doesn't contain a number. NaN means "Not a Number"

high stag
#

again, what its happening here?
since its says the correct value but don't save it on the right

formal goblet
high stag
fringe silo
#

@formal goblet

formal goblet
#

But that means, that something is off with the values within your Formula of your Item Modifier

high stag
#

just for help, this works. The first that i send that its not.


${#boon:= lookup('escondidos_boon', 'escondido_boon', 'keyescondido_bonus', '${pericia_medicina}$')}$

%{

const roll = await new Roll("2d12"+"+"+"${boon}$").evaluate();
...
formal goblet
high stag
#

how?

formal goblet
#

lookup() can have 5 args, not only 2 or 4

high stag
#

so: lookup('escondidos_boon', 'escondido_boon', 'keyescondido_bonus', sameRow('oficiotree_tree',0), "==")
like this?

formal goblet
#

Quotes around the operator. It should be interpreted as a string

#

Yep

high stag
#

okay

#

"=="

#

thanks!

fringe silo
#

${duration_active >= 1 ? (item.bonus_damage* item.buff_rank) + item.buff_lv': '0'}$ is my current formula looks like everything should be returning a number, as rank and lv are drop downs with numbers as the key and bunus damage is a number field

formal goblet
fringe silo
#

how do i verify it

formal goblet
fringe silo
#

im not seeing anything related to that

#

all the field should return a number

formal goblet
fringe silo
#

i got rid of all the ' and still giving me nan. i reloaded everything

formal goblet
fringe silo
#

changeing it to 1 worked

formal goblet
#

Ah, and get rid of the item.-prefix

fringe silo
#

that was it thank you sir

oblique willow
#

How do I only output a part of a roll message if that string isn't empty?

<p>${!item.name}$ ${!item.keywords}$</p>
<p>${!item.actions}$, Weave: ${!item.weave}$</p>
${!item.description}$

I only want to output item.actions and item.weave if those actually exist within the item

elfin laurel
#

I'd try a conditional.

#

Set the value if true to what you want, and the value if false to just "" so it'll display blank.

#

${!item.actions ? item.actions : ""}$

oblique willow
#

I guess I have to do another separate conditional for the comma?

elfin laurel
#

Try ${!item.actions ? item.actions"," : ""}$

oblique willow
#

Just gives an error

#

I guess I also need the comma to only show if both actions AND weave exist, otherwise theres no need for it

lone patrol
#

does CSB really need to recompute ALL the props for items in a sheet, every time i update a value on that sheet?

#

sometimes doing it MULTIPLE times?

orchid hare
#

hallo

#

I have absoulutely minimal coding experience and I want to setup a character sheet for a system I like on forge lol

#

I've managed to do roll messages, even relate them to number fields when adding bonuses-the issue comes that I don't know how to display modifiers real time on sheet (Robust 10+7 Athletics = 17 Combined Bonus basically), and some other help on allowing me to add situational bonuses to a roll in a clean way would be nice too.

sinful spade
orchid hare
#

that simple huh?
thanks-I might ask for more advice from here, I only managed to work out how to add colors, I'm that far behind lol

sinful spade
#

You're all good, I can't remember how to call that input as a bonus to a roll off hand right now and I'm already in bed so ๐Ÿ˜‚

orchid hare
#

ah, no pictures, fair enough my bad

formal goblet
orchid hare
#

ahhh
doy, yeah sorry, coding is literally my bane

#

what about when I want to have it be a conditional value added?
Example-there is a 'Presence' skill, that can draw from Charm or Robust for its value, but obviously people are going to want the strongest value

#

==
likewise, the 'Proficency' of each skill can't exceed 20 among these combined skills, but it can exceed it using other values like situational bonuses. aid, etc. How do I apply a cap, while also allowing other bonuses to be applied?

#

i'll leave the questions there for now-I'll space it out so it isn't me being an absoulute goober when it comes to learning what is probably babies first steps about this thing.

high stag
#

Good morning.

${abas!= 1? ${setPropertyInEntity('self', 'abas', 1)}$}$

the logic its to change a radio button group value. And if i set a : "no" statement it works. But its a simple if and it actually dont have to do a thing if its false.

but that its not the main problem, it works but i cant see. The radio button simply uncheck itself, even if the value of the group has been changed. Its just visual but significant.

high stag
#

Another question
How can i use setpropertyinentity to change a check box. "True" doenst works

high stag
#

No

high stag
#

I tested both

#

Radio buttons would be better in this case since only one checkbox at a time could be true.

oblique willow
#

Trying to setup an item container to only display an item with the corresponding type. The item has a dropdown menu with several options, one of which is 'melee' as the key.

item.itemType == 'melee' ? 1 : 0

But this just throws an error in the console that it cannot convert melee to a number.

formal goblet
oblique willow
#

Ah I couldn't find that on the wiki, thanks

high stag
#

the radio buttons looks like this

#

1-4 sequence

high stag
#

i created that triangle that i cant click to erase it

formal goblet
silver lake
#

Bumping this once again!

#

Everything else in the roll works and displays correctly.

#

This one.

#
${?{Oddity:'Oddity?'|"${!fetchFromDynamicTable('OddityTable', 'CSpheres').join('"|"')}$"}}$

This displays an error in a textbox

#

version 3.0.0 btw

silver lake
formal goblet
high stag
formal goblet
high stag
#

no its just a label

silver lake
formal goblet
high stag
#

but this gave me an idea

formal goblet
high stag
#

โƒค heres the symbol

silver lake
silver lake
#

If I update the VTT and the System, won't the only difference in the code be the "fetchFromDynamicTable" part?

formal goblet
silver lake
raw fern
#

So is there an "official" way to distribute premade items for CSB systems? Myself and a friend have created a CSB system for a game called Beacon, and we've made compendiums containing all of the core book items so people don't have to make them manually.
We've been distributing the entire thing, templates included, as a module, and having end-users import the templates with "keep document IDs" turned on. This works but only the first time, so every time we release an update and people have to reimport the templates, all the items in the compendiums lose their link to their templates. This causes a whole bunch of issues that can be fixed by the end-user but it's a lot of busywork and avoiding that was the point of the compendiums.

silver lake
formal goblet
silver lake
#

oh, cause the link sent me to that. Lemme check.

formal goblet
silver lake
#

So, in that case, I'd have to create a unique item for every character sheet with their Oddity list and values (dynamic table)?

formal goblet
silver lake
#

Yeah, I'm creating one here to try and understand.

#

So, would I just add a value there that connects to a each different character? I'm so out of my depth here.

#

It doesn't really have a dynamic table option

#

So that can't be it

formal goblet
#

You create 1 Dropdown, select the Dynamic Table option there and enter the necessary data

silver lake
#

Oh. Alright lemme try that

raw fern
high stag
#

${abas!= 1? ${setPropertyInEntity('self', 'abas', 1)}$: '${'test!'}$'}$

#

this works but doenst

#

It does not change which Radio Button is checked

#

but can alters "abas" value

silver lake
#
${?{Oddity:'Oddity?'|"{#{OddityTableInput}}}$
#

Did I get this format incorrectly?

formal goblet
silver lake
#

It's cause I need to reference it to deduct from it in the same roll

formal goblet
silver lake
#
${setPropertyInEntity('self', 'Oddity', Oddity - Sphere)}$

Was using this after

#

Okay okay

#

I'm dumb

#

it's been a few months

#
${setPropertyInEntity('self', 'OddityTableInput', OddityTableInput - Sphere)}$

not the proper structure it seems

#

I tried with {} and with the # too

#

I can no longer recall what the differences are.

formal goblet
silver lake
#

But, what is Oddity in this case?

#

If I don't set ${?#{OddityTableInput}}$ to be = to Oddity

formal goblet
#

The key of your Dropdown in your User Input Template

silver lake
#

Oh

#

Okay, so far so good. But it does not reduce the value of the Dynamic table.

#

Even though the 'Column from the dynamic table to use as option key' is set correctly.

#

It shows a lower number on the roll label, but the dynamic table itself does not change.

formal goblet
#

I'll explain what your setPropertyInEntity() does at the moment:

  • 'self': This will target the entity where the Roll is executed
  • 'Oddity': This will set the value of the Component with the key Oddity
  • Oddity - Sphere: The value it will set, will be the result of Oddity - Sphere
silver lake
#

But I clearly am not understanding something.

#
${(?{Sphere:'Sphere?'[check]})}$
${?#{OddityTableInput}}$
${setPropertyInEntity('self', 'OddSpending', OddSpending - Sphere)}$

The key to the OddityTableInput UserInputItem is OddSpending

#

And in OddityTableInput it directs towards the OddityTable and the column CSpheres.

#

The point is to reduce the specific dynamic table value by 1 if Sphere is checked.

formal goblet
#

The JSON-structure of normal top-level Components look like this:

{
  "Strength": 7,
  "Dexterity": 5,
  "Constitution": 5,
  "Health": 50,
  "WithdrawalResistanceValue": 10,
  "selectedAttribute": "Strength",
  "name": "TestActor"
}

The JSON-structure of Dynamic Tables and their columns looks like this:

"dynamicTable": {
  "0": {
    "column1": "Fighting",
    "column2": 5
  },
  "1": {
    "column1": "Flying",
    "column2": 0
  },
  "2": {
    "column1": "Skinning",
    "column2": 5
  },
  "3": {
    "column1": "Walking",
    "column2": 10
  }
}
silver lake
#

And thank you Martin for all the patience.

silver lake
formal goblet
silver lake
#

OddityTableInput:

silver lake
formal goblet
#

The Dropdown will return you the value of one of the CSphere you've chosen

silver lake
#

And the dropdown now is based off of the UserInput item

#

This was your suggestion before the flood:

formal goblet
#

You are confusing key with value.

  • A key is something like a reference or a data path, where your value is stored
  • A value is... well, a value
#

For example: Strength: 5

  • Key: Strength
  • Value: 5
silver lake
#

Right, so I can't use a dropdown?

formal goblet
silver lake
#

man, why can't I remember these things ever. I have to re-learn all of this every time.

formal goblet
#

getRefFromDynamicTable() and fetchFromDynamicTable() work similar, but return different things.

  • getRef... returns a Key/Path
  • fetchFrom... returns a Value
silver lake
#

Every time I bother you guys here, I learn all I need after quite a few back and forths, and then I program an entire system, and figure all of the rest on my own. Months later I have a new thing I wanna do, or an issue, and I can't remember one thing I learned. I must have a learning disability with programming, or some trauma or something.

#

Sorry. This was uncalled for.

silver lake
silver lake
#

Or do I have to go back to ${?{Oddity:'Oddity?'|"${!fetchFromDynamicTable('Odditytable', 'CSpheres', 'OddityName', 'something').join('"|"')}$"}}$

silver lake
# sinful spade felt this

I started programming in C# to help my father when I was 8yo, and I stopped when I was 18, and by then I was absolutely done with programming. Decided to never do that again. A decade later..

formal goblet
#

Something like ${setPropertyInEntity('self', getRefFromDynamicTable('dynamicTableKey', 'targetColumn', 'filterColumn', dropdownKey), 'your value to want to set')}$

silver lake
#

well, I got at least 2% of it right

formal goblet
silver lake
#

Okay, so this is valid?
getRefFromDynamicTable('OddSpending', CSpheres')

#

Being that OddSpeding is the key of the UserInput?

#

Cause the Target column is decided by the dropdown

#

rather, the target row

#

oh, I think I get it

#

oh

#

I got it

#

I missed the dropdownKeypart of your comment

sinful spade
high stag
#

${abas2==1? true : false}$
could you guys help me with that?

its a visibility formula

sinful spade
silver lake
high stag
sinful spade
high stag
#

thanks!

shy osprey
#

I'm trying to use the "items within items" functionality to have a weapon with different magazines the player could equip. That I have been able to achieve with item display and using a checkbox to mark which magazine is "locked and loaded".
For next phase I would like it to deduct ammo from the specific magazine by a random amount (1d6, 2d6, 3d6 etc. depending on rate of fire)
The keys I am using are:
In the magazine the loaded checkbox: _loaded
In the magazine the amount of ammo: _ammoCount
The item displayer in weapon: _MagazineDisplayer (with _displayAmmoCount and _displayLoaded as the columns which work perfectly with the magazines)
The "Fire" button is in the weapon sheet so I do not need to involve anything else at this point.
${#?{Rate of Fire|0}}$
<p><strong>Ammo spent:</strong></p>
<p>${roll:=[(:Rate of Fire:)d6]}$</p>

But that is where my coding skills hit the wall. How can I deduct the spent ammo from the equipped magazines _ammoCount? Any help appreciated.

sinful spade
shy osprey
#

@sinful spade lol I use mags too but thought it might confuse even more. From the gun. There is a FIRE -button in the gun for ammo expenditure.

sinful spade
#

(Weird that fire rate is a property of the mag and not the gun btw but if it's easier for you i get it)

shy osprey
#

There are different ammo types (FMJ, subsonic, HP etc) but they do not factor in this and are handled otherwise. The rate of fire is not a property of tbhe mag. The idea is to ask how much extra ammo the player is willing to spend and the actual amount spent is Xd6. Kinda like Twilight2000 latest edition

#

So it is a property of the weapon, players cannot pick rate of fire that is faster than weapons but ofc they can decide not to go full auto and fire a lower amount

sinful spade
#

so if we're running from the gun and not the actor I think we'd just use

${'_loaded' == 'Semi' ? ('_ammoCount' - ([1d6])) : ''}$```
#

try something like that

silver lake
#

I'm still troubleshooting. I'll mention here upon success or questions

shy osprey
#

@sinful spade is there a way to do it from the "Gun" like my initial formula which asks how much rate of fire would be used? A numerical value to roll d6's and then reduce that amount from the specific magazine? I prefer to do it from the gun sheet bc players might switch mags etc during firefights

#

Just deducting the raw number that the xd6 gives

sinful spade
#

loaded is a property of the gun and ammo the mag correct?

#

if so

${'_loaded' == 'Semi' ? ('item._ammoCount' - ([1d6])) : ''}$```
#

lemme note that 'single' and 'semi' needs to be set to the value of Key in the dropdown list

silver lake
#
${setPropertyInEntity('self', getRefFromDynamicTable('OddityTable', 'CSpheres', 'OddityName', OddSpending), 'getRefFromDynamicTable('OddityTable', 'CSpheres', 'OddityName', OddSpending) - Sphere')}$

Okay, I am at a loss.
I was told the 2nd argument should be getRef, but I was also shown that the first one should be too. So both of them are. According to the formula that was given as an example, the OddSpending doesn't need ' ', and the set value does. That produces an ERROR. I have however, tried every other way, removing and adding ' ' in every instance with every alternative I could think, I have tried fetchFrom in both and either and the only way I get any results is if I remove the ' ' from the set value. It at least doesn't show an ERROR, it shows a -1 on the roll label for some reason. But it still doesn't deduct from the dynamic table.

#

And even if I'm just changing the ' ' I sometimes get this error:

#

And sometimes I don't

#

But I've counted all of the ()

#

and nothing seems out of the ordinary

sinful spade
sinful spade
#

But your errors is pointing out that you have an excessive parenthesis

silver lake
#

doesn't seem to make any sense

sinful spade
#

does it work without ''

silver lake
# sinful spade does it work without ''

Not really, it just doesn't give me an Error, but the purpose of this is to alter a value on a Dynamic Table, which is picked on a dropdown connected to a UserInput Item

shy osprey
#

@sinful spade _loaded is a property of the magazine, meaning is that specific magazine loaded in that specific weapon.
The weapon has an item display showing all the magazines but naturally only one can be loaded. The mag has the _ammoCount which is the amount of ammo in that specific mag, so it is also a property of the magazine. But since the item displayer can display stats from the item, the magazine displayer in the gun shows all the mags and how much bullets they have left.

sinful spade
#

or if it isn't extra then there needs to be one after the () as well.

'getRefFromDynamicTable('OddityTable', 'CSpheres', 'OddityName', OddSpending)'

#

and if that's the case then do you need to pu them on the first getRef as well?

sinful spade
shy osprey
#

I was hoping to achieve that but had no idea how to include magazines in drop down since the amount of mags and types of ammo in them might vary

#

Also wasn't able to get the "equipped" checkbox for magazine to be selected from the gun so now players need to go to mag to "lock and load" that specific mag

silver lake
sinful spade
sinful spade
sinful spade
# silver lake Yeah :/

yk i think i had a similar issue trying to reference a value in a table and subtract something from itself. I resolved it by putting a label with no visibility outside of the table and using that for the subtraction

#

something about self = self -1 doesnt seem to work, but if it's
self = notexactlyself - 1 worked fine

shy osprey
#

@sinful spade oh definitely that would be ideal. I just had no idea how to make it selectable from the item displayer

sinful spade
# shy osprey <@155143448029167616> oh definitely that would be ideal. I just had no idea how ...

from the wiki:

Create a Label in the Item Container (this will be the Checkbox-column in the Container)
Label text: <i class="fa-regular fa-${item.equipped ? 'square-check' : 'square'}$ " style="color: ${item.equipped ? 'green' : 'red'}$; background-color: white;"></i>

Label Roll Message: ${setPropertyInEntity('item', 'equipped', "item.equipped ? false : true")}$

(Optional) Uncheck Send roll message to chat to avoid sending a Chat Message with every click
replace item.equipped with item._loaded

#

you can css style it however you want

silver lake
sinful spade
silver lake
sinful spade
#

the star, chest, and shield are all item toggles changing check values in the item from a displayer in the parent

silver lake
#

Oh how do you guys partition inventory? Was that available in 3.0.0?

sinful spade
woven dragon
#

Is there any way for an item displayer to show how many items are contained in another item displayer?

silver lake
sinful spade
silver lake
#

I'll try to turn OddSpending - Sphere into a thing

sinful spade
#

you also need parenthesis

#

is Sphere a number?

silver lake
#

a checkbox

#

but yeah, 1 or 0

sinful spade
#

does checkbox work as 1 or 0 or as true or false?

silver lake
#

true or false, but it does seem to always have the value of either 1 or 0

#

or at least I've used it like that sometimes if I remember correctly

sinful spade
#

('OddSpending' - 'Sphere') if it's a number,
or
${Sphere == true ? (setPropertyInEntity('self', getRefFromDynamicTable('OddityTable', 'CSpheres', 'OddityName', 'OddSpending'), OddSpending - 1))) : (setPropertyInEntity('self', getRefFromDynamicTable('OddityTable', 'CSpheres', 'OddityName', 'OddSpending'), OddSpending - 0)))

formal goblet
silver lake
#

besides, when I do x - true it does always show the result of x - 1

sinful spade
silver lake
formal goblet
#

It's just that booleans can be converted to numbers if needed

sinful spade
sinful spade
sinful spade
#

is that a CSB thing or is true always auto-converted to true?

formal goblet
silver lake
formal goblet
silver lake
#

oh

#

Yeah, HTML got in the way again

sinful spade
formal goblet
silver lake
sinful spade
silver lake
#

But sphere is a checkbox.

silver lake
silver lake
woven dragon
formal goblet
sinful spade
#

i was just reading to figure this out haha

silver lake
woven dragon
silver lake
#

Spheres left should show the amount left in the Oddity

#

Oh

#

I think I know what the issue might be

formal goblet
# silver lake

OddSpending is a number, but you want it to be a string with a name, that matches with one entry of the OddityName-column

silver lake
formal goblet
#

Also, show me your current Dynamic Table

silver lake
formal goblet
#

Good, but also with actual values

silver lake
#

So I want the UserInput Column to be the name rather than the value?

formal goblet
silver lake
#

Okay okay

#

I have a feeling you taught me this 6 months ago

#

before the flood

#

Thank you for the patience.

formal goblet
#

We want the Dropdown to return 'Path of Intention', so that we know, which row we have to adjust

silver lake
#

I set it now

#

It did show Path of Intention on the dropdown but because I picked it as a label

formal goblet
#

The Label is just for display. The actual value is retrieved with the option keys

silver lake
#

but now it is directed towards the name instead.

#

It's working now

#

that was the issue all along

#

The UserInput needed to be set to the name rather than the value I wanted to change.

#

Thank you guys.

#

Now, there is 1 odd thing, and one "window" issue I'm having, that are likely obvious but I don't understand it.

#

The first is this:

#

which is related to this:

${#concat((?{Act:'Actions?'[number]|0}), string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{method:'METHOD'[number]|0}), (?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}), (?{Sphere:'Sphere?'[check]}))}$
formal goblet
silver lake
#

But it works just fine

silver lake
#

But it will not stop stating that to me every time

#

Even though it works just fine

#

it's nothing important, really, that one is just annoying, logging an error every time

#

I wondered if there was something I could do about it.

shy osprey
#

@sinful spade Awesome! I have the weapon display and indeed the mags can be chosen from there so that is an improvement for sure, thanks!
I still am not able to get the ammo deducted from a specific mag though... any help with that would be appreciated!

silver lake
#

And the other one is this:

${#concat((?{Act:'Actions?'[number]|0}), string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{method:'METHOD'[number]|0}), (?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}), (?{Sphere:'Sphere?'[check]}), (?#{OddityTableInput}))}$

With the addition on the very end appearing in a separate window, instead of inside the same one.

formal goblet
silver lake
silver lake
#

Lemme try that

silver lake
#

Should I try String on that too?

#

Doesn't feel right but I'll try

#

nope

formal goblet
#

Is that in the same Label Roll Message as the User Input Template?

silver lake
#

Yeah

#

The UserInputTemplate forces itself into another window

formal goblet
#

Then you have to shift everything you've written there to the User Input Template with corresponding Components

formal goblet
#

You either use the User Input Template or simple prompts. Or you can use both, but they will always appear in their own windows

silver lake
#

Hmm

#

Can I make the UserInputTemplate only appear when the Sphere checkbox is checked?

silver lake
#

Damn

#

Alrighty

#

Thank you

#

One last thing

#

?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}
can I make the "CNothing" into just a blank option?

silver lake
#

so like, |"", "None"|?

formal goblet
silver lake
#

ah!

formal goblet
#

Although... it might even permit it

#

I mean, Dropdowns can have empty option keys

silver lake
#

Oh

#

with empty string

#

you mean some invisible number field in the sheet

#

That's what CNothing is

#

I thought I could just leave it blank so that it won't say CNothing -1 every time :P

formal goblet
#

Nah, empty string is this here: ''. That's literally an empty text

#

And invisible only means, that you as a user don't see the Components. The values are still present and stored

silver lake
#

So I thought I got it wrong

silver lake
formal goblet
silver lake
#

The dropdown decides which energy is spent, and if an energy is selected it rolls an extra dice based on a bolean.

#

This is the whole mess:

${#concat(string(?{Act:'Actions?'[number]|0}), string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{method:'METHOD'[number]|0}), ?{Energy:'Energy Spent ='|' '|"CStam","Stamina"|"CWill","Willpower"}, string(?{Sphere:'Sphere?'[check]}))}$ ${(?#{OddityTableInput})}$

${sameRow('Skill')}$
Roll    ${RollResult:= [:Roll:]}$
Aspect    ${#Aspect:= ref(AspectLocked)}$ ${#AspectDice:= equalText(Energy, 'CNothing') ? 0 : 1}$ ${AD:= [:AspectDice:d:Aspect:]}$
Method    ${method}$*2
TOTAL    ${(floor(RollResult + (method*2) + Sphere*2 + (((sameRow('SLevel'))/10)*2))) + (floor((((ref(sameRow('MainSCS'))))/10)*2)) + AD}$
Cost
AP Used    ${Act}$ out of ${setPropertyInEntity('self', 'Actions', Actions - Act)}$
${Energy}$    ${setPropertyInEntity('self', Energy, "equalText(Energy, 'None') ? ref(Energy) : ref(Energy) - 1")}$
Spheres Left    ${setPropertyInEntity('self', getRefFromDynamicTable('OddityTable', 'CSpheres', 'OddityName', OddSpending), fetchFromDynamicTable('OddityTable', 'CSpheres', 'OddityName', OddSpending) - Sphere)}$
${CharName}$    ${CharSurname}$
formal goblet
#

Because ref('') is an error case. It can't find a Component with the key ''

formal goblet
silver lake
#

Just a key at the bottom of the sheet

#

I CNothing wrong with that I guess

#

Thanks again!

feral owl
#

Heya peeps, trying to turn this logic into something which returns its corresponding roll rather than completing its corresponding roll (the roll gets called somewhere else) - what syntax am I getting wrong here? Don't thiiiink it's the logic going wrong, but I may be wrong.
${or(move_type == type1, move_type == type2) ? (not(type2) ? (move_advancements == move_advancements_0 ? [d6] : (move_advancements == move_advancements_1 ? [d8] : (move_advancements == move_advancements_2 ? [d10] : (move_advancements == move_advancements_3 ? [d12]:))): (move_advancements == move_advancements_0 ? [d4] : (move_advancements == move_advancements_1 ? [d6] : (move_advancements == move_advancements_2 ? [d8] : (move_advancements == move_advancements_3 ? [d10]:))))): (move_advancements == move_advancements_0 ? [d4-1] : (move_advancements == move_advancements_1 ? [d4] : (move_advancements == move_advancements_2 ? [d6] : (move_advancements == move_advancements_3 ? [d8]:)))))}$

silver lake
#

Cause I had in each item a dropdown to select which type of item it was, could I sort the inventory by that?

feral owl
#

Ahh so it's executing before getting to the end :/

sinful spade
#

item.filterValue == filterKey

silver lake
#

The currencies will appear separate?

#

Didn't seem to work

#

it just hides all of the items

#

Example

#

I'm checking cause it'll be a bit of an ass to make an Item Template for every item type and then update hundreds of item sheets one by one

woven dragon
#

Hi guys me again, if a character have multiple items on his inventory, how can i make an item to only give his item modifiers if it is equipped?

formal goblet
# silver lake

An ItemType cannot be 'Currency' and 'Miscellaneous' at the same time, that's why the expression will always resolve to false

coral hemlock
#

Hi All, i have an interesting one. I have a Label (lets call it labelA) that has a formula and auto calculates, this calculates correctly. I have another label (labelB) again has a formula and this also auto calculates correctly, I have 2 user input number field (numberA and numberB) I have another Lable (lets call it totalsLabel) that has this formula ${labelA+ labelB + numberA+ numberB}$. The issue i have is if the user input number fields update the totalsLabel auto calculates correctly, but if labelA or labelB updates totalsLabel does not auto calculate, i have to hit the charactersheet refresh button to get it to calculate, any ideas on how to fix this? There is no errors showing in console.

silver lake
#

So what I thought this would do is that if the dropdown is Miscellaneous it would be separate from the Currency.

#

that's why I set two different ones

#

as a test

formal goblet
#

Think of the Filter as a test. Whoever passes the test to 100%, will be displayed in the Item Container.

silver lake
#

Oh

#

So it won't separate the items in different tabs?

#

That's what I had asked earlier :P

#

Damn, gotta update all items now I guess.

formal goblet
#

No. The only job the Item Container does, is to display Items.

#

But you can setup a second Container, that should display other Items

woven dragon
sinful spade
silver lake
sinful spade
# silver lake So it won't separate the items in different tabs?

yeah pretty much what martin said, i have different item displayers filtering for different values to show the items that meet that criteria -- so only species show up in the species item container, only weapons - armor - and accessories in the container meant to catch those categories.

You could make all these dropdowns static like I have, and if you want them to connect to the dropdown change the visability formula to display whichever is selected so it looks like it's real time filtering

#

Actually, I have a bit of a ... not so much problem but minor inconvenience - and I'd love some community input to resolve it if possible.

I have a lot of buttons that open items in the character sheet - largely things like INFO buttons (among others) that effectively just open an item or journal based on UUID before it's added to the actor sheet.

The problem is for these buttons to work, the players need at least observer level access to the items, which clutters up the items on the right hand window (because there are a lot, yes they're in folders but still).

I could toggle permission for those items before the command is executed I guess, or potentially just hide the GM folders somehow. Any other ideas?

formal goblet
sinful spade
#

it's just untidy

formal goblet
#

Not that I know

sinful spade
#

it'd help some

#

i need a module that lets me nest further so everything can be in 1 folder and that'd be better

formal goblet
sinful spade
formal goblet
silver lake
silver lake
#

Gonna set it all up today.

sinful spade
#

that or i can upload them to a compendium and update all my macros to check there --

silver lake
sinful spade
#

Martin ๐Ÿ˜ฆ i'm trying to help @shy osprey but gpt isn't able to grasp the syntax of nexting JS in CSB logic

#

${%{const magCount=entity.items.filter(i=>i.system.props&&i.system.props._loaded===true).length;return magCount;}%!==1?notify('warn','Expected exactly one loaded magazine'):""}$
is the last version fo the code we had but getting syntax errors on char 4

#

_loaded is a component key of a sub item,, if that helps - we're checking that only one item is loaded at a time in the displayer

formal goblet
sinful spade
formal goblet
silver lake
#

Hey! Can you share that link about the changes I need to make in the formulas since 3.0.0?

#

I'm trying a virtual update

#

like, fetchFrom and getRef

sinful spade
#

supose we could have a new displayer filtered

silver lake
#

Do you think I could just open a Json of the templates and find-and-replace all of the differences?

formal goblet
silver lake
sinful spade
#

how so

formal goblet
# sinful spade hhuuh?

count(lookup('itemDisplayerKey', 'name', '_loaded', true)) if you have an invisible column in the Item Displayer with the column key _column

sinful spade
#

@shy osprey ^

sinful spade
silver lake
#

I forgot

#

Not in documents

#

I imagine

formal goblet
silver lake
#

Not in systems, and not on the Game Folder, unless I named that weirdly and forgot

silver lake
formal goblet
#

Right-click -> Import

silver lake
#

Oh, like, just in-vtt

#

I thought I was doing this in another format

#

dunno what I was thinking

#

I was just gonna go to the folders and edit there instead. But I just realized that I don't remember that being a thing

sinful spade
#

we should just be able to use the checkbox column to check the true values of that column no?

formal goblet
#

The return of that cell would be the string with the full HTML

sinful spade
#

ahhh

silver lake
#

Okay, so version 4.2.3 no longer has the same item filter in the item containers from before. It's a more customizable one. What would be the formula for filtering something by a specific dropdown key in the item?

fringe silo
#

equalText(item. dropdownkey, 'key')

silver lake
icy panther
#

I am copying an actor,

const newActor = await originalActor.clone(data, { save: true });```
how would i update a variable when it is created?
I tried 
```const data = { name: itemName, folder: folderdata Assigned_ID: "1" };
const newActor = await originalActor.clone(data, { save: true });```
however this does not update the hidden attribute
silver lake
fringe silo
#

are you trying to make only certain items show up

silver lake
#

equalText(item. ItemType, 'Currency')

fringe silo
#

equalText(item.ItemType, 'Currency')

silver lake
#

It just suddenly worked

fringe silo
#

no space between the . and the drop key

silver lake
#

It seemed to be creating blank spaces in the middle of the text field

icy panther
silver lake
icy panther
#

my way of filtering

silver lake
#

It's fine now

fringe silo
#

yes always chk your feild for mysterious blanks

silver lake
#

Thank you brothers

formal goblet
brave trench
#

my players are having an issue dragging items from the directory onto items, works fine for me as a GM though. Has anyone else experienced this or know what the problem is?

icy panther
#

so i should use a number field?

formal goblet
icy panther
#

how would i then update the number field?

#

I just changed it, and it still isn't working

formal goblet
icy panther
#

nope, it's there

formal goblet
#

And it should be system.props.Assigned_ID: '1'

icy panther
#

doesn't like the '.'
I can grab the ID of the new actor, then update it after creation

formal goblet
#

system: {props: {Assigned_ID: '1'}}

icy panther
#

will try that

#

It works, Thank you

icy panther
#

Trying to hide an entry when a checkbox is ticked, image works in reverse

#

tried item.Char_Assigned ? 'false' : 'true', but it no longer works

#

doh, I am a dumbass 'false' is a true statement needed to be ''

formal goblet
icy panther
#

oh cool ty

coral hemlock
#

Hi All, I have an issue with labels not auto calculating. I have a Label (lets call it labelA) that has a formula and auto calculates, this calculates correctly. I have another label (labelB) again has a formula and this also auto calculates correctly, I have 2 user input number field (numberA and numberB) I have another Lable (lets call it totalsLabel) that has this formula ${labelA+ labelB + numberA+ numberB}$. The issue i have is if the user input number fields update the totalsLabel auto calculates correctly, but if labelA or labelB updates totalsLabel does not auto calculate, i have to hit the character sheet refresh button to get it to calculate, There is no errors showing in console. Does anyone have any ideas on how to fix this?

icy panther
#

%{
localVars.newActorID = newActor.id;
}%
${setPropertyInEntity('item', 'Assigned_ID', newActorID)}$
gives error
uncomputable token
nm I figured it out

ornate haven
#

What would be the best method to make a dynamic table roll show using the normal roll dialog rather than the inline system?

The image shows my current roll message and roll behavior, and then the roll posting method I would like to use:

rotund pebble
#

Ok probably dumb question but if i wanted to include a modifier from a character sheet in a players roll how would i do that. i originally figured using the property reference chat feature but that only works to display the number in chat, not include it in math

#

ok i need to be more specific, im trying to include it so it can be passed to a macro as all skill checks are rolled on a table

#

still works with rolls just fine just not macros like /macro SkillCheck mod=@AdrenalDefense. doesnt throw an error but it returns a 0 for said bonus

formal goblet
coral hemlock
#

No unfortunately not, this is why i am lost. it seems to skip the property in the auto calculate, then i press the sheet reset, and it then calculates it. I even tried with just one label (rather than all 4 items) it still did not work (PS this is v11.315, csb 3.2.5)

icy panther
#

What is the correct syntax for checking if a value (Hood) is present in a column (Name) in a dynamic table (Mount_Location) contained on an item on a different actor (Assigned_Player)?

formal goblet
coral hemlock
faint holly
#

can anyone help me out with making a certain system?..

#

im lost when it comes to making the sheet

#

๐Ÿ˜ญ

brittle moth
#

Indeed there is an issue there... I looked at it, and the solution is not easy. I can fix the base problem easily enough, but it doesn't work when the item contains items itself: contained items are not added to the sidebar with the main item... And this is tricky to figure out...

brittle moth
bleak wyvern
#

is there a way to make the tables have lines separating each column...? cuz everything keeps getting pushed to one side and I just want it all to stay where it should be

sinful spade
vestal vortex
#

So can someone help me find what i'm missing (or rather, what i need to change) on the following formula? Its made as a damage checker to determine whether the damage will be a normal(no), critical(yes) or a maxed critical(kokusen). The problem is that, whenever i choosethe "kokusen" option, the number dialog still appears, which it shouldn't since its formula isn't on the Kokusen check. The message still rolls the maxed critical but it still asks for a number modifier, even though it does nothing.

`${#concat(?{Crit_Check:'Crรญtico?'[button]|'nรฃo','Nรฃo'|'sim','Sim'|'kokusen','Kokusen'})}$

${equaltext(Crit_Check, 'kokusen') ? '${#dmg:= switchCase(item.verscheck, 'Padrรฃo', '${item.armakokusen}$', 'Versรกtil', '${item.verskokusen}$')}$
%{let roll = new Roll("${dmg}$");
await roll.evaluate();
await roll.toMessage({flavor: '<div class="chat-roll"><div class="grid-container"><div class="text-icn"><img style="vertical-align: top;" src="${!%{return linkedEntity.img;}%}$" width="35" height="35"; "border: 2px groove #9f9275";> <strong header class="title">${!item.name}$</strong> </header><div class="subtitle"> <a> <b class="critico">KOKUSEN! </a></div></div></div></div>',
speaker: ChatMessage.getSpeaker()});}%'}$ : '${#dmg:= switchCase(item.verscheck, 'Padrรฃo', '${switchCase (Crit_Check, 'sim', '${item.armacritdmg}$', 'nรฃo', '${item.armadmg}$')}$', 'Versรกtil', '${switchCase (Crit_Check, 'sim', '${item.verscritdmg}$', 'nรฃo', '${item.versdmg}$')}$')}$
%{let roll = new Roll("${dmg}$ + ${${switchCase(item.hitatri, 'Forรงa', '${formod}$', 'Destreza', '${desmod}$', 'Constituiรงรฃo', '${conmod}$', 'Inteligรชncia', '${intmod}$')}$ + ${?{Bรดnus[number]|0}}$ + ${item.bondmg}$}$");
await roll.evaluate();
await roll.toMessage({flavor: '<div class="chat-roll"><div class="grid-container"><div class="text-icn"><img style="vertical-align: top;" src="${!%{return linkedEntity.img;}%}$" width="35" height="35"; "border: 2px groove #9f9275";> <strong header class="title">${!item.name}$</strong> </header><div class="subtitle"> <a> ${equalText(Crit_Check, 'sim') ? '<b class="critico">Dano Crรญtico, ${item.armadmgtipo}$' : 'Rolagem de Dano, ${item.armadmgtipo}$'}$</a></div></div></div></div>',
speaker: ChatMessage.getSpeaker()});}%'}$`

bleak wyvern
#

like whats the css code I gotta use to make a proper looking table to where the columns and rows are actually divided

formal goblet
# vestal vortex So can someone help me find what i'm missing (or rather, what i need to change) ...

You're getting bitten by the execution order of CSB-Formulas inside phrases. The following order applies:

  1. Move into the next Formula
  2. If the Formula contains a Sub-Formula, move into that. Repeat with step 2 until the condition is not met
  3. If the Formula contains a User Input Template, resolve that
  4. If the Formula contains a User Input Dialog, resolve that
  5. If the Formula contains a Roll Formula, resolve that
  6. Parse the Formula
  7. Move to the parent Formula. If there is, repeat step 3. If there's none, move to the next Formula in the phrase. If there's no next Formula, stop

Conditionals work with step 6, not earlier. And switchCase() is non-short-circuiting.

shy osprey
#

For a few days have been struggling with โ€œitem within itemโ€.
Idea is to have item (weapon) that has item displayer (Key: _MagazineDisplayer) that shows different mags the character can equip for that weapon. I have gotten this far, but would like to automate ammo count.
Upon clicking a button (label) on the weapon sheet, I would like the following to happen: The prompt should ask: โ€œHow many ammo dice?โ€ and after players answera, it should deduct 1 + Xd6 (X being the amount chosen) from the equipped magazines ammo count. Now it does not matter, if the ammo goes into โ€œnegativeโ€, I can handle that with rules so no worries.
Keys:
_ammoCount (the number of bullets in the magazine sheet)
_loaded (a checkbox on the magazine sheet)
_MagazineDisplayer (a item displayer on the weapon sheet, showing all magazines)
_displayLoaded (a column in _MagazineDisplayer for the loaded checkbox of magazine)
_displayAmmoCount (a column that shows magazine _loaded with label: ${item._ammoCount}$
_column (Hidden column in _MagazineDisplayer with label: ${ count(lookup('_MagazineDisplayer', 'name', '_loaded', true))}$, as per Martins help on the matter.)
Any help, even pointing into the right direction is greatly appreciated.

elfin laurel
# bleak wyvern like whats the css code I gotta use to make a proper looking table to where the ...

<tr> 

<th>Title of 1st column</th>
<th>Title of 2nd column</th>

</tr>

<tr>

<td>Info in next row of first column</td>
<td>Info in next row of second column</td>

</tr>

</table>```

You can add as many rows as you want with an extra <tr></tr> tag and info in each of those columns with <td></td> tags, going left to right. You can also input code through ${}$ in between the <td</td> or <th></th> tags and it will format the output of the code in that cell of the table.
elfin laurel
# icy panther What is the correct syntax for checking if a value (Hood) is present in a column...

I would try something like this:

fetchFromActor('actor.id', "fallback(find('Mount_Location', 'Hood', 'Name', Hood'), 0))

This should pull the value, and if it isn't in the column, return 0. You could then put a conditional after this to get two different results based on if it's there or not, like this:

fetchFromActor('actor.id', "fallback(find('Mount_Location', 'Hood', 'Name', Hood'), 0)) ? "Hood" : "No Hood"

note, I have not tried this code so it may not work or may require some tinkering.

sinful spade
formal goblet
sinful spade
formal goblet
#

We need the UUID to target the right Item, because we cannot perform updates on the Item Displayer itself

#

That's why you have to use setValues()

sinful spade
#

ah and you're using the _column to see if there's only 1 checked -- though i dont see how it stops if there's more than one checked.

#

I figured you'd still have to conditional it

#

_column != 1 ? for example

formal goblet
#

find() only retrieves 1 entry at all times. Doesn't matter if more meet the condition

bleak wyvern
bleak wyvern
icy panther
#

I have ${fetchFromUuid(Assigned_Player, 'Mount_Table')}$ which returns an array, I am having trouble figuring out how to use find with this to check if there is an existing entry

elfin laurel
elfin laurel
icy panther
#

I am looking for a specific value in a column

elfin laurel
icy panther
#

${find(fetchFromUuid(Assigned_Player, 'Mount_Table'), 'Location', 'Hood') ? 'outcome if existing entry' : 'value if not existing entry'}$

formal goblet
elfin laurel
icy panther
#

Ty @formal goblet , can use '' for filter by looks of it

#

It's the use of double quotes that messed me up

formal goblet
bleak wyvern
formal goblet
icy panther
#

good to know

#

using find it looks like it returned the value of the first column

formal goblet
bleak wyvern
icy panther
#

it doesn't work as expected ๐Ÿ˜ฆ and I am getting errors

formal goblet
icy panther
#

haha, I am actually doing the same thing

#

let me try to explain, The find() returns the result of column 1, row 1 of the dynamic table, not matter if the thing I am looking for is present or not

#

Simultaneously unrelated but might be, I am getting errors for the dynamic table

#

so I am thinking, should I move the info out of the dynamic table and just use text boxes that I reference directly

formal goblet
icy panther
#

yeah

#

guess I'll be back later when I move everything ๐Ÿ™‚

lean bone
#

im trying to use the Custom System Builder dice.
Currently, im trying to make it so that when you roll 2d8s and roll doubles (like two 1s or two 5s) it rolls the dice again until you don't roll doubles, then adding the total roll together. Is that possible?
(also is this the right channel to ask that question? if not please point me to it)

lean bone
icy panther
#

is there a way to dynamically select templates in filter items in an item displayer

icy panther
#

Awesome

#

I am aware that you can drag and drop an item from one actor to another, and that will create a copy of the item, can the item instead be duplicated?

elfin laurel
#

I have a User Input Template that pops up when I click on a label from an item displayer. Is there a way to set the default values in one of the numeric fields on the User Input Template to be a number from the item that I clicked on in the displayer?

#

I tried using ${item.Key}$ but even though it's a number field I get "NaN' and the console tells me Value must be Numeric.

icy panther
#

@elfin laurel have you checked what item.key outputs?

elfin laurel
#

It outputs the correct number when used elsewhere, just not in the default value field of the user input template.

icy panther
#

I haven't got to user input yet

elfin laurel
icy panther
#

@elfin laurel seems to apply to you
Any input field using a key already defined in the triggering actor or item will use its value as default value, but will not be saved in the actor or item.

elfin laurel
icy panther
#

cool

#

I am tying to figure out a way to display a table of items that are attached to another actor

elfin laurel
#

Item Displayer with a filter? But no, those only display items attached to the actor.

#

Hm. Interesting conundrum.

icy panther
#

yeah, I think a better solution is to clone the item and attach it, then I can use displayers