#Custom System Builder

1 messages · Page 27 of 1

fierce harbor
#

Not sure, but I would set a checkbox on the sheet and check it in the roll formula.

#

That could work

tardy rain
#

okay

#

it might work

#

trying

copper jetty
#

hi gang

i'm looking for combat encounter formula, did someone know how to use?

#

it's similar to roll 20's "&{tracker}"

i looked on csb gitlab, but don't finded

formal goblet
formal goblet
formal goblet
copper jetty
#

that gear on top-right you mean?

#

opening foundry right now hang on

#

thx, founded

formal goblet
#

This case has some complexity. You have to know how to fetch the right data from Chat Messages and how to apply damage (without permission-violations, because Users are not allowed to modify Actor Sheets they do not own), so it's actually not a trivial matter.

fathom cave
#

is there a way to use more than one fontawesome icon in the label icon section of a label?

formal goblet
fathom cave
#

k thanks

earnest imp
#

How can I opt in into the beta version of the next CSB build btw? 😛

earnest imp
#

Has anyone managed to make Token Action HUD run with CSB?

fierce harbor
tardy rain
#

it is not showing the dice rolls

#

for

#

uh

#

like 2d12kh

#

it just shows the final resault

#

do you have any idea what might cause this

earnest imp
#

No option in the settings and no selectable dropdowns on the top left

#

Is this the same with u too?

#

Just to confirm

fierce harbor
earnest imp
#

Hmmmmm then mine is weird then, it doesn't even consider any actions to exist

fierce harbor
earnest imp
#

Nnnope. Nothing at all.

#

No console message either.

#

And it is active

#

I also tried on a fresh install of CSB with 0 modules

#

The settings doesn't even appear in the option

fierce harbor
earnest imp
#

Version difference, maybe?

fierce harbor
tardy rain
#

im just crazy

#

however it does not for the roll button

#

it's a minor thing

#

it seems to be working

#

but its a little annoying to not be able to see the rolls

#

and KNOW that its working

earnest imp
#

Anyone has any pointer on how to make item quantity work on Item Piles?

tardy rain
#

does anyone know

#

how to refrence an attribute within an item container

#

outside fo the container itself

formal goblet
peak jacinth
#

I'm trying to make an HP bar, and it just will not work. Both charCurrHealth and charMaxHealth are the keys for number fields, but for some reason, it doesn't pick up their values when they're set.

#

Am I doing something wrong here?

#

I've also tried a number field with a maximum value. It recognizes charCurrHealth, but not charMaxHealth. I've even tried putting ${} around it or starting with #, but nothing works. It just will not recognize charMaxHealth even though it's a number field.

earnest imp
#

maximum value should be ${charMaxHealth}$

peak jacinth
#

Ah, that worked. Thanks!

fathom cave
#

if a conditional is met, I want an 'offhandequpped' dropdown to go to the blank default value. I am at a loss for what I would call to do this

severe sonnet
#

Is there any way to roll dice pools in custom system builder...?

fierce harbor
severe sonnet
#

Thankyou!

tardy rain
#

so I made a duplicate

#

of a sheet to test somthing

#

and in the duplicate everything works

#

except the outfit

#

it doesn't work specifically

#

because of attribute temperance

#

when I remove that from the function

#

it works

#

pictured here

#

however if I refrence it anywhere outside the item container

#

it works

#

does this have to do with it being a duplicate?

#

if so

#

why does this outfit still work fine

bright berry
#

I have a question that I don't think can be answered here but I'm going to ask anyway: I'm playing around with the Foundry To Discord addon, which will send messages in Foundry's chatbox to a designated Discord channel using webhooks. Cool.
I would like to know if anyone has any ideas why a dice roll accomplished through a CSB sheet using a Label item and Label roll message wouldn't send at all. Like it doesn't even send a blank message, it just doesn't send anything at all

somber bay
#

I have never used the Foundry to Discord but just wanna ask... do you need a command or setting or something to send a message to discord or is it by default anything in chat? Maybe you can add a command to your rolls or something.

bright berry
#

it's default anything, yeah

#

I thought maybe I'd need a prefix or something, but nope

#

Like so

#

Regular rolls send, too

#

It's probably some quirk of how the label roll messages are created, it's honestly not a big deal. I'm just playing around with PbP solutions

#

oh, I wonder if it's just a simple settings issue..

#

This addon is mostly made for D&D and PF, as all things are

#

Nope. Alas

#

All good, this is totally unimportant

copper jetty
#

where is my mistake on the initiative formula?

slow maple
#

Is it possible to put my own system of RPG in the Foundry, because i know there isnt any other system in the database that is similar to mine… So i want to make my own. That way it will make things very much easier to me… Is it Possible?

fierce harbor
slow maple
#

How can I use it?

#

Sorry, im new using Foundry

earnest imp
#

CSB can do almost everything you want, the difficulty will vary as sometimes you will want to design things CSB is not designed to do

earnest imp
#

🙂

earnest imp
#

I've replicated 90% of a turnbased RPG myself

#

Still working on the itemization

earnest imp
#

To let you down early though, CSB is not designed for: stackable items and stackable status effects

fierce harbor
earnest imp
#

You will have to use modules for that

#

CSB can natively do almost everything you want; in terms of complex itemization and stackable active effects, however, you will have to seek alternatives in module 😛

slow maple
earnest imp
#

yes

earnest imp
#

@vagrant hollow Hey! Sorry for the ping, but I really need your familiarity with Item Piles, how do you merge items? Buying two items twice causes them to duplicate instead of merging 😵‍💫

copper jetty
half beacon
earnest imp
#

With very limited variables, only price and quantity

half beacon
earnest imp
#

just name and type?

#

oh my gooood that works like a charm

#

thanks so much!

#

by any chance do you know how to set the default price of an item, but for secondary currency? xD

#

like this is where you set default price, but for the primary currency

#

Any ideas if the same can be done with secondary currencies?

half beacon
earnest imp
#

Ahhh okay, no way to set default pricing for secondary currency then?

half beacon
earnest imp
#

@half beacon Oh, no, the default price is 1, I'm wondering if there's a way to set default per item

sturdy mesa
#

I would like a macro for the following situation:
The player has 100 Mana. He clicks on "cast spell" and enters the amount of Mana he will spend. Then, I would like a macro that automatically reduces the value entered in the Mana attribute of the character sheet.

Can someone help me plz?

vagrant hollow
dusk arch
#

Can someone help me with why this doesn't work?
ItemType is a Dropdown List with 3 options, one being ItemWeapon

${Weapon:= 'ItemWeapon'}$
${Weapon}$
${sameRow('ItemType') == Weapon ? 1 : 0}$

In the console i'm just getting "Cannot convert "ItemWeapon" to a number

dusk arch
fathom cave
#

Not exactly sure what is happening here, but one my character sheets when I run a console warn entity to look at the data, the props looks like this image. Sometimes, it doesn't even list all the undefineds and just omits them, but I can't figure out the conditions that that is happening exactly.

#

Any advice on how to resolve this? Seemingly is on all char sheets and across widely varied label formats. EDIT: I found it. A ternary was missing some quotes and it caused the sheet to render very poorly. No idea why, but resolved, I think.

half beacon
fathom cave
#

Looking at it a bit more, my issue is on every label, everything else is populating.

half beacon
#

For example, if you are using Soul Points as a currency for buying something like Abilities, but using items as Abilities. You can go to the item, click Configure, then set Base Price to 0 in the Price Settings menu. Then add a Purchase Option for Soul Points. Let's say the Ability "Heaven's Cleaver" should cost 5 Soul Points. Change the cost from 1 to 5. Then when you drag it onto a merchant, the selling price will always be 5 Soul Points.

weak zealot
#

hiya! struggling a bit with my rest button. I want to display current health before rest, when players click a button to restore health. I can make the button work for the mechanic I want, but the html table is displaying stuff weird. Here is the extract and you can see the 6/6 HP is all clunked up. Any idea how to beautify this? Thanks

<table>
<th>${!name}$ profite d'un instant de répit pour récupérer: ${!recupScore}$ HP</th>
<tr>
<td>HP actuel </td>
<td> ${! ref('health_curent_field') }$ </td>
<td>/ ${! ref('health_max_field') }$ </td>
</tr>
</table>
dusk arch
#

The Component is either visible all the time or not at all, i've tried alot of different things, but now i'm pretty much out of ideas

formal goblet
formal goblet
weak zealot
formal goblet
weak zealot
#

just added <td style="width:20%;"> and this works fine. Thanks for the pointers

stone swan
#

Hmm. When I my world, I'm getting a warning that says "Failed data preparation for Actor.. Cannot read properties of undefined (reading 'key')", but I'm not actually sure where it's coming from. Any ideas on narrowing it down?

stone swan
#

Unrelated question: I have a dynamic table where players can enter their roles. Most roles have a rank that's set by the player, but class roles are determined by level. Is there a way to have one version of the rank column for normal roles and another for class roles, without having two columns?

fathom cave
#

Is there a way to remove the scrollbars on a character sheet if I have prevent resizing set?

stone swan
#

Optimization question: If an Item, internally, has a dropdown and multiple copies of that item get added to a character's sheet will the sheet end up containing multiple copies of the dropdown or just the selected value?

real shuttle
#

I'm still struggling to get links to work right. I know they don't work in compendium and you have to update it with the actual copy that's put in an individual's character sheet, but that's still not working. Can anyone help me out?

real shuttle
stone swan
#

Are you handling species as an item?

real shuttle
#

yep!

stone swan
#

Then you'll want to use item modifiers.

real shuttle
#

i know that much, i just haven't figured out how to use them properly

stone swan
#

Ok. Well, you shouldn't need to use setPropertyInEntity to make an item modifier modify a variable.

#

You set them up on the item by clicking the Configure Item Modifiers on the item's template. I haven't used them myself, but the basics seem pretty straight forward, for something like adding one fixed value to another. The key field is the key for the value you want to modify. The formula is what it changes by. In this case, you probably want something like ${Walking-Speed-Key}$ and then you'd need a field on the item with a key of Walking-Speed-Key and I think that should do it?

