#Custom System Builder
1 messages · Page 29 of 1
Dorking around?
Or the shite formula I'm trying to get working?
With the '' it just creates a string.
That one should be fine now
Without it, nothing appears
Check the console then
So, you think the first one should work? With just ${current_hp <= breaking_point ? vehicle_base_speed /2: vehicle_base_speed}$
That's an indicator that one of the keys is not correct
Try out game.items.getName('itemName').system.props in the console and check your keys
Yep, it was an issue with the keys. Thanks!
As always, I highly appreciate your helpful responses and patience.
There's a deprication warning now, having switched to v12. Is there a patch or mod I need to smooth things over?
Top danke! So wie ich das verstehe füge ich dann diese Code zu dem anderen dann einfach dann hinzu ?
Thks for the answers
Someone using the polyglot module?
could you tell me where i put the Language (Foo) item to make it works?
I was trying to make a input text field in a dynamic table allow a player to write another variable to pick that value.
${sameRow('matrizatq_mod', 0)}$
but only works when the input its a number.
i want it to pick a variable like ${atk_mod}$
Use ref() in this case (together with sameRow())
hm
like ref(sameRow())?
or like samerow(ref())?
tried every combination and doesn't seems to work with the script
Give an example with concrete values and what the desired output should be
Ok
the script
${roll:=[ 3d20dhdl + ${sameRow('matrizatq_mod', 0)}$]}$
so
writing these without the ${}$ or with idk but i tested with both
should return a number, like 5.
this atk_mod its a label. The 5.
the image didn't help, but when I said "writing these" it was when I mentioned the field
I want the modifier atk_mod to be an option, so if possible still being possible to write numbers.
${#matrizatq_mod:= sameRow('matrizatq_mod', 0)}$
${#roll_mod:= ref(matrizatq_mod, matrizatq_mod)}$
${roll:= [3d20dhdl + :roll_mod:]}$
If you still got issues, check the console and post the error message
Try out game.actors.getName('actorName').system.props in the console and check your keys
the key its correct
Test this one out
${matrizatq_mod:= sameRow('matrizatq_mod', 0)}$
${roll_mod:= ref(matrizatq_mod, matrizatq_mod)}$
My example doesn't have the variable roll
but that doesnt
same "string error"
And this?
${matrizatq_mod:= sameRow('matrizatq_mod', 0)}$
${roll_mod:= ref(matrizatq_mod, matrizatq_mod)}$
${roll:= [:roll_mod:]}$
${matrizatq_mod:= sameRow('matrizatq_mod', 0)}$
${roll_mod:= ref(matrizatq_mod, matrizatq_mod)}$
${roll:= [3d20dhdl+:roll_mod:]}$
also
Well, that's basically the same we had before...
Does it error out if you add the empty spaces back in?
yes
Well, then without I guess 😅
you help a lot, thanks
Hallo Martin ich habe soweit alles übertragen und es Funzt soweit danke dafür! Hätte jetzt 4 Fragen: 1. Durch die Ausgleichspunkte kann jetzt eine 20 auch zum Erfolg führen. Eine 20 soll aber immer eine Misserfolg sein, wie kann ich das in der Formel anpassen? 2. Ich würde auch gerne Einfügen dass wenn ein Wurf gewürfelt wird da dransteht im Chatlog auf welches Talent gewürfelt wurde. (Diebstahl, Bauen, Reiten etc.) 3. Ich habe ein Label Initiative. Die Augenzahl hier soll immer der Würfel sein. Also 5 wäre w5, 7 wäre w7 10 wäre w10 etc. Kann ich das irgendwie hinzufügen das wenn ein Spieler das würfel zur Turn Order beim Combat Encounter hinzugefügt wird? Aktuell scheint mir der Standard immer bei einem w20 zu liegen. 4. Kann ich euch irgendwie/wo finanziell danken für die Hilfe und Arbeit die du hier leistest?
ok punkt 2 hat sich gelöst hab das grad selber rausgefunden
So, trying to create the dice pools for WOIN, essentially for 1,2 = 1d6; 3,4,5 = 2d6; 6,7,8,9 = 3d6; 10,11,12,13,14 = 4d6; 15 = 5d6.
Would a switchcase be the best for this, or is there a cleaner way of working it out?
I'd use a nested ternary operator for this
do you have an example of this?
${#dices:= value <= 2 ? 1 : value <= 5 ? 2 : value <= 9 ? 3 ...}$`
${[:dices:d6]}$
Ahhh, I see!
${(Gesamtwert <= 0 or RollErgebnis == 20 or RollErgebnis2 == 20) ? 'Fehlschlag' : 'Erfolg'}$- Initiativeformel kannst du in den Einstellungen anpassen.
- Es gibt nen Ko-Fi-Link auf der Projektseite, dem kannst du folgen
top danke hat geklappt! nur bei initiative krieg ich ne fehlermeldung weil es ja durch die formel zwar gerundet wird aber eigentlich eine dezimalzahl ist. habs probier mit der round funktion aber ich mach dann wohl noch was falsch hier 😄
"Enter a Formula without ${}$..." 😅
Ansonsten gelten dieselben Regeln wie bei Labels auch
hab ich auch schon probiert aber dann kommt immer nur null raus
alles klar funzt xD wo kann ich lernen was die ganzen zeichen in den formel bedeuten? bzw was für ne programmiersprache ist das? dann schau ich dass ich da mal die grundlagen lerne, macht voll bock 😄
Hello! is there a way to refresh/reload all actors with a single button? I have a bunch of enemies and made a change to the template they all use, I would prefer to avoid going 1 by 1 clicking this
You should be able to force update all of them, go to the monster template and at the top it should say force reload or reload all @signal river
OMG I love ya, it worked! thanks!
Ok... question. So, if I want to reference a value in an item container, on a different tab... how would I go about doing that?
${fetchFromDynamicTable('electronic_container', 'item_proc_power')}$
That is what I tried, but it is not populating with anything. The item container itself is on a different tab
Item Containers are not referencable (at least for now), so you'd have to fall back to item modifiers or a Script
versteh ich das richtig das bei numbers field keine formel gehen?
Ist richtig
kann man bei dropdowns eigentlich irgendwie einfügen das man dann den ausgewählten punkt mit einem rollwurf verknüft? man kann hier ja die 5 hauptattribute auswählen wo ja schon in ner andere formel definiert war wie der wurf funktioniert
Ist möglich, wirst allerdings auf JS ausweichen müssen
ok ne hört sich zu kompliziert an 😄 hab meine version von foundry aktualisert. scheint alles zu klappen aber ist hier ne meldung die aufpopt. ignorieren?
gibt es bei modulen etwas zu beachten? oder kann man bedanklos die nutzen?
CSB ist nicht auf V12 getestet. Gibt auch bereits vereinzelte Bugmeldungen
i see also besser auf 11 wechseln?
Schau dass Chat Commander drauf ist
is drin
wenn ich ne neue welt machen geht es auch komischer weise
aber auf der alten ist mein ganzes zeug 😄
Mouseover mal das rote Icon
da stand was von core update. hab jetzt einfach das latest bachup hochgeladen und jetzt gehts wieder 😄
Hey all, I have a question about triggering scripts in roll label messages. Can it not process functions defined in script macros? I've been having trouble making it work.
Definition alone is not enough, you have to call the Macro: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Formula-System#334-calling-macros
Hello there! I'm not sure if this issue is with CSB or a FoundryVTT issue, but I can no longer add tokens to my battle maps. Tokens already on the map seem to work fine
Are you using V12? That would be the issue
Kurze Frage, hab für die Healthbar bei Configure attribute bars bei Maximum die Formel reingehauen wie das Leben berechnet wird und bei Value die Zeile im Sheet wo das aktuelle leben manuelle angepasst wird . Wenn ich jetzt im Sheet das leben ändere ändert es sich auch im Icon auf dem Feld. Kann man auch irgendwie verlinken dass wenn ich es auf dem Feld änder es auch im Sheet angepasst wird? Dass es quasi in beide Richtungen geht?
Das System generiert automatisch ne Bar, wenn du ein Number Field mit nem Max-Wert hast. Brauchst keine eigene Bar konfigurieren
ja aber mein max wert varriiert ja z.B bei jedem lvl up dann müsste ich das jedes mal anpassen oder nicht? oder versteh ich was falsch
ah oder kann ich beim dem number field in max auch ne formel rein schreiben?
habs danke!
Ja, genau das
Hello everyone,
Could a kind soul explain to me if it is possible to create consumable items?
I'd like to create items with a limited number of uses, like healing potions for example. These items would be in a dynamic table like this:
Name | Remaining uses | Max uses | Activation
The aim would be to have a button to use the item, which will modify the affiliated stat, life points in the case of a healing potion, and reduce the use of a unit. Ideally, the item would even disappear from the character sheet when “remaining uses” reaches 0.
Does anyone know if this is possible? And if so, could you tell me how to go about it? I've tried looking everywhere with no real success and I admit I'm not 100% at ease with the system, especially as I'm French with an average level, so I don't fully understand everything.
Thanks in advance!
Is there a way to do a slot-based inventory?
It's possible to do so, but it will require a little Script from your side to achieve this effect. Check these sections for more info:
- https://gitlab.com/custom-system-builder/custom-system-builder/#45-scripts
- https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Formula-System#33-script-expressions
- https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Scripts/Scripts-for-Items
If you have difficulties with English... The creator of the system is from France, so... 😅
Tricky, because Item Containers are just displaying Items, they do not contain them. The Actor itself holds all Items
Thanks, I'll have a look tomorrow!
It would be more practical if someone could explain it to me in French, indeed. 😂
Ah, fair enough.
Btw, are we talking about a Dynamic Table with entries or actual Items?
A Dynamic Table with Items.
I have created a Healing Potion item which have 1 use and give 1d6 healing. I drop it into a Dynamic Table named "Consumables".
But maybe it's not the good way to do it.
So a Dynamic Table with an Item Container?
My bad. It's indeed an Item Container and not a Dynamic Table ! 😭
Alright, that's an important difference 😅 .
Your Script should look like this then:
%{
const remainingUses = linkedEntity.system.props.remainingUses;
remainingUses <= 1 ? await linkedEntity.delete() : await linkedEntity.update({'system.props.remainingUses': remainingUses - 1});
}%
Thanks !
So, in my Item, I go to item modifier and put this script, that's it ?
No, put it into an Item Container
It should be in the Label Roll Message of the Labell
Hmm I have another question. Is a formula like ${ [1d20] }$ considered a Roll() object that could be passed to a script in a roll label (%{}%) for example?
nope, it will return a number
Hmm, okay. I'm a little lost on how to do what I want here. Basically I have a macro which defines an async function which takes a Roll object as input and modifies it (turning 1s to 10s and reevaluating highest/lowest), and I want to connect that through the CSB formula roll so that it can be applied to rolls made via CSB buttons. Is this possible to do?
Anyone know a way to set a label's contents to the entry of a dynamic table dependent on the value in another number field?
I'm a noob at this but I'd guess a combination of switchCase and fetchFromDynamicTable
Do you know where I could find out how to use those?
So, say I have a table called charCurrHealthTable, and columns named 'healthValue' and 'healthDescription'. Would this get a specific healthDescription dependent on the value of charCurrHealth?
fetchFromDynamicTable('charCurrHealthTable', 'healthDescription', 'healthValue', ${charCurrHealth}$, '=')
I think you'd need to use '==' but I'm not sure.
Oh yeah, good point -
The only thing would be this here: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Formula-System#334-calling-macros
Yeah, I've been messing around with that but my JS ability is pretty limited. I can't seem to figure out how to produce a roll using the Label Roll Message and simultaneously have that roll subjected to the async function in the macro.
What'm I missing here? 🤔
Is there something I need to do for the label text to go through that code and display the result, instead of plain text? (Also yes, I fixed the '=' to '==', my bad.)
Oooh huh.
Do rollable table results have to be numbers to work in the ${[#table]}$ format? I'm trying to use a rollable table with HTML formatting in the results and it's throwing an error.
Nvm, trouble was with string delimiters. Had to use a different workaround.
One final question for the day: How complex can Roll Label Messages get in terms of formulas? Will there be a significant degradation of performance if I have a button checking a whole lot of attributes to determine what kind of roll it makes?
Is there any way to fetch the contents of a specific item container via a script?
I may be wrong, but I think that the item containers are just "displays". And that the items themselves are all just contained by the actor.
When you pick what an item container can have in it, it is just what is actively displayed. Almost like they act more as windows into what templated items are put on the actor.
Is there sny way to fetch items, then?
Oohh, sick! Thank you!
-Using Custom System Builder
Problem: Can't edit attribute bar on a token. As in, I have the bar set up and showing, but I can't add or subtract from its total. I try clicking on the number box and nothing happens
-I do have various Modules installed, but the problem persists even after I disable all of them
-REALLY need these attribute bars to work, cause the system i'm making is rather resource tracking heavy thanks to the Action Point system
-Only found one mention of this issue online on reddit, but no one answered it sadly
-I made a custom attribute, and the bar does properly track it. It's just I can ONLY update it on the character sheet
-Can't even select or otherwise type in the number box for the bars, its acting like a static label
Don’t use „configure attribute bars“ for this, they can only be changed via sheet changes.
Simply ad a maximum value to the number field of your attribute. The system generates a bar automatically. On the token settings resources select this bar “attributeBar.your-numberfield-key” an you are good.
AH ok thanks
Hello Martin,
Do you know how I can contact the creator of the system? I tried your script. I don't doubt that it works, but I admit I'm rather lost. I don't even know if my table and objects are correctly configured.
He's also here in Discord under the name LinkedFluuuush
Thanks a lot !
Hello hab mal wieder n Anliegen aktuell habe ich für die Talente in meinem Spiel folgende Formel: Springen
${RollErgebnis:= [1d20]}$
${RollErgebnis2:= [1d20]}$
${Ausgleichspunkte:= springe1 + EXSP}$
${Gesamtwert:= Ausgleichspunkte - max(RollErgebnis - Koe, 0) - max(RollErgebnis2 - Gen, 0)}$
${(Gesamtwert <= 0 or RollErgebnis == 20 or RollErgebnis2 == 20) ? 'Fehlschlag' : 'Erfolg'}$
Es werden auf zwei Würfel gewürfelt und es gibt Ausgleichspunkte um den Wurf warscheinlicher zu schaffen. Jetzt ist es in meinem Regelwerk so dass die übrigen ausgleichspunkte und die Different zum zu gelingenden Wurf addiert werden um einen Qualitätsstufe zu bestimmen. Nach den Beispiel: Man Würfel auf 13 & 12 und hat 5 Ausgleichspunkte. Die Würfelwerte die rauskommen sind 5 & 13. Den ersten Wurf schafft man und hat einen Different von 8, den zweiten Schafft man nicht und muss von den 5 Ausgleichpunkten einen hernehmen und 4 bleiben übrig. Somit hat man 12 Restpunkte (8 Differenz und 4 übrige Ausgleichspunkte) Jetzt würde ich das gerne im Chatlog automatisch darstellen damit die Spieler das nicht nachrechnen müssen. Aktuell wird ja sogar angezeigt wie viele Ausgleichpunkte man hat und wie viele Übrig sind. (Hier jetzt 5 & 5) Kann man hinzufügen in die Formel das bei einer Bestimmten Anzahl an Restpunkten die Qualitätstufe angezeigt wird? Nach Folgender Logik:
Legendäre QS: Zwei 1er
Epische QS: Eine 1
Perfect QS: 20+ Restpunkte
Gute QS: 10-19 Restpunkte
Geschaffte QS: 0-9 Restpunkte
Natürlich sollen die Qualitässtufen nur angezeigt werden wenn der Wurf gelingt. Wenn ein Wurf eine 1 ist aber der zweite auch mit Ausgleichpunkten nicht geligt soll das nicht erscheinen.
Hoping someone can maybe help. - I'm trying to make it so that certain check boxes only show if other check boxes are ticked. for e.g. if the "Level 1 Fire" checkbox is ticked then the "Level 2 Fire" Check box is visible. I'm not sure if I'm using the correct formula in the "Level 2 Fire". Assuming the Level 1 Fire's Component key is "comp_fire1check" what would my formula need to say? I had: comp_fire1check is true but suspect there should be more to it then that.
Just found the answer to my own question - In case of a Checkbox it's either just the key of the Checkbox or not(checkboxKey)
${RollErgebnis:= [1d20]}$
${RollErgebnis2:= [1d20]}$
${#Einsen:= (RollErgebnis == 1 ? 1 : 0) + (RollErgebnis2 == 1 ? 1 : 0)}$
${#Zwanziger:= (RollErgebnis == 20 ? 1 : 0) + (RollErgebnis2 == 20 ? 1 : 0)}$
${Ausgleichspunkte:= springe1 + EXSP}$
${Gesamtwert:= Zwanziger >= 1 ? -1 : Ausgleichspunkte + (Koe - RollErgebnis) + (Gen - RollErgebnis2)}$
${(Gesamtwert < 0 ? 'Fehlschlag' : Einsen == 1 ? 'Epische QS' : Einsen == 2 ? 'Legendäre QS' : Gesamtwert <= 9 ? 'Geschaffte QS' : Gesamtwert <= 19 ? 'Gute QS' : 'Perfekte QS'}$
Does anyone know if we should wait until the next release of CSB before we upgrade to Foundry Version 12?
I believe Martin has said CSB currently isn't ready for V12.
CSB is not yet compatible with v12. This will come with version 4.0.0, we are working on it 🙂
**Beta version 3.1.0-rc3 is now available, with the following changes : **
Technical Features
- Switched codebase to TypeScript
- Switched formula computation to component's code
- Switched chat message generation to component's code
Features
- [#228] Added Sorting for Item Containers
- Added
sameRowIndex() - Added
localVars&optionsto Script-Expressions - Added
lookupandlookupReffunctions replacingfetchFromDynamicTableandgetRefFromDynamicTable - [#180] Made Item Containers referençable by the
lookupandlookupReffunctions, and thesameRowandsameRowRefinside Item Containers columns - Added autocompletion in Text Fields
- Added
rangeoption to Number Field display - [#232] Added Collapsible Panels
Fixes
- Fixed a bug where deleted Items wouldn't be removed until re-rendering
- Fixed a bug where multiple executions of
setPropertyInEntity()would cause issues with updates
Before installing this new Beta, PLEASE, make a backup. This version introduced a LOT of changes in the code, which can always go wrong.
Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta
If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
Kommt leider ne Fehlermeldung
habs mit chatgpt gelöst 😄
danke dir !
Is it possible for a Item container column to display a radio button if the item in question has a radio button on it? Also it appears as though whenever i close a character sheet the radio buttons reset ?
@formal goblet Heya, I wanna ask something, does template reload only happens when a user tries to read an actor sheet?
I need to confirm something, currently narrowing down the cause of bug I've been having
So I think the "user not having permission to update an actor" bug I've been having
Came from me dropping a stat-enhancing item into a token, but never opening that token's actor sheet leaving the actor sheet values unchanged by the new item
So when a player with Observer permission tries to open the actor sheet
The sheet is trying to reload the template to re-calculate the actor sheet, but since the player is not the owner of that Actor
It results in that error
This issue almost always fixes itself when I, as a GM, open the actor sheet, which I assume reloads the entire template
And player immediately was able to read the Actor Sheet they previously could not see because of the error above
@brittle moth we might need to rethink the rendering process
Yeah, rendering does trigger computations. You can observe that with the log
Thank you! This is all the info I need to know to workaround my bug problem 
// Workaround fix for CSB 3.0.0. There is a bug where if you add a stat-altering Item to an Actor,
// but never open the Actor Sheet, the sheet remains not updated by the Item, so that if there is an user
// trying to read the Actor Sheet, they would get permission error of not being an "Owner" of the sheet.
Hooks.on('createItem', async (item, temp, uuid) => {
// Makes GM client responsible for updating any actor sheet that gets an item.
if (game.user.isGM) {
item.actor.templateSystem.reloadTemplate();
}
})```
I'm currently running the above script on my worldscript as a fix to my game, but it still would be great to see official fix implemented to the main build

Can you create an issue in Gitlab si that we can track it and not forget about this bug ? ^^
Give me a bit
I made an issue already but apparently I've gotten the bug completely wrong so I'll close that and make a new one
You can just edit the text tbh
Oh i guess i can do that
Issue updated!
I want to create concentration spells where the player presses a button on the sheet and a customized image is set as the status effect icon on the player's token (or something like that, maybe just to place an image on the token). I use Condition Lab & Triggler, which allows me to create custom statuses with my icons. Would this be possible?
The image that would be set as the status effect on the token would be housed in an "iconimage" key.
I don't know enough about Active Effects from the head, so I can only lead you to this page here: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Scripts/Scripts-for-Active-Effects
has anyone here implemented Descent Journeys in the Dark in Foundry? It's a dungeon crawl tile based board game that seems perfect for Foundry
I would like to know if there is a compendium or creature/monster sheet for the Custom System Builder system already ready, and where I can import it.
Hello Martin: Die Formel hat wohl doch nen kleiner Fehler drin: Es scheint als würde man hier die Ausgleichspunkte und Restpunkte gleichsetzen. Wodurch ein Wurf der eigentlich nicht gelungen als gelungen zählt. Leider kann mir ChatGpd hier auch nur fehlerhafte Formel zukommen lassen. Hast du da noch ne Idee? Hier in dem Beispiel Würfel ich eigentlich auf 8 & 8 und habe 4 Ausgleichpunkte. mit einer 16 im zweiten wurf kann ich selbst mit den 4 Ausgleichpunkte den Wurf nicht schaffen. Es scheint aber als würde die Formel denken, dass die Restpunkte auch zum Ausgleich verwenden werden (deswegen steht hier neben der 4 eine 2 weil er denkt 6 Restpunkte von Wurf 1 + 4 Ausgleichpunkte sind 10 "Ausgleichpunkte", der zweite wurf wurde um 8 nicht geschafft also bleiben zwei Punkte übrigen)...Hier wäre der Code:
${RollErgebnis:= [1d20]}$
${RollErgebnis2:= [1d20]}$
${#Einsen:= (RollErgebnis == 1 ? 1 : 0) + (RollErgebnis2 == 1 ? 1 : 0)}$
${#Zwanziger:= (RollErgebnis == 20 ? 1 : 0) + (RollErgebnis2 == 20 ? 1 : 0)}$
${Ausgleichspunkte:= springe1 + EXSP}$
${Gesamtwert:= Zwanziger >= 1 ? -1 : Ausgleichspunkte + (Koe - RollErgebnis) + (Gen - RollErgebnis2)}$
${(Gesamtwert < 0 ? 'Fehlschlag' : Einsen == 1 ? 'Epische QS' : Einsen == 2 ? 'Legendäre QS' : Gesamtwert <= 9 ? 'Geschaffte QS' : Gesamtwert <= 19 ? 'Gute QS' : 'Perfekte QS')}$
Kannst du da nochmal helfen?
How do you expect the stats of a creature to be?
Well, I'm creating a Solo Leveling RPG, so I need the creatures' stats to be "close" to what we have in D&D 5e. I haven't seen any monster sheets in all the systems I've found for CSB so far, so I wanted to see if there are any ready-made models for me to base myself on as well.
How do I get this variable from itemContainer ?
I've already tried the following codes and they didn't work:
${nivelConjuracao}$ and ${item.nivelConjuracao}$
I tried getting other variables from the container item but in the same way I'm not getting it
I'm trying to scroll through them but it's generating this error:
Uncaught (in promise) Error: undefined. Uncomputable token manaSkill
[Detected 1 package: system:custom-system-builder]
There's none officially, so I can't help with that
"Uncomputable token manaSkill". Seems like manaSkill is not defined
but manaSkill is set as one of the itemContainer variables
equals nivelCojuracao thats doesn’t work
You cannot use variables from Item Containers (at least not in the stable-version)
So I basically can't put a variable in the container item? (I was trying to put the skill's casting level in the itemContainer so the player doesn't have to open the skill all the time) From what I understand, I can't do that
You can use variables in the Item Container, but you cannot pull data from Item Containers
Ohhh, okay
Tks
I have this code below that makes a roll. The first values of the variables: rankNumero, scrollAcerto, typeSkill are not working correctly. But the last code that defines the Degree of success, does not work, instead of returning the text, it returns a random dice roll.
Part 1:
${#rolagemAcerto:=rankNumero == 7 ? ${[7d8]}$ : rankNumero == 6 ? ${[6d8]}$ : rankNumero == 5 ? ${[5d8]}$ : rankNumero == 4 ? ${[4d8]}$ : rankNumero == 3 ? ${[3d8]}$ : rankNumero == 2 ? ${[2d8]}$ : ${[1d8]}$}$
${#tipoSkill:=item.tipoSkill == 1 ? ${mod_espadacurta}$ : item.tipoSkill == 2 ? ${mod_espadalonga}$ : item.tipoSkill == 3 ? ${mod_arcoeflecha}$ : item.tipoSkill == 4 ? ${mod_combatedesarmado}$ : item.tipoSkill == 5 ? ${mod_lanca}$ : item.tipoSkill == 6 ? ${mod_magia}$ : item.tipoSkill == 7 ? ${mod_magia}$ : ''}$
<br>${rankNumero}$
<br>${rolagemAcerto}$
<br>${tipoSkill}$
<br><br><br>
Part 2:
${
rankNumero == 7 ?
rolagemAcerto >= 54 ? 'Grau 4 - Acerto Crítico' :
rolagemAcerto >= 45 ? 'Grau 3 - Ótimo Golpe' :
rolagemAcerto >= 20 ? 'Grau 2 - Golpe Razoável' :
rolagemAcerto >= 10 ? 'Grau 1 - Golpe Ruim' : 'Grau 0 - Falha Crítica' :
rankNumero == 6 ?
rolagemAcerto >= 46 ? 'Grau 4 - Acerto Crítico' :
rolagemAcerto >= 39 ? 'Grau 3 - Ótimo Golpe' :
rolagemAcerto >= 20 ? 'Grau 2 - Golpe Razoável' :
rolagemAcerto >= 9 ? 'Grau 1 - Golpe Ruim' : 'Grau 0 - Falha Crítica' :
rankNumero == 5 ?
rolagemAcerto >= 39 ? 'Grau 4 - Acerto Crítico' :
rolagemAcerto >= 30 ? 'Grau 3 - Ótimo Golpe' :
rolagemAcerto >= 15 ? 'Grau 2 - Golpe Razoável' :
rolagemAcerto >= 7 ? 'Grau 1 - Golpe Ruim' : 'Grau 0 - Falha Crítica' :
rankNumero == 4 ?
rolagemAcerto >= 31 ? 'Grau 4 - Acerto Crítico' :
rolagemAcerto >= 25 ? 'Grau 3 - Ótimo Golpe' :
rolagemAcerto >= 13 ? 'Grau 2 - Golpe Razoável' :
rolagemAcerto >= 6 ? 'Grau 1 - Golpe Ruim' : 'Grau 0 - Falha Crítica' :
rankNumero == 3 ?
rolagemAcerto >= 23 ? 'Grau 4 - Acerto Crítico' :
rolagemAcerto >= 19 ? 'Grau 3 - Ótimo Golpe' :
rolagemAcerto >= 11 ? 'Grau 2 - Golpe Razoável' :
rolagemAcerto >= 5 ? 'Grau 1 - Golpe Ruim' : 'Grau 0 - Falha Crítica' :
rankNumero == 2 ?
rolagemAcerto >= 15 ? 'Grau 4 - Acerto Crítico' :
rolagemAcerto >= 12 ? 'Grau 3 - Ótimo Golpe' :
rolagemAcerto >= 9 ? 'Grau 2 - Golpe Razoável' :
rolagemAcerto >= 4 ? 'Grau 1 - Golpe Ruim' : 'Grau 0 - Falha Crítica' :
rankNumero == 1 ?
rolagemAcerto >= 8 ? 'Grau 4 - Acerto Crítico' :
rolagemAcerto >= 6 ? 'Grau 3 - Ótimo Golpe' :
rolagemAcerto >= 4 ? 'Grau 2 - Golpe Razoável' :
rolagemAcerto >= 2 ? 'Grau 1 - Golpe Ruim' : 'Grau 0 - Falha Crítica' : 'erro'
}$```
Could someone please hint me what the Conditional Modifier List can be used for? I read the description, but I can't really get my head around its purpose.
Having a central place on the character sheet where the players can switch item modifiers on/off without need to open every item and change the config.
It is up to GM if a specific item modifier shows up in this list.
Example: The effect of an magic item can be activated or deactivated by player.
Out of curiosity, has anyone tried making a deck builder with CSB
Hello!
I have almost got my system figured out and implemented, but I was wondering if there was a way to display individual dice rolled from a pool, similar to FoundryVTT's default rollcards?
https://foundryvtt.s3.us-west-2.amazonaws.com/website-media-dev/user_671/screen/count-successes-2020-10-21.jpg
I'm using
Roll: ${roll:=[${dicecount}$d${trait}$cs<=${attribute_saturationvalue}$cf=${trait}$]}$
As my label roll message to output a customizable dice count, dice size roll and label successes (based on "Saturation value" and failures (max dice face)
And it works! (after much trial and error)
But it displays as a single icon with the fail-count, and required a hover to see the actual dice rolls.
Being able to see the whole pool in the card would be awesome!
(Since this isn't a math'd pool. It's a bastardization of the WUSHU system, where I need to see all the successes and failures separately/individually)
Any knowledge/pointing in the right direction would be appreciated! If possible, of course.
You sure that the Roll Message fits the code you've posted?
You could use a Script to get the default Foundry output. CSB itself doesn't offer to display individual dices unfortunately.
Hi - pursuing the implementation of Descent: journeys in the dark,
the game uses 6 different 6 sided dice.
a rolled face can show up to 3 effects:
range, damage, power surges, power enhancement and miss
each type of dice is a different color.
how do I go about defining these dice to the system?
Ahh, I had a feeling CSB wasn't able to get that defaul output, considering everything I read in my search.
I'm guessing by script you mean something that ties into the Macro-system Foundry uses? Or something else?
More or less. Macros are executing JS code. CSB lets you do the same if you use the Script-Expression syntax in a Label Roll Message. So you can directly interact with the Foundry API.
You may be asking me to dive into deeper waters than I'm used to swimming with that one! lol, I'm no programmer
But I shall take a look and see if I can use that!
Thanks!
Check the pinned messages of the macro-polo channel. There should be enough code examples for a simple Roll Message
Cheers! Thanks! I shall do!
@formal goblet hast du eventuell hierzu für mich noch ne Lösung :/
${Gesamtwert:= Zwanziger >= 1 ? -1 : Ausgleichspunkte - max(RollErgebnis - Koe, 0) - max(RollErgebnis2 - Gen, 0)}$
${Differenz:= Ausgleichspunkte + (Koe - RollErgebnis) + (Gen - RollErgebnis2)}$
${(Gesamtwert < 0 ? 'Fehlschlag' : Einsen == 1 ? 'Epische QS' : Einsen == 2 ? 'Legendäre QS' : Differenz <= 9 ? 'Geschaffte QS' : Differenz <= 19 ? 'Gute QS' : 'Perfekte QS')}$
nice danke !!!!
Just wanted ot check - Is the issue with radio buttons not being remembered a me problem or a system problem? whenever i close actor sheet and reopen it the radio buttons have reset. 😦
The values of your Radio Buttons have to be distinct, they cannot share the same value within a Group
I want to create limited space for items on the character sheet - e.g. the max potions that can be equipped is 3 and the max total items allowed in the backpack is 3. Can I create specific slots for things on the sheet, and prevent multiple items being added into them? Is there a better way to achieve the effect?
You'd need to create a World Script to prevent Items from being created. There's no other way around that
mm ok - so I could create a bunch of item containers on the sheet, and implement a world script that only allows an item to be added to a container if it is currently empty. Is that the idea?
Almost. Keep in mind, that the Actor owns the Items (not the Item Container). That's an important difference. Besides that you're correct
if I get your meaning, the test is against the target container id on a particular actor
You test the whole item collection. Item Containers are only visual containers, you won't find actual data about them in the props (at least for now)
Yes, I do, I rewrote the code to make it a little easier by creating a new variable to reduce the number of conditions within rankNumero. But it still happens that in the final message he replaces some of the data with this random roll... It's weird
This is rewrote
Part 1:
${#rankNumero:=potencial_maximo >= 1100 ? 7 : potencial_maximo >= 900 ? 6 : potencial_maximo >= 750 ? 5 : potencial_maximo >= 600 ? 4 : potencial_maximo >= 450 ? 3 : potencial_maximo >= 300 ? 2 : 1}$
${#acertoCritico:=potencial_maximo >= 1100 ? 52 : potencial_maximo >= 900 ? 46 : potencial_maximo >= 750 ? 38 : potencial_maximo >= 600 ? 30 : potencial_maximo >= 450 ? 22 : potencial_maximo >= 300 ? 16 : 8}$
${#erroCritico:=potencial_maximo >= 1100 ? 12 : potencial_maximo >= 900 ? 10 : potencial_maximo >= 750 ? 8 : potencial_maximo >= 600 ? 6 : potencial_maximo >= 450 ? 4 : potencial_maximo >= 300 ? 2 : 1}$
${#rolagemAcerto:=rankNumero == 7 ? ${[7d8]}$ : rankNumero == 6 ? ${[6d8]}$ : rankNumero == 5 ? ${[5d8]}$ : rankNumero == 4 ? ${[4d8]}$ : rankNumero == 3 ? ${[3d8]}$ : rankNumero == 2 ? ${[2d8]}$ : ${[1d8]}$}$
${#modSkill:=item.tipoSkill == 1 ? ${mod_espadacurta}$ : item.tipoSkill == 2 ? ${mod_espadalonga}$ : item.tipoSkill == 3 ? ${mod_arcoeflecha}$ : item.tipoSkill == 4 ? ${mod_combatedesarmado}$ : item.tipoSkill == 5 ? ${mod_lanca}$ : item.tipoSkill == 6 ? ${mod_magia}$ : item.tipoSkill == 7 ? ${mod_magia}$ : ''}$
${#grau7:=rolagemAcerto >= 54 ? 4 : rolagemAcerto >= 45 ? 3 : rolagemAcerto >= 20 ? 2 : rolagemAcerto >= 10 ? 1 : 0}$
${#grau6:=rolagemAcerto >= 46 ? 4 : rolagemAcerto >= 39 ? 3 : rolagemAcerto >= 20 ? 2 : rolagemAcerto >= 9 ? 1 : 0}$
part 2:
${#grau4:=rolagemAcerto >= 31 ? 4 : rolagemAcerto >= 25 ? 3 : rolagemAcerto >= 13 ? 2 : rolagemAcerto >= 6 ? 1 : 0}$
${#grau3:=rolagemAcerto >= 23 ? 4 : rolagemAcerto >= 19 ? 3 : rolagemAcerto >= 11 ? 2 : rolagemAcerto >= 5 ? 1 : 0}$
${#grau2:=rolagemAcerto >= 15 ? 4 : rolagemAcerto >= 12 ? 3 : rolagemAcerto >= 9 ? 2 : rolagemAcerto >= 4 ? 1 : 0}$
${#grau1:=rolagemAcerto >= 8 ? 4 : rolagemAcerto >= 6 ? 3 : rolagemAcerto >= 4 ? 2 : rolagemAcerto >= 2 ? 1 : 0}$
${#grauAcerto:=rankNumero == 7 ? ${grau7}$ : rankNumero == 6 ? ${grau6}$ : rankNumero == 5 ? ${grau5}$ : rankNumero == 4 ? ${grau4}$ : rankNumero == 3 ? ${grau3}$ : rankNumero == 2 ? ${grau2}$ : rankNumero == 1 ? ${grau1}$ : 'FALHA NO ENGANO'}$
${#danoBase:=item.dano_base+nivelConjuracao+${item.tipoSkill == 1 ? ${mod_espadacurta}$ : item.tipoSkill == 2 ? ${mod_espadalonga}$ : item.tipoSkill == 3 ? ${mod_arcoeflecha}$ : item.tipoSkill == 4 ? ${mod_combatedesarmado}$ : item.tipoSkill == 5 ? ${mod_lanca}$ : item.tipoSkill == 6 ? ${mod_magia}$ : item.tipoSkill == 7 ? ${mod_magia}$ : ''}$}$
${#nomeGolpe:=item.name}$
${#descricaoGolpe:=item.descricao_skill}$
${#efeitoGolpe:=item.efeito_skill}$
</div>
<h1> ${nomeGolpe}$ </h1>
<br><h2>Acerto</h2>
<strong>Acerto Critico: </strong>${[:acertoCritico:]+[:modSkill:]}$
<br><strong>Erro Critico: </strong>${[:erroCritico:]+[:modSkill:]}$
<br><strong>Rolagem: </strong>${[:rolagemAcerto:]+[:modSkill:]}$
<br><strong>Grau: </strong>${${grauAcerto}$}$
<br><br>
<h2>Dano</h2>
${danoBase*grauAcerto}$
<br><h2>Mana Gasta</h2>
${item.mana_base*nivelConjuracao}$
<br><h2>Descrição</h2>
${descricaoGolpe}$
<br><h2>Efeito</h2>
${efeitoGolpe}$```
And this is a result:
A roll of 25 is coming in the message, but the result should be 3, which came correctly in the degree variable.
Why you use double clamp? ${${grauAcerto}$}$
<br><strong>Grau: </strong>${${grauAcerto}$}$
this was an attempt to correct it. Apparently it didn't work either lol
Hi there!
Any idea why when using a User Input Template in a Label Roll Message this error pops out?
Here is the template:
Foundry version?
And the full error message in the console would be helpful too
There you go
Hi Folks. I am currently trying to call a macro from a label roll, and the macro works correctly. However, each time I click the label to fire the macro on the actor sheet, I get an 'undefined' message and the roll sound to chat prior to the dialog box popping up. Any suggestions?
Just add throw {"Done"}; at the end of the macro and it will disappear.
@brittle moth https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/main/module/formulas/Formula.js?ref_type=heads#L267 I have no clue why it's undefined in this case
Well, not a big deal. I'll do otherwise. Thank you anyway!
I have no clue just seeing the screenshot :/
Could you open an issue on Gitlab and include an export of the user input template as well as the actor template using this user input ?
Sure.
Issue #355 just open.
Thanks @brittle moth and @formal goblet for your continuous effort to make CSB even more awesome than it already is!
So, at the end of the macro call or the macro itself?
The macro itself.
Is there a way to call/reference a displayed text from a multi-choice prompt on a roll?
I have the variable getting assigned the value as needed, but I'd love for the rollcard to show the chosen "Trait" name.
?{Trait|10,'No Trait/Scab Roll'|trait1_dicesize,trait1_name|trait2_dicesize,trait2_name|trait3_dicesize,trait3_name},
Is my prompt. I'm using _dicesize in the roll formula with ${Trait}$ just fine, but I'd love to have it say the _name of the choice on the card too.
I feel like it may be possible with 2+ more references/variable all looping back on each other, but wanted to know if anyone smarter than me had an idea?
thanks
nope 😅
Uhh, is there any way to link items in chat so players can view them?
**Beta version 3.1.0-rc4 is now available, with the following changes : **
Features
- Added Meter element
- Added option in Settings to set minimum Role for Item Modifier Config
- Added option in Settings to set minimum Role for Reloading a Sheet
- Added version switch helper
Fixes
- [#350] Fixed a bug where updating a Character while an Observer has its sheet opened would cause an error
- Fixed Label computation when Label has more than 10 Formulas
- Fixed Text field autocomplete field to allow non Formulas
Before installing this new Beta, PLEASE, make a backup. This version introduced a LOT of changes in the code, which can always go wrong.
Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta
If you want to switch an existing world to the beta version, you can follow this guide : https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Switch-to-Beta
If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
I am still figuring out some elements to the formulas. I know it is possible to pull the first item of an array with first. Are there ways to pull second or third items from an array? (I have a work around in mind, but it is kind of messy so I wanted to check first)
Specifically, I have a situation where a dynamic table will sometimes provide an array and I am wanting to break the array out for formatting purposes.
Doable, but you'll need a bit of HTML and JS. You can basically do the same as the Item Container Component: https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/src/module/sheets/components/ItemContainer.ts?ref_type=heads#L967
JS it is 😅
It has been a minute since I messed around with JS (which clearly is what this is about). I will go digging again. Thanks. Or I might just do my inellegant brute force method. I have time to figure it out either way.
Copy that, lol.
I feel like I could maybe hack it with some like "set variable to chosen name, use that variable to quantify a second "if..." formula... Though it'd be limited...
Haha, may be just getting stuck in the weeds there 😅
Thanks!
And thanks for pointing me towards the Macro calls last night. It looks waaaaay above my capacity, but perhaps a project to put in the distant goals!
Thanks. I managed to find my answer. I have my three points split up nicely (the third one was to make sure I could do three and expressing my doubts about figuring this out):
Finally got the data toolbox import to work. feelsgood
Am I insane or is setPropertyInEntity not updating multiple values, it just picks one and doesn't do the other (or the rest). I tried the beta just now, but the issue seems to persist, the fault probably lies on me though.
is someone having this issue on v12 Foundry?
I can't create character tokens on maps
CSB ist not foundry v12 ready yet.
Any guesses about the release date?
Can an item be marked as unique, so that only one actor can have it, and attempts to drag a copy of it onto the same or a different actor will fail?
Not possible at the moment with basic CSB.
possibly another world script then to check all player actors for the same item
We are working on the next version, which will be v11 only, and then the v12 migration. Should not take too long, but I can't say for sure until we've started the work.
CSB being still built with big new features being added, I can't easily test the new versions out with the test release as of now... Once the main features are finished, it should be easier for me to keep up with Foundry versions 🙂
I think I might have found the answer I need, but just in case there's a simpler or better way now (since the solution I found was from 2023); is there a way to get a label to only display the highest value of any given value, in this case the highest armour rating out of a variety of potential values?
You can use the max function :
max(a, b, c, …) => returns the maximum of its arguments
You can also call it with an array, i.e. a DynamicTable :
max(fetchFromDynamicTable('tableKey', 'columnKey'))
Outstanding, thank you
Hello, I have a field in my Item called "Weight", and I exposed it with a label in the Item Container on the Character Sheet (red). I was wondering how would I go about combining the Weights of all the Items into a single "Total Weight" label in the character sheet(Replacing the current Number Field (blue))? I tried using the "fetchFromDynamicTable" approach, but them I realized that Item Container probably doesn't behave like a Dynamic Table...
Two solutions there :
- You can wait for the next version, which will allow you to use data in Item Containers just like in Dynamic Tables 🙂
- You can define a Label keyed
total_weight(for example, change your keys according to your needs), with value0and an Item Modifier in the items (or in the item template, if it is for every item using this template) defined like this :
- Key :
total_weight(the key in the actor template) - Op. :
+ - Value formula :
${weight}$(The key in the item template)
Everytime you add this item, the Label will be updated
Thanks so much! Looking forward to the next update. 🤩
Hi again, sorry to bother so much. I managed to get the Total Weight thing to work, however when I create a new item with the same template the Modifier is not inherited. What could be causing this? (The Item Test was made after I added the modifier to the _TemplateItem, and it is not the Unique item option that is causing it, I checked. The console is not showing any errors either.)
You won't see them there, but the modifiers will be applied. But the stat, which you want to modify, has to be in a Label. You cannot use Input Components
Yes, the Stat itself is a Label called "totalweight". When I create a new item with the _TemplateItem, and put it into the Item Container on the character sheet, it seems to not actually modify that Label, as if the Item Modifier wasn't present. Only if I add the Modifier back on to the item within the Character Sheet will it begin to Modify it again.
Remove totalweight from Group, otherwise you need to use the Conditional Modifier List Component to enable them
Holy, that was exactly it, tysm!
I guess I shouldn't just put things into fields when I don't know what they do :D
I'm trying to change the colour of text on a roll based on the result, essentially In want to highlight a roll of a 10 on a d10 every time it happens for damage. I've had a look at this which seems to be how one might do it but I'm not understanding how it works. My understanding is that it's the <span> html code changing the colour but I can't see how it does it conditionally, nor does it seem to work on my end anyway. #1037072885044477962 message
The actual roll I'm trying to change (with no other edits)
<h2> Damage Roll </h2> Damage: ${!roll=[:item.weapon_damage:+:s_b:]}$
the item.weapon_damage refers to a value that's usually xd10+x, where x is the number of dice and extra set damage, respectively.
ok I could use some hand holding to make sense of all of this. I have a system I am currently in dev for and i would love to have someone show me the ropes for this system design
A good video tutorial or simple walkthrough paper would also work
There is an example system that utilises most of the features I believe: https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/develop/sheet-library/Example
(Which I should double check myself for my text query actually)
Thanks. Good work. I love your job. Anxious for v12 and the news of CSB
**Beta version 3.1.0-rc5 is now available, with the following changes : **
Features
- Added ability to drag an item from a sheet using all the item button
- Added
escapeQuotesfunction - Added Attribute Bar generation on Meter Components
Fixes
- Fixed issue with text containing quotes (
') in Formulas - [#208] Fixed issue with unique items preventing adding a duplicated item to the same actor
- Fixed issue causing component editor dialog to empty when error occurs on validation
- Fixed issue causing component movement in template to add _copy suffix
Before installing this new Beta, PLEASE, make a backup. This version introduced a LOT of changes in the code, which can always go wrong.
Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta
If you want to switch an existing world to the beta version, you can follow this guide : https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Switch-to-Beta
If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
This release is complete feature-wise. I will take some time to try and hunt all the bugs out, as well as writing the documentation for all the technical changes it brings. But you can expect a stable release soon, I promise !
progress on the Descent dice roller. Now I have to figure out how to allow re-rolls
Hey, does this fix the issue where when you use two or more setPropertyInEntity functions in a single message it only updates one value?
Yes, this fix is on beta right now 🙂
Maybe I've got something wrong, cause to test it out again with the beta just now and it doesn't seem to be working.
just threw this together to check ${setPropertyInEntity('self', 'TEA', "TEA-1")}$ ${setPropertyInEntity('self', 'EAT', "EAT+2")}$ it's only changing one number field.
Huh... I'll take a look :/
I did manage to get this working,
Through a kinda janky (imo) method of just using the names as display & values, then layering additional variables and using a sequential if/then check with equalText() comparing them to define them as the relevant value.
${#traitdice:= (equalText(trait, trait1_name) ? trait1_dicesize : (equalText(trait, trait2_name) ? trait2_dicesize : (equalText(trait, trait3_name) ? trait3_dicesize : (equalText(trait, trait4_name) ? trait4_dicesize : 10))))}$```
I can then use ${trait}$ in a rollcard to display the *name* and ${traitdice}$ to pull the relevant value for anyrolls.
Again, janky, inefficienct, there's probably a more elegant way to do this. But this is functional for me wanting to display the chosen prompt displayname *and* use the value.
Someone more eductated feel free to chime in with a "ohh yeah you can do this with one quick formula that takes 5 minutes" after poking holes in the above something that took me 3 hours to figure out! 😅
I cannot get a rendered button for re-roll in a chat message to execute anything. does anyone have an example of a similar feature?
Damn, I was using this as a feature to stop players from having more than one type of item lol
There are no bugs, only under appreciated features
Oh it would be nice to have some kind of quantity-limiting capability for Item Containers 🥹
It would be tricky for Item Containers. But we could do that on the Template instead.
That's great, thank you!
Just to better understand, you're saying that limiting the numbers of items that a container can hold would be tricky, right?
Yeah, because it's not for the Item Containers to decide which Items are transfered to the Actor. The only job they have is to display the Items an Actor has. That's it.
It wouldn't be impossible, but there are some more cases we'd have to look out.
Ok, thanks for clarifying this.
You can even transfer Items to an Actor without a Container. You won't see them but they will be there
Oh I see. Not a real coder here, so I'm just letting my brain run free, but could it be possible to set an item quantity limit 'by sheet' so to say?
When dropping an Item to an Actor, Foundry will send an event that an Item is about to being created. Devs can react to that and intercept the creation according to their own conditions. So the important question would be how we should decide, which Items should be created an which not. If you know how the decision should be, you basically have the program.
Hmm, not a trivial matter.
Well, suppose for a moment that the GM wants to limit the number of items and actor can carry. Would it mean that decision could be taken based only on how many items the actor contains, if any?
Please bear with me, for I'm an old curious folk when it comes to code 😅
The event tells you, which Item is being transferred and who the target Actor is, so you have access to both Actor and Item data. So you can say: If the count of Items an Actor has is not bigger than x, create the Item.
Ok, so going a step further could one get an item count, and subsequently limit, but item template/type/name?
Items are stored in a Collection, so you can determine the count of it.
You can access the data of an Item with game.items.getName('itemName') in the console. You can use everything what is in there.
- name is easy
- CSB has like 4 different item types (the ones you see when you try to create an Item in the directory)
- an Item stores the Template-ID
Ok I get it. I'm sorry for not being able to properly do the code, otherwise I gladly would.
Thanks for your kindness!
Don't worry, understanding the structure is enough
is there a script list that i am missing somewhere?
Wdym? A collection of some useful Scripts? If so, check the Wiki page
is there anyone who builds these sheets on commission
The other Foundry Discord for devs has a channel for commissions. You might ask there
I found the issue, and fixed it 🙂 It will be fixed in the next beta / next release !
Yay! You're the best, thank you for your amazing work!
how do you make it show dice like that?
they're not dice - they are images associated with rolltable entries. That part is just following this https://www.youtube.com/watch?v=D27YsHuVgZE&t=570s
Note: RollMyDice.js was updated to support 0.8+
This video walks through creating a form of custom dice in FoundryVTT. This includes some scripts to make using features built into Foundry easier to use. Custom dice could include special pips or drawings (like in games like FFG Star Wars and Legend of the Five Rings) you can use in your game t...
Hey, is there a limit to the number of ${}$ formulas that can exist in a single label? I'm running into a weird error I can't really explain.
Question since I can't seem to find it in here: CSB good to go in V12?
Nevermind, found it
My apologies for dredging this up (though the fact that I find this should hopefully show I have at least attempted some due diligence in finding the answer in this thread).
I am trying to figure out the solution to the question that Mechanized had. If you could point me in the direction of what sort of script I would need, what syntax or function is needed in the script, that it would be appreciated.
My failed effort so far was a stepwise testing of formulas, starting with the ${fetchFromDynamicTable... using one filter, which gave a result. Then I did ${string(fetchFromDynamicTable... using one filter which gave a result. Then I tried ${concat(string(fetchFromDynamicTable... using one filter, and it gave me an error.
(my rationale was that if I could covert each array into a string to concat, I could try to get it back into an Array at the end)
Is there a way to hide (or change) the first column of an Item Container. For example, if you have an item called "Language (Comm)" and it also has a text field called "Label", that's set to "Common", could you make an Item Container list it as just "Common", rather than having a visible column that shows "Language (Comm)".
Also, I haven't really had to deal with a Foundry version update before. I know CSB isn't currently compatible with v12, but do I need to worry about existing modules losing compatibility with v11, if they get updated?
Is there any way to add a button in the chat for players to click and roll tests that I have programmed?
For example, a monster has an ability with a difficulty of 18 in a Dexterity check. The idea was that, along with the ability sent to the chat, a button would also be sent for players to click and automatically perform this Dexterity check with difficulty 18.
I would like to know if this is possible, please. Thank you.
There is currently a bug when a Label contains more than 10 Formulas. This Will be fixed in the next release 🙂
You would need to use à Javascript script, delimited with %{}%
https://gitlab.com/custom-system-builder/custom-system-builder#45-scripts
There is discussion to implement this within Formulas 🙂
There is no way to hide nor change this first column, as it contains the Button to open the item linked to the actor sheet :/
There should not be any issue, modules must state their minimum compatible version when releasing new version, so unless a dev is careless and states its module still supports v11 when it doesn't, modules that lose compatibility with v11 will simply not update
That's really good to know. Thank you.
In that case, is there a way to point another module at a specific item container. (e.g. look at [this] part of the file for languages.)
As of now, the only way to do this is by adding an HTML button in the roll message with an "onclick" attribute, and js to trigger macros or call CSB APIs
I should add à tip to the wiki on this ^^"
I don't understand your question... Is this about the polyglot module ?
This is about the polyglot module.
I'd like to be able to add languages to a character sheet as items, and have it automatically detect them, without them showing up on the sheet as "Language ([the language's name])".
Then I'm afraid there is no workaround :/
Not one I know at least :/
Ah well. It's a relatively minor annoyance and more than made up for by all of the other cool and helpful features you've built.
Thanks. I had been looking into javascript stuff, but am still fairly new to it (or at least rusty) but I will keep poking around to see if I can figure something out.
Should be something like this:
%{
return Object.values(entity.system.props.dynamicTableKey)
.filter(row => !row.deleted && row.columnKey == 'filter1' && row.columnKey == 'filter2')
.map(row => row.targetColumn);
}%
Four months of non stop development later, we are finally starting our campaign in CSB

Hey everyone, how's it going?
I'm trying to create a conditional function to execute this script %{linkedEntity.delete()}% only when my condition is true. However, it seems that no matter what conditions I create, it always executes this script. Is there a way to execute this script only when a CSB function ${}$ is true? Any tips?
Note: I'm using the stable version CSB 3.0.0.
I see no conditionals in there, so it will always be executed
I didn't include my complete formula, I just explained that I'm putting this script inside a formula. Hold on, I'll put it in its entirety:
I've tried it like this:
${#switchCase(item.grupo, 'Consumíveis', %{linkedEntity.delete()}%, 'Munição', %{linkedEntity.delete()}%, 'Armas de Arremesso', %{linkedEntity.delete()}%, setPropertyInEntity('item','rolagens', "item.apos_danocura"))}$
Or like this:
${#or(or(equalText(item.grupo, 'Consumíveis'), equalText(item.grupo, 'Munição')), equalText(item.grupo, 'Armas de Arremesso')) ? %{linkedEntity.delete()}% : setPropertyInEntity('item','rolagens', "item.apos_danocura")}$
But neither of these worked; it always executed even if the conditions indicated it shouldn't.
Note: I tested the conditions separately to ensure they are correctly returning false or true.
I can tell you what happens. When your Label Roll Message is executed, it resolves from
${#switchCase(item.grupo, 'Consumíveis', %{linkedEntity.delete()}%, 'Munição', %{linkedEntity.delete()}%, 'Armas de Arremesso', %{linkedEntity.delete()}%, setPropertyInEntity('item','rolagens', "item.apos_danocura"))}$
to
${#switchCase(item.grupo, 'Consumíveis', undefined, 'Munição', undefined, 'Armas de Arremesso', undefined, setPropertyInEntity('item','rolagens', "item.apos_danocura"))}$
in the first iteration. The golden rule is, that the innermost Formulas are executed first. The behavior is similar to an arithmetic expression like this: 3 + (4 + 5 - (4 * 2)). First comes 4 * 2, then 4 + 5 - 8 and then 3 + 1
hello kurz frage, was muss ich an der formel ändern damit der hier definierte BlockWert als Zahl erscheint nur wenn man einen Erfolg hat. Quasi Blockwurf: 5 Erfolg Blockwert: "BlockWert":
Blockwurf:
${RollErgebnis:= [1d20]}$
${#BlockWert:= Blockwerta + Intellligenzaktiv + Konstitutionaktiv + Willenskraftaktiv + Intuitionaktiv + Blockwertt + Blockwurf - RollErgebnis}$
${RollErgebnis <= Blockwurf ? 'Erfolg' : 'Fehlschlag'}$
Ahhh, I think I understand now!
I'll try to rebuild my formula!
Thank you very much, this helped a lot!
Just wanted to say, thank you very much! I am still waking up, but after trying this out, I can confirm this was exactly what I needed... now I am back to programming out these character sheet templates.
Good to know. At least the bug taught me to write a more efficient formula though haha.
I'm trying to adapt this line of code:
${!Roll >= Crit ? '<br>Critical Success' : Roll <= Fumble ? '<br>Fumble' : ''}
into
${!Roll >= zealous_hatred ? '<br>Zealous Hatred!' : ''}$
So that "Zealous Hatred!" only appears when a 10 on a d10 for damage is rolled.
But I'm having problems. If I ommit the last : '' I get an error but if I include it the roll doesn't work at all, it won't even post to the chat. I'm obviously missing something but I don't know what. 😅
Any clue as to why the condition is returning a false positive?
I've also run into another issue I have no idea how to solve. I need to implement a rule called Zealous Hatred, which as it turns out isn't just exploding d10s.
I want the roll to highlight when Zealous Hatred has been achieved, but the only way I know to do that (and it's not even working for me lol) is to have hidden component with the number you need to roll for it to reference. However, Zealous Hatred also occurs if you roll a "10" on a 1d5 roll (since IRL you'd use a d10 to make the roll), but if course if I have a component set to 5 as well, it would declare a Zealous Hatred roll on any 5 as well as 10s.
Does anyone have any idea how I might get around this? I'm genuinely pretty lost, I wouldn't be surprised if there wasn't a solution to be honest.
ok I am just learning. what i am i doing wrong with the following ${math.multiply(Power, Recovery)}$
im just trying to make an HP that shows maximum HP as Powerxrecovery
Surely ${Power*Recovery}$ should work? :s
Ok let me check lol... Wouldn't surprise me if I am over complicating it. Like I said just getting started
Meanwhile I'm struggling to get a condition to work with strings lmao.
The '=' check in the formula works for numbers only. You need to use the equalText function :equalText('smallframe', char_trait) ? 'Yes', 'No'
You could roll a d10 everytime, check for the value '10' for Zealous Hatred and then divide the result by 2 to get a '1d5' roll
${roll:=[1d10]}$
${roll == 10 ? '<br>Zealous Hatred' : ''}$
Result : ${ceil(roll / 2)}$
${#Verstecken:= RollErgebnis <= Blockwurf ? '' : '#'}$
${${!Verstecken}$'Blockwert: '}$
${${!Verstecken}$BlockWert}$
How do you round down to a whole number in a formula?
Floor()
floor() not Floor().
omg this is going to be a learning curve lol... thank you
I will say I have stats though and it is slowly moving forward!
Yeah sorry, autocorrect and driving lol
Learning never ends 😅
Also, use math.js as a resource if you didnt already know.
I'm just now getting started. I've looked at that. And it was a bit French to me. I'm a quick learner so I probably won't be hounding you guys with easy questions for long. But I'm just now getting my feet wet with JS. Thank you guys for all the help
No worries dude. I was the same way when I picked up CSB. Ask away, happy to help when I see a post I can answer. If its simple, I can either point you in the right direction or assist with a solution. (feel free to dm me if you dont get an answer)
That’s a great start, thank you.
Is there a batter way to do pools? This works but is pretty simple
depending on how you want it.. that works so I wouldnt vary away from it
Was just thinking like how in dndbeyond it auto populates with full hp when you long rest but i dont know if thats feasable
you can set the default to whatever your max is
Two ways: button with script in it or macro.
Check the description of setPropertyInEntity(). With that you can do something like a rest button
That sounds like something i am not ready for yet. but i like that it is possible!
@grave ether i sent a dm
Not too complicated, something along the lines of `setPropertyInEntity('self','yourHPKey',hpMax)'
going to steal this for myself lol
Thanks so much! (though the order was equalText(trait,'<trait name>')) I lost so much time trying to figure out how to do that haha. Would it be possible to add it to the document for conditions, just so others might not have to ask? Hah.
Is there a method for turning checkboxes on and off with setpropertyinentity?
I tried 'true' and 'false' and true and false
all teh values seem to just make it checked so unsure what it is
nevermind I figured it out
I put in an empty string but I'm sure a 1 and a 0 works
I'm having a lot of fun with the custom system builder. I've been able to make a pretty responsive BattleTech: A Time of War player sheet
The 2 states are empty string and 'true' (yeah ik, a bit confusing) 😅
Is there a way to check if a dropdown is selecting the default value versus something like '0'?
I think the command is switchCase()?
I think the finer question is if the blank default value of a dropdown is 0, the number, or an empty string, or something inbetween.
ehhhhh, I've never tested this one 😂
consoleLog(dropdownKey) it is then
to a string? string()
ok i am looking to create a dynamic table that the players can manage. they can create a skill that starts with a d4 and spend growth points to increase the dice size up to a d12. once the skill hits d12 they can start building a specialty (one skill can have multiple specialties) that would have a bonus that grows numerically +1, +2 etc. any advice on this?
How do you want it to display and how do you want them to be able to interact with it?
Something like this?
sorry i am not responding emediatly I am looking at this and trying to decode it
Wow you did some really interesting things in here... I am going to see if i can replicate some of what you have done here
I am at Barnes& Noble. Looking to get a book to help me with this project. Is JavaScript the correct language
starting out with CSB. Is there a way to display a counter or variable on a scene and adjust it? e.g. the threat pool for a Descent scenario, or the number of turns taken thus far etc
Is it possible to have number box modifier in a list of prompts? I'm trying to have a prompt box with a list of modifiers the player can utilise when rolling. When I have the number box modifier as a seperate dialoge, like this:
?{aim:"Aiming?"|"0","No"|"10","Yes (Half Action)"|"20","Yes (Full Action)"}
)}$
${!roll:=[1d100]}$ vs ${ws_current + aim + ?{Modifier|0}}$<br>
<h2>${!roll<=ws_current + aim + Modifier ? 'Success' : 'Failure'}$</h2>```
It works, however if I combine them like this:
```${#combat_actions(
?{aim:"Aiming?"|"0","No"|"10","Yes (Half Action)"|"20","Yes (Full Action)"},
?{other:"Other Modifiers"[number]}
)}$
${!roll:=[1d100]}$ vs ${ws_current + aim + other}$<br>
<h2>${!roll<=ws_current + aim + other ? 'Success' : 'Failure'}$</h2>```
Nothing happens, nothing is posted to chat and no roll is made. Is there a way to include the "other" modifier in the first prompt or does that need to be in a seperate prompt? Also is it possible to call upon the combined prompt, rather than each part of it (combat_actions rather than aim, all out attack, brace, etc)? Thank you.
OK what am i doing wrong
${Roll 3d12 + sameRow('Spec_Bonus') + sameRow('Spec_Bonus') + sameRow('Skill_Att')}$
Dice rolls need to be within []
[3d12]
${Roll [2d12] + sameRow('Spec_Bonus') + sameRow('Skil_Dice') + sameRow('Skill_Att')}$
I am getting an error from trying to use dice from this
Is Roll a key by chance?
@quasi plume no
${Roll:=[2d12] + sameRow('Spec_Bonus')}$
What I am trying to do is give them a drop down menu with the 5 dice options I then want it to automatically add that dice to the above roll
- sameRow('Skill_Dice') doesnt work even when the dice are labeled [1d4]
Can you show me what the console says?
Hiya! I'm currently dying from attempting to display text in boxes: help would be appreciated.
The values ItemATK and ItemMAG are labels that retrieve stats from the attached character, via ${fetchFromActor('attached', "atk_base", 0)}$ and similar operations.
A rollable label within the attached character's item container with the roll message ${[:(item.AbilDamage):]}$ should retrieve the formula from the item AbilDamage field, a text field, which works fine when AbilDamage is set to a constant or roll formula (e.g. '1', '2d4+2').
I'd like to type formulas into the AbilDamage field that serve as functions of the ItemATK and ItemMAG values - for example, ItemATK or 3 * ItemMAG - in order to create a variety of items with different damage formulae and easily distribute them across characters. However, I can't seem to figure out what syntax I need to send to get anything to work.
For example, ${[:(item.AbilDamage):]}$ while AbilDamage has a value of ${ItemATK}$ returns the following error.
Is it supposed to be ItemATK or item.ATK?
I really should use better key names. 😔 I am very obviously not a programmer.
The value of interest does, in fact, have the key name ItemATK, which I'll leave unchanged for now so as not to increase confusion further.
Oh neither am I haha.
Were I trying to reference ItemATK from the attached actor I'd have to use item.ItemATK (💀) but luckily that's not of interest here. I'm basically just trying to—I'm not really sure what question I need to ask to get any closer to my goal—create a customizable formula, perhaps?
Say this actor has an "ATK" stat of 1d6, so that's what would be rolled were they to use this item, but I'd like to be able to drag the same item to an actor with a stat of 1d8, for example, and have that work the same way. But I'm not sure what syntax is necessary to get a formula working within the text field.
Honestly the thing that killed me last time I had a project with CSB was dynamic tables.
What would you want this formula to do, out of curiousity?
${#concat(?{aim: ...}, string(?{other: ...}))}$
In general, yes
Just referencing or performing arithmetic operations on value retrieved from a label.
Nope, not without your own implementation of such a feature
I found that some times it works, other times it chooses not to.
${Roll:= [2d12+:sameRow('Skill_Dice'):] + sameRow('Spec_Bonus')}$
I should hope it works consistently given the correct syntax. 😅
Use recalculate(fetchFromActor(...))
Somehow missed this in the documentation - looks like a useful function. I'll see if I can figure out how to implement it. Thanks much!
Hate to bother again, but I'm kind of syntactically inept.
The documentation provides this example:
recalculate(MyInputFieldKey) where 'MyInputFieldKey' = ${round(Strength / 2)}$ and 'Strength' = 5 => Returns: 3
The label roll message ${recalculate(item.AbilDamage)}$ now seems to work with constants, returning 11 when item.AbilDamage = ${1+10}$. I've tried to do as you've recommended, using fetchFromActor instead of this janky intermediate step I was trying to get to work to pull the actor's stats into the item. However, I can't for the life of me figure out the roll syntax.
${recalculate(item.AbilDamage)}$ where item.AbilDamage = ${[(fetchFromActor('selected', "atk_base", 0))]}$ = 1d6 returns the string ["1d6"]. I'm using 'selected' because I can't get 'attached' to work, which I'll figure out later - for now, are there any hints you could give re: getting rolls to work and where to put mathematical operators?
AbilDamage = ${atk_base}$
${DamageFormula:= recalculate(item.AbilDamage)}$
${[:DamageFormula:]}$
You can't use [] within recalculate()
Thanks so much for everything! I think I can take care of it from here.
No dice, it's still not responding.
Show me the console
Yeah was just about to post that 😄
[Detected 1 package: system:custom-system-builder]
UncomputableError http://92.239.213.166:30000/systems/custom-system-builder/module/errors/errors.js:13
onUndefinedSymbol http://92.239.213.166:30000/systems/custom-system-builder/module/formulas/Formula.js:853
_compile http://92.239.213.166:30000/systems/custom-system-builder/lib/math.js:26377
_compile http://92.239.213.166:30000/systems/custom-system-builder/lib/math.js:25781
_compile http://92.239.213.166:30000/systems/custom-system-builder/lib/math.js:25781
_compile http://92.239.213.166:30000/systems/custom-system-builder/lib/math.js:25781
_compile http://92.239.213.166:30000/systems/custom-system-builder/lib/math.js:26516
evaluate http://92.239.213.166:30000/systems/custom-system-builder/lib/math.js:24162
evaluate http://92.239.213.166:30000/systems/custom-system-builder/lib/math.js:24139
computeStatic http://92.239.213.166:30000/systems/custom-system-builder/module/formulas/Formula.js:858
compute http://92.239.213.166:30000/systems/custom-system-builder/module/formulas/Formula.js:442
processFormulas http://92.239.213.166:30000/systems/custom-system-builder/module/formulas/ComputablePhrase.js:139
compute http://92.239.213.166:30000/systems/custom-system-builder/module/formulas/ComputablePhrase.js:212
_getElement http://92.239.213.166:30000/systems/custom-system-builder/module/sheets/components/Label.js:271
jQuery 2
dispatch
handle
errors.js:13:9
_getElement http://92.239.213.166:30000/systems/custom-system-builder/module/sheets/components/Label.js:271
AsyncFunctionThrow self-hosted:803
jQuery 2
(Async: async)
dispatch
handle```
I get that when I click
That one is related to Modifier not being there
When refrencing a dynamic table sameRow('') do you need to do something special if the callout is a drop down?
thank you this worked until i put the drop down option back. I am so confused why using a drop down breaks this
Not really. If you're only interested in the value of a Dropdown, then it's the same approach
Exchange Key with Label
ok
@formal goblet you are my hero! I am confused in the rest of the work ive done keys are like refrence names and labels are the active effect. am i missing something
These are options of a Dropdown, don't confuse them with Component keys 😅
I have been programming for about 36 hours... I am not even sure i know enough to consider myself confused with anything. lol
I keep seeing error. is there a way to see what the error is on a dice roll?
Open the console with F12
ok I think i have one more question and ill be able to repolicate this and not bother you as much. I am creating a drop down and i want to refrence Spirit_p how would i put this in the key? if i just put Spirit_p or put it in ${}$ it says it cannot turn it into a number
DropdownOptionKey: Spirit_p
Label: ref(dropdownKey)
ref(sameRow('Skill_Att'))
k
it still isnt resolving spirit_p as a number just the words
never mind yes it did
You are a freeking wizard @formal goblet . Where can i learn all of this?
I mean, these functions are all in the Readme 😅 . And the CSB-Wiki is also a good spot
Rest comes with experience
Ill get them and read them. I am not trying to be difficult i am just learning and things just were not making sence. still dont in some ways. I have never programmed anything in my life. I am a firmware downloader and wordpress kind of guy lol. this is out of my comfort zone so thank you very much for your help! I will print the readme and check out the wiki
Ok i have been scouring the wiki for an answer to the following. I am looking for a drop-down list using the dynamic table function that checks a dynamic table on the player the item is equipped to. Basically allowing them to pick a skill for that weapon if they have it.
I have tried with just the key and it does not work
Use either the Dynamic Table or the Formula-option in the Dropdown. Especially read the description of the Dynamic Table Key
Thank you...
dw, I'm used in supporting 😄
Sending me the readme file is good I am trying to get the information myself so I learn it better
How can I get the image and name of the sheet?
@formal goblet So what does parent. prefix refer to in this case? Can i do parent.Skill_Table as the dynamic key where Skill Table refers to a Dynamic table on the character sheet?
I ask because there is obvoisly something more since this is not working.
name is ${name}$, image is %{return entity.img;}%
Yep
tks
%{return entity.entity.img;}%
tks 😄
And how do I get the image of an item card? 🥹 🥲
Hey I'm new to using CSB (really great btw). I'm just having trouble with the tabbed pannel. I can't create a new tab in a tabbed pannel. When I press the "+", it doesn't do anything, same for the modify. I tried to do the same in an imported template, but it didn't work (only the delete tab button works). I'm on foundry V12, is it a compatibility issue ?
<img src="${!%{return entity.entity.img;}%}$">
CSB is not compatible with V12 yet
thx
he got the image from the card, I would like to get the image of the Item in the Container
Replace entity.entity with linkedEntity
how would i add a speed modifier for drag ruler to use?
You do the calculations on your sheet. In the path-settings of Drag Ruler, you then provide the path of the final value
This is the first time ive tried doing anything like this, how would i find the path?
It's actor.system.props.<yourComponentKey>
thank you so much
Is there a way to add the current number of a number field to itself?
Something like this? : ${ceil(<number field> + 2}$
But without it multiplying itself infinitely
And how do you want it to trigger?
would it be possible for it to trigger when the number changes?
I wouldn't suggest to do that
may i ask why not?
I would find it pretty weird when I enter 5, but it would change to 7 😅
the +2 is triggered via a checkbox
You don't want modifiers to influence non-derived values because of several non-trivial reasons. The better option is to split the logic into 3 Components: One holding the base value, the other one holding all combined modifiers and the last one holding the total of both.
I see
It's the same with Excel. You can either input a simple number or a Formula into a cell. You can't do both
I return asking why an item enters every item container i have and not just 1
You can transfer Items to an Actor without a single Item Container
How so?
The bag, that is holding all your Items, is the Actor itself. Maybe that explains it more clearly to you.
Item Containers are nothing more than displays
You can set up filters, so that they don't show everything. So you have to work with that
alright
Is there a way to install the beta build if you're using the Forge to host your game?
Never mind, I figured it out.
I can't drag tokens on to the scene is this a compatibility issue?
Yes, it is
dumb question == is aformula comparator for numbers. what do I use for text or dropdowns? I am trying to hide a sheet attribute if another attribute is set to a particular dropdown value
hello everyone, does anybody know how to add stats and counters on a token? I'm talking about stuff like defense/attack modifiers, things that aren't attribute bars or status effect.
equalText()
Depends on the way you want them.
Status effects can be used with counters via module status-icon-counters (with some work even round/turn based ticking possible).
More bars can be done with module bar-brawl.
Just showing values – I don’t know.
Good afternoon 🙂
I have a question and hopefully someone already went through that and has the answer 😉
We have Label where we have "component's tooltip" option to show some additional text when hovered.
I tried to apply that also into "Item Container" to show me additional information when hovered over it, but I failed to do so.
I can show description of the item as additional column via ${!item.rtxt_desc}$ with no problem, but can not pass same information through tooltip. Could that be due to "rich text" or I have done something wrong?
PS: how I can search for specific topic over here only and not whole Foundry VTT discord?
Thank you for that... then I will be patient and await for next release. 🙂
Best Regards
Hello, I know I can reference the Actor's name in my formulas using ${name}$, but is it possible to reference the Label Text of a component in the same component (preferably without needing to change it manually by typing in the Key every time)?
nope
Shucks... oh well. I'll just do it manually. Thanks!
Is there any know way to make an item by default part of evey sheet? or do I just have to do it manually?
If you setup the template to include the item it should remain part as default
Can we ? how?
I was incorrect, only subtemplates can be dragged onto a template..
I am sure there is a script that can be ran at creation to assign but thats a bit deeper than I know how to program
Just create a Sheet with the Item and duplicate that
Thats a good work around
Ok, seems it tricky day today 😉
There is added item where is added dropdown menu named "group" (example: key: spirit description: Spirit).
On Char Sheet is created Item Container where for item is created label with Label text of: "${!item.group}$" which works perfectly through items but will show only key value. I tried to use switch like: "${switchCase(!item.group,"spirit","Spirit","other")}$" but that result in error.
a) is there solution to use switchCase with !item.<parameter> ? or maybe there is some obvious error I missed?
b) can I pickup "Label" instead of "Key" value of dropdown of item in container field?
Remove ! if you're using this Formula in a Label text instead of a Label Roll Message
And for the second part: Nope, the Label of the Dropdown is not reusable
ok, I can now on create prelonged switch for that which will solve the problem, thank you 🙂
Forgive me for yet another question 😉
Case:
there is equipable_template "weapon parameter", by which is created equipable_item named "precision".
afterwards we have equipable_template "weapon", in which we have defined "item container" with allowance for "weapon parameter", and then we have created equipable_item "dagger".
Question:
How I can add "precision" to container in "dagger" ? as when I try to open "dagger" and add there "precision" it doesnt work 😦
Backgroud:
weapons could have 0+ parameters which would impact weapon parameters which would impact character parameters at the end... ie. weapon could have precise and penetration which would impact hit roll and armour reduction during fight
You cannot have Items in Items: https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/198
Having this error from this roll button: <p>Attack Roll: ${item.name}$ </p>
${current_endurance>=item.weapon_endurance_expenditure_requirement ? [1d20+:virtue_body:+:agility_mastery_bonus:] : notify('warn', 'Not enough Endurance')}$
<p>${#setPropertyInEntity('self', 'current_endurance', "current_endurance - item.weapon_endurance_expenditure_requirement")}$</p>
<p>${#setPropertyInEntity('self', 'spent_endurance', "spent_endurance + item.weapon_endurance_expenditure_requirement")}$</p>
<p>${name}$ expent ${item.weapon_endurance_expenditure_requirement}$ Endurance Point(s).</p>
Wielding State: ${ athletics_mastery_bonus < item.athletics_weapon_mastery_requirement ? 'Weak' : athletics_mastery_bonus > item.athletics_weapon_mastery_requirement ? 'Strong' : 'Normal' }$
<p>BHR Range: ${item.weapon_bloody_hit_range}$ </p>
Custom System Builder 2.4.3, Foundry 11
I think notify() came with 3.0.0, that's why the console says "Uncomputable token notify"
so I could I just get rid of notify?
Im trying to find the update where it doesnt break with the foundry version I want to use, and before it was getting weird erros with 3.0.0
Well, I could help with that if you provide the errors
yeah I messeged here before about it and your suggestion was to just update foundry but that would break some ohter modules I have so I was just trying to find the CSB update before it broke
and thanks for the help
Why would it break your modules if you perform a minor version-upgrade? We're not talking about updating from V11 to V12, it's about V11.299 to V11.315. That shouldn't break modules at all
well I was worried it might because Ive heard of it doing that before
@formal goblet So i have been trying to use the parent. feature you mentioned to me the other day. can you give me a better description of this?
is there no way I could just go to the update that I was using before it broke?
when populating items
ill just deal with it if no, sorry
It should not break anything, but you should copy your Data folder beforehand. If you're on Windows, it should be located in %localappdata%\FoundryVTT\
(https://foundryvtt.com/article/user-data-backup/)
Copy it elsewhere on your system, and then perform the update. If anything goes wrong, you'll be able to go back to the previous version with this 🙂
The official website and community for Foundry Virtual Tabletop.
You want to use the parent.-prefix, if you have the following case:
- You have a Dropdown in an Item
- This Dropdown needs entries from a Dynamic Table
- The Dynamic Table is located in an Actor
For this case, the Dynamic Table option key should be parent.dynamicTableKey
ok ill give it another try
Hi I'm trying to drag sub template to my sheet and get the follwoing error: "component.toJSON is not a function" this used to work before, any idea where to start with debugging?
Can you provide the whole error?
ok is there a way to have a roll also remove the amount of mana used?
since it also messed with things that worked before I loaded a backup. And the sheet is fine now, if I run into this problem again I'll try to get more info on the error, Thanks!
Well i thought i figured it out but i am missing something
${Roll:= [:sameRow('Ess_Damage'):x] + #sameRow('Ess_Bon_Dam') }$
${setPropertyInEntity('self', 'Mana', "'target.mana'- sameRow('Ess_Mana')"}$
#is only allowed at the beginning- remove
''aroundtarget.mana
ok still doesnt work.
The dice roll works but the -Mana does not now.
${Roll:= [:sameRow('Ess_Damage'):x] + sameRow('Ess_Bon_Dam')}$
${setPropertyInEntity('self', 'Mana', "target.Mana - sameRow('Ess_Mana')"}$
I cannot find it but does the fact that this is a number field effect it?
Mana is a number field
Remove target., you don't need that prefix on self
${setPropertyInEntity('Self', 'Mana', "Mana - sameRow('Ess_Mana')"}$
still not working. I have isolated it from the damage roll.
Missing ) at the end
ok new error now thats progress.
Formula.js:791 Uncaught (in promise) Error: Entity Self not found
at setPropertyInEntity (Formula.js:791:35)
at math.js:26531:54
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:858:27)
at Formula.compute (Formula.js:442:21)
at processFormulas (ComputablePhrase.js:139:35)
at async ComputablePhrase.compute (ComputablePhrase.js:212:34)
at async HTMLAnchorElement.<anonymous> (Label.js:271:21)
Fixed it
Ah, casing is important. Self and self is not the same
**Beta version 3.1.0-rc6 is now available, with the following changes : **
Technical
- Updated technical documentation
Features
- Changed hints display in component edition
- Added progress bar in version switcher
Fixes
- Fixed issue with the default value in Dynamic Tables
- Fixed issue with the labels in Meters
- Fixed an isssue where multiple executions of
setPropertyInEntity()targeting the same entity would cause issues with updates
Before installing this new Beta, PLEASE, make a backup. This version introduced a LOT of changes in the code, which can always go wrong.
Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta
If you want to switch an existing world to the beta version, you can follow this guide : https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Switch-to-Beta
If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
Following this announcement : is there anyone reading this who has developed a Component for CSB ? Please DM me 🙂
The API changed a bit, I'd like to discuss with you about those changes and how to make this as painless as possible 🙂
Question: Does setPropertyInEntity() only work with changeable fields and key values? Like, you can't use it to alter the value of a Label or hidden attribute?
I'm trying to set up a sheet where the HP readout is read-only to the players (so displayed with labels only) but still modifiable via a button press. I know I can do this with a bunch of visible-to-GM-only number fields, but the sheet is quite complicated so it's annoying to have a bunch of extra stuff cluttering it up when I'm trying to look at it. I'd much prefer to hide the dynamic HP values internally altogether, but still have them be modifiable via Roll Label Message.
Yep. Derived and non-derived values are strongly separated. So you can either have manual (Input Fields) or automatic (Labels with Formulas) stat-adjustments, not both. So the consequence would be that you'd need an Input Field somewhere.
Oh I was about to do something like this. So basically i need to create a field that is a number field that will then be added to my formula because i cannot directly effect a formula using setPropertyInEntity() on them
is that correct?
Yep
I am learning lol
ok I got something interesting... I dont know how to change this. ${setPropertyInEntity('self', 'Dam_Reduct', "Dam_Reduct - sameRow('Arm_Dam_Red')")}$
but it keeps reaplying itself indefinetly. how do i make it happen once? do i need to put an update button in for this?
Is it possible to fetch values from item containers?
I'm trying to have an armour section that only show the highest from a group of items, however so far the values just add up.
I'm curious on the viability and best way to create a pop up for players that will let them dynamically lower their initiative in the combat tracker. What suggestions do people have for going about doing something along these lines?
This should be used only in Label Roll Messages.
This will be possible with the next version. I'm actually surprised, that your Formula is even working.
You'd need your own Script for this
@formal goblet ${getRefFromDynamicTable(Weapons, (Armor_Dog), Number)}$ trying this instead... what am i missing
What are you trying?
Do i need to add dynamicTableKey : Armor_Table, and so on?
Trying to get all the numbers from a specific column in a dynamic table
getRefFromDynamicTable
That's not what getRef...() does. It will only return a path. Use fetchFrom...() instead
oh ok
ok how do i add them all together? I am looking to grab all the data from a column and add it together. I see lots of ways to filter the data but no way to add it together
I am trying to add together bonuses to avoid the roll function i asked about previously
Use the first example and wrap it with sum()
So cs is the command on dice roller to count successes. Is there a way to make it count some numbers twice?
Example for the 2d20 system.
Yes i keep writing things and deleting them because i find additional issues.
what formula would I use to only show a field on an item sheet if the item is on the actor's sheet? (i.e. you do not see this field if you just look at the item in the items list or a compendium)
You could use fetchFromActor() to fetch a random stat
**Beta version 3.1.0-rc7 is now available, with the following changes : **
Oops; looks like I released too soon yesterday...
Fixes
- Fixed issue with TextField Autocompletion when using lookup as a Formula
- Fixed issue with Tab edition
- Fixed issue with Tables when adding a new component in the Table
Before installing this new Beta, PLEASE, make a backup. This version introduced a LOT of changes in the code, which can always go wrong.
Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta
If you want to switch an existing world to the beta version, you can follow this guide : https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Switch-to-Beta
If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
I would like some help with css. I am looking to make all Item Containers show only the picture and be a set size. like 150x150 pixels (this is an example not actual).
need help with a default value showing on a sheet - the Enemy's HP scale with the number of heroes, so I have a baseHP value, an increment and a heroMultiplier. ie. Default HP = baseHP + (increment*heroMultiplier).
how do I get this to calculate and show in the maxHP field? and then allow further change if in game effects add or detract from this default?
that didn't work out. I have 2 item lists on the actor sheet - Equipped and in Backpack. If the equipped checkbox is on for an item then it's in the Equipped list, else it's in the Backpack list. However if I use fetchFromActor() - which does hide the field when it is looked at OFF an actor sheet, it appears in neither list when it is dropped onto the actor sheet
Can you present your setup?
I have no issues acomplishing this task
not sure what you're after but this is the actor sheet and the container rule for items in the backpack
I have a guess what is going wrong... Can you create a 3rd Container with no Filters and check/uncheck the checkbox in the Item there?
the item shows on the sheet (actually it shows now in the Backpack as well) but when I view that instance of the item I do not see the equipped checkbox
I am using fetchFromActor(maxHealth) (which will always have a non zero value)
So fetchFromActor('attached', "maxHealth", false)?
with the above the field has reappeared on the unattached item's instance
maxHealth is defined as a number field
huh, weird
Guys I'm trying to do a pretty simple thing, but am lost as to how.
I have a script macro in the hotbar, and all I want to do is grab a value from an actor sheet (CSB), but what I've been trying to use doesn't work;
aValue = token.actor.system.num_attack.value
what's the correct path for actor-sheet values in CSB? Or is there an API function I need to call?
actor.system.props.key (if you already have the actor context)
so it'd be something like token.actor.system.props.keyName?
yup
saved me such a headache, thank you
I tried every combination of single double and no quotes just for kicks but if I succeed in hiding the field, it's still not reappearing when I open the attached item. Not to worry - this is gonna be the least clean and neat implementation ever anyway 🙂
Hello again,
Is there any way to make a Radio button Group that change between different items? I.e. have an Active Item Radio Button on each Item and only one Item can be Active at a time?
If its not possible with Radio buttons, could you possibly suggest any other methods I could employ for this?
Nope, this is limited to sheet-level. The only option I can think of is having a WorldScript, which listens to update-events and intercepts the update if the diff + current state contains more than 1 selection.
Oh damn, I guess its way more complicated than I first assumed. I'll take a look into this. Thanks nonetheless!
Yeah, it's not that trivial
Hey so, I don't know why but in the beta my switchcase samerow functions for my dynamic tables just, aren't working as they used to. It just defaults to the fallback value. Any ideas on a fix for this?
Maybe the types are different? switchCase() does a strict matching in the background
I mean I guess Int_Type is fetching from a different dynamic table that has numbered keys, does that just, not work anymore?
After update core foundry, i cant put tokens on the map. Anyone can help?
I mean types like string, number, boolean, etc... Each value has a type. And if the types don't match (e.g. 4 and '4'), they won't be treated as equal by switchCase(). Try to quote your numbers in the function to check, if my assumption is correct or not.
CSB is not compatible with V12
thanks.
Hm, nothing, still not working.
${switchCase(sameRow('Int_Type'), '1', 'Str', '2', 'Agi', '3', 'Vig', '4', 'Con', '5', 'Min', '6', 'Itu', '7', 'Exp', 0)}$ Like this right?
Yeah, should be fine. Does the console say anything?
Nothing, just creating the chat message.
I get the desired result without the quotes around numbers
Hm, maybe the table itself has some other issue then
Try out game.actors.getName('actorName').system.props in the console and check the table data in it
because any instance where I use SwitchCase(sameRow('Key'), and so on it seems to return nothing or the fallback.
Got it
I'm probably doing something wrong here, put the actor's name in well, actorName
Let me see if I can replicate and isolate this issue, cause theres a lot going on around it.
It should find the actor if the name is correct 😅
Oh I capitalized it on accident
Okay it worked with no real errors or issues popping up as far as I can tell
Any CSS wizards on here?
Ok i am having a problem that seems to go against everything i have done so far. why does ${'Dam_Reduct'}$ return the words and not the numbers from Dam_Reduct?
I'm pretty sure you gotta just do ${Dam_Reduct}$
'Dam_Reduct' is a text, not a variable
is there somewhere that shows the the uses of all the :'"{[ and so on? I know the syntax (buzz word) changes between applications but argh
Yes that is what i need thank you
ok that fixed half the issues with this. but i am getting a
Error: Uncomputable token Raw_Dam
${setPropertyInEntity('self', 'Health', Health - (ceil((Raw_Dam* ((100- Dam_RedP)/100)) - Dam_Red)))}$
Raw_Dam is not defined then. Check that your keys are correct
ok it is working now. but i now need to make it so that nothing happens if the number is a possotive number.
basically negating more damage than you recieve should not heal you lol
You can use min() or max() to cap your numbers
ahh ok. from the way i read the entry it seemed like it would output the max number. so i would do (max(0, (ceil.... ?
yep
Well that was allot easier than i thought. Thank you!
In a label component in an item container is it possible do reference the output of the Label text in the Label roll message?
Will be doable with the next version
No problem. I should have asked earlier and saved my sanity.
Hey, whats the most updated core version of foundry compatible with CSB?
11
the last 11 is ok?
yep
thnx
hoping for a reply to this one: need help with a default value showing on a sheet - the Enemy's HP scale with the number of heroes, so I have a baseHP value, an increment and a heroMultiplier. ie. Default HP = baseHP + (increment*heroMultiplier).
how do I get this to calculate and show in the maxHealth field? and then allow further change if in game effects add or detract from this default?
I have something similar going on and I handled it by just putting equations that reference the relevant variables in an appropriate fields. I handled miscellaneous additions by also referencing a number field I can edit.
The sheet only detects changes in the sheet itself. Changes, that are triggered on the canvas, will not update your sheet. That is something, that you have to handle for yourself.
The increment can be a Label with a Script, that fetches the correct number. The rest is just a Formula in the max-field of your Number Field
Ah, side note, it would be nice if we could set it so max HP is determined programmatically, so everything is automatic and you get bars, but still allow the current value to go above max.
The max-value can already be a Formula instead of a static value
Right, but doing that prevents going above the max, right?
Yep, that is what it is for
That's the problem. I'd like to have a max value, both because that's the normal full value and because you need one for a bar, but sometimes you also want to be able to go over cap mid battle.
For example, a character's max HP might be 64, but a healing effect might be able to temporarily push them past that, if it would heal more than their missing HP.
I would see this as a temporary increase of the max-hp then
That would require editing the character sheet (and then undoing the edit later) and it would increase the size of the bar, right?
all the fields described are on the same sheet. I think I am simply not formatting the formula properly. Programming skill=0 here
It would technically fall into the responsability of Active Effects, which would modify the max-hp.
The Bar-size (if we're talking about current / max and not the actual width) would increase in the max accordingly
I don't make much use of the active effects; normally I just modify HP by manually entering it into the field on the token. I also wouldn't want the bar to increase for temp HP. ( I am referring to the current max not the width.)
I see. Then it's just a Formula in the max-field of your Number Field with ${baseHP + increment * heroMultiplier}$
Any scenario in my game where the Max HP goes up could def be handled by an active effect defined on an item card added to the sheet
great scott! it actually obeys order of operations without having to use brackets?? #faithInHumanityRestored
Then it would be something similar to a Shield to be honest. But what I can definetly say is that your case is not handled by CSB by default
Yeah, even programming languages have precedence 😅
Yup, I know. That's why I said it would be nice if we could set number fields to not treat the max as a hard limit if it's set by a formula. (I know the bars don't default to treating it as a hard limit and I thought CSB didn't either, if you manually enter the max, at least as far as the tokens/bars are concerned. It would still be the normal max in the sheet.)
Wait, Token Bars can go over max?
Pretty sure, yes.
Unfortunately, I'm away from my computer right now, so I can't double check. Also, I'm talking about manually set bars, not bars set by CBS, with a formula based max.
Yeah I know, CSB doesn't allow it from itself.
You can open a ticket if you wish for it. Or create a Custom Component with your own rules.
here's my setup to implement that calculation - but it is not calculating. all the calculation components are set with min value and default value 1
If your max-hp is calculated automatically, then the Component holding the max-value should be a Label (or you directly use the calculations inside the max-field of the currentHP-NumberField)
awesome! thankyou
This is probably an easy question that I could figure out with a bit of testing, but I figured I'd ask the pros here.
Is it possible to have items inside items that can modify variables by using nested item containers? Like socketing a rune or gem into a sword that adds damage or roll modifiers or stuff.
Fair enough! But hey, still being worked on? I'll take it.
Hey, I'm having an incredibly general, but also incredibly frustrating problem.
For some reason, I can't reference other Keys outside of labels on a template. Trying to set up a proficiency bonus on my sheet templates and it's just not working.
General math works, and when used in a label it works. But I can't reference labels or keys. Tried a number of equations and smoke's coming from my ears. So, stumped.
Pictures attached for reference
The default value of Input Components is only relevant at creation time (when initializing a value), it won't auto-update ever again.
Oh. Thank you.
...How do I make it do what I want it to do (refer other cells, and totals. Think, Excel sum(1,2) becomes 3 in cell a1, and I can make a =a1 on zzz3 and it'll also be 3)
My brain is mush because I dumb
A cell can either contain a Formula or a simple input. Having both is impossible. That's the same with Labels and Input Components.
How do i add an items key to another key in the character sheet
What are you looking to do with that?
i want to add an item(s) that gives +2 to a stat
Ok. I might be misunderstanding something then. Why are you doing that via the keys? Also, could you use item modifiers for that?
(Item modifiers let you do things like have an Item change the value of a lable on the attached character sheet.)
another dumb q from me: how do I apply rounding to a calculated result so that .5 rounds down?
Unrelated, but I may have done something incorrectly. I want to try the beta, but I'm using Forge for hosting and I didn't see a way to access the world.json file, so I just created a new world and used CSB's import/export function to transfer over the templates and used manual import/exports to transfer over the characters and items, but now I'm getting some weird errors. I'm assuming that's because of the hackjob transfer I did, so is there a better way to handle it and/or to access the appropriate files on Forge?
floor([the-stuff-you-want-to-round])
You can use (equalText(<Component Key>,'<value of component>')?<true>:<false>) Parenthesis isn't neccessary, unless you're planning on having values be added or subtracted from your function, etc. Because otherwise the modifiers will only apply if it's false.
For example equalText(Type_Cheese,'Brie')?1:0*Flavour_Cheese so even if Brie was the type_cheese, it would only return '1' as the value, because when it isn't Brie, it will then multiply it by flavour_cheese
does that work for dropdown values as well?
Depending on the number of dropdown options, you can use switchCase(<component key>,'<dropdown key>'), or caseSwitch (I forget which one) it does have the advantage of being "cleaner" depending on the sort of shenanigans you're using it for.
For example switchCase(Cheese_Type,'Brie',5,'Cheddar',2) if memory serves you can have as many pairs of 2 as you like, instead of equalText() which would require you to do a number of conditions and it would become incredibly messy as a result.
in my sheet I have a source. if the source dropdown value is the 'Shop' entry, I want to show a price field, otherwise hide it
That sounds like you'd want to use the Visibility Formula field on whatever you want to hide. I think equalText() should work for that. Alternatively, you could set the keys for the dropdown to numbers and do it that way, since they don't have to be unique or match the displayed text.
Yeah I'm at a complete loss man. As far as I'm aware there's no function for a String/Text not being something, unless you use switchCase()?
Can you not just do something like not(equalText('shop', theSource))
I honestly don't know. Not a programmer, I could try it test,
Doesn't seem so.
Ah. So not() negates a boolean (i.e. turns true to false), so you should be able to use equalText() to see if the dropdown has the right value and ... actually, they shouldn't need to negate it, because they want it to show when it resolves to true. However, if they wanted it to show for every case except for one, they could then check for that case and reverse the value produced by equalText().
thankyou gents, equalText() worked. placed in the visibility formula the fields only display when value is Shop
Would it be possible for an example?
Sidenote: equalText(race,'mutant')!=1 checks if race='mutant' and if it isn't, marks it as true
I refuse to get stumped by something which is supposed to be a simple "not" function
Sure. Let's say you have a stat called Strength, that's being stored as a Label or Hidden Attribute (I think it works for hidden attributes), and you'd like an item to increase it's value by +2, regardless of what the value currently is. When setting up the item's template, you'd go to Configure Item Modifiers and set one up with the Key field point to the key of the Label you want to modify and the formula pointing to an appropriate field on the template. Then once you create and set up the item, when put on a character it'll increase their Strength by 2.
Sorry, minor correction, you can do it at the Template level, but you can also just click the Configure Item Modifiers button on the item itself and, rather than point the formula to a field on the item, just enter a 2.
the equalText() when used for the dropdown needs to test the value key in single quotes, not the displayed text value
not() works if you don't want to, or can't, set it equal to 1. If you're just negating a boolean it can be more convenient.
idk why it didn't work for me then lol
That seems to be working correctly? Or are you saying the not() version didn't work, but the !=1 does?
everything works fine - I was simply using the text value of the dropdown entry instead of the key value. my bad
Yeah. I tried not() with the stuff in the middle. Might just be because I'm on V12 I guess? lol.
I thought CSB wasn't fully compatible with v12?
It isn't :(
Unfortunately thought I'd need to update as I was expecting one of the two PF groups I DM for to get their shit in order, but uh... Not so much. Regrettably, I had also forgotten about the prospect of CSB not being up-to-date
Thanks. I'll figure out a workaround instead of doing what I have been doing (banging my head against this expecting it to work)
what am i doing wrong here
ive also used ${CF_StaminPointsMax}$ ${:CF_StaminPointsMax:}$ ${:CF_StaminPointsMax*1:}$
CF_StaminPointsMax is a number field
Figureed it out
hey question got my charecter sheet done for my system do i need any speial modules or items to bring in custom sounds,tokens and maps
can the alwaysHP mod be used with CSB?
What did you do?
Apparently you can't take information out of number fields, it has to be a label into another label. Also it doesn't look like hidden attributes work, but that could just be me not understanding it yet.
I am currently attempting to make a class table that will automatically add the stats on level up to a pc. However not being able to use number fields is currently making this very difficult, Unless I make a template for each and every class
I found a workaround : Numberfield -> Label -> Character Sheet
in my game I have various items that can have effects on a hero's speed, fatigue, HP. the usual. They can also give active effects that either correspond to standard ones or are custom for the game.
I only want these effects to apply if the item is not only on the actor's sheet but is 'equipped', which is a checkbox state on the item itself (otherwise it is in the hero's backpack and does nothing).
if two different items provide an effect, can I specify that effect on the item itself (do THIS to the actor) or do I check it from the actor (if you have one of these then THIS happens).
and since I am completely rubbish at doing this stuff, I do not know how to specify either of these conditions/formulas - though I at least know where they go.
I'm trying to set the initiative formula and I'm sure I'm missing something super simple. 😅
This is what I'm using, and it returns it as 0 dice rolled.
[:Attribute_init:d2cs>1]
The result should be the number of successes, not rolled dice. Try cs>0, what do you get?
I'm sure I'm missing something, but when I drag an item into an item container, it acts like all the containers are a single instance (they have different keys, obviously). You guys know what I'm doing wrong?
the item containers are just displays, all the items are on the actor. so if you have no filters, they display in all containers.
you can filter simply by using different templates, or more explicitly by adding filter conditions to the item container
Right. Well that's out the window then I guess. Cheers.
you could for instance add a dropdown list to the item template where you can select WHERE you equip it, and then use filters on your item lists to look for that value
I see
It's definitely not rolling any dice. I did try that though. Didn't do anything.
I thought for a moment that maybe it had something to do with it being a label and not a number field so I tried it with a different attribute, but that did the same thing.
Try out game.actors.getName('actorName').system.props.Attribute_init in the console
that gives me the correct number
What about only Attribute_init in the Formula?
Which Foundry and CSB-version?
oh crap. have I forgotten to update things? 😅 one sec
I hope not to V12
I'm in version 11 build 315 of foundry
That's fine
CSB is version 3
That's also fine...
Is your Token linked to an Actor, or does it have an own sheet per Token?
omg.
I am an idiot.
the token got linked to the wrong sheet somehow
<facepalm>
I will now hide my face in shame
😅
Is the item filter not working?
If im understanding correctly, I was able to do what you want to do
I hadn't realised it was just a single container. I got something working with it, not exactly what i was going for but close enough.
You need to use the filters to ensure that the containers work properly, have a hidden label or drop down menu on the item which defines the type of item it is and use the filter on that label/drop down menu
can anyone show me a working example of an active effect sourced from an item?
How would i go about it?
If you're responding to my question, I'd like to see the config changes/formulas that affect an attribute of the actor the item is placed on, so that the effect is removed when the item is removed as well
I did a workaround that is honestly very bootleg
but it works
The simplist way i can explain it without a video is this :
Item modifies a label on the character sheet, then the character sheet label is added towards the number i actually wish changed
Sorry i cant do better than that, i just recently learned how to use this system
Make sure both sides are labels
unless of course im wrong and made things infinitely more complicated than it has to be
thanks. that worked. now I have to figure out how to ONLY apply the effect if the item is equipped
Checkbox?
Good morning fine folks
${Checkbox == 1 ? Item Values : 0}$
I actually have a check box question
GMorning
I am trying to make a dynamic field show up or hide depending on a check box
Visibility formula are i put sameRow(checkbox_key)
what am i missing
Anything I want to hide I place in a table/Tabbed Panel then use :
Checkbox == 1
I am working in a dynamic table and Skil_Spec is my checkbox key
woohoo! ${heroEquipped ? 2:0}$
sameRow(Skil_Spec)==1 also doesnt work
sameRow?
yes since i am in a dynamic table
in my game, some items can be exhausted for their effect. I have a setup panel only the gm can see, and in it I can set a checkbox for the exhaustible attribute. this in turn controls the visibility of the exhausted checkbox - which is one the players use. that visibility formula is simply --> exhaustible==true <-- Note that true/false must be lower case
I am trying that
Yea, I can't help since I've never used dynamic tables and don't quite know exactly what you are trying to do
I would personally set a checkbox that hides/reveals a panel. But maybe I'm getting your goal wrong
A question of my own
how do i copy my world and transfer my templates
nevermind
I am trying to hide a column in a dynamic table when a checkbox is checked in a specific row
So would a checkbox next/above a panel not work?
Why if ${sameRow('Skil_Spec')}$ in a label literally returns true. Does sameRow('Skil_Spec')==true not work in a visability formula
You don't need to check for == true. And also, true is not the same as 'true'
So I had tried sameRow(Skil_Spec)
@formal goblet What am i missing. I have re-read the help file and your post. I am trying to make Certain feilds visible or invisible based on a check box (Skil_spec). I have tried every change i could think of. What should be in the visability formula?
Ah wait, I remember there was a bugfix because of sameRow() in the visibility-formula 😅
so is it possible?
With 3.1.0, yeah. Earlier versions, nope
so i need to update ok
3.1.0 is beta-only currently.
when will that be avaliable in forge?
The beta is already available and can be downloaded with the manifest-link. The stable-release is planned for next week
Is 3.1.0 going to be v12 compatible?
No, 3.1.0 is there to finish up V11. Once there, we'll work on 4.0.0, which has the target to be compatible with V12
Rip, understandable
Is there a possibility of integrating JB2A effects with CSB?
I think you can, but that would require heavy work on your side. You'd have to use Scripts ofc
uhh 🥹 tks kkk
Well i updated to the beta and it works like a charm
Is it working to place tokens on maps?
Well If you meen just dragging characters I can test. If you have code you want me to test I can try
Yes, dragging characters to maps, creating tokens by dragging them
in my game I have lingering effects that allow multiple instances of the same thing e.g. each bleed token is nasty. it would be nice if the token for that actor reflected the bleeding status as an active effect because of the existence of any bleed item on the actor, and lost it when no bleed items remain. Any clues on how to make that happen?
can you drag/drop items between containers on different actors?
or rather, is there a simple way to enable it?
You can drag the item-image (not name)
Ahhh. I'm learning so much lol
Ehhhh... nope 😅
thanks
When Ref a drop down is it possible to refrence the name field?
You mean the Label of a Dropdown-option? Nope
@formal goblet I am looking for a way to make items appear as just an image and then the player can open them and see the details
Hey everyone ! 🙂
**Version 3.1.0 is now generally available, with the following changes : **
Technical Features
- Switched codebase to TypeScript
- Switched formula computation to component's code
- Switched chat message generation to component's code
Features
- [#280] Labels executing formulas without chat message
- [#228] Added Filtering & Sorting for Item Containers & Dynamic Tables
- Added
sameRowIndex() - Added
localVars&optionsto Script-Expressions - Added
lookupandlookupReffunctions replacingfetchFromDynamicTableandgetRefFromDynamicTable - [#180] Made Item Containers referençable by the
lookupandlookupReffunctions, and thesameRowandsameRowRefinside Item Containers columns - Added autocompletion in Text Fields
- Added
rangeoption to Number Field display - [#232] Added Collapsible Panels
- [#300] Added Meter element
- Added option in Settings to set minimum Role for Item Modifier Config
- Added option in Settings to set minimum Role for Reloading a Sheet
- Added version switch helper
- Added ability to drag an item from a sheet using all the item button
- Added
escapeQuotesfunction
Fixes
- Fixed a bug where tooltip-formulas would not work when using references (Item / Dynamic Table)
- Fixed a bug where visibility-formulas would not work when using references (Item / Dynamic Table)
- Fixed a bug where dropdown-formulas would not work when using references (Item / Dynamic Table)
- Fixed a bug where visibility-formulas would override role & permission-settings
- Delete-operations in Dynamic Tables now delete rows instead of setting a delete-flag (excluding predefined lines)
- Item Modifiers now have a bigger input-field for keys
- Disabled preselected Item Templates when creating an Item Container
- Fixed a bug where initial Checkbox value wouldn't be set correctly
- Fixed computation of hidden Dynamic Tables when there were changes in the predefined lines
- [#342] Fixed a bug where initial Radio Button Group value wouldn't be set correctly
- [#214] Fixed a bug where Template Filters in Item Containers wouldn't be imported correctly
- [#328] Reworked Filtering for Item Containers (now uses Formulas)
- [#346] Values of Attribute Bars are now Numbers instead of Strings (with numbers)
- [#347] Fixed a bug where sameRow() would always return 0 on empty strings despite having a default-value
- Fixed a bug where deleted Items wouldn't be removed until re-rendering
- Fixed a bug where multiple executions of
setPropertyInEntity()would cause issues with updates - [#350] Fixed a bug where updating a Character while an Observer has its sheet opened would cause an error
- Fixed Label computation when Label has more than 10 Formulas
- Fixed issue causing component movement in template to add
_copysuffix - Fixed issue with text containing quotes (
') in Formulas - [#208] Fixed issue with unique items preventing adding a duplicated item to the same actor
- Fixed an issue where container duplication caused key duplication in its contents
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
I might have missed it, but I don't think I've seen the version switch helper explained. Is there anything I should know about it?
Those are instructions for how to change over to the beta (which shouldn't be relevant any more), right? I was asking about the version switch helper that was 3.1.0 release notes.
Added version switch helper
Unless I'm missing something, that doesn't seem to be mentioned on the linked page (or, at least, I didn't see it and ctrl+f doesn't turn up any instances of the word 'help' in the text).
Those are general instructions on how to switch versions. The switch helper will show itself in case you've edited the system in the world.json
Got it. So if you just do a normal update, now that it's out of beta, it shouldn't show up and shouldn't be relevant?
Yep
Thank you.
Under module compatibility, Combat Utility Belt is listed as breaking things badly, but Condition Lab isn't listed at all. Normally, I'd take that to mean "Condition lab may or may not work, so try it at your own risk", but since it's a fork of CUB, I figured I should double check. Does anyone know if Condition Lab works with CSB (either just for managing the statuses list or for its effect functionality) and does it risk breaking things in a similar way to CUB?
I don't know, but you can create a test-world and check that for yourself
Fair enough. I don't actually have much experience with active effects, so I'm not sure how best to test it. Would you be able to recommend a quick test or something I could try to see if it causes issues?
You need an Actor which you want to test. As soon as you have that, you can try to add an Effect to the default-config (Effects, which can be selected from a Token). When you're done, try to apply the Effect and see, if you get any errors in the console.
Does the effect need to actually do something to the character or is simply adding the icon enough?
I think Icon is enough
Before the update, I could drag items from a compendium to an actor. Now, I have to import the item first before dragging it on an actor. Is that intentional?
Well, it doesn't seem to be causing any errors, even if I use it for actual effects, though I don't have a good handle on those. So far, it seems like Condition Lab effects can work on things that CSB effects normally can't (i.e. Number Fields), but can't work on things that it they can (i.e. labels). With that said, when I tried to use it to modify HP, I had to use the system.props version, rather than the attributeBar version, and it ended up continuously subtracting the HP value, rather than only doing it once or doing it once per round. I'm not sure if that's due to how it's interacting with CSB or simple user error, but it's honestly more than I expected from it, either way.
Can you not put an item container in a subtemplate?
I created the items (based on item templates) for my game, put them in a compendium, and until the update, I could drag-and-drop items from the compendium directly on the character sheet. Now, I have to import them first. I am not talking about templates. I am talking about the game-ready items.
The item container is present on the sheet. Dragging items from the items directory on to the sheet works perfectly.
${setPropertyInEntity('self', sameRow('Mon_Health'), "sameRow('Mon_Health') - sameRow('Mon_Damage')")}$ Remaining Health
Ok this set of code works however it doesnt update Mon_Health with the updated number. What am i missing
it does output to chat the number though
~~What type of component is mon_health?~~Never mind.
number field
@stone swan I just want to say i know the feeling. I truly hope no one has seen some of the rediculous things i have posted and deleted. I am learning and sometimes i ask a question and 2 minutes later I find the answer like damnit how did i not catch that caps lock or whatever
Resolve sameRow('Mon_Health') and take a look at it again. If you do that, you'll probably spot the issue you have
I don't think so
Can you create a ticket for that? We didn't consider this case at all to be fair
Are you supposed to be able to add item containers to subTemplates, because I didn't see them in the component type drop down, but I was able to drag one on to a subTemplate.
Well, the Container itself is not really an issue. It's just that we deactivated it for Items, because Items cannot have other Items inside them.
Ah. It's deactivated for the entire category, not just items and item templates specifically?
Can't say for sure, but I think yes
@formal goblet ok I have been messing with it and i dont see the issue
Take a look at this one: ${setPropertyInEntity('self', 50, 30)}$. Can you explain to me, what this function would do?
It would set the nothing because the 50 is not an identifier. but it wont take sameRow(Mon_Health)
I tried that
${setPropertyInEntity('self', sameRow(Mon_Health), "sameRow('Mon_Health') - sameRow('Mon_Damage')")}$ Remaining Health
Error: Uncomputable token "Mon_Health"
I thought of that
If you write it that way, the parser will think that Mon_Health is a variable
But there's no system.props.Mon_Health in your sheet. That's why it fails
So is it possible?
I am trying to make a sheet for monitoring the health of 10-20+ monsters
It's possible, yeah. But I'm trying to help you find and understand the issue you have. That's why I'm challenging your analytical skills instead of giving you a solution.
I know and i appreciate you for it
I dont understant the part about system.props.Mon_Health
You're correct with that. You need a valid key or a path, but sameRow() only returns the value of the field, which is a number. So it doesn't fit what we actually need. Buuuut... are there maybe other functions?
oh ok ill go read
The full path in your Actor, when you're trying to access the variables you've created, is always system.props.yourKey.
You can check that by executing game.actors.getName('actorName') in the console and inspecting the data of the result.
I think i found it setPropertyInEntity('self', sameRowRef('Charges'), "sameRow('MaxCharges')")
BOOM! yes that worked. Thank you!!!! I appreciate your way of teaching even if it doesnt always sound like it
So im having an issue with conditions/switchcase and variable calculation.
At the start of my script i set a variable success:=0.
Then in a switchCase i try to check a variable "roll1" which contains a roll of 1d10 for its value.
on 1,2 it should be subtracted by 1
on a 3,4,5,6,7 it should be added by 0.5
and on 8,9,10 it should be added by 1
i always get 3.5, which is exactly when i execute all this stuff in order. Here is also the code:
${#switchCase(roll1, 1, ${success:=success-1}$, 2, ${success:=success-1}$, '')}$${#switchCase(roll1, 3, ${success:=success+0.5}$, 4, ${success:=success+0.5}$, 5, ${success:=success+0.5}$, 6, ${success:=success+0.5}$, 7, ${success:=success+0.5}$, '')}$${#switchCase(roll1, 8, ${success:=success+1}$, 9, ${success:=success+1}$, 10, ${success:=success+1}$, '')}$
Thanks for any help!
Try to not nest Formulas and you'll be good to go. Your issue is that the first thing executed is not the switchCase(), but everything else.
${3 + ${2 + ${1}$}$}$ in this example, the order of execution goes from 1 to 3
@formal goblet I hate to do this, but do you remember when you helped me put together a macro for a Label, in a Dynamic Table, so it could take the contents of a Rich Text Field and parse them into a proper roll message, rather than doing something like passing ${[1d20]}$ to the chat directly? With the new update, I'd like to rework it to function in an Item Container, which seems like it shouldn't be too hard, thanks to the changes to sameRowRef.
Unfortunately I'm getting an error that says:
TypeError: Cannot read properties of undefined (reading 'length')```
I've tried to track it down myself, but for some reason clicking on the source links in the console doesn't actually take me to the source (it produces its own error), so I've been having a hard time even narrowing down what part of the old macro is causing issues.
Would you be willing to help with either problem?
Never mind. I've managed to figure it out (the issues with the macro, still not sure about the console). Sorry for bothering you.
Ok. I have it working, but it's messy and I feel like I'm missing something obvious with how %{}% and {${}$ interact. Currently, I'm using foundry.utils.getProperty() to get the value of the Rich Text field, but just ${item.key}$ seems like it should work. At the very least, it seems to retrieve the same information as getProperty(), but if the text has more than one line it breaks the java. I'm pretty sure this is because it's not turning into a string properly, so it's just dumping a bunch of HTML into the TS, which predictably breaks things. The issue is, neither a set of external quotes nor the string() function worked and I don't know why.
What am I missing?
I want a button on an actor's sheet to execute a macro. How do I do that?
I've raised ticket #362 for that issue. Probably best to go back to the previous version, till this is fixed? Having items in compendiums is pretty central to my setup.
hello, kp ob das ein Bug ist aber wenn man bei Journalen ne Tabelle macht sehen die im Bearbeitungsfeld leider nicht so aus wie bei der Darstellung was dazu führt das einige Wörter Verschmelzen
Yes!! Now it's just the v12 compatibility ❤️
Ahh, now I get that, great help - thanks! Is there another way to condition the counting of the variable, or more in general formulas I am unaware of? ^^
Is it possible to Edit the Statusbar ?
What exactly are you looking to accomplish?
would like to delete half of them and add some with my own token and text
Module: Core Settings Expanded
That or Conditions Lab.
thanks!
The former is a bit simpler, but the later can let you export your custom conditions.
warscheinlich das oder?
y
When trying to upload the css file through CSB (uploaded to asset library already) I dont see it as an option? it is in the asset library but it does not appear as an option. do i just need to copy the path from the asset library or am i doing something wrong
The File Picker won't show the file, so you have to manually insert the path
Ok thank you!
I tried out Core Settings & Conditions Lab but it seems that both cant delete or Edit the existing conditions. Any Idea?
You need ${!item.key}$ to get rid of the HTML
Core Settings should be able to
@formal goblet do you have a css file that works so i can see it as an example? I dont need it to work for my system or anything just an example
.red {
color: red;
}
have just that and it would work? doesnt need <style> just the pieces i want? cause i tried h1 { color: red; } and it didnt change anything
I can just Add new ones with core settings but cant select and delete specific one. even the one i created.
I think it was Select -> Clear Custom Fields -> Modify Custom
My example creates a custom css-class, which should be entered in the Component Config
na it creats new ones then
Without the dot
ok I dont think its working and i dont know what i am doing wrong.
You can also try out the Custom-CSS module
It seems the module has a bug...
Thanks pretty much - i got it now. But there arrives another problem. So i am having this code here, which is a flag i want to use later for text coloring - isnt that important.
${check1:= + roll1<=2 ? 'r' : ''}$${#check1:= + roll1>=3 and roll1<=7 ? 'b' : ''}$${#check1:= + roll1>=8 ? 'g' : ''}$ ${string(check1)}$
if i execute it like this it just gives out errors, console says:
SyntaxError: Value expected (char 12)
formula : " + roll1>=8 ? 'g' : ''"
I also tried to set the conditions in front of the ? in (). Then i get the following error:
SyntaxError: Parenthesis ) expected (char 12)
Also tried to edit in in the HTML Editor of the Rich Text Editor, since i thought the cause is " + roll1**>=**8 ? 'g' : ''", but when i change it back to >= it just goes back when saving.
and without the +-sign at the beginning?
ah, alright - let me try ^^
I'm also not sure how the system behaves with variable reassignment
But it shouldnt be reassigned right? since only one condition should be met
It doesn't matter. check1:= check1 is a reassignment
But its check1:= roll1
Pretty sure im misunderstandig what you mean right now - sorry :/
:= is the custom assignment operator in CSB. It's more or less the same as = in Javascript. Whenever you use that, you have an assignment (it doesn't matter on the value you want to assign at all)
Ahh, alright - now i get that. Alright - thanks. Well then i might have to look for a workarround ^^
Iirc, the way you do it is uncheck the active box and then click the modify button. You don't actually delete the default ones so much as you hide them.
ok I am reading some css (which i got working with Custom CSS (thank you martin) and i think the name of the image container is incorrect. can someone else tell me if that is so.
.custom-system-item-container-image
I mean the fastest way to verify classes and such are the browser inspector