#Custom System Builder

1 messages · Page 10 of 1

misty terrace
#

I had it working (the Ternary) when it returns text only. I added the setPropertyInEntity commands and am back to getting the ") Parenthesis expected"

formal goblet
#

Show me what you got

misty terrace
#

<td>Result: ${roll < skill ? (roll > attrImpBase ? setPropertyInEntity('self', attribute, attribute + 1) : 'Success') : (roll < skillImpCap ? setPropertyInEntity('item', skillName, skill + 1)) : 'Failure')}$</td>

formal goblet
#

One too much at the end?

#

I think you can do these type of checks in a IDE

misty terrace
#

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?

shy tendon
#

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

formal goblet
misty terrace
#

It works, just not sure it's "Best Practice". What is the Attribute Bar intended to do?

formal goblet
#

And I structure my attributes in a table as well. They have columns for base-value, mod and total

keen carbon
#

are any of your templates one of the ones on the wiki?

formal goblet
#

Nope

hearty zinc
#

@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)

misty terrace
#

What's with the " between the ? and :

#

null for the true condition?

hearty zinc
#

null yes, to just do nothing

#

written out this should be: if TestNR smaller than 0 do nothing else give the TestInput

brave trench
#

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.

hallow salmon
#

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.)

boreal marten
#

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?

boreal marten
spare nymph
#

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?

keen carbon
#

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?

formal goblet
#

Completely custom

keen carbon
#

based

formal goblet
formal goblet
#

Like this

formal goblet
hearty zinc
keen carbon
#

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

formal goblet
supple latch
#

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

keen carbon
#

my bad

formal goblet
formal goblet
#

It should create a warn-message in the console with some data.

keen carbon
#

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?

formal goblet
#

Well... it should be run as a script in the sheet, otherwise it will show the context of the global window-object 😅

supple latch
keen carbon
#

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

formal goblet
#

I see, it's still the same. Then you have to live with getting the actor with game.actors.getName() for the time.

keen carbon
#

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

formal goblet
#

${name}$ it is then

keen carbon
#

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

formal goblet
#

Np

hazy saffron
#

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.

scarlet skiff
runic condor
#

Is there a way to customize the combat tracker? My system has 5 phases per round.

prisma orchid
#

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.

hazy saffron
hallow salmon
hazy saffron
#

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?

hazy saffron
robust wren
robust wren
hazy saffron
robust wren
#

i think you forgot the last $

robust wren
#

it should give the parameters 50 and item.name as a string

hazy saffron
#

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'?

robust wren
#

args[0] should be right, it works for me

hazy saffron
#

I would never have figured that out

robust wren
#

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 😄

hazy saffron
#

I have a similar macro that I need to rework now but shoudl work similarly

misty terrace
#

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)}$

brave trench
# formal goblet 1 2-Grid-Panel, and inside this 2 Vertical-Panels

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.

hearty zinc
#

has somebody else worked with UserInputTemplates? whats your experiences with it. I'm trying it right now and bump into a few walls.

scarlet skiff
formal goblet
#

Well, the permission system in CSB could need some refinements in some places 😅

scarlet skiff
#

but as far as i know this is standard foundry behaviour

#

thats why things like warpgate exist

misty terrace
#

I don't know about warpgate! let me go look!

#

thanks

scarlet skiff
#

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.

misty terrace
#

And you imbed that in the Label Roll in a %{}%?

scarlet skiff
#

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

formal goblet
#

ooof, we´re quite active, guys 😂

fervent stag
#

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

formal goblet
fervent stag
#

Thanks! I think maybe I'm doing this inefficiently, I've been putting this on every button:

formal goblet
#

For skills I'd use Dynamic Tables instead. In there, you only have to define your formulas once per column.

fervent stag
#

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

dire socket
#

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.

pale tusk
#

Is it possible to reference/display an item's image icon in a roll message?

prisma orchid
hearty zinc
normal basin
#

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?

normal basin
#

