#Custom System Builder

1 messages ยท Page 32 of 1

coral hemlock
#

There is a module on Foundry (but I am unsure if available for Forge) called Custom CSS. you could add this, then activate it on CSB, then just copy your css onto this rather than uploading a CSS file

sweet fjord
#

anyone else have an issue with blank sheets after migrating from 3.0.0 to 3.2.5 ?

#

CSB doesn't appear to be loading but it says it's selected as game.

formal goblet
dusk arch
#

I'm getting: Cannot Convert "Target Armour Damage" to a number.
This worked before i updated to 3.2.5

stone swan
#

Can we use js and/or && and || in Item Container filters?

formal goblet
formal goblet
stone swan
#

I'm getting a weird trio of errors when I load into my world. I don't know what the last one is doing, but the first two refer to the formulas for setting the key and value for an Item Modifier. What's weird is that the item modifier seems to be working fine and I don't know why it would be trying to convers 'Stars' into a number in the first place.

formal goblet
dusk arch
stone swan
formal goblet
stone swan
#

Huh. Weird.

formal goblet
#

Well, I don't like it either, but replacing it is... so much work...

stone swan
formal goblet
stone swan
#

I think I'll pass. ๐Ÿ˜“

alpine tiger
#

Does PDF Pager not work with CSB anymore?

formal goblet
alpine tiger
#

I have been using it until recently. Now nothing pops up.

#

Is there an alternative to use form-fillable PDFs for character sheets?

formal goblet
#

Not that I know.

alpine tiger
#

I think the latest update broke it.

#

Is there a way to roll it back?

formal goblet
#

You can go to the package page of Foundry and get the manifest for a specific version. Once you got that, you can insert the link into your package manager

sweet fjord
stone swan
#

Ok. I've got another weird one. I'm currently trying to populate the autocomplete of a field on an item, based off of the names of items from a specific item container on the attached character sheet. I'm using ${fetchFromActor('attached',lookup('Tracks','name'))}$ for the formula, but it's producing an error in both the autocomplete popup and the console.

The part that's really confusing me is why it's saying formula.replaceAll isn't a function, since it's not part of the formula.

stone swan
#

I think the sizing and panel layout functions are going to drive me insane. I have two components in a horizontal panel and I want to get them in line with each other. I had them in line with each other and then I did some things that should have made one of them smaller, but for some reason it got larger and they went to two lines. So, then I undid those changes, but they're still on two lines. ๐Ÿซ 
I have no idea how spacing is supposed to work, but it causes me pain.

light horizon
alpine tiger
alpine tiger
light horizon
#

Are you hosted locally, or maybe on a server with a prefix directory to your normal foundry installation?

fresh arrow
#

Hello group. Looking for help with two questions...

  1. IS there way to modify attributes of the item which is configured by "configure hidden attributes" ?
    I add hidden attribute "equiped" with "owned" as default and can pull that out on container level via simple "${item.equiped}$", but usage of "Label roll message" ${setPropertyInEntity('item','equiped','carried')}$ doesnt change that value. ๐Ÿ˜ฆ
  2. how can I change "class" of the item (ie. Label) or "Label icon" via formula on "Label roll message" level?
light horizon
cobalt mango
#

Hello ๐Ÿ˜“
I'm trying to add a function directly into the .js files for the system but I still get "MyFunction" undefined

#

I don't know much about Javascript btw

fresh arrow
#

Thats great, will explain a lot of the questions. Thank you @formal goblet
It should be already pined to the thread

alpine tiger
bold pewter
#

Hello all, been lurking for a bit. I love the fact that I can implement things so rapidly with this system. However, I'm having an issue. basically I have a dynamic table that has a column that tracks XP for multiple classes- it is set up as a label so I can use the label roll message to prompt for a user input to add or subtract XP from that particular cell. I have yet been able to actually get it to change the value in the label. This is my latest attempt:

