#Custom System Builder

1 messages · Page 48 of 1

elfin laurel
#

~~Trying to check against a dropdown for visibility formula. Basically "if the dropdown is set to this a certain choice, then this label should appear." My keys and the dropdowns are different (so the key might be CEN and the dropdown option would be Censor).

I'm using this visibility formula:

${equalText('Class', 'text_of_check')}$```

And yes, it shows that the switch case is providing the correct result but the equalText is still showing false? I feel like I'm losing my mind.~~

Ignore all that, literally 2 seconds later managed to get it to work, without even using the switchCase. 🤦‍♂️
icy panther
#

I am stuck on how to get the id of an item that I am running code in

sinful spade
#

im not sure what you mean, setting the border to the <TD> element would just be where the cell ends- if your cells are expanding with content size, set their max and min width and they wont move

high stag
#

i dont think im using the value formula on active effects properly
how can i make a simple bleeding damage onturn?
im supose to make a macro on value formula and specifie a key ?
like this?

let counter = entity.entity.appliedEffects.find(e => e.name === 'Bleeding')?.flags.statuscounter.counter.value ?? 0;
const bleeding = counter*0.25;
#

also some token magic? with the counter, like making the splash wound repeat with the counter.

shy osprey
#

Hmmm.. STill can't get it working. I assume there was a typo ammo_dice(s) but even with that fixed it won't do anything.
Console error: Error: Unresolved StringTerm number requested for evaluation

final mural
#

i'm trying to get values from a dynamic table of a item, it's used with a button in the inventory, what am i doing wrong?

formal goblet
final mural
#

is there a easy way to get it working or do i need a different approach?

formal goblet
final mural
#

thanks

formal goblet
final mural
final mural
#

ok

#

will try

high stag
#

its a macro?
or its a field here

formal goblet
high stag
#

how can i trigger it?

formal goblet
#

Either User click, through Label Roll Message or World Script

high stag
formal goblet
final mural
formal goblet
bleak wyvern
sinful spade
ruby frigate
#

Hi does someone know if it is possible to show a characters portrait in a roll message?

final mural
#

just [${lookup()}$] will return a array

sinful spade
ruby frigate
#

Thank you !!

bleak wyvern
sinful spade
#

target your table's ID (or class),
.table td {
max-width: 15%;
min-width: 15%;
}

bleak wyvern
#

🤣

sinful spade
ruby frigate
bleak wyvern
high stag
high stag
sinful spade
sinful spade
ruby frigate
bleak wyvern
high stag
#

i want the bleeding active effect to trigger every turn. how can i make that?

high stag
#

make a txt file in your desktop and rename it to css

#

point it in the csb configs

#

if you want something more pratical install the module

#

and copy the css script

bleak wyvern
bleak wyvern
high stag
#

you supposed to have a differente file icon

bleak wyvern
final mural
#

you don't have file extensions enabled in explorer settings

sinful spade
final mural
#

youwont see or be able to change them eaisly unless you enable it

final mural
#

you can also use properties

#

just right click-> properties and change there

#

this is .ahk(autohotkey) file but you have a (name).txt file and want a (name).css

high stag
sinful spade
#

bro

#

where it says .css

#

😭

final mural
#

how

high stag
bleak wyvern
#

me with coding^

high stag
#

the module should do the work for you

sinful spade
#

this isn't coding 😭

high stag
#

install it

bleak wyvern
#

so just name it like... css.css 👀

sinful spade
#

sure... if you want to do that you can

final mural
#

¯_(ツ)_/¯

high stag
#

the module

sinful spade
#

bc that could be quite nice

high stag
#

yeah

#

see

sinful spade
#

🤔 i may have to switch over

#

having to refresh and reopen actors, to check for every change is ugh

#

"this line worked in the f12 editor, why is it suddenly not in the css"

high stag
#

its in portuguese because im brazilian

sinful spade
high stag
#

all real time

shy osprey
# formal goblet Check at which step it fails

This one:
${#?{ammo_dice|0}}$
${#ammo_count:= [(:ammo_dice:d6) + 1]}$
${setValues(find('_MagazineDisplayer', 'uuid', '_column', true), '_ammoCount', "target._ammoCount - ammo_count")}$
I get it to roll but it still displays error. My guess is something is off with the setValues part.
Just to be sure: The "_ammoCount" should refer to the key in the item (mag)? Or should the Item Displayer (_MagazineDisplayer) column key be named that?

high stag
sinful spade
#

yeah : target: Gets the actor-data of the currently targeted token

sinful spade
#

HUUUH 😭

formal goblet
#

The function is setValues()

sinful spade
#

If you need to use the properties of the target-actor, you can achieve that by using the target.-prefix.

high stag
#

lmao

sinful spade
#

the links no worky

formal goblet
#
  1. README
  2. Wrong function
  3. You've even misinterpreted that
sinful spade
#

i know its the wrong function but there was no noted changes in the syntax so i assumed it'd be consistent unless clarified

#

i used item. plenty of times and it works as i think it would

formal goblet
#

That's an entirely different function with its own entry

#

The function signature is even completely different

sinful spade
#

right but it doesnt note any changes in usage or have its own information that'd override that concept?

#

as a user i assume all buttons need to be left clicked unless specified somehow -- even if the button is in a different spot, different color, size, or shape.

#

but to be fair i get confused by doors that look liek they should be pushed open

#

but dont

formal goblet
#
function setPropertyInEntity(
  entityName: string,
  propertyName: string | string[],
  formula: string,
  fallbackValue?: Primitive
): Primitive;
function setValues(uuids: string | string[], ...updateArgs: string[]): string;
sinful spade
#

(evil design flaw btw)

#

i understand what you're saying martin, but is the indicator 'item. ...' not above any given function? its a thing that's called

high stag
sinful spade
#

like you didnt re-write that every function did you 👀

formal goblet
#

The target.-prefix only exists within the set-functions. This corresponds to the entity that is being updated

bleak wyvern
#

IS THAT THE FILE YALL WERE TALKING ABOUT?!?!?! 😱

sinful spade
#

its now named .css and a .css filetype
.css.css lol. but yes that is it

#

now go put that in your world file somewhere and tell CSB where it is in your settings

high stag
#

Don't even think about telling him to change the name

sinful spade
#

im like 80% sure i've done that somewhere

formal goblet
high stag
formal goblet
#

This is a Macro, that should be executed, when you're about to create an Active Effect

high stag
#

so if im making a macro, how i say its for the bleeding condition?

high stag
#

i want to click the bleeding condition and itselfs deal 0.25 damage every turn.

formal goblet
high stag
#

click to put the condition

high stag
#

What is the closest I can do?

formal goblet
#

No, CSB only supports temporary stat modifiers. Permanent stat changes are not included

#

Same with Foundry

high stag
#

idk the difference

formal goblet
#

The changes being made are removed when the Active Effect is removed.

formal goblet
# high stag its what i want

No, you want a permanent stat change, that persists through even if the Active Effect is removed. And you also want it to occur on every turn round. Active Effect modifiers on the other hand modify a stat as soon as the Active Effect is applied until the Active Effect is removed. Then it goes back to the previous state.

shy osprey
#

@sinful spade @formal goblet
If I make a label (rollable button) to the _MagazineDisplayer column it works with this:
${#?{ammo_dice|0}}$
${#ammo_lost:= [(:ammo_dice:d6) + 1]}$
${setPropertyInEntity('item', '_ammoCount', "item._ammoCount - ammo_lost")}$
So I guess I can live with the "ammo lost" button being on every magazine, it works just fine. Getting the button on the weapon and beign able to target the loaded mag seems to be way above my skill level and sometimes simple is just fine. Thanks for the help to both of you!

high stag
#

what i want its when this icon its here it receives 0.25 damage every turn.

formal goblet
#

That's why you either need a module or your own solution

high stag
#

ohh

final mural
# formal goblet `${}$` will always return a bare-text, not even a string.

this seems strange
the function for it seems to be to do csb things and pass them to something else
is there a issue with it being able to output a array or other data type?
i just spent several hours wrangling the string into a array in a way that javascript would be happy with and it would be much easier if i could avoid that

sinful spade
high stag
sinful spade
#

frankly this is why i went with the dropdown outside of the item label idea early on but 🤷 figured there may be a way around all this

final mural
#

i can be wrong

sinful spade
high stag
#

from what i know the effect macro module do this, no?

sinful spade
high stag
#

idk

formal goblet
high stag
#

im using effect macro

#

effect.setFlag('effectmacro', 'onEachTurn.script',let cur = actor.system.props.hps;let neew = Math.max(cur - 0.25, 0); token.actor.update({"system.props.hps": neew});

formal goblet
#

Discord even highlighted it

high stag
#

mb

bleak wyvern
high stag
#

still not able to do what i want right?

formal goblet
sinful spade
#

right click foundry in your task bar and brows user data - then go to the data folder - worlds - yourworldname

high stag
#

Even if I have the code I don't even know where I put it

#

because it will not trigger itself

formal goblet
# high stag like that?
effect.setFlag('effectmacro', 'onEachTurn.script', "actor.update({'system.props.hps': Math.max(actor.system.props.hps - 0.25)})");
formal goblet
high stag
#

im using monk little details

formal goblet
#

Idk how that module works

formal goblet
#

But in abstract words: You either have to change, with which data the Active Effect is being created (maybe the module has something, idk) or you intercept the creation of the Active Effect yourself with a world script and apply your changes there, before you let it create. In the interception, you have to add this little code, so that the Effect Macro module has the information to apply your custom Macro inside the Active Effect

final mural
high stag
#

what?

flat hazel
#

use english madafacka

final mural
final mural
high stag
#

tf its happening

final mural
#

polish

#

we work together

sinful spade
#

🤔 if y'all are friends maybe not flaming eachother in a public community server about system development?

final mural
#

dont worry about it

sinful spade
#

why are you uploading it 😭

#

open the folder - exactly how i told you - and drag drop your css file into that folder

bleak wyvern
sinful spade
#

ok nice

#

now just tell csb its there

#

in the module settings

#

@bleak wyvern yours will say something like
worlds/worldname/data/.css.css

sinful spade
#

foundry's file management system doesnt show all filetypes

bleak wyvern
#

was I supposed to do it like that then???

sinful spade
#

dont include all of it

sinful spade
#

i gave you a screenshot and text bro

formal goblet
final mural
#

csb seems to not like me nesting things
is there a way to make it recognize this properly or should i look into doing it with just script?

formal goblet
high stag
#

im back

#

this is gold but the macro isnt working

formal goblet
high stag
#

actor.update({'system.props.hps': Math.max(actor.system.props.hps - 0.25)});

#

this?

sinful spade
#

Drak I hope you know when I get to effects I want a full tutorial 🤣

high stag
#

hahahahaha

sinful spade
#

At the rate I'm going it'll be a few years 🤣 but still

high stag
#

im close

#

but that macro its not allowing me to do this

high stag
#

its from effect macro module

high stag
high stag
high stag
#

its not possible that i am the only one that tried to make a bleeding effect

formal goblet
high stag
#

thank you Martin

keen carbon
#

trying to get dice to color

#

${#RuneColor:=rune_color}$ <div style='color:${!RuneColor==0 ? 'red' : 'red'}$'>${Runes:=[:rune_dice:]}$</div> does not resolve

#

but

#

${#RuneColor:=rune_color}$ <div style='color:red'>${Runes:=[:rune_dice:]}$</div> does

#

any idea what's going wrong?

#

or, is this just because RuneColor is text?

formal goblet
keen carbon
#

${#RuneType:=rune_type}$ ${${!RuneType==0 ? '#' : ''}$RuneType:=rune_type}$

#

i guess it's because it's in a <div>?

formal goblet
keen carbon
#

'red'

#

RuneType in the second example is 'fire', so similar

formal goblet
#

${!RuneColor}$ then

#

string-comparisons with == don't work

keen carbon
#

ah

#

that makes sense

#

looking at the RuneType example it does spit out an error, too, but it just doesn't matter there

#

(yeah if anyone happens to find this ${!RuneType ? '' : '#'}$ or ${!RuneColor ? '${RuneColor}$' : ''}$ fixed it)

void spire
#

Hi everyone.
I'm wonder, how this view of the Item is possible to set (I found it in the message from VKA).
All I have, when setting up an item is this, without a name of the columns. I would like for the weapon to have some column visible, but only get the item name...

high stag
#

you should mention the "${item.variable}$"

#

for some reason my CSB got really unstable if more than one person are seeing the same actor.

its from the version or some module bug?

void spire
#

Thanks, it worked 🙂

final mural
#

how do i get this to work from a roll?
it works fine from a macro but throws a error from roll button in csb(

brittle moth
#

QOL update time !

#package-releases message

**Version 4.4.1 is now generally available, with the following changes : **

Features

  • Added possibility to add multiple rows at once in a Dynamic Table with a right-click
  • [#138] Added possibility to set a custom width for input fields
  • [#207] Added an option to directly display all rolled dice from a roll in the chat message card

Fixes

  • Fixed an issue when dragging an item from a sheet to the items directory
  • [#427] Fixed an issue on Mac preventing component duplication on drag & drop
  • [#429] Fixed an issue preventing players to add items to their items

If you encounter any issue with this new version, please post an issue on Gitlab : https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new

Note: 4.4.0 was briefly released but the system.json had an error, that's why we jump directly to 4.4.1 🙂

formal goblet
final mural
#

ok

final mural
formal goblet
final mural
#

i may be stupid

#

what exactly do i need to put as the "variable"

ancient temple
#

is it possible to display a number field that players cannot interact with?

formal goblet
final mural
#

yes

formal goblet
ancient temple
#

is there a way to display a formula result in a Label where the formula rounds up and does not display decimal numbers?

final mural
#

i want to learn it better anyway, i know (some) basics
also this seems like the easier way to do what i need since i have a larger script around it to provide the actual values it will use

formal goblet
final mural
#

if that one part worked the script would be finished with maybe 1 more issue i should be able to solve myself

formal goblet
ancient temple
ancient temple
#

nvm got it!

#

gotta say so far, ive been only working with CSB for a few hours but it is absolutely amazing, hats off to y'all

#

for a number field, how can i use a formula to set a maximum value?

formal goblet
ancient temple
ancient temple
#

${[:3+skill_endurance:]}$

formal goblet
ancient temple
ancient temple
formal goblet
#

${3 + skill_endurance}$

ancient temple
#

holy heck thank you that just solved like 90% of the issues im having with other values lmao

ancient temple
#

So this is a bit more complex and i'm not understanding if the wiki expresses anything that could help:

For this formula, I need the players to gain +1 to a value known as "pc_default_range" for every 5 "pc_milestones_gained", with the starting value being 1

#

nvm, floor is exactly what i needed

sinful spade
#

Im asking because a lot of my rolls are more genetically made, so they lookup on dynamic tables to determine the dice pool quantities and modifiers - so every roll in 4.3 shows every possibility 😂 so you gotta know what you're even looking for in the mess

brittle moth
sinful spade
sinful spade
ancient temple
#

yep thats what i did

sinful spade
#

roll still look the same -- does anyone know where to find the setting? it's not in the system settings or the label editing field?

sinful spade
# formal goblet

ah, so it was in the wiki section -- i was looking in the updates 🤣

#

love you martin

formal goblet
#

That's the Readme

sinful spade
#

unless im looking at the wrong thing

#

btw, is there a way to remove all those code line ref('')s from my viewer?

sinful spade
#

okay the entire... reference library.

#

idk what to call it 🤣 the home page of the gitlab

sinful spade
# formal goblet

There appears to be some issue when applying the ! to dice outputs that are referenced rather than explicitly called:
${[!1d6]}$ works perfectly,
but regardless of where i put the !, ${[:sameRow('attributeDiceQuant'):d6]}$ wont call it correctly.

#

testing for errors now

formal goblet
sinful spade
#

no error in console

formal goblet
sinful spade
#

disabled my css file too to ensure no conflicts there, no dice (ha).

sinful spade
keen carbon
#

quick question, in ${ checkboxKey ? 'Checked' : 'Not checked' }$ is an unchecked checkboxKey not supposed to function as 0? adding a hiddenAttribute with a value of 0 does not give the 'Not checked' result

#

not certain if it didn't before or if i just never noticed

sinful spade
fringe silo
#

under advanced configuration, Visibility formula can i use, more than 1 condition, like item.cooldown_active<=0, and equalText(item.ability_subtype, 'Damage'), if so how do i seperate the entrys? Just a ,?

keen carbon
#

i'll see if i can get around it with those, though, maybe

#

bless

formal goblet
formal goblet
sinful spade
formal goblet
sinful spade
#

😮‍💨

#

i hate computers.

formal goblet
#

Well, everything is true in Boolean-context, except false, 0, '', null, undefined, NaN

sinful spade
#

so calling just checkboxKey -- even without setting it to anything checks the value 0 or 1 that the checkbox "is", and even without checking it conditionally is = true or false

formal goblet
#

The value of the Checkbox is already either true or false

sinful spade
#

i hate that you dont have to spell out == true or false just calling the box feels ... Schrödinger

formal goblet
#

Btw, the ==-operator is also just an operator. It compares 2 values and returns either true or false

#

true == true is the same as true

sinful spade
#

i understand it logically, it just feels wrong.
calling the checkbox feels like you're getting the box and not its content, you gotta open it or it's both true and false 🤣

#

i hate that

#

thanks for the lesson, but it's making me uncomfortable

formal goblet
formal goblet
keen carbon
#

noticed some odd behavior: if i use an item modifier on an item to set a key to = 0, it functions as false; if i set a key on the item's own hiddenAttribute to = 0, it does not

sinful spade
#

is there a console command to identify the component key causing an error??

formal goblet
#

And '0' is truthy

keen carbon
#

ah

#

any way to get around that?

formal goblet
keen carbon
#

damn

#

i guess that explains the earlier checkbox thing, too, though

sinful spade
keen carbon
#

to help do calculations in the background

sinful spade
#

oh gottcha

fringe silo
#

how do i effect a target with part of a roll formula

#

<table>
<th><tr> ${item.name}$ </th></tr>
<th> ${lastDOS}$ Degree's of Success! - ${switchCase(item.abilityrank, '1', "Iron" , '2' , "Bronze" ,'3', "Silver" , '4' , "Gold" , '5' , "Diamond" , "None")}$ - ${item.abilitylv}$ </th>
<tr><td> Base Healing: ${!baseheal:=item.healingdrop * item.abilityrank}$</td>
<tr><td>Total Healing: ${!((baseheal + item.abilitylv) * lastDOS)}$ Healing</td>
${#newDmgTaken:= max(0,damage_taken - (baseheal + item.abilitylv) * lastDOS))}$
${setPropertyInEntity('target', damage_taken, 'newDmgTaken')}$
${#setPropertyInEntity('item', 'cooldown_active', item.cooldowndrop)}$
${#setPropertyInEntity('self', 'lastDOS', 0)}$
</table>

#

this is the formula im useing, is ${#newDmgTaken:= max(0,damage_taken - (baseheal + item.abilitylv) * lastDOS))}$
${setPropertyInEntity('target', damage_taken, 'newDmgTaken')}$ correct

honest forge
#

I suspect it is far to early to know anything for sure, but do we expect anything in v13 will cause major issues for CSB? Has anyone done any prelim testing?

Would such testing be useful at this point in the release cycle?

silver lake
#
${(min(0, ((ceil((10 + (floor((((ref(sameRow('ACCS'))))/10)*2)) + ((floor((((find('SkillList', 'SLevel', 'Skill', sameRow('ACS')))/10)*2)))))/5)) - (ceil((sameRow('GT1GM', 0))/5)))*2)) / 2}$

Help

#

It's flooding the console with so many errors that is spiking everyone's ping to 2k+

#

It's just a label making a calculation

#

It worked fine before I updated from 3.0.0 to the latest

#

So it's some change I can't figure out

#

I don't know which part of it is asking for a matrix/array, and getting a number, and if I should change that to expect a number or not.

#

And how to make that change.

#

help

#

by the way, to clarify. This calculation is working 100%

#

It's just the console lag-spiking. But the label result is fine and dandy.

#

But the console really hates it

formal goblet
silver lake
#

and again, it all works. The console just floods without apparent reason.

#

If I break the formula into separate labels none cause the flood of errors..

#

But that did allow me to find another problem that is spiking everyone's ping

#

Followed by it re-computing every item in their inventories again and again.

#

without any errors but this.

#

And this is just mentioning labels with no errors as well

formal goblet
silver lake
#

I don't see the errors

#

and they're working perfectly, minus the ping

#

What can I change in them so that the console doesn't see them as errors?

#

Cause I don't know what's wrong with them.

#

Also, they haven't changed since 3.0.0, and back then there were no errors

formal goblet
silver lake
#

I don't see any problems here

#

And it basically references the entire sheet I guess

formal goblet
formal goblet
# silver lake

The scope is your values within your sheet at the time of the computation

silver lake
formal goblet
silver lake
#

Right, I'mma try and remember what this is used for. But would this be causing the cascade of errors?

formal goblet
#

Yeah, it might

#

Depending on your dependencies

silver lake
#

I fixed that but I'm not sure anything changed

#

it also was working before 3.0.0, so I'm a bit confused

#

Let me run tests

#

Well, it was working while referencing itself. But now that I changed it it doesn't anymore, so that's another error. But the previous yellow ►uncomputedProps is still an issue.

#

This is the new AgiX1 issue:

#

But as you can see:

#

It is a number

sinful spade
#

why is ${}$ for 1

#

just 1 would be fine, no?

silver lake
#

And the AgiRadio:

silver lake
formal goblet
silver lake
#

it's the number 1

formal goblet
#

You highly likely forgot to use ref() to reinterpret the text to a variable

formal goblet
silver lake
#

Do I need to put ref() on the radio, or the labels?

formal goblet
silver lake
#

Okay thank you

#

AgiX fixed, thank you

#

But now we still have the props issue

#

Should I look for more undefinedones?

#

There are none left

#

They're all referencing labels.

#

these uncomputed

sinful spade
#

it's especially helpful because i have a lot of locations that a ref('Physical') could be coming from so telling me that's what's causing the error - or even if i see it like ref('Physical) -- i cant find it.

silver lake
#

Also, how do I change that? It's working, but I never touched whatever ChatMessage#user is

sinful spade
#

that's because you're on an outdated version of CSB but updated version of foundry

#

I think

sinful spade
#

oh you finally updated from 3.?

#

and as of this morning, no 🤣

silver lake
silver lake
#

But all these problems I'm having right now are due to that

#

And the session is paused until I can fix everyone's ping

sinful spade
#

i feel you, it'll be a struggle for a bit, but the new features ^^

I was on 4.1 for a LONG time, but just came to 4.4 because i was teased with dice in chat and 4.3's items within items

#

(dice in chat still no worky, but i am patient...ish)

sinful spade
#

tho i'm also on 4.4.1

silver lake
silver lake
#

Unsolved as of yet

#

It was working in 3.0.0

sinful spade
#

dear god. so many parens

silver lake
#

Autism

#

helps me keep track

#

But it was working

#

and in fact is still working perfectly

#

but the console HATES IT

#

It floods non-stop with errors pointing at that formula

#

for some reason

#

and as long as a sheet is open, it's a problem

sinful spade
#

i think you have too many parenthesis, like unmatched

silver lake
#

The only issue here is the console log.

silver lake
sinful spade
#

hm that's a fair point

#

the ones i thought i saw unmatched were actually resolved later in 😩

#

did you make any changes since 3.0? Because find wasn't a function, so what else did you change?

#

copy the formula, paste it into notepad -- or use the one stored in discord already -- delete the label and see if the errors reoccur the same way.
if they dont, then try each of these lines as a new label to see which causes it.

${find('SkillList', 'SLevel', 'Skill', sameRow('ACS'))}$
${sameRow('GT1GM', 0)}$```

