#Custom System Builder

1 messages · Page 6 of 1

formal goblet
#

Not possible. It is not meant to be referenced (visual only). You have to work with the keys.

Hint: These keys are NOT LIMITED by special characters, they can contain anything.

#

fetchFromDynamicTable('item.tableName', ...) is possible in an Item Container. Or do you mean something else?

formal goblet
void locust
#

I guess you're right. ||my ocd keying scheme will suffer||

formal goblet
#

Huh. Your Label Roll Message looks exactly the same as mine (stylewise) 🤣

carmine escarp
void locust
#

I don't know why but it never crossed my mind that I could have spaces in keys

#

lmao

void locust
#

I think that thus far is looking good for my first attempt ever.

zealous forge
#

Just making sure, you can't have an Item reference an Actor property in the Item Modifier, right?

void locust
#

using the attached string on the getPropertyDataFromActor function.

Ej. getPropertyDataFromActor("attached", "Strength") gives you Strength from whoever it's attached to

zealous forge
#

"attached" doesn't seem to be working

#

If I reference the actor directly it works, but not with the attached string

#

Attaching an item just means dragging it onto an item container in the character sheet, right?

rocky briar
#

hey all, is there a way to reference an item's drop-down list entry (label, not the key) in an actor's itemContainer?

zealous forge
#

You can't reference the label, but you can make the key identical to the label

rocky briar
#

oh that's simple, thank you lol

formal goblet
zealous forge
#

I'll have to retry tomorrow, but it didn't seem to work on the item itself either

potent fossil
formal goblet
#

Not really 😅

vagrant hollow
potent fossil
#

would be cool if in a future update we could changer the icon

#

like at least the same way we can add ones in the sheet

vagrant hollow
noble tendon
#

Finally i am making the little details, but i have a problem with the css. I am editing a copy of character-display.css but i can't find where is the white row color of tables.

potent fossil
#

Is it the way item containers are built ?

carmine escarp
#

the item container accepts magic artifacts, and its second column spits out the name (or if i figure this out the names) of any stat it modifies

#

the statmodifier is a dynamic table named 'statmodifier' within the item itself with the columns 'statname' and 'statbonus'

carmine escarp
burnt ridge
# potent fossil How in other systems they manage to change if tho ?

Any system which is being raw coded can do basically whatever it wants (limited only by their coders ability). CSB is for us coding plebians who can't just dive headfirst into all the raw javascript and CSS, it's essentially a translator between the regular foundry system and people who don't speak fluent code, CSB does an amazing job of making all this type of customising accessible for those people, but comes with some limitations that people who are able to code directly don't need to worry about.

potent fossil
# burnt ridge Any system which is being raw coded can do basically whatever it wants (limited ...

Yeah, for sure I get this. I was more questioning the complexity of the potential integration of such a feature. I mean, obviously, me having to use CSB and to ask so often for help here tells a lot about my coding abilities, so I'm more trying to have some better understanding of why is it a limitation. Because CSB deals with some incredible other stuff that seems way more complex, I was wondering why is this still an issue. And, I do expect that I'm missing something about the process of integrating this feature that make it harder than what one would imagine, and I was hoping to have more insight on it

burnt ridge
hazy saffron
#

Weird question: When executing a token.document.update command in a script macro, is it possible to perform ternary operations within it? The reason I ask is there are 3 properties that I need to change on a token, Height, Width, and Texture.src. However I dont' always want to change all three. The ones that get updated are based upon 3 checkboxes (booleans). I know I can do this with a series of nested if-then-else statements but was hoping to avoid that for a cleaner method.

I forget what this is called, when you 'build' the command you want to execute as a string then execute it.

icy rock
#

Can I make the item icon appear in the list of items?

#

Instead of the gray portfolio icon

zealous forge
#

I wonder if with the item update to allow for bags there will be a way to have the items in the bag not be equipped to the actor that has the bag

vagrant hollow
lusty garnet
#

Hey all, I accidentally deleted a tab on a character sheet 😭 i do have a backup but wondering how i can copy that tab from the backup template sheet to the current version as i can't find the record in the database? would it be in items as that doesn't seem to include the character sheet in it? or is the other workaround to create a new world using the backup data export and then reinport to my current world?

lusty garnet
#

ok, restored from backup by creating new world from old data - export then re import, phew!

#

that'll learn me!

void locust
#

so is there any way to have an elseif conditional?

dusky mauve
#

Hello, How I can see card of the item in the chat window?

#

It called from 'item container' by formula "${item.name}$ ${[3d6]}$"

formal goblet
dusky mauve
vagrant hollow
dusky mauve
#

Yes

#

And be able to see all info about it.

icy rock
#

How to make sure that new initiative throws are thrown every round?

UDP - Problem is Done! This value can be set in the CUB settings

carmine escarp
formal goblet
# dusky mauve And be able to see all info about it.

Well, that's not possible.

You have to specify the item-keys explicitly if you want to display the contained information of the Item in the chat.

You could also create a rich text area in the Item and drag the Item into this field. This would create a Link to the Item.

formal goblet
carmine escarp
#

it is the first time ive used this function so i might just not be using it right

formal goblet
#

You just forgot the quotes.

carmine escarp
#

i only needed the quotes the entire time

#

man you should add a disclaimer to that function on the wiki

#

"hey these quotes are needed"

formal goblet
#

Well, there is a section somewhere at the beginning of 'formulas' just about quotes 🤣

carmine escarp
#

im not reading this thing top to bottom! Im skipping around trying to figure otu what I mispelled

#

also it still aint working so im tinkering

#

im assuming i do still need those item. prefixes

formal goblet
#

For the first arg, yeah. For the second probably not.

carmine escarp
#

okay i needed it for the dynamic table

#

but not the column

#

:^) i remember AP computer science. all JS

#

i hated it then and I hate it now

#

C++! C++! My kingdom for C++!

formal goblet
#

Well, to be fair, it's not even JS, it's a custom language. It get's tokenized and interpreted in JS, but that's something the user won't see.

carmine escarp
#

well now I need to ask that other guy who had a really good looking sheet

#

about CSS and how they managed to get all that extra splash

formal goblet
#

Sure, do your thing. I'm actually also not a fan of JS. I like TypeScript way more. Or Java if you want something for backend.

vagrant hollow
carmine escarp
#

rip

carmine escarp
#

im like yeast, all i need is a starter

scarlet skiff
#

is there a basic guide for writing macros for CSB? i had to find out that you can't just use macros from other creators and learn with them.
for example it seems i can's use ChatMessage.create?
how do you reference properly the actor or the charactersheet?
so any help finding good learning material would be appreciated

noble tendon
#

I am making the css with help from other person. We made a copy of character-display.css in folder actor, inside system custom system builder.
Visual studio code free program can edit fast the css file.
In system configuration u add the path to the css. And now start editting.
In these css is the general configuration, the same for all labels, tables etc. If u wan configure all tables at the same time u must edit tables in the file. If u wan personalize u need create more tags in the css file and add to the template in advanced configuration.

For example a label for big title. Go to advanced configuration, create a tag name .title and in the css add the tag with all especifications do u want.
https://www.w3schools.com/css/

shut harness
icy rock
#

How do I make it so that negative values can be written through a Token and not through a character sheet?

shut harness
#

Yes

shut harness
icy rock
scarlet skiff
#

yikes - then this will be a bumpy road 😄 if this is all there is then i'm doing very basic things wrong

shut harness
shut harness
#

Oh

icy rock
#

But unfortunately, it is still impossible to put values below 0 through the token.

shut harness
#

Sorry I don’t know how to solve. You should try out this mod called “always HP” though. It makes HP editing much easier

icy rock
#

Field is empty

shut harness
icy rock
shut harness
#

Np

dusky mauve
carmine escarp
#

yep this is way beyond me. ill need a friend to help me out on this one

scarlet skiff
#

so for a basic macro - i managed to create a macro where the name of the character (not the token but the linked character sheet) of the selected token is output in the chat. (with actor.name)
how can i add other values from the character sheet? i tried actor.system."key" - but this results in "undefined"

scarlet skiff
#

thanks martin - i already looked at that and didn't quite understand it 😄
is there no short solution? for example if you take this and would just output "The Charakter has XXX Strength" would you need all this setup with "for" or is there other ways? if i look at other macros which are written for e.g. d&d 5e this seems to work a lot easier 😅

formal goblet
scarlet skiff
scarlet skiff
#

to be clear: the attack "DMG" is a result of a script macro and not in the charactersheet

formal goblet
scarlet skiff
#

i tried:
updateProperty(a, 'current_life', '${current_life - DMG}$');
and
updateProperty(a, 'current_life', '${current_life - ${DMG}}$');
both dont work - which would be the right syntax?

formal goblet
scarlet skiff
#

😦 seems its not that easy - can you use a value in this place? i'm not sure if ComputablePhrase(formula) can use a value instead of a formula?

formal goblet
#

Should be doable. The logic behind this is simple:

If it is a string, leave it as it is

If it is a key, replace it with its value

If it is a function, parse it

If if is an operator, handle it like a function and replace the values accordingly

If there´s nothing left to compute (no functions or operators), return.

Because you pass a number, the system things that there´s nothing left to compute and just returns this number.

scarlet skiff
#

if i put a number there it returns a error
for simplicity i changed it to
updateProperty(a, 'current_life', 15);

#

the error (might help?)

formal goblet
# scarlet skiff

huh, interesting. I´ll test this out. But a string should work for sure.

scarlet skiff
#

yeah a string is fine - but then it writes a string in a number field

formal goblet
#

No, this is only an issue if you´re using roll-syntax [] or user input-syntax ?${}

formal goblet
scarlet skiff
#

ok - so it seems with converting the number into a string and passing the string into the formula it might work 😩

#

@formal goblet thank you very much - this seems to be the solution for now - do all calculations before and then convert the result to a string

hot shuttle
#

hello, im using custom system builder to make an interactive system for wanderhome. I wanted to make a calendar that when clicked it displayed the item info about the season/month. I am using Monks Active Tiles to trigger the tile into running a macro. It works for the DM and it displays for the DM whenever anyone clicks it (permissions tested), but the item sheet isn't rendering for the player. 'Ive added the code below, but was wondering if im able to grab the players info on the click and then store it for the options parameters in sheet.render(true, options);

const months = ["Tillsoil", "Monsoon", "Bloommeadow", "Devildays", "Swarming", "Gateling", "Firetop", "Grasping", "Snowblanket", "Frostbite"];
const curmonth = window.pr.api.get('month');
game.items.getName(months[curmonth-1]).sheet.render(true);

if im in the wrong place to ask this, i apologize.

formal goblet
#

I'd say check the log for any errors. Otherwise... that's probably out of the Scope of CSB, so I can't really help there.

hot shuttle
#

okie dokie, there are no errors unfortunatley. ill check some other forums to see what they say. I couldnt find anything in API documentation but i have a backup plan if this falls through as well. Ty for your time 🙂

steel basin
#

Okay, let's say I finished a custom system using the tool and wish to make it into a standalone, for ease of use by the DM. How should I start this process?

The whole system is pretty much contained in a single Character Sheet, and i used some custom CSS for the looks.

i've seen some discussions earlier that it's possible, but didn't go into details.

shut harness
#

wait

#

I missunderstood

#

nvm

steel basin
#

that would be the path to pick the css for customization, that one i found earlier hehe'

carmine escarp
#

could you show me how to start customizing stuff with css? :^)

steel basin
#