I have read it, yeah

hazy saffron
#

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

scarlet skiff
normal basin
#

Alright then, thanks

pale tusk
#

Does anyone know if it's possible to display an item's image icon in a roll message?

minor tiger
#

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.

pale tusk
minor tiger
latent sorrel
#

On item templates, does the Configure Items Modifier button do anything or is that only meant for items created from the template?

scarlet skiff
formal goblet
vagrant hollow
# normal basin I have read it, yeah

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?

normal basin
latent sorrel
formal goblet
vagrant hollow
normal basin
#

I mean my specific question is just how would I go about having things like actions and health be properly implemented

scarlet skiff
#

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

normal basin
# scarlet skiff I think for a health bar you should create a health number field with the max he...

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

scarlet skiff
#

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.

formal goblet
scarlet skiff
#

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)

normal basin
# formal goblet I'd use an Item Container for Weapons. In there I'd be able to define attack-act...

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

scarlet skiff
#

F12
are there Errors in console?

formal goblet
#

What are the values of pow_score and weapon1_damage?

normal basin
scarlet skiff
#

Also i think in you need item.modifier No?

normal basin
#

item_modifier?

formal goblet
normal basin
scarlet skiff
#

OK then this is for Something Else 😅

formal goblet
#

No roll formula?

normal basin
# formal goblet 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

scarlet skiff
#

Why is there a single :

normal basin
#

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

formal goblet
#

You can just do ${pow_score + weapon1_damage}$ if no rolls are involved. You only need [] if you actually have rolls.

normal basin
#

I see

#

would that have been the only thing wrong with that formula?

formal goblet
#

Yeah

#

If these 2 are just numerical values, then it would add them together and return the result

normal basin
#

wow ok

normal basin
#

How would I go about making it so the values are applied to "physical" damage on a token?

formal goblet
#

The first question, which token?

#

The selected token? The targeted token?

normal basin
#

Uhh, targeted token

#

I'd like players to be able to target tokens and deal melee or ranged damage to them

formal goblet
#

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}$")}$
normal basin
#

That should go in the same place as the damage roll formula, yeah?

formal goblet
#

Yeah

normal basin
#

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?

formal goblet
#

Can you change the health freely?

normal basin
#

this place specifically

formal goblet
#

Do you have a health field in your character sheet?

#

That is way more important

normal basin
#

I do, yeah

formal goblet
#

And can you change that freely?

normal basin
formal goblet
#

And is it synced with the token health?

normal basin
#

I can change it freely, yeah and it does seem to be synced up at least upon reloading the token

formal goblet
#

Then it´s strange that you can only change it at max-health

normal basin
#

This is how the hp resource is set up, does it look right?

formal goblet
#

Change it to attributeBar.Health

#

props. is the wrong one

normal basin
#

Should I be able to modify current and max health still after doing that? If so, I can't

formal goblet
#

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

normal basin
#

The token's hp is locked at 12 out of 22 now, in current and max hp respectively

formal goblet
#

Can you show me how you set up your health field in the sheet?

normal basin
#

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

dense pine
#

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?
formal goblet
normal basin
# normal basin incoming damage from the damage roll still won't damage the token beyond 8 hp th...

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

formal goblet
#

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.

normal basin
formal goblet
#

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

normal basin
formal goblet
#

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

normal basin
formal goblet
#

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.

normal basin
#

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

formal goblet
#

I see it in your Label Roll Message ${Damage:= pow_score + weapon1_damage}$

normal basin
#

I mean like add it in as an individual component and key, like "health"

formal goblet
#

For what? It´s enough to have it as a temporary variable. You don´t need this value in your sheet, do you?

normal basin
#

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

formal goblet
#

Nope

#

You can remove # from the Label Roll Message to actually see the result of the operation.

scarlet skiff
#

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 🤷‍♂️

normal basin
formal goblet
#

Nope

#

You can delete the first line because they do the same, but that wouldn´t cause an issue

