#Custom System Builder

1 messages · Page 14 of 1

glossy hare
#

there is one more thing lol

#

i swear it is the last

formal goblet
glossy hare
#

.

glossy hare
formal goblet
#

Inline rolls, huh... I´d need to take a look at it

tidal quiver
#

@light hinge That's the crimes on character sheet I have commited for now for the weapons and shield part

tidal quiver
#

It's (from left top to left down and then other column)
Health and speed
Melee weapon 1
Melee weapon 2
Shield

Throwing weapon
Bows

#

But it's... Static in character sheet for now

glossy hare
#

what this buttons mean?

tidal quiver
#

Attack, Evade, Parry

glossy hare
#

ok

#

where the itens should be?

#

OK

#

i see now

tidal quiver
#

Well... I thought about fields "Nazwa" (name), "Kość obrażeń" (damage dice), "Cecha" (attributes) being pulled from the item object. So perhaps making the Nazwa field a dropdown list of item objects?

glossy hare
#

this is the actor sheet

#

or it is the item template?

tidal quiver
#

Actor sheet

glossy hare
#

ok

boreal hull
#

In a visibility formula can I use a conditional between two keys as such: current_endurance >= item.weapon_endurance_expenditure_requirement

glossy hare
#

there are some changes that you will need to dow

tidal quiver
boreal hull
#

it doesnt seem to be working haha so....

glossy hare
#

you created a lot of itens containers, and that not how it's works. Think the intem container as a dynamic table that you add rows (itens)

#

if you click in this button, you will add a new collumn to the item container

#

and that you will need to do

#

in "Bron reczna I" you will create a item containter with "Nazwa" / "Kosc obrazen" / "Cecha"

#

the same applies to the 2 and 3

#

also one more thing

boreal hull
#

Im not sure why it isnt working though because the "item." field has a numerical value, and the formula should find that and use it but idk

#

confusing

boreal hull
glossy hare
formal goblet
boreal hull
#

well what do you suggest then? haha

glossy hare
# glossy hare also one more thing

@tidal quiver as you said. The 3 names are going to be taken from the item. If you create 3 containers, you would need 3 different items

boreal hull
#

Im trying to make it so it hides the button when the endurance requirement of each individual item is not met

#

why cant it reference 'item.'?\

#

if the label "button" is part of the item container

glossy hare
#

and there is one more thing

#

i guess theese button you will use to use the items right?

tidal quiver
#

Yup

glossy hare
#

so you will need to include them inside the item continer

tidal quiver
#

Well... Kinda except shield, cause it should just add flat

#

That's why it doesn't have button

glossy hare
#

because they can't find the item

#

tbh, i would remove damagedice and weaponattributes display

#

and make only the buttons

boreal hull
glossy hare
#

for example

glossy hare
#

make them as labels

#

it should be like that

#

but whit your buttons

tidal quiver
#

I could do that with DD and Atak button, but WeaponAttributes need to stay, otherwise one would need to search for them in the book (do I think right?)

tidal quiver
#

I guess adding Evade and Parry button to it also wouldn't make much difference in how it looks

glossy hare
#

when you open it

#

it is wrote inside of it

tidal quiver
#

Yup, while being two handed (duh), unwieldy (evasion -1), slow (parry -1), and long (2 meters range)

glossy hare
#

can you do me a favor please?

tidal quiver
glossy hare
#

open the cfg tab of one your items containers

#

in this section, it does show nothing right?

tidal quiver
#

I see templates to select (cause I made empty ones for now) it just doesn't show anything in filters

glossy hare
#

oki

#

aside from the bonuses and quantity limitations, there are other difference between weapons?

tidal quiver
#

One handed, two handed and spears all use different skill for attack check (easy part, just do it in button), different damage dice, and attributes. Thats it for melee.

Ranged different skill, different damage dice, different ranges (and max ammo) different attributes.

glossy hare
#

now it's your time to decide how you want to make your weapon templates

#

creating one for each weapon category

#

melee ; ranged ; trwoing

#

or a generic one that you choose inside of it the weapon type

tidal quiver
#

I think that one per category will be cleaner

formal goblet
glossy hare
#

a melee wepon have the following attributes if i'm right:

a name ; a skill ; a damage die ; and a attribute

boreal hull
glossy hare
#

he will need to create the code

#

to allow that

formal goblet
boreal hull
#

Okay, is there any simplified version of what I am trying to accomplish that you could think of?

tidal quiver
glossy hare
#

because how the button will know what skill it will use?

tidal quiver
glossy hare
#

maybe it's because i don't know the system

#

but the skill is just "melee"

#

or are "spears" ; "swords" ; "axes" ?

tidal quiver
#

Spears, One handed, Two handed

glossy hare
#

see

tidal quiver
glossy hare
#

so, yeah

#

name; dd; weapon skill ; attributes

#

can you please create a blank item template called : melee weapons - template ?

tidal quiver
#

Done

glossy hare
#

now it's up to you how you will do the design

#

but

#

i prefer creating a panel first

#

you will need to create 3 fields

#

one text field for damage dice ;
a dropdownlist for the skill type ;
and a dropdownlist for selecting the attribute?

#

what is the attribute?

#

i forgot

#

💀

tidal quiver
#

Its one or more attributes that weapon has, that adds modifiers to your attacks/evasion/parry. So I think that as long as we don't really have to show it in characters sheet, I should make them on checkboxes, and just later send labels to character sheet, or really don't show them at all

glossy hare
#

it will be like that

#

i reccomend using a table

#

@tidal quiver after you create it, ping me

tidal quiver
#

They have constant values so no need for third column from yours

quasi plume
boreal hull
glossy hare
boreal hull
#

so i was trying to use the "item.weapon_endurance_expenditure_requirement" label from the items itself, but @formal goblet said that don';t work

glossy hare
#

create an item

tidal quiver
#

Make it as variable to check outside of roll and sending a flag to the roll?

glossy hare
#

and use this template

#