if the do, then it's likely a label USING that formula elsewhere.
silver lake
#

but lemme try yours

#

No errors either

sinful spade
#

oh and -- you're on foundry v12, no?

silver lake
#

yeah

sinful spade
#

so with it broken down we have no errors so something is in fact wrong with the main function.

formal goblet
formal goblet
silver lake
formal goblet
sinful spade
formal goblet
formal goblet
#

It doesn't include those inside Extensible Tables though

sinful spade
#

speaking of errors btw,
should i be worried about errors that only exist when a charactersheet is first made?

#

console floods with them, but never occur again when rolling, closing/opening, or reloading

silver lake
#

I'll try to have the session anyway. I'll come back to try and solve this issue again later.

${(min(0, ((ceil((10 + (floor((((ref(sameRow('ACCS'))))/10)*2)) + ((floor((((find('SkillList', 'SLevel', 'Skill', sameRow('ACS')))/10)*2)))))/5)) - (ceil((sameRow('GT1GM', 0))/5)))*2)) / 2}$
#

Thank you guys for the attention so far

sinful spade
#

.

formal goblet
sinful spade
#

likely the order in which they're loaded - default values / when they're called?

keen carbon
#

i tried using the singular and it didn't work, also, but that may just be on my end

formal goblet
keen carbon
#