normal basin
normal basin
formal goblet
#

Have you tried to turn it off and on again? 🤡

normal basin
#

I did and it didn't work, I'm trying it out on a new world to see if it works properly there

normal basin
formal goblet
#

It should show up in the actors-tab. But that´s only a template, you need a new actor aswell

normal basin
#

It isn't in the actors tab

formal goblet
#

Console (F12)

#

And check for errors

normal basin
#

No errors

formal goblet
#

Can you select the Template _Minimal on a new Actor?

normal basin
#

nope

formal goblet
#

Ah wait, create an actor, right-click it, import the template

normal basin
#

That made it appear, yeah

sharp geyser
#

I have 2 questions for anyone with knowledge:

  1. 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.
  2. Is there a "precise" round function? As I'm wanting to have a value round to every "0.2".

Thanks in advance! :)

scarlet skiff
#

What are "conditions"? Can you give examples?

sharp geyser
#

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 :(

formal goblet
sharp geyser
scarlet skiff
#

Im Not Sure what you try to achieve?

sharp geyser
#

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

scarlet skiff
#

No i mean from a Game Sense. What is your use case

sharp geyser
#

I'm stupid :D I don't understand the question lol

scarlet skiff
#

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 😅

sharp geyser
#

Just if/else statements haha

scarlet skiff
#

🤦‍♂️

scarlet skiff
formal goblet
latent sorrel
#

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?

latent sorrel
formal goblet
normal basin
# formal goblet Ah wait, create an actor, right-click it, import the template

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

scarlet skiff
#

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...?

brave trench
#

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.

formal goblet
formal goblet
formal goblet
cursive belfry
#

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

formal goblet
cursive belfry
#

what's the scripting language

formal goblet
#

We have our own formula parser, but you can also use JS

warped garnet
#

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 ?

sharp geyser
brave trench
sharp geyser
narrow ginkgo
white pumice
#

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?

sharp geyser
white pumice
#

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

sharp geyser
#

You should be able to. 😕 Sorry, I was only thinking about rolling from the character sheet, not Foundry's innate combat stuff :x

fierce harbor
sharp geyser
fierce harbor
white pumice
#

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?

warped garnet
fierce harbor
warped garnet
white pumice
warped garnet
warped garnet
fierce harbor
#

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.

vagrant hollow
fierce harbor
sharp geyser
#

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)

formal goblet
sharp geyser
#

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.

formal goblet
#

Item Container

#

And Item Modifiers

sharp geyser
#

If a perk has a bonus to the skill "Stealth" how do I get that information from the perk within the container?

formal goblet
#

item.perk

sharp geyser
#

Could I get an example? :x

#

(Sorry to ask for so much help)

formal goblet
#

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}$.
sharp geyser
#

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

formal goblet
#

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.

sharp geyser
#

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

formal goblet
#

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

sharp geyser
#

I'll have a look at that I suppose :x

formal goblet
brave trench
# sharp geyser Lets say the item container is called "Perks" and the perk is called "Perk1", co...

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

sharp geyser
#

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 :(

brave trench
#

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

sharp geyser
#

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.

brave trench
#

what part isn't working? what are the keys for the first column of capacity, 2nd, 3rd

sharp geyser
#

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

brave trench
#

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

sharp geyser
#

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 :(

brave trench
#

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

sharp geyser
#

Item Containers are dope as hell, but it's frustrating when something so simple doesn't want to work >_<"

formal goblet
#

There are some limitation you have to be aware of:

  • Modifier.Key has to be a component-key of the Actor
  • Modifier.Formula can only use data from the Item. You have to use fetchFromActor(), if you also need data from an Actor
  • Item Modifiers can only modify Labels. Other components cannot be modified
warped garnet
#

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

sharp geyser
formal goblet
#

I saw that, just wanted to list it

formal goblet
sharp geyser
#

What the heck am I not doing right here???

warped garnet
#

I just noticed that it can be done like this as well, still need to work to make it work

formal goblet
formal goblet
sharp geyser
#

I guess I'll struggle Dynamic Tables in the meanwhile lol

white pumice
sharp geyser
#

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?

sharp geyser
#

:'( but my OCD will kill me if I cannot alphabetise it

brave trench
#

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

brave trench
#

lol, i was here just guessing. I'll give it a look, thanks.

brave trench
#

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!

somber bay
#

(figured it out)

sharp geyser
#

Found an error :D
They are $}'d and not }$

white pumice
brave trench
#

@martin in conditions, can the value be a formula?

sharp geyser
#

This is one that I use to make sure I don't end up dealing with negative character attributes lol

brave trench
#

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

sharp geyser
brave trench
#

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)