i didn't really do a lot, just putting some backgrounds here and custom fonts there. But you could always pick something like this https://www.w3schools.com/cssref/sel_class.php

carmine escarp
#

and your tool sounds interesting

shut harness
#

I just use HTML for fonts and LiB themer for everthing else :P

carmine escarp
#

yeah but i don't know the paths for anything in foundry

#

i want to clean up the character sheet a bit so that things line up just that much better

#

add some color and decoration in

#

but i just cant figure it out

shut harness
carmine escarp
#

turn the whole thing neon pink

shut harness
#

nah text

carmine escarp
#

i actually want it to be a light gray instead of the parchment texture that currently exists

shut harness
#

reccinen lib trhemer

#

recommend LIB themer

#

it recolors the whole vtt

carmine escarp
#

im aiming for something more like the Pathfinder 2e system's art

shut harness
#

try it

carmine escarp
#

but that would only recolor my vtt, no?

shut harness
#

no

carmine escarp
#

or does it actually let me customize templates and sheets

#

for the whole party

shut harness
#

sheets inculded

#

mine looks like this

#

but you can custokmize

carmine escarp
#

its alright but not quite what im looking for

shut harness
#

@carmine escarp

carmine escarp
#

i mean for options of customization

#

id prefer to deal with the CSS

inland pecan
#

What's the best way to create a loot chest? Is that an actor type?

rocky briar
#

is there a way to sort an item container or move them items around within it?

granite apex
#

Looking to set up a condition statement to do the following: Change if it is a basic, advanatge, or disadvantage roll using a flag set elsewhere on the sheet.

I have the flag as roll_type using a dropdown, and it works to set visibility for panels and such. However, when I try to use it in a condition like the following, I either get an error or it rolls ALL the dice.

Here is what I have tried: ${roll_type == 2 ? [2d20kh] : [1d20]}$
I also tried embedding another level with: ${roll_type ==2 ? [2d20kh] : roll_type ==3 ? [2d20kl] : [1d20]}$

The variable using the dropdown for roll_type is 1=basic, 2=adv, 3= disadv

Thoughts?

formal goblet
granite apex
formal goblet
#

I think that's not what he wanted

#

He wants to sort within 1 Container.

granite apex
#

Yep, misread it as move from one container to another... it's late where I'm at, and I am getting revenge time in from too many work hours

vapid kettle
#

Hello, I'm having some issues with the following field. The props are in spanish and I'd rather not modify the underlying data structure.

#

The thing is it's throwing "ERORR" and I'm not sure what is and isn't supported, because the ternary seems correct and other ternaries are used elsewhere that work correctly

void locust
#

Hey I found out that conditionals do not allow for strings, only numbers.

#

They do allow for strings as the fallback values though

#

For example they allow this:

