#Custom System Builder

1 messages ยท Page 24 of 1

half beacon
#

It's a function described as above after the first line of code.
function getList(actor, field, value)
is the start of where Lyinggod defines what it looks for and the value to return.

still lichen
#

Has anyone used the FUx dice roller with CSB? I was trying to use FU dice in a label but couldn't get it to work.

formal goblet
timid marten
#

Hi!

#

Would it be possible to change an item's color (in an item container) based on a modifier or key value that states their rarity?

formal goblet
timid marten
#

I see, that's sad :(

#

What about the name show when opening the item?

formal goblet
timid marten
#

๐Ÿ˜ญ

#

I wish the rarity colors module could work with this system

#

from what i've seen it's not compatible

formal goblet
#

Yeah, I doubt it that a module can do that without being dependent on the system

timid marten
#

Well, it is mentioned that it can work with other system

formal goblet
#

You can let the Item Container show a Label with a rarity colour, that would work. But besides that, meh

formal goblet
timid marten
#

so close yet so far

#

isn't there some tweaking possible ?

#

to make them compatible

formal goblet
#

I don't see the issue in reading the value. The bigger problem is to apply the right styles to the right elements

timid marten
#

Hm

#

Yup, tried a dropdown with the key "rarity" and it doesn't change anything

fierce harbor
#

Hi there! Quite a silly question: how would one go about trying to set up two stats, say using Dropdowns, that are mutually dependant and both modifiable by players?
E.g.: stat A ranges from 0 to 10 and so does stat B, but their sum must be 12 at all times (numbers here serve just to examplify).

fierce harbor
formal goblet
fierce harbor
formal goblet
#

Not exactly. It would be true if we'd be talking about values of Labels, but in this case it's the Formula for the max of a Number Field. What happens is that the max-values reference the current values of the opposing fields (not the max-values)

formal goblet
fierce harbor
timid marten
#

So you can change a label's color right? Could it be possible to show a bar, like a hunger bar for example, that would decline or get full based on specific keys like "hunger/maxhunger"?

#

I did it like that on Roll20 and am wondering how to do it in foundry

formal goblet
timid marten
#

I want them on the character sheet, not the token, is that still possible?

earnest imp
#

Bar Brawl is pretty good module if you wanna look into it

formal goblet
#

Yeah, I meant the Label

timid marten
#

I know about it but it doesn't affect the character sheet iirc

formal goblet
#

A Label can contain HTML, so you can more or less do everything in there

timid marten
#

Could you provide an example please? I'm not well versed enough in CSB's possibilites as of right now to understand how I could do this

formal goblet
timid marten
#

Oh okay we can paste the html and it works

#

Damn

#

I thought there was some trickery to do

formal goblet
#

Yeah, like I said, you can just use plain HTML

timid marten
#

This opens lots of possibilites

timid marten
#

Let's say I want to reduce the value from 70 to 50 for this specific actor

formal goblet
#

You usually want to couple a progress bar with other Components (like Number Fields). So you just insert Formulas into the right fields of the bar. That's all

<progress max="${HP_MAX}$" value="${HP}$"></progress>
timid marten
#

I see, thank you!

timid marten
#

Any idea on how to fix the css difference between the app and my browser (firefox)?

#

Left is firefox, right is the app

formal goblet
timid marten
#

My players will use Firefox too, is there any way to have the Firefox result on my app, or the contrary?

#

I just want it to be consistent

earnest imp
#

I'm sorry to tell you

#

That's outside CSB or even Foundry's capabilites lol

#

That's browser dependent

timid marten
#

I can't help but wonder tho

#

Why is my app bar green when it's blue in the css

#

Firefox read it right, not foundry's app

#

๐Ÿค”

earnest imp
#

Foundry is electron app

#

Its chrome based

#

May want to crosscheck your foundry's app view with chrome view

timid marten
#

Yup that's what I'm about to do

#

ty

earnest imp
#

You may have to give up some CSS being uniform since its browser-to-browser dependent

formal goblet
#

There might be additional styles for resource bars from other sources (modules, Foundry, etc...). You shoud check that with the inspector (F12)

timid marten
earnest imp
#

Yup, if you want your Firefox and Foundry view to be the same, you'll want to develop for Firefox and Chrome too

timid marten
#

Yeah, fixed it by applying the same informations but for both browsers

progress[value] {
  border: none;
  width: 200px;
  margin: 0 10px;
  border-radius: 10em;
  background: lightgrey;
}
progress[value]::-moz-progress-bar {
  border-radius: 10em;
  background: blue;
}

::-webkit-progress-bar {
  width: 200px;
  margin: 0 10px;
  border-radius: 10em;
  background: lightgrey;
}

::-webkit-progress-value {
  border-radius: 10em;
  background: blue;
}
real shuttle
#

does the midi-QoL module work with csb?

at some point I'll bother to learn proper from-scratch system development, but right now I'm just trying to get enough on the screen for us to playtest--and I have no idea how to get item descriptions into the chat right now

#

oop okay, @undone smelt said under my first post that it won't work in other systems--does anyone have any wisdom on how to set up item cards in chat that show descriptions with clickable rolls and such?

timid marten
# timid marten Yeah, fixed it by applying the same informations but for both browsers ```css pr...

I've been trying to get different bars with different colors but I can't seem to obtain it.

Here is what I tried, the label:

<progress class="hunger" max="${HG_MAX}$" value="${HG}$"></progress>

and the css:

.hunger {
  border: none;
  width: 125px;
  border-radius: 10em;
  background: grey;
}