sharp geyser
#

${(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

brave trench
#

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

sharp geyser
#

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

brave trench
#

lol yeah, me too

sharp geyser
#

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

brave trench
#

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.

sharp geyser
#

Engineers are basically coders, depending on the type of engineer haha

warped garnet
static zephyr
#

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?

warped garnet
#

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 ?

vernal meadow
#

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.

brave trench
#

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.

vernal meadow
#

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

brave trench
#

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.

static zephyr
vernal meadow
#

so I can't just have a unique item for each container? They would all contain everything attached to the character within that filter?

brave trench
brave trench
vernal meadow
#

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

brave trench
#

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.

vernal meadow
#

well darn. back to the drawing board >~<

brave trench
#

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.

vernal meadow
#

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

brave trench
#

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.

vernal meadow
#

i hope so. I tried reading the documentation for the advanced filters and it kinda made my head spin X3

brave trench
#

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

vernal meadow
#

OH THAT MIGHT WORK

#

thank you!!!

brave trench
#

np ^_^

formal goblet
static zephyr
static zephyr
brave trench
#

@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

formal goblet
brave trench
#

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?

formal goblet
vernal meadow
#

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

brave trench
#

worth putting up a feature request? or too much for CSB to handle?

formal goblet
#

The issue wouldn´t be the for-loop itself. It´s how you plan to process the results 😅

brave trench
#

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.

vernal meadow
#

Martin may I request your wisdom?

formal goblet
#

You´re allowed to speak

vernal meadow
#

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

formal goblet
vernal meadow
#

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

formal goblet
#

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 😅

static zephyr
#

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?

formal goblet
static zephyr
#

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.

formal goblet
#

You can read it in the Item Container with item.key

static zephyr
#

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.

formal goblet
#

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

static zephyr
#

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.

formal goblet
#

The Readme and the Wiki are basically the only sources

vernal meadow
static zephyr
#

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?

formal goblet
static zephyr
#

Ok, so I would define the attack roll on the item itself, and use fetchfromactor to get the skill +attribute off the character sheet?

formal goblet
#

You would define it in the Item Container

static zephyr
#

Ok, I see the difference, I think.

formal goblet
#

The Item Container has already access to both Item and Actor data

static zephyr
#

I'll have to see how you did it in the German SR6 that you gave me.

formal goblet
#

I hope it´s not overly complicated xD

static zephyr
#

I'm just being dumb. Most everything else has been pretty easy.

formal goblet
static zephyr
#

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.

formal goblet
#

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

static zephyr
#

OH!

#

And I could put ${Strength + item.Attack}$ in the item container column label?

formal goblet
#

Yeah

static zephyr
#

I think I got it. Thanks for holding my hand there.

brave trench
#

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

static zephyr
#

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?

brave trench
#

yeah its either item.key when on your actor sheet, or fetchFromActor when on the item sheet

formal goblet
static zephyr
#

Yeah, I just didn't think about it until I'd already made alot of roll buttons.

brave trench
#

lol, redoing formulas on my sheet after I think of a better way to do something consumes most of my time with this project

brave trench
#

How can I adjust the width of a column in my roll message?

sharp geyser
static zephyr
#

Like yours had "bludgeoning-protection" that was checked.

frosty loom
#

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?

raven seal
#

does your sheet use the css classes you defined in your file?

frosty loom
#

Nope 🤔

#

lol alright I got some work to do

warped garnet
warped garnet
warped garnet
dense pine
#

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?

sharp geyser
dense pine
#

I just want to learn the syntax and get an overview of what can be done with formulas

sharp geyser
#

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.

dense pine
#

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

sharp geyser
#

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)

dense pine
#

indeed not 🙂

sharp geyser
#

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

sharp geyser
#

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

dense pine
#

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

brave trench
#

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.

sharp geyser
#

${fetchFromActor('attached',concat('Skill',ref('weaponskill')))}$ Turns a field into a string used by skills for an actor. Took way too long.

dense pine
brave trench
#

sorry replied to wrong person lmao

formal goblet
# dense pine can you see the links i marked in the screenshot above? this is from the readme ...
brave trench
#

@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.

formal goblet
#

It should accept any HTML

sharp geyser
#

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.

brave trench
#

item containers are universal, all act as one until you set filters for them.

sharp geyser
#

HRMM.

#

This is problematic (possibly)

brave trench
#

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

sharp geyser
#

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?

brave trench
#

so im guessing main is main hand weapon, secondary is off hand right?

sharp geyser
#

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)