#

*Note: I'm not sure if you actually need the ${}$, since there's a bit of inconsistency there and it doesn't specify.

real shuttle
#

any idea what I'm missing here?

#

oh wait I got it!

#

I thought I'd tried it without the @ before but apparently not--just walk_speed worked

#

thanks for your help!

novel stone
#

What's the proper way to make a in-sheet ability macro usable from the main hotbar? I can't drag the roll button, main edit or alt edit button to the hotbar, and I assume "paste the whole thing and then redo all the formatting" isn't the intended method.

stone swan
#

Then choose one of the "Add as macro" optoins.

novel stone
#

There we are.

stone swan
real shuttle
#

okay now what am I missing? booleans aren't working, and +1 to a number field isn't working

real shuttle
# stone swan What were you trying to do with links?

I'm trying to link items so that if there's a skill associated with a species, like a claw attack for a certain monster, a player's copy of the species links to the player's copy of the attack in the species description

stone swan
#

Item modifiers can't add to number fields, only labels.

#

For the proficiencies, how are they being stored on the character sheet?

real shuttle
#

proficiencies are checkboxes

#

so item modifiers can only affect labels?

stone swan
# real shuttle so item modifiers can only affect labels?

If you're using the equal sign, it should be able to apply to more things, but that's directly setting them, not adding to them. I don't know if it can apply to checkboxes, but just to be sure, where are those check boxes stored (are they on a different item or in a dynamic table)?

real shuttle
#

just on the character sheet

stone swan
#

After playing with it briefly, it doesn't seem to like playing with Checkboxes.

real shuttle
#

yeah I'm not having any luck either

#

and now I'm wondering if the number field for speed actually worked either...I think it doesn't

stone swan
#

If it was adding the speed it didn't.

#

The documentation is a little bit ambiguous, but my guess is that it means the "The set-operation can set non-number labels, but it's still restricted to labels."

formal goblet
formal goblet
stone swan
stone swan
real shuttle
formal goblet
# stone swan

For some reason, actor.system.body is undefined in your case. I don't know why tbh

#

I see token-mold in the call-chain, maybe it's interfering?

real shuttle
#

is there a way to use the setPropertyInEntity to edit number fields and such when an item is added?

real shuttle
#

rip

#

that's okay, I mostly wanted it for character creation

#

just to confirm though--that function does work on number fields when it's in a label roll message? or does it only apply to labels, too?

#

(like, if I have someone deducting spell slots when they put a spell in chat, does the total have to be a label?)

formal goblet
#

That actually works for only non-labels 😄

real shuttle
#

schweet okay that's where I'll want it for functionality, so that's great

#

while you're here, do you know what my issue with item linking is?

real shuttle
#

I had it working once but no more

formal goblet
#

My guess is that the ID's don't match. What's the raw roll message?

real shuttle
#

just this
Species Attack. You gain the @UUID[Item.yzF24aanXAMXdguI]{Hoof Attack} skill. Noble Steed. You gain the @UUID[z4v2mAAaEZIr4y6S]{Noble Steed} skill.

#

clearly I tried both with Item.(ID) and with just the ID 😛

#

it doesn't work whether I link the compendium ID or the actual ID of the real item copy in the character sheet

stone swan
stone swan
#

That's very weird. I'm pretty sure all of my characters have bodies, since that's where most of their character sheets are defined. One of them had an empty top-level key for their body, but I changed that back and I'm still getting the same error. (Not sure why literally only one of my characters had an empty key, which migh tbe another thing to look into.)

stone swan
formal goblet
#

Well... now it gets tricky... Can you open the sheets of all characters?

stone swan
#

As far as I can tell? Yes.

#

I mean, clicking on each character opens the sheet I'd expect and doesn't seem to return any errors. So, yes?

real shuttle
#

I DID IT

formal goblet
formal goblet
real shuttle
formal goblet
stone swan
formal goblet
stone swan
#

There are two things about this that are weird: First, the Mook formula its referencing only exists on characters created with the _Monster template (this character was created before that template even existed). Second, it only seems to happen if I create a token or interact with the token prototype screen when it's set to be unlinked.

stone swan
#

Oh, also, the actual monster characters don't seem to have that error. Or, at least, the values those formulas are connected to seem to be working fine.

formal goblet
#

Unlinked Tokens are creating copies of an Actor

#

So you might have an outdated Token

stone swan
#

It happens when I create a new one?

formal goblet
#

Ok, if it happens when you create new ones, then you should check the formula and fix the error. It should be ... ? ... : ... instead of ... ? ... , ...

stone swan
#

Ok. It looks like the _Character Template got its HP values replaced with the _Monster Template values. So that at least is fixed. ... I think.

#

Alright. The original error definitely seems to be tied to Token Mold, since wasn't their while I had the module disabled and reappeared as soon as I enabled it. Token Mold, in general also seems to be having some trouble with CSB, since none of the values you'd expect are available as bar values. That's unfortunate, but I'm glad I figured that out sooner, rather than later.

#

Thank you for the help.

fathom cave
# formal goblet CSS should do the trick

That is what I figured, I don't know how to reference the character sheets though, assume I can call it in a macro and have it run on load or something, didn't know if there was an easier way.

formal goblet
fathom cave
somber bay
#

I figured out a convenient way to be able to reference an image

#

(in the hidden attributes)

marble timber
#

Hi there,
I am a bit lost with the conditional tests done on CSB. I am trying to create a conditional roll depending of the state from a checkbox (if it is checked, a roll is done, if not, no roll).
When I do a script like this :
${chk_ADV? notify('info', 'ADV coché') : notify('info', 'ADV pas coché')}$
it works as attended : depending if it is check or not, the good notification is displayed. If I replace the "notify" function by a roll :
${chk_ADV? [1d6] : notify('info', 'ADV pas coché')}$
the two conditions are played : I have a roll AND the notification...

If you have any clue on this behavior, I'll take it 😉 Thanks !

fierce harbor
# marble timber Hi there, I am a bit lost with the conditional tests done on CSB. I am trying to...

Is the notification always sent or only on checkbox being false?
I believe it has to do with rolls always being rolled no matter what the test outcome is.
Not sure, though.
Found this and the wiki:


The ternary will execute all parts regardless of the condition. For example:
isActive ? notify('info', 'This is active') : notify('info', 'This is not active') will execute both
notify()-functions regardless of the condition it will evaluate to. You should use it this way instead to prevent the
problem of double-execution: notify('info', isActive ? 'This is active' : 'This is not active'). This is a limitation
by the system, so be careful with that. Usually it´s not a problem, because most of the time CSB-Formulas are not
performing any active actions, but it will become one if you combine conditionals with actions (like notify() or
setPropertyInEntity()). If you still need short-circuiting conditionals, use
Script-Expressions instead.
marble timber
# fierce harbor Is the notification always sent or only on checkbox being `false`? I believe it...

What is very surprising is the behavior is not as described in the wiki (that is maybe outdated) : only one part is executed (I have 2 notifications and not 4).
I think you are right on the roll mecanism that is always launched : depending of the check state, the formula will send the roll result (if checked) or "do nothing" (like a 0 result with the dice).
My requirement is essentially esthetical : each time I click on the Attribute for the Roll, I would have only 1 dice (none checkbox), 2 dices (only one checkbox) or 3 dices (2 checkboxes) - but for any activation, I always have 3 dices thrown.
It can be confusing for the players.

#