${sens_class==0?'Backups':null}$```
but not this
```javascript
${sens_class=='Backups'?0:null}$```
floral crater
#

may be use something like that
${baseitem:=item_base}$
${equalText('baseitem','CONS')?'Body': ....

vapid kettle
#

Thanks, sorted 😄

rocky briar
midnight night
#

hi !

#

I want to retrieve the name of my dropdownlist, but apparently this is impossible.

I was advised to take the key and process it.
So I remove the 'sk_' part and capitalize it.

#

The problem if with skill have several words :

#

so i want to give a doble replaceAll, but don't work

#

<p style='text-transform: capitalize;'>${replaceAll(replaceAll(dl_cpt, 'sk_', ''), '_', '')}$ ${int_cpt}$</p>

shut harness
#

Then that should work

midnight night
#

Can we change the display?

#

No separation between Animalia and 3, or maybe not white framed?

shut harness
midnight night
#

ok 😉

#

This better ^^

#

${#Victory_point:= Type_res == 1 or Type_res == 8 or Type_res == 99 ? 1 : 0}$
${#Victory_point:= Type_res == 1 or Type_res == 8 or Type_res == 99 ? string('You gain X VP.') : string('This action don't generate VP.')}$

The first formula work, the second no ... 😒

shut harness
scarlet skiff
#

Hey - is there a way to change the list of active effects? I know you can change them at the actor_template - but can i shorten the list and change the names of the ones i use?

shut harness
shut harness
shut harness
scarlet skiff
formal goblet
carmine escarp
#

this might be outside the scope of what this language can do, but I have a question

carmine escarp
#

I am making a sheet for NPC's and I don't want them to have the full skill list, as most of them would not be used. Instead I am making a dynamic table that I can manually add skills to, ignoring the ones they don't use. I want to have a label that rolls the skill I have added using a fetchFromDynamicTable call

#

my question is this: Is it possible for me to make a roll message that searches the dynamic table for items on that label's specific row?

shut harness
carmine escarp
#

i thought user inputs could not be used in labels

#

ah i think it would just be best if I leave in the whole skill list

shut harness
carmine escarp
#

as the gm i dont mind having extra info on the page honestly

formal goblet
#

Do you mean fetchFromDynamicTable(DynamicTableKey, ColumnKeyReturn, ColumnKeyFilter1, ColumnKeyFilter2)? This would return the value of the row, where filter1 equals filter2

carmine escarp
#

i suppose

#

but i think i have changed my mind on how i will approach it

#

thanks for the help regardless

shut harness
#

It the roll formula

#

${filter:=?{FilterInput}}$

#

Try that

midnight night
#

i want to launch 2d20 if roll need advantage or disadvantage. i have a dropdownlist with this value

#

<h3>Result : ${Result1:=[1d20]}$ ${Result2:=(dl_type == 'r_advantage' or dl_type == 'r_disadvantage' ? [1d20] : '')}$</h3>
i have this code, but he give me an error, have you idea ?

midnight night
#

Formula.js:740 Error: Cannot convert "r_normal" to a number

#

i try with ref, string, and i can't wotk it

carmine escarp
#

i think its because == sets something to equal another thing

#

but thats old knowledge from a class with C++ so i am not certain

midnight night
#

yes, he want number value and i have string value ...

zealous forge
#

I think you're supposed to use a different comparator for strings

#

equalValue(dl_type,'r_advantage') || equalValue(dl_type,'r_disadvantage')

carmine escarp
#

how do I get my tokens to have bars displaying health or AC?

carmine escarp
#

ah thats right its 1 +

#

1 =*

#

you get what i mean

carmine escarp
formal goblet
carmine escarp
#

yes but in the display attribute bars I cant find anything

#

its all body.contents.xyz.xyz and so on

#

ive navigated and found what I have for health, but I cannot display its value for some reason

formal goblet
#

Do you have a number field with a defined max value?

carmine escarp
#

i do not

#

because i do not know what i would set the max value to

#

its based on all sorts of things

formal goblet
#

Well, that´s the issue. No max value no attribute bar

scarlet skiff
#

@carmine escarp don't you have to configure the attribute bars first in the actor_template?

carmine escarp
#

how do i set a scalable bar?

formal goblet
carmine escarp
#

so how would I set a health maximum that scales off of other things?

formal goblet
#

via formula?

carmine escarp
#

i can set a numberfield's maximum value to a formula?

formal goblet
#

Yeah

formal goblet
scarlet skiff
#

O_O - this is very helpful - thank you martin

carmine escarp
#

"Give me a lever long enough and a fulcrum big enough and I shall move the world"

more like

"Give me a ref(concat( chain long enough and I shall automate the character sheet"

carmine escarp
#

im trying to make a tab in a character sheet not visible unless you are a game master but the change never saves when I hit "save". any reason why that might be?

midnight night
#

hi, what is command to the bar ? Value and maximum

midnight night
#

${equalValue(dl_type,'r_normal') ? 1 : 0}$

midnight night
carmine escarp
#

i am trying really hard to get this to work but for hte life of me I cannot. its ugly as hell and it keeps spitting an error

${concat(fetchFromDynamicTable('pcclass', 'class'), '_level')}$

#

ive tested the individual parts

#

the fetchFrom works just fine

#

ive tried adding a ref( to enclose the fetch request. ive shaken up the number of parenthesis. i cannot make it work

opaque seal
#

Can someone give me a hand. I feel like I'm learning quickly, but I've ran into two issues.

  1. I'm trying to get the weight of my items to add together in a label and limit them to a total defined by their max carry weight.
    My coding so far is.
    ${fetchFromDynamicTable(ITEMTAB, ITEM_WEIGHT_TAB)}$ in the label text area.

  2. I'm trying to use drop down boxes to determine a skills attribute modifier (easily just the attribute itself.) for the purpose of a coded roll.
    I'm also wanting an if/then statement that will check to see if a checkbox is checked, and if so, add a line of code to the roll.
    Currently, my coding is
    ${[SKILLATTRIBUTE1] + [1D20]}$

I had planned on working out the checkboxes after getting the initial stuff done.
I can see where my issue may be, but I don't know how to call for it. For example, the dropdowns component key would be "SKILLATTRIBUTE1" and the key for each drop down would be something like "STRSKILL". I assume I need "STRSKILL" to call for the characters "STR" key to get it's data, but I don't know how to call for it. I have tried changing the key to "${STR}$", but I'm unsure if a key can call for another key.

I can provide screenshots if need be.

granite apex
#

Oddball question.. can I change a dropdown menu using a roll command? For example, to clear a modifier or to set a roll back to a Basic roll instead of Adv/Dis Adv ? More of a quality of life feature for some of my less tech savy players than anything.

formal goblet
formal goblet
formal goblet
midnight night
#

i have configure the bar but no number display

formal goblet
# midnight night

It's better if you let the system generate the attribute bars for you. So delete your attribute bars and define max-values for your number fields. This is the condition to let the system generate the bars for you.

midnight night
formal goblet
#

With ${}$ please

midnight night
#

it's fine, but, if i change HP on token, my sheet don't change ... normal ?

formal goblet
#

Is the token linked to an actor or not? If not, double-click the token to get the sheet of the token.

midnight night
#

how to link actor and token ?

formal goblet
#

Token-settings

midnight night
#

I need two pairs of glasses.... sry, now i have a good option checked

#

now, i'm testing launch 2 dice for fading suns v4 system. use d20 but is not a same advantage and disadvantage like d20 system d&d

#

for win a roll, we need to get a value egal or low to the goal. The goal is skill + characteristic + modifier.
the problem with advantage, we need to get under the goal value, but the better result. so i can't just use 2d20kl or 2d20kh

opaque seal
# formal goblet 1. Check this one out: https://gitlab.com/custom-system-builder/custom-system-bu...

I'm assuming for 1, you're referencing the first question asked on the FAQ, but I'm afraid I'm not sure how to utilize it based on the faq's example.
I need to first check what the key is from the dropdown box options. If it is "STRSKILL" then I need it to get the attribute labeled "STR" value and use it in the formula.
I guess the portion of the FAQ part I don't understand is the part where is says " ? 1 : 0}$ " I'm unfamiliar with the meaning of these functions?

formal goblet
opaque seal
#

oh, thats for the weight, I was ment my second question

formal goblet
#

This is a simple ternary operator (condition ? statement1 : statement2 -> if/then/else)

So what you want is this, I guess: ${ref(equalText(SKILLATTRIBUTE, 'STRSKILL') ? 'STR' : 'DEX')}$

#

It can be simplified if your options in your dropdown list match the keys of your attributes: ${ref(SKILLATTRIBUTE)}$

opaque seal
#

OH! So keys are unique across everything. Thats awesome!! I'll simplify as much as I can then. Thank you so much!!!

carmine escarp
#

why doesnt drag ruler work with this?

zealous forge
#

It does, you need to change the speed provider

carmine escarp
#

im just trying to get it to add a new waypoint on right click and it wasnt updating

granite apex
#

Any way to use font-awesome icons in Labels or Rolls other than the designated spot on the form for a single leading icon?

formal goblet
scarlet skiff
#

do i have to change some settings so players can access the char sheet properly? i'm testing with a second pc and i gave the ownership of a actor to player 2 - but there is nothing in the sheet. in the sheet the content is set like in the picture. if i access the character from my "gm-pc" it shows everything but not from a second pc?
This is just a Problem with MAC 🤮

granite apex
opaque seal
#

I have managed to get my total weight set up with the item container. Does anyone know how to stop it from allowing the total weight to go over a defined max weight?
I want to be able to have a max weight of X, and allow the players to go above that weight by 10. However, when they are above their max weight, I want it to decrease their speed, or modify other things, which I believe I can figure out using the If/Than "?" operator. The main question is, how can I keep it from letting them add items to the item container once a value has been reached?

formal goblet
opaque seal
#

That what I was assuming. I assume there is a way to apply a condition (Think exahustion or something along those lines) if they go above their max weight?

#

Thank you again @formal goblet You're an absolute lifesaver when it comes to learning about this.

formal goblet
opaque seal
#

Cool. I'll play around with that and see what I can figure out. Wasn't sure if that would be overly complicated.

burnt ridge
sweet fjord
#

@brittle moth hi, loving the CSB so far. Is there a way to get checkbox true/false from a formula? ie ${myfield.checked}$ ?

sweet fjord
#

Also how do I show an item key value in a itemlist column? I have "gear_location" as item field. I can filter on it but can't show it in column

#

Another one. Is it possible to set a value via a roll formula? I'd like to have a click toggler that also sends info to the chat, or just a way to monitor change on field values and log to chat would be better. So that accidental clicks are more obvious and logged for important features.

burnt ridge
formal goblet
burnt ridge
#

I thought it was also 1, such that you could do things like ${key * checkboxkey}$ to return 1 x whatever

#

I may just not understand how that's working, but that is working in my sheet

formal goblet
# burnt ridge I thought it was also 1, such that you could do things like `${key * checkboxkey...

Type coercion is the automatic or implicit conversion of values from one data type to another (such as strings to numbers). Type conversion is similar to type coercion because they both convert values from one data type to another with one key difference — type coercion is implicit whereas type conversion can be either implicit or explicit.

burnt ridge
formal goblet
formal goblet
sweet fjord
sweet fjord
pale tusk
#

Is there a way to make the Key in an Item Modifier reference another Key?

sweet fjord
#

can a dropdown be populated by a list of other PCs? or mabye I'd make special table for that and just manually input?

void locust
#

Intrusive thoughts wondering if I should do JB2A implementation

sweet fjord
pale tusk
sweet fjord
formal goblet
pale tusk
#

Is there any way to export all my templates so that their identifiers, etc., will stay the same and transfer them between games? I want to be able to use shared compendia between my games, but whenever I do the links between items/sheets and their templates get broken.

sweet fjord
pale tusk
#

I figured out a workaround using a dynamic table and some creative alternatives. 🤣

vagrant hollow
vagrant hollow
cosmic scroll
#

Hello, I was messing around with dynamic tables and after removing the dynamic table from the template character sheet, I am unable to create new characters using this template.

I duplicated the template, and tried to troubleshoot by removing elements one at a time, from bottom to top (most recent changes to oldest) until the console stopped reporting errors. It only stopped reporting errors when rendering the character sheet after all elements in the sheet were removed. I tried again, this time removing elements from top to bottom in the sheet, but the errors did not go away in the console until after all elements were removed.

Here is a screenshot of the console error when I try to create or open character sheets with my template.

I'll recreate the sheet from scratch if I have to, but was hoping someone has any insight as to what I may have done wrong with my template to cause this.

formal goblet
#

You could also export the template and try to find any irregularities inside the JSON. I was able to rescue some templates over this way.

sweet fjord
#

can I call a macro from a roll formula? or how do I define my own custom javascript formulas?

zealous forge
#

Do item modifiers need to be done for each individual item or can they be set for the entire template?

burnt ridge
pale tusk
vagrant hollow
vagrant hollow
void locust
formal goblet
void locust
#

nvm, it's working now

agile ibex
#

Hello all, I'm really new to this and am not sure where to head next to figure this out:

I'm hoping to make it so a dropdown will be able to pick which weapon to refer to when using its stats to calculate combat stats with, am I going about this the right way?

Thanks!

#

Am I right to be using an item container? Or should I be using a dynamic table somehow to display these?

shut harness
agile ibex
# shut harness I recommend making buttons on the weapons for rolls

Would this work for showing players previews with the specific weapon they have equipped? The reason being that I'm hoping to make an FE clone and being able to see the enemy's current dodge and accuracy totals and compare them to your current ones are rather important

shut harness
#

In that case a dropdown field will be much easier

#

Gimme a sec

agile ibex
#

Thank you so much!

#

I think the tl;dr of what I am hoping to do is in the bottom left have the items, their Hit Mt, Crit, Wt, Uses remaining etc there, and then be able to pick one to be used for Combat stats in the top right, and have that be what is referred to when targetted by someone else.

I hopefully can figure out most of that, but I'm stuckon this with the dynamic table requirement

shut harness
# agile ibex I think the tl;dr of what I am hoping to do is in the bottom left have the items...
  1. Make a dynamic table with number fields all the stat modifiers you want. For this example, we call the key for the attribute ItemHitBonus and the the table WeaponTable, as well as the text field for the name of the item WeaponName.
  2. For dropdown lists set the mode to dynamic table and insert the key of it. We will call the Key equipWeapon. Set it to WeaponName.
  3. Go to hidden attributes and create one. We will call it TotalHitScore
  4. In TotalHitScore’s formula field, do ${first(fetchFromDynamicTable(‘WeaponTable’, ‘ItemHitBonus’, ‘WeaponName’, recalculate(equipWeapon)))}$
#

Sorry if I made a mistake in the syntax, GTG now

agile ibex
brittle moth
#

Hello fellow CSB users 🙂
I'm giving some news, since there has been some time I didn't do so, and there are unsolved bugs in the last CSB release, the one available right now.

Some of you may remember, the last release was made with quite a bit of bugs, annoying bugs (you know like... not being able to open sheets or not being able to edit components). To not let this happen again, I have begun a process of automating some tests, to ensure the quality of each release. Aaaaand this takes time. Much time. But ! It is useful, as I tackled down some more bugs thanks to it, so... I think it's worth the wait for everyone.

So TL;DR, no worries everyone, I'm still working on the system, it has not been abandoned ! I'll be back soon with more and more features 🙂
Thank you for your patience !

And some special thanks to every one in this channel offering their time to give support to everyone, this is an incredible help !

agile ibex
shut harness
agile ibex
# shut harness What isn’t working?

Well, I've put ${first(fetchFromDynamicTable(‘ActiveInventoryTable’, ‘ItemHit’, ‘Equipped_Weapon’)))}$ under a Hidden attribute, but it doesn't seem to be referrable for the formula I've put into my Accracy, which is currently ${(SKL*2)+LUK}$

I'm hoping to add the weapon's Hit to that, and have the drop down switch between selected weapons

#

I suspect I have severely gotten this wrong

shut harness
#

You forgot to ref the name

#

And you set Equipped_Weapon as a string

agile ibex
#

ah, yes, i see

Right, so I've done that, and fixed the bits I should have, and ended up with:

${(SKL*2)+LUK+(first(fetchFromDynamicTable(‘ActiveInventoryTable’, ‘ItemHit’, ‘ItemName’, Equipped_Weapon)))}$

#

However, it seems to still be returning an error :/

formal goblet
#

Can you provide a screenshot for what you´ve done so far?

agile ibex
formal goblet
#

nvm

#

The table name is wrong.

#

Should be ActiveInventoryTable instead of ActiveInventoryItemTable

shut harness
agile ibex
#

Hmmm, I've fixed that, I think, but still getting the error message, yeah

formal goblet
#

What does the console say?

agile ibex
formal goblet
#

Are you using some special characters as quotes? You should only use '.

agile ibex
#

... Oh no, I think I see what I've done.

#

actually, no, I have been using '

shut harness
#

Oh shit that is my fault

#

I am on my phone

agile ibex
#

OH i see

shut harness
#

So I misstyped

agile ibex
#

${(SKL*2)+LUK+(first(fetchFromDynamicTable('ActiveInventoryTable', 'ItemHit', 'ItemName', Equipped_Weapon)))}$

shut harness
#

So sorry 🙇‍♂️

agile ibex
#

ok, this should be it, let's see...

#

That did it, thank you both so so much

agile ibex
shut harness
#

Alright

#

Btw something you should know since you are new to CSB:
You can use HTML in labels

#

It can be used for styling, font-awesome, and images

agile ibex
#

That is both excellent to know, thank you!

#

I will admit I kept reading the bit about fetching and just couldn't get my head around it, but seeing a directly applied example on my table has helped a lot

shut harness
#

tell me if you need any more help setting up your system.

formal goblet
scarlet skiff
#

hi all - i'm struggeling with the syntax in the item container. i got ${item.itembase==(24 or 25 or 27 or 29 or 31 or 35)?item.itembase:0}$ but this shows the base everytime and not only for the ones i want to. can't i use logical or here / how do i use logical or there?

formal goblet
agile ibex
#

So if I wish to make it so that the weapon's damage is calculated either as Mt+STR or Mt+MAG based on whether or not it is magical, do I have it right that I'd want to add a drop down thing to the dynamic chart for physical or magical, then write something like this?

${STR+(first(fetchFromDynamicTable('ActiveInventoryTable', 'ItemMt', 'ItemName', Equipped_Weapon)))}$

At least, I know this would be correct for physical, but how would I change it to MAG for a 'magical' weapon that has magical as its dropdown option?

#

I keep staring at the wiki and feel like I'm looking in the wrong places lmao

scarlet skiff
#

ah ok - well its better than writing one if-statement after the other 😄 - thanks @formal goblet

formal goblet
agile ibex
#

Ah, perfect, thank you

shut harness
formal goblet
shut harness
#

Wait missread

formal goblet
#

And it´s vice versa btw

shut harness
#

Oops

shut harness
scarlet skiff
#

yeah 😅 there are gaps 😄

#

another question - how do i properly pull this information out of the itemcontainer? lets say i have this container which only shows a number with the prober itembase (what we just did). if i want to access that data do i have to reference the item container? just referencing the key "weapontype" with weapontype!=0?1:0 makes the label go blank

scarlet skiff
#

uhm - so its not possible for me - i think i cant assign a modifier
i don't have "static items" but a "base-item" which can be everything - or can i somehow get a dynamic item modifier output?

#

for reference here a screenshot to better describe my "base-item"

formal goblet
#

UI, willste das nicht aufsplitten auf eigene Item-Templates? z.B. auf Rüstung, Waffen, Inventar?

scarlet skiff
#

naja ich kann mir vorstellen, dass es vielleicht nicht die beste lösung ist. ich denke ich muss mir noch überlegen, ob es mir wichtig ist, dass eine "automatische kontrolle" eingebaut ist - ansonsten müssten meine spieler ein bisschen mehr eigenarbeit leisten. ich könnte natürlich die modifier-liste entsprechend erweitern, aktuell sieht die auch schon "etwas größer" aus... siehe screenshot

#

ich hab es eigentlich so gelöst, weil fast jeder stat auf jedem item rollen kann und deshalb ein universales item mir als beste lösung erschien

formal goblet
#

Yep, bye bye Übersicht 😅

scarlet skiff
#

geht mit excel eigentlich ganz gut 😉

agile ibex
#

One more syntax question for this evening I swear 😅

I want to make it so that a sum goes as SPD-(WT-CON), but I only want to actually have it as SPD-(WT-CON at least 0), so I don't accidentally give people a speed boost for being stronger than the weight of the weapon they are carrying.

Right now I've got to ${SPD-(first(fetchFromDynamicTable('ActiveInventoryTable', 'ItemWt', 'ItemName', Equipped_Weapon))-CON)}$

#

But of course, this just creates that issue of adding to the Speed 😅

#

I'm just not sure what the conditional modifier should look like

formal goblet
agile ibex
formal goblet
#

Nope, your max-function needs at least 2 numbers.

agile ibex
#

Hmm, back to the drawing board to figure this out then 😅

formal goblet
scarlet skiff
#

wouldn't ||${SPD-max((first(fetchFromDynamicTable('ActiveInventoryTable', 'ItemWt', 'ItemName', Equipped_Weapon))-CON, 0))}$|| solve your problem? i think martin wants you to figure it out yourself so i added the spoiler

agile ibex
#

Ah, okay okay!

So, like this?

${SPD-max((first(fetchFromDynamicTable('ActiveInventoryTable', 'ItemWt', 'ItemName', Equipped_Weapon))-CON), 0)}$

#

I didn't look at the spoiler as I do want to learn

#

as someone who has
very little coding experience 😭

scarlet skiff
#

👍

#

same here - but with trial and error its getting better 😉

formal goblet
scarlet skiff
#

yeah this would be another way to handle my "item-problem" but i guess until integration it will be a while
i just realised that item modifiers wouldn't really fix my problem since item modifiers apply in every item container (do they?) - and then any item in any itemslot would add the modifier to it - to fix this i already did this:
${itemslot==0?0:(itembase==33?1:0)}$ where itemslot 0 = the backpack - so i would have to add this for every type and every slot - which is way to much (atm 35 bases and 10 different item slots...)

formal goblet
#

Well, actually, every Item has its own modifier.

scarlet skiff
#

maybe to understand it better - i wanted to implement some kind of "fail-safe" so players can't equip a 2-hand weapon at the same time with one-hand weapons
i guess i should just settle with the system i got since it's working pretty good - and everything else will be "trust the player"

#

and the other thing i wanted to automate was getting the weapon type which is equiped to reference it in other formulas - but i guess i'll just do a dropdown "which weapon is equiped" - is way easier on my end 😅

formal goblet
formal goblet
scarlet skiff
#

hmm - maybe the solution is script macros? i'm not quite sure how to pull information out of the item - but for a start it should be possible with a script macro to check if the item container contains any items?

formal goblet
#

The Actor is actually the real Item holder. The Item Container is only there to display them.

agile ibex
#

Thank you so much to @formal goblet and @shut harness both for the help - progress made today with next to no proper scripting experience, likely gonna spend tomorrow learning how to make it so players can target enemies and get the sums for attacking an enemy displaying it on their sheet as a combat 'forecaster calculator'

scarlet skiff
#

ahhh so there is no way to get items since you cant distinguish between "carried" and "equipped" items

formal goblet
scarlet skiff
#

interessting - so you could use this to get the propertydata of the target (e.g. target-AC) and use it for roll-formulars inside the char sheet right?

formal goblet
#

Yeah

#

It also helps to pull information from an actor to an Item

scarlet skiff
#

i'm just digging through the actor data - already found the item props and modifiers (FYI my universal item got 168 modifiers atm 😅 ) - any idea if the containers could be found there? if you go by the .json there are the container named etc. so shouldn't you be able to pull this information with a script macro?

formal goblet
#

Probably, but I don´t know under which path it is available.

scarlet skiff
#

found it

#

it really helps if you just look at your .json and follow the path there - its the same in foundry

#

just follow the system -> body -> content -> content etc. path you need

#

i might celebrated to early ... the item is not placed there so this will not help

sweet fjord
#

can you trigger a macro from a roll formula? like ${mymacro}$ ?

formal goblet
sweet fjord
formal goblet
sweet fjord
sweet fjord
formal goblet
#

There's an example in the Wiki

shut harness
# agile ibex Thank you so much to <@199124934880919552> and <@563116519610122241> both for th...

Here is a place to start. Recommend saving all stats as hidden attributes to make it easier. Not deep into FE so sorry if I did anything wrong.

Make a label for your attack button, and set this as your roll formula

${accuracyRoll:=([1d100])}$
${(accuracyRoll + accuracyBonus) >= getPropertyDataFromActor("target", "Dodge") ? (accuracyRoll >= (100-CritRate) ? “Critical” : “Normal Hit”) : “Miss”}$

opaque seal
#

Is it possible to add conditions to the modifier list?

#

Sorry, to be specific. The modifiers on character sheets. Not item modifiers. Things like "dead" "unconcious" "asleep" that whole list

opaque seal
#

I can't seem to find it listed anywhere in the wiki or faq. I assume it's going to be in a text file somewhere rather than addable in the system on foundary itself.

sweet fjord
cosmic scroll
#

I feel like I'm missing something basic, but I can't seem to get roll table results to work right. My formula is ${[#Random Ancestry]}$ but when I click on the label to make the roll, it shows up like the top message, versus the bottom message which is a roll directly from the roll table.

dusky parrot
#

I'm trying to make a dynamic table for character's available attacks, I have a drop down for the character to select the appropriate stat. How do I fetch the stat's value stored in the stat name?

In the column Accuracy: level + mod

level is an int

column "mod" is the dropdown to choose strength, dexterity, etc, using the exact variable names

strength, dexterity, etc are integers

#

I'm guessing its something close to
ref(sameRow('mod'))
but am at a loss

oblique spear
#

Hello. Can you pin the url to the gitlab in this channel ?

cosmic scroll
agile ibex
#

So, I've began my attempts, and I want to start with a helpful 'combat calculator' for my players that will display their chance to hit, crit, and whether either side is fast enough than the other to get an extra attack. I'm hoping to integrate this onto the main character sheet, so that when the player targets an enemy and looks at their sheet, it will update the calculator values appropriately, and otherwise indicate that no enemy is targeted.

To start with, I'm hoping to get the calculator to show it knows who is targeted.
This was what I attempted for this:
${getPropertyDataFromActor('target', 'name')}$

However, when I attempted to target an opposing actor, and open the character sheet for the token with this line of code, I get the following error:
Error: An error occurred while rendering CharacterSheet 69. Uncomputable token name

I'm assuming this is my bad somehow, but what am I missing? Thank you!

shut harness
#

Just want to see it it works

agile ibex
#

Sure thing, one moment!

#

Hmm, nope, this error comes up:
Uncaught (in promise) Error: undefined. Uncomputable token name

#

Interestingly the following does work as a roll formula:

${accuracyRoll:=([1d100])}$ ${(accuracyRoll)>=ACC-getPropertyDataFromActor('target', 'DODGE')? 'Miss' : 'Hit'}$

#

So I imagine I need to add a separate name, perhaps?

shut harness
#

Wait

#

Are you trying to get a property or the name itself?

agile ibex
#

I'm trying to get the name of the token being targeted, so the latter, I think?

shut harness
agile ibex
shut harness
#

Likely yes

agile ibex
#

Is it possible to Replace a value with another value using the replace function from an Item?

#

e.g. if the stat Critical was calculated as: (SKL/2)+WeaponCrit - could I add an Item as a skill that replaces SKL with SPD?

#

Wait, I think I've figured it out, hopefully.

#

Hmm, nope.

So, I tried putting this as the set (=) function for the skill;
${(getPropertyDataFromActor(attached, SPD)/2)+(first(fetchFromDynamicTable('ActiveInventoryTable', 'ItemCrit', 'ItemName', Equipped_Weapon)))}$

I've also tried:
${(getPropertyDataFromActor(attached, SPD/2))+(first(fetchFromDynamicTable('ActiveInventoryTable', 'ItemCrit', 'ItemName', Equipped_Weapon)))}$

#

I'm pretty sure I'm missing something silly here 😅

formal goblet
agile ibex
formal goblet
agile ibex
formal goblet
#

Well, if a Item just does "Add 2 points to Skill A", then it´s just a simple Item Modifier for that Skill. If Items can change the formula of a skill, then it might be worth to note the formula in a different place (e.g. hidden attribute) and apply that formula with recalculate().

This way your Items can just override the formula-text of that hidden attribute.

agile ibex
#

Beginning to see why it was advised to do things as Hidden Attributes by m!ke above, gosh.

formal goblet
agile ibex
opaque seal
#

I asked yesterday, hoping I can get a little more info today. How can I create new active effects on a character sheet. Such as "asleep" "stunned" etc etc,

pale tusk
#

So is there any way to change an item's ID? I'm desperately trying to create compatibility across different games with the same custom system (so I can have working links to items, etc, without having to uniquely set them up in each individual game), and I have had no success at all. Is this just impossible?

scarlet skiff
scarlet skiff
#

Hi so this time i wanted to ask in advance if/how this might be possible 😅
I want to add spells to my game. So this are items with a new item_template just for them e.g. spell_template. On the item i want to have the name of the spell (which is there by default at the top) and add a few features (e.g. feature1/2/3). The goal is to have a script macro pull the propertys of the spell and or the actor and combine them for the spell attack.
Now my problem is similar to my last one. If i want to call the spell properties from the actor i would need to add item_modifiers for each spell. If i have more than one spell this would break since the properties should be seperate (not like weigth). So has anyone done something like this and a possible solution for it?
I'm leaning to call the actor props to the item and then with a script macro calling all items of the actor. Maybe i can filter this item list by the item_template?
After that i should be able to access the item props for the calculation.
For example i would call the damage bonus of the actor and add it to the damage of the spell. with this spell damage i would run the macro.
So im not sure if this would work properly?
Also calling macros from the sheet is a problem which was discussed above so im not sure if putting macros in the sheet would do anything good.

formal goblet
# scarlet skiff Hi so this time i wanted to ask in advance if/how this might be possible 😅 I w...

What are features of a spell?

Properties of the actor and the current item can be combined in the Item Container (if you only want to combine them). Otherwise the actor doesn´t have direct access to the Items, so you´re right that you either have to pull the actor data in the item or you have to use item modifiers. If neither of both is possible, it´ll get really tricky.

You can currently do the following things with macros:

Call a macro from a Label Roll Message (without any formula-computations or messages). Works without problems with \amacro (macroName)

Call a macro from a Label Roll Message with input-parameters. Problem: Will leave the macro-command in chat (ugly) {{macro (macroName) (inputParams)}}.

You cannot do this:

Call a macro from a Label (or any other formula). Problem: The macro-call should happen on every sheet-update, not just once.

I was working on a macro-function, which can call a macro (both for Labels and Label Roll Messages), but there´re some obstacles, so I need some feedback before I can continue.

scarlet skiff
# formal goblet What are features of a spell? Properties of the actor and the current item can ...

From the top of my head the important parts i need to input into the macro would be: spellname (=string), and a whole lot of different numbers for the damage calculation (i prepared basically all "features" as numbers e.g. 1=true | 0=false so i can use them in formulas if needed and they can be processed by item modifiers).
spells overlap with the actor props mostly with WAM, damage, BCD, mana_cost (and some more i would need to look up every spell) which should all be numbers (=int). so for example the actor got 5 damage, the spell ads 3 damage -> so when the player uses the macro and chooses the spell it should calculate with (5+3)= 8 damage
i'm not sure if i answered your question with this?

realistically i think i will handle all rolls with script macros since the calculations are pretty wild for stuffing it all into the actor or item sheet. so the only thing i might do is add buttons which call the right macro --> \amacro (macroName) should work (if not its not a big deal)

on a side note: your problem with {{macro (macroName) (inputParams)}} (=ugly chat) should be solvable with world scripts? if the message in chat always starts with {{macro ( you could hook the script on the chat message and show/hide the message based on the content of the message? i use something similar to only show an "apply-damage" button to the actor who got targeted (for everyone else the button is hidden)

formal goblet
scarlet skiff
pale tusk
#

Can anyone help me figure out why this formula isn't working as a label in an item container?
Roll ${item.dice_pool>0 ? concat(item.dice_pool, 'D+') : ' '}$
The true condition works, but the false condition is returning an error.

pale tusk
#

(What I'm trying to do is have the label be blank if the dice pool isn't greater than 0, otherwise display the roll text and dice pool.)

pale tusk
formal goblet
#

try ${typeOf(item.dice_pool)}$ and tell me what you get

pale tusk
formal goblet
pale tusk
formal goblet
#

What´s the formula of it?

pale tusk
#

${ref(attribute) + ref(concat(ability,'_dice'))}$

formal goblet
#

attribute and ability are also keys of the item?

pale tusk
#

Yes, they're set via dropdown lists.

formal goblet
#

Show the template (and the dropdown list)

pale tusk
formal goblet
#

And I hope, that you know, that if you have attribute: strength and strength: 42, ref(attribute) will return 42 and not strength.

pale tusk
#

Right. That's what it's meant to do. 🙂

formal goblet
#

That´s a big item... Btw, AFAIK, you don´t need \", you can use " directly.

#

Ah wait, might be just in the export. That would make sense

#

Try out typeOf() for every key in your Item, which you use for the formula and see if you get unusual results somewhere (e.g. matrix or array instead of number).

pale tusk
#

Doing so. I should check even keys that aren't related to dice_pool?

#

Everything seems to come up as string with no errors, so far.

formal goblet
#

You basically check every dependency. If dice_pool is dependent on attribute and that is dependent strength, you first check dice_pool, then attribute and then strength, and so on...

pale tusk
#

Right.

#

All strings, no errors

formal goblet
#

🤷

pale tusk
#

But it does seem like something that should be possible, right?

vagrant hollow
#

You are saying above that the true condition works? So error is a result of a emptiy field?

scarlet skiff
#

@formal goblet i wrote you for the button-problem

pale tusk
formal goblet
#

The formula is syntactical correct

vagrant hollow
#

Maybe test placing just a letter instead the space?

pale tusk
#

I've tried letters, numbers, keys...

#

What I really wanted to do was hide the label entirely if the condition was false, but that didn't seem to want to work, either.

vagrant hollow
pale tusk
vagrant hollow
#

damit

pale tusk
#

One thing that confuses me is that when I display dice_pool on the item, it returns the right value (a sum or 0). When I then reference it from the actor, if it should be 0 it returns as a blank instead.

#

The blank possibly seems to be the issue?

formal goblet
#

wrap dice_pool with number() maybe?

pale tusk
#

Okay, that returns either the right value or ERROR

#

So, if it would be 0, I get ERROR. Otherwise, it returns the right value.

#

Okay, I may have found something. It seems like a problem I've had many times before. It seems...default values don't actually work.

#

I have to go in and physically enter values for the dropdowns on the other items, and suddenly it works.

#

I was assuming the default values would take, but they don't.

vagrant hollow
#

Sound like the same error i got with rich-text-fields. They show up but are not useabale in a rollmessage.

pale tusk
#

Yeah, exactly that.

#

Once you enter a value, even a space, then it recognizes the field.

vagrant hollow
#

Yeah, EXACTLY.

pale tusk
#

Okay, if I use it as a conditional under advanced configuration, it affects the entire column on the item container at once, so that won't work. Wish I could make the label icon conditional as well.

formal goblet
pale tusk
formal goblet
#

Well, the conditional part can be handled by formulas. The result will just return the right thing for your HTML.

pale tusk
#

Hm. Doesn't seem to work, but I'm probably doing it wrong? ${item.dice_pool>0 ? 'dice-d10' : ' '}$

formal goblet
#

Like I said, plain HTML. That´s not HTML, that´s just text 😛

pale tusk
#

What do you mean by plain HTML? I'm not trying to attach any markup.

formal goblet
#

Example: <i class="fa-regular fa-${item.R_Aktiv ? 'check' : 'xmark'}$"></i>

pale tusk
#

I don't recognize a lot of that. 'fa-'?

formal goblet
pale tusk
#

Neat. I've never used this before!

#

And I can just pass the formula with fa-${}$?

#

Apparently not. <i class="fa-regular fa-${item.dice_pool>0 ? 'dice-d10' : ' '}$"></i> doesn't do anything. Apparently the FA stuff is complicated.

#

Okay, it works if I don't put it in the roll icon field but instead put it in the roll text, itself.

#

Very cool.

scarlet skiff
#

does anyone know if you can use formulas in number field labels? the description just says: "Label : If set, will display this label next to the field on the sheet"

shut harness
#

Just make a label before a number field

scarlet skiff
#

ok thanks

pale tusk
#

Is it possible to make some kind of a link or button or the like in a roll that would allow one to show/hide something like a detailed text description?

pale tusk
quasi plume
pale tusk
quasi plume
#

Ah I see, you want to hide and show.

#

I thought you simply wanted to hide info.

#

Did you look through the doc I linked@pale tusk ?
I'm not 100% sure but it may be a start to what you want. Sorry I can't be of more help

pale tusk
shut harness
#

@pale tusk
<a href="url">link text</a>

pale tusk
#

Just making a link won't toggle a hidden section in any way that I'm aware of.

dusky parrot
#

Is there a way to do multiple operations off of one dice roll?, if my roll is Xd8s, can I get both the sum and the number of 8s?

scarlet skiff
opaque seal
#

Are item keys and character sheet keys nonexclusive? I know you can use item.X to call for a key off an item sheet. I'm trying to add a roll button to my item container and have it call to the items damage but no combination of code I've tried has worked. Currently just using ${ [1D20] + item.DMGATT }$ I've tried using : surrounding the key with them inside the roll bracket area and without. Once I put them in the brackets the roll button doesn't work at all. My current code will roll, but comes up with an error each time.

I think I see it. 4.2.8 getPropertyDataFromActor. I'll give this a try

pale tusk
opaque seal
#

Okay, have a question after all. Using the "attached" special value for getPropertyDataFromActor. When is an item considered attached? I have the item in my test characters item container. I have tested the code by using the characters name instead and it worked. However, when I change the code to "attached" the code goes blank on the sheet.

scarlet skiff
shut harness
#

Look up foundry dice modifiers for more info

dusky parrot
shut harness
#

I can’t find any on the documentation. I will ask in core

dusky parrot
#

Ty

shut harness
dusky parrot
#

Gotcha. Im guessing I can tie that to something on the sheet to call?

shut harness
#

But it can get props from the sheet

pale tusk
#

Is there a way to link to items from rich text fields, such as @UUID[]{} would do?

formal goblet
pale tusk
#

I drag the item in, and it produces the UUID string, but there's no actual link.

opaque seal
#

Can someone breakdown the attached operator for getPropertyDataFromActor. What constitutes for an item to be linked to an actor? Is this the only way to use a key on an actor from an item as well?

vagrant hollow
pale tusk
opaque seal
#

I'm still at a loss on how getPropertyDataFromActor with the attached operator works. I assumed dragging an item into an item container would "link" the item to the actor. But still no luck on it pulling any values from the character sheet.

opaque seal
#

Just to see if it was working, I wrote that code out as a label. It's supposed to go where the attribute section is of the weapon, but I think I'm going to have to do some redesigning to make that work. I wanted to be able to select the weapons roll attribute bonus with a drop down, and have it be used in a roll on the character sheet on an item container

opaque seal
#

Unfortunately nothing is showing up on the weapon

formal goblet
#

Update a value on the item sheet and check the console for any errors.

opaque seal
#

Only error is "Specified value "ITEM NAME" cannot be parsed. I've removed the Default Value in the item name text field. No changes.

formal goblet
#

What version are you using?

opaque seal
#

Version 10, CSB 2.2.4

#

If I change is from attached to "test" which is the actors name. it pulls the info

#

So the code should be working. I just don't know what constitutes an item being linked/attached/

formal goblet
#

Try out the following: ${getPropertyDataFromActor('attached', "5", 0)}$

#

It's linked as soon as the Item is dragged to the actor.

opaque seal
#

That provides a 0.

formal goblet
#

Well, at least the fallback-value works.

opaque seal
#

lol. Yep. Not sure whats going on with it then

opaque seal
#

Looking at that code. Now that I think about it. I don't think that will test if the attached operator is working. Since we're giving it a value rather than a string to search for on the character sheet.

opaque seal
opaque seal
#

I would kill for an undo option right now lmfao. I just accidentally deleted an entire tab while trying to edit it.

crimson rain
#

I am considering making a Trinity Continuum sheet using CSB, but I have kind of run into a problem.

How would I create dicepools using any attribute and any skill?

#

which is to say, how do I make it so I can add any two stats together to create a dicepool out of the combined numbers and be able to adjust things on the fly?

shut harness
floral flint
#

i dont fully understand the fetchFromDynamicTable('name') command

crimson rain
# shut harness Not familiar with the system. Can you explain it?

you make rolls by adding one of your Attributes and one of your Skills.

You then roll a number of d10s equal to your attribute score and skill score, with anything 8 or higher being a success

you then count how many successes you roll, then add automatic successes (but only if you roll any successes at all)

#

the trick to this is that one can roll any combination of Attribute and Skill if they have the right justification.

pale tusk
#

According to my players, they're unable to view dropdown items from the compendia. Is there a way to enable them to do so?

scarlet skiff
#

Hi, my Sheet ist getting bigger and bigger. There are a Lot of simple calculations in it. Now i worry that when im finished Performance will be really Bad. In the console every time i Update a value a Long list appears and the Update already Takes Like a second.
Can this Happen? How can i improve Performance? Are Hidden Attributes less Ressource intensive?

burnt ridge
burnt ridge
burnt ridge
noble tendon
#

i found a problem testing.
${sum((armor_box1==false ? 0:armor_mov1),(armor_box2==false ? 0:armor_mov2),(armor_box3==false ? 0:armor_mov3))}$
Formule work if select any checkbox but creating a actor, value is blank, i need show a 0 because show empty and the derivated calcules dont work.

noble tendon
floral flint
# burnt ridge this section of the documentation covers that: https://gitlab.com/custom-system-...

I tried following that, that's why I came here for a solution. I tried multiple things but currently "fetchFromDynamicTable('invetory','wgt')" which I think should be right, into the Visibility formula box. The guide is very vague and doesn't use plain speak for fetching.
I'm just trying to understand why I can't add a total of numbers from a dynamic table despite trying what the guide tells me to do.

formal goblet
shut harness
#

oh wait alex already answered that. sorry

crimson rain
#

continuing to work on this. How do I make rolls from a dynamic table?

formal goblet
# crimson rain continuing to work on this. How do I make rolls from a dynamic table?

There are 2 different ways:

You create a Label inside the Dynamic Table, which will have a Label Roll Message. There you can reference the attributes of the same row with ${sameRow('ColumnKey')}$

You create a Label outside the Dynamic Table, which will have a Label Roll Message. There you can reference the attributes of the row you want to have (selected by a dropdown list) with ${fetchFromDynamicTable('DynamicTableKey', 'TargetColumnKey', 'FilterColumnKey', DropdownKey)}$

crimson rain
#

I ended up with something like this, it is not working

Rolling ${sameRow([:saved_dicepool:d10cs>=8], 0) + sameRow(:saved_roll_enhancement:, 0)$}

formal goblet
crimson rain
#

is there some way to make it so the D10s can be seen?

formal goblet
#

Just remove the #

crimson rain
#

saved me a whole lot of beating my head against code!

scarlet skiff
#

hi, anyone know if the module "effect macro" works with CSB?

floral flint
floral flint
#

Ive made some progress - Im able to reference a command from a button in a specific row!
But I cant get it to actually do the macro for some reason.
https://gyazo.com/3438d0e69245ffe1a92b4a4eddd2bb5b
Using ${sameRow('macrocommand')}$ I get the above effect.
Ive tried ${ref(sameRow('macrocommand'))}$ <- but that doesnt do anything.

shut harness
civic finch
#

how does the initiative formula work? I can't get it to add 2d6 to the roll

scarlet skiff
agile ibex
#

I seem to be having a similar issue, I can add effects, but they can't be edited in a way that impacts the sheet the same way that the other conditions are via the in system character sheet, nor can it seem to modify it from within the CUB.

Tried system.props.[attribute] also, but that doesn't seem to cooperate here (unlike with Illandril's tooltips, which can interact with this, it's odd. May need something like recalculate involved?)

shut harness
scarlet skiff
#

this is strange. the "old" active effects are still there but do nothing. the new ones are present but there is no button to add modifiers

scarlet skiff
#

any ideas @shut harness ?

shut harness
#

no sorry. Maybe is isn't compatible

#

I apologize if that is the case

formal goblet
#

@agile ibex @scarlet skiff @shut harness Combat Utility Belt is not integrated into the system. The only 2 modules, which are integrated into CSB are _chatcommands and Bar Brawl. We cannot guarantee for other modules to work with this system.

I did some tests with CUB and can say that it doesn´t work like intended. You can add custom effects but you´ll get into trouble adding modifiers to it. I´ll need some more insights to identify where the issue lies, but that´s what I can say for now.

shut harness
#

alright my apologies. I knew it did not have native but I thought it would work correctly.

scarlet skiff
#

ok then there is maybe another solution to my use-case ?@formal goblet @shut harness
i can add active effects with a script macro as a result of an attack (this already works) . now i want to automatically remove the active effect at the end of it's duration (for example after 1 combat round). have you done something like that or any idea how i would do this?

formal goblet
#

Sorry, never worked with that

potent fossil
#

Hey guys, I want to modify this macro so that it corresponds to the value of the skill the player is rolling. Here, I just put 5 as to test it. How does I make it go and get the proper value ?

(async () => {
  let competence = 5; // replace 5 with the skill

  const promptMode = `
    <form>
      <div class="form-group">
        <label>Mode de lancer:</label>
        <select id="mode" name="mode">
          <option value="normal">Normal</option>
          <option value="avantage">Avantage</option>
          <option value="desavantage">Désavantage</option>
        </select>
      </div>
      <div class="form-group">
        <label>Modificateurs (séparés par des virgules):</label>
        <input id="modificateurs" name="modificateurs" type="text" value="" placeholder="0" />
      </div>
    </form>`;
#
  let dialog = new Dialog({
    title: "Options de lancer",
    content: promptMode,
    buttons: {
      ok: {
        label: "Lancer",
        callback: async (html) => {
          let mode = html.find("#mode")[0].value;
          let modificateursString = html.find("#modificateurs")[0].value || "0";
          let modificateurs = modificateursString.split(',').map(mod => parseInt(mod.trim())).filter(mod => !isNaN(mod));
          let totalModificateurs = modificateurs.reduce((acc, mod) => acc + mod, 0) + competence;
          let rollFormula = (mode === "avantage") ? "2d10kh" : (mode === "desavantage") ? "2d10kl" : "1d10";
          let jet = new Roll(rollFormula);
          await jet.evaluate({ async: true });

          let baseRoll = jet.terms[0].results.find(r => !r.discarded).result;
          let resultat = baseRoll + totalModificateurs;

          if (baseRoll === 10) {
            let jetSupplementaire = new Roll(`1d10`);
            await jetSupplementaire.evaluate({ async: true });
            resultat += jetSupplementaire.total;
          } else if (baseRoll === 1) {
            let jetSupplementaire = new Roll(`1d10`);
            await jetSupplementaire.evaluate({ async: true });
            resultat -= jetSupplementaire.total;
          }

          let rollTable = `
            <table>
              <tr>
                <th>Jet</th>
                <th>Comp.</th>
                <th>Mod.</th>
                <th>Tot.</th>
              </tr>
              <tr>
                <td>${baseRoll}</td>
                <td>${competence}</td>
                <td>${modificateurs.join(', ')}</td>
                <td>${resultat}</td>
              </tr>
            </table>
          `;
#
          jet.toMessage({
            speaker: ChatMessage.getSpeaker(),
            flavor: `Lance un ${rollFormula} en mode ${mode} avec la compétence (${competence}) et les modificateurs [${modificateurs}]`,
            content: rollTable
          });
        }
      },
      cancel: {
        label: "Annuler"
      }
    },
    default: "ok"
  });

  dialog.render(true);
})();
shut harness
#

@agile ibex @scarlet skiff Found out settings extender works as a alternative. Doesn't do the duration thing like @scarlet skiff hoped but does allow custom status effects

agile ibex
lethal flax
#

so first time being here, how do i'm using a tabbed panel system so how do i make it so you can only veiw one of the tabs by checking a checkbox?

#

i am new to making a system in this sub system

carmine escarp
#

there is a custom CSS visibility field, but its so beyond my ability that I cannot help you beyond that

potent fossil
scarlet skiff
agile ibex
#

Is there a good resource for figuring this out possdily? 👀

shut harness
green jasper
#

Hello, I'm horrible with code, there is a simple way to use custom sheet from the Sheet Template Library?

shut harness
green jasper
#

how to import the json?

shut harness
green jasper
#

find, tnx

shut harness
#

NP

nova narwhal
#

i'm still fairy new to the custom system builder, is there a way to write a formula for character speed/movement based off the character size? like tiny would give a speed of 20 feet, small 25 feet, medium 30 feet, large 35 feet, gargantuan 40 feet. i have tried using conditionals and maybe i'm screwing it up. i have the character size selectable from a dropdown list so i don't know if that has something to do with it and each has their own unique key. creature_size is the name of the drop down list and then its creature_tiny, creature_small, creature_medium, creature_large, creature_gargantuan.

shut harness
agile ibex
shut harness
#

No

#

Settings extender

agile ibex
#

there we are

#

yeah, I keep reading this and I think I'm totally misunderstanding what it does

shut harness
potent fossil
#

And how would this work ?

shut harness
formal goblet
potent fossil
#

Okay thank. Another thing, is it a way to filter find the template name of an object ?
in one of my macro I wanted to make player roll for the weapons they use. But, to do so, I need to filter by template name so that the macro would show a list of the weapons linked to an actor

formal goblet
potent fossil
sweet fjord
#

is it possible to call a class.function() from within a ${}$ call? eg ${myclass.myfunc('something')}$ ?

sweet fjord
#

or some other way to get text from a module function into a character sheet label in CSB

formal goblet
formal goblet
# potent fossil I'm not sure I see how I can I find the key to use in order to filter by templat...

When you type game.actors in the console, you´ll get a Map of Actors. If you click on it, you´ll see a List of all Actors. You can click on one of them to get more information about a specific Actor (pic 3).

There we see an entry with the name items (Type: Map). If we click on it, we see, that this Actor has 2 Items in it (pic 4). And now if we want to see the information of 1 specific Item, we just click on that (pic 5).

Our goal is to filter the Items by a specific Item Template, so we have to find the template name in this structure. But we cannot see it right now, so we have to check the underlying paths (e.g. system). And there it is. Under system there is a field called template (pic 5).

But wait, that´s not the name of the Item Template, it´s just a random string. And yeah, you´re right. It´s not the name of the Item Template, but it might be a unique id of the Item Template. So, how do we check that? Well, we just need to check the data structure of the Item Template. And how do we get them? Well, there´s something like game.items, which lists all Items in the Tab, including our Item Templates. And what do we see? There is an entry with the same id we had in our Item (pic 6). The ID is also under the field id.

Because we want to filter by the Item Template Name, we have to check the data structure of the Item Template. And well, it´s actually under the name, very convenient (pic 7).

#

Let´s summarize what we have:

game.actors lists all actors

Each Actor has the items-field, where all items of an Actor are listed

The Template-ID of an Item is under system.template

One of the entries in game.items matches with the Template-ID of the Item (ID is also under the field id)

The name of the Item Template is under the field name

So how do we apply what we got? We do it the following way:

const actor; //We assume that we already have the Actor
const itemTemplateName = '_Weapon' //Must be given

const itemTemplate = game.items.find(item => item.name === itemTemplateName) //Find the Item Template by the given name

const filteredItems = actor.items.filter(item => item.sytem.template === itemTemplate.id); //Filter Actor Items by the Item Template ID
still quarry
#

hello, when i create a component, can i create duplicates of it to speed up my workflow? for example: i want to use a dropdown list to choose skill proficiency levels, but i have 20 skills, and i don't want to do the exact same thing for all of them

shut harness
still quarry
#

oh, i see, but this would then require the players to input all 20 skills themselves, wouldn't it?

#

i need a specific table with specific skill names and copy paste dropdown menus for the skill ranks

#

i need a table where the circled parts are all the exact same dropdown menu

#

and the selected value of those determines the bonus to rolling when clicking the labels on their left

formal goblet
still quarry
still quarry
#

i would like to make clicking Might roll a 1d20 + X where X is determined by the dropdown list's value
i can see that making Might a Label lets me write a chat message and i can output both a 1d20+5 roll and the list's value with that, but i can't seem to write a function that rolls 1d20+0 if Untrained, 1d20+4 if Novice, etc, what am I missing?

still quarry
shut harness
shut harness
agile ibex
shut harness
#

So sorry

#

I have both so I mixed up the name

still quarry
#

but doesn't that just retrieve the value? which would then be Untrained? i can already retrieve that, i just need to convert that string into a number somehow

shut harness
still quarry
#

that's exactly what i needed then!

shut harness
#

Yes

#

Does the same thing

#

Look more about conditionals in the docs

agile ibex
#

Out of curiosity, how much referencing can you do with Items/ItemContainers?

Specifically, can I set it up in such a way that an (alternate) formula for a damage roll (originating from an item) can check if a checkbox is marked?

still quarry
#

i was looking at them but they kept giving me errors, i just assumed after a while that they expected numbers only

still quarry
agile ibex
shut harness
#

I put ‘ in the end cuz I don’t have the proper thing on my keyboard

still quarry
#

oooooh i didn't even notice that ' difference

shut harness
#

Ye sorry should have said

still quarry
#

okay, now it works, thank you!

shut harness
#

still quarry
#

can i make the resulting roll display both the rolled die and the total in the chat message?

#

just so there is no need to keep clicking the roll total output

zealous forge
#

I.E., the key for Novice is 4, Trained is 5

#

If you have two with the same value, you can get sneaky and make the key a math equation that gets evaluated, like 18-1 for 17

agile ibex
shut harness
#

Sorry about the confusion earlier 😅

#

but ye, I enjoy this mod too

still quarry
scarlet skiff
scarlet skiff
still quarry
upper basalt
#

Is there a way to have an attribute bar use a value from a field on the character sheet? Basically like putting an hp bar on a token so changing it on a token also changes it on the character sheet and vice versa

sharp prairie
upper basalt
still quarry
formal goblet
still quarry
#

damn

sweet fjord
#

can a formula get the current actor id?

sweet fjord
#

or some way to read actor values into a label? kind want the actor ID.

sweet fjord
#

Or is there a hook to edit value on field read? Like onGet(field, dothing(){})

formal goblet
#

And no, no hooks

nova narwhal
#

ok is there a way to take a number generated from a roll and post it to the character sheet, for example im using a focus point system which is very similar to the age roller system that generates stunt dice. i have the formula listed below to generate the focus points but how do i reference these to show up on the character sheet. I have them known as FP in the formula below. I basically want to take the results and show them on the character sheet. however these will be replaced constantly as each roll generates new focus aka stunt points.
<table>
<tr>
<th>Agility Task Roll</th>
</tr>
<tr>
<td>Modifiers</td>
<td>${agi_value}$
</tr>
<tr>
<td>Rolls</td>
<td>${roll_1:=[1d6]}$ ${roll_2:= [1d6]}$ <span style="color: red">${roll_3:= [1d6]}$</span></td>
</tr>
<tr>
<td>Total</td>
<td>${agi_value + roll_1 + roll_2 + roll_3}$</td>
</tr>
<tr>
<td>Focus-Points</td>
<td><strong>${FP := (roll_1 == roll_2 and roll_2 == roll_3) ? roll_3 * 2 : (roll_1 == roll_2 or roll_2 == roll_3 or roll_1 == roll_3) ? roll_3 : 0}$</strong></td>
</tr>
</table>

formal goblet
nova narwhal
#

ok well ill see if i can find anything

dusk surge
#

Hi!
All this is new to me, but I can;t seem to get this syntax right:
${if (eMARCH = "eControl") {Control} else if (eMARCH = "eHealth") {Health} else {Marksmanship}}$
Where eMARCH is the Key for a dropdown
eControl is a Key from the dropdown content
and Control is the Key to a number field.
I have tried all kinds of variations, what am I doing wrong?

#

I got this one to work, so I know it can take if, else if, else...

#

${Readiness < 5 ? Readiness : 4)}$

shut harness
dusk surge
#

Ok, thanks!

#

Ok, I tried this:

${(eMARCH = 'eControl') ? (Control) : ((eMARCH = 'eHealth') ? (Health) : (Marksmanship))}$

And it always returns the value in Control.

Any suggestions?

dusk surge
#

Ok, I finally figured out why you used equal text instead of "=" and it is working, thanks!

dusk surge
#

Good to know, thanks!

#

I am trying to filter the die roll results on a Label Roll Message macro. When I assign a roll to a variable, it only saves the sum, not the individual rolls.
What am I doing wrong?

dusk surge
#

I haven't gotten very far. But when I use this code, it shows the die roll and then displays the die total:
${Roll=[:eAtkAcc:d10];Roll}$

#

I have a lote more to do, but I am stuck in the water until it gives me the die results to filter...

noble tendon
#

Hi, i an triying configure addons work with CSB. My first problem is the path to hp. I dont know the exact syntaxis.
Open the console and copy path i obten attributeBar.vida, but dont work. ¿Need i any more word before?

actor.data.attributeBar.vida ???
data.actor.attributeBar.vida ???

formal goblet
vagrant hollow
noble tendon
#

No, i am using a number value with maximun other cell.
i try that u write and don't work.

still quarry
#

can i set a default grid measurement instead of 2 meters per square?

#

or do i have to change it in every map?

vagrant hollow
noble tendon
#

boss bar work with props.vida / props.vida_max.
Very thanks, the next is splatter.

noble tendon
#

I have 2 questions.

#

When i make a new actor, there are field with formules wich depends checkbox conditions. The initial state is null and the sum dont work. When activate the checkbox for first time, all work. I try to use null in the conditions without success.

original
${sum((armor_box1==false ? 0:armor_mov1),(armor_box2==false ? 0:armor_mov2),(armor_box3==false ? 0:armor_mov3))}$

My try with null
${sum((armor_box1==null ? 0 :(armor_box1==false ? 0:armor_mov1)),(armor_box2==null ? 0: (armor_box2==false ? 0:armor_mov2)),(armor_box3==null ? 0: (armor_box3==false ? 0:armor_mov3)))}$

still quarry
#

can i make a 3rd bar somehow?

shut harness
still quarry
#

thanks!

dusk surge
#

I am still learning, what is the difference between "=", "==" and ":="?

shut harness
dusk surge
#

Thanks!

formal goblet
#

= does nothing in CSB

potent fossil
#

Hey guys, do you know of anyway I can make a item give modifier depending of a dropdown list in a dynamic table ?
the objective would be to have a dynamic table that would ask what modifier this item applies and to what statistic does this modifier relates. Meaning a number field that corresponds to the value of the mod and a dropdown list correspond to the statistic the modifier should apply to.
Then the modifiers in the items would be ones that are made in function of whatever is put in these fields
Does this make sense ?

scarlet skiff
nova narwhal
#

hey guys I have been using a formula listed below for a homebrew d6 system. This formula is currently used for all roll types, including attacks, ability checks, saving throws, etc. It basically is a 3d6 that generates Focus Points (similar to the AGE gaming stunt points). Anyways I'm trying to figure out a way to perform advantage and disadvantage. I need it basically to do a 4d6kh3 and 4d6kl3. the stunt die may be excluded if it is the lowest on disadvantage or vice versa. But being new to csb and no knowledge really of coding. I'd figured I'd ask you guys if there is a way to either rewrite the base formula and still generate the focus points or can is there a way to reuse this formula to include the advantage or disadvantage.
<table>
<tr>
<th>Rolling for (whatever)</th>
</tr>
<tr>
<td>Rolls</td>
<td>${roll_1:= [1d6]}$ ${roll_2:= [1d6]}$ <span style="color: red">${roll_3:= [1d6]}$</span></td>
</tr>
<tr>
<td>Total</td>
<td>${roll_1 + roll_2 + roll_3}$</td>
</tr>
<tr>
<td>Focus Points</td>
<td><strong>${(roll_1 == roll_2 and roll_2 == roll_3) ? roll_3 * 2 : (roll_1 == roll_2 or roll_2 == roll_3 or roll_1 == roll_3) ? roll_3 : 0}$</strong></td>
</tr>
</table>
[6:54 PM]

hazy saffron
#

What are the correct ways to read from and write to a hidden attribute on an item? When the item is instantiated, there is an array of hidden items, each with a 'name' and 'value' but they are all listed was 0-23. Is there a way to get a value of one of the hidden attributes?

scarlet skiff
#

anyone got insight how i can reduce the amount of computation foundry does? what are best practices for CSB you found to keep the game running smoothly?

scarlet skiff
#

is it possible / has anyone already implemented label roll message with a blind roll?
for example i want to do the skillcheck with click as open message. and with shift+click it should do the same but as blind roll. is this possible in CSB?

umbral jackal
#

How would I use an item modifier to increase one of its equipper's stats by one of the item's variable values?

#

E.g. my character has a stat with a key of stat_ACV, and I want to give him an "item" that has an att_Rank value of 2, and an item modifer that increases the character's stat_ACV by the value of the "item's" att_Rank value. But no matter what I try to get the value of att_Rank, it always makes stat_ACV NaN.

shut harness
noble tendon
#

How can I get the name of the target?
I try these: ${[1d100+100]}$ contra ${getPropertyDataFromActor('target', 'name')}$ but dont work. Work if use any key that i create.

shut harness
noble tendon
#

i dont know how.
i try ${name}$

shut harness
formal goblet
shut harness
#

Yes

formal goblet
noble tendon
#

target name solved, thanks.

The other problen that i have is checkbox has three states at create actor. Null, unchecked, cheked. Because initial state is null, turn formula, atack formulas are blank. ¿How can i change the null state?

shut harness
noble tendon
#

Dont see how.
I have 4 checkbox for armors. (in ABF system can wear 3 layers of armor and helmet) If any is checked, rest turn.
Formule for final turn is blank, because checkbox are nulls when create actor.

hearty zinc
#

hey @formal goblet or @brittle moth in the tips and tricks section of gitlab there is the "tooltip on hover" that I cannot make work. Could you explain it to me?

hazy saffron
#

Anyone know if ternary operators can be used in a formula ${ }$ expression within a rich text field on an item?

This is the Option ${(rank>2)?'A':'B'}$ that you can use

is a string I put into a text field description. Just using ${rank}$ works elsewhere but I get an ERROR when I try the ternary operator.

#

'rank' is the name of a field on the item and is a number field

hazy saffron
#

Related question: can the function getPropertyFromActor() be used in a rich text field or text field in a formula (${ }$)?

potent fossil
#

btw also, I don't feel like this feature is working :

7. Macro support

7.1. Roll context menu
When right-clicking on a roll on a Character sheet, a context menu will appear, with options regarding macros. Three
options are available :

Add as macro

This will show a dialog to create the new macro, asking for its name and place in the macro hotbar. When created,
the macro configuration window will open for more configuration.


Copy chat command

This will copy the /sheetRoll command for this roll into your clipboard, allowing you to reuse it later.


Copy macro script

This will copy a basic script into your clipboard to use the roll in a script-type macro. This script is
customizable to your needs.



This menu is only available on Labels which have keys.

btw, can this feature work for labels in item container, because I feel like it's not

hazy saffron
#

Can math be used in a text field formula? ${ var }$ accurately displays the value of 'var' but ${ var+1 }$ gives an ERROR

umbral jackal
formal goblet
potent fossil
#

okay thanks, I'm just also experiancing another problem with the macros. I red the thread you send my way with the '/macro macroname' but it seems like even if it at somepoint it worked now when I roll macro fromm the sheet the command does not compute

#

is there something I'm missins ?

formal goblet
potent fossil
#

I believe it is

umbral jackal
hazy saffron
#

Still unsure why you can't use a ternary operator for if-then-else inside the Rich Text Field or Text Fields but can use math operations

hazy saffron
potent fossil
floral crater
#

Hi
I am currently working on the CSS for my world.
I would like to have a css for my character sheet that is different from the one for the items. It seems that both sheets use custom-system-actor to be manipulated.
Is it possible to have on my css a character sheet and an item sheet with different customization? if yes how?

formal goblet
floral crater
#

I know this and already use it. 🙂
But how do I get a different background between the two? I have a large character sheet (1300x1000) with images in the background in a specific colour, and I don't want any more images (or maybe other) in the default colour or other.
I'd be more comfortable to have an .actor and an .item on a css level :p

formal goblet
#

Ah. Well... I know that you can define classes on component-level, but it's a different thing if we're talking about sheet-level...

keen carbon
#

is there a bug with tab visibility? i'm trying to set up a "Spells" tab that only appears if a player can cast spells, but
every time i add the "is_spellcaster true" visibility rule, it refuses to save
and every time i add it to the tab itself, it causes the name in the tab switcher menu to become blank and doesn't let me rename it

#

i've got a panel that works with this visibility rule already, but the tab itself just refuses

keen carbon
#

i have multiple times, but it worked when i tried it again just now, for some reason

#

weird

#

i wonder what i did

formal goblet
hazy saffron
#

Does the function getPropertyDataFromActor() work in a text field or rich text field on an item?

formal goblet
#

Can these components even parse formulas? There´s no hint for that in the Readme

hazy saffron
#

I've had good luck having text fields and rich text fields being able to parse formulas in ${ }$ but you have to be careful since the rich fields parse into HTML so you can't use < or > in formulas

#

but concat() and string() work so was hoping getPropertyDataFromActor() would also

formal goblet
#

Probably because of htmlspecialchars

hazy saffron
#

Yeah it changes them to &lt and &gt which doesn't work

#

however you can sort of use boolean combinations of ==

#

so that works for my purposes

#

the getPropertyDataFromActor() isn't returning an error, just empty

formal goblet
#

I see, you did some hacky workarounds

#

The context should be the same so I don´t think that it should behave different to Labels

hazy saffron
#

hehe not sure it's hacky but definitely a workaround

hazy saffron
formal goblet
#

Hmmmm. Maybe the double-quotes are a problem.

hazy saffron
#

I tried single quotes, same result

formal goblet
hazy saffron
#

The funny thing is, when looking at the HTML of the rich text the " "'s aren't being converted

#

I will see aboug decode() function

formal goblet
#

Well, you won´t have access to that because it´s not a CSB-function

hazy saffron
#

oh, hmm fair

formal goblet
#

I´m not even sure if JS has that because that´s the doc for PHP 😅

hazy saffron
#

Oh! Thought that was a CSB doc somewhere

#

The HTMl looks clean

#

<p><strong>• </strong>Total Athletics Pool: ${getPropertyDataFromActor("attached","athletics") }$</p>

formal goblet
#

It surely does... Does a fallback-value work?

hazy saffron
#

Oh good call. Yes, it does display the fallback value

#

so I wonder if my reference to the propery needs a full path

#

like system.props.athletics or something

formal goblet
#

Nope. The function does that for you by getting the right context on its´ own

hazy saffron
#

Oh...hmmm

#

Interesting, it works if I use "selected" and select the character token

#

so it's something with attached

formal goblet
#

You could check if the Item has a parentActor when attached to the actor. That´s what the function is referencing

hazy saffron
#

How do I do that? games.items or games.actors and find the item?

formal goblet
#

The later

hazy saffron
#

So the item (on the actor) has a parent Object wwhich is the character

#

I dont' see a parentActor variable yet

#

item modifiers created on the item do work so it must be referencing the parent correctly in that way

#

I wonder if the function getProperty() uses a different method

formal goblet
#

Well, Item Modifiers work quite different 😅

#

The actor pulls them from the Items and computes them

hazy saffron
#

Oh okay. So I don't see a 'parentActor' property on the item at all, just parent: which has an Object reference to the actor object

formal goblet
#

Might also be just parent, but not 100% sure

hazy saffron
#

the code says if 'attached' then actor = parentActor so I assume that is a defined property on an item?

#

or could that code be wrong? (Doesn't seem likely)

formal goblet
#

it´s a field in the options-object, which gets passed to the computeStatic()-function

hazy saffron
#

Oh yeah I see that now, and the default value is null;

formal goblet
#

Which makes sense if it´s not attached

hazy saffron
#

I don't know enough programming to know when that is called or if it's not being called with the right options

#

But this item is attached, it was added to an item container

formal goblet
#

Well, you add it to the actor, not to the container, but yeah

hazy saffron
#

I'm not sure what else to check

#

So the function is working

#

just seems the parentActor is getting null

formal goblet
#

How is your RTA configured?

hazy saffron
#

I'm not the DM so I'm not sure. I spoke with the DM and he told me I can access the fields I needed directly without using getProperty function so I got my specific case working.

#

Still not sure why the function didnt' work though

potent fossil
#

Any clue with why ref() is uncomputable ?

${#dmg_roll:=[:item.dice:]}$${dmg_roll}$ + ${#stat_mod:=[:ref(item.statmod):]}$${stat_mod}$ + ${?{Mod_Neutre|0}}$ + ${[#sublimation:=[:(:degsub:)d6:]}$

${#mag_qte:= [:item.jetintnat:]}$${#mag_mod:= [:ref(item.typemag):]}$${#mag_deg:=[(:mag_qte:)d(:mag_mod:)]}$${mag_deg}$ + ${?{Mod_Magique|0}}$ + ${#sub_qte:= [:bensub:]}$${#sub_mod:= [:typebensub:]}$${#mag_degsub:=[(:sub_qte:)d(:sub_mod:)]}$${mag_degsub}$

${#dmg_mod:= [:Mod_Neutre:]}$ ${#dmg_neutre:=[:dmg_roll: + :dmg_mod: + :stat_mod:]}$${#dmg_neutre}$

${#dmg_elem:=[:mag_degsub: + :mag_deg: + :Mod_Magique:]}$${#dmg_elem}$
Uncaught (in promise) Error: undefined. Uncomputable token ref()
[Detected 1 package: system:custom-system-builder]
    at ref (Formula.js:459:31)
    at math.js:26516:56
    at Object.evaluate (math.js:24162:45)
    at r.evaluate (math.js:24139:55)
    at Formula.computeStatic (Formula.js:728:27)
    at Formula.compute (Formula.js:292:21)
    at ComputablePhrase.compute (ComputablePhrase.js:128:27)
    at computeRollPhrase (Formula.js:784:29)
    at Formula.evaluateRoll (Formula.js:798:35)
    at Formula.compute (Formula.js:270:41)
    at ComputablePhrase.compute (ComputablePhrase.js:128:27)
    at async HTMLAnchorElement.<anonymous> (Label.js:247:21)
formal goblet
potent fossil
#

Btw any chance that your figured out what is blocking my macros from computing from the roll option of the sheet ?

formal goblet
#

Maybe it's only possible with /amacro, but don't pin me down on that.

kind basin
#

Is there a way to link to a journal entry in a character sheet?

vagrant hollow
# kind basin Is there a way to link to a journal entry in a character sheet?

Set a rich-text-area with (important): “style” at the bottom of the area set to “dialog editor”.
Now players can drag the wanted journals in and it makes a in-foundry link to them.
Looks like: @UUID[JournalEntry.UdJdggqKrJuBz8vV]{Charakter PDF}
You can set a default if you want, but there is a bug, so that the default needs to be touched (altered in any way) on every sheet.

kind basin
brave heart
#

Hi guys - Ii'm trying to build character sheet for 'Eyes beyond the torchlight' and and I wonder how to show all the rolls along with the summary score.
I'm very beginner level (still seems generous to call myself beginner), so forgive me my ignorance
${[1d20]}$+${[:stats_agi_dd:]}$+ ${[:stats_agi_bonus:]}$ gives me all the rolls, but doesn't show the summary. How can I summarize it?

shut harness
#

Unless it is something like SWADE.

#

Try this

#

${roll:=[1d20]}$+${stats_agi_dd}$+${stats_agi_bonus}$ = ${roll+ stats_agi_dd+stats_agi_bonus}$

brave heart
brave heart
#

is there a way to set the field (for example text or number) to show value based on other fields? for example +2 AC if shield checkbox i checked

shut harness
#

${armourBase + (hasSheild ? 2 : 0)}$

#

Then put that in a text

#

But you can’t mod fields with formulas

scarlet skiff
formal goblet
shut harness
cunning meteor
#

Does anyone know how to set a roll within a Label Roll Message to be a "Private" roll?

formal goblet
cunning meteor
#

Thanks

zealous forge
#

Is there a way to put a components visibility as "this formula OR if you're the gamemaster"?

#

So a user has to fulfill the formula requirements, but the gamemaster always sees it

cinder rock
zealous forge
#

Yes, that's what I'm talking about, it normally is just the formula, is there a way for it to check if the user is a gamemaster as an alternative

cinder rock
#

I'm pretty sure that if you're a gamemaster you can always see it.

#

there's no hiding stuff from the gamemasters

zealous forge
#

Nope, if you're using the visibility formula you can't see it if the formula is false, even as a gamemaster

#

On a player that is, templates are always visible

cinder rock
#

welp, then I think not, although I don't use the hiding features very much.

zealous forge
#

For now I'm just using GM only checkboxes

cinder rock
#

Anyhow, I also came here to ask a question. Has anyone tried to get Custom System builder to work with Combat Utility Belt's Enhanced Conditions? I'd kinda like to customize the status effects and automate a few things.

I'm also open to alternatives to CUB. I'm only using it for the enhanced conditions

agile ibex
#

Issue with the CUB is that you can't remove effects and the ones you add don't cooperate with the CSB framework, this one changes the effects at the backend, meaning CSB interacts with them in the same way as built in status effects

scarlet skiff
vagrant hollow
agile ibex
#

(This will, of course, be based on my rather basic understanding of the System and Module, I'm rather much an amateur still!)

#

So, I'm going to use my Foundry Fire Emblem system on Custom System Builder for this (with Sprites from the amazing Retrograde). I'm gonna show how I removed the basic conditions, and then how I added the infuse condition, and how I had it influence the sheet directly.

#

First, with the Core Settings Expanded module installed and enabled, you want to head to Core Expanded Settings, on the right here, below where Configure Settings usually lives.

#

firstly, to get rid of the base Active Effects, click on one of them in this menu, and then uncheck the Status Effect Active box - don't change anything else, then click Update Status Effect. You'll know you've done this right as the effect icon will now be faded.

#

To create a new one, just close the menu and open it again, and then fill in the blanks with the information you want I'm gonna fill this in with a 'Vantage' Status Effect, which is a skill in Fire Emblem.

#

The Status ID will be what you want to be referring to it as in your code in CSB (Custom System Builder), while the Display Name is just that, same with the Status Effect Icon, it's just where you want the icon you want to use from.

#

Then, you just hit Modify Custom, and it will be added to the list, like so.

#

Then you can go to your Configure Active Effects menu on your template, and adjust them as you usually would in CSB

#

Hope this helps @vagrant hollow and @cinder rock!

vagrant hollow
#

WOW 😍
Thank you very much!!!
This helps a lot!

agile ibex
#

Thank @shut harness honestly 😅 I'm just passing on the great help they and Martin have given me 😅

shut harness
#

Haha, I just suggested the mod. Don’t credit me for that

agile ibex
#

honestly though I suspect people can do really clever things with this, my code for this system has become rather much a mess to me

#

A lovely peak

shut harness
agile ibex
#

At some point I may well restart with the knowledge I have to do it much more cleanly and logically, at least in theory

shut harness
#

Btw, minor nitpick but I recommend separating labels from fields so you get better control of alignment and spacing

agile ibex
#

Oh totally fair nitpick - I tried solving that with a table for the attributes but to no avail

#

I think it was you who mentioned before that I can do formatting to make it look more pretty - how do I go about that? Is there a guide for it? I was to see how far I can go in making it look like a GBA game 😂

shut harness
#

I recommend using a panel

shut harness
agile ibex
#

Ohhhh, time to go learn about CSS, then!

shut harness
#

Btw unrelated to formatting, I found a crt filter mod

agile ibex
#

👀

shut harness
#

It can give you some gameboy scanlines

agile ibex
#

Ohhh, that sounds rather useful for my Lancer game, oddly enough