brave trench
#

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.

sharp geyser
#

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

brave trench
#

I woudn't know how to use radios, haven't tried yet

sharp geyser
#

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'

brave trench
#

yeah, i just havent thought about how to use them as filters, since their key is shared. I think

sharp geyser
#

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')

brave trench
#

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"

sharp geyser
#

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

sharp geyser
#

@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.

brave trench
#

what is the radio to the left of your item container for? And take a ss of your checkbox component opened up.

sharp geyser
brave trench
#

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?

sharp geyser
sharp geyser
brave trench
#

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.

sharp geyser
#

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.

brave trench
#

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.

sharp geyser
#

I'm 1000000000000000000000% sure this isn't supposed to be like that

#

If I delete one of them, it removes all the others.

brave trench
#

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

sharp geyser
#

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.

static zephyr
#

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.

brave trench
#

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.

sharp geyser
#

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.

static zephyr
#

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.

brave trench
#

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.

static zephyr
#

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.

brave trench
#

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.

misty terrace
#

@formal goblet do you guys have a Patreon?

brave trench
misty terrace
#

yes donations. And maybe a dedicated Discord for this awesome project

latent sorrel
#

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?

formal goblet
# sharp geyser

It is supposed to be like this because Item Containers only hold a link to an Item.

formal goblet
formal goblet
latent sorrel
#

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?

formal goblet
#

Nope

latent sorrel
#

darn. Thank you

formal goblet
# sharp geyser The Radio buttons were me trying to achieve what you had with Checkboxes, but ev...

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 sheets if 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 sheets in the Item Template and reload the Actor-Template.

  • Profit

brave trench
static zephyr
#

@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.

brave trench
#

@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.

formal goblet
brave trench
#

yessir! lol

#

will all user inputs create an error?

dense pine
#

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.

formal goblet
shy tendon
#

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]

warped garnet
static zephyr
#

@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.

sharp geyser
#

"Stupid container" was made after trying to drag the item into the container.

sharp geyser
#

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.

formal goblet
sharp geyser
#

nop[e

#

Updated it

#

Still not working

formal goblet
#

Did you also reload the Item in the Actor? Reload all items doesn´t apply to Items in Actors.

sharp geyser
#

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

formal goblet
#

Which versions of Foundry / CSB?

sharp geyser
#

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.

formal goblet
sharp geyser
#

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.

dire socket
#

I'm curious as to what you're trying to achieve and what's getting in the way?

#

@sharp geyser

sharp geyser
#

"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.

dire socket
sharp geyser
#

Will be ante to in ~40 minutes just out at the moment

#

Able **

dire socket
#

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).

dire socket
# sharp geyser "Finnicky" being how I describe the Containers essentially not holding a single ...

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.