If I use this formula :
${#Car:=[1d6+:CAR:]}$
${#For:=chk_FOR?[1d6]:+0}$
${#Adv:=chk_ADV?[1d6]:+0}$
<p>Résultat : ${Car+For-Adv}$</p>
The result is like in the screenshot - that's what I want except there is too much dices thrown 😛

formal goblet
fathom cave
#

So a few days ago, I managed to get setPropertyInEntity to trigger somewhere 'bad', as once I reloaded the sheet, the dropdown it referenced became 'stuck' and I couldn't change the selection. I since found a better way, but now have a want for it to get 'stuck' on something else.

#

Is setPropertyInEntity disabled in the label message?

#

meaning if I put setPropertyInEntity in the 'label text (optional)' area, it won't work at all?

#

nvm, just got it on my next attempt. It will work in that area.

formal goblet
fathom cave
#

Yea, I saw that. In the label text area it forces the set to keep repeating on sheet change. That's what you mean by problematic right? So it will just basically force the set over and over. Are there other problems? Because that is what I want it to do.

formal goblet
fathom cave
#

ok, I understand what you are saying I think, 'cycle updates' will cause a kind of bad looping behavior? something like an infinite loop in layman's terms?

formal goblet
#

It might, never tested tbf

#

But it's definitely something I cannot recommend, even if it's intentional. Use Labels if values are dependent on other sources

sharp latch
#

whenever I try to have a label display to chat using a key or a dice roll command I get the error 'Cannot read properties of undefined (reading '0')'. The error comes up whenever I enclose the Label roll message in ${ }$. So if I have the label roll message be a simple string like 'hello world', clicking on the label will display that text, but if I replace it withj ${[1d6]}$ (or anything else inside the delimiters) I get the above error. Any idea what's happening?

formal goblet
sharp latch
#

The full error message is 'Cannot read properties of undefined (reading '0')'.

formal goblet
sharp latch
#

It happens for any Label Roll Message enclosed in ${ }$. For example, it happens when the Label Roll Message is ${[1d6]}$.

#

For example, if I create a new world, with no content, create a new item template, and within that template I create a Lable whose Label Roll Message is Hello World. When I make an item with that template and click, it will display Hello World. If I instead make the Label Roll Message be ${[1d6]}$, I get the error message displayed on the VTT. There is nothin else in the error message.

formal goblet
#

I also need Foundry and CSB-Version and the Browser

sharp latch
#

how do I access the stack-trace?

#

Foundry version 11.315 and CSB version 3.0.0.

formal goblet
#

Press F12 and you'll see the error message in the console

sharp latch
#

is this what you're looking for?

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0')
at Tokenizer.stateBeforeEntity (/home/ubuntu/foundry/resources/app/node_modules/htmlparser2/lib/Tokenizer.js:584:47)
at Tokenizer.parse (/home/ubuntu/foundry/resources/app/node_modules/htmlparser2/lib/Tokenizer.js:848:26)
at Tokenizer.write (/home/ubuntu/foundry/resources/app/node_modules/htmlparser2/lib/Tokenizer.js:159:14)
at Parser.write (/home/ubuntu/foundry/resources/app/node_modules/htmlparser2/lib/Parser.js:459:28)
at sanitizeHtml (/home/ubuntu/foundry/resources/app/node_modules/sanitize-html/index.js:588:10)
at cleanHTML (/home/ubuntu/foundry/resources/app/dist/database/validators.mjs:1:233)
at HTMLField.sanitizeHTMLField [as sanitize] (/home/ubuntu/foundry/resources/app/dist/database/sanitization.mjs:1:1235)
at Function._sanitizeFields (/home/ubuntu/foundry/resources/app/dist/database/backend/server-document.mjs:1:7729)
at Function.sanitizeUserInput (/home/ubuntu/foundry/resources/app/dist/database/backend/server-document.mjs:1:7436)
at ServerDatabaseBackend._createDocuments (/home/ubuntu/foundry/resources/app/dist/database/backend/server-backend.mjs:1:2611)

formal goblet
#

Yep. Huh

#

I see many things in there, including Tokenizer. But nothing from CSB

sharp latch
#

also using version 2.0.2 of chat commander fwiw

#

true enough about nothing from CSB.

formal goblet
#

Disable Tokenizer and see what you get?

sharp latch
#

will try

#

Tokenizer module was not enabled - only active module was chat commander. Same behavior happened with Tokenizer enabled and disabled...

#

are any modules other than chat commander required for CSB?

formal goblet
#

Nope, literally the only one

sharp latch
#

Is this useful?

fetch @ foundry.js:68326
notify @ foundry.js:68223
error @ foundry.js:68260
_handleError @ foundry.js:3468
(anonymous) @ foundry.js:3450
value @ socket.js:532
value @ socket.js:459
L.emit @ index.mjs:136
(anonymous) @ manager.js:207
Promise.then (async)

formal goblet
#

If so, you might want to get help from Foundry-Staff directly.

sharp latch
#

it hasn't occurred with other game systems. Are the ${ }$ delimiters part of CSB, part of chat commander, or standard JavaScript? (Excuse my ignorance...)

formal goblet
#

They are part of CSB

#

Which browser are you using?

sharp latch
#

thanks. something about the way foundry is configured for me doesn't seem to like it.

using chrome. I have the instance of foundry hosted on a server from Oracle.

sharp latch
#

sounds like the exact problem I've had, right down to using ubuntu. I'll try the clean install of Foundry recommended there. Thanks for your help!

formal goblet
#

Yeah, I remembered that someone had that issue some time ago

sharp latch
#

Just closing the loop - that worked! Thanks for running it down for me, much appreciated.

static cargo
#

Ok, I know that I know this, but... what do I type in the console again to go digging through the props on the currently selected actor?

formal goblet
fathom cave
#

Small 'bug' potentially; when I reset all items, and the checkbox option 'checked by default' is unset, it isn't registering the box as false, but as null/undefined until it is clicked and unclicked, which is causing items to 'disappear' on the character sheet the way I have it setup because of a filter in the item containers displaying only when they are false. Can work around it, just thought I'd let you know.

formal goblet
fathom cave
#

Oh nice. I just went through and reversed all the logic to make it work. Maybe I'll switch it back................ ..... ..... ...

formal goblet
fathom cave
#

can the item container filters check for truthy?

#

also, %{throw 'done';}% gives an error, but it stops the message from going to chat, which is what I want, I can just ignore that error, right?

formal goblet
fathom cave
fathom cave
#

cool

formal goblet
#

Good thing is that there'll be an option to disable chat message creation with the upcoming version 😅

real shuttle
marble timber
marble timber
#

TADA !
${#dices_pos:= 1 + (chk_FOR ? 1 : 0)}$
${#dice_neg:= 0 + (chk_ADV ? 1 : 0)}$
${[:dices_pos:d6] + CAR - [:dice_neg:d6]}$

#

Thanks for the help @formal goblet

somber bay
#

BTW is there a way to reference sections from an actor in a journal? Like I can link them with the uuid but is there a way to show parts of their character sheet like image, a stat, something in a drop down, etc.

formal goblet
somber bay
formal goblet
somber bay
floral crater
#

Hi !
I have an item whose accessibility I'd like to change on the character sheet according to my character's level.
I have a field on my _equipableitem that looks up the character's level on his character sheet and compares it to the level defined on the item's sheet, assigning a value equal to 1 in a field (perso_level). When this value =1, the item appears on the character sheet.
I'd like this value to return to 0 when the character's level reaches 5.
How can I do this?
With Itemmodifiers? If so, how do I use this function?

earnest imp
#

Does CSB has any component to put in images? Or ways around it?

formal goblet
tardy rain
#

okay

#

I did some snooping

#

on an error

#

and

#

I found an issue I have no idea how to fix

#

so i'm trying to make a way to do rollable stats

#

and I copy it

#

and do the whole thing

#

but this breaks the outfit

#

specifcally the dice power attribute refrence

#

for the item container

#

but not dice max?

#

and I spent a while doing various bug testing things

#

and I finally found

#

the issue

#

if I use any character sheet templete

#

other then chracter sheet

#

even if it's an identical duplicate

#

dice power breaks

#

if use any characters sheet other then guy

#

dice power breaks

#

if I use character sheet on guy

#

it works

#

if I use character sheet on guy2

#

it breaks

#

if I use character sheet 2 which is exactly identical to characters sheet

#

on guy

#

it breaks

#

I

#

I dont know how to fix this

#

please somebody help me

#

if you can

#

no pressure

formal goblet
#

@tardy rain 2 things:

  • Please post only 1 message instead of multiple ones to reduce spamming. It doesn't matter if the Chat Message is a bit longer.
  • Please describe the issue in an understandable manner, so that I know at which parts I should look at (what Components are involved (including the keys), what is the expected behavior, what is the actual behavior, what error message is shown (you can check the console with F12 for that))
fathom cave
#

If I refer to a number field that has a minimum value set and change it from somewhere else, in this case, a dialog prompt, it doesn't respect the minimum value. Is this known? Am I doing something silly?

formal goblet
fathom cave
#

Workarounds? just have to put ternary anytime it might be an issue?

formal goblet
fathom cave
#

cool, thanks

fathom cave
#

Also, and totally unrelated, is there a way to add an item to a player sheet without dragging and dropping it?

#

a CSB way, to be more precise.

formal goblet
fathom cave
#

that's what I thought, didn't see it in any documentation but figured I would check cuz noob

real shuttle
#

can you retrieve a template name from an item?

#

what I'd like to do is say, have both weapons and general features in the same item container for a simplified monster sheet

for the roll message when putting the item in chat, I'd like to be able to say, basically "if weapon, include attack/damage buttons in chat; if not, don't"

formal goblet
tardy rain
#

How would one get a ref function in an item container to search for Keys in the item instead of the charger sheet. Or otherwise a way to display a rich text area from a item to display via a roll on a item container label

formal goblet
tardy rain
#

The problem that I have is it doesn’t actually parse the item. Probably, I would assume because refs input is a string

#

So it just doesn’t have any result because ref can’t find a key with the name “item.outfit_type” at least that’s the best idea I have of what’s going on

formal goblet
tardy rain
formal goblet
tardy rain
wintry crow
#

I have a rich text panel embedded into a dynamic table, how do I make it so when I click the item I send it to chat?
Do I add a button? if so what do I need to add as variables to reference the entry on the same row

grave ether
#

Normally, you would put something in the roll section of the label to signify this is what goes in the chat window.

grave ether
#

If you just want it to read out text it's something like ${"text goes here"}$ if you want it to roll something use the roll commands. I am away from my pc or I would paste some examples for you. Hope this helps -note: I am doing this off memory so check the wiki if it doesnt work

fathom cave
#

Can anyone point me in the right direction for what the proper call would be to add an item to a character sheet from a script?

formal goblet
fathom cave
#

ok, thanks

#

and to delete items I can use the linkedEntity "%{linkedEntity.delete()}%" in the CSB documentation, right? Or is that only on able to be referenced from an item?

formal goblet
fathom cave
#

it won't delete templates though, right? I can just test on a new creation in a copied template

formal goblet
#

It can delete Templates, because they are also instance of Actor or Item

fathom cave
#

ok, definitely using copies then. good to know

formal goblet
#

If you delete a concrete Item with it, it won't delete the Template as well. Only if you explicitly delete the Template

fathom cave
#

yea, that's what I figured. I

#

I'll take a backup before I get into it as well

formal goblet
#

Yep, better safe than sorry

weak zealot
#

Hello! is there a way to select multiple tokens and pass them all as arguments to setPropertyInEntity, or do I have to create a loop of some sort? I manage just fine with one entity, but I would love pointers to mass setPropertyInEntity

formal goblet
weak zealot
#

thanks, i'll stick to this one-by-one approach for now

wintry crow
#

Also, a bit unrelated to the previous question, but is it possible to make dynamic tables extend horizontally instead of vertically?

formal goblet
wintry crow
#

I suppose I'll look into CSS for the table flip!

peak jacinth
#

Speaking of CSS, are there any tutorials of how to implement CSS in CSB? I just want to add basic outlines and stuff so my character sheets don't look so hideous.

wintry crow
sharp prairie
#

There is also a module on foundry called ‘Custom CSS’ that is super easy to use and doesn’t require messing with any of the files outside of your vtt session.

wintry crow
#

Sorry for bombarding this place with questions, but I am looking for a way to add a button inline on a label specifially within a switchCase

I have one set up as such and I want the dice rolls to be clickable and rollable

${switchCase(weapon_1_type, 'small_weapon', '1d4+1', 'medium_weapon', '1d6+1', 'large_weapon', '1d10', 'ranged_weapon', '[[/r 1d8]]。20mまで攻撃可能', 'spell','魔術触媒を必要とする魔術が使用できるようになる', 0)}$
#

I tried [[/r ]] but it didn't seem to work

wintry crow
#

Alright, I realized that I could add a switch case to the click field as such

${switchCase(weapon_1_type, 'small_weapon', '${Roll:=[1d4+1]}$', 'medium_weapon', '${Roll:=[1d6+1]}$', 'large_weapon', '${Roll:=[1d10]}$', 'ranged_weapon', 'Roll:=${[1d8]}$', 'spell','${Roll:=[0]}$', "")}$

But when I do this, all the dies are rolled at once on dice so nice, is there a better way to implement conditional damage that I am missing?

formal goblet
wintry crow
#

Heya, I'd like to ask for one more thing,

I have this roll here that is supposed to use two setPropertyInEntity to set one value to 0 and then update another by half the value that was zeroed.

I am running them in the following order, but when I click the button it fails to set damage to zero the first press, but it successfully sets damage to zero the second press always.
scar always gets updated regardless.

If I change the order then damage gets set to 0 first and it breaks, but I find it weird because I am using a variable which should go around that...

What am I missing here?

<h1>ダメージ治療</h1>
${DamageValue:= damage}$点のダメージを傷痕にしました。<br>
傷痕が${floor(DamageValue/2)}$増えました。
${#setPropertyInEntity('self', 'scar', "scar + floor(DamageValue/2)")}$
${#setPropertyInEntity('self', 'damage', 0)}$
${#recalculate('${damage}$')}$
formal goblet
wintry crow
#

I don't mind if it's dirty so yeah

#

Thouhg it's weird, I could swear it worked when I was first building this button...

wintry crow
#

Thank you, I'll look into it!

silver lake
#
${#concat(string(?{more:'Spheres?'[number]|0}), string(?{Lock:'Aspect?'[check]|0}))}$
${ref(sameRow('ACCS'))}$ ◄ CS | AD ► ${#Aspect:= ref(AspectLocked)}$ ${AD:= [:Lock:d:Aspect:]}$

So, in this one if the player checks the checkbox "Lock: 'Aspect?'[check" it doesn't register as '1' when using it in the [:Lock:d:Aspect:]

#

What am I doing wrong?

#

Also, hi!

#

It works if I set it to [number] instead of [check] though

tardy rain
#

how does one embed a macro in a sheet

tardy rain
#

Is there a diffrent way to append strings in a roll message, + and emptey space both try to convert the strings to numbers

fathom cave
#

Is that "<p>Info</p>" in a label?

tardy rain
#

rich text area

fathom cave
#

can't help you then, I figured a workaround for labels with prefixes and suffixes, but the rich text area automatically applies those even if you take them out in source

tidal hemlock
#

Why is intiative not working

#

When I try to roll intiative

#

It just shows these d20 symbols

#

How do I say it to roll d whatever + stat

#

And when I set it like this the D6 only rolls 0

formal goblet
tidal hemlock
#

oh so only the d needs to be in

#

the brackets

#

gotcha

#

Also for resources

#

We have HP Max and HP value

#

But how do I get it so a resource bar on a token would look at both

#

So like it'll say 90/100

formal goblet
#

Have a number field with a defined max-value and the system will create an attribute bar for you

onyx jetty
#

does anyone know how I get this popup to stop happening? it's been a long time since I messed with the system and don't understand what's causing it. I think I tried to use items at some point but couldn't do what I wanted with them. I don't have any anywhere as far as I can tell though and I get this popup anytime I click anything on the token. it doesn't hinder me doing anything it's just annoying to see constantly

formal goblet
onyx jetty
#

awesome thank you

#

I deleted the item container in the template not realizing the item stays behind

formal goblet
fathom cave
#

can you use %{ brackets inside a ComputablePhrase?

storm flame
#

So I'm trying to get it to add the StatUsed onto the damaged, so if the drop down menu is on str adds str value same with dex and acc ect any advice on how to to it?

silver lake
#

If anyone knows one

#

Also, I have a new question, this one I imagine rather simple;

${#concat(string(?{Roll:'Roll'|[2d10],"Normal"|[3d10kh2],"Advantage"|[4d10kh2],"Domination"|[3d10kl2],"Disadvantage"|[4d10kl2],"Submission"}), string(?{CS:'Character Score?'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'Method'[number]|0}), string(?{Sphere:'Spheres?'[number]|0}), string(?{Lock:'Aspect?'[number]|0}), string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= ref(AspectLocked)}$ ${AD:= [:Lock:d:Aspect:]}$

TOTAL
${(floor(Roll + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + ((Sphere)*2) + AD}$
${Energy}$ = ${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

${CharName}$

It works just fine, but I don't know how to make it roll with Dice so Nice.
There was this option:

${#concat(string(?{Dice:'Number of Dice'[number]|2}), string(?{Roll:'Roll'|"kh2","Keep Highest"|"kl2","Keep Lowest"}), string(?{CS:'Character Score?'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'Method'[number]|0}), string(?{Sphere:'Spheres?'[number]|0}), string(?{Lock:'Aspect?'[number]|0}), string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= ref(AspectLocked)}$ ${AD:= [:Lock:d:Aspect:]}$

TOTAL
${(floor([:Dice:d10:Roll:] + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + ((Sphere)*2) + AD}$
${Energy}$ = ${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

${CharName}$

But I'd rather have as few prompts as possible.

formal goblet
formal goblet
silver lake
peak jacinth
#

Where do you find the attributeBar on custom tokens? I'm super confused and can't find the values at all. I was running:


if(enemy.size == 0 || enemy.size > 1){
    console.log('Failure!')
    ui.notifications.error('Please target a single token.')
}
else {
    console.log('Success!')
    console.log(enemy.system.attributeBar.charCurrHealth)
    
    }```
But this just returns an error that 'system' is undefined. If I remove 'system', then it says charCurrHealth is undefined instead...
#

Also tried this in the console, and it doesn't work, seemingly

formal goblet
peak jacinth
#

With what?

#

-Oooh, I seeee.
I'm still stumped on how to find token attribute bars, though - I'm trying to make a simple combat macro that subtracts the damage from the target's health (charCurrHealth).

formal goblet
peak jacinth
#

Sorry for all the dumb questions, but - how do I handle the array accordingly? I tried to start simple by assigning the first entry in the array to something else, but that just gets me 'undefined' when I console.log it.


let target = 0

if(enemy.size == 0 || enemy.size > 1){
    console.log('Failure!')
    ui.notifications.error('Please target a single token.')
}
else {
    console.log('Success!')
    let target = enemy[0]
    console.log(target)
    }```
formal goblet
#

Btw, enemies would semantically be better.

peak jacinth
#

Oh god, you're right, I did it again. Sadly, the double declaration didn't seem to be the issue, though -

#
console.log('enemies: ', enemies)
let target = 0

if(enemies.size == 0 || enemies.size > 1){
    console.log('Failure!')
    ui.notifications.error('Please target a single token.')
}
else {
    console.log('Success!')
    target = enemies[0]
    console.log('target: ', target)
    }```
...Yields the same result:
peak jacinth
#

Something like this? let enemies = game.user.targets.values().next().value?.actor;

formal goblet
#

This will directly fetch the actor if present

peak jacinth
#

So if I use that to subtract their health, would that apply to the document and not the token if it's unlinked? Sorry, I'm a little confused >.>

formal goblet
#

If the Token is unlinked, it will have its own copy of Actor data

peak jacinth
#

WoAH IT WORKS! Thank you so much! 🙏

peak jacinth
#

Which one of these would have the NumberField's current value for this actor? I'm trying to fetch the actor's armor class so I can use it for calculating damage.

#

...Oh, wait. Would this be easier to accomplish with hidden attributes?

#

It's in system.props - nevermind, I should've noticed that! 😅

formal goblet
quasi summit
#

Hi. Is it normal that link entries aren't computed within text areas in items ?

formal goblet
quasi summit
#

I see: @....

vagrant hollow
tardy rain
#

Does anyone know what might be causing this error?

#

here is the script

quasi summit
formal goblet
peak jacinth
#

When a player runs a script macro to subtract from an enemy's current health, for some reason it ticks down the value in console, but on my end the enemy's hp bar looks completely the same, and their character sheet doesn't change even if it's linked. I dunno what's going wrong here.

#

The value persists between uses of the same script, but it resets when the player logs out and logs back in again.

#

Is it because they don't own the sheet they're targetting?

formal goblet
peak jacinth
#

What's that?

formal goblet
peak jacinth
#

Wait, it wouldn't be item, huh? Would it be token?

#

Ok, I settled on using actor.update instead. Now to find a module to help with the permissions problem 🤔

tardy rain
#

this

#

always evaluates to true even when the statement is not true, and I cannot figure out why at all

#

okay I see now, it's assinging it

#

but If I use any other amount of equal signs it refuses to compare the strings

#

and throws an error saying the data type cant be converted into a interger which isnt even what i'm doing

umbral jackal
#

Before I drive myself nuts...how do I assign calculable numerical values to the items in a dropdown list? I'm trying to make a table of skill groups, and each category (Background Skills, Field Skills, and Action Skills) costs 1, 2, or 3 points per level, respectively.

EDIT: Never mind, looks like I'll have to use switchCase.

tardy rain
formal goblet
tardy rain
tardy rain
#

I have attempted to define a max value however it is not applying for the token

formal goblet
tardy rain
#

I see

grave ether
#

Does anyone have an inventory sheet? I am having a hard time coming up with a concept and design that works really well. Would love to see others

umbral jackal
#

All right, so I've got a Dynamic Table that I'm using as a list of skills, and I'd like each skill to feature one or more skill specialties that can be selected from during skill rolls, and also which add to the point cost of the skill if more than one specialty is selected. Is there any way to do that?

peak jacinth
# formal goblet You also have to select the attribute bar in the token. Not **props**

Does changing attributeBar really update that value on the actor?

let enemies = game.user.targets.values().next().value?.actor

let enemiesHealth = enemies.system.attributeBar.charCurrHealth.value

let armorDO = 1

console.log('enemiesHealth: ', enemiesHealth)

let enemiesNewHealth = enemiesHealth - armorDO
await enemies.update({'system.attributeBar.charCurrHealth.value': enemiesNewHealth})

console.log('enemiesNewHealth: ', enemiesNewHealth, ' charCurrHealth: ', enemies.system.attributeBar.charCurrHealth.value)```
Logs this in the console: 
So I'm not sure if I'm using the right thing at all. It finds the correct value for health, can subtract from it, but after updating it doesn't stick at all.
formal goblet
peak jacinth
#

So I was looking in the wrong place... Where would I find property?

formal goblet
peak jacinth
#

Oh my god it finally works! Thank you so much!

formal goblet
umbral jackal
#

All right...then would I need to use %{ }% scripts to separate a comma-delimited string into an array?

formal goblet
umbral jackal
#

For one thing, characters will be able to optionally select a skill specialization when doing a skill roll. For another, the skill point cost of a skill will depend on a combination of the genre of the campaign and the number of skill specializations chosen for it.

#

Each skill gets one specialization for free, and each specialization after it costs an additional skill point.

formal goblet
umbral jackal
#

So...if a character had the Animal Training skill (2 points/level) at Level 3, and had "Foxes, Horses, Raccoons" in its specialization for that skill, it would cost 2 * 3 + (3 -1) = 8 points.

#

One specialization per roll.

formal goblet
#

Ok, that makes it easier

#

At least for the roll part

#

But there can be endless specializations for 1 Skill, right?

umbral jackal
#

Yes.

formal goblet
#

Ok, so that one is 1 - n...

umbral jackal
#

And due to the way this particular system works, any number of custom skills or skill specializations can be added.

formal goblet
#

Yeah, I see the issue

umbral jackal
#

What I'm thinking of is having one Dynamic Table row for each skill, having a text field for all selected specializations for that skill, and having the total cost and the skill roll formula make use of an array made from the delimited list.

formal goblet
#

You could create a 2nd Dynamic Table, which holds the relations between Skills and Specializations. With that, we can determine, how many Specs a Skill and which it has.

umbral jackal
#

A second dynamic table that isn't a child of the first?

formal goblet
#

Yeah

#

You can't really nest them

earnest imp
#

A bit like databasing

umbral jackal
#

The first table would be a list of skills...
The second table would be a list of specializations, and one of the fields is a dropdown list that uses the skills from the first table as its values...
That sound workable?

earnest imp
#

can one specialization have multiple skills

formal goblet
#

Please no n - m 😂

umbral jackal
earnest imp
#

Then that works yeah

umbral jackal
#

Only thing to figure out now is how to count up the cost of the specializations with each skill getting one free specialization.

formal goblet
umbral jackal
#

This is so confusing...

formal goblet
#

X = Amount of Specs
Skill Cost = X - 1 (the easy part)

umbral jackal
#

Well, yeah, but I need to make sure that each specialty gets one free—wait, derp. I think I may have figured it out.

#

X = number of specs
Y = number of distinct skills in the second table
Cost = X - Y

formal goblet
#

Wait, you want the total cost of all Skills?

umbral jackal
#

So if you have 10 specializations split across 3 distinct skills, the cost of the specializations alone would be 7.

umbral jackal
#

Thank you so much for the advice so far!

formal goblet
formal goblet
umbral jackal
#

Question now is, how would one count the number of distinct values in a column?

umbral jackal
#

Would setDistinct() work there?

EDIT: Asked and answered: yes it does!

silver lake
# formal goblet Take the upper ones and replace `[]` with strings `''`

That didn't work, :/

${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{CS:'CHARACTER SCORE'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'METHOD/TRAIT'[number]|0}), string(?{Lock:'ASPECT?'[number]|0}), string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= ref(AspectLocked)}$ ${AD:= [:Lock:d:Aspect:]}$

TOTAL
${(floor(Roll + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + ((Sphere)*2) + AD}$
${Energy}$ = ${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

${CharName}$
#

Now it says it cannot convert the "3d10kh2" and so on.

silver lake
#

Another one

${setPropertyInEntity('self', sameRow('CSpheres'), sameRow('CSpheres') + [min(1,(1d2-1))])}$

This does not modify the CSpheres, no errors, it rolls normally.

umbral jackal
#

I may be dumb. Now I'm having a hard time finding an at least relatively easy way of calculating the average of stats depending on which ones are selected via checkbox (e.g. If the checkbox for just the Body stat is checked, it will give the Body stat; if only the Body and Mind stats have their boxes checked, it will average just those two; if Body, Mind, and Soul are all checked, it averages all of them).

silver lake
umbral jackal
#

What I was hoping for was a way to check which checkboxes are checked, and only average the stats corresponding to those checkboxes.

silver lake
#

I know how to do stuff with radials, since they can hold values, but checkboxes seem to be mostly aesthetic.

#

I mean, you can use hidden attributes.

umbral jackal
#

So like, if the useBody checkbox is checked, then stat_Body is added to and averaged in the calculation.

vagrant hollow
umbral jackal
#

Yeah, one sec.

silver lake
#

You can create a hidden attribute that equals to "body * (Checkbox1Value)"

#

so, if the checkbox is checked, it's equal to 1.

#

and it produces the value of Body

umbral jackal
#

When rolling a skill check, this dialog comes up. I was just hoping there was an easy way to do this so I could just use math.mean() or something.

silver lake
#

${bodyStat*BodyCheck}$

#

Oh!

#

I thought you meant in the sheet

umbral jackal
#

Instead of having to use ${floor((stat_Body * useBody + stat_Mind * useMind + stat_Soul * useSoul) / (useBody + useMind + useSoul))}$

#

Which...isn't working properly, anyway, evidently.

silver lake
#
${concat(string(?{BodyKey:'BODY'[check]|0}), string(?{MindKey:'MIND'[check]|0}), string(?{SoulKey:'SOUL'[check]|0}), string(?{Bonus:'Sitchbonus'[number]|0}))}$
TOTAL
${((BodyKey+MindKey+SoulKey)/3)+Sitchbonus}$

I'm thinking something like this

#

but I'd have to test it

silver lake
#

So, if the key of the selection is the same key as the numberfield with these values

#

it should work?

umbral jackal
#

Hang on, trying to figure out your example.

silver lake
#

I'm not good at JS btw.

#

OH

#

I know

#

IF

umbral jackal
#

The roll keeps coming back "ERROR".

silver lake
#

IF the checkbox produces a value of 1. Or if the Key1, 2 and 3 there becomes a 1 if checked.
Then you might be able to do:

${concat(string(?{Key1:'BODY'[check]|0}), string(?{Key2:'MIND'[check]|0}), string(?{Key3:'SOUL'[check]|0}), string(?{Bonus:'Sitchbonus'[number]|0}))}$
TOTAL
${(((Key1*BodyKey)+(Key2*MindKey)+(Key3*SoulKey))/3)+Sitchbonus}$
silver lake
umbral jackal
umbral jackal
silver lake
#

Can you paste your entire code here?

umbral jackal
#
?{useBody:"Use Body"[check]},
?{useMind:"Use Mind"[check]},
?{useSoul:"Use Soul"[check]},
?{sitBonus:"Situational bonus"[number]|0}
)}$
<h2>${!sameRow('skill', "Skill")}$ Roll</h2>
<p>${sameRow('skill_Level') + floor((stat_Body * :useBody: + stat_Mind * :useMind: + stat_Soul * :useSoul:) / (:useBody: + :useMind: + :useSoul:)}$</p>```
silver lake
umbral jackal
silver lake
#

no problem though

#

just divide it by Key1+Key2+Key3

silver lake
#

So, what's the problem? The checkboxes do not give back a 1 or a 0?

umbral jackal
#

I don't know. "ERROR" isn't very helpful.

silver lake
silver lake
#

oh*

#

You're missing a bracket

#
${#concat(
?{useBody:"Use Body"[check]},
?{useMind:"Use Mind"[check]},
?{useSoul:"Use Soul"[check]},
?{sitBonus:"Situational bonus"[number]|0}
)}$
<h2>${!sameRow('skill', "Skill")}$ Roll</h2>
<p>${sameRow('skill_Level') + floor((stat_Body * :useBody: + stat_Mind * :useMind: + stat_Soul * :useSoul:) / (:useBody: + :useMind: + :useSoul:))}$</p>
#

Try this instead

umbral jackal
#

Oh, at the end of floor()?

silver lake
#

ye

silver lake
#

I wanted to add a checkbox to a roll as well

umbral jackal
#

Hmm...

silver lake
#

I don't know what the utility of checkboxes is in that case though. I remember using them at some point, where I think they added a +2, and it worked

#

lemme open the VTT and see if I still have that sheet.

#

hmm

#

I do

#

and it still works

#
${?{CS:'Character Score?'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}}$◄ CS | 

${?{Sphere:"Spend Sphere?"[check]}}$ ◄ Sphere

TOTAL
${(floor(([2d10]) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + ((Sphere)*2)}$

This works, you see, "Sphere *2" equals to 2 in the result

silver lake
#

With the bracket closed

umbral jackal
#

Hang on.

silver lake
#
${#concat(string(?{useBody:'Use Body'[check]}),
string(?{useMind:'Use Mind'[check]}),
string(?{useSoul:"Use Soul"[check]}),
string(?{sitBonus:"Situational bonus"[number]|0})
)}$
${!sameRow('skill', "Skill")}$ Roll
${sameRow('skill_Level') + floor((stat_Body * :useBody: + stat_Mind * :useMind: + stat_Soul * :useSoul:) / (:useBody: + :useMind: + :useSoul:))}$

Try this

umbral jackal
#

Same result.

#

I'm gonna try treating useBody, useMind, and useSoul as if they're not interchangeable with 0 and 1 and see if that changes anything.

silver lake
#
${#concat(string(?{useBody:'Use Body'[check]}),
string(?{useMind:'Use Mind'[check]}),
string(?{useSoul:"Use Soul"[check]}),
string(?{sitBonus:"Situational bonus"[number]|0})
)}$
${!sameRow('skill', "Skill")}$ Roll
${sameRow('skill_Level') + floor((stat_Body * useBody + stat_Mind * useMind + stat_Soul * useSoul) / (useBody + useMind + useSoul))}$

I don't think you need the : :, I usually only use them for rolls, I don't know if it's having an impact, but I removed them

umbral jackal
#

!!! That did it! Thank you so much!

silver lake
#

:O

#

I don't know much of JS so I thought you must've known something I didn't to be using them

#

so I didn't even think of that

#

XD

#

No problem

#

actually, that made me realize that I CAN actually do that thing Martin said I couldn't, :P

#

so thanks for that.

#

I usually only use the colons for :keything:d:anotherKey?: instances

#

Checks returning a number is a good win

umbral jackal
#

I've forgotten what using colons like that is even good for.

silver lake
# silver lake That didn't work, :/ ```js ${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10k...

Gonna bump my questions back :P

${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{CS:'CHARACTER SCORE'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'METHOD/TRAIT'[number]|0}), string(?{Lock:'ASPECT?'[number]|0}), string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= ref(AspectLocked)}$ ${AD:= [:Lock:d:Aspect:]}$

TOTAL
${(floor(Roll + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + ((Sphere)*2) + AD}$
${Energy}$ = ${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

${CharName}$

Says it can't compute my 3d10kh and so on.
if I switch their ' ' with [] it works, but it doesn't roll on Dice So Nice, which I want it to do.

AAND

${setPropertyInEntity('self', sameRow('CSpheres'), sameRow('CSpheres') + [min(1,(1d2-1))])}$

This does not modify the CSpheres number-field, no errors and it rolls normally.

#

This is in a dynamic table.

agile sorrel
#

Hello there ^^
Don't want to interupt you so I can come back later to ask my question.

I started using Custom system builder last week and I'm struggling with one only little thing.

Is it possible to display an image on a roll message ?
I'd like to display an item img when players use that item but I can't figure out how to do it.

silver lake
#

Yes!

#

Is it in a dynamic table?

#

That's one way I recently did that.

agile sorrel
silver lake
#

There are a few ways, you could simply add an image to a rich text field in a Label Roll Message, or have it in a rich text field and then just add the key to it on the roll image ${TextFieldWIthImage}$ and it will show it in chat.

silver lake
#

I'm working on my system here as well, so I have the VTT open, I could exemplify it to you by screen-sharing.

#

It's surprisingly easy to do that.

agile sorrel
#

I have this at the moment

silver lake
agile sorrel
#

the ${img}$ contains the object image url

silver lake
#

Oh, great! So it's from the roll message, it's rather easy then.

#

So, the easiest way to do this is to have a rich text field in this sheet

#

do you have that?

agile sorrel
#

Like this ?

#

Or in the object sheet maybe ?

silver lake
#

The sheet, not the label key.

#

lemme try and screenshot a gif since screensharing is out of the question

#

you'll immediately get it

agile sorrel
#

Oh ok thanks ^^

silver lake
#

I had a rich text field there, so I just opened it, and pasted an image.

#

Now, in a roll, all you have to do is refer to that text field.

#

${TextFieldName}$ will throw it into the roll.

#

A rich text area is a component type:

#

You can make it tiny so that it doesn't occupy space, like having just the icon appear.

#

It's as simple as copying and pasting an image there.

agile sorrel
#

I have to say I don't get it
If i take your example, what I want to display is the token at the upper left of your right sheet.

(My object image is set by the DM, not the players)

silver lake
#

You want to show the image of the Sheet icon?

agile sorrel
#

Yep

silver lake
#

I don't know if that has a key. But this is fine, in my example you can still set the Rich Text Area as hidden to all players but the GM

#

So only the GM has access to changing it.

#

You can just set it as the same image.

agile sorrel
#

Yes but it means i'll have to manually put the image of the object a 2nd time, on hundreds of objects

agile sorrel
#

Ok I'll try this then

#

Thanks for your help 💙

silver lake
#

Only Martin would know if there's a key to that

#

I get what you wanna do, if you learn that it has a key I'd love to know as well.

#

I haven't even gotten into Item Containers, and I've used this system plenty :P

silver lake
#

Maybe because I'd be making items for a billion years once it's working.

agile sorrel
#

Yeah I started working with item containers 2 days ago
I struggled a bit but it works so fine.
And for players it looks really great

silver lake
#

Alright alright. I'll do it
I do need a new way to do the reveals for one of the main features of the system since a module I was using got super outdated T-T

agile sorrel
#

That's sad 😕
I hope you'll find what you need with item containers then ^^

vagrant hollow
agile sorrel
silver lake
#

Gonna bump my questions again :P

${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{CS:'CHARACTER SCORE'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'METHOD/TRAIT'[number]|0}), string(?{Lock:'ASPECT?'[number]|0}), string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= ref(AspectLocked)}$ ${AD:= [:Lock:d:Aspect:]}$

TOTAL
${(floor(Roll + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + ((Sphere)*2) + AD}$
${Energy}$ = ${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

${CharName}$

Says it can't compute my 3d10kh and so on.
if I switch their ' ' with [] it works, but it doesn't roll on Dice So Nice, which I want it to do.

AAND

${setPropertyInEntity('self', sameRow('CSpheres'), sameRow('CSpheres') + [min(1,(1d2-1))])}$

This does not modify the CSpheres number-field, no errors and it rolls normally.

#

Help?

formal goblet
silver lake
formal goblet
#

And for the second question: The second argument of setProp expects a path, not a value.

formal goblet
#

What does sameRow() return exactly?

silver lake
#

I mean, I think I do. But how would the path look?

silver lake
#

from the same row in a dynamic table

formal goblet
silver lake
#

It's supposed to add a 1 to it if the 1d2 lands on a 2.

silver lake
formal goblet
#

Just tell what the current value of the number field is 😅. Doesn't matter right now that it can vary.

silver lake
#

Tell you what the value currently is in a specific ability of a character?

#

um, let's say 5?

silver lake
formal goblet
#

Ok, so this is what it would like if you'd resolve it a step: setPropertyInEntity('self', 5, 6)

silver lake
#

It's meant to add either a 1 or nothing ,depending on a 1d2.

formal goblet
#

You see that it can't know what it should change

silver lake
#

Okay? But we're meant to know.

#

You see a 5 there, and you can flip a coin and hope that it will increase by one.

#

but it might be another value?

#

I'm sorry, but I'm not understanding.

#

I just need to to add the result of this [min(1,(1d2-1))]

#

Or, are you maybe telling me to delete the second instance of sameRow()?

formal goblet
#

We only know to which value it should update, but we don't know, which Component it should change

#

Because we're missing either a Component Key or a path, if we're inside a Dynamic Table.

silver lake
#

Isn't the component CSpheres, which is a number field?

silver lake
#

I thought that's what sameRow(key) was for.

formal goblet
silver lake
silver lake
# formal goblet No, that will return the actual value of the Component in question. What you're ...

There is one last thing I wanted to figure out Martin, if you would spare a minute, and I'm sorry to bother you.

${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}),
string(?{CS:'CHARACTER SCORE'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'METHOD/TRAIT'[number]|0}),
string(?{Lock:'ASPECT?'[check]}),
string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= ref(AspectLocked)}$ ${AD:= [:1*Lock:d:Aspect:]}$

TOTAL
${(floor([:Roll:] + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + (AD*Lock)}$
${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

${CharName}$

In this one, I was trying to look for a way to merge
string(?{Lock:'ASPECT?'[check]}),
and
string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$
So that as long as I don't select none it spends 1 point from here;
${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

#

So I can remove the checkmark, to de-clutter the prompt window

#

In this instance, Energy is only spent if the ASPECT is being used.

#

and vice-versa

#

so it would be great if I could have only one prompt for both.

formal goblet
silver lake
#

oh man this is a whole new can of worms for me

#

I can't even read that.

#

lemme try

#

Oh, that's where the main issue with this transition comes up
${#Aspect:= ref(AspectLocked)}$ ${AD:= [:1*Lock:d:Aspect:]}$
I need this to still work, so that it knows to roll the Aspect Dice

#

Cause like this, I couls use the checkmark to tell the formula to roll it

silver lake
#

Which are three values within the Energy

formal goblet
silver lake
#

Oh, I don't even know what that does, i just add it cause it works. Lemme try.

formal goblet
#

Making e.g. 5 (a number) to '5' (a string). These are different types

silver lake
#

${#AspectDice:= equalText(Energy, 'None') ? 0 : 1}$
On this one, how will it pull from the AspectLocked key value in the sheet?
Like I used before:
${#Aspect:= ref(AspectLocked)}$

#

Do I replace the 1 with it?

silver lake
silver lake
#
${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{CS:'CHARACTER SCORE'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'METHOD/TRAIT'[number]|0}), (?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= equalText(Energy, 'None') ? 0 : ref(AspectLocked)}$ ${AD:= [:Aspect:d:Aspect:]}$

TOTAL
${(floor([:Roll:] + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + AD}$
${setPropertyInEntity('self', 'Energy', "equalText(Energy, 'None') ? Energy : Energy - 1")}$

${CharName}$
#

I get an error at the setPropertyInEntity()

silver lake
#

and this one is rolling wild dice

${#Aspect:= equalText(Energy, 'None') ? 0 : ref(AspectLocked)}$ ${AD:= [:Aspect:d:Aspect:]}$
formal goblet
silver lake
formal goblet
#

Wasn't it ref(AspectLocked)?

silver lake
#

Oh, I thought you were telling me to replace it with this

formal goblet
#

No, AspectDice is clearly a different variable 😅

silver lake
#

I couldn't even read this new formula though xD

#

Didn't even know where things go

#

but I think I understand it a bit now

formal goblet
#

Btw, I've also lost track what we're doing

silver lake
#

So, I have this one, which works:

${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{CS:'CHARACTER SCORE'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'METHOD/TRAIT'[number]|0}), string(?{Lock:'ASPECT?'[check]}), string(?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

Aspect: ${#Aspect:= ref(AspectLocked)}$ ${AD:= [:1*Lock:d:Aspect:]}$

TOTAL
${(floor([:Roll:] + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + (AD*Lock)}$
${Energy}$ = ${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

${CharName}$
silver lake
formal goblet
silver lake
#

I know, I'm just catching you up

#

So right now I have this:

${#concat(string(?{Roll:'ROLL'|'2d10',"Normal"|'3d10kh2',"Advantage"|'4d10kh2',"Domination"|'3d10kl2',"Disadvantage"|'4d10kl2',"Submission"}), string(?{CS:'CHARACTER SCORE'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"}), string(?{method:'METHOD/TRAIT'[number]|0}), (?{Energy:'Energy Spent ='|"CNothing","None"|"CStam","Stamina"|"CWill","Willpower"}))}$

${#Aspect:= ref(AspectLocked)}$ ${#AspectDice:= equalText(Energy, 'None') ? 0 : 1)}$ ${AD:= [:AspectDice:d:Aspect:]}$

TOTAL
${(floor([:Roll:] + (method*2) + ((sameRow('SLevel'))*2))) + (floor((CS)*2)) + AD}$
${setPropertyInEntity('self', 'Energy', "equalText(Energy, 'None') ? Energy : Energy - 1")}$

${CharName}$
formal goblet
#

Like I said, I changed the last part 😅. It's still not the correct one

silver lake
#

oh, that's what you meantr

#

It's cause I saw you change it once, but you changed it again and I missed it :P

#

Aaand it works!

#

Now, just to make it pretty

silver lake
#

This helped me bunches

#

I wanted to improve the sheet for this system, and add a new module I created for it.

#

It's all working dandy now

#

I'm starving, so I'm gonna go for a bit

#

Thank you again!

#

All the love

silver lake
#

I have another thing that I left undone for years from not knowing how to do, or if it's even possible.
How do I make a Roll Text prompt that has a dropdown of options coming from a Dynamic Table?

silver lake
#
${#concat(string(?{Odd:'ODDITY'|'(fetchFromDynamicTable('OddityTable', 'CSpheres', "OddityName"})}$

Well, I can tell that this isn't how it works..

turbid elbow
#

GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 4080 Direct3D11 vs_5_0 ps_5_0, D3D11)
Max Texture Size: 16384

Scene: 20900 x 7700 | Grid Size: 100 | Padding Percentage: 0.05

And yet, my map background is an empty black rectangle.
Have I ovestepped the max size somehow?

silver lake
turbid elbow
#

Even when I am the host?

silver lake
#

I would wager that that is indeed too big for Foundry.

silver lake
# turbid elbow Even when I am the host?

Yes, it relies on the sofware's memory, your Ram only influences its smoothness to a point. If the browser can't run it (be it the app or in your preferred browser) then it won't load.

silver lake
turbid elbow
#

Is there any way to know what and where I need to cut to make it work?

silver lake
#

So I have lowered it by half recently.

silver lake
turbid elbow
#

Well, I am running CSB right now

silver lake
#

It's foundry related.

#

The problem you are having I mean

turbid elbow
#

ok, I went to troubleshooting

silver lake
#

Bumping it back:
I have another thing that I left undone for years from not knowing how to do, or if it's even possible.
How do I make a Roll Text prompt that has a dropdown of options coming from a Dynamic Table?

${#concat(string(?{Odd:'ODDITY'|'(fetchFromDynamicTable('OddityTable', 'CSpheres', "OddityName"})}$

Well, I can tell that this isn't how it works..

silver lake
#

I tried creating a dropdown in this Dynamic Table and referring it to the value in the target Dynamic Table.

${setPropertyInEntity('self', ref(sameRow('OddSpend')), "(sameRow('OddSpend')) - Sphere")}$

Then I added this to the roll so it'd pull from that dropdown, but it didn't work.

pliant vine
#

hi everyone and sorry to bother you. is there a module to display chips on the table, like poker chips for csb? thank you in advance for your answer

silver lake
pliant vine
somber bay
silver lake
#

I was imagining it like the cards

#

but yeah, good question

somber bay
#

Cards would be smart but I cannot figure them out, lol

silver lake
#

I use them for one of my systems, took a lot of work to make it nice though. I'm using Monarch I think to make it manageable.

pliant vine
#

thank you very much

formal goblet
silver lake
#

I was trying to make it pull from a Dropdown connected to a dynamic table.

#

I want it to pull a value.

#

I could also work with a way to make a dropdown connected to a Dynamic Table in the roll prompt itself

formal goblet
formal goblet
silver lake
silver lake
formal goblet
silver lake
formal goblet
silver lake
#

I apologize for being slow, I have been at this for 18 hours straight now.

formal goblet
#

The 2nd argument of setPropertyInEntity() expects a Component Key or a path (or reference) in case of Components inside Dynamic Tables.

#

So you want to use getRefFromDynamicTable() for that

silver lake
#

I think I understand it a bit. It's for the "having a dropdown pulling from the target dynamic table" method, right?
I'll be trying that after I eat something.

formal goblet
silver lake
somber bay
#

Kinda random but what would be a best practice to put some roll instructions inside a field that is GM only visible?
I wanna do stuff like reducing your potion count by 1 heals you or using an inspiration rolls a d20...
So I'm thinking like a rich text box with a key like 'command' and then I can roll 'item.command' in an item container?

silver lake
#

Maybe I can figure it out from that

somber bay
formal goblet
somber bay
# formal goblet A hidden Label with a Label Roll Message?

Yeah, specifically one I could reference in a formula and have it roll so like let's say ${name}$ decides to ${thing}$ and thing is what I want to happen when a button is clicked in the item container like heal 1 hp, roll a d20 or print a message

formal goblet
somber bay
somber bay
#

I gotta grow up sooner or later so thanks I'll check that stuff out. No problem rolling a variable but making a whole label happen would be cool.

formal goblet
somber bay
#

Oh nice... and I'm excited for rolls that update fields that do not post to chat in the next version... right now I use them a lot to equip, unequip, etc so chat gets spammed.

brave trench
#

Default token settings aren't seeing the complex attribute bar property. Is this a known issue or fixable? Short of duplicating tokens with the preferred settings?

wicked pulsar
#

Hi ! im new here and on foundryVTT, i don't have a perfect english sorry for that.
I need help for somthing, i try to make a formula for a roll , after this roll i want the result in the chat and a message who tell "win" or "fail", but i dont understand how can i do that.
For now i have this formula who works but i cant have the result of roll.
${[1d20]<=[:STR:] ? "win" : "fail"}$
Someone know plz ?

formal goblet
formal goblet
wicked pulsar
#

Maybe that's the good way, just don't knows how can i concatened 'win' or 'fail' with Roll

#

i finaly found ! Thx

abstract siren
#

hey everyone, I'm working with User Input Templates right now. I'd like to select a rollable table from a dropdown list within one, and display the description of the table at the bottom of it.
I got it to work right now by hardcoding strings in the dropdown list (for selecting the table to roll on), but the description is currently displayed only on the roll message since there is no way afaik to access the selected value before the whole User Input Template is submitted. Or is there?

abstract siren
oblique granite
#

Hey!

I'm trying to duplicate an item through a Label Alt Roll Script on an Item Container component, to basically be able to create a way to "Split 1".
Edge cases uninteresting and aside, I can't seem to be able to duplicate the item, modify its quantity parameter to 1, and append it to the actor.items collection. I always end up with a JavaScript error in my web console and I'm unsure how to proceed.
I for a time thought it was impossible, but Marting seemed to have said it was in this message last year: #1037072885044477962 message so I'm still hopeful.

Would love any help ❤️

formal goblet
cosmic karma
#

question: do number fields work with formulas too to display results? I have 3 number fields that should affect a 4th one but no success. Using the formula: ${dex_base + dex_type + dex_loot}$ worked if the field in question is a label...

formal goblet
cosmic karma
#

I believe that someone tried to explain to me that there is a way to avoid having things like this on the template, but I couldn't remember how to do it. Its is possible, right?

#

its ok on the character sheet

latent sorrel
cosmic karma
cosmic karma
#

thanks. I did like you said but it was not working. Some cache thing. After a world restart is ok now. Also I'm now using a hidden attribute instead of the formula, way better

#

oh: template didnt worked form too. had to use :not(.custom-system-editable-panel *)

silver lake
#

Dumb question;
Why does this not roll in chat or with Dice So Nice? It works btw.

${!setPropertyInEntity('self', sameRowRef('CSpheres'), "sameRow('CSpheres') + [1d2-1]")}$

I tried rewriting coming from a ${key:= [1d2-1]}$ and referring the key instead of the formula, but nothing.

#

I just want the feedback in chat, and preferrably the coin flipping.

waxen blade
#

Is self a reference to the current component when writing Lable roll messages?

waxen blade
#

Is there a way to get the name or value of the component that was clicked on for a label message roll script to use? IE I click on an attribute on a character sheet. Is there a way to know which attribute was click on in the label roll message script %{this.name}%

fathom cave
#

this in the class will hide it, or for text-overflow, you can clip or 'hidden'

#

Is there a way to hide the name column in an item container?

silver lake
silver lake
silver lake
formal goblet
silver lake
#

Yeah yeah.

silver lake
silver lake
#

Lemme open it all again. But I don't think so.
Just as a reminder, this all works, it just doesn't throw anything in chat, or roll with DSN

formal goblet
silver lake
#

I must've been so tired when I did this

#

I forgot to check the console

#

Sorry to disturb. I fixed it

#

It was obvious

dusky mauve
#

Hi, how long next version plan to be on beta?

woven dragon
#

I'm having a problem, whenever I or one of the players updates something on a sheet the foundry freezes for everyone who is connected. Any idea what could be causing this?

formal goblet
earnest imp
#

what's show item status for btw?

#

item container

misty terrace
#

Is there a way that I can reference the properties of a control from within a Label Roll Message? For example, I'm trying to write some Roll Message code that I want to re-use across several skills. So I'd like the message to read like "PLAYER rolls a SKILL check" where the SKILL is the contents of the Label Text field in the same control (which is a Label).

#

I want to have the flexibility to just clone the code and not edit it with hard coding the skill name

formal goblet
misty terrace
#

Also, anyone do any work with a dice pool system (like Blades in the Dark) where you need to evaluate the results of the individual die in a roll?

misty terrace
formal goblet
#

CSB doesn't really offer much for dice pools, so you'd have to rely on your own Scripts. BUT you can at least write a Script for that

oblique granite
oblique granite
#

Oh I'm so stupid. Very sorry for the ping !

oblique granite
#

Managed to do it! Had to go a bit inside the linkedEntity to find the props to edit, but it works super well. Thank you !

misty terrace
#

Anyone here have experience with implementing the Active Effects in CSB?

#

I'm trying to figure out how to have the Active Effects on Items activate when the item is both in Inventory and Equipped.

#

And if there is a way to use a Text field on the Item sheet to define the effect (as opposed to the UI button at the top of the Item sheet

misty terrace
#

Is there documentation on Hidden Attributes?

formal goblet
misty terrace
#

so, I have a skill called Detect that's currently in Number fieldon a Hidden Table on the character sheet (visible to GM only). For users, they see a Label with the text "Detect" and 4 icons to the right to represent the current Detect score. Depending on the value of the Detect field, the icons are either filled in or are empty (so a Detect score of "2" has 2 filled icons and 2 empty ones.

I want to enable the user to equip an item that might add a +1 to the Detect score when it is equipped. I'm unclear how to do that. the set PropertyInEntity for targetting 'self' and the Detect number field (on the Hidden sheet) doesn't seem to work. Trying to use a Label or a Hidden Field instead, also doesn't work with the setPropertyInEntity.

Any idea how I can get this to work or what I'm doing wrong?

earnest imp
#

To be clear, the act of equipping the item itself, will add a +1 Detect?

#

@misty terrace Would something like this works?

#

player_detect refers to the name of component on your player sheet

#

This is using Item Modifiers rather than Hidden Attribute

misty terrace
#

If the Detect is stored in a Number field, will that work?

#

doesn't seem to work

earnest imp
#

It doesn't, you need to separate your Detect data: to number field and the final value field

#

CSB cannot actively change the contents of a number field via modifiers, so instead, you might want to do something like this:

#

Have the modifier change the final value field (rightmost) instead

#

And leave the number field for either you or players to fill any values you want

misty terrace
#

Ahh, that's a great workaround idea!

#

thanks!!

formal goblet
misty terrace
#

And what do you use to set the original value of the rightmost value field? ${fight}$ ?

formal goblet
#

sameRow('whateverTheColumnKeyIs')

misty terrace
#

(never used sameRow() here before)

formal goblet
#

You need that when you're in Dynamic Tables

misty terrace
#

not in dynamic table

formal goblet
#

Then not

misty terrace
formal goblet
#

Yeah, then you only need the Component Key

misty terrace
#

top is the template, bottom is what I want it to do

misty terrace
#

Works! Thanks @earnest imp & @formal goblet

calm dock
#

hey i am about to ask a dumb question i had tpo hard reset my pc and reinstall foundry amd trying to get the gasme system creatir backonline i luckjy save my sheet template but i cant rember were the dependance for it are located ?

#

nm found the [art i was missing

silver lake
#

Hello!
So, I was looking at the github to figure out Item Containers, but I didn't.
Item container is empty and only shows the table's name. It doesn't allow me to add items or anything. It doesn't have a + button.

formal goblet
silver lake
#

OH

silver lake
peak jacinth
#

Uhh, does anyone have a guide on how equipment works in Custom System Builder? I already have an Item Container, but I'd like to be able to make custom equipment slots that players can put weapons and stuff in, and I'm totally stumped about how to do that.

#

Like, equipment slots in an RPG.
Weapon: (insert weapon here), (damage value), (durability)
Headgear: (insert helmet here), (durability)
Body: (insert armor here), (durability)
Legs: (insert armor here), (durability)
Feet: (insert armor here), (durability)

#

I figured out how to make an item container that only allows certain templates inside, but then that displays every actor of that template in that box, rather than what's actually equipped...

formal goblet
peak jacinth
#

Oh, I see. So it just filters out what to display? If I wanted to let players pick what they have equipped, and then display only those in a specific item container, how would I accomplish that?

#

Would that even be possible, or is it way too complicated to make equipment slots?

formal goblet
peak jacinth
#

But then, wouldn't players be able to equip as many of the same kind of thing as they want? I.e., five different swords all at once-

formal goblet
#

Well, yeah

peak jacinth
#

I guess that could be something I'd just have to make sure the players don't do

formal goblet
#

If you want to limit that, you would need a WorldScript for that

peak jacinth
#

Oh dear, that sounds way out of my league. I think I'll just stick with that solution then.

formal goblet
#

And hook into the precreate event

peak jacinth
#

So the field key would be what, ${item.equippedCheckbox}$ to check the field with the key 'equippedCheckbox'?

formal goblet
peak jacinth
peak jacinth
#

I'm using a collection module to transfer actors from one world to another, but when I do, the item templates all get reset. I.e., everything will be set to the 'Equipment' template, including items that should be under the 'Weapon' template, or 'Armor'. All of the data is preserved, though. Is there some way to fix this, or does it just not matter?

turbid sphinx
#

Is it possible to change the value of a dropdown list to an other existing key ?
Something like this: ${setPropertyInEntity('self', 'list', "3")}$

#

For example from current value (0) to 3

uneven quail
#

Sorry to add to the chorus of help questions but:

Before I work on a scripting way to do it, I figured I'd ask of CSB has it built in. Is there any way to apply or remove a status effect whenever a specific item is added or removed from a character sheet?

misty terrace
#

Oooh, actually, not sure if that will apply statuses

uneven quail
#

Yeah, I'm wondering if there's a way for Item Modifiers to include, like, "Stunned" or something.

misty terrace
#

Hmmm. You could probably kludge it. Off the top of my head, if you make a table on the character template and hide it from non GM players, add a Number field called "Stunned" and set it to default 0, then use the item modified to set it to 1

#

and then use the condition triggers to fire when Stunned = 1 on the PC

#

that MIGHT work

#

Related to Item Modifiers, is there a way that I can pull the Item Modifiers from equipped items? For example, if I have a sword that gives +1 str when equipped, I want to be able to show the player where that +1 str is coming from.

earnest imp
#

I'm actually veeery interested in that as well, ways to apply status when an item is added

#

👀

formal goblet
formal goblet
formal goblet
earnest imp
#

@formal goblet to clarify, foundry vtt has this thing named Item-Level Active Effects

#

does that refer to item modifiers?

formal goblet
#

No, that one is CSB-specific and has nothing to do with Foundrys Active Effects

earnest imp
#

hmmmmmmmmmmmm ill go look into it then

formal goblet
#

Well, I'm curios if it is enough to add an Active Effect as an Embedded Document to the Item

earnest imp
#

it's a system-to-system thing unfortunately

#

not inbuilt

formal goblet
#

I see, so we'd need to implement it

earnest imp
#

@formal goblet Less related question, how do you get a list of items from an actor programmatically?

formal goblet
uneven quail
#

Yeah, my end goal was to have custom status effects that mark the token and that was one way I was thinking of doing it. I know I could just create them as items, with item modifiers, but then they'd only be visible if you open the character sheet, which is not great.

earnest imp
#

if youre doing worldscript for it

#
Hooks.on('combatRound', async (combat, update, options) => {
    if (options.direction !== 1) return; // Kill hook function if combat round doesn't increment forward.

    // Initialize Variables.
    let tokens_in_combat = canvas.tokens.placeables.filter(token => token.inCombat);
    let equipment_templates = game.items.filter(item =>
        item.type == "_equippableItemTemplate" && 
        item.name.startsWith("Equipment")
    );
    let equipment_template_ids = [];

    equipment_templates.forEach(equipment_template => {
        equipment_template_ids.push(equipment_template.id);
    })
    
    // Go down each token in combat.
    for (let token of tokens_in_combat) {
        let token_equipments = token.actor.items.filter(
            item => equipment_template_ids.includes(item.system.template)
        );

        for (let token_equipment of token_equipments) {
            let token_name = token.name;

            /* ----- INSERT YOUR CODE TO ADD STATUS PROGRAMMATICALLY BELOW ----- */
        }
    }
});```
#

this has been my past focus the past few hours

#

although the application is kinda different in that i add status on combat round change

#

you can maybe tweak the hook type to be something when an actor gets added an item

uneven quail
#

Ohh, thank you, that was actually my next step was to poke around with that exact thing lol! That, or see if I could create a startup script that changes the names/icons of the token statuses so I didn't even have to mess with them as items.

earnest imp
#

Yup, my use case is a bit different though

#

i wanted to check every round, to all tokens that are active in fights

#

if they have equipments that add status to them

#

and if they do, add a status to the token, as pre-assigned to the item property