${setPropertyInEntity('self',sameRow('colXP'), number(ref(sameRowRef('colXP')))+XPGain))}$```
formal goblet
bold pewter
#

Is there a way to execute code when the user clicks on an Input Component?

formal goblet
formal goblet
bold pewter
#

Gotcha

light horizon
fresh arrow
#

Hello @formal goblet, short question.
I see in your example that you use checkbox as item parameter to set if item is equiped or unequiped and them from item container level you change it. And even if item will be opened it will not change what was set already.
In my example I use dropdown list (due to 3 levels: owned, carried, equiped). It works well as long as I will not open the item, then status is changed back to default, which lead to change status as soon as item window will be closed.
Any idea why and how to resolve that one?

Exactly explained by Martin. That was due to incorrectly set parameter via "setPropoeryInEntity" as for dropdown it has to be " ' <key> ' "... that it will works well

light horizon
wet heron
#

i need some help with some logic

I have a textfield named "Weapons_1"
I also have several textfields named "Other_Skill_X" where X is a range between 1 and 12.
Now, i want to match the text in "Weapons_1" to the "Other_Skill_X" text (example "Revolver 89") and then find the corresponding Lable "Other_Skill_X_mod" ( it is located two collums to the right. within a table) to get the mod number. this will in the end add up the shooting roll.

any suggestions?

#

the idea is that the player can add his weapon specializion in any of the 12 fields, and it should autofind the number based on the name

cobalt mango
#

Attribute formula for each of the other skill mod that checks for the value of Weapon-1

#

@wet heron

alpine tiger
light horizon
#

Brilliant!

cobalt mango
#

But the actually best solution is to make 12 items called something like weapon specialization, and each of them have the attribute modifier that you want

#

So you would make labels keyed other skill mod 1-12

#

And set their visibility to them being != 0

#

Could someone explain to me how does CSM load Math.js?
Modifying the file itself isn't changing anything in runtime

formal goblet
wet heron
#

ill tinker with it and come back if i get stuck again

cobalt mango
#

The calculation for whatever number if attributes, be them weapon mods 1-12 or rituals 1-109 of both at the same time would include a +1 / whatever that's conditional on the key for your entry field being equal to whatever corresponds to for them

#

So for example the formula for weapon_1_total is:
Buff_field== ' weapon one' ? (weapon_1 + 0) : (weapon_1 + 25)

#

@wet heron

#

Sprinkle in ${}$ as needed to make the formula read correctly

wet heron
formal goblet
wet heron
#

im thinkingabout making a Dynamic table of it and using same row

formal goblet
#

If you give the table a key, you can access it with actor.templateSystem.componentMap.tableKey. Then you can check in the console what the content is

formal goblet
wet heron
cobalt mango
fresh arrow
formal goblet
cobalt mango
#

It's probably me now knowing how to get around in JS. I'll try to move around my function to see if I find someplace where it works

#

thank you ๐Ÿ˜„

cobalt mango
#

Yep that was it. Thank you again ๐Ÿ˜„

high stag
#

Is anyone facing some stutters when opening the sheets? I don't know which module is giving me this problem. So i'm asking.

#

specifically when opening the sheet on the canvas(double-click)

bold pewter
#

@formal goblet I can't thank you enough for making this system/module. I had dove into foundry a while back and hit a brick wall simply because of the fact that I have never done anything with CSS or JS. I did a lot years ago with LUA in Fantasy Grounds, I had more time back then- I don't now. This is the perfect thing for me to get something up and going for my group that isn't already present (in any workable fashion) on Foundry. You are the best!

bold pewter
sweet fjord
#

dragging an item from sheet to sheet just clones it, is there a way to stop that? I've implemented my own "give" plugin for CSB instead so I don't want the cloning

formal goblet
sweet fjord
#

Cool so maybe I hook into that with a confirm and then use my custom give function, else return false

#

Err no, return false either way..

iron badger
#

can you put an item inside an item?

formal goblet
pliant leaf
#

i haven't been on in a bit and was wondering if anybody could point me in the right direction. When i was using CSB 3.0 5 months ago my Item Piles + CSB was working flawlessly, but now i updated to 3.25 or whatever and now item piles can't seem to read item quantities or gold values. I saw there was some syntax changes with the update but im not entirely sure what to change for the references here. Any suggestions would be helpful.

bold pewter
#

I have noticed that the hidden attributes don't reliably update to a change of data on the sheet, whereas if I do the formula on the sheet it is spot on with the changes. Is there something I should be doing to force the hidden atributes to recalc?

#

I've tried using recalculate() when I reference the hidden attribute key, but it doesn't seem to matter.

#

The only thing that seems to force it is to reload the template, which works.

cobalt mango
#

Can you give an example? I'm kinda abusing the hidden attributes but haven't noticed any problem

brave trench
#

am I using round() the wrong way or does it not do what I think it does? In the following formula I'm getting like 10 decimal places instead of 1, which is what I want.

${round(sum((goldAmount*.02),(silverAmount*.02),(copperAmount*.02),sum(fetchFromDynamicTable('geardyna1','totalWeight')), sum(fetchFromDynamicTable('geardyna3','totalWeight'))),1)}$

brave trench
pliant leaf
#

thanks, i was trying to figure it out but nothing was working lol

#

ill just revert until an update

brave trench
#

I know.. half my life with these sheets is "Is it me or is it them?" lol

heavy elm
#

Hello, Im struggeling with the lookup-function. I want it to check for a checkbox called 'active'. I'm pretty shure I'm doing something very wrong here:

${sum(lookup('Armor', 'Armor_Protection_Standard', 'Body_Region', 'Kopf', [active : 1]))}$

formal goblet
heavy elm
formal goblet
#

Or in other words: SELECT Armor_Protection_Standard FROM Armor WHERE active === true

heavy elm
#

Damn sometimes I feel stupid ๐Ÿ˜… thanks

heavy elm
formal goblet
finite rapids
#

Good evening all. I'm currently using the CSB to build a character sheet; in this game, the standard roll is a pool of dice that is added to if a PC has a relevant trait or quality. Is there a way that I can use a formula to prompt the player to input the correct number of dice? Let's say I wanted to roll 2, 3, or 4 dice and keep the highest.

Thank you for the hard work on this lovely system, and for all the advice I've gotten while lurking.

wet heron
#

In the dynamic table, I want the number from the third field.
My table look like
Other_skills
Other_skills_name | Other_skills_points | Other_skills_mod

I need help with extracting the value of Other_skills_mod but I need some help
I have matching information in 'Other_skills_name' and 'name_weapon1'

So far I've tried this:
Lookup('Other_skills', 'Other_skills_mod', 'other_skills_name', 'name_weapon1')

wet heron
#

Oh

#

Hehe that was ny phone autocorrect, I have lowercase

#

I have tried to hardest now, but still get error

${Lookup('Other_skills', 'Other_skills_mod', 'other_skills_name', CAR 98)}$

formal goblet
wet heron
#

Still error

formal goblet
#

Which error?

wet heron
#

Don't know, it does only say error, how do I see it il the console?

formal goblet
wet heron
#

Yeah, I get the formula in read, but no explanation

formal goblet
wet heron
formal goblet
#

Wait, which CSB-Version are you using?

wet heron
#

CSB v 3.0.0 build 30
Foundry v 11 strable

formal goblet
#

That's the issue, lookup() came with 3.1.0. You should use fetchFromDynamicTable() instead

wet heron
#

ah i see, is 3.1 compatable will Foundry v11?

#

ie, should i update

formal goblet
#

Even the latest is compatible with V11

wet heron
#

(Y) then ill update

formal goblet
#

We still haven't switched to V12

wet heron
#

perfekt! Neither has the serverowner

cobalt mango
wet heron
formal goblet
wet heron
#

Custom System Builder | Uncomputable token lookup("Other_Skills", "Other_skills_mod", "Other_skills_name", "CAR 98", "===") Error: Uncomputable token lookup("Other_Skills", "Other_skills_mod", "Other_skills_name", "CAR 98", "===")

wet heron
#

Still cant get it to work
token lookup("Other_Skills", "Other_skills_mod", "Other_skills_name", "CAR 98", "===") Error: Uncomputable token lookup("Other_Skills", "Other_skills_mod", "Other_skills_name", "CAR 98", "===")
at lookup (Formula.js:464:31)
at math.js:26531:54
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:657:27)
at Formula.compute (Formula.js:363:21)
at processFormulas (ComputablePhrase.js:106:35)
at async ComputablePhrase.compute (ComputablePhrase.js:160:34)
at async ComputablePhrase.computeMessage (ComputablePhrase.js:285:9)
at async Label._getElement (Label.js:97:35)
at async Label.render (Component.js:143:25)
at async Panel.renderContents (Container.js:50:25)
at async Panel._getElement (Panel.js:76:33)
at async Panel.render (Component.js:143:25)
at async Panel.renderContents (Container.js:50:25)
at async Panel._getElement (Panel.js:76:33)
at async Panel.render (Component.js:143:25)
at async Tab.renderContents (Container.js:50:25)
at async Tab._getElement (Tab.js:43:33)
at async Tab.render (Component.js:143:25)
at async TabbedPanel._getElement (TabbedPanel.js:56:36)
at async TabbedPanel.render (Component.js:143:25)
at async Panel.renderContents (Container.js:50:25)
at async Panel._getElement (Panel.js:76:33)
at async Panel.render (Component.js:143:25)
at async TemplateSystem.getSheetData (templateSystem.js:333:43)
at async CharacterSheet.getData (actor-sheet.js:49:19)
at async CharacterSheet._render (foundry.js:5812:18)
at async CharacterSheet._render (foundry.js:6532:5)

formal goblet
wet heron
#

oh

#

im a dumb dumb

#

Thankyo so much, been pulling my hair

wet heron
formal goblet
wet heron
# formal goblet What's the formula of the mod?

well the formula is

${Other_skill_points <= 0 ? Other_skill_points -5 : 
(Other_skill_points > 0 and Other_skill_points < 6) ? Other_skill_points : 
(Other_skill_points > 5 and Other_skill_points < 9) ? 6 :
(Other_skill_points > 8 and Other_skill_points <11) ? 7:
(Other_skill_points > 10 and Other_skill_points <13) ? 8:
(Other_skill_points > 12 and Other_skill_points <15) ? 9:
(Other_skill_points > 14 and Other_skill_points <18) ? 10:
(Other_skill_points > 17 and Other_skill_points <21) ? 11:
(Other_skill_points > 20 and Other_skill_points <24) ? 12:
(Other_skill_points > 23 and Other_skill_points <27) ? 13:
(Other_skill_points > 26 and Other_skill_points <30) ? 14:
(Other_skill_points > 29 and Other_skill_points <40) ? 16:
(Other_skill_points > 39 and Other_skill_points <50) ? 17:
(Other_skill_points > 49 and Other_skill_points <60) ? 18:
(Other_skill_points > 59 and Other_skill_points <80) ? 19: : 20}$

but its broken at the moment and default to -5

#

omg

#

if i replace that it works

#

i tried replace it with just 5, aand then it works

formal goblet
#

You have to use sameRow() to reference column-data in the same row

wet heron
#

that was my next mission ๐Ÿ™‚ guess i started in the wrong end

#

Thanks for all the help!

formal goblet
#

And half of your checks are unnecessary

#

X <= 0 ? A : X < 6 ? B : C covers the same values as X <= 0 ? A : (X > 0 and X < 6) ? B : C

#

Because the case with X > 0 is indirectly covered by the previous check

wet heron
#

well that would fix that ๐Ÿ˜› Thanks

static cargo
#

In CSB 3.2.5, has the component Rich Text been dropped?.. can't seem to find it.

static cargo
#

Then somethings gone bizzare on me...

formal goblet
#

Dynamic Table and Item Container is also missing

#

Check the console for errors

finite rapids
static cargo
static cargo
#

Damn, spoke too soon. it's gone again.
The issues tab speaks of "Duplicate form field id"s x6 when I started making a new template.

@formal goblet I'll see if the issue can be recreated in Chrome instead of Opera GX...

wet heron
#

how can i get a correct role with this button?
the lookup is not always true, so i want it to revert to Rifles_mod_1 +0

${[1d20x20] + Rifles_mod_1 + lookup('Other_Skills', 'Other_skills_mod', 'Other_skills_name', name_weapon1)}$

formal goblet
formal goblet
static cargo
wet heron
static cargo
#

Hang on... are some components not available for item templates? ..."Actor only"?

heavy elm
rotund mason
#

I have this options in an item template

static cargo
rotund mason
#

try making a label and editing that, it ignores some of the checks, maybe it can help in this case

heavy elm
#

I see, I checked its 'Active' but it doesnt display the value anyways.

static cargo
heavy elm
#

Yep, in the Key

#

Its a checkbox with the Keycomponent 'Active'

static cargo
#

I ask because I noticed this from the chat...

formal goblet
#

Or Dynamic Tables in Dynamic Tables, but that's more or less it

static cargo
formal goblet
#

RTAs shouldn't be excluded anywhere

static cargo
#

I was afraid you'd say that... Am I down to the point of uninstalling and re-installing the system from Foundry?

formal goblet
static cargo
#

Trying it... stand by.

heavy elm
static cargo
#

had 41 modules, now have none. World restarted, no joy. All components appear present in an Actor Template but Items... ๐Ÿ˜ฅ

formal goblet
static cargo
#

Yes, 'user input template' is the right thing to make templates from, yeah?

#

I'm sure there's some rationale for No RTA's on items, but if this is deliberate then I'll work around it. Thanks @formal goblet.

#

In lieu of an RTA, I don't suppose there's a <textarea> available, eh? ... no? yeah, I don't recall seeing that anywhere. ๐Ÿ™‚

formal goblet
#

You need to use the equippableItemTemplate for real Item Templates

static cargo
#

GAH!! Friggin' mental disability... Sorry to be a bother Martin.
... so when you say that's for dialogs, can I call a user input template from a macro for variables?

rotund mason
#

You really need to make those links work the first time somehow

formal goblet
rotund mason
#

yep, I know is a problem with the images, but is annoying clicking a link and having to use search afterwards

brittle moth
#

Go complain to your browser's developers all you want, but being rude here where we aren't responsible won't solve the problem

rotund mason
#

Sorry it that seems rude. Just saying it's a problem, no idea how to help with that.

faint wharf
#

Hi someting i hope should be simple but unluckly not for me. how i can add update to field in roll formula, so i cann ad field xdx=xdx+roll

heavy elm
# static cargo I ask because I noticed this from the chat...

Checked it three times and it doesnt show me a value. I tried it also the other way around:

${Active ? (lookup ('Armor', 'Armor_Protection_Standard', 'Body_Region', 'Kopf')) : 0}$

Also doenst show up. Seems like it doesnt read the checkbox from the Item correctly. When I remove all references to the checkbox it shows me the values.

bold pewter
# cobalt mango Can you give an example? I'm kinda abusing the hidden attributes but haven't not...

This is a Swords & Wizardry sheet I'm working on. I'm hiding the thief skills unless the character has the relevant class/level. The assassin has to be level 3 before they will display. As you can see in the first screen shot(where I just set the assassin level to 3), they are displayed but with no values whereas if I reload the template the values are shown. Here is an example of the formula in tsClimbWalls (a hidden attribute):
${first(lookup('tblThiefSkillProgression','colClimbWalls','colLevel',string(numTSkillLvl)))}$

stone swan
# brittle moth Go complain to your browser's developers all you want, but being rude here where...

I know it's not a high priority, but I'm a bit curious about this. If I recall correctly, when I asked before, you said the issue was caused by images loading and changing the position of the page. If that's the case, could you add a placeholder element or placeholder image so the screen doesn't need to move as the images load? (This is meant as a legitimate question. I don't know if those kinds of solutions come with to many other downsides or would take too much effort.)

bold pewter
#

(I just ctl-f everything, just happy it's pretty well documented)

brittle moth
stone swan
#

For what it's worth, I agree with BrennKneecleaver's sentiment. This link thing can be annoying, but ctrl+f works well enough and the fact that things are actually well documented is FAR more important than the links being friendly, so I wouldn't lose too much sleep over it if it's not a simple fix.

wet heron
#

Sorry to bother again, is there a way to import a dynamic table with the info in it?
I have a secondary page where i want the info to be

Do i make a lookup with just the collunm reff?

brave sapphire
stone swan
# wet heron Sorry to bother again, is there a way to import a dynamic table with the info i...

Clarification question: Are you saying you want to duplicate a dynamic table from one part of a character sheet to another part of a character sheet? Also, is the information on the table static (e.g. every character is going to have a copy of the table and every copy is going to look the same) or unique to the character?
Oh, also, are you saying you want to duplicate part of a table or the entire thing?

faint wharf
#

Hi guys anyone gor exampple to make in roll fieldX=Fieldx + roll?

stone swan
faint wharf
wet heron
stone swan
# wet heron refference pic and i want it to show the info but in similar

Still a bit confused, but it looks like you have two dynamic tables: One where the details of a skill can be set (primarily the name and the value) and a second that displays the skill's name and value and the name can be clicked to do something. And I take it both of these are on the same sheet (or should be on the same sheet, once you get things figured out)?

wet heron
#

they are on the same sheet, just on different tabs, (Roll tab and Level up tab) the one with red lable buttons have a D20+skill.
the number field is calculated and set, and then that number is imported to the roll tab.

stone swan
#

Ok. Would you be opposed to handling the skills as items? That way you could just have item containers that reference the appropriate skills?

#

In a similar vein, is there a reason you need the same table on two different tabs, rather than just including a roll column in the version on the level up tab (or fields for leveling the skill in the version with the roll button)?

#

Alternatively, depending on how the rest of your sheet is structured, you could also have the skills table outside of the tabs, so it would be visible regardless of which tab you're looking at.

wet heron
#

i did it for cosmetic look, as i thought with both point-setting, roll button and roll modifyer did not look good, i think this looks cleaner

#

i use the dynamic tables for the Other skills, to be able to auto detect Weapon name and add specialisation

stone swan
#

~~Also, I take it there's more to the modifier column then just "-5 if unset (or zero), otherwise the set value"?~~Actually, that's not really important.

#

What do you think about this solution: Make the modifier label the rollable button (assuming the Other Skills name column needs to stay a text field), then add a visibility formula to the point setting field and a corresponding checkbox, called leveling, somewhere else on the sheet. That way, during play you'll only see the name and modifier columns, and can click the latter to get a roll, but you can make the point setting field appear when it's needed?

wet heron
#

you know what, the "other skills" dont need to be dynamic really.. it can be static, and that would fix the import, and "weapon speciality does not have to show in the roll table

#

thanks!

stone swan
#

I suspect I already know the answer to this, because it's similar to a question I've asked before, but is there a way to take an array or csv of names of selected tokens and display those names, along side some information and selections, in a input prompt template?

I know how to get the names and I can probably figure out how to get the other information. The part I'm struggling with is figuring out how to display them, since I can't know how many targets will be selected in advance.

formal goblet
stone swan
#

I figured that would be the case. Unfortunately, I don't think a label would allow me to properly split up the entries or make individual selections for them.

heavy elm
#

I got a step further. Seems like the function lookup doesnt like richt text formatting. So this works:
${lookup('Armor','Armor_Protection_Standard','Active', 'โœ”')}$

But I want only the numeric values from Armor_Standart_Protection which have the value** 'Kopf'** in the column **'Body_Region' **and have the value 'โœ”' in the column **'Activ' **. I tried with filtervalues but I cant get it right. How can I get it to work?

#

Should it be:
${lookup('Armor','Armor_Protection_Standard','Active', 'โœ”' , 'Body_Region', 'Kopf')}$ ?

dire socket
#

item.WeaponType.includes(lookup('WeaponStack', 'WeaType', 'NameT', WeaponPick))| item.WeaponType.includes("Any")

#

How is this happening? It seemed to work earlier, but when I moved things around this started happen

#

Oh and is there a way to hide the name of an item in an item container

heavy elm
wet heron
#

I'm trying to change the number with -1 in my number field with a button, the line is ${setPropertyInEntity ('self', "mag_current_1 -1"}$ but nothing is happening, help?

brave trench
brave trench
#

setPropertyInEntity ('self', "mag_current_1 ", -1)

wet heron
wet heron
#

oh look, its me again!

now im trying to create script to detect the mag-size, how can i incorperate this If-clause?

${[1d20x20] + Rifles_mod_1 + first(lookup('Other_Skills', 'Other_skills_mod', 'Other_skills_name', name_weapon1),0) setPropertyInEntity('self', 'mag_current_1', "mag_current_1 -1")}$

and this

if (mag_current_1 > 0) {
    console.log("Out of ammo");
} else {
    setPropertyInEntity('self', 'mag_current_1', mag_current_1 - 1);
}
wet heron
#

my first idea was

${
    if (mag_current_1 > 0) {
    console.log("Out of ammo");
    } else 
    {
    [1d20x20] + Rifles_mod_1 + first(lookup('Other_Skills', 'Other_skills_mod', 'Other_skills_name', name_weapon1),0) 
setPropertyInEntity('self', 'mag_current_1', "mag_current_1 -1")
}}$

But that is wrong

wet heron
formal goblet
wet heron
#

everything after [ works

formal goblet
# wet heron like this? ``` ${'mag_current_1' > 1 ? 'No ammo, Reload! : [1d20x20] + Rifles_mo...

I see multiple issues in that:

  • You check a string against a number with a >-operator. That won't work. You probably meant the variable mag_current_1, so remove the quotes
  • The expression after ? contains a syntax-error. You have an opening quote without ever closing it. So add ' after Reload!
  • [1d20x20] will resolve before the condition gets evaluated, so keep that in mind. It's not an error, just an inconvenience
  • You cannot write functions next to each other like lookup() setPropertyInEntity(). You either have to nest them or combine them with an operator. CSB-Formulas should be one-liners
formal goblet
#

What I'd suggest is having setPropertyInEntity() in a separate line. You can also handle this one conditionally or you just cap the result to 0

half beacon
#

I can't drag and drop anything into a tabbed panel. Is this intentional?

heavy elm
#

I tried to ${sum(...)}$ the whole thing, it didnt like it ๐Ÿ˜…

formal goblet
formal goblet
half beacon
heavy elm
formal goblet
empty glen
#

Anyone know the CSS tags to use if I want to customize the look of when a label is rollable?

heavy elm
heavy elm
#

awesome! Thanks alot, I would be complete lost with that without you ๐Ÿ˜„

cobalt mango
#

I dunno exactly what you're doing but it sounds like you need a function that does a cycle and returns your label script so that it can be dynamically formatted around the number of tokens

#

Martin told me how to do it a few days ago so you can look up my past messages

faint wharf
#

someone came up with idea for luck/reroll? something like button to comit button to reroll

wet heron
static cargo
#

What's the best method of adjusting an actor's properties by macro again please?

formal goblet
stone swan
# cobalt mango Are you able to use the selected tokens info as a parameter?

My idea was to have a prompt template that could take the array of targeted tokens, put and let the player choose how to treat each one (e.g. split them between allied and enemy groups, or apply bonus damage to some of them). The issue here is that I can't know how many targets they'll have in advance, so I can't do something like prepare a dynamic table with a line for each target. I could have a label (or several other types of elements) display the full list of targets, but that doesn't help with the interaction side of things.

wet heron
formal goblet
wet heron
#

all i have this far is still

${mag_current_1 > 1 ? 'No ammo, Reload!' : ([1d20x20] + Rifles_mod_1 + first(lookup('Other_Skills', 'Other_skills_mod', 'Other_skills_name', name_weapon1), 0))}$

${mag_current_1 > 1 ? 'Pang!' : setPropertyInEntity('self', 'mag_current_1', mag_current_1 - 1)}$
#

i cant seem to wrap my head around it

formal goblet
stone swan
#

I may be misremembering something, but I thought all parts of a CSB ternary function get executed, every time, and it's just that one half doesn't get returned, so won't the setPropertyInEntity() always trigger?

formal goblet
stone swan
bold pewter
#

Can I not use replaceAll in a rollMessage? I get a text.relpaceAll is not a function in the console.
${str1:=replaceAll(string(lookup('invCarried','colAmmoDialog','colAmmoType',item.rangeType)),',','|')}$
and

replaceAll(string(str1),',','|')}$```
both generate that error.  If I take the replaceAll out the initial string resolves as expected.
formal goblet
bold pewter
#

Ok, thanks! Off to work for me now ๐Ÿ˜ฆ

formal goblet
bold pewter
# formal goblet You should be... I'll check that later

It would appear that the initial string passed to replaceAll has to be either a static string or a key to a field (as is stated in the docs). I was just assuming I could use a declared variable with it in the roll message. rtfm moment. I just tried both within the roll message and they worked.

cobalt mango
stone swan
cobalt mango
#

Yes. Assume the situation is static, what's the formula you want to achieve?

#

I am assuming you have your array of targets already as you stated

stone swan
# cobalt mango The latter

If I knew would be dealing with n targets, I'd create a dynamic table with n lines. I could use the line number to set the name from the array, ten each line could have a check box for the different groups. Assuming I set it up for two groups, there's be a pair of final formulas that go throw the lines of the table and add the entry in the name column to an array if the appropriate box was checked. Probably something like ${ATargets:=lookup(TargetTable,'name','groupA','true')}$.

cobalt mango
#

I see. My method won't quite work for you then sorry ๐Ÿ˜…

#

Why aren't you just making a dynamic table with 20 lines and some of then will stay empty?

stone swan
north nebula
#

Just wanted to drop this here. A week or so ago I was wanting to pull values from seven stances and put them in a dynamic table that could then be pulled from for drop downs. It was a niche situation, I know, but I figured out a method for doing it that was fairly simple.

In my situation I have seven stances that each have their own name, form, and style. To get the stance name into the dynamic table, I first made a label called "stance_list" which I used ${concat(stancename1,',',stancename2,',',stancename3.... to make a csv string.

Then in the dynamic table, I made a column a label and used this formula:
%{return '${stance_list}$'.split(',').slice(${sameRowIndex()}$,${sameRowIndex()+1}$)}%

This will split the CSV into an array and pull the value that corresponds to the row index number

#

My situation is one where it is a static situation where there will not be more than 7 stances (unless more expansions to the game allows for that at which point... I will add them)

stone swan
turbid sorrel
#

Hello, appears the lookup function returns an array, and I can't set that to a variable. Anyway around this?

stone swan
turbid sorrel
#

${roll=:lookup('PrimaryEquip', 'itemdamage', 'itemequip', 'Yes')}$ gets an error in the console, saying it expected a string/bool/int

north nebula
# stone swan Wait, remind me, are the stances in your system the ones with fixed names and de...

In Panic at the Dojo, stances are built by the players based on certain rules. Stance Name technically should be fixed based on style and form selected, but most go for flavorful names so I have that as a text field where players can type what they want (with certain characters like commas and apostrophes being restricted).

The style is selected from a specific list depending on what archetype they chose (each archetyp has three styles). The form is selected from a set list of 12 or 13 (with a few more coming in a planned expansion).

Once they have selected a name, a style, and a form, the stance generally does not change.

#

At level one they have access to three stances, chosing each round which stance to go into (so only one stance active at a time). At level 10, they will have access to seven stances and can choose to have two active at once.

#

So my plan is, feed stance name, style,, and form into a dynamic table, and then for level 10, they will have a tab that has two drop downs that they can select stances by stance names. What they select will flow to style and form labels via lookup(), which will then feed all of the other relevant info

stone swan
stone swan
stone swan
# north nebula So my plan is, feed stance name, style,, and form into a dynamic table, and then...

I'm going to go with martin's solution on this. Why not just make the stances Items, and feed an item container (plus a blank space) into the two drop downs, then fill the appropriate info from the selected item, rather than a dynamic table. You can even stick to a single page of information. Before level 10, they can use one of the dropdowns to see info on their selected stance and leave the second blank (you could even hide it with the visibility field), so they don't have to deal with extra information. Then, once they hit level 10 they can just start using the second dropdown.

north nebula
#

My simple answer: I coded myself into this corner in my ignorance and I like it here. Honestly, this works well for what I need in my limited scope of programming. There is also some sunk cost falacy happening here where I have already invested a lot of time building the various tables I reference from and I believe that what I have built is quite user friendly while also enforcing the rules of the game. Once I am done with this, someone else in that community is more than welcome to take what I did and convert it to items or whatever.

stone swan
north nebula
#

I am coming mostly from a sql and excel vba background. I like tables and vlookup and xlookup. I think my table designs are not terrible.

stone swan
#

@formal goblet Sorry to bother you, but is there something going on with the 'Configure Active Effects' screen (when setting up a character template)? I could have sworn there was a blank row, for effects not connected to a defined status condition, but now I'm not seeing it. I think I also recall you mentioning something about that screen being bugged or under development, but I'm not sure.

For context, I want to make a couple of feature request that relate to that screen, and active effects in general, but I want to make sure the information I'm basing the request on is correct, first,

formal goblet
turbid sorrel
# formal goblet `:=` is the operator

Thanks for that, the lookup function itself after that := isn't returning any value to be stored. Does this have anything to do with the lookup function returning arrays

#

In the lookup function, on the 4th input you put a value to compare to something else. If you are comparing it to a boolean, what does the value need to be? I've tried 'true' and 1

#

I've also converted the label text to show Yes on true, which you can see I also tried

formal goblet
turbid sorrel
#

Should return 1d8 I think

formal goblet
#

You can use first() to convert it to '1d8'

turbid sorrel
#

Not getting it to return anything, even if I take the conditions off. I guess it's not finding the table, but not sure.

#

The roll label is on an item attached to the actor with the container

formal goblet
#

You might want to use fetchFromActor() to use props from an Actor

empty glen
#

Hey, speaking of lookup on Dynamic Tables, how do I get the length? ${lookup('Apt_Spec','Concentration_Num').length}$ is not working.

formal goblet
empty glen
#

Thank you!

stone swan
formal goblet
bold pewter
#

So while this code technically works, I'm sure there has to be a better way to do this. First off it is a blob in the roll message, which isn't a big deal I use Notepad++ and paste but more importantly for a reason beyond my ken (I'm a total noob to js) it wouldn't let me concatenate in " (either by ' " ' or "\"") on the .map line (unexpected non-whitespace character), hence the * and the replaceAll outside the script. This code is in a label on an item list that brings up a menu to allow the user to select the ammo used with a ranged weapon. Any advice would be appreciated because at this point in time js syntax just messes with me.

%{const itemTemplateName = '_weaponTemplate';
const itemTemplateId = game.items.getName(itemTemplateName).id;
const strAmmoType = '${sameRow('wpnAmmoName')}$';
return '|' + entity.items
    .filter(item => item.system.template === itemTemplateId && item.system.props.eqpLocation
 === 'Carried' && item.system.props.wpnType === 'Ammo'&& item.system.props.rangeType === strAmmoType)
    .map(item => '*'+item.system.props.name+'*,*'+item.system.props.name+'*')
    .join("|");}%
,'*','\"')}$}}$```
stone swan
# formal goblet It was fixed with the latest version, so you should be able to create modifiers ...