sharp geyser
dire socket
#

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.

sharp geyser
#

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

sharp geyser
#

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 :/

scarlet skiff
# sharp geyser Any idea as to why this isn't working?? It's been my personal hell for the last ...

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?

sharp geyser
#

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)

nova storm
#

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

sharp geyser
#

If I read your question

#

I'd have my answer lol

scarlet skiff
nova storm
#

C would be behind the scenes

scarlet skiff
sharp geyser
nova storm
#

It needs to be visible to the player.

sharp geyser
scarlet skiff
#

yeah then what @sharp geyser said. create a label with the label roll message ${key1+key2}$

nova storm
#

What sort of item would I put that in? Can labels have a formula as their content?

sharp geyser
#

They can :)

#

(As an example)

nova storm
#

Thank you

scarlet skiff
sharp geyser
nova storm
#

It shouldn't roll anything, just be there on the sheet. Basically three different classes of XP add up to an overall prestige level

sharp geyser
nova storm
#

Thank you

dense pine
#

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?

sharp geyser
#

I don't have a clue :s

scarlet skiff
sharp geyser
#

Hmm

#

Java magic?

#

Doesn't seem to work as a roll formula :(

scarlet skiff
#

uh

#

for me it works so there should be some issue with the keys i think

#

can you F12 and look at the error?

sharp geyser
#

I'm dumb

#

I forgot I changed the attributes a good while back lol

scarlet skiff
#

😄

#

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

sharp geyser
#

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 :(

scarlet skiff
#

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 🤷‍♂️

scarlet skiff
#

well here is an example of my macro button which creates buttons 😅

sharp geyser
#

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

scarlet skiff
#

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
sharp geyser
#

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.

scarlet skiff
#

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.

sharp geyser
#

That's awesome :D

scarlet skiff
#

my inventory which i'm pretty happy with

#

yeah containers is a little tricky but i did it with a dropdown (as described above)

sharp geyser
#

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.

scarlet skiff
#

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 🤷‍♂️

sharp geyser
#

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 :(

dense pine
#

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

sharp geyser
dense pine
#

see the screenshot please

sharp geyser
#

Hmm idk. I haven't bothered to mess with that stuff ;x

warped garnet
# dense pine

funny, i was just now thinking about the same thing. I don't think it's possible

warped garnet
warped garnet
#

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

dense pine
#

attribute bars are just greyed out in default token config

warped garnet
#

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.

dense pine
#

ah ok that would be a good solution

sharp geyser
#

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.

raven seal
sharp geyser
#

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

raven seal
#

yeah I made the same mistake when I first tried to do user inputs

sharp geyser
#

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

sharp geyser
#

Follow up question: If I have a numerical input on it. How do I interact with those values?

warped garnet
brave trench
sharp geyser
#

Oh wow. Simple as hell haha

sharp geyser
sharp geyser
#

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.

dense pine
#

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?

raven seal
zinc verge
#

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

brave trench
# zinc verge I’ve already detailed this bug in the issues log for CSB, but a friend of mine s...

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.

zinc verge
#

Can you use ref() to fetch data from an actor sheet to an item sheet?

prisma orchid
#

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?

raven seal
zinc verge
#

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

prisma orchid
brave trench
# zinc verge Can you use ref() to fetch data from an actor sheet to an item sheet?

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.

zinc verge
#

Word, it sounds like a lot of people are having issues with fetchFromActor. Hopefully it gets resolved soon

brave trench
#

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.

zinc verge
#

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

brave trench
#

yeah, almost certain anyway. The recent update was pretty big

zinc verge
#

Word, makes sense then. Might just have to give it some time then

glass socket
#

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?

brave trench
#

the key filters allow you to be very specific, sounds like what you'd want to do.

glass socket
#

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?

sharp geyser
#

Like, you have your 'inventory' and ticking a checkbox outside of the item would move the item to 'equipment'?

sharp geyser
#

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.

fierce harbor
sharp geyser
#

Having an issue with getting the value for the selected firing mode (from the input template) to be used on the weapon template

fierce harbor
sharp geyser
#

That button which is simply "-" is supposed to have the firing mode and attack cost on either side.

fierce harbor
sharp geyser
#

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)

fierce harbor
sharp geyser
#

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.

fierce harbor
sharp geyser
fierce harbor
sharp geyser
#

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

fierce harbor
# sharp geyser I'll try and get a picture as a diagram lmao

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.

sharp geyser
#

Oh my js and html knowledge is non-existant lol

sharp geyser
fierce harbor
sharp geyser
#

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.

fierce harbor
fierce harbor
sharp geyser
#

Personally I do like how "smart" my solution was

#

Just being thwarted because I can't do anything with it lmao

fierce harbor
nova storm
#

Next question, can you do if statements in a label or otheer field?

sharp geyser
#

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.

fierce harbor
#

With if the workload for many variables is the same as with switch, I believe. Plus, nesting if can be brain-damaging at times 😅

fierce harbor
fierce harbor
# sharp geyser

Oh well, looks like I'm having troubles setting up the system on my PC. Sorry, cannot look through it atm.

sharp geyser
#

No problem :)

