#Custom System Builder

1 messages · Page 16 of 1

spare sky
#

When I enter it this way I get the following error message:

Uncaught (in promise) Error: Uncomputable token effect_value

formal goblet
#

Alright... And where does effect_value come from?

spare sky
#

One moment...

static cargo
#

I've tried only one mod that does that sort of thing. It doesn't do drag 'n' drop, but Rideable has proved to be quite satisfactory.

spare sky
# formal goblet Alright... And where does `effect_value` come from?

I had an error in the key description. That's why I had received the error message...
But the result is the same:

Only one value is set in the item container, even though both have been updated in the item sheet.
Only when I recalculate or perform another action, like opening the ITEM sheet, the second value is updated....

spare sky
brisk scaffold
#

hey, how do i do two side by side panels?

zinc verge
cinder rock
#

Alright, I know its been a hot second, but I figured out what caused the bug with active effect modifiers. If I had anything in the "Group" spot, its active effect wouldn't work

formal goblet
cinder rock
#

Gotcha

river sierra
#

Sorry, forgot to mention: Add a key le_display to the label. You can use different keys (... or CSS classes) to quickly switch between different colours of the fills this way, by adding a new rule with just a setting of ---bar-fill in them.

spare sky
#

Apparently a bug, because now I just changed the order of the instructions and now it works.

This is what works:

