#Custom System Builder

1 messages · Page 21 of 1

brave heart
#

hello - can i have content of item container in dropdown?

#

for example i want to choose weapon to use from weapons in item container

latent sorrel
brave heart
#

and is it possible to use dynamic table as item container?

formal goblet
formal goblet
#

Well, the Example-Template already covers most of the common cases 😅

summer turtle
#

Is there a way to have drop down menus affect one or more stats? For instance starting characteristics based on species?
(I apologise if this has been asked before but I have no idea how to narrow down my search results for that specific question 😅 )

formal goblet
summer turtle
#

To start with I’ve tried using a condition to modify a stat, but so far I’ve only managed to make that work with a checkbox and I’m not sure how to get it to change based on what checkboxes are turned on. Can conditions be affected by drop downs? Or am I needing a totally different approach?

Thank you for your time, I’m not very well versed in programming as is and I’m just starting to dip my feet into the system so far, I’m doing my best to teach myself what I need with the documentation and example sheets 😅

alpine roost
#

Im trying to use fetchFromActor('target', "B_Resistance") but it keeps saying Uncomputable token target

#

Wait nevermind its working now...

summer turtle
# summer turtle To start with I’ve tried using a condition to modify a stat, but so far I’ve onl...

Pretty sure I want some hidden dynamic tables for what I want looking with fresh eyes.
EDIT: Or maybe not, I think items might be the way to go...?
Basically I'm trying to make a system for 40K Black Crusade and I'm wanting to have sheets automatically update based on species, archetype etc, and since those give a variety of things like bonuses, skills, even items, I'm not sure if this is realistically possible within the limits of CSB or not.

summer turtle
#

The existing Deathwatch sheet doesn't do this so it does make me wonder if it is in fact possible.

faint wharf
#

did anyone bind atack with sequencer jb2 animations in CSB?

vagrant hollow
formal goblet
summer turtle
#

That what I thinking the case might be, thank you.

summer turtle
#

I'm having a bit of trouble with dragging and dropping items, just using the _template stuff for now, the items are applying to the template sheet as I can see stats changing, but nothing is displaying in the item container. I've not edited any of the templates (aside from making a test armour) so I'm not sure what's wrong.

vagrant hollow
#

Open configuration of the container. After adding templates you have to adjust the filters.

summer turtle
#

I assume the example sheet has these set up already right?

#

This is my test item

formal goblet
vagrant hollow
#

You have to activate the template in there.

summer turtle
#

Ohhhh

#

I've turned it all on just to be sure but there's still nothing showing up

#

I'm assuming I've missed something, I'm just not sure what.

#

Oh, okay, _Inventory items work but nothing else will display. I'm a bit lost on why tbh but I'll work it out 😂

#

OHH, you need the container radio buttons in the item for it to show up, managed to add that to the armour template.

#

OHHHH, I completely missed what the container filter was doing, I was too focused on the checkboxes

fierce harbor
#

Evening, ppl.
I'm trying to update a value inside an item, on the left you can see how the label is set in the container. All it does is send '10' to the chat without updating the value inside the item...
I'm doing something wrong, for sure, but cannot see what...
Any kind soul willing to help me through?

brave heart
#

hi... these condition in labels are quite a topic today - i have problems as well:
${roll:=[1d20]}$ + ${rollstats:=[:HS_INT:]}$ = ${roll+rollstats}$ <- works perfectly, but when I want to add condition based on dropdown list (only 2 values) it doesn't work... probably I am doing something wrong (I'm quite a noob in coding all this stuff)
${roll:=[1d20]}$ + ${(dd_powers_attribute == 1) ? rollstats:=[:HS_INT:] : rollstats:=[:HS_PRE:]}$ = ${roll+rollstats}$ - it doesn't even roll :?

brave heart
#

worked around it and used secret section to determine rolls before - this way it works... now i just need to figure out how to include additional description, color and styles of the rolls
<section class="secret">
<p>${roll:=[1d20]}$</p>
<p>${rollint:=[:HS_INT:]}$</p>
<p>${rollpre:=[:HS_PRE:]}$</p>
</section>

<p><strong>Score:</strong>${roll}$+${(dd_powers_attribute == 1) ? rollint : rollpre}$ = ${(dd_powers_attribute == 1) ? roll+rollint : roll+rollpre}$

#

is it even possible to change style (eg. font color) as a condition based on dropdown?

summer turtle
#

I'm having trouble with drawing a number from an item. I'm trying to create "species" items to automatically set initial characteristics, and based my code around the examples provided in _template (armours in this case, when you add an armour it automatically updates General Armour Protection and such). I can't for the life of me get a number to update based on any items however, like the _template can. I don't know what I'm missing.

misty terrace
#

CSS question. I added a quick roll "button" at the top of a character sheet. It's a label with the fa-dice Label Icon. I want to make it larger, but I've tried scale, font-size and a few other things, I just can't get it to resize. Any hints?

formal goblet
formal goblet
formal goblet
fierce harbor
brave heart
formal goblet
brave heart
dusky mauve
#

Look like development of CSB stopped from October?

formal goblet
brave bronze
#

Hey I’m using custom system builder for a dolmenwood game, is there a way to import b/x monsters and basic items/equipment into it?

latent sorrel
#

Is there a way to create a new entry in a dynamic table outside of JS and the "+" button?

formal goblet
latent sorrel
dusky mauve
summer turtle
# formal goblet Take a look at the item modifiers of the item template.

I see in the _armor template the item modifiers are in the window for configure modifiers, however these don't carry over to a new instance of an actual armour item, but it still modifies stats appropriately. I have tried a similar thing with my species but nada, nothing is updating. If there's a step I'm missing with the example interactions that work I'm not seeing it.

formal goblet
wild salmon
#

I'm trying to do something that I think should work but I can't seem to get it to work.
Can a dynamic table drop-down list spawn from an item container?
I'm trying to make a repository of weapons and equipment and then have the players equip them in certain spots via the dynamic table drop down.

summer turtle
#

The value also gets doubled for some reason, but it's mostly working now

formal goblet
formal goblet
summer turtle
#

Ah yes, I made a typo in the keys for two of my modifiers, thank you

#

I had two of the same 😅

latent sorrel
#

This is driving me nuts. The const sd line throws "unexpected token" error but I cant figure out why. Does anyone have any suggestions? Its in a dynamic table.

%{
let up = ' <i class=\\"fa-solid fa-cloud-plus\\"></i>';
const sd = "${sameRow('skillData')}$";
if(sd == "Generic Spell") return up;
return "";
}%

formal goblet
latent sorrel
# formal goblet and what is the unexpected token? 😅

After futher investigation, its not the this code. This is the process the causes the error. I manually create a new record in the Dynamic table. I then run a macro that creates a dialog and from the responses, populating some of the fields using something like system.props.spells.29.skillData. This all works. The above code is in a label in the dynamic table and is the source/trigger of the error. However, if I then manually modify the field that is being referenced by the originally indicated code, the error abates.
The initial error generated is

latent sorrel
#

I think it relates to synchronous execution.

alpine roost
#

I'm trying to have a roll deal damage to a target and it works but the function shows up in the result is there a way to make it not show up there?

mint arch
#

That didn't work but its ok

#

Ok, so I've built my custom system and now I want to share it. How do I do this?

mint arch
#

Any help is greatly appreciated. Please and thank you!!!

formal goblet
mint arch
#

If I wanted a whole world with created actors and items also brought over, would exporting/importing the templates and then the assets separately do the trick?

mint arch
#

I have backend tables in character sheets that basically hold all the values for my character sheets. Fingers crossed they transfer.

mint arch
alpine roost
#

Im trying to use the visibility formula in advanced configuration but its not working with this equalText('${Discipline_Cat}$', 'Attack')

alpine roost
#

Discipline_Cat is a dropdown list if that's important

#

I might just switch over to checkboxes

latent sorrel
#

The following code generates an error. This is test code to see if I can get an idea to work. Any ideas as to why the error is occuring?