formal goblet
topaz coyote
#

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

sharp geyser
formal goblet
topaz coyote
#

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

topaz coyote
formal goblet
topaz coyote
#

In git

formal goblet
#

Sure

topaz coyote
#

Not high priority

nova storm
#

exceedingly pleased about having made this work.

sharp geyser
#

Hell yeah! Good work :)

sharp geyser
nova storm
#

No, resistance is something to do with whether the weapon breaks or not

thin leaf
#

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

fierce harbor
topaz coyote
thin leaf
topaz coyote
#

SwitchCase or Condition formula

fierce harbor
#

@topaz coyote 's option then 😉

topaz coyote
#

<i class="fa-solid fa-dice-d20"></i>

thin leaf
topaz coyote
#

For example

#

No. Foundry has access to font awesome

thin leaf
#

Oh I see. So I replace fa-dice-d20 with a formula for my text input?

#

Let me try this

topaz coyote
#

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>

thin leaf
topaz coyote
#

Nice!

fierce harbor
brave trench
brave trench
#

Can someone give me an example of what a sub template is used for? I read it, but I don't get its purpose.

sharp geyser
#

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

fierce harbor
#

Yeah, like blocks of code you use often. For reusability reasons, mainly.

brave trench
#

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.

fierce harbor
#

Never used, so can't say honestly

oblique spear
#

okay, after screaming into the void with SWB, I'm setting up with you lot here.

dense pine
#

Active Effects: Is it possible to apply an effect more than once (stack) to a token?

formal goblet
formal goblet
oblique spear
#

is there a tutorial on setting up items?

formal goblet
oblique spear
#

Not to worry, I HAVE FOUND THE DOCUMENTATION

dusky mauve
#

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?

warped garnet
formal goblet
#

And yeah, the ternary is obsolete here

oblique spear
#

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 >=.

oblique spear
#

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.

sharp geyser
#

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)

sharp geyser
brave trench
#

can you load items onto items? Its not working so going to assume not.

sharp geyser
misty terrace
#

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

scarlet skiff
#

data is not necessary anymore

misty terrace
#

And the attribute is named itemtype, not weaponType

scarlet skiff
#

not sure but javascript needs ===doesnt it?

misty terrace
#

oooh, yeah, I think it does

#

its giving me a cannot read properties of undefined (reading 'items') error

scarlet skiff
#

i'm not sure if your path is right. give me a sec

misty terrace
#

currentActor is canvas.tokens.controlled[0].actor

scarlet skiff
#

try this:
let actorWeapons = currentActor.items.filter(item => item.system.props.itemtype === "wep")

misty terrace
#

bingo! Thank you!

oblique spear
#

what's the quick way to post the item details to the chat?