<h2>Calculate effect (${item.key_item_effect_name}$)</h2>
<p>Cubed duration: ${duration_value:=[:item.key_item_effect_duration_cube:]}$</p>
${#setPropertyInEntity('item', 'key_item_effect_duration_label', "duration_value")}$

<p>Cube value: ${effect_value:=[:item.key_item_effect_cube:]}$</p>
${#setPropertyInEntity('item', 'key_item_effect_active_value_label', "effect_value")}$

This doesn't work:

<h2>Calculate effect (${item.key_item_effect_name}$)</h2>
<p>Cube value: ${effect_value:=[:item.key_item_effect_cube:]}$</p>
${#setPropertyInEntity('item', 'key_item_effect_active_value_label', "effect_value")}$

<p>Cubed duration: ${duration_value:=[:item.key_item_effect_duration_cube:]}$</p>
${#setPropertyInEntity('item', 'key_item_effect_duration_label', "duration_value")}$

Strange behavior...

slow tree
#

Hey there,
${sum(fetchFromDynamicTable('InsightDynamicBonus', 'value', 'active', 0, '>'))}$
This formula works in a label roll, but not in a label text (it returns the right answer in the roll, but always 0 in the label text)

What did I miss?

#

'active' is modified by an item modifier, if it helps

river sierra
#

Is there some baseline reset CSS file somewhere? The amount of margin: 0; border: 0; padding: 0; height: auto; display: initial; and so on I have to do just to get the character sheet into a tabula rasa state slowly gets really annoying.

river sierra
#

Oh, and border-radius: 0; too. so much of it.

formal goblet
slow tree
# slow tree Hey there, ``` ${sum(fetchFromDynamicTable('InsightDynamicBonus', 'value', 'act...

In case it can help, because I'm currently stuck on this and can't really continue :
${sum(fetchFromDynamicTable('InsightDynamicBonus', 'value', 'active', 0, '>'))}$ This is inside a basic Label component, in the Label text.

InsightDynamicBonus is the key of the Dynamic Table I'm fetching from. It has 3 columns: name [Text Field], value [Number Field], active [Label with ${0}$ as a label text]
I'm modifying the value of InsightDynamicBonus.active using an item modifier, with this formula as a key : ${fetchFromActor('attached', "getRefFromDynamicTable('InsightDynamicBonus', 'active', 'name', 'buff 1')")}$ and ${1}$ as a formula (with the + Operator)

As said, the first formula works perfectly as a roll, but not as a label

vagrant hollow
river sierra
#

I meant something that changes the default character and item sheets in custom system builder to be essentially "only built-in browser styles".

#

I can of course copy systems/custom-system-builder/css/actor/character-display.css at the start of mine and replace every single CSS statement with initial values, but I was hoping somebody else did that already.

river sierra
#

CSB could really use its own version of configuring active effects (what I tried to use combat utility belt for, and failed miserably).

zinc verge
river sierra
#

Oh, good.

formal goblet
river sierra
#

There's a few things I need, but looking at the road-map, it looks like the Actor component (drop actors in there, you can access their props in other components directly) would be one that's not there and which I can use for vehicles and so on. So that's where I'm looking, in addition to styling the char sheet.

zinc verge
formal goblet
zinc verge
#

How did you manage to overwrite existing effects? When I tried it basically all the buttons for editing existing effects were grayed out

formal goblet
#

I remember that the UI was a bit weird but it should work with adding new ones (not overwriting existing ones)

zinc verge
#

I’ll give it another swing then. I remember asking about it in module troubleshooting and no one seemed to know how it worked in there 💀

dense pine
zinc verge
#

Do you have any idea why it would be graying out the edit options before I touched anything though? Like this was fresh install

dense pine
#

did you guys try Dynamic Active Effects? It seams to let you at least add Effect Descriptions an a round timer for running out

zinc verge
#

Personally I really need to be able to remove existing ones otherwise the UI’s basically unusable. Im also personally fine waiting for CSB’s update at this point tho, I was only commenting on issues with CSE

formal goblet
zinc verge
#

alrighty, I appreciate it 🙏

lethal flax
#

so how do i make it so that an attribute bar fetches data from number fields for its current and maximum value?

formal goblet
formal goblet
lethal flax
zinc verge
formal goblet
lethal flax
formal goblet
#

The first one

#

It´s not a Roll Formula

dense pine
#

The following Code checks a Var and changes color of the text according to its value. Everything works so far. But now i would like to add a second Variable in the equation. The check should add the Value of "MUT_mod+MUT_mod2" and see if it is greater than 0. What needs to be changed?
Tried ....(concat((MUT_mod+MUT_mod2) > 0 ? ... but this didnt work

formal goblet
dense pine
formal goblet
dense pine
#

oh wait i see, now it works. Thank you Martin!

#

@formal goblet as the topic was about Active Effect Changes with Version 3.1, would you mind give us a sneak peak what exactly is planned with the next update? The Info on the Poll Page is quite vague about this.

formal goblet
dense pine
#

Configuring Item Modifies: Is it possible to create a Formula that is only applied if the Actor is from a certain template?
Lets say i have a template for Humans and Animals and the Items modifiers should only affect human actor, not animals if applied to both.

vagrant hollow
slate gazelle
#

Sorry for my English, I'm using a translator. My problem is that I'd like the Numberfield to be calculated automatically in relation to my list of disorders, but I can't find where to enter the formula t if I'm using the right one.

#

I've also tried putting the formula in Default Value but it doesn't work either

spare sky
#

Unfortunately, still the same problem, although I now assume a bug:

Partly fields do not update or only when I open and close the template of the item.

Can someone tell me what I can do about it? 😕

formal goblet
formal goblet
slate gazelle
formal goblet
slate gazelle
#

ok, but can I use a label for a calculation afterwards? because my shock roll is made from its total strength - the malus, or do I use the penalty calculation part at the bottom?

formal goblet
spare sky
formal goblet
#

I think Forge doesn't like CSB (had some cases with users with unknown problems, but it worked every time in a different environment)

spare sky
#

Can you recommend another server if I don't want to host myself?

formal goblet
#

Kp

#

I'm using a PI as a server, so I'm hosting it myself

#

I think the knowledge base of Foundry mentions some dedicated servers.

spare sky
#

The selection is not really big here now... 😉

formal goblet
#

Well, whatever fits you more. I have no experience with the other 2.

If you like you can also write a support ticket to Forge asking what's going wrong (if you have confirmed that it works in the local instance)

spare sky
#

I will install a local version and see...

static cargo
#

Can a fresh set of eyes tell me why this isn't working?

formal goblet
#

Missing colons. You are in the context of a Roll Formula, so you need colons for CSB-Parts

static cargo
#

so [:speed... ?
... Yep. That's what's what... thx Martin.

vagrant hollow
dense pine
# formal goblet The number field is an input component, it is not meant to store derived values....

Lets say my health attribute has a number Field for Health-current and for Health-Max. That should be quite common in many systems. How Can i automate attacks to automatically apply damage to my Target if number fields should Not be modified? If i make Health-current a label, then i cant adjust Health by Hand anymore. How do i build a structure That Allows both automation and manual modification of my attributes?

formal goblet
dense pine
# formal goblet `setPropertyInEntity()` lets you change the input data of a component

Jep i know, But @brittle moth once mentioned That this should be avoided, because an item an the actor that applies this would do it again every time the sheet is reloaded. Although im not quite sure what That means. Is it only when i press the small grey reload Button in the Upper Right corner or every time i Start the game/ press F5/ change map etc.?

formal goblet
# dense pine Jep i know, But <@303274115433889794> once mentioned That this should be avoided...

You have to differentiate between the Label text and the Label Roll Message. The Label text gets recalculated with every sheet update (if you change a value or reload it). The Label Roll Message in contrast is only executed when you click on the Label.

What that means is that it´s intended to be used in a Label Roll Message (otherwise we wouldn´t have created the function at all because there would be no purpose).

hollow dew
#

i'm working on an implementation of the advanced tiny dungeon system, and i'd love some advice from the experts before i start trying to implement something. my main contention right now is implementing the rolling system. prior to using CSB, i created a macro for rolling, which generates the dialog attached. the choices on the top row are amount of dice rolled, middle row decides if the test is hard, normal, or easy, and the bottom row indicates the target number.

i'd like to transition this to the roll message system in CSB, but i have a few questions. first off, can i generate a dialog like this? my current macro is a bit long (mostly from the svg data), and keeping the graphical representation isn't essential to me. if so, can the starting values be modified by parameters? the main thing i'd like to try to implement is deriving the target number from a targeted token's AC variable, even if the players dont have ownership of the token. some rolls (like mastered weapons) would have a different amount of starting dice as well.

not asking someone to do all the work for me, but i wanted to check if the CSB roll infrastructure can support these things before i start attempting it

#

i did check the documentation on the github, and from what i understand, the dialog itself should be doable, my question was more about using variables to adjust what is selected before it renders

formal goblet
hollow dew
#

i was thinking of ditching the macro altogether, since it was really just rolling xd6cs>=target, and trying to work solely through the roll message

formal goblet
#

Well, your choice. At least the dialog looks fancy 😅

hollow dew
#

the other reason was because i noticed that it was rolling twice when i called the macro via a roll message, one blank undefined chat message and then the actual macro result

formal goblet
#

Yeah, the blank one is normal because there is currently no way to suppress that. It comes with the next version

hollow dew
#

ah. also, i guess i could use fetchFromActor to get the AC of the targeted token, and then feed that into the macro to solve that issue

#

alright, thanks! i'll tinker around with it some more

misty terrace
#

Hey, is there a way to hide the item card (the grey clickable box that opens the item sheet) in an Item Container?

formal goblet
misty terrace
#

I can use CSS

formal goblet
#

Well, then probably yeah, but I cannot really help there

misty terrace
#

Problem is that I don't want to hide it on every tab

#

I have a tab that has Talents where the player can drag the talent (an item)

#

and a main page that has "shortcuts" where I am currently using an item container with a subset of the fields

main magnet
#

I'm at my wit's end here. Can someone please point out what I'm doing wrong?

I have an item that has a dropdown selection that I can set to a particular option. These are the keys (formula):
${[fetchFromActor('attached', "PCarchery_die")]}$, ${[fetchFromActor('attached', "PCbrawling_die")]}$, ${[fetchFromActor('attached', "PCexplosive_die")]}$, ${[fetchFromActor('attached', "PCfirearms_die")]}$, ${[fetchFromActor('attached', "PCmagical_die")]}$, ${[fetchFromActor('attached', "PCmelee_die")]}$, ${[fetchFromActor('attached', "PCthrowing_die")]}$

The labels are just names for each one (Archery, Brawling, etc.).

The thing works for the most part in that when I select the first option for example (Archery) and close the item then reopen it, it stays on that option. This also works for the first 3 options (up to Explosive).

But if I select the fourth or further options it resets it to a different one for some reason that I can't figure out. No errors in the log that I can see and the actor keys are all valid, I tripple checked.

Why is it doing this?

formal goblet
main magnet
#

I tried removing the brackets, still keeps switching for no reason.

formal goblet
main magnet
#

Let me try

#

What do I put in for 'dropdownKey' if I have two different dropdowns in the same formula?

#

Nevermind lol

#

Let me test it

main magnet
formal goblet
main magnet
#

Let me try

#

You mean like this?
<table> <tr> <th>${item.name}$ Attack!</th> </tr> <tr> <td>Result:</td> <td>${[{1d12,1d12,:ref(item.weapon_proficiency_selection):}kh2]}$</td> </tr> </table>

Doesn't work.

main magnet
formal goblet
#

} too much

main magnet
formal goblet
#

After the colon

main magnet
#

The kh2 doesn't seem to work without it but I can try.

formal goblet
#

Ah wait, that's grouping the roll

main magnet
#

Yes

formal goblet
#

What does console say?

main magnet
#

Btw are the keys in the dropdown supposed to be like this?
${PCarchery_die}$

formal goblet
#

No

main magnet
#

Console says:
caught (in promise) Error: undefined. Uncomputable token ref( ) [Detected 1 package: system:custom-system-builder]

formal goblet
#

I said only the key, nothing else

main magnet
#

Ok, sec

#

Console says:
caught (in promise) Error: undefined. Uncomputable token ref( PCexplosive_die)

main magnet
formal goblet
#

Which list?

main magnet
formal goblet
#

Yeah, that's correct. I'm just wondering why there's an empty space right after ref( in the error message.

main magnet
formal goblet
#

No spaces. Just the keys

main magnet
#

Ok let me try

celest prairie
#

You are GodSend!

main magnet
#

It works, thanks a lot man! 🍻

formal goblet
#

If you switch it back to the static options, then you don't even have to put the commas inbetween.

terse shore
#

How would I go about creating a popup that asks why type of roll you want to make. The user selects the roll from a drop down and the roll is made after click the check mark at the bottom of the pop up?

`${#concat(
?{trait:'Roll type?'|"Basic"|"Competence"|"Incompetence"|"Reliability"|"Struggle"}
)}$

${switchCase(trait, 'Basic', {[2d6] + AGI})}$`

This is what I have but it is not working.

I just get the error "items is undefined". I assume I am not accessing the variable correctly or that the roll cant be outside like that and still access the variable?

spare sky
formal goblet
river sierra
#

Okay, so I mostly successfully implemented my own "actor" component which lets you drag&drop an actor on itself, and have that actor's ID available for other components under the key. There's some issues with getting it to update quickly, but oh well. But now comes the weird part ...

  1. Why the hell does _getElement() get called so often, even if nothing changed?
  2. How can I implement it so that it simply returns the current HTML element to spare the browser redrawing it again and again for no good reason?
river sierra
#

Never mind ...

    async _getElement(entity, isEditable = true, options = {}) {
        if(this._element) {
            return this._element;
        }
        this._element = await super._getElement(entity, isEditable, options);

        let wrapper = this._element.get(0);
        /* do whatever I need to do with wrapper */
        return this._element;
    }

This seems to work just fine.

spare sky
#

Is there a way to define the possible walk distance of a token?

formal goblet
spare sky
formal goblet
#

Foundry and CSB itself do not limit token movement distance

spare sky
formal goblet
terse shore
#

`${#concat(
?{trait:'Roll type?'|"Basic"|"Competence"|"Incompetence"|"Reliability"|"Struggle"}
)
}$

${consoleLog(AGI)}$

${consoleLog(trait)}$

${switchCase(trait, "Basic", {[2d6] + AGI}, 0)}$`

not sure where I am going wrong. The log shows that "trait" has the value of "Basic" so not sure why this doesn't return true and roll the dice. It gives an error of "Symbol or string expected as object key"

formal goblet
river sierra
#

The annoying part is that while the conversion to plain Object is easy enough (let obj = Object.assign({}, whatever);), now I need to find out how to watch specific actors for value changes. Hopefully there's an easy event to hook into.

formal goblet
river sierra
#

Can't you just enforce it for CustomActor and CustomItem? Replace an Actor's system.props with an object that keeps track of changes and emits events as necessary?

formal goblet
hollow dew
#

can i have an item container contain a filtered list of another item container? for instance, if i had an item container for the inventory, and wanted an additional "weapons" item container that only had the weapons from the inventory container

#

without just dragging the same items to that other container

#

oh wait, it just does that out of the box with the filters 😅

river sierra
#

It's still in there, I just checked.

river sierra
formal goblet
hollow dew
#

that's actually ideal for me, i was assuming they were holding them individually

river sierra
#

It does end up calling render() in the CharacterSheet class in CSB's modules/sheets/character-sheet.js eventually, with the options argument telling you what was exactly changed when options.action === 'update'

{
  "action": "update",
  "data": {
    "system": {
      "props": {
        "own_vehicle": "5lbOko4BhOc1F6cC"
      }
    },
    "_id": "3M0nSyRBhu6ICJEL",
    "_stats": {
      "modifiedTime": 1697634451622,
      "lastModifiedBy": "ObNcoEGmx1gRZWEj"
    }
  }
}

This then goes through a few more super.render(...) calls, carrying the options argument through, until Application._render() finally throws the data away. But rendering is way too late to do anything useful with data delta anyway, and this only gets called when the sheet is displayed. In particular, changing system.props properties in the background gets a "proper" _onUpdate(...) calls - once you open the sheet.

#

So yeah, system.props needs to stop being a plain object.

dense pine
#

can i modify the selected value of a dropdown list with item modifiers?

formal goblet
hollow dew
#

can i determine the default value in a userInputTemplate by feeding in some sort of parameter instead of only duplicate keys? i have an input template that i'd like to be able to reuse, and i think setting the default via duplicated keys might be very difficult if not impossible.

zinc hound
#

Does anyone know if I can access the Label Text field in a roll message formula?

#

Dunno what it's called in the backend

river sierra
#

I have the feeling that the whole sheet re-renders when I'm changing just one value, even parts which don't use that property. That's weird.

river sierra
#

I mean, it still works, it just adds an annoying flicker to everything when even one value changes.

formal goblet
# river sierra I have the feeling that the *whole* sheet re-renders when I'm changing just one ...

"Everytime a field is changed, Foundry sends all the data to the server for saving. Everytime the server saves data, it recalculates the values of the sheet (all of them).
This is done in a not-so-effective way of : I try to compute everything in no defined order (I can't predict the order which will be used at runtime). If something can't be computed, it's likely it needs a value which will be computed later. So I put it apart, and retry it later.
When I don't compute anything new, meaning all computable things have been computed, I stop. If some values were not computed, a warning message pops up in the Console.
Now, here is the issue : To be more efficient, I'd need to compute things in the right order, first the values which don't need any computed values, then the values which need only the previous one, etc... But I can't generate the order because of the ref and recalculate functions, which are "unpredictable", so to speak. So I'm kinda stuck at the moment, I can't find a better solution..."

river sierra
#

What I mean is not just the values, the whole structure is being redone. HTML tags and all.

#

Since this is async (as it should be), this results in a bunch of DOM reflows, and "flicker".

#

Right now, my components _getElement() method creates the element once, and re-uses it. The whole structure has only a few places which can even change, so on subsequent calls it updates those and returns the same object it did initially. This is blazing fast even when I'm switching an image's srcattribute to something non-cached. And then the Panel the component is in seems to remove all its contents, and re-adds them one by one back in.

formal goblet
#

Fair point, but I cannot tell if the restructuring is necessary at some point or not. But it´s worth asking @brittle moth

river sierra
#

That could be due to how I notify the sheet/actor about the value change whenever I drop a new Actor into the component, to be fair. I'm still investigating how to do that best.

formal goblet
hollow dew
#

unfortunate. is there an example of how to set the value with the key method on something like a radio group? i'm not really understanding it from the docs

#

i tried creating a variable with the same name as the group and assigning that with the value i want, but didn't seem to work

river sierra
#

After some debugging, I can see what happens now. Panel, near the end of its _getElement() method, appends new stuff to itself:

        internalContents.append(await this.renderContents(entity, isEditable, options));

Since normal components create new HTML elements, the old ones stay visible. Mine doesn't bother, for efficiency, so that here just removes it from the currently rendered DOM and attaches it to the invisible internalContents one. Hence the pronounced "flicker".

river sierra
#

The way this works is that this component has two keys, one (the default, saved to the server) is for the actor ID dropped in there, the other (dynamically calculated) holds a plain JS object copy of the actor's data. So the label simply accesses the latter.

${vehicle.name}$ -  ${vehicle.system.props.tonnage}$t - Move ${vehicle.system.props.move}$${vehicle.system.props.move_mod}$
timid glade
river sierra
timid glade
#

Inside of the popup

summer berry
#

is it possible to, by just using CSB, make a dynamic dropdown list where the shown options are depending on the chosen value of another dropdown list? Is there an example on how to reference the specific drop down value?

#

for example: dropdown list 1 has the values a and b. dropdown list 2 has the values c, d, e and f. If value a of dropdown list 1 is chosen, dropdown list 2 only shows values c and d. If value b of dropdown list 1 is chosen, dropdown list 2 only shows e and f

timid glade
#

I found how to put in a modifier field, but now I have two questions;

  1. To clean up the switchCase code a little bit, is there any way I can put it as a held variable and then use that variable in a Roll Formula?
  2. What's the method I would use to retain what's in the user input [number] field inside of the Popup for the Roll Formula?
formal goblet
timid glade
#

This is what I have so far but its a very hackmead attempt I admit.

?{trait:'Roll type?'|"Normal"|"Major Obstacle"|"Minor Obstacle"|"Minor Edge"|"Major Edge"}
)
?{Modifier[number]}}$

${#DiceRoll:= switchCase(trait,'Normal',2d6,'Major Obstacle',4d6dh2,'Minor Obstacle',3d6dh1,'Minor Edge',3d6kh1,'Major Edge',4d6kh2,0)}$


${#roll_formula:= DiceRoll+string(Soul_Stat)+string(Modifier)}$


${[:roll_formula:]}$```
formal goblet
formal goblet
timid glade
#

Still think I'm doing something wrong with the variable portion. To test I stripped out everything not relating to the switchCase and its still not working right.

?{trait:'Roll type?'|"Normal"|"Major Obstacle"|"Minor Obstacle"|"Minor Edge"|"Major Edge"}
)
?{Modifier[number]}}$

${#DiceRoll:= switchCase(trait,'Normal',2d6,'Major Obstacle',4d6dh2,'Minor Obstacle',3d6dh1,'Minor Edge',3d6kh1,'Major Edge',4d6kh2,0)}$

${[:DiceRoll:]}$```
#

Should I be wrapping the "dice rolls" in something within the switchCase?

formal goblet
timid glade
#

How do I make them a string? I've put them in string(), ' ', and " "

Also, sorry if the series of questions is annoying. Don't intend to be.

formal goblet
#

And if you don't know what goes wrong, then the console is your friend (F12)

timid glade
#

I swore I put all of them in the single quotes before messaging you. Try it again after you send that, and it works.

main magnet
#

Any way to stack items in an item container? For example, if I add 20 torches, can I have them in one row with a number next to them indicating their amount instead of having 20 identical items in the list?

main magnet
formal goblet
#

Yep. If you need some sort of counter, then you should create a number field in the item which does that. Otherwise, nope

main magnet
#

Hm, I'll try to work something out.

timid glade
#

Thank you Martin for your help and patients. Once that piece worked, the whole thing was simple from there! Appreciate it!

formal goblet
timid glade
#

So you're the inverse of Dr. Bones lol

main magnet
#

Any way to sort items alphabetically in the list?

#

Or by different columns?

formal goblet
#

Wait for the next update

zinc hound
formal goblet
zinc hound
#

To be clear, I mean “Label Text”, not the prefix field

timid glade
#

So, styling question;
Is there a way to make the grey boxes in the first image look like normal text and the dice roll to look more like the second image?

main magnet
#

So I put setPropertyInEntity in a roll field of a button. Any way I can hide the roll message from popping up (just want it to change the value)?

hollow dew
timid glade
hollow dew
#

inside, so like ${![2d6+:Body:]}$

#

there's also the # modifier if you want to hide something

timid glade
#

I see! Thank you. That'll help with stylization a bit.

hollow dew
#

no problem. been figuring out all this stuff today as well 😅

timid glade
#

Same here. Made so much progress in a very very short time though. Super satisfied.

hollow dew
#

same, though i have to credit martin, he's been helping so much

formal goblet
river sierra
#

If you're not comfortable with JS, forcing math.js to throw an exception works too. For example by accessing something that's not there, with ${x.done}$

formal goblet
river sierra
#

I code in Java since Java 1. I've seen some things people use exceptions for, man. This isn't even particularly bad (though a simple stop() method would be nicer).

formal goblet
dense pine
formal goblet
#

Well, we are always open for contributions, so feel free.

river sierra
#

I'll send you any components I have that are working as I want them to, for sure. But I just barely started three days ago, don't know the code base that well yet.

fiery loom
#

Hello everyone, How is your day currently ? I hope it is wonderful because mine is balancing on the edge of madness...
I'm currently trying to use CSB to create a roll on a character sheet that will use a text in a Dynamic table textbox to roll what's inside.
I created a label with the formula : ${roll:=["getRefFromDynamicTable(weapon_damage_ranged_value)"]}$
I created the textbox with the roll in the same dynamic table : 4d6
I tried to change it in many ways but I can't find any manners or form that will apply the formula as intended.
I just want to roll a wha'ts inside the text box. Did I miss something ? I'm not really a hardcore IT guy, but I manage sometimes...
Please, help me.

And have a nice day my wonderful Explorators of wonders !

noble saffron
#

Hi.Is it possible to repeat a die roll as many times as the player has input?
For example, I would like to repeat "2d20+10" as many times as the user input as follows and output each number in chat.
 User input: "3"
 Chat: "2d20+10 -> 16+10 -> 26 , 2d20+10 -> 7+10 -> 17 , 2d20+10 -> 2+10 -> 12
Would it be better to use a script? Sorry if there is a similar question somewhere else.

formal goblet
formal goblet
fiery loom
noble saffron
formal goblet
#

Check the Guide in the Wiki about the Formula System if you need more explanations.

dense pine
#

trying to make a roll message inside an item work: want it to add a value that i entered in a number field "wert" to a number field

fiery loom
dense pine
river sierra
hollow dew
#

looking at this example from the wiki: setPropertyInEntity('target', 'Defense', "target.Defense * 2") that is probably the fix you need

#

encapsulate the last formula parameter in double quotes

runic condor
#

How do I change the background of the character sheet?

formal goblet
formal goblet
runic condor
#

Where do I put that?

#

Im really dumb with all that kinda stuff

formal goblet
# runic condor Where do I put that?

Go to the game-settings, navigate to the CSB-Settings and check where CSS is mentioned. In there you can put the path to your file (you have to paste the path manually, the explorer will not work).

#

Or you use the Custom CSS module

runic condor
#

I got the custom CSS module. All I'm trying to do is make the background of the character sheets white for now.

formal goblet
#

Do you know how CSS works? If not, try to read some online tutorials. They are better than whatever I'd tell you.

runic condor
#

I dont understand it very well. I'll look into it.

#

Figured it out I think. Does this look like itll break anything?

formal goblet
#

It's just styling, you can't break the internals of CSB with that.

runic condor
#

Ok cool. Working how I wanted.

#

Thanks for suggesting that module, that's way easier to me than what I was messing with earlier lol.

hollow dew
#

i've been bashing my head against the wall for a few hours trying to get this one aspect of a userInputTemplate working. the documents say Any input field using a key already defined in the triggering actor or item will use its value as default value, but will not be saved in the actor or item.

i want to use that feature to set which radio button from the top group is selected when the input opens (group key is rollType). i've tried everything i can think of, adding the key to the triggering item and setting its value to the radio button i want, adding a variable with the same name to the roll message and doing the same, using a switch case or ternary operator to try and call one of three userInputTemplates (each one having a different value manually checked as the default), and nothing works. i'm not sure if i'm misunderstanding this functionality or just been staring at a screen too long

dense pine
formal goblet
dense pine
#

but why shouldnt i be able to add +1 to the value if the above code can set it to 1

formal goblet
#

The context is really important in this case. The formula is executed from an item, so by default you'll access the values from the item. But because you also need a reference from the actor, you have to tell the formula that you want to access a different context. That's why you need a target.-prefix for values, which come from the attached actor (I hope that this prefix is allowed for attached, I'm only sure about target & selected)

runic condor
#

I can't figure out the right way to write this roll message:

${r1:=[1d12]}$ + ${r2:=(SkillTrainedAvoid? [1d4] : 0)}$ = [[${!string(r1+r2)}$]] ${r1 === 1 ? "Complication" : r1 === 12 ? "Crit Success" : ""}

That bit at the bottom, I want it to check what the D12 result was.

#

it rolls the dice and displays the rest correct but I cant get it to output "Complication" on a 1 or "Crit" on a 12

formal goblet
runic condor
#

still not working it just outputs that entire last line in the chat

formal goblet
runic condor
#

thank you

#

Lol it works now

timid glade
#

Is there a way to get the rolls to look more like the original rolls or flare up what's there? See the two images for what I mean.

formal goblet
timid glade
#

Nah, just gonna tell my players I made a system, used my limited CSS to make it look pretty as I can, matching the style of the character sheets from the book, and if they wanna complain they can learn to script lol Thanks! Would not have been able to complete this project without your help.

dense pine
#

can i put a condition inside the "true" part of another condition?

#

hoped this would work, but i doesnt: (inside Item Modifier)
${is_effect ? fetchFromActor('attached', "VORLAGE") > 0 ? ref('wert3')*stack : 0}$

vagrant hollow
summer berry
# formal goblet Use the formula option of the dropdown and use the `switchCase()`-function to de...

Thanks for your help, worked like a charm. But now I have a follow-up question, and I would be thankful for an answer:

I implemented the dropdowns via switchCase. But if I want to work with the keys (in this example 'c,d' and 'e,f'), it will only recognize the first letter of the strings, here 'c' and 'e'. If I want to check for 'd' or 'f' in a switch, it will show nothing. For example: ${switchCase(dropdownKey, 'c', 1, 'e',2}$. It will give me the 1 if the Key is 'c' but won't show anything if the key is 'e'. Any idea?

summer berry
#

No, no errors were thrown

formal goblet
formal goblet
summer berry
#

The dropdown I'm trying to get the keys of has the following formula:

${switchCase(field_rasse, 'rasse_mensch', 'Averländer, Hochländer, Middenländer, Nordländer, Ostmarkler, Ostländer, Reikländer, Stirländer, Talabecländer, Wiesenländer, Bretonier, Norse, Kislevite, Estalier, Tileaner, Arabiar', 'rasse_zwerg', 'Gebirgszwerg, Imperialer Zwerg, Nordzwerg', 'rasse_elf','Hochelf, Waldelf, Seeelf', 'rasse_halbling', 'Mootland Halbling, Imperialer Halbling')}$

The Label which assigns a number given a key looks like this:

${switchCase(field_kultur,'Averländer', 1,'Hochländer', 2)}$

If I select 'Averländer' it returns 1. If I select 'Hochländer' nothing is shown

#

But the dropdown itself is working

summer berry
#

Tatsache. Ich danke dir. Daran hatte ich gar nicht gedacht. 🤦🏻‍♂️

spare sky
#

@formal goblet Ich habe nun mal Forge aus der Gleichung genommen und Foundry lokal installiert. Also an Forge liegt es anscheinend nicht, dass Felder nicht aktualisiert werden.

Auch ist mir aufgefallen, dass es einen Unterschied macht, in welcher Reihenfolge man setPropertyInEntity-Anweisungen schreibt:

Das funktioniert:
<h2>Effekt berechnen (${item.key_item_effekt_name}$)</h2> <p>Gewürfelt Dauer: ${dauer_wert:=[:item.key_item_effekt_dauer_wuerfel:]}$</p> ${#setPropertyInEntity('item', 'key_item_effekt_dauer_label', "dauer_wert")}$ <p>Gewürfelt Wert: ${effekt_wert:=[:item.key_item_effekt_wuerfel:]}$</p> ${#setPropertyInEntity('item', 'key_item_effekt_aktiver_wert_label', "effekt_wert")}$

Das funktioniert nicht:
<h2>Effekt berechnen (${item.key_item_effekt_name}$)</h2> <p>Gewürfelt Wert: ${effekt_wert:=[:item.key_item_effekt_wuerfel:]}$</p> ${#setPropertyInEntity('item', 'key_item_effekt_aktiver_wert_label', "effekt_wert")}$ <p>Gewürfelt Dauer: ${dauer_wert:=[:item.key_item_effekt_dauer_wuerfel:]}$</p> ${#setPropertyInEntity('item', 'key_item_effekt_dauer_label', "dauer_wert")}$

Anscheinend hat die Position des Ziels im Bogen einen Einfluss darauf, ob es funktioniert oder nicht.

formal goblet
spare sky
formal goblet
#

Unter "Issues" neues Ticket erstellen

spare sky
#

Ok

spare sky
# formal goblet Unter "Issues" neues Ticket erstellen

Ich kann keine Tickets anlegen, da ich die Rolle nicht besitze: "You're unable to run this command:
You need at least one of the server whitelist roles: Foundry Staff"

Ich poste das Thema jetzt einfach im Channel...

formal goblet
sage wave
#

Hello, how would I go about making a formula that add a specific number if a specified checkbox is selected?

main magnet
#

Any way to force labels to not split words into two rows?

hollow dew
#

is there a way to check what the name of an item's template is?

#

i thought it might be an accessible property of the item, but i didn't see any such property when logging the item object in console

dense pine
#

you could define a hidden attribute

hollow dew
#

yeah, that'll be my backup. i just figured, item containers have a way to filter by template type, so there might be some way to get that info

scarlet skiff
#

You can get the template-id in the console. Not sure if there is a method to convert the id to the name

main magnet
#

Is there any way to make a checkbox inside an item appear in an item container? So I can just click the box in the container without opening the item?

dense pine
hollow dew
# main magnet Is there any way to make a checkbox inside an item appear in an item container? ...

i dont know about that, but i have a hacky solution that could work for you. this is the info in the Equipped column. code for copy pasting purposes

<i class="fa-regular  ${item.isEquipped ? 'fa-square-check' : 'fa-square'}$"style="color:black; background:white;">  </i>
${#setPropertyInEntity('item', 'isEquipped', "item.isEquipped ? '' : 'true'")}$

%{throw "Done";}%

replace isEquipped with the key name of your checkbox. the %{throw "Done";}% is a little hack to avoid the roll message from outputting until that functionality comes out next update.

formal goblet
runic condor
#

I have a general question about items and templates. Are templates meant for types of items or each item? I have several different guns in my system that each have the same types of stats but just different numbers that I dont want players to be able to edit.

formal goblet
#

You can create components, which are only accessible by GMs. This way, you can create Input-Components, which are only editable by GMs and Label-Components, which are by default read-only, which can be displayed to your players.

runic condor
#

Ok, trying to wrap my head around the Items, I've made several character sheets but never used items.

#

So Im trying to make a bunch of weapons that all have these stats locked. Ideally I could have players just click on the damage value and it rolls their damage dice. I'm confused on if Im supposed to make a new template for each different item or one template for each item that shares the same type of properties

hollow dew
#

one template should do it, if they have the same type of properties

#

you're going to want to make another table, set up in a similar way, but open up the advanced configuration and select this

formal goblet
#

Actor and Item Templates act the same way. You can have multiple concrete entities referencing the same template

hollow dew
#

then, use number/text fields in that gm hidden table, and give each property a key

#

in your original table, make labels that reference those keys
${damage}$ for instance

#

i do something similar with my heritage items

formal goblet
#

The Example-project does the same with the _Spell-Template

runic condor
#

Awesome ok I get that now

#

Thats what I need, having problems getting the damage dice to roll though

formal goblet
#

What´s the formula?

runic condor
#

Im not sure what to put I just have ${WeaponDamage}$

#

It just outputs "3D4" but doesnt see it as dice

hollow dew
#

you're gonna need to use [] to encapsulate the roll

runic condor
#

Awesome that fixed it thank you

runic condor
#

Is there a way to reference the name of the item for a roll? Does it have a key?

formal goblet
runic condor
#

Ah I had it capitalized which wasnt working. Thank you

sage wave
# formal goblet `${checkboxKey ? 1 : 0}$`

I'm a bit confused what the different variable mean here, are you able to break it down a bit more for me?

If it helps my goal is to make a formula that checks if a specific checkbox is checked. If it is it adds a specified variable (level bonus) to the total. If it is not checked it adds nothing to the total.

past ivy
#

~~has something changed as to how you roll on a rollable table inside a label roll message?

I have ${[#roll_die|3d4]}$ (copied from other examples in here) and the table name is "roll_die".

all I get is an empty square thingy instead of my custom image. edit: and it always only rolls 1 die never more. the table works perfectly fine when used from the rollable table menu.

for a bit more context I have the "dice so nice" module and I can hear and see the die rolling~~

solved the problem

latent sorrel
#

I have an actor template that I am using to track two opposed meta currencies. I would like the sheet initially appear a specific location relative to the lower left browser window but remain draggable. My efforts have removed the draggability. Is there a way to do this?

formal goblet
hardy smelt
#

Hi, I am having some trouble with the ref() function. I keep getting null returns. Specifically, in a label in an item container, I am trying to use a Dropdown list on an item to referance a Number field on the main character sheet. The Dropdown list keys match several Number fields on the character sheet and I am trying to display the numerical value from the number field. Any assistance would be greatly appreciated.

#

Oh, btw, the ref() function works fine on the character sheet when I use a static string value instead of the component key of the dropdown.

formal goblet
hardy smelt
# formal goblet I'll give you a hint: `${ref('dropdownKey')}$` is equivalent to `${dropdownKey}$...

So, I suspect that I am doing something wrong here. I have a Number Field with a component key of sk_sar. I have an item with a Dropdown List with a component key of wpn_skill. in my Item Container, I have Label with a Label text of ${ref(item.wpn_skill)}$. On a test sheet sk_sar has a value of 3, wpn_skill has an option that corralate to a value of sk_sar, and the label is displaying nothing (I assume a null return). If I add a fallback value to the ref(), I get the fallback value in the Label.

formal goblet
hardy smelt
#

Oh, and when I change the label -> label text to remove the ref, it displays sk_sar.

formal goblet
#

Well... The comma is a delimiter, everything before and after it will be taken as is (and I literally mean everything)

#

So what do you have exactly between your first and second comma? 😅

hardy smelt
#

Ah, there should not be a space after the comma then!

hardy smelt
#

I am still getting used to the whitespace rules.

formal goblet
#

I suggest to use the Custom Options origin if you don't have a formula in the dropdown

hardy smelt
#

That makes sense. I was using the Formula, because I am reusing that same list in several places and it made it easy to copy and paste.

outer marsh
#

Hello... I need a litte help, please... I understand I can $ { [#rolltable] }$ to make a rol in a rolable table... is there a way to roll several times in the same table with a command? something like the [: key :d6] command?

lean sable
#

Hi ! soooo, after a bit of fiddling I seem to have encountered an issue (I'm not saying it's a system issue, just that I have an issue, probably because I didn't set up things properly ^^)
Basically, I have 4 attributes (number fields, that represent d&d like attributes), those attributes are grouped as an array with an hidden attribute keyed "Attributes", and another array that groups their name (so : Attributes : ${Key}$, ${OtherKey}$, ect.... and Attribute : ${'Key'}$, ${OtherKey}$,ect...)

On another part of the sheet, I have dropdowns lists, with Attributes as the key options and Attribute as the label options, for things like "This skill uses STR to roll"
The only problem is, those attributes (lets call them STR, DEX, INT and WIS) can be the same value based on character creation, and when it is, the dropdown keeps reverting to the first value (So let's say the attributes are STR : 4, DEX : 6, INT : 8, WIS : 8, if I chose WIS as a skill's selected attribute, any refresh of the sheet will revert it back to INT, wich on paper would still roll the same, but you'd need to remember the revert any time INT's or WIS's valu is changed so that it does use the good attribute)

Is there any workaround or fix for this ? I know the template uses a dynamic table for such attributes, but I've been avoiding to untill now for the sheet's organisation/presentation (of course if it is the intended/best practice way, I'll juste chew my wanna be sheet layout designer hat)

formal goblet
celest prairie
#

Hi, question. I couldn't find any info on this.
Since you can make your system of your own design, are we allowed to use CSB commercially?
If not, is there a way to prevent players from downloading the .json?
I found out that with downloading an actor's file, you get the entire template code with it...

tender jungle
#

Hey! What am I doing wrong here? value_prof does exist on the attached actor. :value_prof: doesn't seem to work either.

#

the code: [[8+:fetchFromActor('attached', 'value_prof', 0):]]
the roll message using it: null

hollow dew
#

roll messages are only a single set of [] brackets, maybe that

#

and i think they still need to be wrapped in ${}$

tender jungle
#

When I wrap in ${}$, it just returns the text itself with ${}$.
Single brackets do the same.
Though, now that you mention it, I wonder if it has to do with me using the richtext editor? or it's how the roll message is being made? hmm.

hollow dew
#

ah, yeah, i'm not sure how they interact with the richtext editor

hardy smelt
#

Hi all, looking to tap the hive mind. I am working on implementing Twilight 2000 2nd edition using Custom System Builder. Right now I am working on implementing the initiative system. In Twilight 2000 a character has a fixed initiative value of 1 to 6. A turn consists of 6 phases, starting at 6 and descending down to 1. A character can act in the phase matching their initiative value, and each phase thereafter during that turn. Any suggestions on how to implement this? At the moment I am using a workaround with the "Reverse initiative" module (it adds a right-click option to duplicate a token in the initiative tracker) and manually adjusting each token's duplicate's initiative value so that it gets the correct number of actions each turn. This is a very cumbersome workaround, so I am hoping that someone has a better idea? Any suggestions are welcome.

formal goblet
formal goblet
formal goblet
brittle moth
hardy smelt
formal goblet
#

And check if there is already an existing solution for this problem

celest prairie
static cargo
#

Can anyone tell me about the Conditional Modifier List component? What it's for, why/how I want to use it, etc. I know the wiki has a large page that talks about all the components and there's even pictures, but I learn best from practical examples over essays.

formal goblet
static cargo
#

You guys work really hard at making this 'goof-proof' don't you? 😉

formal goblet
#

Well, one of the first things you´re getting taught in university is that you have to expect everything a User is able to do. So it´s important to limit as much as needed 😅

dire socket
#

Anyone know how to do item duration? Like temporary effects that tick down with initiative or something like that

formal goblet
dire socket
#

Ohh interesting, I'll look into that. Just wondering if there was anyway that could streamline the current way I do it. Thank you

lean sable
# formal goblet Your dropdown should only contain the blank keys of your attributes, not the res...

Hi ! thanks for anwsering and I'm terribly sorry for the delayed response
that does fix the selection problem~~, however now, I'm not sure how to get back the selected attribute's actual value
so basically write a formula that says "take the blank key selected in the dropdown and go find it's resolved value"
(that seems to be the point of filterValue in the "fetchFromDynamicTable" function, if I was using a dynamic table, any workaround with an array ?)
~~
EDIT : Ok, I found out ! It was just "ref(sameRow('dropdownKey')" !

dense pine
#

can i put links to jounal entries in a Label text?

fierce harbor
zinc verge
dense pine
fierce harbor
# dense pine Like this? Doesnt work either

I mean that it works for the component Rich Text Area, not in the rich text field of a Label. Sorry for not being clear.
Anyway, try copying that text in the Roll Message field without using rich text editing

zinc verge
#

but also what Torlan is saying is correct. Has to be a rich text component specifically

vagrant hollow
fair yoke
#

Hey, is there a way to make a number field so a player can see it but not directly interact with it?

fierce harbor
fair yoke
#

like for making the stat total untouchable directly but have the default value be a combination of the various modifiers elsewhere

fierce harbor
fair yoke
#

and just tell it that lable name = the formula?

fierce harbor
fair yoke
#

ahh, so lable text (optional) is what I meant 😛

#

sorry lol

#

probably easier to do in the background with a hidden stat and have it just display that hidden stats total, that way I can reference the hidden stat for computing the bonus as well

fierce harbor
fierce harbor
fair yoke
#

that would be done in the label with ref(attribute) right?

fierce harbor
fair yoke
#

ok nice, trying to finally get a sheet together for the old legend system

#

not OpenLegend

#

it's pretty basic D20 but with a few interesting twists

#

like the stat you use for attacking and defence can be totally different depending on class

#

which makes a muscle wizard hilariously entirely possible 😛

fierce harbor
fair yoke
#

I CAST FIST

#

Armstrong posing is entirely mandatory

fierce harbor
fair yoke
#

yeah, it has a really cool system where every class has 3 'paths' of abilities that you just auto advance down as you level, so multi-classing is just swapping out one of those paths for another and gaining its abilities at the same rate as the one you replaced.

#

and similarly powerful races can be played that way by swapping out one for a racial path

fair yoke
#

plus taking a page from 4e where casters weapons can add special effects onto spells, like a flaming sword would turn a melee types attacks to fire damage, a flaming wand will suddenly make that magic missile fire damage

#

which means they don't really need to make a whole ton of elemental spells

#

just a 'this spell hits one person really hard, this one goes boom, your equipment determines the elemental effect'

#

or you just take brutal thee times and hit like a truck 😛

dense pine
#

I use the middle, dialog editor, pull the Entry in and klick the bottom Save Button.

#

Just displays this:

fierce harbor
dense pine
fierce harbor
dense pine
#

im missing the "anchor" text

#

did you just drag and drop or did you press any key while dragging?

fierce harbor
fair yoke
#

any idea how I'd setup a 3.5 style multi-attack? so BAB, then BAB -5, -10, etc

#

just so its relatively automated

fierce harbor
fair yoke
#

yeah that's what I was thinking

fierce harbor
fair yoke
#

I might just loot the MM3 sheet that exists for some mechanics because... D20 system be D20 system 😛

dense pine
fair yoke
#

OK I have a drop down list and I am trying to get it to reference another value and then fire it to anything that references the drop down

#

because it's just displaying the key text from the drop down

#

instead of the actual numerical value that should be associated with that key from elsewhere

#

so its just showing STRMOD instead of say, 4

fair yoke
#

nvm, worked it out

#

just made the drop down formula instead of default

latent sorrel
#

can a macro be used in the initiative formula? I have to translate the system's pool of symbol dice into numbers and I would like to use my existing dice rolling macro to do this.

dense pine
runic condor
#

Having a hard time figuring out Item Containers.

#

Not sure how to reference item properties with the columns

boreal quartz
dire socket
#

Is it possible to reference the value of a characters initiative in a roll?

runic condor
#

Weapons have ammo that Id like to be able to change from the container rather than having to open the sheet

boreal quartz
#

Custom columns in an item container can only be labels. They can only display information.

#

Say, is there a way to change the names of the built-in statuses in Foundry?

#

Or add new ones, or whatever.

#

I guess it's Combat Utility Belt or nothing, which has known issues with CSB. Sigh.

formal goblet
runic condor
#

Is there a way that I could set a label to reduce its value by one when I click on it?

#

I have an Item container and it would nice to be able to click on the Ammo value to reduce it by one.

boreal quartz
outer marsh
#

Hello all... Maybe you can help me with a thing I'd love to put into my sheets...

  • I have an actor who has an item containter. That container, by game design, have only one item in it.
  • This item has several fields inside it.
  • I have a label in the actor sheet which text I need to be one field in the item in the item container.
    ¿Can this be done? Thanks!!!
#

(its kind of pre-fill the sheet when equiping a item)

boreal quartz
outer marsh
#

Yeah I did that, I have all things with key id's... but i don´t know what to write in the label message. I tried ${ itemcontainer_key.field }$ but it gives me an error

#

I assume as, itemcontainer is kind of collection, I have to access to "first" element prior to that... but I can't locate how to do it

#

(some kind of itemcontainer[0].field or so...)

regal whale
#

Hey CSB team! Is there a way to have a resource reset to full at the start of a combat turn? I am developing a system that uses action points for a characters abilities. Every round they should have 4 action points. I would like to set it up so abilities remove the points but at the beginning of their turn they are replenished. Is this within CSB's capabilities? I could always have it managed manually by the players but i think it would be cool to have it automatic.

outer marsh
formal goblet
formal goblet
# outer marsh Yeah I did that, I have all things with key id's... but i don´t know what to wri...

The Item Container itself is not holding the Items (Actor is the only holder). So you have 2 options:

formal goblet
outer marsh
boreal quartz
# outer marsh Yeah I did that, I have all things with key id's... but i don´t know what to wri...

I apologize, I had it backwards -- thought you wanted a label from the actor reflected on the item container. Here's what you can do: using the component key of the destination label (on the actor), go to the item template and add an item modifier with the same name as the label. Set the operation to =, and -- this is important -- make the value formula a function so it will automatically be copied to items that use this template.
So the item template's modifier would be something like:
Key = armor_name, Op = "=", Value formula = ${name}

#

Using Op =, that will set the label to the last item that was added to the list. Since you're only expecting one, that should work fine.

#

I did something similar to this so equipped armor would automatically add to the actor's defense bonus.

outer marsh
#

🙂 it worked!

vagrant hollow
outer marsh
#

It worked very well with the item template modifier, like a charm

boreal quartz
#

Great!

outer marsh
#

Now... I have a more difficult question...
Let's say the item I am going to equip has a list of powers, modeled with a item container (within the item I am going to equip in my actor).
So... Can I fill an item container in my character sheet (the powers list) with the equiped item "powers"? (I hope I have explained myself right)

#

(This is for a mecha rpg... I'd love to equip a mecha and put in the character sheet all the mecha characteristics, defined in a single mecha item, to make it easy for the characters to change mecha, :P)

boreal quartz
outer marsh
#

yes, I am making test 🙂

#

Thanks a lot to all for the help, support and will to help 😄

latent sorrel
zinc verge
outer marsh
hardy smelt
#

Hi, is there a value that I can change in the Json file for a character sheet to specify which template should be used for it? I changed the sheets template to one that has an error on it that prevents it from opening, and I would like to force it to use a known good version of the template. Any assistance would be greatly appreciated.

formal goblet
scarlet skiff
river sierra
dense pine
river sierra
#

I'm using it for MechWarrior Destiny, where everyone has one Actor sheet for their character, for RPing and personal-scale combat, and at least one another for their vehicle, for 'Mech-scale combat.

#

They can of course switch vehicles if one gets blown up, or for various other reasons, and have more than one vehicle available. So the idea is that they can "switch out" the vehicle they are currently using by dragging and dropping one of them onto their personal character sheet, and have all the important values and rolls available from that one.

#

And then you can go two more levels of abstraction up, with one "Actor" representing a whole squad/lance/... of multiple of those (where you set up the composition by dragging and dropping vehicles and their pilots and gunners into the corresponding slots), and one where one "Actor" represents a whole, potentially combined-arms, company of vehicles and their crew.

#

In a fantasy RPG, this could be used to have a ship Actor with slots for various roles on board the ship, or a kingdom Actor for a strategic warfare, kingdom building and politics game.

#

Or, you know, just a "group" Actor like the newer versions of the pf2e system have.

river sierra
#

Next goal: Look up how translation for modules in Foundry works...

outer marsh
outer marsh
river sierra
#

The limit is on Foundry's side, BTW.

#

Items-inside-actors is fully supported with all kinds of extra bells and whistles, items-inside-items and actors-inside-actors and actors-inside-items you have to code around.

tidal quiver
#

I have a problem, I have macro that's using warpgate to "deal damage" to the tokens. It all works, but now I need to also "apply" this damage on players sheet, not only token. Any idea how to do it? I have one GM only visible checkmark for "Is player?" so it could be checking it's state to see if it should save dmg to the sheet

formal goblet
tidal quiver
formal goblet
# tidal quiver Hmmm... Could be. But if I link it, am I still able to just pull new one for eac...

Link Actor Data
When enabled, changes to the resource pools either on the base Actor or on the Token itself will reflect in the other location. These changes apply to all linked tokens in all scenes, and is best used for unique or named characters. It's not recommended to link actor data for generic creatures or types of character (such as bandits). When data is not linked, each Token will have independent resources pools and turn order tracking.

#
  • Linked: 3 Tokens, 1 Sheet (every Token will reference the same sheet)
  • Unlinked: 3 Tokens, 3 Sheets (every Token will have its own sheet)
past ivy
#

I've encountered a weird problem. I've lifted some code from all over the place and adjusted it as needed. it works as intended but it adds an additional line to the chat windows with "undefined"

for context: label roll message > code that rolls on a table multiple times and throws all the results in a single line into the chat.

the first message is by the "player account" and the second message is by the "character" itself.

can anybody help me remove that annoying line?

#

here's the code:

%{ let baseMessage = "";
let sum = 0;
// loop the number of dice entered in the input box
let roll;
let baseTable=game.tables.getName('wuerfeln');
let bonusTable=game.tables.getName('erzaehl');
for (let i = 0; i < ${schnelligkeit_wert}$; i++)
{
// roll against the rollable table
roll = await baseTable.roll({async:true});
console.log(roll);
// add to the message the image of the entry and a debug of the text message
baseMessage += '<span style="position: relative; text-align: center; color: red; padding: 1px;"><img src="' + roll.results[0].data.img +'" ></span>';
sum += +roll.results[0].data.text;

    }
    roll = await bonusTable.roll({async:true});
            console.log(roll);
    // wrap the final message
    let finalMessage = "Wurf auf Schnelligkeit" + "<br>" + "<div>" + baseMessage + '<img src="' + roll.results[0].data.img +'" >' + "</div>" + "<br>" + "<div font-size: 20px;>" + sum + "</div>";
    // Finally send the output to the chat window.
    ChatMessage.create({ content: finalMessage });}%
formal goblet
past ivy
#

how would I go about it?

formal goblet
past ivy
#

I lost the roll sound but also the message, thanks!

past ivy
#

I've downloaded an mp3 and used

AudioHelper.play({src: "worlds/dice.mp3", volume: 0.8, autoplay: true, loop: false}, true);

to play it.
let problem = "solved"; ^^

runic condor
#

Is there a way to show the number of items in a container in a label?

#

Id like somehow to have it say "Weapons 3/3" and have that reflect the number of items in the contianer.

formal goblet
runic condor
#

also I was trying to figure out that setPropertyInEntity thing but im confused on how to structure it to reduce a value when i click on it.

#

is there a way to use setPropertyInEntity in the roll message of that label so that it reduces by 1 when clicked?

#

When I try it just writes it in chat

formal goblet
#

You can basically copy it...

runic condor
#

Oh my ${}$ around it had a typo, thank you!

tender jungle
#

Is there a way to clear a dynamic table? Preferably actually clear, as opposed to setting "deleted" to "true".

formal goblet
tender jungle
tender jungle
#

ahh, lmao.
Does CSB cull deleted entries at any point, though?

agile quartz
#

Hi guys! Because I couldn't find it, I'm developing a sheet for Kids on Bikes in FVTT.

This is one of the tabs of the sheet, I'm using the Custom System Builder, and one function I'd like to add would be that when we select one of these "checkboxes" with a characteristic, the characteristic would be displayed in the "Main" tab, in its respective place (Strengths/Failures), as shown in the second image.

Image 1:
https://cdn.discordapp.com/attachments/798677019381727242/1166129315008745582/image.png?ex=65495d8e&is=6536e88e&hm=135ac7844e7679cd4d4adc78ba938ac0b5007557ddb0fdeaed93b3ec5bf8ca6a&

Image 2:
https://cdn.discordapp.com/attachments/798677019381727242/1166129315440754708/image.png?ex=65495d8e&is=6536e88e&hm=879293a55cb7b4ea55a6bbe90ec01b47cac226580f0cf6be7c03353c67f6917a&

timid glade
#

When it comes to subtemplates, there's a small paragraph about them but it doesn't really say how they're used or any examples of them. Do you just name like tables and stuff identically to what an Actor template would have?

agile quartz
#

Sorry, Case, but I didn't understand your question

latent sorrel
timid glade
#

Still not sure I understand how to use them though but I'll work on figuring it out.

latent sorrel
#

Do you mean in designing template, creating the item from the template, or getting the items onto the character sheet or something else?

timid glade
#

Getting the SubTemplate into a character sheet.

latent sorrel
#

Create a container on the character sheet. Select the template that will be displayed in the container (ie "_weapon template") if you want to limit the items in the container to a type. Create the item based on the template (ie sword). Drop the item on to the character sheet. It should appear in the container.

kind basin
#

Greetings Friends and Brilliant Coders, Is there a way to Add the values of several drop down list Keys together(assuming they are numerical )? or really just any way to convert a string to a float value ?

#

Basically i made a potion crafting system that relies on a d100 roll. But depending on the ingredients and conditions the potion is made in adds bonuses or penalties. I'd like to have this small panel where they can select there conditions and then have the bonus calculated and then added or subtracted from the roll.

latent sorrel
#

I am trying to use a macro that generates a dialog in the Roll Formula. I have not been able to resolve the following:

  1. Is there way to differentiate between Group NPC Initiative roll and individual initiative roll. By detecting this, I can skip the dialog for the group roll.
  2. The macro does not wait for the dialog before continuing. I tried Dialog.wait() instead of new Dialog() but I get the error Dialog.wait(...).render is not a function. Not sure if this a CSB issue or a Foundry issue.

Does anyone have any suggestions on resolving these?

raven tree
#

Hi nothing complex - just seekign to update an equation - basically I need to combine a few values, but I only want to add a particular value if it is less than zero (Max(sameRow('WeaponBonus'),0)

river sierra
#

Did you try using max(sameRow('WeaponBonus'), 0)?

#

Alternatively, min(sameRow('WeaponBonus'), 0).

vagrant hollow
agile quartz
vagrant hollow
agile quartz
#

I'll take a look, man! Thanks a lot!

outer marsh
#

I have an issue with the visibility formula... I have a Item Container with a text field (don't judge me, it has 1 or 0 to mark if something has to be visible or not)

I have a label in the item container with the boolean condition as result (to test) ${item.gear_ad6_dest==1}$, and it states "true" when the item has the text field with an 1, so right.

BUT

In the visibility formula I tried (without the ${}$)

  • item.gear_ad6_dest==1
  • gear_ad6_dest==1

And with any option, it doesn't show... Would you point me what am I doing wrong??

#

(I also tried with "1" and '1')

#

(and no error in the console, btw)

#

(tried also with a checkbox in the item... nothing 😦 It must be a silly error but can't get it)

tidal quiver
#

~~Hmmm... I need to show results of rolls set by this code separately (so that 2d6 shows me 1d6 and 1d6, not result (sum) of 2d6) preferably without removing it from label it is in :/ Does anyone have any low-cost idea?

${#basicDiceRoll:=PCHealthPointsAct <= 5 ? [2d4] : PCHealthPointsAct <= 10 ? [1d6]+[1d4] : [2d6]}$

this variable is later invoked in many different rolls for damage/attack etc. for example like this:

${BasicDiceRoll+SkillModifier+AttrModifier+WeaponOnePrecission+PCWywazenieUpgrade+PCWydluzenieUpgrade+GeneralRollModifier}$
```~~

Nevermind, got that assignment in different label, and made this code way easier :3
regal whale
# scarlet skiff Yeah thats done with a world Script. Should be pretty simple too. Check macro-po...

Thanks ioplex! i'll look into it. This seems like too basic of a question for here, but i am really struggling just to have a button that takes a field and modifies another field. The documentation shows you can use a notify or setPropertyInEntity in a roll message but i cant get either to work. Is there some type of syntax to make it work?

Shouldnt ${#setPropertyInEntity('self', 'AmmoTest', 5)}$ just set my label AmmoTest to 5? it just produces a blank chat entry.

dusk arch
#

Hi, i've ran into a problem
Here is what i've got so far:
${roll:=[1d100]}$
${roll}$
${ [roll > :Current_Strength: roll == :Current_strength:]}$

What i want it to do in words is: roll 1d100, output number to chat(maybe with text), change number if its greater than :Current_Strength: to :Current_Strength: and output to chat

lean sable
#

I'm still learning so take it with a grain of salt, but maybe something like
${roll > Current_Strength **?** Current_strength : roll}$ ?
(if roll superior to current strength, then display current strength, else display roll)

#

I do have a quick question myself : I'm trying to use a formula as a filtervalue in an item container, is that actually possible ? (in my case, displaying only the spells (item) with the same "school" as the character (actor)
It doesn't seem to work, but maybe I just configured something wrong

formal goblet
formal goblet
formal goblet
lean sable
manic junco
#

The export/import template buttons are not working quite right for me. There are several types of items in my game, the character sheet has a different item container filtered to show each of the item types. After importing to a new game, the character sheet loses all the filtering information, so item containers are blank and the template needs to be corrected to show the right items in the right block.

#

Even once I've corrected the character sheet, I have a problem setting up a new game with the imported templates. I've made a "shared data" module (as per the Foundry documentation, it provides compendiums to copy to/from), I can import characters, but they lose all their information as to what template they are using. Any character that is imported generates error messages for each item ("Item template has been deleted for item xxx"). Is there something I should be doing to copy things (characters/items) from one game world to the next?

blazing ibex
river sierra
blazing ibex
#

assuming it has something to do with nesting

river sierra
# blazing ibex assuming it has something to do with nesting

Kind-of. It has to do with the fact that Label doesn't construct a consistent DOM hierarchy across all possible options. Anyway, adding grid-column: 2 to bar-container so it looks like this fixes it (and doesn't break anything else):

bar-container {
        displaY: block;
        position: relative;
        background-color: rgba(127, 127, 127, 0.5);
        height: 2rem;
        width: 100%;
        grid-column: 2;
}
#

You then get a (virtual) zero-width first column with no content when you have no prefix content, but that shouldn't be a problem, really.

summer berry
#

Small syntax question concerning item containers: When setting the label of a coulumn to, for example, ${item.key}$ I get the value of the desired item component. When I do the same for an item component which is a dropdown list, I get the key instead of the value. What am I doing wrong?

summer berry
#

When doing ${ref(item.key)}$ I only get a blank return without error in the console by the way

formal goblet
summer berry
#

I see, then I will rename my key values to fit my needs. Thank you!

oblique spear
#

Hey, can I change the icons and the name of the effects?

oblique spear
#

Also, in my game the initiative has no roll, it is assigned by the Agility attribute. Can I change this in CSB?

formal goblet
formal goblet
oblique spear
#

Thanks!!

summer berry
#

Hey, I have another question. I'm using this formula in one of my item containers to fetch something from a dynamic table:

first(fetchFromDynamicTable('dt_waffen', 'waffe_wert',waffe_name,item.typ))

It works without a problem. But if I use it in another column in the same row in the same item container in a label roll message, it spits out the following error:

formal goblet
summer berry
#

Interesting. Why is it, that the formula does work in a normal label without quotation marks but in a roll message it doesn't? But thanks anyway!

dusky mauve
#

Thank you a lot.

lean sable
#

Hi ! me again
not a problem this time, more of a general "brainstorming" or "best practice" question on the best approach to doing what I need to do

I'm trying to make a sheet for ryuutama, and I'm now tackling the items
more specifically, the price of items in ryuutama can be altered by adding preset "traits" to them
so for example, a sword would be 700po, but you could fin a "broken" sword for only 350po (x0.5), a mithril sword for 7000 po (x10), or a broken mithril sword for 3500po (x0.5x10)
so my idea would have been to add traits within an item and somehow add their modificators in a formula
The only constraint is that every multiplicators must be applied before additions, other than that I'm just wondering how to achieve it in a user friendly manner (either creating modifier in a dynamic table and adding them all in a formula ? or having "trait" items that you put in the actual item/subtemplate ?)

#

(I'm leaning toward some form of the latter considering traits can have other effects on the item in addition to altering the price)

lean sable
#

Ok, definitely some room to make it more elegant, but it works

hardy smelt
#

Hello, in one of the games in which I am using Custom System Builder (Foundry v11.313, CSB v3.0.0) my dice rolling formulas have all broken. I get the following error: Cannot read properties of undefined (reading '0'). I get this error even when I build a label with a simple formula like: ${[1d6]}$

#

I have another game on a separate server, also running foundry v11.313 and CSB v3.0.0 that is working fine.

#

Any suggestions on possible causes and/or solutions would be greatly appreciated.

#

I have tried disabling all modules, and there was no change.

covert raven
#

From everything I'm reading it should just be as simple as making a number field that has a Maximum Value and an attribute bar should be available to use by the system auto creating it.

The Configure Attribute Bars didn't create anything either while using formulas or static numbers

Any idea how it's not workin?

#

Only Module in use is the Bar Brawl

river sierra
#

It generally works for me just fine. Did you configure maxHealth to be a number field too?

covert raven
#

No, just tried it, but didn't do anything

#

maxHealth is a label that is derived from other values that change over time

health is a number field that changes by the user and the max value is maxHealth

if it matters

#

changing the maxHealth to a num field didnt do anything, and granting maxHealth a max value didnt do anything

Overall stumpped after 2 hours of attempts and thankful for something I didn't think of trying. Even if it didnt work

river sierra
#

Possibly a bug, possibly an oversight in the documentation: Component's getConfigForm() docs state the following:

    /**
     * Get configuration form for component creation / edition
     * @abstract
     * @param {Object} existingComponent Basic description of the existing component to pre-fill the form
     * @param {TemplateSystem} entity The entity holding the existing component
     * @return {Promise<JQuery<HTMLElement>>} The jQuery element holding the component
     * @throws {Error} If not implemented
     */

However, in my tests existingComponent can be null in addition to an Object. So that should either not be the case, or the parameter declaration should be @param {Object|null} existingComponent.

river sierra
covert raven
#

Yeah attempts to do that also resulted in nothing appearing

#

I can't think of why it would be different than any other person so im confused on the matter. Just yesterday someone had an issue that was solved by using the max value number field method.

Maybe its a foundry system thing im in V11 Build 299
any major issues there?
(prolly going to pass out though its 2am

vagrant hollow
# covert raven Yeah attempts to do that also resulted in nothing appearing

Did you refreshed the character sheet after making changes to the number field?
Did you tried restarting your gameworld?
How are you hosting foundry? Via Forge?

If using the “configure attribute bar” function on the template, the values will NOT be changeable via token. So no hp changes via any combat helper modules.

dusky mauve
#

How I can roll the dice for specific item from HotBar? Like a spell or item for specific actor.
As I understand need wrote the macros? Because if I put item directly to HotBar, It only open window with such spell/item.

warped garnet
#

Hi,
I've got a label roll which substracts 1 arrow when the bow is used, and rolls all the related dices. Arrows are a property of the item used.
Is there a way to roll dices only item.quantityOfArrows is > 0 ? And to show or hide the HTML accordingly ?

outer marsh
#

Good day all. I have an item container with a label column, with a label icon performing an action when clicked: Reload the item ammo. Now, there are items that have no ammo. Is there a way to conceal the label icon? I tried the visibility formula but it applies to whole column not discrete cells. Is there a way to conceal a label icon in label column in an item container (Tried with formula but it appears it doesn't work in that particular field)

river sierra
covert raven
river sierra
#

Well, in doubt export the template's data, paste it on pastebin or similar, and link the paste here so we can see it in detail.

covert raven
hardy smelt
#

In one of my CSB based games, dice rolls from formulas has suddenly stopped working. (Foundry v11.313, CSB V 3.0.0). Chat dice rolling works, but rolls from inside formulas do not, even very simple formulas such as ${[d6]}$. the error I get is: "Cannot read properties of undefined (reading '0')" I have disabled all modules and the problem persists. Any suggestions as to what I might look at to track this down?

formal goblet
hardy smelt
#

So, I created a new character sheet template with a single Label Component. I get get the same error with this roll formula.

formal goblet
#

Huh...

hardy smelt
#

And here is the full error output:

formal goblet
#

Wait, that´s not CSB. That comes from the Tokenizer-module

hardy smelt
#

Oh, looks like I reenabled mods, I'll shut them all off again.

#

Huh, still getting Tokenizer errors with Tokenizer disabled.

formal goblet
#

Well, something goes wrong very hard which is probably not related to CSB

hardy smelt
#

Ok, thanks, I'll keep working on this.

lean sable
#

(it's probably pretty obvious but just in case : "Prix" is the Price column)

covert raven
river sierra
covert raven
#

In this case was for Health Stamina and Mana

health / maxHealth
curStam / maxStam
curMana/ maxMana

river sierra
#

Yes, I know, but as I explained I don't think maxHealth will work when it's a Label. It should be a numeric field entry.

covert raven
#

Even when changed to one it doesn't work though

#

basically health is the numeric field entry using maxHealth as the max value

#

which we should be able to do since the max value can be a formula

river sierra
#

Two ideas. The first one I know works, since I use it myself; see for example this picture:

#

What it does is using hidden attributes, which I then feed into custom attribute bars.

lean sable
#

as a suggestion : at first I tried setting maxHealth in a label, didn't work because I'm not sure it's supposed to, so then I created a maxHealth Hidden Attribute, the Health has- welp

river sierra
#

The other idea I would try if that doesn't work is to change the max value formula for health into ${str+vit+lvl+aftHp}$

covert raven
#

Tried both and it didn't seem to work

One thing to keep in mind is that even if i try making static variables as the attribute bar through the configure attribute bars it doesnt seem to create any too.

#

I really dont get it

lean sable
#

did you try setting up only this in a fresh world ?

covert raven
#

May need to remake the world you think

river sierra
#

Alternatively, just a new character template with just the number fields required to make a HP bar (health, str, vit, lvl and aftHp)?

#

Also, make aftHp a number field too for the tests.

lean sable
#

I have no idea if or how that would be the culprit, but at least that would allow to make sure it's not something else
Also yes, it could just work with a new template instead of a whole new world

river sierra
#

The current formula for it, ${sum(fetchFromDynamicTable('condTable','conditionValue','statType','Health','=='))}$, not only looks way more complicated than it should be, it can also easily return an error and screw everything else up.

covert raven
#

Well with a fresh world I just made a sheet with a number field and set the max of that to 2 just to see if an attribute bar would be made, but I got nothing

river sierra
#

Seriously, I would just make aftHp into a field modified by item conditions. CSB will then sum it all up for you automatically in the background.

covert raven
#

I mean overall it isn't like the bar is 100% needed for what I'm doing, it just puzzles me why it isn't working as expected

river sierra
#

Anyway, you could start debugging it by creating a new template sheet with just two number input fields: health (with the maximum set to ${maxHealth}$) and maxHealth. Then create a new character from this template and see if its token gets a health bar.

covert raven
#

I did try that, but nothing was made
(reloaded after doing it but no new results)

river sierra
#

If it doesn't work, your world and (in the worst case) your installation is broken and nothing we can try here will ever help you until you fix it.

covert raven
#

That's what I'm thinking based on looking at things
Has to be a foundry issue with everything we've tried

#

which, weird. But seems to be the answer

covert raven
river sierra
lean sable
covert raven
#

Next I was gonna suggest the item. if it was more complicated, glad you got it handeled haha

lean sable
#

So now a sword is 700 pieces, but a broken foul second hand mithril talking sword is 3960 pieces

#

as it should be

covert raven
lean sable
#

yeah it's a pretty nice rule of Ryuutama

#

allows for customisation and bargaining
You want a good sword but it cost too much ? try finding a broken one for half the price, then the blacksmith in the party can repair it

covert raven
#

Course I'd assume if it was a super amazing legendary sword it would still be a task to repair it, but overall would be cheaper than buying a new one for full price

lean sable
#

that's the spirit

#

on the other hand, you can buy a bunch of normal swords, and craft them to become fancy swords to sell them double price (and other stuff but that would start to derail the channel)

formal goblet
covert raven
#

That is prolly it, but can't for some other worlds im running

Will update when I can though

formal goblet
covert raven
#

Terrified of breaking things with the updates. I run 4 different systems with too many modules. Whenever I get things to work I just wait for the modules to start telling me they need the next update but ill backup and try it

#

That was the solution btw

Just be updated

formal goblet
river sierra
#

Ah well. Good to know, but I just wanted to try and eliminate all possible issues to fix Jov's problem.

covert raven
#

After multiple hours im just glad the answer was there. Disappointed in the ease, but grateful for all the aid.

raven tree
#

Hi something simple - is it possible to pass a value to a macro while calling it using the following syntax
/amacro "Roll-Stat" ${!Agi}$

#

Agi is a numberfield value

#

It is returning this in the chat window /amacro "Roll-Stat" 3 - which is the correct value for the number field - its not calling the macro however

formal goblet
latent sorrel
#

I am hoping to use the Foundry Roll All and Roll NPCs buttons in the combat tracker for rolling initiative. I need to use the actor ID to get data from each token but it appears that only the first token in the tractor is returned when the buttons are clicked via my test macro which is only console.log(actor) which as two tokens, one assigned to a PC and one not. Are these buttons compatible with CSB?

formal goblet
latent sorrel
#

It doesnt appear to work correctly. I have a macro defined in the roll formula but when I "Roll All" in the combat tracker with the macro containing only console.log(actor), the same actor appears twice in console. I think this actor may be the last one added.

tender jungle
#

Hey! How would I do a roll in a recalculate()-ed string?
It doesn't seem to work the way I would expect. Everything works otherwise (without the roll).

#

omg it didn't post all three pictures :<

formal goblet
tender jungle
#

awww
randomInt it is

formal goblet
#

You can still achieve your result if the Text Field with your calculation looks like this instead: 1d2 * ${item.value}$. Then you can just use recalculate() on the key of the Text Field and it will give you a string, which will be valid for your Roll Formula.

tender jungle
#

unfortunately, only certain attacks even use this 1d2, hahah

#

I would either need to add a check to see if this move needs it, or just use randomInt

formal goblet
#

Well, you can use static values in the Roll Formula as well

latent sorrel
#

@formal goblet Is this something that can be resolved or is use of the "Roll All" and "Roll NPC" combat tracker button not supported? #1037072885044477962 message

latent sorrel
#

My initiative formula is %{return game.macros.getName("Get id of actor").execute({source: "initiative", diceletters: ""});}% and the macro only contains console.log(actor)

grave ether
#

I didnt even see this

#

Thanks for the reference

formal goblet
grave ether
#

Can I use if statements?

grave ether
#

gotcha using switch instead.. cool

#

Thanks again, back at it for me. trying to figure this all out lol

grave ether
#

how do I use this? consoleLog(dataLog : *) Its not clear on my side.

formal goblet
grave ether
#

gotcha

#

That may make life a bit easier.. I am hitting my head on a wall

grave ether
#

Is there any way to to select the second highest in an array same fuction as LARGE in excel?

#

Basicly, the idea is to compare a list of values, select the second highest and multiply it by another value

hardy smelt
#

Is there a way to implement dragable items? By that I mean the ability to drag and drop an item from one sheet to another? Or from a sheet to the Items directory?

grave ether
#

as a player or a gm?

formal goblet
grave ether
#

ok

#

Long shot but any help with that?

#

If I could get help with a shell I think I can piece the rest together

formal goblet
formal goblet
grave ether
#
%{const data = ${fetchFromDynamicTable('PCF_Table', 'Skill_Rank')}$;
const SecMult = ${fetchFromDynamicTable('Variable_Table', 'Value', 'Variable', 'Secondary Multiplier')}$;
const max = Math.max(...data);
const sortedData = data.sort((a, b) => b - a);
const secondLargest = sortedData[1];
const result = (max * SecMult) + (secondLargest * SecMult);
return;}%```
#

Does this look right?

grave ether
#

so I can use the above in a dynamic table and it returns nothing and messes with a whole bunch of stuff on my sheet. Example

grave ether
#

Would that also cause the errors on other CSB formulas?

hardy smelt
grave ether
#

Using a custom macro or script as a lable inside a dynamic table causes all my cbs formulas to error out. Either i am not doing something correctly or i am missing something.

If anyone has any macros that nest csb code or cbs code that nest scripts in that could send them to me so i can get an idea of where my error maybe that would be great. Thanks

jolly stone
#

So, I'm trying to have text only be visible if a certain box in the same row is checked (within a dynamic table). I've tried several different versions in the visibility formula line, but none seem to actually make the text show up dependently on the box. Things I believe I've tried thus far:

check
'check'
sameRow(check)
sameRow('check')
ref(sameRow(check))
ref(sameRow('check'))

Also, is it possible to use data from one dynamic table to create tooltips for items on another dynamic table? (Like for instance, if I want descriptions to show up as tooltips on for individual items chosen on a drop down box within a dynamic table). I tried earlier, but was getting error messages

fair yoke
#

OK so I want to round a number down which is easy enough with the floor command, but can anyone tell me how I would do round down to minimum of 1?

fierce harbor
raven tree
#

Does anyone have a good example is a dice rolling macro I could have a look at?

grave ether
#

The example sheet had a good example.

#
<th>Standard check</th>\n
</tr>\n
<tr>\n
<td>Roll</td>\n
<td>${Roll:=[1d20]}$\n<strong>${!Roll >= Crit ? '<br>Critical Success' : Roll <= Fumble ? '<br>Fumble' : ''}$</strong></td>\n
</tr>\n
<tr>\n<td>Dice Mod</td>\n
<td>${?{Modifier[number]|0}}$
</td>\n
</tr>\n<tr>\n
<td><strong>Result</strong></td>\n
<td><strong>${Roll + Modifier}$</strong></td>\n
</tr>\n
</table>"````
#

Try that

raven tree
#

Is there one where we are passing in a variable from the sheet e.g. strength roll ( dice pool)

raven tree
#

Almost working but getting undefined in the chat

tired zealot
#

Just to explain the use case here that we are trying to get for @raven tree
Roll a pool of Xd6
Give a total of the number of 1's and 6's
I wrote this macro js let roll1 = await new Roll(`${stat}d6`).evaluate({async: true}); let count = 0; let sixes = 0; let ones = 0; roll1.dice[0].results.forEach(j => { if(j.result === 6 | j.result === 1){ if(j.result === 6) sixes++; if(j.result === 1) ones++; count++ } }); await ChatMessage.create({ rolls: [roll1], type: CONST.CHAT_MESSAGE_TYPES.ROLL }); console.log(roll1.dice[0].results); await ChatMessage.create({content: ` You rolled ${count} successes. <br> ${sixes} Sixes and ${ones} Ones. `});
which is being triggered by js ${%{return game.user.name;}%}$ ${# %{return await game.macros.getName('RollStat').execute({stat: ${STR}$});}%}$

#

If I don't include the js ${%{return game.user.name;}%}$
the system displays

#

So the real question is: Is there a way to prevent the system from pushing the last message?
Or is there a better way to get the roll data within CSB to be able to count the 1's and 6's?

summer berry
#

Hey small question:

I'm trying to modify a field in my character sheet via item modifiers set operation. The field on the sheet is a label. The modifier looks like this:

Key: field
op: =
formula: ${typ}$

where typ is an attribute of the item. Am I missing something?

fair yoke
hollow dew
grave ether
#

@raven tree Yes, I have this tied to the stats,

<tr>
<th>${sameRow('Attribute')}$</th>
</tr>
<tr>
<td>Roll</td>
<td>${Roll:=[2d10] + sameRow('Total')}$
</tr>
<tr>
<td>Dice Mod</td>
<td>${?{Modifier[number]|0}}$</td>
</tr>
<tr>
<td><strong>Result</strong></td>
<td><strong>${Roll + Modifier}$</strong></td>
</tr>
</table>```
#

Attributes are on a dynamic table

#

This passes through weapon damage that is varible

<tr>
${sameRow('Name')}$
<th>To Hit</th>
</tr>
<tr>
<td>Roll</td>
<td>${Roll:=[2d10]}$
<strong>${!Roll >= Crit ? '<br>Critical Success' : Roll <= Fumble ? '<br>Fumble' : ''}$</strong></td>
</tr>
<tr>
<td>Ability Modifier</td>
<td>${sameRow('SMod')}$</td>
</tr>
<td>Misc. Modifier</td>
<td>${sameRow('SMisc')}$</td>
</tr>
<tr>
<td><strong>Result</strong></td>
<td><strong>${Roll}$</strong></td>
</tr>
<table>
<tr>
<th>Weapon Damage: ${sameRow('WDice')}$</th>
</tr>
<tr>
<td>Roll</td>
<td>${Roll:=[${sameRow('WDice')}$]}$
</tr>
<tr>
<td><strong>Result</strong></td>
<td><strong>${Roll}$</strong></td>
</tr>
</table>```
#

Hope that helps you out

latent sorrel
#

How do I find seemingly vague errors like this? I checked all the links but they don't seem to point to a specific formula in my sheet, unless I missed a link. My sheet is (overly) complex and near complete so there is a lot of JS.

fierce harbor
latent sorrel
#

Thanks. My question is not what but where.

fierce harbor
latent sorrel
#

no, that message is everything I have.

grave ether
#

@tired zealot How is the macro being executed? As in, are you using the label roll message? I attempted to run your code and I am just doing something wrong on my side to trigger it. My thought is that the execution is running the code that is broken up into different segments,

/Runs first
let roll1 = await new Roll(`${stat}d6`).evaluate({async: true});
let count = 0;
let sixes = 0;
let ones = 0;
roll1.dice[0].results.forEach(j => { 
    if(j.result === 6 | j.result === 1){ 
    if(j.result === 6) sixes++; 
    if(j.result === 1) ones++; 
    count++
}
/Break
});
await ChatMessage.create({
    rolls: [roll1],
    type: CONST.CHAT_MESSAGE_TYPES.ROLL
    });
console.log(roll1.dice[0].results);
await ChatMessage.create({content: ` You rolled ${count} successes. <br> ${sixes} Sixes and ${ones} Ones. `});
/break

${%{return game.user.name;}%}$
${# %{return await game.macros.getName('RollStat').execute({stat: ${STR}$});}%}$
/break

3 different different commands run through the macro even tho the execution that triggers it all of them

My thoughts is to lump them togther and then display them all at once. Please bare with me I am still learning javascript so I may butcher this code to pieces

await ChatMessage.create({
    rolls: [roll1],
    type: CONST.CHAT_MESSAGE_TYPES.ROLL
});
console.log(roll1.dice[0].results);

await ChatMessage.create(
    {content: ` You rolled ${count} successes. <br> ${sixes} Sixes and ${ones} Ones. 
    `});```

Change this part to 

await ChatMessage.create({
content: You rolled ${count} successes. ${sixes} Sixes and ${ones} Ones.,
rolls: [roll1],
type: CONST.CHAT_MESSAGE_TYPES.ROLL
});```

You should get 1 consistent message at that point

#

I see this as well that may help 7.2.1. actor.roll With the actor object, which references the current actor, you can use the roll method to trigger a chat roll. actor.roll(rollCode: string, [{ postMessage: boolean }]): ComputablePhrase rollCode is the code used with /sheetRoll postMessage: if true, will automatically post the message to the chat The ComputablePhrase object returned by the method is detailed below.

#

postMessage: if true, will automatically post the message to the chat

fierce harbor
# latent sorrel no, that message is everything I have.

Was asking because it usually puts the error-causing formula at the bottom of the message, but if it isn't there it's no use.
What does the error pop from? Formula or...? I mean from clicking a labelroll or what? Just to understand.

grave ether
#

Torlan, if you would like to send me you sheet I can take a look and see if I can track down the formula or issue that you maybe presented with

fierce harbor
grave ether
#

Sorry about that, just caught the name and was trying to help. I am at a standstill on my sheet atm. I still have to figure out scripting and I am just not that smart lol

fierce harbor
grave ether
# fierce harbor Not a bit of a problem, mate. Not a codemaster here, anyhow if there's anything ...

Yep, I am the same, I am learning Javascript so I understand what is happening but dont know how to do certain things.. My use case is as followed:

I have an excel sheet that I am currently pulling apart and putting it into Foundry, most of it is straight forward but there are 3 problems so far I have run against.

  1. Modifying the sheet in foundry is very slow and laggy <-- I can get around this by editing the Json code directly in VS and pushing it back but testing formulas tends to be a long process
  2. I have fuctions like LARGE(PCF_SkillRange_Start:PCF_SkillRange_End,2) that requires it to look at the 2 largest in the array <-- figuring out the array is easy, selecting the second largest value requires code
  3. I cant figure out how to run the actual code/macro once it is created.. Example below, I would need to nest the values inside the script or inside the formula.. but I cant even figure out how to execute the macro such as the one posted by paul above.. It just doesnt work so I feel like I am doing it wrong..
const SecMult = ${fetchFromDynamicTable('Variable_Table', 'Value', 'Variable', 'Secondary Multiplier')}$;
const max = Math.max(...data);
const sortedData = data.sort((a, b) => b - a);
const secondLargest = sortedData[1];
const result = (max * SecMult) + (secondLargest * SecMult);
return;}%```
#

I am sure there are ways to clean it up.. at some point I want to use containers for the actual weapons and armor

#

which would pull the tables out of the sheet but I dont know how that works yet 100%

#

I also have to figure out the SL Chart, ie you roll 1x100 and consult a dynamic sheets to determine success rate.

#

Soo lots to do.. lol

fierce harbor
boreal quartz
grave ether
#

Have to rethink how I reference things at times

fierce harbor
grave ether
#

Just error and it breaks my other forumlas on the sheet

fierce harbor
grave ether
#

I removed all the scripting out since it didnt work and moved on. Tell me if you get lag as well opening and modifying it

fierce harbor
boreal quartz
#

If anyone else knows how to put a quantity field in an Item Container please let me know!
I guess if I have to I can add qty to the item itself, but that's.... suboptimal...

grave ether
boreal quartz
#

In this example, I have a list of weapons the character is carrying. I'd like them to be able to say "2 concealed weapons" instead of have two separate instances of the same item.

#

If I can make this work, I can use it for general inventory -- 10 rations, 30 arrows, etc.

grave ether
#

${item.Quantity}$

boreal quartz
#

Okay, so the quantity has to go on the item and you have to open the item to edit it.

grave ether
#

You want to be able to drag and drop and it increase teh quanity/

#

No

boreal quartz
#

"no" what?

grave ether
#

You should be able to adjust the lable in the container

boreal quartz
#

Yes, I know how to get variables from the item, that's not the question.

#

THIS. Something like this.

fierce harbor
grave ether
#

I see what you mean

#

The container only gives you lables

#

ummm let me think..

boreal quartz
#

Okay, look....
Here's what I would LIKE:
I open my character sheet. I open the compendium.
I drag "Ration" from the compendium to the character sheet. Now I have 1 ration.
On the item container, I set the quantity to 10 so now I have 10 rations.

grave ether
#

Could you nest a container inside of a dynamic table

fierce harbor
grave ether
#

messing with it now

#

You can in a table

#

but not a dynamic table

latent sorrel
boreal quartz
#

I guess I'll just add the qty to the item template. Not as easy to use, but I guess it works.

fierce harbor
#

I think the problem is triggering the update of the label when the 'drop item event' fires...

fierce harbor
boreal quartz
#

Okay, one last question... can a user reorder items in an Item Container?

fierce harbor
boreal quartz
#

ugh...

grave ether
#

Could do something like this

#

but its still cumbersom

fierce harbor
# grave ether

Would it work putting in the item a counter label and creating a modifier that increments that?

Ah no, it would not I think.

static cargo
fierce harbor
#

I believe he's talking about manual reordering the items...

static cargo
#

Oops. ok. ...but does that work to sub-group things within a big ol' pile of the same item template?

tired zealot
fierce harbor
boreal quartz
#

As far as I know, the container always puts new stuff at the bottom...

grave ether
#

@tired zealot can you tell me how you execute that within the sheet? I can try and play with you code a bit as well. (I need to be taught lol)

grave ether
#

I even adjust the tag to a text field instead of a number field and it doesnt allow editing

static cargo
# fierce harbor You mean if order is by template?

I have different item templates for things like weapons, armour, keys, wands, scrolls... which is useful if I put a container on the "Combat Tab" but when viewing the entire backpack... would a prefix character work to Sub-Group everything?
... Could an emoji be used to be the prefix character?

#

⚔Katana, 🛡Scalemail, for example.

fierce harbor
static cargo
#

Mmm... I'll be in a position to try it in about 4-5 hrs.

grave ether
#

I dont see a way to add an icon as a prefix

#

Icon yes

#

but prefix just list out the name

#

unless there is a command to that I am not seeing

static cargo
mystic pine
#

Hi there, sorry to interrupt. Im just trying to make a condition. Essentially i just want it to categorize the result of a 2d6 roll as either Poor, good, or Excellent.

So far i've tried variations of:
${[2d6] > 10? 'Excellent!' : [2d6] < 3? 'Poor' : 'Good.'}$

But it rolls both times, when i just want it to go off of the result of a singular 2d6. Ive tried creating a label that has ${[2d6]}$ but it doesnt let me reference it. Just a little stuck, again sorry for the blunt intrusion.

grave ether
#

ahhhh Yeah that would work since its part of the alt commands

#

#

things like dice-d20 wouldnt work

grave ether
# mystic pine Hi there, sorry to interrupt. Im just trying to make a condition. Essentially i ...
<table>
<tr>
${sameRow('Name')}$
<th>To Hit</th>
</tr>
<tr>
<td>Roll</td>
<td>${Roll:=[2d10]}$
<strong>${!Roll >= Crit ? '<br>Critical Success' : Roll <= Fumble ? '<br>Fumble' : ''}$</strong></td>         <----------- you would use the if else command
</tr>
<tr>
<td>Ability Modifier</td>
<td>${sameRow('SMod')}$</td>
</tr>
<td>Misc. Modifier</td>
<td>${sameRow('SMisc')}$</td>
</tr>
<tr>
<td><strong>Result</strong></td>
<td><strong>${Roll}$</strong></td>
</tr>
<table>
<tr>
<th>Weapon Damage: ${sameRow('WDice')}$</th>
</tr>
<tr>
<td>Roll</td>
<td>${Roll:=[${sameRow('WDice')}$]}$
</tr>
<tr>
<td><strong>Result</strong></td>
<td><strong>${Roll}$</strong></td>
</tr>
</table>```
#

Something like that

mystic pine
#

Awesone, ill give it a shot thanks!

grave ether
#

break it apart but its doable

boreal quartz
#

When you set a label to Button mode, how do you define what it does?

grave ether
#

Your basicly saying if results = this you do this

boreal quartz
#

I don't want to roll, I want it to do something else. (I'm kind of assuming I can execute arbitrary JS code one way or another.)

static cargo
grave ether
#

yeah I agree with Sabrecho however CSB has the custom roll fields which can take that code directly and adjust it..

#

${!Roll >= 10? '<br>Excellent' : Roll <= 3 Poor ? '<br>Fumble' :Good ''}$

#

something like that

#

I think I missed a ' but you get the point

static cargo
#

What does prefixing Roll with ! do?

grave ether
#

switchCase(DropdownKey, 'a', 1, 'b', 2, 'c', 3, 0 <-- might work as well

#

! normally means not equal

#

!= for 'not equals'

static cargo
#

Ok, so is the ! in ${!Roll >= 10... a typo?

boreal quartz
#

I think so, that would compare 10 against "not Roll", which is probably going to be "false".

grave ether
#
When using formulas in chat-messages, you can use the Formula's result as is, without it being enclosed in the clickable
box with the explanations. This can be useful if you want to call a macro with parameters calculated from Formulas. To
do so, prefix your formula with !, for example :
/myMacro ${!target - roll}$```
boreal quartz
#

Ahh okay

static cargo
#

Oh... so in this case it's less a prefix for Roll and more a suffix for the curly braces... ${! ... }$

#

Thanks for clarifying that Dragius.

grave ether
#

I rolled 2 1s which gave me a fumble

#

Yep no worries 🙂

static cargo
#

Dang! I need that!! /drool

grave ether
#

Its all yours

#

I figure share is caring, we learn from each other and steal what works

#

gather ideas and push forward

boreal quartz
#

Actors are stored as a JSON object, right? Anybody know how to reference it in JS?

grave ether
#

@{<actor>|<propertyKey>}

boreal quartz
#

Thank you!

grave ether
#

so actor.whatever

mystic pine
grave ether
#

No problem, I poked at it a bit trying to get things to work right for myself. I am not an expert but learning as I go

#

Also, a lot of the call out goes to the sample/example sheets

#

I looked through them and pulled and modified what worked for me

static cargo
#

Hey @grave ether, in the example you gave above, does the actual roll go through the chat system? ... Both me and my players love seeing huge handfuls of 3d dice fly around. 😁

boreal quartz
#

Hmm, perhaps I did it wrong?

static cargo
#

Would it work if you put something like ...log(@{actor.name}....?

grave ether
static cargo
#

Dice-so-Nice... yep. (With the Companion Cube addon. 😉 )

boreal quartz
#

No, it still gives me that "illegal character" error. It's crashing at the @.

grave ether
#

%{console.log(actor); return"";}%

#

I dont think the @ part should be on there

#

What are you trying to show tho

#

actor.hp?

boreal quartz
#

No, if I do that it says "actor" is undefined.

#

I just want to view the whole actor's JSON.

grave ether
#

OH

boreal quartz
#

In pursuit of finding the parts I want to reference.

grave ether
#

its easier to export the sheet then open it up in an editor

#

Control +F and search?

boreal quartz
#

Export the sheet? You mean export the whole game and locate the actor in all that?

grave ether
#

No

#

right click on the _template

#

export it to json

#

export data

boreal quartz
#

Oh, I see. Thanks.

grave ether
#

Yep

#

that gives you the entire sheet

#

I do that to make massive edits, its just easier to work with on my side without the lag

#

import it back in after I make a copy of the sheet, just in case of errors

static cargo
#

Also, I don't know if you use the text editor Notepad++ but it's got features like collapsing nested lines, code colouring, and more. It's very handy.

grave ether
#

I havent looked at dice-so-nice with the current setup I am using but I am sure it can be intergrated

#

Visual Studio Code for me

#

I have note++ for some things but its easier to use VSC to edit since it yells at me if I miss a }{

static cargo
#

dice-so-nice watches the chat for roll formulas, but it doesn't notice js dice numbers, leaving me with half a solution for about 5 different things.

grave ether
#

hmmm

#

my guess then the solution would be to run by macro instead of directly in the lable

#

it might pick up at that point

#

I figure /roll would be what its looking for?

#

I would have to dig

static cargo
#

And if you've played Portal, then yep... the dice can be skinned to look like the Companion Cube with the addon. 🙂

grave ether
#

It is going to have to be another time. Wife is looking at me with hungry eye.... She wants food..

static cargo
grave ether
#

ahhhh

#

Well

#

change the dice coding in the example to match the format

#

I think dice so nice adds in fuctionallity

#

so it might just work as long as you give it the format it is looking for

#

Cya all in a bit.

fierce harbor
#

I'm actually trying to create a diceless world, so most of these complications are simply left out 😅
Alas, different issues arise, like how to define success in contested 'rolls' or how to quantify damage and similar things...

boreal quartz
#

Huh. Is there a component that allows you to pick an image, like the one that's built in on each sheet?

fierce harbor
tired zealot
kindred temple
#

Good afternoon folks, I just recently installed CSB, but whenever I try to use it I get an error message that asks me to check the system and Foundry are up to date:

#

They're both up to date. Has anyone run into this or know what might cause it?

kindred temple
#

The name of the world. I haven't been able to get any world running with it, and after several tries I stopped being creative with the names.

formal goblet
#

Can you check the console (F12)?

kindred temple
#

Certainly. Am I looking for something in particular?

formal goblet
#

Well, for errors

kindred temple
formal goblet
# kindred temple

And these are all worlds and not modules?

Which version of CSB and Foundry are you using?

kindred temple
#

These are all worlds, yes. Foundry is V11 Build 313, CSB is 3.0.0

formal goblet
kindred temple
#

Chat Commander is not installed.

formal goblet
#

Alright, install that one

kindred temple
#

...It appears I can launch it now, and it's not throwing errors. Thank you so much! Apologies, I must've missed the dependency.

jolly stone
#

I have some places I've tried to do visibility formulas based on checkboxes within the same dynamic table. These worked prior to upgrading to 3.0, but now they don't work conditionally. The visibility formula I've got is just check with nothing else there (check being the column name within the same dynamic table). I've also tried sameRow(check) and ref(sameRow(check), all with and without '' around check.

fierce harbor
fair yoke
#

So, I was told previously there should be a fix incoming for the 'undefined' message when rolling a macro, any idea when that'll happen?

formal goblet
jolly stone
formal goblet
jolly stone
#

Good to know though, I'll table doing that for now

fair yoke
#

Yeah because my script generates its roll, but every time before it does that it returns an 'undefined' message

formal goblet
grave ether
#

Is there any way we can get some type of active console to push code to see if it resolves? Prolly not possible but figured i would ask

#

Idk about you but i get LOTS of lag when editing a sheet saving and the pulling a character up and refreshing

formal goblet
grave ether
#

An active console to basicly put formula in and see if it resolves without going through the process of saving it to the sheet.

Kinda like an active console.log

summer berry
#

Another small question:

I'm trying to modify a field in my character sheet via item modifiers set operation. The field on the sheet is a label. The modifier looks like this:

Key: field
op: =
formula: ${typ}$

where typ is an attribute of the item. It does nothing and the console does not throw any errors. Am I missing something?

formal goblet
grave ether
#

Ok so how do i get that implemented or do i run that in chat?

Speak to me like i am 10 lol

formal goblet
formal goblet
grave ether
#

Thanks i will give it a try here in about 30 or so mins

summer berry
formal goblet
summer berry
#

This is the label I want to change when the Item is attached to the actor

#

the last modifier is the one in question

formal goblet
summer berry
#

This is the attribute of the Item I want to assign

#

Okay, I'll try

#

Ah, now it is working. Thank you!

hardy smelt
#

Does CSB suport Item nesting? For example, I would like to make a Gun Item, and a magazine item. I would like the gun item to have an item container that holds one or more magazines. When I tried this, however after dragging a magazine item onto a gun, the magazine did not show up on the gun. Is that expected behavior or did I do something wrong?

glad spade
#

I'm looking to add more support for Item Piles in CSB, but there's nary an API get item types and their properties

#

Is there any way to get properties of CSB's custom item types?

formal goblet
formal goblet
hardy smelt
lean sable
# boreal quartz THIS. Something like this.

sorry, I was busy today, it seems people anwsered, but just to clarify the screen : those are labels that read what's in the item, the white box around the numbers is just cosmetic with a bit of ccs, I use what the others described : number field in the template, i create items with basic stats, when dragged into a sheet it creates a copy that you can then modify by opening the item

fair yoke
#

is there a way to tell custom system builder if sometime comes back as 0 to use an alternate roll?

regal whale
#

Can i please get some help on how to use functions in the Roll portion of a Label? I am reading the documentation but I seem to be missing something. I created a label and added this to the Label Roll message: ${setPropertyInEntity('TestCharacter', 'AmmoCountPrimary', 5)}$. I do not update AmmoCountPrimary, i only post 5 to the chat. what am i doing wrong?

fierce harbor
fair yoke
#

Is there a way that i can have a dropdown effect multiple things?

#

like this system has simply none, light or heavy armor

#

heavy armor gives +2 AC but -1 to reflex saves

fierce harbor
fair yoke
#

I mean yeah, if I need a hidden modifier to do it, not an issue

#

I have all the other parts setup to accept the relevant imput

#

so if there is a way I can do 'if (the dropdown) equals X then throw this number out'

fierce harbor
fair yoke
#

numbers at the moment

#

switchCase(DropdownKey, 'a', 1) would work too right?

fierce harbor
fair yoke
#

hmm, OK, also how would I setup a roll where I enter the dice formula elsewhere, say in a text entry on the sheet

#

since just referencing that key does not roll, it just shows 1d6 in the chat without rolling it

fierce harbor
#

This should work:
${[:textEntry:d6]}$ (copied from the wiki and adapted to the case at hand 😉).

fair yoke
#

ahh OK, I mean I have the full damage roll in the other entry