Good to know. Let me just double check that I understand everything correclty: Active Effects are defined on in a character sheet template and they, effectively, function like Item Modifiers, except instead of being tied to an Item, they're tied to one of the defined status conditions. This means their effects are binary and determined by whether a condition has been applied or not. You also can't add active effects that aren't tied to conditions, nor can you define them on the character sheet or via an item, even if you wanted to make changes to an effect tied to an existing condition.

Does that sound about right?

formal goblet
#

And I also wanted to see if our current modifiers can be replaced with Active Effects

stone swan
#

Ah. I'm thinking about making feature requests for a generic active effect (that isn't tied to one of the conditions), "triggers" field that could be something like "on application, on combat start, on turn start, or on turn end", and the ability to add new active effects (or new entries for existing active effects) from a character sheet or item. That way you could do something like have an item that automatically adds 30 Barrier at the start of combat.

formal goblet
#

The changes itself are not big, but I also want to have it compatible with most modules, which do things with Active Effects. So I'm missing a concept, which would accomplish that

stone swan
stone swan
# formal goblet https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/358

I saw that, but I wasn't sure if it applied to this, since it seems like its template defined and I'm having a hard time picturing how it would be implemented by users. If I understand it correctly, it would be it's own type of effect, with its own menu and I'm not entirely sure how you'd get from there to an active effect, label, or anything else. (Part of the problem is how the "action field" is being defined in a fairly technically way, where as, naively, I think I'd want it to be something like "Trigger this label" or "run this formula I've entered" or "perform the effect listed for this Active Effect". Also, in that last case, it seems like it would be simpler to just have a "trigger" drop down in the active effect menu.

#

