#Custom System Builder

1 messages · Page 44 of 1

fringe silo
#

spdrankmodpc

formal goblet
#

And that is 1?

fringe silo
#

yes

formal goblet
#

What about ${[:spdscorepc + spdrankmodpc:d12cs>=9]}$

fringe silo
#

that was it thank you very much

fringe silo
#

im having a rough time fiureing out how to do the following the roll for a skill. If a skill is trained then the target number is reduced by one( training is is recorderd with a chk box, but if the skill is not trained it uses the basic stat roll. This is the expression i have but its not working i feel as if im not to far off but i can find what im missing. ${[:unarmedchkpc:,1,:spdscorepc + spdrankmodpc:d12cs>=8,0,[:spdscorepc + spdrankmodpc:d12cs>=9]}$ . :unarmedchkpc is a chk box, and the others are values im useing for the rolls

fringe silo
#

${unarmedchkpc ? [:spdscorepc + spdrankmodpc:d12cs>=8] : [:spdscorepc + spdrankmodpc:d12cs>=9]}$ this is what ive worked out to but is rolling 6 d12 instead of 3 dice like the value od spdscorepc=3 and spdrankmodpc=0

#

the chk box seems to work for the target number change

#

no matter what i set my dice amount to it rolls is double if its set to a dies pool of 3 i get 6 rolled if set to 1 i get 2 dice instead.

formal goblet
hazy moon
#

Hi everyone, I would like some help on a matter. The point being:

  • The system is xd10
  • And a '1' substract a success
  • I'm using the table martin did in his example to show the roll in the tchat
  • And I would like it to show "critical success' If they are more '10' than '1'; and 'critical failure' if they are more '1' than '10'
    thanks in advance guys 😄
hazy moon
#

thx I will look into that

hazy moon
#

I made this :
<table>
<tr>
<td>Roll</td>
<td>Force: ${[:totalf:d10sx10cs>=6df1]}$</td>
</tr>
<tr>
<td><strong> Critical Successes:</strong></td>
<td>${Critical_Successes:= [:totalf:d10sx10cs=10]}$</td>
</tr>
<tr>
<td><strong>Critical Failures: </strong></td>
<td>${Critical_Failures:= [:totalf:d10sx10cs=1]}$</td>
</tr>
<tr>
<td><strong>Result</strong></td>
<td><strong>${Critical_Successes - Critical_Failures}$</strong></td>
</tr>
</table>

#

but this roll me 3 time instead of once and then digress

formal goblet
hazy moon
#

so I need to supp them?

formal goblet
#

The only viable solution is a script

#

You simply don't have the tools in normal Formulas

hazy moon
#

hmm

#

I never used script

formal goblet
hazy moon
#

okkey and where do I put the script

formal goblet
hazy moon
#

okkey thx a lot I will try that

static cargo
hazy moon
#

okkey thanks!

static cargo
#

🫸🫷

formal goblet
#

Well, in this case they won't really be able to help, because you need quite a lot from the CSB-API

static cargo
#

Every house needs a foundation though, right @formal goblet ?

#

I mean, if Necro needs to make a script and doesn't even know how to declare a variable... I'm just sayin'...

hazy moon
#

don't fight for me I'm sure I need the help of both of u ♥️

hazy moon
formal goblet
#

Your users should only trigger the Label with the Script

#

The other Label just acts as a Template

hazy moon
#

so If I want to set a this script for each statistic I need a lot of shadow template?

formal goblet
hazy moon
#

same roll but not the same number of dice

#

then I must do a dropdown or a lot of script?

formal goblet
manic crypt
#

I'm having a problem where this is no longer throwing an error in the console, but it's not doing anything either, am I missing something? The intent is to have a clickable checkbox (similar to in _example) that also does a check if there are any other items readied. It works to uncheck the box in the "this item is readied" instance, but it doesn't in either of the other two instances (no items readied, other item readied)

context in comments.

    ? setPropertyInEntity('item', 'Readied', "false")     //if readied, then intent is to unready, so set item.Readied to false
    : equalText(                                           //not readied, check the rest of the item container to see if any other items are readied. the checkbox in the item container is a pain,
            first(                                        //so using equalText(first(lookup())) as a form of text-based and() statement; armorhidReady is a text-output of item.Readied used for a formula elsewhere
                lookup(
                    'Armor', 
                    'armorhidReady', 
                    'armorhidReady', 
                    'true'
                    ),
                    'false'),                             //if no instances of 'true' in lookup(), first() returns 'false'
            "true")                                     //equalText() output T/F if the first(lookup()) returned true
        ? notify('error', 'You may only ready one armor') // if true, then "You may only ready one armor
        : setPropertyInEntity('item', 'Readied', "item.Readied ? 'false' : 'true'")}$ //if false, toggle selected armor to readied.```
#

in CSB proper I removed the tabbing, I just expanded it for debugging.

formal goblet
formal goblet
#

Try to log variables and verify each step. You can use the function consoleLog() for that

storm stream
#

I'm having trouble making a label button that rolls the dice + bonus fields from an Item

#

in an Item displayer

#

${'damage_bonus' + ['damage_die']}$

#

i have no idea how to do this

#

So my item has a dropdown with a list of die sizes and a number field for a bonus

#

an attack is damage die + bonuses

#

so when I add a weapon item to the item displayer, i want to create a label button that rolls that attack and displays it in an image

#

I am failing at setting up this formula

manic crypt
#

I made that based on the same sort of popup from _example; the code for that is this:

?{stat:'Attribute for roll '|STRMod,"STR"|DEXMod,"DEX"|CONMod,"CON"|INTMod,"INT"|WISMod,"WIS"|CHAMod,"CHA"},
?{modifier:'Skill Roll Modifier'[number]|0},
?{difficulty:'Difficulty of Check?'|6|8|10|12|14}
)}$
<table>
<tr>
<th>${!sameRow('Name')}$ Roll</th>
</tr>

<tr>
<td>Roll</td>
<td style="text-align: center; vertical-align: middle;">${roll:=[2d6]}$
</tr>

<tr>
<td><strong>Target:</td>
<td style="text-align: center; vertical-align: middle;"> ${!difficulty}$</td>
</tr>

<tr>
<td>Dice Mod:</td>
<td style="text-align: center; vertical-align: middle;">${!modifier}$</td>
</tr>

<tr>
<td>Stat Modifier:</td>
<td style="text-align: center; vertical-align: middle;">${!stat}$</td>
</tr>

<tr>
<td>Skill Rank:</td>
<td style="text-align: center; vertical-align: middle;">${!rank:=sameRow('Rank')}$</td>
</tr>

<tr>
<td><strong>Result</strong></td>
<td style="text-align: center; vertical-align: middle;"><strong>${result:= roll + modifier + stat +rank}$</strong></td>
</tr>

<tr>
<td><strong>${!roll == 12 ? 'Critical Success!' : roll == 2 ? 'Fumble!' : result >= difficulty ? '<br>Success!' : '<br>Fail!'}$
</tr>
</table>

However, you can't use the sameRow commands in an item container; you'll have to use the item.key references for that to pull data into the variables.

#

Or other keys, for like your skill or attack bonus, depending on the system you're using.

storm stream
#

oh wow

storm stream
manic crypt
#

<shrug> you just eliminate the first set of ${}$ from the code there.

storm stream
#
?{stat:'Attribute for roll '|STRMod,"STR"|DEXMod,"DEX"|CONMod,"CON"|INTMod,"INT"|WISMod,"WIS"|CHAMod,"CHA"},
?{modifier:'Skill Roll Modifier'[number]|0},
?{difficulty:'Difficulty of Check?'|6|8|10|12|14}
)}$````

this bit, right?
manic crypt
#

Yes.

storm stream
#

lemme try this 😄

manic crypt
#

I took a quick swing at it too, since I have yet to build this for my sheet, and I guessed at your damage bonus key, but I'll spoiler it for if you want to finish your try before seeing if I made any errors.

||```//Damage Roll for GiftofGabe
<table>
<tr>
<th>${!item.name}$ Damage Roll</th>
</tr>

<tr>
<td>Damage Roll</td>
<td style="text-align: center; vertical-align: middle;">${roll:=[:item.damage_die:]}$
</tr>

<tr>
<td><strong>Damage Bonus:</td>
<td style="text-align: center; vertical-align: middle;"> ${!item.damage_bonus}$</td>
</tr>

<tr>
<td><strong>Total Damage</strong></td>
<td style="text-align: center; vertical-align: middle;"><strong>${!roll + item.damage_bonus}$</strong></td>
</tr>

</table>```||

brave trench
#

looks like user input sheets do not update when things in them change, example: a check box always reads true, or false (based on whether set to checked or unchecked), and never changes when manually checked/unchecked.

Does this mean I cant use selections inside the user input sheet that affect other formulas also inside the user input sheet?

storm stream
#

nothing is happenning at all

#

it is the correct spot

#

the key name is correct too

#

I wonder if using a dropdown instead of flat text field is the problem

manic crypt
#

Oh, the key for the entry is what's sent to the call for it, so it's trying to parse [_1d8] instead of 1d8.

#

try changing your keys to the same values you have in the label column for the item.

#

on the item.damage_die dropdown

storm stream
#

yep, that was it

#

OH OK!

#

wait, that won't break something else right?

#

for being one of the most basic values ever

manic crypt
#

do you use that key anywhere else?

storm stream
#

xdy

#

no...

#

ok

manic crypt
#

Personally, I did use a text field for my damage values on weapons. After all, what happens if you have a weapon that does 3d6 damage?

#

But that's up to you.

storm stream
#

works perfectly now!

storm stream
#

but in this system, weapons don't really do that tbf

manic crypt
#

Fair enough.

storm stream
#

thank you!

#

in the matter of lil icons, what is the best way of customizing the item icons?

#

ykw, never mind, I got it

fading turret
#

Hello there! First, I’d like to thank everyone for all the help you’ve given me. I need a little quick help. I want to create a user input to choose between two types of reactions in my system: DODGE and BLOCK. I’d like it to have two buttons to select between these options, and when pressing a button, it should return the choice to a variable. Thanks in advance for your help!

formal goblet
fading turret
#

confirmation

formal goblet
fading turret
#

so what if i did it with a radio button?

formal goblet
fading turret
#

thanks

brave trench
#

Is there a way to find how a key is being altered? I have a number field getting a bonus from somewhere I can't find, anywhere. My first thought was an item with a rogue modifier in it but I can't seem to find it.

fringe silo
#

im trying to referance a drop down and from that dropdown chk to see what is selected and use the matching roll formula from another part of sheet, im doing this on an item

manic crypt
fringe silo
#

the dropdown and the roll would be on the item but the skill referanced is on the charsheet

formal goblet
manic crypt
#

sounds like something that could be accomplished by fetchFromActor(attached, ... )

fringe silo
#

im working on another issue but yes ill will post the example in a sec

#

and thank you

fringe silo
#

is it possible to collapse a tabbed panel

#

collapse is so nice

formal goblet
fringe silo
#

ive already made the tabbed panel can i add it to a nromal panel or will i have to redo the tabbed panel

fringe silo
#

oh thats awesome

manic crypt
#

but I know that item.Readied is generating as part of a roll message elsewhere.

#

because it reads as true or false in a conditional for the primary roll message on the same component label.

#

the roll message is being called from a component in an item container, with a valid item that has the Readied key currently set to 'false'

static cargo
formal goblet
formal goblet
static cargo
manic crypt
storm stream
#

Hey, y'all! I want an item display table to display the description of a rich text area field but if a particular item has an empty description it shows an error

#

what should I do, please?

formal goblet
#

Btw, your keys in your Item cannot collide with Actor keys even if they have the same name. So your _item-prefix is kinda unnecessary.

manic crypt
#

