#Custom System Builder
1 messages · Page 10 of 1
Show me what you got
<td>Result: ${roll < skill ? (roll > attrImpBase ? setPropertyInEntity('self', attribute, attribute + 1) : 'Success') : (roll < skillImpCap ? setPropertyInEntity('item', skillName, skill + 1)) : 'Failure')}$</td>
Ummmm. I think I may have made a significant mistake with my Character templates. I declared all of their attributes (Str, Dex, etc) as Number Fields on a table in a panel on the sheet.
I have a sinking feeling that I should have used the "Configure Attribute Bars" or "Configure Hidden Attributes" instead. What's the best practice for this?
Yeah I think my issue seems to be maybe a combination of it being an item along with the fact that I don't really have unique names that can identify what row of the dynamic table is being used. It's a "gun" item so it's magazines where you check a box to use that magazine in your gun. But I will probably mess around with this again tomorrow
Thank you
Should be fine, isn´t it? I mean, it depends on the use case
It works, just not sure it's "Best Practice". What is the Attribute Bar intended to do?
https://gitlab.com/custom-system-builder/custom-system-builder/#82-add-complex-attribute-bars e.g. health bar of the token
And I structure my attributes in a table as well. They have columns for base-value, mod and total
are any of your templates one of the ones on the wiki?
@formal goblet could you help me with something: I want to use a UserInputTemplate but only want to show it if some check or other condition is met.
something like ${#TestNR<0?'':(?#{TestInput})}$ does not work (at least for me)
null yes, to just do nothing
written out this should be: if TestNR smaller than 0 do nothing else give the TestInput
Does anyone know how to get panels to stretch vertically independant of eachother? I have 1 long panel that is separating/stretching other panels in different columns.
Just to put this out here - incase anyone should want/need it. Here is a macro to pull up the Dice So Nice, dice customization panel directly . This avoids walking through the game settings. I am including this on the players character sheets on a tab call "Settings" o allow for quicker customizations on their part if they want to.:
let menu = game.settings.menus.get("dice-so-nice.dice-so-nice"); let dsnApp = new menu.type(); dsnApp.render(true);
then of course to call it from the page: %{return await game.macros.getName('dice_so_nice').execute()}% (where "dice_so_nice" is what I named the macro in my world.)
Hello everyone!
First time using Custom System Builder.
I've created two dropdowns (one for race and one for class) and when I test it on a character sheet, it is blank.
Does anyone know what I am doing wrong?
Missing Labels
ops...
thanks! I've read it as tooltip for some reason!
So, I may be in the right place. Is there a way to make auras automatic? Like having them apply their respective buffs and debuffs to any players that enter it?
this is organized really well
i remember finding out that tables resize to fit text was a game changer
is this an entirely custom system, or is it based on anything else?
Completely custom
based
You´d need the help of scripts, CSB doesn´t offer such a solution
1 2-Grid-Panel, and inside this 2 Vertical-Panels
Like this
I don´t think that´s possible
Well, feature request it is. Thank you for your help. 👍
is there no way to reference an actor with its own character sheet's scripts?? actor.items doesn't work, nor does anything else i've tried, but specifying with game.actors.getName('TestingDummy').items does
i'm not sure if the problem is on my end or its end and i've been trying for a while
Try out console.warn(this); and check the console.
Extremely noob question please dont bite me
i am trying to make make my life easy by using items
there is any way to use a dynamic table to store items
and have a roll button with a command as
Attack button (Str+End+(if Item=true, +2) or something
idk man, i dont code
my bad
I'd suggest to use an Item Container instead of a Dynamic Table if you want to work with Items. In there you can also define Label Roll Messages.
That's not the script I`ve posted, is it?
It should create a warn-message in the console with some data.
ah, i thought you meant to append it to the end of my script
i figured it might have been the fact that it was running under hidden_attributes that prevented it from defining the actor
running that should give out this, right?
Well... it should be run as a script in the sheet, otherwise it will show the context of the global window-object 😅
i will give it a read in the gitlab, thanks
ah, i'll create a new label to do so then
i thought putting it in the hidden modifiers would cause it to warn in there when i refreshed the template and initialized
so, this is the only error that pops up, but it happens even with the script completely removed from the sheet
I see, it's still the same. Then you have to live with getting the actor with game.actors.getName() for the time.
i guess i'll have to come up with some workaround to get the actors name put into that via formula or some such bullshit, then
${name}$ it is then
okay yeah wow that was surprisingly simple
from the track record i was expecting it to take much longer
thanks for everything you've done to help me martin
Np
It's been a while for this and I'm just getting back to it. I've tried a few ways to get arguments passed from an item's Label Roll Message to a macro. I've not had any luck, so wanted to check if you had anything to add from that URL you sent about how to send an item's name as a parameter to a macro from a roll message on the item.
Check Out the Module active auras. ITs a Bit Tricky to Setup but works fine with csb
Is there a way to customize the combat tracker? My system has 5 phases per round.
Not with CSB
I think I may have encountered a bug with input templates: Label components in a user input template will not be shown, when the component is assigned a component key. If it doesn't have one, everything is fine. I'm at work, so I'll do some more thorough testing with different browsers etc and open an issue if I can reproduce it.
Quick question: I'm trying to run a macro using the same command as you listed but also want to include parameters. Have you done that and what format did you use?
no I have not, and I am a layman at this so I am a blind man searching in the dark.
For running a macro from a CSB Sheet, after looking through many replies, it seems this is the correct syntax for running a macro from a character sheet (CSB) with 'fixed' parameters. I'm not sure how I can send a variable or item property as a parameter. Does anyone know the correct format?
%{return await game.macros.getName('TestMyMacro').execute({args: [50,"Hello"]})}%
Will pass the number 50 and the string "Hello"
However, I want to send item.name as a parameter, and have tried many ways of formatting it, such as ${item.name} and :item.name: and ${:item.name}, but nothing is recognized.
Anyone know the format for passing a variable/item property as a parameter with the above syntax?
I had things working prior to update, so hopefully figuring out how to get macros working again!
have you tried ${item.name} or ${item.name}$?
i am using this for a dynamic table and it works, should work with items too:
%{return await game.macros.getName('RollDefaultFertigkeit').execute({args: [${!sameRow('Wert_FGEW')}$,"${!sameRow('Name_FGEW')}$"]})}%
Using ${item.name} doesn't actually call the macro anymore and it just displays the whole content in the chat message
i think you forgot the last $
%{return await game.macros.getName('TestMyMacro').execute({args: [50,"${item.name}$"]})}% that should do the trick
it should give the parameters 50 and item.name as a string
Using ${item.name}$ seems to give me the whole actor object
Let me try that latest format
Am I use the right macro syntax for getting the parameter?
args[0] and args[1] still? Or do I use 'scope'?
args[0] should be right, it works for me
Okay this appears to work! With the "${item.name}$" format! going to try some further processing! Thank you
I would never have figured that out
well, thats waht this DC is for 😄 i had help here and from macro-polo, too 😄
i have a roll message, calling for a macro, giving the Name and a Value, the Macro ask for rolling 1 or 2 d10 via popup and changing two hidden labels on the sheet. After that it calls another labelRollmessage hidden on the sheet. This rollmessage uses the changed values from the macro. so i have a complex rollmessage, but only have to change the parameters giving into the Macro to make the roll happen for neraly anything on my sheet 😄
I have a similar macro that I need to rework now but shoudl work similarly
Question for you all. I have code inside a Label Roll Message for rolling and applying damage to a player's target. Worked great for me (since I'm the GM), but the first time one of my players ran it they got a permissions error and it didn't apply the damage. Has anyone else bumped into this before and, if so, what was the solution?
the code uses the following ${#setPropertyInEntity('target', "health", targetHealth-targetDamage)}$
I think my problem is that I'm trying to make my 2nd row a full panel. so top row is 3 columns across, 3rd being infinite length, but my 2nd row of panels is trying to fill 2 columns at once, 1 panel at 2/3rds width. if i switch to 3 columns it works fine but unfortunately those particular tables need more width. I thinkI've seen css options where you can make a grid occupy more space like I'm trying to do but not sure.
has somebody else worked with UserInputTemplates? whats your experiences with it. I'm trying it right now and bump into a few walls.
yeah players cant update any other players
so you have to use the module warpgate if you want players to be able to update not owned actors
Well, the permission system in CSB could need some refinements in some places 😅
but as far as i know this is standard foundry behaviour
thats why things like warpgate exist
so just for inspiration this is from my macro code
const updateData = {
actor: {
system: {
props: {
"current_life": current_life
}
}
}
};
await warpgate.mutate(targetToken.document, updateData, {}, { permanent: true });
of course you don't need to space it in this way (can just write it in one line) but it helps me get the nested structure right.
And you imbed that in the Label Roll in a %{}%?
me personally no - i work with macros outside of the sheet
but i don't see any reason why it shouldn't work in Label Roll too
or you call the macro from the label roll - does the same thing
ooof, we´re quite active, guys 😂
Hi everyone! I just discovered CSB and i'm loving it. One thing I can't seem to figure out: how do I show whether a roll is a success or failure? I'm setting up a system where 2d6+(ability) >= 9 is a success. I have roll buttons working fine, but I'm trying to make it show success/failure instead of just the roll result in chat
${#roll:= [2d6]}$
${roll + ability >= 9 ? 'Success' : 'Failure'}$
Thanks! I think maybe I'm doing this inefficiently, I've been putting this on every button:
For skills I'd use Dynamic Tables instead. In there, you only have to define your formulas once per column.
Got it working, thanks again. I don't have a background in scripting or anything so it's a double learning experience. Is there a way to show both the numerical result and the success/fail text?
If not, clicking the result works fine
Okay so I'm a little over ambitious and I have a mostly functional attack roll for spells in my system, but I thought I'd ask if anyone (with the time and mind) has any pointers for how to make it less... nightmarishly spaghetti . I know theres better ways to make it work in terms of logic, I just haven't been able to apply it.
Idk if anyone will look over it, but any help would be appreciated.
Is it possible to reference/display an item's image icon in a roll message?
I'm currently playing with it, too. Wanna figure stuff out together? 😄
So far: I haven't completely figured out if I can reference components that are on the same userInput. (say you have a dropdown on there to pick a skill and want to display the corresponding value from the sheet via ref() or fetchFromActor(). Has anyone succeeded with that?
My guess is that the input "window" is static. I did not extensively test it but ref() and visibility formulas don't work correctly.
Hey so, yesterday I spent a little bit of time working with this game system for the first time, was able to somewhat successfully make a working character sheet, at leastI think I did so, and I am now looking to try to add abilities or moves into the sheet like moving or hitting as well as making it so that certain actions like attacking can reduce the health of whoever is being targeted-- how would I go about doing this? I tried to find some sort of hint or clue to work off of through looking at other mentions of stuff like health, items, damage, etc but none really "solved" my lack of direction tbh, also if it isn't too much, how would I go about implementing items that can be equipped like clothing or tools?
Did you found the Readme?
https://gitlab.com/custom-system-builder/custom-system-builder
I have read it, yeah
Anyone use dialogs to gather user input? Is there a way to change the column width for the 'label' vs. the 'input' field? I looked at some HTML pages on form-group but the options they say control that don't seem to work in the CSB Dialogs. I'd like to shrink the input fields by about 50% and double the width of the labels
EDIT: Solved, using style="max-width: 40px on the input field worked for me
I'm not Sure how much can be done with CSB only. But for everything else you can write custom macros. 😅
Alright then, thanks
Does anyone know if it's possible to display an item's image icon in a roll message?
CSB doesn't offer that
Is there a way to pull a key value from an item in CSB without using the item modifiers? For use outside of an item container on the character sheet.
Can images be displayed in roll messages at all?
Specifically I want to collect and concatenate strings from multiple similar items held by one character. Since modifiers can only do set operations with strings I dont have a way to aggregate the strings from items of the same type like say 2 swords
On item templates, does the Configure Items Modifier button do anything or is that only meant for items created from the template?
If you create the Chat Message with the API you can use HTML so you can pretty much do what you want.
Yeah, if you use HTML in the Label Roll Message
Sorry for this, but you questions are confusing me. I don’t understand what you really need.
To your first part question I think the answer lies here: https://gitlab.com/custom-system-builder/custom-system-builder#4211-setpropertyinentity
I don’t use this myself, so I can not give more advice than this text.
For your question about items:
Place a item-container in your sheet-template, configure a item-template, make a item using the template, open the player sheet and darg the item into the item-container.
Did this helped?
I'm mostly trying to implement some basic form of health where it can be both damaged and recovered, everything else like specific weapons and pieces of equipment isn't as high of a priority for me, the main problem I've been running into in general though is that I just don't know where specifically to begin and where specific things should be placed
Thank you. However I asked because it appears that If I assign item modifiers in the item template, the modifiers are not passed on to the item created from the template. Item modifiers only seem to work if I assign modifiers to the item that is created by the template. Is this because I am missing something, a bug, or is functionality "as intended"?
As soon as the item is dragged to the actor, the modifiers will be applied. There's just no visual hint for now.
I understand that at the start it is to much to know witch questions to ask – but without specific questions we don’t know what to answer.
My way was downloading and installing the templates that others had made to have a look what there solutions have been.
If you have time in about 3-4 hours, I might be able to answer some of your questions privately?
I mean my specific question is just how would I go about having things like actions and health be properly implemented
I think for a health bar you should create a health number field with the max health Set as Maximum. Then you can use this in the Attribut bar for the token
If i remember right...
Actions are difficult since you have to know what you want to achieve.
Setting Up Basic fields for different stats is a good Idea (Like damage, Attack Mod, etc.) And then you can think about what you need for which Check and If it is better to Setup with a Label Roll or a macro
I do have an actual health bar, somewhat implemented it just doesn't do anything because I didn't know where to begin in terms of like implementing damage to a basic "hit" ability, which I was hoping I could do some sort of thing where the basic "hit" could be modified with an equipped item, so for example if no weapon was equipped the ability could deal 1d3 or 2d3 damage whilst if something like a sword was equipped then it could deal 1d8, etc etc
Yeah all of this is doable. It can be done in different ways. You can Setup Label Rolls, Look at the Wiki examples or wait for others to respond Here.
I handle all of that with macros.
I'd use an Item Container for Weapons. In there I'd be able to define attack-actions for the weapons. All I'd need is some attack-stats (like attack-modifier and damage) in the Item and a Label Roll Message in the Item Container.
A big Problem is Auto apply damage /reduce health. Most Times Users dont have the permission to do things Like that.
But first get it working for you and then worry how to make it Work for Players (If necessary)
I tried a bit ago to do some form of attack modifier and attack damage using labels and number fields, which is how the rolls in my sheet work and they work without issue, but nothing happened with that initial attempt at doing weapon implementation, the "hit" action which it was made on with the formula being this: ${[:pow_score + weapon1_damage]}$ was red, like how the attributes are and as I mentioned before do work fine, but the "hit" action did nothing
F12
are there Errors in console?
What are the values of pow_score and weapon1_damage?
I didn't know about using the console when it didn't work, tbh so when it didn't work I just tried to move onto something else thinking what I did just wouldn't work in general
Also i think in you need item.modifier No?
item_modifier?
Nope
The pow_score was like 1 and the weapon1_damage was like 3, though I'm only shooting that off at the top of my head because I didn't keep that form of implementation
OK then this is for Something Else 😅
So they are just 2 numerical values?
No roll formula?
${[:pow_score + weapon1_damage]}$ This was the roll formula, when I made it I was hoping that it would read the assigned number values of both stats, considering that the attribute rolls which work do exactly that
Why is there a single :
I don't know honestly, don't know if it was like that when I first tried to use it either
I don't think it was since I pretty much just copied one of the skill roll formulas ${[1d20+:comp_score:]}$ like this and tried to bounce the pow_score off of the weapon_damage, I'm pretty sure when I first did it I put both values inside the :s though I could be wrong
You can just do ${pow_score + weapon1_damage}$ if no rolls are involved. You only need [] if you actually have rolls.
Yeah
If these 2 are just numerical values, then it would add them together and return the result
wow ok
How would I go about making it so the values are applied to "physical" damage on a token?
Uhh, targeted token
I'd like players to be able to target tokens and deal melee or ranged damage to them
Then you´d need to use ${setPropertyInEntity('target', 'Health', "Health - ${Damage}$")}$ (given that Health is the key of the health-field and Damage is the key of the calculated damage in the Label Roll Message)
In the end, it´d look like this:
${Damage:= pow_score + weapon1_damage}$
${#setPropertyInEntity('target', 'Health', "Health - ${Damage}$")}$
That should go in the same place as the damage roll formula, yeah?
Yeah
Okay so, I was testing around with your suggestion to see how it worked and if I got it right and it does work, though it seems to be only once which is when the targeted token is at max health is that because I did something wrong with how I set up the health previously?
Can you change the health freely?
I can change the max HP in the token config menu but I can't "restore" the actual HP inside of it, but I can do that in the HP slot in the little token interaction screen
this place specifically
I do, yeah
And can you change that freely?
And is it synced with the token health?
I can change it freely, yeah and it does seem to be synced up at least upon reloading the token
Then it´s strange that you can only change it at max-health
This is how the hp resource is set up, does it look right?
Should I be able to modify current and max health still after doing that? If so, I can't
The current and max will be set automatically to that what you´ve configured in the sheet. That´s why the sheet is so important
The token's hp is locked at 12 out of 22 now, in current and max hp respectively
Can you show me how you set up your health field in the sheet?
Ohh
I used 22 as my max value in the actual health_amount component section
incoming damage from the damage roll still won't damage the token beyond 8 hp though
There's no error pertaining to the roll in the console either
Configure active Effects
Is it possible to:
-Change the names of predefined effects
- or create own effects with different names
-delete effects from HUD that i dont need?
Possible with the module "Core Settings Expanded"
Haven't really been able to fix this issue, despite my best efforts, I've tried messing around with the formula itself, and also tried messing around with HP and the damage value but to no dice. The attack can go through but upon working once, it for some reason just refuses to work properly when done again though if the HP on the targeted opponent is restored then it will work again but of course just once, any idea how I could fix this? @formal goblet
Is there a min-value for some reason? Otherwise I have no clue what goes wrong
You could try out what happens, if you update the HP through the sheet (setting it to max, to a specific value, to 0) and then perform the roll.
There was a minimum value, I just removed it to see if anything would change but nothing did also updating the health to a certain number led to the same result, the formula working only once, also here's a screenshot of how the formula looks inside "health" is being referenced as health_amount because that was the key which I gave to the health component in the sheet
Is the damage showing the right number? Is health_amount a Number field?
Which Foundry and CSB-Version are you using?
Btw, this is what I use
${Damage:= Strength}$
${setPropertyInEntity('self', 'Health', "Health - ${Damage}$")}$
There is almost no difference to yours
It is showing the right number, and the health_amount component was a text field but I just tried to change it into a number field to see if anything changed and nothing did, as for the versions, my Foundry is V11 306 stable and my CSB is version 2.3.1
Seems fine, except that with the text field, it should be a number field in all cases. Try to delete the component, reload and add it back
I just did all of that and it is still going only once, is "damage" supposed to be a hidden attribute or something?
Kind of, it´s a temporary variable, where the result of pow_score + weapon1_damage is saved and used later in the Label Roll Message.
It isn't something that I have manually add as like an attribute though? I didn't add it, if so and that's the only thing I can think of besides the world itself being messed up somehow
I see it in your Label Roll Message ${Damage:= pow_score + weapon1_damage}$
I mean like add it in as an individual component and key, like "health"
For what? It´s enough to have it as a temporary variable. You don´t need this value in your sheet, do you?
No no, I'm asking you if I was supposed to have done that, because it was the only thing that I wouldn't have done
Nope
You can remove # from the Label Roll Message to actually see the result of the operation.
I would recommend send a Screenshot of your number field health_amount Setup. And try restarting foundry with the new setup. Some Changes only Work If you restart foundry 🤷♂️
The formula also comes out with 2 separate "rolls" with the first being the pow_score + weapon1_damage and the second being the damage = pow_score + weapon1_damage bit, is that connected to the issue?
Nope
You can delete the first line because they do the same, but that wouldn´t cause an issue
I've tried to do that earlier and the formula just entirely stopped working after I did no matter which one was deleted or kept
This is it looks now, after I updated it in line with Martin's advice
Have you tried to turn it off and on again? 🤡
I did and it didn't work, I'm trying it out on a new world to see if it works properly there
Try this one out
I just imported that, how do I view it?
It should show up in the actors-tab. But that´s only a template, you need a new actor aswell
It isn't in the actors tab
No errors
Can you select the Template _Minimal on a new Actor?
nope
Ah wait, create an actor, right-click it, import the template
That made it appear, yeah
I have 2 questions for anyone with knowledge:
- How exactly are Conditions supposed to be set up? I've followed the documentation and it's always yielded an error, I'm beyond confused and frustrated.
- Is there a "precise" round function? As I'm wanting to have a value round to every "0.2".
Thanks in advance! :)
What are "conditions"? Can you give examples?
(Sorry about the delay)
characterTrait!='Heavy Handed',<true>,<false> - t/f are just placeholders.
But I've honestly tried a multitude of different ways to get it to work, and I just couldn't get it. I tried with ${ }$'s, { }'s, nothing worked.
I wish the example for conditions on the documentation was a little bit more indepth rather than just a single line :(
${not(equalText(characterTrait, 'Heavy Handed')) ? <true> : <false>}$
And that'll work within "Labels"?
Im Not Sure what you try to achieve?
Just trying to figure out how to get COnditions to work. At the moment, the only thing I've been relying on is switchCase haha
No i mean from a Game Sense. What is your use case
I'm stupid :D I don't understand the question lol
I Just Wonder what you want to do/achieve. Do you want to create fields in your Sheet with values? Do you want to apply temporary effects? Why do you need conditions and what are they for? Or are you Not interessted in any of that and Just want to do if-else Statements? Then my fault 😅
Just if/else statements haha
🤦♂️
Yes
Should work in every formula
My goal is to have skills as items stored in folders in which the folders can be dropped into containers on an actor. When the skill item is created, an attribute name is supposed to be assigned to the skill via dropdown. I have a "master" actor named "Setting" that holds various global values, to include the current attribute names. I cannot get the drop down to populate in the skill item using either dynamic table or text boxes. Can unattached items reference values in actors (ie "Setting") or is there some other way to make this "global values" approach work?
Thanks. I had already read that prior to asking my question, hence my inability to make work which means that I am either doing it wrong or it can't be done. Are saying that unattached items can reference fields or dynamic tables in actors?
Yeah, they can. Just specify the name of the actor ${fetchFromActor('Settings', "prop")}$
I messed around with your template, when the formula is set to "target" the same issue occurs with it, it only fully operates on the "self" mode which you originally had for it, but surely using "self" can't be the solution as then the attacker's stats wouldn't be applied? Sorry for any inconvenience, I'd just really like to solve this, man
hey @formal goblet
i got a maybe issue 😅
sooo the setup: i got a macro with which i can create new tokens on the canvas and use it for creating "summoned minions". the good part: all works as i want, tokens get created and also setup right.
the bad part: the console gets flooded with error messages like this (see picture).
i think it has to do with the fact, that i use labels with this (for different stats) ${keystone_total_life+(fetchFromActor(masterName, "minion_health"))}$and got a text field with key "masterName" which is used to setup the fetchFromActor
sooo - is this just the way it is? tokens will send an error all the time until the masterName is properly filled?
should i just ignore the errors because everything else works as it should...?
How can I create a conditional modifier based on multiple conditions? Example: If Dropdown = option1 , check1 = true, check2 = true, then +2, otherwise 0. I read the conditions section but there aren't enough examples for a noob like me to understand. lol.
${(equalText(dropdown, 'option1') and checkbox1 and checkbox2) ? 2 : 0}$
fallback values are a thing 😅 . Just specify a third parameter in fetchFromActor()
I found a bug where props are calculated based on the source-actor instead of the target-actor...
how powerful and simple is this system
I'm looking for a tool to use for various indie rpgs as well as my own system
It´s easy to learn and can be extended by scripts
what's the scripting language
damn
Hi,
With the foundry Custom System Builder, I would like to display a message depending on the result of a dice roll.
I can make clickable stats (for instance to throw a 1D100 when the player clicks on "strength"), but I'd like for instance :
- to display a message to say if the test failed or not
- if ever it's possible, to provide additional dice throw possibilities (like, for additional damage if the guy rolls a 6)
can I do that 🙂 ?
also, by default my "itemcontainers" are looking like that, which is not very beautiful. Did I miss something ?
Thanks! Absolute mvp :)
all of them or just that one in the picture. try moving it down to the next section of the page, you are in the header portion. I don't put much up there in my sheet.
Had a similar issue, the conditional part is very lacking :(
icons break in headers currently, fixed for next release according to gitlab issues
Is it possible to enter a formula for initiative that ensures every roll will result in the maximum value of the assigned score (key)? So if the initiative is based on a character's "prowess" of 4 (usually a 1d4) it would always produce a roll of the max 4 in the combat tracker?
It sounds like you could likely substitute the roll for just a number, right? What determines if it's a d4, or d6 (for example)
Yes. I bought Foundry becaue the Custom System Builder exists, and it is working great as I set things up, but I realized that their combat tracker seems to assume a rolled result (judging from the clickable "roll" button on the inititiave window). So I was curious if I could override so that when clicked it just produces the highest possible roll based on the associated attribute I plugged into the settings
You should be able to. 😕 Sorry, I was only thinking about rolling from the character sheet, not Foundry's innate combat stuff :x
You can put a custom formula in the initiative config section. That could work.
Coincidently I needed to do a similar thing. I wasn't expecting it to be so easy haha.
See if that is what you need, not sure here 😉
If I reference just the value of my stat the initiative button turns into a roll. For most systems that is fine, but not mine. So like if my key attribute is “Prowess” with a value of 4 (or 6, 8, 10, 12) and rather than the combat tracker covert that value to a roll of a die, would I enter this formula instead? The instructions said not to use the delimiters ${ and }$ to mark a formula in the initiative setting . So to return the maximum value of an attribute without converting it into a die roll, would I use a formula like ${max(ATTRIBUTE)} where ATTRIBUTE is the key you defined for the attribute but leave off the $ sign?
oh yes that was it ! awesome thanks a lot !
Didn't realize there was a header vs. main section (I'm 24hours-new to VTT 😄 )
Not sure, but the init only uses rolls even if a constant is passed.
In addition, max(constant) actually is the same as constant ...if I'm correctly reading your question, that is.
I would like to know too
well actually for me it's working as intented. I just wrote the name of the attribute in the initiative input box, and it works
Is your attribute a fixed number 13? Oh, and I see you have a polyhedral icon next to the attribute too, that’s neat. When I put my attribute in to the initiative formula field it generates a random number as of now. I wonder what’s different?
The D20 icon is unrelated, it's another item (actually a LABEL) on which I added a formula :
and yes, the corresponding attribute is the one circled.
Can you share some screenshots about how you configured your attribute ?
Just for sake of completeness, this is my initiative setting. It's still a constant value and in the combat tracker you still get a roll. The /10 part is only for conflict resolution.
But [] leads to a Foundry roll.
Even without those, a roll would appear in the tracker. And I think the formula would not work otherwise.
EDIT: yup, not working without [].
What would be the best way to implement a Perk system - Similar to that of Fallout, where players are able to choose a Perk and have it affect their character (and potentially their skills/stats)
Either a Table with Checkboxes or Perks as Items
I was thinking having them as items. But how do I place them on the actor and have something 'read' their effects?
Mostly because I'm hoping to have 100+ different perks haha.
If a perk has a bonus to the skill "Stealth" how do I get that information from the perk within the container?
item.perk
Section 3.12. Item Containers:
As with any labels, you can use formulas in the Label text and Roll Messages. The keys used in the formulas will
reference the parent keys, but you can use the item keys by adding item. in front of the key. For example, if a
weapon's damage value is based on the character's STRMod and an internal damage value, you can display it in the
item container with the formula ${STRMod + item.damage}$.
Yeah I read that but like ... I don't understand how "item.damage" would know which container, or item to 'fetch' the attribute from :x
An Item Container acts more or less like a Dynamic Table. You write a formula for a whole column instead of for every row. That means, that it item.damge will be processed in the context of the same-row item.
If you need stats outside of the Item Container (for example for modifying Strength of the Character), then use Item Modifiers.
Lets say the item container is called "Perks" and the perk is called "Perk1", could I get an example for how to get an attribute from Perk1?
I'm sorry for asking so many follow-up questions, but, I really did try and understand the FAQs and Container documentation, but it doesn't really sink in :x
Not possible. You have to think the other way round with item modifiers. Item Modifiers are actively setting/modifying a value without mentioning them in a formula. Look at this example: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/FAQ/Frequently-Asked-Questions#q-i-have-an-item-container-with-inventory-items-and-i-want-to-sum-up-the-weight-of-each-item-but-sumfetchfromdynamictableinventory_container-weight-doesnt-work
I'll have a look at that I suppose :x
It can also work without []. The important thing is, that the formula is correct (e.g. removing all ::)
Wompy, this is just a quick example. You make an item template (your item sheet, essentially) then create an item with that template. open the item, set your item modifiers that will affect your sheet. Then create an item container on the actor sheet, setting which templates it will allow in it. The only thing you need to do then is drag the item from the list over onto the sheet. It will automatically modify your sheet. In this case, adding 1 to my Strength
Appreciate the reply. I'm currently having issues with the container not properly overwriting some of the formulas used to determine the total of something.
Even if I change it to this, it seemingly doesn't care for the STR value being modified.
And the times when it does seem to care about modifying the STR value, it completely negates it :(
In your pictures, you wouldn't be modifying str, you'd be modifying the keys, (Traitdescription, mcapacity, mmobility) so I'm not sure I understand. The formula is how you want to modify those keys
So if I have bCapacity = STR*15+50 but I have an Item which is bCapacity STR*10 why isn't it working? :(
It's almost working as I want them to, but, it's being quite difficult.
Like ... How tf does this happen?? Why is Capacity 0 now.
what part isn't working? what are the keys for the first column of capacity, 2nd, 3rd
So it's <stat name> <bStat> <mStat> <stat>
(stat) being the Total of (bStat+mStat)
I'm hoping that instead of bCapacity being STR*15+50, it becomes overwritten by "Small Frame" (the Item/Trait) and becomes STR*10
Martin may be able to answer this better. But I'm not sure you can just use STR like that in your formulas. Try a formula that doesn't require any keys from the actor sheet, should work fine. Items and actors are separate sheets and often need syntax that lets them pull info from one or the other. It looks like you are trying to have an item read STR from the actor right? maybe fetchFromActor would work? I'm not that great with the code stuff, still learning myself lol
I basically started using this 3 days ago, I've done most of what I could do in that time, as well as learning a few new things here-and-there, but, it's hard to do this stuff on my own because the documentation doesn't go as in-depth as I would like with some of it's parts :(
It's a learning process for sure.
I'm still not very good at it lol, I just try to help out with some of the easier questions
Item Containers are dope as hell, but it's frustrating when something so simple doesn't want to work >_<"
There are some limitation you have to be aware of:
Modifier.Keyhas to be a component-key of the ActorModifier.Formulacan only use data from the Item. You have to usefetchFromActor(), if you also need data from an Actor- Item Modifiers can only modify Labels. Other components cannot be modified
sorry by advance for the numerous questions. I'm very excited about this tool and I'm eager to learn :p
I want to have a clickable label that for instance throws a d100 and then takes this result to draw from a rollable table (to determine the location of the attack in warhammer v1).
I managed to have this script, but I'd like to see the "nice dice" rolling as well... Not sure what I'm msisgin
I'm happy with Labels being modified :)
I saw that, just wanted to list it
Isn´t it a Foundry-Setting, where you have to enable dice-rolling for Roll-Tables?
yes ! thanks a lot Martin !
What the heck am I not doing right here???
I just noticed that it can be done like this as well, still need to work to make it work
Might be this one: https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/286#note_1502121021
Actually, this seems to be already fixed in the beta 😅
I guess I'll struggle Dynamic Tables in the meanwhile lol
Thank you (and everybody) for your suggestions! I’ll experiment more soon, since I’ll be away from my desktop I’ll have to come back to this. I knew the icon wasn’t related to the formula; I just didn’t about that option and it looks good so I’ll be sure to explore icons and ways to make my sheet more spiffy too.
Without redoing a bunch of attributes, is there a way to re-order some things that I'm unaware of? If I wanted to move "example1" to the top of the list?
nope 😅
:'( but my OCD will kill me if I cannot alphabetise it
is it possible to calculate a separate formula off one roll? Ex:
damage = [2d10+str]
stun = (:damage:-5)
Result in chat:
damage: 14
Stun: 9
You almost got it right 😅 https://gitlab.com/custom-system-builder/custom-system-builder/#47-reuse-formula-results
lol, i was here just guessing. I'll give it a look, thanks.
another question if you're still here. Id like to make a conditional addition to a roll in chat message. Something along the lines of a drop down with standard attack option, or blind attack option that adds a 50% miss chance, and a third option that randomly chooses a body part to strike.
Roll tables work well for the random results, but I'm not sure how to set it up so that it adds the results in the chat, based on the drop down. Would I create 3 totally separate roll formulas (1 with just damage, 1 with damage and roll table1, and 1 with damage and roll table 2) tied to the dropdown options with switchCase? or is there a shorter/cleaner way?
example result in chat:
standard attack! (dropdown option1)
total damage = X
blind attack! (dropdown option2)
total damage = Miss!
or this would work
blind attack!
total damage = X
roll table result = Miss!
scatter attack! (dropdown option3)
total damage = X
roll table result = headshot!
(figured it out)
Found an error :D
They are $}'d and not }$
Relatable!
@martin in conditions, can the value be a formula?
Do you mean like ${(STR>=5)?5:0}$ ?
This is one that I use to make sure I don't end up dealing with negative character attributes lol
more like condition ? (str+5) : (str+10)
I couldnt get it to work and ended up using switchCase anyway, which worked. but I may have goofed something up with the condition statement.. I'm horrible with knowing when to use ' ' and " " lol
Depending on the situation you may be better off using switchCase(target,'string/value',<true>,<false>)?
Could definitely do that.
Yeah ended up figuring it out. Was just in a weird predicament where my dropdown was just subtracting from a Total, which is easy, but then one option had to floor the total to 0 no matter what. Ended up doing this, Stun is the dropdown key.
switchCase(sameRow('stun'), 'None', 0, 'Heavy', Roll, 'Medium', Roll-5, 'Light', Roll-10)
${(STR<=5)?(STR+5):(STR+10)}$
Obviously you can change the initial condition to whatever you need lol
Took a while to do because my Foundry's been a little slow. It's been opened for ~18 hours lol
yeah, i've noticed i have to restart foundry sometimes because things will get laggy. especially if I mess up some formula and the sheet goes bonkers lol
I always mess my formulas up >_>"
I literally double-checked to see if what I sent you would work, only because I knew I wasn't going to get it right lol
lol yeah, me too
Legit the only reason I started to use CSB was because I knew that Google Spreadsheets wasn't going to cut it as a character sheet
And Foundry is already pretty decent as a tabletop option ;P
May as well use what I had already available
i used google at first, worked okay for a while but was definitely clunky and its nice to have your rolls directly from a sheet. Tried to do sheets on roll20 and they are just not user friendly at all, I'm a mechanic, not a coder. So came to foundry and have been using CSB for a while. Had a basic sheet setup that worked fine, but have been trying to upgrade it with the new features they've added.
I found that was the main issue I had with mine as well. But I had weapon stuff and inventory working. It was pretty danged good.
Engineers are basically coders, depending on the type of engineer haha
it's better than one might think. I've been using that for several sessions and it was ok
I'm trying to setup Shadowrun opposed rolls for shadowrun 4e. I'm not sure how I can make a weapon roll on player 1 cause a targeted npc 1 to roll to dodge, and if necessary, roll to soak. Is this possible?
How would I calculate the sum of each item's weight (here "Poids" in each Item Container table) ?
in other words : I know how to fetch a value from a Dynamic Table, but how to do it for an Item Container ?
maybe it's Core Foundry ?
The CSB ReadMe and wiki are pretty great. For your question:
https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/FAQ/Frequently-Asked-Questions#q-i-have-an-item-container-with-inventory-items-and-i-want-to-sum-up-the-weight-of-each-item-but-sumfetchfromdynamictableinventory_container-weight-doesnt-work
TLDR: use item modifiers
Hey I'm pretty new to custom system builder, so I apologize if this is a silly question or if it's already been answered: I am trying to allow players to link items to part of their character sheet. For instance, instead of having all the stats of a weapon hogging space on the main page of the character sheet, they could just drag the item or link it in a little text field so they can click on it when needed. I tried using item containers for this, but it just copies the item to each item container slot. I tried using different keys and reference labels for each container to no avail. I also tried just dragging items into text fields or using the item id, but those wouldn't allow me to actually click on the item to open up it's page. Does anyone have a solution to this? Is there a setting I just missed or an alternative I could try? I checked through the documentation and item container settings a hundred times and couldn't find anything related.
each item in the container is a sheet of its own, where you can input all the information you want. the player needs only click on the item name label
i'm actually working on items at the moment, here is an example.
yes, that's why I wanted to use the item containers. The issue is that when I put an item in said container it duplicates to every other container on the sheet, instead of just being in that one container. Let me grab an example real quick
oh, sorry I missunderstood. You just need to go into the container on your sheet template and set filters
an item container will show all items dragged to a character. you need to set filters so it shows only the ones you want in individual containers.
I know this is a dumb question, but how did you get the Initiative and other columns on your sheet from the item? This is what mine looks like
I'm sorry if this is kind of nosy, but would I be able to see how you formatted the item containers for your armor section?
so I can't just have a unique item for each container? They would all contain everything attached to the character within that filter?
create labels in the item container, should be a + to click on your template
for mine i only have armor template clicked for the armor container. There are further filters I haven't even tried to play with yet, those mayy be what you are looking for if you want it filtered more.
nah i think i'm looking for something completely different :/ I was just hoping to straight up link to an individual item
thank you though
I only have 3 different templates built. they all show up automatically in the item container component. mine was as simple as just check marking what I want shown.
well darn. back to the drawing board >~<
sorry, I guess I'm not entirely sure what you are trying to do. Kinda just sounds like super specific item containers, like left hand: shield, right hand: sword.
yeah pretty much
I saw somewhere you could just link specific items in base foundry but I tried it and it didn't work
it was like a 3 year old post so i'm guessing the info was just out of date
i haven't played with any of the added filters but i thought that is what they were capable of. maybe one of the gurus can confirm when they see this.
i hope so. I tried reading the documentation for the advanced filters and it kinda made my head spin X3
sounds like you just need to put in a key as your filter. so if you put some check boxes like equipLeft or equipRight then create a filter that looks for that key if checked. I can't say for sure how to se them up, that was further down on the list for me lol.
yep, just verified it works
np ^_^
Is that SR? I have a german SR-6 Template if you need
That may be handy. I am trying to make SR 4.
here
Thank you!
@formal goblet do you know how I could get this to work?
${?#{DamageOptions}}$
${switchCase(attackTally, '1', "[#Scatter Attack]", '2', "[#Scatter Attack]" "[#Scatter Attack]")}$
the pop up asks for how many extra attacks. the intent is to get it to use the roll table X number of times. and eventually roll damage X number of times. So that 1 chat message has X number of separate rolls. not just X dice piled into 1 roll
Not possible. You´d need something like for-loops, which is not supported at all if you don´t use Scripts.
ahhh that scripts thing again lol. if i do some tutorials on JS is that enough to figure it out or do I need to be really good at it?
I doesn´t harm to get some experience, but I think it won´t be done that easily
for loops are a basic in a ton, if not all, programming languages. idk what you'd need to do to incorporate them though
you'd probably have to dig into making custom modules or systems, unfortunately
worth putting up a feature request? or too much for CSB to handle?
You can give it a try. I just don´t know myself if it is easily doable 😅
The issue wouldn´t be the for-loop itself. It´s how you plan to process the results 😅
Well, no worries, just working on QoL upgrades to my sheet. Won't kill people to click a button more than once lol. Its just nice having everything play out in 1 message.
Martin may I request your wisdom?
You´re allowed to speak
XD
I've been trying to find a way to link to an item on a character sheet in an individual slot. would you by chance know of a way to do that?
if you give me one sec i'll grab a screenshot of my project for reference
i'm looking to essentially just drag items over into a text field. closest I can find is the item container but it won't let me just have unique or separate items in each container
Either you specify Filters in the Container or you create a Rich Text Area in Dialog mode, where players can drag their Items in it.
OH the dialoogue mode was probably why it wasn't working!
it worked thank you ^-^
i originally tried it in the default mode and it did not like that lol
Yeah, I know. It doesn´t like the other 2 modes
You sure you don´t want to use a Dynamic Table for your skills? Would be more convenient I think 😅
Once we have an item that provides information in a key in an item container, how do we draw that out to use in rolls?
Like would I use any of these stats on a char sheet?
Well... Just think of Item Containers that they don´t exist... You have to redo the formula 😅
That's ok if I have to rewrite a formula, but if I have a pistol's damage, how do I read that on a character sheet that has the pistol equipped?
I haven't actually done any combat stuff yet, so I think I'm early enough I don't have to rewrite anything.
You can read it in the Item Container with item.key
Right, that's how I'm reading those predator stats. If I have multiple items, how do I tell them apart? Since I'll have armor and a weapon.
Uhm. They don´t know of each other
All you could do to transfer stats from an item to the actor would be Item Modifiers
I may be approaching how to use items wrong. Is there a tutorial for that besides the write up in the github wiki? I'm very new to Foundry, and I may be missing something.
The Readme and the Wiki are basically the only sources
probably would be lol. I'm mostly playing around cause I only started using the custom system builder a couple days ago. I'll definitely try it out!
I thought I could make a weapon, then provide its stats to the actor sheet to pull for combat, but the only way to do that is item modifiers?
Instead I have to do it the other way? Where I provide a roll on the item and it uses fetchfromactor?
As long as the weapons don´t have to know of each other, it should be all doable with an Item Container, where you also define your Attack-Rolls
Ok, so I would define the attack roll on the item itself, and use fetchfromactor to get the skill +attribute off the character sheet?
You would define it in the Item Container
Ok, I see the difference, I think.
The Item Container has already access to both Item and Actor data
I'll have to see how you did it in the German SR6 that you gave me.
I hope it´s not overly complicated xD
I'm just being dumb. Most everything else has been pretty easy.
If you need some inspiration
So if you wanted to add the actor's strength to that fist, you would use fetchfromactor on the fist to get the strength?
And you could see that in the item container?
I may be saying it poorly, you would use the fetchfromactor method on the fist sheet to fetch the strength from the actor when the fist is equipped.
Nah, you would just do ${Strength + item.Attack}$ if Strength is a character-stat and Attack an Item-stat. Item Containers have still access to both ones
OH!
And I could put ${Strength + item.Attack}$ in the item container column label?
Yeah
I think I got it. Thanks for holding my hand there.
i mean you can do a lot of rolling on the sheet from the labels you can create in the item container section. I have too many damage options so I just do those ones from inside the item sheet. You have some options though
I think that makes sense. I just wasn't thinking clearly about the interface between item and actor.
Is there a way to make a global modifier on all rolls?
yeah its either item.key when on your actor sheet, or fetchFromActor when on the item sheet
Just create a Label, modify that and reference it in your rolls? 😅
Yeah, I just didn't think about it until I'd already made alot of roll buttons.
lol, redoing formulas on my sheet after I think of a better way to do something consumes most of my time with this project
How can I adjust the width of a column in my roll message?
I remember when I had to do that after I changed the key for all my attributes so it looked nicer haha
Martin, in those two pictures you showed earlier, how do you get little boxes under the checkblocks in the item sheet? When I do that, I get a false.
Like yours had "bludgeoning-protection" that was checked.
Hello! Not sure if this is how I am supposed to handle the questions in here but here goes nothing, LOL!
I recently got into CSB and I'm trying to use a custom CSS Style File... I have inserted the path into the field in system configuration, but my templates are still the same. How does one is supposed to use a custom CSS Style File? Am I missing something?
does your sheet use the css classes you defined in your file?
Did you check in the console whether or not the css file was loaded ?
Oh i knew the main git page help but had not realized there were more pages/an FAQ. Thanks a lot.
So thanks a lot, it is super clear + I was most likely going to ask all the questions of the FAQ at some point haha
Hello all. I just started with CSB and try to figure things out. Trying to understand formulas. The README links to ressources, but the links (screenshot) give me a 404 error.
Can anyone provide me the correct links please?
Apologies, could I get an example of what you're trying to do with formulas? :)
I just want to learn the syntax and get an overview of what can be done with formulas
Well, you can do basic stuff like ${ 10 + 5}$ to more complicated things which involve dice rolls, where the number of dice used depend on a value within a label such as ${[:damage:]}$
You can also use a components key, so if you have a number field with a value of 10 and its Key is called "characterStrength" you can write ${(characterStrength<=1)?1:characterStrength}$ which would prevent your character Strength from displaying a minimum value of 1.
Ok, thx. I would like to learn the syntax for this, where do i start? Is there a kind of reference manual to start learning? As i mentioned the corresponding links in the readme dont work
For me I did much of my early work using uh... switchCase(), it functions basically like a multiple "if" thing.
But as I learned how to do conditions ${(<variable/string>=5)?<true>:<false>}$ I overwrote a lot of the first code I did
(Just now realised it doesn't actually answer your question)
indeed not 🙂
Most people on this Discord are pretty good with offering help and advise, etc.
I'm new to this myself, so I'm not exceptional. But if it's really basic, then I can try and help
That whole page has a lot of materials you can referrence when trying to do your own things, but, I found that some of the examples aren't as in-depth as I would like.
But it's still a very good place to start
already read that, but it doesnt teach the basics im afraid. my screen from above comes from this file
im looking for a link that teaches most basic syntax
That link to formulas is as basic as it gets, or scroll up on that page and read from the first section. That's the page all of us read/refer to get started.
I got to do something fancy, took me 2 hours to figure it out haha.
${fetchFromActor('attached',concat('Skill',ref('weaponskill')))}$ Turns a field into a string used by skills for an actor. Took way too long.
can you see the links i marked in the screenshot above? this is from the readme and the links dont work (error 404). im looking for working links
yeah, i don't know what the 404 is all about but his link and this one work fine https://gitlab.com/custom-system-builder/custom-system-builder
sorry replied to wrong person lmao
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
quietly bookmarks
@formal goblet does a roll message accept any HTML beyond <tr> <td> or does it need css? I've tried to adjust the width of columns using td width="100px" but nothing happens.
It should accept any HTML
Any ideas as to why "Secondary" is copying the contents of "Main"?? I thought the initial issue was because they shared the same component key (being none) but it still continues to happen.
item containers are universal, all act as one until you set filters for them.
scroll not too far up, there are some examples of how I used filters to separate items. You can get pretty picky, even setting, for example, one item container for what is equipped in just your left hand by setting up a unique key on that item and then adding that as a filter on the container
I'm really not understanding lmao
Eventually I would like to have people add mods and whatever else to weapons, so if someone has the same gun (for example) but a different mod attached, it wouldn't work... right?
so im guessing main is main hand weapon, secondary is off hand right?
They're just weapons which people can swap between. I suppose at the minimum I could just have a single weapon thing (as accessing inventory will cost AP anyway)
so one item container needs to have the filter main is true, the 2nd item container would have secondary is true as filters. Then on your sheet somewhere set up 2 checkboxes with those keys, main and secondary. when checked the item will show up in the appropriate item container
in the picture above, my sheet is on the left, the item container component is in the middle, showing a filter, the right box is the item, near the top you can see a check box.
Hmm. Alright, I'll have a play around with it.
I'm going to use Radio Buttons just to be different though ;P
Okay I officially have no clue how to do this lmao
I woudn't know how to use radios, haven't tried yet
They kinda work like a group checkbox. Kinda awesome.
You have a bunch of radio buttons and only one of them (from that group) can be 'active'
yeah, i just havent thought about how to use them as filters, since their key is shared. I think
Well they have a group key and an individual key
But the value for each radio button can be assigned
So, "main" weapon would be 1 and "secondary" weapon would be 2 (if they're 'active')
oh, gotcha, so whats the key for your main weapon radio? go the main item container and create a filter for that, still not sure how it would work with radios. check box would just be set "main is true"
My god this is annoying lol
I'm going to go crazy
IDK what the hell I'm doing wrong >:|
This feels like I'm trying to solve a procedural rubik's cube and it's not fun
@brave trench Still no progress. It's being difficult for absolutely no reason :|
I don't understand how Radio and Checkboxes are basically identical, but outright refuse to work in this instance.
Changed to checkboxes
Still no progress. I hate this.
what is the radio to the left of your item container for? And take a ss of your checkbox component opened up.
Should show up if checkbox is checked. Did you create a new item from the item template? (they are 2 separate things, just like a sheet template and an actor) and then drag the item onto your actor sheet from the list?
It was disappearing into the void. The items intended for the container would be found when I made a new item container.
These are the test items I have test<template used>
that container you have is looking for weapon templates and items that have the primary box checked. nothing more to it. So make an item using the weapon template. Then drag onto your actor.
Yeah I do that. because I have 2 item containers intended for "weapons", they show up in every other "weapons" item container.
I have no idea why this happens, it's the most frustrating thing -- You'd think a container with a unique key would store it's contents independantly, but evidently not :/
I've been trying to fix this issue for the last ~90 minutes.
fix/address.
well you need at least 1 container that shows all items together, so that a player can alter it, like opening it and then hitting the check box to set it as a primary weapon. The act of dragging an item from the folders, to your character, creates a copy so that a player can alter their copy without altering the base copy that everyone else would need to use.
I'm 1000000000000000000000% sure this isn't supposed to be like that
If I delete one of them, it removes all the others.
I'm not sure what the radio buttons next to your containers are trying to do, maybe they are interfering?
I'm not sure whats going on in that upper right pic, but why have 4 item containers for traits? Should just use 1 container. as you dump trait items into it they will form a list of all of them
The last 3 pictures were to demonstrate why I'm having so many issues with Containers.
The Radio buttons were me trying to achieve what you had with Checkboxes, but even after exceptionally angry with trying to get it to work, I swapped to Checkboxes only to have the same thing occur - ZERO progress.
If you want two containers to not show the same items, you have to put filters. Like, I had "equipped" and "unequipped" so without doing anything, an item would go into both lists. I think that's what you're running into. You need a couple of filters for what you want, Wompy.
bottom right pic looks normal if you have 4 containers with no filters/keys setup. not sure about the other 2 pics, but i'll say this, if something with your formulas are off things get weird. There have been many times i screwed something up and angered the sheet lol. Pretty much would have to restart foundry, reload only the template, fix it, then open my actor sheet.
There really doesn't need to be any formulas though with item containers. at least for basic functionality.
I had the filters and everything set up perfectly (even used Labels to make sure I was getting the correct value) and it still wouldn't accept the items that it was supposed to.
Instead, I would find the 'rejected items' in any new container that I made.
I just wish it was as simple as "set a key to this container" and then you won't get magical duplication of items in every other container.
Are there any json exports of a system that is "feature complete" that someone is happy with in English that we could use as a go-by? I ran into a similar issue yesterday where I was doing something that was a little off from "the plan" and I had a bad time.
Martin gave me an SR6 in German yesterday, but my German is worse than I thought.
I was gonna say, martin has one. I'll be honest though, incorporating someone elses formulas is harder than just doing your own, because everything is so interconnected in 100 different ways.
I'd just like to see how someone does item integrations and things as an approach. I'm more thinking about the structure of how objects are supposed to interplay than about stealing specific rolls.
Here is just an example of my sheet. top is actor, how it comes out, bottom is the template, and the right is the melee container. Notice how i've checked both melee and ranged templates because my ranged weapons have melee stats (cuz who says you can't beat someone with a pistol? lol), so I wanted all melee attack options in that left container.
I havent even got to using specific filters yet, but I did a check box example earlier for Wompy and it had no issues.
@formal goblet do you guys have a Patreon?
they use https://ko-fi.com/linkedfluuuush for donations if thats why you were asking. I haven't seen any mention of a patreon acct
yes donations. And maybe a dedicated Discord for this awesome project
I have an unattached item that is trying to gather the contents of a dynamic table. The dynamic table key is found in the actor "Setting". How do I populate the drop down in the item with this data?
It is supposed to be like this because Item Containers only hold a link to an Item.
Formulas are not allowed there, so it´s not possible. The only thing that works is if the Item is attached to an Actor, you can use parent.key
We don´t have a dedicated server, and Kofi is the only place so far 🙂
I am trying to predefine items as Skills which require an associated attribute. I would like to dynamically draw the attribute names from a common actor containing Global Values. Is there any way to dynamically populate a dropdown list in an unattached item?
Nope
darn. Thank you
I can tell you what you need. Make sure you follow these instructions exactly:
-
Create 2 Item Containers for the Actor. It doesn´t matter, which component key they have.
-
Select for both Item Containers the same Item Template filter (e.g. Weapon-Template).
-
Define in your first Item Container the following filter rule:
equipState is primary -
Define in your second Item Container the following filter rule:
equipState is secondary -
Go to your Item Template and create a Radio Button with component key:
primary, group:equipState, value:primary, checked by default:true -
Create a second Radio Button with component key:
secondary, group:equipState, value:secondary, checked by default:false -
Do not hit
Reload all item sheetsif you already have Items in your Actor. Instead, click on the attached Items in there and hit the reload-button. -
When you have done that for every Item in the Actor, press
Reload all item sheetsin the Item Template and reload the Actor-Template. -
Profit
taking notes on how to explain things more clearly lol
@formal goblet Do you have a json export of a feature complete ruleset in english that we could use as a reference for best practices as far as handling items that represent in-game items, feats, etc? You gave me the SR6 one yesterday and I'm still fiddling through it, but I way overestimated my understanding of cyberpunk German.
@formal goblet confused about this Error. Everything is working, so I'm not sure what the error is... Here is the code that is throwing the error.
${#?#{ExtraAttacks}}$
${#setPropertyInEntity('item', 'currentAmmo', "item.currentAmmo - attackTally")}$
extraattacks is a user input template. it has 1 field keyed attackTally. It pops up, I enter my number, and it deducts from current ammo no problem. I woudn't even know there was an error if I didn't have the log open.
Ignore it, it comes from ?#{ExtraAttacks} 😅
Hi Guys, i have a very basic question as im trying to figure things out. Im new to CSB. I created some number fields in my template for to input values for attributes like dexterity etc.
Later on i want to be able to modify these attributes with active effects. Lets say, my effect "Wound" will reduce dexterity by -1. The readme says that i cant modify number fields, right?
What do i have to do to see my new, modified value of dexterity? If it was originally 15 in my number field, i would like to see something like Dexterity: 14 (-1), so that i know it has been modified.
Maybe the new value could even be red because it was decreased (green for increase). Any help would be appreciated.
Instead of relying on only 1 Component, you´d create 3 for each attribute: 1 Number Field (BaseValue) and 2 Labels (Mods, Total).
little question, if i fetchFromActor something that is text from a text box, how do I use that to setPropertyInEntity? When I do it, I get back [Object object]
like this 🙂
you have more details here : https://gitlab.com/custom-system-builder/custom-system-builder#312-item-containers
Thanks!
you're welcome 🙂
@formal goblet I found where you provided an english copy of templates to show how things can work here: #1037072885044477962 message I think you could save yourself alot of FAQs if you're able to pin this. It's great stuff.
Done it. Still isn't working ;/
"Stupid container" was made after trying to drag the item into the container.
Value is wrong
I don't believe it is
Item containers are just cracked out. I've never ever in my life been this frustrated by something which should be SO SIMPLE.
It is. Value should be primary or secondary
Did you also reload the Item in the Actor? Reload all items doesn´t apply to Items in Actors.
I did
I promise you I'm not that clueless
I spent 90 minutes trying to do this whole thing last night and it was absolutely the most frustrating f--king thing I've ever encountered in my life
Which versions of Foundry / CSB?
This is honestly a make or break thing for me. I don't understand why containers can't be "unique" so you can just choose a template and call it good from there.
I want players to simply be able to drag and drop their weapons into the containers with a radio button outside of the weapons, and choose which weapon is "active" by those radio buttons.
And instead, I'm struggling with what can only be described as an incredibly simple task because it's needlessly complicated.
The radio button has to be inside the Item, it cannot be on the Actor.
That seems so unintuitive though
Everything else in CSB is fantastic. Item containers (when they work) are an absolute godsend, because otherwise I'd need to hardcode all the values for these things and I'd rather honestly not.
I'm curious as to what you're trying to achieve and what's getting in the way?
@sharp geyser
I just want to have 2 containers which hold weapon templates.
To the side of those containers, there's a Radio Button which marks one of them as "active"
The "active" weapon will have some stats displayed, etc (panel & label) as well as a few other things.
But the containers are finnicky and not playing nice, and I'm frustrated with trying to get it to work.
"Finnicky" being how I describe the Containers essentially not holding a single item within them, and not "sharing" duplicating their contents with other similar containers for a specific template.
Hmm before I say anything, could I see what it looks like on the character sheet? Both the item and the section of the character sheet.
I see fair, for now I'll just say that you'll have to specify which item container the items goes in (unless they ALWAYS go in the same area then just duplicate the template and make one for each). I used a drop-down list for my inventory switches, it's a little weird but it works and it doesn't waste too much time (plus it's helpful enough seeing descriptions when you use an item). If the empty table looks wrong and it's not too pretty, then just hide it with a formula (under advance).
I can't say I 100% understand what's going on though with your description. I'm a bit busy atm, so Im not sure I've actually given a helpful answer. Regardless try to be more polite about the system, it's not perfect but that's because it's not easy to make this possible. Try to treat the devs and their system with a little more respect, it's easy to get frustrated but sometimes ( a lot of the time) certain issues don't have straight forward solutions.
I'm pretty sure what you're trying to do is super possible though, at least in some way.
I really do like the system but this issue with the containers has cost me ~3 hours of struggling
I've lost a WHOLE lot more than 3 hours from struggling working on my system with csb haha, but I understand the frustration. Sometimes very specific things weren't considered and just aren't possible. Other times you just need some time/help to figure out a more unexpected solution.
I’ve only started like four days ago but I’m hoping to lose more time with productivity and not from hitting a brick wall
Any idea as to why this isn't working?? It's been my personal hell for the last 15 minutes.
Even if I put change :Accuracy: to be (Accuracy) it's no different :/
ok i'm not sure what you want to achive and if this synthax is really necessary?
i guess you want to check if the target is hit. for this you roll 1d100 and substract Accuracythen you check this against the TargetAC. and the result "Hit" / "Miss" should be posted?
my solution for this (if you don't need to roll multipe times and count successes - but i don't see in your example that you would need that):
${roll:=[1d100]}$
${(roll-Accuracy)>=TargetAC?'Hit':'Miss'}$
gives the first picture.
${([1d100]-Accuracy)>=TargetAC?'Hit':'Miss'}$
is the second picture.
the third picture is the setup of the sheet.
is this helpful?
I did get it working before this -- But I should have removed my post after I solved it :x
Currently having more issues with getting the damage roll to appear only if the attack hits (within the same roll formula)
How can I set up a field that auto-calculates it's value from some other values?
I.e. C needs to be equal to A+B where A and B are values that the user entered
is the number entered by the user or is it handled "behind the scenes"?
If I read your question
I'd have my answer lol
can you post yor formula for this?
C would be behind the scenes
do you need C in a formula or does it need to be present in the actor?
You'll want 2 number fields with key names, "key1" and "key2", in your formula you can use ${key1+key2}$ and it will give you what "C" would be.
It needs to be visible to the player.
Was as far back as I could go with it. But I just gave up.
yeah then what @sharp geyser said. create a label with the label roll message ${key1+key2}$
What sort of item would I put that in? Can labels have a formula as their content?
Thank you
Items will interact with any keys placed on them, which are shared by the actor. For instance:"Small Frame" when it's on an actor will subtract its "Capacity" value from the Actor, while adding 0.5 Mobility to them.
It shouldn't roll anything, just be there on the sheet. Basically three different classes of XP add up to an overall prestige level
Then you'd just place it in the "Label text (optional)" instead and it'll work as you wanted :)
Thank you
Starting a fresh CSB World with no Modules active, is see these error message in the console:
Is this CSB related and do i need to address this or ignore?
I don't have a clue :s
sooooo i did some testing and this should maybe work for your use case?
%{let Check =(${[1d100]}$-${Accuracy}$)>=${TargetAC}$?"Hit":"Miss";
let Hit = ${[5d10]}$;
let Miss = ${[3d6]}$;
let result = Check==="Hit"?Check+" "+Hit:Check+" "+Miss;
return result}%
uh
for me it works so there should be some issue with the keys i think
can you F12 and look at the error?
😄
for the chat output you can style it in the line let result = Check==="Hit"?Check+" "+Hit:Check+" "+Miss;
i just added a space between the Text and Number result.
But you can also do HTML stuff
I can do maths, mostly because of my time with spreadsheets but this is a whole new thing lol
Most of what I struggle with is learning functions, etc. Because I only work within the constraints that I know :(
well i went to only work with script macros instead of label rolls. CSB language is hard to get things working. esp. if its complex. for example i don't know how to properly style chat output. for macros its javascript which is more straight forward - at least for me 😅
and in the end its just a question how many buttons do you need in your sheet for the player or can you just use macros because you don't need to click buttons in the sheet 🤷♂️
ALL OF THE BUTTONS
well here is an example of my macro button which creates buttons 😅
fancy :O
I want to eventually get to a point to minimise player work on their character, so that'll mean damage, health, ammunition all being done automatically.
But this is what I did on an old sheet trying to accomplish the same thing as what I hope to do on CSB.
All those yellow, white and red text cells are automatically calculated based off character stats and a vlookup table for the item which was active
yeah - this was my task in the beginning too. then i kind of gave up on doing it with CSB 🤷♂️
so now i just use macros and world scripts to do all that stuff.
i think with the new CSB version you can now achieve a lot more than when i started.
stuff i do:
- automatic attack resolve with damage/health/mana calculations
- ALL the attack ability automated
- items/skills/ability as drag and drop
- automatic status effects (like burning etc.)
- automatic minion summons for "summoners"
- semi automatic trap placement
- automatic loot generation with rollable tables
- auras which influence the player depending on distance
- more i don't think of at the moment
Loot generation would be amazing
But I think for me I'll be trying to have 'tiers' of equipment which will be added randomly to enemies.
Just so the players don't have the misfortune of fighting a dude with a rocketlauncher at level 1 haha
I'm trying to do drag and drop perks but I was having a heap of issues with Containers -- I've given up on that for the time being, but working on other stuff.
example:
i get a querry of how many items get rolled.
then an item in a chat card gets created
the player can just drag the item into the sheet.
That's awesome :D
my inventory which i'm pretty happy with
yeah containers is a little tricky but i did it with a dropdown (as described above)
For me I'm considering having the weapons be where a player rolls their attacks from
But: there's also part of me which wants to try and migrate the 'attack' button to the container it would be at.
well i think martin can help you with this approach a lot more than i - i just add the stats of the items to the actor and then use the actor for all rolls (which are done by macro)
so not sure how you would set up the containers and labels in the right way so you could roll properly from them 🤷♂️
Yeah I lost a significant chunk of time trying to figure out containers and filters, but the only solution which I got -- Though I'm thankul for -- Wasn't how I wanted to do my items :(
is it possible to activate my own attribute bars in default token settings?
I can only add them in each individual token but not in default
Do you mean each template or the actors themself?
see the screenshot please
Hmm idk. I haven't bothered to mess with that stuff ;x
funny, i was just now thinking about the same thing. I don't think it's possible
he means having the attributes bar by default visible for each character
right
you can set them for each token manually
but @sharp geyser you can't set them for the whole game
i think the workaround would be to prepare each scene before hand, but it's a bit complicated to re-do the settings for each characterr
same here for me
@dense pine
FWIW using the Heath Estimate module, you could at least displlay the status (uninjured, injured, badly injured, etc). It can be displayed on hover or all the time.
ah ok that would be a good solution
Has anyone has success with the user input templates? I'm either unlucky or somehow missing some incredibly simple, but crucial detail.
"Character Creation" belongs to a test actor.
did you enclose your statement in formula delimiters?
i.e. does your label roll message look something like ${?#{test}}$?
I copied what was on the documentation. Admittingly I don't know much of anything about the syntax,etc for this. So every time I learn a new function I push through a bunch of new ideas haha
yeah I made the same mistake when I first tried to do user inputs
I do like how robust the system is, but the documentation needs to assume that nobody knows anything (much like myself)
I asked a question which was essentially how to round down to 1 decimal places and I'm pretty sure i stunned everyone with the stupidity of my question lol
Worked btw :)
Follow up question: If I have a numerical input on it. How do I interact with those values?
I've seen much worse, but indeed at the beginning it's maybe not clear enough. Maybe we could all participate to add some information / examples, if it's of any interest to you @formal goblet ?
use the key assigned to that value input. No different from other formulas.
Oh wow. Simple as hell haha
Just like me. (simple)
I'm sad to see that the input dialogs don't update anywhere near as frequently to actor sheets, etc. Trying to keep a live count of something is proving a little odd.
"32" should be 70, since it's the totals of all the values.
Messing around with my first roll formula:
${roll:=[1d20]}$
${roll <= DEXT ? concat('SUCCESS! - Quality ', string(DEXT-roll)) : 'FAIL' }$
Rolls 1d20 and compares the Value with an attribute. Works so far. But i want to roll 3d20 and use the "middle one". Is there a MEDIAN Formula? And how would i have to modify my formula to make it work?
3d20dhdl is core foundry for that kind of roll
Hey, I think I’m encountering a bug I was hoping to find some way around? Basically, I’m trying to use fetchFromActor() to grab a stat on an actor sheet and display it on an attached item, to then reference that stat in the item’s damage formula.
Everything works fine until I name the label component in the key, which then makes the formula completely fail to fetch the actor stat at all. Is there any way I can try to attempt this system without giving the fetch label component a component key?
I’ve already detailed this bug in the issues log for CSB, but a friend of mine said there may be a way to still make it work without a key so I was curious if there were any ideas
I was having some issues with fetchFromActor as well. My labels would show up fine, but put the same formula in a roll message and it would throw an error. Trying different variations of 'key' or ref(key) eventually allowed it to work. I'm not sure if it was a bug, or intended, but it made no sense to me why one would compute in a label but not in a roll message. Either way, maybe fiddling with the quotes or using ref() will help you.
Can you use ref() to fetch data from an actor sheet to an item sheet?
Hey there! Maybe someone can help me with this: I'm trying to show a little panel with some information about the target (if there is one selected) on the sheet. Putting down a label with e.g fetchFromActor('target', "name") works, BUT: if i switch targets it doesn't update until the whole sheet is closed and openend again. Any way to go at this better or a trick to force an update?
never actually tried this before, but does the recalculate function do what you need?
I was also wondering if recalculate could force updates cause I’m having a similar issue with my above system
Admittedly I’m not super comfortable with formulas yet so I’m not sure how to weave multiple functions in like that just yet
Good idea! I'm going to try that tomorrow 🙂 Thanks1
no, I don't think you can. I'm assuming that fetchFromActor was made in order to do just that, and that nothing else works. I forgot to mention that some of my issue was me first referencing a drop down on the item that then pulled from the actor. Either way, there was some inconsistencies when it came to using fetchFromActor. Having a label work fine with the same formula, but not roll message, made it awkward.
Word, it sounds like a lot of people are having issues with fetchFromActor. Hopefully it gets resolved soon
Its a new feature... not surprised its a little weird. Its definitely nice though when it works. before there was no way for an Item to pull from an actor.
Oh was it just recently added? I’ve been using CSB for like a year now but I haven’t kept up well with when certain things were added
yeah, almost certain anyway. The recent update was pretty big
Word, makes sense then. Might just have to give it some time then
Good Day, I am designing a character sheet using the Custom System Builder world type and want to use item containers so players can drag and drop items in their character sheet. I would like to use an item container for equipped items and another for stored items. When I drag a new item to the character sheet the item is added to both item containers despite them having separate keys. Is anyone familiar with item containers in the Custom System Builder world type? Am I using the wrong tool for the job?
you need to open up the item container component and make use of the filters. you can filter by template type, or by keys on the items.
the key filters allow you to be very specific, sounds like what you'd want to do.
Thank you for your reply @brave trench. I see, so I could add an equip field to the item template that a player could select to allow it to be equipped? Do you know if there is a variable that can be set to associate an item with a container as it is moved instead of having a player add an item to their inventory then select 'equip' and then move the item over?
From what it sounds you want to have an 'equipped' checkbox for the item container, which it would then be moved to a different area?
Like, you have your 'inventory' and ticking a checkbox outside of the item would move the item to 'equipment'?
I have a userinputTemplate which asks for a weapons (determined by selecting a checkbox), I'm having issues with getting the value from those checkboxes. Any ideas? :s
Basically what I'm working with.
Not sure I understood. You're having a hard time with checkboxes values or radio buttons selection?
Having an issue with getting the value for the selected firing mode (from the input template) to be used on the weapon template
Would you mind putting out the input template? Not visualizing the full picture at the moment 😉
That button which is simply "-" is supposed to have the firing mode and attack cost on either side.
And those come from the radio buttons, correct?
Well the checkboxes are for the GM/DM to determine what firing modes the weapon has access to, and those show up on on the input window (due to panel conditions, etc)
So, from my understanding, DM choses allowed firing modes and the player can choose one of those when attacking.
Thus, the button you mention takes the values from user input or DM selection? I'm kind of at a loss, my apologies.
So if I shift click on the attack button, then the prompt for the firing mode window comes up. Then the user/player chooses a firing mode via radio button
Don't apologise, I'm grateful to have any input or suggestions at this point. I'm really at a loss.
Thus the '-' button gets its value from the DM choices, right?
At this point, having multiple checkboxes selected does not help towards that end, 'cause the button should get a string of values not just one...if I'm not totally off target, that is.
No, no... The "-" button is determined by the chosen firing mode (or should be) I'm just having issues with trying to get the value from the radio buttons from the input template.
You see? I was completely off target 🤣
I'll try and get a picture as a diagram lmao
Orange lines (DM checkboxes) allow visbility of those panels
Red lines (user choice) are from the visible panels
Yellow line is what I want to take from the Input Panel but can't figure it out
Good thinking 😉
Anyway, I'm just thinking that maybe radio buttons, to function as intended, should be in the same panel to consitute a group which name can be referred to get its value. At least from what readme says and my poor knowledge of html/js 😅
Never used them, to be honest.
Yay, worked, thank you.
Oh my js and html knowledge is non-existant lol
No problem :)
We're basically all on the same boat, apart from devs 😉
My problem is that my ambition is more than my skill level lmao
I can try and make things look nice (due to all the time I spent hecking around with spreadsheets) but making them functional is a different thing all together.
That is how one grows, in knowledge and in all other aspects of life 😁
Just allow me some time and I'll see what comes of it 😉
Personally I do like how "smart" my solution was
Just being thwarted because I can't do anything with it lmao
It shall work, do not relent 😁
Next question, can you do if statements in a label or otheer field?
You can. but I've been having an issue where my conditions will always return either as False, regardless of what the actual result should be.
You can use switchCase(<key>,<value>,<result>)
You can keep adding on extra "value" and "result" 'sections', but they are in pairs of two.
IE: ${switchCase(<key>,<value_a>,<result_a>,<value_b>,<result_b>)}$
In demonstration
The problem is that switchCase (at least to my understanding) needs an exact value. Which can be tedious if you're expecting many variables.
With if the workload for many variables is the same as with switch, I believe. Plus, nesting if can be brain-damaging at times 😅
You're on Foundry v11 and CSB beta or what?
Oh well, looks like I'm having troubles setting up the system on my PC. Sorry, cannot look through it atm.
No problem :)
A simple if-else would look like this: ${condition ? truthy : falsy}$
Hoping I'm just missing something: the checkbox feature "checked by default" doesn't save an unchecked state. How can I make a checkbox unchecked by default?
Foundry v11. CSB beta
If you're intending to have multiple things be checked I recommend using Radio Buttons instead.
It can only be checked or unchecked?
I'd like it to be unchecked by default (on character creation, for example). When I uncheck the "checked by default" in component, then save the component, then come back to the component, the "checked by default" is checked again. So every "default" using the template shows checked at creation. As if the "checked by default" doesn't work
Nope. Just a single checkbox I'd like to be unchecked at creation
Guess I check that out later
Sure
Not high priority
exceedingly pleased about having made this work.
Hell yeah! Good work :)
Depending on the amount of damage types, you could use "Element" instead of "Resistance"
No, resistance is something to do with whether the weapon breaks or not
Hello everyone. Any way I can get a lable icon to change based on a text field? Like when I write "fire" on the text field, the icon changes to the fontawesome fire icon and so on
Alternatively, if there is an easy way to have different lable icons on several items from the same template that would also work
This is how I did it: have one hidden label for each icon I need, then use if in the visible label to select the needed one
You can use the font-awesome html to set icons in the label, prefix, or suffix
No way that's feasable; it would require hundreds of options
SwitchCase or Condition formula
@topaz coyote 's option then 😉
<i class="fa-solid fa-dice-d20"></i>
This requires downloading the icon as an image and setting it, right?
For example
No. Foundry has access to font awesome
Not sure about whether "Pro" fa versions, tho
https://fontawesome.com/icons/dice-d20?f=classic&s=solid&sz=2xl
So you'd use a formula to set the label text to one of the fa icons, like "fire"
<i class="fa-solid fa-fire"></i>
Works like a charm, many thanks!
Nice!
I'll switch to this setting too, thanks 😉
If you filter with a key on the item that is constant then yes it will filter as you move the item to the sheet. My example used a conditional filter with a checkbox.
Can someone give me an example of what a sub template is used for? I read it, but I don't get its purpose.
I think it's just if you have a bunch of stuff you want to make for a lot of templates, or sections of a template you intend to use a lot?? And then drag it onto a template? IDK :S
Yeah, like blocks of code you use often. For reusability reasons, mainly.
I thought that is what it meant but you can drag whole panels full of components/code from one template to another. so I didn't really get the benefit.
Never used, so can't say honestly
okay, after screaming into the void with SWB, I'm setting up with you lot here.
Active Effects: Is it possible to apply an effect more than once (stack) to a token?
It was there before components were draggable, so it kinda lost it´s purpose in todays environment.
There is no logic for stacks
is there a tutorial on setting up items?
You more or less set them up like actors. Besides that, you should read the doc for Item Modifiers and Item Container
Not to worry, I HAVE FOUND THE DOCUMENTATION
What correct function need to be used for visibility if I have check strings?
actor_type can be NPC or USER
I know that I can assume that** 0 is will be USER** and 1 is NPC
and use as workaround - but is it possible use without such trick?
I haven't tried this yet but my understanding is that you should not write the whole formula with the "true" and "false", but only the condition
equalText() is the magical function to compare strings
And yeah, the ternary is obsolete here
okay, trying to string together a dice pool. What would be the best way to go about it? I just want to click button, roll between 1 and 3 dice, and only count values based on <= or >=.
Okay, figured it out, here's the code.
${#roll_pool_1:=[1d6]<=tactical_waifu_number ? 1 : 0}$ ${#roll_total:=roll_pool_1}$ <h1>TACTICAL ROLL!</h1> <p>You've rolled:${roll_total}$ successes.</p>
Long story short, I'm trying to put this together for what is best described as a 1-page TTRPG joke system called Tactical Waifu.
I was intimidated at first, but found them remarkably easy. You can set any modifiers which are on the item (and shared by the actor) to interact with them in different ways. Play around with them. They're awesome :)
Okay I'm quite happy with myself :D
${<Damage>-fetchFromActor('target',string(concat(<AttackElement>,'DT')))))*round(100-fetchFromActor('target',string(concat(<AttackElement>,'DR'))))%}$
It checks the damage element, and reduces it by the element DT (damage threshold) of the target's defences, then reduces it further by a percentage. All you need to do is make sure the keys for the actor and the element in question are capitalised the same, IE, "Fire" (for the element) and "FireDT" (on the actor/target)
You can usually just go <key>==<desired_result>, I like using Strings for mine but I believe checkboxes default to true:false
can you load items onto items? Its not working so going to assume not.
with macro's yes
I tried making a template for firing modes, to be placed on items. Had no success :(
hey, I'm experimenting with moving the code on labels over to macros for better visibility and the increased control that javascript gives. I'm trying to search the selected character's items for any item that has the attribute of "wep" for their weaponType.
Trying variations on:
let actorWeapons = currentActor.document.items.filter(item => item.data.system.props.itemtype?.value == "wep")
but getting errors
data is not necessary anymore
And the attribute is named itemtype, not weaponType
not sure but javascript needs ===doesnt it?
oooh, yeah, I think it does
its giving me a cannot read properties of undefined (reading 'items') error
i'm not sure if your path is right. give me a sec
currentActor is canvas.tokens.controlled[0].actor
try this:
let actorWeapons = currentActor.items.filter(item => item.system.props.itemtype === "wep")
bingo! Thank you!
Does Drag Ruler work wit CSB? If yes, how do i make it work? I put in the key for my speed value in the "Speed Attribute" but it doesnt seem to be that simple. Can anyone help me out?
I know you're not supposed to do this for initiative formulas, but have you tried using the ${}$ format?
yes
is there no way to change the name?
that + sign is for creating tabs, and then once you have a tab a secondary + will appear for you to add the content that will exist within that tab, and each tab can be named individually
no but like how do I change the name in the gray bar
there's no label option for it
there wasn't a component key option?
I see what you're saying. No, this will just display the component key, but that's also template-facing only. When you make the actual actor sheet, the panel name will not appear at all
oh ok
The gray bar and outline will only appear in the template, not in the actors 🙂
just tried, doesnt work either
I suspect you need to route it to the specific template that key is from, though I personally don't know how to write that specifically.
for instance, "GS_sum," can be the key of a component in an actor template and an item template and do two different things, so to differentiate those types of specifications I think the input bar needs to know what template you're pulling the key from
I need to write a doc about that, but you need to set it as actor.system.props.<your key>
big thanks, I was also going to need this info in the near future
that worked, thanks so much!
add a formula in the label roll message section of the "post in chat" button/label with whatever keys (info) youd like to show.
I, have no idea which keys to use for it.
what exactly do you want to show in chat?
${item.name}$ would send "flip phone" to chat.
Anyone care to hold my hand and get me started writing a script? I'm taking JS lessons atm so I get the basics but kind of confused on how to start. I need a script on an actor sheet button/label that sets the property of multiple items in a container at once. Does the script just go in a label and use %{}% instead of ${}$ ? Do i need to know a different way of using keys, or is it the same? as in <item.key>
If anyone has a script that does something similar could I see it? Just having something to reference may help a lot.
There is an exemplary macro in the Wiki, which can update values on multiple tokens https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Tips-&-Tricks/Macro-for-updating-values
And yeah, you´d use %{}% instead
oh wow, thanks! I never even noticed that.
let itemName = args[0];
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];
}
for (const a of actors) {
let item = getItem(a, itemName);
await item.update({'system.props.check': true});
}
function getItem(actor, itemName) {
return actor.items.filter(item => item.name === itemName)[0];
}
This one is even related to items
seems like a lot of it is for targeting tokens. can I skip a good bit of the actor code since I'm doing this from in a sheet?
Some System list Active Effects in the Actors Sheet in a separate tab (and options to add and remove them). Is this possible in CSB too or is it only possible with items to "store" effects inside a sheet?
is there a way to do something like the LotFP skill dice?
in a character sheet i mean
they look like this
and you fill in dots equal to your skill level
closest thing I can think of is make a 2-column panel with 6 checkboxes in them and then maybe a label or number field to calculate the total value
but that'd likely take up a lot of space
yeah
I wonder why there isn't a tool with more freedom in aligning and sizing things
I think for something like this I'd format it more VTM-style and make it a straight line of checkboxes instead of a dice-format. That should net you a similar structure with less space used
yeah I'm not sure why PDFoundry isn't compaitble anymore but it's for sure a shame. There is Freeform Sheets though, which I believe is not depreciated yet and should be compatible with CSB as far as I'm aware
to my understanding there's no automation really available to Freeform Sheets, but it allows you to import a PDF and format things however you want essentially
might need to manifest the URL through github https://github.com/xaukael/ffs it's entirely possible it isn't compatible with the current version of foundry but I've never personally wanted to use PDF sheets so I hadn't checked
looks like it was last updated a month ago
should still be compatible
doesn't look like it's working
how do I manually manifest stuff
try this one? https://github.com/xaukael/ffs/raw/main/module.json
that worked
is there a way in CSB to add prompts to a roll message? Say, if I've made a "roll damage" button on a weapon that posts an automatic damage roll to the chat, can I also add a button to that chat message that allows the target to click on it and receive the damage to their health score?
You may just be able to update the health within the roll using the setPropertyInEntity function, I think?
like have the original "roll damage" button just take the health from the targeted token actor directly?
Yeah. I think you might be able to "store" the damage result using this example, with a few tweaks, obviously.
And then have that stored value be the number used within the setPropertyInEntity with some additional math stuff.
word, ideally I think I'd like to have some kind of prompt for the targeted actor's controller to take the damage themselves instead of the attacker reducing health on their own. With things like, "oh wait that was a crit/ oh wait I have resistances" I want there to be some kind of buffer between damage being calculated and damage being taken to allow people the chance to determine variables before a misunderstanding occurs
I think with enough coding you should be able to demonstrate that
Eliminating human error is one of my favourite things.
Depending on the system you're intending to make, it shouldn't be too complicated to get whether something criticals or not? but I presume quite a lot.
Today I have to mess with updating entity health when an attack is successful anyway, should be a fun time lol
nah you're definitely right. I also take most feature design with a grain of "what else am I not thinking of" in mind, so even though critting specifically might be an easy thing to resolve, it's the precedent I'm trying to address more than anything
gl homie I hope it goes well
Cheers fam
At some point I managed to break my Damage vs. Resistances thing >_>"
So now I have to fix that before trying to get health to work
fml.
is there some way to change how items are displayed in an item container? Ever since updating to the most recent CSB update, all my items individually take up a massive space in the container, but all the screenshots I'm seeing from people as I scroll up this chat show these really nice clean item displays that don't take hardly any space at all
at work atm but will send screenshots when I'm home if need be
Already known and will be fixed with the next patch
oh bet, my b. Wasn't sure if it was a bug or an option I just needed to mess with. I appreciate the heads up
Martin is one of the local MvPs.
Any ideas as to why ${FirearmDamageDT*ref(round(fetchFromActor('target',string(concat(FirearmElement,'DR'))))%,FirearmDamageDT)}$ is returning ERROR? I want it so if there isn't any target for the attack, that it skips trying to calculate the resistance entirely.
Is that ref returning a number or a string? Is that causing the error when the string gets computations on it?
Actually, looking at your code, I think I'm wrong. That gets a solid 1/3 of my errors, so I'm biased.
The function works absolutely fine until I try to do this: ref(<function>%,FirearmDT)
I'm completly baffled by it
What's that % doing in your function? It's also how scripts are supposed to be called out, like %{}% so is it not liking that being used without being broken out with a "" ?
\ is what should be in those quotes
Oh the % is there because it multiplies the ActorDR by a percentage.
If you take that out, does it remove your error?
Damn.
It was worth a shot haha
But nah, I like using *x% in general, better than trying to figure out what a fraction of something would be lmao.
That's cool, I didn't know that % was a valid math operator until you used it.
me smort
But also struggle with basic functions lmao
Two days ago I found out I can use random(x,y) so I'm using that for my weapon damages lol
But yeah, this function man... It's killing me trying to figure it out >:|
Do you need to flip the string(concat( around? The docs say that the concat operator has to be on a string, but you're stringing the product instead?
string(concat(FirearmElement should be concat(string(FirearmElement?
So the FirearmElement stuff all works fine, it's only when I add the ref() that it starts skitzing out.
Since fetchFromActor(<etc>) is being combined with FirearmElement to create the string used for the Actor's appropriate Damage Resistance.
(I've given all my things good naming conventions to make sure I could achieve that exact thing haha)
I'm not sure. I haven't had to use ref() yet. I actually gave up on items and started making dynamic tables for everything, so I'm not sure if my approach is the same.
Gave up is harsh, but I deferred learning to use them until later.
I need to start using tables for some things I think, but they're quite complicated for me lol
are radio buttons always reading as "checked?" I have a series of buttons lined up that add and subtract to a roll depending on which one is checked, but they seem to all be adding in at the same time regardless of which one I currently have selected
Do the Radio Buttons have different values when they're selected? Do they share the same component key
if you're using a ternary if statement, I would presume you'd need the shared key as the ? and the radio options for true/false, but I haven't messed with those much either.
I just have a single value set per button. do I have to set multiple values to each button dependant on whether or not the button is checked/how do I do so? and yes, they all share the same group key but not the same individual component key
I'll try this. I've been using ternaries for each individual button so this might just be me being a smush brain lmao
Could I see a picture of it? Just to help visualise?
yep I'm a clown. Turns out I didn't even need a ternary and just setting up a label that reads ${groupkey}$ solved my problem 💀
But for real, I struggle with simple things also
thank y'all for the help
lemme know when you beat it. That's a function I suspect I need but have no comprehension of
I'm only trying to use it to get a fallback for when there's no actor selected :(
Ordinarily, not a problem. But this time it's being a massive PITA.
omg. fetchFromActor has a fallback value.
I definitely have had my daily intake of stupid pills this morning lol
SUCCESS!
${FirearmDamage-fetchFromActor('target',string(concat(FirearmElement,'DT')),0)*fetchFromActor('target',string(concat(FirearmElement,'DR')),100)%}$
What an epic battle.
Congratulations on getting through that without scrapping it and trying it another way.
Oh yeah, I've gotten that some too. It's a little like minesweeper.
It's a little jarring. Hope they learn to stay still in future updates haha.
If I'm trying to make a roll state the name of the item being used when an item is used to attack, what's the component key I should list in the formula? like, what's the item's name field actually called?
oh, I see items can't be referenced by their name. I guess I can just put in an additional name field then
You should be able to. But some times you have to work smarter and not harder haha
If you have a text field, players should be able to name their items and whatever else. Which would be nice to see an item they've named be used in an attack :)
I feel you. For context, I'm using the terms "item," and "weapon" because they're generalized and easy to communicate, but what I'm actually doing is converting a spell list from a niche system into CSB using an item template, so everything is already pre-named