(Just to be clear, that is very likely a result of how it's being described in the feature request, which needs to make more sense to you guys anyways, rather than a deficiency in the proposed feature.)

formal goblet
stone swan
turbid sorrel
#

${setPropertyInEntity('attached', 'mana', "manac - 10")}$
This returns the value I desire, but won't set the property... Am I missing something?

formal goblet
turbid sorrel
#

number field

formal goblet
#

Seems fine

empty glen
#

I've got a conditional in a roll message but it keeps rolling both and only putting in the chat the one that meets the condition, but the dice for both true and false appear on the screen. Any way to fix that?

empty glen
lament flint
#

that worked, thanks for the advice. is there a way to make it not go behind the chat box?

turbid sorrel
#

Any syntax to refresh a page after a button click, or to cancel the rest of the output of a roll message

stone swan
stone swan
north nebula
#

Is it possible to format the buttons to be single spaced instead of double spaced? Looking at the rich text formatting options built into the editor, I am not finding it, but I am not sure if it can be done through code instead.

sturdy mesa
north nebula
#

I am not familiar with CSS yet, can you possibly provide an example I can then cannibalize?

#

If not, I understand

livid hedge
#

I'm currently using v11 Foundry

formal goblet
livid hedge
flint mortar
#

Hi, by any chance anybody has made the template for ryuutama?

jolly kettle
#

hey, as a question, is there a general guide or video or some sort of entry level explanation of the capabilities of CSB?

dusky mauve
#

@formal goblet Is that only my issue? Dynamic table and Item container
Showing irellevant data for values if such values do not exist (I think it takes value from prev item which contain such info)

#

Some items do not contain field sub_class at all in their template
but Dynamic table showing the data as ENERGETIC_DEFENCE

formal goblet
dusky mauve
#

But in table it's showing from other item

#

which have such value

#

This one has such field

#

and such value was populated for other items in a table

dusky mauve
#

@formal goblet any Idea why that happen? it broking all sorting options ๐Ÿ˜„ because set incorrect data to NONE existed values)

formal goblet
misty terrace
#

Hate to bother, @formal goblet I've been out of the game for a while. How close is the V12 compatable release?

calm fable
#

Hi!
I'm adding an item that has a dropdown list as one of the components and I want to show the label of the dropdown option on the item_container, but using item.component shows only the key, what should I use?
Thanks!

formal goblet
calm fable
#

Thanks, I'll have to use formulas then

half beacon
#

How would I change the font color in a dropdown menu? ๐Ÿ˜…

half beacon
#

Never mind! I found it!

turbid sorrel
#

${lowmana==1 ? 'Not enough mana...' : setPropertyInEntity('attached', 'mana', "currMana - 10")}$
I've got this conditional firing and when it's false, the setpropertyentity returns the correct value to be set but in the sheet itself the value isn't changed.

#

Can properties be set within conditionals?
EDIT after some testing I've found that setPropertyInEntity() doesn't actually change the property. I've tried multiple properties, I seperated the function from the conditional, might be a bug.
example -
${setPropertyInEntity('attached', 'health', 10)}$ I click a button in an item attached to an actor that has this code in its label message. The message outputs 10 but the health property retains its original value.

fresh arrow
#

Hello Group, maybe someone already reach same issue and will be able to help with that ๐Ÿ™‚
I have same formula added into Label Text and Label Roll Message... for second one I see output as proper result, but for first one is completely empty ๐Ÿ˜ฆ
There is no error in debug window...

half beacon
bronze moon
#

Hello again! Quick question. is it possible to make a text field only editable by GM?

turbid sorrel
half beacon
fresh arrow
brave trench
#

Is there a way to get the actor sheets to become their own browser tab, or separated from foundry in another way, so that they don't have to be bound to the table top and blocking vision of the game table?

empty glen
#

Does anyone know a way to make four sections of color for a meter? I would like the meter to be green up to a certain number, then yellow if a little higher, then orange, then red.

pure field
#

Is there currency or money in Custom System Builder?

tender jungle
#

quick Q!
how do you completely clear dynamic table via %{ ... }%? I've been struggling.

#

I tried setting .$deleted and .deleted for each row to true; the row does disappear, but the data remains. :c

tender jungle
earnest imp
#

hi, so i have a dropdown list

#

I want to concat a few hardcoded options into the dropdown list since it's an edge case, this is my failed attempt so far

${
    concat(
        fetchFromActor('GM Panel', "lookup('all_skill_table', 'all_skills')"),
        ',ATK,DEF,EVA,HEA,UTL,ALL'
    )
}$```
#

This is the error

#

Any ideas or pointers as to how I would do this?

empty glen
empty glen
bold pewter
#

So I'm using setPropertyInEntity() on a number field from a roll message in a user input dialog. It sets the value of the number field (I know this because if I close and reopen the dialog the field has the updated value) but the display of the field does not update initially.

${concat(name,' rolls a ',string(attributeRoll),' for STR')}$
${setPropertyInEntity('self','numSTR','string(attributeRoll)','3')}$
${%{entity.entity.update();}%}$'```
#

How do I force a 'refresh'? The entity.entity.update(); shown above obviously didn't work. I'm running into this in other areas of the sheet also and in those instances it's cured by manually reloading the template(which I'm sure there is a way to do in %{script}% I just havent figured out how) but with a dialog that approach wont work because it will clear the dialog. This is the biggest issue I've been banging my head against- how do I get stuff to refresh from code? I've tried recalculate() in instances, but it never seems to work.

peak jacinth
velvet heron
#

Hi again. Is there a way to change the default rotating pause icon to something else? I noticed D&D and Baileywiki both have custom ones. I imagine other systems/creators also do.

tender jungle
cinder rock
#

heyo! I noticed that after a recent update to csb, there is a significant delay in updating values to my character sheet's stats. I use an item with a checkbox to determine if it is equipped, send a flat number to a hidden attribute, and then have the character sheet display the value or display 5 if it has gone over that in a label within a table. This number is taking ages to update now (unless I force a character sheet refresh), where before it was instant even without a refresh.

Foundry is sending me this error too:

#

Is there maybe something with how I have this set up that doesn't work anymore? Or is this a bug I should report?

tender jungle
#

omg I would love to know that too. I have also experienced this after updating.

#

I have, for example, a Label element that simply echoes a value from elsewhere (I believe it's just something like ${value_evasion}$) but even when the parameter changes properly, that label does not until I refresh the document. It's so strange.

tender jungle
cinder rock
#

Also, is there a way to allow my players to refresh their own character sheets? I'd like them to be able to do that when issues like the delay in updated stats happen

median mirage
#

How can I apply multiple conditions to a dynamic table lookup?
I have a table of "gifts" that have a type and value and I want to return the name of those that have a specific type and a value greater than 0

earnest imp
#

needed to add Math. to concat()

tender jungle
empty glen
#

I feel like this is something I should be able to figure out but I'm not getting it: How do I change the actor sheet background to an image on my local drive?

half beacon
coral hemlock
#
background: url("path to your image");
}```
half beacon
#

Is it possible to animate an element only when the player scrolls to it? Decided to animate some of my headers for a bit of style, but the animation ends before the player scrolls down to it.

empty glen
earnest imp
#
%{
    let actor = game.actors.find(actor => actor.name === "${name}$");
    let actor_skills = Object.values(actor.system.props.skills);

    console.log(actor_skills);
    for (let actor_skill of actor_skills) {
        console.log(actor_skill.proficiency);
    }
}%```
Hi, I'm struggling with a bug that doesn't let me access the properties of an entry in dynamic table. `console.log(actor_skills)` works properly but it cannot access any properties inside like `actor_skill.proficiency`. Is there any solution to this?
#

Above is console.log(actor_skills), below is console.log(actor_skill.proficiency).

#

Okay, after checking, it seems that if I use ${name}$, the javascript delimiter cannot draw data from a label type field in a dynamic text

#

Specifically label type field, if its text field it functions perfectly, if its numebr field it functions perfectly

#

When I hardcoded the name of the actor, it can draw data from label type field

#

When I use ${name}$, it is unable to draw data from label type field

coral hemlock
formal goblet
# earnest imp ```js %{ let actor = game.actors.find(actor => actor.name === "${name}$"); ...

You can remove the first line and use entity instead of actor in the second line.

I can only guess the second issue. I guess you're using this Script in a Label and not in a Label Roll Message. You can do that, but you also have to consider the case, where computable values are not computed yet. That means, you have to work with potentially undefined values. You should throw an UncomputableError error to signal, that the Script doesn't have all props available that are needed. In this case, the system will attempt to recompute this in the next computation-cycle

formal goblet
formal goblet
formal goblet
velvet heron
#

When writing in a Label Text with the rich text editor, what is the preferred Source syntax for inserting images? I thought it would be the same as referencing assets with Sequencer, like data/worlds/<worldname>/<nameoffile.xxx> but that doesn't seem to be the case.

formal goblet
formal goblet
velvet heron
#

I'll try that.

velvet heron
formal goblet
white vortex
#

Aye, I've been working with Judson to get a Panic at the Dojo system setup that has a Global Actor + Item Containers. I don't come from a Dev background.

I've managed to create a Global Actor which has a Dynamic Table with a list for all the Forms as shown on the first image, then on the second image. I've made a stance item that has a Dropdown which fetches from the Global Actor the list of all the available forms, below is a button that fetches all the values from the action_dice_label column...

What would be the way to have it so the button only fetches the action_dice_label from the Row the dropdown has selected?

formal goblet
white vortex
#

AHHH!! Okay, I get it now. Yeah, that makes alot of sense. Thanks for the help fam!

white vortex
#

Alright, I've got the basic idea down. Those for the form_selector key, I need to make it so the lookup function references the actor data of the item dropdown which the button is within the same actor.

white vortex
#

Sorry to bug, but I'm practically lost. I've tried formulating with the last example, those it only came up with an Error. Any idea what the issue could be?

${fetchFromActor('Global Actor', "lookup('form_table', 'action_dice_label', 'form_name', fetchFromActor('selected', "${form_selected}$"))")}$
#

Only way I've managed to get it not erroring is through the following code. Those I'm also not 100% sure if it's the correct way to fetch the dropdown from within the item container itself.

${fetchFromActor('Global Actor', "lookup('form_table', 'action_dice_label', 'form_name', fetchFromActor('Stance 1', 'form_selected'))")}$
empty glen
#

I've got a Roll Message setup to change a radio button group on a targeted actor. I have 2 issue:

  1. I can't get button to fill in as it would if you clicked it, but I do know that stats have changed as if it were clicked.

  2. It doesn't work on wildcard tokens whose token isn't "linked to actor data".

Any way to fix these problems?

formal goblet
lament flint
#

Is it not possible to put premade things into a tabbed panel?

coral hemlock
# empty glen I've tried it with the slashes both ways. I think that example you are giving me...

Go into your foundry folder>then the data folder and create a new folder called images inside and inside that a subfolder for your world (if required), copy your image there. The previous link format will then work. It needs to be done this way to work as the image needs to exist within Foundry as an asset. so in this case you created the image on your desktop and have a path to that file, the issue is when your player clicks on the link you created they will get an error as that file location does not exist on that player's computer, so it needs to exist in foundry.

white vortex
formal goblet
white vortex
bold pewter
empty glen
earnest imp
ripe herald
#

Hey folks - I'm just wondering about v12 compatibility (and at a very, very broad timeline). I see it's in the issue tracker, but timeline-wise, are we talking on the scale of "weeks" or "months"? I only ask because I'm helping to playtest an in-development/upcoming ruleset and CSB feels like a great fit for being able to iterate/tweak/etc., but I want to know if I should just go ahead and do it up in v11 or if we should just keep doing it manually until a v12 exists. We're likely not having our first session for a month or so which is why I ask. :p

#

Or, alternatively, if the expectation is that migrations won't require a big re-do from scratch (as I'm painfully doing for FFG Star Wars for another game) I'll get started with v11. :p

#

Thanks - and appreciate the work on this, it had somehow escaped my notice for two years and I'm kind of blown away at how versatile it is!

formal goblet
formal goblet
earnest imp
#

Thank you!

ripe herald
lament flint
#

I was trying to move a dynamic table into a tabbed panel as it seems to not work, is this a bug or is a specific method needed to make this work?

iron badger
#

Has anyone ever succeeded in using automated animations with CSB?

velvet heron
#

I need some help thinking through a solution for this problem.

I have a list of actors (monsters), each of which has a unique rollable table (loot drops). I'd like for the monster actor template to include a label roll message that, when clicked on each actor's sheet, rolls on the respective actor's loot roll table.

