Old CRT Effects, an Add-on Module for Foundry Virtual Tabletop
#Custom System Builder
1 messages · Page 7 of 1
Thank You!
Does anyone have a macro I can add to a roll that can check or uncheck a box? I wanna be able to equip and unequip stuff without opening the item.
I would also be interested in such a thing 👀
Honestly, there is a lot of Macros I'd like to make. Anyone got a good tutorial on making them?
ty
One more question... I saw this on the roadmap... I do not expect it to be coming any time soon but... by chance is it?
#126 - Allow roll messages to edit values on the sheet
If @brittle moth says no that is cool, it means I keep trying to figure out macros
I'm setting up a roll message to use a 'user input' in one area and then reference that key in another.
• Cost: 1+?{WillpowerSpent|2} Willpower
(Other display text)
Willpower spent ${WillpowerSpent}$
However, when I do this, the roll message shows as blank. When I edit the roll message I see all the text but when rendered in the item, it's blank. Anyone seen this?
Also I get an error on this: ${?{WillpowerSpent|2}+1}$
Perhaps someone here can answer the question - as I am attempting my first build in Foundry and struggling hard. But I am using Custom System Builder, I hope you'll understand what I'm trying to do. Very simply, I'm trying to create a dynamic table so that I can re-use it to assert it as values in a custom character sheet drop down (20 rows) field. Problem: I don't know what constitutes as a "Dynamic Table". Docs and Google point me to rollable tables, which isn't helpful.
Can someone help me identify what kind of table I need to build here? I'm realizing vernacular matters.
Thank you. When referencing the table and the column, is there a syntax? Copy and pasting the exact name does not register the table.
Whatever key you have used for your table and the column. Should be just the name of it without any additions.
Nvm, I think I figured it out. It will only register dynamic tables in the same sheet. It won't register from other items/sheets.
Gotcha. i was testing making an item for it to reference, as I'm making 7 templates for different playable species.
Gotcha
Thank you for the clarification!
This helps a lot!
Why not just 1 template for all species? Are they that different?
There probably is a better way, I'm just a newb and it's pretty in depth. My system uses a full range of dice, and stats can go up or down depending on what's happening so it makes rolling off of the character sheet itself pretty intensive.
So I just wanted a drop down that will help players keep track of base stats
Just with 17 dropdowns per template, I didn't want to generate a table line by line for each one.
With each playable species, there are buffs that players can choose from, and each species is different.
That´s probably something I´d make an Item Template for with Item Modifiers.
May consider that. We'll have to see.
The player can drag the corresponding species into his sheet and the stat buffs will be applied automatically.
question for the fellas: i am about at the step where I just need to make a compendium. how would I go about doing that? should I make 1 of each item/monster/whatever I want and then click the compendium button or what?
Im having trouble making a roll message. I just need a simple roll XD6 where X is the value of one of the components on the character sheet
Example ^^ When I click Fatigue I want it to roll 4D6
I cant figure out how to get it to use the component as a variable
that seems like youll need a hidden label that concat's the values
or
hm
sorry im not very good at this
I got it to reference the value with this: "@{selected|FatigueCurrent}d6 for Fatigue"
but it wont roll
lol all good
what i've done is hide labels that do Concat in a tab labelled "info" and pulled from there
because at a certain point shit stops working
so they concat keys for me
then i reference them elsewhere
still cant hide the tab though
Is there a way to have an item check the key of its parent container? I have a system where Attributes and Defects can be applied to either characters or items, and choose which key value to change depending on that. If applied to a character, its point cost will be added to the character's spent points. If it's on an item, it will be added to the total points applied to the item, and half the total points will be added to the equipper's expenditures.
Anyone else having trouble when using the user input ?{varName|value} and then referencing that key later like ${ varName}$ ? When I do it for a roll message/description, it clears all the text out in the display for some reason
Depends If you have a lot of similar items. You can Access the compendium File in your world File, but its kind of Tricky and i think only really worth IT when you have a lot of similar Elements (like just changing name and value)
I have done it but its not trivial to setup
Additionally, is there a way to set the visibility formula in an Item Container label to check the value of a property in that item?
Uh...uh-oh. I tried to make a label that was just a horizontal rule, and now, not only is there no horizontal rule, but I can't click on the label to open and edit or delete it...there's just a huge empty space now.
Its planned for the next release, but said next release is delayed by a bit of technical debt which I'm trying to handle right now 🙂
Um...can Items not be equipped to other Items?
I'm trying to make it so that Attributes and Defects (which are classified as Items in CSB) can be attached to Items.
Not currently, although I think there are plans for items within items in the pipeline
Ahh. I hope so, because I've kinda hit a wall with this system until then.
I think you just need a label with “label text” “Fatigue” and “label roll message”: ${[:FatigueCurrent:d6]}$ for Fatigue
See: https://gitlab.com/custom-system-builder/custom-system-builder#45-add-rolls
Hi! i was looking at pool results for 2.3 i seen - Item management [#155 - Conditional item & active effects modifiers] - Will it let us acces items like in dynamic table? i need this feature and hope it is just that. also any notion of when 2.3 will be up?
The bigger Problem will be if the modifier of the item in the item also transfers to the actor. If Not the use of this is very limited
In most cases, it is, but there also exists a Limiter that makes some Attributes only affect the item rather than the actor.
Still incredible because this is not a 'CSB' problem, it is a foundry vtt problem, it will make CSB amazing.
anyone know if you can update a sheet (similar like pressing the reload button by hand or the "reload all item sheets") with a script macro?
I found the solution. There is "item.reloadTemplate("ItemId") you can use to get the item loaded with the right Template
That did the trick thank you!
Is anyone very familiar with the user input mechanism and then referencing the data elsewhere?
${appleCounter:=?{howManyApples} }$
Something like that
Interesting. That's different from what I saw in the GitHub docs, I saw ?{varName|default} and you could refer to the key later as ${varName }$. However, when I did that, it would clear out the message all together. In your example, can I use ${appleCounter}$ later to use the value entered?
I did try the above in the description/chat message but it returned ERROR
Oh I see the wiki shows a different format using a # before the input code! I’ll try that
# means that the message will be hidden in the chat. It´s useful for storing temporary results and such.
When I try to implement the above, whenever I include the reference ${ }$ the whole rich text area disappears
@formal goblet Here is a snippet of code in my Rich Text Field/Roll Message in an Item. I am trying to have user input for "WillpowerSpent" and then display that later in the roll message. Then ${WillpowerSpent}$ formula causes the whole rich text field to go blank when it's saved.
• Cost: ${#?{WillpowerSpent|2} }$ Willpower
Bonuses at Rank ${rank}$:
• Gain ${legend}$ Bonus Dice on the reroll per 1 Willpower spent ${WillpowerSpent}$
What does the console say (F12)?
There's a ton of things in the console, am I looking for something? I see that it correctly identifies ${WillpowerSpent}$ as an object with formula property of WillpowerSpent
The text of the rich text field is still there it's just not display on the item nor in the chat window when 'rolled'
Look for errors (red).
Post a screenshot if you see one.
Actually, also post a screenshot of the Label Roll Message
There are no errors. There is a warning "Some props were not computed" but the item itself has a ton of hidden attributes representing actor attributes so it could be those
There is also a warning about the object itself.
Some cookies are misusing the recommended “SameSite“ attribute 3
Some props were not computed. item.js:207:21
Object { roll: "Roll ${dice_pool}$D+${succ_pool}$, Dif. ${dif}$", effect: "${recalculate(fetchFromDynamicTable('effects', 'effect_desc', 'effect_title', effect_select))}$", succ_pool: "${ref(concat(ability,'succ')) + roll_bonus_succ + ref(concat('m', concat(attribute, '_mod')))}$" }
item.js:208:21
WebGL warning: drawElementsInstanced: Using format enabled by implicitly enabled extension: EXT_float_blend. For maximal portability enable it explicitly.
Some cookies are misusing the recommended “SameSite“ attribute 3
The roll message says "undefined" at the point where the text would start
Check your formulas if they actually return a value. You can use the Label prefix or suffix for that. IMPORTANT: Only one formula at once for testing (everything inside ${}$ is considered a formula).
So, without the added reference of ${WillpowerSpent}$ and only using the user input ?{WillpowerSpent|2}, when I do the roll, it asks for my input and then correctly displays what I enter in the roll message. Only when I include the later reference do things go 'blank' and not work
Sorr for my mistake
Oh not your mistake at all. The GitHub Docs and Wiki show different format. I appreciate the reference to the Wiki
To piggy back off of that, is there any way that we can take the contents of a text field, and once parsed for content, use that syntax as a roll to chat? For my purposes, I want to take the text input for damage on a given weapon, and use that to roll from on the Weapon sheet (Yellow flow). In addition, I want to take that value, and turn it into an actionable item on the character sheet inventory tab and subsequent container I have made (Red Flow). Any thoughts how I can change it so that instead of ${[1d6]}$ as a static roll, it is a variable dependent on the input from the weapon sheet?
Changing it to ${[item.WpnDamage]}$ doesn't do anything in chat, so I'm guessing this isn't possible the way I've done it
So I'm wondering if any wizards can help me improvise a solution. Perhaps there's a better way to store the value, but it has to be variable as the damage will differ from item to item.
${[:item.WpnDamage:]}$ should do the trick. You just missed the :.
Thank you! I'm so glad this was just user error. I was wracking my brain on this lol
If I created a "Name" field, so that I could pull the name of the item in the chat when the damage is rolled this way, would the syntax be ${[item.WpnName]}$ Damage ${[:item.WpnDamage:]}$
or would it look more like:
${[item.WpnName " Damage: " :item.WpnDamage:]}$
I've tried both. Neither seemed to work, but I'm sure it's possible and one of these is closer
The intent is "<Estoc> Damage: <Roll>"
Or perhaps there is a better way and I'm making this harder on myself.
Open to learn!
I see 4.4 but it confuses me slightly
${item.WpnName}$ Damage: ${[:item.WpnDamage:]}$
${}$ -> CSB-Formula
${[]}$ -> Foundry-Roll-Formula with CSB-functions and keys mixed in it
You only need the Foundry-Roll-Formula if dices are involved. Rest can be pure CSB-Formulas
Got it. Worked like a charm. Thank you for teaching me. I'm such a newb at this.
Ah.. Worked-ish..
Doesn't show the content.
When i roll it from the character sheet *
Is WpnName a key you´ve created? If not, use item.name
item.name worked. I wonder why the other didn't, not that I'm complaining. I'm just happy for the help!
Thank you so much @formal goblet
Hi all, I have need to reference a value from one item to another item on the same actor (different tabs, different item containers). is there a way to do this? (one item container roll formula referencing a value from another item)?
I asked about the system in the wrong thread... Now I am in the right place. Hey people.
I decided to do a physical table with a mass bunch of labels to store the relevant data. I had to create a new variable to store the name for comparisons as item modifiers don't work with item name.
using the ref() to compare the name on the other item container, I am able to reference the data properly for the rolls.
How do I access an actor's/item's name when, for example, posting to chat?
Figured it out for the item, but not for the actor name.
Also, I need rolls to be able to be made normally (2d6), with a minor (3d6kh2) or major (4d6kh2) edge, or with a minor (3d6kl2) or major (4d6kl2) obstacle. How would I allow the player to choose one when making a roll?
OK, next hurdle! I am attempting to use a dynamic table to generate a dropdown option for each of my main attributes and skills. What I would like to do, is that when the Attribute header (label) is clicked, it references the table, but a different column from the same row (record) that the selected value in the drop down is referencing in the table. See the example image, in case this needs context or I'm not explaining it well.
Does this makes sense what I'm trying to do? Which section of the guide might help answer this?
I saw a few potentials but am not sure which one or if someone has the quicker answer.
This was my latest flub:
Strength rolled at Level ${STR_Value}$ <br> ${[DjinnStatsTable(Levels=STR_Value).:LevelRoll:]}$
Was attempting to use 6.2 as a reference "<dynamicTableKey>(<filterColumn>=<filterValue>).<targetColumn>"
${fetchFromDynamicTable('dynamicTableKey', 'rollColumnKey', 'levelsColumnKey', dropdownKey)}$
It only works with the item name
Aww.
You can create a dropdown list with the rolls as your dropdown keys. Then you'd only need to reference this dropdown list in your Label Roll Message: ${[:dropdownKey:]}$
... ... ... ... Why didn't I think of that?
Glad it's simple enough 😄
Yeah. Thanks!
Hello. I´m trying to add a call to a rollable table in a character template, Depending on the name of the npc I create with the template it should roll on its respective rollable table when clicking on the button... but I can´t seem to make a value work as the rolltablename
${[#ref('npc_name')]}$... ${[#npc_name]}$... where npc_name is the key where I write the name of the npc, which is also the name of the respective rollable table... but nothing happens. If I write the rollable table name directly it works, but I want a template where I can plug the apropriate table to roll depending on the npc
any ideas?
You have to use colons if you´re using CSB-formula inside a Foundry-roll-formula. Try this: ${[#:ref('npc_name'):]}$
Thank you very much. It worked. Community is the best 🙂
I'm casting Resurrect Thread - as I try to figure out how to have, "Bless," or "Guidance" automatically apply their bonuses on rolls for dnd5e (edited to add specifics)
Hello, I have drop-down list for attribute with dice types as labels (d4, d6, d8, etc.) and wish to create reference to this attribute. however when i refer to the stat i see key value instead of label value. How can I refer to label of drop-down list? I don't want to put die types as key because I plan to modify the referenced attribute by moving 1 step higher or lower (from d6 to d8 or d4) depending on situation, gear, etc. Is this even possible to reference the table behind drop-down?
I see the Tooltip on Hover trick on the wiki, but I can't figure out where to put it to make it work. Are "dropdown" and "dropdown-content" not built-in classes?
It´s not possible to reference the Label of a dropdown list. The Label is just a visual representation.
i am trying to modify a label value using an item modifier. the label has it's own formula, but the final output is a number. whenever i add the item in question, the label switches to display "NaN". am i doing something wrong here?
Did you forget to add ${}$?
yeah, i added them
how do you fellas implement crits for your systems? what roll message code do you use to double the dice?
How can I access an item image when using formula?
Wouldn't it be item.img? As with an actor, that's what I'm thinking.
I got undefined while doing that
Hm. I'm afraid that in formulas the system is expecting numeric values only, isn't it? What are you trying to achieve, if I can ask?
I want to display the image of an item in the chat as part of its roll message
Let me get back to my pc and I'll tinker around a bit 😅
sure thanks! I
I tried to append ${item.img}$ to my roll text(in a label inside the actor sheet) but did nor get the image. No error, though.
I've checked API docs for v10 and there you have thumbnail accessor, but using item.thumbnail gets me nowhere.
I'll keep trying and let you know if a solution comes out of it. Sorry for now.
i think would have to check how the name is transferred to props and maybe do the same for images, but I am not sure which line of code that happens
I'm currently exploring actor data and cannot see any way to get a handle to the itemContainer containing the item...
hey - anyone tinkered with item tooltips? i want to display item information (static or dynamic) in the tooltip of items. for a simple use case: is there a way to change the tooltip "Item" to something else like "This is the Item-Tooltip"
I don't have a crit based on a specific dice roll, but all hits are relative, the better you hit someone, the more of their armour you are able to bypass/ignore. It means that for me I don't have a special roll message, or a doubling of dice, but a "critical hit" is one that bypasses all armour and therefore has 0 damage reduced from it.
That's what I eventually thought... I then made hidden attribute with dynamic value based on the drop-down of the attribute. I use reference to this hidden attribute. Works better then expected.
Probably I can add in my world script a hook for updateItem to detect if the image has changed, if so set the url to a hidden attribute
At the moment I'm having troubles even accessing item's image, let alone understanding what you intend to do. 😅
If you do not mind, please give us an update on your tests 👍🏻
I'm attempting to build a skill list where each skill has a reference stat, a certain number of points assigned to it(with max depending on said stat) and a total(that depends on said stat). Tried with dynamic table, but sameRow() does not work in max formulas so I cannot get the correct reference to the appropriate stat.
Even with a simple table it is not possible to reference the needed stat.
I'm at a loss...
Any suggestion?
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/201
But it should work with a simple Table, because the bug is only there with the sameRow()-function (normal Tables cannot use sameRow())
nope, currently not
You´d use Item Modifiers for that: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/FAQ/Frequently-Asked-Questions#q-i-have-an-item-container-with-inventory-items-and-i-want-to-sum-up-the-weight-of-each-item-but-sumfetchfromdynamictableinventory_container-weight-doesnt-work-is-there-a-way
I just check what the roll result is and depending on that, show the appropriate message. If you just want to double your result if it has a crit, you can do something like this:
${#roll:= [1d20]}$
Result: ${roll * (roll == 20 ? 2 : 1)}$
its all good
i just tested some stuff and found that even the mostly blank sheets chug and lag. Even the item sheets do. I am coming to realize that I have no ability to make this the way I want it, and my hundreds of hours here have been wasted
i got it to work, but only if i remove the label's text formatting (like bold and size) is there a way to keep formatting and make it adjustable with item modifiers?
Huh? Why should the formatting matter? Can you show what you got?
this is the text for the label, if i delete the <> things, it works, displaying the modified number and doesn't display NaN as the output
Yeah, that´s really bad. Item Modifiers modify the whole Label text, not just the formula in it. If you still want the custom formatting, you can move them to Label prefix and Label suffix.
"attached" still doesn't seem to work in getPropertyDataFromActor.
I don't know where the problem lies some are experiencing when using this function... Can you provide more context?
I get this when I use it in an item that's attached to a character.
getPropertyDataFromActor("attached", "stat_ACV"), for example, throws an error.
Seems like you're doing something with a matrix you're not supposed to. What exactly is "stat_ACV"?
Attack Combat Value. It's the average of Body, Mind, and Soul, plus any Attributes that directly increase ACV.
What does ${typeOf(stat_ACV)}$ return, if you create this in your character sheet?
Well, you can try, but I think it'll do the same.
${typeOf(ref('stat_ACV'))}$ returned number.
Huh. Well. Atleast it works.
Yet it still doesn't work in getPropertyDataFromActor().
Does the fallback-value work?
The fallback value works, yeah.
Also, ${getPropertyDataFromActor("attached", "stat_ACV")}$ returns a completely blank value.
Is it used in a Dynamic Table?
Nope, Item Container.
Huh?
Or did you mean stat_ACV?
You don't need this function if you're using it in an Item Container. You have access for the actor properties anyway.
...Wait...really?
Oh, I know that. It's on the item itself, and the item is attached to the Item Container.
Items are attached to actors
Well, it's in an Item Container that's on an Actor.
That's what you see, but internally the Item is only attached to an Actor.
Okay, then it's on an Actor.
Item Containers are only displaying them
Post a screenshot of the setup
Can you try to use this function without any other additions (in a Label prefix for example)?
Sigh... What about referencing a different key on the character sheet? Something simple like a number field?
Still blank.
Yes.
Can you make a Test Template and an Item Test Template and see if it works there?
Sure.
How to do which part?
Does atleast "selected" work?
That does.
Ok. I have no clue what is going wrong.
Neither do I...all properties of "attached" are returning empty strings.
I just used it few hours ago without an issue...
Well, to be fair, I'm working on the dev-branch, not release-branch.
That is a possible issue there.
But still... I tested it before it got even released so I still don't know where the issue lies.
It's mind-boggling! Could it have something to do with the Item Containers having keys?
Nah. They are completely irrelevant.
...No...I don't have keys on these containers.
This is giving me a headache...I don't know what's going wrong.
You can attach Items to Actors without a single Container.
...You can?
Yeah. They will be invisible, but they will be there.
Same here. I'd need some in depth testing in a world, where it's not working.
Yeah. :\
I mean calculating total encumbrance
I've had to just make a keyed label on the character sheet, then have hidden attributes on each item that modify that label's value.
Thanks for replying. I know the problem is not there on a normal table, but then I need to reference the proper stat and I seem to not be able to.
Let'ssay there is a column with key stat that contains String data with the key for the stat I need, in the column where I store the Number data what I try is ref(stat,0) 'cause I need the number stored in the stat with that key. Correct?
I've tried that,but it's not working. Gotta check again, though, as I think I got i wrong.
EDIT: it works as predicted. I was using the wrong column key. Thanks again!
Well, it works with a standard table. I must have done something wrong when using ref(). Thanks!
Martin1522 gave me solution here: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/FAQ/Frequently-Asked-Questions#q-i-have-an-item-container-with-inventory-items-and-i-want-to-sum-up-the-weight-of-each-item-but-sumfetchfromdynamictableinventory_container-weight-doesnt-work-is-there-a-way
This might be hard to follow, but here it is in practice. @fierce harbor
How do you reference the name of an item in its own sheet? When I try the following, it doesn't work. The objective is for it to say "<item name> Damage: <WpnDamage (roll syntax)>".
When I try ${name}$ or ${item.name}$ it doesn't work. However, when I use item.name from a character sheet used in the exact same way it works.
The shortcut answer would be to create a new field called "WpnName" and reference that, but I don't want GMs playing my system to have to work too hard to create new items and weapons.
If I can use what's already in Foundry, I'd rather keep the UX intensity low.
I'm experiencing a sort of bug, frequently I would say, where moving a component (say a label) inside a table or panel creates a panel null around that component and no matter what said panel stays where it first popped.
Thoughts?
Can you screenshot what's happening?
@fierce harbor I think I know what you're saying, but want to make sure I understand context.
Not happening now, of course 😤
There you go
It happened in a table, not sure about panel.
EDIT: moving a grouped component to an empty row fixes the layout. Still I don't understand if this is a feature or an issue 🤷🏻♂️
And this happens when I try to move one of the grouped components oit of the group.
anyone using "Core Settings Expanded" with custom effects?
i wanted to add some custom effects but it overwrites other effects. e.g. when i create 1 effect the "dead" effect isn't there anymore.
i tried adding the "standard effects" first an additional time - but it reset again when i start the game again
in other words. i can create effects fine as long as i dont close foundry. when i close foundry other effects get replaced by the new ones i created.
you gotta re-add them but use the same IDs
i'll try that - other thing i'm thinking is adding effects with a macro (if thats possible)
Adding them to the list or to the player?
to the list - to the player i already got that down 😅
but instead of adding 30 effects by hand maybe with a macro/api this could be done faster
I don't think it is worth keeping the mod if it doesn't save properly
i'm debating if i try your approach of saving every effect new and then adding new ones
or if its easier to create a world script which loads on startup and replaces existing effects with new ones - so on every start you create the effects you need.
since effects are stored in an array you can just change that and thats it
Hi, is there a recommended way to equip one of the items applied to a sheet? IE, if I have weapon 1 and 2 and I'd like to only apply the bonus from Weapon 1 to my attack roll, what's the best way to do that?
You can add a checkbox (equipped) to your weapon item template to indicate the equipped-state. Your modifiers would be applied based on this condition.
my solution is having multiple item containers and only apply item stats if they are not in the "backpack" - but this is way more effort than Martin's solution 😉
How can you check container?
I have a dropdown in the Item which is responsible for filtering the item in the right Container. Then you can use Formulars in the Item modifier to only apply If you "wear the item"
I Hope this makes sense? I can Post Pictures later If necessary
So it’s still a check box, effectively. You just have it displayed separately on the pc sheet
Yeah, more or less the same logic
Yeah in the end yes. I think at the Moment there is No way to properly extract Data from different Item Containers so you have to Life with the workaround
Maybe you could find different solutions with Scripts and macros.
I'm delving a little in Item creation with macros. But in the end you are Limited by the Basic CSB functionality
Why on Earth if I put in a DropDownList a formula as Default Value it gets stuck to a specific value, namely the first in the list?
Because the default value doesn't allow formulas? 😅
Dang! Somehow I skipped that part... I'll have to find another way then. Thanks 😅
If I'm not mistaken, somwhere in this thread it has been said that rolls can't modify sheet values...or can they?
Well, they could... with macros...
Remind me again: How do we get a label roll message to perform a macro?
With the Advanced Macro Module and the command /amacro <macroName> <args>
Thus it is not a straightforward call to the macro inside the roll text, correct?
Well, it´s literally just that. But also nothing else
Oh no, I meant without the module on.
Yeah, not without the module.
Except you create an HTML-Button and an own onClickEventListener, which calls a macro.
That should be possible
Would be great... if I had the time and will... both of which I unfortunately lack... 😅
But thanks for the hint 😉
Hrm, it appears what I wanted to do seems to be more complicated than I thought.
I have spells as Items. Each spell Item has a corresponding spell macro. I thought I could add a roll message in the template that could call the macro in the Item but it seems I can't do that directly. What would be a good way to implement this?
Unless there's a way to call the item name as a reference.
Well, you could call the macro in the Alternate Roll Message with Shift + Click, where the macro is the only thing in the Roll Message. That would work.
But if each macro is different, how would that be possible in the template?
Can you put a dialog in the macro, so that players can select the appropriate spell to use the macro on?
I'm not sure how.
Not an expert myself, but you migth check this and see if it helps : https://foundryvtt.wiki/en/development/guides/creating-custom-dialog-windows.
And I'm sure there are some examples out there you can look at.
Thanks.
Hi. I set the initiative formula and all is working fine. However I wonder if I can program initiative button on character sheet, linked with button on encounter.
When I tried this (moving the macro from roll message to alt roll message), I couldn't shift+click it; it turned back to black instead of red. What did I do wrong?
In addition, when I put the string /amacro ${item.name}$ into the roll message field, it just returns the text string in the chat, it doesn't run as a macro.
Sorry if this has been asked before - really loving how this system is built! Is there a way to use radio buttons?
For this I am using rich-text-fields where every player can set their macro (I placed as default {{macro "PlayerMacro"}} ).
In the roll label a normal click throws’ the dice to see if the spell was successful, and if yes a shift-click activates the macro ${!sameRow('macro')}$
Because every player has a diverent amount of spells, i placed this in a dynamic tabel.
A checkbox has the same function and via css can be changed to the look of a classic radiobutton
I think that he also wants the functionality of radio groups (only 1 selection in a group)
Arrrggg...If yes, then no! 😜
Some of my players are older and, how to put this delicately... not the most technically savvy individuals. I have a player who needs to be constantly reminded what the command is to roll basic dice, as one example (so I made a macro for it).
So I want to make it as drop dead easy as possible so it's one less thing I have to do for them (and not repeat myself over and over). So if it's possible to avoid having them set their own macros or having to shift+click (guarantee they will forget to shift) , I will go for that. Want to cast a spell? click the Cast Spell button on your sheet.
I have a player with the same memory and he's only 25. 😵💫
But you want to set it on the sheet, not on the template?
So, just place it in the roll-message field and you are done.
Is there extra text I need to add to make it run as a macro instead of a text string?
Your /amacro ${item.name}$ is probably not the name of the macro.
/amacro "YouMacroName" works.
It is. I've set macro name as the same name as the item for simplicity, which is why I was hoping if the template is calling the item name in the macro roll message, it should work. Obviously it does not.
Working on inventory at the moment, using Item Containers to store items. Problem is that if I use additional filters to check if an item is equipped or not (every item has an EQP checkbox field and the container has a itemUse label set to ${item.EQP}$ to collect the checkbox state) it just does not work. The filter is set as itemUse IS true to check for equipped items and itemUse IS false for unequipped ones.
Any idea what I' m doing wrong?
Because you're missing the double-quotes
The Field Key should be a key of an Item, not Item Container.
You mean the field key should be EQP, same as in item templates?
Yeah
Not working...
Reload your character sheet and the Items on your sheet.
Just tested reloading the app then the actor sheet then deleting/adding items to the sheet, but to no avail. Items with flag=TRUE are added, others are not.
In addition, if a copy of an item with unique flag is made, the copied item cannot be added to the sheet.
Where do they go? I tried three different ways, and got three different results, none of which acted as a macro run, they were all text strings
Looks like I was missing the !
This is what worked.
Update: The below worked for macros with only one word, but failed for any macro names with more than one word. Adding the double quotes solved that problem as well: /amacro "${!item.name}$"
Thanks for your input and all the help@formal goblet and @vagrant hollow !
You should know that Items are added to an Actor and not to an Item Container. Item Containers are only displaying the Items an Actor has (to certain conditions).
You have set up a filter, which shows only Items matching this filter.
Also, the 'unique'-comstraint is a bit buggy, so I recommend to not use it.
Oh well, looks like I'll have to find a more static way of handling inventory.
I'm sure players ...if ever I'll be able to gather any... will understand 😄
Thanks @formal goblet !
I've finished my Sheet for Unknown Armies 3rd Edition. Is there a way to submit it to be included in the sheet archive?
Creating a dynamic table and then referencing it in a dropdown object would be a way to meet this functionality just in a different format.
Plus it saves space!
^
I'm attempting to set a roll message for weapons and came up with this:
${weqp1='true'?(wtp1='wMelee'?(watt1+bodyStr):(watt1+bodyAgi)):'Weapon not equipeed!'}$
but it does not check for weqp1 nor for wtp1.
I'm sure the formula is wrong but cannot seem to find why...or if it can work in the first place, as I do not remember if conditionals in FoundryVTT can do what I want them to...
Any hint?
Are there any good tutorials on this system? To get a DnD inspired homebrew up and running
You should prob just use a d&d system, but you can use the github for documentation
Getting to the point where I'm finished my dev work on my system using Custom System Builder. I want to package everything I've done in to a single package for dissemination to my friends. I've seen export functions in both Foundry docs and CSB docs for macros and compendiums, but I've linked Foundry icons to custom items and done all sorts. I've also seen the adventure export function in the Foundry docs. Aside from literally copying the entire Foundry folder, is there a good way to do this?
It doesn't follow DnD rules. Only the use of a d20
I might be wrong, becasue my memory often fails me, but there could be a 'generic d20 system' already out there.
Then just build it as if you would any other system.
Hey there, quick question. My friend and I are trying to resolve this error that's coming up in this formula for a Roll. The error comes up when we try introducing the item.opp property into it. So this is the formula currently
<p><b>Cost:</b> ${!item.cost}$</p>
<p><b>Target:</b> ${!item.target}$</p>
<p><b>Duration:</b> ${!item.duration}$</p>
<hr>
${!item.description}$
<hr>
${#dice1:= equalText(string(item.rolled_atr1) ,'DEX') == true ? ref('dex_current') : 0}$
${#dice1:= equalText(string(item.rolled_atr1) ,'INS') == true and isZero(dice1) == true ? ref('ins_current') : dice1}$
${#dice1:= equalText(string(item.rolled_atr1) ,'MIG') == true and isZero(dice1) == true ? ref('mig_current') : dice1}$
${#dice1:= equalText(string(item.rolled_atr1) ,'WLP') == true and isZero(dice1) == true ? ref('wlp_current') : dice1}$
${#dice2:= equalText(string(item.rolled_atr2) ,'DEX') == true ? ref('dex_current') : 0}$
${#dice2:= equalText(string(item.rolled_atr2) ,'INS') == true and isZero(dice2) == true ? ref('ins_current') : dice2}$
${#dice2:= equalText(string(item.rolled_atr2) ,'MIG') == true and isZero(dice2) == true ? ref('mig_current') : dice2}$
${#dice2:= equalText(string(item.rolled_atr2) ,'WLP') == true and isZero(dice2) == true ? ref('wlp_current') : dice2}$
<p><b>${!string(item.rolled_atr1)}$</b> = 1d${!dice1}$ = ${D1:=[1d:dice1:]}$</p>
<p><b>${!string(item.rolled_atr2)}$</b> = 1d${!dice2}$ = ${D2:=[1d:dice2:]}$</p>
<p><b>Check:</b> ${!D1}$ + ${!D2}$ + ${item.check_bonus}$ = <b>${D1+D2+item.check_bonus}$</b> vs. MDEF</p>
<p><b>Damage:</b> HR + ${!item.damage_bonus}$ = <b>${max(D1, D2)+item.damage_bonus}$</b> ${!item.type_damage}$</p>
${! largerEq(D1, 6) and D1 == D2 ? string('<p><b>CRITICAL SUCCESS! Gain an Opportunity</b></p>'): string('')}$
${!D1 == D2 and D1 == 1 ? string('<p><b>FUMBLE<b></p>'): string('')}$```
The error is happening when we try modifying the second to last line with the following
${! largerEq(D1, 6) and D1 == D2 ? string('<p><b>CRITICAL SUCCESS! Gain an Opportunity</b></p>' item.opp): string('')}$
(sorry if it's a little messy looking, essentially we're just trying to have it display the Opportunity text from the item when the Conditional statement detects a crit success)
string('<p><b>CRITICAL SUC...' item.opp) is not a valid expression.
So is there a way we can display the item.opp inside this conditional statement? We've been trying out various syntax but so far nothing has worked. Does it just need to be outside the string?
It's like wanting to do 5 + 4 but you only tell 5 4
Oh so we need a + then?
Use concat()
Ah, okay, we'll try that
Works, thank you so much!
Is there a way to send the icon/image used in an item to chat? I can use item.name to post the name in the chat log, is there something like a item.image syntax?
Nope, there isn't
Maybe there could be a way to create a world Script which listens to an Event to Output the Image into the Chat. But im not sure If there is a way to set Something Like this Up properly.
Thank you @formal goblet and @scarlet skiff . I think I'd like to keep it as K.I.S.S. in principle as I can make it. This would be too much if it wasn't a clean-cut method.
I can do without. 🙂
I like it SOLID 😅
I hate SOLID. lol. When each letter is effectively a derivative of other acronyms I draw the line.
😂
(Copied from #core-how-to ) Hey everyone! I'm new to Foundry and looking to do some basic customizing as I'm developing a new TTRPG.
In the generic blank actor sheet, there's Description, Items, and Attributes. I could write everything out in Description and use [[1d20+5]] commands for example as a placeholder character sheet, but I'm wondering if there are any easy hacks I can use with the Attributes page to self-reference the document. (So that an Awareness skill references the Awareness ability, for example).
I know I could do basically anything with HTML but am very rusty on it so want a quick "eh, that's fine" fix while I'm relearning HTML. Do you have any suggestions either directly or for a youtube channel to watch? TIA!
Uhm. Custom System Builder is a system, which allows to create own rule sets (including character and item sheets). If you need more information about this system, here a source: https://gitlab.com/custom-system-builder/custom-system-builder/
You are talking about the actor sheet of Simple-Worldbuilding.
This is a different system on an other Discord sub-channel.
Simple Worldbuilding is okay, if you want a VERY simple system.
I never tried self-reference in Simple Worldbuilding but don’t think that this is possible.
In Custom System Builder this is possible.
How can I use /sheetRoll with a roll label in an itemcontainer?
or is there anyway to trigger DiceSoNice when doing computablePhrase.parse?
I'm trying to insert a reference to an actor stat in the description of an item, kind of you gain your Strength modifier as attack bonus. Using [[...]] syntax does not work, neither does ${}$. Am I attempting at something impossible or just doing it wrong?
Iirc you need to put ‘item.’
Let me check my code later
Thank you.
Hi everyone! I have little to no experience coding and i need some help with the following:
-I want to show a derived stat from the sum two attributes but I'm not sure how to make the result of the formula show up as text in the character sheet
You can use a label with text as the formula you need. Ex.: ${a+b}$.
Thanks!
You're most welcome.
you want to use "getPropertyDataFromActor"
https://gitlab.com/custom-system-builder/custom-system-builder#428-getpropertydatafromactor
most likely then in some kind of form like getPropertyDataFromActor(attached, str_mod) look at the link there are some examples listed there which should get you started 🙂
you dont need to use attached you can choose any actor you want
Cool, I'll try. attached would be ok, as I need to populate the description of items the actor has on it.
Thanks a lot!
no problem - i remember some time ago someone was struggling with attached but for me it worked every time 🤷♂️
Good to hear that it works for someone 😅
I was going insane finding the issue the guy had
hi, can i edit tab's name/key in tabbed panel? i try to make some modifications, but it's never saved. Also is it possible to copy an element and paste it elsewhere?
Sorry, but Tabs are currently a bit bugged. You can create but not modify them afterwards.
It´s possible to make copies of components. Just press CTRL while moving it.
Here's an example:
getPropertyDataFromActor('attached', 'coreMagicDefense') : getPropertyDataFromActor('attached', 'coreMagicDefense'
However, I tried and it didn't work with the current version as there is a bug, which fix is pending release
coreMagicDefense should be in double-quotes. Otherwise it will only return the string.
Thanks both @cinder fox and @formal goblet for further help. I'll have to test it as soon as I can get my hands on the system, I'll let you know then 😉
Couldn't you open the template Code and fix/edit names there?
Of course thats Not in CSB directly
But might be better than redoing a fully built tab
That's also a solution.
Any idea why a roll message from an item container would refuse to display the item name?
Because there is no name-key by default
I made a key on the item called display_name and set it to ${name}$, which displayed correctly on the item. When I tried to reference that in the roll, it still threw an error.
Is there a smarter way to do that?
That should't work...
Then there's literally no way to reference the name of an item?
But this does display correctly on the item.
Just not when I reference item.title, weirdly.
I tried adding ${getPropertyDataFromActor('attached',"PTS")}$ in the item description and it doesn't work: it just writes it as a string.
item.name ?!
That's only applicable to Item Containers, not Items
The item container is where I was trying to use it
How do I "Link Actor Data" within a Custom System Builder world?
Sorry, I mean "Assign Represented Actor"
OK - I think I've got it now. The "Assign Represented Actor" is only available on a clone of a Token. Within the Prototype Token only the "Link Actor Data" checkbox appears.
I'm still not clear on whether "item.name" should or should not work from the item container, and if it shouldn't, I'm wondering how to correctly reference the item's name.
It should if it is from an Item Container. ${item.name}$ would be enough
Not sure why that wasn't working before, but now it is. Great! Thanks. 🙂
Any known issue with CSB that would cause it to refuse to drag actor tokens into the play space? For some reason (in a fairly new game I've made, haven't tested tokens before now) none of my actors will place tokens.
Do you have a scene set up? It might be that.
I tried making a new scene. No actor tokens will place.
Okay, oddly, if I make a totally blank actor, it will place the default mask token.
But it won't place any of the actors I've worked on.
Hm, never happened to me
Well, that's both just bizarre and a very serious issue. Damn.
Check your console for errors when this happens.
There's an error, but it means nothing to me.
Uncaught (in promise) TypeError: setting getter-only property "actor"
[Detected 1 package: system:custom-system-builder]
Something either in the system or some script you've configured is accessing the actor data incorrectly.
Any idea how to figure out what could be causing that?
I'm not doing anything with scripts that I know of.
All I can suggest is to try to narrow it down to a specific source. Which actors, what's in common between them, does it happen on new ones with similar config, etc.
I have literally no idea. I've done nothing unusual.
The sheets are very simple.
Fresh actors don't do it. Clearly there must be an error in the base actor I was using (copying so I didn't have to do the initial setup on each actor over and over), but I have no idea what it could be.
It means that a function is trying to modify a read-only property, but hell if I can think of something that could cause that...
I'm completely stumped. I don't want to have to redo the actors I've been building, but I have no idea what the error even could be.
Seems like it must be coming from an item I've added, but that doesn't narrow it down much.
No, it's not. And it's not any of my modules, either.
You said that a blank actor is correctly added, so what is different on those that raise the error?
I've been trying to figure that out. I can't find anything.
I think it's happening when I add skills. Weird.
Any macro or some other 'active' part that could modify the actor?
No macros, nothing fancy at all
No label or other field where you use actor.<something> notation?
I don't believe so. It's happening when I access the skills section of the sheet. Trying to figure out what could be the reason for that.
Oh well, there has to be some part that when switching to that tab attempts to access actor . Anything about how the switch is done?
It's just a normal tab
Don't know how to debug deeper than this, other than having you send me the whole system and check myself but that would be rude.
I've tried everything I can think of. I don't know why toggling on some hidden sections would cause an issue.
You mean making them visible triggers the error?
On my skill list, each skill has a checkbox to allow you to modify values associated with the skill. When I toggle them all on, the error begins to happen. I'm going to try one by one.
Wait...
There's a skill called..."actor." I am an idiot.
No, you're human as we all are 😉
By the way, how do you use that checbox? I'd like to add such capability to my system.
Just add a checkbox element, then when you want a particular panel to vanish/appear when you toggle it, go into that panel's advanced config and use the checkbox's key. (As in the pic, if you name your checkbox key "checkbox_toggle")
Cool and easy! Never thought of that. Thanks!
Sure thing!
is there any way to remove or reduce de actors name ?
You mean its font?
if i reduce the font, the container will reduce as well ?
The problem is that there is no setting for either of them. The actor name looks quite fixed to me.
Why 4 sheets? Can you use tabs instead? On the same sheet I mean.
Also, you can minimize sheets by double-clicking on the sheet upper ribbon, where the name is displayed.
in 4AD you play 4 characters at the same time
but i will try to use tabs and see
maybe it will work
My bad, I did not know.
I think tabs will not help, 'cause you need 4 actor sheets at the same time.
so i solved the problem by using sub templates. Works just fine to separate 4 sheets in the same big sheet.
Hello !
FYI : 2.2.5 hotfix just dropped. With it comes some bugfix and a basic automated testing system which I will improve over time to avoid regressions in the system when developing new features 🙂
#package-releases message
How difficult would it be to make a macro for my players to increase or decrease a number value on their character sheet by 1 ?
Hello
im having problems reloading item templates, it only reloads when i use f5
is there anyway to go back to 2.2.4 ?
You can clone/download the specific versions from here: https://gitlab.com/custom-system-builder/custom-system-builder/-/tags
ty
@brittle moth what do you think about migrating the project from JS to TS? Would it be worth the effort for a bit more safety?
I'm also having difficulty getting templates to load correctly since updating.
As well as some odd errors when I try to open items
Like they say in Shakespeare's language... Bloody Hell, seem I forgot items in my tests...... ><
Could anyone point me to where to ask how to revert the system to the functioning version?
I'm not sure if this is useful information, but: when I copy an item, the copy cannot be opened. However, if I reload the game, then the copy can be opened again.
You can clone the 2.2.4 with git inside of your system folder, like said by martin right above 🙂
Or wait for me to quickly fix this ><
Waiting sounds safer! 🤣 I'd probably break it worse. 👍
Version 2.2.6 has just been released,with the fix for items. Please tell me if you have any other issues
I'm not really familiar with TypeScript, so I don't know how much work it would take, nor if it would result in less issues than there are now. The code is not syntaxically wrong, it's just mistakes and forgotten bits on big changes that causes all the trouble :/
a little shorter than @formal goblet link:
const actor = canvas.tokens.controlled[0].actor; // Or some other way how you get the actor you want to change
const yourProp = "system.props.YOUR-PROP-HERE"; // Change "YOUR-PROP-HERE" to the key you want to change
const updateValue = 1; // The value you want to update your prop with
async function updateActor(actor, yourProp, updateValue) {
await actor.update({ [yourProp]: updateValue});
};
updateActor(actor, yourProp, updateValue);
Hope i didn't put any typos in there 😄
Hy i'm new,
I'm looking for a way to use /r directly from a sheet.
I don't want to have to click once in the character sheet and once in the chat to see the roll
I could use the Label roll message to do that but it wouldn't look as good
Is /sheetroll what you are looking for? It adds macros to roll messages
Not really.
By using Label roll message or /sheetroll I get
But i would like to have something like
This works great but it sets the value instead of increasing / decreasing it. Also do you know how I could open a prompt to ask for an update value?
ah yeah you are right 😅
well adding the logic for increasing / decreasing is not hard - you should be able to figure that out
creating a dialog is not that difficult - here an example. of course you should think about defining variables in advance and not hardcoding the props like in the example here:
const actor = canvas.tokens.controlled[0].actor;
let d = new Dialog({
title: "Get Property and User Input",
content: `<p>The actor's Prop: ${actor.system.props.'PROP-HERE'}</p><p>Please input a number:</p><input id='user-input' type='number'/>`,
buttons: {
select: {
icon: '<i class="fas fa-check"></i>',
label: "Submit",
callback: (html) => {
let userInput = html.find('#user-input').val();
if (userInput) {
console.log(`The actor's Prop: ${actor.system.props.'PROP-HERE'}`);
console.log(`User input: ${userInput}`);
}
}
},
cancel: {
icon: '<i class="fas fa-times"></i>',
label: "Cancel",
callback: () => console.log("Dialog cancelled.")
}
},
default: "cancel",
});
d.render(true);
How can I set up macros that are unique to a selected token? Instead of having to open up individual sheets to make an attack for example, I'd like to be able to click a token then have him throw a punch attack, click another token and have him fire an pistol.
I've come from roll20 where this was built into the core system, actors had their own macros that you could enable as buttons on the playing table when you selected the token. Is this achievable?
would you like from the sheet or creating script macros?
I'm not sure what you mean by from the sheet? I'm pretty new to all this. I can do the basics in foundry but once it gets to macros/scripts I get lost.
I don't want to have to open a sheet (if that is what you mean) as trying to manage different unique enemies, as a gm, gets very tedious having to open a sheet for each. Ultimately it would be great if selecting a token brought up a list of available attack/ability options. (this is how roll20 functioned, if you never used that) or if a single macro button could allow me to select which actor/ability/item was to be rolled for.
Label roll formulas allow you to save them as macros if they have keys
yeah the key question was if you want to open a sheet.
all the things you described can be done with script macros.
For a very simple example this shows you a warning with the name of the actor of the token you are currently controlling.
const actor = canvas.tokens.controlled[0].actor;
ui.notifications.warn(`This is the Token of: ${actor.name}`);
Since this is Custom System Builder there are no "prebuild" macros for you since all keys are different for everyone.
So you have to program them yourself.
Label roll formulas won't help the GM i'm afraid since they are unique for every actor? Not sure about that - i don't use them.
Is there a script macros for dummies resource I can look into? like a compendium of stuff I can just copy and paste? lol... That's the hard part for me, I can't code and suck at learning it. I'm lucky I got my custom system builder sheet to function properly. I wish VTTs were more noob friendly.
I'm getting pretty lost in all this 😅
So is there a way to execute a macro from a label roll message?
I think martin answered this like a month ago in this channel - search in this channel for "amacro". i'm not sure if this works all the time - i don't use it.
i'm using only script macros which are not placed or called in the sheet 🤷♂️
Oh right, now i remember. Sorry for repeating and thank you 👍🏻
well you can use all the basic stuff from foundry which exists for 5e or pathfinder but you have to watch out for the data paths. you have to change them to fit for your system/sheet/keys
other than that for very basic stuff you could try chatGPT - but results are very hit or miss
also chatGPT doesnt know the data structure of foundry v10 and especially CSB / your system so you have to tinker there too
i'm also not a programmer - i startet with foundry like a month ago and i'm slowly learning
a lot of trial and error - just start with something very simple and work your way up from there
macro-polo is a great channel to get help - but dont use it to review code which chatGPT produced - they don't like that 😉
ChatGPT is a shit programmer
Don’t use it
Oh yeah failed to mention: only use GPT4.
3.5 its 9/10 Times Garage.
Bit nevertheless you could use it to explain Code for you
question! i'm messing around with the item container and trying to use the ${item.itemtype}$ . does this only copy number values and not text values?
what is item.itemtype ? has your item a key "itemtype"? if yes what type of component is it?
itemtype is just the component key for a text field
and it doesn't show the value of your text field? have you tried with something else e.g. a label if the syntax works properly?
the only thing i tried was a number field and that one showed up fine
then i'm not sure if you need to add some special magic with additional formula input 🤷♂️ maybe martin knows more
nope, it´s literally just that
Thanks! this helped a lot.
ah, i just deleted and recreated as a new key. looks like it works fine now. thanks @scarlet skiff!
I appreciate the Help @scarlet skiff , still trying to wrap my head around macros , but this helped quite a bit. Thank you.
no problem - happy to help
alrighty, been messing around with some syntax but no dice. essentially i'm trying to get a dropdown to record the label instead of the key on an item container. what code should i use for this?
If i understand you right you got a dropdown in an item. Now you want to get the label value of the dropdown in the item container the item is in?
This is not possible - you can only get the key values.
There are from the top of my head two solutions:
- name your keys what you want in the item container to show up
- use a formular in the item container label field to change every key you get to the output you want e.g.
${item.prop=key1?"labeltext of key 1":item.prop=key2?"labeltext of key2":""}$
additionally you have to be careful about naming keys of dropdowns. if you want to use them in formulars i believe you should use integers - but might not be needed everywhere.
where i'm sure you need them as integer would be if you want to use the keys in the item modifiers and use formulars there - then you need the keys as integer
Hi all
Two questions: is there any way to put number values into a dropdown menu instead of labels?
Will radio buttons be implemented?
Well, you can basically just use numbers. That´s totally possible 😅
We have no plans for this one
how do I use "speed" to add a character an equal number of times to the initiative order?
Solved it by using a dynamic table as the base of the dropdown
can i make a commission to make it hapen?
Is there a youtube channel with more tutorials of custom system builder?
thank you
There´s one from a user, but that´s pretty much out of date
😦
You should just stick with the README and Wiki:
https://gitlab.com/custom-system-builder/custom-system-builder
https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/home
Well... That needs some custom implementation. Because the standard function is to sort the combatants by number (and that´s it).
Is there any way to add a check box to an item container. What I try to achieve is this:
I use spells as items, and with this check box I can track wich spells are on cooldown.
this is in sandbox at the momet.
may still be useful, how do i find it?
I don´t really know. It was posted in this channel quite some time ago, maybe you can find it via search.
Item Containers can only contain Labels. You can use icons, which look like check boxes, but you cannot click them. The Item itself has to handle every state change.
This is not optimal for me, because the player has to open the spell, just to realize that it is on cooldown. Also refreshing cooldowns is a nightmare, because you have to click eatch and every spell one by one and unchek the cooldown. Also i can not supervise it from the GM side.
I forgot, it is the Year Zero Combat module that use "speed". I just can not figure out how I do the correct system call from the sheet in order to write that key into the module configuration.
Question: is there any way to duplicate stuff? Like for example I need 3 tables, and I want them named table1, table2, table3, and all the settings should be the same, except their keys
could i just create the first and copy it 3 times and edit their keys later?
It´s possible to SHOW that it´s on cooldown, it´s just not possible to toggle the state from the Item Container
how?
Something like ${item.checkbox ? 'Ready' : 'Cooldown'}$
but where do you put this expression? and where will it present the info?
When you create the Item Container, you can add Labels as columns to it. There you can define what you Item Container should show besides the Item.
CTRL + Drag
Cant you do macros with countdown that toggles the checkbox?
Possible.
And macros can be triggered from the sheet? for example when you push a "cast spell" button?
I am new to all this, so I dont know much 😄
Possible with the Advanced Macros - Module
Aha 🙂
AWESOME! thank you
Curious: does anyone happen to know if there are any plans to at any point allow items to be exported from within an actor sheet so they can be copied onto other actors?
Cant it just be dragged?
Hello, does someone has a clue about why this is not working ? :
${ref(sameRow('coup')) == ' Essai' ? 2 : ref(sameRow('coup')) == ' Doublé' ? 4 : ref(sameRow('coup')) == ' Attaque Lourde' ? 5 : ref(sameRow('coup')) == ' Attaque Débilitante' ? 6 : ref(sameRow('coup')) == ' Fauchage' ? 7 : ref(sameRow('coup')) == ' Balayage' ? 8 : ref(sameRow('coup')) == ' Smash' ? 7 : ref(sameRow('coup')) == ' Crash' ? 8 : ref(sameRow('coup')) == ' Action Secondaire' ? 2 : ref(sameRow('coup')) == ' Utiliser un sort' ? 3 : ref(sameRow('coup')) == ' Rengainer / Dégainer' ? 4 : ref(sameRow('coup')) == ' Action Spéciale' ? 5 : 0;}$
it's supposed to take make a label take a value depending of a dropdown list in the coup Row of the same dynamic table
have to tested it with only one if its working so e.g. is ${ref(sameRow('coup')) == ' Essai' ? 2 : 0}$ working? is there a error or nothing or how do you see its not working?
also why is there a blank space before every word - is this intentional?
Not sure, but I think there was an issue with sameRow(). Tried to use it, but did not work.
I'm having a similar issue where a checkbox in a dynamic table seemingly can't be referenced in conditionals.
I also suspect the sameRow() to be the origin of the problem
Because of that, I switched to a simple table and a more static approach.
I have an odd issue with item modifiers. If I set an item modifer, then have the actor sheet reflect that item modifier and pass it to another item, when I update the modifier on the first item, the value passed to the second item doesn't update until I refresh both the actor sheet and the second item sheet.
It's a dynamic table, not a item container though
You should look at the answer above.
😬 sry
My character sheet I am working on has a side bar for character stats, with the main area occupied by a tabbed panel for everything else. Is there a way to restrict the width of the sidebar so when the window's size is changed, it does not become super huge?
Basically, is there a way to make the red measurement stay a certain width, say, 300 px, even when the window is resized?
Maybe it's too easy to be good, but you could use a panel or table to contain both and set the size of the bar to a smaller value than that of the tabbed pane.
I already am using some objects with set size to get them to appropriate dimensions when it is small, the problem is when the user makes the window wider, the left panel grows to fill up half the screen instead of making the main section larger
Hm, dunno. Never played with that extensively, but the feeling is that there is nothing that might help you.
You can use Panel (grid 2 column) and use CSS to define size of each.
Should be doable with Custom CSS
hi!! i posted this a minute ago in a different channel cause i couldn't find this one, but i'm looking for some help!! I'm super new to coding and stuff in general so a lot of the formula's are really going over my head and I don't really understand how to get things where I want them to be. What I want is basically if my players Roll 3d6, I want to grab one of the individual totals from that roll to log for use in a different roll. For example rolling a 3, 5 and 2, the player could pick any one of those totals and it would log that data for the other roll. If this doesn't make any sense I'm ok working directly with someone to figure it out.
so... You want this in a macro?
hmm, realistically it would be a label button in the sheet that rolls the 3d6, then something that lets the player chose one of the 3 rolls to keep for a later 1d20+chosen number roll.
i'd also like to include a bonus modifier added to that roll pulled from a table on the sheet, but i'm not sure if that would make it more complicated
Why don't you just make 3 label being [3d6kh], [3d6kl], and [3d6dhdl]?
the 3d6 roll is meant to be the characters attributes. the system im planning to use runs on d6's for attributes and d20's for action roles. the point of manually picking them is for the player to decide which attribute they want to use at that time and the number gives them the bonus to the d20 roll
So is this just for character creation?
Just telling ya' here and now you will have to code macros for this btw
it would run for the whole campaign. the 3 d6's would mean a character has 3 stats. they use these stats to respond to different situations, kind of like skill checks in regular 5e. knowing which attribute to use for what situation is important is this system. also, using macros is fine. i was going to swap to macros if i couldn't get this to work at all
That does not answer my question
it's not for character creation
@copper iron Oh wait. Completely forgot you can just do ?{<varName>} for selection variables
Ooh, i think i missed that looking through the github
I stumbled my way to do exactly this. My solution is here:
#1037072885044477962 message
I changed my code to the following :
${equalText(ref(sameRow('coup')), ' Essai') ? 2 : equalText(ref(sameRow('coup')), ' Doublé') ? 4 : equalText(ref(sameRow('coup')), ' Attaque Lourde') ? 5 : equalText(ref(sameRow('coup')), ' Attaque Débilitante') ? 6 : equalText(ref(sameRow('coup')), ' Fauchage') ? 7 : equalText(ref(sameRow('coup')), ' Balayage') ? 8 : equalText(ref(sameRow('coup')), ' Smash') ? 7 : equalText(ref(sameRow('coup')), ' Crash') ? 8 : equalText(ref(sameRow('coup')), ' Action Secondaire') ? 2 : equalText(ref(sameRow('coup')), ' Utiliser un sort') ? 3 : equalText(ref(sameRow('coup')), ' Rengainer / Dégainer') ? 4 : equalText(ref(sameRow('coup')), ' Action Spéciale') ? 5 : 0}$
but this resulted in the sheets not even opening with the following error message. When I delete this code from the template though, the sheets open just fine.
undry.js:747 Error: An error occurred while rendering EquippableItemSheet 82. Uncomputable token fetchFromDynamicTable("combo", "manapool", "null", "null")
[Detected 1 package: system:custom-system-builder]
at fetchFromDynamicTable (Formula.js:397:43)
at math.js:26523:52
at math.js:26516:66
at math.js:25781:50
at math.js:26516:66
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:728:27)
at Formula.compute (Formula.js:292:21)
at ComputablePhrase.compute (ComputablePhrase.js:128:27)
at async ComputablePhrase.computeMessage (ComputablePhrase.js:221:9)
at async Label._getElement (Label.js:178:21)
onError @ foundry.js:747
🎁call_wrapped @ libWrapper-wrapper.js:507
🎁Hooks.onError#lib-wrapper @ listeners.js:138
🎁Hooks.onError#0 @ libWrapper-wrapper.js:187
(anonymous) @ foundry.js:5069
Promise.catch (async)
render @ foundry.js:5067
render @ foundry.js:6394
render @ equippable-item-sheet.js:83
_onClickDocumentName @ foundry.js:60848
🎁call_wrapped @ libWrapper-wrapper.js:507
checkClickDocumentName @ monks-active-tiles.js:2207
🎁call_wrapper @ libWrapper-wrapper.js:616
🎁SidebarDirectory.prototype._onClickDocumentName#0 @ libWrapper-wrapper.js:189
🎁call_wrapped @ libWrapper-wrapper.js:507
clickDocumentName @ monks-active-tiles.js:2155
🎁call_wrapper @ libWrapper-wrapper.js:616
🎁ItemDirectory.prototype._onClickDocumentName#0 @ libWrapper-wrapper.js:189
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
Hi, I use a coustom dice, module. What should I cange in the module to make the parts that i have marked with red disapear, I dont want them visible:
but only when i use this module, because sometimes i still roll normal d6 too
Hello !
A new beta version is available, with the following changes :
- Added undo / redo buttons in template edition
- Added consoleLog and consoleTable functions
- Added new function: switchCase()
- Added 'fetchFromActor()' ('getPropertyDataFromActor()' is now deprecated)
- Added option to use formulas for keys in item modifiers
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/main/raw/out/system.json?job=build-beta
Readme for the beta: https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/main/README_BETA.md
Issues with switchCase(), fetchFromActor() or item modifiers can be reported to me directly.
Btw, Item Template Modifiers is also a new feature, just forgot to add it to the Changelog...
https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/main/README_BETA.md#53-item-template-modifiers
please ask at the appropriate module discussion. this is the channel for CSB.
Is there a way to make a compound variable?
For example: player_(level)_(classnum) would end up being player_1_1 if level=1 and classnum=1
Well, you can construct such a value with concat() if you want: ${concat(player, '_', level, '_', classnum)}$
I was just typing that, LOL. However it still doesn't turn it into a variable for the purpose of hidden player attributes.
I have tried these both in the formula section of hidden attributes, and no luck
${concat('pl_',string(player_level),'_',string(player_class),'_m')}$
${concat('$pl_',string(player_level),'_',string(player_class),'_m')}$
Ok, so Discord doesn't like my underscore and just puts two '
Eyes are going after staring at the screen too long LOL
Well, it should produce to corresponding value. What is the key?
player_m
so it should be
player_m = {concat('$pl_',player_level,'_',player_class,'_m')}$
where the variable I set as player_1_1_m = 6 for example
Remove string(player_level) and string(player_class) to see if you get a result. And then readd them one by one.
It's giving me the pl_1_1_m as the value and not what I have set (elsewhere) as equaling 6
So you have under the key pl_1_1_m the value 6? Then surround it with ref() -> ${ref(player_m)}$
In the component where the pl_1_1_m is set?
There
This is not system or module related, it is a basic foundry function.
And as far as I know there is no way to hide the marked areas, while leaving the place between them viewable.
Struggling with getting a variable from an attached actor. It's on an item attached to a player. The following just returns ERROR
${fetchFromActor('attached', 'Intelligence', 0)}$
Are you using the beta-version?
so how do i make it that a tab in a tabbed panel is only visible if a checkbox is checked?
There should be a visibility condition in the advanced settings of the tab, where you can put the key of the checkbox as condition. Or you can put it in another component that has such possibility.
so how do i write it down in the visibility formula, ${ standuser_checkbox is true }$?
Just standuser_checbox, no brackets needed.
thanks, kinda new to custom system builder.
No problem, I'm no expert either, just stumbled through that 😉
I had installed a second instance with it, since I saw the old method was on the way out. However I went a different direction and went back to the stable version.
don't know if someone asked this before but is there a way to make the system recognize when you get a number on the dice instead of the entire roll?
for example: i want to roll a number of d6 equal to my characters DEX mod and everytime a dice lands on a 6, it adds the dex mod as bonus damage, but it only recognizes it when the entire roll is a six (all dice + modifiers equaling 6).
You can use the Foundry-Roll-API for dice-pool-operations within the system, but that has some limitations. But it´s possible to see how many 6 you´ve rolled and add it to the damage:
${#roll:= [:dex_mod:d6cs=6]}$
Bonus-Damage: ${roll * dex_mod}$
Hello there, new to foundry and the custom system builder. Trying to put together a game to playtest my RPG and I'm using custom system builder to create the sheet. Here's my current one that I whipped up in word as a mockup. I'm having trouble creating the skills table at the bottom and I'm wondering how it would be possible to do so. If anyone can provide advice or assistance it would be greatly appreciated.
and here's my current progress with CSB
I´d say you should create a Dynamic Table for your skills, where you can insert the name, level and aptitude of the skill.
I have tried a dynamic table, though I was unable to figure out how to create additional rows. It seems like row creation is something the player controls on their sheet?
Additionally the other method I tried was simply creating nested tables as I did in my word mockup, however things quickly broke and I was unable to continue past the first row
Yeah, players can insert their own rows. If you want predefined entries, then it might be worth to create a default actor, which already has these entries and just duplicate this actor as you need.
It should be possible to nest normal tables.
I'll rebuild it again to show you the error that occurred. trying the dynamic table idea as well
There we go, eventually when I get towards adding elements to the nested table the action will not complete, and If i attempt it again it errors and says row is not iterable
That´s... interesting.
past those first two tables I can't fill any other tables
in any row
tested further, everything past the 1st column of nest tables says row not iterable
Yes gladly, how would I go about doing that? Thank you for your help btw I greatly appreciate it.
Just right-click the template in the Actors-Tab
And you where unable to create, let´s say, 'Bushcraft' in the INT-column?
Yep
Well...
hmmm
Ok, to be fair, I´m running the beta-version, so there might already be a bugfix for this one
Just restarted the foundry instance and I think I found whats causing the bug? Hold on let me reproduce it again
Yep okay, found it
If the first thing I put into the table is the checkbox in the bottom right corner, it breaks the tables and gives the error
hyper-specific bug lmao
I'm recreating it consistently
Every time I restart it clears, but if I enter a checkbox field into the bottom right hand corner of a table as the first thing in the table it breaks all my tables
😂
Can you show the console with F12?
Before or after I break it?
Well, with the error message, so after the break
ok
ok it's also not just the bottom right corner tested it again, inserting a checkbox as the first thing into a table is what does it
Seems to fuck up everything, tried to put a test text field onto the inventory page and it returned the same error
@brittle moth any ideas?
Otherwise I´d say create a new template and drag the components one by one and see if one of them causes the issue.
I've recreated it a few times, it's avoidable, whenever I inset a checkbox as the first element in a table it breaks until i restart foundry, as long as I put something else in the table first it's fine
nested tables is working fine now as long as I avoid that
So, how do i make default value of a number field a certain value based off another number field, say Brawns x 4 or something?
The default value of a number field can only be a static number, you cannot derive it from other values.
Is there a way to copy and paste elements? I'm having to re-create some smaller thing I made many times and it's killing my wrist
CTRL + Drag.
I made an update in the Wiki which covers this and some other questions.
Thank you! My bad for missing it 😄
Np. It was updated a few hours ago
I don't have rights to pin simething 😅
😭
And the least are looking at pins
Just go to the projects site and you'll see in the left Sidebar the Wiki
thanks

This will need some debugging. Check your keys and formulas one by one. It is hard to spot an issue in this big chunk.
Ive been able to modify it using a formula in Min or Max but do not recommend it, it needs tabbing through to update
Is there a way to use a chat message to add or remove from a number field (aka like using the + and - buttons) for a character sheet?
Basically a macro which changes your value?
yes, or to add to a roll mesage (damage)
Label Roll Messages don´t support this directly. You have to refer to macros.
Hmm. More of a mixture of what Foundry and CSB offer.
You can use this macro here: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Tips-&-Tricks/Macro-for-updating-values
You can call it from the Label Roll Message with /amacro "macroName" (you need the "Advanced Macros"-module)
there is a way to ref the key of a dropdown list that is in an item? And the keys from the dropdownlist are a actor attributes.
I'm making a config tab inside an item.
I had a neat idea to make an actor for chests. When players find them, the GM can reveal them to the players, and the players themselves can look inside to see the inventory items that are held. What I'd like to attempt to do is make a "Take" button that effectively labels what was taken, which player took it, and then delete it from the row.
The label is easy to do, and whoever clicks on it, the chat should log their name as part of the roll message. The part I need help with - is there a way to delete the row of the container from a button command?
While I don’t want to discourage working on this as a fun project, might want to take a look at the Item Piles module, see if it works with CSB.
Do you want to have a Chat Message with Buttons Players can use?
This is world-script stuff.
I'm actually good now, I solved it another way using a combat mod. But thank you!
My newest hurdle is, can you do nested conditions, such as IF X and Y then do
for example
item.tag==1 ? player_tag==1 ? 2 : 0 : 0
And indeed you can! ${item.tag==1 ? (player_tag==1 ? 2 : 0) : 0}$
The only way would be with macros. Hint: Items are attached to the Actor, not Item Container.
I see the delete method, but it appears that it will delete unique identifiers from the entire world file tree structure. Meaning items would need to be duplicated just to be added in to do this. My technical knowledge is slim, so please tell me if I'm reading this right.
If this is the case ^ , then I'm not sure that's intuitive to do it this way (thinking of GM UX).
actor.items.delete(item_id) will only delete the Item on the Actor.
ahhh. ok. Thank you.
well you should try the item piles module. it pretty much does that what you want it to do? not sure if it works 100% with CSB - but you should try it 😉
I'll give it a go as well. Just if I want to make this portable to share, i want to limit the number of modules needed to maintain.
If I barely understand what's happening, there's no way someone who isn't a power user is going to know what to do.
lol
Would someone provide me an example of using the following in a Label Roll Message, please?
I feel like I'm missing something super basic, and would probably just benefit in seeing a working example.
I think the Wiki has one
Looking...
I'm sorry. I feel so dumb. I can't find it if there is one. lol
Thank you.
Hello, i have a question on css customization.
I try to neutralize dropdown arrow.
I know that this code can run properly :
-webkit-appearance: none; -moz-appearance: none; appearance: none;
But into the CSB css there are this code who control the selection.
.custom-system-actor select { width: fill-available; width: -webkit-fill-available; width: -moz-available;i }
I tried to create a new css class but with no success on my dropdown.
.drop { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
There are a css specialist here ? Thx you 🙏
Outta curiosity, where is custom system builder at for compatibility with v11?
Too buggy to use until an update?
I bought Foundry yesterday and was excited to see Custom System Builder, then updated to V11, and uh-oh! It looks like the developer is pretty darn active, though. I'm curious to know how soon compatibility with v11 is planned if it is.
I wonder, has anyone tried using Simple Calendar with CSB to track something like character birthdays or ages so they can display on the sheet somehow?
I re-installed 10 right after and it worked fine for me. I'm curious too when he will update to 11 since it looks pretty but meanwhile...
Straight up 'incomppatible core' message and it will not let you launch until you re-install 10 over it. I did so today and rolled back because this and Cyberpunk Red are not updated
Ty ty. Your testing has done us all a service
Is there any possibility of setting table color and border to none without using a custom css stylesheet?
I literally just need one table to not have borders or shading LOL
Hey, quick question...
is there a way to make a hidden "database" with CSB?
i need to make a database with XP and coresponding level...
but i haven't found a way
Any news about the update to version 11?
We are currently working on some new features, but I think we´ll update to V11 either with the next major patch or shortly after.
Hello, so I've updated to 2.2.6
And I couldn't help but notice that my main character sheet happens to be completely broken
hidden values are still present within it, but it also seems to affect the actual sheets that rely on this template, being blank.
nvm, seems like... renaming(???) the sheet brings it back
As a newb here, does next major patch mean a week, a month, or what timeframe in general? Or is that a dumb question? lol
I can't really tell when. But we know that you all want to update. Just be a bit patient 😄
Yep, renaming it makes all the fields populate. I've also noticed that sometimes edits to the template require a full restart to take place. Could be that I have it open for too long (8 hours while I work remote and play around in my spare time for example)
Oh I see, it also seems that restarting foundry causes it to have the same issue again, which is a tad inconvenient
You wouldnt happen to have the action buttons module would you?
Nope
Hmmm guess its not that then
Cant update until Cyberpunk Red updates so that 'buys you time' 😆
Hello, is anyone else having trouble creating sub-templates after updating to 2.2.6? Every time I try to add anything to a subtemplate, I get an undefined error. I think it is failing to read the key I'm entering for the component? This is what the console said:
foundry.js:747 TypeError: Failed data preparation for Item.vwTZVToqnUTLbx2T. Cannot read properties of undefined (reading 'key') at Function.fromJSON (systems/custom-syste…onents/Panel.js:153) at CustomItem.prepareDerivedData (systems/custom-syste…ocuments/item.js:65) at CustomItem.prepareData (foundry.js:13286) at CustomItem._safePrepareData (foundry.js:13264) at CustomItem._initialize (foundry.js:13089) at CustomItem.updateSource (commons.js:5586) at ClientDatabaseBackend._postUpdateDocumentCallbacks (foundry.js:12831) at ClientDatabaseBackend._handleUpdateDocuments (foundry.js:12765) at ClientDatabaseBackend._updateDocuments (foundry.js:12639) at async Function.updateDocuments (commons.js:6153) onError @ foundry.js:747 foundry.js:5099 Foundry VTT | Rendering Dialog foundry.js:59187 TypeError: Cannot read properties of undefined (reading 'map') at CustomItem.getKeys (systems/custom-syste…cuments/item.js:296) at Object.callback (systems/custom-syste…te-functions.js:202) at Dialog.submit (foundry.js:56403) at Dialog._onClickButton (foundry.js:56332) at HTMLButtonElement.dispatch (jquery.min.js:2) at HTMLButtonElement.y.handle (jquery.min.js:2) foundry.js:56407 Uncaught Error: TypeError: Cannot read properties of undefined (reading 'map') at Dialog.submit (foundry.js:56407) at Dialog._onClickButton (foundry.js:56332) at HTMLButtonElement.dispatch (jquery.min.js:2) at HTMLButtonElement.y.handle (jquery.min.js:2)
The foundry license allows you several installations, but only one active game per time.
So at the moment I have: one v9 backup of old settings, one v10 actual gaming, one v11 testing the new possibilities, one v10 on usb stick for programming and testing new ideas.
But I am a self hoster and switching between the installations is a bit annoying.
Yeah I can tell it is not very DRM protected and you do not need to log in to use it which is a relief since I tend to hack and mess with things (I mean here I am in Custom System Builder lol) so I like knowing I will not somehow lose access.
I love that CSB let me turn my friends draconian RPG into something fast to play
one click for hit roll, check if critical, damage (x2 if critical), damage type (in the weapon) and location.
As @formal goblet said, we are currently working on a release with many features, I planned to tackle v11 right after 🙂
It should not be too hard, as the Foundry devs tried to minimize the impact on system and module developments 🙂
I try not to update the system too soon, as I can't maintain two versions at the same time 🙂
Hm. I can reproduce your issue. I'll try and fix it quickly 🙂
Seems like I spoke too soon...
I found the solution for your issue, but my current beta system prevents me from doing a hotfix...
Seems like I'm gonna need some time to rethink the beta system ><
Should be fixed with 2.2.7 🙂
The beta system has also been modified to not impact the main version hotfixes anymore 🙂
Beta should now be 2.3.0-rc2
Thanks so much, at the very least, I now know I didn't break anything!
no, my fault entirely ^^
Now I'm dealign with the same "blank sheets on refresh" issue Tito brought up. Renaming the sheet does bring everything back. Here is what the console is saying:
Uncaught TypeError: Cannot read properties of undefined (reading 'getAllKeys') at CustomActor.getKeys (actor.js:549) at CustomActor.reloadTemplate (actor.js:576) at HTMLAnchorElement.<anonymous> (character-sheet.js:80) at HTMLAnchorElement.dispatch (jquery.min.js:2) at HTMLAnchorElement.y.handle (jquery.min.js:2) getKeys @ actor.js:549 reloadTemplate @ actor.js:576 (anonymous) @ character-sheet.js:80 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2 item.js:64 DERIVED ITEM DATA item.js:202 {message: 'Computed props for gun - 6 / 3', computedProps: {…}, leftToCompute: {…}} item.js:202 {message: 'Computed props for gun - 3 / 0', computedProps: {…}, leftToCompute: {…}} item.js:64 DERIVED ITEM DATA item.js:202 {message: 'Computed props for gun - 6 / 3', computedProps: {…}, leftToCompute: {…}} item.js:202 {message: 'Computed props for gun - 3 / 0', computedProps: {…}, leftToCompute: {…}} actor.js:224 {message: 'Computed props for Test - 54 / 9', computedProps: {…}, leftToCompute: {…}} actor.js:224 {message: 'Computed props for Test - 8 / 1', computedProps: {…}, leftToCompute: {…}} actor.js:224 {message: 'Computed props for Test - 1 / 0', computedProps: {…}, leftToCompute: {…}} foundry.js:5099 Foundry VTT | Rendering TemplateSheet foundry.js:6887 Foundry VTT | Retrieved and compiled template systems/custom-system-builder/templates/actor/actor-_template-sheet.html
Hi, i found a problem in rolls.
I am using
${arma1_name}$ contra ${getPropertyDataFromActor('target', 'nombre')}$```
Modificadores only admit one modifier, when i use 2 o mre modifiers, for example +30-10-40, say error.
How the player can input multiply modifiers in a roll?
Hi 🙂
They should input the final modifier, in your case -20
This is not a computed value, it must be a direct value
I never encountered this issue. Is it when you reload the template from the character ? From the template sheet ? Can you send me an export of the problematic character & template ?
Is there anyway to may the input and the roll later?
absolutely, the inputs & rolls should be in the same message, but not necessarily in the same Formula.
You could do something like :
${#Modificadores:=?{Mod1}+?{Mod2}+?{Mod3}}$
Realiza un ataque ${[1d100x>=90+:arma1_ataque:]+Modificadores}$ usando su
${arma1_name}$ contra ${getPropertyDataFromActor('target', 'nombre')}$
**Beta version 2.3.0-rc3 is now available, with the following changes : **
Features
- [#200] Added item template modifiers
- [#126] Added ability to edit properties from Formulas
- [#153] Added ability to apply modifiers to Dynamic Table Fields
Known issues
- Undo / Redo button functionality has been improved, rendering the first implementation incompatible. Any undo/redo history you may have is not to be used after updating beta. You can clean it by executing the following code in your javascript console :
game.actors.forEach((actor) => {if(actor.isTemplate){actor.setFlag('custom-system-builder', 'templateHistory', []);actor.setFlag('custom-system-builder', 'templateHistoryRedo', []);}}); - Undo / Redo is not available for items yet. It will be added in the following beta release, and of course before the main version release
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
So whenever I log in or F5 refresh the world, the sheets are blank. But when I change the name on the sheet, it works. Seems to only affect all Actor sheets, Item sheets are fine. Reloading from the template works only after the sheet is "restored".
Hi,
Is there a way to change the color of a roll depending on the result ?
I have tried the following roll message but without success
<div style="text-align:center";>
<h2>Custom Roll</h2>
<table>
<tr>
<th>${Roll:=[1d20]}$ + ${VitaliteCurrentValue}$</th>
</tr>
<tr>
<th style="font-size:medium; color:${Roll==20 ? 'green': 'black'}$"> ${Roll + VitaliteCurrentValue}$</th>
</tr>
</div>
That´s what I did:
<table>
<tr>
<th>Rolling for (whatever)</th>
</tr>
<tr>
<td>Rolls</td>
<td>${roll_1:= [1d6]}$ ${roll_2:= [1d6]}$ <span style="color: red">${roll_3:= [1d6]}$</span></td>
</tr>
<tr>
<td>Total</td>
<td>${roll_1 + roll_2 + roll_3}$</td>
</tr>
<tr>
<td>Stunt-Points</td>
<td><strong>${(roll_1 == roll_2 and roll_2 == roll_3) ? roll_3 * 2 : (roll_1 == roll_2 or roll_2 == roll_3 or roll_1 == roll_3) ? roll_3 : 0}$</strong></td>
</tr>
</table>
Is it possible to link a token from a scene with it's sheet from the actor tab ?
So by decreasing the hp from the token it is also decrease on the sheet from the actor tab
Like with the pf2e system
That's what Link Actor Data does (in the actor's Prototype Token config).
what is the @ for an ability score's modifier?
@?
Do we know when CSB should be expected to work with Foundry11?
so how long til this updates for v11?
is there any way to make it show text like "1=pass,0=fail" and make it look nice like normal roll?
Hi I am trying to do two things - one I want to return 6s and 1s from a result (I assume I need to create an array and then count both sixes and ones - I tried assigning a value to a roll e.g. ${roll:=[((:Strength_Score:+:Callesthenics_Score:+:Wounds_Score:+:RollModifier_Score:)D6])}$ then ${(roll)cs=3}$ but I assume it only persists the total value of the result (so say 14 as opposed to (1,3,6,4) anyone have any ideas how I work this? sorry not a function or script person
My second question is there anyway to give Players control of a re-roll so they can trigger a re-roll of all dice not showing a 1 or a 6 (all good if no
${#roll:= [1d100cs<=:status_str:]}$
${roll == 1 ? 'Pass' : 'Fail'}$
Thank you, second one is that, how to make proficiency box, like
for example, if we check this box, the rolling would use "stat1+#" but if not it would be "stat1"
- The system doesn't support roll arrays atm. So you'd have to use macros instead.
- That's also not possible without macros
No worries - was a dream of madness
Players will be able to see the dice and make use of them so all good
PS Its a nice system - I have set up a playable interface in about 8 hours (noting I had to teach myself a fair amount of formula work in the process)
${#roll_formula:= concat('1d20+', stat1, proficiency_checkbox ? concat('+', proficiency) : '')}$
${roll:= [:roll_formula:]}$
thank you
CSB is great, was very happy to find it, thank you for all of your hard work
However I do have some questions
I'm trying to figure out the section for item containers- I see templates listed in the screenshot in the guide for item container filters, but don't see any in mine, and I'm unsure how to make my own templates
https://gitlab.com/custom-system-builder/custom-system-builder/#5-items-
Go to the item-tab and you´ll be able to create an Item Template there
Any chance we can do "If" command in VTT? like for example,
=IF(P11<(10), "3",IF(P11<(14), "4" ))
P11 being key P11
Ternary-Operator: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_operator
The conditional (ternary) operator is the only JavaScript operator that takes three operands:
a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.
This operator is frequently used as an alternative to an ...
So to really get a solid understanding of building a sheet, I wanted to take a look at what a full template would look like from a system I know (for example, linkedflush's WFRP4e sheets) and look at the different roll formulas, etc
so, I imported those .json and, while it imported, when i open up the templates they're blank
Sorry but can we just put those into Label section? or do we need to do anything else
is there some way to resolve this or is an imported .json not meant to work like that?
wait, just had to reload it
never mind
${P11 < 10 ? 3 : P11 < 14 ? 4 : 0}$ is all you need in your Label
Do we need to edit the code somewhere? or like put the code anywhere else. It just show up as this (P11=10) and not the return result
Forgot to add ${}$
Sorry, add that in P11? or add to entire thing?
Check my example
Thank you very much, it work now
If I want ### to have small number field, what do I add?
this code provide here only make the input field auto size and it's annoying <input type="number" id="status-men-input" value="${[(:status_men:)]}$" onchange="calculateResult()">
or like, are there any way to make it sit on same line
What would be the best way to approximate something like this? I essentially want five columns, with a text field at the top, and then rows that can be added individually to each column without them being added to the others
Would it be something like
5 column Table with text fields
And then one dynamic table per main table column?
Dynamic table lets you add a full row, not single columns. You should, I think, use 5 separate dynamic tables, but that would lead to creating 5 separate items to be added, one for each table.
Would it be viable using static tables with elements to be made visible as needed with checkboxes?
It's a burden, but could work.
I figured it out
Nice. How did you solve it?
If you put a dynamic table in each column, it allows adding a single entry into that column
this system builder is extremely helpful, i'm very happy i found it
results in
Stupid question: I have a number field that needs to be centered... what's a good way to do that?
CSS, I believe.
Tables panels allow you to choose component alignement, if I remember correctly, within each column.
Yeah, and I chose "center" and it didn't work :/
Well...
The label and the box are two separate columns, right?
No, it's the label of the box
....
lol
I put in a capital C instead of a lowercase c
lmao
thanks anyways
Np, glad to be of assistance if possible 😉
How do I edit properties from a formula in the beta? I do not see it in the beta readme or addressed in the recent chat @brittle moth I really wanna test this
What's the best way you guys have found to learn javascript formulas? I have little knowledge of coding.
This system does not use javascript directly, it uses its own "language" for the formulas 🙂
You can enter simple math equations as formulas (1+2, str*4)
You can also use a series of mathematical functions described here : https://mathjs.org/docs/reference/functions.html
Here is a presentation of the full syntax : https://mathjs.org/docs/expressions/syntax.html
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
Thank you! And thank you for putting this together, it's really cool and I've found it extremely useful
Now I don't have to use roll20 🙏
one more thing I keep seeing blank templates in the beta even when I make a 'a whole new world' any idea how to troubleshoot this?
Gonna go do something else but could not do any testing
In beta 2.3.0 rc3
- I cannot make character templates work no matter what I do
- Item templates do not show the Item Template Modifiers as a button (which I would assume it would be like regular items)
- I created an item that would attempt to modify it's user and I would get a mistake
Formula.js:851 TypeError: formula.replaceAll is not a function
at setPropertyInEntity (Formula.js:580:39)
at math.js:26531:54
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:839:27)
at Formula.compute (Formula.js:294:21)
at ComputablePhrase.compute (ComputablePhrase.js:130:27)
at HTMLAnchorElement.<anonymous> (Label.js:254:39)
at HTMLAnchorElement.dispatch (jquery.min.js:2:43064)
at y.handle (jquery.min.js:2:41048)
{formula: "setPropertyInEntity('attatched', 'life', 20)", props: {…}}
Is it possible the beta does not contain the updates?
{formula: "setPropertyInEntity('attatched', 'life', 20)", props: {…}}. Formula contains a typo: attatched -> attached
The beta contains all the new stuff. Just make sure that your world actually runs the beta and not the normal version.
Ok I created a world that is 100% clean beta
and I get this creating an item template
commons.js:6407 Uncaught (in promise) Error: Flag scope "custom-system-builder" is not valid or not currently active
at CustomItem.setFlag (commons.js:6407:44)
at CustomItem._onCreate (item.js:35:22)
at ClientDatabaseBackend.callback (foundry.js:12612:11)
at foundry.js:12562:43
at Array.map (<anonymous>)
at ClientDatabaseBackend._handleCreateDocuments (foundry.js:12562:33)
at ClientDatabaseBackend._createDocuments (foundry.js:12468:17)
at async CustomItem.createDocuments (commons.js:6110:23)
at async CustomItem.create (commons.js:6233:23)
(it is an empty world nothing dropped in it, no modules, just got that creating my first template to test)
Ok, I can confirm the issue. @brittle moth
So I think it just does not like being called custom-system-builder-beta
I backed up my custom system builder, made a copy without the beta... and that is where it checks and finds the things it wants and all the new features show up (character template is still brokenish)
Like internally I think it follows a custom-system-builder folder structure for everything instead of -beta which is the installed one
(I'm not good at computers so this is speculation)
I´ve already tried to change the system-id to the normal one but that doesn´t fix anything. I´ll see if I can find the issue
ok, I don´t get the issue with the up-to-date-branch, so it´s really something with the 'beta'-thing.
If it is a hint some of the errors point at the undo - redo like it's looking for a history that does not exist as it would be without the BETA
I got it to work by copying it to a folder without the beta and removing the beta from the ID in the main json and then creating a new world... my template got no errors and has the + to add stuff gonna test the rest
And I´ve found the issue in the code-base. The flag 'custom-system-builder' is static, but the beta uses 'custom-system-builder-beta'. So this flag should be either constant through both versions or set dynamically depending on the environment (environment variables)
OH ANOTHER THING... for some reason the formula HAS to be in " " the way it is written so that it can strip the " " otherwise you get a mistake
I'm not a coder but this is the segment that kept giving me errors
setPropertyInEntity: (entityName, propertyName, formula, fallbackValue = null) => {
formula = formula.replaceAll('"', ' ');
formula = '${' + formula + '}$';
and it finally worked when I changed setPropertyInEntity('self', 'HP', 20) to setPropertyInEntity('self', 'HP', "20") so it could happily replace the " and do it's thing
I think because it is expecting a string and the 20 is a number or something I'm not that savvy
with this figured out I'm gonna donate when I can OMG @formal goblet and at @brittle moth this is such a game changer!
I'm now clicking to heal, clicking to reduce quanity, gonna try clicking to unequip and adding 'mana usage' to a spell after I do the dishes and clean the kitchen
Clickable equip unequip
Hello @somber bay !
Thank you for your support and for this bug report 🙂
It will be fixed for the next beta release 🙂
Your implementation of item-changing labels is nice, I must say ^^
guys i see in changelog 2.3 but i can only update to 2.2.7 why?
@faint wharf 2.3 is in beta for the moment, not available in the main release channel 🙂
I will indicate that in the CHANGELOG 🙂
oh ok cant wait to implement waight and AC in my system! thank you for all those developments
Hello @somber bay .
Your clickable equip unequip demonstration is very nice and probably useful !
It will be nice to integrate your example with fews explanations in Tips and tricks on the CSB gitlab wiki 🙂
Hey there! It's me again 🙂 Maybe i'm just too dense, maybe it can't be done. Is there a way to display the token image of a targeted token on a sheet somehow?
Honestly that stuff is gonna look 'easy' once the beta goes mainstream. I always struggled with macros but with this it is like 'think about it for a minute and just do it' so much easier.
is '/amacro' not working anymore for someone else ?
Hello guys, some1 knows a way to use the module "Item Piles" in CSB? Or at least where the itens are in the system, the full link, like the atributes "actor.system.attributeBar.etc"
Should be under actor.items
The following image is 3 item containers, each column is Smaller and Right Align, but it all seems to depend on the name size of the item. Am I missing something, or can I have it set to where the two colums on the right are always in the same position? I realize the one with the trash icon won't be.
No need, I resolved it using a different style and format
Has anyone found a fix for the issue where keys' default states don't work until you physically click the input? (For instance, a checkbox defaults to a blank, not a false; a number input defaults to a null value that throws errors, not the default value you enter, until you click the field to make the sheet recognize it. This means, in effect, having to click into every input field at least once before the sheet will recognize the content of the field.)
hi, how do I use custom css?
i've created a custom css file with a single class with color: red; and them assigned the class to the template, but the sheets dont change :(
Is there any way to get data from an Item Container. Like let's say I have an item table for item that represents classes and each item tracks how many class levels someone has in that class. I want to be able to calculate the total number of class levels.
The other way I see for that is using a dynamic table which would be fine, except I want a link to that item, so I can repurpose it. How can I get a link to an item in the item directory like the first row of an Item Container as an entry in a dynamic table(I know that that one in particular links to the copy on the actor of that item, but there has to be a way to get a link to an item from the item directory, right?)?
I tried using a rich text field, droping an item inside of that, which generates that nice string, but when I save it does not become a link.
You can have a hidden attribute for each class on the player sheet, and have an equal hidden attribute on the "item" that adds to the selected class, then have a formula in a Label that interprets it.
Such as:
Player attribute: class_fighter value 0
Item Fighter Skill: class_fighter + 1
Label: ${class_fighter}$
Nice, thank you. You can even add the level tracked in the item. That makes it a bit more dynamic.
So apparently hiding tabbed panels seems to break the sheet.
I'm not entirely sure what is happening, but it only seems to work sometimes on some sheets, but currently the issue makes it impossible to open older sheets and make new sheets that use the template with the hidden formula.
Is there a way I can ajutomate Custom System Builder to roll 316 style initiative?
In 316, you have a scolre called NFA.
To determine initiative, you roll 1d10 and that number is your initiative. Unless it is over your NFA, then your initiative is 0.
Is there an example of someone using the getPropertyDataFrom Actor function? I'm trying to use the "attached" reference to look up a property in an item's attached actor and I can't seem to make it work. The statement reads:
${getPropertyDataFromActor("selected", "diceMod")}$
Anyone know what the variable is for an item name? I tried name, itemname, item.name (though this should only work in containers) and no luck
You have to restart your world to let foundry use the css.
Is there support for v11 yet?
Are there any way to copy table and paste it for the next one?
You can ctrl-drag to make a copy
Thank you so much, this cut off like 50% time lose for me
is there a way to get "Total load" and "Max equip load" to show up as number for the "Load%" to work? I tried component key and when I put up component key the whole sheet doesn't even work
I mean I can do this, but I have if else encumbered ready to go, and I don't want to put that whole Load code < 20 =something
I might be dumb but I don't know which one of it is similar to my question in FAQ
You shouldn´t use colons : if you´re not using rolls.
so just dp something like ${status_str}$ right?
work now, thank youi
another one, how do we use it if return value is text?
I got it, just dumbo and forget to add ""
[Custom System Builder Question] I'm working on creating a sword world 2.5 character sheet using custom system builder to make the sheets. (i've got cursory programming knowledge but not enough to build an entire system from scratch) Does anyone know how to jury rig check boxes into a type of radio button set that won't allow other boxes in the set to be checked?
where the check boxes marked Scout Ranger and Special are listed are the checkboxes I'm trying to get modified so that only one can be selected at a time.
The system doesn´t offer radio groups, so you´d basically need a custom implementation.
But we have dropdowns 🙃
Thanks still having trouble with drop downs
You can only reference the key corresponding to the selection.
And in conditionals only numbers work...or at least that's what I found.
That´s because you cannot compare strings with ==. But you´re able to use equalText() for string-comparisons, so comparing strings is possible, just not with ==.
Right, my bad on that 😅
Is there a way I can automate Custom System Builder to roll 316-style initiative?
In 316, you have a score called NFA.
To determine initiative, you roll 1d10 and that number is your initiative. Unless it is over your NFA, then your initiative is 0.
There is an initiative formula in settings, where I think you can set up a conditional. Or you can set up a label with your roll formula, but dunno how it counts towards combat turn.
Thanks, does the ${}$ formation support "if" statements? I am not much of a coder and am trying to figure out the best way to do this...
It supporte ternary opertors 🙂
https://gitlab.com/custom-system-builder/custom-system-builder#43-conditions
Ok, I've got antoher question. I'm trying to make items that modify my attributes, which I have in a blank label. A sword is supposed to give +1 ATK. I have a label keyed ATK but the sword isn't adding anything went dropped on the sheet
Cool!
Also, what is a ternary operator?
The conditional (ternary) operator is the only JavaScript operator that takes three operands:
a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.
This operator is frequently used as an alternative to an ...
Oh, I hit the link, that helps a lot, thanks!
I really did read the wiki, I am just not understanding it all yet. Thank you all for this awesome module!
Is there a way to do a Label Roll Message for a pool of dice that doesn't sum them, but returns them as individual die results?
Is that the only weapon that has to modify ATK? If so, adding item.atkmod (or whatever it's called) to ATK should do the trick. If not, either you have to use macros or have equipped checkboxes that you can use inside the ATK formula.
I'm certainly not ready to try and tackle macros just yet, and this is not the only item that is going to modify a stat. But inside of an item container, I can't seem to be to add a checkbox to make it "equip"...hmm
to back up, I'm trying to use the box "configure item modifiers" to modify the ATK score by +1 with the Sword. Is that not the place to do that?
Containers take labels only. You can achieve that by using a table with a fixed number of rows, one per item, each containing an equipped checkbox. That is what I did, for example.
You need to add a modifier to the item, configured like so :
- Key :
ATK - Operator :
+ - Formula : either
1(direct value) or${ATK_MOD}$(to use an ATK_MOD field in the weapon)
Be careful though, items are copied when added to a character. Modifying the original item after adding it to a charater will not change the item on the character, you either have to delete and re-add it or modify it directly on the character 🙂
Please correct me if I'm wrong, but this way for every item with that modifier key the corresponding value gets added to ATK, doesn't it?
Item modifiers are defined per-item, only items with this modifier will add the ATK_MOD to the ATK of the character
This is exactly how I have it configured. I then drag it over to the character and get no change. The ATK is keyed to a label that I have done nothing to modify from it's defualt state. Is this the correct way?
The label text has to be ${0}$, if I remeber correctly.
Indeed, as @fierce harbor said, the Label must have an initial value, which must be a number. It can be 0, no need for ${}$ in this case 🙂
When I put it in as "0" that did not work.
When I just put it in as ${0}$ worked like a charm.
Could it be another stat?
it could, inside a Formula 🙂
Could be defined as ${floor(Strength / 10)}$ for example
Weird, works on my side... Then again, I test with the developing version, which can have corrections included ^^"
Thanks for clarifying this point 👍🏻
AS long as the formula results in a number, everything should work 🙂
I'm a liar. 0 works. I originally had them in as number fields instead of label fields. When I switched to label, I must have just gone with a blank field, which actually netted me a 0 on the character sheet.
Good to know 😉
Things are working as intended for now. Next problem is figuring out how to deal with changing levels, if I'm using class as a templated item. Since values really can't change once you bring them to an actor sheet, I'm afraid leveling up will be grabbing the new level in the class to add to your sheet to get a additive effect.
Values can change 🙂
In the item containers, if you click in the name of the item, it's the copied item which gets opened, not the original
Any changes in this item will only be applied to itself, and not be reflected on the original 🙂
So you can handle levels in the item, and have multiple characters play the same class at a different level 🙂
I solved that avoiding automatic changes at level-up 😬
What I'm battling with is macros for hp/mana/etc. changes...but I'll eventually be victorious 😅
I think that's what I'm going to go with as well. A new item for every level, but so as not to clutter the sheet, I'm going to make the modifiers the total of the levels combined instead of just the totals for that level. It's about the same amount of work either way 🤷♀️
Very true, but that also means that it's not a drag and drop affair, which is what I really want for this as it's a playtest, and I want to make it as easy as possible to manipulate the vtt, so the players can focus on the game mechanics rather than the vtt mechanics.
Sorry to ask again 😅 but I'm wondering if "/amacro" is working for anybody ? It suddenly stopped working for me
works for me. but i haven't updated since the weekend or so.
I put this:
${Roll := [1d10] ; Roll > ?{ FAorNFA | 2 } ? 0 : Roll}$
in the Initiative Formula.
It prompted for the number, then gave me an error:
Foundry VTT | Unregistered callback for renderDialog hook foundry.js:661:13
Rolling [1d10] Formula.js:268:21
Computing 1d10 ComputablePhrase.js:113:17
Computing ${${Roll= 9 ; Roll > FAorNFA ? 0 : Roll}$ Formula.js:323:17
Object { formula: "${Roll= 9 ; Roll > FAorNFA ? 0 : Roll", scope: {…} }
Formula.js:707:17
SyntaxError: Unexpected operator { (char 2)
he http://71.56.198.126:8080/systems/custom-system-builder/lib/math.js:27329
H http://71.56.198.126:8080/systems/custom-system-builder/lib/math.js:26915
string http://71.56.198.126:8080/systems/custom-system-builder/lib/math.js:26735
e http://71.56.198.126:8080/systems/custom-system-builder/lib/math.js:6729
computeStatic http://71.56.198.126:8080/systems/custom-system-builder/module/formulas/Formula.js:727
compute http://71.56.198.126:8080/systems/custom-system-builder/module/formulas/Formula.js:292
Formula.js:740:25
Foundry VTT | Retrieved and compiled template systems/custom-system-builder/templates/chat/chat-roll.html foundry.js:6887:17
Model Validation Errors
[Combatant.initiative]: must be a finite number foundry.js:59187:78
Error: Combatant [SabtetMKqJttYjNQ] Model Validation Errors
[Combatant.initiative]: must be a finite number
[No packages detected]
ModelValidationError http://71.56.198.126:8080/scripts/commons.js:5116
_validateType http://71.56.198.126:8080/scripts/commons.js:4098
validate http://71.56.198.126:8080/scripts/commons.js:3824
validate http://71.56.198.126:8080/scripts/commons.js:5492
_preUpdateDocumentArray http://71.56.198.126:8080/scripts/foundry.js:12717
_updateEmbeddedDocuments http://71.56.198.126:8080/scripts/foundry.js:12661
update http://71.56.198.126:8080/scripts/commons.js:6795
foundry.js:747:30
What did I do wrong?
You should not use ${}$ in the initiative formula
Your formula should be directly Roll := [1d10] ; Roll > ?{ FAorNFA | 2 } ? 0 : Roll
Besides, i'm not really sure if variables work in the Initiative formula... I might have to test this out
Ah, does this help:
Judging from the output, the Roll variable seems to be working, but maybe not the user prompt?
Variables usually work there (if you mean the keys). It would be tricky with temporary variables.
If I am reading the log correctly,
?{ FAorNFA | 2 }
seems to always return 2, regardless of what I inout at the prompt.
I am new, so I might not be reading it correctly.
The semicolon is the issue, you can have only 1 result within a formula.
Oh, OK, I wasn't sure how to compare the roll and return the roll in the same ternary...
Yeah, I'm unsure if your logic is doable because you can only have 1 formula in the initiative-formula
Is there a way to roll Xd6 and both total the results and check it for 1's? For example, can you recall the roll result?
I recently discovered how to do a user imput for the X in the roll, so that's all good
Nope, only one of both.
Button options on an item it is then!
Can I use a Key in the Initiative Formula and if so, does it require a ::?
Check the Wiki for that. As a rule of thumb: Use : only inside [].
Ah, OK, thanks!
Here's a head scratcher... I like the way the text looks in the block for dice rolls, so I am trying to get it to use a variable called special_message set on the same sheet. I have tried the following (among other varrients) to no avail. Thoughts?
${special_message}$
${'special_message'}$
${concat(string('),string(special_message),string('))}$
${concat(string(special_message))}$ was the solution
I'm wondering if I've gone about this the wrong way, but I'm trying to figure out how to create a roll button on an item that can be modified by a value in the item's parent character sheet. Essentially, the item is a power that the character rolls, but there might be modifiers to that roll that are captured in a field in the character sheet. Is this something I'd do with getPersonalDataFromActor or should I try another approach?
I updated today (Foundry v10 AdvancedMacro v1.19.6) and it works as expected.
I've made my own D&D4e spinoff system, and I've gotten most details down pretty well. However, I can't seem to find a way to let the user add a modifier / select from a dropdown?
On roll20 you'd do a simple [1d20 + ?{Modifier?|0}]
Which would prompt the user to to input a modifier, where the default value is 0
Hm, but that doesn't work in chat macros right? I find the roll messages to be cumbersome to make, especially when you need hundreds of them
Dunno. Never worked with chat macros. But my guess would be that CSB-formulas don´t work there.
how to set up HP/ MP and all those bar properly into the token?
Make sure that your number fields have a max-value. Then just select the corresponding attribute bar.
I'll try
So I'm working on the same thing
I put in a test default max value for HP (999, in this case), but apparently that's universal for every token sharing that template. So if max HP changes from character to character, how can I do that?
Try unlinking the token
Wasn't linked to begin with :/
So different question: trying to roll initiative. I want to set up a specific formula and need help writing the right one. Specifically, I want to find some way so specific dice results are parsed different.
Essentially:
[numberfield1] times [d6 {0,0,0,1,1,2}] + [numberfield2] is what I want to accomplish, where 1-3 on the d6 count as "0", 4 and 5 on the d6 count as "one", and 6 counts as "2"
For example,
Numberfield 1 = 4, number field 2 = 1
(4*d6)+1, where the results of the 4d6 are 2 (0) 4 (1) 5 (1) 6 (2), giving me a total number of 5
Is this possible?
The max-value can be a formula. So it can be set dynamically.
Ah
It´s possible to count successes within a roll. That´s part of the Foundry Roll API: https://foundryvtt.com/article/dice-advanced/
The only thing I don´t know is, if it is possible to have 2 successes on a rolled 6.
The official website and community for Foundry Virtual Tabletop.
Thanks. It's actually something I copped from Cubicle 7's wrath and glory, and mooman was able to implement that successfully
But maybe he had to format it specially for that.
Have you thought using roll tables? You could apply defferent weights to roll results.
hmm
Haven't studied them in depth so I might be wrong, but you could look into them 😉
thanks!
No probs 👍🏻
Hmm, would it be possible to have it just add an extra 1 per 6 rolled at the end of the formula?
The issue is that you don´t have access to the whole array in CSB
Would it work adding the number of successes, success being a 6?
EDIT: I now see it would not work, as you need 4,5,6 as successes.
Would it be possible to reference a script macro?
On updating fields within a roll (beta) is there the ability to delete an item or is it something we could get? I do not wanna add it to requests unless there is a good reason to.