#Custom System Builder

1 messages · Page 12 of 1

scarlet skiff
#

oh well i don't mess with formulas in effects.
i'm not sure if it is even possible? or if it was added recently and might still be bugged?

winged sequoia
#

i have noticed if I don't put it as a formula

#

it just won't function at all

#

the issue is getting it to be accessed by the hidden attribute

scarlet skiff
#

well just to confirm what you want to achive:

  • a hidden label
  • modify this hidden label with an effect
  • true/false
winged sequoia
#

I basicly want a on off flag yes

#

(though I should update my foundry to version 11 didn't know I was still on an older version)

scarlet skiff
#

i guess you can also work with 0/1 for true/false right?

winged sequoia
#

yes but currently the issue is getting the hidden attribute to recognize it

scarlet skiff
winged sequoia
#

the active effect seems to at least be able to be pulled rom

scarlet skiff
#

basicly all you need to do is add/remove the effect. configure the effect with a basic operation like +1. set the key of the effect to your hidden label. set the hidden label to 0. then you can toggle the hidden label with the effect

winged sequoia
#

so if I"m getting this strait the issue is it has be a lable? it can't just add to the attribute?

scarlet skiff
#

uhm

winged sequoia
#

er well hidden attribute

scarlet skiff
#

i dont know what you want to know exactly

#

look at my screenshot

#

hiddenFlag is is hidden attribute

winged sequoia
#

I more or less followed it

#

and it does work with a lable

scarlet skiff
#

the label is just there to show that it works

winged sequoia
#

hilariously it shows the opposite

#

the macrO i have to check it shows the attribute is unmodifed

#

only the lable

scarlet skiff
#

sooo you mean you get the value of something with a macro and it shows e.g. 0 but in the sheet it shows 1?

winged sequoia
#
console.log(token.actor);
let hiddenActivated = token.actor.system.hidden[0].value;
console.log(hiddenActivated);
let phrase = new ComputablePhrase(hiddenActivated);
console.log(phrase);
await phrase.compute({});
let result = phrase.result;
console.log(result);```
#

love how I reset foundry and it seems to have broken, but I need to come back to this at a later point, have other obligations atm.

scarlet skiff
#

peh so i guess this is something for the devs 😅 maybe you can't do it this way

winged sequoia
#

hmm might have figured something out

scarlet skiff
#

i just checked and yes it seems that hidden attributes don't get increased by the effect but if you use a label is works

#

but you can do it with a easy workaround.

#

instead of hidden attributes create a container (panel) at the bottom which is hidden and store your "hidden attributes" as labels there

winged sequoia
#

Yes i'm seeing alteratives

#

tho weirdly it works not as an attribute

#

just not a hidden one

#

for some stupid reason

scarlet skiff
#

🤷‍♂️

winged sequoia
#

yeah because it is actually displaying properly

#

it seems hidden attributes might just be broken when it comes to formulas?

#

oh well this I can tsill work with

sharp geyser
#

So uh, today I learned that sameRow() works on non-dynamic tables >_>

dense pine
#

is it possible to modify a number field with
${setPropertyInEntity()}$ from within an item modifier?

#

?

cosmic karma
scarlet skiff
dense pine
scarlet skiff
#

OK and why would you handle this in an Item modifier?

#
  • why do you need Setproperty for that?
tiny hinge
#

iirc most modules does not work

#

doesnt display it

cosmic karma
#

its a module, Chat Portrait

tiny hinge
#

hmm ok let me give that a try

#

thanks!

dense pine
brittle moth
faint wharf
#

any one have implemented a reroll button? for things like luck etc on chat window?\

dense pine
brittle moth
#

the label will be recalculated with the number field input, and modifiers will then be reapplied

dense pine
#

sounds doable 🙂 👍

zinc verge
#

Is it possible in CSB to have a roll message list all target names if you have multiple tokens targeted, or will it only reference the first target multiple times?

static zephyr
#

That's a good question, Vailyss, I'm not sure if there's anything in the documentation regarding AOE targeting.

zinc verge
#

I suspect it’s not possible but just wanted to double check. I didn’t see anything in the doc for it either

tiny hinge
dark vapor
#

is there a way to get the data path to a specific number field within an actor sheet, so the value in it can be referenced 👀

sharp geyser
scarlet skiff
dense pine
#

@brittle moth any Suggestion?

sharp geyser
#

I think it's because the Radio 'group' is part of the same group, and the value for them (when they're made) defines what every radio button in that column is going to be.

brittle moth
#

Yep, there is a bug there, I'll fix this 🙂

sharp geyser
#

@brittle moth Any idea why this is bugging out?

#

It works fine for every other click.

noble tendon
#

hi, with the new updates, Can i extract values from item containers to make calcules with them?

Player can have 3 layers of armor and each armor have 7 tipes, blunt,edge, pierce, hot, cold, electricity, energy. Armors are objetcs in item container.

The final result for each type is take the higher and sum the half of others.

brittle moth
brittle moth
sharp geyser
#

Even though "Mode" is literally from a Number Input. I have no idea why it's having such a moment trying to "convert" it from something, when it already is?? :s

#

Beyond confusing :s

cosmic karma
#

I got the item container like that right now, the image item even scales a bit during hover for the player to see better. I'm quite happy how everything is panning out until now, thanks again to all Devs, but I would like to ask: is it possible to create a toggle/button that when pressed it would reveal / hide the description text? (I would like it to appear below the line of the item, opening like a accordion, repositioning the items to accomodate...

scarlet skiff
cosmic karma
# scarlet skiff Uhm this Looks nice, is this all CSS Styling to get bigger Item Pictures?

Yeah, just removed the boxes and then added a scale effect in css. the code is like this:

a.content-link {
    background: none;
    border: none;
}

.custom-system-item-container-image {
    object-fit: contain;
    max-width: 35px;
    max-height: 35px;
    margin-right: 5px;
    margin-bottom: 2px;
    vertical-align: middle;
    border: none;
    transition: all .3s ease-in-out;
}

.custom-system-item-container-image:hover {
    transform: scale(2);
    margin-right: 20px;
}
#

I would like to make the images bigger, but for this to be practical i would need to hide the big description text block or make it appear in another line (probably possible with css translates and such)

scarlet skiff
#

thank you 🙂

scarlet skiff
scarlet skiff
hazy saffron
#

I have what I hope is a straight forward question:

In CSB, I have a Label Roll Message that calls a macro with the syntax %{return await game.macros.getName(STUFF HERE)}%

In the macro I create a ChatMessage that displays to chat inside the macro. Right now, I have a return null; at the end of the macro but that then creates another chat message in the in game chat that just says 'null'

Is there a way to return the ChatMessage content via the "return" statement or a way to return something (or catch it in the macro call) so that it doesn't kick off another chat output in the game?

This is my ChatMessage call inside the macro that displays to the in game chat...

```ChatMessage.create(chatData, {});```
scarlet skiff
#

have you tried without return in the label? does it change anything?

hazy saffron
#

With this in the roll message:

%{await game.macros.getName('MEGSCombatCheckSkill').execute({args: ["skill", ""]})}%

and no return statement in the macro, I still get an additional chat message but now it says "undefined"

#

I get the same thing if I leaave in return null;

brittle moth
#

There is no way for a Label Roll to not trigger a chat message as of now. I'd advise you to return the contents of your chat message from the script, so that only it gets printed

hazy saffron
#

I've tried return ChatMessage.create(chatData, {}); but it returns an 'object' to the chat window

brittle moth
#

Your chat-data contains your message, in the content property. So you need to return chatData.content;

hazy saffron
#

@brittle moth Ah! I was trying chatData by itself, let me try with that

#

Hmm that throws a very wordy "Error" in the log and it displays ERROR on the chat window

#

The content displays correctly within the macro, so is it possible the chatData.content has things that can't be parsed if returned?

#

SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 202 of the JSON data

tired onyx
#

Hi, I had a question. I may be missing something.
I have a template character sheet which I'm trying to assign my health attribute to the resources bar of the prototype token, but the attribute bar only shows up for the children meaning I have to manually assign it for each child. The attribute bar is a simple attribute bar as complex ones don't let you change them from the token, and is defined as a number field with a maximum. Am I missing something?

scarlet skiff
#

@brittle moth thank you for the suggestion adding templateSystemUniqueVersion: 1 to the item macro - but sadly this didn't fix it

brittle moth
brittle moth
scarlet skiff
brittle moth
scarlet skiff
# brittle moth Exactly ^^

no - can only host privatly via port forwarding
but i guess that won't help?
i can send you my world file if this would help?

brittle moth
scarlet skiff
#

will dm you

hazy saffron
# brittle moth Weird... Can you try `return '"' + chatData.content + '"';` ?

I tried that. I get the same error. This is what's showing in the console.log as the object's formula (chat data)

formula: `'"<h3>Accuracy (AP: 10)</h3><b><i>Combat Check</i></b></br>AV: 10 (+0 / +0 bonus)<br/>EV: 10 (+0 / +0 bonus)<br/>OV: 1 (0 shifts)&nbsp;&nbsp;&nbsp;SN: 4<br/>RV: 1 (0 shifts)<br/><br/>Roll: <span style="background-color:#dfd; padding: 1px 4px 1px 4px; border: 1px solid black;" data-tooltip="8 3"> <span class="fas fa-dice-d20"> </span> 11</span> (Hit! 1 shifts)</br></br><h3>RAPs: <strong>10</strong> (Full EV +0)</h3>Trained - Physical&semi; Mystical*&semi; </br><b>Knockback AP:</b> 1 - Target's Size AP"'`

scarlet skiff
hazy saffron
scarlet skiff
#

or encodeURIComponent?

#

i pass some data and use the following combination

let attackDataJson = JSON.stringify(attackData);
data-attack-data="${encodeURIComponent(attackDataJson)}"

and then reverse that in another macro - without that i had errors

#

could be worth a try

hazy saffron
#

I am calling a single macro from a label roll message, and trying to return the string of chatData.content back. I am not sure about using another macro to do something else

scarlet skiff
#

try in your macro

let chatDataJson = JSON.stringify(chatData.content);
let chatDataURI = encodeURIComponent(chatDataJson);
return chatDataURI;

then in your label you would need to

%{let chatDataURI = await game.macros.getName('MEGSCombatCheckSkill').execute({args: ["skill", ""]})
let chatDataContent= JSON.parse(decodeURIComponent(chatDataURI));
return chatDataContent}%
hazy saffron
#

Ah okay I can give that a try!

honest oasis
#

Hi guys. So, I have this code:

${#acrobatics:=ref('acrobacia')}$
${#bonus_acrobatics:=ref('bonusacrobacia')}$
${#roll1:=[1d20]}$

<div class="mb-roll">
  <h3>${!check_type}$</h3>
  <p class="sum">${!string(roll1)}$ + ${!string(acrobatics)}$ + ${!string(bonus_acrobatics)}$</p>
  <p class="result">${!string(roll1+acrobatics+bonus_acrobatics)}$</p>
  
</div>```


And i'm trying to add a check if roll1 = 20 it appears a message. But i'm unable to do so. Anyone can help me?
brittle moth
hazy saffron
hazy saffron
hazy saffron
scarlet skiff
#

just do the same as you did in your macro

#

in script you can do everything you can do in macros

hazy saffron
scarlet skiff
#

yes. use the returned content for content and get the speaker like you did in your macro.
you should be able to pretty much copy and paste it

hazy saffron
#

Okay let me try!

brittle moth
scarlet skiff
#

ah i guess you can create 2 messages with the label script then 🤔 one which gets styled and done like with a script macro and one which creates CSB from the label roll 🤔

hazy saffron
#

So something in the label roll message above is telling it to display twice, once correctly and once with 'undefined'

scarlet skiff
#

yeah what @brittle moth said. its a limitation of CSB. you always get a chat message with the label roll execution

hazy saffron
scarlet skiff
#

i think so - at the moment not possible i guess 🤷‍♂️

hazy saffron
#

Actuallyl what I did is have the macro return "Roll successful" or "Roll cancelled" for CSB to display

tiny hinge
#

i am not sure if i am the only one but a lot of the dynamic tables on my sheet that used to work previously is now broken after the most recent update. once you delete an existing entry everything goes haywire with the roll.

hazy saffron
#

it's not perfect but at least it's not ugly

tiny hinge
#

do anyone else have this problem?

hazy saffron
brittle moth
brittle moth
scarlet skiff
#

i closed the issue in gitlab

tiny hinge
tiny hinge
#

It's just simple code


<p style="text-align:center;"><i class="fa-solid"><b>Skill Level:</b> ${!sameRow('level')}$</i></p>


<table class="pc_chat_card">
  <tr>
    <td>${!sameRow('description')}$</td>
  </tr>
</table>```
#

@brittle moth this bug happens once an entry gets deleted on the dynamic table. its like the index didnt get reset or something; retaining some reference to it

#

it works on my older char sheet which i did not remove anything

#

happens after the recent update

brittle moth
#

Huh

#

It is very weird, it works for me ><

tiny hinge
#

i guess its good to mention these tables has been on the sheet for a very long time

#

not sure if that's helpful

#

in most cases i have to delete the table and remake it from scratch but that will mean i will be missing data on all my sheets ><

brittle moth
#

could you open the dev tools, and send me the result of game.actors.get('<yourActorId>').system ?
You can copy the actor id by clicking the compendium icon in the actor's header

tiny hinge
#

interesting so it doesnt remove the entries huh but set it to false deleted. thats how you do the undo?? nvm this. just random musings lol.

brittle moth
#

Welp
Honestly, I don't know what to say

#

I really don't know what went wring with these tables, nothing looks bad in their definition...

#

You could try exporting and reimporting the actors, that could fix things

tiny hinge
#

dang ok

#

let me try

#

yeah its also happening to new dynamic tables

#

i am not sure whats wrong

#
    at logCompatibilityWarning (commons.js:1996:19)
    at ChatMessage._logV10CompatibilityWarning (commons.js:8453:14)
    at get data [as data] (commons.js:8341:24)
    at isMessageVisible (tabbed-chatlog.js:73:27)
    at tabbed-chatlog.js:530:88
    at Array.filter (<anonymous>)
    at yes (tabbed-chatlog.js:530:71)
    at Dialog.callback (foundry.js:65067:35)
    at Dialog.callback (foundry.js:65120:54)
    at Dialog.submit (foundry.js:65005:46)
    at Dialog._onClickButton (foundry.js:64933:10)
    at HTMLButtonElement.dispatch (jquery.min.js:2:43184)
    at y.handle (jquery.min.js:2:41168)```
#

not sure if this is related

brittle moth
#

That's from the tabbed-chatlog module

tiny hinge
#

ok

#

hmm not related then

#

it seems like it is sheet template specific. if i move the table from the sheet to a brand new template the problem doesnt happen. but every new dynamic template on the sheet meanwhile is not working correctly.

#

ah scratch that also happen on new template

#

i am at wits end

brittle moth
#

It looks like your actor doesn't save/reload when you change a value, but it should

#

maybe that's the issue

tiny hinge
brittle moth
#

Ah ! I reproduced your issue

#

I'll look into it, this is not normal...

tiny hinge
#

Phew lol

#

But yeah the trigger seems to be the deletion

#

My half baked theory is that it probably retained the reference even after deletion....maybe

brittle moth
#

It's even dumber than that

#

the label's reference is mapped on the row it's rendered, not on the row it should reference in the data

tiny hinge
#

Oooh

#

I see

brittle moth
#

So the label on the first row will always refer to the first row of data in your dynamic table, even if it was deleted a long time ago

#

Thank you for this, I did not see this and I will release a hotfix for this ^^

tiny hinge
#

Aye awesome thanks!

#

Appreciate it

robust wren
#

i have a weird issue (not sure if it happens for a player):
if i have selected a number or text field (to write something in it) and press enter, it starts running a macro.
i can run the macro from the sheet from a button.
i also tried to use another button and then press enter, still starting the macro. pressed other roll formulas starting a macro and then press enter again in a text fiel, still starts this specific macro.
if i am not in a text fiel and press enter, nothing happens
and just tested: after clicking on a checkbox, so it marked or unmarked, it will also start the macro when pressing enter

formal goblet
robust wren
brittle moth
brave trench
formal goblet
#

You can use target.Health. The target-prefix is just undocumented for now, but it should work that way 😅

normal basin
formal goblet
normal basin
#

Oh my god, it worked

#

Thanks man

blazing ibex
#

what am i doing wrong, here?

#

the keys seems to be working. but it doesn't like the IFTHEN statement i copied from the example template

fierce harbor
blazing ibex
#

hm, i thought the dropdown list results were also keys

#

that did seem to do the trick though

fierce harbor
blazing ibex
#

is there a way to split formula between separate lines to make it easier to read

#

getting an ERROR when i tried a <br>

sharp geyser
#

${function one}$ <br> ${function two}$

drifting raft
#

I'm attempting to load up my own custom CSS for the Custom System Builder, but no matter where I put that file, the loading tab in the settings just can't spot any CSS file at all!
EDIT: So, I had to pick a different file that the browser could actually see, and then I had to go back and change the file name... Crazy, right?

topaz coyote
#

@cosmic karma really like what you're doing with CSS. Inspired me to do that next

robust wren
brave trench
#

@robust wren did you ever figure out how to stop the sheet from rolling with enter key?

fading rover
#

anyone have a good run down of how user input templates work? the wiki says that if i use the same names then fields should be filled by default from the item but i cant get it to work

brave trench
#

you can't get the template to pop up? or can't get formulas to work?

fading rover
#

template pops up

#

but test labels or fields in the template wont pull any values from the item in the item container

brave trench
#

${#?#{ExtraAttacks}}$ does your formula look like that? and your user input template should be named exactly what you put in there. caps matter, spaces matter

#

oh

#

I'm not too sure a pop up can pull values, only give them. if that makes sense

fading rover
#

hmm ok

brave trench
#

like on my pop up i ask how many extra attacks. (for full auto weapons.) player inputs a number, (the field has the key <attackTally> and then this code is run in the roll message Like this

${#?#{ExtraAttacks}}$

${#setPropertyInEntity('item', 'currentAmmo', "item.currentAmmo - attackTally")}$

fading rover
#

thanks for the info, sounds like i cant do exactly as i want but im pretty sure i can just make and duplicate user inputs to get the result i need, was just hoping not to have to haha

brave trench
#

Yeah, have to get creative sometimes. lol

robust wren
#

btw. i have a question, not sure if its doable:
i want to to track the total weight of items and so on on the sheet. Is it possible to make it look like a bar or something?

formal goblet
vagrant hollow
normal ore
#

Guys, how can I make this expression in Custom System Builder?

#

I'm trying to break my head thinking about a palliative solution, but it's difficult

fading rover
#

when using 2 number fields in a user input template can i have the 2nd number field have a maximum value of x - number field 1.... i have tried what i have previously used for this formula and it seems to just ignore the component key entirely... the user input template wont even just display information in a label from one of the number fields.. help please 🙃

formal goblet
normal ore
normal ore
#

Oh I found the error. At the end you need to put the false condition

velvet heron
#

Hi, I just updated everything to v11 and found a bug(?) where only some of the actors are no longer displaying their bars. Looking deeper, it seems like I can't even access the attribute bars at all.

dire socket
#

Is there a way to prevent the character portrait from moving in the top left?

formal goblet
dire socket
#

||maybe||

#

Only one section specifically

formal goblet
#

Look at this magnificent sheet

dire socket
#

it isnt a problem except for the fact that a couple of labels push it down just a tiny bit too much and causes it to shift

#

So if theres a way to vertically squish things in a panel

#

I'd be delighted to know

#

I can use my (very limited ability to use) css to move label text, but that doesn't actually solve the problem

formal goblet
#

I´m also no designer, so my CSS skills are... questionable. Even more without the Tailwind-Framework 😅

dire socket
#

fair fair

#

ig my bandaid solution would be to just move one or two things over so it'll fit better

#

I'm just being dumb, I really want to have a tabbed panel in the header lol

tiny hinge
#

so check either of those 2 maybe?

cosmic karma
#

Hello, is there a way to associate items (their json), directly to one of the item templates instead of the equippableItem? I'm trying a batch import using the Data Toolbox module and works like a charm. But after the import I have to manually enter each item on the newly created compedium, select my Trait template (there is other two for others types of items) , update and only then is ok...

#

before:

#

after:

warped garnet
velvet heron
# tiny hinge so check either of those 2 maybe?

They were working perfectly fine in v10 and I haven't changed any settings before or after updating, but I'll check when I get back, thanks. It's possible something got borked somewhere.

tiny hinge
#

hope there are better way to do it for easier onboarding

cosmic karma
#

The template is based on a export item exported as a json and nowhere in the item json the template we are using is associated. there is only the "type" key with the value equippableItem...

tiny hinge
velvet heron
#

I'll run ftc, forgot about that one.

cosmic karma
#

the template is associated, but not with his name. It uses the ID

#

Just add this info to the template file of Data Toolbox. When you import it the correct CSB template will be assigned to the items, but no information will be showing... yet. The trick is: just import all the compendium to the game (right click >> Import All over the compendium) and press the "Reload all Item Sheets" button on you CBS template. The info in all of your items will be updated

#

the finishing touch is: delete you compendium, create a new empty one with your preferential name, go to the recently updated items and export the folder to the newly created compendium, but now with everything filled up 🤘

fading rover
#

Heya, hoping someone can help with this.
I want to be able to set the maximum value of FIELDTWO using 4-FIELDONE inside the dialog box popup from the user input template. do user input dialog popups not work this way?

#

FIELDTWO doesnt seem to get limited by the forumla in the template

formal goblet
fading rover
#

dang, ok thanks for the heads up... thought i might have been missing something

dark vapor
formal goblet
fierce harbor
#

G'day everyone! I was thinking of counting both successes and failures of a dice pool, but my clunky brain could only come out with this: a macro with a while loop within which each die is rolled and checked for success/fail (using a simple if), accumulating the results in two variables to be formatted, along with the roll outcome, in a chat message.
Doable or just a feverish rambling?

formal goblet
#

Seems doable for me

dark vapor
fierce harbor
zinc verge
#

question for the devs: Kind of a niche ask, but would there ever be the possibility in the future to add in the ability to place an item container within an item?

robust wren
dire socket
#

oh could you give a quick run down as to how you can do that?

dire socket
robust wren
#
.sidePanel {
    width: 147px;
    max-width: 147px;
    min-width: 147px;

i am pretty sure, you dont need the row width: but it works that way 😄
for the height it is the same

.sidePanel {
    height: 147px;
    max-height: 147px;
    min-height: 147px;

and if you need both, just write them both underneath 🙂

fading rover
#

heya,
This is kind of working for me but not quite, i think im messing up the checking step?
The user input is for rolling against multiple targets and im trying to check that the amounts input dont fall below or exceed the attack value, if it doesnt match i want it to reprompt the user input and if it does match i want to be able to show the rolls like normal. anyone able to help?

formal goblet
zinc verge
#

Nice! Happy to say I found a workaround anyway, but that’s very exciting to hear all the same!

robust wren
#

and i think you should safe the Multiple Targets Attack, otherwise he will ask in the Fieldcheck with another popout, i guess, not sure if it will work at all

fading rover
#

yeah i mess with it a bit more, im not sure it will work the way i want, going to try something different. thanks for the help though 🙂

robust wren
formal goblet
cosmic karma
#

TLDR: make the options in a dropdown change by select a option in another dropdown.

I'm having a hard time trying to use dynamic tables to set the values in a list. How should I do that? What I want: I have a List A with 5 categories (keys values). When I select one of these I want the List B to present me 4 options. For each category in A there will be 4 different options in B. I want to make B a hidden dynamic table, each column will contain my options for dropdown B. Is this even the correct way to approach this?

round sleet
#

So, I'm trying to do a thing. I want a dropdown on a character sheet (easy) that adds bonuses to certain die rolls, depending on the choice. Specific use case is Kids on Bikes. For example, a child would get +1 to Flight checks. So I have the button configured to this: ${[1d:flightval:] + ref('age')=='child' ? '1' : '0'}$. But that is very wrong.

#

I also tried adding checkboxes for players to check that just add +1 to the respective roll. But I haven't been able to get that to work either. I think I'm using the condition wrong here in general.

formal goblet
round sleet
#

Like this? ${[1d:flightval:] + [ref('age')=='child' ? '1' : '0']}$
That gets me: Uncaught (in promise) Error: Unresolved StringTerm 'age' requested for evaluation
Image is the dropdown config

round sleet
#

Ah

#

That gets me Error: Cannot convert "child" to a number

#

I can make the keys numeric, I guess

formal goblet
#

You need equalText() instead of == if you want to compare strings

round sleet
#

ah

#

A secret technique 😄

#

Can't get that to work. I'll just try a generic "bonus" field for now.

formal goblet
#

Show what you got now

round sleet
#

${[1d:flightval:] + (equalText(ref('age'), 'child') ? '1' : '0')}$

formal goblet
#

Remove the quotes from the numbers.

#

And you can shorten ref('age') to age

round sleet
#

Aaaaah

#

That works, thanks!

supple latch
#

Any suggestions of how a complete noob could go about changing the appearance of the sheet using css?

fierce harbor
# formal goblet Seems doable for me

So far I've been able to get roll results, count succ/fail and show those in chat. But roll results are shown just as numbers. Any way to show them as dice, just like a standard roll?
This is what I have.

dire socket
robust wren
topaz coyote
zinc verge
# topaz coyote Do tell! Mind sharing your workaround? I'd like to have tools (item) listed as p...

so, idk that my workaround will work for everyone. Specifically, I'm doing a monster catching game, and my idea was to make the monsters be an item template that you could attach to your character, and their moves would be another item template that you could put in the monster item.

Since that obviously isn't possible, what I did instead was make 8 tabs in a tabbed panel (the number of monsters a single character can equip at a time,) and in each tab I had an item container that was labeled MONSTER_spell_[1-8] then on the spell items I added a dropdown menu for MONSTER_[1-8] and added a filter to each item container saying that the spell would only show up in that container if the spell's dropdown had the correct monster number selected for the corresponding tab on the actor sheet

#

the singular limitation to this is that I have to have a tab somewhere on the actor sheet that players can access that just has every single monster's spells on it so they have somewhere they can select which monster each spell goes to when they first get it. Otherwise they'd put a spell on their sheet and it would disappear cause they couldn't assign it a monster until it was already on the sheet, and none of the appliccable containers would display it until a monster was assigned

#

it's a very "fine for now" solution. It works great for what it is, but I'm absolutely going to abandon it as soon as I can put item containers on an item sheet

topaz coyote
#

Interesting! I did something similar using check boxes on the 'tool' item sheet, since some tools can be used for multiple skills. It's not great, since the PC/NPC technically isn't limited in how many skills they can have---just happens that most don't have more than 3 or 4, so I can just have 5 check boxes on the item sheet. I have a number field on the skill sheet [1..5] so players can assign the skill item to a skill "slot".

Then it's just a matter of dedicated panels on the actor sheet for each skill, with an item container for the skill itself and one for its tools. I like your tabbed panel idea....

#

I get worried about all the sheet calculations overhead

zinc verge
#

I also did an "active effects" section for assigning buff and debuff effects from spells. Those spells will have a checkbox labeled ACTIVE that when checked will display in a specific item container on the actor sheet.

Tbh, it'd be a touch silly, but you could do a tabbed panel within a tabbed panel and have each secondary TP have like 5 tabs for 10 skills or so, and each one of those skills have its own numbered item container for assigning tools to an associated skill, that would still look fairly clean for the most part and would cover probably the majority of builds you'd need, and if not you could always add a third base tab with 5 more sub tabs

#

a very "When in Rome" solution, but for now, we are indeed in Rome

#

if you decide to do that, I'd create sub-templates for the actual skill tab with the item container and all, that way you can just shove them into each tab instead of having to make them all by hand

topaz coyote
#

True. Yeah, I'd definitely sub-template that since Ctrl dragging between tab panels isn't a thing

#

I say 'skill' but I'm creating for Risus, so the skills are 'clichés' like "nerdy videophile kid on a bike" or "skeezy mid-life crisis junk dealer" 😁

zinc verge
#

those are skills yeah, lol

blazing ibex
#

what is going on here? i tried dragdropping an item onto the tabletop

spark nymph
#

Hello, guys!

I'm new to foundry and trying to build my world.
Can somebody help me please?

I'm trying to get the keys a value to use on another input.
It would be:

vitnivel5 = level * 5
vitnivel10 = level * 10

I need it to be numbers because I need to sum it later.

#

I tried this, but it doesn't work.

formal goblet
spark nymph
#

OMG it worked! Thanks!
It was so simple.
Thank you so much

spark nymph
#

Can somebody help me on this too?

I want my LABEL from a dynamic table to roll on chat the info on that row when clicked, how can I do this?
Using the keys doesn't show me anything on chat.

#

This is what I'm trying to send on chat.

sharp geyser
dire socket
cosmic karma
sharp geyser
#

You could have a label with switchCase which gives you a value 1,2,3, etc. And use that value.

cosmic karma
sharp geyser
#

So lets say you have a Dropdown list whose key is Food with 3 options. "Breakfast", "Lunch", "Dinner"
You then have a label which has ${switchCase(Food, Breakfast,1, Lunch,2, Dinner,3)}$ and a key of FoodList.

If you have another Dropdown menu with the key "FoodBreakfast", you can set its visibility options (within advanced configuration) to be FoodList==1 will display when you have chosen 'Breakfast' from the "Food" Dropdown list.

sharp geyser
blazing ibex
#

this was much effort but i think im getting the hang of it

sharp geyser
#

I spent far too long on my weapon template haha.

blazing ibex
#

it sucks that csb only lets you use labels in item containers, guess ill just have to make every weapon unique so i can still track durability and special ability usage

sharp geyser
#

I won't lie, I struggle with so much of CSB. I've taken a break from it because I'm kinda dumb lmao

blazing ibex
#

ive been searching discord a lot

#

its not exactly intuitive

#

think i have a small head start after working with roll20 html/css and google sheet formulas

cosmic karma
#

like this? And the key for "${switch..." is FoodList, right? Didn't work, is anything wrong?

@formal goblet I'll take a look now, thanks

#

I'm just trying to make the label part, (there is no list yet) 🙂

sharp geyser
#

Gimme a moment, I really suck at trying to explain technical stuff lmao

#

switchCase(1,2,3,4,5)
1 - Target Key
2 = Choice 1
3 = Output if Choice 1
4 = Choice 2
5 = Output if Choice 2

#

You can do 5,6) and 6 will act as an Output for any undefined choice.

cosmic karma
#

right.

sharp geyser
#

Just thought I'd misunderstand entirely what you'd say and re-explain how switchCase works lmao

cosmic karma
#

No I think i got the gist of your idea. I can see the label on screen as "1" if nothing is selected. As soon as I select something in the Food dropdown the label disappears.

sharp geyser
#

Can I get pictures of it? Just to better understand and try to troubleshoot?

cosmic karma
sharp geyser
#

This may be the reason, I tend to forget to do this for my own things.

If you make it ${switchCase('Food','Breakfast',1,'Lunch',2,'Dinner',3)}$ does it fix your issue?

sharp geyser
#

No worries. It's always the small things that end up making huge problems haha.

cosmic karma
#

just to be sure: I can put the switchCase at the end of table, make it visible only for GM and thats it or there is another way to use this technique?

sharp geyser
#

So if the visibility "formula" is set, it'll hide it for everyone, but changing it's visibility settings to GameMaster will prevent players, and others who shouldn't see it, being able to see it.

dense pine
#

I would like to change the background of a Number Field when the Number in it reaches certain tresholds. Kind of an optical "Warning".
The key of this field is "LE_current". When the value is less than 20, then it should change to orange. Less than 10 change to red.
I know how to do it with a Label Field, but for a Number Field i think i need CSS? Anyone know how to do it?

cosmic karma
#

it's a mess? of course it is!:

#

but works like a charm! Thanks @sharp geyser !

sharp geyser
#

You're welcome :) Sometimes the best solution is often the simpliest.

blazing ibex
#

shit. i've run into math

#

i brute forced it. there's probably a smarter way of doing this

${carry > slots ? floor(4 + (carry - slots)) : carry == slots ? 4 : carry >= (slots * .75)? 3 : carry >= (slots * .5)? 2 : carry >= (slots * .25)? 1 : 0 }$
cosmic karma
#

there is a way to change the state of a checkbox by comparing to a label?
If label X = 1, checkbox = true
?

formal goblet
# cosmic karma there is a way to change the state of a checkbox by comparing to a label? If la...

setPropertyInEntity('self', 'checkboxKey', "labelKey == 1 ? true : false"). But I recommend to use icons instead of checkboxes, because if the value is derived, it should be readonly. You can use this Label instead of a checkbox: <i class="fas fa-${labelKey == 1 : 'crossed-check' : 'empty-check'}$"> (You have to lookup the Font-Awesome-Icons for yourself and replace crossed-check & empty-check): https://fontawesome.com/icons

somber bay
fierce harbor
#

Hi again.
I'm trying to create a message for a dice-pool roll, in which I'd like to show the dice pool and the total at the opposite ends of the same line. Tryed this, to no avail:
content: "<style>" + ".toleft {" + "float: left;" + "}" + ".toright {" + "float: right;" + "}" + ".clLeft {" + "clear: left;" + "}" + ".clRight {" + "clear: right;" + "}" + "</style>" + "<div style=\"font-size:15px;text-align:center;border-width:3px;border-style:ridge;border-color:black;padding:5px;margin:5px;border-radius:4px;\">" + "<p style=\"line-height:180%;text-align:center;border-width:3px;border-style:ridge;border-color:black;padding:1px;margin:5px;background-color:#AAAAAA;border-radius:4px;\">" + rstring + "<p>" + "<p style=\"width:100%;\"><span class=\"toleft\"><b>" + tot + "d6</b></span><span class=\"clRight toright\" style=\"border-width:3px;border-style:ridge;border-color:black;padding:1px;margin:5px;background-color:#AAAAAA;border-radius:4px;\"><b>" + summed + "</b></span><hr style=\"color:black;\"></p>" + "<p class=\"clRight clLeft\" style=\"font-size:15px;text-align:center;border-width:3px;border-style:ridge;border-color:black;padding:1px;margin:5px;color:green;background-color:#AAAAAA;border-radius:4px;\"><b>Successi: </b>" + good + "</p>" + "<p style=\"font-size:15px;text-align:center;border-width:3px;border-style:ridge;border-color:black;padding:1px;margin:5px;color:red;background-color:#AAAAAA;border-radius:4px;\"><b>Fallimenti: </b>" + bad + "</p></div>"
This is what I get.
Any idea?
Thanks in advance 🙂

SOLVED: with tables...😅

empty perch
#

Hi all, I am looking to develop a RPG system to use within foundry.
I want to create a d6 system for the original star wars RPG.
Any guidance would be epic

dense pine
#

I would like to change the background of a Number Field when the Number in it reaches certain tresholds. Kind of an optical "Warning".
The key of this field is "LE_current". When the value is less than 20, then it should change to orange. Less than 10 change to red.
I know how to do it with a Label Field, but for a Number Field i think i need CSS? Anyone know how to do it?

tiny hinge
#

a question, is it possible to currently bundle the custom sheets as a module if other users are interested in using it?

vagrant hollow
#

Is it somehow possible to change the filter of an item container via a dropdownlist or something else?
I tried several ways to set the filter value, but I don’t get any result or error message…

topaz coyote
# vagrant hollow Is it somehow possible to change the filter of an item container via a dropdownl...

Devs might correct me, but the short answer is no. It has to be a value.

Depending on how many options you have and how many items, you can use multiple item containers, each one set to a different value derived from the drop box.

Then, set the visibility of each item container to match the relevant selected value of the dropbox.

This'll basically toggle one item container "on" and the others "off" depending on the dropbox value

#

So dropbox value equals "1", only item container with filter set to "1" is visible, etc

#

Ctrl + drag lets you duplicate the item container so you don't have to redo the container's labels manually

formal goblet
spark nymph
#

Do someone know if there's a way to copy/paste fields on CSB?
I have this section here with a dynamic table, and I must have the same fields on each tab. (Recruta, Cavaleiro, Arqueiro etc)

formal goblet
spark nymph
fading rover
#

Is there a way to hide an item container when it is empty?

zinc verge
formal goblet
zinc verge
#

Oooh I see my b

fading rover
formal goblet
fading rover
#

oh, so the item ends up determining whether the container is shown?

formal goblet
#

Yeah.

fading rover
#

thanks! i will try it out

#

worked perfectly, thanks

velvet heron
# velvet heron Hi, I just updated everything to v11 and found a bug(?) where only some of the a...

I've come across an interesting wrinkle today regarding the issue I had brought up a couple days ago. Upon deeper examination, it seems there's something up with how attribute bars are acting with active status effects.

Without effects, bars show correctly.(I've tried this both with Bar Brawl active and with it deactivated. The behavior persists both ways)
https://cdn.discordapp.com/attachments/362618732985712641/1144456658710450326/image.png

And when any effects are applied, the bars disappear and subsequently AttributeBar.xx goes away.
https://cdn.discordapp.com/attachments/362618732985712641/1144456658421031033/image.png

zinc verge
#

what's the key for the image box in an actor or item sheet if I wanted to send that image to chat?

blazing ibex
dire socket
#

Could someone tell me a way to adjust the size of panels/components like this? It's stuck taking up one third of the space (area in red, roughly), but I'd like to push it a little further to the left.

dense pine
#

Anyone have an idea why this formula isnt working? Only the last part (yellow marking) works, when the value goes below 20 it just turns black.

blazing ibex
dire socket
blazing ibex
#

shouldnt it be something like concat('string',variable,'string') ?

dire socket
#

${concat(switchCase(sameRow('Dmg_Type'), 1, 'DimGray', 2, 'DimGray', 3, 'DimGray', 4, '#EF250F', 5, '#B9EB8A', 6, '#F6E61C', 7, '#53E1BF', 8, '#B66F00', 9, '#4791DE', 10, '#FDDDAD', 11, '#EB5EA4', 12, '#639A25', 13, 'DarkMagenta', 14, 'White', 15, '#008B16', 16, '#889136', 17, 'DimGray', 'Black'))}$ it uses switchcase, just realized after looking but

#

I can try and fix yours

dense pine
dense pine
blazing ibex
#

im coming from google sheets so maybe this works a bit differently

dire socket
# dense pine there is no " inside the concat

${concat(LE_current < 20 ? '#fde026' : LE_current < 10 ? '#f0a90f' : LE_current < 6 ? '#ff0000' : '#fDF5E6')}$ this might work, imma test it real quick for you though cause why not

#

wait

#

lol

blazing ibex
#

whats the code for substituting a '

dire socket
#

@dense pine

#

<p Style="color: ${LE_current < 20 ? '#fde026' : LE_current < 10 ? '#f0a90f' : LE_current < 6 ? '#ff0000' : '#fDF5E6'}$; scale: 1.5; padding-right: 2px;" <i class="fa-duotone fa-skull"> </i> </p>

#

wait

#

no wait yeah this should work

#

well, not sure it's working as you intend, but it should display correctly

#

so troubleshooting things in terms of logic should be easy so long as you keep consistent with the rest

blazing ibex
#

maybe concat(LE_current,' < 20 ? #fde026 : '' : ',LE_current,' < 10 ? #f0a90f : '' : ',LE_current,' < 6 ? #ff0000 : #fdf5e6')

dire socket
#

Whats with the and signs

blazing ibex
dense pine
#

nothing works so far 😉

dire socket
#

uh, what exactly is the issue again?

#

wait...

#

oh

#

@dense pine got it

#

<p
Style="color: ${LE_current < 6 ? '#ff0000' : LE_current < 10 ? '#f0a90f' : LE_current < 20 ? '#fde026' : '#fDF5E6'}$; scale: 1.5; padding-right: 2px;"
<i class="fa-duotone fa-skull">
</i>
</p>

formal goblet
blazing ibex
#

yea im realizing that afterwards, was just copying his screenshot. cause why would you want two empty results in the middle?

dire socket
#

Totally got confused by how you wrote it at first, it was mostly a logic issue ig

blazing ibex
dire socket
#

Ohh

#

Well regardless, that shouldn't work, you can't have nothing for the rest to work, it'll just break. At least in my experience with colors and icons lol

dire socket
formal goblet
dire socket
#

Ohh I see

dire socket
#

Could I ask how that can be done? In the additional css class section or something?

formal goblet
#

Yeah, you'd need your own CSS-file with your classes.

dire socket
#

Hm, I have literally no idea how to do that. Suppose I can try figuring it out.

#

But pointers are welcome, I'm just kinda clueless, I mostly just flub around figuring out what I can.

blazing ibex
#

its a field in advanced configuration

formal goblet
#

It should be simple to add one. There is a small description in the readme

dire socket
#

I seeee, thank you

formal goblet
dire socket
#

Oh this is neat, I'll probably use it if I REALLY can't figure out how this css file stuff works, but I think I got it

#

Thank you

blazing ibex
#

say i wanted to make a 'group' actor. how do I reference variables from a different actor in CSB? i can't seem to find this in the foundry knowledge base

in roll20 it would be @{actorname|variablename}

dire socket
#

you mean like fetchFromActor?

blazing ibex
#

hm, doesn't show up in the foundry site. is that CSB specific

dire socket
#

it's csb specificc

blazing ibex
#

this seems to be it. wonder why its not default behavior in foundry

dire socket
blazing ibex
#

this should be 7.22. how do i chop off everything after the second decimal?

#

tried these, they have inconsistent results
A. ${fatigue + round((coin * .01),2) + round((supply * .25),2)}$
B. ${round((fatigue + (coin * .01) + (supply * .25)),2)}$
C. ${fatigue + round(((coin * .01) + (supply * .25)),2)}$

last one acts up the least often

#

whoops, it just deleted all the coins i was trading. got a NaN result

blazing ibex
#

anyone have an issue where CSB stops saving attributes on a template?

#

its right there on the sheet, but it doesnt show up elsewhere

blazing ibex
#

just absolutely refuses to update. gonna have to give up for now

vagrant hollow
formal goblet
formal goblet
supple latch
#

Question:
There is anything that can look into the the result of the dice rolls? Like, I roll the command I made for Attack. If the result in the dice is 1, display a message or so something else.
sorry if its unclear

supple latch
#

but isnt that for the appearance of the rolls?
i wanted to do checks after the dice were rolled, depending on the result

formal goblet
glossy hare
#

@formal goblet
Just a question, this isn't me asking for a feature. :p But, what's the reason we can't drag itens from a sheet to another?

formal goblet
#

It´s not implemented. It´s that simple 😅

glossy hare
#

lmao

#

thanks. have a good day

formal goblet
supple latch
drifting raft
#

Is it intentional for the tab content to be displayed on the right side instead of below the tabbed panel?🙄

zinc verge
#

Noooo… blinking

fierce harbor
#

Stupid question: is amacro not working in v11?

drifting raft
formal goblet
fierce harbor
fierce harbor
fierce harbor
#

Well...I'm trying to get actor data from inside a macro, but looks like I can't.
fetchFromActor() won't work, of course, and I cannot find a way...been looking through the thread with no success...any help?

formal goblet
vagrant hollow
#

Before the implementation of scrips, I had a rich text field where every player could set their attack special effect video and within the label roll message, along the dice call, the macro was executed and the video played.
Now the roll message just prints the script from within the rich text field as chat message, without executing it.

Is there a way to set a script that the players can edit?

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

How about you pass the name of the macro dynamically?

vagrant hollow
formal goblet
vagrant hollow
formal goblet
#

Keine Ursache 😅

vagrant hollow
formal goblet
vagrant hollow
formal goblet
#

Bestimmt 🤣

formal goblet
drifting raft
#

Is there a method to prevent the image on the sheet from shifting to the left and maintain its placement above?

fierce harbor
#

Well, I was able to use multiple arguments but now I'm stuck with Uncaught (in promise) SyntaxError: '' string literal contains an unescaped line break and cannot find anything wrong ...
I know this is not CBS-related, but any hint would be greatly appreciated

formal goblet
fierce harbor
formal goblet
#

Well, you have to (or have to escape them)

fierce harbor
#

But I haven't used them intentionally, so don't know where they are...

#

Could it be this?
const myContent = "<h2>TIRO CARATTERISTICA</h2>" + "<p>Dadi base: " + input0 + "</p>" + "<p>Ferite: " + input1 + "</p>" + "<p>Danni: " + input2 + "</p>" + cond + "<p>Quanti dadi vuoi aggiungere al lancio?</p>" + "<input type=\"text\" id=\"vtext\" name=\"vtext\" />";

#

condcontains a value calculated prior to the code you see

fierce harbor
#

Problem is, now it rolls twice, one of which is undefined...and there is no reason for that...

formal goblet
brave trench
# fierce harbor Hm, so how can I avoid that?

You can't, for now. At best you can hide what shows in chat, but it will still show a blank chat msg and play the dice roll sound. There is a feature request opened about fixing this. Maybe if it gets enough attention it will get picked sooner for future updates. https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/280

fierce harbor
cosmic karma
#

@dense pine take a look, this is the code

cosmic karma
#

Hello, I just want to say thanks again for everyone that helped with this build. You rock.
https://www.youtube.com/watch?v=rYcxuRd5Tro

Hello everyone. I just bought this book and fell in love with the artwork and the setting and wanted to play with my table in FoundryVTT.
This is my current taking for this awesome book from Two Little Mice, all done with the Custom System Builder module. Thanks to everyone who helped, you know who you are.

Two Little Mice: https://twolittlemic...

▶ Play video
blazing ibex
#

what are hidden attributes? not seeing this on the wiki

formal goblet
vagrant hollow
cosmic karma
#

will do, I'll try to make it available directly on foundry if possible

zinc verge
#

how exactly do I "upload a CSS file to the server?"

dense pine
#

Hi guys, im currently working on an action tracker and need your help. I want to visualize the number of actions each combatant has left per combat turn and reset it after the turn ends. I want to adjust the number manually. Right now it looks like this:

#

But sometimes combatants have a bigger action pool than others. Is there a way to adjust the number of circles according to the number above (3 in the example)?

#

The buttons in the example are checkboxes with some CSS (Thanks Gus!!)

fierce harbor
sharp geyser
drifting raft
#

In my conditional statements, I often generate output text such as "SUCCESS," "FAILURE," and more. I'm curious about the possibility of incorporating special characters within these strings (eg. "Roll a [[/roll 1d6]] and add..."). My attempts with the backslash \ (as in javascript) before the character have resulted in an "unresolved string item" error. My ultimate goal is to include inline rolls within the chat messages I'm creating using custom system builder's conditions. It is possible?

dense pine
#

But when i reduce the amount of actios visible it looks like this:

#

How do i make them centered in their panel?

#

Its a horizontal, centered panel.

sharp geyser
dense pine
sharp geyser
#

That's a good question :s

tiny hinge
#

you can try using display: none;

#

css

#

that should remove the component completely

#

i think

#

it should i used it in one of the chat cards

faint wharf
#

i dont know where to put my suggestion (foudry or CSB) make portrait field be updated thru drag and drop mechanic? I like adding portraits to npcs and doing it in the foundry takes ages. So i had idea converting it to drag and drop field would be cool as F

vagrant hollow
faint wharf
vagrant hollow
#

OK. Not drag and drop, but the variant art module let you quickly choose of several pictures you have on your server.
My players use it for showing clothes changes.
And they use it a lot. All girls 😉

faint wharf
tidal hemlock
#

Is there a way to like

#

Have little stamps I can put in

#

Like for example

#

I have this imported char sheet

#

Is there a way to have a little thing I can use to cover up say the completed quests

misty terrace
#

OK, quick question. I have the following code in a label. I want to replace the 'Roll Damage' string with a call to code I have in another label for that item on the sheet. Alternately, I could probably convert the roll damage code to a macro, if I could figure out how to call it from the label.

Would appreciate a guiding hand or a suggestion on how else to do that workflow. Also, please disregard the kitchen sink approach to loading variables, I've been flailing for a few days on this one.

`${#roll:=[1d100]}$
${#skillName:=item.name}$
${#attribute:=item.item_attribute}$
${#attribMod:=item.attribute_mod}$
${#skill:=item.skill_score}$
${#impScore:=round((skill*(100-skill)*.01)/2)}$
${#attrImpBase:=skill-impScore}$
${#skillImpCap:=skill+impScore}$
${#damage:=item.damagedie}$
${#targetName:=fetchFromActor('target',"name")}$
${#targetArmor:=fetchFromActor('target',"armor")}$
${#targetHealth:=fetchFromActor('target', "health")}$
${#playerPtl:=fetchFromActor('selected',"ptl")}$

<h3>Attacking ${targetName}$ with your ${skillName}$ </h3>
<table>
<tbody>
<tr>
<td>You attacked and rolled a ${roll}$ against a target of ${skill + attribMod}$</td>
</tr>
<tr>
<td>Result: ${roll <= skill ? 'Roll Damage' : roll < skillImpCap ? concat('Missed, but you learned something new! ', string(setPropertyInEntity('self', 'ptl', playerPtl + 1))) : 'Missed'}$</td>
</tr>
</tbody>
</table>`

#

(the Roll Damage in question is in the Ternary statement towards the bottom)

blazing ibex
vagrant hollow
zinc verge
#

could anyone help me out with figuring out how to upload a CSS folder? I'm not sure how to upload it "to the server" like CSB is asking for

raven seal
zinc verge
#

Oh okay, just anywhere within the main FoundryVTT folder?

raven seal
#

as long as you can path to it from root it should be fine, but directly in the data folder should be easiest

zinc verge
#

Okay bet

#

Does it have to be a specific file type for foundry to see it? I kind of just pasted it in as a .css and the file picker isn’t seeing it even though I was able to open the folder I’d placed it in

raven seal
#

yeah foundry can't see css files. I have mine as css file, I assume other file types don't work?

zinc verge
#

You have yours as a css even though foundry can’t read css and it still worked? 😅 I’m confused

raven seal
#

The file picker can't see the css file, so you have to type that part by hand

zinc verge
#

Oh!

#

Aight I’ll try that

raven seal
#

I don't know if my poorly recorded example helps, but here you go

zinc verge
#

Yeah I think that worked but I really don’t know what I’m doing lol the css sheet isn’t functioning so either I’ve set the code wrong or I’m missing some kind of step in getting foundry to recognize it

#

I probably just need to actually take a day and research how all this goes

raven seal
zinc verge
#

Gotcha gotcha, I appreciate the guidance you gave me all the same homie. I’ll try refreshing here in a bit and see if that gets me anywhere

vagrant hollow
potent fossil
#

Hello guys, just wondering, is item containers within items still a planned feature or has this become totally out of reach?

manic junco
#

I'm trying to get a script to be called from a label roll message. I made a test YourMacro that is a console log message and return 1 . I can tell that the macro has been called from the console, but the return value shows up as undefined. game.system.version shows up as 2.4.1, as expected, but what do I need to do in order to get the macro return value read?

manic junco
#

async function YourMacro() {
console.log("Yourmacro called");
return 1;
}```
formal goblet
manic junco
#

this is the label roll message %{return game.system.version;}% ${%{return await game.macros.getName('YourMacro').execute()}%}$

#

I have tried it with and without the ${}$ on the second line

formal goblet
#
return await YourMacro();
...
manic junco
#

Thank you very much.

formal goblet
potent fossil
#

thx

silver lake
#

Heyo!
So, I have an issue with dynamic tables. I'm using* a drop-down list in a dynamic table that refers to another dynamic table. It has the Option Label, and the Option Key, but whenever the value of the Option Key or name of the Option Lable is changed, it resets the drop-down option for anything that had that skill selected.
So if I had it pulling a skill level from a dynamic table, when I gain a level there, I have to go in the abilities and re-link ALL of the abilities that relied on that skill to the same skill.

Is it something I'm doing wrong, or a known issue?

misty terrace
#

If YourMacro() is expecting an argument called tokenName that is the name of the item that has the call in it's label, would you use

${%{return await YouMacro(tokenName: item.name)}%}$
or
${%{return await YouMacro(tokenName: ${item.name}$)}%}$ ?

low lotus
#

Hey all
I'm having a bit of an issue with conditions where whenever I add one to a character, even a completely new one not tied to my main PC template, it removes the health bar.

#

Additionally, this error pops up in the console whenever I add an effect, but not when I remove one

formal goblet
low lotus
dense pine
#

Is it possible to fetch the current initiative a combatant has?

scarlet skiff
#

If you can Access the API sure

formal goblet
scarlet skiff
#

keep in mind this solution has no fail saves (e.g. it errors when there is no combat, when the actor is not a combatant, etc.)

formal goblet
#

This way you won´t need the index-accessor

scarlet skiff
#

xD - well i'm used to filter 😛

#

but yeah you are right this is just a quick and dirty fix

#

changed it 😛

formal goblet
#

That´s what I´d do:

%{
let name = entity.entity.name;
let initiative = game.combat?.combatants?.find(combatant => combatant.name === name)?.initiative;
if (initiative === undefined) {
  ui.notifications.error(`No combatant with the name ${name} found`);
}

return initiative;
}%
scarlet skiff
#

😄 this is more sophisticated

#

but by the way

dense pine
#

thx guys ! 👍

scarlet skiff
#

why did you decide it would be good to access entity one level above. so i mean why do we need to do entity.entity.xxx?

formal goblet
#

Primarily because of the template-system, which is the Parent-Entity of Actor and Item.

dense pine
formal goblet
#

Nope, the entity-context is provided to every Script. Same with linkedEntity in Item Container.

scarlet skiff
#

could you even make it shorter with using for example ${name}$?

#

so can you use return game.combat?.combatants?.find(combatant => combatant.name === ${name}$)?.initiative;

formal goblet
#

Yeah (with quotes around ${}$). Just be aware of name-collisions, if you have multiple actors with the same name.

#

That´s why I like to use the ID instead of the name if possible

scarlet skiff
#

yeah have to differentiat the quick fix and the macro with thought put into it 😛

cosmic karma
#

what would be the best way to share the "system" created with CBS? I mean not only the json/templates, but as a system like all others? (public available from a git and such. On the same line, is there a way to do translations?

drifting raft
#

How can I keep the actor sheet portrait on top at all times? I'm using custom CSS, but I'm not sure which class corresponds to the portrait.🤔

velvet heron
#

I'm not sure if this is a CSB thing or not, but has something changed to make tiles no longer able to be draggable once they're created? They can still be moved around with WASD but drag-and-drop no longer seems to work.

dense pine
#

Is it possible to preview an item on mouse-over with CSS maybe?

cosmic karma
#

@drifting raft

cosmic karma
#

oh finally found how to make use of a rectangular image instead of a square one

stiff forge
#

Firstly, I'm a bit of a noob with CSB & am trying to recall how to do some basic things since i've been away for some time. I am trying to create a character sheet for the Black Star RPG which has a 'different' die modification system than I have ever tried to code in a label roll: an ability roll is simply [2d6 + ability rank], which is of course simple for even me to implement as a label roll 🙂

However, a complication arises because you can have a number of 'advantage' and/or 'disadvantage' dice that can apply. If you have a net positive number of advantage dice (after subtracting the # of disadvantage die) you roll that many extra dice and take the 2 *highest * die as your total; if you have a net positive number of disadvantage dice (after subtracting the # of advantage die) you roll that many extra dice and take the 2 *lowest * die as your total. (So basically if you have 3 advantage dice and 1 disadvantage dice you would roll 4d6 [3-1 + the original 2 dice] and take the 2 highest dice as your total...)

My problem is how to handle this mechanism for a label roll. My idea is to simply ask for user to enter a *negative * number in a (ask for) modifier field if they have net # of disadvantage dice, or a *positive * number if they have net # of advantage dice. So for example if they have 1 advantage dice and 3 disadvantage die they would enter a "-2", which would roll 2 additional die (4 total) and use the 2 lowest for the die total.

The issue is that I have no idea what would this look like for the code for a label roll ?

raven seal
#

How are conditionals supposed to interact with number fields? From the docs I assume it should return true when the field is set to a positive number and false otherwise, but mine still returns true when the field is a negative value or 0, is this behavior intentional or bugged?

raven seal
blazing ibex
cosmic karma
# blazing ibex also how did you get normal-sized icons for your traits

for the checkboxes, with this css:

.sheet .hearts input[type="checkbox"] {
    -webkit-appearance: initial;
    appearance: initial;
    background: url(artwork/Household/sheet/hearts.svg);
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.sheet .hearts input[type="checkbox"]:checked {
    background: url(artwork/Household/sheet/hearts-filled.svg) !important;
    -webkit-filter: none !important;
}

the artwork folder is inside the Data folder of Foundry
the checkboxes has a class heart

cosmic karma
# blazing ibex also how did you get normal-sized icons for your traits

the icons I gave the Item Container the class equip-icn.


.equip-icn a.content-link{
    background: none;
    border: none;
}

.equip-icn .custom-system-item-container-image {
    object-fit: contain;
    max-width: 30px;
    max-height: 30px;
    margin-right: 5px;
    margin-bottom: 2px;
    vertical-align: middle;
    border: none;
    background-color: rgba(0,0,0,0.05);
    transition: all .3s ease-in-out;
}

.sheet .equip-icn .custom-system-item-container-image:hover {
    transform: scale(1.6);
    margin-right: 20px;
}
blazing ibex
#

currently my sheet looks like this and the default item container is kinda ugly

cosmic karma
#

Yeah, I like to remove the item boxes and also the input text boxes

blazing ibex
#

its also unintuitive - to drag items you have to click-drag the tiny icon, the name won't do it. thought it was broken until i figured it out

#

tbh i'd be fine with just removing the name entirely

blazing ibex
#

nvm, had to relaod

#

now to figure out how to remove the na,e

static spindle
#

(New to CSB, lurker from Sandbox days.) I am going to feel really silly, but I see that you are able to display multiple items in your item tables... How did you add the damage? I can get the item to load into the table, but no info about said item (I am relatively new to the scripting scene, and only a couple hours deep on building a system)

blazing ibex
#

who are you asking

static spindle
#

Whomever is willing to answer, when they are able 🙂

blazing ibex
#

${item.variablename}$ to get info from item

static spindle
#

@blazing ibex I appreciate the help. The past half hour of 'Why won't you do what I expect you to do?!' comes down to 'item.' not 'ITEM.'... ugh. XD

blazing ibex
#

yyyep

blazing ibex
misty terrace
#

OK all, the system I'm developing uses an action economy based on the number of actions a player has taken each turn. I created a hidden attribute on the character template called "actionCounter" set to 0 by default. I made a macro to try to increment this but the update() doesn't seem to actually update the hidden field. Anyone have any idea what I'm doing wrong?

main()

async function main(){
    
    
 // Get Selected
  let selected = canvas.tokens.controlled;
  if(selected.length > 1){
    ui.notifications.error("Please select only one token")
    return;
  }
  let selectedActor = selected[0].actor;
 
  let actionCounter = {"system.hidden[9].value":Number(selectedActor.system.hidden[9].value + 1)}
  console.log(actionCounter)
  
  await selectedActor.update(actionCounter)
}
formal goblet
scarlet skiff
blazing ibex
vagrant hollow
# cosmic karma what would be the best way to share the "system" created with CBS? I mean not on...

Till now there is no possibility for localisation the system and no easy way for sharing it.
For a complex system with the need of css, grafix and macros (linke yours) I would suggest zipping everything and sending to LinkedFluuuush, so he can upload it to the sheet library.
https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/develop/sheet-library

drifting raft
drifting raft
misty terrace
cosmic karma
dense pine
#

Is it possible to preview an item on mouse-over with CSS maybe?

#

And can an item be deleted somehow if the delete button is hidden?

formal goblet
pseudo quartz
#

Hi, trying to use a formula to roll 2d6kl if the value is zero; otherwise, roll as many dice as the value and keep high. This seems to work, but it rolls all the dice, even the ones in the other part of the conditional? For example, if value is 3, it rolls 5d6 (2 from the 2d6kl and 3 from the 3d6kh). The resulting roll it displays is correct though... just that it rolls too many dice. Or is this an issue with Dice So Nice instead? Thanks in advance!
${isZero(value)?([2d6kl]):([(:value:)d6kh])}$

formal goblet
pseudo quartz
blazing ibex
#

@formal goblet I know this functionality isn't in now, but could you allow formulas in the tooltip section?

blazing ibex
#

Thanks

#

Default value/number formulas would also be helpful, if possible

stiff forge
#

Thanks again to @raven seal for helping me out with my Black Star label rolls...there is one final complication to rolls in the system, however - the player needs to know how many '5's or '6's they roll on the two dice. Below is my current code to roll an attack check for the game:
${attack01name}$ Adv${advantage:=?{advantage|0}}$ Mod${modifier:=?{Modifier|0}}$ ROLL: ${sign(advantage)+1?[(2+abs(:advantage:))d6kh2]+attack01rank+modifier:[(2+abs(:advantage:))d6kl2]+attack01rank+modifier}$
The game always sums the 2 lowest or highest dice, depending upon if you have a net advantage or net disadvantage. Any ideas on how to calculate the number of '5's and '6's rolled on the two dice that are used for the check?

robust wren
#

just found out something interisting:
if you use css and give the css class the same name as a key, it will apply the css class to that field 😄

tiny hinge
#

everytime i push an update i have to ping people in the group for now

#

would be nice if it can be bundled into a module of sorts though....

blazing ibex
#

screwed with the template selector so it takes less space

#

there's probably a better way of doing it than this, stuff overlaps with some windows

.sheet header.sheet-header { align-items: start; }
.sheet header.sheet-header h1 { 
  margin-left: 10px;
  max-width: 66%;
}

.custom-system-sheet-actions { margin-bottom: -25px; }
.custom-system-template-select label { display: none; }
.custom-system-template-select select { min-width: 0; }
.custom-system-template-select {
  position: relative;
  bottom: 45px;
}
silk remnant
#

Worth double checking, is there a way to add more levels of Visibility? We've got the default of None - Limited - Observer - Owner but I've been messing with setting up NPC sheets for use in an upcoming test game and I'm finding I kind've need one more level before 'editing access' for how I want to split up the actual sheet section unlocks for party allies, mostly because I have to use one of the switches to have the sheets accessible by the players at all.

I do know that I can set up visibility checks separately but want to avoid having to make an extra set of toggle checks in a different part of the sheet if able.

formal goblet
formal goblet
raven seal
lament wadi
#

Can I set the value of a component from a label roll? For example setting a Number field to 0 when clicking a rollable Label

faint wharf
#

Hello, with sometimes updates being more frequent i loose my custom css. is there a way to have your custom css be update proof? especialy as i only update my own classes

latent sorrel
#

Try the Custom CSS module.

faint wharf
#

oh

#

thanks

blazing ibex
#

Do I have to worry about my css being deleted?

brittle moth
#

I'd advise uploading the CSS file in the user data folder, and as usual, backing it up before any update 🙂

vagrant hollow
#

My CSS din't get lost via the last 6 updates.

velvet heron
#

After updating to v11, some of my macros seem to have broken. For example

(async () => {
    function Setting_Tablename(){return "Combat Dice"}; 

    const tokens = canvas.tokens.controlled;
    if (tokens.length == 0) {
        ui.notifications.error("Please select a token");
    }
    tokens.forEach(async (token) => {
        let attackDiceCount = 2
        let baseMessage = "";
        let roll;
        let baseTable=game.tables.getName(`${Setting_Tablename()}`);
        for (let i = 0; i < attackDiceCount; i++)
        {
            roll = await baseTable.roll({async:true});
                console.log(roll);
            baseMessage += '<span style="position: relative; text-align: center; color: red; padding: 1px;"><img src="' + roll.results[0].img +'" ><div style="position: absolute; left: 50%; transform: translate(0%, -50%);">' + roll.results[0].text + '</div></span>';
        }
        let finalMessage = "<div>" + token.document._actor.name + " makes an attack</div><div>" + baseMessage + "</div>"
        AudioHelper.play({src: "worlds/the-known-lands/assets/audio/dice-roll.wav", volume: 1.0, autoplay: true, loop: false}, true);
        ChatMessage.create({ content: finalMessage });
    });
})();

comes with an error of this. I can't make heads or tails of it, as I took the script from someone else, and it was working fine in v10.

scarlet skiff
velvet heron
zinc verge
#

I got my CSS sheet to function ;-; so happy

#

now I just need a better grasp on how to actually manipulate different aspects of the visuals

dense pine
#

Would like to restrict the table my item container is in from showing more than 3 lines of text per item. So i must set the rows to a specific height. Would like to cut text that is too long with some dots at the end, so that it looks like a sort of preview... How can i do that with CSS?

normal ore
#

Hey folks, how do I call the name of an actor or the name of an item in a label?

normal ore
boreal hull
#

Hello, im trying to figure out how to get an item to manipulate a label on a character sheet but I cannot figure it out

normal ore
#

Hey folks, I'm having trouble understanding the functionality of '5.3. Item Template Modifiers' and '5.4. Sub templates.'

Does anyone have a video that illustrates examples of using these functions or some screenshots as examples? Anything that would help me grasp this better!

I think it would be very useful for me, but I'm still struggling to understand the functionality, especially '5.4. Sub templates.' I'm completely lost on that one!

formal goblet
# normal ore Hey folks, I'm having trouble understanding the functionality of '5.3. Item Temp...

5.3. : You have to understand Item Modifiers before you can understand Item Template Modifiers. In short: Use Item Template Modifiers if you don´t want to repeat Item Modifiers for every single Item of an Item Template.

5.4. : Well, Sub Templates are more or less useless in the current state. The Sub Template is just a Collection of Components. You can drag a Sub Template to a Character or Item Sheet to copy the collection over. It does nothing more.

normal ore
#

I see

zinc verge
#

Personally I’ve gotten a lot of use out of sub templates as being places to hold formats of functions I want in my sheets that presently aren’t possible due to either bugs or features that are still on their way

#

I have a couple templates saved that I can just throw into a sheet and they’ll work immediately as soon as a feature I want is finished being added, instead of having to figure out how to put it in later

boreal hull
#

The FAQ you linked is somewhat helpful to my issue, but I want an item, when put into an item container to then change the label on the character sheet, not constantly... It for an armor class type label

#

@formal goblet

formal goblet
boreal hull
#

Not sure, im not very familiar with coding sadly

#

im trying to learn haha

#

I basically want when the armor item is equipped for a certain number, equal to that of the armor equipped to be shown in this label

#

on the character sheet it is equipped on

#

if that makes sense

formal goblet
boreal hull
#

how do i find how to do a set-operation

#

not sure what that means sorry

boreal hull
#

okay ill check it out, thanks

#

so with the set (=) as the operator, that would only go into effect when the item is present in the sheet?

formal goblet
boreal hull
#

ah okay cool

#

great

#

If i use the key of the item, like in the FAQ example, how can I get it to display a certain number?

#

like could I use the key of a label within the item? or?

#

@formal goblet

#

also how do I find the key of a particular item?

formal goblet
#

If you need data from an Actor to an Item, use fetchFromActor(). If you need data from an Item to an Actor, use Item Modifiers.

Item Modifiers work different to the normal formula system, where you reference a key to get the value. Item Modifiers actively manipulate already existing keys in the Actor and modify their values.

zinc verge
#

Does fetchFromActor() pulling values of label formulas in item sheets work now?

boreal hull
#

Okay, so in the formula should I just put a value I want it to be giving to the label in the actor, or does it nee to be sourcing from something on the item?

formal goblet
boreal hull
#

do labels have default values? i thought only number fields and text feilds have that

formal goblet
boreal hull
#

sorry Im just confused

formal goblet
boreal hull
#

when I am inputting the modifier in the item itself, and I am designating the formula from which it is scourcing the modification, with the $[]$ thing, what should I put in there

#

okay

#

ah nevermind I got it

#

I literally just put the number I want it to display on the actor, in the mod formula

zinc verge
# formal goblet Well, it **should** work atm 😅

Gotcha. I’d put in an issue about it before cause it wasn’t pulling the value correctly for label formulas in item sheets specifically but I’ve been afraid to update my foundry cause everyone keeps saying v11 is breaking their stuff 💀

formal goblet
#

I got everything working with V11

zinc verge
#

Omg that’s huge then

formal goblet
#

I can´t say it about modules, but that´s not CSBs concern to be fair

zinc verge
#

Yeah modules are whatevs I was just being overprotective of my templates lol

#

I’ll update tonight though that’s very exciting news

boreal hull
#

thanks for the help

vagrant hollow
zinc verge
#

makes sense makes sense

#

I'm curious which of my mods will break lmao

#

I live and die off of how well Ironmonk88's mods are updated lol

boreal hull
#

My label roll messege will not work fort some reason

zinc verge
#

what's the issue you're having specifically? Can you send screenshots?

#

I saw the previous stuff but like what's the failure look like

boreal hull
#

I added what I believe to be the correct formula: ${[1d20+virtue_body]}$ and I am clicking it and nothing is being output into the chat

#

I made it a button label

zinc verge
#

try putting : around virtue_body

boreal hull
#

okay

#

okay great yeah that works

#

thanks

zinc verge
#

poggers you bet

boreal hull
#

how do I make it roll directly from the sheet instead of it putting just a prompt to roll in the chat?

zinc verge
#

is your formula in the "label" text field or the "roll message" text field when you open the component?

vagrant hollow
zinc verge
#

I'm assuming the latter based off your formatting but I can't think of why it wouldn't just roll automatically with how you have it

boreal hull
#

label, is there a roll component type?

zinc verge
boreal hull
#

Oh i see, it is just a roll, but it has an option next to it to roll again for some reason?

zinc verge
zinc verge
topaz coyote
#

You bet. I've lived with that read.me for weeks now, ha

boreal hull
#

its displaying a d20 logo with the ability to roll it again, and then the actual roll number next to it

#

whats the key bind on windows to take a screenshot again?

#

combo i mean

zinc verge
#

windows key+prnt scrn

vagrant hollow
zinc verge
#

oh yikes that's rough

#

how many mods do you have active Avalanche?

vagrant hollow
#

Didn’ had time to research this

boreal hull
formal goblet
boreal hull
#

yeah I saw that I was wrong

zinc verge
#

yeah I was gonna say this looks like it's doing what it's supposed to

#

anecdotally, very cool CSS

boreal hull
#

it just gives the ability to roll it again in the dice messege which i got confused by

formal goblet
boreal hull
#

oh my god

#

gotcha gotcha

#

well great its working

#

and im dumb

#

haha

zinc verge
#

nah I think it's an understandable mistake. It really looks like a roll button

boreal hull
#

while I have you here, I am having aUI issue where the panels within the tabs are placed off to the side instead of actually under them, not usre if I am missing something again or what

#

I cannot get the panels to move into a space under the tabs btw also

vagrant hollow
boreal hull
formal goblet
#

I don´t know how you even managed to do that. Are you using CSS-Modules or other CSS-files?

boreal hull
#

not sure what you mean

#

I am just using modules from the foundry main page

formal goblet
#

Deactivate all modules and see if the issue still persists

boreal hull
#

okay

#

deactivate, reload, activate, and the relaod?

zinc verge
#

idk if you saw it Martin but this is actually not the first instance of this issue someone has posted to chat. Someone posted a similar issue a week or so ago I think

boreal hull
#

so I deactivated, and it reloaded it, then I activated them all again and it reloaded and its still the same... idk

#

not a big deal to me really, but just thought Id ask in case there is a way to fix it

formal goblet
#

Can you export the templat and send it to me?

boreal hull
#

tamplate for the character sheet?

formal goblet
#

Yeah

boreal hull
#

gotcha yep

formal goblet
#

I have to find the cause

zinc verge
boreal hull
#

dmed you

#

@ me if you find anything @formal goblet im curious

formal goblet
#

@boreal hull Holy moly, you´ll NEVER find this bug. If the Tab has the key tabs, it will behave weirdly. All other keys (even empty) are fine

boreal hull
#

hahaha great, well thanks

#

thought the layout was mighty strange

zinc verge
#

ooh, I think some of my tabs have tab in the key

#

Imma have to check all'at when I get home

boreal hull
#

its only tab(s) specifically I think

zinc verge
#

ah gotcha okay

dense pine
brittle moth
#

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

Fixes

  • Fixed formula computation inside other formulas
  • [#306] Fixed active effect computation
  • Fixed issue in Formulas after using fetchFromActor
  • [#308] Fixed issue causing button labels to be triggered when typing Enter
  • Fixed issue with large sheet saving lags on bulk edition
  • Fixed issue adding non assignable templates in item template choices

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

lament wadi
#

Can I somehow get the icon of an item to show in a chat card? ${item.icon}$ or something like that?

misty terrace
#

Interesting challenge. I created a macro to run when the user clicks on the skill name in their character sheet. I have the following code in the Label roll message on the character sheet. The macro runs fine and does what it's supposed to, including creating a ChatMessage with the results.

My challenge is that when I run the macro by clicking on the Item's Name, I'm getting a chat box with "undefined" which I suspect is coming from the character sheet click as a result of the macro's "return". Any guidance on how to either

  1. suppress the undefined chat message
    or
  2. pass back contents to display from the Character Sheet's Label roll message box?

%{game.macros.getName('useSkill').execute({skillName: '${item.name}$', itemRating: '${item.skill_score}$', attribMod: '${item.attribute_mod}$', damageDie: '${item.damagedie}$'})}%

vagrant hollow
misty terrace
#

Can I build HTML in the macro and pass that back as the return?

brittle moth
misty terrace
#

ok. been at this for hours and can't seem to figure out how to get the return from a macro call to work right (or am not doing the right thing with it to display it. The macro is called fine and functions fine, but I'm unable to get anything other than "undefined" with the return value. Can someone with more experience take a gander and tell me what I'm missing with the return?

the macro returns a variable that is built higher up, and the console.log is displaying what I intend, just something with how I'm calling or handling the return isn't working.

end of the useSkill Macro, attempting to pass back a string

        console.log (returnMessage)
        return returnMessage;```
#

Label roll message

<p><td><tr> %{return await game.macros.getName('useSkill').execute({skillName: '${item.name}$', itemRating: '${item.skill_score}$', attribMod: '${item.attribute_mod}$', damageDie: '${item.damagedie}$'})}%</tr></td></p>```
zinc verge
#

so, whenever I add an item modifier that divides my actor sheet label formula by 2, that division formula overwrites the label formula's floor() function and makes the value a decimal no matter what. Is it supposed to do that?

formal goblet
minor tiger
#

Just updated CSB to 2.4.3 from 2.4.1 and now after logging into GM and user profiles I get stuck on a grey foundry default screen and no further loading. Is there a known issue with the update?

formal goblet
minor tiger
#

TY for verifying. That appears to be my issue. Just good to know where the problem is sourced so I don't start tearing up my browsers

pale tusk
#

Confirming...CSB appears not to work since the update? I'm just sitting on an endless "downloading world data, please wait" screen.

zinc verge
normal ore
#

Hey folks, how's it going?
I wanted to ask for some help.
I'm trying to create a way to activate only one piece of armor. Let's say there are multiple pieces of armor in the inventory, and the player decides to equip the first one, then the second one, and so on, going through them one by one until they equip all of them. I'd like it so that when they equip, for example, the second one, the first one gets unequipped. In other words, I want to find a way to limit the player to equip only one piece of armor at a time. How can I do this in the system?

zinc verge
#

I suspect you’d need scripts for this tbh, if it’s possible at all.

The only way I can think to do something like this is to set a filter in an item container that looks for a specific value on the item dependent on how many items are in the container (I.e. making each item increase the value of a label formula on the actor sheet and having a label on the item that reads true if that value is less than or equal to “1”, then setting a filter on the container that only allows items that read true on that item label component.)

The problem with this method is once the value exceeds the condition for true, it would probably remove both items simultaneously instead of just the last one added

robust wren
#

Hello,
Anyone know a way to create buttons in the chat message? Like in DnD or pf2e, so I can click on them to roll for damage? (Or anything I want to happen after the button click)

zinc verge
#

I was actually wanting to ask this as well and kept forgetting to

minor tiger
#

Alternatively, in the vein of what vaialyss suggested: You could set logic on the character sheet that cancels the benefits of any equipment in that slot if more than 1 piece is equipped. Some counter that is measured as false when it exceeds 1. This will at least push players to only keep one piece equipped at a time

normal ore
#

I was trying to do it through a script, using the script to update all items of the same template on the character sheet. The script is in the "frequently asked questions." I managed to modify it to turn all the checkboxes in that template into false or true. If I could now get a script to turn only the checkbox of the item I clicked on to true, that would be great.
Oh, by the way, here's the modified script (if I didn't know how to put it here on Discord, I apologize, I don't know if there's a standard way to show it here in the chat):

%{
const itemTemplateId = game.items.getName('_Armas').id;

entity.items
    .filter(item => item.system.template === itemTemplateId)
    .forEach(async item => {
        const currentEquipado = item.data.system.props.equipado; // Obtém o valor atual de 'equipado'

        // Verifica o valor atual e inverte-o
        const newEquipado = currentEquipado === true ? false : true;

        // Atualiza a chave 'equipado' com o novo valor
        await item.update({'system.props.equipado': newEquipado});
    });

}%

brittle moth
topaz coyote
topaz coyote
normal ore
topaz coyote
#

Right on. My skills definitely aren't up to helping you, bud 🫤

normal ore
#

Folks, I managed to solve the problem, here's my formula that fixed it:

%{
const itemTemplateId = game.items.getName('_Armas').id;

entity.items
    .filter(item => item.system.template === itemTemplateId)
    .forEach(async item => {
        const currentEquipado = item.data.system.props.equipado; // Obtém o valor atual de 'equipado'

        // Verifica o valor atual e inverte-o
        const newEquipado = false

        // Atualiza a chave 'equipado' com o novo valor
        await item.update({'system.props.equipado': newEquipado});
    });

}%
${setPropertyInEntity('item', 'equipado', "true")}$

#

Basically, this formula sets all the checkboxes of items with the key "equipped" to false, and then it sets only the checkbox with the key "equipped" of the selected item to true!

dense pine
#

Does anyone here use Dynamic Active Effects (DAE) Module with CSB? Would like to know which parts of it work with this system.

brittle moth
raven raven
brittle moth
#

Not yet. This will not be a big release, so it should come soon 🙂
Any particular feature you're waiting ? ^^

raven raven
#

just the v11 compatibilty

normal ore
#

Hey, does the "4.2.11. setPropertyInEntity" function work with checkboxes normally?
I don't know why, but when I try to set it to "false," it doesn't seem to work very well! However, it works perfectly fine when setting it to "true"!

Could this be a bug or does it not work well with checkboxes? I'm asking because I know it doesn't work for strings (at least for me).

formal goblet
formal goblet
brittle moth
brittle moth
normal ore
brittle moth
raven raven
#

after launtching and migrteing to the v11 compatible version, i get this error:

normal ore
brittle moth
# raven raven

Looks like a migration error. Can you open the developer console (F12) and send the error message in there ?

raven raven
brittle moth
# raven raven

Definitely looks like a Foundry Migration error, this is not caused by Custom System builder :/
You should ask in #troubleshooting

Does it work if you create a new world with CSB ?

normal ore
brittle moth
# normal ore It doesn't work at all, I tried every way lol

I just tried it. It was a little tricky to get the syntax right but it worked :

{setPropertyInEntity('self', 'textFieldKey', "'REPLACED'")}$

Just remember the last argument of setPropertyInEntity is a Formula, which in your case should be resolving to a String 🙂

normal ore
#

veryyyyy niiiiice!

brittle moth
formal goblet
normal ore
blazing ibex
#

im getting major slowdown ever since the foundry/csb updates, has anyone experienced the same thing?

brittle moth
blazing ibex
boreal hull
#

Is it possible to copy/duplicate a component?

formal goblet
boreal hull
#

ah sweet thank you

blazing ibex
#

i never knew this lol

boreal hull
#

how to do you make it so players can create items in their inventory area on their sheet, so if they got a unique item they could just create one etc.

boreal hull
#

i thought maybe it was because in the ui of the dnd5e system module you can

#

could you make a template that is accesible to players that they can create from in the "items" area of the session?

#

and then drag onto their sheet

formal goblet
boreal hull
#

okay gotcha

vernal meadow
#

Hey! So I'm having some trouble with formulas. I am trying to use 12 plus a character's regeneration to determine their max stamina so a player can have an attribute bar. I used the documentation from the API and it ended up looking somewhat like this: ${'12+RegenerationField'}$. The image is after attempting how a video did the same thing. I am incredibly new to the custom system builder and to javascript so I am not sure what I'm doing wrong, but it hasn't been cooperating. If anyone could give me a hand that would be awesome. Thanks!

formal goblet
vernal meadow
#

cool thank you!!!

blazing ibex
#

@formal goblet do you think it would be worth adding variable fields to the item container that could be placed over the item icon?

#

the screen above fakes the look by pushing the first and/or second column overtop the icon, but because of that it doesn't like you resizing the window

.icn-amt {
  pointer-events: none;
  position: relative;
  font-weight: bold;
  bottom: -7px;
  scale: 1.1;
  color: white;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000
}

.icn-blk {
  pointer-events: none;
  position: relative;
  font-weight: bold;
  bottom: -7px;
  right: 30px;
  margin-right: -30px;
  scale: 1.1;
  color: white;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000
}

.icn-dur {
  pointer-events: none;
  position: relative;
  font-weight: bold;
  bottom: 10px;
  right: 22px;
  scale: 1.1;
  color: burlywood;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000
}
.equip-icn table { background: none; border: none; }
.equip-icn table tbody tr { background: none; }

.equip-icn a.content-link {
  background: none;
  border: none;
  font-size: 0;
}

.equip-icn .custom-system-item-container-image {
  object-fit: contain;
  max-width: 36px;
  max-height: 36px;
  margin: 0px;
  vertical-align: middle;
  border: none;
  border-radius: 8px;
  background-color: rgba(0,0,0,0.05);
  transition: all .3s ease-in-out;
}
formal goblet
boreal hull
#

I am trying to use a Set-operation item modifier to manipulate an item container in a character sheet, but it wont show anything when the item is placed in the sheet... Not sure what I am doing wrong

latent sorrel
#

How do I return the substring of a component value? Something equivalent to %{return key.substring(0,3)%. Thanks

formal goblet
noble tendon
#

i dont know how to resolve these problem. Last version of CSB.

Making itemtemplate, i have warnings of formules.

#

only 6 warnings, multiply for the number of items are more 8000 warnings, foundry too long to load.

#

i dont undestand, why is a warning.

formal goblet
#

If you want to resolve them, you have to dig into the formula-parts which cause the warnings. Check every single bit in the formula. You can use Label prefix/suffix for help.

latent sorrel
#

I have 4 containers that use the same item template. Each container has a filter defined. When I drop a folder containing items onto the sheet, items filter correctly except one, "combat". The value comes from a drop down. I have deleted and re-created the key in the dropdown but the problem still persists. Does anyone have any suggests? The dropdowns key and label for the options are the same. When I drop the single item, it filters correctly.

formal goblet
noble tendon
#

"${floor(sum(switchCase(armadura_cali,'-5',-1,'0',0,'+5',+1,'+10',+2,'+15',+3,'+20',+4),armadura_inputfil))}$"

is a sum of a drowlist and numberfield. I dont see the error.

latent sorrel
formal goblet
#

Ok, so you cannot drop a whole folder, can you?

latent sorrel
#

I think I solved the problem. The problem was that only some of the items within a folder appeared on the sheet, when droppped. However I moved everything to a new folder and now it is working.

formal goblet
#

Ok, weird. But whatever

formal goblet
noble tendon
#

i dont know, how to check. I dont have infomatics knowledge.

formal goblet
#

If the formula is an a Label, you can do the following:

  • Copy the formula into the Label prefix and check if the result is displayed. If yes, the formula is fine. If not, you have to split it into subparts. e.g.: ${sum(strength, dexterity) + weight}$ can be split into 2 parts: ${sum(strength, dexterity)}$ and ${weight}$.
  • Check a part in the Label prefix. If it works, check the other part. If it doesn't, split it further.
noble tendon
#

i think i find part the problem. Optional is not optional
Seven lines are good now

open mesa
# stiff forge Thanks again to <@221075841310916610> for helping me out with my Black Star labe...

How is your Black Star character sheet coming along, and are you willing to share it when you're done? I've been thinking about running a Black Star game over Foundry, but my players aren't willing to play anything other than D&D unless it's mostly effortless for them to get into. 😅 I mean, Black Star is an easy system to grok, but having a character sheet that handles rolls would be a godsend.

boreal hull
#

is it possible to link a window of an item into a rich text box to be clicked on and viewed as a popout?

latent sorrel
#

Is there a way to generate a CSV based on the names of items in an item container that can be stored in a label?

formal goblet
formal goblet
latent sorrel
#

It is possible to have an item add its name to a label, similar to doing weight totals but as a concatenated string instead of an integer?

formal goblet
boreal hull
latent sorrel
formal goblet
supple latch
#

I know nothing of CSS. How could I change the background color or add a image in it's place?

latent sorrel
#

I have populated a dropdown from a CSV using JS. This works however, when I select an option from the replaced options, the sheet re-writes it self and replacements as well as selected option are reset to "stock" value. Is there a recommended way to populate a dropdown from a list in a label?

formal goblet
#

But fear not, the next patch has the option to include a formula for the options.

latent sorrel
#

Great! I will stare intently at my monitor, waiting for it to drop. Thanks.

latent sorrel
#

I am using items for talents. Talents are ranked 1-5 and will be filtered by rank. Talents will be displayed in column by rank. Because of the way talents need to be chosen, there will be one talent per item container. How can I limit containers to holding a single talent. Does anyone have an idea on how to capture the order of the dropped talent.

brave trench
#

Is it possible to setPropertyInEntity of all rows of the same column of a dynamic table?

formal goblet
brave trench
#

Thought so, trying to figure how to get it to trigger though. Do you have any ideas how to get a script to trigger based on drop downs/check boxes? I have a "currently wielding" drop down (one hand or two hand) and then check box options of whether a weapon is a 1h or 2h weapon. Stats get reduced if wielding a 2h with only 1h. Any suggestions?

latent sorrel
# formal goblet You cannot limit the container, because the container is only meant for displayi...

Thats just it, the goal is to drop the talent on the actor and the value is generated. I can use this value to limit with filters. If I can generate a unique sequential integer within the item when it is dropped on the sheet then I can use that value to limit what appears. Example: "droporder =3" if the talent is the third talent dropped on actor. What I am trying to figure out is how to generate this sequentially increasing integers within the item as values are dropped. It also occurs to me that if Talent3 is deleted and another Talent is dropped, than the value of "droporder" for the new talent would then need to be 3.
Thinking out loud: Maybe generate a CSV list of talent names w/JS in the actor, have the talent find the index of its name on the list and store that number which is than filtered by the container.

brave trench
#

@formal goblet I deleted an item template and one particular actor keeps throwing an error "Item template has been deleted for item "x", every time the sheet is edited. The items are not on the sheet, at least visibly. Is there a way I can refresh whatever items are tied to an actor?

formal goblet
brave trench
#

Would probably be faster for me to just rebuild the actor from scratch unless you know the code off hand?

formal goblet
brave trench
#

tried delete(Item.aIm44Oj9URSKofmH), returned true, but didn't change anything

formal goblet
#

Remove Item.

tiny hinge
brave trench
tiny hinge
#

it was one faulty item entry referencing some non existing template for me. have to remove the item from the char sheet . the same item is fine though if you re-add it again.

raven raven
#

Hi, I would like to create an Item container which has horizontal alignment, at the moment it is vertical:

#

I could save a lot of space with horizontal alignment.

formal goblet
raven raven
#

what I mean is at the moment it is puting the items ina coloumn and I would prefer them to be in a row

formal goblet
topaz coyote
raven raven
#

hmmm

#

I could make them different...

#

thanks

#

this is a good idea... although not very elegnat... but oh well...

topaz coyote
#

Also, if you leave the item container's checkbox "Display Column Names" unchecked and you have no other labels in the item container, items show up as a vertical list of links, not a table with boxes

topaz coyote
rich glen
#

Hello all! I just started using CSB and it's JUST what I need to implement my system... I'm trying to add a Component via Module implementation... It works but there is a problem when I re-enter my World... This is the error message:

#

If anyone can help me...thanks in advance!

rich glen
small bane
#

Does anyone have a Ryuutama sheet to share? ❤️

tiny hinge
#

Does CSB still support foundry V10? Apparently sheet active effects is broken for V10 specifically

turbid schooner
#

Hey guys, was wondering how this system compares to GRPGA in terms of what it can and cannot do as well as how in depth and fleshed out one is able to go using this to create their own system?

I'm completely new to all of this so if there is one that has even more options feel free to mention it.

Note: I'm aware the absolute most in depth method would be to learn coding/programming, but I'm unable to commit that type of time to learn such a thing unfortunately

oblique spear
#

Hello, I want tonuse this module in my CBS

#

I think that this module check the name of Items, when it is roll in the chat

#

The problem is that I do not know how to do a rolleable Item

#

Some similar to DnD magics or weapons

oblique spear
#

Any help?

formal goblet
# oblique spear Any help?

We cannot give support to modules, which are not explicitly integrated into CSB, because we don´t know how these work. We´d need a look at the documentation or even the code to give meaningful support.

formal goblet
tiny hinge