Obviously, I can't include individual actor roll table references in the template [#<rollTable>] because it will only work for the one monster.

turbid sorrel
#

You can make the table/panel and move all the contents after though

#

Does anyone know if you have to do something special with setPropertyInEntity for the function to set a property to a value

formal goblet
velvet heron
formal goblet
formal goblet
turbid sorrel
# formal goblet - The target field must be an input component and cannot be a Label - Option key...

I've tried number fields, text fields, and the meter. Also through items or on a button right next to the component. https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/380 I made a post of exactly what I did

velvet heron
formal goblet
velvet heron
#

Does it matter if there are spaces in any of the names?

formal goblet
velvet heron
turbid sorrel
formal goblet
turbid sorrel
#

the values in the list also don't match anything I've tried to set them to

formal goblet
#

Are you working with linked or unlinked actor data? Those work different for Tokens

#

If you really want to make sure, that setPropertyInEntity() works, you can create a separate Template with a separate Actor (not Token) with only 1 Input Component and 1 Label for testing.

velvet heron
# formal goblet Dunno, but I don't think so

I wanted to let you know that spaces do not matter, and the roll works for each monster individually, so thank you for that.

The only thing (and this is a minor QoL complaint) is that the result in the chat looks different when made from label roll message on the monster sheet compared to rolling on the table directly.
left is the sheet roll, right is straight from the roll table.
I don't think there's any way to make the former look like the latter, is there?

formal goblet
velvet heron
#

Yeah, I wouldn't know the first thing about how to do that. Heh.

turbid sorrel
summer turtle
#

I'm tearing my hair out with an issue I can't get to the bottom of. I'm creating a dropdown list of modifiers during a die roll and it works, right up until I add the final "+5" modifier.

<h2>Psychic Strength<h2>

${#concat(
?{power_level:"Power Level"|"ceil(${psy_rating}$/2)","Fettered"|"${psy_rating}$","Unfettered"|"${psy_rating+1}$","Push +1"|"${psy_rating+2}$","Push +2"|"${psy_rating+3}$","Push +3"|"${psy_rating+4}$","Push +4 (Daemonic/Unbound Only)"|"${psy_rating+5}$","Push +5 (Unbound Only)"},
string?{other:"Other Modifiers"[number]})
)}$