.hunger::-moz-progress-bar {
  border-radius: 10em;
  background: blue;

.hunger::-webkit-progress-bar {
  width: 125px;
  border-radius: 10em;
  background: grey;
}

.hunger::-webkit-progress-value {
  border-radius: 10em;
  background: blue;
}
#

The result is the basic progress bar

#

Any idea why?

fierce harbor
timid marten
#

bad copy paste on my side, the issue is not present on the real css

fierce harbor
timid marten
#

oh wait

#

It just fixed itself

#

๐Ÿซ 

real shuttle
#

I'm going nuts
someone please help my brain find how to create and use variables inside the ${}$ commands?

I looked it up once but have now forgotten both how and where I found the info

#

(or just how to reference item stats in a roll message code for an item container, which is what I actually need)

#

like: how do I make this actually work right?
[[/roll @item.wep_dice]]

#

I have an item attribute that contains weapon dice as a string like '1d6', and I just want to pass that string to the /roll command--surely there's a way to do this?

real shuttle
#

okay I've got it as far as here, but I can't seem to be able to use :variables: with deferred [[/roll]] commands

I'd rather it be two buttons, attack and damage, and you click them to roll--is that something that would require a macro at this point, or is there a function syntax thing I'm still missing?

formal goblet
real shuttle
#

so [[/roll :item.dmg_dice:]] is supposed to work?

formal goblet
real shuttle
#

is it possible to put a deferred roll inside ${}$? I can't seem to figure it out

formal goblet
#

I think you're thinking in the wrong order. You can insert the Roll-Formula into the Inline-Roll. This will be handled by Foundry afterwards:
[[/r ${item.dmg_dice}$]]

real shuttle
#

it spits out this

formal goblet
#

Ah yeah, you need to add ! right at the beginning of the CSB-Formula. This will remove the box

real shuttle
#

OH!

#

THANK YOU IT WORKS

#

that has been causing me problems for months haha

#

YAYYYY it's all working finally

timid marten
#

That's a dumb question, but how could I make it so that checking a certain checkbox in an item will reduce all values from precedent number fields of that item to half of their original value, but then go back to normal if I uncheck the box?

formal goblet
timid marten
#

I can't make it so that if "cat == true" then "cat_tail = 0.5" instead of "1"?

formal goblet
timid marten
#

or just an automatic equation like, if it's true then cat_tail == cat_tail/2

#

mhm

#

I'm trying to make it so that if an actor equips an item (weapon, armor) then the weight is automatically halved

formal goblet
timid marten
#

Because it's just equipped items that are halved

#

let's say they loot a baseball bat but are currently using a sword and only have the sword equipped, the weight of the sword would be halved but not the bat

#

I wanted to use it for backpacks too (backpacks reducing weight to half or 70-80%~)

formal goblet
#

Well, you need the base-value in a Number Field and the actual value in a Label. Other combinations are straight up not doable.
#1037072885044477962 message

timid marten
#

Base value and actual value?

#

The issue is, the label needs to be preset right

#

So I can't set a different weight for each items

#

I would need a different template each times the weight is different (which is not a solution)

real shuttle
#

you can if you have the label generate from an attribute, I think

timid marten
#

๐Ÿค”

formal goblet
real shuttle
#

true

formal goblet
real shuttle
#

you might be able to play with the hidden attributes since you can configure them for individual compendium entries, say--but yeah it kind of only distances the problem

formal goblet
#

This base-structure will never change

timid marten
#

You mean I can have a label that automatically updates itself based on a number field/text field value?

real shuttle
#

yep!

timid marten
#

๐Ÿคฏ

formal goblet
real shuttle
#

so if you, say, have a checkbox whose key is is_equipped
then you can have a hidden attribute of key situational_mod and set a formula, for example ${is_equipped ? 0.5 : 1}$

then on your sheet you have:

  • a base_weight number field set to whatever number
  • and an actual_weight label that generates its text with the formula martin put up top: ${base_weight * situational_mod}$
#

(the a ? b : c formula is an if-else formula--if a resolves to true, then it executes b; if not, it executes c)

timid marten
#

I'll try this, thank you!

cerulean adder
#

Is there any documentation that shows how to setup the speed attribute? I tried a couple of things but I didn't get it right.

timid marten
#

nevermind

#

I'm dumb

#

it works

#

Thank you!!

cerulean adder
#

Do I have to reload after making the change? It didn't seem to work

formal goblet
cerulean adder
cerulean adder
#

Is there a way to customize the sheet templates themselves? I thought I saw someone with a fun background and different layouts?

cerulean adder
#

CSS is greater than Styling?

formal goblet
#

No. It's just that if you want to style something, the solution will always be CSS

cerulean adder
#

Oh! I see. Sorry, I'm a bit dense sometimes

patent dust
#

Hello everyone. Excuse me if this question was already asked. How can I use the visibility formula for a component? I'm working on a sheet for The Strange, and with that game it would be useful to have some panels of the sheet showing (or not) with the push of a button. But I simply cannot understand how visibility formula works ๐Ÿ˜ฆ

timid marten
#

Is there any way to link a journal entry on a character sheet? When I drag & drop it doesn't work

formal goblet
formal goblet
timid marten
#

Dialog-mode?

earnest imp
#

Can i just set visibility formula to false if i just want to hide a lebel

earnest imp
#

nice

timid marten
cerulean adder
#

Can you add values to a variable?

Var1:= Var1+" 3,"

#

or something like that?

#

So I'm trying to output a list of numbers correlating to pieces of armor worn. I kind of got it working.

${!item.chest == 1 ? "2," : ""}$
${!item.back == 1 ? "3," : ""}$
${!item.groin == 1 ? "4," : ""}$
${!item.rear == 1 ? "5," : ""}$

${!item.armLeft == 1 ? "11," : ""}$
${!item.handLeft == 1 ? "12," : ""}$
${!item.legLeft == 1 ? "13," : ""}$
${!item.footLeft == 1 ? "14," : ""}$

${!item.armRight == 1 ? "21," : ""}$
${!item.handRight == 1 ? "22," : ""}$
${!item.legRight == 1 ? "23," : ""}$
${!item.footRight == 1 ? "24" : ""}$```
#

The problem is that it doesn't show up correctly on the sheet

#

but it does in the chat

#

So I was thinking about trying to add the data in variables and print it out?

#

I'm not sure

timid marten
#

I checked the example but couldn't get exactly how you get a "total weight" value on your actor based on the weight of the items he has in his container

formal goblet
timid marten
#

I did but didn't really get how everything reads everything

#

I found out, thank you!

formal goblet
cerulean adder
#

Sorry, I just realized I snipped two different itterations. It was the same either way With or Without the commas. I'll send it here now

#
${!item.chest == 1 ? "2," : ""}$
${!item.back == 1 ? "3," : ""}$
${!item.groin == 1 ? "4," : ""}$
${!item.rear == 1 ? "5," : ""}$

${!item.armLeft == 1 ? "11," : ""}$
${!item.handLeft == 1 ? "12," : ""}$
${!item.legLeft == 1 ? "13," : ""}$
${!item.footLeft == 1 ? "14," : ""}$

${!item.armRight == 1 ? "21," : ""}$
${!item.handRight == 1 ? "22," : ""}$
${!item.legRight == 1 ? "23," : ""}$
${!item.footRight == 1 ? "24" : ""}$```
#

Just copied this to both the label and the roll

formal goblet
cerulean adder
#

Oh! So that's probably causing issues

#

Dang

#

Oh

#

I'm dumb

half beacon
#

Is it possible to fetch the names of all items that are equipped (via checkbox) to an actor?

cerulean adder
#

I've seen people post about progress bars. Is there a way to get a bar that has sections that can be turned off/on?
So for example a bar with 5 segments has 2,3, and 5 on and the other two are empty?
[ |---|---| |---]

formal goblet
cerulean adder
#

My teacher said there were no stupid questions though....lol

#

I appreciate it

#

I'm trying to get something that looks cleaner than what I have to indicate which fields are selected

cerulean adder
#

I found a ghetto way of accomplishing this

earnest imp
#

@formal goblet Can a dropdown list be used to retrieve all tokens currently on combat?

#

Using actual javascript scripting

cerulean adder
#

Can you add icons to the Label in a Number field?

sharp prairie
#

Hi all! Anyone played around with Ripper's Mastercrafted Mod? It seems to work just fine, except for one thing... I can't figure out where to look to see why it is able to auto-add the product of a recipe to the item container but not remove the ingredients. 1st pic before craft, 2nd is after.

#

The after even acts like there are no correct ingredients available anymore.

earnest imp
timid marten
#

I just discovered items can't have item containers, how do you create backpacks with this system?

formal goblet
earnest imp
#

Hmmmm using %{}% delimiter huh

earnest imp
#

Same bug when using string separated by comma

#

In both cases removing the apostrophes off the names fixes it, but there is no error indication for having an apostrophe ( ' ) so that might be worth looking into

latent sorrel
half beacon
#

Isn't that a thing for all coding languages?

earnest imp
#

Ah okay

#

Do you have an example code I can reference to for this issue?

latent sorrel
#

It depends on how CSB is handling this. Javascript allows for backticks to be used to contain a string the has single and double quotes like 'Bob "Butch" Smith' (using single quotes here because discord is treating them as inline code). However, CSB doesnt like backticks when wrapped in %{}%. Therefore, the single and double quotes become proprietary.

half beacon
#

Oh interesting. Learned something new!

latent sorrel
# earnest imp Do you have an example code I can reference to for this issue?

Place this in the World Scripter module and refresh the game. It takes about a second for it to change (at least in my overly complicated system) and, depending on your code, the console may spew a bunch of errors until the incorrect name is changes (it does for me).

// Listen for updates to Actors
Hooks.on("updateActor", (actor, updateData) => {
    // Check if the name property is being updated
    if (updateData.name) {
        // Replace single and double quotes with backticks in the name
        const updatedName = updateData.name.replace(/["']/g, "`");

        // Update the actor with the new name, if it has changed
        if (updatedName !== updateData.name) {
            actor.update({ "name": updatedName });
        }
    }
});

// Listen for updates to Items
Hooks.on("updateItem", (item, updateData) => {
    // Check if the name property is being updated
    if (updateData.name) {
        // Replace single and double quotes with backticks in the name
        const updatedName = updateData.name.replace(/["']/g, "`");

        // Update the item with the new name, if it has changed
        if (updatedName !== updateData.name) {
            item.update({ "name": updatedName });
        }
    }
});
earnest imp
#

Global Scripter still works for Foundry V11?

#

๐Ÿค”

#

til

earnest imp
#

We have lots of character names that has apostrophe in their names and this script changes them to backtick

#

Hmmm okay I'm stumped

#

Anyone has any ideas how to populate the dropdown list with all tokens on combat in the canvas?

#
%{
    // Initialize variables.
    let tokens_in_combat = canvas.tokens.placeables.filter(token => token.inCombat);
    let label_array = [];

    // Get token name for everyone in combat.
    tokens_in_combat.forEach(token => {
        label_array.push(token.actor.name.replace("'", ""));
    });

    label_array.sort();
    return label_array;
}%```

This is what I got so far, it works in macro, but breaks down in formula field
#

Oh- I got the workaround

latent sorrel
#

Whats that?

earnest imp
#

I just needed to move all the formula logic to a module

#

This is all I had to do

#

I still can't have apostrophe on the token name but I can just remove that before returning the value to the dropdown list

#

Better no apostrophe on token name than the formula not working at all

fierce harbor
cerulean adder
timid marten
latent sorrel
# timid marten Hello! I'm asking again since I didn't get any answer, how could I handle backpa...

I created separate containers (equipped, unequipped, and dropped) on the actor. Each item has a dropdown with the same option name. I filtered the item containers based on these options. I also set it up so that any modifications from a dropped item (weight, any +'s to values) werent passed on to the actor for dropped items. For unequipped items, weight still applied, but nothing else. Unequipped, for me, covers both a "turned off" status and/or stowed in backpack. I also put icons on the appropriate containers to easily change their status.
Also, the item in an item issue will apparently be fixed in the next release (no ETA).

formal goblet
latent sorrel
#

Thanks for clarifying.

timid marten
#

Sounds amazing though! I can't wait ๐Ÿ‘€

timid marten
latent sorrel
#

Placing setPropertyInEntity in the roll message to update the item.

timid marten
#

You would have to remove or share every single items manually

static spindle
#

Hi, is it possible to get the custom system roll to display the dice rolled, rather than putting it in the tooltip?

latent sorrel
# timid marten You would have to remove or share every single items manually

CSB doesnt have an option for moving items between actors. You can use the module Item Piles to copy items from one actor to another but it wont delete the item from the source actor (Built in foundry restrictions). Also I dont think it supports sending 3 of 5 items to another actor, its the entire item but maybe via its API. You might also be able to use the API to drop a category of items "on the ground" such as ones designated in a backpack and the other player can pick them up. The question ultimately is "how often is this likely to occur". If it's proven to be frequent, then it maybe worthwhile setting this up with Item Piles or plain javascript. If you are just trying to account for a "possible but unlikely scenario", then treat the issue the same way as you would in a face to face game with paper sheets.

timid marten
# latent sorrel CSB doesnt have an option for moving items between actors. You can use the modul...

I will create an actor and an item for the same backpack and add the item to the player's actor + link the item's actor page

This way they will be able to see quick informations from the item container like weight, durability, etc..

But the actual inventory will be stored in the backpack's actor page and the "total weight" will be stored there

This means that I will need to manually update the backpack's weight inside the player actor's inventory

Could it be possible to link an item's key (like "weight") to a specific actor's key?

#

If not I will update it manually or could it be possible to write a macro that updates it?

latent sorrel
#

You can use fetchFromActor to retrieve the weight of the backpack items from the backpack actor and add it to the total weight carried. If you use the Loot Piles module, I think it will move (not copy) items from actor to "backpack" actor if the player has the correct permissions (just not PC to PC). This will work well as a backpack

craggy python
#

two (hopefully) quick questions:

  1. currently there seems to be no way to sort things in item containers. am I missing something? if not, is this feature on the way/is there a workaround?
  2. reloading all item sheets doesn't seem to affect items in compendia or actors. is there a way to change this behavior?
formal goblet
# craggy python two (hopefully) quick questions: 1) currently there seems to be no way to sort t...
  1. Not released, but you can clone this branch if you want: https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/feature/sorting_for_tables?ref_type=heads WARNING: Be aware that this version reflects the latest code in this repository, and thus can contain untested development, or breaking code. Please back-up your games regularly if you plan to use this version!
  2. #1037072885044477962 message
craggy python
#

thanks a ton!

rich glen
#

Hi all! Is there a way to get an item list (in my case, weapons in an item container) in the Prompts? I'm trying to let the user select one of his weapons so I can pick one of the stats to use in the Prompt.

formal goblet
rich glen
#

Aww, damn! Haha, ok, I'll see what I can do...

real shuttle
#

is there an existing macro or other solution to pull item descriptions into the chat ร  la the midi-QoL module for dnd5e?

#

I'd really like to be able to have players click an item or ability or spell or whatever and have it pop a little description in chat with relevant attack/saving throw/etc. buttons

#

(also, but unrelated:
can tokens on the map not use .gif files? my monster test was going great, set the token image, but then it reverted to the cowl on the map...all my other tokens are showing image just fine)

formal goblet
real shuttle
#

heh oh if only ๐Ÿ˜…

#

I need it to pull the content of a rich text area is the issue

formal goblet
#

Doable. Just reference the key

real shuttle
#

so like in an item container or whatever, I could reference item.text_area_key in the roll message, and it would work?

formal goblet
#

Yeah

real shuttle
#

I could've sworn I'd tried that already... I'll have to give it a go again tomorrow and see if I can figure out what I did wrong

#

thanks ๐Ÿ™‚

cerulean adder
#

Are you not able to place a font awesome icon in a conditional thing or am I not formatting this correctly?

If I print this it works <i class="fa-solid fa-hand-back-fist"></i>

But this does not work (I tried with or without the quotes
${item.all == 1 ? "" :item.armRight == 1 ? "<i class="fa-solid fa-hand-back-fist"></i>" : ""}$

#

This did work, however (but this isn't the icon I wanted)

${item.all == 1 ? "" :item.armRight == 1 ? "&#9830;" : "&#8900;"}$

raven raven
#

Could someone please export and send me a character sheet where dot based stats are implemented

foggy grotto
scarlet skiff
cerulean adder
earnest imp
raven raven
#

Like this

fierce harbor
formal goblet
fierce harbor
#

Maybe a label with modified size, borders and bg color?
I mean, you could use that instead of those fillable radios.

timid marten
still lichen
# formal goblet Don't think so. What is it supposed to do?

It launches the Freeform Universal dice roller (FUX module). With the module loaded it can also be called from a button in the dice tray and with a chat command:

Command format

/fux xayd
where x is the number of Action Dice and y is the number of Danger Dice

Example.

This will roll 2 Action Dice and 1 Danger Dice

/fux 2a1d

formal goblet
prisma grove
#

Im trying to get a dynamic table to show the item's classification in an inventory, but I can't get it to do anything but throw an error. When I use the following:
${first(fetchFromDynamicTable('TABLE_SKILLS', 'TXT_WEAPONS_CLASS', 'TXT_WEAPONS_CLASS', item.LIST_CLASS))}$ it shows nothing at all. Am I missing something?

formal goblet
prisma grove
#

Then I'm confused cuz Im following the example.json from the wiki and it works there ?

#

${first(fetchFromDynamicTable('Skill_Weapons', 'Name', 'Name', item.Skill))}$ Is what it uses in the example.

raven raven
#

Hi, I would like to achieve the following:
I have a skill on my character sheet.
And I want it to be represented at two independent cellsboth cells should be syncronized, so if I edit one the other should change too...
like this:

#

So if I cahnge ballisztika on the top the bottom one should show the same value and vica versa

#

how can I achieve this?

formal goblet
formal goblet
# raven raven how can I achieve this?

Not doable. Either a value is dependent on another and cannot be modified by the user or it can be modified by the user but cannot be dependent on other values.

prisma grove
#

Ah ok, Thanks.

spiral dome
#

If I make a Dropdown Menu in an Item, can I use a Dynamic Table from my actors for my options?

formal goblet
prisma grove
#

${item.key}$ is not showing up the items classification that I picked out. Im using ${item.CLASS}$ as the key but nothing shows up.

formal goblet
prisma grove
#

Both yes.

formal goblet
#

Then look at the console with F12 and check for errors

prisma grove
#

Nothing there either. Its really strange its like the inventory container is 'working' but just not displaying anything.

formal goblet
#

Does it display the Item or not even that?

prisma grove
#

It displays the item

#

and I can make it do rolls from there

#

but it wont show any lists.

formal goblet
#

k, did you reload the Item and the Character Sheet?

prisma grove
#

Yep.

formal goblet
#

Then show your setup

static cargo
formal goblet
static cargo
#

Would the end result on the sheet not serve the purpose?...

prisma grove
#

So from left to right its my Inventory panel > the classification lable in the panel > and the item's drop downbox.

formal goblet
formal goblet
static cargo
prisma grove
formal goblet
formal goblet
prisma grove
formal goblet
# prisma grove

You should replace the names with your actually used names

prisma grove
#

lmao yeah I realzied that

#

My b

static cargo
#

Anyway, time to get back to the grind... ๐Ÿ˜‰

prisma grove
formal goblet
prisma grove
#

Weird...

formal goblet
#

You probably forgot to reload the Item (Reload all items does only reload the Items in the Item-Tab, not the ones already copied to actors)

earnest imp
#

Speaking of reloading, is there any nifty command or script we can use to reload a sheet?

prisma grove
#

I mean I have been refreshing on both fronts, but still getting the same result. I even made a new inventory at one point with diffrent keys to the same result.

#

Ill keep faffing around till I get something. Thanks for the help as always.

formal goblet
earnest imp
#

sweeeet, and can i replace the item with actor with something like game.actors.getName('example name').templateSystem.reloadTemplate()?

formal goblet
earnest imp
prisma grove
#

So Idk why... but apparently If I use 'class' as a key at all it wont work but if I swap to anything else its fine.

formal goblet
prisma grove
#

lmao. welp either way the issue is solved so I appreciate the help again. ๐Ÿ™‚

earnest imp
#

@formal goblet Can I use a dynamic table's value to pass another "formula" to a Label elsewhere? Like so:

#

This is my current result so far:

earnest imp
#

Ohhh thats something i never heard before, gonna look it up

#

Works beautifully

raven raven
raven raven
spiral dome
raven raven
#

gives me an error for some reason

raven raven
static cargo
static cargo
# raven raven is there any way to determine how long the drpdown list? it looks good but unese...

Just add a component, make sure it's the type Dropdown List. The options origin should be Custom already.

Area "A" is where you tell the list what the value is to focus on. In any macros or other script references: "A" is the possible values.

Area "B" is just about what people see. That's why I have the series of circles.

One of these kinds of lists starts with no option slots but if you look for the + button on the right edge, that adds more Key/Label pairs, one at a time.

Lastly, I have 0 in the box at the bottom so that the list starts off with the empty dots by default.

If you like those "fake" radio button characters you can copy them here: โ—ฏโฆฟ (They came from https://utf8icons.com/ when I searched for "circle")

UTF-8 Icons

UTF-8 Icons aims to offer it's visitors an easy to use method for identifing those hard to find UTF-8 characters that can be used as icons in place of images.

raven raven
#

I need a script which would populate a text filed with with the UID of the ITEM which contains it.

hazy saffron
#

If I have an Actor Sheet checkbox called is_active and then have an item attached to the sheet that needs to get the value (true or false) of that checkbox, is there anything special that needs done for a hidden attribute key that calls ${fetchFromActor("attached", is_active,0)}$ to return a Boolean? It seems to be converting it to a string in the hidden attribute key

formal goblet
hazy saffron
#

Also, hidden attributes that fetchFromActor numbers can be used as numbers

formal goblet
#

Implicit coercion is a thing

hazy saffron
#

But that won't work for booleans I take it?

#

And if instead we return 1 or 0 in the hidden attribute formula, would that implicitly evaluate properly as a Boolean check in the statement is_active?"true":"false"

formal goblet
hazy saffron
#

Sounds like it's what we need to@so

#

Thanks

formal goblet
#

Yeah, types are a bit messed up, I know

raven raven
#

now it works

#

But it only works because I have populated the filed with the UID manually

#

if I could populate this field with the UID automatically then it would be awesome

#

because it would work with all items that I create

formal goblet
raven raven
#

it says "This project has no wiki pages"

earnest imp
#

So uh daft question, is there any way to edit the attribute bar value if attribute is set to attributeBar on the token?

earnest imp
#

@latent sorrel Heya, sorry for the ping, but I'm looking for references on how to populate a dynamic table with contents from another dynamic table, do you have any ideas or clue?

latent sorrel
#

I have JS code that populates a dynamic table that you can try do dissect, if you like.

hazy saffron
# formal goblet That would work

This doesn't seem to work the way I expected. I thought if I assigned the hidden value key on the item to be 0 or 1, I could use it as a direct expression for a true/false ternary operator.

Actor: Key on sheet called: power_boost_active (a checkbox)

Item: Hidden Attribute key call: is_boost_active which is set to the formula: ${recalculate(equalText(fetchFromActor("attached", "power_boost_active","false"),"true")?1:0)}$

Also on item: Label to display the following: ${is_boost_active?"True":"False"}$ <== This always displays True regardless of the checkbox on the Actor sheet

Alternative (This works but is a bit messier) ${(is_boost_active>0)?"True":"False"}$

wet heron
#

Heyo!
Im looking into a shoot FX sollution. and was recommended JB2A, anyone got a sollution to be able to incorperate it to a button?

onyx jetty
#

is there a way to use a label to roll something like advantage and disadvantage? specifically id be rolling 3d6 in my case.

hazy saffron
#

@onyx jetty There is a way to keep highest or lowest. /roll {3d6, 3d6}kh would do advantage, and kl would do disadvantage. In the roll message, it's ${[{3d6,3d6}kh]}$

onyx jetty
#

wow that's remarkably simple lmao

hazy saffron
fierce harbor
earnest imp
earnest imp
fierce harbor
formal goblet
vagrant hollow
earnest imp
vagrant hollow
earnest imp
#

I'm noticing that Active Effect modifiers only works for token linked to actor data, basically

#

Token not linked to actor data don't the modifiers from Active Effects

vagrant hollow
# earnest imp Token not linked to actor data don't the modifiers from Active Effects

If the prototype token is not linked to the actor, foundry makes a copy of the actor when it is drawn to the canvas and from this moment ONLY connected to the sheet that opens when double clicking the token and NOT anymore connected to the sheet in the actors list.
But the active effect should work.
Pay attention how you open the sheets.

earnest imp
#

I'm mostly stumped on why active effects do not work on token not linked to the actor, my suspicion is that when Foundry makes the copy of the actor, it does not copy the list of active effects already defined in its template? This is just me speculating though cause I have close to no idea why Active Effect does not work on nonlinked tokens

#

Let me poke around with the tokens a bit

vagrant hollow
earnest imp
#

Oh no, I'm stupid, it DOES affect tokens not linked to actor data

#

Nevermind ๐Ÿ˜…

earnest imp
#

Not fetchFromActor() in the actor list, but to the copy of the actor

formal goblet
earnest imp
#

No option by ID? ๐Ÿ˜ฎ

vagrant hollow
formal goblet
earnest imp
#

Ah, thanks for the info anyway

earnest imp
#

I developed my damage calculator thingy in a way that can't retrieve a token's actor sheet unlinked to the actor data

#

So I'll need to overhaul the logic of my calculator

vagrant hollow
earnest imp
#

Iiii just needed some way to have duplicate of the same mooks attack my players

#

Like Pirate A, Pirate B, that kind of stuff

#

I could just make two duplicate actors for that I guess, but that's an alternative for future Nao to mull over

still lichen
prisma grove
#

Is there a way to have a formula check inside of a item if a check box is checked or not? Like If inside the item the box is checked it would roll 1d20, but if it was not checked it would roll a 1d10.

woven dragon
#

Is anyone using the health estimate module? I'm trying to use it in my campaign but it doesn't work, I've tried changing the datapath to "attributeBar.HP_current" but it didn't work. The module is just not compatible with the CSB?

formal goblet
vagrant hollow
woven dragon
#

Worked just fine thanks!!

latent sorrel
# earnest imp The full code is completely okay with me, I just need extra references to help m...

This SHOULD be all the relevant portions for using JS to add to dynamic table, hopefully I got all the brackets and code. Also, dynamic table keys dont exist in "props" until an entry is created manually or by code, which this code assumes already exists:

    const actor = entity.entity.
    let xpJournal = actor.system.props.xpJournal;  //get dynamic table 'xpJournal'
    let newData = {};
    let updateObject = {};
    const journalPath = `system.props.xpJournal`; // path to journal key
    newData = {
        id: itemID,
        name: `Bought ${stat} to ${rank+1}`,
        XP: cost*-1,
        type: type,
        sn: 0
    };
    let journal = addNewRecordToXpJournal(newData);
    updateObject[journalPath] = journal;
    await actor.update(updateObject);

function addNewRecordToXpJournal(newData) {
    // Create a new record with the duplicated fields
    let newRecord = {
        "deleted": false,
        "predefinedIdx": null,
        // Add new data for other fields
        "id": newData.id,
        "name": newData.name,
        "XP": newData.XP,
        "type": newData.type
    };
    return xpJournal;
}
earnest imp
#

Thank youuu, I'll bisect the code and see what I can use

spiral dome
#

Hmmm, I seem to get a weird bug: I have a weaponTemplate, I created a test version. I added the weapon to the character sheet of my player. As I understand, the way I set this up I should be able to get the 'Aspects' in the dropdown menu. It does seem I get the right amount of options (8 + an empty one), but all of them are blank. Creating a new weapon and giving it to the character gives the same result. Does anyone happen to have a solution for this?

cerulean adder
cerulean adder
#

Is there a way to have a button on a sheet open up a specific compendium?

zealous forge
#

Questions about userInputTemplates:

  • If I have a variable defined before calling the userInputTemplate, would they also be pulled in if a key is the same as their name?
  • Is there a way to retrieve data from a dynamic table when a userInputTemplate is called from a row?
#

Just fixed the second one, can use sameRow

onyx jetty
#

Im setting up a system that mainly uses 2d6 for its rolls and struggling to set up some of my rolling buttons/lables in the character sheets. is there a way to have the system roll 3d6 and display the highest 2 or lowest 2 ? i know how general advantage/disadvantage rolls work but im having trouble with this

fierce harbor
fierce harbor
cerulean adder
cerulean adder
main magnet
#

How do I reference a field in a dynamic table?

cerulean adder
fierce harbor
main magnet
#

When I use a dropdown list to use values from a dynamic table it puts in the key names as options and not the values set in those options. I tried putting the column name in both option key and option label to no effect.

How do I get the actual values as options?

prisma grove
# main magnet When I use a dropdown list to use values from a dynamic table it puts in the key...

Idk if this will help but the FAQ has a spot that explains dropdown menus use the keys for values and the labels are just for show.

https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/FAQ/Frequently-Asked-Questions#q-i-want-to-get-the-label-value-instead-of-the-key-value-of-the-dropdown

#

Can a value be set to a string when asking a question? Like if I asked the following: ${#concat(?{aiming:'What are you aiming for?'|"Head"|"Chest"|"Left Arm"|"Right Arm"|"Left Leg"|"Right Leg"})}$ is there a way to say that the head = -5 and so on for each body part?

fierce harbor
# prisma grove Can a value be set to a string when asking a question? Like if I asked the follo...

I believe there is a User Input section in the wiki that has an example like that.
This:

?{name:"Character name"[text]|"Your name"},
?{age[number]},
?{gender:"Character gender"[check]|"m","Male"|"f","Female"|"o","Other, or I don't want to say"},
?{month:'What month are you born ?'|"January"|"February"|"March"|"April"|"May"|"June"|"July"|"August"|"September"|"October"|"November"|"December"},
?{happy:"Are you happy ?"[check]}
)}$

Check the gender part.

prisma grove
#

Ah thanks yeah I must of over looked it appreicate it.

cerulean adder
fierce harbor
cerulean adder
#

Ah, yeah I was hoping for something like in PF2e where you click a button to pop up the compendium so that you can select a weapon to drag and drop onto the sheet. It's not the biggest issue in the world, I just liked the fact that the users didn't have to go hunt for it themselves.

fierce harbor
#

That would be cool, I agree.

prisma grove
#

${#concat(?{aiming:'What are you aiming for?'|"-5","Head"|"0","Chest"|"-1","Left Arm"|"-3","Left Hand"|"-1","Right Arm"|"-3","Right Hand"|"-1","Left Leg"|"-3","Left Foot"|"-1","Right Leg"|"-3","Right Foot"})}$ Is there a way to show only the display I.e Head for instance but still have the value be rolled later ? Like ${aiming}$ is the formula here is there something I can put in it show just label part? so I don't have this occurring.

#

If I swap the order around it will show the head, but will not return a number as it can't use a string to determine value.

#

I think I have a work around, but I wanted to see if there something I can do with this first.

fierce harbor
prisma grove
#

Ill try that now/.

cerulean adder
#

There isn't a way to have an item within an item, right? I've created a Weapon Template and I was wondering if there was a way to add nested item to add Mods. I assume not but I wanted to make sure I wasn't overlooking something.

prisma grove
#

I don't believe so?

prisma grove
#

Still shows as -5 or returns nothing.

#

Tis fine though, I'll just work around it. Thanks for the help ๐Ÿ™‚

cerulean adder
#

Can you use "Ands" and "Ors" in the compare?

fierce harbor
cerulean adder
#

Oh wow! That will be a game changer for me!

fierce harbor
cerulean adder
#

Will do!

formal goblet
main magnet
#

Is there a bug when two seperate drop down lists reference values from the same dynamic table?

Whenever I choose an option from one it resets the other one.

formal goblet
fierce harbor
formal goblet
main magnet
fierce harbor
fierce harbor
#

I don't know, it all looks good. Just as a test, you could copy the dynamic table and give it a different name, so that each dropdown can reference a different table.

main magnet
fierce harbor
main magnet
#

I'll record it

formal goblet
main magnet
formal goblet
# main magnet

Your key-column is wrong. Should be skill_specialty_number

main magnet
misty terrace
#

OK all, I'm working on a Daggerheart sheet. I'm trying to figure out the best way to model the HP/Stress bars (other than making a series of individual checkboxes) Anyone have any other interesting ideas?

misty terrace
#

It's definitely supposed to be interactive. I'll look at creating a custom input component, but it feels like swimming in the deep end without my floaties.

main magnet
#

I need some help making a roll macro for a d12 success-based system. It counts successes normally against a given difficulty, but then if a 12 and a 1 are BOTH present in the roll, they should cancel each other out and not count in the total successes.

Any idea on how to do that? I got the first part down but not the cancelation part.

formal goblet
main magnet
formal goblet
#

Well, then own scripting it is

main magnet
#

So there's no way this roll could be edited to accomodate that?

`${#concat(
?{difficulty:"Difficulty (DT)"[check]|"3","3"|"4","4"|"5","5"|"6","6"|"7","7"|"8","8"|"9","9"|"10","10"|"11","11"},
?{Modifier[number]}
)}$

<table>
<tr>
<th>${!skill1_roll}$Roll</th>
</tr>
<tr><td>${[{:character_skill1_dice+Modifier:d12}cs>=:difficulty:]}$ success(es)!</td>
</tr>
</table>`

main magnet
#

๐Ÿ˜ฆ

#

Ok, what about coloring the dice result (tally of successes in chat). Any way to do that based on the results that are rolled?

formal goblet
#

cf is the counterpart to cs

#

10d12cf=1cs>=10 e.g.

main magnet
#

I mean like if I roll lets say 4,6,12. Could it color the roll result green, since there's a 12 in it?

#

Or red if there's a 1 in it?

formal goblet
#

With cs it colors all successes green

main magnet
#

Or black if there's both?

#

Yeah I get the individual results. I'm talking about the total number of successes.

formal goblet
#

That would also need scripting ๐Ÿ˜…

main magnet
#

๐Ÿ˜ฆ

#

Just realized another problem. Why is it always saying there's only 1 success?

main magnet
#

There's no way to use CSS for the color thing is there?

formal goblet
main magnet
#

Oh

#

Also, any idea why it breaks the line between 'Athletics' and 'roll' in the chat? There's no <br> in the macro.

formal goblet
main magnet
main magnet
#

How do deferred inline rolls work in CSB?

I put [[/roll 1d4]] in a macro and it does create a rollable inline roll fine. However, it want it to read the die from a particular character attribute.

How do I do that? Putting it in ${}$ just doesn't work.

main magnet
formal goblet
main magnet
#

Tried it

#

doesn't work

formal goblet
main magnet
#

Any way to make a radio button of a user prompt the default option?

main magnet
formal goblet
# main magnet Yes

I think the first one is always the default. Otherwise you could use a User Input Dialog, which has more customization-options

spiral dome
#

Is it possible to use the ref formula in an item to refer to a field on the player character sheet?
My goal is that at the item (weapon) the player selects the attribute the item uses from a dropdown menu. Then the value of that attribute is shown in a label next to it. Just to test I tried to get a result by hardcoding it, but using both ${ref('parent.Might')}$ and ${ref('Might')}$ in the item template return no value. Using ${ref('Might')}$ in the character template does return the correct value.

Edit: if I understand correctly, to make it actually work, i should use the component key of the dropdown-menu so it would switch the value whenever a different value is chosen. but ${ref(the dropdown-key)}$ didnt work either, since it should amount to ${ref('Might')}$ in this case

formal goblet
cerulean adder
#

${roll1:=[1d6]}$
${roll2:=[1d6]}$
${roll3:=[1d6]}$
<br>
${#highestRoll:= and(roll1 > roll2, roll1 > roll3) ? 1 : and(roll2 > roll1, roll2 > roll3) ? 2 : and(roll3 > roll1, roll3 > roll2) ? 3 : 0}$
${#middleRoll:= and(roll1 > roll2, roll1 < roll3) ? 1 :and(roll1 > roll3, roll1 < roll2) ? 1 : and(roll2 > roll1, roll2 < roll3) ? 2 : and(roll2 > roll3, roll2 < roll1) ? 2 : and(roll3 > roll1, roll3 < roll2) ? 3 : and(roll3 > roll2, roll3 < roll1) ? 3 : 0}$
${#lowestRoll:= and(roll1 < roll2, roll1 < roll3) ? 1 : and(roll2 < roll1, roll2 < roll3) ? 2 : and(roll3 < roll1, roll3 < roll2) ? 3 : 0}$
${#tiedHigh:= and(roll1 == roll2, roll1 > roll3) ? 12 : and(roll1 == roll3, roll1 > roll2) ? 13 : and(roll2 == roll3, roll2 > roll1) ? 23 : 0}$
${#th1:= tiedHigh == 12 ? 1 : tiedHigh == 13 ? 1 : tiedHigh == 23 ? 2 : 0 }$
${#th2:= tiedHigh == 12 ? 2 : tiedHigh == 13 ? 3 : tiedHigh == 23 ? 3 : 0 }$
${#tiedLow:= and(roll1 == roll2, roll1 < roll3) ? 12 : and(roll1 == roll3, roll1 < roll2) ? 13 : and(roll2 == roll3, roll2 < roll1) ? 23 : 0}$
${#tl1:= tiedLow == 12 ? 1 : tiedLow == 13 ? 1 : tiedLow == 23 ? 2 : 0 }$
${#tl2:= tiedLow == 12 ? 2 : tiedLow == 13 ? 3 : tiedLow == 23 ? 3 : 0 }$
${#allTied:= and(roll1 == roll2, roll1 == roll3) ? 123 : 0}$

2 Highest Dice = 
${and(highestRoll > 0, middleRoll) > 0 ? roll${highestRoll}$: allTied > 0 ? roll1 : tiedHigh > 0 ? roll${th1}$ : tiedLow > 0 ? roll${highestRoll}$ : 0}$
${and(highestRoll > 0, middleRoll) > 0 ? roll${middleRoll}$: allTied > 0 ? roll2 : tiedHigh > 0 ? roll${th2}$ : tiedLow > 0 ? roll${tl1}$ : 0}$
<br>
2 Lowest Dice = 
${and(lowestRoll > 0, middleRoll) > 0 ? roll${lowestRoll}$: allTied > 0 ? roll2 : tiedLow > 0 ? roll${tl1}$ : tiedHigh > 0 ? roll${lowestRoll}$ : 0}$
${and(lowestRoll > 0, middleRoll) > 0 ? roll${middleRoll}$: allTied > 0 ? roll3 : tiedLow > 0 ? roll${tl2}$ : tiedHigh > 0 ? roll${th2}$ : 0}$
#

Please feel free to mock me as much as you'd like lol it was fun either way

#

Or you can do this (like Torlan said) but it does not use the same dice but it's way easier.

2 highest ${[3d6k2h]}$

2 Lowest ${[3d6k2l]}$

main magnet
#

Any reason why number labels can't be used as maximums for number fields that reference them?

main magnet
#

Works when it's a number label tho

#

What's wierder is that it works in a different world.

#

Not sure what's causing it.

#

This one uses values from a dynamic table. Maybe that's the problem?

formal goblet
formal goblet
formal goblet
cerulean adder
formal goblet
#

I mean it's also some sort of training, so...

cerulean adder
#

I'll take it

half beacon
#

Is there a guide somewhere that helps me integrate Item Piles into CSB?

latent sorrel
#

Has anyone used the Party Resources module. I cant get it show up on the player side and I am not sure if its just a CSB incompatibility or something else.

main magnet
main magnet
main magnet
#

Any idea why this doesn't work?

${#concat( ?{difficulty[:"Difficulty"][check][|7]}, ?{difficulty[:check][|3[:3]|4[:4]|5[:5]|6[:6]|7[:7]|8[:8]|9[:9]|10[:10]|11[:11]}, ?{Modifier[number]} )}$

#

I'm trying to have radio numbers from 3 to 11, with 7 being the default one selected.

raven raven
#

Hi, Is there any way to create a panel that splits the sheet in a 2/3 and 1/3 ratio?

formal goblet
prisma grove
#

Isn't this supposed to be rounding down?

formal goblet
#

Literally just that, no more ๐Ÿ˜…

prisma grove
#

So it should only be showing 9 rather then the 9.5 its currently showing then yeah?

#

or am I missing something

formal goblet
#

The 9.5 is correct. What it does is "roll, round it, divide by 2" in this order ๐Ÿ˜…

prisma grove
#

Ah ok I see...

#

xD

raven raven
formal goblet
raven raven
formal goblet
#

yep

raven raven
#

I have it installed, got this window

#

but i have no idea what to write into this wndow to modify this panel

#

I got the css of the panel form f12

#

now what?

formal goblet
#

Sry, but I won't teach you CSS. So figuring out the right styles is up to you.

What I can tell is that you can provide additional CSS-classes to each Component (see advanced config of a Component)

cerulean adder
timid marten
half beacon
#

If the link doesn't take you directly to it, ctrl+F then type in "fetchFromActor"

coral hemlock
#

Does anyone happen to know the default Foundry CSS class names that govern the attribute bar colors for the Token HUD?

half beacon
half beacon
#

How do I properly set a property using a variable from a script? For example, setting "bonus" to whatever the value is in "i" from a loop.

if(actionSlot[i]){ ${setPropertyInEntity('self', 'bonus', %{return i}%)}$
}%```
raw terrace
#

Is there a way to limit the number of items in an item table on the actor sheet (letโ€™s say there can only be a maximum of 5 items)?

raw terrace
latent sorrel
# timid marten Hi! Sorry to update this again but I can't find where and how I should use "fetc...

Kinji was kind enough to provide the instructions for FetchfromActor. To set this up, have a weight field (lets call it "weight") on your backpack actor. This field will receive the item weights from the items in the backpack container via the item modifiers defined on your item (these are all covered in the same doc). On your character actor, have a label with a field label containing ${fetchFromActor('backpack','weight') + carriedWeight}$. This assumes the backpack actor is called "backpack". carriedWeight would be the total weight of other items on the pc actor.
Note: This solution is static. You will probably want to have a way to transfer the backpacks weight between characters. The easiest way, to my mind, will be to use a dynamic table that contains a list of the backpack and similar items (belts, etc) and uses the (unique) name of the item to fetch the weight from the "backpack" and show to weight for that item on each row using fetchfromactor, you can then total these values and add it to the characters carried weight.

woeful skiff
#

How do add a default to dropdown list in a prompt?

${#concat(
?{roll_stat:'STAT?'|"Agility"|"Endurance"|"Intelligence"|"Perception"|"Presence"|"Reflexes"}
)}$
timid marten
latent sorrel
#

You only need one template for all backpacks.

timid marten
#

If the target is "Blue backpack" this will only work with blue backpack

#

I'm lost :(

latent sorrel
#

its just like having a single PC template to cover all your PC actors. You create "blue backpack" and "green backpack" from "_backpack template" and then reference them by name.

timid marten
#

Yes, but if the label needs to be changed for each backpack, then it needs a different template

#

Let's say I have a key on the "Blue backpack" item called "totalweight" that does this: ${fetchFromActor('Blue backpack','itemsweight') + weight}$ and then have the PC Actor page read the "item.totalweight" from that item and add it to its own weight

This would mean that I would need a different label for each Backpack items

latent sorrel
#

No. "Blue Backpack" references the actor of the same name (build from "_backpack template"), if you need to change the reference, then you change "Blue Backpack" to "Green Backpack" (also built from "_backpack template"). You are still only using the same template for both actors.

#

The question comes down to whether you need an easy way to assign multiple backpacks (or utility belts) to the same character actor.

timid marten
#

Yes, one character actor can have multiple backpack items on him

#

To make it a bit more clear, here is how things work as of right now:

The Player Actor page has an item container that reads the item.totalweight, this is one way for the player to see what is the total weight of their backpack with all the items

Then, there is an actor page for this Backpack that will have the item container and that stores and calculates all the item weights in one specific key: BackpackWeight

In the Backpack's item page, there is a "totalweight" key that reads specifically the weight of the backpack + the "BackpackWeight" of the Backpack actor page. There is also a modifier to add the "totalweight" to the Player actor's weight

#

The issue with this is that the label that searches for the "BackpackWeight" searches specifically for "Blue backpack"s actor page, not anything else

If I were to create a Green Backpack item, I would need it to read the "Green Backpack"s actor page, which means editing the label

And editing the label for each backpack means having a template for each backpack, which is hell

#

I hope this is more clear this way :c

#

And thank you for your patience, really

latent sorrel
#

Try something like this on your player actor

timid marten
#

Oh

#

That's a solution yeah

#

I will try something with this

latent sorrel
#

the 'a' should be 'weight" or what what ever the weight column key is called

timid marten
#

Here is how I made it, and the label text is: ${fetchFromActor(sameRow('namefield'),'BackpackWeight'}$

abstract siren
#

Hello everyone, I am spaghetti coding a macro to autoupdate the active effects on tokens based on the health bar. So far, by following the link at the bottom I managed to add effects automatically, the hooking logic works correctly. https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Tips-&-Tricks/Scripts-for-Active-Effects
I can't understand how am I supposed to remove the active effects when the correct conditions are triggered ๐Ÿ˜ฆ I'm trying to follow the official documentation, but all I found is the getEmbeddedCollection method.

Before going down that rabbit hole I was wondering, is there's an easier way?
I already tried with token.actor.appliedEffects.pop(e => e.name === "Wounded"); but it doesn't work, I think due to reference or actor props update issues. Code follows.

timid marten
abstract siren
#
...
let isDying = token.actor.appliedEffects.find(e => e.name === "Dying");
    
    if (dying) {
        console.log("dying");
        if (isDying) {
            return
        }else {
            // Effect settings
            let effectData = {
                    changes: [
                        { key: "system.props.WOUND_MODIFIER", mode: 5, value: (token.actor.system.props.WOUND_MODIFIER) = 3 } 
                    ],
                    name: "Dying",
                    icon: "icons/svg/unconscious.svg", 
                    tint: "#ff0000", 
                    origin: token.document.uuid, 
                    sourceName: "Hit", 
                    disabled: false, 
                    description: "This does that...", 
                    flags: { core: { statusId: "Dying" } }
            };
            // Apply the effect to tokens
            let activeEffect = token.actor.createEmbeddedDocuments("ActiveEffect", [effectData]);
            // Script when the effect is created
            ui.notifications.warn("Effect created"); 
        }
    } else if (shocked){ ...
abstract siren
#

I may have found a solution, writing down your issues is so helpful lol

latent sorrel
#

We're glad we could help ๐Ÿ˜›

abstract siren
#

hacky solution for those interested

let appliedEffects  = token.actor.appliedEffects;
let effectNames = ['Wounded','Bleeding','Dying'];
let matchingIds = appliedEffects.filter(effect => effectNames.includes(effect.name)).map(effect => effect.id);
console.log(matchingIds);
token.actor.deleteEmbeddedDocuments("ActiveEffect",matchingIds);
timid marten
#

for example, the backpack currently returns 10kg but if I update the actor sheet's item's weight it will not update the 10kg until I manually make it refresh (removing one letter and rewriting it)

formal goblet
#

And yeah, that's the limitation of fetchFromActor(), no live-updates

timid marten
#

any solution for this then? :(

#

This means that all of this is for nothing

#

If I still have to manually update something

formal goblet
#

The only solution I'd know would be to create a WorldScript, which listens to backpack-changes and triggers actor-changes

timid marten
#

I never wrote scripts in Foundry VTT, any tip on how and where I could write something like this?

formal goblet
#

Well... WorldScripts should be registered via a module (either custom or the WorldScripter-module). And you need a bit of knowledge of the Foundry-API: https://foundryvtt.com/api/index.html. You want to use Hooks to register World Scripts.

timid marten
#

Is there an easier workaround like a "refresh everything" kind of button?

formal goblet
timid marten
#

All actor and item pages for example

formal goblet
timid marten
#

:(

#

What about refreshing only _backpack template pages?

formal goblet
timid marten
#

I meant the _backpack actor pages

formal goblet
#

game.actors.filter(actor => actor.system.template === 'templateId').forEach(actor => actor.templateSystem.reloadTemplate()) or something like this. Check the paths of the actor with game.actors.getName('yourActorName').

#

But in general, it should always be actor.templateSystem.reloadTemplate() or item.templateSystem.reloadTemplate() at the end.

timid marten
#

so basically this?

formal goblet
#

You can type that into the console (F12)

timid marten
formal goblet
#

You can expand it and check the properties of it (in this case, check system.template)

formal goblet
timid marten
formal goblet
#

Yep, ID

timid marten
#

okay so now

#

this should work?

formal goblet
#

Probably. Give it a go

timid marten
#

How can I do this for _backpack item templates too?

#

I think that's what I need to update actually

#

because the dynamic table is inside an item page

#

left is the actor page, right is the item page

#

and it's the item page value that doesn't update automatically

#

not the actor page value

formal goblet
timid marten
#

I tried this but it doesn't refresh anything

#

I got the id from "game.items.getName('Sac bleu')"

#

I would want all items to be refreshed, could it be actor items but also general items

#

(all items with the _backpack template of course)

#

I don't think my screenshot has been sent so here is a copy paste:
game.actor.items.filter(item => item.system.template === 'T0i2XYaEWGChQHWK').forEach(item => item.templateSystem.reloadTemplate())

#

I also tried "game.items.filter" instead of actor.items

#

Nothing gets refreshed

formal goblet
timid marten
#

To be fair, game.items doesn't work either

formal goblet
#

Errors in the console?

timid marten
#

Does this mean that it worked?

#

the screenshots are not sending :(

formal goblet
#

I think your image host is dead

timid marten
#

even just sending screens through discord doesn't work

#

discord is dead

#

add https://

#

to the link

formal goblet
timid marten
#

The macro doesn't do anything in the console then

formal goblet
#

Cut off the part after filter() and check if there are even items that pass the filter.

#

Execute that in the console so that you see the results directly.

timid marten
#

no results

#

nothing in the console

drifting raft
#

${variable:=1}$
${variable=2}$
${variable}$
Why the third line outputs 1 and not 2? Can't I resssign variables that way??

latent sorrel
timid marten
#

the filter works

formal goblet
spiral dome
#

Hey, back again with probably a question which is probably really obviously stated in the readme in the Gitlab page ๐Ÿ˜„

I have an item which defines what skill is used from a dropdown. Now I want a label next to it that retrieves the skill rating of this skill on the charactersheet.
I tried
fetchFromActor('attached', "fetchFromDynamicTable('playerSkillsDynamicTable', 'SkillstableSkillRating', 'SkillstableSkills', itemsWeaponsSkill)",0 Result = 0
and
fetchFromActor('attached', "fetchFromDynamicTable('playerSkillsDynamicTable', 'SkillstableSkillRating', 'SkillstableSkills', item.itemsWeaponsSkill)",0 Result = Error

Both didn't work. Can someone point me in the right direction? I am sure the keys are correct.

drifting raft
timid marten
#

I know why this doesn't work

#

reloading the template doesn't update the dynamic table's value

#

As you can see here

latent sorrel
timid marten
#

What should be the code inside the button to update the item?

latent sorrel
#

${setPropertyInEntity('self', 'toggle', '${toggle ? 0 : 1}$')}$ where toggle is the key of the checkbox

timid marten
#

How do you add buttons again? I forgot :')

prisma grove
#

The icon doesnt have to be dice-d20 either, but that is a pretty decent default.

timid marten
#

the button updates itself every 0.1 seconds

#

๐Ÿค”

#

it breaks everything, I'm glad the undo button exists lol

#

it goes 0,1,0,1,0 infinitely

#

the refresh is happening so fast that it breaks all pages

formal goblet
timid marten
#

Where should I add it in the button?

formal goblet
#

Label Roll Message

timid marten
#

Can I remove the fact it actually rolls something?

#

like the chat message and roll sound effect

formal goblet
#

%{throw 'done';}% at the end

spiral dome
pale crest
#

Hi guys! (Propably not so) quick question ๐Ÿ˜…
Is there a way to access and evaluate a roll inside a "Label roll message"?
The system I'm working on right now rolls 2+d6 dice for different actions and the system defines a crit as "two matching numbers inside the roll". So a roll with 3,1,3 would be a crit with the two 3s and I would like to detect that and react to it inside the roll message to add for example 'Crit!!!' to the message.

timid marten
#

Thank you so much, everything works as intended now! I just need to remember to update all items but atleast it works :')

half beacon
fierce harbor
formal goblet
cinder raft
#

Hi gang, how would I insert a hp track like the one in World of Darkness, where you have 3 states per checkbox in a character sheet? Empty, marked with a slash and marked with a X
If that is even possible :D

cinder raft
#

btw, is there a solution for that? A better way to use a macro script than with that function?

formal goblet
cinder raft
#

Nice :D

bright berry
#

This Custom Component thing is impenetrable... I wonder if someone else has made one that I can just steal

formal goblet
bright berry
#

Yeah...

#

It's the same question EnTropic asked. Trying to implement a three or four state checkbox

#

A different solution is just a dropdown list of options, but it's not as elegant as just clicking a box. And less tactile

formal goblet
#

Well, you have to know how to program with JS and HTML, that won't change ๐Ÿ˜…

bright berry
#

If that makes sense

#

Haha, yeah

#

I do not

formal goblet
bright berry
#

Yeah, of course

#

No worries

#

Other solution ideas... Would it be possible to make a button that cycles through text when you click it?

#

A Label that'll change its own text when clicked

#

In a different sheet I had labels that would change their text based on a different component... I guess having it all in one leads to recursion issues

bright berry
#

Aha!

formal goblet
#

You cannot save the state in a Label, but it should be fine to save it in a Number Field or Dropdown

bright berry
#

Right yeah, that'd work

#

This one?

#

Wow I do not get item containers at all, what the heck..

#

To the documentation!

formal goblet
bright berry
#

Oh, I don't have any items to drop though. So it's something that works in tandem with other things I have to make?

#

Because this is entirely uninteractable

formal goblet
bright berry
#

Hmmm

#

Shame the example sheet doesn't come with example items so I can see how it works better...

#

Oh

#

It does xD

#

Hmm

misty terrace
#

hey, there was a thread somewhere on this board that had a bunch of CSS tips and tricks, does anyone remember where that is?

half beacon
#

A Discord thread or a wiki?

misty terrace
#

discord thread

#

I'm trying to remember how to update the item containers so it shows the item's picture larger, instead of the name

misty terrace
#

Yes! Thanks!!

craggy python
#

so a little while ago i refactored my sheet and in doing so, decided I'd remove one of the templates that I'd been using. i forgot to like, delete all of the items from the sheet that use that template though, and now there's a bunch of junk data spitting out warnings to me. i've tried deleting them through the console, like using game.actors.get().items.delete() and going through one-by-one for each item, but it turns out that it's not saving those deleted changes (i am doing this with a shorthand by storing game.actors.get().items in a variable and deleting from there, perhaps that's why?)

in any case, is there a faster way to clean all of this corrupted data off of my sheets? it's basically just a bunch of dead items

formal goblet
craggy python
#

clever, thanks so much!

turbid elbow
#

How does one make "items" that have some kind of action to them? Everything has to be a macro?

fierce harbor
turbid elbow
#

At this point I'm thinking about weapons in general and some gear like night-vision goggles and stuff.
I use an NVG macro from my macro bar but eventually I want to give that to players as an item

fierce harbor
turbid elbow
#

My system is not on Foundry so I'm struggling in cobbling stuff from scratch

turbid elbow
fierce harbor
turbid elbow
#

I am, unfortunately, forced to rely on thralls fueled by whiskey and cookies, called "buddies" for JS knowledge ๐Ÿ˜ฆ

scarlet skiff
#

well you could put your macro in a compendium and then put a button in the googles item which calls that macro - then players should also be able to use it

turbid elbow
#

What is a compendium? A database?

scarlet skiff
turbid elbow
#

m'kay... what will it do?

scarlet skiff
#

i dont know if it could be called a database but in the end its a collection of things you put there

#

so e.g. i got a macro compendium (which is free to use for my players) which looks like that

turbid elbow
#

Ok...

scarlet skiff
#

in there there are macros which call the real macro like that

let macroName = "Attack Macro";
let key = "world.helper-macros"
let pack = game.packs.get(key);
let macro = (await pack.getDocuments()).find(i => (i.name === macroName));
await macro.execute();
#

i did this so players cant alter the real macro

#

but after all you could just put this call also in a label (have to use script expression = %{}% for that)

turbid elbow
#

like, choose how they can attack?

#

So I have to make a database of weapons and equipment so that the player can use a macro in the compendium to use said entry

scarlet skiff
#

for example you could put your googles-macro in a compendium and call this via a button on the sheet

turbid elbow
#

FFS, I'm coming to the realization that Foundry was a big mistake if I don't understand Java and coding

scarlet skiff
#

thats not true

#

it just depends how much automation you want

#

for everything else CSB is a easy starting point

#

like your task with the googles is advanced stuff which helps with automation but is not required

turbid elbow
#

I want barely any automation, because we play F2F at a table with a screen on which I run the map and tokens

#

the thing is, I'm trying to go for effects that my players could toggle and functional gear

scarlet skiff
#

yeah

#

thats difficult stuff

#

for that stuff you need JS - but thats true for every VTT there is

#

for animation/effects/functions you need programming

turbid elbow
#

later maybe NPC weapons with sounds

scarlet skiff
#

playing sounds on a button press = macro = programming

turbid elbow
#

We play Warhammer 40k Dark Heresy 1ed. which is non-existent for regular Foundry.
I'm trying to adapt as much as I can.

scarlet skiff
#

i guess all the stuff you want needs programming in one way or another - in foundry that would be JS - for other VTT i dont know

turbid elbow
#

I have a programmer-friend but there are limits to buggering people for help

#

even with whiskey and cookies

#

It does look good and stuff but I can't get the functionality I need from it.

misty terrace
#

OK, all this time using CSB and I've never done this before. I am working on the Daggerheart playtest and I want the player to choose a Class from a dropdown list and have that choice populate another control on the sheet with that Classes Feature ability. Any ideas?

formal goblet
misty terrace
#

I can hard code the options using custom, but I'd love to make it more flexible so there isn't a major effort when they change classes

formal goblet
misty terrace
#

not sure what you mean.

#

at the moment the Class Feature is the same for all characters of that class, so I'm trying to have a label in the lower left of the sheet that updates with the correct text for the class feature when the player selects/changes their class from a dropdown at the top.

formal goblet
formal goblet
misty terrace
#

I could make a Class item and add a Feature field and use a pair of linked ITCs

turbid elbow
formal goblet
turbid elbow
#

That's how the char sheet looks like

formal goblet
turbid elbow
#

I don't know the difference ๐Ÿ˜ฆ

#

I kinda jumped into Foundry to get a great experience for my group but hell, this is way bigger than I can manage

formal goblet
# turbid elbow I kinda jumped into Foundry to get a great experience for my group but hell, thi...

Well, more automations means more work. If you need an Example, you can download the Example-Sheet from here: https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/template/example_template/sheet-library/Example?ref_type=heads

You need to fix the Item Containers by reselecting the right Item Templates. Besides that, everything should work from the get-go.

turbid elbow
#

Thanks.

weary nymph
#

Hello. How can I access an owned item's name in a character sheet formula? Can I access the name directly or do I have to have a field on the item with the item's name?

formal goblet
#

Ah wait, from the Actor Sheet?

weary nymph
#

yes, from item container item.

#

used in a roll

formal goblet
#

item.name

weary nymph
formal goblet
#

Yep

weary nymph
#

Thanks!

fathom cave
#

Had a question for @formal goblet . Wanted a roll in a userInputTemplate to populate a field(label) inside the template. The roll works, but I can't figure out how to 'send' it to the label. have "${setPropertyInEntity('self', 'fumble', [1d20])}$" and 'self' returns it properly to the actor sheet, but I want it to return to a different field on the InputTemplate itself and don't know what I should replace 'self' with. Thanks!

formal goblet
fathom cave
#

sorry, trying to build a full system, something I have wanted to do for a while, but not a coder. So I have on the character sheet a label which pulls up a userInputTemplate. I have a button label which when pressed rolls a 1d20. I want the result to show up in another label on the userInputTemplate. If I use the previous code it will return it properly to 'fumble' on the character sheet, but I don't want it to return there, I want it to return to a label on the userInputTemplate where the d20 icon is in the picture with the key 'fate'. setPropertyInEntity() seemed like the best choice to do this.

formal goblet
fathom cave
#

I haven't dug into scripts so much yet, but now I know that is where I have to go, thanks!

misty terrace
# formal goblet What about having a class-item, that modifies the right fields?

That worked, Martin. A bit ugly and needs some styling, but I turned Class into an item, made 2 item containers on the sheet that both referenced on that type of item and displayed the fields I need on the bottom one.

I think I can surpress the <a> link/item card in the bottom box using CSS. (I don't need the "Bard" card in the bottom box)

formal goblet
timid marten
#

Hi! Does anyone know why my radio button value returns "object Object" when trying to link it to a number field from which the key is also the group key of the radio buttons?

formal goblet
timid marten
#

My radio buttons all are from the group "HP", and all render a value from 1 to 5 (not injured to very injured)

I want to read the value and also be able to change which radio buttons is activated without opening the sheet (changing the attribute from a token bar), but when creating a number field with the key "HP", it does this

#

radio buttons cannot be clicked and it only renders object Object

formal goblet
timid marten
#

It is not possible to link them to an attribute bar? :(

formal goblet
timid marten
#

I could link them with the props.keyValue on the ressources tag but the dots won't check correctly when editing from the token

However, as seen in the bottom left of the sheet, the value updates correctly

#

Is there really no way for the radio buttons to read "ok I am 4 now so I should check the button that renders the value 4"?

formal goblet
timid marten
#

I see the issue ๐Ÿค”

#

I tried with a dropdown but the issue is the same sadly

formal goblet
#

The Attribute Bar was only meant to be synced with Number Fields, not with other Components

timid marten
#

I see

#

:(

timid marten
#

You can add conditions with "condition ? true : false" but can you add "else if"?

Like "${HP == 5 ? 'untouched' : HP == 4 ? 'scratched' : HP == 3 ? 'Lacerated'}$" etc..

#

Ok I didn't think it would work if I wrote it like this, it was just for the example

#

But it turns out it's actually how you do the else if

#

lol

#

I got my answer

misty terrace
misty terrace
#

I'm having a hard time understanding what one would practically do with an Item Modifier. Is it a way to do things like mimic Active Effects? For example, would that be a way to update a Character's Strength if they add and item called "Ring of Strength" that has an Item Modifier on it?

formal goblet
timid marten
#

I'm having an issue with the "Heartbeat" module, it cannot read the HP attribute value for some reason

#

Health estimate works prefectly though

formal goblet
timid marten
#

I just fixed it, the solution was "actor.attributeBar.HP.value", I'll keep this post here in case anyone in the future has the same issue

formal goblet
timid marten
#

oh wait nevermind

#

"system.attributeBar.HP.value"

#

lol

formal goblet
#

Yeah, that one is more logical

turbid elbow
fierce harbor
sonic vault
#

Hi guys, How long, everything ok?
I have a problem with my HP attribute, the maximum hp has a formula, [constitution + (an attribute)d(another attribute) ], I tried to make it work but I had some specific problems with the roll.
How could I do this?

#

I did it this way but it doesn't seem to be adding up (PV = HP)

#

"con_valor + inicial_pv = 31"

turbid elbow
#

@formal goblet
Goggles do this:

const {visionMode} = token.document.sight;
await token.document.updateVisionMode(visionMode === "basic" ? "lightAmplification": "basic")
await token.document.update({
sight:{
range: visionMode === "basic" ? 15: 0,
angle: visionMode === "basic" ? 45: 0
}
});

Do you happen to know a way to change this effect to something like grainy monochrome 'thermal vision'?

scarlet skiff
turbid elbow
#

I tried, no success.

sharp prairie
#

You know what? Iโ€™ve felt for a long while that the CSB community is in desperate need of a video tutorial/review/intro thing. As a fellow human with ZERO coding or programming experience, trying to learn how to do any of this over text chat isโ€ฆ [redacted]. So, even tho I mostly have no idea what Iโ€™m talking about, Iโ€™m gonna try to work on making some videos. At least on where and how to find the info needed to start building and using CSB and then some basic stuff that Iโ€™ve learned. I wish to at least lessen the amount of floundering Iโ€™ve noticed while constantly lurking in here. I have no idea when this will happen, but Iโ€™ll try my best.

#

@formal goblet @brittle moth Please let me know if I might be overstepping by doing something like this. ๐Ÿ˜Š

misty terrace
#

Anyone write any CSS to shrink the size of a Panel (set to Grid of 3) with each cell only containing unlabled Checkboxes?

formal goblet
formal goblet
prisma grove
#

${#'BOX_ARROWS' ? '${#setPropertyInEntity('self', 'NUM_ARROWS', "NUM_ARROWS - 1")}$' : '0'}$ I am missing something simple here im sure, but this still subtracts even if set to false.

#

I also tried this ${#'BOX_ARROWS' ? '${#setPropertyInEntity('self', 'NUM_ARROWS', "NUM_ARROWS - 1")}$' : '${#setPropertyInEntity('self', 'NUM_ARROWS', "NUM_ARROWS + 0")}$'}$ but that just reset back to 0 every time. reguardless of true or false checked.

prisma grove
#

Ah... I see, I swear my dyslexia is getting worse lol thanks as always.

manic hearth
#

I'm using a dynamic table where I want it to include an optional text field as part of a message, but sameRow is returning 0 when it's blank. Is there a way to get it to leave it blank?

formal goblet
manic hearth
#

Tried '' and ' '. Both threw me an error

formal goblet
formal goblet
manic hearth
#

Here's the snippet, if that helps.

<h3>Damage: ${sameRow('roll7',0)}$</h3>
<h4><b>Roll: </b>${[1d10x10] + sameRow('roll3')}$</h4>
<B>Notes: </b><i>${sameRow('roll8')}$</i>```
formal goblet
manic hearth
#

Yeah. I was sloppy with the keys.

formal goblet
#

So sameRow('roll8', '') still returns 0?

manic hearth
#

Yup. Just tried it again to be sure

formal goblet
#

Heh... Could be a bug

manic hearth
#

The ones for Roll2 and roll3 do the same when I leave them blank too.

formal goblet
#

Can you open a ticket for that? I'll look at it later.

manic hearth
#

Sure

sharp prairie
prisma grove
#

Curious can a specific item be tracked through a label outside of an inventory? Like If I had 5 potions and I wanted that to show in a label on another tab could that be done?

cinder fox
#

I am trying to set up a roll that can just roll the dice formula under the damage column in a dynamic table

#

This does not seem to work: ${#dice:= sameRow('weapon_damage')}$ ${[dice]}$

Ok I got it to work, I have to surround the key/variable with :, like so
${#dice:= sameRow('weapon_damage')}$
${consoleLog(dice)}
${[:dice:]}$

timid marten
#

How could I make it so that instead of adding items multiple times inside an item container it instead increases the item.Quantity value of that item?

timid marten
fierce harbor
timid marten
#

well yeah but it mentions not to add the "item." to the path

fierce harbor
# timid marten Is my quantity value not setup correctly?

Can't seem to find the info and my pc isn't accessible at the moment. I know it is the hard way, but you could create an actor and the connected token, then use the console to traverse the data structure till you get to the items.

timid marten
#

There's no way I find it this way :/

#

Thanks though

fierce harbor
vagrant hollow
timid marten
#

I do

timid marten
#

Yes, I think

vagrant hollow
fierce harbor
timid marten
#

won't stack tho

vagrant hollow
# timid marten won't stack tho

Ah, just read the above part of your question.
Item piles will not do this automatically and also not CSB.
But you can make the label inside the item container add/subtract 1 if you click/shift-click on the quantity label.
Use the setPropertyInEntity function.

#

So, not drag/drop one more on the sheet.

timid marten
vagrant hollow
#

I want a chat printout if a player changes his quantity.

timid marten
#

I add those in the label text?

vagrant hollow
timid marten
#

It worked, thank you!

#

This becomes handy

vagrant hollow
#

I think I have a hiccup in my brain.
I have a matrix that has to be equal for every actor (so no sense for dynamic table) and via two dropdowns (collum, row) I want to get the one exact value out of it for further calculations.
Can maybe someone push me in the right direction how to do this.

fierce harbor
vagrant hollow
bright glacier
#

Greetings! I'm new to this and there are many things I don't understand about the wiki. I want an object to use a value from the character sheet, but I don't know how. My idea is that from the object sheet, you can use an attack and damage button. I really appreciate your help.

woeful skiff
#

Is there a way to add a row to the top of this table or a way to rearrange the rows ?

fierce harbor
woeful skiff
formal goblet
bright glacier
spiral dome
#

A question just to save me some time ๐Ÿ™‚ :how do item containers behave inside a Dynamic Table?

My goal: create a dynamic table in which every line is a unique spell book. Every spell book has a number of spells, a number of so called 'immuto' that affect the spells (change the range or damage for instance). It would be great if I can just use the item containers to add the spells and immuto as items, but I doubt it is possible to add spells to a specific item container because that spell book contains those specific spells.

formal goblet
spiral dome
#

Too bad

warm flower
#

Good evening gents!

I'm trying to do some math in here for the rolls, but strugling to make this work.

Which formula would be the best to roll from one character and compare the result with target actor atribute?

formal goblet
warm flower
#

thanks, will try that

normal ore
#

Hey guys, how's it going?
I'm trying to use scroll macros because in the system I'm putting together, there's a test attack scroll, and if it succeeds, there's a damage scroll, and occasionally a status test scroll. All tests use character sheet keys, both for the selected characters and the target characters. I'm having difficulty developing the script. Does anyone have a script as an example that would allow me to build from this example?

formal goblet
normal ore
normal ore
formal goblet
prisma grove
#

How do I get a dynamic table number field to display the result of a roll? Like I can the outcome I want in chat but it wont change in the Dynamic table. I'm sure I'm over looking something in the wiki =/

formal goblet
# prisma grove How do I get a dynamic table number field to display the result of a roll? Like ...

Your Formula cannot find something under the path NUM_AMMO. You can test it by using ${NUM_AMMO}$. You'll see that this won't display anything. The reason behind this is that NUM_AMMO is a key within a DynamicTable, so the full path would be something like Ranged_Weapons_Table.0.NUM_AMMO. So you need a function, which can return the path of the column of the same row. And that would be this here: https://gitlab.com/custom-system-builder/custom-system-builder#425-samerowref

prisma grove
#

Ah ok thanks.

static cargo
#

Is there a YT vid or something showing what the Item Type: SubTemplate and UserInputTemplates are for?

fierce harbor
static cargo
#

I guessed as much, but my learning style leans heavily toward Visual over reading. ๐Ÿ˜ž

fierce harbor
static cargo
#

Maybe there's another way you can help @fierce harbor. is there a console path that would fetch the template used such as:
game.items.getName('thing-0001').wibbly.wobbly.template

fierce harbor
gray shore
#

Hello there! Nice to meet you all!

I wanted to ask, how do I get an attribute from the selected token in a script, as I would in the sheet? For instance ${mp}$ ? For some reason, it seems like token.actor.system.props is always undefined for me.

formal goblet
gray shore
#

Thanks a lot, that works! Deleted some of my messages since I accidentally placed a template in a scene so it obviously did not have props

cerulean adder
#

Is there any way to sort items that are in an item container? It looks like it's first come first serve atm.

formal goblet
cerulean adder
#

Thank you!

real shuttle
#

okay so I tried putting ${item.textareakey}$ in the roll message for an item container label and all it's giving me is this

#

oh wait what

#

it works with one template but not the other o.OOO

real shuttle
#

okay I figured all of that out--next question:
Is it possible to embed a deferred roll into a rich text area that would then be clickable once that area is put in chat with a roll message?

#

example:
Ability description says "You can use your action to make a claw attack. On a hit, you deal 1d6 piercing damage." When it goes to chat, you can click "claw attack" and it'll roll your d20, and then you can click the "1d6 piercing damage" and it'll roll your 1d6.

clear gust
#

Hi ! Quick question : is it possible to call a macro within the Initiative Formula, or is it only a direct dice roll/actor skill fetch ?

formal goblet
real shuttle
#

ohhh I'm dumb I was trying to put a ${}$ inside a ${}$

formal goblet
real shuttle
real shuttle
#

oh oh you do the %%'s for one of them okay!

still sluice
#

I'm struggling with building an OSR-adjacent sheet for relatively simple characters. I have probably not done it precisely appropriately, but I have the following:

  • One template for use by PCs and henchmen
  • One template for classesto store permanent values associated with that class
  • A character for each class using classTemplate (classFighter, classMage, etc.)

The PC template has a dropdown to select a class, and then refers to the sheet containing the permanent information (i.e. a fighter would refer to "classFighter" where the attack progression, saves, etc. are stored). This makes it quick to build a custom class since I can just input the relevant values.

Most of the progression for a class can be done with math (saves, to-hit, etc.) as a function of level; however, some things are not smooth and my maximum goal is to declutter the PC sheets because they will have a lot of them. I'm stuck on thief skills which do not progress smoothly. A lookup table is the most obvious solution but I'm struggling building one.

My problems are A) I don't want superfluous information on the PC sheet (i.e., showing thief skills for non-thieves), and I don't want to have to show seven thirty-six row lookup tables on every classXYZ where they aren't relevant. I tried using an Item Container and making each thief skill an Item that could be slotted into classXYZ, but I can't figure out how to, for example, fetch a value from a dynamic table in an item attached to classXYZ corresponding to the row number of the level of a PC, where the item is not attached to the PC.

Having written this out I have one new idea to try, but any insight is appreciated. I'm sure further information would be required for a full answer but I won't continue to blast potentially insignificant context.

still sluice
#

(I may have just found it by passing the whole dynamic table array as an item modifier to the classXYZ then using math.js to parse that array by level)

still sluice
#

I have passed a 2D array with fetchFromDynamicTable as a modifier on the item pertaining to a particular thief skill, which outputs a comma separated number that doesn't seem to behave like an array, so I'm stuck unless I can parse this long number using array.shift or something else

still sluice
#

for anyone who read my tirade above, the magic line was:
%{return Array(${fetchFromActor(ref('class sheet'),'skill key')}$).at(${level}$)}%
had to make the csv string into an array within a js script

#

this is now solved

clear gust
clear gust
formal goblet
#

Yep

formal goblet
clear gust
#

I've got a var inside the macro ("totalSuccesses") that returns the final result as a number
how would I fetch this in the formula ?

clear gust
#

can't believe I didn't find this part on the wiki
thanks !

still sluice