(i'm in a omega striker match now, so gimme 5 minutes lol)

tidal quiver
quasi plume
boreal hull
quasi plume
glossy hare
# tidal quiver <@294945958729482241>

okay it is good. now it is time to make this work ;

i will assume that you have a attack label as a columm inside your item container
first, inside you dropdown panel, you list each skill that melee weapons can have as labes. For keys, use 0,1,2,3,4.....

inside your attack label formula

you will need to create a variable, that uses a switchCase. it should be like that

skillModificer := switchCase('item.dropdownPanelKey','1','skillKey','2','skillKey2')...

i will be playing now, but don't mind pinging me

boreal hull
tidal quiver
#

You meant in Label Roll message?

glossy hare
#

yes

tidal quiver
#

(which probably, rather for sure, isn't)

glossy hare
#

😂

#

what is the key for the dropdownPanel that you created at sword?

tidal quiver
#

WeaponSkill

#

Hey, I'm debugging by getting errors and figuring them out 😛 No "working" button, no errors to show up 😛

glossy hare
#

in this line
its should be

skillModifier := switchCase('item.WeaponSkill','1','skillKey','2','skillKey2')...
#

but

#

you will need to change

#

skillKey

#

for the key for the value of the skill

#

for example

#

'1','skillSword'

#

'2','skillSpear'

#

if the skill are on a dynamic table

#

you use fetchFromDynamicTable

tidal quiver
#

${skillModifier := switchCase('item.dropdownPanelKey','1','OneHandedSkill','2','HeavyWeaponsSkill','3','SpearsSkill')}$ ${string([2d6]+skillModifier+PCAttrDEX)}$

glossy hare
#

but

#

you need to change this

tidal quiver
#

It changed again...

glossy hare
#
switchCase('item.dropdownPanelKey'...
```for

switchCase('item.WeaponSkill'...

tidal quiver
#
${string([2d6]+skillModifier+PCAttrDEX)}$```
#

Like this?

glossy hare
#

yes

tidal quiver
boreal hull
#

Is there a way to have a button when you click on it, check a checkbox for you?

#

or another checkbox

#

Im trying to have a checkbox or button in an item which checks another checkbox off in the character sheet when clicked

boreal hull
#

How do you make a roll button that can be activated from the chat?

#

Or clicked on I mean

vestal vortex
#

Hey guys, this was probably been asked before (and my blind self couldn't find it) but is there a way to refer to the number rolled by the dice instead of the total result?

Example: I want that, whenever a 6 is rolled ** on the dice**, no matter the final result, it'll be a Fumble (for ability test) or a Critical (For attack test). The way i achieved it until now was to use the following formula

<b>${charname}$</b> makes a melee attack on the enemy <p><b>Dice result:</b> ${roll:=[1d6]}$ </p> <p>The attack causes ${roll == Crit? roll + abichar + (strchar * 2) + afmod : roll + abichar + strchar + afmod}$ damage</p> <p> <b>Hit Type:</b> ${roll == Crit? '<b>LETAL HIT! </b> ' : 'Normal Hit'}$ </p>

What i want is to incorporate the dice roll into the damage message, while still referring to the dice result to show it as a fail or a success. But when i try it, it takes the final result (dice roll + ability + strength + attack force) as the reference. So if the dice rolls a 4, but the final result is 10, it refer to it (10) instead of the number rolled by the dice (4).

This would also serve for the multi-attack macro of the system, since i could refer to each dice rolled to make it automatically add the strength or fire power multiplier for each critical result, instead of having to add it by hand each time.

formal goblet
tidal quiver
#

But what if he would write them to variable? And then refer to it for his thing and for the rest of the roll?

formal goblet
#

He does that already

boreal hull
#

I am trying to do something complex: I want to have a damage dice roll that can reference the damage dice of the particular weapon for which the roll is for. For example: a dagger has a damage dice of 1d10, but another weapon has one of 1d12 etc. Can I do something like: ${[item.weapon_damage_dice] + :virtue_body:}$ for the roll? with the [] as the roll type? if what is being supplemented there is [1d10] from the item itself?

#

@formal goblet

boreal hull
#

it slightly confusing to me

formal goblet
#

keys inside [] must be surrounded with colons

boreal hull
#

okay yeah I just tried that and it still outputs ERROR.. hmm

#

and it does work to use a 'item.' to reference a text feild which has "1d10" in it, to bring it into the roll?

formal goblet
boreal hull
#

In the console it says error, and it says that the value is undefined, but the item has the text "1d10" in it so i dont know.

formal goblet
#

Screenshot the error and show the formula again

boreal hull
#

Damage Roll:  ${item.name}$

${[:item.weapon_damage_dice:+:virtue_body:+:athletics_mastery_bonus:]}$

#

@formal goblet

formal goblet
#

Check if the key in the Item Template is right

#

And don´t forget to reload the Item in the Actor, if you added it recently.

boreal hull
#

oh yes i did not try that

#

It worked!

#

Thanks so much for your help.

#

@formal goblet

tawny hatch
#

With the existing custom system submissions that are in the repo, are there any that would be recommended to use for reference that would compare to pf/d&d/pta/ptu/etc? I am trying to assist someone with something and tend to have alot of questions and like to reverse engineer my answers if I have similar things to look at.

tawny hatch
#

thank you. I'll tear into it. c:

#

If they didn't look at this example first I'm about to give him some flak. Thank you c:

boreal hull
#

I am trying to have an item effecting a number field with an item modifier which subtracts from the number in the number field, but when I put the item on the character the number field still remains at 0 instead of -3 etc.

formal goblet
tiny hinge
#

with formula support in drop down fields now, is it actually possible to populate the drop down field options with item container contents (like the name)?

#

saw this in the kofi page

scarlet skiff
#

Dont know If this ist already resolved but you should be able to do this with a macro
or maybe i misunderstood the task 😅

noble tendon
#

hi, i have a questión.

How can i resize the image of subtemplate?
prueba is actor, creature is subtemplate.

formal goblet
halcyon gull
#

Hello, I'm don't know what's going on. I'm trying to modify an the Attribute bars for an NPC but the system is preventing me from doing so. Like see this picture, unfortunately my cursor wasn't saved in the screenshot but it gives the usual 🚫 sign when I hover over at the attribute bar values in attempting to modify them (and the numbers are greyed out in the (proto)type token. This isn't an issue for PC tokens so I don't know what's going on.

halcyon gull
#

I see

quasi plume
#

Is CSB capable of targeting multiple tokens and adjusting their HP with one attack? Basically AOE.

formal goblet
quasi plume
normal ore
#

Is there a place where people are publishing example scripts?

#

In CSB?

boreal hull
#

can you use "x"as a multiplication factor in a formula?

formal goblet
formal goblet
glossy hare
#

hey CSB devs, why isn't possible to transfers itens between actors? I'm not demanding for it or like that, i'm just curious the tecnichal reasons for that

formal goblet
latent sorrel
#

Is there a way to have items be aware of other items with the same name in the same container and increment an index within the item based on the number of occurrences.? So one would have index 1, the next index 2, and so on.

formal goblet
stoic hearth
#

Hi, I'm a user who just started using this system recently. I'd like to try adding a talent field on a character sheet that will affect basic attributes. For example, "Might," which would increase Strength by +1. I want to create a feature table and allow users to select corresponding features from a dropdown menu on the character sheet to trigger these effects. Where can I learn how to set up this part of the program?

zinc verge
#

not possible to have a roll message play an animation/video, right? Trying to figure out how to add animations to spells on cast

zinc verge
#

actually, I figured it out, but I have a small issue now.

I basically used a script in my roll formula to trigger a macro that has an animation play when I roll damage, which works great, but since the macro has no "value" it also sends a message to chat saying "undefined" next to the damage roll text.

Is there a way to suppress this text specifically? I don't need the entire message suppressed I just want the undefined text to not show in the damage roll message

formal goblet
zinc verge
#

to send it to the formula as a string I just remove the return from the script right?

zinc verge
#

ah gotcha thank you!

formal goblet
# stoic hearth Hi, I'm a user who just started using this system recently. I'd like to try addi...

I suggest that you read through the README of the project first, it contains all necessary information to work with the system: https://gitlab.com/custom-system-builder/custom-system-builder/

You can also take a look at the example-template to get familiar with the system: https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/develop/sheet-library/Example

If you still have questions, feel free to ask them.

potent fossil
#

Hello, does someone have an example of a macro they use in order to update attributes according to variable value ? I've been struggling with this the last few days with no success

potent fossil
formal goblet
potent fossil
# formal goblet So you need to also pass values to the macro? Then check this example from the R...

Not necessarly passing values to the macro. Here is how it works in a simplified way :
1- a dialog opens asking the user to introduce all changes to HP separated by a comma [example : +4,-5,+1,+10]
2- the macro sums the list a gets a number that it stores into hpmod. [in our example : 10]
3- then macro uses :

/// ...
 updateProperty(a, 'HP', '${HP + hpmod}$');
///..

But the values do not update. I just figured that it was because hpmod didn't mean anything to the updateProperty function. when I replace hpmod by 5 the macro works

formal goblet
potent fossil
#

Okay thank !

potent fossil
#

It worked 😁

vestal sable
#

Hey ! Does anybody know how to add items to a character's inventory ? I have inserted an item field in the pannel on a template character sheet, but I cant seem to be able to drag items towards it so I wonder how it really works, or if I misunderstood the use of the "item container" thing
Thanks for any tips !

lament wadi
#

Hello, I have been playing with inline rolls and wanted to know how to reference a variable.

I know that you can point towards a component like this
[[/roll 1d20 + @str]]

But what I want is to reference a variable

[[/roll 1d20 + @var]]```

Obviously just using "@" is not working, and I wanted to know how it is done
lament wadi
#

No. In fact, it throws an error

#

I have removed the spaces and it no longer throws an error

#

But instead it shows in chat like this

formal goblet
lament wadi
#

That fixed it, thanks 😄

faint wharf
#

Yo. I support and vote but i forgot to check whats goes in. I cant find in changelog but was there item.item container voted out or in? will be there a way to nest items? i found something similar but its for dnd5 but in works it looks greate so maybe there is something to canibalize? https://gitlab.com/tposney/itemcollection

latent sorrel
#

Yes, there are item containers and, from recent poll results, there will be the ability to add sub items will be added. This means either pieces of equipment, like scopes, or adding qualities (ie accurate) have things dropped on to them.

fair yoke
#

Hey

#

using what you helped me out with yesterday to integrate macros in with CSB rolling

#

just wandering if I wanted to add a second tag to this...

#

%{return await game.macros.getName(rolls).execute({Skill ${Ath2}$})

#

how i'd go about it?

#

since I've got it setup in the macro to allow a wild dice to roll as a different colour (with dice so nice) simply with dice=[fire] as an example

formal goblet
fair yoke
#

ok thanks, just still learning and not sure where everything fit within the brackets etc for doing two

formal goblet
fair yoke
#

yeah

#

so just...

#

%{return await game.macros.getName(rolls).execute({Skill ${Ath2}$, Dice ${Dice}$})

#

then?

formal goblet
#

Don´t forget colons

fair yoke
#

script doesn't have them but they are still needed there?

#

script being setup as... const rollData = {skill, dice};

#

and then both of those just being plugged into a roll command

formal goblet
#

This won´t work...

I´ll give you an example how the syntax looks like if you´re defining an object:

const person = {
  firstName: "John",
  lastName: "Doe",
  age: 50,
  eyeColor: "blue"
};

You see that the fields (firstName, lastName, ...) in the object person are listed as key-value-pairs separated by colons. What you pass into the execute()-method of your Script is nothing different than an object (just without a name like person).

After that, you can access these values in your Macro just by using their name (in your case: Skill and Dice).

fair yoke
#

well here is the whole script I am trying to run

#

const formula = "(@skill)d6cs>=4 + 1d6x=6cs>=4@dice";
const rollData = {skill, dice};
const roll = await new Roll(formula, rollData).evaluate();
const isFail = roll.dice.at(-1).results[0].result === 1;
await roll.toMessage({flavor: isFail ? "Critical Failure": ""});

#

basically the dice rolling system for Mythic D6 since its wild dice is...a bit of a headache for standard foundry roller

#

given it also has a critical failure roll on a 1

formal goblet
#

Your macro is fine, it´s just that the syntax for passing values between Script and Macro is not right.

fair yoke
#

ahh

#

so I need to put them on separate lines for sending to the macro from CSB sheet?

formal goblet
#

No, Tabs and Whitespaces are irrelevant. You´re just missing colons in-between Skill & ${Ath2}$ and Dice & ${Dice}$.

fair yoke
#

ahh

#

so dice: ${Dice}$})

#

?

formal goblet
#

Yep

fair yoke
#

I assume I'll need to change them in the macro too

forest junco
#

I just logged in to my world and my sheet was blank and nothing was moddifiable. Anyone else having this problem?

formal goblet
fair yoke
#

ok, something is still not working there

#

added them in

#

it just posts the whole thing to chat without triggering the macro

formal goblet
fair yoke
#

its set as a script 😛

#

not going to make that mistake twice <.<

forest junco
formal goblet
#

You probably didn´t close the Script-expression in CSB: %{Content of your Script}%

formal goblet
forest junco
formal goblet
#

There is still nothing from CSB. And no errors whatsoever (you can ignore the one with the screen resolution, that one is normal when the console is open)

forest junco
#

right

#

every time I try to create a new _template it comes back as my first screnshot

formal goblet
#

You are not the first one with problems at forge.

#

And I have no clue what goes wrong there

forest junco
#

should I be working on this system outside of the forge and then try importing the world and see if that works? It seems like either way I'll have to start over...

fair yoke
#

<p>%{return await game.macros.getName(rolls).execute({skill: ${Ath2}$, dice: ${Dice}$})%</p>

#

in CSB

formal goblet
fair yoke
#

yep setup as a button

formal goblet
fair yoke
#

nope it's just telling me foundry created chat message when I hit to roll

#

Ath2 I have set as a hidden attribute just PHY+Ath

#

which should be fine for its formula

#

both are defined and filled in fields

formal goblet
#

Are Ath2 and Dice numbers?

fair yoke
#

Ath2 should be, its just PHY+Ath which right now for testing is 3+1

#

Dice is not

#

it's telling the macro to roll a difference dice colour with dice so nice

formal goblet
#

Then wrap that with quotes

fair yoke
#

but triggering the macro outside the character sheet just through the chat /macro command that worked fine

formal goblet
#

'${Dice}$'

fair yoke
#

done

#

didn't change anything

#

do I need to add colons to the dice and skill in the macro?

formal goblet
#

Which version of Foundry and CSB are you using?

fair yoke
#

CSB 3.0.0 currently

#

and foundry V11 stable - patch 8

#

Build 308

#

all as up to date as it can be

#

the script runs fine with /macro rolls skill=3 dice=[acid]

formal goblet
#

Oh boy...

fair yoke
#

ahhh

#

I assume you mean the ) ?

formal goblet
#

Just swap those 2

#

Actually... nervermind, you just missed an } before %

fair yoke
#

VM7330:3 Uncaught (in promise) SyntaxError: Invalid left-hand side in assignment
at AsyncFunction (<anonymous>)
at processFormulas (ComputablePhrase.js:166:40)
at async ComputablePhrase.compute (ComputablePhrase.js:212:34)
at async HTMLAnchorElement.<anonymous> (Label.js:271:21)

#

current error now

formal goblet
#

Hey, we are further 😅

fair yoke
#

yee

#

<p>%{return await game.macros.getName(rolls).execute:({skill: ${Ath2}$ dice: $'{Dice}'$})}%</p>

fair yoke
#

no clue

#

you mean the colon?

formal goblet
#

Yeah

#

No key-value-pair -> no colon. Also, you´re missing a comma between skill and dice

fair yoke
#

deleted the colon, added the comma

#

still got the same error

formal goblet
fair yoke
#

fixed that already

#

%{return await game.macros.getName('rolls').execute({skill: ${Ath2}$, dice: '${Dice}$'})}%

#

and no quotes around Ath2 because that'll end up a number

formal goblet
#

Still same error?

fair yoke
#

yep

#

VM7458:3 Uncaught (in promise) SyntaxError: Invalid left-hand side in assignment
at AsyncFunction (<anonymous>)
at processFormulas (ComputablePhrase.js:166:40)
at async ComputablePhrase.compute (ComputablePhrase.js:212:34)
at async HTMLAnchorElement.<anonymous> (Label.js:271:21)

formal goblet
#

Did you reload the actor?

fair yoke
#

each time I've changed anything yep

formal goblet
#

%{return await game.macros.getName('rolls').execute({skill: ${Ath2}$, dice: '${Dice}$'})}% is correct. Your macro seems to have issues.

fair yoke
#

const formula = "(@skill)d6cs>=4 + 1d6x=6cs>=4@dice";
const rollData = {skill, dice};
const roll = await new Roll(formula, rollData).evaluate();
const isFail = roll.dice.at(-1).results[0].result === 1;
await roll.toMessage({flavor: isFail ? "Critical Failure": ""});

#

is the entriety of the macro

#

and I run it from the /macro command in chat and it goes fine

#

/macro rolls skill=3 dice=[acid]

#

you know what, I'm going to try simplifying this issue a little

#

I just deleted the dice option completely and it worked

#

so wtf is going wrong there

formal goblet
#

I reconstructed your example and it works. Check if you get the right values from Ath2 and Dice (you can use Label prefix for that).

fair yoke
#

I suspect its because dice in order to work and alter the colour of the wild dice requires [ ] around the command

#

like [red]

#

having PHY+Ath should be fine as the formula for Ath2 right?

forest junco
#

So I just tried exporting it to foundry and it worked, and now it's showing up in the Forge too. Weird bug.

formal goblet
formal goblet
fair yoke
#

so would the [Red] being put in screw things up somehow?

formal goblet
#

No

#

Tested it with a text field, no issue

fair yoke
#

ok, then wtf was going on

#

because '${Dice}$' should be perfectly valid

formal goblet
#

You can create a test template on your own and test things out

fair yoke
#

in my macro would I have to quote mark it since it'd be text there?

formal goblet
#

No, they are already stored in a variable

fair yoke
#

ok well, no fancy different coloured wild dice I guess

#

but got the rest working

#

it'll do

blazing ibex
#

i got css grid mostly working with item containers

stoic hearth
#

Hello, everyone. I'm attempting to use ${[::]}$ program to import calculation results, but I'm unsure why it's failing. I'm wondering if a separate formula is required to calculate the result.

Example:
A_key ${[:(b_key+c_key):]}$
D_key ${[:A_key:]}$

Calculations in A_key are successful, but when I attempt to use D_key to import the result from A_key, I encounter an error.

stoic hearth
#

🤔 i try ,thank

latent sorrel
#

I am trying to use the following code within an item to generate output based on the value of num box on the item:

let ranks = ${skillRank}$;
let output = "";
for (let n = 1; n <= ranks ; n++){
  output = output +"<span class=\'advantage\'>l</span>";
}
return output;
}%```
It out puts the following error. I know it relates to the single quote but attempts to use single, double, or escaped quotes have been unsuccessful. How do I overcome this error?
formal goblet
blazing island
#

need some help, im just new to css and customizing a game system into a sheet. I'm trying to use the switchCase expression by fetching a key from a user input Number Field and makes a return string into the label. but all I got is an Error from the sheet

${switchCase (xp ,
>=100 & <600 , "2" ,
>=600 & <1200 , "3" ,
>=1200 & <2000 , "4" ,
>=2000 & <3000, "5" ,
>=3000 & <4200 , "6" ,
>=4200 & <5800 , "7" ,
>=5800 & <7500 , "8" ,
>=7500 & <10000 , "9" ,
>=10000 , "10" , "1")}$

formal goblet
blazing island
#

so i need to make a check outside or another way for it to calculate without range?

#

thank you

blazing ibex
#

are you looking for something like this?

${experience > 509999 ? 9 : experience > 253999 ? 8 : experience > 125999 ? 7 : experience > 59999 ? 6 : experience > 29999 ? 5 : experience > 13999 ? 4 : experience > 5999 ? 3 : experience > 1999 ? 2 : 1 }$
blazing island
#

oh yeah something like that

#

thank you, I never used these kind of syntax before

#

i used to C++ more

blazing ibex
#

first conditional has priority, last "else" is if nothing applies. you must include an "else" or it will spit out an error
? then
: else

blazing island
#

So it is a if else without the function there?

#

Like built in if then else of its own?

blazing ibex
#

the "if" is silent? its kinda hard to explain since im not a real coder

blazing island
#

I used to code some pdf and c++ but it was long ago. Thanks a lot really. Im not used to js yet

blazing ibex
#

i grew up with BASIC so im used to thinking in those terms

blazing island
#

VSB?

blazing ibex
#

no, like. basic BASIC

#

im old

blazing island
#

Ah, i hadnt learnt that one yet

blazing island
#

O h gee

#

S is string???

#

Or that in integer

blazing ibex
#

X$ is a string

blazing island
#

Ook

formal goblet
# blazing island Like built in if then else of its own?

The conditional (ternary) operator is the only JavaScript operator that takes three operands:
a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.
This operator is frequently used as an alternative to an ...

blazing island
#

Thank you, its a new language for me

noble tendon
#

hi, i am trying for first time userinput template.
I create a inputusertemplate with some numberfields. My problen is that i dont know how to call the userinput template.
first paragraph dont say how to call, second dont work

fair yoke
#

@formal gobletWhenever you want I am ready to throw the Mythic D6 system template and macro json your way, if you wish to add them to the library?

noble tendon
#

i create the userinput, put the numberfields, but dont know what do do next with the button. I wan pass all keys, make some calculs and show in chat all calculs.

fair yoke
#

You can also have it do some maths in the background with hidden attributes so if you have some bonuses that are added you can just do it there and have the final number used elsewhere.

misty terrace
#

OK, tactical/design question for the room. The system I'm prototyping allows players to enhance skills with the equivalent of XP in the system. So, for example, if a character has the 1-Handed Weapons sphere (school), it comes with a basic attack (Sweep, does 1d6 damage) and a basic defense (Parry, on success take 1/2 damage).

I want the players to be able to choose from a broad list of potential augmentations to skills, so they could spend Potentail (XP) to add the "Riposting" effect to Parry, which would allow them to roll damage in addition to the base effects of the Parry talent. I had planed to make a series of Item templates (called 'Augments') with an "effect" text box, then put an Item Container in each equipable talent (and piece of gear) that would accept the Augment type. So a player could drag the "Riposting" augment onto the "Parry" talent on their sheet and it would add the effect text to an item container. Then I'd concatenate the effect text from that container to a different label to put the effects together as reminder text to the player (will try to turn it into automated effects/updates when Active Effects work).

The challenge is that, at the moment, you can't put items in Item Containers on other items. I'm trying to think of alternative techniques and hoping that someone has already done something like this in a system. Any thoughts or insights?

fair yoke
#

sounds more like a character skill than something directly attached to an item, guy with parry for instance could do so with a rapier sure, but could probably just as happily pick up a side sword (probably generic short sword in stats) and do the same thing

#

or for that matter a long sword since they aren't exactly lacking in nimbleness of the blade 😛

#

so I'd just have a separate talents area to drop it in then a way to tell it 'apply this on attacks'

misty terrace
#

Yes, attacked to a skill, but under the covers, skills are still Items, type-wise

#

But I do like the workaround of making each augment a separate item on the character sheet that the player can click. would have to rewrite the code I use to build the roll statements (or just do it manually, I suppose, it's a TTRPG, not a video game)

fair yoke
#

yeah, kinda an annoying situation

#

otherwise a macro maybe that looks for those arguments and if not present just moves on without them

#

parry not ticked? ok, not going to include it.

gritty scarab
#

Hello all,
Quick question: can you create a shop for players to buy and potentially sell?

zinc verge
#

not home atm and I don't remember for sure but I think items aren't tradeable from one actor sheet to another directly. I think they have to be dropped on the ground and then picked up, so a shop in the form you're probably hoping for I don't believe is possible in core CSB. You can use things like Monk's Journal Enhancements to make a functioning shop though

rich glen
#

Can I write using the entity command? I know I can write with setPropertyInEntity but I have the problem that I had before with the reading....

formal goblet
rich glen
#

Oh, I can??? But that's super nice, thanks!

latent sorrel
#

Does anyone know why CSB is trying to parse the output of this code as JSON?

let a = ${skillRank}$;
let output = "";
for (let n = 1; n <= a ; n++){
console.log(n);
  output = output +'<span class="advantage">l</span>';
console.log(output);
}
return output;
}%```

The error
``SyntaxError: Unexpected non-whitespace character after JSON at position 14 at JSON.parse (<anonymous>)``
fierce harbor
#

Sorry to be a bother...any chance to find a list of CSB-safe font families?

noble tendon
#

hi, any know how to make itemcontainer with variable filter?

I have spell items orderer by magic class (fire, necromancy, illusion, etc) In the sheet i wan that player can see only the class that have.
I try with itemcontainer for each class, but make sheet slow and visuality ugly

formal goblet
fierce harbor
rich glen
#

Right now I'm doing entity.system.props['defensepenaltyfromactions'] = penalty;

latent sorrel
#

My issue is the same basic issue as the previous post but I don't think that solution will work for me as the issue does not involve item values.
My issue: On one tab, on the main actor sheet, I have some buttons that +/- a number box value (increment+stat+item value) that is on another tab. The result is also shown in a label on the same tab as the buttons. I have to press the button twice to update the label but then the label is an increment behind the num box.

formal goblet
latent sorrel
# formal goblet It's the same for the actor, you have to call the `update()`-method.

Thanks. I still seem to be missing something in getting the label to match the value of the num box on button push. I am not sure what the correct implementation of the update() method is.


${setPropertyInEntity('self', 'brawn', ${brawn}$ >= 5 ? 5 : ${brawn}$+1)}$

%{
let name = entity.entity.name;
let a  = game.actors.getName(name);
a.update({'system.props.brawn': ${brawn}$});
}%```
formal goblet
latent sorrel
#

Thanks but this doesnt solve my problem. From the picture, assuming white "Brawn=4", when I click the up-arrow for "Brawn", "Current Rank" and "XP Spent" increase to 5 and 75, however the white Brawn remains at 4 unless I click the up-arrow again (which increments everything one level and creates a lag) or refresh the sheet. When I click the up arrow, white Brawn and Current Rank should be the same value.

empty frigate
#

Is there a way to use a portrait if i'm using a form fillable pdf as the character sheet with PDFPager, and make it work like the portairt in the default sheet?

formal goblet
dim bison
#

I feel stupid for asking, but can you not call a key within a normal table? I can't get StrMod to use Str in the formula ${floor((Str-10)/2)}$

latent sorrel
empty frigate
#

Okay, found the workaround. I mapped the field to "img", then i just switch to the default sheet, change the portrait, and change back to the pdf sheet, that shows the picture

formal goblet
dim bison
formal goblet
# dim bison

Your Label Roll Message is the issue. CSB doesn´t use the @-sign.

dim bison
#

My Label Roll? That doesn't have an @ in the message

formal goblet
dim bison
formal goblet
#

Do you use @ at other places?

dim bison
#

Negative. This is the first formula I've written for the sheet

formal goblet
#

But the error says that you have a formula with (@StrMod)

dim bison
#

Correction, my bad. I did @ str in the skills, I've removed that now

#

This is the current error msg

formal goblet
#

Show me Str

dim bison
formal goblet
#

Seems fine.

dim bison
#

Anything wrong in my formula for StrMod?

formal goblet
#

That seems fine aswell

dim bison
#

🤷

fierce harbor
# formal goblet Seems fine.

Stupid thought, maybe, but could the system be 'unsure' what to do because both key and label are the same in Str?

formal goblet
fierce harbor
vagrant hollow
#

Maybe a problem with uppercase?

fierce harbor
#

I'm fiddling a bit with the formulas and have found that using ${floor(Str-10)/2)}$ in a label works fine but as soon as you put it into a number field it just hangs up and reads Str as 0. 🤔

formal goblet
fierce harbor
formal goblet
#

Wait a sec, there is not even an implementation for formula support for default values in number fields 😅

fierce harbor
formal goblet
#

Well, it´s only the starting value anyway. Default value for number fields means, that this will be the value on initialization, it won´t track any updates.

#

So it´s useless most of the time

fierce harbor
formal goblet
#

What do you mean by "read"?

fierce harbor
formal goblet
#

No

#

It´s literally just "Set my value to x when creating a new sheet"

fierce harbor
formal goblet
#

Because Labels are non-input-components. They work on derived data, so they can just recompute their current value

#

That´s why most of the Formulas are in Labels.

fierce harbor
formal goblet
#

But Input components can be directly manipulated by the User (updating their values), while it is straight up impossible to do so with Labels

#

So Input Components and Labels do complete opposite things

dim bison
#

So I just gotta make my players put in their modifiers for their sheets, is what I'm getting?

formal goblet
dim bison
#

I was just trying to automate "X attribute score outputs Y attribute modifier"

#

But I think they can suffer through without that 😂

kind basin
#

Hello, all you beautiful people, I'm wondering about making a rest button that restores the players max mana and 1/2 their total Hit die. I believe it can be done im just not sure how? Any help you all could provide would be amazing!

fierce harbor
dim bison
fierce harbor
dim bison
kind basin
formal goblet
kind basin
formal goblet
#

Well, you also have to put it into a formula ${}$ 😅

kind basin
#

haha, tried that as well. i get an Error box in chat.

formal goblet
#

Check the console

kind basin
formal goblet
#

Whut? Which version of CSB are you using?

kind basin
#

2.2.7

kind basin
formal goblet
kind basin
dim bison
fierce harbor
dim bison
#

Wow, so I was doing 3 columns that could've just been 2 this whole time. 🤯

formal goblet
fierce harbor
formal goblet
fierce harbor
formal goblet
#

Might be, yeah

fierce harbor
kind basin
blazing ibex
#

is there a way to edit the Tabbed Panel so that if there's only one visible tab, the tab header doesn't display?

formal goblet
blazing ibex
#

yea, but is there a way to finagle it anyhow?

#

CSB doesnt offer me gridded item containers from the get go either

formal goblet
#

Well, we generally work with Tables. So grids are kinda... meh

kind basin
#

One final question, is there a way to update a value and then if it exceeds a max value set it to the max ? Basically my players have hit die equal to their level + 1 so right now they have a max of four.

so this : ${setPropertyInEntity('self', 'hd_Aval', 'hd_Aval + ((player_lvl +1 )/2)')}$
works like a charm but i'd like to make it so it cant go over.

formal goblet
formal goblet
formal goblet
fierce harbor
kind basin
static cargo
#

Hey guys, Is it relatively easy to make a Backpack Tab in a CSB Actor sheet which will support [Mod] 'Item Piles'?

blazing ibex
#

it.. can be done

#

it doesn't work perfectly, but it works

static cargo
#

Thanks, I'm sure that'll come in handy later, but for right now... what do I put here so I can drag 'n' drop items in?

blazing ibex
#

it doesn't seem to respect item quantity

#

add an Item Container

#

or are you talking about a bank

#

click the Configure button in the title bar

static cargo
#

Actually, I'd like to thank you @blazing ibex for not throwing shade on me for being completely blind.... 😆

#

... frickin Item Container element sittin' right there.

blazing ibex
#

it interacts strangely with Item Piles, you might think it's bugged, but its not

#

do you have an example item?

static cargo
#

Not yet, but I'll have time to go into round 3 in about an hour.

#

I'm hoping to achieve making a merchant actor called The Quartermaster, and his gear is paid for by a Requisition Token (Players get 3 each) and a suitable skill roll, done in RP.

blazing ibex
#

so when you drag an item onto your character, it looks like this

#

if you want to move it again you cant drag the name, you have to drag the icon. even though it looks like its part of the same element its not

static cargo
#

If all 5 of my players can window-shop at the same time, and then I can baby-sit the skill checks that'd be ideal.

#

Thanks Fiffin, looking forward to putting your tips into action. 👍

blazing ibex
static cargo
#

Oooh, shiny. that would cover converting it from looking like it's on antique paper to a "pit-boy" or the like?

blazing ibex
#

seems possible but you'd have to figure it out

static cargo
#

Mmm... wish I didn't have to go get food and eat it now. 😉

hard crypt
#

Do dice formulas like [d20] not work with recalculate()?

fathom bobcat
#

Hello, how can I link the bonus damage of a weapon to the item panel in a character's sheet to show it in the panel itself? Like in the last image posted here, by Fiffin.
I'd try importing the Example sheet from the gitlab, but it's not actually working for some reason.

#

Huh, that's odd, looking up it seems that my version is outdated, but when I try to install a new version with the manifest from the page, it still installs the 1.7.3 version.

#

Oh, I'm stupid and forgot to update my foundry server. D'oh.
Back to the weapon damage thing then.

#

Importing the Example sheet still doesn't work, odd.

potent fossil
#

Hello, I have a question about advanced filter for conditional modifier list, is it possible to make it so that only modifiers that =/= 0 are shown ?

#

Also are the formulas contained in the description for a item modifier are computed using the actor's or the item's data?

potent fossil
#

thanks!

dusk surge
#

OK, I am close. But before I try the next version, I want to know if this should even be possible.
I am setting up a module for the new Cowboy Bebop RPG.
So, the rolling mechanics work like this:

  1. Grab a number of d6 based on the Scene setting
  2. Grab a number of d6 equal to the number of Traits used
  3. Determine if there is Advantage or disadvantage.
  4. If there is Advantage or Disadvantage, add a d6 to the pool
  5. Roll 'em!
  6. If there was advantage, discard te lowest. If there was disadvantage, discard the highest.
  7. (this is the hard part) Count the number of 1's rolled, Count the number of 6's rolled and add up all the dice rolled and kept.
    Is this possible?
formal goblet
dusk surge
#

OK

#

I kind of thought so. I don't have the chops to do proper scripting yet, TBH...

#

Using a label formula, I can do all of it but count 1's and 6's

#

So, I'll just put the PCto work after it rolls, thanks for making such anAWESOME module BTW

formal goblet
#

But... CSB is not a module 😅

dusk surge
#

Sorry, I am still learning the Foundry Lingo

formal goblet
#

1 world, 1 system, many modules

dusk surge
#

CSB is super rad is what I am trying to say. Thanks for making it and thanks for maintaining it!

formal goblet
#

Sure, no probs

tiny hinge
# blazing ibex

huh i wasnt aware that item piles works with csb. for normal buying transactions to work, do you just set the gold field into the currency editor?

dense pine
#

Items - Tooltip: I can define a tooltip for an Icon and the Icon itself has a tooltip that says "Item". Is it possibly to deactivate or change this second tooltip? Both together look weird:

dense pine
#

Item Containers - Additional Filters: I would like to make a filter like this: TYP is 1 OR 7
Is this possible? Is there an OR operator?
Or a kind of enumeration? TYP is 1,7

blazing ibex
tiny hinge
#

so it might be that

#

just put in the field name directly which make sense that item piles is not able to detect

tiny hinge
#

for the filter value

blazing ibex
# blazing ibex

@tiny hinge the items require a keyname price and in item piles you enter as system.props.price

#

i don't know why it doesn't recognize quantity on an item, but everything else seems to be system.props.KEYNAME

tiny hinge
fair yoke
#

anyone know how or even if I can make a dropdown list switch a button between one macro and another for a button elsewhere on the sheet?

#

the system has a weird potential set of advantage/disadvantage rolls

fair yoke
#

and I have the macros and rolls for all of them setup thankfully

formal goblet
fair yoke
#

want to have a dropdown so say I select 'disadvantage' and hit the button above the skill to roll

#

it will roll that skill with a disadvantage

formal goblet
#

And what is the disadvantage? How does that influence the Label Roll Message?

fair yoke
#

macro can accept stuff from the sheet, I have all of that sorted

#

and it will display the message

#

basically I just need in the roll command under the label/button I have it so that depending on what dropdown option is enabled elsewhere on the sheet it will roll with advantage, with disadvantage, with advantage (taking higest even) and with advantage (taking lowest odd), the macros for all of those are done

#

just need to know how to make it swap over

formal goblet
fair yoke
#

ok will try

#

my brain is kinda cooked from spending all day doing this several times over

#
// Define the number of D10s to roll
const numberOfDice = 5; // Change this to the desired number of D10s

// Define the penalty value
const penalty = -2; // Change this to the desired penalty value

async function rollDice() {
    let results = [];

    for (let i = 0; i < numberOfDice; i++) {
        const rollResult = await new Roll('1d10').roll();
        results.push(rollResult.total);
    }

    // Filter out the odd rolls
    const oddRolls = results.filter(result => result % 2 !== 0);

    // If there are odd rolls, find the highest one
    let highestOddRoll = null;
    if (oddRolls.length > 0) {
        highestOddRoll = Math.max(...oddRolls);
    }

    // Calculate the final result with the penalty
    let result = 0;
    if (highestOddRoll !== null) {
        result = highestOddRoll + penalty;
    }

    // Create a chat message with the results
    let message = `Rolled ${numberOfDice} D10s: [${results.join(', ')}]`;
    if (oddRolls.length > 0) {
        message += `\nOdd rolls: [${oddRolls.join(', ')}]`;
    }
    if (highestOddRoll !== null) {
        message += `\nHighest odd roll: ${highestOddRoll}`;
        message += `\nFinal result with penalty: ${result}`;
    } else {
        message += "\nNo odd rolls found.";
    }

    // Send the message to the chat
    ChatMessage.create({
        content: message,
        speaker: ChatMessage.getSpeaker(),
    });
}

// Call the async function to roll the dice and display results
rollDice();
});
#

and then trying to find weird little things stopping it from running like needing to add await

potent fossil
#

Hello I have a question. If I roll a macro from a button in an item container, would it recognise things like item.key ?

potent fossil
#

okay thanks 😄

fair yoke
#

ok so with %{return await game.macros.getName('HiEv').execute({bonus: '${BPFIT}$'})}%

#

what exactly would I have to do to add a second argument?

#

since the macro requires two, one the total number of dice and the other the flat bonus

#

I have the second arguments stuff all ready to go, just not sure on the syntax here

wintry crow
#

Hello!

Is it possible to use tagger to get the attributes of an actor created in CSB?

using game.actors.get or getName I can access and find the attributes inside system, but when I grab it with tagger, I can't find a system to access the attributes.

If anybody has any experience with this combination, I'd grealy appreciate some help!

wintry crow
#

One more thing!

How do I make an equippableItem that when clicked, the content is shown to chat?

I currently set up an item container, added a column called roll, and used ${}$ to access item.desc which I defined on my template. This does work, but it being treated as an inline roll rather just pasting the text, which is what I want.

potent sandal
#

Question - when using lables as buttons for automation purposes on the sheet - is there a way to not trigger a chat message?

#

'#' hides the text but message still occurs

static cargo
#

@formal goblet or anyone else who knows: First off, CSB is Fantastic!
Second: is there a handy way of making a bulk-export / copy of the Sample World I've made in order to cram it into a new (proper) campaign world?

static cargo
#

Also, is there a means of colspan'ing a static table?

zinc verge
#

I would export each folder separately for organization’s sake btw. Like in your actors tab, if you have a folder for all your templates and then a folder for all your NPCs and a folder for PCs, export each of those into individual actor compendiums or else when you import them into the other game world they’ll be all mixed into each other and disorganized

oblique spear
#

Hello, I see that a button in a dynamic table has the option of "Add as macro" if you click the right button of the mouse.

If it possible in a item container?

dim bison
#

So, to follow up on my previous query:
There's NO way for a Number Field to call/reference a key in its Default Value?

#

Because in my Sandbox system, as old as it was/is, I was able to put in an Attribute Score, reference that key in the math for the Attribute Modifier, and then the Attribute modifier key was then referenced in all the corresponding skills. Granted, this is all to save my players from having to type numbers in and do math manually, but it seems odd to me that the newer system builder is somehow more... limited?

upper olive
#

Did you try referencing the attribute key like ${attributekey}$ ? For max value that works

dim bison
#

Oh, that does work! Then I can reference the modifier key as min value for all the corresponding skills, then just worry about proficiency checkboxes. Sorry for the assumption and lack of understanding

sharp prairie
#

Hi all! How can I get the green part and the red part to add together in the roll message? the red ones are adding up correctly. Any combo of [[${...}$]] I've tried has broken the thing further, this is as far as I've gotten it to work:

formal goblet
#

Btw, string('something') is completely useless because 'something' is already a string (is wrapped in quotes). You only need it, if you have numbers that need to be converted to a string (5 -> '5').

formal goblet
formal goblet
formal goblet
formal goblet
formal goblet
dim bison
formal goblet
sharp prairie
sharp prairie
#

well I tried that because ${}$ was saying error

#

do the two sections still need to be separate ${}$?

formal goblet
#

No, it should be contained in one. Math can only be done inside those

sharp prairie
#

${ref('pc_healthdice') + (pc_agility ? 1 : 0) + (pc_cli1 ? 1 : 0) + (pc_cli2 ? 1 : 0)}$ gives ERROR

formal goblet
#

Everything else outside of ${}$ is treated as static text.

#

Show the console.

#

Or even better, show me your radio button

#

I think you have an error there

sharp prairie
#

oh, should that not have the [[]] on it? I just noticed the box says 'value' and not 'label roll message'

formal goblet
#

I knew it. The radio button should only contain the text of the roll formula. Remove the [[]]. And then, go to your Label Roll Message and replace the part with the roll with ${[:pc_healthdice:] + ...}$

sharp prairie
#

M A G I C🎉

formal goblet
#

Everything inside [] in ${}$ will be treated as a roll formula. :key: in a roll formula will be replaced by its value (in this case 1d6, so it will look like this when resolved ${[1d6] + ...}$

sharp prairie
#

Thank you, this was gonna be my next question... when to use the different symbols. U DA BES

formal goblet
#

CSB has 3 different syntax delimiters:

  • ${}$: CSB-Formula
  • [] (only inside ${}$): Roll Formula
  • %{}%: Script-Expression
sharp prairie
#

and [[ ]] is only when they are by themselves, not inside ${ }$?

formal goblet
#

[[]] comes from Foundry and is used for inline-rolls.

fierce harbor
#

G'day everyone. Kind of stuck on a, possibly, stupid thing.
Can a roll be done in a simple user-prompt structured like the example on the readme? If so, how? Adding a {[1d12]} line to the concat() does not work. Thanks in advance.

formal goblet
fierce harbor
dusky mauve
#

Hi,

I need roll 3d6 and use result as is and use it for success count also
For example:

Roll: 12 (4 + 2 + 6)
Success: 1 (4 + 2 + 6)

Roll: ${roll:=[3d6]}$
Success: ${[:roll:cs6]}$

is not correct way
Because Success will calculated from 12cs6

Is it possible? Or I need use some script %{}%

formal goblet
zinc verge
#

I may potentially have just found a bug. I have two number fields I'm using for my system's currency selections because there are different currency options available, and the one currently active is set using radio buttons.

the issue is that number fields don't appear to be able to keep whatever values are put into them when they're linked to a radio button. Each field's tag is set to be the value of one radio button in the group, and each number field linked in this way simply removes whatever values I put into them when I tab off the tab the currency is tracked in or close the actor sheet.

#

just checked and removing the radio button group altogether from the actor sheet allowed the currency fields to retain their values

tender jungle
#

Hey! A quick question.
Is there any way to allow the players to organize items in an item container? I know dynamic tables allow that.

formal goblet
tender jungle
#

OH! Perfect <3

dim bison
#

I just wanted to thank everyone on this Discord for their patience and help. I'm much further in my understanding thanks to you guys, and I apologize in advance, as I know I'm not done with silly questions that are likely answered in the readme.

foggy grotto
#

Strange question. Is there a way to make a label clickable to change A value or text of a text field?

Thank you in advance

foggy grotto
#

It seems to work for numbers which gets me halfway there. But not text fields.

foggy grotto
#

Works fine when I set a number

formal goblet
foggy grotto
#

" " ?

#

no function

formal goblet
#

Yeah. Actually, single quotes should also be fine for a static string

foggy grotto
#

no function

misty terrace
#

Can I use that inline code that Fiffin has to make like a checkbox-type control inside an item container?

#

using a label

#

(trying to figure out how to handle an "Equipped" function to items in an Item Container on a character sheet

foggy grotto
foggy grotto
misty terrace
#

NP Oni, I was asking Martin

#

If I can, I will explain

foggy grotto
#

oh ok

misty terrace
#

(if it's possible to "trick" the label limitation on Itm Containers)

formal goblet
#

Yeah, check the first arg from setPropertyInEntity()

misty terrace
foggy grotto
misty terrace
#

"HP"

formal goblet
misty terrace
#

<crambles to go look at the ref documentation>

#

ohh, the 'item' entityName

#

thanks, let me try that

#

a checkbox returns true if it's checked? Not in quotes, just true? or 1?

formal goblet
foggy grotto
#

This has led to a work around. Thank you so much all for the help

misty terrace
#

I'll use a label with the text "Equipped"

formal goblet
#

You can also use an icon in the Label, which changes depending on the equipped-state.

misty terrace
#

That's a LOT more graceful

#

Thx Martin

#

How do I update that label icon property?

formal goblet
#

You just use HTML in the Label text with a small formula in it.

misty terrace
#

Got it

formal goblet
#

You can use the fontawesome-stylenames directly

misty terrace
#

I don't suppose you have a code snippet somewhere, do you?

formal goblet
#

Something like <i class="fas-fa dice-d20"></i> I think. But you can also check the Example-Template, which contains this.

misty terrace
#

perf, I have that loaded already, let me look. Thanks

sharp prairie
#

Ok, the above convo was about making the “equipped/not-equipped” label in the item container the thing that gets clicked instead of going into the item itself and clicking the checkbox so that the column in the container changes, correct? Is anyone willing to share screenshots of what exactly you put where to make that happen? My brain just does not understand lingo without pictures. 😞

#

If I totally missed the actual point, just ignore me, carry on 😅

formal goblet
#

I´ll include it in the Example-Template later on

sharp prairie
#

Thank you, that would be great!

misty terrace
#

And I'm grabbing screenies to show what I did

misty terrace
#

Steps I used to make an Equip/Unequip with icon in an Item Container on a Character.

  1. In the Item template, I made a Hidden Panel (hide it with the Advanced Configurations.
  2. Inside that panel I added a number field with the key set to "equipped" and set the default value to 0
  3. On the Character Template, inside the Item Container, I made a label column and named it itmEquipped (you can name it whatever, it's not relevant on this step.)
  4. in the Label text, I put the following:
    <i class=" fa-solid ${item.equipped == 1 ? 'fa-hand-back-fist' : 'fa-hand'}$"> </i>
    This shows a closed fist if the item is equipped and an open one if it's not equipped.
  5. in the Label roll message for that label, I put the following:
    ${item.equipped == 1 ? setPropertyInEntity('item', 'equipped', 0) : setPropertyInEntity('item', 'equipped', 1)}$
    So if the player clicks on it, it changes from equipped to unequipped and back.
#

You still get a message in the chat (but that will go away next version)

formal goblet
spice sierra
#

Hey guys! I've started using CSB to make a system we use to play in my home game and I have a probably silly question?
Is there any way I can get the list of items a character has and iterate through them to show them with some custom layout? Like get an array of them, loop each one and make some custom html to display them in the character sheet instead of using the item container?

sharp prairie
#

@formal goblet What game system is your example based on?

formal goblet
formal goblet
spice sierra
#

I was trying to do something like this inside a Label, but I keep getting errors like the one on the second picture

formal goblet
spice sierra
#

Thank you for the type thing. I hadn't seen it. how would be best to do it?

formal goblet
#

Btw, you can directly use entity (object) in your scripts, which contains all actor-data.

spice sierra
#

oh nice! I'll try that!

#

thank you 🙂

misty terrace
#

That new eaxmple template is AWESOME! I love the CSB tab as well. Thank you @formal goblet !

spice sierra
#

@formal goblet just a fyi that I got it to work like this. The problem seems to be the line breaks in the string. Removing them before rendering seems to solve it.
thanks for the help 🙂

tiny hinge
#

is there any chance that this feature will also be made available for item containers? since i am doing a bit of animations using macros, this is probably the only reason why i am not moving most of my table contents to item containers.

formal goblet
noble tendon
#

hi, i dont know how to put more that 1 blank space in labels. I try with concatenate (' ','word'), but only make 1 blank.

silk widget
#

can i have some help on something ?

#

i'm trying the configure an attribute bar, but i've probably missed something about the use of formulas

silk widget
#

ok lol thx, that was just the :: who wasn't supposed to be here

dim bison
#

Struggling with my syntax on proficiency bonus. I want it to change at certain levels:
${lvl ? <= 4 '2' : <=7 '3' : <=10 '4'}$

formal goblet
# dim bison Struggling with my syntax on proficiency bonus. I want it to change at certain l...

The conditional (ternary) operator is the only JavaScript operator that takes three operands:
a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.
This operator is frequently used as an alternative to an ...

silk widget
#

is it possible to define the Row number of a table from a formula ?

kind basin
#

Hello there friends! So I'm trying to set up a module called heartbeat, it basically plays a little effect as the player HP drops below a threshold. but it needs me to set the path to the HP value and im not sure how to do that.

formal goblet
formal goblet
kind basin
#

doesnt seem to be working

kind basin
# formal goblet Try out `system.props.health`

I'm reaching out to the mod builder on his discord. I originally thought it would be props.health but didn't have any luck with that one. theres a chance it just doesnt work with this system which is NBD. just thought it'd be a fun system to drop on the players during a boss fight. haha.

zinc verge
kind basin
#

i think system.props.health is the correct because its the only option ive used so far that this icon pops up in the corner, but it never changes for the players or myself

formal goblet
kind basin
kind basin
formal goblet
kind basin
#

haha i was just noticing that! thats so cool i had no idea it did that. love this system.

dim bison
#

I got Proficiency Bonus to set based on Level using switchCase, but now I get an error stating it can't convert to a number.
"AcroProf" and "AcroExprt" are checkboxes.

formal goblet
dim bison
formal goblet
dim bison
kind basin
#

So one of my most requested updates to the character sheet is to make it so they can rearrage their spells. The spells are displayed in an item container. is there anyway to do this ? (short of removing the spells and re-adding them) or is there a different component type i should be using ?

formal goblet
kind basin
#

thats awesome! cant wait.

shadow stone
#

I think here is the proper place to ask, I'm not entirely sure. I'm new to Foundry and trying to install Custom System Builder as a game system... but it's saying it requires a dependancy it can't install, and I can't figure out how to get that one, it doesn't seem to work. Any help to know what I'm doing wrong?

zinc verge
shadow stone
#

Oh... That helps. Thank you!

zinc verge
#

You bet

zinc verge
#

is there a way to increase the number of actor types? I'm building automation for a monster-catching ttrpg and it's kind of rough having all the player classes sharing the same template list with monster categories (classes are kind of complex for this system so they're each getting their own actor sheet template)

fierce harbor
#

Hello there!
Is there any other icon source other than FontAwesome?

dim bison
fierce harbor
fierce harbor
dim bison
fierce harbor
dim bison
fierce harbor
dense pine
#

Label Roll Message: how can i check wether a Text Field in an item has text in it?
item.textfield == true
item.textfield != 0
How?

#

Default would be empty

misty terrace
#

Hey, do you folks use a custom Actor or an Item for your NPCs/Enemies? Just curious.

quasi plume
#

Can I grab keys, such as hp_Current in my game, with JavaScript and then pass it into a CSB formula for multiple targets?
I'm having trouble understanding how to use script within foundry formulas and I need further clarification than the examples and documentation provided.
My goals:
-Grab 4 enemy attributes associated with the 4 keys in each of the selected targets.
-run my CSB attack using the 4 keys I pulled from JavaScript and pass it into the CSB formula as one roll.
-output the results to chat.
-have this as a label button in the actor template for players to press after they have selected their targets.

upper olive
vagrant hollow
zinc verge
misty terrace
#

Just make a new actor template and call it "_NPC" or something similar

formal goblet
zinc verge
blazing island
#

i have a question, how do you call a value from created item in a drop down box in the character sheet template. for example, if I put something like a class as an item, then using a dropdown box to use as an option to choose?

formal goblet
blazing island
#

so I just tick the Dropdown as Formula with ${}$?

#

to call the values from the items?

quasi plume
zinc verge
#

That’s definitely an option, yeah 🤔 it’d take a LOT of reworking at this point but I’ll keep that in mind. I appreciate the suggestion

cosmic karma
#

Hello, how can I place the item image on the chat? I have this right now, the "item.img" thing is just a place holder. Is it possible?

#
  <div class="chat-image">${!item.img}$</div>
  <div class="chat-label">${!item.name}$</div>
  <div class="chat-trait">${!item.traits}$</div>
  <div class="chat-desc">${!item.description}$</div>
</div>```
zinc verge
#

what you might be able to do instead is import an image into a rich text field and then send that rich text field to chat. that basically means you'd have to input every image twice and isn't super elegant, but it might work

cosmic karma
#

It was even possible to improvise a show/hide description, it is good enough:)

zinc verge
#

that's so sick! is it just a label icon that all the descriptions are connected to with visibility formulas?

cosmic karma
#

yep. I'll be updating the module now

#

done

#

I've created a video instruction also

#

I've made some video instructions on how to install the module in Foundry VTT. Doing this way, instead of using the adventure importing from the previous video prevents the issues with the unwanted warnings caused by IDs differences in the Custom System Builder item containers.

This is a fully functional project, so go for it, and have fun with...

▶ Play video
#

Installing in the way described in git /showed in the video doesn't give the warning problem with the items, so its fully playable now

cosmic karma
#

I just closed two issues, so I think thats better to warn everyone: the sheet is not broken. The css messes a lot with the template panels, it uses css grids and such... 😄

latent sorrel
#

There is a "not" command for css that can be used to limit how your css effects the templates if you css has a negative effect on panels and makes them difficulty to interact with when the css is active.

formal goblet
latent sorrel
# cosmic karma Really?! how do I do that?

Google css not, it not difficult but you reference a "higher class name" that is only present in the designer side within the "not". I am not at home so I can't see what I actually did.

Edit: The solution to hiding specific CSS effects in template view (for me) is:
.attributePanel .attribute:not(._template .attribute){css code}
In this case,attributePanel and attribute are panels. I only use this on CSS that really messes with the template view.

formal goblet
cosmic karma
tiny hinge
formal goblet
#

And to be fair, I normally use Angular with TailwindCSS, so CSS-conflicts do not even arise. So I´m also a bit lost with vanilla-CSS 😅

spare sky
#

Hello!

I want to sum the values in the column "skill_value" from a Dynamic Table "table_skill".

I have tried it like this:

${sum(table_skill$skill_value)}$

But unfortunately this does not work.

Can someone here tell me where my error is?

Thanks a lot!

formal goblet
spare sky
#

I noticed that... 😉

formal goblet
#

Keep the sum and you´re good to go

spare sky
blazing ibex
#

what am i doing wrong here? Getting "Uncomputable token type"

?{type:'What type of spell is this?'|'Harm'|'Heal'}
${harm:=[:renown:d6]}$
${heal:=[:healing:d6]}$

<div class="chat-check">
  <div class="vc">
    ${!item.name}$
  </div>
  <div></div>
  <div>${equalText(type,'Harm') ? harm : heal}$<br><h4>${!type}$</h4></div>
</div>

Attempt to combine prompts with reusing results
https://gitlab.com/custom-system-builder/custom-system-builder#481-simple-prompts
https://gitlab.com/custom-system-builder/custom-system-builder#47-reuse-formula-results

#

reducing this to just the prompt and two rolls, the prompt doesn't seem to do anything?

#

sigh it needs to be inside ${ }$ even though the text tells you not to use it at several points

spare sky
#

Hi...
what could be the reason that the existing templates (eg when I want to create a new character) are no longer selectable after the update?

Is there a solution for this?

Thanks a lot!

formal goblet
spare sky
celest prairie
#

Hey question. I would like to hide a panel until a class is selected in my dropdown list. I know that i need to use a formula, but i have no idea how to do that...can someone help?

fierce harbor
celest prairie
#

so I'd write down
${not equalText(dropdownKey,"key1")}$
?

#

i'm so sorry, i have zero coding abilities...

fierce harbor
celest prairie
#

i left it empty

#

omg it worked! It vanished! How do i make it appear again?

fierce harbor
celest prairie
#

ok wait, i know class means something in coding. What i meant with class is like melee, range or magic... does that make it different?
also, with remove the condition, you meant 'not equalText' right? Does that include the '()' or not?
Also thank you for your time! You are a life saver!!

#

i wrote down '(dropdownKey,"key1")'
It doesnt work xD

fierce harbor
celest prairie
#

ok, but how do i make the panel only appear with one of the option of the dropdown list?

fierce harbor
celest prairie
#

so like this?
not equalText(key1)
or like this?
(key1)

fierce harbor
celest prairie
#

It works! and i also found out by removing the 'not' it will only appear with 'key1'!
Thank you so much!

silk widget
#

Is it possible to make select the whole line on dynamic table ? without having to have a dropdown box for every value ?

formal goblet
lethal flax
#

so how to a fetch a number from a number field for a roll message?

formal goblet
lethal flax
lethal flax
formal goblet
silk widget
formal goblet
silk widget
#

i'm brand new into foundry

#

ok, i'm gonna try this

silk widget
#

not everything 😦

#

but thanks you ! i think i've all i need

lethal flax
dire socket
#

Any ETA for 3.1.0?

silk widget
#

ok, i now remember why i've stop my programming study. so what i'm trying is : (Red should be auto selected with the Blue selection)

#

is it what you told me ?

silk widget
#

so if i follow what you told me should be : fetchFromDynamicTable('Magic', 'FatigueSpell', 'NomSort', SortLance)
from my table, putting this line into a Label

#

i've just forget the ${}$

#

-_-

#

i want to end myself

#

Its working !

#

@formal goblet i'm sorry for the ping, but i want to say that i love you

spare sky
silk widget
#

Is it possible to define a numbers of Row from a table with a Formula ?

formal goblet
silk widget
#

Hum, im making a Dynamic table to simulate bagpack slots, i Wonder if i Can generate the number of lines of this table with a formula

formal goblet
silk widget
#

No, i want the table to create automaticly New Line when the formula Said so

formal goblet
#

Uhm, nope

silk widget
#

Arf, am gonna stay with the GM right only to create New Line then

silk widget
#

is there a way to make an addition to a number directly or i need to use the Replace() function ? Exemple : "use spell" Current_Mana -15

#

Replace Mana by Mana-15

latent sorrel
#

Does anyone have an example of using JS to add an entry to a dynamic Table? I can overwrite the existing single entry in my test table with this

where actor = entity.entity but I cannot figure out how to add a new entry.

Also, how do I use JS to delete a row as I need to run a macro or JS in conjunction with the row being deleted.

vagrant hollow
#

There is a CSB setting:
“Delay entry saving. On big sheets, you may want to delay entity saving if sheet reloading takes too much time. This will wait until fields are deselected before saving everything at once.”

But for me it seams the system is reacting exactly this way, even when I don’t have checked the box.
So, is there any different or is this outdated?

blazing island
#

is there a script for health bars? or do I need to import a custom CSS?

noble tendon
#

hi, i am triying combine props fron item and actor. Is that posible?

From actor i have range by strengh, and item have range value.
In item container i try sum both props ${item.range+strengh_range}$ to show the final range. Dont work. I try too, using reference, but dont know how to make. setPropertyInEntity('self', 'strengh_range') dont work.

formal goblet
formal goblet
noble tendon
#

nothing on console.

#

strengh work, i probe botton, and show 10

formal goblet
noble tendon
#

found it. arma_cal_alcance its a concatenate with value and string, For example: 30 m

celest prairie
#

hey question, how do get my label to fetch the text in a hidden textfield?

celest prairie
#

what's the formula to fetch text from a textfield is basically my question...I don't understand the explanation on gitlabs and after trying several times, it just won't work...

fierce harbor
celest prairie
#

does that not work in the text field of the label? or do i need to use rich text field?

#

text below is what it should be

fierce harbor
celest prairie
#

aah wait, in the template it only shows the key, but when updating the other character sheets, it does show it...

#

ok, it works! Thank you again @fierce harbor

celest prairie
#

does that also work for dropdown lists??

fierce harbor
celest prairie
#

oh that made my life a lot easier suddenly!!

celest prairie
#

ok, i'm back already...
The dropdown list text is not being shown.
Instead it either shows the label key and not the text or it gives an error...

fierce harbor
celest prairie
formal goblet
#

I'm pretty sure you're missing some stuff. You have 2 values without any operations (functions), that cannot work.

celest prairie
tidal quiver
#

@glossy hare You there mate? I've got some time to work on that sheet 😉

celest prairie
#

I'm going to try something else, I'll come back when I need more help! Thank you for your time!

silk widget
tidal quiver
silk widget
#

its "work" but the Current Mana Value didn't change

Edit : i've find the issue, it work better with the setPropertyInEntity() formula

glossy hare
#

let's see if i remember it

#

🤔

#

ah yes

#

you have to finish the rolls buttons now right?

tidal quiver
#

${skillModifier := switchCase('item.WeaponSkill','1','OneHandedSkill','2','HeavyWeaponsSkill','3','SpearsSkill')}$
${string([2d6]+skillModifier+PCAttrDEX)}$

glossy hare
#

when you roll it

#

what it shows?

#

it does work?

tidal quiver
#

I can't roll it, it's not clickable

glossy hare
#

can you send a print please?

tidal quiver
#

This underlined one "is" that button, but it's not clickable

glossy hare
#

ah yes

#

create an item

#

not a template

#

an item

#

an use the weapon template that you made

tidal quiver
#

Okay, I created an item (Called "Miecz")

glossy hare
#

throw it in your sheet now

tidal quiver
#

Should I just drag it to the item container?

glossy hare
#

yes

tidal quiver
#

Okay, clicking it doesn't send anything to chat

glossy hare
#

open the console (press f12)

#

then click again, and print what the console scream at you

tidal quiver
glossy hare
#

why did you make this a string?
${string([2d6]+skillModifier+PCAttrDEX)}$

tidal quiver
#

Without it it seems it died even more judging by the number of errors it threw at me

glossy hare
#

show the full console please

tidal quiver
#

Seems it can't pull skillModifier

glossy hare
#

i'm thinking...

#

whre your skill modifiers are?

tidal quiver
#

It's this in the button we click to attack

#

And this in weapon

glossy hare
#

nono

#

i'm referring to OneHandedSKill, HeavyWeaponSKill...

#

where do you store them in your sheet

#

it is a dynamic table?

#

a number field

tidal quiver
#

Dropdown list

glossy hare
tidal quiver
#

Yup

glossy hare
# tidal quiver

do you have a place in your player sheet to store theese skils?

tidal quiver
glossy hare
#

okay

#

they are number fiels

tidal quiver
glossy hare
#

click the one with a 3, what is it key value?

#

hmmmm

tidal quiver
#

Should they have different keys than those in dropdown list?

glossy hare
#

i will open my docs

#

one minute

#

okay

glossy hare
#

this part to 1,2,3

#

instead of the names of the skills

tidal quiver
#

It works!

glossy hare
#

good

#

now there anything else you need to do?

#

also, you probably will have to pass every weapon as items

tidal quiver
#

So we have melee weapons basics of basics done. Now I would need to make it deal damage to target, add those attributes that are chosen by checkboxes, and make ranged weapons.