Martin, for general information, I found where my error was coming up, the whole function was always returning as case A (this item is equipped and so set item.Ready to 'false' directly, which was coming about because I was using item.Ready = 'true' ? ... : ... so I wound up converting to an equaltext() to make the comparitor work. Once the consoleLog() was working for me again (praise to the Ancient Gods, etc) it showed up with a step-by step read on the case forms, and I used a toggle function instead of a direct set on the item key.

Am I doing something wrong with the syntax on that comparison though? on my item templates, item.Ready is a check box, which I thought I understood to be a boolean, but it never seems to convert to a number at all for a simple logic statement (as in item.Ready = 'true'). Should I be using item.Ready == 1 instead? I wind up having to go about it roundwise with a equalText(string(item.Readied),"true") form instead, which seems redundant.

#

Also, for anyone in the community wanting to do an item comparison for an exclusive equip slot (as in "you may only equip one set of armor") here's the code I used. item.Readied is a checkbox on the item sheet, and I have an item container called 'Armor' which contains all armor sets and a column called 'armorhidReady' which is a GM-only visible field that contains ${item.Ready)}$ as a label because I needed it for a previous area of the sheet (counting number of readied or unreadied items)

${item.Readied ? setPropertyInEntity('item', 'Readied', "item.Readied ? 'false' : 'true'") : equalText(string(first(lookup('Armor', 'armorhidReady', 'armorhidReady', 'true'), 'false')), 'true') ? notify('error','You cannot ready more than one set of armor') : setPropertyInEntity('item', 'Readied', "item.Readied ? 'false' : 'true'")}$```

edit: fixed the first comparison per Martin's comments below.
#

It works, although I'm certain there has to be a more elegant way of doing it.

formal goblet
manic crypt
formal goblet
manic crypt
#

right, so that's the reason why it was always coming up with case A when I got to logging it, because the original code was just setting that value to true.

storm stream
austere lava
#

Hey @formal goblet . The Custom System Builder - Example says it is for version 4.3 CSB and wont run on any earlier versions but CSB is on version 4.2 and has no updates.

formal goblet
fringe silo
#

with item displays i have 3 slots that take the same kind of item in differnt tabs of a sheet essense1, essense 2, and essense 3, when i put an item into essense 1 it also shows up in the other essense slots is there a way to fix this w/o making three copys of the items and 3 diffent templates

formal goblet
fringe silo
#

So this what my sheet looks like essense 2 and essense 3 are set up the same way im looking for a way to filter it if something is shown in essence1, it wont be added or cant be added to essence 2 or 3, but im trying to make it so ii dont have to make 3 differnt templates for each essense to make it fit in the item displayers with out duplicating itself in the other essense displayers. How would i go about that i dont see anything that discribes this in the gitlab documentation

manic crypt
#

in the item filter formula section at the bottom you can put in a filter criteria for each container, which will only show items of the appropriate item type AND which match the filters.

#

So if the essence items have a defining key field that states which essence they are, you can put that in the filter field on the container.

fringe silo
#

currently i have 1 type but i want it to go in all three but 1 each currently if i put lets say the fire essence in essense 1 it also shows up in essense 2 and 3

manic crypt
#

Your system allows 3 essence slots?

fringe silo
#

can a flter do something like itf its in essense 1 it wont show up in essense 2 or 3

#

im making a TTRPG based on he who fights with mnonsters litrpg sseries

manic crypt
#

Ah, so you'll want 5 eventually.

fringe silo
#

4

#

with 5 powers each

formal goblet
fringe silo
#

ess1 2 and 3 go off the same list of ess, but the 4 slot takes differnt ones

#

so ill have to copy the list 2 times to have 3 lists of essenses with diff temps even if the only diff is the number like essense temp 1. 2, 3

formal goblet
fringe silo
#

so this is fire essense i can add a drop down that makes it either go into ess 1,2,or 3

manic crypt
#

Yes, once it's on the character the player can change which slot it's designated as.

#

Or you can set the dropdown to only be visible to the GM.

fringe silo
#

and can i do it per item moved so if player 1 gets fire 1st and player 2 also takes fire but gets it as thier 3rd essense

manic crypt
#

Once it's on a character the item gains a new uuid, so yes.

fringe silo
#

sp step one would be to add a drop down to the basic template

formal goblet
#

Your players have to select manually, from which Displayer they should be displayed. But that's it

fringe silo
#

so like this for the drop down, and then set the filets to look for the dropdownkey and look what optionkey is selceted to determine what item displayer that it should show up on

formal goblet
fringe silo
#

like

manic crypt
#

You don't need ${}$ in the filter. equalText(item.essslotdrop, 'essence1') in that case

#

woops.. item.essslotdrop

#

Dropdowns always return the key, not the Label when they're called, so you have to use the key. It becomes important if you need to call something that's selected in the dropdown later.

fringe silo
#

so i put it in like that and it broke my character sheet could not open my test character

manic crypt
#

is it throwing a console error when you try to open the character?

fringe silo
#

nothing just wont open no error just not opening when i removed the filter and reloaded it all came back

formal goblet
fringe silo
#

thanks one sec ill post it

formal goblet
fringe silo
#

equalText(item.essslotdrop, 'essence1')

#

essense1

formal goblet
#

Should be a 1-liner

fringe silo
#

removed

formal goblet
#

And change 'essence1' to 'essense1'

fringe silo
#

yeah sorry for the comunication issues but thats how i had it, or do you mean equalText(essense1)

formal goblet
#

equalText() must have 2 parts at all times. So equalText(item.essslotdrop, 'essense1')

fringe silo
#

ok

#

ok it working now thank you both very much you have been lots of help

#

if i were to want to ref 2 diff drop downs for text, so like for power placement i ould have to do like equalText(item.essslotdrop, 'essence1' : item.key, 'key')

fringe silo
#

so 2 filter lines like , 1st line equalText(item.essslotdrop, 'essence1 2nd line equalText(item.key, 'key')

#

or is it not possible to do more than one filter

formal goblet
#

true and true --> true
true and false --> false
true or false --> true

fringe silo
#

like

formal goblet
#

AND YES, I COMPARE IT TO A PUZZLE

fringe silo
#

awsome thank you for being so patient with this old guy that stopped trying to keep up with coding stuff after visual basic 🙂

#

26 years ago

formal goblet
#

So you stopped when I was born? TRAITOR!

fringe silo
#

lol

#

and now i want to learn gotta knock the cobwebs out

#

not interwebs till i was a junior in HS had to get off the phone to connect

formal goblet
#

At least we can offer all different sorts of complexity level

fringe silo
#

ancient times

manic crypt
#

The most recent version of "how do I get CSB to calculate the range on the canvas for me" didn't work for me, so I spent some time playing with it and have it into a single entry that I've tested from a character sheet roll message and from an item container roll message. I was having trouble getting the outputs of the resident canvas.grid.measurePath() so I went with values I could pull through.

${#%{let controlledToken = canvas.tokens.controlled[0]; let targetToken = game.user.targets.first(); if(controlledToken && targetToken) {return;} else {ui.notifications.warn('No actor or target selected!');};}%}$
${#range:=%{ let controlledToken = canvas.tokens.controlled[0]; let tokenLoc = canvas.grid.getCenterPoint(controlledToken); let targetToken = game.user.targets.first(); let targetLoc = canvas.grid.getCenterPoint(targetToken); let attackRange = Math.round(Math.sqrt((controlledToken.x - targetToken.x)**2 + (controlledToken.y - targetToken.y)**2)/(canvas.grid.size/canvas.grid.distance)); return attackRange;}%}$
${#consoleLog(range)}$```
flint verge
#

N00B question here. I want to use a dropdown to indicate the dice roll (i.e., a drop down might be for which dice pool is used for a certain stat) - I don't see a way to associate a dropdown to a dice roll. I may be missing something obvious though bc I have no programing skills. Help?

manic crypt
#

A lot would depend on the nature of the dice rolls and the values you want the dropdown to take.

#

At the simplest you could just have the drop down keys as numbers and the roll formulas as [:<dropdown key>:d6] which would roll the number of d6 indicated by the value key of the dropdown.

spark lotus
#

Quick questions. I'm going through the wiki and the Readme.md looking for a list of basic functions to modify dice rolls. I haven't found it. Specifically, how to do exploding dice (I thought I ran across a simple way to do this once on this thread) and I'm trying to figure out what "hg" does to a variable, such as "hg_str" where "str" is the numeric value of the strength attribute on a character sheet.

manic crypt
spark lotus
flint verge
#

Hi peeps! Solved an earlier issue with rolling dice based on a dropdown by referencing a dropdown which allows for essentially advantage, disadvantage, or flat rolls. I can now make the chat box show the dice rolls, but would like it to acknowledge the level of success. In the system I'm using the values represent Bad, Good, better, best depending on the dice roll you get. Is there an easy way to do this? (I'm using a simple call to the dropdown key to roll a set number of dice. I made a few macros that do this well but have no idea how to make the maco work in the sheet. Appreciate the help for this non-developer trying to develop!

torn loom
#

i'm working on a label (button) roll message, is there anyway to just run another macro in javascript without creating a new chat message?

#

wait nvm think i figured it out

trail lake
#

Designing my first sheet and trying to learn system. I can get a dropdown to show lists from a dynamic table e.g. ${first(lookup('Attributes',
'AttributeModifier', 'Attribute', AttributeSelection))}$

What I cannot figure out how to do is get a dropdown to do the same thing on an Item Displayer. Is it possible to have a Dropdown access an item displayer in the same way it can access a dynamic table? The dropdown list has Custom, Dynamic Table and Formula options. Should I be using Formula option?

Basically, I want to be able to have a dropdown where the sheet owner can pick a weapon from their weapon inventory (Weapons Item Displayer), choose it, and then it populates the various modifiers for that weapon (damage, Penetration etc) in relevant places as key variables. I can’t figure out how to do this.

trail lake
#

Another question: How do I make a dice roll say success or failure in the chat. Image shows the label I use to get it to roll a damage roll. What I would like to be able to do is for it to look at result of the roll, and then in the chat where it shows the roll total it also says success or failure, based on the roll e.g. If the roll result was an 8+ it would say ‘Success’ or if not would say ‘Failure’. Also, if I wanted it to have more than just the two options (e.g. less than 8 = failure, 8-9 = success, 10-11 = Critical Success, 12+ Double Critical Success), how would I do that?

manic crypt
trail lake
#

Ok. They are not variable. Where would I put this comparitor chain? Would it go in the Label Roll message of the label that does the dice roll?

manic crypt
#

Are you married to the idea of using a dropdown for it? I can definitely think of how to do it with a 'ready' status on the item and a separate item container with different column definitions.

trail lake
manic crypt
#

You, sorry.

#

and in relation to your first question.

#

I haven't experimented with using a dropdown that way, that would be more of a Martin answer about if you can assign the dropdown keys from the values in an item container.

trail lake
# manic crypt Are you married to the idea of using a dropdown for it? I can definitely think o...

I am not married to anything. At moment I have a dynamic table where the player fills in the various columns of the table for each weapon. In another part of the sheet, I have a dropdown where they choose a weapon and it takes that weapons damage modifier to apply to a damage roll.

What I want to do is to be able to have weapons as items, and then in the damage roll the player gets to pick which weapon they are using from their items, and then sheet will take the weapon damage modifier from the weapon they pick.

How the sheet goes about doing this, I have no preference for. Whatever works best - but I want the player to be able to pick the weapon they want to use from the item container so it applies the damage roll for that weapon. Hope that makes sense.

manic crypt
manic crypt
trail lake
manic crypt
#

it's a label column on an item container.

trail lake
manic crypt
trail lake
manic crypt
#
${roll:=[2d6+:DamageTotalModifier:]}$ 
${!roll == 12 ? 'Critical Success!' : roll == 2 ? 'Fumble!' : result >= difficulty ? 'Success!' : 'Fail!'}$```
#

if you take that code and put it in a label roll message box and execute it from a test sheet, you should see a box come up asking for the difficulty, then it'll roll the dice and see if the roll beat it.

#

You can have as many lines of separate formulae in a single message as you like, I haven't hit the limit yet.

formal goblet
manic crypt
#

I'm trying to sub in when I can...

trail lake
manic crypt
#
${#itemName:= item.name}$
${#wpnskill:=equalText(item.Type,'Melee') ? first(lookup('SkillTable', 'Rank', 'Name', 'Melee')) : first(lookup('SkillTable', 'Rank', 'Name', 'Shoot'))}$
${#wpnAttr:=equalText(item.AtkAttr, 'STR') ? STRMod : equalText(item.AtkAttr, 'DEX') ? DEXMod : STRMod >= DEXMod ? STRMod : DEXMod}$
${#wpnRange:=%{ let controlledToken = canvas.tokens.controlled[0]; let tokenLoc = canvas.grid.getCenterPoint(controlledToken); let targetToken = game.user.targets.first(); let targetLoc = canvas.grid.getCenterPoint(targetToken); let attackRange = Math.round(Math.sqrt((controlledToken.x - targetToken.x)**2 + (controlledToken.y - targetToken.y)**2)/(canvas.grid.size/canvas.grid.distance)); return attackRange;}%}$
${#rangeBand:=wpnRange <= item.RngSht ? 'Short' : wpnRange <= item.RngExt ? 'Extreme' : 'Out of'}$
${#rangeMod:=equalText(rangeBand,"Short") ? 0 : equalText(rangeBand, "Extreme") ? -2 : -99}$
${#wpnAtkBonus:=equalText(item.Type,'Melee') ? mwak : rwak}$
${#?{atkMod:'Attack Modifiers?'[number]|0}}$
${#tgtDef:=fetchFromActor('target',equalText(item.Type,'Melee')?'MAC':'RAC')}$
${#tgtTTarg:=fetchFromActor('target','TTarg')}$
#
<tr><th>Attack with</th><th>${!item.name}$</th></tr>
<tr><td>Range:</td><td>${!rangeBand}$(${!rangeMod}$)</td></tr>
<tr><td>Attack Bonus:</td><td>${!wpnskill + wpnAtkBonus}$</td></tr>
<tr><td>Modifiers:</td><td>${!atkMod}$</td></tr>
<tr><td>Roll</td><td>${dRoll:= [1d20]}$<strong>${!dRoll == 20 ? '<br>Critical Success!' : dRoll == 1 ? '<br>Fumble!' : ''}$</strong></td></tr>
<tr><strong><td>Total:</td><td>${!totResult:=(dRoll + atkMod + wpnskill + wpnAtkBonus + rangeMod)}$</td></strong></tr>
<tr><td><strong>Result</strong></td><td><strong>${tResult:=dRoll >= 20 ? 'Traumatic Hit!' : totResult >= tgtDef ? 'Hit!' : 'Miss!'}$</strong></td></tr>
${#setPropertyInEntity('self','LastRoll','dRoll')}$
${#setPropertyInEntity('self','LastResult','tResult')}$
</table>```
#

All in one roll message.

trail lake
#

Thanks! A lot to digest there! Time to go experiment 😀

manic crypt
trail lake
manic crypt
trail lake
manic crypt
#

No problem.

trail lake
#

I wrote the following and am getting an error message. Can you see what i am doing wrong?

${Roll:=[2d6+:DamageTotalModifier:]}$
${!Roll <6 ? 'Flesh Wound: 1 Shock' : !Roll == 6 ? 'Light Wound 3 Shock' : !Roll == 7 ? 'Light Wound 3 Shock' : !Roll == 8 ? 'Moderate Wound 5 Shock Location Impaired' : !Roll == 9 ? 'Moderate Wound 5 Shock Location Impaired' : !Roll == 10 ? 'Serious Wound 7 Shock Location Incapacitated' : !Roll == 11 ? 'Serious Wound 7 Shock Location Incapacitated' : !Roll >= 12 ? 'Mortal Wound 7 Shock Location Impaired'}$

manic crypt
#

what's the error message?

trail lake
#

I get this in chat

manic crypt
#

I mean in the console.

trail lake
#

I haven't used the console.

manic crypt
#

You'll want to, it helps with debugging.

#

hit F12 in Foundry and open the console tab, then look for the last red message.

#

However, for that many specific results, it might be better to use a switchCase()

trail lake
#

It says NS_Error_Unexpected

manic crypt
#

delete all the !'s except the first one after the ${ then

trail lake
manic crypt
#

What it does is let you define a series of results and outputs for each.

#

But (and I'm not absolutely sure about this) they have to be values, not logical functions. So I would use the operators for the outside results (the <= and >= ones) and a switchcase for all the ones inside.

trail lake
# manic crypt delete all the !'s except the first one after the ${ then

I did that, but still no luck. This is what I have currently:

${Roll:=[2d6+:DamageTotalModifier:]}$
${!Roll <6 ? 'Flesh Wound: 1 Shock' : Roll == 6 ? 'Light Wound 3 Shock' : Roll == 7 ? 'Light Wound 3 Shock' : Roll == 8 ? 'Moderate Wound 5 Shock Location Impaired' : Roll == 9 ? 'Moderate Wound 5 Shock Location Impaired' : Roll == 10 ? 'Serious Wound 7 Shock Location Incapacitated' : Roll == 11 ? 'Serious Wound 7 Shock Location Incapacitated' : Roll >= 12 ? 'Mortal Wound 7 Shock Location Impaired'}$

Does the !Roll have to be the same as the Component key I have in the label, which is DamageRoll, not Roll?

manic crypt
#

is it throwing the same error?

trail lake
# manic crypt is it throwing the same error?

I think the error message is: Custom System Builder | False part of conditional expression expected (char 399) SyntaxError: False part of conditional expression expected (char 399)

manic crypt
#

Ah, yup. Add : ' ' to the end after Impaired' and before the }$

#

the x ? y : z setup is required.

trail lake
#

Fantastic, it worked!! Thank you so much for helping me through this 😀

#

This is a more complicated addition - if I want it so that if i roll snake=eyes (1 and a 1) it is automatically a failure, anyway of doing that? It doesn't really matter, as can just look at the dice rolled, but thought I would ask 😀

manic crypt
#

Set a check for Roll == 2

#

I would have it before the <6 one.

#

oh, wait

trail lake
#

I don't think that will work, as I have modifiers on the dice roll which can be negative, so could get a result of 2 when actually throw something else.

manic crypt
#

Yeah, you would have to declare the roll as a different variable, then add the DamageTotalModifier in afterwards.

trail lake
#

Sounds a bit complicated for my small brain 😂

manic crypt
#
${#Roll:=dRoll + DamageTotalModifier}$
${!dRoll == 2 ? 'Automatic Failure' : Roll <6 ? 'Flesh Wound: 1 Shock' : Roll == 6 ? 'Light Wound 3 Shock' : Roll == 7 ? 'Light Wound 3 Shock' : Roll == 8 ? 'Moderate Wound 5 Shock Location Impaired' : Roll == 9 ? 'Moderate Wound 5 Shock Location Impaired' : Roll == 10 ? 'Serious Wound 7 Shock Location Incapacitated' : Roll == 11 ? 'Serious Wound 7 Shock Location Incapacitated' : Roll >= 12 ? 'Mortal Wound 7 Shock Location Impaired'}$```
#

If you want to display the total roll (dice + DTM) then just delete the # from the second line.

trail lake
#

Ok Cool 😀

manic crypt
#

oh, that code still was missing the : ' ' from the end, I just grabbed what I had sitting in notepad.

manic crypt
# trail lake Ok Cool 😀

And, because I'm horrible at putting something down once I think about it, here's the version using switchCase() that I mentioned. I included some line breaks and text to make more sense, but you could do some inline to put it in a nice table if you like.

Roll: ${dRoll:=[2d6]}$<br>
Total Roll: ${Roll:=dRoll + DamageTotalModifier}$<br>
${!result:=dRoll == 2 ? 'Automatic Failure' : Roll < 6 ? 'Flesh Wound <br>1 Shock' : Roll >= 12 ? 'Mortal Wound<br> 7 Shock<br> Location Impaired' : switchCase(Roll, 6, "Light Wound<br> 3 Shock", 7, "Light Wound<br> 3 Shock", 8, "Moderate Wound<br> 5 Shock<br> Location Impaired", 9, "Moderate Wound<br> 5 Shock<br> Location Impaired", 10, "Serious Wound<br> 7 Shock<br> Location Incapacitated", 11, "Serious Wound<br> 7 Shock<br> Location Incapacitated")}$```
trail lake
#

Thanks for Switchcase info 😀

manic crypt
#

No problem. I hadn't used it at all, so it was worth the work on it.

trail lake
#

If i wanted to compare a roll to a compenet key, how would I do that. I have something called ShockPoints (entered through a Number Field). I wanted to compare a dice roll to the ShockPoint Value and then have the chat say whether success or failure. However, i am getting an error message. here is the code I have written for it:

${Roll: = [2d6+:ShockValueTotal:]}$
${!Roll >= ShockPoints ? 'Success!' : Roll < ShockPoints 'Failure - Shocked' : ''}$

I have tried it with ShockPoints being surrounded by full colons as well, but same error (i.e. ${Roll: = [2d6+:ShockValueTotal:]}$
${!Roll >= :ShockPoints: ? 'Success!' : Roll < :ShockPoints: 'Failure - Shocked' : ''}$

error says NS_Error_Unexpected.

manic crypt
#

Don't use the : : around your keys unless they're inside a roll indicator [ ]

trail lake
#

Ok. The version I used without it still came up with error

manic crypt
#

You don't have another ? after the false case for the line.

#

${!Roll >= ShockPoints ? 'Success!' : Roll < ShockPoints ? 'Failure - Shocked' : ' '}$

#

also, you don't need the second conditional there; if the roll isn't >= Shockpoints, it'll be less than it.

#

${!Roll >= ShockPoints ? 'Success!' : 'Failure - Shocked'}$

trail lake
#

Ah ok. Still getting an error. I don;t think it likes my ShockPoints!

This is my current code: ${Roll: = [2d6+:ShockValueTotal:]}$
${!Roll >= ShockPoints ? 'Success!' : 'Failure - Shocked' : ' '}$

This is my component where SHockPoints are entered:

manic crypt
#

delete the second colon and ' ' at the end of the 2nd line

trail lake
#

This is the error message: Custom System Builder | Cannot convert "Total" to a number Error: Cannot convert "Total" to a number

manic crypt
#

second, let me plug this in my junk tab.

trail lake
#

I think the problem is that it is not recognising my ShockValueTotal I use as a modifier to my dice roll

#

Which is strange, as it was recognising it previously. I will go investigate why!

#

But I could br wrong

manic crypt
#

This worked for me; I had to declare the values:

#
${ShockPoints:= '7'}$
${Roll:= [2d6+:ShockValueTotal:]}$
${!Roll >= ShockPoints ? 'Success!' : 'Failure - Shocked'}$```
#

You had an extra space between the colon and equal sign of the roll declaration

trail lake
#

Perfect. Thanks you!

manic crypt
#

as far as typos go, the best thing I've found on complex code is to type it all in NotePad++ and then copy it into the label message field; that way you can see all the code in-line and it also helps you catch stuff like forgetting to close your brackets.

trail lake
#

I think I will start doing that, as I might never have spotted that if you hadn't pointed it out

#

Last thing (I promise - at least for today!)

If I want the chat message to be in bold or be a colour, how would I do that? Would it be something I have to input in Label Prefix/suffix?

manic crypt
#

you can insert the <strong> indicator at the beginning of the line you want bold, and </strong> at the end. For the text you can use html or css notation in-line to set them, for instance adding this part makes the result come out in a blue:

<p style="color:DodgerBlue;">${!Roll >= ShockPoints ? 'Success!' : 'Failure - Shocked'}$

#

put the style note inside the ' ' marks if you're trying to make specific areas specific colors, like in the formula with all the varied results we talked about before.

manic crypt
# trail lake Last thing (I promise - at least for today!) If I want the chat message to be i...

So that last formula with my local values (you can omit those declarations on your version; they're on your Sheet) and some formatting looks like this:

<th><strong>Shock Roll</strong></th>
<tr><td>Shock Value:</td><td>${ShockValueTotal:= '2'}$</td></tr>
<tr><td>Shock Points:</td><td>${ShockPoints:= '7'}$</td></tr>
<td>Roll:</td><td>${Roll:= [2d6+:ShockValueTotal:]}$</td></tr>
</table>
<strong><p style="color:DodgerBlue;">${!Roll >= ShockPoints ? 'Success!' : 'Failure - Shocked'}$</strong></p>

And outputs the attached.

surreal kelp
#

Hello, I'm new to Foundry and wanted to tackle macros (I'm using Custom System Builder and PDF Pager)
Coming from roll20 I was quite used to the language used but this is more complicated for me who only wants a single macro
I had a macro that asked players to choose three attributes from a list I had written, then it rolled a 4 die for each (in a roll table to have a lore friendly display).
Then the player had to launch a second macro indicating the three chosen attributes and the result of the previous die, and then it calculated everything

I know it wasn't the most optimized, but it worked ^^
Could someone help me see this more clearly?
For the moment I have not managed to even call on an attribute of one of my characters…
I created just a list of attribute (because we will use the PDF so it can just be ugly)
For example, I have a TEST character.
It has an attribute: Label “PB” / key: fiche_PB
On the form, I have several possible names, but nothing works if i try to call it with a macro :
system.props.fiche_PB
system.attributebar.fiche_PB

I saw that I could use this kind of thing ${[1d20 + 3]}$
but when I run a macro with that, it takes me out of the text, so I imagine it's not made for...

spark lotus
#

I'm looking at the formula system documententaion for CSB. Can the fecthfromactor function be used to fetch a value from a targeted actor/token? So instead of this: fetchFromActor('Steven', "Strength"), 'Steven' would be replaced with some sort of general 'target'? Or is there a different function I should use?

manic crypt
manic crypt
# surreal kelp Hello, I'm new to Foundry and wanted to tackle macros (I'm using Custom System B...

The best i can do to help get you started is to say that you should create another label on the sheet, keyed and named as Roll. Then type the exact code you used above ${[1d20+3]}$ into the label's roll message section, and save and close it. Next you create a character from the template you're working off (I name mine Test a lot) and open them, selecting your template as the sheet. You should see the Roll label in red text. Click it and you should see your die roll happen.

surreal kelp
#

Okey
And if I do that, how can I access to this roll within the pdf I use for the "true" character sheet ?

spark lotus
manic crypt
surreal kelp
#

Now, this is my "true" sheet, each number is linked to a variable (and thoses are the variable I want access to)

manic crypt
#

Umm.. I'm not sure how csb works with imported pdfs like that. It might be simpler to just recreate the whole sheet in csb and go from there, otherwise you're going to have to read the documentation about how to integrate scripts and formulas together. Like, it could be done, but it would be quite a bit of extra code when you could just make fields for the data on the template.

#

Im on my mobile at the moment or I'd pull it up and take a look.

surreal kelp
#

I see, I was afraid of this response (the odds of creating your own system, lore and sheets 😅 )...
The thing is that my sheet is 5 pages long (it contain few values, but there is 3 tables within)... but maybe it will be easier to create the sheet in csb than to dig in code

manic crypt
#

I'll let you know when I'm back at my desktop and can mess with it some. I'm certain there's a way to pull through the pdf pager document that you're using, i just don't know it yet

spark lotus
#

Has anyone tried using the Freeform Sheets module (https://foundryvtt.com/packages/ffs) with CSB? Just curious. Being able to map the fields of a CSB character sheet onto official character sheets would be cool, especially for games with stylistic sheets. I'm going to give it a try unless someone already knows that they are incompatible.

manic crypt
#

I haven't, but I imagine the same sorts of things I was talking about with Argos would be issues there. The mod winds up addressing in js, and then you have to pull them back out with %{}% scripts every time.

surreal kelp
#

Hum, maybe it's easier, I do not know

The downside of pdf pager is that you must have a fillable PDF, and from what I read from the other module, you create the fields you want

surreal kelp
#

I crashed Foundry 😯 I can't do anything ^^"

brave trench
#

can a roll/button from one item setProperty in another item?

manic crypt
brave trench
# manic crypt Yes, provided the actor triggering it has access to the item. So while it might ...

Pulling this from the guide.

The name of an actor to reference. It can also contain special values like:

self: Sets into the current actor (can be used in labels, initiative formula and attribute bars)
selected: Sets into the actor-data of the currently selected token
target: Sets into the actor-data of the currently targeted token
attached (Item only): Sets into the actor-data an Item is attached to
item (Actor only, inside Item Containers): Sets into the item-data of the current row of the item container

Which entity would I use? It sounds like Item only references the current item, or am I wrong?

formal goblet
#

Me back (later than expected AND at the same time earlier than expected, cause someone just added a +1 h30min to the estimated train travel time for unknown reasons, which caused a chain reaction in the overall estimated plan).

Context. The first train was delayed by 15 min., so I missed the second train (train A). So I got assigned to another train (train B), which arrived around 1 hour later than train A.

Train A and B basically used the same route. The travel time for A was estimated to be around 1h10min. Buuuuut the travel time for B was estimated to be around 2h40min for the same route without any disturbances at the track. And guess what, I arrived 1h30min earlier than the expected arrival time, which made it possible to catch the final train C earlier than expected.

formal goblet
formal goblet
peak jacinth
hollow crow
#

Hey guys, apparently i'm having problems with that setPropertyInEntity formula. I wish to subtract 2 to the current mana point of a character which i've selected on the map. Could you tell me why ${setPropertyInEntity('selected','current_mp','selected.current_mp-2')}$ not only doesn't take any effect, but console says Uncomputable token "selected". I thought it was enough to select a token referring to an actor, but this doesn't seem to work at all.

formal goblet
#

Had to replan twice for this. It was exhausting 😅

formal goblet
hollow crow
#

Oh, couldn't be that simple. Thought the syntax was the same as 'target' (e.g. ('target', 'Health', "target.Health - Damage")). Thank you Martin.

formal goblet
hollow crow
formal goblet
#

And well, people get confused with the 3rd arg, because target. doesn't mean the targeted token, but the target actor in the meaning of source-actor (the source of execution) vs. target-actor (the target of the modification)

hollow crow
#

Got it. So in this case the source actor and the target actor are the same (that is 'selected').

formal goblet
#

And target depends on what you've defined in the 1st arg

hollow crow
#

Good to know. I think setPropertyInEntity is a great formula. Still trying to manage spell casting outside the character's sheet 😅

frank gazelle
#

I am suddenly having a problem with several of my roll messages not hiding the formulas. Am I missing something? I swear they were hiding last week.

formal goblet
frank gazelle
#

Wow, not sure when I re-enabled that, thanks

trail lake
#

Designing my first sheet and trying to learn system. I can get a dropdown to show lists from a dynamic table e.g. ${first(lookup('Attributes',
'AttributeModifier', 'Attribute', AttributeSelection))}$

What I cannot figure out how to do is get a dropdown to do the same thing on an Item Displayer. Is it possible to have a Dropdown access an item displayer in the same way it can access a dynamic table? The dropdown list has Custom, Dynamic Table and Formula options. Should I be using Formula option?

Basically, I want to be able to have a dropdown where the sheet owner can pick a weapon from their weapon inventory (Weapons Item Displayer), choose it, and then it populates the various modifiers for that weapon (damage, Penetration etc) in relevant places as key variables. I can’t figure out how to do this.

spark lotus
#

Hi. I have a working part of my character sheet that allows a player to manually enter in armor class to determine if they hit a target. I'm trying to switch it to using fetchFromActor to get the armor class value from the selected token. My original, manual entry version works great, but My fetchFromActor version isn't working. Any advice on what I'm doing wrong would be greatly appreciated! I've included the code with notes on what I think it's doing (I keep a Word document with examples of different ways to do various functions and I add comments to help me learn what the code means, that's why it may look a little weird 🤓 ).

#

Here's the version that works fine (with players manually entering the AC).

manic crypt
#

Try replacing the " with ' in the ffa line

#

Ah, wait.

#

So that first line function resolves to just ${<# or 0>}$, which doesn't make it available in the message for anything later. You should assign it a local variable name (you can even use npc_ac) to use it later.

${npc_ac:= fetchFromActor('selected', 'npc_ac', 0)}$

spark lotus
#

Thank you for your help!!

#

I changed the code and reloaded the template but it's still not working. Does anyone see where I'm making an error?

manic crypt
#

When you say not working, is it throwing a console error?

spark lotus
#

When I click on the character sheet dice icon that should activate the script, nothing happens.

manic crypt
#

Is there an error though? The error messages in the console help narrow down where the problem is.

spark lotus
#

Ahh, my apologies. I don't know how to check the console yet. I'll go look at the wiki and figure out how to do that.

manic crypt
#

Hit f12 in Foundry to open it, then do a reload and reexecute the command

#

Reload the actor, I mean, not all of foundry

spark lotus
#

Thank you! If I'm reading this error message correctly, there is something going on with the variable "circum_mod"?

manic crypt
#

Yup. It's not called anywhere in the Message.

formal goblet
#

Vice versa. It's being called, but there's no value for that

spark lotus
#

Oh! becuase it was defined in the original version of the script where it was inputted by the user but not the new version! I'm an idiot!

manic crypt
#

sorry, my lexicon isn't professionial.

spark lotus
#

Thank you both for you're help!

manic crypt
spark lotus
#

It works perfectly after I removed the unused variable. Thanks again, much appreciated!

manic crypt
#

Good to hear, hope everything else on it goes smoothly!

manic crypt
#

@spark lotus something I thought of for that first macro you put up today (the to-hit one) is that you might want a check on if the user a) has their token selected, and b) has a target defined. It's not strictly required based on how you set a default value for your fFA, but it might be handy to promote having the players select their targets to help automate the process. This is the code I used for it, which you should be able to just insert at the beginning and see if you want to use it (it's pretty standalone, because it's a script and uses defaults from the Foundry documents).

${#%{let controlledToken = canvas.tokens.controlled[0]; let targetToken = game.user.targets.first(); if(controlledToken && targetToken) {return;} else {ui.notifications.warn('No actor or target selected!');};}%}$

#

That check was more required for my sheet because I use a range calculation in it, and that will throw errors all day if you don't have a token selected and a target.

still crane
#

I've been trying to figure something out that sounds like it should be very simple but for whatever reason I can't get it to work. I'm just trying to do a logical AND on two boolean values for an Item Displayer filter. I've got both working as expected in isolation but everything I try to AND them doesn't work (returns ERROR).

It's a hidden attribute can_use_skill calculated with a formula and an equipped checkbox. I can even use one or the other as expected in the filter formula for the Item Displayer and it works.

But for the life of me I cannot figure out why I can't get a simple logical AND working on these two values. Whether I do it in the Item Displayer filter, or right now in another hidden attribute show_attack that precalculates it, I always get ERROR for the final value. I know it's gonna be something dumb I'm missing but i've tried and() ternary opreator, switchCase, etc. Just can't figure out where I'm screwing it up.

manic crypt
#

What error is it showing?

still crane
#

Is there a log somewhere I can see more specific error reporting? I've just been going off of the results displayed in the hidden_attribute table.

manic crypt
#

Hit f12 in Foundry and look at the console that comes up.

still crane
#

oof okay yeah probably needed this

manic crypt
#

The last error on it should be the one from that message, but if you're not sure run it again with the console open and see

still crane
#

okay it's getting the result as a string it looks like

manic crypt
#

what are the expected results coming from the sheet you're running the formula on?

#

is it a brawn or tech weapon?

still crane
#

this is a brawn weapon with the current skill set to technique, so "can_use_skill" is returning false, but as a string it seems

formal goblet
still crane
#

so even for a hidden attribute, its values are converted to strings?

formal goblet
still crane
#

got it. well thats what i needed to fix it; i just used equalText() to 'true' to get the value. thanks for all the assistance 🙂

steel musk
#

Have to say been having a lot of fun in CSB over the weekend thanks for this.

tough scarab
#

I've been looking at the github instructions but have been unable to add a Hit Point (number display) to the character sheet and have it show on the token on the battle map. I'm using the latest 12v of Foundry and the latest version of CSB. Any help or pointing to help would be appreciated. I've made a template character sheet and added Hit Points to it. If I right click the token the hit points are there and can be edited. I want the layers to be able to see their and the enemies health at a glance though.

manic crypt
#

You mean like the green bar, or are you saying you want it to be a number? Because it seems to be working fine in CSB through the Foundry default...

#

forgot to tag.. @tough scarab

tough scarab
#

The green bar. If the token is right clicked it shows the number and can be edited. I want players to be able to see how healthy opponents are.

#

I must not have set the number field up right.

manic crypt
#

You set that up on the token appearance when it's created. You can change the defaults by changing your template or in the Foundry settings for all of them.

It does need to have a defined maximum to be an attribute bar, so if you create another number field with the Max HP and set the maximum of your current HP tally to ${MaxHP}$ it might fix it?

#

Other than that, it's just go to the token settings, Resources Tab, like it shows in the pictures and change the settings there.

tough scarab
#

I don't see hp in the resource dropdown. I have minimum and maximum set up.

manic crypt
#

Does it show up in the attribute bars when you click on the "See attribute bars" on the character sheet?

#

if so, could you show me your container where you have the HP set up?

tough scarab
#

Maybe I didn't set it up as an attribute. Sorry for my lack of knowledge. I'll look at this again. Let me check.

manic crypt
#

You shouldn't need to change anything to have it show up there. Pretty much everything I set a maximum for has popped into my attribute bars list, provided it's in a Number Component

tough scarab
#

I have it working now. I'm not familiar with the system yet. I'm going to run Deathwatch on it. Thank you for the help, I appreciate it.

manic crypt
#

No problem, good luck!

north olive
#

I have Created a world, used the CSB, twice deleted and Created, and I do have the option to agree to Dependancies

How can I solve this?

formal goblet
north olive
wooden pond
#

Another help request!

I have a roll button with the following script implemented:

    const result = await game.macros.getName('CalculateAttack').execute({
        entity: entity,
        weapon: {
            hits: ${weapon1_attacks}$, 
            acc: ${weapon1_acc}$,
            damage: ${weapon1_dmg}$,
            ap: ${weapon1_ap}$,
            keywords: "${weapon1_keys}$"
        },
        attackModGM: 0,
        defenceModGM: 0,
        penetrationModGM: 0,
        armorModGM: 0,
        damageModGM: 0
    });
}%```

The triggered Script works and outputs the data into the console log as intended. It returns an Object with the following structure:

```return {
    accuracy: {
        targetDC: finalDC,            // The calculated target DC for accuracy
        hits: nrOfHits,               // The number of hits (total number of successful accuracy rolls)
        rollData: roll,               // The roll object for the accuracy check
        description: finalAccuracyDescription // Detailed description of the accuracy modifiers
    },
    penetration: {
        targetDC: finalArmor,            // Final target DC used in the penetration check (updated)
        penetratingHits: nrOfPens,    // Number of successful penetrations (after the penetration roll)
        rollData: penRoll,            // The roll object for the penetration check
        description: finalArmorPenetrationDescription // Detailed description of armor and penetration modifiers
    },
    damage: {
        totalDamage: totalDamage,      // The total damage after applying all modifiers
        targetHealth: newTargetHealth, // Target's remaining health after damage
        description: damageDescription // Detailed description of the damage calculation and modifiers
    }
};```

At the moment it simply returns an Error in the roll message, since I suppose it cannot display an Object. How can I access the parts of the Object? My coder isn't sure and I am neither, so asking here 🙏
formal goblet
wooden pond
#

Can you give me an example based on the above, if you were so kind? 🙏

formal goblet
# wooden pond Can you give me an example based on the above, if you were so kind? 🙏
%{
    const result = await game.macros.getName('CalculateAttack').execute({
        entity: entity,
        weapon: {
            hits: ${weapon1_attacks}$, 
            acc: ${weapon1_acc}$,
            damage: ${weapon1_dmg}$,
            ap: ${weapon1_ap}$,
            keywords: "${weapon1_keys}$"
        },
        attackModGM: 0,
        defenceModGM: 0,
        penetrationModGM: 0,
        armorModGM: 0,
        damageModGM: 0
    });

    options.localVars = {
        ...options.localVars,
        ...result
    };

    return null;
}%

The Target-DC is ${accuracy.targetDC}$
wooden pond
#

Sorry to ask further... can you give me one example of what exactly goes in the local Vars = { } ?

local Vars = {
  accTargetDC = accuracy.targetDC
}

This..?

formal goblet
# wooden pond Sorry to ask further... can you give me one example of what exactly goes in the ...

Just do it as posted. localVars is a global Object in all Scripts. And the rest is the use of the spread syntax: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#spread_in_object_literals

MDN Web Docs

The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected. In an object literal, the spread syntax enumerates the properties of an object and adds the key-value pairs to the object being created.

wooden pond
#

Okay, so the script is changed, thanks. Doing my best to understand it 😖

My hopefully last question for the moment then... how would I access, say, totalDamage from the returned object in the formula for displaying?

wooden pond
#

🙏

#

-# You got a Ko-Fi or similar? 🙂

wooden pond
#

You got a few coffees o7

wooden pond
formal goblet
#

Corrected

wooden pond
#

Getting some data! ✊

#

Thank you man ❤️

#

Now I just gotta puzzle out how to display the roll data as actual roll data 😄

wooden pond
#

yeah, I get it back as roll data in the return.

#

In my formula I output it as this: Roll Data: ${penetration.rollData}$

wooden pond
#

That will already help significantly, thank you.
I am working with a coder who knows javascript but neither the CSB system nor Foundry, so that will be quite helpful 👍

formal goblet
wooden pond
#

nods

Worst case we will make it work another way somehow.
Thanks again for all the help, hope I can leave you in peace with my inquiries for a while now 😉

Super Support, Danke 🙏

bitter spear
#

Hello, in the wiki page it say that "item piles" is a supported module but if i install it a warning is issued and a manual configuration is asked. Is there a guide on how to configure it correctly, please? I have doubts on some options.

fringe silo
#

can you referance an item dis for the name of the item and use that name for an entry in an option for a drop down

magic skiff
#

Where do I find templates to import to CSB? I know almost nothing about javascript but I only need a character sheet with like five stats and thats all.

#

Ugh, okay. Custom System Builder says it is up to date with 4.2.0.
But the CSB Example Module says it is up to date with 4.3.0 and is not compatible with CSB? Huh??

bitter spear
hushed hinge
#

Hi, I am hooking the renderCVhatMessage event because I want to divide all dice rolls by half

I think I have an error in the last line or I don't know how to update the message

Anyone knows what is wrong?
(```
const hook = Hooks.on('renderChatMessage', async (chatMessage, content, speaker) => {
console.log('Hooked!');
console.log(chatMessage);

var conversion = parseInt(chatMessage.content/2, 10);
console.log('New value: ' + conversion);
chatMessage.content = '' + conversion;

});```)

hushed hinge
#

So I think the question is: how do I update the content of a chat message?

oblique willow
#

Can you use normal rolls instead of inline rolls for roll messages?

oblique willow
#

Is this the intended way to not post a roll message to chat?

%{throw "Done";}%
bitter spear
#

Hi, i have a "_template" actor sheet and i have changed some value for the prototype token there but when i create a new actor based on that template, the token configuration are no kept. How do i change the default configuration for tokens so all new created actors have them, please?

formal goblet
formal goblet
bitter spear
formal goblet
bitter spear
#

I think the world script is by far out of my capabilities, sadly.

#

The token config are that of foundry core or CSB have some custom things?

formal goblet
bitter spear
#

Ok, thank you very much.

formal goblet
formal goblet
sullen spoke
#

I know nothing about Java, but thanks to the example sheet i've been making my way through CSB without much issue. However I'm at a roadblock. Im trying to create a roll message that chooses between one of two formulas based on whether or not a checkbox is checked. This is what I cobbled together based on what I could find in the example sheet, plus some googling.

${#?#{_DancerUserInput}}$

${(if(indptcheck)
{[1d10 + 1]}
else
{[1d10 + 2]}
)}$

Where "indptcheck" is the component value of the checkbox, and "_DancerUserInput" is where the box is checked or unchecked.

Any help would be greatly appreciated!

formal goblet
sullen spoke
quick rivet
#

Hello! I want to fetch the value from a character sheet that is selected through a macro. What command should I use for that?

formal goblet
quick rivet
wooden pond
#

Is there a way to "de-mask" inline results from references?

Basically turning the linked data into a pure string.

String() did not work.

#

These inline results is what I mean, just to be specific 😄

formal goblet
wooden pond
#

Yep, those. And man, that was easy 😁 Thanks!

#

Works like a charm 👌

heavy elm
#

Hello,

I have a thing again with an Itemmodifier. I want to modifi a Value that contains conditions.

LP_Grade

So my modifier is:

${Active_6 ? (fetchFromActor('attached', "LP_Total") == fetchFromActor('attached', "LP_Max") ? 'Unverletzt' : fetchFromActor('attached', "LP_Total") > (fetchFromActor('attached', "LP_Max")-(fetchFromActor('attached', "KON")*3+1)) ? 'Angeschlagen (0)' : fetchFromActor('attached', "LP_Total") > (fetchFromActor('attached', "LP_Max")-(fetchFromActor('attached', "KON")*4+1)) ? 'Verletzt (-2)' : fetchFromActor('attached', "LP_Total") > (fetchFromActor('attached', "LP_Max")-(fetchFromActor('attached', "KON")*5+1)) ? 'Verwundet (-4)' : fetchFromActor('attached', "LP_Total") > (fetchFromActor('attached', "LP_Max")-(fetchFromActor('attached', "KON")*6+1)) ? 'Schwer Verwundet (-6)' : fetchFromActor('attached', "LP_Total") > (fetchFromActor('attached', "LP_Max")-(fetchFromActor('attached', "KON")*7+1)) ? 'Außer Gefecht' : fetchFromActor('attached', "LP_Total") > (fetchFromActor('attached', "LP_Max")-(fetchFromActor('attached', "KON")*8)) ? 'Koma' : fetchFromActor('attached', "LP_Total") == 0 ? 'Tot' : 'Eiserner Überlebenswille') : fetchFromActor('attached', "LP_Grade")}$

So when Active_6 is unchecked I want it to fall back to the old value before modifiying. Insted it uses the modified version. But that doesnt work somehow. Any idea how I can archive falling back on the onmodified LP_Grade?

formal goblet
heavy elm
#

Because the Level of the Item changes them

formal goblet
heavy elm
#

Nein. Berserker bekommt drei zusätzliche Wundgrade vor Angeschlagen Stufe 6. Da muss man ein paar Sachen umstricken.

tough scarab
civic carbon
#

Is it possible to make a character creator or level up wizard (picking Items as class, ancestry, etc.)?
I know items can't be displayed in other items or user input templates but that would basically be a solution outside of the normal dragging dropping items from the Foundry Items tab 🤔

formal goblet
#

Possible... yeah. But how much effort do you want to invest?

civic carbon
#

I feel like "a lot of effort" for me is moderate for others :p

#

Could I use a roll/button to open a Character sheet that has all the relevant items displayed maybe?

#

And then drag them to the actual Character

formal goblet
formal goblet
civic carbon
#

Yeah, I mean like I create a "Character Wizard" Character with its own separate template displaying all items
And then create my players' character sheets using the actual PC template, with a button to open Character Wizard so players can drag and drop the items

formal goblet
civic carbon
#

I'm not tied to that idea obvs if there's something better/more straightforward/etc I'll look into it :)

formal goblet
heavy elm
civic carbon
# civic carbon I'm not tied to that idea obvs if there's something better/more straightforward/...

I'm just mindlessly playing around and I'm pretty sure it's not intended but you can edit a Label in a User Input Template and turn it into a Rich Text Area, even though you can't normally add a Rich Text Area to a User Input Template

Not sure if it's also unintended but you can add Item Displayers (which display the triggering actor's items) and Rich Text Areas to Tables inside User Input Templates

(which could solve my character creator/level up question but i wouldn't want to do it that way if it means breaking the system and it getting patched in the future)

spark lotus
formal goblet
north olive
#

Is there a known problem with CSB and Tile Controls?
I made a Tile and it is not going fully transparent. Solution?

manic crypt
#

I just created a random tile in my csb and didn't have a problem with opacity, so it could be a thing with the image you used.

north olive
manic crypt
#

Yup

manic crypt
#

It didn't occur to me that the image that was showing through the tile was the background until just now.

heavy elm
steel musk
#

Ah blessed I was about to ask something but then I realized that the formulas are case sensetive.

manic crypt
manic crypt
timid marten
#

Is there anyway to hide the "configure item modifiers" and everything from the GM perspective too? It breaks the CSS on my side..

formal goblet
storm stream
#

can I have a simple field's default text be the result of a rolltable?

manic crypt
#

It only updates when created, so it won't ever change, but I think they can be variable. It doesn't sound unfeasible.

normal ore
#

Guys, I'm trying to modify a label in an item container using an item modifier from another item.

Ok, I think that sounds confusing, but basically, let's say I have a set of items in this container that represent skills. I also have another item called Race.
In the key field of the Race item modifier, I added:

${fetchFromActor('attached', "lookupRef('pericias_lista', 'valor_teste', 'name', 'Acrobacia')")}$

When the skill item named Acrobacia already exists in the container, the modification works successfully. But it seems that if I include the Race item before obtaining the Acrobacia skill item, the modification no longer works. I tried adding the Acrobacia skill after the Race item, and the modification didn't work.

Would this be a bug, am I doing something wrong, or is it not possible to do it this way?

storm stream
storm stream
#

folks, what am I doing wrong?

manic crypt
#

Ah, I went and looked at the documentation, and I suppose I was wrong, sorry.

storm stream
#

oh well

#

thanks!

manic crypt
#

No problem, sorry for sending you down a rabbit hole that was stopped up.

storm stream
#

hahaha

#

no problem

#

I really want to create NPC actors that come filled with contents from a list (rolltable or else)

#

this is driving me up the wall coz I don't knwo how to start

manic crypt
#

I think, though, that you could set a static value that's filled from a roll.. in essence, you create the NPC and hit a roll button once that fills in the fields you want filled.

storm stream
#

and I was suggested to look at the "random(?)" function in "mathjs(?)" and I can't make heads no tails of that manual

manic crypt
#

Then the default value could refer to that generated static value

storm stream
#

how do I start?

manic crypt
#

I'm bodging up a test case, let me see if it works then I'll show you what I'm seeing.

storm stream
#

Much appreciated!

manic crypt
#
  1. Weapon table set up ('Weapons')
  2. Text Field on the Game Data tab (for my sheet this is normally only GM-visible)
  3. NPC Roll set up; I put it on my 'Junk' tab because it's something I'm not using on my sheet, but you could put it on the front page of your NPC sheet if you wanted to..
  4. Default Weapons spot empty
  5. Roll output...
  6. Label is now filled with the desired output. You could have this referred to in the default value of a weapons tab or something, or you could just directly input the results of the rolltable into a truncated equipment section. I don't think that there's any way to actually put an item into an item container without using scripts though.
#

Code in the Message roll:

${weaponroll:=[#Weapons]}$<br>
${#setPropertyInEntity('self', 'DefaultWeapon', 'weaponroll')}$```
#

The second line is technically less than optimal, you could have the whole roll inside the sPIE, but I like to have things for debugging.

#

as an extension, you could have all the NPC's stats and such be rolled by that one button press.

storm stream
#

alright! let me try this!!!!

#

This is AWESOME!

manic crypt
#

Also, if you turn off sending the message to chat, it doesn't have to reflect there, so you could just create a sheet, hit the button, and conceivably have a whole random NPC just appear in front of you. If you use background and personality tables too it might even fill in some things you can use that way.

storm stream
#

yes, a button for the whole sheet would be convenient, aye

#

i'll make one

storm stream
#

i'm using a lot of meta and fictional elements

#

here's the perchance generator, for example

#

NSFW text btw

manic crypt
#

Same process, and you can have as many keys defined by that one roll as you like.. Something like ${setPropertyInEntity('self','STRValue', '${[3d6]}$')}$ would just roll a D&D style stat number and stuff it straight into a 'STRValue' key.

#

Yeah, you could do some rolltable typing and create that same sort of output directly into an NPC sheet.

storm stream
#

Wait, I don't suppose I could have thenewactor come ou with a random name from a list or rolltable, right?

manic crypt
#

Sure, if you have a rolltable and a key set on the sheet you can make it happen. You could even have a list of given names and a list of surnames and put them together into a single name with a concat command.

#

so like:

${firstname:=[#FirstNames]}$
${lastname:=[#FamilyNames]}$
${setPropertyInEntity('self', 'CharName', 'concat(firstname, " ", lastname)')}$

Although the formatting for that concat might be off, I'm bad at free-form code sometimes.

storm stream
#

dang

storm stream
#

ok, so for this I am trying to put 2 results together in the same firld but I am messing up somewhere

manic crypt
#

the first one is closer to correct, although you don't want to use the | in there, you have to concat the results of the two rolls.

storm stream
#

double quotes kinda works

#

the second one got me this

#

'Gravelly: Rough, harsh tone.' 'Hesitant: Frequent ... pauses. Unsure.'

#

with the single quotes over each result

#

the 1st one got me nohing

storm stream
#

this is nearly perfect

#

but the results adds quotes, I don't get it

manic crypt
#

is the output you're not liking in the roll message or in the output on the character sheet?

storm stream
#

in the character sheet

manic crypt
#

Try adding this line at the very end of the whole thing:

${escapeQuotes(voiceroll)}$

and see if it outputs it without the quotes. I've been wondering what a use-case for that might be, and this sounds like it could be it.

storm stream
#

I mean, it won't kill me but

#

ok

manic crypt
#

The output should show up in the roll message when formatted that way.

#

the one we're looking for, I mean

#

I don't have my CSB open right at the moment to check it myself.

storm stream
#

still outputs them single quotes

#

'Variable: Alternates between slow and fast.' 'Melancholic: Sad, wistful.'

#

it's fine, Il'l survive that 😄

#

this is AWSOME

#

yeah, concat didnt work in this case either

#

i'll just accept the quotes no problem

manic crypt
#

I'll have none of THAT!

#

${!voiceroll:=concat(string([#Voice A]), " ", string([#Voice B]))}$<br>

#

Yeah, this outputs a string without the ' ' around it in the message chat, so you could just replace the last line with the sPIE from yours.

${!voiceroll}$```
storm stream
#

sPIE?

#

ah ok

manic crypt
#

setPropertyInEntity()

storm stream
#

set propertiy

#

yep, there you are

#

worked FINE

manic crypt
#

Great! And, just for your peace of mind, it's going to help me when I get around to doing all my table development for my sheets, so not only do I get to help you accomplish it, I'm sorting stuff I'll be working on eventually, so working the puzzles for you is helping me too. Hope it's all coming together for you!

steel musk
#

Silly question but is there a way to hide the item that is dragged into Item Displayer?

storm stream
storm stream
#

thak you so much for the assistanceand I hope your project is fun and satisfying too!

manic crypt
steel musk
#

Well at least won't waste time trying to 😆 thanks for the check.

manic crypt
#

What were you trying to represent with it?

steel musk
#

I tried to display for the players their past careers with a boolean. They can tick a checkbox in the item and mark it as a career they progressed from. It might be a bit confusing to see the careers in both fields. If its really troublesome I could make a new Equippable Item Template with just the name and tell them to drag that into the previous career field.

manic crypt
#

You could add a filter with not(<checkboxkey>) to hide just the one they have checked

steel musk
#

That would go to the Item Displayer's Item filter formula field?

manic crypt
#

Yes. Without a formula indicator on it (no ${}$)

steel musk
#

Alright thank you for your help!

manic crypt
#

No problem.

trail lake
#

Is it possible to have an item in an item display container that can generate a dice roll? What I am trying to do is set up a weapon item container that has a column which will read ‘Roll Damage’ and if pressed the damage will be rolled. So, on my weapon template I have a label that has the following:

Label Text: Roll
Label Icon: dice-1d20
Label roll message: ${Roll:=[2d6]}$
(See image)

However, when I add a weapon created with this template to a character sheet I get an error message in that column of the item display.

I hope all that made sense, as I think I have explained it badly!

I am guessing you cannot have such labels in an item display, but wanted to check, just in case there is a way and I am doing something obviously wrong.

vagrant hollow
#

Has someone ever made a Token Action HUD module/addon for CSB?
I tried to make my own, but I have a hiccup in my brain and don’t even get a start…

(I know, it will not be compatible to other CSB templates. But I would be able to learn from it)

shy osprey
#

Using the lookup command I can get a listing of item weights from item displayer.
However, I would like to get the sum of those weights on the actor sheet.
After browsing faq and this channel I am not sure that is possible, if it is, please tell me how

shy osprey
#

Hmm. I tried that but I get error.
${sum(lookup('_itemDisplay', 'weight'))}$ displays error but

${lookup('_itemDisplay', 'weight')}$
lists correctly the individual weights. What am I missing here?

formal goblet
normal ore
formal goblet
trail lake
#

Does anyone know how you make an attribute show up as a bar on the token by default? I can make attribute bars show up if I go into Protype token for the actor and then set the bars to what I want. But if I go to Game Options -> Configure Settings -> Core -> Default Token Configuration -> Resources, I cannot see the attribute in the drop-down menu for bar 1 or bar 2 – they do no appear. Is there a way of making the bars default for all actors created, or do I have to do it individually set them for each actor created through their Prototype token options?

shy osprey
#

@formal goblet Got it now! Problem was that the "weight" itself was based on a formula on the item sheet. So now I changed the itemdisplayer to show that formula instead of simply the value of the item. Thank you for the help though, I was so frustrated that the actual sum(lookup()) wasn't the right command

formal goblet
trail lake
oblique willow
#

Is there a way to disable players removing rows in dynamic tables? Feels weird you can control wether they can add things but not if they can remove them

formal goblet
oblique willow
#

Ooooh. That icon did not strike me as a lock. Would still like a way to lock the entire table, but I guess it works

formal goblet
oblique willow
#

Could be a setting that is only available if player-addable rows is disabled 🤷

formal goblet
oblique willow
#

Yes, but having to click the little lock button on every row takes a while and I'm afraid to miss one

formal goblet
oblique willow
#

That works too

crimson aspen
#

My players always have the "See hidden attributes" button in items. They dont have it in actors. I set the minimum role to edit item modifiers to GM. But it still is shown for normal players. Any ideas?

formal goblet
trail lake
#

If I wanted to have a 2d6 roll, but wanted to check if doubles were thrown, how would I do that? Would I need to have each d6 rolled separately and then compare the numbers of the two rolls? If so, how would I write that. I have been fiddling around with it, but cannot seem to figure out how to do it.

manic crypt
formal goblet
crimson aspen
#

nevermind - foundry also newest version

trail lake
formal goblet
manic crypt
trail lake
#

Ah ok. Thanks 😀

manic crypt
#

You can also move the formula for the doubles check anywhere in the message to let you format the chat card results.

storm stream
#

Is there a macro to create an actor already loaded with a certain template?

manic crypt
storm stream
#

When you making a ton of them at once though... XD

#

But yeah, no it's ok

formal goblet
potent fossil
#

hello, is it possible to put 2 condition for filtering items in item displayers?
like x == 1 AND y == 1

potent fossil
#

wait, really 🥲

formal goblet
potent fossil
#

now I feel stupid xD
Thanks alot

storm stream
elfin gulch
#

I'm trying to figure out how to fetch a item's name in a label roll message for instance:
(ITEM NAME HERE) Rolls ${Weapon_Die_Number}$d${Weapon_Die_Size}$ + ${fetchFromActor('attached', 'SHIELD')+Weapon_Modifier}$${DMG_TYPE}$ Damage and has ${Weapon_Effect}$ effect
I can't seem to find how to get it in the documentation, though I have only been working on this for about a day.

manic crypt
#

Ah, wait, so there's some context required to make an answer make sense for that.

#

looking at your keys, it seems like this roll isn't generated from an item container?

elfin gulch
#

It's in the item itself... maybe should move it to a container, but, I've kinda just been monkeying things out lol

manic crypt
#

no worries.

#

are you using the 4.2 or 4.3 CSB (the beta)? This approach is actually more feasible in 4.3, because it has fetchFromParent() available, but in 4.2 it's probably better to create your rolls in item containers (since that's how the players will more intuitively interact with them)

elfin gulch
#

Yeah, lemme see about moving it to the container lol

manic crypt
#

From the container, since it's being generated with an item already attached, you can just refer directly to player keys, and any keys on the item itself can be referred to with item.<keyname>.

elfin gulch
#

Thanks a lot :)

#

did what I wanted exactly

manic crypt
#

No problem. Glad to help.

elfin gulch
#

Next thing that I'm stuck on. I want to implement 'skills' for the system I'm making, these are selected before rolling an attack or the like and change the numbers for that attack. In sandbox I made it a bunch of items that modified background values and kept them modified as that was the only way I could figure out how to do it, along with ways to have numbers that are locked. It's been a minute since I set that up, though, so I'd have to look up how exactly it works.

Right now I'm not sure how I'd implement that in CSB, and I want to try a different tack, namely using a dialogue, so, I'm trying to wrap my head around this possibility. My main question is, is it possible to lookup a table in a dialogue, either for a radio or dropdown menu? I'd like to use a dynamic table if possible, just for scalability, if it's not possible should I use hidden values? My first attempt is below, but doesn't work

${item.name}$ rolled ${[:item.Weapon_Die_Number:d:item.Weapon_Die_Size:]+SHIELD+item.Weapon_Modifier+SKILL_MODIFIER}$```

Thanks for any advice in advance :)
grand obsidian
#

hi, I've tried the system during two hours yesterday night and I did not understand anything

#

Creating texts and labels was easy but OI did not manage to create Attributes for my games and formulaes gave me a headache*

#

I've thoroughky read the history of this channel to understand but found me thibking that the system was not so user friendly for people with no coding skills.

#

(having a tummy ache didn't help though ^^ )

#

I felt and still feel like an idiot. I have been an IT support for 16 years and not to be able to understand how to use the system make me ponder if I'm an idiot or if Foundry is too complicate for me.

trail lake
#

Is it possible to have an item that has a roll dice function as part of it? How would you set that up in the item template? I have tried adding a label column in the item template which has the roll dice function in it, but it comes out as an error in that column when an item is created using that template and then added to a character sheet.

grand obsidian
manic crypt
# grand obsidian I've thoroughky read the history of this channel to understand but found me thib...

Honestly, it's more casual-user friendly than Foundry is at the system development level, becuase a lot of the basic setup is done for you and you're just fitting in things you want.

In answer to some of your confusion, to set up a stat on your sheet, the best starting place is to create a Number field, then assign it the Str key. Next, create a Label component next to it, and in the key for that component, type in StrMod. In the label text field, type in ${floor((Str-10)/2)}$ This will create the basic Stat modifier from D&D (it's just an example, you don't have to use those).

For general thought process, Key = a defined value or formula or array, while the components are configuring parts of it (at least that's how I think of it, I'm NOT a professional).

manic crypt
#

So like yesterday when I was working with GiftofGabe on it, he had to set up a button to call rolls on his NPC sheet in order to fetch from rolltables to fill in the sheet automatically.

#

Which means you could have a roll set up on an item, but it would need to be a button press to activate the roll in a message (even if it's not sent to the chat display) in order to get a result.

#

You would have to make sure you were wording the roll correctly too, since the 'actor' at that point is the item, not the person it's equipped on.

oblique willow
#

Is there a way for 1 item to add another when dropped onto a sheet?

formal goblet
# trail lake Is it possible to have an item that has a roll dice function as part of it? How ...

It depends on the concrete scenario. If you have something like a variable Roll Formula for weapon damage, then the best thing you can do is to have the Roll Formula in a Text Field of the Item. Afterwards you can fetch the content into a Label Roll Message and let it roll there: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Formula-System#322-dynamic-roll-formulas

You basically split the declaration into the Text Field and the execution into a Label Roll Message

elder raft
#

Pardon the n00b question, can CSB work with and play with Foundry's card system?

formal goblet
# grand obsidian I've thoroughky read the history of this channel to understand but found me thib...

Coding skills help a lot, not gonna lie. The thing is, it's hard to make it more user-friendly as it is already, because you can't avoid certain base concepts like variables and functions if you want to automate certain stuff in this system. We can't change that at all. And it makes sense, because you need the tools to build your own calculations. Same with Excel, you need those functions to make custom automations work

formal goblet
formal goblet
elfin gulch
formal goblet
#

You might want to use User Input Templates instead

#

Or you change the output of the Formula in the way, that would fit the syntax (which you probably can't do without a script)

grand obsidian
#

One of my two friends who use Foundry is a dev. He is ok to assist me tomorrow night in order to help me understand how all this stuff work ^^

#

I think they really don't want I go back to Roll20 😉

#

The thing is we will go back to Roll20 temporarily during the time I will need to transfer the data to Foundry. I tried their new jumpgate engine and it works better. It will at least alleviate the load to have to temporarily go back ^^

elfin gulch
#

On a seperate note, is there a way to make a 'locked' number like in sandbox when you put an auto calculation in a simpleNumeric property?

formal goblet
elfin gulch
#

Gotcha :)

elder raft
#

Man, I feel like this question has been asked before and maybe even I was the one to ask it, lol, but I can't find it now 😅

Is there a way to add a button to a chat card for players to click to do something?
Specifically like the GM can call for a check with specific parameters, generates the chat card, then the players can choose who to "take it" and one of them clicks the button and interfaces with their sheet and uses their stats to make the roll/check?

manic crypt
#

It would require some custom scripts, according to Martin. It would be MUCH easier to just have the GM call for the check.

elder raft
#

😂 Yeah, so much is easier to just do... you know, manually like real people.
But man if you aren't automating away all your humanity, what are you even doing? haha

manic crypt
#

about the same question

elder raft
#

Ahh, yeah his explanation makes sense too

keen carbon
#

Is there any way to have an Item Container use one of its item's Label Roll Messages?

#

I have an "Equipped" Item Container, and I'm trying to get it to use the Roll button I've put into the individual items, since there are weapons/potions/armors all in it

manic crypt
#

As in you have different items with different formulae in an identically keyed roll?

The thing is, you create the roll message for the column on the container, so you would need to be able to use the same initiating formula for each item that shows up.

I dont know if it's a hard no, but it doesn't sound easy.

keen carbon
#

yeah, exactly

formal goblet
manic crypt
#

Oh, that makes sense then.

keen carbon
formal goblet
keen carbon
#

yes

#

i did

formal goblet
#

Which must be a string

keen carbon
#

ah

#

i had to use quotes

#

thank you

#

a module i'm using understands the roll and asks me about the dice size i use in it, so the code can access/understand the item roll, but when it posts the message into chat, all it says is "ERROR"

#

any idea why?

#

nothing in the error log, either

formal goblet
# keen carbon any idea why?

Nope, not without an error in the console. If you get the error from the Script above, then it's natural if you haven't disabled Chat Message creation

manic crypt
#

For instance consoleLog() throws an error in the chat card every time if you don't disable or hide the formula containing it.

formal goblet
keen carbon
formal goblet
#

Fixed

#

You should disable the Chat Message creation of the Label, otherwise you'll get 2 Chat Messages, because the script itself triggers an additional one

keen carbon
#

ahhh

#

works perfectly now

#

thank you very much

manic crypt
#

the consoleLog() is still working fine, it's just generating error outputs on the chat card.

elfin gulch
#

Is there a way to have a user input template call values from the parent item, or to create two roll messages from one message, or something like that, I want to make a "here's what the item does, and your choice" then roll the dice in a separate message, ideally without having to take a second batch of the same user input.

formal goblet
elfin gulch
#

It doesn't seem to work, plus it doesn't see the current values in the template either, so I'd need to figure out how to made a user input template in a user input template that passes it's values all the way to the original item or something goofy like that. There isn't any way to have the actual dice roll not roll until clicked in the chat feed correct?

keen carbon
#

i'm trying to make a roll that subtracts armor if there is a target, but otherwise just rolls damage

#
<div class="mb-roll">
<h3>Damage</h3>
${Roll:=[:roll_dice:]}$ + ${Strength:=fetchFromActor('attached', "str")}$ ${if(target) != '' ? ${- ${Protection:=fetchFromActor('target' , "protection")}$}$ : ${+ 200}$}$
<div>${! concat('<br><strong class=\"result\">', string(Roll+Strength-Protection), '</strong><br>')}$${roll_type}$</div>
</div>```
is what i'm using so far
#

when i have a target, it gives the proper result at the bottom, but the value for Protection shows as ERROR

#

and when i don't have a target, Error: undefined. Uncomputable token "ERROR" shows in the console and it doesn't roll at all

manic crypt
#

Without a target the values that come from the %{}% portion are returning null, so you might want a conditional up there to set target to 0 if you don't have a target.

#

I could be wrong on that though. My instinct says that the transition between the script variable target and the formula key target is where the problem is though.

keen carbon
#

ah, yeah

#

i've been assuming that if there is no target it would return as a null ''

#

how would i go about recognizing if there is no target, though?

#

i guess i could just print out target and see what it says, actually

#

ah

#

just returns as Undefined in the console

#

uncomputable token

manic crypt
#

If you don't have one?

#

Then I'd say fall back on an if then else format for the first script, and have it set the key target (as in ${target:=%{...}%}$) so the transition is easier. Your else statement can set it to ' ' so it's not undefined

elfin gulch
#

Is there a way to make a formula conditionally appear in a roll message? or better yet a way to make sections appear conditionally? if I have a blank option in a conditional it still shows the box, which isn't very pretty.

quiet dirge
#

trying to learn how to use dynamic tables, in Label roll message i have ${[d20 + :item.damage:]}$, and there is a column in the table called "damage", but i am getting an error, is there something wrong with my syntax?

keen carbon
keen carbon
manic crypt
manic crypt
#

Oh, RETURN.

Thats what you need in there. You need the then and else commands to start with return.

#

Mine doesn't because the ui notification can be triggered from the script.

#

Its explained in the api documentation on the wiki.

#

If it doesn't have a return command it doesn't pass data back from the % script

quiet dirge
keen carbon
#

i was wonderng about that

#

i've since changed it to

${%{if(target) {return('- ${Protection:=fetchFromActor('target' , "protection")}$');} else {return('');};}%}$```
and now it's back to saying that target is undefined
keen carbon
#

oh

#

the issue was because i separated the let target and the if target into separate formulas

formal goblet
formal goblet
elfin gulch
#

Similar question, can you conditionally hide the plain text of a roll? I'd think maybe with CSS, but need sleep so I can't look into it tonight

keen carbon
#

i think I've got it figured out, though

#

I'll post when i eventually iron it out

trail lake
#

If I have my attributes set on a dynamic table, and want to add one of the attribute modifiers to the initiative roll formula in the Configure Game Setting -> Custom System builder, how would I go about writing that formula? My initiative is on 2d6 but I want to add the Attribute modifier for a character’s Agility and Will attributes found on the dynamic table – the dynamic table is called ‘Attributes’, the individual attributes have the component key ‘Attribute’, and the attribute modifiers have the Component key ‘AttributeModifier’. I can work the dynamic table so I can access the attributes on a dropdown, but am unclear how I go grab a specific named ‘AttributeModifier’ off a dynamic table.

manic crypt
#

Usually you combine lookup and samerow to get a relative result from a unique aspect.

trail lake
#

Ok. The only formula I have used like that is: ${first(lookup('Attributes', 'AttributeModifier', 'Attribute', AttributeSelection))}$

I use this to allow players to access spefici attributes on a dropdown.

#

I just copied it from the example sheet I think

manic crypt
#

The best (least typing intensive) way to do it would be to define a hidden attribute or a label somewhere else where you can do the calculation or lookup and then have that saved as the modifier; for example you might have a hidden attribute keyed as 'InitMod' that you can use in the initiative formula, which also allows you to modify it with items later.

trail lake
#

Ok, but I would still need to knwo how to look up the attribute modifiers for Agility and Will, and that is what I am bit stuck on.

#

Or would I just add a new column to the dynamic table and then have label that creates the intiMod. Would that work do you reckon?

manic crypt
#

A whole column for it?

trail lake
#

Can I just add it to an exisiting bit label?

manic crypt
#

first(lookup('Attributes', 'AttributeModifier', 'name', 'Agility')) should return the Agility modifier, assuming that's what the key for the attribute itself.

#

assuming that's the name reference.

#

I meant to say.

trail lake
#

What I have for columns in the dynamic table are a column name of 'Attributes' with the component key 'Attribute, and a second column with the column name 'Modifier' with the component key called 'AttributeModifier'. That is all the columns I have in the dynamic table

#

So would i miss out the bit in your example where is says 'name'?

manic crypt
#

Ah, I'm thinking about item containers, they have a reserved column key called 'name'. Replace that with 'Attribute' then.

trail lake
#

Ok, cool. So it would read: first(lookup('Attributes', 'AttributeModifier', 'Attribute', 'Agility'))?

#

With all of them in ' '?

manic crypt
#

Yeah.

trail lake
#

Great! Your are a marvel!! Thank you 😀

manic crypt
#

No problem, hope it goes well.

trail lake
#

Thanks!

#

Ok. I am getting an error on the character sheet when I type in the formula to a label text box. Formula I am using is:
${first(lookup('Attributes', 'AttributeModifier', 'Attribute', 'Agility'}$

manic crypt
#

What's the error?

trail lake
#

NS_Error_Unexpected.

formal goblet
trail lake
#

Actually error might be: Custom System Builder | Parenthesis ) expected (char 68) SyntaxError: Parenthesis ) expected (char 68)

formal goblet
trail lake
#

This is my formula as of now: ${first{lookup{'Attributes', 'AttributeModifier', 'Attribute', 'Agility'}}}$

formal goblet
trail lake
#

Ah, ok. So those internal brackets (after the one after the $, should be ( rather than {?

manic crypt
#

yes

trail lake
#

Fantastic! I should wear my glasses. Sorry about being a bit thick when it comes to all this.

#

Working now 😀

steel musk
steel musk
#

Yes I will give this a try!

steel musk
trail lake
#

Why does this come up with an error: Total ${AgilityMod + WitsMod}$

I have component keys for both AgilityMod and WitsMod

formal goblet
trail lake
#

This is error message: Custom System Builder | Cannot convert "Agility Mod: 2" to a number Error: Cannot convert "Agility Mod: 2" to a number

The agility modifier is a Number field

formal goblet
manic crypt
#

if you run a ${consoleLog(AgilityMod)}$ does it come up with '2' or does it come up with 'Agility Mod: 2'? Because if it's the latter, it's a string, not a number.

trail lake
#

AgilityMod is the component key of the following formula; ${first(lookup('Attributes', 'AttributeModifier', 'Attribute', 'Agility'))}$

#

And is a number field

formal goblet
#

I literally mean the formula within the error message. You can also take a look at the actually calculated properties within the error message

trail lake
#

I cannot really understand the console, to be honest. This is what It is showing me:

formal goblet
trail lake
formal goblet
#

There you have the values of your properties at the time of your computation

#

And now you can expand props

trail lake
#

It is showing the my AgilityMod is not a number. It is a string with a number

#

So that is my problem.

formal goblet
#

Now check for Attributes and expand that

trail lake
#

Yes. I changed it and it is now working. I had 'Agilitymod: ${first(lookup('Attributes', 'AttributeModifier', 'Attribute', 'Agility'))}$'. I was presuming the text would read Agility Mod: and then show the number, but instead it took Agility Mod: and the number as the same thing. When I removed Agility Mod; from formula, then it worked.

I don't really understand all this code, just learning from trial and error!

formal goblet
#

If you want to have text, that shouldn't be part of the final value, use Label prefix and suffix

trail lake
#

Ok. So If I want some text to accompany the number, how would I do that, or would i need a seperate column for the text, before the number?

formal goblet
#

These won't become part of the properties

trail lake
#

Ah, ok, so Prefix or suffix. Got you. I wondered what those were for - I thought they were to do with fonts and such like 😀

#

So, now I have that working and a lable which has the formula ${AgilityMod + WitsMod}$ with the Component Key InitMod. However, in Configure settings, under System Builder, when I set initiative formula to [2d6] + InitMod, it is not adding the InitMod to the dice roll - it doesn't actually add the InitMod. And when I click on the dice roll in the chat it says InitMod = 0, whereas it should not be 0.

By the way, I apologise for asking such basic questions, but I struggle with all the formula stuff.

formal goblet
trail lake
#

Sorry, where do I type that in on the console? I tried pasting it in in the bottom, and it came up with:

#

THis is what I have in the label box and in the Game settings:

#

It is now not allowing me to roll intitiative

#

Ok. I am an idiot. It is now working. I forgot to update the character sheets on the character. I am really sorry for wasting your time!

formal goblet
pseudo zealot
#

Hey quick question, I saw that in setPropertyInEntity you are not able to change item entitys outside of item containers.
Is there a way to change a property of all items attached from an actor and using it outside a item container?

#

I'm kinda new with CSB and I don't have programing background so I'm struggling a little

formal goblet
#

Only thing you should keep in mind is to change game.items to entity.items as you want to change the Items of your current Actor and not those in the Item Directory

pseudo zealot
#

I'll give it a try, seems to be pretty much what I was looking for, thank you!

elfin gulch
#

Is there a easy way to conditionally hide the plain text of a roll message?

pseudo zealot
#

Also glad to hear that the limitation will be lifted.

formal goblet
elfin gulch
#

I didn't put 2+2 together for the "!" making a rolled thing plaintext lol

#

Thanks a ton :)

storm stream
#

what is the process of creating HP bars that the initiative system can identify?

#

when I look to set up health bars in the initiative options, it shows... unrelated stuff

storm stream
#

sure!

#

just a moment

formal goblet
storm stream
#

this is what it looks like in the default token config

storm stream
#

what you see is what I have

#

this is the list in the default token config dialog

formal goblet
storm stream
#

oh?

#

I don't know what you mean

formal goblet
#

The default Token is configured from the game settings, while the Prototype Token is configured from the Actor

storm stream
#

ooohhh

#

so

#

what shoud I do?

manic crypt
#

So you want it to show the character's hp in the initiative carousel?

storm stream
#

yes, I would like that!

#

I intend to use the boss bar module later too

manic crypt
#

Is that carousel combat tracker that you're using for it?

formal goblet
# storm stream what shoud I do?

Probably not much, because these values are coming from our static template-file, which cannot contain user-defined properties by design

#

These are loaded before any Templates

manic crypt
#

Martin, what are the criteria for a key being loaded into the Attribute Bar? Is it a number field with a max value?

formal goblet
#

Although, my Combat Carousel still has a tracking resource...

manic crypt
#

right, just checking.

storm stream
#

hmm, I am looking at the bossbar module and this is what it wants:

manic crypt
#

You would have to change the path to the javascript path to the prototype values for the token.

formal goblet
# storm stream

Make sure that these match with the ones in the options of the Token

manic crypt
#

So I have a feeling that what's causing your issues with pulling up the resources on the token configuration might be how you're handling hp on the sheet.

formal goblet
manic crypt
#

Oh, I didn't see hp as one of the options there. Fair enough then.

storm stream
formal goblet
#

Append them with .value and .max at the respective fields

storm stream
#

ooooohhhh

formal goblet
storm stream
#

I get an error

formal goblet
#

They belong there

storm stream
#

I am not sure I get it

#

I am surry, I am new to all this: i am to append .value and .max, do I do that in the template actor somewhere?

formal goblet
#

Where's your HP stored?

storm stream
#

as part of a dynamic table

formal goblet
storm stream
formal goblet
# storm stream

You must fill Maximum value to let an Attribute Bar show up

storm stream
#

but if that is variable, is there a formula?

#

(as in, by lvl ups or other effects)

formal goblet
grand obsidian
#

My best friend showed me tonight how to use the Custom System Builder. He did a lot of work, creating objects and a few templates, and then showed me how it worked.
Now that it's done, we've gone from a difficulty scale of 10/10 to 6 or 7 out of 10: I've understood things I didn't understand yesterday about objects and formulas, and it's going to take some time, which we'll be spending on Roll20 in the meantime, but I think I'll get the hang of it 🙂 . It seems a little less complicated tonight 🙂 .

storm stream
storm stream
#

only shows current though

formal goblet
#

You have to configure the Bar itself as well

storm stream
formal goblet
# storm stream

It must come from attributeBar, props only contain single values

#

But changes are high, that you have to create these Components outside of a Dynamic Table to work properly

oblique willow
#

In a roll message, how do I output a string if a certain condition is met?
Example: How do I only output this line if the actor has special as a non empty string?

Special: ${special}$
storm stream
elfin gulch
#

Can you filter lookup(), or something similar, by multiple checks. For example I have an ACTIVE column and an ATTACK column, each are checkboxes, and I want them to both be true for the result to be found.

oblique willow
storm stream
#

Ideally what shoukd i use instrad?

oblique willow
formal goblet
# storm stream Ideally what shoukd i use instrad?

Just the same setup outside of a Dynamic Table. You have to replace sameRow() with the concrete Component keys. That's it.

A number field will create an Attribute Bar automatically if it contains a max-value.

oblique willow
#

Tried with ! before item.damageNotes too

formal goblet
#

${${!item.damageNotes ? '' : '#'}$"Special"}$

oblique willow
#

Nope, nothing

formal goblet
oblique willow
#

The total label roll message is

Range: ${item.itemRange}$&ensp;Damage:${[:item.damage:]}$ Pierce ${item.pierce}$<br>
${${!item.damageNotes ? '#' : ''}$"Special"}$

and chat output is

formal goblet
oblique willow
#

Yep that worked, thanks

#

Scratch that, it always displays the string regardless if the textfield is empty or not.

formal goblet
#

Yeah, you are. The other values proofe that

#

What do you get in the console if you do consoleLog(item.damageNotes)?

oblique willow
formal goblet
oblique willow
#

Right, but its still there if the string is empty

formal goblet
#

item.damageNotes ? true : false just for a sanity check

oblique willow
formal goblet
oblique willow
formal goblet
storm stream
#

or maybe I could use Meter instead?

storm stream
#

it's working!

oblique willow
#

Sorry for the many questions today, this will be the last.
Whats wrong with my syntax here?

%{if (/^-?\d+$/.test(${item.cooldown}$)) {
    return await game.macros.getName('Add Alert').execute({argAlert: {
            label: '${name}$: ${item.name}$ cooldown recharges',
            message: '${name}$: ${item.name}$ cooldown recharges',
            userId: game.user.id,
            roundAbsolute: false,
            endOfTurn: false,
            phase: "Squad Phase",
            myDuration: parseInt('${item.cooldown}$'),}
        })
}}%

If item.cooldown is a number (and thus the if statement is true) then everything is fine. But otherwise I get this error

manic crypt
#

the parenthesis for .execute({argAlert: ... doesn't seem to close.

#

no, maybe it does.. sec, let me stick it in notepad++

#

maybe hit it with an else {return;} ?

#

everything was in place when I went through it, so it's not missing anything I can see.

oblique willow
# manic crypt maybe hit it with an else {return;} ?

I tried that too, but

%{if (/^-?\d+$/.test(${item.cooldown}$)) {
    return await game.macros.getName('Add Alert').execute({argAlert: {
            label: '${name}$: ${item.name}$ cooldown recharges',
            message: '${name}$: ${item.name}$ cooldown recharges',
            userId: game.user.id,
            roundAbsolute: false,
            endOfTurn: false,
            phase: "Squad Phase",
            myDuration: parseInt('${item.cooldown}$')}
        });
}else{return;}}%

produces the same error

foggy oxide
#

Maybe a stupid question but I don't get it right now. On my actor I can insert a weapon item into a dynamic table. One column shows the weapon damage value: ${lookup('item.WeaponAttacks', 'DamageValue')}$
This lookup is because a weapon can have differenct attack/damage types. Now on my actor sheet the weapon damage is shown like "3,5" because lookup returns an array of values.
So here is my question: How can I replace the "," in the array with a line break so 3 and 5 are shown among themselves?

foggy oxide
civic furnace
rapid hare
#

Hi, I found a small issue with the Example module for CSB - I re-downloaded it today and updated CSB to the newest version today as well... And I am told that I need to update CSB to the newest version, even that I just did? My CSB's version is 4.2.0, the Example file is 4.3.0.0
In the meanwhile, could I ask for a reminder how to how to make unequipped items not add their attributes to an actor?

oblique willow
#

You can certainly make macros that require parameters to execute though

civic furnace
#

I figured it out! I wanted to increase or decrease values based on an integer, but I'll settle for a test for now.

for those wondering
1- Create a macro with the desired name. In my case, I created one called testPrint:

// Macro: testPrint
const { args } = scope || {};

if (args) {
console.log("Argument received:", args);
} else {
console.log("No argument was passed to the macro.");
}

2- Execute the macro using the following inline code:

${%{game.macros.getName("testPrint").execute({ args: "Worked!" });}%}$

formal goblet
civic furnace
#

Is there a way to stop using inline coding inside ${%{}%}$ ?

formal goblet
civic furnace
#

I was referring to line breaks, like this:

${%{const macro = game.macros.getName("testPrint");
if (macro) {
macro.execute({ args: "Olá, Foundry!" });
} else {
console.error("Macro testPrint não encontrada.");
}
}%}$

#

From what i understood i need to write all of my code Inline like this :

${%{const macro = game.macros.getName("testPrint"); if (macro) { macro.execute({ args: "Olá, Foundry!" }); } else { console.error("Macro testPrint não encontrada."); }}%}$

formal goblet
#

No, you don't. You can use line breaks inside %{}%, no issue

civic furnace
#

ow... sorry

#

my bad

civic furnace
#

I'm kind of lost using fetchFromActor...

I created a macro and simply tried to write:

const Mana = fetchFromActor('selected', 'Mana')
console.log(Mana);

and my console says

VM3113:3 Uncaught (in promise) ReferenceError: undefined. fetchFromActor is not defined
[No packages detected]
at Macro.eval (eval at #executeScript (foundry.js:20082:16), <anonymous>:3:15)
at #executeScript (foundry.js:20087:17)
at Macro.execute (foundry.js:20028:35)
at #onExecute (foundry.js:79391:17)

formal goblet
wet vortex
#

Hi. Is it possible to make resource bar I can change through token?
All these (or meters configured in same way) do not work. Well, they work, just can not be added/subtracted through token 😭

wet vortex
#

Oh. I read it before like 3 times
and got it just now
sorry!

elfin gulch
#

Thought I'd share some successes! The armor system for my implementation of the Project Moon TTRPG is done! with conditional display of passive effects and skills!

elder raft
#

Is it possible to have a dropdown pull options from multiple dynamic tables?
Hmm, doesn't seem likely... Not sure there's a good way to even have a middle-man that combines them the dropdown then pulls from 🤔

#

maybe a way to double-up "lookup()" as a formula option for the dropdown origins?

elder raft
#

Haha okay, yeah I was getting there eventually. Glad I was at least looking in the right direction.

bright cape
#

Hi all! I apologize for the newb questions. I’m trying to use CSB to make a Dolmenwood character sheet, and several things are stumping me. The first is a simple die roll that I’m trying to apply to a label. I wrote it as ${[:strmod + 1d6:]}$ but it doesn’t work.

#

What am I doing wrong?

formal goblet
bright cape
elder raft
#

What is the best way to check if a dropdown (on a User Input) is empty or not?

#

equaltext to ' '?
hmm, or maybe just a == ' '?
No wait...

formal goblet
elder raft
#

Just got it! Always right before I figure it out that I ask.
It's like shopping, you can look for an hour but the moment someone comes and asks if they can help you find something... it's right in front of you

elder raft
#

Hmm, okay,
now I'm trying to generate an array that counts from 1 to a value in a number field for a dropdown, but even passing stuff through %{}% and I'm trying Array.from() but must be screwing something up...

formal goblet
elder raft
#

Letting players choose how many "charges" to spend on a roll, up to their current amount

#

does range work? if I pass the charge variable to it? That might be easier...

formal goblet
elder raft
#

FROM range.... ooooh okay

elfin gulch
#

Heya, I'ma head to bed, but, I was wondering, since I can't figure it out, at least partially because tired, is there a way to remove all the default status effects from the bar/menu? using Monk's Little Details I can add new ones, but I'd like to remove all the old ones too. The system I'm working on has like 30+ statuses, so adding those on top of the default 35 is not a preferable prospect.
Any help would be appreciated, thanks in advance :-)