${#SL:="name@Arcana, skill@0, stat@3"}$
${setPropertyInEntity('self', getRefFromDynamicTable('spells', 'skillData', 'helper', NN),SL)}$
static spindle
#

Nvm, think I found it. 😛

static spindle
#

Follow up! I think I got this to work ```

${(fetchFromDynamicTable('item.action_table', 'action_name'))}$```

Now, lets imagine that the item.action_table has more than one action_name... can I somehow get this to show as a seperate row on the item table? It currently concatinates the row, but I'd like each to be seperated/ or at least listed vertically rather than horizontally.

static spindle
#

Hrm. Would it be possible to make a drop-down that picks one or the other, then use this as a reference for other fields?

mint arch
#

I've made something like 200-ish objects that I'd like to transfer over as well.

#

Ah, I am reading documentation on exporting an adventure... let me see if that works

faint wharf
#

Anyone had done code for group rolling to share? i mean to make all players characters role perception

noble ledge
#

Hello, I have an issue. I cannot use setPropertyInEntity for a dropdown key.
Is there any way to use setPropertyInEntity with Dropdown ?

formal goblet
noble ledge
noble ledge
#

Before / after i click

#

Value exist somehow, but it's not shown in dropdown and behavior is inconsistent, if i use key in formula it will work or not depending on how I use it.

#

And when I restart my web page / foundry, value is then set to null

floral crater
#

${setPropertyInEntity('self', 'randomDropdown', "randomDropdown+2")}$

noble ledge
#

But i do not want to add 2, I just want to set it to 2

#

Example :

#

I think it's probably due to the fact value is set, but my client doesn't refresh data for Dropdown with proper value. So my sheet on my PC show a value, and server have another one. When I refresh it then probably select default dropdown value

#

(sorry for my english ^^')

floral crater
#

so ${setPropertyInEntity('self', 'randomDropdown', "randomDropdown==2")}$ (sorry for my english too ^^')

noble ledge
#

Hmm, "randomDropdown==2" is a condition, so it will set it to true or false (according to previous dropdown value)

formal goblet
noble ledge
#

Yeah, it's working with text + my solution

static spindle
#

Hi folks, I am trying to create a user input for a roll that would allow the user to select an action from a dynamic table, and then reference that action for the roll. However, I cannot get the dropdown to populate. Here is what I have thus far:```

${?{Action to use: 'Action to use?'|{fetchFromDynamicTable('item.action_table', 'action_name')|}}$

lyric swan
#

Guys, I think I found a bug, when I use this formula in a lablel :
%{return await game.macros.getName('Slots tout').execute({actorName: '${name}$'})}%
Everything is fine, but as soon as I put a Key on it, then my actor sheet start doing some very weird stuff with my variables (like disapearing and stuff).
Am I doing something wrong? Is it something known?

brave heart
#

Hi, how can you sum the weight or used slots (any parameter) from item container?

#

in the Example_V2_3_1_EN_Martin1522 total weight is taken from item container, but this label doesnt have any formula or link to item container

formal goblet
formal goblet
brave heart
lyric swan
static spindle
#

dear lord... it finally worked. That was a lot more workaround than I expected...

${#die:=fetchFromDynamicTable('item.action_table','action_dice')}$
${#rowcount:= count(action)}$
${#one:=action.at(0)}$
${#two:=rowcount>=2?action.at(1):''}$
${#three:=rowcount>=3?action.at(2):''}$
${#onedie:=die.at(0)}$
${#twodie:=rowcount>=2?die.at(1):''}$
${#threedie:=rowcount>=3?die.at(2):''}$
${?{actionselect: "Action?"|one|two|three}}$
${roll_die:= switchCase(actionselect,one,onedie,two,twodie,three,threedie)}$
${[:roll_die:cs>=4]}$```
#

If anyone can think of better, I am all ears... but I finally have a button to roll an action from an item (assuming no item has more than three actions, which shouldn't happen unless I make it so.)

brave heart
# formal goblet yeah

so I must be doing something wrong :/ items don't inherit modifiers from template and the formula only works if I individually set modifier for each item

formal goblet
#

The console (F12) can tell you what goes wrong

#

And you're missing a closing p-tag

azure ivy
#

I'm trying to quickly cobble together a basic character sheet for a system.

I want to have it so that there's a button that will roll xd6 , based on an attribute the player selects. However, the individual dice results is what matters, not the total. So I want 3d6 to give, for example, "1, 4, 5" rather than "10" (and then having to click the 10 to see the individual rolls). How would I approach this? Is there some kind of loop function I can make a formula do?

faint wharf
# azure ivy I'm trying to quickly cobble together a basic character sheet for a system. I w...

i think what you need with low skill is reaaaly long IF-TRAINs one instruction has only one answer something like${?{dice|0}}$ ${[1d6]}$ ${ dice>1 ? [1d6] : 'X' }$ ${ dice>2 ? [1d6] : 'X' }$ ${ dice>3 ? [1d6] : 'X' }$ ${ dice>4 ? [1d6] : 'X' }$ ...and so on this way you always have them seperated but for example if you top at 10 and roll 1 you will get 1d6 ad 9 X it will look like slot machine.
if you want to calculate them you need to gather values

${  S2:=dice>1 ? [1d6] : 'X' }$
....and so on
```Than you can use to get max or avarage or add... anything you can make math for
azure ivy
#

Thank you! I'll give that a try when I next can :)

#

Thankfully the highest the player can roll is 5d6.

summer turtle
#

I don't know if this is a Foundry issue I'm having or not, but I'm unable to link actors or items within rich text fields like normal. I drag and drop the entry I want and rather than a link, it just gives me the UUID text:
EDIT: From Foundry support (in case it was on Foundry's end):

Looks like the system might not be enriching that text field to support those links
Does that sound right and/or intended?

runic perch
#

hello! I am new to all of ths and just tried to install the custom system builder, but it says I need to install some dependencies manually. How do I do that?

brave heart
#

hello! can you round up? I'm using slot system and want to count slots. Right now eg. 20 arrows = 1 slot, 21 arrows = 1.05 slot and it should be 2 slots up until 40 arrows. Using round() always rounds down until .5

spark lotus
spark lotus
#

Do you know how to install a module? if you go to your Foundry setup page , then to Add-on Modules, then you should be able to look up the module and install it. Then you should be ready to go with CSB.

formal goblet
brave heart
#

ceil was what i was looking for! thanks

formal goblet
spark lotus
#

Is there a way to increase the size of the character portrait on a character sheet or change its location or is its position static?

formal goblet
formal goblet
spark lotus
formal goblet
#

Sure, np

runic perch
formal goblet
#

Where you install systems and modules

runic perch
#

thanks! That made it work! I apreciate it

runic perch
#

If I ask for some help with this, will someone be able to help me figure out what to do to get the desired sheet layout? I am currently fooling aroud with it and following the guide on github but an experience person talking me througstuff and tinkering would be amazing

#

I am fairly new to all of this and I barely have an understanding of only a few programing bits

still lichen
#

Am I able to display a text field in a lable formula? Something like :character_name:? It would make the Chat dice rolls much more 'personable'. I've tried lots of syntax, but think I may have missed somethng obvious. Cheers.

scarlet skiff
kind juniper
#

Hey everyone I wanted to create a simple system to play One Page Rules online with my friends but I don't want to go through the full coding of a system. I've checked Simple wordbuilding, custom system and sandbox. What are the pros and cons of each one?

alpine roost
# kind juniper Hey everyone I wanted to create a simple system to play One Page Rules online wi...

Funnily enough I’ve been using simple world building for a custom skirmish game I made and I have to say from what I’ve experienced the template system in that one is a nightmare compared to the one System Builder has.

Adding something new to the template in Simple Worldbuilding doesn’t update any actors made with that template meaning that if you’ve made units and need to change something you need to do it manually for everything…

That and more importantly I’ve found absolutely no info about how to use Simple Worldbuilding online.

In Simple Worldbuilding’s favor it’s somewhat compatible with Condition Lab & Triggler (which Custom System Builder is most definitely not) though I’ve found only the macros activated on gaining and losing the effect work, the Always HP module also works cleanly with Simple Worldbuilding.

To use Simple Worldbuilding I’ve needed to rely on macros but with Custom System Builder almost everything works in the character sheet.
I have not tried Sandbox so I cannot judge it.

#

(Sorry if this is a bit rambling and incoherent I just kept listing things as they came to mind)

somber bay
#

Custom System Builder is a miracle... it frustrates me, it confuses me, it sometimes has problems... but it is a miracle

ornate junco
#

Does anyone know how to make a user input template?

#

I am confused on what its asking in the wiki.

faint wharf
#

anyone made a roll all players macro script? would gladly look at to capture the esence 😄

misty terrace
#

Hey all, design/implementation question for everyone out here. The system I'm working on uses equipment to provide character customizations. When an Actor equips an Item, I want it to make between 1 and 3 different actions available to the Actor.

My first thought is to use Items and an Item Container, but I'm not sure how to handle the variable number of actions (roll formulas) on each item.

For example, a Sword of Smiting might give the actor both a Basic Attack roll and a Skill roll to intimidate. In that same system, a Turtle Shield might give the actor a Reaction Roll to reduce damage, a Skill roll to hide, and an Attack roll when the shield is thrown at a target.

I'd want the actor to have a list of actions laid out like :
-Basic Attack (Sword)
-Intimidating Flourish (Sword)
-Absorb Damage (Shield)
-Turtle Camouflage (Shield)
-Shell Shock (Shield)

Where the items on this list change based on the equipped gear. I know how to do the equipping part already, but I'm having a hard time visualizing how to use Items and and Item Container to capture this.

I hope I'm clear on what I'm trying to accomplish. Anyone do anything like this already? If not, any good ideas on how to leverage the system to do it?

uneven quail
# misty terrace Hey all, design/implementation question for everyone out here. The system I'm w...

You could have the actions on the item sheet as label buttons "Action 1", "Action 2", and "Action 3" and then just have the item container have columns with label buttons that copy said action buttons.

So the item container would show "Sword" as an item, and next to it you'd see clickable buttons for "Action 1", "Action 2", and "Action 3" (Though you could obviously name them whatever you want).

faint wharf
#

Ok Question ripper mods are popular anyone tried to use mastercrafter and add a roll from charactersheet to it?

vagrant hollow
alpine roost
#

Anyone know how to have a roll check for a value (ammo for a weapon in this case) and then not complete the roll if it doesn’t have it?

scarlet skiff
faint wharf
summer turtle
#

Is there a way to have items only appear in one container at a time without filtering specific items to specific containers? I'd like to have two or more rows available for Talents (and other items later) rather than a single, long list. Currently however if I place an item in one container, it appears in any that doesn't filter the entire type of item out.
(Also, is there currently a way or organise item containers and dynamic tables alphabetically yet? I saw last time this was asked was to wait for an update, I don't know if that's happened yet or not).
Thank you for the help so far, I do appreciate it.

formal goblet
# summer turtle Is there a way to have items only appear in one container at a time without filt...

I'll give a little explanation how Item Containers work internally, so that you know where the issue lies.

Item Containers do NOT hold Items, they only display the links to the Items an Actor has. The real Item holder (and also the only one) is the Actor.

So the question you have to ask is not "How do I place an Item in only 1 Item Container?", instead you have to ask "How do I let it display the right Items?"

summer turtle
#

Ah, so unless there's a way to tell it to only show an item once, or otherwise filter it out, it will always display in every eligible container?

formal goblet
#

As long as it passes the filters, it will be displayed

summer turtle
#

Fair enough, thank you.

formal goblet
#

And the sorting feature is already finished for Item Containers, it's just not released yet

summer turtle
#

I'm smacking my head against a brick wall over item modifiers displaying on the sheet again, I got it working with my Species items just fine but if I do the same thing with these talents they no longer work, nothing displays, not even an error. Why on earth would it work with my species modifiers but not the talent exp? I've followed the exact same process for both, as far as I'm aware.

summer turtle
#

All of those "species_x" ones modify the label I have set up just fine, the "talent_cost" one however just comes up blank

formal goblet
#

And what is the key of that Label?

summer turtle
#

For the species, it's all "x_inital" (where x is the characteristic) and for the talent label I have it as "talent_exp"

#

I can display the exp cost in the item container just fine with "$(item.talent_cost}$, but not outside it with ${talent_cost}$ like I did with the species characteristics

formal goblet
#

You are modifying talent_cost, not talent_exp

summer turtle
#

I think I've crossed wires somewhere, the modifier itself is talent_cost but the label on the sheet is talent_exp, much like how the species_x numbers appear in the label marked x_inital (I wasn't sure if that key needed to be different or not.)

azure ivy
formal goblet
#

The modifier key has to match the Label key. And if you use +, -, * or /, the Label has to contain a number

summer turtle
#

Why would all the species_x ones work then? I'm really not trying to be difficult, I apologise, it's just these seem to fly in the face of what you've just said, and yet work.

#

As I say I did literally everything the same with these talent costs to display them, but it's just not having it.

formal goblet
summer turtle
#

Only the ones in the species template, the number boxes have the key species_x and so do the item modifiers.

#

I've double checked my talent item and the number box for the xp cost is talent_cost and the modifier is also talent_cost

formal goblet
#

The item is fine with the modifiers. What is wonky is your actor template

#

Open the console (F12) and type game.actors.getName('yourActorName').system.props and check if the result contains the species-keys.

summer turtle
#

Do you use the actor id or the actual name? Because either way I'm just getting:
Uncaught TypeError: Cannot read properties of undefined (reading 'system') at <anonymous>:1:37

formal goblet
#

The actual name

summer turtle
#

I think I missed a capital letter, oops. Yes the species-keys are there

formal goblet
#

Then you have Components with those keys in the actor template

#

That's why the formula resolves

summer turtle
#

Does it make a difference if it's in a table or not, I've just realised that's one thing I have different currently

formal goblet
#

Nope, normal Tables are just a visual thing and Components in there are treated as if there was no Table.

summer turtle
#

Fair enough

#

Yeah, I can see talent_cost isn't showing up in the list of keys in the actor

formal goblet
#

Yep, because you don't have a Component with that key in the Actor Template

summer turtle
#

I don't for species-keys either though, aside from the ones in the species item

formal goblet
summer turtle
#

I did yes, I'll do it again just to be sure

formal goblet
#

Then you have components with these keys, simple as that 😅

#

You can export the template or actor and search in the JSON if you're unsure.

summer turtle
#

I mean sure I might as well, but the only components I can find with a species_x key are in the species item. It's the same thing with talent_cost and I'm getting very different results.

#

Oh FFS, I'm an idiot

#

I didn't, at ANY POINT, check my "hidden" tab

#

I am so sorry for that bloody rigamarole.

formal goblet
#

Nothing unexpected for a dev 😅

summer turtle
#

I do very much appreciate the paitence, thank you.

#

Definitely time for bed lol

#

Yup, completely works as expected now 😅

alpine roost
#

I need help with two things about a label roll message in my item container.
First is how to not have something show up in the chat but still happen. I’m running a setPropertyInEntity changing health by the amount of damage and I want it to happen but I don’t want the remaining health number outputting in the chat message.

Secondly I want to stop the roll from outputting to chat if the weapon finds it has no ammo.

azure ivy
#

For the second one I had a similar question and off memory it could be done something like this?
${ testResult > 0 ? [1d6] : 'No Ammo' }$

#

Replace 'testResult' with whatever the variable key name should be

alpine roost
#

Ok, Ill try it out, thanks

scarlet skiff
alpine roost
#

I need help, I'm trying to use this ${${item.Uses_Ammo}$ ? 'Uses Ammo' : 'Doesn't Use Ammo'}$ in a roll in order to check if the weapon has a checkbox checked but it just breaks the thing and doesn't roll and I don't know why.

faint wharf
azure ivy
#

:O

#

If only it was easier to search in a specific thread, have to search the entire diy-systems channel lol

azure ivy
#

so it should be ${ item.Uses_Ammo ? 'Uses Ammo' : 'Doesn't Use Ammo'}$

I think

azure ivy
#

Did some searching and found this. Which makes sense to build the roll formula prior to rolling, however in my scenario I'm not choosing between 2 different types of rolls, but rather that I want it to display a string or a roll.

If I was just building two different roll formulas it'd be fine and easy, doing something like this

${#actionDice:= GoingWild ? '1d20' : '1d8'}$
<b>Action Die:</b> ${[:actionDice:]}$

But I want it to display a string like 'X' or 'No Ammo' or just nothing at all if the condition is not met. If I make it a ${[X]} it'll just break xd
I suppose I could make it say 0 instead, but.. m.

woeful skiff
#

Is the item container the only component that supports drag and drop?

scarlet skiff
alpine roost
faint wharf
#

ok a strange ida can i add set on roll if its private or public depending on result?

#

Also second question how to ask on roll if actor has item with name X? cant find in documentation

burnt stump
#

mind sharing the sheet template?

#

I realize I contributed very little and you did a ton

ornate junco
#

Does anyone know how to make a forumla that will only show a label icon if a dropdown is selected to a certain field?

#

Like if the dropdown reads "Yes" then the label dice roll will appear on the sheet.

faint wharf
ornate junco
#

That's what I'm trying to figure out.

ornate junco
#

Thank you.

#

I got it to disappear but now it won't show back up.

faint wharf
ornate junco
#

Yes

#

I am trying to get it so when the dropdown equals my desired result the roll appears.

faint wharf
# ornate junco Yes

so remember those have values and names so here you should use values. if its a text 'bracket it'

#

I personaly use mostly numbers so i dont need to think so yes is 2 so 2==2 and it works

ornate junco
faint wharf
#

to be visible it has to be true. you have for example dropdown with key 1 and 2 labels for 1 is yes and label for 2 is none the component key of button is drop1 so to visible on yes do drop1==1

ornate junco
#

Is drop1 the key then?

#

For the dropdown?

faint wharf
#

component key

ornate junco
#

And to confirm 1 is the label?

faint wharf
ornate junco
#

Thank you sir

#

A life savior you are

faint wharf
#

Now im waiting for mine 😄

Who knows how to check if actor has an item to use in condition?

formal goblet
faint wharf
faint wharf
formal goblet
formal goblet
#

You can put the result-text into the Script as well. It's the same syntax.

faint wharf
formal goblet
#

And everybody, who knows js a bit, can adjust that.

faint wharf
ornate junco
azure ivy
# alpine roost That didn't change anything. Thank you for responding though.

Hmm, so the issue probably lies in that it doesn't know how to parse item.Uses_Ammo.

That works on its own right? Like does ${ item.Uses_Ammo }$ parse correctly?

And on the flip side does this work? What I usually do when troubleshooting something that doesn't actually give helpful errors is I just break down each corresponding bit to find which part specifically it's getting upset at.
${ 2>1 ? 'Uses Ammo' : 'Doesn't Use Ammo'}$

formal goblet
azure ivy
#

HAH

#

I missed that apostrophe! That'd be what the issue is then @alpine roost

ornate junco
formal goblet
ornate junco
formal goblet
ornate junco
main magnet
#

Is there any way to attach an item to an item? I essentially want to make a firearm attachment item go into an item (firearm). So in other words, an item container inside an item (or however that would work).

ornate junco
# formal goblet Only 1

Alright. How would I pull from a dynamic table, grab the numerical value, and add that value to another number field?

formal goblet
brave heart
#

hi, can you, for example, trigger change of value in another field? like clicking on a label changes value in another label?

formal goblet
brave heart
#

Input component is something, that must be prepared outside the regular character sheet, right? like some addon to my system?

formal goblet
brave heart
#

so how do I trigger for example a checkbox? I have a button label, that after clicking would mark separate checkbox or radio button, like ${checkbox := 1}$?\

ornate junco
#

Would that not override the number already within the target number field?

formal goblet
ornate junco
# formal goblet Are we talking about a derived or a persistent value?

I believe in this instance its a persistent value. Essentially, I have two values that are associated with two difference pieces of armor. So they are listed as an individual field within my dynamic tables. I need to take both of those values, add them together, and then set that value into my number field.

formal goblet
#

Well,

  • derived values -> formulas
  • persistent values -> setProperty()
#

And also:

  • Input Components cannot contain derived values (exceptions are additional fields in the Component like min, max in Number Field)
  • Non-Input-Components cannot contain persistent values
ornate junco
#

Is there really no way to just fetch the value from the dynamic table and just add it to the number field?

formal goblet
ornate junco
formal goblet
#

Ehhhh. Why not make it derived and let it autocalculate without any user-interaction?

ornate junco
brave heart
formal goblet
ornate junco
#

My system has it so armor acts as a barrier to their health pool.

formal goblet
#

Weird mechanic, but ok.

Label Roll Message:

${setPropertyInEntity('self', 'numberFieldKey', "sum(fetchFromDynamicTable('dynamicTableKey', 'columnKey'))")}$

What it does is that it overrides the value of the number field with the sum of all entries in a specific column of a dynamic table.

faint wharf
#

did anyone set mastercrafter from ripper to roll crafting skills in CSB?

ornate junco
#

And with what you gave me above I would have to combine both armor set values so like the gloves and arm guards?

#

Also thanks for calling it a weird mechanic :)

formal goblet
formal goblet
faint wharf
#

My coding power is zero, as its a popular dev (ripper-mastercrafter)maybe i will seduce you to tell me how to force insert your roll script into his default sample that works ```SAMPLE const roll = await actor.rollAbilityTest('str');

return {
success: roll.total > 12,
consume: true,
}; and CSB side rolllet rollMessage = await actor.roll(
'WIEDZA(WIE=Alchemia).roll',
{ postMessage: false}
);

let speakerData = ChatMessage.getSpeaker({
actor: actor,
token: actor.getActiveTokens()?.[0]?.document,
scene: game.scenes.current
});

rollMessage.postMessage({speaker: speakerData});``` Is it posible or i need calculate values outside of character sheat?

As i understand we need to return succed or false after macro on return

ornate junco
formal goblet
brave heart
formal goblet
brave heart
ornate junco
formal goblet
ornate junco
formal goblet
#

And with setProperty:

${setPropertyInEntity('self', 'numberFieldKey', "first(fetchFromDynamicTable('light_armor', 'armor_dura', 'armor_name', 'Arm Wraps'), 0) + first(fetchFromDynamicTable('light_armor', 'armor_dura', 'armor_name', 'Wrapped Gloves'), 0)")}$
ornate junco
#

Thank you Martin.

shy drift
#

Hello~ I just started getting into CSB this week and steadily learning but I'm a bit stumped on why Mod is not correctly being equated for the Saving Throw.
I followed advice to use ternary in the Label text ${(sameRow('Base') == 20) ? 5 ..... : 0}$ and so forth for when players put in their score in Base that they get the correct modifier under Mod. Am I missing something as to why the value for Mod doesnt work? Im certainly not understanding something correctly 😵‍💫

alpine roost
formal goblet
alpine roost
#

That would add mod together twice wouldn’t it?

#

If that is being modeled after D&D saving throws then there should be a 0 after the : instead of another sameRow(‘Mod’) I’m pretty sure

alpine roost
#

Is there a way to combine these two so that the table doesn't show up if Uses Ammo is false?

${item.Uses_Ammo ? Table Here: ''}$

<Table>
<tr>
<th><strong>Ammunition</strong></tr>
<tr>
<td>Current Ammunition</td>
<td>${item.Uses_Ammo ? ${item.Ammo}$ : ${#}$}$
</tr>
<tr>
</Table>

potent fossil
#

hello guys, I don't know if any one of you is also using mclemente's health Estimate module, but I didn't really managed to make it work with csb. I'm guessing it's the path to HP that is causing the issue. My keu for hp is pv so I've tried the following paths failling to have any result :
actor.data.data.props.pv
actor.data.data.attributeBar.pv
actor.system.attributeBar.pv
actor.system.props.pv
Am I doing something wrong or should I reach out to their support to try to solve the problem?

#

this is the one I'm tracking. I've also tried just attributeBar.pv

formal goblet
potent fossil
#

Just tried it but it doesn't work. Probably a module issue then, I'll try to see with them if we can figure out a solution
Thanks a lot 😁

formal goblet
alpine roost
#

<td><strong>${item.Uses_Ammo ? ${setPropertyInEntity('item', 'Ammo', "item.Ammo - ${item.Ammo > 1 ? 1 : 0}$"}$ : ${#}$}$</strong>

#

Why is this not working?

#

Wait...

#

Ok I was just missing a )

spare lynx
#

hows it going yall. For some reason my roll isnt working the way I want it to

Result: ${[(sameRow('Skill_Value'))d20cs>=11]}$```
#

it says I am getting the stringterm back instead of the number value

spare lynx
#

Thank you so much. I had been doing it without that this whole time

scarlet skiff
vagrant hollow
potent fossil
potent fossil
vagrant hollow
potent fossil
potent fossil
#

For those who might need the answer afterward, the path is just props.key. If it doesn't work the first time, just reinstall the module and make sure you are applying enough damage to trigger the set threshold.

dusky mauve
#

Do we have ability fetchFromDynamicTable the row instead of column?

I have service user - which contain DynamicTabls with data. I have getting such data from different OTHER actors by fetchFromActor

${label:=fetchFromActor('ServiceUser',"fetchFromDynamicTable('item_durability', 'durability_label','durability_key','${DURABILITY_VALUE}$')", '0')}$

${style:=fetchFromActor('ServiceUser',"fetchFromDynamicTable('item_durability', 'durability_style','durability_key','${DURABILITY_VALUE}$')", '0')}$

I wan't make 1 call to the external table, take whole row like [ 'durability_key', 'durability_label', 'durability_style' ] and then use it inside the script by array position instead of a lot of requests.

crimson jungle
#

Hi
I'm trying to generate character stats from a macro and save them directly into the character sheet.
I'm using this macro found in the CSB documentation as base and modified it to include dice roll.

let actors;
let roll  = new Roll("3d6");
let currentProperties = new Map();
let updatedProperties = new Map();

// Get the selected tokens. Default: currentPlayerActor
if (canvas.tokens.controlled.length > 0) {
    actors = canvas.tokens.controlled.map(a => a.actor);
} else {
    if (!actor) {
        ui.notifications.error('Make sure that you select atleast 1 token or that you have a configured actor');
        return;
    }
    actors = [actor];
}

for (const a of actors) {
    // ***Define all needed keys here***
    const keys = ['_attributePhysiqueBase'];
    // ***Define all needed keys here***
    
    keys.forEach(key => currentProperties.set(key, a.system.props[key]));
    
    // ***Perform all your calculations here***
    await roll.toMessage();
    //_attributePhysiqueBase is 0 at character creation
    updateProperty(a, '_attributePhysiqueBase', '${_attributePhysiqueBase + %{return roll.total;}%}$');  
    // ***Perform all your calculations here***
    
    for (const element of keys) {
        if (!updatedProperties.get(element)) {
            ui.notifications.info(a.name + ': ' + element + ' -> unchanged');
        } else {
            await a.update({['system.props.' + element]: updatedProperties.get(element)});
            ui.notifications.info(a.name + ': ' + element + ': ' + currentProperties.get(element) + ' -> ' + updatedProperties.get(element));
        }
    }
}

// Use this update-function
function updateProperty(actor, key, formula) {
    updatedProperties.set(key, new ComputablePhrase(formula).computeStatic(actor.system.props).result);
}

However, I get an error when trying to run it:

Error: Cannot convert "undefined" to a number

I am using CSB on Foundry v10

#

However, it is running fine if I replace

updateProperty(a, '_attributePhysiqueBase', '${_attributePhysiqueBase + %{return roll.total;}%}$');

with

updateProperty(a, '_attributePhysiqueBase', '${_attributePhysiqueBase + 4}$');

For example
Any idea what I'm missing ?

formal goblet
formal goblet
crimson jungle
#

I'm on CSB 2.4.3

formal goblet
#

Seems fine, I'll take a closer look

oblique spear
#

Is there a way to return the dice result in its label roll message?

dusky mauve
formal goblet
crimson jungle
kind juniper
ornate junco
#

What would the formula be so when someone enters like lets say 300 in a number field. A label would then take that value and times it by 2 to show 600.

scarlet skiff
faint wharf
#

Hi anyone who knows how this work deeper i like generated macro scriptas, but do you know how to on return get a value from the result? ```let rollMessage = await actor.roll(
'WIEDZA(WIE=Alchemia).roll',
{ postMessage: false}
);

let speakerData = ChatMessage.getSpeaker({
actor: actor,
token: actor.getActiveTokens()?.[0]?.document,
scene: game.scenes.current
});

rollMessage.postMessage({speaker: speakerData});
how to tap into resultsreturn{
where.i.can.find.results=or.how.to.find.them
}```

crimson jungle
faint wharf
crimson jungle
#

You mean several Roll objects ?
Sorry, I don't quite get what you mean by 'those ${}$'...

faint wharf
crimson jungle
faint wharf
crimson jungle
#

Ah, I think I understand
Roll.total and Roll.result will not return the whole message shown, only the resulting arithmetic expression after Roll is evaluated.
However, those are Javascript lines of code, you will need to use %{}% for it to work in CSB
Your issue is close to the one I am experiencing, which means I'm afraid I won't be able to help you much more...

faint wharf
ionic oriole
formal goblet
ionic oriole
#

I am so sorry

narrow hollow
#

@formal goblet hey is there a way to do conditionals inside of a roll? im trying to have a toggle that can be used to change the dice rolling formula. for example the usual roll is 2d6 but a boosted roll is 3d6dl. i cant seem to find any examples of this in the example sheet and documentation so help would be greatly appreciated.

formal goblet
narrow hollow
#

thank you very much. i see now that i was supposed to make a roll table.

spiral dome
#

Hello, new to the Custom System Builders. I am having issues with the tabbed panels: the content of the tabs will only show up to the right of the tabs header. And I cannot find how to change it. Does anyone know what I am doing wrong/how to fix this?

potent fossil
formal goblet
latent sorrel
#

@formal goblet I am having the same issue. I have tried to implement your indicated solution of using "text values" but without success. Can you provide the exact solution, modifying the OPs code? Thanks

formal goblet
latent sorrel
spiral dome
formal goblet
#

LinkedFluuuush built most of the features

latent sorrel
#

I apologize for not being clear. What is the correct format for the setPropertyInEntity to change the selection of a radio button given something similar to ${setPropertyInEntity('self', 'npc',"'1'")}$ (which doesnt work) where there are 3 values, 0, 1, and 2 and the keys are "pc","rival","nemesis".

formal goblet
latent sorrel
#

I am not sure what you mean by that.

formal goblet
#

Instead of 1, 2, 3 change it to a, b, c

#

And then the format of setProp...() would be setPropertyInEntity('self', 'radioButtonGroupKey', "'value'")

latent sorrel
#

ok. I understand. Thanks

spiral dome
#

Again, the answer is probably obvious, but I am running into an issue with fetchFromDynamicTable.

I have a Dropdown List with key [currentpursuit]

I have a DynamicTable with key: [pursuittable] with a column [pursuit] and a column [onthepursuit]
I made a label which should show the value under 'onthepursuit'

I think this formula should return the value under 'onthepursuit' for whatever value is chosen inder 'currentpursuit' (the currentpursuit refers the the same dynamic table, you can chose from the values under 'pursuit', this works).

Could anyone please help me 🙂

oblique spear
#

Hey! Can someone help me?
A actor has a item container, and the items have a dropdown list with the item's main modifier (str, dex, etc), these modifiers are in the actor's sheet. I want to reference the modifier in the actor's item container. How do i do this?

For example, a sword scales with the actor's dexterity. In a item container i have a label roll, but i dont know how to add the actor's dexterity.

spiral dome
oblique spear
spiral dome
oblique spear
#

There's no way to uncheck a radio button?

formal goblet
narrow hollow
#

hey im having an issue where my item container is refusing to grab the value of a label within in a item container.
here is my formula for the key of "WpnAtkTotal" this is grabbing the players skill value and name elsewhere in the sheet and using this to determine stat usage and then getting the skill levels.
${switchCase(item.wpnSkill, 'Archery', POI,'Crossbow', POI,'Light Artillery', POI,'Pistol', POI,'Rifle', POI, PRW) + item.WpnAtk + WpnAtkMod + first(fetchFromDynamicTable('SkillList', 'SkillLvl','SName', item.wpnSkill )) }$
for some reason using this piece of code does not work when attempting to grab "WpnAtkTotal" and always gives me an error. the first part works fine alone.
${[:AtkDiceTotal:d6 + :sameRow('WpnAtkTotal'):] }$

formal goblet
narrow hollow
#

Oh okay ill have to tackle this problem some other way.

elder turret
#

<a class="content-link" draggable="true" data-skill="Under Water Basket Weaving" data-uuid="Macro.ID" data-id="ID" data-type="Macro" data-tooltip="Roll Skill">Under Water Basket Weaving</a>

Then in your macro
let skillName = event.srcElement.dataset.skill;

#

I know it is a little old, but I just learned how to do it after messing around so figured I would share if it is still a desire of yours.

elder turret
#

class="content-link" is needed but you can add other classes if you are playing with the css to make it look prettier

#

I use class="content-link chat-button" draggable="false" to make it work a little better and then include a css

a.content-link.chat-button {
color: black;
padding: 2px 4px 2px 4px;
border-top: 1px solid #ECECEC;
border-radius: 5px;
border-right: 1px solid #333333;
border-bottom: 1px solid #333333;
border-left: 1px solid #ECECEC;
}

#

which gives me a nice rounded button look

kind juniper
#

I'm new to this, but how can I make a label that once clicked creates a roll ? I have a number field called attack_num and I want to click on a label and roll a number of d6s equal to that property, how can I do it ?
I've tried a few times messing with the roll message of the label but it only returns text

elder turret
#

try this [:attack_num:d6]

kind juniper
elder turret
#

Sorry ... outside of a csb script it needs double

#

[[${attack_num}$d6cs>=5]] OR

#

${[:attack_num:d6cs>=5]}$

kind juniper
#

is there a way to show it like the top one instead of the bottom one ?

elder turret
#

Yes, but not easily. You would need to set up a bunch of html and css

#
<table style="width: 100%;" border="0"><colgroup><col style="width: 33%;"><col style="width: 33%;"><col style="width: 33%;"></colgroup>
<tbody>
<tr>
<td colspan="3" style="text-align: center; vertical-align: middle;"><h2>${!rollname}$ <span style="font-size:x-small">(${!rollsubname}$)</span></h2></td>
</tr>
<tr>
<th style="text-align: center; vertical-align: middle;">Roll</td>
<th style="text-align: center; vertical-align: middle;">TSC</td>
<th style="text-align: center; vertical-align: middle;">Crit</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle;">${rollval:=[d100 + :rollbonus:]}$</td>
<td style="text-align: center; vertical-align: middle;">${!rolltsc}$</td>
${#rollcritval:= (rolltsc >= rollval? rollcritmod : rollcritmod * -1)}$
<td style="text-align: center; vertical-align: middle;">${critval:=[d10 + :rollcritval:]}$</td>
</tr>
<tr>
${#result:= (rolltsc >= rollval? 'Success' :'Failure')}$
${#resultcolor:= (rolltsc >= rollval? 'green' :'red')}$
<td colspan="3" style="text-align: center; vertical-align: middle;"><h3 style="color:${!resultcolor}$">${!result}$</h3></td>
</tr>
</tbody>
</table>

Here is an example of a pretied up html section ... (there is a bunch of code to do logic behind it _ which I have ommited)

#

That is the end result

#

So as you can see, you can pretty it up, but you have to work with the html

kind juniper
#

Can't I just call the roll.toMessage function?

#

I wanted to do something simple to play one Page rules but I think I bit a bit more than I can chew

elder turret
#

if you want to do the roll to message try this

#
let roll = new Roll("${attack_num}$d6")
roll.toMessage();
}%
%{console.log(undefined.error)}%```
#

%{ --- means to use javascript

#

%{console.log(undefined.error)}% produces an error which stops the roll from finishing so a second message does not get thrown into the chat since all you are interested in is the roll.toMessage() part

kind juniper
#

Can you create a item container inside another item ? I want my weapons to have an effect, this is just a basic text description and a number regarding the "power" of said effects. I want to be able to add these effects to my weapon and show them in a column on the character sheet.

#

so the weapon would have a "pack" of items that are migrated to the character once you add the weapon to the character

formal goblet
kind juniper
#

Can't I even reference it in the character sheet? Like having a table in the item and then show all the names in the character ?

still lichen
#

I'm starting to work out items, which look to be great, if I can fugure them out!

I have a weapon damage label called 'dam1_label'. The Label roll message is:

<h3>${weap1_text}$ Damage</h3>
<p>${character_name}$ inflicts ${[:weap1_damage:]}$ damage</p>

Am I able to apply a modifier to this dam1_label from an equipped item?

latent sorrel
# kind juniper Can you create a item container inside another item ? I want my weapons to have ...

As indicated, you cant using the native command system. However, if you use Javascript and the world scripter module, you can simulate the effect of dropping items onto items for the purposes of passing data forward. Example: Dropping item Scope (+1 to hit) onto item Rifle (which is Accurate, +1 to hit), which, when on an actor sheet, passes "+2 to hit" to actor when gun is rolled from character sheet.

latent sorrel
kind juniper
latent sorrel
# kind juniper do you have an example that I could use to learn it ? I'm terrible at JS xD

Here is my core code that makes the magic happen. It may not be particularly well written. It also must be put in the World Scripter module. You really need, as a minimum, a basic understanding of JS and JSON. In this code, I am dropping two different item types (qualities and attachments) on to the target item. You may only need one type. It is designed with the idea the source item has fields and the target item has a dynamic table that will store the data from the source item.

lyric swan
#

Does someone knows a way to organize / reorganize an item list?

latent sorrel
#

@lyric swan How do you want to re-organize it?

lyric swan
lyric swan
#

So I did this, it allows you to drag and drop items from an item container in order to reorganize them (it moves the drag object just before the object on which the object is dropped). I'm no js pro or anything, juste a random dude doing random things, so it may be stupid, but for me it works.

    
  const items = document.querySelectorAll('.custom-system-dynamicRow');
  
  items.forEach((item, index) => {
   
    if (!item.id) {
      item.id = 'draggable-' + index; 
    }
  
    item.setAttribute('draggable', true);
    
    item.addEventListener('dragstart', (event) => {
      const draggableElement = event.target.closest('.custom-system-dynamicRow');
      if (draggableElement) {
        event.dataTransfer.setData('text/plain', draggableElement.id);
        console.log('Drag started:', draggableElement.id); 
      }
    });
    
    item.addEventListener('dragover', (event) => {
      event.preventDefault();
    });
    
    item.addEventListener('drop', (event) => {
      event.preventDefault();
      const id = event.dataTransfer.getData('text/plain');
      const draggableElement = document.getElementById(id);
      const dropzone = event.target.closest('.custom-system-dynamicRow');
  
  
      const draggableParent = draggableElement.parentNode;
      const dropzoneParent = dropzone.parentNode;
  
      if (dropzone && draggableElement && draggableParent === dropzoneParent) {
        if (dropzone instanceof Node && draggableElement instanceof Node) {
          dropzoneParent.insertBefore(draggableElement, dropzone);
        } 
      } 
    });
  
  });
});```
#

(You have to put this in a world script macro, using the Word Script module)

floral crater
#

hi
I'm trying to retrieve from an object the value of a field in a dynamicTable of a character sheet to which the object is linked, which I compare to a dropdownlist in said object.

${fetchFromDynamicTable('cat_armesdt', 'valeur', 'liste_categorie', 'Pistolets')}$ in the character file: works
${fetchFromActor('attached', "fetchFromDynamicTable('cat_armesdt', 'valeur', 'liste_categorie', 'Pistolets')")}$ recovers value from character sheet in object sheet.

I'd like to replace 'pistols' with a value that I'll retrieve from the 'armelist' dropdownlist on my object sheet.
How do I go about this, if at all possible?
Next, if 'Pistolets' isn't in the dynamicTable, I'd like to use the default value for Pistolets (set in the object file).

misty terrace
#

Any CSS maestros out there who can point me in the right direction? I have a Main Table that has 1 row/2 cols. In each of the cols is another table, each with different row counts/heights. I want those tables to vertically align to the top. I'm not having any any luck with the vertical-align: top property in the parent table.
I've also tried designating the parent table as a flex container and using align-self in the child tables, no luck.
Any tips would be greatly appreciated.

fair yoke
#

So I know there were plans to be able to stop a script showing Test Undefined after each roll

#

did that end up going through?

latent sorrel
#

The current solution is to add throw "Done" at the end of your JS.

fair yoke
storm flame
#

Hi so I'm having some minor difficulties setting some stuff up. atm I'm trying to make item you drag and drop item on character inventory then when used it uses strength stat and drains the user of x amount of stamina

scarlet skiff
#

hi @glad spade maybe you can help me with the following (module item piles). i have 3 rarity tiers for items (normal = system.props.itemrarity === 0, magic = system.props.itemrarity === 1, rare = system.props.itemrarity === 2).
is there a possibility to create item piles or vaults where the items can be sorted/highlighted by their rarity?
i saw in the style settings "vault styles" where i input this values (see screenshot) but it doesn't do anything. am i missunderstanding something, or is there something special with CSB i should change?
also for normal item piles does it make any difference how the character sheet is configured? or are all the contents of the item pile pop-up not changeable (example see second screenshot)?

glad spade
#
  1. It only affects vaults
#
  1. Style needs to be filled in, such as box-shadow with inset 0px 0px 7px 0px rgba(0,255,9,1) in the value
#

@scarlet skiff that

scarlet skiff
#

so i think the missing style column is the problem but i can't input anything there

glad spade
#

Yeah most likely a bug then

scarlet skiff
glad spade
#

Not at the moment.

latent sorrel
#

Does someone have a macro that can be used to update items on sheets when the template is updated?

primal umbra
primal umbra
#

Thank you!

latent sorrel
dusky mauve
scarlet skiff
latent sorrel
#

I am trying to move items, actors, and templates between worlds using compendium import/export. It appears that this requires the templates to be re-selected after import. I have a lot of items which makes this very arduous. Am i missing something? Is there a better way to do this so all template references are maintained?

vagrant hollow
fleet rampart
#

Hey, anyone able to vocal ? i have a few comprehention problems : creating items, equipments, inventory system, token and map sizes, and character sheet design

latent sorrel
vagrant hollow
latent sorrel
#

That I am aware of that. I havent looked into to that, so I am not sure how to target the actor json to correct this. Thats not as bad since you only have to perform a few conter fixes after import unless you have 30+ containers (like i do)

fleet rampart
#

I'm scared of how long is your message, over 20 minutes you are writing

latent sorrel
#

Organizing my thoughts, but the anwer is scary

latent sorrel
# vagrant hollow I meant the item containers in the character template. They will lose their set ...

So after some poking around to see how the container references can be kept, the Solution would be a bit of a pain. I would use the css class to store the template id as id_abc123_cdf465(in this case, two ids). If the container is nested, all elements in the "path" would need to be named. The highest level element would then have a css with a path of path_element1_element2, etc. The macro would iterate through actors, getting their templates and then, for each, start with game.actors.get( "id" ).system.body.contents which each gives an iterable list and uses path_ for quick navigation. Get the template id from the css and update the template field(s) on the actor _template. The actor templates will need to rendered and a .click event will need to be used to force the actor update. I am not sure that its worth the pain for most people to set up this structure.

abstract siren
#

Hello everyone, I'm new here, I've been tinkering for the past few weeks with CSB, and I was wondering if it is possible to fetch item data in a specific "Item Container" component. In my case I'm trying to get the ARMORAC value from EQUIPPEDARMOR (an Item Container).
I know it can be done with dynamic tables, should I just rewrite the EQUIPPEDARMOR component to be a Dynamic Table?
If so how can I populate a Dynamic Table with Items from an Item Container?

latent sorrel
#

If the data is numeric, you may be able to use item modifiers to send the value to the actor such as a "+1". If you are trying to access non-numeric data, such as an item name, then that requires javascript. It depends on what you are doing with the data

abstract siren
fleet rampart
#

Still no one available for a vocal ?

formal goblet
#

Sry, I´m working on my thesis until 01.02, so I don`t really have time 😅

mint arch
#

@formal goblet and company! Just wanted to say thank you so much for everything over the past year! We were finally able to share our game on Foundry and people are now playing our original ttrpg system with tons of items cooked in. Can't thank you enough!

#

Again- you guys were pivotal in making our system accessible for newcomers to our platform. Serious undying gratitude.

fleet rampart
#

Ain't sure if you meant hour or date with the us system x)

outer wharf
#

Hello everyone, I have been reading the readme to the point my eyes have glazed over... could someone please tell me if it is possible to call another method inside of another method? For example: ${<code does something>}$ and then ${<this code uses the output of the earlier code, then does something else>}$. Even if this is not possible, if anyone has plausible workarounds I would appreciate it. Ty.

mint arch
#

Depends what the intent is.

#

Sounds like you are trying to index variable data tables. I am presently not aware of a way to do this.

#

But i'm still a novice as well.

outer wharf
#

Hmm, well I thank you anyway. Time for a change of plans.

mint arch
#

I had data that I wanted to call on, so I had a dice roll provide the value for a given field, but it became a static value. Then i used that value to populate other fields. It was a two part feature and required manual interference everytime I wanted a different value.

mint arch
#

I dont know if this helps at all.

outer wharf
#

It doesn't, but it does save me time trying the same impossible task.

mint arch
#

Can I ask what you were trying to do? Maybe I can think of something else.

vagrant hollow
vagrant hollow
# fleet rampart 👀

He meant the first of February.
Youst write your first question here. Maybe someone can give an answer, even without voice communication?

fleet rampart
abstract siren
west wyvern
#

What do I have to do to make a max value for an attribute like HP?

vagrant hollow
candid perch
#

Hello all, new here. Please forgive in advance because I'm not very bright on this stuff and am muddling through creating a skirmish game system using CSB. Question on dice syntax. I have a item field that sets a number of d10 dice to roll. The desired outcome is to output in chat the result of each d10 result. So I have a roller button to activate that and the string I'm using. My string is ${[1d10] * item.dmg}$ but that just multiples the d10. I know this is silly easy for you guys but im stumped. can you help?

fierce harbor
candid perch
#

ok thanks, what do the colons do?

fierce harbor
candid perch
#

thanks, been reading it for hours and struggling,, thanks helping!

candid perch
# fierce harbor My pleasure

Torlan, do you happen to know if there is a foundry plugin module that forces the chat to not add die values but display the individually rolled dies?

#

without having to click the chat

fierce harbor
vagrant hollow
fierce harbor
outer wharf
#

Hello again friends, new issue this time. As seen on Gitlab it is possible to set the properties of dynamic tables:

${setPropertyInEntity('self', getRefFromDynamicTable('Spells', 'Uses_left', 'Name', 'Fireball'), "min(first(fetchFromDynamicTable('Spells', 'Uses_left', 'Name', 'Fireball')) - 1, 0)")}$```
However, this is hardcoded to only change the value of the table entry for "Fireball"
For use in templates, I would much rather be able to use component keys where a player could enter the text "Fireball" such as:
```Decrease value of the field Uses_left in the Spells Dynamic Table for the spell named Fireball : 
${setPropertyInEntity('self', getRefFromDynamicTable('Spells', 'Uses_left', 'Name', '<Component Key That Points to Fireball>'), "min(first(fetchFromDynamicTable('Spells', 'Uses_left', 'Name', '<Component Key That Points to Fireball>')) - 1, 0)")}$```
If anyone knows how to do this, I would appreciate your wisdom.
fierce harbor
outer wharf
#

This was exactly what I needed, thank you so much. You are a hero.

stiff forge
#

I'm revisiting CSB for a new game design, and trying to make some new macros , but I'm getting an error in the following attack macro:

'Attack Rank=${myskill:=[:attack01rank:]}$ ${targetdefense:=getPropertyDataFromActor("target","defenserank")}$ Modifier=${modifier:=?{Modifier|0}#}$ Attack Roll=${myroll:=[(:myskill:-:modifier:)d6even]}$ Defense Roll=${defenseroll:=[(:targetdefense:)d6even]#}$

#

---I know the error is in the " [(:myskill:-:modifier:)d6even] " portion, but what am I doing wrong there? It should take the 'myskill' varable and subract the 'modifier' variable and roll that many d6s looking for even results

fierce harbor
stiff forge
#
    at StringTerm.evaluate (foundry.js:12750:11)
    at Roll._evaluate (foundry.js:10286:42)
    at Roll.evaluate (foundry.js:10250:25)
    at ParentheticalTerm._evaluate (foundry.js:12359:28)
    at ParentheticalTerm.evaluate (foundry.js:11253:25)
    at Roll._evaluate (foundry.js:10273:20)
    at Roll.evaluate (foundry.js:10250:25)
    at Formula.evaluateRoll (Formula.js:945:24)
    at async Formula.compute (Formula.js:420:30)
    at async processFormulas (ComputablePhrase.js:139:21)
    at async ComputablePhrase.compute (ComputablePhrase.js:212:34)
    at async HTMLAnchorElement.<anonymous> (Label.js:271:21)```
#

^ error message...

#

I think its the " (:myskill:-:modifier:)d6even" part...I need to write that differently?

fierce harbor
stiff forge
#

My sincere apologies, im not following...can you post a tiny example?

#

something like xxx = myskill - modifier ???

#

(in pseudocode)

fierce harbor
stiff forge
#

got you - thanks, wil try that!

fierce harbor
stiff forge
#

Yes, that works...thanks @fierce harbor !

fierce harbor
stiff forge
#

One new issue, then I should be set:

The following line throws an error:

${targetdefense:=getPropertyDataFromActor("target","defenserank")}$

I get the error "Undefined function getPropertyDataFromActor" - has this been deprecated or am I just not using it correctly?

fierce harbor
stiff forge
#

I'll try that...I last did macros in Foundry a couple years back...things have changed...lol

Yes, that works perfectly, I am set...thanks again for your help. I need to read up on the changed codeset...

fierce harbor
hallow ginkgo
#

Can someone help me?

I have a *label * which sums all my items to give me a Encumbrance number.

I wanted to get this final emcumbrance value in the label to use in other formula and show the Encumbrance level, like, Light, Medium, etc.

But CSB seems to not recognize the label final number as a valid value to use in other formulas

#

Look, this is my Encumbrance formula, which sums all the different weights. This label has the carga_atual unique key
${floor(sum(fetchFromDynamicTable('misc_items', 'misc_items_carga')) + item_carga + tesouro_carga + item_po + item_pp + item_pc)}$

This is the formula that I wanted to use, getting the value in carga_atual as a reference
${carga_atual < 401 ? "LEVE" : (carga_atual < 801 ? "MÉDIA" : (carga_atual < 1601 ? "PESADA" : (carga_atual < 2400 ? "SOBRECARGA" : "SOBRECARGA")))}$

grave ether
#

Lastly, why are you putting ( arround your if statement..

#

${carga_atual < 401 ? "LEVE" : carga_atual < 801 ? "MÉDIA" : carga_atual < 1601 ? "PESADA" : carga_atual < 2400 ? "SOBRECARGA" : "SOBRECARGA"}$

candid perch
#

Good evening. Has anyone had trouble putting item containers in an item template? Im trying that but the test item i created wont seem to accept the "subitem"

vagrant hollow
vagrant hollow
latent sorrel
candid perch
harsh obsidian
#

Hi everyone, is there a system with this program to create a career that contains within it weapons, potions, specialization objects, etc.? I would then like to import the career into the character sheet and populate all the fields. can you help me?

hallow ginkgo
#

I'm using a dyanmic table for the items. I find it easier

hallow ginkgo
hallow ginkgo
abstract siren
#

Just a quick question, have you guys experience with conditions? Do conditions work with strings? Like can i set ${KEY}$ == "myStringValue" as a condition?

#

I'm asking because I'm only able to check conditions on numbers so far, and I suspect there's something about string evaluation that I can't grasp

hallow ginkgo
#

Folks, how can I refer to a dropdown option in a condition? I tried the dropdown option key, but it didn't work. Is there something like dropdownKey.dropdownOptionKey ?

grave ether
grave ether
abstract siren
grave ether
#

LOL, I do it all the time

candid perch
#

Good morning! Having trouble linking journal entries into Rich text fields in item descriptions. When I drag a journal entry, it just copies a string of text that looks like a URL or something instead of the clickable link. What am I doing wrong?

#

looks like this

vagrant hollow
candid perch
storm flame
#

So I'm trying to have an item in a players inventory pull a number from their stats and add it to a dice roll any advice on how to do that

fierce harbor
storm flame
#

Ok ill give it a go

summer kiln
#

Hi, I was wondering how I could refer to a dropdown list's keys

#

I've managed to figure out how to use a dropdown + dynamic table, but I just want an "if then" using the custom dropdown to tidy up everything

formal goblet
summer kiln
rigid sapphire
#

How do I take a label and have it roll a certain die when clicked, with options prevented for blind, public etc?

vagrant hollow
formal goblet
#

Finally submitted... My time has come 😄

vagrant hollow
formal goblet
#

Yep, just took a while

vagrant hollow
formal goblet
#

Jetzt nur noch das Kolloquium 😅

vagrant hollow
floral crater
formal goblet
plush pewter
#

Does anyone know why my userInputTemplate isnt working?

#

I'm probably doing it very wrong, but Ive tried setting in different ways and it didnt work

fierce harbor
plush pewter
fierce harbor
#

Can't find anything about this, sorry

plush pewter
#

Thats okay

#

Do you atleast have any examples of how its used? like how do you use the component keys on the trigger message?

fierce harbor
plush pewter
#

Unfortunately no :/

#

?#{<brigatemplate>} didnt work also

fierce harbor
plush pewter
#

Nevermind i've done it the other way 😛

fierce harbor
plush pewter
#

This way

hazy saffron
#

In the Label Text field of a Label component, is it possible to iterate over the elements of a matrix returned by fetchFromDynamicTable in order to format the results?

Scenario: I have a dynamic table with 3 fields (A select checkbox, a Thing Title, a Thing Description). In another Label, I would like to display any Things that are selected (checkbox = true), but formatted like this:

Thing Title 1: Thing Description 1
Thing Title 2 Thing Description 2

I understand I could make the dynamic table have only 2 columns and combine the Title/Description with formatting into one, but I don't want to do that.

fierce harbor
hazy saffron
hazy saffron
fierce harbor
hazy saffron
#

nods I've done some macro work before so might need to look into that. I could get the matrix, pass it to a macro (I need to go back and see how to pass a parameter to a macro within a label text field), then get the formatted result back and display

fierce harbor
hazy saffron
#

Oh the passing parameters is shown on that page

#

I know it had changed formats so looks like it's back

#

Now I need to remember how to get the passed parameters in a script macro 🙂 Been a second

fierce harbor
hazy saffron
fierce harbor
# hazy saffron That's the part I seem to recall, I wasn't sure if I had to assign them to a loc...

You can use local vars, but it's not mandatory as far as I know.

As an example I took the Emergency Campaign Resolver from the FoundeyVTT macro page and substitute a passed argument for the local var targets :

//Rocks Fall, everyone dies.

const targets = []
game.user.targets.forEach(i => {
    const name = i.name;
    targets.push(name);
})

if (targets.length === 0) {targets = "no one, this time"}

const roll = await new Roll(`8d10+100`).roll();
console.log(this.roll)

const results_html = `<h2>Cave In!</h2>
The cave collapses from above, dealing <a class="inline-result"><i class="fas fa-dice-d20"></i>${roll.total}</a> damage to <strong>${targets}</strong>.`

ChatMessage.create({
    user: game.user._id,
    speaker: ChatMessage.getSpeaker({token: actor}),
    content: results_html
});
hazy saffron
#

And you passed the argument with the name 'targets' ?

#

That helps a lot, thank you!

fierce harbor
# hazy saffron And you passed the argument with the name 'targets' ?

Yes.
But that is the original code, below is the modified code:

//Rocks Fall, everyone dies.

const mytargets = []

if (targets.length === 0) {mytargets = "no one, this time"}
else
{
mytargets  = targets;
}

const roll = await new Roll(`8d10+100`).roll();
console.log(this.roll)

const results_html = `<h2>Cave In!</h2>
The cave collapses from above, dealing <a class="inline-result"><i class="fas fa-dice-d20"></i>${roll.total}</a> damage to <strong>${mytargets}</strong>.`

ChatMessage.create({
    user: game.user._id,
    speaker: ChatMessage.getSpeaker({token: actor}),
    content: results_html
});

Should work as a starting point.
Hope it helps.

hazy saffron
fierce harbor
hazy saffron
#

This is a great group for that!

fierce harbor
#

True, a lot of kind and helpful people!

hazy saffron
#

I'm getting an error when using the 'await' part of this from Script help when calling a macro from a Label Text field

%{return await game.macros.getName('FormatExtras').execute({extraNames: '${recalculate(fetchFromDynamicTable('extras_selection', 'extra_title', 'extra_is_selected', true))}$', extraDescriptions: '${recalculate(fetchFromDynamicTable('extras_selection', 'extra_desc', 'extra_is_selected', true))}$', extraCosts: ${recalculate(fetchFromDynamicTable('extras_selection', 'extra_cost', 'extra_is_selected', true))}$})}%

I'm passing 3 arguments (extraNames, extraDescriptions, extraCosts) with 2 being strings and 1 being a number

Error:

[Detected 1 package: system:custom-system-builder]```
#

Because of that, it only seems to work if the first row of the dynamic table is selected. If I select any other row (the filtering) it doesn't seem to pass the arguments right

#

Okay I think I see one issue, when passing a matrix returned from fetchFromDynamicTable, I shouldn't use the ' ' around that call right?

hazy saffron
#

or do I need something like extraNames[] = fetchFromDynamicTable....?

fierce harbor
#

You are basically selecting one row, so an array should not be necessary. I'm thinking about recalculate: is that necessary?

hazy saffron
#

Oh....maybe not?

hazy saffron
fierce harbor
#

And I'm not sure about true working, either. Might you try with 1? It is sometimes the case with checkboxes.

hazy saffron
#

Hmm, the 'true' seems to work on the first row selection at least

#

but I can try '1'

fierce harbor
hazy saffron
#

So the 'variable type' passed with execute() doesn't need to be cast? Just sent as a variable name?

hazy saffron
# fierce harbor Right.

One more potential issue: When passing multiple parameters are they separated by comma (,) or another delimiter? I'm using commas

#

The scripts help section doesn't specify

fierce harbor
hazy saffron
#

Oh apparently there's a second error:

    processFormulas https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/formulas/ComputablePhrase.js:166
    compute https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/formulas/ComputablePhrase.js:212
    computeMessage https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/formulas/ComputablePhrase.js:352
    _getElement https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/sheets/components/Label.js:191
    render https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/sheets/components/Component.js:246```
#

I wish I was a more knowledgeable coder, but I just get by hehe

#

Oh wait a second...

fierce harbor
#

That is a parenthesis-related issue: maybr some are not closed or there is one too many.
You can use on online code checker, just google for one 😉

hazy saffron
#

I may have my commas in the wrong place...which is correct?

execute({name: '${name}$'}, {name2: '${name2}$})

or

execute({name: '${name}$', name2: '${name2}$'})

#

I was comma separating INSIDE the {}'s and I'm thinking maybe each {} is comma separated

fierce harbor
hazy saffron
#

Sleep well and thanks again for your help!

formal goblet
fleet rampart
#

@formal goblet Heyy, available for vocal ?

storm flame
#

Hi so I'm trying to make it roll 'DamageDice'd20 off a dynamic table any advice on how to do it?

hazy saffron
foggy grotto
storm flame
foggy grotto
#

Ok happy to hear you found a work around.

hazy saffron
#

Returning to my issue with trying to call a macro from a Label Text field. I am not sure why I'm getting this error.

I have this in a Label Text Field, to call a Macro with the name FormatExtras:
%{return await game.macros.getName('FormatExtras').execute({extraNames: 'Extra Name', extraDescriptions: 'Extra Description', extraCosts: 10});}%

The macro literally only outputs the values to the console and returns the word "Done";

return "Done";```

The console outputs correctly but I get this error and nothing is displayed (i.e. the word "Done")

```SyntaxError: Failed data preparation for Item.jLZtEECAswkksjSV. await is only valid in async functions, async generators and modules
[Detected 1 package: system:custom-system-builder]
    processFormulas https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/formulas/ComputablePhrase.js:284
    computeStatic https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/formulas/ComputablePhrase.js:330
    computeMessageStatic https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/formulas/ComputablePhrase.js:371
    _prepareEntityData https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/documents/templateSystem.js:253
    prepareData https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/documents/templateSystem.js:133
    prepareDerivedData https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/documents/item.js:96```
storm flame
storm flame
#

There a way to hide the value a character rolled for initative?

foggy grotto
storm flame
#

keep the value just hide it from players

foggy grotto
storm flame
pliant leaf
#

how would i go about making a filter with the Item Piles module that targets specific item templates?

formal goblet
formal goblet
pliant leaf
#

I guess the better question is how would i filter out certain items from the Item Piles vault, because so far the only thing i figured out is filtering out "type" for "equippableItem" but that just filters out everything. I can't seem to figure out the attribute path for anything worthwhile that would be able to seperate the spells and stuff from the vault. Sorry for the noobish question i can't seem to find much information on the topic.

past ivy
#

Heya, how would I go about adding a (edit): javascript custom function (for complicated formulae and ease of alteration) to CSB so that I can just call the function on character sheets?

pliant leaf
#

nevermind i figured it out

scarlet skiff
pliant leaf
#

so for the filter i did system.template, and for the filters themselves i had to go into the F12 console and search for the template key/id which for my system i wanted to filter out a few things. There is probably an easier way to do this but it works for now.

harsh obsidian
#

Hi! is there a system with this program to create a career that contains within it weapons, potions, specialization objects, etc.? I would then like to import the career into the character sheet and populate all the fields. can you help me?

wet heron
#

Hey there!
I'm trying to create a simple sheet, but my coding is bare to none, can anyone help?

Here's the code

${
If (Agility_points <=0
{
Agility_points -5;
}
Else if (Agility_points <0 && Agility_points <11
{
Agility_points;
}}$

#

I have this code in label text

formal goblet
wet heron
#

Thank-you! I'll take a look!

scarlet skiff
hazy saffron
#

is the await necessary in the Script call? Or could I remove it there and just create a function in the Script that is async? Or would I get the same error or would it not update on time for use in the label display?

formal goblet
hazy saffron
# formal goblet await is necessary if you need the result of the macro. And no, you cannot just ...

Thanks! Now I just need to figure out why I'm getting this error.

This is my script call

%{return await game.macros.getName('FormatDrawbacks').execute({extraNames: ${fetchFromDynamicTable('extras_selection', 'extra_title', 'extra_is_selected', true)}$, extraDescriptions: ${fetchFromDynamicTable('extras_selection', 'extra_desc', 'extra_is_selected', true)}$, extraCosts: ${fetchFromDynamicTable('extras_selection', 'extra_cost', 'extra_is_selected', true)}$});}%

I'm trying to pass 3 fetchFromDynamicTable matrices to the Script (it will pass values (2 strings matrices and a number matrix) based on whether a row is 'checked' (extra_is_selected). However even with a macro that only has return "Done"; in it, I get this error:

#

I get the error even when the fetchFromDynamicTable returns nothing (nothing is checked) but when I check a row I get this error:

    processFormulas https://assets.forge-vtt.com/bazaar/systems/custom-system-builder/3.0.0/module/formulas/ComputablePhrase.js:166```
#

Maybe it's something with the Type Matrix that fetchFromDynamicTable returns and passing that as an argument?

formal goblet
hazy saffron
formal goblet
hazy saffron
formal goblet
#

You can pass entity to the macro and see what it contains. What you usually want is entity.system.props.dynamicTableKey

hazy saffron
#

That's what I was thinking. I'll check the item paths and see. I'll try it both ways and see what works best. Thank y ou again!

hallow ginkgo
#

Folks, does anyone know how I could set a dynamic table to have labels who shows the position of the row?
I mean, I wanted the first row to have a label "1.", but if I lower the row, the label changes do "2."

summer kiln
#

Does anyone know the fix for this?
I deleted an item that was still in an inventory and now this error appears whenever I try to update all actors and also prevents me from adding a new item to the inventory.

It seems I can fix it by deleting the actor entirely but that's really tedious especially if I have to restat an actor

wet heron
#

is there a way to get tables in tables to be direct below eachother?

atm there's a big gap..

hazy saffron
wet heron
#

btw love the freedom this gives me 🙂

hazy saffron
hazy saffron
wet heron
#

almost, but i hink ill solve it with Panel in panel

hallow ginkgo
hazy saffron
hallow ginkgo
#

Is there a sameColumn argument?

hazy saffron
#

That brings up an interesting question: Does fetchFromDynamicTable automatically only return those things that haven't been deleted?

hallow ginkgo
hazy saffron
fleet rampart
#

Hey, anyone able to vocal ? i have a few comprehention problems : creating items sheet ( making it non modifiable, good looking and linked to the class ) , token and map sizes ( a chair is like 1m large and the character very small and can't center it on those), and character sheet design.

vagrant hollow
summer kiln
#

That is kinda cursed, but thank you

vagrant hollow
summer kiln
#

Makes sense

hardy smelt
#

Hi, just wondering, is there a way to sort the contents of an Item Container?

#

Or to manually re-arange them?

hazy saffron
unborn ice
#

Is this the best system to use for MCDM's playtest? I just want some quick and dirty stats, roll some damage, click to show abilities and so forth. I don't need anything automated

scarlet skiff
west wyvern
#

Is there a way to remove initiative rolls? I am trying to use a fixed value to determine who goes first.

fierce harbor
west wyvern
fierce harbor
west wyvern
wet heron
formal goblet
wet heron
#

Will look into it, that would only mean about 10 instead

wet heron
#

dont think it will work, se sheet has a lot of skills, and every skill har three components, one name(also th rull button), a "points" that is editable, and then the mod, that reads the Point field and change depending on the value

#

instead of reading the component key, can it read "field Left"?

formal goblet
wet heron
#

intresing, ill look into it, thanks!

fleet rampart
#

Hey, anyone available to vocal ? i have a few comprehention problems :
Creating items sheet ( making it non modifiable, good looking and linked to the classes of the characters ),
token and map sizes ( a chair is like 1m large and the character very small and can't center it on those) and character sheet design.

wet heron
# formal goblet It can reference components of the same row with `sameRow()`

I dont get the SameRow, every row has a "skill"_points

Can i somehow make is as below code? so instsad of changing everyone, in can check same row and if Key has "pionts" in the key, it get h´the value'
${ sameRow(points) <= 0 ? sameRow(points) -5:
sameRow(points)> 0 and sameRow(points)<11 ? sameRow(points): 0}$

scarlet onyx
#

Hi, maybe someone can help me with this issue, I've tried a lot of versions now but I can't get max() to work when fetching values from a dynamic table (in the label of a an item container).

In the image the first 3 'lines' show that the components work individually, (fetching the two variables and the max function) , but in the last line when I combine it I get an error (see right pane) .

Can someone tell me what I'm doing wrong here?
Thanks.

turbid sphinx
#

~~Hello, I want to calculate Total Armor based on a dynamic table.

I have the total with sum(fetchFromDynamicTable('table_defense', 'armor'))

Now I added a checkbox "active" to "table_defense" and I want to sum "armor" only if "active" is checked. Is it possible ? 🙂
~~
Solved : ${ sum( dotMultiply( fetchFromDynamicTable('table_defense', 'active'), fetchFromDynamicTable('table_defense', 'armor') ) ) }$

young lodge
#

Guys, im new to custom system builder, just want to ask where i should be making dynamic table so it would work with dropdown list options...? Because i tried that inside character template itself, then also tried creating item template for that, i dont get it

formal goblet
wet heron
#

mornin'

i have run into some issues again,
i know below is not as it should, but i cant seem to understand how to make it work.
if sameRow('points') = > 5 then is should display 6

${
sameRow('points') <= 0 ? sameRow('points') -5:
sameRow('points') > 0 and sameRow('points') <6 ? sameRow('points') : 0:
sameRow('points') > 5 and sameRow('points') <9 ? sameRow('points') : 6:
}$

#

the whole code i want to use is

${
Sprak_1_points <= 0 ? Sprak_1_points -5:
Sprak_1_points > 0 and Sprak_1_points <6 ? Sprak_1_points : 0:
Sprak_1_points > 5 and Sprak_1_points <9 ? :6:
Sprak_1_points > 8 and Sprak_1_points <11 ? :7:
Sprak_1_points > 10 and Sprak_1_points <13 ? :8:
Sprak_1_points > 12 and Sprak_1_points <15 ?: 9:
Sprak_1_points > 12 and Sprak_1_points <18 ? :10:
Sprak_1_points > 14 and Sprak_1_points <21 ? :11:
Sprak_1_points > 17 and Sprak_1_points <24 ? :12:
Sprak_1_points > 23 and Sprak_1_points <27 ? :13:
Sprak_1_points > 26 and Sprak_1_points <30 ? :14:
Sprak_1_points > 29 and Sprak_1_points <40 ? :16:
Sprak_1_points > 39 and Sprak_1_points <50 ? :17:
Sprak_1_points > 49 and Sprak_1_points <60 ? :18:
Sprak_1_points > 59 and Sprak_1_points <80 ? :19:
Sprak_1_points = 100 ? :20:
}$

sameRow() would fix, but if i try it with just one row, it seem to use some other variable

formal goblet
# wet heron mornin' i have run into some issues again, i know below is not as it should, b...

Don't forget to use braces around conditionals when using logical operators. And you also have to strictly follow the syntax with ternary-operators <conditional> ? <truthy-statement> : <falsy-statement>

What you want:
${sameRow(points') <= 0 ? sameRow('points') -5 : (sameRow('points') > 0 and sameRow('points') < 6) ? 0 : (sameRow('points') > 5 and sameRow('points') < 9) ? 6 : ...}$

wet heron
#

so if i understand this should work

${sameRow('points') <= 0 ? sameRow('points') -5 :
(sameRow('points') > 0 and sameRow('points') < 6) ? 0 :
(sameRow('points') > 5 and sameRow('points') < 9) ? 6 :
(sameRow('points') > 8 and sameRow('points') <11) ? 7:
(sameRow('points') > 10 and sameRow('points') <13) ? 8:
(sameRow('points') > 12 and sameRow('points') <15) ? 9:
(sameRow('points') > 14 and sameRow('points') <18) ? 10:
(sameRow('points') > 17 and sameRow('points') <21) ? 11:
(sameRow('points') > 20 and sameRow('points') <24) ? 12:
(sameRow('points') > 23 and sameRow('points') <27) ? 13:
(sameRow('points') > 26 and sameRow('points') <30) ? 14:
(sameRow('points') > 29 and sameRow('points') <40) ? 16:
(sameRow('points') > 39 and sameRow('points') <50) ? 17:
(sameRow('points') > 49 and sameRow('points') <60) ? 18:
(sameRow('points') > 59 and sameRow('points') <80) ? 19:
(sameRow('points') = 100) ? 20
}$

#

all i get is error

formal goblet
wet heron
#

Like so? (sameRow('points') = 100) ? 20

formal goblet
#

And you have to use double-equals for comparison

wet heron
#

${sameRow('points') <= 0 ? sameRow('points') -5 :
(sameRow('points') > 0 and sameRow('points') < 6) ? 0 :
(sameRow('points') > 5 and sameRow('points') < 9) ? 6 :
(sameRow('points') > 8 and sameRow('points') <11) ? 7:
(sameRow('points') > 10 and sameRow('points') <13) ? 8:
(sameRow('points') > 12 and sameRow('points') <15) ? 9:
(sameRow('points') > 14 and sameRow('points') <18) ? 10:
(sameRow('points') > 17 and sameRow('points') <21) ? 11:
(sameRow('points') > 20 and sameRow('points') <24) ? 12:
(sameRow('points') > 23 and sameRow('points') <27) ? 13:
(sameRow('points') > 26 and sameRow('points') <30) ? 14:
(sameRow('points') > 29 and sameRow('points') <40) ? 16:
(sameRow('points') > 39 and sameRow('points') <50) ? 17:
(sameRow('points') > 49 and sameRow('points') <60) ? 18:
(sameRow('points') > 59 and sameRow('points') <80) ? 19:
(sameRow('points') >= 100) ? 20
}$

formal goblet
# wet heron I follow the == but I don't understand ternary
freeCodeCamp.org

There are many operators in JavaScript, one of which is the ternary operator. In this article, I'll explain what this operator is, and how it can be useful when building applications. I have a video version of this topic [https://youtu.be/MmwtZ0AwN9A] you can check out as well to supplement your learning.

turbid sphinx
#

"?19:20"

wet heron
#

Oh I do not have the brain to understand this..

scarlet onyx
wet heron
wet heron
#

Closest I get it this...
${sameRow('points') <= 0 ? sameRow('points') -5 :
(sameRow('points') > 0 ? 0 :
(sameRow('points') > 5 ? 6 :
(sameRow('points') > 8 ? 7:
(sameRow('points') > 10 ? 8:
(sameRow('points') > 12 ? 9:
(sameRow('points') > 14 ? 10:
(sameRow('points') > 17 ? 11:
(sameRow('points') > 20 ? 12:
(sameRow('points') > 23 ? 13:
(sameRow('points') > 26 ? 14:
(sameRow('points') > 29 ? 16:
(sameRow('points') > 39 ? 17:
(sameRow('points') > 49 ? 18:
(sameRow('points') > 59 ? 19:
(sameRow('points') >= 100) ? 20:
}$

formal goblet
static cargo
#

I'm afraid I don't know that one Jerzy, but I also have a question. Probably super easy too.

Label Icons come from a web service, right? How do I select/use this?

#

Right, tyvm Jerzy. GL... 🙂

#

Some of those are "Pro", If I subscribe to fontawesome, is it hard to educate foundry that I can use it?

young lodge
#

Guys is there any like recent custom system tutorial videos? Because those i had found were for previous versions (sorry for poor english im not a native speaker)

static cargo
#

Ah... another visual-learner! Nice to meet you. I'd make some myself when I know enough to be useful, but my web-camera keeps breaking trying to film my face. 🙂

#

(( Sabrecho is watching this one for an answer too. ))

young lodge
#

The github documentation is kinda straight to the point and where i dont have knowledge on CSS (or how its called) its really confusing

static cargo
#

The YouTuber 'Web Dev Simplified' has this tutorial about css if you like... https://youtu.be/1PnVor36_40?si=x2erIANyG7qLxA_T

🚨 IMPORTANT:

Learn CSS Today Course: https://courses.webdevsimplified.com/learn-css-today?utm_medium=video-description-no-mention&utm_source=youtube&utm_campaign=css-20-minutes

In this video we will cover everything you need to know to get up and running with CSS in only 20 minutes. We will cover CSS syntax, how to add CSS to your HTML, CSS co...

▶ Play video
#

Before I sign up for FontAwesome so I can use even more icons, is there something I need to do to verify it in CSB/Foundry?

faint wharf
fleet rampart
wet heron
#

thankyou for your time

foggy grotto
#

Question. I know there is a fetch from dynamic table command to grab columns. Is there a similar one for items?

faint wharf
#

Did nayone color not field but a background for item?

wet heron
#

i need help again, in a label, in label roll, why doesit not roll ?
${[1d20]}$

#

i just get a error

foggy grotto
#

[[1d20]] use if not variables.

wet heron
#

the roll will be 1d20+ agility_mod

#

but when i ad that, nothing happends

#

no msg

foggy grotto
#

Put : on either side of agility_mod

fierce harbor
wet heron
#

no error or enything

#

do i need dice so nice for it to work?

fierce harbor
fierce harbor
wet heron
#

im not th one running the server, but ill check

#

hmm can it be with something that server is running foundry v.11?

fierce harbor
wet heron
#

[[1d20]] works, ${[1d20]}$ does not

#

i know it worked before the migration, so i think that could be the issue

fierce harbor
foggy grotto
wet heron
wet heron
#

did not work

foggy grotto
#

Strange. Not at computer so don't have my notes.

wet heron
#

the intesing thing is that it does not say anything, im requesting the console log

formal goblet
fierce harbor
wet heron
#

No error, but no roll

formal goblet
wet heron
#

Uncaught (in promise) Error: Unresolved StringTerm [1d20] requested for evaluation
at StringTerm.evaluate (foundry.js:12750:11)
at Roll._evaluate (foundry.js:10286:42)
at Roll.evaluate (foundry.js:10250:25)
at Formula.evaluateRoll (Formula.js:945:24)
at async Formula.compute (Formula.js:420:30)
at async processFormulas (ComputablePhrase.js:139:21)
at async ComputablePhrase.compute (ComputablePhrase.js:212:34)
at async HTMLAnchorElement.<anonymous> (Label.js:271:21)

elder turret
#

When you do ${}$ you only use a single "[]" not a double.

formal goblet
#

Yep. It means that the Roll Formula you provided couldn't be resolved (probably wrong syntax)

fierce harbor
elder turret
#

${[1d20+:agility_mod:]}$

#

There was an extra ) at the end

foggy grotto
elder turret
#

and put spaces in it

elder turret
#

${[1d20 + :agility_mod:]}$

formal goblet
#

agility_mod does not exist

#

That's what the console tells you

wet heron
#

Agility_mod is fixed, but simmilar isue

formal goblet
#

This error is not related to CSB

wet heron
#

Welp

wet heron
#

for me this is greek

#

or possibly Islandic

#

CSB is running 3.0.0 and FVTT is v11 if it matters

wet heron
spark lotus
#

Is there function in CSB that will identify the highest value rolled in a pool of dice (or a simple way to do this)? I'm creating a character sheet for a game where the degree of success is determined by the highest value rolled on a pool of six-sided dice. The roll part was easy enough (<p>${[:hg_str_val:d6]}$<p>) where hg_str_val is the character's strength attribute which determines the number of six-sided rolled. I tried the max function but it returned the sum of all the dice rolled.

stiff forge
#

In Foundry VTT you are looking at something like "4d6kh1", which rolls 4 six-sided dice and displays the highest...I would think that syntax ("kh1") would work there as well?

#

Since I'm here...has anyone come up with any workaround to hide a formula value in a Label message? I know the "#" trick only works with chat messages, but was hoping someone might have figured out a way to do that in Labels.

spark lotus
spark lotus
#

I'm not a coder and could use help cleaning up the following. I'm trying to get the degree of success to display based on the highest value rolled in a dice pool of six-sided dice. I'm messing something up in my conditions statement. <p>${roll:=[:hg_str_val:d6kh1]}$<p>
${roll >= 5 ? 'SUCCESS WITH NO COMPLICATIONS!': roll = 4 ? 'SUCCESS WITH COMPLICATION': roll = 3 ? 'SUCCESS WITH COMPLICATION': roll <=2 ? 'FAILURE WITH COMPLICATION!'}$ </p>

formal goblet
spark lotus
#

Can a table with multiple checkboxes be displayed in a container? I have an item template I created and it includes a table (named "tags_table") consisting of multiple checkboxes that describe optional functions/tags that can be added to the item. I created a label in the container and used ${item.tags_table}$ in the label prefix but no checkboxes show up.

fierce harbor
formal goblet
spark lotus
#

Thanks!

wet heron
#

Is it possible to replace information in lables with a macro?

Or even better, can I somehow import information from an excel/file?

vagrant hollow
#

Can items be deleted from a sheet by macro?
Thinking of a system that cleans up herbs that run of usability.

vagrant hollow
formal goblet
vagrant hollow
formal goblet
fierce harbor
formal goblet
#

I haven't even worked with React or the Foundry-API in a more in-depth manner as I should probably do when I want to continue to work on this project (at least experienced with Angular and Spring Boot). All I did so far was more or less plain Javascript 😅

vagrant hollow
vagrant hollow
formal goblet
#

Ah right, I made a bunch of new documentations, but I wouldn't say that I'm a pro in JS. I started with JS literally just a year ago

fierce harbor
hazy saffron
#

I have a question about using a Macro script inside a label text message. The script returns a string which contains some sheet values like this ${variable}$. Is there a way to have those values evaluate to their sheet values before displaying as part of the label text message? Right now it's just displaying the code ${variable}$ instead of the value of the variable.

fierce harbor
hazy saffron
# fierce harbor Could you post your code, please?

Sure (I think this is what you want)

Label Text
%{return await game.macros.getName('FormatPowerSelections').execute({tableSelection: entity.system.props.extras_selection, tableType: 'extra', tableDisplay: 'chat', tableFilter: 'selected'});}%

There is a macro that creates a string output, which has things like this that are returned in that string:

Gain +${(rank)*2}$ Physical Bashing / Lethal / Aggravated soak

My goal is that when that string is displayed as part of the label text (from the macro) that instead of showing ${(rank)*2}$ on the sheet, it actually computes that based upon the value of "rank"

I create the string just using regular string concatenation

hazy saffron
formal goblet
hazy saffron
# formal goblet It's `recalculate('<scriptPart>')`

Great! so I should have this as my label text?

recalculate(return await game.macros.getName('FormatPowerSelections').execute({tableSelection: entity.system.props.extras_selection, tableType: 'extra', tableDisplay: 'chat', tableFilter: 'selected'});)

formal goblet
#

${recalculate('%{...}%')}$

hazy saffron
#

Oops yeah just forgot to copy paste those 🙂

#

Thank you

hazy saffron
# formal goblet `${recalculate('%{...}%')}$`

Not sure if this is right, but it only worked if I removed the single quotes from around the %{ }%, otherwise it was putting in two of them (one from the returned string and one in the code above). Is that correct?

#

But otherwise it worked perfectly!

formal goblet
hazy saffron
#

It appears to return it as a string from the macro in my case. Thank you gain!

hazy saffron
dusky mauve
prisma grove
#

How can I change the background of a actor sheet using CSS with a custom image? Like it should only be

.custom-system-actor-content { display: flex; flex-direction: column; padding: 8px; overflow: scroll; height: 100%; background-image: url (example/here.jpeg); }

Correct?

#

Cuz I change the color of the whole thing. Make it a gradient and all that... but it wont find any image I place in the url 😦

coral hemlock
prisma grove
#

yeah I just put the example there, but I've put the whole path in and even moved the paths into core foundry folders to see if it would work

#

But it just keeps ssaying 404 not found

#

in the errors

coral hemlock
#

Also don't forget the "

prisma grove
#

Ive done that as well

#

and ' ' just out of curiousity

#

done alot of testing. but it always returns 404

#

😦

coral hemlock
#

Do you have a space between url and (

#

It should not have one

prisma grove
#

Done it with and without

#

Im wondering if its a Module issue since I have to use Custom CSS in order to edit the css...

coral hemlock
#

I use custom CSS module, mine works correctly.
background-image: url("path/path/image.jpg");
With no issue

#

I just tested your code

#

.custom-system-actor-content {
display: flex;
flex-direction: column;
padding: 8px;
overflow: scroll;
height: 100%;
background-image: url("images/folder/image.jpg");
}

#

worked fine on mine

prisma grove
#

Not sure whats happening but I'll be sure to update ya if I can fix what ever the issue is.

bitter compass
#

Hi,
I have a problem with passing value calculated in other label to my macro js script. I would really appreciate some help.
When I try to simply use calculated value in simple label formula, it works, simple example in my label:
${[:count_tags:d6]}$

Its rolling fine, it takes value from count_tags properly (3 right now) and roll 3d6, so caclucation its correct. But I want to use external js script to complicate roll logic a bit more. Right now, I try to invoke my js script inside different label and pass as argument value of count_tags, but it returns undefined value.

How I try:
%{ return await game.macros.getName('test1').execute({count_tags: '${count_tags}$'})}%

This is my test1 js script. It will be doing some more specific things, but now it only contains console log 'cause I want to check if passing value works:

function PotentialRoll(use_value) { console.log("be be " + use_value); } PotentialRoll();


result from console:
3foundry.js:5744 Foundry VTT | Rendering CustomDialog VM2162:5 be be undefined commons.js:8802 Foundry VTT | Created ChatMessage with id [nKustLTOXrv0d6Km]

result in foundry:

formal goblet
bitter compass
# formal goblet I don't see in your macro that you access `count_tags`.

I am trying to simple use console log for now, to access value:

function PotentialRoll(use_value) { console.log("be be " + use_value); } PotentialRoll();

and checking in console if vale is as expected.

I have more complex script that got additional logic inside, that I want to reuse with custom builder. Now its working on popups with html templates and roll messege, user needs to specify all inputs each time it want to roll, and I want to just pass values from character sheet.

So right now I would appreciate any example that will pass value inside JS, I am not sure if I am doing it right. This is some parts from my JS code, that I am trying to change. You can see that I am trying use values in my logic also got some errors and undefined values:

formal goblet
hazy saffron
#

EDIT: Partially Solved (For my case but not the general case)
Is there a way to use fetchFromDynamicTable to return items that 'partially' match a string? For instance, a table that has:

  Craft (Arts)        20
  Craft (Engineer)    10```

And do fetchFromDynamicTable('skillTable', 'skill_value', 'skill_name', 'craft') ?

It seems all the operators available are for numerics.

My Solution: I was able to us  fetchFromDynamicTable(...).toString().includes("partial match text")
zinc verge
#

any news on progress for the next update or are we still in "indefinitely months away"

not to be rude. I get that the dev's got things going on. Just haven't been active in here in a while so I'm not up to date with things

formal goblet
hazy saffron
turbid sphinx
#

I want to show an item description in the chat.

I have a simple Item Sheet (+ its template), with just a rich area text (component key "description").

On the Actor Sheet I have an item container with this item + a label (dice icon). My label roll message is: "${sameRow('item.description')}$". But it doesn't work.

formal goblet
formal goblet
turbid sphinx
formal goblet
turbid sphinx
#

lol was simple. Thx

hazy saffron
formal goblet
hazy saffron
#

Oh I see also that label roll messages can run async macros!

hazy saffron
formal goblet
#

Label Roll Messages are always async, so yeah

hazy saffron
#

Okay that may solve my problem then! Thank you as always!

turbid sphinx
hazy saffron
#

In Custom System Builder, is there a command or code for chat output / roll messages that can be added to the expression to allow the user to 'click to expand' a portion of it?

vagrant hollow
fierce harbor
vagrant hollow
fierce harbor
vagrant hollow
vagrant hollow
#

No, "item".

fierce harbor
vagrant hollow
fierce harbor
turbid sphinx
#

How to concatenate variable and string like this
${ item.use_charge ? setPropertyInEntity('item', 'charge', "item.charge - 1") + " / " + item.charge_max : "unlimited" }$
Example of result in the chat I want: "1/2"

#

Or to make this in a single row

hazy saffron
storm flame
#

So I'm trying to check if equipped = 0 say it is already unequipped and if equipped not = 0 set it to 0
${[:Equipped:] == 0 ? 'Already unequipped': setPropertyInEntity('Equipped' = 0)}$
I cant seem to really grasph how to do so

turbid sphinx
lyric swan
#

Just put you containers in this line :
const containerSelectors = ['.base_action_container', '.base_action_container2', '.base_action_container3'];

#

I did some CSS enhancement with my containers so this could mess up with your CSS, you may need to set something up so it looks pretty

foggy grotto
#

Is there a link/site I can learn the basics of css to improve the appearance of my sheets? Seeing what others have done I am hyped.

hazy saffron
#

Is there an easy way to do that? Either in defining the original value of the key or some code that gets run when an item modifier changes a key?

turbid sphinx
#

Here is the script with my container name. On a new Actor, items (<tr>) are in the table before I do the first drag and drop

weary nymph
#

Hello, new to CSB. I'm unable to get item values to list (or sum) in my item container. I think I'm setting them up wrong. I'd like items and their weights listed in the container and then give a total of all item weights. Is there tutorial somewhere? Seems this is basic, but I can't figure out where I'm going wrong.

dusky mauve
#

Does SubTemplate can use variables from parent template? Or how we can pass form parent to child?

lyric swan
turbid sphinx
#

I installed World Scripter and did this

turbid sphinx
brave bronze
#

is there a way to do slot based encumberance in CSB?

hardy estuary
#

hey so I needed to make a character sheet within foundry

#

how would I go about starting that?

#

its for the Naruto 5e system

foggy grotto
hardy estuary
#

was there?

#

I wasn't able to find it

#

maybe I missed it

foggy grotto
#

I had come across it like a year ago. I don't remember where

hardy estuary
#

I'll try to find it ^^ though if you find it please let me know!

#

I'm not seeing anything on it? Unless its called something far different xD

#

honestly I just want to be able to make a character sheet, if I can do that is good enough ^^

foggy grotto
hardy estuary
#

now to learn how to import it xD

storm flame
#

${setPropertyInEntity('self', 'Equipped', '0')}$
${Equipped := 0}$
So I've been trying to get equipped to change to 0 and I'm not really sure what I'm doing wrong with it

quasi plume
storm flame
quasi plume
#

Are you changing a label, initiative formula or an attribute bar?

storm flame
lyric swan
quasi plume
lyric swan
turbid sphinx
lyric swan
#

Oh I see, as I said the script was made to match my CSS. I use a ''grid'' instead of a ''list'', and I didn't need the columns. You can tweak the CSS to align your data with columns tho

turbid sphinx
lyric swan
#

Oh nice ! Good job

#

Si everything is showing up as expected ?

turbid sphinx
#

Yes now it's in the <table> and I can reorder

dusky mauve
lethal flax
#

so here's a question regarding inititive. I'm trying to make it so that the system, when rolling initiative in combat to use a formula consisting of the 1d6 + two modifiers from the sheet. One (brawnsmod) works just find but i'm not sure what to do with stand speed (from a dropdown only applicable when a checkmark is checked). So far, the best way i see is using a hidden attribute whose value is based on a dropdown option selected.

vagrant hollow
#

@lyric swan @turbid sphinx
I implemented your solution in my world and it works like a charm.
Thank you very, very much for this. 😍

One Question:
I have several containers with the same filter but on different pages of the sheet and some containers for one item type, but with different filters. Is it possible that some of the containers can use the same sorting?

lyric swan
formal goblet
formal goblet
formal goblet
vagrant hollow
lethal flax
formal goblet
lethal flax
#

cause this text is meant for a hidden attribute.

formal goblet
#

You can test the code in a normal Label text beforehand

#

Practically the same result

lethal flax
#

${stand_checkbox ? concat( switchCase(speeddropdown, 'standspeed_a','5','standspeed_b','3','standspeed_c','1','standspeed_d','-3','standspeed_e','-5')):'0'}$ something like this?

formal goblet
#

And you can keep the numbers as non-strings

lethal flax
formal goblet
lethal flax
formal goblet
#

Yep

lethal flax
#

okay got it to work

summer kiln
#

I have this code that applies a value to a dynamic table based on a dropdown, then reduces the corresponding stat. This technically functions and works as is

${#setPropertyInEntity('self',getRefFromDynamicTable('status_table','status_number','status_effects',status_effect_list),status_potency)}$

${#shield_drop:=fetchFromDynamicTable('status_table','status_number','status_effects','Shattered Shields')}$

${#setPropertyInEntity('self','shield','base_shield <= 0 ? 0 : base_shield-shield_drop')}$

${#armor_drop:=fetchFromDynamicTable('status_table','status_number','status_effects','Corroded Armor')}$

${#setPropertyInEntity('self','armor','base_armor <= 0 ? 0 : base_armor-armor_drop')}$

${#speed_drop:=fetchFromDynamicTable('status_table','status_number','status_effects','Paralysis')}$

${#setPropertyInEntity('self','speed','base_speed <= 0 ? 0 : base_speed-speed_drop')}$```

And then on a new turn I have a button that reduces the duration of status effects and if it's 0, it should reset any effected stats. However it bugs and always resets things even is the duration is not 0

``` Lingering Status Duration: 
${setPropertyInEntity('self','status_duration','status_duration <= 0 ? 0 : status_duration - 1')}$

${#status_duration = 0 : setPropertyInEntity('self',getRefFromDynamicTable('status_table','status_number','status_effects',status_effect_list), 0)}$

${#status_duration == 0 : setPropertyInEntity('self','shield','base_shield')}$

${#status_duration == 0 : setPropertyInEntity('self','armor','base_armor')}$

${#status_duration == 0 : setPropertyInEntity('self','speed','base_speed')}$```

Not sure if something is wrong with the second set of code