dense pine
#

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?

zinc verge
#

I know you're not supposed to do this for initiative formulas, but have you tried using the ${}$ format?

cursive belfry
#

is tabbed panels supposed to look like this?

zinc verge
#

yes

cursive belfry
#

is there no way to change the name?

zinc verge
#

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

cursive belfry
#

no but like how do I change the name in the gray bar

#

there's no label option for it

zinc verge
#

there wasn't a component key option?

cursive belfry
#

yeah there is

#

but is there no cosmetic label option?

zinc verge
#

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

cursive belfry
#

oh ok

brittle moth
dense pine
zinc verge
#

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

brittle moth
# dense pine

I need to write a doc about that, but you need to set it as actor.system.props.<your key>

zinc verge
#

big thanks, I was also going to need this info in the near future

brave trench
# oblique spear

add a formula in the label roll message section of the "post in chat" button/label with whatever keys (info) youd like to show.

oblique spear
brave trench
#

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.

formal goblet
brave trench
#

oh wow, thanks! I never even noticed that.

formal goblet
# brave trench Anyone care to hold my hand and get me started writing a script? I'm taking JS ...
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

brave trench
#

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?

dense pine
#

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?

cursive belfry
#

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

zinc verge
#

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

cursive belfry
#

yeah

#

I wonder why there isn't a tool with more freedom in aligning and sizing things

zinc verge
#

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

cursive belfry
#

that's an idea I guess

#

I wish I could just use a pdf character sheet though

zinc verge
#

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

cursive belfry
#

where do I install that

#

i don't see it in the module list

zinc verge
#

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

GitHub

Create configurable sheets from image files that you can place text of any size anywhere - GitHub - xaukael/ffs: Create configurable sheets from image files that you can place text of any size anyw...

cursive belfry
#

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

zinc verge
cursive belfry
#

that worked

zinc verge
#

nice

#

yeah I just checked the module.json. FFS is verified for FVTT v11

zinc verge
#

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?

sharp geyser
zinc verge
#

like have the original "roll damage" button just take the health from the targeted token actor directly?

sharp geyser
#

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.

zinc verge
#

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

sharp geyser
#

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

zinc verge
#

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

sharp geyser
sharp geyser
#

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.

zinc verge
#

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

formal goblet
zinc verge
#

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

sharp geyser
#

Martin is one of the local MvPs.

sharp geyser
#

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.

static zephyr
#

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.

sharp geyser
#

I'm completly baffled by it

static zephyr
#

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

sharp geyser
#

Oh the % is there because it multiplies the ActorDR by a percentage.

static zephyr
#

If you take that out, does it remove your error?

sharp geyser
#

Nope

#

lol

static zephyr
#

Damn.

sharp geyser
#

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.

static zephyr
#

That's cool, I didn't know that % was a valid math operator until you used it.

sharp geyser
#

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

sharp geyser
static zephyr
#

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?

sharp geyser
#

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)

static zephyr
#

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.

sharp geyser
zinc verge
#

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

sharp geyser
static zephyr
#

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.

zinc verge
#

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

zinc verge
sharp geyser
zinc verge
#

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 💀

zinc verge
#

thank y'all for the help

sharp geyser
#

lol

#

I'm currently fighting with the level 30 boss known as ref()

zinc verge
#

lemme know when you beat it. That's a function I suspect I need but have no comprehension of

sharp geyser
#

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.

static zephyr
#

Congratulations on getting through that without scrapping it and trying it another way.

sharp geyser
#

Stubbornness is a virtue lmao

static zephyr
#

Oh yeah, I've gotten that some too. It's a little like minesweeper.

sharp geyser
zinc verge
#

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

sharp geyser
#

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 :)

zinc verge
#

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

sharp geyser
#

Ah

#

Well, I got basically everything on my firearm template (finally) working.

zinc verge
#

nice!

#

congrats

sharp geyser
#

Only thing to do now is to make it use the damage rolls on a successful attack