#Custom System Builder
1 messages · Page 8 of 1
I can't seem to find the right balance... when choosing which level of ownership for players, which is the right one that takes away the "configure item modifiers" and "make unique" boxes and still lets them interact with checkboxes, text fields, and such on the item?
i resorted to just triggering a macro from the sheet and handling the whole roll from there.
I thought about that, but went with a table of 10 label fields (thank you font awesome for the d6) with the check formula repeating as it goes from 1d6 to 10d6.
It's a gamble system and the odds of rolling a 1 on any of the dice making you bust should keep nearly anyone from wanting to do more than 10. If they are that crazy, they can click 2 buttons LOL
Oh I meant the evaluation for 1s and the total part. For rolling Xd6 I just use a number input that feeds the roll
How I get the key for using an attribute in a macro, for exampel a character's speed?
I tried @attribute.speed.value, but that just returns a zero. So that is not it.
I think it is @attributes or @props.
You can check logging you actor to the console, but I do not remember the code for that sorry 😅
that's only for chat macros, right? RIGHT? i have token.actor.getRollData().something in my script like a hundred times 😄
Apprently it was only for chat macros, since the Year Zero Engine Combat module did not register it.
yeah i just tested it really quick to make sure i'm not insane. only works in chat macros
it is the last issue I have in order to implement the system I am running in foundry vtt through custom system builder.
I wish they provided a tool for you to list actors attributes
Well, just type game.actors in the console and you'll find all attributes
Oh 🙂
make a script macro that has this:
let attributes = token.actor.getRollData();
console.log(attributes);
click a token, run the script and open your console.
only gives me name etc. for each actor.
should list all the props you have on your sheet
I will try that
Click on it to expand it further
Sweet, that worked.
Thanks a lot.
and that proves I had it right. Something with the YZE-Combat module is not working.
There's currently no setting for this
Hello! I'm new to CSB and I struggle with Items: I can't manage to have their properties show up in the character sheet: there is only the name of the item and I have to click on it to open it (no table display). I have read the documentation but with no success so far. Any idea of what I should do?
Currently no functionality to delete an item
Your Label in your Item Container should be ${item.key}$, where key is the key name of the component in your Item
Ok, thanks a lot. I'm trying it... and it works. 😃 Thank you!
so the item templates are to handle various items that you can put in the compendium?
Item Templates are like Character Templates, nothing more
just actor.items.name? It doesn't need system or props or anything like that?
I'm trying to make a module to work on CSB, but it needs to read the number inside the item that the character is carring. I doesn't event know if this is possible.
Keep in mind that items is an Array, not an Object
i dont know that this means
It´s not as simple as just actor.items.name. The issue is that you don´t have 1 item under items but 0 to many. So you cannot just do items.name, you have to filter first until you have exactly 1 Item, until you can get it´s name.
Does the module only need the entry of 1 specific item?
If i'm not wrong the module, "Item Piles" need the location of the entry to be used in custom made systems
It says "path for each item´s quantity", which means the module already knows where the items are. It just needs the info in the item itself.
Properties are stored under system.props.key (doesn´t matter if Actor or Item)
Just, this doesn't seem to work, i'll try some others entry and do some experimentations to see if this can be used.
What did you enter?
i tryed system.props.qnt and some other variations, like system.props.item.qnt system.props.actor.item.qnt
And you have in the Item a number field with the key qnt?
🤷
OK, thx anyway
For some odd reason, when i try to do it with the currency, it works.🙃
is it safe to swap a world to Beta version?
ignore, tested out a cloned world and my sheet templates wont load in beta, so I better wait.
May I ask, what exactly was it you did/typed to get the icons in the container like that. Mine are just being finicky.
<i class='fa-solid fa-burst'></i>
or if you want to get fancy you can try the following using variables from the item itself:
<i class='${item.type==1 ? 'fa-solid fa-helmet-battle' : item.type==2 ? 'fa-solid fa-shirt' : item.type==3 ? 'fa-solid fa-ring' : item.type==4 ? 'fa-solid fa-ski-boot' : item.type==5 ? 'fa-solid fa-shield' : item.type==6 ? 'fa-solid fa-ring-diamond' : '' }$' <i class="fa-solid fa-ring" style="color: #940000;"></i>
just be careful, until you are SURE the font awesome icon works, put something in the label prefix or suffix so you can find it if the icon comes up blank. Not so bad on the item containers, but basic labels will force you to delete the panel it's in and redo it all from scratch if it becomes invisible.
Some font awesome are Pro, aka subscription icons, and they will do that to you.
Can a roll message save a variable to use later, such as saving it in the hidden attributes?
Looking to save the data if an attack was a crit, so when they roll damage it will multiply it. However, the system I have set up does not auto roll damage as there are other factors.
Thank you! I'll try it out tomorrow. 🙂
Each time i load my world, every item in a compendium are blank until i reload them one by one.
Is there a way to fix this or reload every item of a compendium ?
Relload all item sheets from the template does not work for this
CSB BETA question: is it possible to update a field to a string? Like if I use a number it works but if I use a word like Home it gives me [object Object] as a result
Can you show what you got?
I also tried adding : String after it but it just does the same thing without showing the roll (which is actually kind of useful for me)
It's possible if you use setPropertyInEntity() (Beta only)
General question: actor.update seems to only Work with number fields. Is this intended behavior?
It probably works with all input fields (this means that Labels are not included). But I've personally tested only number fields and checkboxes, so I'm not 100% sure
Ah ok, good to know that Labels are not "supportet"
It's not just "not supported", Labels are not even supposed to receive user input 😅
Hi everyone, I'm trying to figure out how to get an item to roll with a modifier based on the attached parent sheet. Here's a screenshot of what I've been trying, but I'm sure I'm missing something in the syntax. Any help much appreciated.
What does the console say?
I'm sorry, I can't tell. Do you mean the browser console or is there one internal to Foundry/CSB?
Browser console (F12). There you check the console for errors.
Error: Undefined. Unbalanced group missing opening ( or closing ).
It seems to think I've left something open, but I'm not sure I see it. I'm seeing two open ( and two closed ).
I see a missing colon after item.PowerRollRanks
Okay, so now I've got: Unresolved StringTerm 12:d6even requested for evaluation.
(That's progress!)
That´s probably an error in conjunction with the Foundry Roll API. I think even is not valid.
Well, I've had it roll that part fine, it's just that when try to add the diceMod from the attached parent it doesn't work.
Ok, my fault. The term even is right.
But I see a colon inbetween, which shouldn´t be there
Should be 12d6even and not 12:d6even
Remove the colon after the second )
Same error unfortunately:
Unresolved StringTerm 12:d6even requested for evaluation
Waitaminnit
Okay, so the dice are rolling, but they aren't pulling the +2d6 modifier from the dicemod property of the attached parent entity for this item. Is this the right command:
:getPropertyDataFromActor("attached", "diceMod"):
You actually don´t need getPropertyDataFromActor(), because Labels in Item Containers have direct access to both Actor and Item properties. You can replace it with just :diceMod:
Worked like a charm, THANK YOU!
Can items be added to item containers in other items?
Currently not, but it's a feature for the future.
I have powers that come in two varieties, ranked and unranked. Both types appear in an item container. I have a button label in the container that lets you roll powers according to their rank. I'd like that button label to be invisible (so players don't try to roll an unranked power) if the powerRank attribute in the item is null (or conversely, visible if > 0). My question: is there a null option in the formula or will it fail to evaluate properly if the powerRank property doesn't appear in the unranked powers?
It will fail if a property is not present. You could use ref(), which allows to define a default value in case the property is not present, so it would be possible to display an alternative text in case a player tries to roll an unranked power.
Hello! I'm being checking differents way to deal with my custom game of Hunter X Hunter, i think with CSB I can done most of it. I wonder 2 main things before start creating it.
1-it's possible to create a exp/lvl system based on a reference table, instead in dices per lvl? and have it automatic working, just adding exp gained.
2-on CBS the mods for combat tracking and deal with the battle system go smoothers are working? (Combat Utility Belt, Midi QOL, Monks combat or token HUD?
thanks
is there a CSB way of setting system.props? I'm using actor.update() but it's not working for select lists when I have a sheet open, it doesn't seem to refresh the select list in a visible sheet and if I mouseover anything the value resets to the visible value in the rendered sheet if that makes sense.
CUB and Midi dont Work as far as i know.
Please Show your field you want to Change (configuration Window) and your macro Code
-
There is no function at the moment to get data from a table in CSB. Maybe it can be done with a macro. So it depends on the complexity of your table, if it can be done within hidden attributes, to make a automatic experience levelling possible.
-
Look at the dependencies of the modules (if there are supported game systems are listed). If there are systems listed, it will most probably not or only partial work with CSB by default. But you could make your own fork for your system.
Monks Combat Details and Marker work with CSB, Combat Utility Belt works only partial and Midi QOL and Token Hud don’t work with CSB by default.
Data from a table can be retrieved using the keys of each cell, if those keys are unique, of course.
For example, if you have a column named attMod and the specific cell of that column for lvl 3 is named attModL3 you can retrieve that data using ${attModL3}$
check
nvm, just had to do await before update() and actor.sheet.render() after update. eg
if (payload.rosterActor.sheet.rendered) {
payload.rosterActor.sheet.render(true);
}```
Is it not possible to import another systems character sheets into the custom system builder system is it? I want to import D&D 5E stuff into the system and then modify it?
Actors and Items are completely incompatible across systems.
drat alright
would it be easier to modify 5E because that is what the ruleset that I am using is based on or just create the system in the Custom builder?
I guess it depends on the amount of Changes you want to do? Or the Changes you need?
Yeah I have no ability to helpfully comment on difficulty scales here.
Convert it into a Scifi ruleset, I already have a book for it, Hyperlanes is a conversion to Scifi for D&D 5E
but Foundry does not have it at the moment
I wonder how much can be done by changing the compendiums in a regular 5e
Yeah I think you can create classes and features in 5e... your only problem would maybe be skills if Hyperlanes has skills like Spacepiloting or something
Beta Question
For a phrase like setPropertyInEntity('target', 'Defense', 'Defense * 2') how can I set up a fallback so it runs without a target? I see an example with fetching but not sure how it would work with setting
Little background first:
my custom sheet has a few tabs, one of which is named 'Inventory' and contains three tables each with one line of labels and ten lines (one for each item) that can be made visible via a checkbox so to simulate item addition to equipment.
Now, let's say that I want to check if an actor has a certain item equipped. Question is: do I have to traverse the whole data tree or can I refer to the table key and use something like tableKey.find( item => item.name == "name")?
The issue is that CSB doesn't allow arrow-functions. And there's also currently no way to check for a specific item.
The only option would be to set a hidden value with item modifiers (to a certain condition), which can be used by the table then.
Actually, do you mean by 'item' just a table entry?
Hm, I see. Thanks for the answer.
Yes, each item is a row inside one of the tables.
Ah. Well... You have to know every key. You cannot do any table-operations on the Table-Component. Use DynamicTables if you need those
Tables are like in this image:
Have to retest sameRow functionality to do that, but I will 😉
Anything wrong with that?
Last time I used that function it did not work. I think I have to move to the Beta to use that, don't I?
sameRow() is not new, so you don´t have to use the Beta for it
Well, as I've been lost in other stuff since the first attempt I need to test DynamicTables on my sheet again. I'll let you know.
**Beta version 2.3.0-rc4 is now available, with the following changes : **
POTENTIAL BREAKING CHANGES
- Refactored template system to avoid code duplication - Modules adding component types may break with this change
Features
- [#166] Added predefined lines to Dynamic Tables
- Updated chat commands library verified version
- [#215] Added confirmation dialog on component deletion
- Added undo/redo in item templates
Fixes
- Fixed issue with item modifier edition
- Fixed issues with item modifier computations
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
Nice ❤️
I can't wait for v11 on CSB, I love your job
is there any plan on adding localization to CSB? I'd contribute with the localization file if you're ok with that
Not a bad idea, I´d also provide some support in this category for the german-part.
The only issue I see is the README. It´s the main platform for CSB and is quite large. It has many instructions on how to use the system properly, which is especially important for beginners. So it would also need to be localized, which can take a good amount of time. And the final question would be how you´d handle the different localizations at the Repository: Multiple README-files? Shifting the README to the Wiki and have different links to different locales? Or something different? Atleast these questions should be answered.
I have nothing against it, it just depends if Linked wants to have it or not. I can say for sure that it will not be part of the next patch, but maybe after the V11-patch.
It is planned, but I did not really view it as a priority for now, I figured people would want more features ^^
It's not a small change either, since I did not plan for it at all, so I'd need to search and replace everything written in the system ^^"
I'm looking for help with using tables to fill in data based on a drop box choice. So I'm looking for a few things to happen:
- I have a table (included in the actor template) that includes all the info for options relating to a particular type. I understand how to create a table, so I'm not really looking for advice on this point.
For example, in this case lets say I'm creating a table of items that includes other stats about them, like weight, cost, etc.
- Then I want to have it pull from a particular column to propogate choices in a drop down box within a dynamic table. I know how to create this from a dynamic table, but I didn't see info in the documentation about how to link to a info in a static table.
For this example, I'd want to have it use a column called "Item Name" with key "itemName" or something along that line to create the list of items on the dropdown box in the dynamic table.
-
User picks a choice from a drop down box. (I think this is self-explanatory?)
-
Finally, I want to the other columns to fill in based on the choice made from the drop down box.
So, if the user picked an item called "Item1", then I would want it to pull the info from the same row as "Item1" from the static table into the line on the dynamic table where the drop box is (weight, cost, etc.)
With static tables I'm afraid that you have to address each single cell. There is no function for that, as said by @formal goblet.
Oh, so I'd have to link to each Item name individually?
'fraid so
Ok, well at least there's a reason I couldn't figure it out, lol
Thanks
The other thing I'm wondering about is CSS. I wanted to try to make the stuff that players can see look more similar to the corebook, but I'm not super familiar with writing CSS (and I'm super rusty on the parts of it I am familiar with). I was wondering if anyone had any advice on where to learn about it and/or a sample CSS sheet that I could use for reference please?
I personally look up to W3School (if this is not allowed, please let me know and I'll remove the reply) for html/css. As for the sample sheet, you might want to look at 5e system or any other system you see fit.
Oh, that's s good idea to look at another system, Thanks!
Most welcome
Additionally, some Sheets in the sheet library on gitlab have CSS files 🙂
You could load this in your system and see how they work 🙂
@brittle moth your wiki tip tooltip on hover... how does it work? I can not make it work
Is there a way, when reloading a character sheet (or all sheets), to make the items on it all reload, as well?
No, you need to go through the item templates manually 🙂
Hum... That is a good question. I did not write is personally, I think it's missing some CSS to work correctly.
I'd say you need to add this CSS :
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown .dropdown-content {
position: absolute;
transform: translateX(-50%);
background: white;
z-index: 9999;
padding: 8px;
display: none;
}
That would be a super handy feature, then. 🙂
Or even if I could just allow players to reload their own templates!
I advise you to open an issue on the Gitlab then, I won't remember it if it stays on this channel only ^^"
I need to look into that!
Thank you so much 👍 I think the wiki tip needs an update about that part. But thank you so much for your help.
Here's something I'm honestly not sure how to approach, maybe someone here can help me figure it out. I've got characters (superheroes) with items (superpowers), and the items have roll buttons active on them so you can roll them when you've got the sheet open. Works great. Now I'd like to create a macro for the macro bar that lets you press a button and use the character's power. Ideally you wouldn't need to select the actor first, but let's walk before we run. I've got a little amateur experience with JS. How do I call the "button" in the item in a macro?
Hi I want to do a lookup where I have within a dynamic table a lookup of fourskills (Say Close Combat, Ranged Combat, Heavy Weapons, Calesthenics) which are matched to a skill value stored in as seperate table and triggered as a roll (so click button IF SkillColumn==CloseCombat Then Roll (CloseCombatSkill) am I dreaming ?
Then you probably want to use fetchFromDynamicTable(), first() and ref(). https://gitlab.com/custom-system-builder/custom-system-builder/#421-fetchfromdynamictable, https://gitlab.com/custom-system-builder/custom-system-builder/#422-first, https://gitlab.com/custom-system-builder/custom-system-builder/#424-ref
Example:
Dynamic Table <Skills>:
Skill <Name> | Value <Value>
-----------------------------
Close Combat | 1
Ranged Combat | 2
Heavy Weapons | 3
Calesthenics | 5
first(fetchFromDynamicTable('Skills', 'Value', 'Name', 'Heavy Weapons')) would return 3.
OK I see what you did there - My fault -I have a dropdown in the Variable Field (4 Choices as above) in the dynamic field (selection of four skills) When I click on the Roll Label - I want it to trigger a different label based on the value in the variable field
You could try dragging the Button in the macro bar. If i remember right with Label Roll this works.
Other than that writing such a simple macro should Not be that hard. Depends pretty much on the amount of fields you need for the calculation and where the information is stored.
Yeah I think I have realsied I can just get the players to provide the detail when they roll and it meets all of my requirements - which is all I need really
I'm using a formula to roll a rollable table from within foundry - <td>${[#DamageTable|(1d10 +:DamageModifier_Score:)]}$</td> Gets me Result Details - is there a simple way to get the roll value as well (for instance Roll 12 -- Result Details_)
<td>Roll: ${roll:= [1d10] + DamageModifierScore}$</td>
<td>${[#DamageTable|:roll:]}$</td>
it is not often I get angry while playtesting (not actually playing) but I have a character with a giant warhammer and he somehow rolled all 1's on d8's
Probably fairy sized 🙃
I am trying to have some text only be visible when a certain selection on a drop down box is made. (So for example if I have a drop-down with key "droplist" and choices of "option1", "option2", and "option3". Let's say I want to be able to choose "option1" and have related text to that option appear once that's chosen.) Is there a way to do that?
That sucks! Better luck on future rolls <3
I understand how to make text only be visible in certain instances. The piece I'm missing is how to reference a certain choice in a drop box being chosen
equalText(DropdownKey, 'TextToCompare')
Thanks!
Is v11 support coming this month?
We´re missing 1-2 features (and some bugfixes) for this patch (which will be for V10). We plan to update to V11 after the coming patch. So we might release the update this month but no promises from our side. There´re just too many unknown factors.
I installed beta RC4 and started up 'a new world' using it and when I try to open the template it looks like the Beta points at regular foundry folder and not Beta... do Both need to be installed or is this an issue?
Usually not, the beta-system is basically an own system.
I remember for the previous BETA I ended up renaming the folder and making some changes... And you had said:
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)
Maybe the fix did not make it into the RC4?
The fix actually made it through. I don´t get the error when opening Item Templates now
Maybe it is a me thing... I'm gonna clean up a little and try again.
If you happen to find the issue, let us know
Similar to last time I only got things to work once I had an install of the Beta & a 'copied and renamed' folder without the Beta so it can go there looking for the files
I have no other CSB right now just RC4 and a second copy of RC4 with a different file structure so the original copy can go lookign there for the stuff
So I have a hidden Rich Text Area (set as {item_text} )I am using as an edit field on a template, and on the public display area it is called by a Label using {item_text}
Is there a way to have a roll script, [[/r 1d6]] for example, that works from the Rich Text box I have hidden for GMs eyes only, show and work once it translates to the Label the players see on the item card?
Or a better way of putting it is, can I do a roll function in Label text (not label roll message) like you can in Rich Text?
I'm trying to export some sheets and items to share with folks and I keep running into the same issue. I export the .JSON file, create a new world to test them in, and import the .JSON. The character sheet templates work in the new world, but the items won't. The item template won't populate with the item layout or fillable boxes, they'll just have the starting buttons as if I'd created a new item template.
Anyone have issues like this in the past? Or is there something that I'm overlooking when I'm exporting the items?
Character sheets seem to be working just fine. I'm only having issues with the items.
Okay, I'm having a hell of a time creating a script macro to alter a Number Field on a sheet. Does anyone know how to do this?
Say I have a Number Field on the sheet of the selected token called "txtHPCurrent" and I want to create a script macro that changes it to contain just the number 5. How would I do that with CSB?
I'm a hobby programmer, but I don't know any JS so I'm sort of winging it with Foundry. Currently I'm at canvas.tokens.controlled[0].actor.update({"txtHPCurrent": 5}) but it doesn't seem to be working. Anyone know what the heck I'm doing wrong?
Oh my god, thank you! I appreciate it!
For those of you with more developed sheets, could I see what your sheets look like? Preferably the top the sheet where stats and the like are displayed, along with attack/spell sections (if applicable). I'm curious to see what other people have going as an example.
Oh and roll messages
Is in german, but has everything you want
So, I'm trying to get some text to be visible dependent on what is chosen in a particular drop down box. I asked here yesterday and was told that this would work:
equalText(DropdownKey, 'TextToCompare')
However, it's not working. I was wondering if either/both the elements being within the same panel might be causing issues for some reason or if there's potentially another issue?
It does make the text not visible. It just doesn't make it reappear with the 'TextToCompare' is the option chosen
Thank you, was looking over it, looks very nice
Is there a way to reference a roll in a label on an item? Sheetroll gives me what I need for rolls on the sheet itself, but I'm not sure how to access rolls on the items in an item container.
question when will CSB became compatible with foundry 11?
There is currently no way for /sheetroll to access rolls in Item Containers
Can you provide a screenshot of what you have?
Try to import them twice. Otherwise check the console (F12) for errors.
I wasn't sure which piece you wanted a screenshot of, so I did the internals of both and the external view of the panel. I've tried some different iterations on the visibility formula for the latter internals picture. (But what I shared was the first one I tried and what I thought was the closest to the equalText(DropdownKey, 'TextToCompare') formula.)
In this case, your formula should be equalText(markedNov, 'markedNovOptB'). The reason behind this is that your dropdown returns the value of your key, not the Label. The Label is only there for visual purpose.
Weird, I thought I'd tried that combo but it's working now. Thanks so much!
Hi. Is there a way to create "dependencies" for checkboxes? As in: you can't tick box 2 without first ticking box 1. Or alternatively: If you tick box 2 while box 1 is off, then box 1 will automatically switch to on as well.
Same thing the other way around ideally.
Nope. We also don´t have Radio Groups (or the functionality of that) 🙃
Welp. It would have been neat but it's not critically important =p
thx anyway
The next best thing I´d take would be a number field with a max-value.
That was my fist approach. then I tried being fancy x)
Is there a reason for that, I'm curious?
Well... let´s say it´s priorization.
Can you hover text/text on mouseover (like you can in an html doc) within a label?
As in for a specific point on the label, not for the entire thing
That's fair enough.
You can define a tooltip-text for every component (right under "Component key")
Seaking of which...
Each time I set a tooltip abd go check the result on the sheet the text does not show, like it is refreshing every other second.
Thoughts?
Yeah I knew that. I just realized that was kind of a silly question though cause I can just make different components for the things I want the different hover text for. Thanks Martin
That´s not normal. It should look like this if you have a tooltip defined:
Are you checking it on an Actor? Because it is pointless to do it in the Template 😅
This or you add custom HTML in the Label.
Oh, ok, cool. :)
Actor, sure enough. I'll check again, just in case 😉
I'm getting an error message "Maximum object expansion depth exceeded" when I move a specific panel. I thought it was too full of stuff (it contained 4 dynamic tables with dropdown lists) but even once I emptied it I'm still getting the error.
EDIT: still don't exactly know what the problem is but tabbed panels don't like to move apparently.
I had a tabbed panel under the panel I wanted to move. The tabbed one was moving simultaneously since it was under what I was moving.
I should maybe also say I can't make any changes to the template after the error untill I refresh the game
Ooh, I didn't realize that was available. Cool!
I'm trying to set up an inventory system where each item has a text field called "txtLocation" and each character has a text field called "txtContainer2" and, if they text fields match, this label will equal 1, otherwise it's 0. This doesn't seem to be working, though:
${equalText(txtLocation, getPropertyDataFromActor("attached", "txtContainer2")) ? 1 : 0}$
Anyone know if I'm just missing something here? Whenever I use getPropertyDataFromActor for attached, it always gives me either an ERROR or just blank return.
Show me the full error message. My guess would be that the template file is corrupted
here
I included screenshots in case they're helpful :)
So, it's pulling through the associated key from the dynamic table correctly. I'd like to be able to have it show the label though. Is there a way to do this and/or is it possible to tell it new labels based on what key it pulls through?
I've found that dragging a component above the tabbed panel causes no issue but after that any movement of the tabbed panel seems to trigger that message and the need to refresh
I mean the console error.
attached does only work on Items, not Item Containers. It is used to get property data from an Actor to an Item.
sry very new to all this but I guess this was what you wanted =/
Yeah, that's what I'm trying to do. That line w/ the equalText is located in an item that is attached to a character. I even tried just creating a label on the item that was just ${getPropertyDataFromActor("attached", "txtContainer2")}$ and it just comes up as a blank, even if I change txtContainer to something else on the character's sheet.
(BTW, I see that you're dealing with like 3 people right now, so I can wait if need be, haha! We all appreciate your help!)
Send me your template file. It´s probably an issue there.
The issue is that you can only retrieve keys from a dropdown list. That´s why Key and Label should be the same in most cases.
Poking around, I've found that ${getPropertyDataFromActor("Dave", "txtContainer2")}$ will work perfectly fine, it's just that when I try to retrieve with "attached" I'm getting empty string returns.
(this is on an item that IS attached, by the way)
I had this case with someone before but we were unable to spot the issue. I don´t know why it´s not working for some people
Damn. Alright, thanks!
I could try some bughunting, but I´d need access to a world, where I could analyze the behaviour
I'm kinda just doing a suboptimal workaround at his point, but if you want to bughunt for your own sake I can send you my world.
I think hosting would give better results, but we can try that first
I just sent you the world file if you wanna poke around.
${?{gold}}$ On something like this any idea how I could get the GM to enter the ammount? I'm thinking of having the GM have final say when players sell something.
Is there a way to have damage rolled from the 1d6+2 format? Like if I have a text field where that can be input, for instance, is there a way to make it roll 1 6-sided die based on that?
Also, can I do and-statements/or-statements in the visibility formula (like, for instance if it were D&D and I wanted the spells section to show up on the character sheet if a person were any of the caster classes)
Conversely, is there a way to say not such and such in the visibility formula?
Would be ${[:textFieldWithRoll:]}$
and/or are keywords, which can be used directly. For example: ${equalText(myClass, 'Druid') or equalText(myClass, 'Sorcerer')}$
sorry I got busy with other things, but here's the file
I´ll look at it later
np
So I'm trying to tell it to not show certain elements when a particular class isn't chosen, even if the player multiclasses. There's 2 different drop boxes, 'class1' and 'class2', and then I want an additional drop box to be visible if they choose 'Envoy' for either of those.
The problem I'm having is that either the additional drop box never shows up or it's there constantly. I've tried a few different things, but I think my issue is potentially the connecting word between the 2 parts? Idk
This is the formula I've been using (though I've tried some different variations, none of which seem to work):
not equalText(class1, 'Envoy') and not equalText(class2, 'Envoy')
I think not is not a keyword, so you have to use not() instead
so like: not(equalText(class1, 'Envoy') and equalText(class2, 'Envoy'))?
yeah
Hello @hearty zinc . I'm the author of the wiki tip.
It works for me by using a rich text in the label, via the "source" icon.
Hi Is there a way to trigger a formula off the back of Equal text, Specifically IF X=X then Calaculate A+C Else Calculate B+D within a Label
${equalText(textField, 'X') ? A + C : B + D}$
Yep just worked it out from an earlier post
Hi again. Is it possible to add a user input to an item modifier? I'm making disabilities but some of them only apply on conditions.
This would be comparable to 5e dnd's 'keen smell' or 'keen sight' only giving their bonus if the skill is used while relying on those abilities' respective senses.
Conditional modifiers will be part of the coming patch. It's not implemented yet.
Neat! Though I guess I'll have to be patient for a bit =p
Ok I can't see what i am doing wrong ${equalText(DropDownList, 'Gold')?Strength_Score+Wounds_Score+Melee_Score:Agility_Score+Marksmanship_Score+Wounds_Score}$ Is it that there is a silver option in the drop down?
The first one appears when I select Gold the second one does not appear when I select Silver
The second one should appear if your current selection is not 'Gold' and your keys are valid.
I'm an idiot - I had the hidden value still activated - ignore sorted now
I´m able to load this template without an issue (atleast with the current beta-version). It might be an issue elsewhere
well the template works fine for me as well ... mostly. As I said the error message only shows up when I tried moving the tabbed panel
I´m also able to move it around freely
yeah just tried it again. If I try to shove a panel above the tabbed panel I get the error =/
I managed to work around it tho
If I move the Panel from the "Background/Backstory" above the Tabbed Panel, it just works as intended
weird. Like I said I found a workaround anyway so it's not a problem
uhhhhhhh. I just checked the template file. You´re running V11. That´s the issue
oh? well I guess it was working perfectly apart from that so I never even thought the version was a problem ...
V11 didn´t introduce many breaking changes (like V10 did), so it´s kinda expected
I also don't really know what difference there was with v10 since I got foundry after the update
Can you do if statements within formulas?
I'd like to tell modifiers to do certain things if certain checkboxes are checked, but I'm not seeing anything about that in the readme.
So, like in d&d, for example, players can choose proficiency in certain skills. So in that instance, I'd want the player to be able to check a checkbox and for the formula to include the extra +2 only if that box is checked.
https://gitlab.com/custom-system-builder/custom-system-builder/#43-conditions (spam-pinging questionsmarks)
Can Minimum Value of Number Field contain a formula or a conditional? I can't find this info...
https://gitlab.com/custom-system-builder/custom-system-builder/#33-number-fields
Minimum value : sets the minimum value (inclusive) accepted in the field. This can be a formula.
Thanks, found what I was looking for 😉
Once Again can't see the woods for the trees - What's wrong with the following syntax (its returning an error) ${[(sameRow('WeaponBonus')D6CF=1cs=6)]}
You´re missing colons
Fark - Thanks
Ok, so I was able to figure out how to use that in one instance, but then I copy-pasted the formula into a few other places (and changed the keys accordingly), and now those places are not showing anything. I've put a screenshot of one of the the dynamic tables it's happening in and the internals for the bonus column, where the issue is happening. Let me know if other screenshots would be helpful though. I'm not sure what's actually needed to figure out the issue, but I'm out of ideas
Can you paste the whole formula?
And a look at the console (F12) might be helpful to spot the issue
Oh, sorry, I didn't realize it didn't all show.
${ sameRow('arcFocDoub') ? '+4' : sameRow('arcFocCheck') and level>=11 ? '+3' : sameRow('arcFocCheck') ? '+2' : '+0' }$
I don´t see an issue. What does the console say?
Which section of the console am I looking for?
Press F12 and switch to the console-tab. And then search for errors (red).
Huh. nothing
Yeah, weird right?
That´s indeed weird... What browser are you using?
Chrome, but it's an older computer
Let me see if it works on a different device
Yeah, I dunno. There's some stuff about Fetch API being able to unable to load and ensuring CORS requests are made, but it doesn't seem like anything relevant. If I figure it out I'll let you know what I did, lol
Hey, sorry if I'm interrupting but I wanted to quickly ask if it's possible to use a user input prompt in an active effect. I'd like to have a stat lowered by a variable amount whenever I trigger the Weakened state, but it's dependent on another character's stats so it'd be most convenient to just input it myself manually.
Sorry if that's a repeat question, I quickly searched through some messages and didn't see what I was looking for, but I might've missed something
The next best thing you could do would be to create a Table with the Effects, where you can enter the amount of stacks an effect has (if it is that what you want). This way, you´d be able to use this number field in the active-effects-modifiers.
Unfortunate, but thank you so much for the answer. I'll probably do it that way then.
Otherwise, to answer your question, no. User input can only be done in formulas, where rolls are allowed (only Label Roll Messages).
So I did get it to work, but basically I had to add it line by line and save after each instead of inputting it all together. No idea why that was necessary, but at least it does what I was trying to get it to do now :)
Is there a version compatible with Foundry V11?
Not yet - worth checking the project site for details
Okies one last Format of Functon question - I am trying to create a nested equalText Function and I am sure I am stuffing up the syntax here is the code snipet ${equalText(sameRow('WeaponSkill'),'CloseCombat')?Strength_Score+Wounds_Score+CloseCombat_Score:equalText(sameRow('WeaponSkill'),'RangedCombat')?Agility_Score+RangedCombat_Score+Weariness_Score:equalText(sameRow('WeaponSkill'),'HeavyWeapons')?Strength_Score+HeavyWeapons_Score+Wounds_Score:Strength_Score+Callesthenics_Score+Wounds_Score}$
What wrong with the above
That's too big... Divide it into smaller parts and test these. You can use the Label prefix for that.
Actually ignore - the code snippet worked perfectly when I remembered to put it in the right field
I have been loving this system, so I thought I would share a little of what I am making for a small group I do games for.
Ohh lots of Item use I see - nice work man
That looks great Nathan!
Is it possible to pull information from items into the actor sheets? For example, if I make a table of information about spells there, can that be used to create a dropdown box of the spell names in a dynamic table on the player sheets?
How would I go about getting an actor if I have the actor.name?
Is there an equivalent getActor(canvas, actorname) to the getItem(actor, itemname). I see there is game.actors.get(actorID) but can I pass actor._id to a macro like I could pass actor.name?
Hi. New to trying to use Custom System Builder, and I wanted to check out some of the templates from the sheet-library. Since I am familiar with M&M 3e, I downloaded those, and then I tried to use the import json template button to import them. Nothing seemed to happen and console shows an uncaught error: dialog was closed without a choice being made. I host on Forge-vtt.com; I did upload the .json into my forge asset folders, and when I view file from there, I see code that appears the same as when I view the .json in Visual Studio (though I didn't compare files specifically). I'm not sure what's up - if this is a block Forge-VTT has and I should contact them, or if maybe there's another issue more related to the custom system builder install? Ideas? And thank you. This toolset looks great, just have to figure out how to use it. 🙂
This is the sheet I'm currently working on but I'm not building this as a final sheet, it's the way I'm testing the RPG system that I'm designing, so it's not nicely formatted or anything beyond doing my best to make it readable for game testers. Once the actual game systems are starting to become more settled I'd do a lot more cleaning up the format and character sheet design.
It would be game.actors.getName(actorName)
Thank you!!
Just wondering if my question from earlier had been seen?
You can use an item container that displays a specific tag like spells and a bunch of things about them but to my knowledge you can't pull that data into a dynamic table
I don't understand the item containers. I've tried to use them, but they make no sense to me
Each column in an item table gives you the opportunity to pull data from the attached item in it's row using ${item.keyyouwanttopull}$
or you can use the item modifiers to force changes on things that they are attached to, and can simply use labels that communicate those changes if you don't need them on a row by row basis
I'm not sure if this is a CSB thing or just foundry, I've asked for help in the general chat as well, but just in case I'll ask here as well: I've been having issues with text fields on items not updating, is there some trick to this or known solve?
Not updating in what context?
its a simple trick but I have found selecting a different defualt sheet seems to do the trick when I import
How would i set a dice pool to a max value of dice (so if I create a pool by combining the value of a stat + Skill, but I am only allowed to roll a maximum of 5 dice)
I'm thinking of a conditional, like if stat+Skill >=5 then 5 .
Seems legit
like this (stat+skill)>=5?5:stat+skil.
Yes, that's the correct syntax.
Yeah nice works well
I can then roll the remaining dice (its to create a split pool) By doing stat+skill-5
How about ${min(stat + skill, 5)}$
Neat 😉
Yeah that would be more elegant and easier to maintain
ahh I'll need a max version as well ${max(Stat+Skill-5, 0)}$ as it won't roll if the second remaining dice pool calculation has a negative value
I think my uploaded M&M3e template is out-of-date with the current CSB version
I should submit my more up-to-date one
Is there already a beta version for Foundry 11 ? and if so how can I refer to it ?
like I try to update a value of a text field in an item, and it reverts back to an older value in that text field. There is no default value for the field.
I don't know if it's for foundry 11, but there is a bit of info about downloading the beta version in the beginning of the readme.
Have you tried reloading the sheet? Sometimes I run into issues like that and they work better after I reload or log out and back in
yeah, reloaded the sheet, and refreshed the server, no love so far
Did you check the console to see if there are any errors?
no errors, it just doesn't seem to save the new text
The only other thing I'm thinking is maybe you're trying to put in text that's not allowed? Like putting non-numbers into a number field or you specified text characters that can be used and you're using something not on that list
Is there something wrong with this syntax? I'm putting this on a label roll message contained in a tabbed panel/table on a character sheet (It's not on an item). Basically calling the macro MEGSActionRoll with the argument of the actor's name (so that I can get the actor object within the macro using the syntax: let actorActive = game.actors.getName(actorName);
${!concat('/amacro MEGSActionRoll ', '"', actor.name, '"')}$
I am getting this error:
Uncaught (in promise) Error: Uncomputable token actor
[Detected 1 package: system:custom-system-builder]
Is there documentation for the get commands? I've seen a lot of people using them
Hello
I don't know how to fix my problem :
I have several Label which are used to get a value "armor" (for instance, an armor give 2d6 damage reduction, a shield give 1d8 and a helmet give a flat +4). the formula I use is :
${equipement_porte == true ? de_ra : '0'}$
Where equipement_porte is a checkbox to choose if the character is wearing the armor or not, and de_ra is the text field.
I can assign a text field to an item modifier with "=" to the Label, which are then concat to give something like X + Y + Z and then I can roll it.
Everything is fine, except when I give 2 armor to a character. At this moment, the 1st armor do not modify the field, even if "wear off" the 2nd armor before. All the other modifier concerning the 1st armor still apply.
use it like this : equipement_porte?de_ra:0
Question for the community: have you ever done anything with cards?
is there any Custom System Builder functionality that works with cards?
Are cards just like the vestigial apendeix of Foundry VTT?
I am using an add on module which does cards for initiative
When will CSb become compatible with foundry 11?
Say. Is there a good way to call up a dynamic table multiple times in a formula using dropdown list? more specifically I want to be able to create combined skill checks where I might ask my player to roll multiple skills in a single roll (as in add all modifiers to a single roll).
I was thinking of using a dynamic table with dropdown lists inside of it. That way the player can just add rows to add dropdown lists but I can't think how I could make the formula work to call values selected by dropdown lists inside a dynamic table.
If anyone has any advice on how best to accomplish this I'd appreciate it.
I AM NOT A DEV but I have seen them say the Beta needs to go Mainstream, then they will do the update to 11 and they think and hope that part is really easy based on other peoples comments.
Well, there are some answers from us above in the channel. To be short: We´re still developing for the next patch, which will be the last before V11
@minor atlas @snow locust @wraith tendon
I got Item Piles to work here the file path you wanna use minus the last bit because those are my values
I saw you all asking 'how to get it to work' when I was personally searching how to get it to work.
I can now have stores and stuff.
Here is an example again with my own dumb system
Don´t think so. The issue is that you cannot do loops in CSB (in this case foreach)
Sweet, thanks! I'll try this out!
First of all I'm very sorry for the long explanation but I thought background would be important:
I was working to rearrange the layout of the columns in the 4 tables in the middle of the sheet (see pic below). I had first renamed/rearranged some of the keys; tables 1, 2, and 4 had no issue with this, but I couldn't figure out why the system thought I was already using keys elsewhere that I wanted to use in table 3. Confused, I then added another column to this table and discovered a whole hidden column of number fields with the keys I was trying to use. I apparently changed the columns in this table a long time ago, (I've been fighting with is sheet for some time) So I deleted again these boxes by first emptying the fields in them and then removing, hoping that would free up the keys I wanted. It didn't.
Then I rearranged the columns of table 3 how I wanted them to match 1, 2, and 4. At that point, the columns of table 3 weren't lining up with the others even though I checked the left/center/right justification settings were all matching. So then, and this is where I fucked up, I thought to copy/paste the whole table to the bottom of the sheet to see if anything else weird or hidden would pop out with more room. (Look, I'm not a programmer/coder, my brain doesn't think about what I now did) I realize now that basically forced the use of matching keys in the 2 columns throwing the error.
In my panic I then deleted the copied table from the bottom of the sheet hoping that would fix it. But it didn't because apparently deleted things aren't actually deleted?
All this explanation is to ask how I can really delete all of the stuff in the system I thought I had deleted, not only old components from the actor/item templates, but also all the old full sheets of characters and items I got rid of because I wasn't happy with how things were going? Like I said I've been slowly trying to build this system for many months, there is probably a ton of crap hidden.
Again sorry for the novel of text.
Nice work!
What you're working on for the next patch is the stuff listed in the documentation in the roadmap right?
Continuation from above, attempting to fix anything gives me this error:
And this is what it looked like before I copy/pasted the table. I was trying to figure out why the columns weren't lining up. I managed to get this pic when I exported my template from my Forge world to my desktop app world. For some reason it works fine here, maybe because the hidden (deleted but not really deleted) phantom table isn't in this version.
Does it support do…while or while…do?
Any kinds of loops are not supported
Yeah
You could have a look at your export-file. At least the data there cannot be hidden 😅
Has CSB overwritten the default values for conditions? I ask because Monk's Bloodsplats has never worked for me, and Find the Culprit said it was a bug in the core software. This was verified by a mod in Monk's discord that said none of the custom systems are supported. If they happen to work, they work.
I have not looked at the blood splatters but CSB does system.props.yourstat and I think it is the only module with props
I could, if I knew anything about what I was looking at. 😛 It doesn't look like it contains anything abnormal but I honestly have no idea. Can you confirm that the two errors I posted are in fact what I've described happened? Where are deleted things being stored? Why are deleted things still existing? Is there a way to get rid of them? I'm sorry for all the questions, I know you are super busy.
can anyone help me please ? I can not INstalled the Beta for Foundry 11
can anyone please send me the Link for installed ?
https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta Keep in mind, that the beta doesn´t support V11
There are some things I should mention:
- If you define less rows or columns a Table had previously, then the excess rows/columns are getting hidden. They´re not getting deleted
- Deleting a component also deletes its´ child-components (deleting a Table would delete all its´ contents). They are not stored elsewhere (except in the history for
undo/redo-operations) - The errors are saying something else: You are trying to do mathematical operations with non-numbers (for example:
3 + text).
Is there something wrong with this syntax? I'm putting this on a label roll message contained in a tabbed panel/table on a character sheet (It's not on an item). Basically calling the macro MEGSActionRoll with the argument of the actor's name (so that I can get the actor object within the macro using the syntax: let actorActive = game.actors.getName(actorName);
${!concat('/amacro MEGSActionRoll ', '"', actor.name, '"')}$
I am getting this error:
Uncaught (in promise) Error: Uncomputable token actor
[Detected 1 package: system:custom-system-builder]
The additional quotes are unnecessary
${!concat('/amacro changeItem ', item.name)}$
So I can use actor.name instead to pass the name of the actor of the sheet this item is on?
Well. No
Sorry it's not an item, it's just a component on the sheet
There's a label on the actor sheet that has a roll message and I need to pass the actor name to the macro
There´s no way in CSB-formula to access the actor-name.
Only option would be to make your own name-field
But why do you need to pass the name? You can get the actor-context in the macro itself
So what I want to do is in the macro (accessed from the roll message) to be able to access the actor object as a whole
Okay that's what I need to do, I assumed I needed to pass the actor into the macro
I don't want to require the token be selected in order to determine the actor (Which is what I do on another macro). Is that still possible without passing the actor?
You could do this:
let actors;
// Get the selected tokens. Default: currentPlayerActor
if (canvas.tokens.controlled.length > 0) {
actors = canvas.tokens.controlled.map(a => a.actor);
} else {
if (!actor) {
ui.notifications.error('Make sure that you select atleast 1 token or that you have a configured actor');
return;
}
actors = [actor];
}
This would give you an Array of selected Actors (or the configured Player-Actor)
I can't require the token be selected
(or the configured Player-Actor)
Thanks. I think you helped with that code for another macro. I don't believe I realized it would access the current actor also. Thank you
I also have a more complex one:
Is there something specific that needs done to make an actor configured? I'm trying this and I'm getting the error message when the token isn't selected even though I have a character sheet open and clicking a label message on it.
The player list at the bottom left
Oh that makes sense! Thank you!
So, if this macro needs executed by a GM on possibly many character sheets and the token requirement isn't possible, this may not work?
Yeah, you´d need to find a different way (e.g. determine which Documents the GM has currently opened)
nods That was the original intent of passing the actor name into the macro and using the getName(actorName); method
Wish the actor name was available to pass in a label roll message
Alternative question: In a label roll message, can the execution of a macro be somewhere in the middle of the message?
<h3>Accuracy: ${!accuracy + av_mod}$</h3>${!accuracy_subskills}$<br/>Roll: ${!concat('/amacro MEGSActionRoll')}$</br>• ${!accuracy_trained}$
Or does the /amacro always need to be the only thing on the line? I'm not getting an error but the chat message just outputs /macro MEGSActionRoll to the chat and doesn't run the macro. I didn't know if I had the wrong syntax or if that's not possible
Well, it is basically a regular chat command. So you´d have issues using it in a full Label Roll Message. Handlebars-templating might help a bit, but it also has its flaws https://github.com/mclemente/fvtt-advanced-macros/tree/old-v1.19
Thank you!
I noticed that there's a window freeze for a split second when you update something on a sheet as the sheet rebuilds itself, which is perfectly fine, but it seems to get longer and longer as I play for more until I close and restart Foundry. It gets up to about 1 second to 1.5 seconds at the worst, so it's not horrible, and it's solved by restarting the application. I'm just wondering if it's something I'm doing wrong, or if it's normal.
Sorry to go back to an old subject, but I still have that refresh issue on the sheet 🤷🏻♂️
If I import my part template into server, and make new character sheet and it won't open after refresh from empty, does this mean the sheet is loading?
I'm in so much pain to make this and will litearlly thrown myself into swimming pool and float for hours if this mean it's glitch somewhere
This is normal and seems to depend on the size of your template (amount of values in the sheet), the power of the server, the internet speed and the power of your PC.
The worst condition that I (self hoster) have counted was 15 seconds after done a value change to be able to make the next one. 😔
(measured with a stopwatch)
I had 17 sec 😅
Thanks, lol! I didn't know if it was something I was doing wrong. From a novice programmer perspective: Can I ask why it gets worse the longer your game goes on? Is it a memory leak thing, or is it more like it's reloading everything you've looked at this session?
There shouldn´t be a memory leak tbh. The performance shouldn´t even degrade. The only way the calculation time should increase is by having more stuff on the sheet (or more actors to be reloaded)
Weird. I've definitely experienced an increase in the reloading times the longer I keep Foundry open.
Hey-hey!
First of all - thank you very much for creating this wonderful toolset, I'm having a blast using it.
I have a specific question tho, maybe somebody can help me. I found out how to use data from an attached actor, to make items act as the skills, with the help of item modifiers. But now I'm searching for a way to transfer calculated data back to the corresponding item sheet, to reflect calculations happening on an actor sheet.
To put it simple - is there a way to set a value (as an item modifier), transfer it to an actor, perform calculations there and get it updated back on the item sheet? Sounds like it's a lot to ask, but maybe I'm missing an obvious solution due to my lack of coding experience 🙂 Maybe a totally different approach is required here, I'm not sure, tbh.
Hey folks! Finally found this channel. There are a good number of games unsupported by systems, so I figured it was high time to start trying Sandbox, this Custom System Builder, etc. Thus far, have been liking this system to attempt to build out something to use to get my game data represented. But I have a question regarding the panel type. I was hoping to arrange stats in a vertical panel along the left edge of my sheet, then to the right of that, introduce a tabbed panel to allow folks to tab through various panels that contain subsets of the other character data. In defining my stat panel, I’ve selected the vertical option to the alignment, but when I add text fields to the vertical panel, the panel seems to want to take the entire width of the sheet, and then the stat entries still arrange in a horizontal fashion. If the panel is configured for vertical, why is it doing this? And is there any way to “resize” the panel so that it is not taking up the entire width of the sheet? Say I only want the panel to be vertical, and to be medium length. I don’t see any way to configure that.
I’ve tried dragging the stat fields above or below, makes no difference, they still realign horizontally, even though the panel is configured for vertical. Puzzling. 🙂
If the default behavior of panels is to take up the entire width, maybe I just need to change my thinking and and try to do this as a vertical 1 column table instead. But wanted to verify, is the default behavior of panels to take up the entire width?
Isn't there a 1-column option for panels? Anyway, from what I've seen, the size of the component in the panel dictates wether they stay on one line or not. The size of the panel itself kind of follows a similar rule, so it is, so to speak, limited neighbouring components.
Maybe try making components inside the panel a little bigger.
Ofc, using column options on panels the components stay in ech column, i forgot to say.
Take all this with a little caution, as my memory is as faulty as Bender without his floppy 😁
Unfortunately, when I switch to panel type, most of the configuration available that I’ve seen in other types is not there to choose and configure (i.e. there is no column option that I see). Maybe this is indicative of limitations of the panel type, as implemented in this system. Unless… let me try making a container panel, so to speak. And then see if I can drag the vertical panel and the tabbed panel into the container panel and make them play well together & force the right behavior…
In Sandbox, he called those multi-panels, and it allowed panels to reside side by side
Not sure if this has that functionality or not, but will try
I suggest have a look in the sheet-library. It helped me a lot to see how others solved there problems with functionality and arrangement.
https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/develop/sheet-library
I was actually remembering wrong, panels can have column arrangements, but they’d have to have at least two columns
I’ll take a look, thank you!
So, you can have container panels with various columns configured, and place other panels within them into the columns. I think This is the Way. Hah. Thanks for the advice, folks. I’ll configure a four column panel, I have an array of things to represent inside of that, and I’ll do the full width tabbed panel below all of that. I think this will probably do the trick.
I really don’t need that name field at the top of the page to be as huge as it is. I want name to be a normal sized field in with the rest of my PC’s biographical information, not taking up the whole top of the sheet. Any way to change that, that people know of? That’s a lot of wasted sheet space.
I remember that not being modifiable. Or CSS could be a way.
@formal goblet
"My wife is out of town so I'll eat shellfish and watch a ton of horror movies"
My dreams: all system builder and character sheets even after spending a whole day away from my PC.
I am a wee bit stumped.
I wish to display this as whatever is in "item.weap_type" as text.
As it keeps coming up as "error" when it should be coming up as "Blaster - Energy"
I changed that to "${ref('item.weap_type')}$"
Now it shows what it is meant to :D
Good to know.
I have to say, thank you folks for the help and thoughts, and thanks to the author for this system. This really helps one to nail out a quick sheet and get some system going when there is no system support, and I’m kind of surprised how quickly one can build out something to get playing once you wrap your head around this.
There was zero support for Covert Ops, and I’m already a good way towards getting a sheet knocked out for it. 😉
I’ll have to do the same with Rocket Age, etc.
Is it possible to call a macro from a label roll message (i.e., can you put macro calls in a chat output)?
(Or even JavaScript?)
Anyone else have this problem. I am trying this builder. I tried different version of CSB and both .10 and .09 Foundry but i keep having what appear to be a formatting layout issue.
that's normal, the first + icon is for the header of a sheet while the other is for its body
You issue was the unnecessary colons.
Ah, thank ye
What is a dynamic table? Are there any way to try to tweak the formatting (positioning of fields and such (left justify, right, center). or is that a tweaking with the CSS thing?
And spacing between columns and rows. And border lines between section in a panel?
I know positioning of fields can be set in each column, not sure about spacing or lines though
thanx. Playing with it more and getting the groove I think
Anyone see this? Entering text in a text field in character sheet I am building resulted in this error at the top.
Have you set the valid character option in the field settings?
How do you do that? I'm new
There is an option in the text field settings (open by clicking on the field) that says something like valid characters. Should be in the bottom section. If you input any combination of chars in there (not sure about regular expressions, though) only those chars will be allowed. Think you can check the system readme file for a better insight.
Hi all, I have moved to v11 and lost access to my Everway game. I thought CSB was v11 compatible, seeing how active this channel is. Did I miss a manifest URL change ?
Its not compatible yet, but you can do this in the system.json and it will work, didnt find any bug for the moment
THANK YOU ! 🙂
Given that my Everway sheet has no automatism, it should work fine...
How would one set up Automated Animations to work?
I wish for attacks to be animated, such as swing animations or blaster projectiles and such.
Actually, I may have found a different way.
I am using 3d Canvas so I could use the particle system + advanced macros to play them.
How I did that is this:
In the item, I have a "animation" bit. Within the quotation marks, in each weapon/item, I write the name of the macro I have made for that weapon/item. The image is what I have in the template
In the Roll area, I have this. I reference the animation key
For a blaster weapon, I have edited the Animation to have {{macro "Light Red Blaster"}} which plays audio and the particle animation I have made. Now, whenever I roll for damage with that weapon, it also plays that macro which then also plays the particles and sounds.
new Particle3D("p")
.from(token)
.to(Array.from(game.user.targets))
.sprite("images/weapon/projectile/red blaster bolt.webp")
.speed(10)
.repeat(1)
.delay(300)
.color("red", "orange")
.scale(0.5)
.start()```
What do we use the top "Configures" for?
First is for sheet size, second for attributes not visible to players but used in sheet stuff, third for attribs to appear on health/mana bars, next one I don't know.
Then again, reading the project site might help better 😉
If you use status effects, you can configure them to modify values automatically when applied.
And about the attribute bars: Don´t use complex attribute bars if you want to have non-readonly bars.
Could you elaborate a little?
Complex attribute bars use formulas to determine the current value and the max-value. These are derived values, they are not meant to be editable. If you want editable values, you should let the system generate an attribute bar for you by defining a number field with a max-value.
Thank you, very kind!
Can you "escape" \ characters for labels... specifically I want to us % for "% Chance"?
NM, i entered data into the wrong field
Hello how can I use a key who already exist in a dropdown menu in a new dropdown menu?
What do you mean exactly? To pass that key to the second dropdown or...?
So that the second dropdown choice depends on the first one?
So that the second dropdown value is equal to the first one
Haven't found a way to do that, sry.
That´s not doable. Either you can assign static options or make it dependend on a Dynamic Table.
I noticed with dynamic tables it does not seem possible to give the actual fields a key_name that increments. Or if it does, i am not sure how to get that information for performing calculations. Am I correct in my understanding that you can not use dynamic tables for such thing. Like adding up all the skill costs of a column. Or bringing in attribute bonuses to said skill via calculations?
And that we would have to use static tables for that?
- How should skill names even increment? You cannot just increment text like numbers...
- You can sum up all values within a column with
sum(fetchFromDynamicTable(dynamicTableKey, columnKey)) - If you want to use values within the same row of an skill entry, use
sameRow(columnKey)for that
I would not sum the names (Text Field) or perform any calculations. But single skill lvl entries in this list would apply to other things. And it does not look like i can not grab a specific lvl entry in a calculation. Correct?
(haven't actually tried this, just reading the docs) It looks like you should be able to use fetchFromDynamicTable to grab individual values, so long as they have some unique field, in your example
fetchFromDynamicTable('dynamic_skill_table','skill_lvl','skill_name','some_skill')
will grab the level of the skill with the name some_skill (returned as a single element matrix, you'll have to convert it to a number)
got it thanx
Hello, I wanted to know what's the problem in my code? "agi_for" is a keyword form a checkbox ${if(agi_for ? 'Checked'){ [1d:stat_for:] + [1d:stat_agi:]}}$
from the roll it just shows the code but don't roll any dice
CSB-formulas are NOT in JS. You can only use functions from CSB and the math.js-library (loops and lambdas excluded). If you want to use conditions, use the ternary operator.
So it should be:
${#roll_formula:= concat('1d', equalText(agi_for, 'Checked') ? stat_for : stat_agi)}$
${[:roll_formula:]}$
Ok thank you. Sorry for my questions, I try to understand the gitlab but it's not really that easy
I'm trying to insert in a rich-text field of an item (that will go in an item container) the reference to a value in the actor sheet. Is this even possible? If it is, how?
Hi, sry im a completely noob I'm trying to do one thing and I'm not getting it done.
When I click on a characteristic (label) I would like to get a dialog with three options "advantage", "standard" and "disadvantage", in the case of advantage make a roll of 3d10kh, standard 3d10dldh and disadvantage 3d10kl, I made a script, which works but does not perform rolls only gives me back the number in console, can I ask you for some help?
make the roll and plus the characteristic that are inside of a numeric field
atributtes, sry
Selections are currently not possible for user inputs. The user can only input a number or text. The next best thing would be probably this:
${#adv_mod:= ?{adv|0} - ?{dis|0}}$
${#roll_mod:= adv_mod > 0 ? 'kh' : adv < 0 ? 'kl' : 'dldh'}$
${[3d10:roll_mod:]}$
It checks if either adv or dis is higher and applies the corresponding roll_modifier. If both are equal (default), it will apply the standard-modifier.
How do I add a value from a dynamic table in a formula? I have my base armor and I want to add all the armor bonus the dynamic table gives
thx! , it was driving me crazy trying the selections haha
I read it already didnt found it
Then provide more details. I need to know more about your components.
I have a column with armor and I want to put every number in this column to add to my base armor value
That would be sum(fetchFromDynamicTable(DynamicTableKey, ColumnKey))
And it´s not really putting your numbers into your base-armor, it´s vice versa. You´re trying to get values from the dynamic table
OK thanks will try it
Maybe i missed this. Is there a way to import a CSV file that would have a listing of weapons with there costs and attributes... or a list of skills or powers to be used in the tables and drop down etc, instead of manually entering all that data into Custom System Builder?
Nope, no chance with CSV. And even if, you'd still run into the problem, that the data structure is very likely not the same. So you'd need to perfom some kind of conversion.
You would have a better chance if you convert it to JSON first, but that can still be a lot of work. Manually entering the data would be the easiest.
rgr... thank you. It is just a lot of work to do that. Thank You
There is no other way.
It's common that you spend around 90% of the total time for the transformation of data in an ETL (extraction, transformation, loading)-process.
Ok, thank you. I'm good with that.
If I have a list of skills and select a specific one. Would having a label with a chosen icon right beside the skill I select from a dropdown menu be the best option to mouse over and get a pop up of the full description of the skill I select?
Well.... how should I know if it's the best for your case?
Anyway, it's possible to define tooltips for components. The only issue is that these can only contain static data, so it would be hard if your description is dependent on a selection.
An other way would be to use Label prefix & suffix for custom-HTML and CSS (an example is in the Wiki). This way you have more options, but you also have more configurations to do.
Thank you
Trying to look at the already made sheets to look at the templates to see how things were made (sorry new at this). I saw the way to do it is to create a character sheet and import the JSON file. But it does not seem to be working. Do you need to do it inside Custom System Builder? Or do you need to do it within an actual launched game world of the same system?
did the Import templates json button in the settings page not work?
I'm just getting blank sheets. So I am going to guess it is based on an older version (1.x) of Custom Sytem Builder.
Well you could (i did it) get the .js File, look at the structure and then build this with concat in Excel. Then you got the whole Code for all the items and Copy/Paste it in the .js File.
But thats Not done in foundry of course.
Even older templates should not lead to blank sheets. Try to restart your gameworld. Sometimes the import doesn’t take effect without restarting.
Hello
I was wondering how to get the result "true" for a checkbox unchecked?
To be clear, I want to show a panel if the checkbox is checked, and another if it is unchecked...
not(checkbox)
Obviously 🫣
Thank you !
@vagrant hollow Ok yeah that did it. Thank you
Do you feel like the Beta might go main release this week? I have a game coming up on Sunday so figuring out if I need to get my GM on the beta or just wait a few weeks.
nope
All I need to know, I'll give my GM the choice to wait.
I will say using the Beta is the most hooked I've been on a project in a while and I adapted like 3 systems because it is so easy...
hey @formal goblet
do you have any idea why creating compendium items with a macro don't work as expected?
i got this function as part of the macro. the item it passes is an existing item from a compendium.
all seems to work (delete & create) BUT the new item is created with the old values of the item. i checked if the update has the right values with the console and yes it does. so any ideas?
async function openItemDialog(item) {
let itemId = item.id;
const names = Object.keys(flattenObject(item.toObject().system.props));
const content = names.reduce((acc, name) => {
return acc + `
<div class="form-group">
<label>${name}</label>
<div class="form-fields">
<input type="text" name="system.props.${name}" value="${getProperty(item.system.props, name)}">
</div>
</div>`;
}, "<form>") + "</form>";
Dialog.prompt({
content,
callback: async (html) => {
const formData = new FormDataExtended(html[0].querySelector("form"));
const update = formData.object;
const newItem = mergeObject(item, update, {inplace: false});
await Item.deleteDocuments([itemId], {pack: PACK_KEY});
await Item.createDocuments([newItem], {pack: PACK_KEY});
}
});
I have a dynamic table for equipments . am wondering how to specifically get the def of an equipment with the is_equipped checkbox checked. How should I go about it and is this correct?
fetchFromDynamicTable('equipment_table', 'custom_weapon_def', 'is_equipped', 'Checked')
hi! I have 0 idea how CSB works (actually foundry in general), but breaking my head with how this Fabula Ultima character sheet works i'm trying to find out why the ''Offensive Spells'' roll button doesn't works
A checkbox can only return true or false
i think it works correclty, but when i click the red die button it doesn't do anything
(here's the code)
<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('')}$
but it doesn't do anything shout in Colombian
You should use tripple-backticks for code 😅 https://www.writebots.com/discord-text-formatting/
Ups
But I can already tell that you cannot reassign a variable
how that it works?
I´ll do some cleanup first
@visual bridge there we go
<h2>${!item.name}$</h2>
<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(item.rolled_atr1,'DEX') ? dex_current : equalText(item.rolled_atr1,'INS') ? ins_current : equalText(item.rolled_atr1,'MIG') ? mig_current : equalText(item.rolled_atr1,'WLP') ? wlp_current : 0}$
${#dice2:= equalText(item.rolled_atr2,'DEX') ? dex_current : equalText(item.rolled_atr2,'INS') ? ins_current : equalText(item.rolled_atr2,'MIG') ? mig_current : equalText(item.rolled_atr2,'WLP') ? wlp_current : 0}$
<p><b>${!item.rolled_atr1}$</b> = 1d${!dice1}$ = ${D1:=[1d:dice1:]}$</p>
<p><b>${!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>
${!D1 >= 6 and D1 == D2 ? '<p><b>CRITICAL SUCCESS! Gain an Opportunity</b></p>': ''}$
${!D1 == 1 and D1 == D2 ? '<p><b>FUMBLE<b></p>': ''}$
lests see!
still doesn't wrok 😅
idk if is smth from the sheet
or the object
Open the console with F12 and check for errors
when i click it shows this
Uncaught (in promise) Error: undefined. Uncomputable token ins_current
[Detected 1 package: system:custom-system-builder]
at math.SymbolNode.onUndefinedSymbol (Formula.js:652:27)
at math.js:26377:89
at math.js:24865:43
at math.js:24866:43
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:657:27)
at Formula.compute (Formula.js:291:21)
at ComputablePhrase.compute (ComputablePhrase.js:127:27)
at async HTMLAnchorElement.<anonymous> (Label.js:239:21)
Is ins_current a valid key on your sheet? It seems to be missing
I think so? ilet me check the sheet config
it seems to be stat_base
Is there a way for a label in a table to reference it's own "label text" as an argument to a function?
Below is a screenshot. i'd like to pass the "Label text" (Accuracy) into the macro I'm creating in the "Label Roll Message" (Highlighted text). Ideally I want to do a regular expression to pass accuracy_trained and accuracy_subskills as well so that I can use the same macro 'text' for any skill and have it work without needing to hard code the skill name into the macro call.
😴 😴 😴 😴 😴 😴 😴 😴 😴 😴 😴 waiting for that CSB update so I can playtest my game in foundry 😩
yoo you are doing fabula ultima too hahahaha
and thanks! let me give that a try
awesome it works! ayeeee thanks again 😄
Ok next question. I am able to return the array of [2,3] from using fetchFromDynamicTable('equipment_table', 'custom_weapon_def', 'is_equipped', true). From the doco, I can use first() to access the first value but how do i do a for loop to add all the numbers in the array though?
Just use a function, which can aggregate values (like sum(), average(), median(), etc...)
oh ofc. sum! 😄 thanks!
Yea xD, trying yo figure how to make work a sheet i found because i'm a zero in the left if we talk about programation xD
Is there any samples on how to access item container data? Don't think I've seen them in the doco. So the idea is that I have an accessories item container (I know how to populate the container labels so this is not an issue). Players can drag items into it and the sheet should calculate def/mdef differences based on what is dragged in.
It's currently not possible to retrieve data from an Item Container. Use Item Modifiers instead.
What use cases would there be for Actor Sounds?
Hey, is there any way that I can have a creature generate random health when it is placed?
Also, how can I call an Actor Sound in a macro?
Nope, not with this system.
Sorry, how do you put picture on that
What do u mean?
Like the shield and stuff
Ah, i don't make the sheet, i'm only editing it to make ir works xD
You can insert HTML into Labels, which can take either Images or Icons
For example: <i class="fa-regular fa-check"></i> https://fontawesome.com/icons/check?f=classic&s=regular
Hello
Is there a way to sort item in an item container? (For instance, creating a spell list and sort by spell level)
Nope, currently not
I think I did saw a roadmap different (or more complete?) than here : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/ROADMAP.md
Is it a functionnality that you dev have in mind?
By the way, the possibility to be able to drag and drop item from sheet would be awesome (for instance, to trade stuff between actors !)
If you mean Feature Requests, they´re all here: https://gitlab.com/custom-system-builder/custom-system-builder/-/issues
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/113
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/110
You are awesome !
Thank you !
If I have a javascript function.. (I created a module and registered it)
game.modules.get("p-and-p-rolls").api.rollPandP(<number of dice>)```
Is it possible to make that call from Label roll message box? I an hoping I can make the call and just pass in the stat for the button.
It works from a macro..
game.modules.get("p-and-p-rolls").api.rollPandP(6)
I hoped something like
Agility: ${game.modules.get("p-and-p-rolls").api.rollPandP(agility)}$ would work..
Label Roll Messages cannot do API-Calls. But you can call Macros via Chat Commands, which can process your API-Call. So your Label Roll Message should contain a Chat Command to call the corresponding Macro.
So as I understnad it, I need to use the chatcommand module to register my script call, then just use that in the label?
(I am very new to CSB and scripting stuff)
The easiest would be /amacro "<macroName>" in the Label Roll Message
(with the Advanced Macros Module)
ok, neve used that module, I will look into it, thanks very much
Is there a way to customize the look and feel of the sheets like changing background of the sheets...etc. Maybe via html?
CSS it is! You can use a Custom-CSS-file for styling-configurations.
as far as i can tell the CSS customizations are on the components itself. How about stuff like the entire sheet background? Sorry not too sure where to start lol.
Every time I try to add something to a table, nothing happens and I get this error message in the console
Head to the game settings, configure settings, custom system builder area. There you can set the path to your own css file.
ok thanks let me take a look at that!
Is CSB compatible with 10.303 ? (Foundry just warned me, so I ask before breaking everything ...)
Seems to be fine from my first looks (and I don´t think that there are any conflicts as far as I can see from the patch notes)
Hi folks. My apologies in advance for a dumb question. Months ago, I used Custom System Builder to create a character sheet for Champions Now (an unsupported system). The sheet has been working fine, but I want to modify the template. My problem is that I can't now remember how to bring up the template for modification. Can anybody point me in the right direction?
You should be able to edit the Template directly
From the game that it's attached to? How do I open it? Do I create a new Actor and select "template"? That seems to set me up for creating a new template rather than editing the old one.
There should be a template-file somewhere in the actors-tab. It has the same name as the template you have selected in your Actor
Hmm...don't see anything like that in the Actors tab. I see two options: Create Actor and Create Folder. Clicking on Create Actor I get a box that gives me the option to name said actor along with a dropdown box that allows me to select between "character" and "_template". Selecting "character" allows me to create a new character. Selecting "_template" allows me to create a NEW template (not modify the one I'm currently using).
Are you sure you don´t have a template there?
Yeah. Here are two screen caps. One of my screen before selecting on Spitfire (the only character that shows under the "Actor" tab) and another of my screen after selecting Spitfire and clicking on the "Template" dropdown (which shows no options to select).
Well... You can try to recover the Template from the JSON if you export the Actor. Otherwise there is no other way because the actual template file is gone.
Just one important thing. Do not reload the Actor until you actually have the template restored
I have the templates saved in cloud storage. Do I just import them?
I'm pretty sure that it is. I remember exporting it at some point to save my work. (My apologies, but I'm not very good at this.) I just tried "Import Templates JSON". I selected the file and was told that it uploaded to my library correctly, but I don't see it expressed in my options when I try to create a character.
Can you try to create an Actor, right-click it and import it from there?
It doesn't seem to be working. I'm sorry, I'm being obtuse here. Thanks for trying to help.
Then try to recover the template from the actor.
- right-click and export the actor
- create a new template
- export the template-file
- open both .json-files and compare them
- edit the actor-file. It should have the same structure as the template file
- create a new Actor
- right-click it and import from the new file
Thing is, I think I screwed up and deleted the original actor (which you warned me against). I think I'm just going to have to recreate the sheet from scratch (although I'm pretty sure that I used those files I have saved on the cloud to create a new world).
Well... then good luck. I can´t help past this point
Thanks for trying. I really appreciate it.
The template lives! I had to configure the Ownership so that all players were owners before I could see it. I can see it and edit it now.
Wait, you didn´t log in as a GM? WTF 🤣
I DID log in as GM, but I couldn't see it at all. Maybe the ownership was defaulted to "none" and it just clicked when I selected "all players" on a lark.
Huh? But... you cannot hide it from GMs...
I don't know what to tell you. I'm definitely logged in as GM and I couldn't see it.
You didn’t restated the gameword after importing, but now you did it – eh? 😉
Ah. Might be... this bug is already fixed for me but you all are working on a different version...
Maybe! Whatever it is, I'm just happy that it's working now. Thanks, folks!
Hi when will coustom system builder become compatible with v11?
This question might have been answered before, but damn if I can find it!
How to ask users for rerolls? Macro only?
Macro would help. But there´s also the possiblity to define your roll expression in such a way, that it automatically rerolls specific dices https://foundryvtt.com/article/dice-modifiers/
The official website and community for Foundry Virtual Tabletop.
Thanks, alas I need users to be able to reroll any number of dice from 0 to the pool size. So a dialog is the way, I suppose
Thanks mate!
I'm quite stuck...
If i wanted to write a script macro to roll a certain dice poll and send it to chat, wuold this be the way?
let r= new Roll(<whatever>).roll(); r.toMessage();
if what you have there isn't working you might need to add an await statement
alternatively, if you just have a set pool you could probably get away with a chat macro instead of a script command
you'll probably get better help if you ask in #macro-polo though
Thanks, it now rolls something.
Problem is that I cannot set dice size in the script.
This is my code:
let r=await (new Roll("@dd6",{d: value})).evaluate();
Consider that value is correctly calculated.
Any idea?
I know, but here user input is required.
Thanks, I'll check.
Solved: it was "(@d)d6" 😁
Any idea why these two would raise an error?
${(item.skillWndsD<item.skillWndsN)?(/amacro "Reroll"):'Not usable!'}$
${(item.skillWndsD<item.skillWndsN)?([:(item.roll+item.skillDiceN):d6]):'Not usable!'}$
It is in a label of an Item Container and up until 10min ago it worked 🤯
Has anyone figured out a fix for phantom items being added to sheets that doesn't involve opening up the JSON and digging out the bad items? (I've been told to just check all templates on the item container, but that doesn't work if it's trying to pull an item template that's not in the game, which can easily happen when using shared compendia, etc.)
i think you could use a macro to delete items - but then you have to be careful to select the right ones
so you would need a way to exclude all items which you dont want to delete
maybe ask in macro-polo they are wizards
(/amacro "Reroll") this must be in quotes, otherwise the system cannot process it correctly.
Thanks a lot, did not notice that.
A little foresight of what will be possible in the future 🙂
I was curious if I can use this in V11? I see that it's usable with V10. Sorry for the dumb question.
They've not yet updated for v11 but it's on the list of things to do after the next patch is finished
Any chance CSB will support Monk's Bloodsplats?
It seems to only change the appearance of the token depending on the token status effect (dead/defeated). These functions are system-independent, so it should work (even without explicit support from CSB)
I thought so as well, but it very clearly doesn't.
I ran Find the Culprit and it came back with "a bug in your core software" and they told me that CSB likely changed the conditions from the default.
*they=the helpful people in Monk's discord
As far as I know, we use the default system effects. We only check if effects are present on a token to apply effect modifiers but I don´t think we´ve overriden the status effects.
What could be causing this error then?
Dunno. I´d need to check the module before I could give an answer.
But I also have to say, that we haven´t fully configured Active Effects for the system, so it might be because of missing configurations and such. But I can´t give a concrete answer on that.
I have a silly question, I made a blank label on a character sheet and what to remove it, but the box is not showing up. Is there anyone to get rid of it?
Well... this problem is already fixed with the incoming version. You could either wait or remove it by hand in the JSON-export file
I have a problem about rolling from an input. I want to be able to write a formula in a TextInput (let's say '1d6' and when clicking in a rollable label, for it to actually roll 1d6. So far I've only managed to make it show '1d6' literally in chat.
How about [[/r 1d6]]?
Yes, I understand that, it was more on these lines:
Where "damage" is the key of the TextInput
I've also tried [[/r ${damage}]] or [[/r ref(damage)]] with nothing showing on chat or chat showing literally the string "1d6"
@lament wadi Ah wait, my bad. I thought you wanted a clickable roll-button in the chat. If you only want to roll based on what you have in an input field, then it´s just ${[:damage:]}$
So this would be rollable in chat then? I have not needed it yet but been thinking a lot about including some re-rolls or something, thanks!
I'm facing an issue when using a Dropdown with connected Dynamic Table.
I have a Dynamic Table called 'dt0' with a few fields, one of which I'd like to see in a Dropdown field of items; thus I set up an item template (as per the first attached image), but when an item built on that template is attached to the Item Container in the sheet and I open it nothing is shown for the field...(see second image). Please keep in mind that the table has been populated with only one row.
Thoughts?
Dynamic Table and Dropdown have to be on the same template
Oh, ok ty. So there is no way to do what I'm trying to do, is there?
A hidden value with fetchFromActor('attached', "getRefFromDynamicTable(...)") (beta only) on the item template maybe?
Thing is, in the item the dropdown should show all the rows from the table and not just one because the item itself could use values from one skill or another depending on the situation.
I'm starting to think this isn not doable other than with a static table 🤷
Could it work with fetchFromDynamicTable?
Nah, only static keys are allowed in the drop down component
Oh well, I'm done for. Static is the way, I guess...
Thanks @formal goblet !
You can open a Feature Request for that if you want
Hm, did not think of that. I'll surely do. Thanks 🙂
Added : custom-system-builder/custom-system-builder#271.
Keeping on the same path...
Is this true for any other reference to Dynamic Tables made in an item template, that is not only from a Dropdown?
Oh nvm, just found out it is true 😉
**Beta version 2.3.0-rc5 is now available, with the following changes : **
Features
- [#205] Added possibility to retrieve the name of Actors and Items with the key 'name'
- [#233], [#242], [#251] Added possibility to include custom JavaScript
- [#271] Added ability to reference actor's dynamic table in an item's dropdown list
- [#170] Added more options to user inputs
- Added item image display in item containers in place of the briefcase icon
Fixes
Fixed issue with item templates modifier
[#264] Fixed import of Item Templates
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
beta foundry 11 rdy ?
Not yet. We will work on v11 once 2.3.0 is out 🙂
all my games on your System ^^ and i have updatet on 11 😦 xD
Here a small description of what has been changed since the last beta-update:
- Actors and Items now have the default-key
name. So if you need to display the Name of your Actor or Item somewhere, you can do it now with${name}$ - Items in the Item Container will be displayed with the Image of the Item instead of the static briefcase-icon (although a little small ^^)
- If you want to populate your Dropdown in the Item with the Dynamic Table entries from the attached actor, you can do that now by prefixing the Dynamic Table key with
parent.->parent.dynamicTableKey - The User Input Dialog has been enhanced, so you have more configuration options now (number fields, radio buttons, drop downs, checkboxes). Details for the new syntax can be found here: https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md#48-user-inputs. We plan to enhance it even further, so stay tuned!
- You can now use JavaScript ("Bye bye to my 'no js' system": LinkedFluuuush 😅 ). It came with the new syntax
%{}%. This way you can annotate that everything inside it should be parsed as JavaScript. JavaScript-expressions%{}%and Formulas${}$can be nested into each other, so you are able to transfer your results however you like. And the best thing is: You are now able to use Macros without the need of the Advanced Macros Module. If you need some examples, here they are: https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md#45-scripts - There were some issues with the import of Item Templates (especially if a new one was created from an import). It should work now on the first try of the import and without missing modifiers
The last feature missing before we release 2.3.0 is the Conditional Modifiers-feature. It will take a while, because it will introduce many changes in the current system, but I hope you´re still hyped like I am 🥳
man, that input dialog looks really nice
Hey so re the Javascript - can we now create a re-roll option which recognises the results of the original roll (its for Year Zero Engine) so if you roll a 6 in the original roll, you can then press re-roll in the chat dialog and it will only re-roll those dice that did not get a success? I think the suggestion was I use a macro to do this, but if I can I will make this work instead.
Also that looks awesome - will need to play with the player input box
Hey just thought I'd ask, if possible how would/could you make weapons/spells as items display and function (just being keys to a dynamic table). If possible can you bring in two separate items?
Also if I update to the new beta can I bring my templates over to it? Could I bring beta templates over to the final 2.3.0 release?
That shouldn´t be an issue as long as you don´t transfer to a system with a lower system-version
I don´t really understand the question. Should it be something like this? https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/180
I guess if I had to put it simply, just the ability to reference keys from an item. So that I could theoretically reference the item's keys for the purposes of filling in the details for a roll's formula. So... I think so?
Awesome, got it
That´s not possible outside of Item Containers (at least with Formulas, should be doable with Scripts)
Ah got it, thank you
But you have to filter by multiple criterias. The item template would be the most important one
what component type should I use for HP now/max?
Number field
if I do that I only get a single box. It should be a box with Life points now and a max value:
Would adding a second number field for max value accompplish what you want?
ah ok thanks! Will do that. Any idea why it overlaps name and type?
I can only say that it shouldn´t. Can you send me the export of the template?
I need the template
sorry
I recommend to switch the size to auto and adjust the Panel layout to whatever you like
But yeah, it seems to be a bug
so I'm trying to import my actor and item json into the beta version to check it out but the sheets aren't actually importing? Game Settings> Import templates JSON> Choose File> Select File... nothing actually shows up in the actor or item tabs. What am I missing? I'm having this problem in version 2.2 also.
Do you have any error in the JS console when trying to import ?
You can open it in chrome by pressing the F12 key, or Ctrl+Shift+I
Then you need to go to the 'Console' Tab, and see if any big red message is there 🙂
nope, no errors at all, actually very little pops up at all in the console
Ok I figured out the import thing but now here's another thing... User Inputs - I can't get them to work according to the documentation. I even just copy-pasted your exact example code and it is definitely not doing what it should.
A couple of questions before I will dive deeper. I would need some exotic functions for a cinematic Unisystem ruleset. I want to make sure if these things are possibel:
1.I need 1d10 roles + attribute + a chosen skill. What I mean is that you klick on a skill and it rolls a d10 plus that skill value plus an attribute that you chose via drop down menu or something.
2. It would be great if roles would also show a success level and maybe even damage. A single roll is used for all of this. So for example. You have a kick wich is a attribute dex+ Kung fu skill +d10 - 3 for kick. Then you roll and compare that number with a success level.
9=1
11=2
13=3
15=4 and so on. This should show up next to the roll. For example 13, 3 SL. Then if possible it should also show the damage wich will look something like this:
2*(strength +1)+SL.
If you have 3 strength and you roll a 13 it would be 2*(3+1)+3 =11 damage.
Are these things possible to do? I did it all with sandbox but it is no longer supported.
That is all possible (simplified version):
${#roll:= [1d10]}$
${total:= roll + skillValue + attributeValue}$, ${sl:= round((total - 8) / 2)}$ SL, ${2 * (attributeValue + 1) + 3}$ damage
Huh. That really looks like you are not on the beta version ^^"
When you go to the settings menu, do you have this information ?
That is exactly what I have.
Damn... Is your server publicly available ? Or can you send me an export of your template ?
great thank you! One single probelm is that the raise is not constant. So I used this instead. Will this work?
````<td><button type='roll' class="sheet-trait_roll" value="&{template:default} {{name=@{character_name} rolls Strength }} [[ [[{9,11,13,15,17,21,24,27,30,33,36,39,42,45,48,51}<[[1d10+@{base-Strength}*2+@{mod-Strength}+ ?{Modifiers|0}]] ]] ]] {{Roll=$[[0]]}} {{Levels=$[[1]]}}">Strength</button>```
Shouldn't there be 19 aswell?
Anyway, that's not an issue. You can use the ternary operator for distinct choices.
${(total >= 9 and total <= 10) ? 1 : (total >= 11 and total <= 12 ? 2 : ...}$
Dm'd it to you
no 19. And thank you a lot I will try it!
What did I do wrong?
${(total >= 9 and total <= 10) ? 1 : (total >= 11 and total <= 12 ? 2 :(total >= 13 and total <= 14 ? 3 :(total >= 15 and total <= 16 ? 4}$
Or even simplify it with:
${total <= 18 ? round((total - 8) / 2) : total <= 20 ? 5 : floor(total / 3) - 1}$
You forgot to assign a temporary variable:
${total:= [1d10+...]}$
And you are missing closing brackets
I think I will try the simpler version from you. I know have this:
${total <= 18 ? round((total - 8) / 2 : total <= 20 ? 5 : floor(total / 3) - 1}$``` so I need to include the dice roll somehow. Would you mind show me how its done on this example? I guess I can go on from there then.
You still need the temporary variable 😅
You have to save the result in total before it can continue to calculate your SL
${total:= [1d10] + (str + strmod) * 2}$
I have this now ${total:= [1d10+((:str:+:strmod:)*2)]}$ ${total <= 18 ? round((total - 8) / 2 : total <= 20 ? 5 : floor(total / 3) - 1}$I get a roll and an error in the chat window. I tried it with ```${total:= [1d10] + (str + strmod) * 2}$````and got two error boxes.
I've fixed the second part.
it's working! Thank you again. One last question, if I need to add that number somewhere for damage I need to assign a variable to it. How would I do that? Is this correct?
${slevel:= total <= 18 ? round((total - 8) / 2) : total <= 20 ? 5 : floor(total / 3) - 1}$``` and damage would be like?```:str:+:strmod:+slevel```
I try to get a dialog box when rolling a check so the players could enter a modifier. Sadly it opens a box but does not roll anymore:
${[1d10 + ((:dex: + :dexmod:) * 2) + ?{Entermodifier|0}]}$ any idea what is wrong?
It shouldn´t be inside []:
${#?{Modifier|0}}$
${[1d10 + ((:dex: + :dexmod:) * 2) + :Modifier:]}$
changed it to: ${#?{Modifier|0}}$ ${total:= [1d10+(:dex:+:dexmod:)+:dexdd:+modifier:]}$ Success levels: ${total <= 18 ? round((total - 8) / 2) : total <= 20 ? 5 : floor(total / 3) - 1}$the dialog box appears but there is still no roll happening.
Modifier != modifier
good find. Thanks but still the same
You can open the console with F12 and check for any errors there
foundry.js:11730 Uncaught (in promise) Error: Unresolved StringTerm modifier: requested for evaluation
at StringTerm.evaluate (foundry.js:11730:11)
at Roll._evaluate (foundry.js:9292:42)
at async Formula.evaluateRoll (Formula.js:815:13)
at async Formula.compute (Formula.js:270:30)
at async ComputablePhrase.compute (ComputablePhrase.js:128:13)
at async HTMLAnchorElement.<anonymous> (Label.js:247:21)
it must be somethign with the rest of the code. If I only use your example it works:
${[1d10 + ((:dex: + :dexmod:) * 2) + :Modifier:]}$```
It tells me that it is looking for modifier, which is not present
There is some weird stuff happening to a dropdown linked to a dynamic table. It might be related to foundry but I am not sure:
I had something similar happening in my sheet and it was due to non-unique component keys. Could it be that?
I thought so but it all looks good. It's not so much that it would be hard to find.
Do you have default values defined for those dropdown lists?
no, can I do this with dynamic tables? It didn't seem to work for me
I set up something similar and have no issue with that. Honestly I'm out of ideas on what could cause such behaviour.
at the same time the console displays this:
{
"message": "Computed props for test - 0 / 0",
"computedProps": {},
"leftToCompute": {}
}
N i know this is anoing question. but is there any eta for 11? i updated and cant play 😦
Is there a way to pin the character image to a specific part of the character sheet. Depending on the exact size of header table (in a paned-header table) the location of where a character image is seems to shift around.
V11 compatibiliy will be started after the release of 2.3.0, which draws closer every day 🙂
I hope to be able to release a V11 ready version by the end of August 🙂
How do you create "Mouse Over" text pop up up? Like you have a spell selection from a drop down menu. Once that spell is selected I have label or something else associated with that spell that once I put my m ouse pointer on it, I get a full description of that spell.
Sorry very new to this. Where do i write that HTML code at?
Either in Label prefix or Label suffix
Sorry to bother. I'm trying to use the custom system builder module and is there any way to have a a text or number field read out the sum of other text/number fields?
Nope, these can only receive input from a user. That's what they are designed for. If you need derived values, then use a Label.
okay if using a label what would I need to do would it be as simple as ${a+b+c}$
Yep, that would work.
I think I'm doing something wrong then ... sorry to be a bother.
Then show me what you've got
so it should be the number field under column (component key skill_fill)+A (component key a_fill)+the first number field under growth (a_growth) being added tofether in the one labelled DEX
And your formula is?
${skill_fill+a_fill+a_growth}$
Seems correct. Then try to update your number fields (just insert a different value)
In <p>${your-variable-to-show}$</p>. Is this the name that shows up on the character sheet from the drop down? Or the key associated with it?
How can I link a dropdown list to the key of a regular table? I have a dropdown next to my attributes. There you can select a skill you roll together with the attribute. It works since it is linked to the dynamic table. If I use a regular table instead it doesn't seem to get the key I used there.
That's not possible. The table has to be a dynamic table. Otherwise you have to use static options.
is there a way of populating a dropdown with only a subset of a dynamic table? ie. retrieve only the skills marked combat from a skill table
as i cant roll back and have a game today maybe there is some alfa or beta?
No, not yet. You could try to edit the system.jso n and edit the supported version to add v11, but I don't know if the System Will work :/
will try thx
THX i changed max version to 12 and it works i will not edit card for safety but as i can use cards and roll im fine to wait for release!
Nope, that´s not doable
Re asking this question. For tooltip on Hover.
In <p>${your-variable-to-show}$</p>. Is this the name that shows up on the character sheet from the drop down? Or the key associated with it?
I figured as much. I'll figure out a different way of doing what I want. Thanks 👍🏽
Does anyone have an example for auto-populating ability modifiers? I was thinking <= statements but that seems cumbersome.
Is there not some kind of formula you can use to calculate the modifiers?
Well, it is whatever you write into this formula. If it is a key, it gets resolved to its´ value. I suggest to try it out with static values before using formulas.
If i select a result from a initial dropdown list, how can i use that to affect the choices of a secondary and possibly a third drop down list? AKA. Choice of spell caster in first drop down "Cleric". Second drop down list gives the spell level "Lvl 2" and the third drop down list contains all the spells available from 2nd level Cleric Spells
Dropdowns are pretty dumb. They either only know static options or all options from a column of a Dynamic Table. They can´t do more atm.
Must likely yes. The problem for me is that the only one I can think of is probably overly cumbersome to the task. If I could figure out how to import other people's sheets I might be able to find what I need.and.just borrow.
I know for 5e style abilities you do floor((ability-10)/2), if you have an example for your system I might be able to help with the math
Sword World 2.5 if the wiki is to be believed it is: The modifier is the relevant ability divided by 6 and rounded down. These values are used for Skill Checks (p 94-).
Ok, so you can use the floor operator for that; ie. floor(ability / 6)
I'll give it a go. Thanks!
is there a way to color fontawesome icons that are label icons?
i'm trying to color the coin icon that i use for adding up player wealth, so i can't just use a standard label
You can use html-tags in Label prefix & suffix:
Label prefix: <div style="color:red";>
Label suffix: </div>
Here is an example in the Wiki: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Tips-&-Tricks/Conditional-text-color-formatting. The example uses text instead of icons, but the effect should be the same.
huh, this works for turning the text red, but the icon itself remains black
but thanks, though, good to know either way
I see, the actual order is: prefix -> value -> suffix -> icon...
You need a little workaround then, where you define the icon in either prefix, value or suffix with <i class="fas fa-iconName"></i>
defining in prefix/suffix works, but since i'm adding up the total value of an inventory with item modifiers, defining with value breaks
bless
any way to get prefix/suffixes to show up beside the label rather than above?
If I want to have a minus 2 to all rolls if Hp are <=10 and -4 instead if HP are <=5 how wouldI do this?
I have a maxlife stat and a wounds stat so far it would be:
rolls Strength ${total:= [1d10]+((str+strmod)*2)-XXX}$
what would I need to input in the xxx?
And also there is a survival roll one needs to make if under 0 hp. This roll gets -1 for each -10 hp. How could I do that?
I´d create a Label with the key modifiers, which contains all general modifiers, which should be applied on all rolls:
- woundMod:
${HP <= 5 ? -4 : HP <= 10 ? -2 : 0}$ - generalModifier:
${woundMod + ...(if you have more modifiers)}$ - Strength:
${#roll:= [1d10]}$
${total:= roll + ((str + strmod) * 2) + generalModifier}$
- SurvivalRoll:
${#roll:= ...}$
${#hpMod:= min(floor(HP / 10), 0)}$
${roll + generalModifier + hpMod}$
For me it´s showing right beside the text if I do it this way:
this line doesn't seem to work. it gives -2 if 10 or under and above 10 it gives
edited
thanks. Now it works above 10 and under 10. But <5 it still shows -2 not -4
edited
perfect now. Thank you again!
I was thinking of using a Dynamic Table as field for a Dynamic Table...any chance?
Additionally, even using a static Table does not allow me to set the inner fields...
Oh, ok thank you 👍🏻
Heyo!
I'm not very knowledgeable on JS and I need to figure out how to make 'ifs' and 'else ifs' work, as well as use that with checkboxes to try and make radials since they don't have that by default..
Also, I'm trying to make user input work to no success, the specific roll for the input only gets an error message. Here's my attempt on it:
///in Label text btw
${roll:=[2d10] + (sameRow('SLevel')*2)}$
<br>
${roll + ?{CharacterScore:}*2 }$
<p><strong>${CharName}$</strong></p>
I'm also having a really hard time with Dynamic Tables and how to refer to their variables inside the same rows, sameRow rarely seems to work and I'm too inexperienced to figure out why.
But mainly right now in a dynamic table I'm trying to set a minimum value to label that refers to a formula result. I want it to show a 0 if it's <0. And the ideal thing would be for it to only show multiples of 5 rounded up with .ceil
///also label
${(min(sameRow('Goal1')-20), 0)}$
I'll be scrolling this txt channel here to see if I can learn anything, but if anyone can offer some help that would be much appreciated!
Also, is there a way to create normal tables inside Dynamic Tables? This would be an absolute blessing.
But there doesn't seem to be a way to do that.
Even panels would be great.
Any hints on what this means? I have lots of conditionals with < and >= but cannot see where the error springs up from 🤯
I'm back and sorry to be a pain. Lookig to have a modifier add to the higher of 2 different number fields. I'm thinking this: ${floor(dex_mod+(>chkno1 or chkno2))}$ but I get errored
max(value1, value2) will return the greater of the 2 fields
Thanks!
I am running a Custom Macro from a label that is within a table on a character sheet. It's in the "label roll message" Shown below. This is being run for each skill in the table. Is there a way for me to 'self reference' the skill's label text, and the other fields in the row using some type of eval format so that I can use the exact same macro call in every skill? Right now for testing I hardcoded the words "accuracy" everywhere for the accuracy skill, but I'd like to make the call general so that it is the same roll message.
Wanted to show off what I've got going on so far:
It's too bad I cannot automate the class package/check package part.
Normal Tables don´t have any way to reference rows or columns.
can I at least reference the label text in the roll message for that same label?
Possible. But you also have to use the key name 😅
So in my example, is there a better way to write this macro call:
${!concat('/amacro MEGSActionCheckSkill Accuracy ', accuracy, ' true ', av_mod, ' ', ev_mod, ' ', accuracy_trained, ' ', '"', accuracy_subskills, '"')}$
That doesn't hardcode the word Accuracy or accuracy and uses the key somehow?
There is a syntax error, it has an unnecessary colon. And I would suggest to use default values -> ${roll + ?{CharacterScore|0} * 2}$
Not with normal tables or without some kind of selection with a dropdown
What about with 'items' in an item container? Would that be doable? I plan to use a similar macro for those as well
I didn't even know this '|' was a thing for this case. Thanks
That would be doable. The item.-prefix always references the Item in the current row.
Okay I've used that for other macros so that shoould help then thank you
Thanks!
The current beta-version might be something for you: #1037072885044477962 message
I saw that first thing when I got here and thought "Wonderful!", but I'm such a noob that after reading it I wasn't sure if it encompassed this. Not yet, right? Thanks!
It´s not really implemented, but it mentions some ways in the comments to enforce it.
I'll look it over more, thank you!
Thanks will check it out
You can fetch a dropdown list from a dynamic table, but can you fetch it from a normal table somehow?
Also, editing the json is currently beyond me, but I'm trying my best to figure it out.
Oh, and is it possible to somehow make this into a selection targeting different variables?:
${roll + ?{CharacterScore|0} * 2}$
It would be great for the prompt to be a dropdown-list with the 6 Character Scores instead.
That´s only doable in the beta-version currently
Where can I find access to it? And if I replace my system with it will it break everything?
It should probably maintain most things, ye?
It will create a new system, so it won´t change your current system in any way.
Is it in the Kofi?
Oh, but I wish to keep all the progress I made with the sheet. And continue from where I stopped.
on the beta that is.
You can just export your files to the beta
as long as the beta isn't too drastically different I should be able to inject it on my world just fine, ye?
Even the sheet?
Yeah, every file (be it a template, actor or item) can be exported.
I downloaded the system json, after a backup, it should be fine to replace my current one, ye?
Oh, wonderful
thank you again Martin. Have a great rest of your day. I need some rest now.
It's a wonderful tool you guys made here. I have 3 homebrewed systems I've been making do with so far.
And this is actually giving the system a face
Well, the beta actually has many changes, so it´s not recommended to import files from the beta to the current version (until the current version gets updated).
Seems I can't do anything on my own trying to make use the roll formula from the github and it's not working: ${[dexchk + 2d6]}$
so ${[:dexchk: + 2d6]}$
--Maybe I'm not understanding so once I create the roll label the player should be able to click it and the roll will happen.--
Never mind, was putting it in the wrong box.
Question since I just did something stupid: Will this be updated for the newest Foundry release (11.305)?
The update to V11 will happen after the big patch we´re working on currently.
Sounds good and thanks for the response!
Awesome work you all are doing with this ... and your utterly saint like patience with goobers like me.
Don´t worry. We´re aldready past 7k comments since the creation of this channel (01.11.2022).
ah, my mistake, i was using <p> when i shouldn't have
thank u
~~Question: In a dialog box with a checkbox, is this the proper callback HTML to return either true or false depending in the checkbox is checked or not?
optionValues.use_goforbroke = html.find('[name="use_goforbroke"]').checked;~~
Figured this out. It uses is(":checked")
So for FetchFromActor is there a way to use a key that references another within the second field? I'm trying to to limit my use of fetchFromActor by only using a single instance of it in a roll, the idea being that the key changes depending based on the result of a previous part of the formula. It doesn't seem to result in the roll actually fetching the variable associated with the key, just resulting in the key's name.
${SwTy:=switchCase(sameRow('Dmg_Type'), 'Pierce', 'Prc', 'Slash', 'Sla', 'Strike', 'Stk', 0)}$
${def:=fetchFromActor('target',"replace('Type_Def', 'Type', SwTy)")}$ (I've tried a few different things, but this just happens to not result in any error, along with another alternative.)
How about ${def:=fetchFromActor('target', replace('Type_Def', 'Type', SwTy), 0)}$?
I'm scratching my head trying to understand how to best implement rolling dice with Dice So Nice dice flavor.
Think a roll formula like {2d6kl[red], 1d6[green]}dl.
The parser throws a fit if I try to use square brackets in a roll message..
I'm not terribly familiar with DSN but considering the other syntax here, have you tried making them parentheses instead of brackets?
No dice (pun intended).
This is actually using a core feature "describing dice" (see the bottom of https://foundryvtt.com/article/dice/), DSN just interprets it for own purposes.
Previously I managed to solve this by making custom dice types (new "dX" definitions) with an extra module, but I wanted to see if I can avoid such extreme measures
The issue here is that square brackets in CSB are used to mark something as a roll expression. So the syntax clashes with the CSB-Formula-Parser.
I considered making a macro for it, but ran into (seemingly common) issue "what actor sheet was this called from"
is there not some sort of escape character to get around this issue?
Not with the current parser, but perhaps I can patch that..
Currently it does not take any escaping into account:
let rollMessages = formula.matchAll(/\[.+?]/g);
Current workaround would be to concat the the square brackets from variables:
${#osb:= '['}$
${#csb:= ']'}$
${[:concat('1d20', osb, 'poison', csb):]}$
Hmmm. I'm running into an issue.
I have a (static) Table with some Number fields in it.
When I open that sheet with Observer permissions, the corresponding cell is just blank. Fields in other places on the sheet are rendered as disabled input fields instead.
Component config
This is already known: https://gitlab.com/custom-system-builder/custom-system-builder/-/merge_requests/24
Thanks! Patched this on my end, hope the PR will be updated/merged by next release.
I must be missing some syntax, I am trying to call a macro and pass in a value for the roll.
In the Label ROll message I tried
/amacro "RollP" 18
It work.. But when I try to insert the value
/amacro "RollP" ${agility}$
It just spits out that line to the message.
So it properly evaluates it, but then doesn't call the macro I guess..
Any word on V11 compatibility?
coming after next big update https://discordapp.com/channels/170995199584108546/1037072885044477962/1126643170185314325
Interesting, it seems to only be returning the fallback value at the end, zero. Does it just not work?
and what is like the target release date for the big update?
Normally I'm patient but I cannot wait to roll out all the changes I've written to my DM who does not wanna use the Beta build.
I can't wait for it too, I want the big update and the v11 compatibility, I'm using foundry v10 because I can't use CSB with v11 yet, and a lot of modules are only working on v11, so it's sad
this is known to be an issue on item sheets as well, correct?
Is there a way to create a "switch"? By that I mean "If(), elif(), elif(), etc...
${equalText(item.wpn_mod, 'str') ? [1d10] + str + attack : 0}$
${equalText(item.wpn_mod, 'bod') ? [1d10] + bod + attack : 0}$
${equalText(item.wpn_mod, 'agi') ? [1d10] + agi + attack : 0}$
${equalText(item.wpn_mod, 'per') ? [1d10] + per + attack : 0}$
${equalText(item.wpn_mod, 'wil') ? [1d10] + wil + attack : 0}$
${equalText(item.wpn_mod, 'int') ? [1d10] + int + attack : 0}$
Right now I have this, with "wpn_mod" being a drop-down input with the main attributes (Strength, Body, Agility, etc). And while it "works", of course it shows five "0"s. I only want to use the picked value
Nevermind, I just saw that you can nest a condition inside a condition
<condition1> ? <result1> : <condition2> ? <result2> : <result3>
Ii'm saving this! Once I can work on it again this will be wonderful for Sword World's power settings
I ran into this same problem some time ago. Solution:
#1037072885044477962 message
Thank you so much, that did it..
Cheers
That was the one symbol I didn't try I guess
@lament wadi I think you can still simplify, if the characteristic of your object is the same as that of your character (str object= str character) such as
[1d10]+attack+ref(item.wpn_mod)
ref(item) refers to the value on the character sheet
It should be an issue on all sheet types
You can try if ${def:=fetchFromActor('target', "Prc_Def", 0)}$ works out for you. Otherwise it might be a different issue aside from the Formula.
How on earth can this be wrong?
SOLVED: looks like parenthesis where not of its liking 🤦🏻♂️
I'm already referencing the value, it working just fine, the problem is that I wanted to avoid fetching every defence type. I was trying to see if I could use a key to replace SwTy so that I'd only need to fetch the specific damage type needed, rather than all of them. I think it just doesn't work, as the formula already works just fine.
Seems it just doesn't want to use the "new" key that is a combination of the result of "SwTy"_Type.
How would I set up a basic health bar? I'm trying to set up complex attribute bars but it doesn't seem to be working.
Complex attribute bars are NOT EDITABLE from the Token. If you want editable attribute bars, use
number fields with
max-values instead (defining one will automatically create an attribute bar for you).
I have a little problem, though I seem to handle numbers well:
I get a value from a dynamic array, I pass it a gold adder/and multiplier. The calculation is done.
Then I look to see if it's less than or greater than a value. As long as I don't use ?'true':'false', it returns false or true, but when I do use it, it returns "error".
What's the problem?
${Base:=round((fetchFromDynamicTable('competence_arme', 'valeur_droite','categories_arme',item.categories_arme)+?{Modificateur|0})*?{Multiplicateur|1})}$
${Base<30?Base:0}$
Try to wrap fetchFromDynamicTable() with first().
thats good 😆 🙂
So just wanted an opinion on something before I put too much work into it to scrap it, im at the point I've finished most of the character sheet stats and I was looking into items for spell/weapon creation
is it fine to build the roll expression into the item itself, and have it search it's equipped actors stats?
eg, I make a fireball item, equipped to a mage, the fireball checks the mage's casting stat and modifies the final result accordingly?
Possible. Or you use fetchFromActor('attached', ...)
Is there a way to set a dynamic max value that varies from token to token?
you wouldnt have the max value be a static number but a formula using stats for that actor
Are there any tips in here for how to apply an already-defined Active Effect via a macro?
I can define an active effect in a character template, but is there some way I can flip that on or off via a macro
rather than clicking a button on the token
What kind of changes are you most exited about?
Ey! So, I'm on the Beta and I see no 'Radio Button' in the 'Component Library'.
Help?
Also, if I'm simply missing something, and you can tell me where it is; how can I refer to the radio buttons on formulas with ifs?
If you have a template of something like that it would make my day
I am on v10 btw
If that makes a difference
Because you´re a bit ahead. It´s currently under the unstable-version, which is ahead of the beta
oh
How can I access it, please?
I really need them Radio Buttons, and to learn how to make formulas with them
oh damn, I didn't read the warning, such an obvious mistake
I thought it was something along the lines of "careful, this is unstable" but refering to the beta.
Thank you
Would you happen to have a formula template for referencing the radio buttons?
I'm not very good at JS, and without assistance I'll probably spend the next 3 whole days trying to figure it out.
As its been for most of the formulas so far..
A Radio Button has actually 2 keys. One is the Component key (which every other Component has). And the second is the Group key. Multiple Radio Buttons can share the same Group key, but only 1 Radio Button can be selected in this group.
If you reference the Group key in a Formula, you´ll get the value of the selected Radio Button. That´s it
Okay, I think I can work with that, thank you very much!
I know it's called unstable but.. Nothing works? The + buttons do not do anything when clicked to create something in sheet templates, and I also cannot edit anything already created from the imported sheets. I'll try disabling all modules and see if that produces any results.
No modules, still no dice. Nothing works. I'll try to open the system on the browser and look at the console log.
When clicking anything:
Seems to be from the import of the data from the stable version to the file.
I just copied that radioButton.html to the stable version folder, and now it works, but I feel that this might cause other issues down the line. Advice?
Labels in the Unstable version don't seem to be able to refer to number fields anymore.
Or to display the values of number fields.
This seems to be incorrect, yet I am still having a problem with the defaults only loading once change is made to the sheet
How does the user input short hand work? I've tried ?{v} ${5+v}$ and it doesn't do anything
That's in a label roll message
?{v|0}
is for numbers, isn't there a variable to indicate letters?
Doesn't respond at all when clicking on it
${?{v|0} (5+v)}$
This at least brought be an ERROR message
${?{v|0}}$ ${5+v}$
I gotchu
this worked for me
@zinc hound
Thank you! That worked for me too
I'll try to illustrate my issue:
I FIGURED IT OUT
But I do have another issue. Text Fields seem to reset when I reload Character Sheets..
Some tend to reset
not all
Okay, so, it seems that in the Unstable version Text Fields anywhere inside Tables do not save their text after reloading the sheet.
CORRECTION: Nothing inside tables saves after reloading the sheet.
What formula do I use to make the maximum value of a Number Field the input value of another Number Field in the same row in a Dynamic Table?
This:
${sameRow(Variable)}$
does not work.
And I feel like I've tried everything
And I do not know what to input in the place of the words in this:
${sameRow(collumnName: String, [fallbackValue: *]) : String | Number | boolean}$
Except for the collumnName.
So, I discovered that you can target Dropdown lists, and if the selected item on the list is a number like <10> it is a value that can be calculated in a formula
if you set the key of the first item on the list to <5>, set it to selected, and you make a label with a formula like
${[(<DropdownListKey>) + 10]}$
clicking the label will produce the result of 15 (5+10)
so
if I can just figure out how to make an item key in the dropdown list be a formula like:
${:CurrentAgility:}$
It would be great!
Does anyone know how to do that?
I mean something like this:
Please tell me there is a way
Well, in case anyone comes by, I'll mention my plan for this before I head to rest;
I plan on making
?{CharacterScore|DropdownListKey(CSDrop)}
mid rolls so players can choose which attribute to roll from a dropdown.
being able to update fields is a game changer, a many game changer, a foundry changer lol
Hello there.
First of all, thank you for a great system. While still a long way to go feature-wise, it provides such a great start for system development at such a little effort!
I have a questions though: If I add a roll to an item, how can I make it available through a simple click in an item container?
can you give me an example? I ask because I try to find ways to otimize our own sheet.
So within rolls you will be able to call and update fields like a rest button that restores 1 hit die of health and all mana. Or you can do fields from a target like deal your weapon damage to the token you are targetting
Also: equip or unnequip as a roll, deduct something, sell something for gold coins... it is up to your imagination really.
You can just use ref(dropdownKey) in your formula. This way you get the value of the current attribute.
oh, 'ref()' never worked for me on stable, I'll try it here.
Damn, yeah. Both in Stable and Unstable.
Thank you for responding Martin!
Any advice for this though? Or will it be fine?
That shouldn´t be an issue. But it seems that the unstable version has the same issues the beta had (using the paths of the stable version instead of the unstable one).
@brittle moth can you have a look on that?
Also, please, how should I refer to the number field key in the list item key?
ref() would work too?
Gotcha. No prob
I hope it is of some help that I'm being such a bug here