bless

quasi summit
#

Hi.
Since last update of the system, 2 blocking bugs appeared. No modifications from my side anywhere.
impossible to open a character sheet due to:

#

And impossible to exit the game with "Esc" due to:

quasi summit
formal goblet
high stag
#
${#bon:= fetchFromActor('target', "${item.configcalcboon}$",0)}$
${#boon:= lookup('escondidos_boon', 'escondido_boon', 'keyescondido_bonus', '${bon+item.configcalcboonbonus}$')}$
${#modatk:=recalculate(fetchFromActor('attached', '${item.configcalcmod}$',0))}$
${#moddmg:=recalculate(fetchFromActor('attached', '${item.configcalcdanomod}$',0))}$
${#atrdmg:= recalculate(lookup('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', '${item.configcalcatrdmg$'))}$
${#atratk:= recalculate(lookup('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', '${item.configcalcatratk$'))}$
${#dmgr:= item.configcalcbonusdmg+moddmg+atrdmg}$
${#atkr:= item.configcalcbonusatk+modatk+atratk}$
${#ca:= fetchFromActor('target', "${item.tiposalvaguarda}$",0)}$
#

What did I do wrong?

manic crypt
#

missing the closing } here: '${item.configcalcatratk$'))}$

high stag
#

thanks

manic crypt
#

np

#

those things are sneaky

high stag
#

lol yeah

void spire
elder raft
#

Wow that was silly of me.
Just updated an active game to 4.4.1 and it broke some stuff. (Runng great in my test world! But some mods to my active campaign means it's not straight across)
So.... what's the best way to get CSB 4.3.2 back on a docker build of Foundry? 😅
Gonna just have to roll back for this week's session and upgrade next campaign.

#

nuke /data/csb and just grap the 4.3.2 zip?

sinful spade
elder raft
#

Yeah, I have a world backup.
Oooh, yeah, I forgot about old manifest URLs. Been awhile since I messed with a system outside of "install inside Foundry" lol

elder raft
#

I've gotten so used to one-click installs! lol

formal goblet
#

Yep, system manifest + backup and that's basically it

sinful spade
#

btw nothing major should have broken between the versions, -- i had a small bug show up but 🤷 took me more time to find it than to fix it

#

any idea what broke on your end?

elder raft
#

Yeah, I'm not sure.
I did some visual tweaks with fonts and colors and stuff to my RollCard for this Cyberpunk campaign,
And moving to 4.4.1 (where I added the ! dice-pool displayer) started flooding the card with a lot more of the normally-hidden outputs, and broke my UserInput template

#

lemme reboot the live campaign and grab a pic

sinful spade
#

oh interesting 🤔
what's weird is the dice-pool displayer isn't working for me if I call a reference to determine the dice value

elder raft
#

The only "boxed" outputs there should be the 4 on the right side of the card.

sinful spade
#

but wouldn't it be better just (for now) to remove the !s and use it as you were prior to the update and between sessions wokring to fix it?

elder raft
#

My roll-prompt that calls this UserInput also... doesn't anymore! lol
I wonder if that latter problem is because I changed some lookup() stuff in a few of those dropdowns and something is breaking it there. (again, working fine in my test world!)

sinful spade
#

LOL > whatchadoin? 😏 that 3am booty call of a prompt

elder raft
elder raft
sinful spade
#

I do think it may be something you changed

formal goblet
sinful spade
#

my prompt dice still work fine

#

actually it did output the message to chat now that i look closer

#

says 52 at the start 🤔

#

not enough to worry me

#

will review

elder raft
#

again, working in test environ!
All I can think is that the style-changes I made are messing with stuff

formal goblet
elder raft
#

...

#

That fixed it

sinful spade
#

Mine doesnt have new lines and the the roles were silent prior to the update

#

${#concat(?{hitSitBon:"Bonus to Hit:"[number]|0}, ?{damSitBon:"Bonus Damage:"[number]|0})}$

elder raft
#

RollCard is still messy/broke, but that fixes the userinput...
Which is weird because the new lines still works in a diff world???

formal goblet
elder raft
#

Test Environment (4.4.1,):

elder raft
formal goblet
#

We can't avoid that. That's just how mathjs parses them

sinful spade
#

adding additional # didn't work either
${#concat(?{#hitSitBon:"Bonus to Hit:"[number]|0}, ?{#damSitBon:"Bonus Damage:"[number]|0})}$

#

weird that'd this'd break

elder raft
#

What's weird is its gotta be the changes I made to this specific world (which... I think was 99% just styling? Fonts and colors and shit?) that's not playing nice with something in 4.4.1

Only thing I changed on my side was implementing the dice-pool display and manual-component sizing in Tractable5v1.1.1... Ohh and I changed lookup() on some of the dropdowns in the UserInput to filter out some stuff...
But if its just my code formatting that broke the UserInput... Then it's probably the same breaking my RollCard

sinful spade
#

see if the issue occurs with 0 formatting

#

idk if the hidden-rolkl default class got changed in 4.2 - that may be why im seeing it. Data-hidden = true in the HTML structure, but it is in fact, not hidden 🤣

elder raft
#

I... didnt use CSS to style stuff 😅
I am so out-of-practice with CSS I've avoided it so far.
I'm just using <td style=font-family;color;>
lol!

sinful spade
#

🤣 fair enough friend.
try remaking the button just without the style tags in the alternative roll or a new label?

elder raft
#

It's fine!
I'll run 4.3.2 for 2 more weeks then we'll be making a new world anyway, and 4.4.1 IS working

sinful spade
#

speaking of avoiding css i have an annoucement comin later today ^^ im just fixating on fixing my chat now

#

like why is data-hidden:"true" but data not hidden 🤣

#

what else is not hidden

elder raft
#

I am so excited for dice-pool display and custom component size too!
Two of the biggest things I've been asking for for ages! So suuuuper Hype and big props to Liiiinked

sinful spade
#

i thought of you when i saw that update haha

elder raft
#

We functional again!
I gotta stop messing and updating things the day before session! 😅

sinful spade
#

THE SYMBOL MONKEY IN MY HEAD DEMANDS THE NEW FEATURES

elder raft
#

It's bitten me in the ass soo many times, lol.

Even on my PF2e game it's like "ohh, cool some module updates, lemme push these Saturday night, exactly 10 hours before game" and something intevitably breaks 😂

sinful spade
sinful spade
# formal goblet

ok i have enough self control not to update to dev versions on my production env

#

barely... but i do 😭

sinful spade
#

i trust that stable builds are... stable.

elfin laurel
elder raft
#

Hah!
I assume things like a big community-supported system and mods like PF2e and stuff like Workbench and stuff would be fine and go full-send on live world

sinful spade
#

i remember the time i did that and DAE and another module (Idr which) bugged out and everything was COVERED in animations. or when dice so nice dice would freeze on screen permanently.

elder raft
#

CSB I'm actually more cautious, becuase I know my code is 99% jank. And the other 1% is luck.
So I'm more hesitant to push patches to my templates and stuff.
I'll usually iterate while we're playing or playtesting a one-shot, then implement changes for next game.
(Like now with this 4.4.1)

elder raft
sinful spade
#

one of my players actually said
"man i dont know how you run games on foundry it seems so complicated because everything is breaking"
I apparently traumatized the poor lad... 😦 i had to explain that no no im just a fool with a funny hat. you can be safe.

elfin laurel
#

No no, everything is not always breaking. I am always breaking everything. There's a difference.

sinful spade
#

@formal goblet

idk maybe it's me but there's extra spacing and changes in this section to do with display

elder raft
#

I've been a Foundry zealot advocate for years
But I've only recently come to admit that the on-boarding process and management is too complex for some people.

I love tinkering and how all the modules and open source stuff lets you go as deep or not as you want.
Some people just wanna DM with two clicks!

sinful spade
#

especially now there's a marketplace and officially licensed dnd content. a breeze.

formal goblet
#

I'll never ever to back to Roll20

sinful spade
#

no one ever should.

elder raft
#

Same

sinful spade
#

they're finally on their game and updating the software, but they've shown themselves to be complacent, lazy, and money hungry. dont support businesses that only act right when threatened.

elder raft
#

Even if I JUST want a theater-of-the-mind whiteboard with dice rolls,
I boot up a blank Foundry world with Dice Is Nice and run it there.

elfin laurel
sinful spade
#

I'll go back to running games on share screen photoshop before i go back to roll20

elder raft
#

Send out a URL to my reverse-proxy DDNS domain... done

elfin laurel
#

It's legitimately the reason I don't play in that group as much, I have to work myself up to being ok using Roll20

elder raft
#

Ohh man, I want to do a Westmarches so bad

sinful spade
elder raft
#

I kinda want a procedural hex world map though, and I'm not sure the best way to do that in Foundry... yet

sinful spade
#

players controll up to 3 characters, 1 main and 2 aux - but only 1 playable at a time. This helps offset the gritty realism for healing, downtime, and traveling mechanics.

sinful spade
#

well, not procedural

elder raft
#

That's my idea!
I don't think I can find "10+" people to fill out a full Westmarches, so having a pool of heroes to choose from "at home" for each session seemed like a good idea.

sinful spade
#

but i have a paper fog of war that shows some detail and use simple fog to remove explored hexes. I want a world script that reveals in a 3x area when the 'party token' is moved but, i'm not there yet.

#

and i dont run 10 people lol i have 4.

#

anyway i think the displayer error is CSB so im going to leave well enough alone and wait for a dev to LMK before fiddling with it more. back to writing my annoucment lol

elder raft
#

Nice, good idea.
I've seen some cool implementations of fog of war like that!
I just kinda wanna lean into a lot of randomized and procedural generation of stuff, like hexes, and want people to roll for it. Which means I can't have too much of the map "on the map layer" and have to be popping "tiles" on the fly...
https://goblinshenchman.wordpress.com/hex-power-flower/

If you like random tables, then you might like this Hex Flower Game Engine idea. Hex Flowers are different to other kinds of random tables because they have an inbuilt ‘memory’, that is…

sinful spade
elder raft
#

My "magnum opus" system I'm working on in the background is a looter-shooter style TTRPG.
I would only imagine running it where some stuff can be automated, like in Foundry. But it's a long way off, even CSB can't handle everything

sinful spade
elder raft
#

I saw the KS briefly!
I havent kept up on it tho

#

love their world map art

sinful spade
#

😩 i watch it like a hawk, madly in love.

#

I need it.

elder raft
#

They've done an excellent job with it, and implementing the stuff that makes Foundry shine

#

But I'm busy. I'll read up on it when it comes out! 😅

sinful spade
#

dude they have a dev log of the maker of foundry running a ses of ember.

#

In celebration of the Kickstarter Launch for Foundry Virtual Tabletop's Ember, Troy, Joe, Skid, and Sydney got together in the GCN's New York Studio with Founder and Creator Andrew Clayton to play Chapter One of this long-awaited campaign. Combining the freedom of online tabletop roleplaying with the beauty of digital multiplayer RPGs, Ember is ...

▶ Play video
elder raft
#

Lit, I'll check it out

#

Someday I'll figure out how to use CSB (or hire someone to just make my system in Foundry).
I want to be able to drag dice from a "stamina" dice pools back onto characters and items to show what people are "using" that turn and stuff...
But I'll start with my janky little storyteller system in CSB 😅 Don't even have mastery of this cool built-for-n00bs system, haha!

sinful spade
#

wellllll speaking of which

#

Hey everyone,

I've been around a bit (semi successfully) helping people with their CSB systems ❤️ -- and while I'm not the greatest with JS or the major issues; I do really take pride in my UI/X work.

I'll still be around helping where I can, but I'm officially going to start offering to sell UI designs, teaching people in call, or even straight up build them for you.

Not sure what the pricing for something like this would look like, but I'm currently considering something along the lines of $35 for small projects estimated at 2 hours, $100 for regular 5 hours or less, and larger projects to be negotiated. (This is in USD).
❤️

#

my current system as examples of my work

elder raft
#

‼️

#

Ohh, fuck yeah dude!

#

Good luck!

#

If I ever actually stop iterating and updating Tractable, I might have you polish it up for a final "prettiness" release!

#

This is the extent of my "hey let's add some visuals to this foundry sheet" and it WHOLLY AVOIDS CSS (as you can tell), lol

sinful spade
#

and nothing is wrong with that sheet at all, it's clean and functional.

elder raft
#

Yeah, but it could be prettier

sinful spade
#

true, but so could I 😉

elder raft
#

Haha, I'm in a creative and visual design field. So the fact that websites and pretty digital stuff requires coding has always caused friction in me.
I want it all PRETTY! But end up hiring people for the things I can't do, haha

sinful spade
#

🤣 see im on the other end of that.
i'm a consultant in the HR analytics space - nothing has to be pretty and no one cares.

#

BUT I CARE

elder raft
#

lol!

sinful spade
#

peope actually be dropping default R graphs like "yep. look at that beaut" meanwhile, that beaut:

#

meanwhile i spent, unironically - 8 hours yesterday rebuilding a powerpoint to animate and flow properly. 🤣

#

had to double check nothing was proprietary on this, but its just introducing a public framework so

elder raft
#

Haha, its just like coding. Same with my video stuff.
Sometimes you just GOTTA spend a whole day on ONE TINY LITTLE PIXEL THAT YOU JUST. NEED. PERFECT.

sinful spade
#

dont you dare talk to me about that pixel

#

-39px. how do you think i found that magic number lol.
i have some in here that are to the .00th 🤣

ancient temple
#

is there a way to count checkboxes for a formula?

elfin laurel
#

How many checkboxes? It's janky, but you could set a variable to 0 then just run conditions on each checkbox by component key.

${checkboxCount:= 0}$
${checkboxKey ? checkboxCount + 1 : checkboxCount}$

Then just repeat the second line as many times as needed... but there's probably a better/smoother/easier way to do it.

sinful spade
#

Easier to reference multiple times

ancient temple
#

i made it easier on my self and yeah made a number field to track what is supposed to be the number of check boxes

sinful spade
#

Try math.Filter

#

Save your check boxes to an array, and filter that array

const count = arr.filter(Boolean).length;

console.log(count);```
ancient temple
#

the thing i'm trying to do now is to not allow negative numbers to be shown

#

so the formula for this roll is 3d6-${pc_torment_1_torment_level_tracker-2}$, and when the tracker is at 1 or 0 it shows me a negative number

#

i want the minimum number for the bonus to the roll be 0

#

and when i try to use 3d6-${min(0, (pc_torment_1_torment_level_tracker-2)}$, i get an error on the sheet

sinful spade
#

I don't think min is a csb formula, it may be mathjs

#

So %{min(0, (${...}$)}%

#

I'm on mobile so I'm not typing that out but yeah 🤣

ancient temple
#

i used max instead and it works now

sinful spade
#

🤣 whatever works haha

#

Glad you sorted it

ancient temple
#

is there a way to make a table autopopulate with information when a number threshold is reached?

manic crypt
#

Like... a whole table, or some values in it?

ancient temple
#

like for example, in the system im creating a custom sheet for when you reach certain stat thresholds this table populates with information

#

i'm essentially porting over a sheet made in google sheets to foundry vtt

formal goblet
ancient temple
#

for example for the talent "i've calculate the odds", the sheet checks to see if the character has 5 in the Intelligence stat, and if the character does, the table populates with the name, action type, availability, and a checkbox tracker to track if it has been used or not

#

and if the character does not have 5 in intelligence, it does not add anything extra to the table

#

if this is too complex or out of the scope for what csb can do, i can totally live without this being on the character sheet lmao i only want it for a qol for the end user, worse comes to worse i'll just make a tabbed panel with all the details as a reference sheet for the players

sinful spade
#

you dont need the system to populate the rows, but just reveal them

ancient temple
#

thats exactly what i need

sinful spade
#

but you can make a panel, containing a table acting as a 'row'

#

and change the panel's visability status based on the condition

#

downside to this approach is that you lose the ability to sort by differnt means, they're just toggled in the order you made them.

#

so players can "sort" by anything

ancient temple
#

OH i see in the advanced options you can set a formula for visibility

#

thank you so much this is way easier than the other approach

sinful spade
#

yep yep ^^

sinful spade
# ancient temple OH i see in the advanced options you can set a formula for visibility

thought about it a bit,
your other option is an item container. you can then drag drop the special orders / talents in manually -- OR (and this bit is above my pay grade) you can have a world script checking the user stats for the "critical" values to add the items in.

I suppose you could also have a manual button check if any are unlocked too.

#

if that's the option you want to go - check in macropolo for some help doing the world script

misty terrace
#

Coding question. I have an item template with a field (attrib) that hold the player attribute that item uses as part of it's check. I know I can get the value of that field in a label roll using item.attrib.

How can I use that value to find the numeric value of the field with that same name on the character sheet.
if item.attrib = "might", return the value of the "might" stat of the character equipping that item?

misty terrace
#

thanks! tried that and just realized it was a typo on my part 🙂

ancient temple
#

is there a way to have no icon for a label roll message?

sinful spade
#

can you screen shot what you're talking about?

ancient temple
#

this but not have the dice icon

sinful spade
#

did you by chance type 'dice' into the font-awesome part of the label?

ancient temple
#

nope

#

ah it was buried in the settings

elfin laurel
#

Is there a way to get a chat message roll/output to include buttons of some kind, or to prompt a User Input Template?

lean bone
#

im trying to have an action point system. When you click a button, it does an action and subtracts points from the Action Point system. How would I go about doing that?

im struggling to actually change the value of remaining action points on the character sheet

manic crypt
lean bone
#

dont really know what im doing lol

manic crypt
#

No worries, it's how you learn. I'm working on a quick example for you; I'm not an intuitive coder so I'm having to look stuff up a bit to make sure I don't splash some crap for you to look at.

#

So it could look something like this, although I haven't tested it and might have messed something up, I just don't want you to lose interest 😄

${#APCost:=item.APCost}$
${currAP >= APCost ? '${<insert the command you want the action to do here>}$' : "Not enough AP"}$
${#newAP:= currAP - APCost}$
${#setPropertyInEntity('self', 'ActionPoints', 'newAP')}$```

This assumes that you have some kind of item that's the ability carrier and that you're rolling it from a button on an item displayer.
#

Actually, i just updated it to something that actually does the rest of it.

#

As in updates the AP with the AP cost.

#

but that's rock bottom simple and might even work as-is if I didn't misspell anything. I'm very iterative, I let the console find most of my errors...

manic crypt
#

man was that a messed up example, sorry. fFA('self', ... ) doesn't work anymore, which makes sense.

#

maybe it never did and I'm just mixing up the signature for sPIE with it.

manic crypt
# lean bone dont really know what im doing lol

Ok, so this one is actually tested, using a number field for both ActionPoints and APCost on a sheet. It also won't go lower than 0 AP when it updates.

${#APCost:= APCost}$
${currAP >= APCost ? '${[d20]}$' : "Not enough AP"}$
${#newAP:= currAP - APCost}$
${#setPropertyInEntity('self', 'ActionPoints', 'max(newAP,0)')}$```
#

You could dispense with a couple lines by calling the keys directly, but I tend to like to be able to make adjustments later, so if you wanted to have a popup modifier on the roll you could add that to the APCost variable that's defined in the roll at the beginning rather than having to hunt through a bunch of commands to find all the instances of it.

lean bone
lean bone
manic crypt
#

no, that makes it so that it doesn't reflect in the roll card

#

So things you don't want to show up on the card, like math functions, you preface with a #

lean bone
#

ah ok ty

manic crypt
#

The variable declaration is in the form of <var>:= <whatever>

#

so in the very first line I'm declaring a variable named currAP that is equal to the key value from the sheet 'ActionPoints'

#

Those variables only exist for the current roll.

lean bone
manic crypt
#

No problem, I'm not the best person here for it, Martin is the man overall, and there's people who chime in quite often that leave me wondering what they're even talking about, so ask away if you have any questions. It's fun to mess around with, IMO.

lean bone
#

it is but im lost, just trying to brute force it till it works

manic crypt
#

It doesn't hurt to ask for help at all, everyone here is very patient.

lean bone
#

thank you for the support

manic crypt
#

btw, what kind of system are you working on?

#

Also, I fixed the glaring error in my formula, which was that if the user had AP but it wasn't enough for the action, it would still zero it out, so this code snip will avoid that case:

${#APCost:= APCost}$
${currAP >= APCost ? '${[d20]}$' : "Not enough AP"}$
${#newAP:= currAP >= APCost ? currAP - APCost : currAP}$
${#setPropertyInEntity('self', 'ActionPoints', 'max(newAP,0)')}$```
lean bone
manic crypt
#

Nice. I have fond memories of a 2d8 system that was the house system for Space Gamer/Fantasy Gamer magazine back in the 90's.

#

One thing you're going to want to keep an eye on is if you try to automate moving tokens, it's going to be a bit of a pain to calculate the distance moved and translate it into AP.

lean bone
lean bone
manic crypt
#

You'll have to dip into the scripting format, more pure javascript as Foundry uses it, rather than the CSB code. %{}% stuff. It's in the wiki.

lean bone
#

thats what ive been mostly following

ruby frigate
#

hi i was searching around the documentation and i couldn't find an answer,
Is there a way for items not to be duplicated when we move them in an actor or between two actors?

shy osprey
#

When doing the "setPropertyInEntity" from a formula in the itemdisplayer, the update of the value does not happen immediately, but I have to click the actual item open for the update.
More specifically: When I reduce ammo from the magazine (item in item displayer) via label roll, it does not show the updated value in the itemdisplayer and I have to open the item iselff orthe value to update.
Is there a way to work around this?

sinful spade
sinful spade
sinful spade
#

Okay I can't search on mobile. But it's time I get out of bed anyway. Let me get my coffee and everything, be back soon.

shy osprey
#

Ahh so this time it is not me! 😅
Thx for the info, won't try a workaround then but wait for the update.

sinful spade
#

@shy osprey
here's link confirming that it's a feature. but not implemented yet as of 1/6

shy osprey
#

Thanks again @sinful spade for the help! Hoping it will be implemented in the next update. Though tbh it is not that hard to click the item open but my plyaers will forget to do it anyway:D

sinful spade
#

@shy osprey found it

#

like i said, you can include a force refresh in your fire button

#

ykw, at this point @elder raft gimme your user, i am the record keeper of the chat now.

shy osprey
#

Also found a curious feature in item displayer. IF I drag and drop an item on top of another item in the displayer, it duplicates the item.
Now while there is no reason for anyone to actually do that, people might do so by accident when they try to click an item open. Just curious if this is a feature or a bug or am I doing something wrong?

sinful spade
#

Like this?

shy osprey
#

A bit, but think of a situation where the Big Foff Anvil is in one displayer row and another item, a Small Anvil is on a row below that in the same displayer. If I drag the small anvil on top of the big one, the small one multiplies.

sinful spade
#

🤔 weird

shy osprey
#

(I had magazines in same displayer as the gun and just for fun tried if the magazine would go into the gun that way and found infinite ammo hack)

sinful spade
#

I think you may need to submit a bug report

formal goblet
#

It's enough to start dragging and releasing it in the same sheet, it doesn't really matter where.

There's no specification for this behavior, thus is not really a bug. But it would make sense to handle it in a similar way like Components.
@brittle moth your opinion?

sinful spade
#

Martin did you ever have a chance to look into why ! On called rolls doesn't work, or silencing the output of input still appears in chat for the latest version?

brittle moth
modern hemlock
#

Has the 4.4 changelog been posted here? I'm curious what changed

timid marten
#

oh nvm

#

I can't read

sinful spade
#

sorry kinji ❤️ was replying to your message so VKA could find it 🙂

#

but -- you could do the same

#

just have a button to make changes +1, -1 to the values for example that also force the refresh

timid marten
timid marten
sinful spade
timid marten
#

but saying "CSB is feature complete" without the "Item Containers inside Items" feature planned is very weird imo

sinful spade
timid marten
#

It's the biggest flaw right now with the system and makes it look very amateurish when designing backpacks in your game

sinful spade
#

it's just not mirrored perfectly - they uh... delay updates?

timid marten
#

Nope, only in actors

sinful spade
#

i have an item container inside an item?

timid marten
#

???

#

How

sinful spade
timid marten
#

It's not an option on my side

sinful spade
timid marten
#

Are you sure this is an item and not an actor?

sinful spade
#

bro lol

#

background housing is a template

timid marten
#

idk it sounds crazy

sinful spade
#

an item template

timid marten
#

Never touched those

#

ngl

#

Has the IC inside items been added in the latest releases then?

sinful spade
#

lol yeah.
the outcast item is built on the _backgroundHousing template

#

the outcast item contains the hermit item

sinful spade
#

4.3.2?

timid marten
#

Oh I'm on 4.1.1

#

makes sense

sinful spade
#

lul

timid marten
#

I'm surprised I wasn't pinged tho

brittle moth
timid marten
#

usually they do a ping for big feature drops

#

nevermind then

#

CSB is indeed closer to being feature complete

sinful spade
#

4.3.1 talks about it 4.0 added dice in chat nad bug fixes?

#

4.0
Added possibility to add multiple rows at once in a Dynamic Table
[#138] Added possibility to set a custom width for input fields
[#207] Added an option to directly display all rolled dice from a roll in the chat message card

brittle moth
#

I ripped, I meant 4.3.0 x)

sinful spade
#

🤣 dude i just read your last message and saw 4.3

#

and thought i was illiterate for .24 seconds

brittle moth
#

I edited it, a little too late
But hey, that's what I get for trying to be a smartass :p

sinful spade
#

cant do that to me, im mildly dyslexic haha

#

🤣 anyway ok i got he sub version wrong but yeah @timid marten 4.3

brittle moth
sinful spade
#

and we love you for it

#

actually i remember that one too

brittle moth
sinful spade
#

you talked about the "good news everyone"

#

i sent the gif

timid marten
timid marten
#

Thank you for your hard work

#

Your system is amazing

#

and a life savior

#

💙

sinful spade
#

i was on 4.2 for nearly a year, but switched to 4.3 because BACKPACKS 😄
then 4.4 because dice in chat (which still broken, but I wait)

#

actually @brittle moth any news about that?

sinful spade
timid marten
#

I added a lot code to the system so I need to make a backup of everything, and then I will need to fix everything..

#

Worth it tho

#

backpacks!!!!!

#

gun mods!!!!!

sinful spade
#

lol
i'm excited to add adventuring packs to character creator

#

like pick a starting bag

#

not even just physical items, but ability sets in classes

bleak wyvern
#

heyo, I need some help figuring out how to make another button choose different skills to do a roll off of, basically was trying to connect the buttons attached to certain skills to values on a dropdown on another page... if that makes sense? 😅

sinful spade
#

Ref(AttackDD) == 1 ? Dothisroll : ''
Ref(AttackDD == 2 ? Dothisone : ''

bleak wyvern
sinful spade
#

And I'm on mobile so I already see a missing paren lol

bleak wyvern
#

thats what I put in 👀

formal goblet
high stag
#

could you guys help me, please?
initiative its a label, with the formula e.g: 1d4+3

high stag
#

thanksss

bleak wyvern
elder raft
dense pine
#

Im made a userInputtemplate and try to display a very simple formula inside in a label ${VAL1+VAL2}$. Want to add the value of a number field and another label. if i change the value of the number field in the dialog nothing happens. The formular is ignored. It just displays 0.
is this a bug or are userinput dialogs not meant to do this

sinful spade
sinful spade
sinful spade
waxen thorn
brittle moth
#

Small fixes for big smiles !

#package-releases message

**Version 4.4.2 is now generally available, with the following changes : **

Fixes

  • [#430] Fixed an issue with the preCreateChatMessage hook
  • Fixed add multiple rows dialog to autofocus the row count field and validate on enter key
  • Fixed field refocus on update to focus item correctly and not refocus parent actor
  • [#431] Fixed roll parsing for dice pools display
  • [#404] Reworked delay entity saving to make it manual

If you encounter any issue with this new version, please post an issue on Gitlab : https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new

brittle moth
sinful spade
sinful spade
sinful spade
#

But thank you link ♥️

dense pine
sinful spade
#

There's something weird going on lmao

dense pine
#

doesnt work either

sinful spade
#

No way 🤣 lemme see your setup. Some fuckery is happening

dense pine
sinful spade
#

i've dont ${ref('componentKey')+ref('componentKey')}$ at least a dozen times in my sheet.

#

like literally right here

#

you probably have a typo in a component key name, either on the component itself or in a formula

#

which is why i asked for screen shots lol

silver lake
#

What's this about?

silver lake
sinful spade
# dense pine

well that's gonna error because of ref(VAL1) without the '' so you probably have errors in the console preventing the rest of the output

#

try JUST ${ref('VAL1')}$

#

@brittle moth inputs are still shown in rolls

dense pine
#

no errors, now warnings

#

this is no a roll, this is a user input dialog

#

and ${ref('VAL1')}$ shows no value at all

sinful spade
dense pine
#

no

sinful spade
#

wait a sec is this a user input template?

dense pine
#

yes, i mentioned it 2 times now

sinful spade
#

right but user input templates are a different thing than just user inputs that are made.

#

idk if there's a syntax difference in calling the ref in one

#

like for items you do item.ComponentKey

#

the wiki says they're special kinds of items, just try ref('item.Val1')

dense pine
#

@formal goblet any idea why formulas dont work in userInputTemplates?

sinful spade
sinful spade
# brittle moth See above, but it should be good now 🙂

update did not fix either issue - dice do not show up in chat if the quant is not directly stated: e.x in
([!:first(lookup('attributeTable', 'attributeDiceQuant', 'attributeName', ref('item.itemBaseAttributeName'), '==')):d6])
and if user input is called with # it still shows up in chat regardless

high stag
#

i want a macro to create an active effect and It also has to destroy the effect if the combat ends

#

help me?

#

i am this || close to make it works hahaha

manic crypt
sturdy mesa
#

There is the item.name command, but does anyone know how I can send the item's icon image in the chat? In label roll messages

hushed lichen
#

Did anyone make the Risus system with this?

sterile tangle
#

Heyo, is anyone free that knows about Custom System Builder? 😅 I'm struggling to code a conditional roll in the Label Roll Message bit 🙂 (I'm attempting to setup a basic Honk Before Midnight for friends)

sterile tangle
#

I've kind of got it working 😅

#
${roll:= [:selectedRoll:]}$```
sinful spade
sterile tangle
#

Cheers 😅 My main language is C#, so I've no idea if this is optimal, and I say kind of, as now I'm going to try and work on the aesthetics of the roll Below 3 is a fail, above 6 is a success 🙂

silver lake
#
${min(0, ((ceil((10 + (floor((((ref(sameRow('ACCS'))))/10)*2)) + ((floor((((find('SkillList', 'SLevel', 'Skill', sameRow('ACS')))/10)*2)))))/5)) - (ceil((sameRow('GT1GM', 0))/5)))*2))/2}$

So.. I'm still trying to solve the issue with this one.

#

Again, it works perfectly as intended. But it floods my console log with errors, and if a player opens it, it keeps sending the log errors non-stop at high velocity, sending everyone's ping to 8000.

#

Opens the sheet, that is.

#

This calculation is simply a Label

#

the formula*

silver lake
#

Reminder that this gave no errors in 3.0.0
Breaking the formula down without ceil, min, or floor works fine, each indivisual part seems to work.

sturdy mesa
#

Can someone help with this macro to reload items inside compendium plz?
This is not working for me, I want to reload all my items inside compendiuns because I made changes inside templates and I need to reload one by one...

const packId = 'compendium.actors'; // check the pack-id with 'game.packs' in the console

const documents = await game.packs.get(packId).getDocuments();
const filteredDocuments = documents.filter(document => !document.isTemplate);

for (let i = 0; i < filteredDocuments.length; i++) {
SceneNavigation.displayProgressBar({
label: ${i + 1} / ${filteredDocuments.length + 1},
pct: Math.round((i * 100) / filteredDocuments.length)
});

await filteredDocuments[i].templateSystem.reloadTemplate();

}

SceneNavigation.displayProgressBar({
label: 'finished',
pct: 100
});

brittle moth
brittle moth
formal goblet
high stag
#

yo martin

#

could you look at this?

/* *******************************************************************
Bleeding Template
********************************************************************** */

// Check if the actor already has the "Bleeding" effect
let effect = actor.effects.find(e => e.name === "Bleeding");
// console.log(effect)
if (effect) {
    try {
        ui.notifications.info(`${actor.name} está sangrando`);
        // Create the "SANGRANDO" effect
        const effectData = {
            name: "Sangrando",
            icon: "icons/svg/blood.svg",
            origin: actor.uuid,
            disabled: false,
            duration: {
                type: "temporary",
                seconds: 0,
                rounds: 0,
                startRound: game.combat ? game.combat.round : 0
            }
        };
          // let contador = entity.entity.appliedEffects.find(e => e.name === 'Bleeding')?.flags.statuscounter.counter.value ?? 0;

        // Apply the effect to the actor
        await actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
        activeEffect.forEach(async effect => {
          effect.setFlag('effectmacro', 'onEachTurn.script', "actor.update({'system.props.hps': Math.max(actor.system.props.hps - 0.25)})");
        });
        ui.notifications.info(`Bleeding effect applied to ${actor.name}.`);
    } catch (error) {
        console.error("Error applying effects:", error);
    }
};
#

the EM part its not applying

toxic lintel
#

haven't played in my CSB world for a while, and upgraded to V12 to support a different system. now my game's templates aren't behaving.
this SHOULD be showing only discarded cards on that tab, but it is showing all of them. has the scripting changed?

high stag
toxic lintel
#

mmk the tests are against checkboxes. have these become boolean now and so the test should be different "Custom System Builder | Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: boolean, index: 0) TypeError: Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: boolean, index: 0)"

high stag
#

Well, that message, this error message its displayed when you create the item or when you open the actor sheet?

toxic lintel
#

figured it out the change to script is simply discarded which is true if the checkbox on the card is on. all good thanks

high stag
#

hm okay

high stag
#
/* *******************************************************************
Bleeding Template
********************************************************************** */

// Check if the actor already has the "Bleeding" effect
let effect = actor.effects.find(e => e.name === "Bleeding");
// console.log(effect)
if (effect) {
    try {
        ui.notifications.info(`${actor.name} está sangrando`);
        // Create the "SANGRANDO" effect
        const effectData = {
            name: "Sangrando",
            icon: "icons/svg/blood.svg",
            origin: actor.uuid,
            disabled: false,
            duration: {
                type: "temporary",
                seconds: 0,
                rounds: 0,
                startRound: game.combat ? game.combat.round : 0
            },
              flags: {
                "effectmacro": {
                    "onEachTurn": {
                        "script": "let dano = actor.effects.find(e => e.name === 'Bleeding').flags.statuscounter.value; actor.update({'system.props.hps': Math.max(actor.system.props.hps - 0.25*dano)});"
            }
        }
            }
        };

        // Apply the effect to the actor
        await actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
        ui.notifications.info(`Bleeding effect applied to ${actor.name}.`);
    } catch (error) {
        console.error("Error applying effects:", error);
    }
};
#

EM ca make the on-turn job
and macro monkey could make it work with any custom condition. Ty so much

@formal goblet

timid marten
#

Hello, just updated from 4.1 to 4.4 and this returns an error now, any idea why?
Did the formula change?

${%{return game.user.role >= CONST.USER_ROLES.TRUSTED}% ? item.rarity_choice : '???'}$

manic crypt
#

What's the error?

timid marten
#

"ERROR"

#

nothing in the console

manic crypt
#

Is it the same with both cases?

timid marten
#

Yes

manic crypt
#

I'm working on simulating your environment

timid marten
#

nvm I fixed it, knowing it wasn't supposed to happen helped me investigating this issue

manic crypt
#

word

timid marten
#

so thank you!

manic crypt
#

what WAS the solution?

timid marten
#

the item didn't have the value set correctly............

manic crypt
#

Ah, ok.

timid marten
#

I don't get why it worked before upgrading

#

maybe something broke my templates and changed the values

manic crypt
#

Maybe.

#

Still, if it's working now, all good.

timid marten
#

finally being able to add items inside items is such a bliss

sterile tangle
#

This may be a silly question, but does anyone know how to pass through an actor to a macro, if they've activated the macro from a button on their character sheet?

#

Saying that, I don't even think I need the actor, I just need a variable from their character sheet 😅

manic crypt
#

If it's on the sheet you should be able to just nest ${}$ inside the macro, it gets replaced with the value when the macro is first read.

sterile tangle
#

I've attempted that, but I can't save the macro due to (SyntaxError: must be valid JavaScript for an asynchronous scope) I'm attempting to roll xd6 where x is the attribute that is set.

sterile tangle
#

I've been scrolling the ReadMe back and forth... TBH I had no idea they had a wiki! Thank you!

brittle moth
#

I'm thinking about how to improve the documentation, I hope to be able to make something soon about this :/

sinful spade
#

Reading instructions for my instructions is weird

#

Also video format 🥲

sterile tangle
#

After a few iterations, this is how it currently stands 🙂

hushed lichen
modern hemlock
sinful spade
high stag
#

Macro monkey and EM

#

and you are good to go

sinful spade
#

Has anyone figured out how to interact with the displayed dice yet?

#

Breaking them onto multiple lines, changing their output locations

#

I'm struggling to crack it.

#

relative positioning may be the key, but... looking for more reliable methods

#

especially given i cant assign them different classes for different roll types

sinful spade
#

When playing with alternative methods to mitigate all dice rolls showing up i've ran into some strange CSB behavior

#

If i call a roll in a logic chain that doesn't occur -- then it still rolls the dice and outputs.

#

e.g.
2 = 1 ? dont do this roll : do this roll.
both rolls will have icons and dice outputs

brittle moth
icy panther
#

I have a call to a user input template within an item displayer, is there a way to pass the id of the item that called the roll message?

brittle moth
sinful spade
#

(room to expand being like, a third option for no scaling weapons)

sinful spade
#

Do you have a suggestion on breaking the dice into multiple lines or displaying them in different locations based on when they're called?

It'd bed dope if we could add classes to rolls in the code.
[!(className)1d20] for example

verbal portal
#

Hello all!!! I am new here and after 20 years I am starting to try to comeback coding/programming some stuff for playing on Foundry and on-line ... And I wanted to try to start with the CSB... Now I'm stuck with a drop-down. I would try to create a chat roll % when I select an option from a drop-down menu inside the template sheet.. ex: I select Wisd and the chat will show the % rolled compared (cs=<tot of the Wisd(+... various things))..
What do I have to do to figure it out? Help

formal goblet
silver lake
novel crypt
#

Hey I am trying to reference a items portrait in a character sheet button macro.

But I cannot figure which way to code it all attempts have failed. ${item.name}$ allows me to display the name as part of the macro when clicked using a button on the sheet. But how much I achieve this same effect and pull the items portrait image. I have tried every combination of ${item.[insert try here]}$ that I could think of.

I am at a loss.

formal goblet
timid marten
novel crypt
# formal goblet `${!%{return linkedEntity.img;}%}$`, which will give you the **path of the image...

The issue is I am trying to pseudo automate the process so I do not necessarily need to manually find the image path of each item and type it in. I'm trying to have the clickable button be one and done. No need for me to find the image path, the button macro does it all.

<h3>${!item.name}$</h3></b>
<small>${!item.Man_Basic}$</small>

Its a button on the item displayer page. If the only way to do it is to pick apart the whole thing, and reprogram my entire sheet this would truly be disheartening.

formal goblet
sinful spade
#

Add it around your quantity add and it should force the sheet to update and display correct

timid marten
#

my label roll is inside an item in an item displayer

#

tried this, doesn't work

`+${item.name}$${setPropertyInEntity('item', 'Quantity', "item.Quantity + 1")}$

if (actor.sheet) {
await actor.sheet.render(true);
setTimeout(() => {
actor.sheet.element.find('select[name="system.props.ccBirthCycle"]').val(randomCycle).trigger("change");}, 300);}`

shy osprey
#

In an items dropdown menu is it possible to make the options show with different colors? If not, is it possible to show those dropdown options in an item displayers column with different colors? And with" possible"I mean a way that is simple and doable for the average mortal.😅

sinful spade
#

Wouldn't work in my case since Im working in dynamic tables

sinful spade
icy panther
#

but I have no clue personally

sinful spade
icy panther
#

so not impossible then 😝

#

I'm struggling with just populating a dropdown 🙂

formal goblet
#

Allowing formulas in the classes-field of a Component should suffice to allow conditional formatting, right?

icy panther
#

have I got this formula completely wrong?
${alookup(fetchFromUuid("lookup('spawned_vehicles', 'uuid')", "Dynamic_Equipment_Table"), 'mount_location', 'Mount_Light_Weapons', '===', true, 'Mounted_Weapon_ID', '===', '')}$
its in a user input template, and it's not throwing an error, but doesn't show any data either

formal goblet