${#psychic_strength:=(power_level + other)*5}$

${!roll:=[1d100]}$ vs ${wp_current + psychic_strength}$<br>```

This behaves as expected, until I add the +5 modifier, and then it does this for every option:
#

(I also realise the ceil is wrong, I've not gotten around to making that work)

#

I'm very tired at this point so maybe I'm missing something really stupid but I can't see any differences that would make this specific error happen.

#

When working correctly it does this:

formal goblet
summer turtle
#

3.0.0 currently

formal goblet
#

There was a bug, where if there are more than 10 Formulas, it would bail out a bit.

#

But that got fixed with one of the newer versions

summer turtle
#

Awesome, thank you very much

iron badger
#

Anyone have any experience with using advanced macros module for animations?

white vortex
white vortex
#

The biggest issue those is that I still can't yet figure out how to get the dropdown to fetch the data from the Global Actor to the Item... I'll perform more stress tests to see if I can make it work.

earnest imp
#
    for (let actor_skill of actor_skills) {
        if (actor_skill.deleted || !gm_panel_skill_list.has(actor_skill.skill)) continue;

        // If proficiency value is not yet calculated, throw exception that lets it wait until next cycle.
        if (typeof actor_skill.proficiency === "undefined") {
            throw new UncomputableError('Actor Skill Proficiency is not calculated.');
        }

        if (actor_skill.proficiency > highest_skill_proficiency) {
            highest_skill_proficiency = actor_skill.proficiency;
        }
    }
earnest imp
#

For reference, my actor sheet does require two loops to fully refresh

formal goblet
# earnest imp

Damn, didn't expect that... Does it work with the Error-class? Otherwise I have to think about a different solution...

earnest imp
formal goblet
# earnest imp

Guess I'll think about something at a later time (Holo takes priority ๐Ÿบ )

earnest imp
#

oh boy, ill have to think of an alternative temporary solution for now then

summer turtle
earnest imp
#

And said label field's value can be affected by third party items

formal goblet
warm relic
#

has anyone used the submitted deathwatch sheet and had trouble with the weapons page/table and attack rolls? as far as I can tell it displays the corresponding weapon or ballistic skill but no way to roll to attack or for damage. I might be missing something.

formal goblet
summer turtle
#

I believe it's supposed to roll damage at the same time. To be honest I had issues trying to use the Deathwatch sheet as a base for writing Black Crusade stuff so I went in a different direction, it was helpful to get started but I ended up doing things like splitting the attack and damage rolls into separate buttons and using the alternative roll function to swap between melee and ranged.

earnest imp
#

I'll be patiently waiting for potential solution then ๐Ÿ™

summer turtle
#

(I'm not saying mine is the best of course, there's probably better ways than my implimentation, but it works lol)

#

Although speaking of which, I'm trying to have a Success/Critical Success or Failure/Critical Failure display when a roll is made. I've been able to do them seperately, but if I'm understanding this correctly on the gitlab page:
${roll <= target ? (roll % 11 == 0 ? 'Critical success !' : 'Success') : (roll % 11 == 0 ? 'Critical fail !' : 'Fail')}$
I should be able to merge it all into one line, so only regualar or critical successes and failure display? I've tried this way:
${!roll<=ws_current + combat_actions ? (roll==01 'Critical Success!' : 'Success') : (roll==100 'Critical Failure!' : 'Failure')}$
And nothing happens when I make the roll, if I change all the rolls to !roll then I get an error in the console saying it was expecting a value.

#

So I've not understood something I assume, what have I done wrong here? Thank you.

#

I suppose whilst I'm at it, is it possible to change the colour of a specific text here, so criticals were in red for instance?

formal goblet
summer turtle
#

Thank you ๐Ÿ™‚

formal goblet
summer turtle
#

For clarity this is the entire roll for attacks currently:

<h2> Attack Roll </h2>

${#concat(
?{attack:"Attack Type"|"10","Standard"|"30","All Out Attack"|"-20","Called Shot"|"20","Charge"|"-10","Lightning Attack"|"0","Swift Attack"},
?{con:"Concentrate Action"|"0","N/A"|"10","Aim (Half Action)"|"20","Aim (Full Action)"|"0","Called Shot"|"0","Other (Apply Below)"},
string{?{other:"Other Modifiers"[number]})
)}$

${#combat_actions:=attack + con + other}$

${!roll:=[1d100]}$ vs ${ws_current + combat_actions}$<br>

<h2>${!roll<=ws_current + combat_actions ? 'Success' : 'Failure'}$</h2>

<b style="font-size:18px;">${!roll<=01 ? 'Critical Success!' : roll>=100 ? "Critical Failure!" : " "}$</b>

<p><strong>Degree of Success/Failure:</strong> ${!floor((ws_current + combat_actions - roll)/10)}$</p>

${#tens:=floor(roll/10)}$
${#units:=roll-(floor(roll/10)*10)}$
${#loc:=(units*10)+tens}$

<p><strong>Hit Location:</strong> ${!loc < 11 ? 'Head' : loc < 21 ? 'Right Arm' : loc < 31 ? 'Left Arm' : loc < 71 ? 'Body' : loc < 86 ? 'Right Leg' : 'Left Leg'}$</p>```
I'm happy to take your word for it that the conditions (and more, probably) are messy but I don't understand what cleaning that up entails. In this case the roll is displaying a d100 roll vs the required target including modifiers. It then takes the d100 result + the modifiers to display if it is a success or failure, then takes the d100 roll alone to determine if it's a critical success or failure or not. So I need to be able to separate the d100 and the modifiers if I'm going to display criticals, as far as I understand. 

I'm hoping to merge some lines together so that rather than multiple lines to declare a result and then if the result is a critical or not, it just displays the final result, be it a critical or otherwise, which is what I believe the first example in my previous post does. I ideally want to do the same with weapon jams in the ranged version of this too.
empty glen
#

How do I pass a variable from a label's roll message to a User Input Template? The template is being called in the same roll message.

fresh arrow
#

good afternoon, an easy question I guess for those who are more in Foundry then me ๐Ÿ™‚
how I can track back and find specific Items of Actor who is owner of Item from which function shall be run?
If I will run action from character sheet level I can go as Actor.Items and work on collection... but how to identify Owner of the Item and then catch an array of all owned items or all items with specific parameter?

formal goblet
summer turtle
#

So I am, thank you, that's working now ๐Ÿ˜…

formal goblet
formal goblet
fresh arrow
empty glen
#

Is it possible to change label text from a roll message? I tried setPropertyInEntity but that didn't seem to work.

formal goblet
formal goblet
earnest imp
#

Just as a question, will the UncomputableError class be accessible in formulas sometime down the line? ๐Ÿ˜…

formal goblet
fresh arrow
formal goblet
earnest imp
#

Thank you so much for the hard work, for now I'll work on a bandaid solution ๐Ÿ™

formal goblet
fresh arrow
formal goblet
summer turtle
#

Okay I swear I had the condition changing colour on criticals and now I'm just getting an error, did I just hallucinate that or something, should this be working?

</p>```
(I can apply it to the whole line but like I say I swear I'd *just* made it work on a condition...
fresh arrow
formal goblet
earnest imp
#

Funny story in the last session I had

#

I made this piece of equipment that makes my player able to move twice a turn, and a 5% chance of the player just not moving a single turn at all

#

ON THE FIRST EVER FIGHT AND THE FIRST EVER TURN

#

THE 5% STRUCK

#

๐Ÿคฃ

formal goblet
#

Burn it, this must be cursed!

earnest imp
#

I checked the code and tested it on the background to see if I screwed the code

#

Nope, it's really just a cursed RNG

#

๐Ÿคฃ

summer turtle
elder jasper
#

Would it be possible for me to get an image of an item and send it along with the scroll of this item?
I am using item.container to scroll through items, I would like to get the image of this item and send it in the chat when scrolling.

white vortex
formal goblet
digital gorge
#

this may be a bit of a basic question, apologies in advance, but I am diving into the world of CSB for my foundry campaign. I have been unable to find or install CSB through the manifest url. Do I have to roll back my foundry version?

digital gorge
#

gotcha, tyty!

#

are the transition from version to version smooth?

formal goblet
#

Uhhm, it depends on from which to which version. For example: Going from 3.2.1 to 3.2.2 is usually a minor update, while going from 3.2.1 to 4.0.0 is usually a major update.

digital gorge
#

ahhh i see, apologies, I am not very well versed with foundry VTT

formal goblet
#

This behavior of versioning applies to all sorts of software, it's not just a Foundry or CSB-thing

digital gorge
#

may I ask a question about systems? I understand that this may not be the right place to do so

formal goblet
#

Sure. CSB itself is also a system, so...

digital gorge
#

I was looking into CSB itself because I wanted to emulate the RWBY TTRPG system. Along with CSB, are there systems that would allow just simple roll that's customized?

formal goblet
digital gorge
white vortex
summer turtle
#

Are there any math functions that round towards 0? Unfortunately for my purposes rounding up or down exclusively doesn't work. Basically I need to generate a number based on how many full amounts of 10 beyond a target a player rolls.

#

I thought I had it working but I've realised depending on if I'm using floor or ceil I get inconsistently correct results

summer turtle
#

Okay, I think I've worked it out.


${!roll:=[d100]}$ vs ${ws_current + ?{Modifier|0}}$<br>

<h2>${!roll<=ws_current + Modifier ? (roll==01 ? 'Critical Success!' : 'Success') : (roll==100 ? 'Critical Failure!' : 'Failure')}$</h2>

<p><strong>Degree of Success/Failure:</strong> ${!(ceil((ws_current + Modifier - roll) / 10) >= 0 ? floor((ws_current + Modifier - roll) / 10) + 1 : ceil((ws_current + Modifier - roll) / 10) - 1)}$</p>```
What that should do, is roll a d100, compare it to a characteristic + any modifiers, tell you success/failure (and criticals), and THEN calculate Degrees of Success/Failure (1 + 1 for every full 10 above/below the target)
#

If I'm right, then the only thing to cap this off would be changing the colour of the text on Criticals, but that's a very minor thing. I ran into that wall until I finally knocked it down lol

summer turtle
#

Never mind, and frankly I'm close to throwing in the towel on this specific one and just pushing out a version of BC that uses the Dark Heresy 2e rules on Degrees (just using the tens unit of the roll minus that of the target), it seems much simpler to try and implement.

summer turtle
#

Okay I genuinely don't fully understand how I fixed it but this revision seems to be working:


${!roll:=[d100]}$ vs ${ws_current + ?{Modifier|0}}$<br>

<h2>${!roll <= ws_current + Modifier ? (roll == 01 ? 'Critical Success!' : 'Success') : (roll==100 ? 'Critical Failure!' : 'Failure')}$</h2>

${#degree:=(ws_current + Modifier - roll)/10}$

<p><strong>Degree of Success/Failure:</strong> ${!degree <= 0 ? floor(degree) : ceil(degree)}$</p>```
ornate latch
#

Is there no v12 support for this module yet? just checking because it says it's incompatible with my version of foundry

formal goblet
formal goblet
bronze moon
#

I am a bit confused why this doesn't work within an item. I just want it to show the name of the item and the name of the ritual
<p>${(name)}$</p>
<p>${(sameRowRef(book_ritu_name))}$

formal goblet
bronze moon
#

Uncomputable token "book_ritu_name" i havent touched all this in a month and i am super rusty again

#

but i have some updates i need to make today. do i need to add item. somewhere

formal goblet
#

That means that the variable book_ritu_name does not exist

#

The item.-prefix is only available in Item Containers

bronze moon
#

Yah i dont know why i made it sameRowRef. thank you

bronze moon
#

@formal goblet ok this should be my last question for today.

We know thats probrably untrue

<p>${setPropertyInEntity(attached, 'attached.Mana', "attached.Mana - sameRow('item.book_mana')")}$ Remaining Mana

Uncomputable token "attached"

formal goblet
bronze moon
#

'attached' gives the words attached gives the value? if i remember correctly

formal goblet
#

Words enclosed in quotes are strings while words without quotes are variables, which hold a value

bronze moon
#

ok ill be honest i still dont know what i did wrong. i changed it several times with no change in end result. what am i missing

#

This was my original attempt. with the same error.

<p>${setPropertyInEntity('attached', 'attached.Mana', "attached.Mana - sameRow('item.book_mana')")}$ Remaining Mana

formal goblet
bronze moon
#

ok progress is being made but now it shows up as error with nothing in command prompt.

<p>${setPropertyInEntity('attached', 'Mana', "'Mana' - sameRow('book_mana')")}$ Remaining Mana

formal goblet
kindred oxide
#

can anyone use custom system builder in 12.0ยฟ?

#

or i must use previous version of foundry

formal goblet
bronze moon
#

Sorry i tried that i am still getting the same error...
${setPropertyInEntity('attached', 'Mana', "Mana - sameRow(book_mana)")}$

I honestly have tried everything including adding '' to everything and taking them all away one by one. This all being in an item just makes things not make sense. because i have made this string work on character sheets a bunch of times. but i cannot seem to get it to click on an item.

bronze moon
#

its a number

#

number box so yes?

kindred oxide
#

how do i install a previous version of Foundry 12.0

#

so i can use custom system builder

formal goblet
#

Numbers are 0, 145, or -34. book_mana is a variable. The value of the variable could be of type number, but it's still a difference

formal goblet
formal goblet
kindred oxide
#

how do i check what version do i need

bronze moon
#

then why is it not 'Mana' since that is also a variable?

formal goblet
#

The latest V11 should be enough. So 11.315

formal goblet
bronze moon
#

so Mana is a variable from the character sheet and book_mana is on the item. does one of them need a prefix like item. or attached. ?

formal goblet
#

If x = 5, the expressions x + 3 and 5 + 3 lead to the same result

bronze moon
#

that makes sense... i am following what you are saying

formal goblet
#

If your Formula is within an Item, you generally only have access to the properties of the Item. There are exceptions like fetchFromActor() or the target.-prefix in setPropertyInEntity() you can use to bail out of this limitation

bronze moon
#

oh do i need to add fetch from actor to mana? even though it is targeting attached?

bronze moon
#

that was it

woeful skiff
#

I am tried to sort an item container alphabetically by name and I have done something wrong.

formal goblet
woeful skiff
bronze moon
#

While on item containers. I have a filter formula that is throwing errors. However it works so it isnt top priority

not(item.equipped)

Custom System Builder | Unexpected type of argument in function not (expected: number or Complex or BigNumber or Unit or Array or Matrix or Fraction or string or boolean, actual: undefined, index: 0) TypeError: Unexpected type of argument in function not (expected: number or Complex or BigNumber or Unit or Array or Matrix or Fraction or string or boolean, actual: undefined, index: 0)

#

equipped is a check box

formal goblet
bronze moon
#

i think maybe the one i just created

#

yep... ok made the check box on un equipable items and then just hid it

#

fixed the issue thank you

elder jasper
#

Is there a possibility that I can get the image of the item and be able to send it in one roll?

formal goblet
elder jasper
#

tks

elder jasper
formal goblet
elder jasper
tidal hemlock
#

How would I go about exporting what I have to hand off to someone else to run in their game

#

Like exporting the system

formal goblet
velvet heron
#

Is it possible to generate some sort of vertical div line?

velvet heron
formal goblet
velvet heron
#

The roll message particularly has a formula.

velvet heron
formal goblet
velvet heron
#

But would be required in a Label roll message?

formal goblet
#

Yeah. The alternative would be:

<img src="%{
options.explanation = false;
return linkedEntity.img;
}%">
velvet heron
#

What am I missing on this label roll message that nothing displays in chat?

velvet heron
formal goblet
#

If not, then you need entity.entity instead

velvet heron
#

No, I just opened the item directly from the folder of items.

#

Interesting. Yeah, that seemed to do the trick. Thanks!

If I wanted to include the name of the item in the table as well, would that be
%{return game.items.getName '${name}$'}% ?

formal goblet
#

Just ${name}$. You can use that everywhere

velvet heron
#

Oh, simple. Nice.

finite rapids
#

Hey folks. Is there a way to have the text of a rich text area change to match options in a dropdown list? The game I'm working on has a group of ~22 NPC connections called 'Anchors' that I am creating as Items to drop into a character sheet. Rather than creating 22 different items, I'd like to just have the one with a dropdown to indicate the type of Anchor that it is. The different kinds have different benefits & abilities associated with them, so it would be great to have a text area fill with specific information based on the choice.

formal goblet
finite rapids
#

All right. Thank you for the clarification ๐Ÿ™

finite rapids
#

I have another question regarding formula Conditions in Labels. Let's say I want to have a Label in an Item Container read either 'Major' or 'Minor' based on whether or not a checkbox in the item is marked. I know I should use a Condition in the Label text section, I'm just not sure how to implement it. Please direct me to an FAQ or something if this is a question you're tired of hearing.

#

would that be something like ${anchor_major_check ? 'Major' 'Minor' }$

fresh arrow
#

Dear @formal goblet recently I have identify an issue (could be after last update of CSB), where I can not move "field" to first available spot. Ie. I have created new Tab and I try to move Table on first available spot but it doesn't work (it's not possible)... even after adding (by click on +) panel there is still not possible to add Table just after Panel.

warm relic
#

really new to this but looking at the template sheet nothing seems wrong with the weapon name part of the template

empty glen
#

I'm trying to get an item container to filter for label component that has it's text defined by a switchCase function. That doesn't seem to be working. Should it be or is that not an option?

Related question: is it possible to have multiple filters on an item container?

formal goblet
formal goblet
formal goblet
empty glen
# formal goblet It depends on how you did it

This is the label in the item with the key CorMen:
${switchCase(rTrait, 'Cognition', 'Mental', 'Deftness', 'Corporeal', 'Knowledge', 'Mental', 'Mien', 'Mental', 'Nimbleness', 'Corporeal', 'Quickness', 'Corporeal', 'Smarts', 'Mental', 'Spirit', 'Mental', 'Strength', 'Corporeal', 'Vigor', 'Corporeal')}$

And this is the filter in the item container:
equalText(item.CorMen, "Mental")

formal goblet
empty glen
# formal goblet Seems fine from the first glance

I just saw this in the log:

Custom System Builder | Cannot convert "Corporeal
" to a number Error: Cannot convert "Corporeal
" to a number
at convert (math.js:12242:57)
at Array.t (math.js:6552:67)
at Function.r (math.js:6691:72)
at Function.oe (math.js:6724:82)
at equalScalar (math.js:6740:54)
at any, any (math.js:20192:35)
at Function.oe (math.js:6724:82)
at equal (math.js:6740:54)
at math.js:25781:48
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:657:27)
at ItemContainer.js:589:75
at EmbeddedCollection.filter (commons.js:4192:14)
at ItemContainer.filterItems (ItemContainer.js:578:29)
at ItemContainer._getElement (ItemContainer.js:52:34)
at async ItemContainer.render (Component.js:143:25)
at async Tab.renderContents (Container.js:50:25)
at async Tab._getElement (Tab.js:43:33)
at async Tab.render (Component.js:143:25)
at async TabbedPanel._getElement (TabbedPanel.js:56:36)
at async TabbedPanel.render (Component.js:143:25)
at async Tab.renderContents (Container.js:50:25)
at async Tab._getElement (Tab.js:43:33)
at async Tab.render (Component.js:143:25)
at async TabbedPanel._getElement (TabbedPanel.js:56:36)
at async TabbedPanel.render (Component.js:143:25)
at async Panel.renderContents (Container.js:50:25)
at async Panel._getElement (Panel.js:76:33)
at async Panel.render (Component.js:143:25)
at async TemplateSystem.getSheetData (templateSystem.js:336:41)
at async CharacterSheet.getData (actor-sheet.js:49:19)
at async CharacterSheet._render (foundry.js:5812:18)
at async CharacterSheet._render (foundry.js:6532:5) Object
_

warm relic
#

The row with wpn_name is filled out

formal goblet
formal goblet
empty glen
#

There was newline after the '}$' of the switchCase call.

I started down another less automated path and have gone so far that I can't go back an check without re-working some major stuff. Thanks for taking the time to look at it!

formal goblet
warm relic
# formal goblet `wpn_name` and `$wpn_name` are not the same

this is the attack roll from the sheet, I've tried removing the $ in $wpn_name and get the same error, but the uncomputable token is now just wpn_name. the field in the column keyed as wpn_name is filled out

`<h1>Attack: ${!$wpn_name}$</h1>

${#char_val:=sameRow('ranged',0) ? bs_val+bs_mod : ws_val+ws_mod}$
${#mel_dmg:=sameRow('ranged',0) ? 0 : s_b}$

${!roll:=[1d100]}$ vs ${char_val+?{Modifier|0}}$<br>

<h2>${!roll<=char_val+Modifier ? 'Success' : 'Failure'}$</h2>

${#dos:=floor((char_val+Modifier-roll)/10)}$

<strong>Degrees of Success/Failure: </strong>${!dos}$<br>

<strong>Special: </strong>${!sameRow('wpn_spec')}$<br><br>

${#tens:=floor(roll/10)}$
${#units:=roll-(floor(roll/10)10)}$
${#loc:=(units
10)+tens}$

<strong>Hit Location: </strong>${!loc < 11 ? 'Head' : loc < 21 ? 'Right Arm' : loc < 31 ? 'Left Arm' : loc < 71 ? 'Body' : loc < 86 ? 'Right Leg' : 'Left Leg'}$<br><br>

<strong>Damage: </strong>${dam:=[:$dmg:d10]+$dmg_bon+mel_dmg}$ ${!$dmg_type}$ (Pen: ${!$wpn_pen}$)<br>
<em>!!! Check for minimum damage on 1 die (${!dos}$) and Righteous Fury !!!</em>`

#

to clarify, the Name column's key is {wpn_name}

#

the sheet is a year old from the github, Were the formula changes after the sheet was released?

#

very new to using github but judging by the release date of 3.0.0 (which had the formula changes) being 10 months ago and deathwatch being updated a year ago I'll guess the formula is outdated

late ferry
#

is there any day tracker mod or something?

formal goblet
warm relic
formal goblet
warm relic
#

wouldnt the issue i was having come up earlier though?

#

not necessarily QA testing or whatever but someone running the sheet and not being able to use the attack roll feature

formal goblet
warm relic
#

hopefully nothing else is too crazy to fix then

tidal hemlock
#

Like, I am in the settings tab

#

but not exactly seeing an export button

#

Note, on version 3.0

formal goblet
tidal hemlock
#

Ah

#

Where do I find that..

formal goblet
#

Actors, Items, Scenes, Journals, ... These are all in a Tab

tidal hemlock
#

i,

#

its

#

its ritht there

#

they are right there

#

I got em

#

Found em. Right there.

#

Sorry to bother!!!!!

#

๐ŸงŽโ€โ™€๏ธ

tardy rain
#

A player of mine who is importing the system can't modify existing values on the sheet templates

#

is there a reason that's the case?

formal goblet
tardy rain
#

how would they check that?

formal goblet
#

Right-click the Actor in the Actor-Tab and check permission settings

tardy rain
#

wait one secound I have an idea to make this easier

#

@sly mason

sly mason
#

hello

formal goblet
#

I see, a duo

sly mason
formal goblet
#

That's what I mean

sly mason
#

i am the owner yes

formal goblet
#

Alright. Any errors in the console when trying to change values in the sheet?

sly mason
formal goblet
#

Oho. Which Foundry and CSB-Versions are you using?

sly mason
#

i just updated to version 12

#

is that the problem

formal goblet
#

That's the issue

#

CSB is not compatible with V12 so far

sly mason
#

I see so I should wait for an update then?

formal goblet
#

Either wait or downgrade and wait

sly mason
#

how would I go back to v11

formal goblet
#

Fresh installation from the Foundry homepage

half beacon
#

Not sure how or why, but my hidden attributes stopped working.

formal goblet
alpine roost
#

Is there an easy way to have a roll message display an itemโ€™s image when itโ€™s used?

half beacon
formal goblet
formal goblet
alpine roost
drifting yarrow
#

Hey I'm not sure where to ask this but I will ask here since this is dealing with a System.

I have created a special world for running Heroquest games using Custom System Builder. Well I updated to Version 12 and I went a head and installed the newest version 3.2.5 which is the Beta Branch. I had to go int he beta because the most recent version doesn't work with version 12 of FoundryVTT yet.

So everything seems to work but I can't see to drap any actors on to the stage. I have been digging through the .JSON file and everything but I can't see to find the cause and I'm not getting any errors to give me any clues. Has anyone else had this problem and if you did how did you fix it?

half beacon
formal goblet
drifting yarrow
drifting yarrow
drifting yarrow
#

Okay so with the help of chat GPT and a bit of coding I was able to get it to work.

If you have the same issue I was having with Actors not able to be dragged on the stage replace your "custom-system-builder.js" file with this one.

#

Finally was able to figure it out but man that took some work. lol

#

well crap so it seem to work now when I'm doing it on the server but if I try to login through my domain it doesn't work. lol I need to do some more testing

spare sphinx
#

has anyone had any luck getting Always HP to work with CSB? Sorry if stupid question ๐Ÿ‘

potent fossil
#

Hey guys, have a question that might be a bit tricky.

In terms of performance, is it better to nest data inside an item and drag it on a sheet or is it better if it's directly in the sheet?

Let's imagine I want to create a log for purchases, so I create an item named 'Gold'. In this item there is dynamic tables with all the transaction and then it calculates the current ammount of gc that you have and shend it to you sheet.

Am I better of using an item, or getting rid of the item and directly doing this operation on the character sheet?

formal goblet
empty glen
#

Ok, I've got perplexing one: I have a label (key: woundMod) set to show the max() of seven radio button groups. That has been working. I've got a bunch roll formulas that use 'woundMod'. I recently changed the format of some items and their containers, and now any new actors that use that sheet can't seem to read 'woundMod'.
If I reassign the key to a number field, all the formulas work fine, but I would still like to have the auto-update functionality that came with the way I was doing it before.

Any ideas on what is going on? Here is the error message:

caught (in promise) Error: undefined. Uncomputable token "woundMod"
[Detected 1 package: system:custom-system-builder]
at mathInstance.SymbolNode.onUndefinedSymbol (Formula.js:653:27)
at math.js:26377:89
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:657:27)
at Formula.compute (Formula.js:363:21)
at processFormulas (ComputablePhrase.js:106:35)
at async ComputablePhrase.compute (ComputablePhrase.js:160:34)
at async computeRollPhrase (Formula.js:715:13)
at async Formula.evaluateRoll (Formula.js:726:29)
at async Formula.compute (Formula.js:349:30)
at async processFormulas (ComputablePhrase.js:106:21)
at async ComputablePhrase.compute (ComputablePhrase.js:160:34)
at async Label.js:586:13

UPDATE: I think I've got it. A hidden attribute was failing and I didn't have a 'try' setup. Learning how to do tries and fixing now.

turbid sorrel
#

Any tips for checkboxes in item containers and possibly only allowing one checked box in the container

turbid sorrel
dusk arch
#

I've been trying to fix this error for some time now, and i don't know what is wrong
Here is the Code snippet that isn't working:
${!concat( 'Target Armour Damage ', roll >= 96 ? string(headArmourDamage) : roll >= 56 ? string(thoraxArmourDamage) : roll >= 41 ? string(stomachArmourDamage) : roll >= 31 ? string(leftArmArmourDamage) : roll >= 21 ? string(rightArmArmourDamage) : roll >= 11 ? string(leftLegArmourDamage) : string(rightLegArmourDamage)) }$

and here is the Console Error:
Custom System Builder | Cannot convert "Target Armour Damage " to a number Error: Cannot convert "Target Armour Damage " to a number at Array.convert (math.js:12242:57) at math.js:6567:108 at Array.map (<anonymous>) at Function.r (math.js:6692:90) at Function.a (math.js:6699:66) at Function.oe (math.js:6724:82) at concat (math.js:6740:54) at ...any (math.js:35684:46) at Function.a (math.js:6699:66) at Function.oe (math.js:6724:82) at concat (math.js:6740:54) at math.js:26523:52 at Object.evaluate (math.js:24162:45) at r.evaluate (math.js:24139:55) at Formula.computeStatic (Formula.js:657:27) at Formula.compute (Formula.js:363:21) at processFormulas (ComputablePhrase.js:106:35) at async ComputablePhrase.compute (ComputablePhrase.js:160:34) at async Label.js:586:13

formal goblet
winter swan
#

is there a way to transfer items between item containers of different actors?

formal goblet
winter swan
#

it does not let me drag them once they're in the item container. i can drag items into an item container but i cant drag it out of the item container

#

is there something i must enable to be able to drag the items out of the item container?

formal goblet
winter swan
#

2.4.3?

formal goblet
dusk arch
winter swan
potent fossil
#

Hey guys do you know if there is a way to fetch different formulas from a dynamic table in order to rollem?
let's imagine you can put in a spell's dynamic table the type of damage, so you put on one row '1d6' 'poison damage' and the following '2d6' 'fire damage', is there any way to fetch this data to be rolled ?

formal goblet
earnest imp
#

Hi, just wanna make an appreciation post, with CSB i was able to make a robust and flexible RPG mechanics reminiscing that of my favorite (and hardest) JRPG game, thank you so much to martin and fluush for the hardwork and other people here who have helped me with some of my questions left and right

half beacon
#

Yeah, thank you everyone for helping! I'm away from the desktop right now, but I'd also like to post what I've been able to do with help here once I'm home!

earnest imp
#

I basically recreated FATE Core in CSB, and then proceeded to add all sorts of my own mechanic to the game :)

half beacon
#

Mine is still a work in progress. It's from a system I'm creating for solo play, group play, or no-GM games. I gave the Skills tab a "lite" and "standard" mode to support my players' play styles. Lite focuses less on strategy and more on role play with fewer skills.

#

Started out clueless, then pulled a bunch of sources from here and eventually got to this point. Thanks so much for your patience, Martin!

earnest imp
#

There's a bit too much to show at once but I just wanna share my work

half beacon
#

@earnest imp I love it! Your hard work really paid off

earnest imp
#

Hardest part has to be making do with status effects since CSB has incompatibility with condition labs but I found a way sweaty

#

The statuses are basically holding on ducttapes and dreams

formal goblet
earnest imp
#

No, applying modifiers in Condition Lab is not an option

#

Since the CSB sheet rolls over the changes Condition Lab may have made to a token

#

I configured the effects of all status effects in the "configure active effects" section of the template

#

However nearly everything else in Condition Lab is compatible with CSB

#

I am able to make use of the Triggler feature

#

I can even make custom statuses in Condition Lab as long as I leave the effects of the status empty

#

All of the options work

#

trigglers work

#

macros also work

#

its only the "Active Effect" section I leave mostly untouched from possible incompatibility, apart from description of the status

dire socket
storm stump
#

Hey everyone!
I'm trying to create a roll message that contains a reference to the item the roll is made with. I'm not sure what the right way of doing that would be. Right now I'm trying it with a custom script that will grab the ID from the item in the item container. My Problem is, that the [] always result in it trying to parse them as a roll. Is there a way to escape the brackets, or am I on the wrong track?

Rolling for damage using %{ return `@UUID[Item.${linkedEntity.system.uniqueId}]`; }%
formal goblet
#

And I think the @-syntax works without any delimiters, so you wouldn't even need a Script

empty glen
#

I've got a roll message that I think is supposed run the first part before reloading the character sheet to update the label. But it is running the reload before I can click ok on the dialog that comes with the macro. What am I doing wrong?

This is the roll message:
%{await game.macros.getName('Reset Action Cards').execute({actCardHandID: '${actCardHandID}$'})}%

%{entity.reloadTemplate()}%

This is the macro:
async function resetActionHand(handId) {
const hand = game.cards.get(handId);

if (!hand) {
    await ChatMessage.create({
        content: "Hand not found.",
        speaker: { alias: name }
    });
    return;
}

try {
    // Reset the hand
    await hand.resetDialog();
   
} catch (error) {
    await ChatMessage.create({
        content: `Error in resetting Action Hand: ${error}`,
        speaker: { alias: name }
    });
}

}

resetActionHand(actCardHandID);

formal goblet
empty glen
#

Amazing! Thank you!!!

molten pollen
#

Is there any way to set up a system where say I roll sword, it would automatically subtract 1 from the durability of said sword?

molten pollen
#

thank you

latent wyvern
#

Is it possible to display data from an item placed inside of an item container?

#

I have the component key of the column the same as the item's value I want to display, but this is probably wrong right?

earnest imp
#

Yes, by using ${item.cost}$ on the item container column, it will draw the value of cost from each individual item listed

latent wyvern
#

Much thanks!

tender jungle
#

how do I change a token's dim- and bright-light values through scripts?

#

I have a value_light that should be the distance already, I just can't figure out how to sync CustomActor.prototypeToken.light.bright automatically when the value changes.

#

(The value changes when a player equips and activates certain items, not a button, so I can't do roll message.)

#

WAIT I'm so silly, I can just put the script in the suffix for the value_light label or something. AHahah.

tender jungle
#

Yep, works. For future reference, since I saw nothing about controlling token light via scripts in this forum:

%{
const light = entity.entity.system.props.value_light;
await entity.entity.update({
  'prototypeToken.light.dim': light,
  'prototypeToken.light.bright': light
});
await entity.entity.token.update({
  'light.dim': light,
  'light.bright': light
});
}%
earnest imp
#

i believe when it comes to automation on value change, that can be done through hooks

#

which goes into worldscript territory

molten pollen
#

How does one link an armor to a stat, for instance im setting up the armor template but everything i seem to try in the coding isnt having the defense stat update to the correct thing the math should be the foritude skill which has the key of for so i assume thats ${for}$ and then the armor mod of the item. Im assuming it probably has something to do with the item modifiers but ive been on this for the past 3 hours and cant seem to figure it out.

latent wyvern
#

Is it possible to populate an actor with default items upon creation?

formal goblet
formal goblet
latent wyvern
#

Where should I look to learn about implementing that?

latent wyvern
#

A-doy, thanks!

timid agate
#

I updated to the new version recently, and the formulas i had in item containers bring up an ERROR. The button still works and rolls fine. But for whatever reason the math in the label text breaks the display.

formal goblet
timid agate
#

I've done it. I wanted users to see how much they are hitting before pressing it.

formal goblet
timid agate
#

alright, got it.

#

Another Question: Since lookup is put into an array, is it possible to add it all together? I want it to add the result to the meter to manage player carry capacity.

formal goblet
timid agate
#

alright, thank you for the help.

faint wharf
#

Is there any estimate on v12 support date?

sturdy mesa
formal goblet
warm relic
#

still fixing the attack roll. Trying to get a formula to roll xd10s where x is a sameRow. Is this viable?

#

I'll get the actual formula later as I'm on my phone currently but I was getting more incompatible tokens for the d10

empty glen
#

New question: How would I go about using a roll message or macro to change the checked state of a radio button?

empty glen
formal goblet
empty glen
formal goblet
empty glen
#

The roll message: ${setPropertyInEntity('target', 'rarm', 1)}$

formal goblet
#

setProp...() only works with non-numeric values for Dropdowns and Radio Buttons atm

empty glen
#

Yeah, I got rid of the boxes before I figured out how to localize the change. Just haven't put it back yet.

empty glen
empty glen
# formal goblet `setProp...()` only works with non-numeric values for Dropdowns and Radio Button...

I went to test what you suggested with two new buttons with 'on'/'off' values. I got this error:

Uncaught (in promise) Error: undefined. Uncomputable token "on"
[Detected 1 package: system:custom-system-builder]
at mathInstance.SymbolNode.onUndefinedSymbol (Formula.js:653:27)
at math.js:26377:89
at math.js:26529:60
at Array.map (<anonymous>)
at math.js:26528:55
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:657:27)
at Formula.compute (Formula.js:363:21)
at processFormulas (ComputablePhrase.js:106:35)
at async ComputablePhrase.compute (ComputablePhrase.js:160:34)
at async Label.js:586:13

formal goblet
empty glen
latent wyvern
#

Is there a way to get the name of an item from an itemcontainer? The first reference works just fine, but the second doesn't (presumably because there is no key to reference?)

latent wyvern
#

Of course it is

#

Thanks ๐Ÿ˜ข

copper glade
#

This isn't quite CSB-related, but would any of you guys know which element I need to tweak in the CSS to get inventory items (button-link in containers) to match the rest of my style?

timid agate
#

Is there a spot to write Keep highest when i want the roll to find the outcome that is 5 or greater?
Or is it better to do {(:dicetotal:)d6kh} first and then find the outcome on a speperate line?

dicetotal = 6 + str
(:dicetotal:)d6cs>=5
copper glade
#

Ooh thank you

hallow ginkgo
#

Hi people

#

Is it working well on v12?

formal goblet
hallow ginkgo
#

Okay. Thanks letting me know. I`ll delay my upgrade

timid agate
dusky mauve
empty glen
#

When I use setPropertyInEntity('target',...) on a token without "linked actor data" it only effects the original actor sheet, not the sheet of the targeted token. Same is true if I use 'selected'. Is there anyway to fix that so I can actually change a property of the targeted token?

timid agate
warm relic
#

do i use samerow if the checkbox is in the same table/row? rephrasing, one sec

wet heron
#

is there a way to incorperate a push to the GM when a button is pressed`?
My idea was when the players do an attack and press the "attack button" but before the roll the GM gets a popup to add some modyfiers

Is that possible?

rocky dune
#

Have been staring at this too long, can anyone see where im going wrong here?

${(${[${MGNoDmgDice}$d${MGDmgDice}$]}$)*${SpellModBon}$}$

The below section works fine

${[${MGNoDmgDice}$d${MGDmgDice}$]}$

Takes a number from a different metric which says how many dice to roll MGNoDmgDice, and another metric which says the size of dice MGDmgDice, and outputs a rollable formula.

Trying to add on to the end a section which multiplies the resultant output by a modifier, however its not outputting anything

Getting the attached error but not overly sure why. The attached formula is SpellModBon, which is checking against a list and outputting a number stored in a series of lables.

dire socket
#

It just, never renders the sheet and foundry itself is completely unresponsive, I can still look in the console but nothing is updating.

formal goblet
formal goblet
formal goblet
#

And the Formula in the Screenshot can be simplified to ${ref(concat(item.SpellSource, 'MagicMod'), 0)}$

rocky dune
rocky dune
formal goblet
rocky dune
#

isnt the component key assigning it a definition?

formal goblet
# rocky dune isnt the component key assigning it a definition?

That's partially true for Item Containers and Dynamic Tables. The structure you get is this:

{
  "dynamicTable": {
    "0": {
      "SpellModBon": "3"
    },
    "1": {
      "SpellModBon": "2"
    }
  }
}

and not this

{
  "SpellModBon": "3"
}

In consequence, SpellModBon is not enough. You should use sameRow('SpellModBon') instead

rocky dune
#

Right! that makes so much sense, thanks for the explanation. Have implemented it and am still getting an error.

${[:MGNoDmgDice:d:MGDmgDice:] * sameRow('SpellModBon')}$

has the same error i was getting before,

formal goblet
#

Is that one within the same Dynamic Table or outside?

rocky dune
#

same item container.

#

Formula is within Damage

formal goblet
#

And SpellModBon is displaying something?

rocky dune
formal goblet
#

What version of CSB are you using?

rocky dune
#

3.0.0, still cant update without actors/items becoming unreferencable.

formal goblet
#

Item Containers are only referencable 3.1.0 upwards

rocky dune
#

ah... damn...

#

Will think of something else, thanks for the time, much appreciated.

formal goblet
#

The alternative would be to replace sameRow() with the Formula you have in SpellModBon, basically duplicating the formula

rocky dune
#

That works perfectly. Not clean, but cant grumble with functionality. Thank you very much.

storm stump
#

Hey! Is there a way to access a property of an item in a Item Container that isn't displayed as a row in that container? Lets say I have an item that has a property p_description and I have a label somewhere else in the sheet that should display the p_description property of the first item in that container while the container doesn't have that property as a row?

formal goblet
storm stump
#

Wow thats so much shorter than what I tried. Thank you gonna try this out.

latent wyvern
#

Yea I was looking for something similar which is great

storm stump
#

entity.system.props.myItemContainer['0'].id seems to always return undefined for me. Do I need to access the id via Object.keys()[0] or am I doing something else wrong?

formal goblet
storm stump
#

This worked

let key = Object.keys(entity.system.props.c_active_weapon_primary)[0];
return entity.items.get(entity.system.props.c_active_weapon_primary[key]?.id)?.system.props.p_feature ?? 'No item';
#

Oh I see why values would be smart here.

storm stump
#

Mh I'm running into the issue now that the property I'm trying to access is rich text and contains characters that throw a "JSON.parse: bad control character in string literal". I guess its non escaped backslashes and stuff like that? Is there an easy built in JS way to escape something like this "'<p>Test feature text in the dualstaff</p>\n<p>&nbsp;</p>'"?

formal goblet
latent wyvern
#

@storm stump If you manage to pin down that code, do you mind sharing it with me? I'm in the same boat

storm stump
#

Whish I was a webdev sometimes ๐Ÿ˜„ It's very late so gonna have to look into that more tomorrow. If someone has any ideas, please let me know. And thank you again for the help Martin!

formal goblet
latent wyvern
#

Yea my current workaround is for my equipped tool (only ever 1) to have a secret item container that has all the info I need displayed

latent wyvern
#

Am I doing this right? I want the label to display the value only when the text field on the item isn't empty. When it is empty, I want "N/A"
${(item.conditionlevel != undefined | item.conditionlevel != '') ? item.conditionlevel : 'N/A'}$

formal goblet
latent wyvern
#

Hmm interesting. That works! Question though, what language is this? My background is Java (not js) and python so I sorta get the gist

formal goblet
wet heron
summer turtle
#

Quick (hopefully) question, can I set the Values of Radio Buttons as dice (d5, d10 etc), and is it possible to have them display in a Label in an Item Container depending on which has been selected in the item?
EDIT: Never mind, had a typo that meant I didn't have the Radio Buttons set up correctly.

storm stump
keen iron
#

@formal goblet Would you have any free time within the next week or so to go over this module with me? Im having a hard time understanding how to set everything up.

keen iron
#

Can I add dice automation to the Custom System Builder character sheets?

vagrant hollow
keen iron
formal goblet
keen iron
oblique spear
#

So, I've got a value of current_mp, and I want to set up a button that subtracts the sameRow('spell_cost') value from it. Do I use the Recalculate function for this?

#

As in, Do I do this? :
${recalculate(current_mp=current_mp-sameRow('spells_cost'))}$

#

current_mp being the component key for a number field, and spells_cost being the component key for a row in a spell list.

sturdy mesa
#

I want the number field key **actionpoints **to be regenerated by a number X at the beginning of each character's turn. How should I proceed?

vagrant hollow
oblique spear
#

I'm more asking since I'm out running errands and can't test it just now.

vagrant hollow
formal goblet
#

But the visibility formula can depend on values, so it should work hiding it based upon a stat

sly mason
#

So I tried doing a fresh install to revert to foundry v11 but it didn't work (or I did it wrong). How long would I have to wait for this to be updated to v12?

empty glen
#

@formal goblet are y'all planning on making item modifiers able to affect text and number fields?

empty glen
#

Is there a way to do a mass update of item templates for items that are already owned?

formal goblet
empty glen
#

Beautiful! I should have asked sooner. Thanks!

empty glen
#

This one is really stumping me:

I've got an item template that pulls 4 stats from the attached actor onto a label. Works no problem.
${fetchFromActor('attached','strN',0)}$d${fetchFromActor('attached','strT',0)}$+${fetchFromActor('attached','strE',0)}$-${fetchFromActor('attached','woundMod',0)}$

When I try to pull that label's data to another label, I get an error:
Custom System Builder | Bad control character in string literal in JSON at position 8 SyntaxError: Bad control character in string literal in JSON at position 8
at JSON.parse (<anonymous>)

It only happens when I include the bold text from above. Which is another label with the key "woundMod". Here is that label's text:
${max(${nog}$,${giz}$,${larm}$,${rarm}$,${lleg}$,${rleg}$,${gut}$)}$

formal goblet
empty glen
wet heron
#

I need some logic help
In fallen Reich when you shoot or stab at someone there is some math.
D20+skill > (10+(distance/weapon range))+ mods
The thing is with the mods they vary alot, such as moving, aiming, or if the target is laying etc.
How can I do this with in the system?

The range is "easy" to do, but can I with the token set to crouch and read that in the code?

#

I guess I can add a "gm only" field on che char sheet

wet heron
#

I will look into section 8.3 for this. I'll be back

turbid sorrel
#

Anyway to have the visibility forumla dependent on whether or not a there is a selected target

latent wyvern
# wet heron I need some logic help In fallen Reich when you shoot or stab at someone there i...

If there are a lot of modifiers outside of your control (see Lancer), I'd say maybe just ask ( user inputs )? Something like:
-> D20 + Skill (dropdown)
-> Distance to target: [ ] - (value displayed of what the mod is depending on what is written, this would be the 10+/distance stuff value)
-> Checkboxes for certain modifers
-> Misc mods: [ ]
-> Roll!

sonic vault
#

Hi guys, I haven't been around for a while. I had to stop development for a while

#

Anyways

#

I have one question about the way i do something. Basically i saw a problem with the modifiers. they weren't updating in real time (I have to manually update de sheet, sometimes more then once). I noticed a pattern in this problem, all the places of it appears used my global macros, which basically functions in JS

#

for example the skills

#

even changing my "sabedoria", "sobrevivencia" who uses, nothing chances until i refresh

#

forget, the problem is not in the parts that use the global macro. but in the parts that use modifiers

#

modifiers code

#

which is strange, since modifiers change in real time, but what is derived from them doesn't, why?

earnest imp
#
entity.reloadTemplate()```
sonic vault
#

seems like an interesting solution, i gonna teste. :))

wet heron
formal goblet
empty glen
latent wyvern
#

What would be the best to grab ALL items from an item container and display it to the players? Ideal case is that its a chat message with the rich text links so that they can click on them themselves

latent wyvern
empty glen
#

I have some modifiers that alter the die type of a roll, with the potential of going below a d4. Anyone have any suggestions on how to stop it from rolling below a 4?

This is the conditional I've tried so far:
<p>Damage: ${nDT>=4 ? [:dDN:d:nDT:x] : "Target's armor stopped all damage"}$</p>

latent wyvern
#

What I've done in a similar situation is use max(). In this case, it would be max(4, nDT)