#Custom System Builder
1 messages · Page 31 of 1
To be fair, you can already have a checkbox in an Item Container (or at least the same functionality). Let's assume that the Item has a Checkkbox with the key equipped:
- Label text:
<i class="fa-regular fa-${item.equipped ? 'square-check' : 'square'}$ " style="color: ${item.equipped ? 'green' : 'red'}$; background-color: white;"></i> - Label Roll Message:
${setPropertyInEntity('item', 'equipped', "item.equipped ? false : true")}$
And clicking the checkbox on the item container would be like clicking it on the item?
That's the functionally that we'd use
Or do you mean it's a way to view the status of the checkbox? If so, we do that now with a yes/no label text
Thanks! Will take a look and see if that can work for us!
Hello! I had a quick question, how possible would it implement something like this from the system never going home? Such as a dialogue box that has these options that allow you to manipulate a roll.
"Before a Roll:
• Temporarily gain an untrained skill (dice are bought separately).
• Add a die to the roll (ex: roll 4 dice on a skill with 3 training).
After a Roll:
• Add a pip to a die (ex: change a 4 to a 5).
• Reroll any number of dice. Keep the result (once per skill roll)."
I'm unsure if it would be better to just do an actual system, or if it's possible in custom system builder. Regardless I'm extremely new to both and a little daunted.
From what I understand, that's partly possible. The system allows you to prompt users for input when making rolls, so the "before a roll part" is absolutely possible.
The after roll is harder, as the system currently handles dice rolls as a whole, meaning you can't change (or even access) individual dice in a roll, without using Javascript scripts inside the roll, and accessing the data directly. Doable, but hard, I'd say 🙂
What does ReferenceError: tinymce is not defined mean when trying to add a column to an itemcontainer?
It means the system could not create a Rich Text Editor. This shouldn't happen in this context, though...
Looks like refreshing the game fixed it
This appears to work wonderfully thank you!
I am looking for help with CBS. If any of you who know how to code stuff is willing to become a co-creator of the system I have been working on and maybe earn some cash while at it please message me.
#package-releases message
And since an update never comes alone...
**Version 3.2.1 is now generally available, with the following changes : **
Fixes
- Fixed issue preventing template modifiers edition
If you encounter any issue with this new version, please post an issue on Gitlab : https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
A big question! Is there a way in CSB to make stat replenish on character turn? I wanted to make Action Points Based system and for that im looking for way to replanish when character turns comes
There is no way to do this in the current version. You need to make a custom module for that 🙂
automated macro could do that?
player.CurrentAP = player.MaxAP
a macro could do it 🙂
I'll let you see with #macro-polo for the implementation details though 🙂
The actor's data is stored in actor.system.props
that a plan
Is it possible to filter items with a specific value if it's contained in an array or text value. Like if theres a target value to filter by but the value is compared to one that may have several others along it, seperated by commas.
Example would be like search is "Sword"
and the tags on the item are "Sword, Hammer"
While another is "Hammer, Spear"
I would want the first value to be kept on the table while the second would be excluded since the filter would be sword.
How do you control what tgoes to the console? Does that slow things down considerably?
I also would like to know this, my sheet is just a tad slow with how much is going on init
Question: Is there a list of all the functions for the 'templateSystem' helper object? I saw links in this chat to that system on github but they all say that it doesn't exist. Recently I found out there's an item.templateSystem.reloadTemplate(); Is there an equivalent getTemplate() that would return the name of the template the item is associated with?
You could use string.includes("Sword") as part of the filter?
Where string is the label holding the comma separated tags
I will absolutely try that
Is this for an item container?
Yes
item.taglabel.includes("Sword") should work where taglabel is the key on tthe item holding the tags
oh my god it works, thank you so much
Glad to be able to offer some help now and again!
You can make it even more discriminating if you need to with logical AND (&) and OR (|)
item.taglabel.includes("Sword") | item.taglabel.includes("Blade") for instance
That is good to know, thank you again
The templateSystem link has an error on it.
module/documents/templateSystem.js" did not exist on "develop"
Well, that's an old link
In the settings. And nope, only a little
Is it possible to limit the number of items in an Item Container?
Also related to items. As a GM, if I configure ownership to a folder that contains other folders, should it not automatically configure that ownership to all the sub-folders at once?
As it stands now, configuring ownership to any top-level folder doesn't do anything. You need to do it individually for each sub-folder.
Only with a World Script
Anyone can explain to me why it keeps generating panels ? 😂
That one is related to Foundry and has nothing to do with CSB
i think i cant update data someone can aid me? im trying return here APS to value of APSIK on every end turn for current character in combat (replenish AP)
Hooks.on("combatTurnChange", (combat, prior, current) => { current.actor.system.props.APS = current.actor.system.props.APSIK; });
You have to explicitly call the Actor#update()-method (see API-docs)
Is there a new link for documentation for templateSystem?
Your table only has one row, so if you try to put more things into the same spot it generates a panel to fit them. At least I assume that is the issue because this happens to me as well.
They had several
Hm. Then, I am at a loss. Sorry. Maybe try giving the panels and tables Keys? They seem to require it for me as of the new versions.
I noticed it does not happen if I put them in another location first, then drag them
CSB do be quirky like that sometimes. :D
Would you happen to know what's wrong with this formula ?
${sum(100)-(infantry_cost_reduction)}$
If I type ${infantry_cost_reduction}$ it display the correct number
Ok, got it
My infantry_cost_reduction label had a % sign after the formula, not in the suffix field
Thanks!
I always have a bit of trouble understanding what's available. Is there a function to get the template name that an item is based on?
game.items.get(item.system.template).name (if item is given)
Okay I will have an item object, so that makes sense
Thanks!
Hey. A bit of a minor/niche problem here. I tend to go between text editors (for rich text) fairly frequently while I make a catalog of items for my players. But sometimes when I open a second text editor to update the information in it, the new window will automatically replace all of its text with whatever is in the first editor. Once that happens, it doesn't matter if I click cancel or close out of the window. All of the text is saved.
I think I already know the answer but figured it's probably worth asking anyway... If you have a panel set as a grid of 3 columns, for example, is there a way to make one component take up two columns? Like maybe to merge two columns?
@brittle moth I keep running into this issue, where a lookup function will return a blank, empty value. I thought I had evaded since the updates but once I started referencing from my weapon item table for my attacks with ${lookup('WeaponStack', 'WeaponTypeW', 'NameT', WeaponPick)}$ the issue seems to have reared its head again. It works fine as a roll, it returning "dagger", but the label remains blank. It happened before where lookup would only work as a roll but not a label when I needed it as a label.
It all started since the update to 3.0.0
Okay, I fixed it, but there is definitely some witchcraft going on here. THE ONLY difference betweent these two Ive found out
is that when given a key, the lookup doesn't want to work anymore, it returns blank, I'm almost certain this is not an intended way for this to function and probably needs to be fixed.
Bumping my question from a few days ago again.
And I have a new one!
On item containers, in the character sheet, I can't create a number field in the item container to track quantity. How else can I do that?
Okay, I figured out how to do it. Since the item becomes separate once in the sheet, if the quantity is modified in the item, it doesn't change all items.
But I still have the first question.
I'm trying to get the Module 'Boss Bar' to work, but it won't and I think it might be the pathing in the system.
For the current health for example, I'm using attributeBar.CCon for example, to refer to a number field. Should I be adding anything more?
someone has a example script to update value on actor in macro? i would be thankfull, to canibilize code
Sup. I crated a list of labels with visibility formulas ( x = 50 ; x = 100 ; x = 150 ; and so on until 800). They do work, but I'm running into this:
The labels aren't visible, but they still take space on the table. Is there any way I can have them not occupy any space ? Maybe by using a more complex formula ? I have 16 results possible for x (50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800) so I'm not sure how to proceed because it also generates a fair bit of text each time
x = 50 -> first unit costs 100, subsequent cost 200
x = 100 -> first unit costs 0, subsequent cost 200
x = 150 -> first unit costs 0, second unit costs 100, subsequent cost 200
and so on...
i have a hidden attribute named fotd. I got this inside a label as label text ${fotd}$. Base it is 0 - i want to override it with a roll from another level, so it updates and shows the rolled number. is that possible? And if, how?
did you tr putting them into a panel and using the visibility formula in the panel?
I didn't. Will try this once I'm back from work.
I have a section of sheet with hidden panels, the player sees only one from a dropdown and I dint'n notice any extra space
but I am very bad at the graphic design level xD
that roll is visible to the player? of just a backgrpund roll?
It is visible. It some kind of "form of the day" that they can later then deduct to buy successes
But that should be automatic, not manually - if possible
I mean, if you just need to save that roll until needed is easy, if that roll is part of another formula, and then also needs to do something else, that makes things harder
Well its just that i would like to save this value to the character sheet - in a label, since it cant be edited, and then later - through a roll dialog players can choose to use one of their points to roll one more dice, and i then deduce one from this value
fotd is not defined anywhere in those images
yep, thats using a roll after, the only way I know of doint that is using scripts
alright - thanks then! I will try to find that out ^^
If thats something you are gonna do rarelly, use a macro to update the variable or do it manually, much easier
since you already have the hidden formulas, just update the correct value there and use this in the rest of the sheet as needed
hmm - yeah - maybe i will just do that then ^^ thanks again!
I can't reproduce this :/
The problem has been reported, but I fixed (at least a version of) it in 3.1.3
What version of CSB are you using ? If you are still experiencing the bug, can you create an issue on gitlab with your template linked, so that I can investigate further ? 🙂
If you want to update the variable in many sheets at the same time without having to open then one by one, use an actor for global variables, and reference this variable in the other sheets, this way, you only have to edit it once
The space will be taken by each label to ensure a consistent look on the sheet. For your specific need, if multiple Labels can't be displayed at once, you should use a condition in the Label Message :
${x == 50 ? 'first unit costs 100, subsequent cost 200' : (x == 100 ? 'first unit costs 0, subsequent cost 200' : (x == 150 ? 'first unit costs 0, second unit costs 100, subsequent cost 200'))}$
Or even better :
${switch(x, 50, 'first unit costs 100, subsequent cost 200', 100, 'first unit costs 0, subsequent cost 200', 150, 'first unit costs 0, second unit costs 100, subsequent cost 200', ''}$
Ah - to let you know - i found a way ^^
i created a not shown numbers field with a normal key (as normal). Then i changed the value of the label to the key of the numbers field. The roll now updates the numbers field with setPropertyInEntity -> and this in turn updates the label - works like a charm.
what entity are you referencing in the formula?
I’ll be sure to try this once I’m back, it looks clear enough !
I'm on the latest version, 3.2.1. I've never made an issue on gitlab, but I'll go ahead and give it a go a little later today! (Should I just dump the whole sheet or try my best to isolate the issue and share a template with that).
@brittle moth
As you wish, isolating the issue might make the resolution faster, but I should be able to find it in the full template as well 🙂
Random but does CSB have a dark mode?
Question: Has anyone written a macro or created an 'add on' that would allow a GM to go into a shared compendium and automatically refresh all the items with their respective templates? This could be by folder, or particular template type, or anything that would prevent the need to open each item and refresh it manually.
Is there a way to make a panel or anything else take multiple columns without css classes?
Nope, we don't offer that 😅
Is it a Foundry-level thing perhaps?
I don't think so
Well, you could do that at any level
Not without
Know anything about doing that with forge? Not sure if I have access to the data folder with that
The Custom CSS module should help you there
Digging into the css I'm struggling to see where all the vertical height of stuff is coming from, it's making for some comical layouts
Alright, I'm trying this. 😂
It doesn't seem to work and I don't understand why. 🤔
Should be switchCase() and not switch()
I can display special characters, right ? é è à etc ?
Yeah, that's no issue
Ok
I switched to
${switchCase(advanced_recon_squads_discount == 50, 'La première unité coûte 100 ressources militaires, les suivantes 200')}$
And this one works
Ok that's:
${switchCase(advanced_recon_squads_discount == 50, 'La première unité coûte 100 ressources militaires, les suivantes 200', 100, 'La première unité est gratuite, les suivantes coûtent 200')}$
Man that's gonna be a long-ass formula
${switchCase(advanced_recon_squads_discount == 50, 'La première unité coûte 100 ressources militaires, les suivantes 200', 100, 'La première unité est gratuite, les suivantes coûtent 200 ressources militaires', 150, 'La première unité est gratuite, la seconde coûte 100 ressources militaires, les suivantes coûtent 200', 200, 'Les deux premières unités sont gratuites, les suivantes coûtent 200 militaires', 250, 'Les deux premières unités sont gratuites, la troisième coûte 100 ressources militaires, les suivantes coûtent 200', 300, 'Les trois premières unités sont gratuites, les suivantes coûtent 200 ressources militaires', 350, 'Les trois premières unités sont gratuites, la quatrième coûte 100 ressources militaires, les suivantes coûtent 200', 400, 'Les quatre premières unités sont gratuites, les suivantes coûtent 200 ressources militaires', 450, 'Les quatre premières unités sont gratuites, la cinquième coûte 100 ressources militaires, les suivantes coûtent 200', 500, 'Les cinq premières unités sont gratuites, les suivantes coûtent 200 ressources militaires', 550, 'Les cinq premières unités sont gratuites, la sixième coûte 100 ressources militaires, les suivantes coûtent 200', 600, 'Les six premières unités sont gratuites, les suivantes coûtent 200 ressources militaires', 650, 'Les six premières unités sont gratuites, la septième coûte 100 ressources militaires, les suivantes coûtent 200', 700, 'Les sept premières unités sont gratuites, les suivantes coûtent 200 ressources militaires', 750, 'Les sept premières unités sont gratuites, la huitième coûte 100 ressources militaires, les suivantes coûtent 200', 800, 'Les huit premières unités sont gratuites, les suivantes coûtent 200 ressources militaires')}$
Something's wrong in that because when I test it, it only displays the x == 800 value even if x == 50 on my sheet
Yeah, it just always display the last possibility.
There should be no == within the function
So ${switchCase(advanced_recon_squads_discount, 50, ?
Yeah
It gives a blank
Quote the 50 and test that
'50' ?
Y
hey is there a way to use fetch from actor to get the name of an actor? i want a roll message to show the name of the targeted actor.
name is a reserved key and is exactly that
thank you very much
how do i change the font of the actor sheet?
heyo, anyone else having trouble with importing items to a container directly from a compendium? i've been away from foundry for a while and just updated, it seems like my old workflow doesn't work?
tbh i've not entirely messed with this myself but I think you'd do this by setting a .css file in the game settings and changing the font from there
I think i've seen a tutorial on it somewhere, or at least something adjacent to that nature, lemme see if I can find it
i've managed to do it through custom css. Now i'm struggling trying to add an image into the actor sheet 🥴
oh ok good that you at least started to figure it out bc i can't find the video i was thinking of lmao
i'm of no help here, unfortunately, i've never tinkered with any of that stuff
no worries, i'm just starting myself
Sup, following the formula created yesterday, I tried to create this one:
${switchCase(war_year,'1','22 av.BY: Première année de la guerre. La Grande Armée de la République a mis en service de nombreux véhicules et matériels, mais d'autres projets sont en cours de conception.','2','21 av.BY: Deuxième année de la guerre. Les unités suivantes sont mises en service: Turbo-tank HAVw A6 Juggernaut, Speeders BARC, Chasseurs Lourds ARC-170.','3','20 av.BY: Troisième année de la guerre. Les unités suivantes sont mises en service: Nacelle d'Attaque Tout-Terrain, Plateforme de Soutien d'Infanterie, Chasseurs Z-95.')}$
war_year being a number field between 1 and 3.
Oh, I think the " d'autres " might be the issue...
It has a quotation mark.
Bingo, that was the problem
Any way I can include these without getting an error ?
with "" intead of ''
Oh nice, thank you
Hey is there an elegant way of implement lines and borders in a sheet? Im struggeling with the lines, they appear way to small on my Sheets.
And is there a way for switchcase to Look for ≤ or ≥ values?
It actually just gives me errors, I think its May the wrong function
It is build for exact-matches only. If you need range-checks, use the ternary-operator
For borders I'd say a Panel with a custom css-class, which defines a border. And Line maybe a Label with either also CSS or a <hr>-tag
hello there! any idea on when CSB will catch up to Foundry version 12?
No estimation for that
okie dokie, thanks!
Hello Everyone!
I'm trying to make a formula in a label to show a number based on another dynamic table.
The problem is that this label is within a dynamic table.
So when I use the formula, the number is repeated every row.
The firs image is a dropdown list making reference to another table.
The second is the formula
The third is the dynamic table with all numbers I need
The fourth is the result when I use the formula
You have to use the 3rd and 4th argument of the fetchFromDynamicTable()-function to filter out the result. And you also have to use first() to convert the Array-type to a non-collection type like number or string
could I use a User Input to make a button that can display a table? I wanted to have a small icon that could basically bring up a separate window with a reference table in it and wasn't sure the best way to approach it
I could just make an item table but I didn't wanna have a big bar running across the whole width of the sheet
And what do you want to do with that table?
I just want it as a reference. Basically I have a class feature for an actor template that gives them a modular spell modifier that they can add from a list of modifiers, and I wanted to make an easy access table to display their options that could be pulled up in a separate window from the character sheet so they could reference their stats and the table simultaneously
so really I just need a button that can pull up a separate window to display info
this will only send it to the chat box right? I was hoping to just be able to pull up an item sheet in a seperate window essentially, or something similar
part of the reason I want to do it this way is because I use the Popout mod, so being able to pull things up in windowed assets means those assets can be moved to different monitors outside of the Foundry window
actually, I think doing an item table will work
with some funky shenanigans using panels and selecting settings a certain way for the item table I was able to shoot the item into a corner where I wanted it and not have the rest of the table visible around it
having an issue with item containers; I have one that is supposed to only display items that have a checkbox keyed as "ACTIVE" where the checkbox resolves to true. It used to function, but now it's displaying any item templates that are checked in the filter items list regardless of whether they match my item filter formula or not anymore. I just updated to the newest update today.
equalText(item.ACTIVE, 'true') this is the exact formula I'm using for my item filter
Checkboxes return-type got switched from string to boolean, so having item.ACTIVE as Formula is more than enough
okay bet bet ty!
Is there a way to make all the buttons the same size? They're all "Medium" but they're definitely not the same size haha.
You can add blank characters (" ") to increase the size of the tiny ones, it's because of the text size
You need to put the same character amount in your buttons
Is there a built in way to set a certain effect to on using the CSB commands? Like if I want to turn on 'unconscious' for the token or something
No built in way for setting effects. But it can be done with macros.
Thank you!
Does anyone understand this error? Its coming from this roll message:
${#?#{User Input Sheet}}$
${#setPropertyInEntity('self', 'currentAmmo', "currentAmmo - 1")}$
${#diceModSelect:= fetchFromActor('attached', 'diceModSelect2')}$
${#totalMod:= fetchFromActor('attached', rangedAttSelect,0)+rangedHitMod}$
<table>
<tr>
<th>${name}$ Attack</th>
</tr>
<tr>
<td>Total</td>
<td>${Roll:=[:diceModSelect:+:totalMod:]}$</td>
</tr>
<tr>
<td>Recoil</td>
<td>${recoil}$</td>
</tr>
</table>
Hey, do we have an article I can read about changes between 3.0.0 and 3.2.1?
That's all writen in the changelog
Yep ) I'm not the one)
I move my setPropertyInEntity to the END of my script
and it start works
have no idea why
Yep, should have realized. Sorry to bother you. 😞
Which CSB version are you running?
Then might be an oopsie on our side if I interpret that correctly.
Yeah its kinda out of nowhere. item broke after update. But I've also had some errors to sort out since the update as well, but this item and actor isn't throwing any sheet errors, just this one, and only for this roll button (attack). The damage roll button works fine.
If you need anything from me to compare lmk.
@brave trench can you put ${#setPropertyInEntity('self', 'currentAmmo', "currentAmmo - 1")}$
to the end of the script - after html </table> ?
instead of begining of the script
yeah that fixed it lol
That's weird, it shouldn't be dependent on the order
Yep - no Idea why it work like that)
Is it currently possible to have a formula as a collapsible panel's title?
It start after upgrade
nope
I have spend 1 day for fix that such way) And start thinking that my hands is from ass)
Because no logic in such manipulation - but look like some bug here OR we both have hands form ass))
I'm and @brave trench 😄
I'll find a workaround for my project. Good to know I wasn't doing something wrong!
How should I add a button to the sheet? Lets say I want a button that changes some data but I don't want a message popping up. is that possible?
Actually I noticed in the wiki that labels have the option 'send roll message to chat'.
Must be in a different version of the system
Hey, does anybody know how to perform a diceroll-formular while fetching an value from a dynamic table?
nvm I figured out
What would the correct syntax be here ?
${switchCase(air_power_meter "< 0" ,"Supériorité aérienne séparatiste", "> 0" ,"Supériorité aérienne républicaine")}$
I'm not even sure I'm using the right formula for what I'm doing right now
I know this is a minor thing, but does anyone else have an issue with both explicit links and the ToC on the github pages going to the wrong part of the page? Like a link to the computable phrase section ends up showing the very bottom of the page?
So... component type "Meter"'s options: on an actor with 10hp, I assume Min and Max would be 0 and 10. Can someone help me out with Low, High and Optimum though, please?
Meters can go in negatives too if you need them too
Low, High, and Optimum set the color coding. The way they interact is a little bit complicated, but the manual does a good job of laying it out.
So then, if -5 is "really dead" (vs Unconcious) then our 10hp actor would have Min=-5, Low=0, Max=10?
My min value is -10. My max value is 10.
At 0 and above, meter will be green
Under 0, meter will be yellow
Under -5, meter will be red
Kind-of but there's an important caveat there. The min and max values set both the scale of the meter and the range of acceptable values, so if you set a min of -10 and a max of 10, then a value of 0 will result in a meter that looks half full. Conversely, if you set a min of 0, then the meter will look empty at 0, but you won't be able to go to -10.
I know. Sadly for now that's how I'm gonna use it
So a better use case would be Min=Unconscious, Max=Healthy and then Optimal=over Half, High=half and Low=1/4?
Were you able to solve your issue with boss bars?
${switchCase(air_power_meter, "< 0" , "L'ennemi a une supériorité aérienne écrasante. Toute tentative d'appui aérien de nos appareils sera extrêmement risquée." , "== 0", "Aucun camp n'a l'avantage dans les cieux." , "> 0" , "La République a la supériorité aérienne. Nos appareils pourront mener leurs opérations sans être gênés.")}$
There's progress, this formula does not return an error but doesn't appaear on my sheet either 😂
The switchCase()-function does an exact-match internally. If you need range-checks, use the ternary-operator instead: <condition> ? <true> : <false>
Gotcha, thanks
I have the same issue, but I don't know why it does that 😅
Someone must have already asked this question, items quantity or price or anything after i update the system have return an error. How can I fix this?
I need to know the formula used and the error message
Otherwise there are endless possibilities to cause errors 😅
The error message normally appears in the console when clicking on the error text, but this time it did not appear.
And the formula:
! cannot be used in Label text
heyo, idk if this is a known issue or not but I've come back to my foundry world after a while and it seems like with the new updates, i can no longer import from compendia directly into an item container. is this fixable without reimporting all of that compendia into folders? that would really bulk up my world file
It doesn't solve the problem, I had this problem right after updating, so did something change to make it diferent to use "!"?
Best would be to create a ticket for that. That one is probably caused by the import-changes we did to retain document IDs
i'm doing a quick minimal reproduction project to see if it's just a me issue first and then sure
! was never meant to be used in Label text, only in Label Roll Messages
Oh, 😂 I guarantee it worked and correctly displayed the price and quantity of the item. but since i update its broken.
I made the first range work but how can I follow up with more conditions ?
${(air_power_meter < -9 ? "L'ennemi a une supériorité aérienne écrasante. Toute tentative d'appui aérien par nos appareils sera extrêmement risquée." : < -4 ? "L'ennemi contrôle l'espace aérien. La sécurité de nos propres appareils est menacée en cas de demande de soutien.")}$
x > 1 ? a : x > 2 ? b : c
Oh so I gotta write air_power_meter again then
Yep
okay seems to be a me issue, because in my MRP it works just fine. not sure what you mean here by these import-changes, but i'm wondering if a quick import of all of the compendia items to a folder, and re-converting them back to a compendium might fix it. if not, i'll go through all my modules and find the culprit
Actually... https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/362#note_1957967878
It's a closed issue, so would be hard to find in the first place 😄
true actually
tsym for finding it for me
funny that I eventually had the same idea as OP of that issue
Im not the unique, solved by removing the "!" and removing the "_" from the variable name.
yup, worked! thanks a bunch.
${(air_power_meter < -9 ? "L'ennemi a une supériorité aérienne écrasante. Toute tentative d'appui aérien par nos appareils sera extrêmement risquée." : air_power_meter < -4 ? "L'ennemi contrôle l'espace aérien. La sécurité de nos propres appareils est menacée en cas de demande de soutien." : air_power_meter < 0 ? "Les forces séparatistes ont un contrôle limité de l'espace aérien. Les risques sont mineurs pour nos propres appareils." : air_power_meter == 0 ? "Aucun camp n'a l'avantage aérien. Nos appareils peuvent agir, mais ceux de l'ennemi aussi." : air_power_meter > 0 ? "La République a un contrôle limité de l'espace aérien. Les appareils séparatistes pourraient subir des pertes s'ils décident de s'en prendre à nous." : air_power_meter > 4 ? "Nous contrôlons l'espace aérien. Nous pouvons agir en relative sécurité, tout en empêchant les appareils séparatistes d'opérer impunément." : air_power_meter > 9 ? "Nous avons la supériorité aérienne. Nos pilotes peuvent intervenir en sécurité, et les appareils séparatistes ont de grandes chances d'être interceptés.")}$
This is the complete formula, and for some reason it returns an error. If I put a last : "x" at the end, it does not return an error, but I don't need more conditions, and anything past air_power_meter > 4 doesn't work on the sheet
I tried putting values between " " but anything past 4 returns the text for x > 0
Is there an easy way to reset a Number Field to its default value?
I'm pretty sure my formula has a problem with negatives and positives but I don't know how to fix this
Not really
Ok, I see, the very last condition is needed for the formula to work. But why can't I display the results for x > 4 and x > 9 ?
That's what I figured. Thank you for confirming it.
So, I've got a template with a meter called 'hpts' (Hit Points)... How do I know what to select for the Pog's Resource Bar?...
${(air_power_meter < -9 ? "L'ennemi a une supériorité aérienne écrasante. Toute tentative d'appui aérien par nos appareils sera extrêmement risquée." : air_power_meter < -4 ? "L'ennemi contrôle l'espace aérien. La sécurité de nos propres appareils est menacée en cas de demande de soutien." : air_power_meter < 0 ? "Les forces séparatistes ont un contrôle limité de l'espace aérien. Les risques sont mineurs pour nos propres appareils." : air_power_meter > 0 ? "La République a un contrôle limité de l'espace aérien. Les appareils séparatistes pourraient subir des pertes s'ils décident de s'en prendre à nous." : air_power_meter > 4 ? "Nous contrôlons l'espace aérien. Nous pouvons agir en relative sécurité, tout en empêchant les appareils séparatistes d'opérer impunément." : air_power_meter > 9 ? "Nous avons la supériorité aérienne. Nos pilotes peuvent intervenir en sécurité, et les appareils séparatistes ont de grandes chances d'être interceptés." : "Aucun camp n'a l'avantage aérien. Nos appareils peuvent agir, mais ceux de l'ennemi aussi.")}$
@formal goblet Any idea why results past > 4 do not show up on the sheet and still display as if > 0 ?
attributeBar.htps
Because the condition for > 0 is already met, so it doesn't go further
when you say attributeBar.htps... can I assume you mean this, Martin?
Yeah, but also... where are the other ones... Wait, are you in the Prototype Token?
Prototype Token... of the Template. Since asking, I've found that you have to at least be in an actual actor's token.
Was it not there for the Template Prototype Token because the Bars establish their numbers by formula?
Hmm.... I've got attributeBar.hpts and attributeBar.epts set on the actor but the right-click method of changing the values in the bars won't touch it.
Probably because Meter and Complex Attribute Bars are read-only. Only Number Fields are writeable.
So... I just shouldn't use "Meter" for health and energy?
You can use them as a secondary Component, but your main Component should be a Number Field
Hmmm... Yes, i was also noticing the 'Value' couldn't be adjusted on the Actor Sheet either. Makes me wonder what a Read-only Meter's use-cases would be.
... can 'value' be altered by a macro : actor update?
Everything, that can accept a Formula, cannot be altered by the User (derived vs. non-derived values)
Not by the user... fine. Macro then? 😵
The restriction doesn't care about this little detail 😅
Right, ok, I'm sure meter does have some practical application, but I'm just not getting it. Perhaps I'll try again to sort that out on a future project.
Sorry for taking up your time, Martin.
It is a purely visual Component
But I have three different solutions for results under 0 and they work…
Think about the order. It all goes from left to right one after another
Just think about this example:
x = 7;
x < 0 ? a : x > 0 ? b : x > 5 ? c : d What would be the solution in this case?
I couldn't find the latest update notes, what version of Foundry is CSB compatibale with?
11
any of them? there's 11.299 - 11.315
11.315
thanks!
so I re-installed foundry at v11.315 and CSB says I need a core update
disregard, something fixed it
Ok. I'm still getting nowhere on the rolling from an item's Rich Text Field and I'm not sure why. I've checked the computable phase entry in the API and the getComputeFunctions() function in ItemContainer.ts and clearly I'm missing something, but I don't know what it is.
At the moment, I can get it to work fine for most of the things I've checked (the Rich Text field can have CSB formulas that roll, reference fields on the character sheet, and even ones that invoke and then reference prompts. The one thing it seems incapable of doing is referencing other fields on the item itself. Here's the code I'm using for the Label roll message, any suggestions for where I might have gone wrong would be greatly appreciated:
%{
const itemProps = linkedEntity.system.props;
itemProps.name = linkedEntity.name;
console.warn (itemProps);
console.log(itemProps.name);
const rollText = foundry.utils.getProperty(linkedEntity.system.props, 'ComAbAlt');
let phrase = new ComputablePhrase(rollText);
await phrase.compute(entity.system.props, {
computeExplanation: true,
reference: linkedEntity.id,
triggerEntity: entity,
customProps: {item: itemProps},
linkedEntity: linkedEntity
});
let speakerData = ChatMessage.getSpeaker({
actor: entity.entity,
token: entity.entity.getActiveTokens()?.[0]?.document,
scene: game.scenes.current
});
phrase.postMessage({
speaker: speakerData
});
throw 'done';
}%
reference seems wrong, because you need the full relative path beginning from the table-key
Huh. Would that cause an "Uncaught (in promise) Error: Uncomputable token "item"" error?
No, that would mean that item is not defined
That's what I figured. I thought the customProps: {item; itemProps}, line took care of that, but I guess I didn't understand how itemContainers define item for the computable phrase.
That's a semicolon after item...
Otherwise I'd expect that as well, but you could also try to merge them in the 1st arg of compute()
Sorry, that was a typo in the message itself. In the actual code it's a colon.
When you say merge them, do you mean replace entity.system.props with something like {entity.system.props, linkedEntity.system.props} ? Does that work?
How do i reference the actor image inside the sheet through a label?
Nope, haven't had a lot of time to guess what the path should be. I have no idea how I'd learn something like that xD
I'm not sure if it's state anywhere, but there's section in the character sheet called props that lists a lot of values in a more easily accessible format. I don't know how you have things set up, but I have a number field called HP and a lable called MaxHP, so I used props.HP and props.MaxHP.
That's how I have it set up too. I'll try props! Gimme a few mins
is it safe to assume 3.1.3 is the last fix for v11?
I’m not sure I understand. 😦
I wanna say
x < 0 ? a : x > 0 ? b : x > 5 ? c : x > 7 ? d : e
It goes from left to right and if one condition is true, it will NOT go further.
So if x=7; x<0 is fals, go to next x>0 is true, no need to go further.
So you will get B as answer and no number above 0 will ever reach c, d, e or something else.
How can I do then ?
Can I do a switchCase with several values ? Like
switchCase(x, "1, 2, 3, 4 " ………)
?
What I don’t understand is why does this work for negative values in my formula, but not for positives. I can display the difference between x < -9 and x < -4
x<0?a:x>9?e:x>7?d:x>5?c:b
🤯
I’m gonna need to grab a pen and a paper and try to process this
Sometimes it’s so infuriating trying to pull these things with zero knowledge I swear
Are you sure switchCase will be the best function for what you're trying to achieve?
It is basicly just "théorie des ensembles" "set theory" "Mengenlehre".
What your question will take/cut away from the summ does not cut it all.
No I’m not.
${(air_power_meter < -9 ? "L'ennemi a une supériorité aérienne écrasante. Toute tentative d'appui aérien par nos appareils sera extrêmement risquée." : air_power_meter < -4 ? "L'ennemi contrôle l'espace aérien. La sécurité de nos propres appareils est menacée en cas de demande de soutien." : air_power_meter < 0 ? "Les forces séparatistes ont un contrôle limité de l'espace aérien. Les risques sont mineurs pour nos propres appareils." : air_power_meter > 0 ? "La République a un contrôle limité de l'espace aérien. Les appareils séparatistes pourraient subir des pertes s'ils décident de s'en prendre à nous." : air_power_meter > 4 ? "Nous contrôlons l'espace aérien. Nous pouvons agir en relative sécurité, tout en empêchant les appareils séparatistes d'opérer impunément." : air_power_meter > 9 ? "Nous avons la supériorité aérienne. Nos pilotes peuvent intervenir en sécurité, et les appareils séparatistes ont de grandes chances d'être interceptés." : "Aucun camp n'a l'avantage aérien. Nos appareils peuvent agir, mais ceux de l'ennemi aussi.")}$
This is my formula, which works for air_power_meter when it’s in the negatives, but won’t work for the positives
It can't work, the logic is wrong
If you're wanting it to get the "between" values such as -9 to -4, then you'd have to do and(), however, if you stuck with the same comparison (being <) throughout, it might also fix it?
Oh don’t get me wrong I know it’s a PEBKAC but I don’t know how to solve this 😦
Just try my solution with the positives and you will see.
This one ?
jep
I’ll try this once I get home
But keep your solution for the negatives.
So…
try this
${(air_power_meter < -9 ? "L'ennemi a une supériorité aérienne écrasante. Toute tentative d'appui aérien par nos appareils sera extrêmement risquée." :air_power_meter < -4 ? "L'ennemi contrôle l'espace aérien. La sécurité de nos propres appareils est menacée en cas de demande de soutien." :air_power_meter < 0 ? "Les forces séparatistes ont un contrôle limité de l'espace aérien. Les risques sont mineurs pour nos propres appareils." :air_power_meter > 9 ? "Nous avons la supériorité aérienne. Nos pilotes peuvent intervenir en sécurité, et les appareils séparatistes ont de grandes chances d'être interceptés." :air_power_meter > 4 ? "Nous contrôlons l'espace aérien. Nous pouvons agir en relative sécurité, tout en empêchant les appareils séparatistes d'opérer impunément." :air_power_meter > 0 ? "La République a un contrôle limité de l'espace aérien. Les appareils séparatistes pourraient subir des pertes s'ils décident de s'en prendre à nous." :"Aucun camp n'a l'avantage aérien. Nos appareils peuvent agir, mais ceux de l'ennemi aussi.")}$
I’ll make sure to try that
by the way, it's gonna fail is air_power_meter is exactly 0
by fail I mean it's gonna use :"Aucun camp n'a l'avantage aérien. Nos appareils peuvent agir, mais ceux de l'ennemi aussi." for 0
${(air_power_meter < -9 ? "-9 ~ -4" : air_power_meter < -4 ? "-4 ~ -1" : and(air_power_meter>=-4,air_power_meter<=4)? "-4 to +4" : air_power_meter > 4 ? "5 ~ 9" : air_power_meter >= 9 ? "10+" : "Other")}$
Tested it, works on my end.
Bit of an error with the descriptions, but it works.
you missed the 0 case, which is other in the formula since in that logic is the only way it can ever be used, other than that it works... but you don't need to use another condition in this case
That’s exactly what I want. I know it’s kinda… complicated but basically I’ll explain how my system work and maybe it’ll be clearer:
Air Power is a value both sides can have. It can never go above 10 for each side. If the Republic has 6 air power and the separatist gain 4 air power, then the Republic will still be at 2 and the separatist will have 0. That’s why I’m using negative values, it’s because it is not possible for both camp to be in the positives at the same time.
Either they both cancel each other and have 0, or one side has more and start building towards 10 while the other is stuck at 0.
then it should work unless I made a mistake in the copy paste
I’ll try once I’m home and tell you
I can try to explain the logic behind the formula if you want
or the why does it only work for negative numbres in this case
@rotund mason I'm trying your formula in a couple of minutes.
it does work !
Now I can keep on building my tactical view tab, so the Grand Army of the Republic can crush the clankers
That's not my fault ><
The thing is : Your browser travels to where the section should be when all images are loaded. But it does not load images until they should be on screen. So you land at the wrong place, and as you scroll to find the right section, images load and you are lost again...
I'm thinking about another way to navigate the docs, I'll keep everyone updated 🙂
So I understand that items are applied to an actor and item containers merely display said items, but is there a way to attach a single item to a single property on an actor, such that referencing the property is a reference to the item itself?
Yes and no. You have access to the items-collection in an Actor if you use Script-Expressions in a Label, so you could fetch some props of a specific item. But you won't be able to save a whole Item under a property (except when you use an Item Container, which has as many columns as the Item has as properties)
That is unfortunate, I'd prefer the ability to state "This Style Item is Style1" and then reference its properties directly.
I suppose I could either keep it in an item container with other Styles and reference the whole table for given properties, or have it use item modifiers to change the properties I want to display.
Different question, is there a way to have an image within a property? I want to display dice in a better way than just "d6 d8 d8"
You can have HTML in Labels, so you could display something else
I'm having trouble with Ripper's Boss bar module and CSB. I have it so the data path is right but when the hp changes the bar does not update. it will update if I close it and re open it. but otherwise it stays stuck. any help would be greatly appreciated.
Which Component provides the Attribute Bar?
So, circling back to this, does that mean there's a bug with how the compute function is working and I should drop it for the time being?
Not really a bug, but I'd say that the Documentation is a bit misleading. And as I said before, merging all props in the 1st arg should probably solve your issue:
await phrase.compute({
...entity.system.props,
item: itemProps
}, {
computeExplanation: true,
triggerEntity: entity,
linkedEntity: linkedEntity
});
Ah. I didn't understand what you meant by that. Thank you for the example code.
🎉 It works! Thank you. Now there's just one, very minor, problem. If I reference text from another field on the item, the preceding line gets one of those empty ovals. I think it's there so you can click it and see the code, which is a bit unnecessary for flavor text, but it's not hurting anything.
It also doesn't like csb formulas in the referenced field (which I'm not even going to try to fix) or images, which is also an extremely minor flaw. All in all, this is a great success.
Can I modify a setting of a number field with a button?
Ie, with a button, can I turn off show +- and make the field non editable?
Correction: Images seem to work fine, but with a really weird caveat. If an image is in the referenced field and there's an emoji in either the referenced or direct field, then the image will automatically appear at the start of the message. This doesn't seem to effect images in the direct field, and things like tables or paragraph formatting (in either field) don't seem to produce this effect.
Again, I don't think it's worth going out of my way to fix it, but I thought you might find the interaction interesting.
Ok. There's more going on with the weird image placement than just that, and it's not limited to images in a referenced field. It's also quite inconsistent.
Oh, this might be a legitimate bug, but I'm not sure if it's CSB or something else. If you use the in sheet rich text editor to add an image, then there will be a button to select a source from the server (in addition to the field for a url), but if you use the pop-up editor the button won't be there.
... Images don't like the presence of Heading 3 text—and I do mean Heading 3 specifically. Headings 1, 2, and 4 all work just fine—regardless of which field they're in. 🤷
In a dropdown list, does selecting one label make it "true" ?
Selecting an item in a drop down sets the drop down's value to the key of the selected entry.
So if my dropdown is named "bananas" and I select the entry "apples", bananas = apples ?
(because I know I ask way too much questions 😂)
It's not like CSB knows what either of those words mean. You just have a box labled Bannanas and you decided to fill it with Apples.
Lemme rephrase is
My dropdown list key is x
first entry key is 1, label is one
second entry key is 2, label is two
Unrelated to that, but how are auto completes in Text Fields supposed to work? I tried entering a few values in one, but when I went to test it none of them auto completed and I don't know if that's because I entered the values wrong or if I'm just trying to trigger it incorrectly.
What happens if I select the first entry ?
x will be either '1' or '2' in this case
Ok, nice
I'm thinking a "lock" for there fields would be nice, but not sure how to formulate it, or if it's even possible
I feel like I'm missing something basic with the Text Field autocomplete feature. I put a value into it and now there's a down arrow on the field, when I create items using that template, but clicking the arrow does nothing and neither does starting to type the word. How is this feature supposed to work, particularly when you're just using a static list of words?
How do you refer to a dropdown key ? Especially for visibility formulas
😂
x equalText(y) ?
Uh, that would be invalid syntax 😅
Either you have something like an operator like + (in this case, 4 + 6) or you have functions like sum() (in this case, sum(3, 5, 7))
Mmmh
I wanted to display two different labels with visibility formulas depending on the dropdown list
But actually that might not be the best solution for what I want to achieve
I managed to create my first formula without asking for help here 😂
Is it possible to create a number field with a suffix ?
Like a number field and then the suffix displays a given value
Right now I have a number field and a label field but that's not optimal
Nope, they don't have a suffix
Is this error something to be concerned about? Get it when loading or refreshing actors
[Detected 2 packages: advanced-macros, system:custom-system-builder]```
How would that work for local images? I tried dragging the file over from File Explorer, but it resulted in a blob image which didn't work.
What are the solutions people have used to display a number field right to a label so it looks like this:
Number / Label
Especially to display things like current HP / Max HP ?
I have tried tables and fiddling around with alignment but it does not look that good
I put them in their own sub-panel. I have the number field with a prefix (for example : "Focus : ") followed by the label with the maximum amount. The label has a prefix which is "/ ". So I get something like :
Focus : 10 / 12
Having both in their own panel allows them to keep the two fields together.
Looks like this on my sheet
Forgot to @ you in my answer above, hope it can help a liitle.
Yeah that's pretty much how I did it until now, was wondering if there was a better way. Thanks 🙂
Could someone give me an example of how or where to use the conditional modifier list component? I'm not quite understanding what its purpose is or where I would apply it
I can't find any info on if I can change settings on a number field through code, if so can someone help me?
look up setPropertyInEntity. Sounds like that is what you may need.
Morning all! Got a stupid question that has been stumping me all week.
How do I call a non-inline roll function with a label roll message?
This one won't help because the configuration fields are stored under system.body or system.header, not system.props. You would be able to change them via a Script, but keep in mind that these changes will be reset after every template-reload.
${[1d20]}$ would be the most simple one
Create a modifier with a defined Group, have the Item be present in an Actor and you'll see what it does
This results in an inline roll because of the bracket encapsulation, right?
The system i'm running requires evaluating the individual die results from a dice pool, but when it gives an inline result my players can't see what the individual results were.
(Top message is a '/r' roll sent by the user, bottom message is a [roll] called by my label message)
You can click on the 17
I can and it will give a pop-up with the rolls, but that popup on click doesn't occur for my players. I've got a world script that makes rolls expand by default, but I can't figure out how to get something similar for the inline function.
I see, that could be tricky, because CSB uses a Tooltip and not a collapsible section like Foundry. You could probably trigger a virtual click-event to let the tooltip show, but that would require a fitting selector... I think the easiest would be to use a Script instead to trigger a Roll like /r:
This is exactly what I was looking for. Thanks much!
More post update issues... I have items with fields that fetch from actor, that are currently failing to update unless I either close down the sheet, hit the refresh button, or open the item on the sheet. Has anyone else experienced this? (in image, attack/defend should read 3. they only update if i refresh page/close actor/open item)
A follow up stupid question. Is there a setting I need to configure to allow players to edit richtext fields on sheets they own?
Nope, they should be able to by default
hmm. It works just fine for me, but when my players attempt to edit a text box on the character sheet, the pop-out editor appears, but doesn't allow input. I'm gonna play with permissions and see if maybe I messed something up. Thanks
Hey, is anyone else experiencing that active effects cant be edited on templates?
Confirmed, I'll try to fix it
alright, ty. I thought I may missed something
May I suggest that every installation of the CSB comes with the example-json? Its really helpful to get an idea of the possibilities and how to use the given tools or may copy/paste a few.
I won't include it in the system, but I'll try to make a module, so Users can optionally include that
Is the issue with in sheet editors for rich text fields confirmed as well?
I haven't looked at that
is it possible to make the "configure hidden attributes" window wider?
This is within the realm, but I want to un-tick the "show field controls) box in the number field, what I can read from the documentation it's not confirmed?
I have entered
The idea is that this button should lock the "agility_points" so the player can't edit the variable (until the button is pressed again bult I'll work on that later)
even without field controls the field itself is editable, just without the buttons
After the update to 3.2.1 a filter formula in an item container stopped working:
item.typ==40 and equalText(item.vorschau, 'true')
what do i have to change to make it work again please?
The first seems fine for me but the later should be item.vorschau instead
And the Script would be something like ```js
%{
const component = entity.getComponentMap().key;
component._showControls = !component._showControls
entity.entity.update('system.body': entity.entity.system.body);
}%
In the item filter formula
item.typ==40. works
item.vorschau works
both together (item.typ== 40 AND item.vorschau) dont work!
was something changed with the AND operator?
and, not AND
no difference, this doesnt work either:
item.typ==40 and item.vorschau
try:
item.typ==40 and item.vorschau=='1'
That worked, thanks!
Ah sorry I did not notice this message, I'll look into it, thanks!
Do I understand correctly if the component key is Agility_points
%{
const component = entity.getComponentMap().Agility_points;
component._showControls = !component._showControls
entity.entity.update('system.body': entity.entity.system.body);
}%
this label roll message used to let me activate a checkbox in an item from outside. it stopped working after the update. any idea how to fix this?
i think 'true' needs to be changed to 1 or '1' or true or whatever?
Has anyone managed to do an inventory with item count or something similar?
I have numbers associated with items and I want to provide the ability to update that from the actor sheet. In my case it's incrementing/decrementing a number so a button would do fine too.
Actually I'm just realising it's probably using what Pete mentioned XD
The autocompletion values should be separated with ','. The arrow next to the Text Field indicates that autocompletion has been detected in your field, but if clicking on it does not show anything, there must be something wrong in the configuration. Can you send a screenshot of your element's config ?
I'll add that autocompletion is not a list of allowed values, just hints for you players.
Yeah. But I've corrected a few things:
%{
const component = entity.componentMap.Agility_points;
component._showControls = !component._showControls
await entity.entity.update({'system.body': entity.system.body});
entity.render();
}%
Here's what I started with for the auto complete. Once I get it working, I want to add more categories, but there's no point in adding more than a dozen entries if I don't have the formatting done correctly.
can anyone help me here please?
Is that for one of the lables in the roll container?
its a label in the item container yes. it lets me activate/deactivate an item without opening it
Then there's a version on the wiki that works. Give me a second.
Just be sure to changed 'equipped' to whatever key you're using.
that worked, thx so much!
Cant seem it to work, but i think ill leave the setting for a more streamlined version of a tabbed tanel with leveling and play stats
Well, your setup works on my instance ^^"
What browser are you using ?
hopefully quick question here, i'm trying to paste some icons in just through a label here and I notice there's a border around images in general here. is this CSB doing this, or is this foundry? in any case, is there any way I can remove these borders?
That's probably Foundry, we barely do anything in the RTA itself
ah, i only asked because it seemed like there was similar formatting around the icons here as well
Hey. I'm stuggeling with that formular:
${sameRow('Attribute') == 1 ? STR_BONUS : sameRow('Attribute') == 2 ? KON_BONUS : ${sameRow('Attribute') == 3 ? GE_BONUS : 0}$
It suddenly works when I remove the third operator. And I dont know why.
but in that case I'll look around on the foundry side of things anyways
Can you show the HTML in the RTA?
<p><img src="icons/Genshin/anemo_50.webp" alt="" width="50" height="50"></p>
though I was able to find someone complaining of the same problem for foundry in general
nmd just found my mistake
Yeah, probably the best you can do
Is Custom System Builder going to be updated for v12?
Mostly Edge, because I was having loading issues with Firefox and because I use it for literally nothing else, so it doesn't have a million tabs open.
With that said, it's now working for me too, so 🤷
It will be, but it will take a while
Do you have an estimate?
nope
For HP specifically I use a label for both values. There is a hidden (to players) tab where I can set both values, but the main mechanism to handle HP is via the Always HP mod. CurrHP is a hidden attribute modified by Always HP.
Why it happen?
start after upgrade - I can't directly add item from compendium. But Can if import it atfirst.
I seem to have a bug where I cannot add active effects modifiers whatever role I assigned to the Minimum Role to edit Item Modifiers. Are the active effects modifiers not affected by that setting ? Should I change something else ?
A fixed bug with a pending release
Great, thanks !
Quick question, has itemData.system.documentTypes moved somewhere else in CSB? Is it itemData.system.template now?
Isn't it game.system.documentTypes or what exactly are you looking for?
Oh perhaps, I'll take a look, cheers
Is there a way to add custom active effects and/or unique status icons to a type of character? (The current use case I'm thinking of is being able to show the phase for a multi-phase boss.)
Related question, is there a good way to dynamically add elements to a sheet based on an entered value? The use case here is that multi-phase bosses have HP break points based on the number of phases they have and the number of phases they have can be freely determined by the GM. Ideally, I'd like to have labels showing the HP values for each of their break points and, possibly, boxes for the additional abilities they gain based on their phases and that come on line as they go through their phases.
(I'm also game for trying an alternative setup if it could convey the same information without needing to bother with dynamic elements.)
The only 3 Components, which are dynamic, are Dynamic Tables, Item Containers and Conditional Modifier Lists. That's what you have to work with if you have dynamic content. Or you implement your own Component, which does what you want
So no way to just add components to a sheet (or remove them) based on a value?
Nope, not with the default components
I might be misunderstanding that (I probably am, since I'm still getting a handle on active effects), but it looks like that requires running a script, so there's no way to have the extra active effects be innately part of a template?
Some modules can adjust the Effects in the Config. I've used "Custom Settings Expanded", but that seems to be bugged right now. "Monk's Little Details" might be an option, but I've never tried this one
That would still be adjusting the effect, not setting something up on the character sheet.
My idea was for a GM to be able to create a Progressive Boss (our systems multi-phase style of boss) and to have that style of character automatically have a condition that gets triggered as it goes through its phases, preferably without adding it to the general list of conditions that you see when right clicking a token.
Based on what you're saying, and the page you linked me, it seems there's no way to make it inherently part of the character type, but it might be possible to write a macro that would add it?
Yep, if it's not part of the Effect List of the Token, then the only way would be with Scripts
Actually, on that note, I'm not sure how the Configure Active Effects button, on template sheets, is supposed to work. Clicking it opens a window that lists all of the status effects I've set up, plus an extra line that doesn't seem to have a title, but they all say "(0 modifiers)" and expanding them shows me the header for a table (like the item item modifier window, but there's no button to add entries. Am I missing something?
That's currently a bit bugged... But I've already fixed it, so only a release is needed
why not putting all in the character sheet, and then hide parts with a formula based on hp, status or something like that?
A boss can have an arbitrary number of phases. Realistically, I could assume a reasonable upper bound and simple create a few extra elements beyond that, but that kind of solution strikes me as messy and it can break in ways that would be opaque to a GM who doesn't know how it's being handled.
(E.g. if I create 8 hidden elements, under the reasonable assumption that bosses are unlikely to have more than 6 phases, and a GM creates a boss with 9 phases, there's going to be a problem.)
make each phase as an item, with a checkbox somewhere called something like "active", when making the encounter, just add as many items as phases, put a description or something as a memo for "when to activate" and just activate the checkbox manually, with a macro, ascript or something
than you can do things like "this phase when under 50% hp" or "this when someone in the party wears red"
then you just need to put a check into the modifiers to look at the checkbox, A "if this is not checked, do nothing, if not, do X"
That could, potentially, work, but I suspect the steps that would be needed to make it useful would make the item portion redundant.
(I don't know if I already mentioned it, but while the number of phases is arbitrary, it's represented by a single variable and that, plus another variable, determines the size of each phases, so the relevant numbers are easy enough to calculate.)
the item approach allows you to put the new things the boss can do in the item itself
with something like a numbox for "how many phases" you would need to put every possibilit in the base sheet
Ah. Unfortunately, those new things are already items (they can be used by regular monsters and characters, the boss just gets extra instances of them), so I wouldn't be able to put them inside of an item that represents the phases, otherwise that would be a very good solution.
if they are already items, just copy the code into the new item
I mean, open the template, and control copy the item
you then just need to modify the item to do a few more checks
without seeing the sheet I can't offer more suggestions
in fact, you can probably modify the existing items, just add the checkbox in a hidden panel
I'd rather avoid creating duplicate copies of every monster ability just so I can have a progressive boss version. 😓
There are quite a few of them and the macros can be quite complex (once they get added), so trying to maintain two copies is asking for trouble, in addition to just creating a lot of clutter.
... That might be more workable ... maybe. It's definitely something to think about. Thank you.
then a hidden panel, call it boss ability and make it so just a gm can see it, then add the logic to the modifiers with a if checked go see the phases codes, else ignore it
Something like that might work. I'll have to think about it.
Hmm. Could I put a script or formula in a hidden attribute that creates an array of integers based on a pair of number fields?
You could, but that will be converted to a comma-separated value at the end. But parsing that shouldn't be an issue then
I know DAE is listed as Does not work with CSB, but I was under the impression that was because it doesn't necessarily talk to CSB and CSB wouldn't take its changes into account, but you could still use them together. It's not supposed to completely break character sheets, right?
I'm asking, because I tried playing with it, but setting it to load for untested games resulted in my characters looking like I hadn't set a template for them and reloading them just produced some errors. They came back after I turned that setting off, except for the one I tried reload, which I can't even open now.
Fortunately, I tried all this on a duplicate world, so I'm not too concerned, but If this isn't just me messing something up it might mean the compatibility page should be updated.
Can you post the error message?
Poking at them now.
Ok. This is a lot. So, first off, just loading into the world with that setting checked produces a few errors. Most of them look like this:
One or two of them, however, looked completely different. The first set also happened early on in the load, while the odd ones happened at the very end.
Opening the sheet that had been previously reloaded was possible with the setting checked, though it still appeared blank, and produced this error.
Reloading it again produced this one.
Disabling the setting and then reloading the world only produced two errors, but they're new ones.
Finally, trying to open the sheet produced a ton of errors. Most of them looked similar enough, but one at the end was slightly different. I'm attaching a single example from the first set and the unique one.
Hopefully something in there is helpful, but let me know if you'd like me to test something else.
2 things are coming from DAE itself. The first one is ValidSpec.specs (dunno what it tries) and the second one is ui.notifications in the setup-Hook (that one could also cause issues in other systems, because ui.notifications doesn't seem to be initialized in that Hook).
Which screenshot were those in?
Never mind, I found them.
validSpec seems to be something that DEA tries to create that lists all the things that a user can modify on a character sheet. I could send you the .js file where it's defined (and where the specific line that's causing the error is), or I could test some other things, but I'm not sure how far you want to pursue this, since it's not part of CSB and I know you already deal with a lot.
To be fair, not until we generally tackle Active Effects. Because right now we don't really support them as much as I would like
More than reasonable. I think it might warrant a warning on the wiki, in that case.
Is there a way to create functions and the ability to pass parameters into them? Trying to avoid updating multiple fields for each update.
Functions for CSB-Formulas? Nope, we don't provide an import for our parser. The next best would be using a Script inside a Label
righto thanks
I’m not sure this is exactly CSB-related, but has anyone ever turned a CSB character sheet into an editable PDF sheet to print it and give to players ?
I can make a counter by symbols in a roll message? Or only by csv?
Like rather than shows 3 sucess in a roll of d10 shows 3 green dots
2nd
I want to put a max value in a number field that it is not editable, a label I imagine. However, this means that it is not identified as Attributebar, what do I do to track it on the resources bar?
You can configure a complex attribute bar at the header of the Template. Just keep in mind, that this bar will be read-only
Hm ok
Thanks
How can i make a macro to update hp?
i tried
let sa = entity.system.props.sangue_maximo;
let selected = canvas.tokens.controlled;
if (selected.length === 0) {
ui.notifications.warn("Nenhum token selecionado.");
} else {
selected.forEach(async token => {
//
setPropertyInEntity('target', 'sangue', "target.sangue - sa*0.25")
});
}
I used props, but I imagine that attributeBar is the right one.
the path
actor.system.attributeBar.sangue
Heya, hoping someone can point out where im going wrong here. New to this so might be missing something obvious.
Trying to calculate Movement Speed for a character where they get 10 extra every 10 levels in DEX.
Under DEX Movement Mod im trying to do a stat total/10 to get how many groups of 10 levels the stat has, to then use that to work out how many +10 to add. However im getting an "Error" and im not sure why.
Origin of StatDexTot if its relevant.
StatDexTot is the output of the DEX Total image
Open the console and show the error message
Sorry, as i said, new. Console?
setPropertyInEntity() is not available in Scripts (same with other CSB-exclusive functions). You have to refer to Actor#update()
Press F12
works on macro or only on sheets?
Only in Sheets in CSB-Formulas (everything in ${}$)
Is there no way to do it with a macro?
ah! thanks got it. Was just me missing something obvious. Had some text modification round the stattot calculation so it thought the output was text. Thank you.
Like I said, Actor#update() (or to be more precise, Document#update()) should help you there
Ok
Hi, is anyone able to explain this error message and if there is a potential solution to someone with limited coding understanding?
at new PlaceableObject (foundry.js:26078:13)
at new Token (foundry.js:58252:5)
at TokenLayer.createObject (foundry.js:34020:12)
at TokenLayer._onDropActorData (foundry.js:41525:20)```
It occurs when trying to drag a character token into a scene, it started when I updated Foundry to version 12.something
I can copy paste an existing token into a scene, just not drag a new one in
CSB is not compatible with V12 yet
any idea if/when it might be?
No estimation on that so far
Ok, as always thank you for all of your efforts you put into this amazing system, very grateful for how accessible you make this stuff for everyone
I may found a bug. When I use
${lookup('Skills', 'Total', 'Name', Skill_Selection)}$
It only shows me the numeric value of 'Total' in a label when I dont use a componentkey. When I use a componentkey the field stays blank. But works fine whe I chose a number field.
Then I guess you have a type-mismatch. You can either cast Skill_Selection to a number or use the 5th arg of lookup to use the lose-comparison-operator == instead of the strict one ===, which is the default
I realized it also dont work with another field that contains a value as a label. Dead shure not a typo
same issue, same factors
And I can reproduce the issue. It stops showing me the numeric value as soon as I enter something into the Component key.
Where to put the 5th arg of lookup in my example?
Arguments are those things inside your parenthesis 😅
Is there a easy way to convert from 3.0 to 3.1 since there is a a change in formula usage?
Sorry if its may dumb to ask, still learning
The old functions are still supported, we haven't removed them
After skill_selection
Hmmm, I get bunches of errors preventing the sheet from loading... since fetch was changed to lookup
I have avoided doing anything with it since moving lol got both versions installed atm
like: ${lookup('Skills', 'Total', 'Name', Skill_Selection, ==)}$ ?
Yes but believe you still need '' around the selection
Actually Skill_Selection is dropdown list that fetches the name of the skill from the dynamic table.
${lookup('Skills', 'Total', 'Name', Skill_Selection, '==')}$
didnt solve it. As soon as I enter a component key its not showing up where it should be.
When I remove the component key its showing up
strange...
Table, value,key, filter,
Is the 5th value sort now?
Haven't gone over all of the changes... /shrug will have to look at them tomorrow
Try using first in front.
I did
like: ${first(lookup('Skills', 'Total', 'Name', Skill_Selection, ==))}$ ?
Boo
Add a 3 =
===
same behaviour. As I enter a component key 😶🌫️ when I remove it 😃
nope didnt do a thing, this doesnt seem to be impressed by the number of = I put it.
Why is it correlating with the component key? Whats the matter here?
Can you open the console and look for errors?
Where can I find it?
Press F12
NS_ERROR_UNEXPECTED: theme.min.js:4
WebGL warning: drawElementsInstanced: Using format enabled by implicitly enabled extension: EXT_float_blend. For maximal portability enable it explicitly.
Focus on those coming from CSB only
some props were not computed
no erros there so far
oh wait I found one
TypeError: Failed data preparation for Actor.c4Gob7K9Bt79UlxL.Item.1liQmHWnpgnjil6V. expression is null
Might be relevant. Try out game.actors.get('c4Gob7K9Bt79UlxL').items.get('1liQmHWnpgnjil6V').name in the console and see what Item name you get
That one is causing an issue
I'll try tomorrow my very best again, but after I deleted the Item it's still not working
Even more strange, I use the _Template from the example.json and it uses the same conditions but my actor with that template works just fine
I just want to double check something. When I get the notice "Some props were not computed." and then a line saying "All props for (actor) computed in 3 loops." Does that mean the issues of the first notice were supposedly resolved in those three loops?
actually, never mind. I looked at the components of the sheet and the one that is giving me troubles is not listed. (However, it is late, so I will return tomorrow with more info)
all my pc/npc sheet data is gone and reset to default after updating to 3.2.1. Is this expected behavior?
my last version is 3.0.0 if it helps
fixed. restored backup. did manual update from 3.0 to 3.1.3 then to 3.2.1. that fixed the problem. must be some compatibility issue jumping from 3.0 to 3.2
I found the mistake. I was passing values from hidden attributes via a dropdown-list and i didnt wrap them up in ${}$ so somehow that lead to that behaviour. I stumbled across because I had a few skills that dont have modifiers from attributes which where displayed correctly.
Hello everyone, I made a little Macro to increase a value on my characters sheets (used this https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Tips-&-Tricks/Macro-for-updating-values as a model and it work like a charm)
But I would like to make it that when a certain box is checked on the sheet the increase was +2 instead of +1.
The component key is "easygoingcheck", I tried to fiddle with the macro myself but I'm really bad at it xD
Is there a way to do it ?
Here is my macro for the simple +1
Heyho its me again. I got a Questions:
Is it possible to make a Dialog Window appear for the GM where he has to confirm first, before the actual roll is done?
Also it would be insane if someone could point me in the right direction to fill a dynamic table with the values from a array.
Hey guys! I'm having a problem with Tabbed Panels. I'm not able to create tabs inside any tabbed panel. Can someone help me, please?
${adversitytoken + 1}$ -> ${adversitytoken + (checkboxKey ? 2 : 1)}$
Only possible with a custom Script
Alright - thanks much ^^
Perfect thank you !
What is the error message shown in the console?
CSB is not compatible with V12
oh, that's a bummer 😦
thank you eitherway!
Can I reference the item name in a roll message?
When try to open actor with Dynamic table
I'll answer myself, its the name variable
I fixed an issue like this for the next version. Can't be totally sure this will fix your case, but if you can send me an export of your character (I don't need the template), I can confirm it for you 🙂
issue was in string count(lookup('c_item_table', 'c_item_name')) where c_item_table it's dynamic table - and if row was empty it fail some how. So for now I remove it from my template.
Yeah, really looks like the issue I fixed 🙂
I have been made aware of a blocking issue in 3.2.2 creating duplicates of predefined Dynamic Table rows under certain conditions. I'll fix it soon. In the meantime, I have rolled back the release, the latest version is 3.2.1 again. Sorry for the inconvenience :/
I have items linked to a specific actor, and a macro that displays items that meet specific conditions in a chat message with a link to open that item. The intent was to allow items that have been 'revealed' to be seen by all players. But I think because the players cannot have access to that actor, they can't see the items either.
Is the solution to have the macro go find the compendium item that is the 'parent' from which the item instance is created, and display THAT in the chat? (and give the players limited access to the compendium)
@formal goblet do you havr ko-fi account? I see only @brittle moth on the main page of the CSB project.
I forgot to try it until now, busy week
And it works, thank you very much
🫂
Fixes for the fixes !
#package-releases message
**Version 3.2.3 is now generally available, with the following changes : **
Fixes
- Fixed an issue with Dynamic Tables when deleting rows
- Fixed issues with 3.2.2 migration not being complete
Fixes from 3.2.2
Fixes
- [#370] Fixed an issue causing lookup to return an empty array when values should be found in keyed Labels
- Fixed an issue causing Item Containers to retain values of deleted Items
- Fixed a performance issue with sheet computations
- Fixed an issue with updates when using fetchFromActor function after setPropertyInEntity
- Fixed API-links in Readme
- Fixed Active Effect config
- Removed 'customProps' from ComputablePhraseOptions
If you encounter any issue with this new version, please post an issue on Gitlab : https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
the image i sent is the formula for "Label Roll Message"
actually i sent the wrong image, give me a second
yo, so i was having a few questions about a certain thing i'm trying to do:
basically, this is a formula (idk if thats the name) for a label roll message, and it works fine
it just rolls a d20 with those 2 bonuses and all. But how would i make it so that, the label's text is just bonus + attributeBonus? I'm not sure what i should do for that, but i do have a formula which is basically the one i just sent, but without the [1d20] (thats getting an error, unfortunately)
Hey, just thought i'd mention this, since updating, my lookup functions for item containers are returning blank. No error message appears either.
Like, all of them, but lookup for dynamic tables seems to be working just fine.
Nope, I don't have one
Probably the solution, yeah
Hey folks, can someone help me? I'm trying to use an user input in a roll, but I can't make it work.
Here's what I am trying
</br>
Rolling ${?{dice[number]|1}}$ dice
<p>Rolled: ${roll:=[dice* 6]}$ = ${roll}$```
I wanted to ask the user to input how many dice they'll roll
And then roll that many d6
<h2>Risk Roll</h2>
</br>
Rolling ${?{dice[number]|1}}$ dice
<p>Rolled: ${roll:=[:dice:d6]}$ = ${roll}$
Oh thanks a lot
Man, I'm struggling to undersand the syntax. Not a developer hahaha
Hey, any idea about this right here? @formal goblet
Is there a way to show the individual results? I mean, If I rolled 3d6, show each one of them separately?
I mean if it's a label roll you can just click it and it'll show you the results.
You're missing a parenthesis here:
Err... Oopsie
Seems like I forgot to uncomment a line after some tests... I'll fix it right now, sorry ^^"
HAHA, well I'm glad it's an easy fix, thank you for your service!
Nope)))
I able to reproduce it on 3.2.3
1 you need clean dynamic table.
2 Press create new row
3 Than you need to be fast))) close the Actor sheet
and it will no open anymore due to error
after export sheet I have found such record inside the actor
"c_item_table": {
"1": {
"deleted": false
}
Can you show me your label configuration ?
Folks, this kind of math works here?
${ dice == 0 ? ${math.min(${[1d6]}$ , ${[1d6]}$)}$ : Testing' }$
I wanted to be able to show the results like in the image, and then pick the highest or lowest among them to compare and see if its a sucess or failure
You have way too much formula inclusion ^^
Your formula should be :
${ dice == 0 ? min([1d6], [1d6]) : Testing' }$
Oh, way prettier hahaah
Thanks
thank you very much !! but i have a small question:
First image is the formula. This (second image) is how the label appears. I suppose its because of the 4 functions (?, i dont really know what to call them.) Is there a way i could make only the total (which is "bonus + attributeBonus") appear? Sorry if this may be a basic question or something
Even better, using Foundry's dice rolling system :
${ dice == 0 ? [2d6kl1] : Testing' }$
Which is 'roll two d6, keep only the lowest'
The official website and community for Foundry Virtual Tabletop.
Genius!
I am trying to dig into the Script for updating multipe rows in a Dynamic Table. I am unsure what to make of the ...row, portion of the below exampe which is in the wiki. I understand with filters I can probably filter down to specific rows beyond just those that are not deleted, and my understanding of uses: parseInt(row.uses) + 1 is that uses is the column, and we are setting it to its current value + 1. I have tried poking around a bit and trying different shots in the dark, but I keep getting a "Unexpected token ':'" error, so I know I am missing something.
first(lookup('attributes', 'modificator', 'attribute', sameRow('baseAttribute'))) + (sameRow('masteryWithSkill') ? lookup(...) : 0) + (sameRow('specialWithSkill') ? lookup(...) * 1.5 : 0)
In case it is something that I am doing wrong with my code, I am trying to set a column to the value of a drop down menu when I push a button. I know there are things missing, but again, it is the ...row, that I do not know what do with in this case.
%{const table1 = entity.system.props.table_test; Objectvalues(table1) .filter(row => !row.deleted) .map(row => (col1: '${test_dd}$'})); await entity.update({'system.props.table_test': table1});}%
oh fuck...
well, I foudn one issue already
Object.values, not Objectvalues
... is the spread-syntax in JS. Here are tons of examples: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected. In an object literal, the spread syntax enumerates the properties of an object and adds the key-value pairs to the object being created.
Ah, thank you. I will read that a bit more. I put the ...row, back in, and now that the Object.values has the period like it should, I am getting a different error, but I will read more on the ... stuff first
Finding more syntax errors in m hasty typing. I am no long getting errors when I push the button. I will have to poke around more after lunch. Thanks for your help
Why system keeps deleted rows?
in dynamic tables
Okay, I see
There is an error with the lookup function, I'm fixing it, and another with errors in prefixes and suffixes 🙂
Only predefined lines are kept when deleted, to remember they were added and deleted
hm need to check this 🙂
Yes it works as you say) but
"c_item_table": {
"1": {
"deleted": false
}
wasn't predefined row
Every row is created with the deleted flag, it's a legacy thing. It will be removed one day ^^"
Erratum : It's to maintain consistency with predefinedLines. Standard lines will always have this to "false" though
Well, to be fair, having it undefined wouldn't cause much problems either
Hello, can anyone assist me with a formular and checkboxes?
I want to add a value from a dropdown-list and a 1 or 0 from a checkbox. Also I want to check if another checkbox is checked so it repeats 0 as value.
${(sameRow('Main_Language') ? (sameRow('Level') == 3 ? 1 : 0) : sameRow('Level'))+sameRow('ReadWrite') ? 1 : 0)}$
Something is off with my formular
Yeah, true... To be considered for a future version then ^^
I think this might be a bug, but I'm running into an issue where if a component goes too far to the right it will push other components partially out of the scrollable area of a window.
Put them inside a panel?
They are.
Unrelated question, but is making a panel collapsible the only way to give it a visible title?
... + (sameRow('ReadWrite') ? 1 : 0) Parenthesis are important because the + has precedence over ?
Yep. Otherwise just use a Label
I've found using labels doesn't always line up as well.
I have gotten the script for updating multiple rows in a dynamic table to stop throwing errors, but I must admit I am a bit lost as to to implement it into the sheet. I am assuming I do not want it in the label roll message as that does not seem to be updating the table itself.
To explain my end use for this, I am making a sheet for Panic at the Dojo. Characters can have up to seven stances that have a stance name (a text field the user can input), a style (option from a drop down menus), and one or two forms (options from drop down menus). Each stance is given its own tab in a tabbed panel. At level 10, players an use two stances at once. Easiest thing I can think of is have a button or something to fill in a dynamic table with the stance names, styles, and forms, so that two drop down menus can be populated with the stance names, and then the styles and forms are pulled in to labels with a simple lookup.
I take it there's a reason you're giving each stance a tab in a tabbed menu, rather than a line in a dynamic table?
Also, unrelated to that, but shouldn't you be able to just put a Check Box's key into a visibility field, to make it toggle another component's visibility? Am I forgetting something with that interaction?
Stances in Panic at the Disco are fluid things that the players create based on options available to them (once a character is made, the stances are generally set though) and they can change stances between rounds as stances affect what they can do.
I realize this might not be the optimal way of doing it, but it also seemed most user friendly with my current skills and knowledge
Got it. There's a lot of information that needs to be visible. In that case, tab panels make sense to me, even if they complicate things a bit.
The thing is, the key info is just the stance name (to identify which stance it is), style, and form. Everything else on that is derived from the style or form.
(well, and a few stance agnostic things)
You could have a dynamic table where they enter the names of their stances and set the styles and forms and then use that table to populate both the tabs and the drop downs. That might also let you set the tab names to the stance names, rather than leaving them as generic "Stance n"s.
I'd say Items would be better
Those stance names were ones I entered for example because I lacked creativity at this point.
Before I dive into how items work, would items solve my issue of being able to dynamically pull the seven user made stances? Panic at the Disco is a game where players go from level 1 to 10. For levels 1 through 9, having the seven distinct tabs for the stances is fine because they only use one at a time.
At level 10, they can use two of the seven stances they built at once.
And yes, it is something where I can have them manually input the forms and styles of the two stances they want to use, but that becomes tedious and is prone to user error.
Don't they have to do that, at least once, regardless of the setup, since the stances are custom made?
The ideal in my head (which admittedly is probably not ideal) is to have a button they can press that pulls stance_name1 into row one, column one of a dynamic table, then style1 into row one, column two, and form11 into row one, column three, and form12 into row one column four, and then stance two info into row two....
Once they set the simple stances, they do not need to change them. Level 10, they can pick two stances at once. While the stances they can pick from are effectively static, the which two stances they are using on a give round are not.
The item would contain all necessary information, that is tight to a stance. Once that is setup, I'd create an Item Container with a pseudo-checkbox, which shows, which stances are currently active
So are you saying you want all of the information that you're showing on the tabs to appear in a dynamic table?
Just the stance name, style, and form. All of the other information below that is derived from style and form and can be populated on the fly with lookup and such.
I get that it can all be populated on the fly. I'm trying to get an idea for how you want all of that information displayed and presented to the player, after the sheet knows what information to display.
I have not dug into items yet, I admit. I am not sure how involved it would be to have the users create items.
I will do a quick mockup
Items more or less behave the same as actors (with additional features)
And some, very important, absent features. (Items can't hold other items is the big one.)
Well, that is a limit from Foundry itself 😅
Ah. That's unfortunate, but it does explain why it would be such a headache to fix. (I only brought it up because it's important to keep in mind when planning these things out.)
Ok, what am I doing wrong here? '1FCE' is the key for a check box. It should resolve to true or false and I know that it does, because I fed it in to a ternary operator and it works. So why does entering it in a visibility field not work?
Should be enough tbh. Try out game.actors.getName('actorName').system.props.checkboxKey in the console
Individual stances have the Stance name as an editable text field, and the style and form selections as drop downs that pull from dynamic tables, and then labels populate most of the rest of the info.
For level 10, my idea was to have a new tab, where there are two drop down menus with the stance names for what they made with stances 1-7. Based on what they select, The style names will fill in as labels. All of the other information the player needs will be populated based on what those styles and forms are.
It seemed to me that this might be the solution for my approach, but I am having trouble getting it to work: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Scripts/Scripts-for-Dynamic-Tables#3-script-for-updating-multiple-rows-in-a-dynamic-table
Ah. Do keys not like staring with numerals?
Well, haven't tried. It does cause conflicts with the Object Dot Notation, but not with the Object Square Notation
entity.system.props vs. entity['system']['props']
So, why not have a dynamic table that consists of a text field for stance names and 3 drop downs for the styles and forms. Then have another pair of drop downs that let you select your active stance and then populate the appropriate fields based on what was set in that initial configuration dropdown?
The first has strict rules for variable names, while the second one has more freedom
Alternatively, you could do something similar with items, though I'm not sure it would actually improve things over much.
I'll keep that in mind in the future. Thank you.
This I think is probably the best solution for the box I have coded myself into. I might still keep the stance info as tabs, but have the table above that for them to select and such. I will need to poke around more... after I eat something.
Thank you
You could also just put the table in its own tab and have the other tabs populate based on that table.
I'll still suggest Item Containers over Dynamic Tables
My issue with item containers is... my own fault. I already keyed in all of the static data in dynamic tables and I have a mostly functional character sheet with them, with the exception of this level 10 stuff, and a few things I have not gotten around to.
I might be missing something, but setting it up using items would still require them to jump through similar hoops if they want the stance's information displayed on the sheet, so the main difference would be whether they set the names of the 7 stances and their details in a discreet item or on a table. Also, wouldn't the item approach require more data duplication, since each item would need a copy of the text for each of the styles and forms?
And I have no understanding of items or item containers yet, so I will have to learn that as well (which I should at some point if I want to do more with this). But I also acknowledge that my own ignorance is what made me spend a lot of time going about it this way.
There's an Example-system in the project if you need: https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/develop/sheet-library/Example?ref_type=heads
I do appreciate your suggestion, I just am not at the level where I can take it and just implement it, and I do not want to take up people's time handholding me through it.
I'd design it so that the Item becomes the only source of truth. That would also mean, that the Actor itself would only display reduced information of the Item in an Item Container, but the big advantage would be, that the Actor would become waaaay smaller.
Styles and Forms should be stored in a Dynamic Table (optional globally), where such details can be pulled from.
Part of me is tempted to share the hackjob of a template I have made, but I really should be off for the evening I think.
I think I'm either not understanding how data gets stored, when it comes to items attached to characters, or I'm misunderstanding how you'd structure things.
Ha, what is evening. It's 3 am here
6:30 pm for me.
9:35 here. Once more and we could have a complete chain of 3 hour jumps. 😝
I do appreciate your suggestions and will keep them in mind in the future should I try rebuilding this or do a different project.
Going through this is also good for my own understanding.
How would you design something like Weapons?
The way I did it for my system is I have an item where you can set the type, class, and rarity in the header. It also has a tab devoted to text descriptions, a tab where you can set the weapon properties via drop downs (that reference a table of properties, requirements, and descriptions on another tab), and a tab for enchantments, which mostly revolves around a dynamic table with text fields.
The only parts of that that flow back into the character sheet are the name, the properties, and the descriptions for the properties.
Sorry, the type and class also flow back.
That's how it should be in most cases. Because a User can possess 0-n Weapons, you'll need an Extensible Container. The system has only 2 of them (well 3 to be fair, but let's just ignore the Conditional Modifier List), a Dynamic Table and an Item Container. Dynamic Tables should only be used for entries, which do not contain many data-fields. Once you have too many for a single row, one should prefer using Item Containers over Dynamic Tables.
We could argue, that because a User will always have 7 stances and not 0-n, a static container would be enough. But that would take you the option away to extend this feature easily (what if we want 8 selectable stances instead? What if the amount of stances gets dynamic?).
And also, those Tabs contain quite a few duplicate Components. They essentially do the same in the same composition. Also a good argument to package that into a more modular thing, which can be easier reused.
Dynamic Tables are also useful because they're one of the only components that can be easily programmatically referenced.
I'd argue you only need 4 columns in the tables (Stance, Style, Form 1, Form 2) and I assumed the information the tabs were drawing on was stored centrally and simply referenced by the tab. So now I have a data storage question:
In scenario 1, you have 3 tabs that display a lot of duplicate information, but they do so by using labels that reference a dynamic table that's stored on a hidden tab.
In scenario 2 the 3 tabs instead reference 3 different items, but each of those items have their own version of that central table, so it can be referenced when setting up the items.
Which scenario results in smaller character sheets, or is their another scenario that's better than both?
Item Containers can now also be referenced btw 😅. That was one of the bigger downsides of them, but not anymore
The Item Container can be (and I am extremely grateful for the updates you guys made to Items and Item Containers, they've been amazingly helpful). But referencing random fields within the items themselves, outside of the item containers, can still be a bit cumbersome.
I would entirely get rid of the Tabs and only rely on the information of the Items. The Items would perform a lookup to the Dynamic Table with the additional information about the styles and so on. The Actor would only contain, which stances are currently selected (and maybe some additional info about the selected stances), but not really more.
So Tab1 - Tab7 would be Items. Only the multistance-Tab would be kept
Unless I'm missing something, I feel like referencing a lot of that information (as a player) would be pretty awkward if you have to keep manually opening and closing items to do it, especially if you frequently change stances during combat (which may or may not be a thing in that system). Unless the multi-stance tab would still be able display all of that information, for the active stances?
You could keep the Dropdowns with the name of the stances or you use pseudo-checkboxes in the Item Container. Both allow selections at the Actor-Level
The issue isn't selecting things for the actor. A lot of what those tabs seem to be displaying was text that the player's would need to read, so they still need a way to see that text, either by having it displayed somewhere on the character sheet or by opening up the stance items.
References will get a bit more complex, because you'd have to rely on a Script (at least a pretty easy one)
Just to double check something, where does the reference table live in the item based setups? The character sheet, each individual item, or some third place?
Now with Item Containers also storing the Item ID, it might also be worth implementing a convenience-function to fetch the props of an Item
Could be any place to be fair. If the content stays the same, a global Actor might be worth it
I'm actually not familiar with how you'd go about setting up or referencing a global actor?
fetchFromActor() 😅
You can provide a static name, which pulls the data from the Actor with that name
Yes, I suppose that would be a logical way to fetch data from a random actor. ...
... I should probably make use of that for some things, like my weapons.
I store the XP in a global Actor, because every player gets the same amount
I just stopped using XP. 😝
But that's another good use for them.
Is data in a lookup-table (besides the lookup-key) dependent on Actor data? If not -> global.
Tangentially related, mildly cursed, problem: I have a dynamic table with two text fields, one for a category and the other for the specific. I'd like to have another dynamic table reference them via programmatic dropdowns, so the first dropdown would let the player select the category and then the second dropdown would let them select from the specifics that belong to that category. (All of this is happening on an item sheet, it is unique to each instance of this type of item, and I can't know how many categories there will be or if there will even be any before hand. Like I said, mildly cursed.)
Problems two:
- The first dropdown shows every instance of a category (so if there are three 'Spirit Power' entries, I'll see 3 lines of 'Spirit Power'.
- The second dropdown is completely blank, even after selecting something in the first.
Realistically, I'm probably overcomplicating a feature that's never going to work well, but if you think those are reasonably tractable problems, it might be worth trying to solve them. (Or if you can suggest a saner way to handle this.)
So a set in a Table, which you want to have a subset, and then a subset out of this subset?
Nvm, I got it
Should be doable in my head.
Uhh?
Table A is a reference table that has sets that. Players select the entries on Table B and it would be nice if they could do so by selecting the set and then the item from the that set.
The second Dropdown just needs to use the Formula-option with the lookup()-function to get the option entries depending on the selection of the first Dropdown
That's what I'm doing and I just figured out that I was using the wrong case for one of the column names in that formula, so that fixes the second problem.
Is there a way to get rid of the duplicate entries in the first column?
The first one can be fixed by either a Script eliminating the duplicates or by using an additional Table, that only stores the categories.
Script it is.
So instead of 2 text fields you'd have 1 text field and 1 dropdown in the Dynamic Table
That is probably the more reasonable answer, except I should be able to generate these things programmatically (outside of foundry) and I suspect that will be easier without the extra table.
(Also, one less table to deal with.)
My favorite is option 2 because it is fail-prove for Users (there can be typos in text fields, so Dropdowns are always safer). But that's your choice.
Users shouldn't be filling the reference table out. If I'm lucky, it should come straight from the LaTex we used to generate the manual. (If it can't then the table won't be useful and I can just drop it altogether.)
You're importing from latex? This will be fun 😅
No. Another dev is importing from latex, meaning we're also going to add a game of telephone to the procedure. 😆
I'm sure this won't explode horribly.
Can I use JS in the dropdown key formula and do I have access to Sets and the new Set function?
Yep
Huh. Ok. I just tried %{return [... new Set(${lookup('ExtraMenu','Sel')}$)];}% and I got an error about a missing ')' and I'm pretty sure both sets are properly matched.
What is the exact return of the lookup-function? That is what will be passed 1 to 1 to the Script
The function returns an array (according to the documentation), but I just realized something. Don't CSB scripts turn arrays into comma delimited lists when they pass them to JS?
Object.values(entity.system.props.table).filter(row => !row.deleted).map(row => row.columnKey) would be my preference instead of the lookup()
Exactly that
Information about types gets lost
I'm having trouble parsing how that code is supposed to work and how to modify it for my specific use case. I'm going to take that as a sign that I should stop and eat something, rather than continue to pest you.
As always, thank you for all of the help.
Oops, forgot props 😅
That explains my confusion. I thought I was missing something weird with Object.values.
Well, I thought 1 step ahead 😅
That works perfectly.
On the topic of using things in ways they probably weren't meant to be used, can you use a CSB formula or JS in item modifier keys?
That makes sense. Still, it continues to impress me how insanely flexible CSB is. I think most reasonable systems would have looked at half the things I've wanted to do and started laughing.
The complexity is actually no joke 😅, we spent quite a lot of time for code-refactorings alone in the past months
There's no way I can shove a matrix into a Hidden Attribute, is there?
Or make an Item Modifier alter a single element in an array?
Nah, will be converted to CSV.
Also nope
I figured that was the case.
Ok. Sanity check time:
Tracks come in 3 speeds and each track has 7 facets that may or may not grant a perk point. Characters can get more than one track of the same speed, but that causes their granted points to multiply (I.E. if both corresponding facets grant a point, they gain 1 point, otherwise they gain 0).
Currently, I'm considering creating a hidden attribute for each speed /facet combination, but that would mean creating 21 hidden attributes just to hold the perk points, which seems wasteful. Especially, because I want to have a visible grid showing when they get perk points, but since Item Modifiers can't modify checkboxes I can't just jump straight to the grid.
... Is there a way I could set a Label's value to true, while also having it display as something prettier (like a check or an emoji), without having to upload a .css sheet?
Nope
That's what I thought.
Ok dumb question time. Just updated to newest version, and now i cant open actors? Started a new world as well and cant edit actors in that either. Am I missing something?
What version of foundry are you on?
11.315
Ok. So not 12, which is good. What happens when you try to open or edit an actor?
Nothing, no options at all for opening actors
You mean like the actor tab isn't there on foundry's sidebar?
pffh annoyingly the server im hosting on has just gone down so cant screenshot. The actor tab is still there and the actors that were setup in the world i was working on still exist. but theres no options for "opening" them.
In the mean time while im trying to get server back up. is there a simple way to roll back to a previous version of CSB?
May have something to do with a “meter” component which is bugged?
so these are the options ive got.
also doesnt appear to be registering the templates i had set up.
Creating new actors has the same issue, no options to open them.
im not sure what you mean by "meter" componant
I don't think the right click menu normally has an open option; you just left click on the actor? Similarly, the templates you have set up wouldn't show up in the window shown in your second screen shot. You'd need to create the character as a Type Character and then you'd get a drop down to select the specific template.
left clicking does nothing. it did work that way pre-update. and the templates were set up that way, pre-update.
Just to double check, what version were you using before the update?
Not sure, i only installed 2 weeks ago though so im guessing the previous version
have just noticed ive got the same issue on items
Ok. What does the console (hit f12) say if you left click the name of one of your characters?
Opening console, i get this
which is odd as my resolution is definatly not that.
This is the error I get trying to open actor
That looks like there are some files missing, which puts it outside of what I'd be comfortable trying to trouble shoot for you. Sorry. (I'm sure more experienced people will be able to help.)
Ok, thanks the the time anyway
Actually it doesnt have precedence. I Just want to add the value to 'Level' when checked.
Cursed question time: Hidden attributes will turn any arrays into CSVs, but Array() can turn CSVs into arrays. So, could I put a JS script in my item modifier that takes the Hidden Attribute CSV, converts it into an array, iterates through that array (doing its multiplication), and then returns an updated array for the Item Modifier to set the original Hidden Attribute to?
Better question (because I've already written a function that can do every part of that up to the set): How bad of an idea is that and will it explode if multiple items want to do it to the same Hidden Attribute? (The math on that second part should be fine, so long as they do it in sequence, regardless of order, rather than both acting on the unmodified Hidden Attribute).
Try out CTRL + F5. Seems like the Cache is playing against you.
#package-releases message
I swear I'm trying to fix everything !
**Version 3.2.4 is now generally available, with the following changes : **
Fixes
- Fixed an issue where Item Container were not referencable anymore
- Fixed dynamic table's internal properties adressing
- Fixed issue with lookup erroring when no data was found
- Fixed issue with Label prefix & suffix causing sheet to not render when Formula errors
If you encounter any issue with this new version, please post an issue on Gitlab : https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
Ah, have submitted bug report for my issue. but as an intermediary action, could you update the manifest url for the previous version? the link in the version page for 2.4.3 downloads the new version, not the 2.4.3 version. Would like to backdate system while instabilities exist.
Hello 🙂
What is your Foundry version ? 🙂
You are definitely not in the latest CSB version. FYI, CSB is not yet compatible with Foundry v12.
Okay I see. 2.4.3 is listed in the versions page for users still using Foundry v10
If 3.2.4 is not stable enough for you, 3.0.0 should be the version you seek 🙂
Its manifest link is https://gitlab.com/custom-system-builder/custom-system-builder/-/raw/3.0.0/system.json
I tend to delete old versions from this page to avoid cluttering it
Ah perfect. Thank you very much. Issue i was seeing not present in that version. Wasnt looking forward to facing a group of hangry nerds so thats very much appreciated!
I understand you wanting to have the stablest version possible 🙂
But I must warn you : there are issues on every version (at least I assume so, because I don't know yet for the latest version :p), including the one I linked to you. Many were fixed in version 3.1.x, so I encourage you to try newer versions when you have the time to do so 🙂
The fact that I released so many new versions in the last few days does not mean the system is unstable or buggy, but that we're actually working hard to make it better even in the most obscure cases 🙂
Oh very excited for latest update and definitely understand the iterative process of development. You are doing amazing things and looking forward to updating. My bad for doing so the day before a session.
Ok. I have a new problem. I put together a macro that lets me get the names of targeted tokens (as opposed to just a single name for a targeted actor) and now I want to be able to call it in a roll message. This mostly seems to work, except for when a token with a ' in their name gets targeted, which causes it to throw errors. I also only get this error when I call the macro in a roll message (both normal roll messages and my weird referenced ones).
Here's the code for the macro:
let stooges = [];
game.user.targets.forEach((dupes,ind, arr)=>{
stooges.push(dupes.document.name)});
if (stooges.length > 1){
let holding ='';
stooges.forEach((dupe,ind,arr)=>{
if(ind<=stooges.length-2){
holding +=dupe+', ';
}else {
holding +='and '+dupe;
}
})
return holding;
}else{
return stooges;
;}
Here's how I'm calling it %{return await game.macros.getName('User Multi-Target').execute();}%
And here's the error I'm getting:
(For reference, the character that causes this error is named "Epsilon's Test Char".
I suggest that you escape the quotes. You can use String#replace() to achieve that: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace
The replace() method of String values returns a new string with one, some, or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function called for each match. If pattern is a string, only the first occurrence will be replaced. The original string is left unchanged.
I thought I might need to do something like that (though I didn't know the proper way to do it and the ways I tried didn't work). I am a bit surprised that it's not an issue in other contexts, like referencing the same name, in the same message, using 'name'.
It's not an issue in Formulas itself, but it becomes one when working with Scripts
Makes sense.
Also, not to be pushy, but did you see my question about converting CSVs to arrays via JS, working with those arrays in an item modifier, and then using the set mode to write an updated array back to a hidden attribute? I'm mostly worried about running into some sort of race condition if multiple item modifiers try to set the same attribute, because I don't know if they'll work sequentially (order shouldn't matter) or if they'll both act on the unmodified attribute.
Modifiers are handled sequentially, that's why every Modifier has the Priority-option. Small number means higher priority
Unfortunately, they'll have the same priority (at least numerically) since they'll be coming from items generated from the same template.
But if that's not an issue I'm all good. Thank you.
I'd say test it. I haven't worked with this approach so far, so it might contain unforseen things
Will do.
Sorry for the big delay. Not entirely sure what you mean (I am very new to all this) but the 4 is coming from a number field and the max is coming from an equation in a label. I think this image does a good job showing the general set up.
You might need the system.-prefix
I gave that a try and it breaks the bar entirely. Without it it works when its first opened by updating the hp on the sheet does not update the bar.
Then I don't know what goes wrong to be fair
Modules like Bar Brawl have no issues with CSB, so I don't know what is the issue
is there a way to pull the values directly from the sheet rather then using an attribute bar? what would the path for that be?
system.props.key
no luck, that just breaks it fully as well. I might mess with it and see if I can figure it out. I appreciate the help.
I have it working with props.HP and props.MaxHP, no system.
Has anyone tried Token HUD Wildcard with Custom? I can't seem to get it to work
There's an example in the Wiki that uses checkboxes in Item Containers, and the checkbox controls if an item is equipped or unequipped. But it's laggy compared to the checkbox used in the Checkbox component type. Is it possible to get the same functionality another way?
I don't think so, because the state is derived from the state in the Item and calculations can take a little while on updates
Alright. Thanks for the info!
The Example-Sheet is now available as a module
You can now download the "Custom System Builder - Example" via the Package Manager of Foundry. This means it becomes easier to get it and to keep it up-to-date: https://foundryvtt.com/packages/custom-system-builder-example I hope this will help new users to get started with CSB.
Custom System Builder - Example, an Add-on Module for Foundry Virtual Tabletop
Not sure if it's just me, but I get this error.
What the hell? What have you done? 😅
Hmm... when the dev says that, I know I've really screwed something up 🥲
Can you install other modules?
Yeah it looks like it
Wait, did you try to install a system?
It's a module, not a system
THAT explains that
Couple of questions. How would I change the font of just the table title for an Item Container? I'm using CSS, but I only know how to change the font for everything in the table and not just the title.
Other question, I've seen someone with a unique divider for their headers. I'm assuming they're using an image, but I'm not sure how to change it.
@brittle moth Hey, is there an issue with the in sheet rich text editors? Also, whats up with this?
I swear it was working last night
Oh it seems to be my setproperty, but im not sure why it isn't working now
Didn't see anything with Rich Text Editors, but I'm going to look
For the migration... That's a bummer, I didn't count the case where the Dynamic Table has no predefined lines... Dammit...
Could you send me a template or a character with the issue ? 🙂
for the dynamic table, rich text field orrr, the "original or other are not objects"?
I'll go ahead and export my abomination of a sheet anyways
${Total_Dmg>Bar?setPropertyInEntity('target', 'HP', "target.HP-Total_Dmg"):''}$```
Seems like one of these two is causing the issue, anyone got an idea as to how this could be remedied? The error message just has me scratching my head.
Hello, I am New at this.
I am looking to make a Dropdown to select an Item inside an item container, what would Key for the title name of an item sheet ?
The only way I made it work is to write a another textfield inside the Item (item.Name) But is it possible to take the title of the item itself ?.
item.name...
To be more precise, the formula in the Dropdown should be ${lookup('itemContainerKey', 'name')}$
Yes I just figured out, thanks !
Is there a way to force whole number values?
${(DexValue/2) + 2}$ Actions
I want this label to read whole numbers, and if the result were to end in ".5", automatically round down to the nearest whole number.
round(), floor() & ceil() are the 3 possibilities you have for rounding
gotcha, I'll look up those in the documentation. Thank you
It looks as though math.fix is what I'm actually searching for in js. Is this in the roadmap?
Floor works for now though.
If it is in math-js, you should be able to use that as well
I've never seen someone use fix(), but I can imagine cases where signs matter
Can you send me the full error message ? 🙂 The one with "One of original or other is undefined"
Guys did it happens to some of you that during migration for the latest version the dynamic tables off almost all your items and sheets contained rows you never added?
sometimes blank, sometimes like if they were coming from deleted items
Sometimes some rows won't even delete
Hello. I'm in need of help, the faq brought me 90% of the way there.
I have a hidden attribute "StrenghtTotal" with Formula: StrenghtBase+StrenghtBonus+RollBonus
And a hidden attribute "StrenghtRoll" wich uses StrenghtTotal as a parameter to calculate the roll String.
I'm trying to use a prompt
${#?{RollBonus:"Bonus"[Number]|2}}$
${[:StrenghtRoll:] }$
However it doesn't calculate the "StrenghtRoll" after receiving the "RollBonus"
I'd really like to avoid having to put the Strenght roll string concat() in every roll message 😦
What's the error in the console?
1 sec
"ExternalMartialArtsRoll" would be what I called "StrenghtRoll" in my initial message.
I can show the attribute formulas if that helps
Did you reload the character if you have changed the key?
Otherwise that is your issue atm
Yes
I did it again to make sure and it's the same error
ExternalMartialArtsRoll (formula): ${(ExternalMartialArtsTotal)>0? concat(string(${ExternalMartialArtsTotal}$),'d10kh'):'2d10kl'}$
ExternalMartialArtsTotal (formula): ${ExternalMartialArtsBase+ExternalMartialArtsBonus+TempBonus}$
if I remove the TempBonus in the second formula it works (obv)
Maybe TempBonus must be declared somewhere using a label or as an hidden attribute?
And TempBonus is what?
Core Foundry is 11.315, CSB is 3.1.1
${#?{TempBonus:"Bonus"[Number]|2}}$
it only appears in the roll message
So this is the order in the Label Roll Message: TempBonus -> ExternalMartialArtsTotal -> ExternalMartialArtsRoll
${#?{TempBonus:"Bonus"[Number]|2}}$
${[:ExternalMartialArtsRoll:]}$
This is the roll message, the calculations are done in the hidden attributes tab
I was hoping between the prompt and the roll, "ExternalMartialArtsRoll" would stop being not solved because it stopped missing a variable
That won't work. ExternalMartialArtsTotal doesn't know at the time of calculation what TempBonus is. Everything on the Character Sheet, that is not in a Label Roll Message, will be calculated prior
ouch. I guess there's no way other than calculating the roll in each label then?
What if I try to do ExternalMartialArtsTotal := (ExternalMartialArtsTotal+TempBonus)
You can remove TempBonus from the Total and resolve that in the Label Roll Message instead
The roll variable is conditional and has "kl" or "kh" at the end so I'd have to use the total variable to calculate it every time
which is fine and I appreciate the help and the system btw 😄
ExternalMartialArtsRoll (formula): ${(ExternalMartialArtsTotal)>0? concat(string(${ExternalMartialArtsTotal}$),'d10kh'):'2d10kl'}$
Well, that's a dependency issue. Because TempBonus is a dependency on the Label Roll Message-level, everything else, that is dependent on it, can also only be resolved on this level.
I see. Thanks for confirming so I can stop using time to work around it 😄
Maybe I should figure out how to call a function $calculateRoll(TempBonus, RollTotal) if it's possible to do in a roll message
anyways I haven't read enough on the documentation to know if that makes sense yet. (edit: ok it doesn't)
thank you again
I'm back to work
I have a json file I created for a character sheet. Is there a way I am import it to Custom System Builder and use it as a template to create new custom character sheets?
The json-structure has to match the format of a CSB-Template. You can create a Template with a few Components, export it and see how it looks like.
What if I branch off of CSM just to include my own library that has the function I want, to then call it in the roll message
Edit: nevermind I had to apphend to math.js
#package-releases message
Small fix, I hope it's coming to an end...
**Version 3.2.5 is now generally available, with the following changes : **
Fixes
- Fixed issue with 3.2.4 migration on old Dynamic Tables
If you encounter any issue with this new version, please post an issue on Gitlab : https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
Trying to get the CSB built CBR+PNK system working and I need to upload the CSS file but it says I have to do it manually? Not sure how to do that. I’m using Forge and I tried uploading it to my asset library but it doesn’t show up
I had a similar problem, but haven't really looked into it because I'm not planning to relly on CSS too heavily at the moment. With that said, I suspect this is more of a Forge issue than a CSB one.
Is there a convenient way to rotate a label 90°, without using a css file?
nope
That's what I figured. Oh well.
I've encountered a bit of a bug, but I'm not sure how best to word it for a report. Short version, if you have a Table filled with tiny items, that are programmatically set, setting their size to tiny might work on the character sheet, but it kind-of breaks the template sheet. Here's a picture of what I'm talking about:
The stars on the left are generated by the template on the right and that template is ... hard to read. Note there's a, still empty, column to the left of the innate column, but the '+'s to fill it are buried by the innate's code boxes.
Also, mostly unrelated issue, but I don't know why there's such a gap between the major and minor columns. They're all the same size and they should all be center aligned.