#Custom System Builder

1 messages · Page 41 of 1

bright flume
#

So if you had "ch_dexterity" as a stat, then just "[1d20] + ch_dexterity" would do it (or any other formula). I think.

oblique gyro
#

wait, that does seem to work actually

#

thanks

bright flume
#

It works for me

#

Did you remember to save changes after setting it?

oblique gyro
bright flume
#

(don't worry, when I was testing it just there, I did the same thing ;D)

#

(Forgot to save )

oblique gyro
#

now better question - let's say I have two stats that I'd want to influence initiative, but only take the higher one. Is there a way to do that?

bright flume
#

Yes!

#

A if statement I suspect.

bright flume
#

Or that

oblique gyro
formal goblet
oblique gyro
#

this system rules, man

bright flume
#

It definitely does :D

#

soo many options

#

If I wanted to use Illandril's tooltips with this, what should I put at the start at the bottom?

formal goblet
bright flume
#

I have it as a attribute bar

formal goblet
bright flume
#

Just system.attributeBar.totalhp worked :D

#

Thank you :3

silver lake
#

I'm back again with another question! xD
I'm trying to make this Label sum all of the value fields of a Dynamic Table ONLY IF they are marked with the correct dropdown:
Ascendant:${sum(fetchFromDynamicTable('CCResTable', 'ResTier', 'Ascendant', Reduction))}$

The idea is that every entry of the dynamic table is a source of armor, and each has a dropdown saying what type of resistance it is.
I want all of the resistance of each type to be picked up by labels above the table showing the total resistance of each type that a character has.

#

If I do: Ascendant:${sum(fetchFromDynamicTable('CCResTable', 'ResTier', Reduction))}$
the label simply sums all of the values of each entry, despite the type of resistance, of course. I don't know how to specify the dropdown as a filter.

formal goblet
silver lake
formal goblet
#

Or actually, are ResTier and Ascendant column keys?

silver lake
#

ResTier is the value

#

Ascendant is supposed to be the displayed resistance that this label is grabbing.

formal goblet
#

So, are ResTier and Ascendant column keys of the Dynamic Table?

silver lake
#

Ascendant is the key I want it to pull from the Dropdown

#

${sum(fetchFromDynamicTable('CCResTable', 'ResTier', Reduction))}$
Which is why I did this first, but of course, with no specification it will just sum all of the entries

#

But I don't know how to do the specification to filter by dropdown selection

#

so I added Ascendant to it just to see what happened.

formal goblet
silver lake
#

So I add the column name of the dropdown?

formal goblet
#

Of the Dynamic Table

silver lake
#

The dynamic table is called CCResTable.

#

and it has multiple columns

formal goblet
#

Right, and you have to define one of those column by giving the column key

silver lake
#

Column Name (optional) is the column key? Or are you talking about Resistance

#

Which is the key of the dropdown

formal goblet
#

When you create a Component in a column, the column key equals the Component key

silver lake
#

So this?
${sum(fetchFromDynamicTable('CCResTable', 'Resistance', 'Ascendant', Reduction))}$

#

Resistance is the dropdown key, Ascendant the component key of the dropdown which I want it to pull from, Reduction the value.

formal goblet
#

If I want to sum the weight of all rows, which have location == 'Backpack', the formula would be sum(fetchFromDynamicTable('Inventory', 'weight', 'location', 'Backpack'))

silver lake
#

oh, okay, so the order is wrong

#

${sum(fetchFromDynamicTable('CCResTable', 'Reduction', 'Resistance', 'Ascendant'))}$
Got an error. I'm trying to see if there are any mistakes.

#

There is

#

I was using another table key that I was using this for before by accident

#

Beautiful

#

It was just the order then

#

I understand how the order is meant to be now

#

Thank you!

#

If there's anything I can do for you just tell me! You help folk plenty here.

formal goblet
#

Yeah, because you can have only 2 args in this function, which would take all values within the column

#

That's why the second arg is always the target column

silver lake
#

So I don't forget

fallen coral
#

Just mentioning

#

Is the a way to create a label roll that copies a content to the clipboard?

formal goblet
fallen coral
#

Thanks

brittle moth
#

I've got it. Beware, it's technical, long and I have 3 workarounds

The issue is that Foundry tries to re-render the sheet on every item update, but cancels rendering when another rendering is already taking place. The values in the items are correct, the values in the actor data are correct as well, but since multiple items are being updated sequentially and rapidly, when the last render triggers, the one with all the right values, another one is in progress and the last render fails.

Now you have three options :

  1. (Potentially slow, but clean) Update every item without rendering, wait for all updates to be done, then re-render the actor AND all the items

  2. (Might be faster, but a little dirty) Trick Foundry into thinking the actor is rendering to prevent it from being rendered, then reset the value and trigger a manual render

  3. (Cleanest, and I think fastest, but complex due to document deletion) Update all documents in your actor at once, to trigger only one re-render

#

This is the code for solution 1 :

${#setPropertyInEntity('self', 'THP', 0)}$
${#%{
const promises = [];
const itemToReRender = [];
const itemTemplateName = 'Ability Template';
const itemTemplateId = game.items.getName(itemTemplateName)?.id;

if(itemTemplateId){
    entity.items
        .filter(item => item.system.template === itemTemplateId)
        .forEach((item) => {
            const newCd = Math.max(item.system.props.readyIn - 1, 0);
            itemToReRender.push(item.id);
            promises.push(item.update({'system.props.readyIn': newCd}, {render: false}));
        });
}

const statusTemplateName = 'Status Effect Template';
const statusTemplateId = game.items.getName(statusTemplateName)?.id;

if(statusTemplateId){
    entity.items
        .filter(item => item.system.template === statusTemplateId)
        .forEach((item) => {
            if (item.system.props.duration == 'Turns') {
                itemToReRender.push(item.id);
                const newCd = Math.max(item.system.props.turnsLeft - 1, 0);
                if (newCd === 0) {
                    promises.push(item.delete({render: false}));
                } else {
                    promises.push(item.update({'system.props.turnsLeft': newCd}, {render: false}));
                }
            }
        });
}

await Promise.allSettled(promises);
entity.render();
entity.items
    .filter(item => itemToReRender.includes(item.id))
    .forEach((item) => item.render());
return '';
}%}$
Character Activated
#

This is the code for solution 2 :

${#setPropertyInEntity('self', 'THP', 0)}$
${#%{
const promises = [];
entity.entity.sheet._state = 1;
const itemTemplateName = 'Ability Template';
const itemTemplateId = game.items.getName(itemTemplateName)?.id;

if(itemTemplateId){
    entity.items
        .filter(item => item.system.template === itemTemplateId)
        .forEach((item) => {
            const newCd = Math.max(item.system.props.readyIn - 1, 0);
            promises.push(item.update({'system.props.readyIn': newCd}));
        });
}

const statusTemplateName = 'Status Effect Template';
const statusTemplateId = game.items.getName(statusTemplateName)?.id;

if(statusTemplateId){
    entity.items
        .filter(item => item.system.template === statusTemplateId)
        .forEach((item) => {
            if (item.system.props.duration == 'Turns') {
                const newCd = Math.max(item.system.props.turnsLeft - 1, 0);
                if (newCd === 0) {
                    promises.push(item.delete());
                } else {
                    promises.push(item.update({'system.props.turnsLeft': newCd}));
                }
            }
        });
}

await Promise.all(promises);
entity.entity.sheet._state = 2;
entity.entity.render();
return '';
}%}$
Character Activated
#

This is the code for solution 3 :

${#setPropertyInEntity('self', 'THP', 0)}$
${#%{
const toUpdate = [];
const toDelete = [];
const itemTemplateName = 'Ability Template';
const itemTemplateId = game.items.getName(itemTemplateName)?.id;

if(itemTemplateId){
    entity.items
        .filter(item => item.system.template === itemTemplateId)
        .forEach((item) => {
            const newCd = Math.max(item.system.props.readyIn - 1, 0);

            toUpdate.push({_id: item.id, 'system.props.readyIn': newCd}):
        });
}

const statusTemplateName = 'Status Effect Template';
const statusTemplateId = game.items.getName(statusTemplateName)?.id;

if(statusTemplateId){
    entity.items
        .filter(item => item.system.template === statusTemplateId)
        .forEach((item) => {
            if (item.system.props.duration == 'Turns') {
                const newCd = Math.max(item.system.props.turnsLeft - 1, 0);
                if (newCd === 0) {
                    toDelete.push(item.id);
                } else {
                    toUpdate.push({_id: item.id, 'system.props.turnsLeft': newCd}):
                }
            }
        });
}

let deleteTriggerRender = false;
if(toUpdate.length === 0){
    deleteTriggerRender = true;
}

await entity.entity.deleteEmbeddedDocuments("Item", toDelete, {render: deleteTriggerRender});
await entity.entity.updateEmbeddedDocuments("Item", toUpdate);

return '';
}%}$
Character Activated
violet orchid
#

I would have never managed this on my own

fallen coral
#

@brittle moth if you don't mind, I'd like to ask you if there is a way to understand why while we refresh a character or an item it takes multiple times to compute them, even when they say it was computed successfully every time and how I can prevent or avoid this if possible

#

I believe the problem is probably on my end, but it doesn't hurt to ask 😅

#

this

violet orchid
#

I also used the await Promise.all(promises); tech in my module code and it's working correctly. Can't thank you enough.

brittle moth
brittle moth
# fallen coral <@303274115433889794> if you don't mind, I'd like to ask you if there is a way t...

Hello 🙂
This is Foundry's inner workings, I don't control how often items and actors are recomputed. They announced an optimization for this in v13, but this will stay like this in the meantime, sorry :/

As for the why, I think every time you update an actor, it refreshes its items since their values may depend on the actor, then the actor again to take all the new values of the items into account.

fallen coral
brittle moth
# fallen coral Thanks for replying! I may not have expressed myself correctly 😅 is there known...

Ah :
The "number of loops" in the message is an indicator of the optimization of your sheet. The less it is the better, more means the system needed to circle back to some formulas because everything was not computed in order. The base idea to reduce this is to avoid using computation results in other formulas (i.e. avoid computing a label, and using that label in another formula).
I have some ideas to optimize this, but it is not easy ^^"

The number of times the line triggers is due to foundry, and I don't know how to reduce it 🙂

fallen coral
brittle moth
pseudo quartz
#

Seem to have lost the interactible points for the blank Labels in the row between Race and Hair... any ideas how to get them back?

marble mural
#

I'm very confused. Trying to set up a equip/unequip option on an equipped items panel and a carried items panel (and keep talents and such from showing up in a general carried items panel). I am having a hard time setting the filters on the specific containers. Found a reddit post, but the UI for specific item filters/operators has changed. How do I enter them now?

#

In other words how do I enter an Item Filter Formula with a Field Key, Operator, and Filter Value?

formal goblet
marble mural
#

Oh it's that simple? Thanks.

#

Is there a way to set a false entry, so the checkbox in the item can be for equipped?

#

Sorry I'm not really a coder, and I'm new to all this.

marble mural
#

Awesome! Thank you so much, I think I've figured it out!

#

And...well, one more question. How do I use the not(item.equpped) with multiple things, like not(item.armorequip) not(item.weaponequp) not(item.talent) etc.

marble mural
#

I have tried and and or and neither seem to work with a list of filters.

#

Nevermind I think I've figured it out.

fallen coral
wise sail
#

Hey there. I've been looking for a way to build a custom sheet and stumbled upon this system. I basically need a sheet with a meter/clock/bar/whatever you may call it that can only be increased/decreased by the player via buttons (+1/-1 for instance) and every change gets logged in the game chat (not the total, just the change. Like "player X has increased Stat Y by 1"). Is there a way to do something like that with this system or should I look elsewhere?

formal goblet
wise sail
#

That's fine. As long as it's doable. I'll try to figure it out or GPT my way through it. Thanks!

formal goblet
wise sail
timid marten
#

I have this to do "+1" of quantity when I click inside an item's quantity in an item displayer, but could I make it a popup to enter a value and this would replace the value?

+${item.name}$${setPropertyInEntity('item', 'Quantity', "item.Quantity + 1")}$

I would need a "when click => popup => enter value => replace previous value with entered value"

zinc verge
#

hey what's the function that replaced fetchFromDynamicTable?

zinc verge
#

bet ty

timid marten
#

another question, this is set as GM only, why is my player able to see the component's name?

#

they can't see the value ofc, but I don't want them to see the title either

formal goblet
#

These are 2 different things

timid marten
#

is there a way to hide this?

formal goblet
#

Nope

timid marten
#

😭

formal goblet
#

It's simply not implemented 😅

timid marten
#

it's quite bothersome tho, if I wanna hide a value named "rarity" for an item and only let a player that has crafting skills see it, everyone will see the "rarity" empty tab :(

zinc verge
#

I think I need some help

I just updated my CSB and I'm trying to translate my old fetchFromDynamicTable formulas to lookup, and from what I'm seeing on the gitlab it looks like the formulas should function pretty much the same as they used to, but I'm still getting errors

current formula ${lookup('ARCANA_table','ARCANA_combat','ARCANA_name',ARCANA)}$
the attached image is the ARCANA_table, and directly above said table is a dropdown menu keyed ARCANA

#

this formula did work once upon a time, and all I've changed about it since updating is the function name itself

formal goblet
zinc verge
#

it literally just says error in all caps on the actor sheet. Or are you asking about the console?

formal goblet
#

Yeah, console

zinc verge
#

one sec

formal goblet
#

Because only the console contains the explanation

zinc verge
#

I'm actually not seeing an error related to this in my console

timid marten
#

that's just extra work to make everything at its correct place

#

welp

#

not a solution

#

because it hides the data that's already hidden

#

not the row title

#

💀

zinc verge
#

yeah I'm at a loss here. I can't figure out what isn't working. Triple-checked all the spelling and I'm not seeing a console error

#

huh, I may have found the problem. I deleted the label component that was using the lookup function altogether and when I updated the actor sheet, the slot where that component was was still there and still said error. Might have a corrupted actor

#

yep that was the problem

timid marten
#

How can I check a user's role? Like for example :

if (player_role == "Trusted_user") { return 0; } else return 1;

formal goblet
timid marten
#

${game.user.role >= CONST.USER_ROLES.TRUSTED ? item.rarity_choice : '???'}$

I tried this and it sent errors everywhere

formal goblet
#

Because that's Javascript, CSB Formulas don't know anything about roles

timid marten
#

then should it be like this?

${%{game.user.role >= CONST.USER_ROLES.TRUSTED}% ? item.rarity_choice : '???'}$

formal goblet
timid marten
#

the return is at the end tho

formal goblet
#

The return of the script

#

Otherwise it's always undefined

timid marten
#

I tried to apply a css in prefix for specific roles, but it returns an error :(

${%{game.user.role >= CONST.USER_ROLES.USER}% ? <div style="font-size:1em";> : <div style="font-size:0.7em";>}$<div style="margin-top:-10px";><div style="margin-left:-10px";>

formal goblet
#

That one %{game.user.role >= CONST.USER_ROLES.USER}% still doesn't return anything. It is as effective as this function here:

sum(a, b) {
  a + b;
}

const result = sum(3, 7) // returns undefined

What you actually want:

sum(a, b) {
  return a + b;
}

const result = sum(3, 7) // returns 10
timid marten
#

${%{game.user.role >= CONST.USER_ROLES.USER {return true;} else return false;}% ? <div style="font-size:1em";> : <div style="font-size:0.7em";>}$<div style="margin-top:-10px";><div style="margin-left:-10px";>

zinc verge
#

with Active Effect Displayers, when I put in the attribute key, that can just be the key to a label I'm using to display a stat score, yeah? and then the effect value should apply to that label automatically?

timid marten
#

like this?

formal goblet
timid marten
#

${%{if (game.user.role >= CONST.USER_ROLES.USER) {return true;} else return false;}% ? <div style="font-size:1em";> : <div style="font-size:0.7em";>}$<div style="margin-top:-10px";><div style="margin-left:-10px";> *

#

corrected

formal goblet
timid marten
#

oh

formal goblet
#

Comparison operators already return a boolean

zinc verge
formal goblet
timid marten
#

sadly, this works:
${%{return game.user.role >= CONST.USER_ROLES.TRUSTED}% ? item.rarity_choice : '???'}$

but this doesn't work:
${%{return game.user.role >= CONST.USER_ROLES.TRUSTED}% ? <div style="font-size:0.7em";> : <div style="font-size:1em";>}$ <div style="margin-top:-10px";><div style="margin-left:-10px";>

fallen coral
#

Let's say I have a dropdown menu with it's name in the label. Would it be possible to determine the space between those elements of the dropdown menu?

hardy fern
#

Hello, is there any way to clone objects within the sheet template?

molten pollen
#

hold ctrl

#

and drag the element

hardy fern
#

Thank you so very much.

#

In the mean time I managed to get stuck on trying to make a roll under formula.
My goal is to make a 1d100 roll + a modifier and check if it's lower or equal than a value or not and based on that write out that the roll succeeded or failed but so far no way I tried worked.

willow birch
#

Okay why do I get "undefined" from this?
${string(item.id)}$
This one works fine but I am unable to get the items id into text 🙃
${item.name}$

willow birch
#

(Doing this to get Automated Animations working btw, they activate on the items id in a chat message)

bright pond
#

quick question but does anyone know what the %{}% equivalent of ${setPropertyInEntity()}$ is?

formal goblet
formal goblet
formal goblet
bright pond
#

Followup question, whats the equivalent ref for ${item.key}$ when using %{}% in an itemdisplay?

willow birch
#

I am unsure how an item can have an id but it not being a part of said item but that works. Thank you!

formal goblet
willow birch
#

I'm assuming that's CSB specific and not a part of standard foundry, or?

bright pond
#

Might be a silly question but is there a method similar to update which is a getter that uses a string id? I ask because I am using a bunch of props that follow the same pattern [stat_name]_exp. My solution rn is to used a bunch of parallel arrays but id really like to do something along the lines of
key = "system.props.".concat(stats[i], "_exp) entity.entity.get(key)
instead of this horrendous

hardy fern
formal goblet
hardy fern
#

Then I have absolutely no idea what was different because I think it was identical... Maybe there was a typo I'm too clueless to notice. 🤔

bright pond
formal goblet
bright pond
#

is this the correct usage of this? Im getting NaN now where I was getting the proper result with eval()

#

same with this

hardy fern
#

Is there some way how it would be possible to use the same roll multiple times in the output? If I just input the roll again in the second spot it simply rolls again and gives a different result.

bright pond
hardy fern
bright pond
#

f12 -> console

#

dont worry i didnt know this for the longest time either. it was a nightmare

hardy fern
bright pond
#

Im so confused. I have the following code inside a %{}% to start replenish actor's resources when the hooks fail. However, Im getting this error. Does the return value have to be a string or something? Why is it trying to cast my return as a number?

#

I have other buttons that return strings and they work perfectly fine

bright pond
formal goblet
hardy fern
bright pond
#

Oohhh yeah that'll do it

#

uh

#

same issue

hardy fern
#

Just to quickly bugtest remove 's from both sides and see if it works.

bright pond
#

yeah it does

formal goblet
#

You escaped it in JS, but not in the final output 😅

bright pond
#

ohhh its being double interpreted

#

IC

hardy fern
bright pond
#

just \\\'

#

lmfao

formal goblet
#

\\' should be enough

#

Because we only need to escape the backslash

bright pond
#

i had to escape those \ in order to type it🤦‍♂️

bright pond
#

theres no actual issue with the ' in the js

#

@formal goblet Any idea why this doesnt work? The foundryvtt api doc is pretty barren, and either of these 2 feel like the correct use case - neither of them work (both return NaN)

#

Asking in the system-dev chat as well

formal goblet
#

I don't see an issue there aswell

wooden pond
#

I probably have another simlpe thing, but I can't quite figure it out.

I have an itemDisplayer set up. I have a list of Keywords that exist as a Text Field .

When I try to pull from the text field to slap it into the table, I only get ERROR in the display, though.

The item text field is keyed as weapon_keys_list

The itemDisplayer column draws data from it:
${item.weapon_keys_list}$

I literally draw another key in the next column with exactly the same code but somehow it does not like the keys list 😦

Anyone got a clue?

bright pond
#

is it blank?

wooden pond
#

At least one entry being referenced has content in it.

formal goblet
#

Do the keys match exactly (no typos)?

wooden pond
#

I copied it over, but lemme try again to be sure

#

I have no idea how or why but it seems to work now 👀

#

I copied it over before and all. Checked four times to be safe. 🤦‍♂️

hardy fern
#

How can I suppress formulas so that they give no output?
I want to make the roll and put it in a variable which I can show later without the original roll output being shown.

formal goblet
#

${#roll:= [1d100]}$

hardy fern
formal goblet
hardy fern
#

My settings?

formal goblet
#

Yeah, you can show hidden messages as GM

hardy fern
hardy fern
#

I don't know if it's a bug but it seems that if your original formula contains the character < and you turn on Rich text editor that character will be changed to < which breaks the formula.

formal goblet
#

Because the RTE works with HTML and < is a html-specialchar, so it has to escape that

hardy fern
#

Alright, glad that it's known to everyone and me too now. 😅

formal goblet
#

That's one of the edge-cases without a real solution

hardy fern
violet orchid
#

What is the correct approach to packaging CSB templates and Actors/Items based on those templates into a module compendium?
I noticed that when exporting templates as json, some properties are not saved: filters on item displayers, sheet display.
When importing an item based on a template from a compendium I must first reselect the correct template after importing for it to work properly.
Is CSB only meant to be setup on one world? I would like to create a module that contains all information relevant for my custom system in the module's compendium and import it on module load into a new world with CSB.
This seems like a thing someone may have already done (some script maybe?)

shell ferry
#

Hi all, anyone know how I can make initiative query the player rolling it for what die they want to use? Kind of like in hackmaster where different initiative die are used. Giving them the option to choose between a number of die, then roll that with their initiative modifier added on?

timid marten
timid marten
formal goblet
#

Can you replace the script with a boolean for testing?

timid marten
#

I just fixed it by doing the condition inside a hidden label and using this label inside the div

#

<div style="font-size:${finitionaspect}$em";><div style="margin-top:-10px";><div style="margin-left:-10px";>

and then the label is set at the bottom, hidden as gm only:
${%{return game.user.role >= CONST.USER_ROLES.TRUSTED}% ? '0.7' : '1'}$

formal goblet
# violet orchid What is the correct approach to packaging CSB templates and Actors/Items based o...

I can give a few advices:

  • Separate Templates from concrete entities. I've packed Templates into an Adventure pack, containing 2 packs (Actor Templates and Item Templates). The import order should be ItemTemplates > ActorTemplates
  • All concrete entities are packed into their corresponding pack (Actors to Actor-packs and Items to Item-packs)

With this strategy, I didn't have any issues with imports into new worlds.

zinc verge
#

Just curious, like a year ago I remember there being a feature poll where being able to put items inside of other items scored pretty highly. Is that still on the docket for development or is that feature no longer in the works?

zinc verge
#

pogging right now

timid marten
#

Is there any way to make an actor sheet non unique? Like for example have three "Chest" actor in the scene, with three different tokens, each opening a different version of the original "Chest" actor sheet, just like items do

fallen coral
#

I'm missing something here and I simply cannot identify it 😩 . This script returns 20-1 instead of 19 which breaks the numeric field of the item (NaN). I need help to correct this please:

%{ const itemID = '${sameRow('id')}$'; const item = entity.items.find(item => item.id === itemID); const value = Number('${sinal_proj}$'); if (item) { item.system.props.item_qtd += value; await item.update({ 'system.props.item_qtd': item.system.props.item_qtd}); } else { console.log('Item not found'); } return item?.system.props.item_qtd ?? ''; }%
Context: This is being triggered as label roll from an Item Displayer

formal goblet
formal goblet
fallen coral
fallen coral
#

${check_proj_gasta ? 1 : -1}$

formal goblet
#

So value is either 1 or -1

fallen coral
#

Yes, at least for now

formal goblet
#

Make sure to cast item_qtd to a number aswell

magic flax
#

Hey Everyone, small question about Custom System builder: does anyone know how to make sure that my item displayers don't all display the same thing? As in I have 10 item displayers and when I put a test item in 1, all of them are displaying it and when I romove it from one, it gets removed from all of them as if they're the same displayer

formal goblet
magic flax
formal goblet
#

You can begin by checking the Template Filters, so only Items of the corresponding templates will be shown. The formula below is an additional option to finetune your predicate

magic flax
#

I'll show what I mean:
I have my own ttrpg that I'm gonna test. It has different level point actions, so what I want to do is to add different actions to each item displayer. Sadly enough, when I add it, they all show up. Same with deleting. Is there something specific I can do or do I need to make a template for each and every type of point action?

formal goblet
magic flax
#

Is it possible to make something that players can mark like favorite so it shows up in a different item displayer?

fallen coral
formal goblet
fallen coral
#

is it possible to access every prop using this? const item = linkedEntity.system.props would work to target every other prop if I need?

formal goblet
hardy fern
#

Is it somehow possible for a formula to adjust values within the character sheet? For example when I make a roll if the roll is bigger than some value I would add +1 to a number field?

formal goblet
hardy fern
#

That was easier than I expected. 😅

#

Now while I'm here I started thinking ahead a bit:
I'm planning on making several tables worth of skills with 4 collumns for each skill (Roll button, Name, Value, Checkbox)
I am currently intending to just manually fill out all of the fields with the appropriate names and everything but is there a smarter way which might allow me to for example copy the roll button and it would automatically check the appropriate row it's in (The one where the roll button was pressed) and then just digs out the information it needs from there? (To avoid having to do it all manually with explicit names and codes and everything.)

This is somewhat also touching on relative table navigation because with the checkbox collumn, that's intended to be a learning checkmark similar to games like Call of Cthulhu, where if you fail a skill, you may attempt to train it after the session to increase the value.. Since I would like to have a single button to trigger all checkboxed entities and run them through an automated leveling up script, which direction should I look for this kind of data management if it's possible?

formal goblet
hardy fern
#

At least I THINK that means it's not a dynamic table.

formal goblet
#

You can setup predefined rows and block adding/deleting for players

hardy fern
#

Is there a benefit to using Dynamic Tables here because the list I'm imagining is not intended to be changed. Just the value of the third collumn for each skill. 🤔

formal goblet
hardy fern
#

Hmmm... Ok that does sound useful but if all formulas are defined only once per column I need to add an extra column there. 🤔 You convinced me, I'll look into it. Thank you!

timid marten
fallen coral
#

or maybe .sheet-tabs a:hover {}

#

Those are the only two I've used so far, to avoid messing with the control panel

worthy bolt
#

is there any "If" check?

Like Google Spreadsheet:
IF(blablabla;1;1)

#

Also, is there any way to "ctrl + c" "ctrl + v" to quick paste same elements?

#

i need to fill all those.

bright pond
#

the best way i found is to make a subtemplate, put it in there and then move from subtemplate into template

#

Quick question for anyone who knows how to use the additional CSS styling / any front end devs. How do I add a simple border to panel? I thought it would be something like this but I legit have 0 clue in this regard

formal goblet
worthy bolt
#

Is there anyway to change the Resource Bar icon? like adding an shield icon for a Armor Class bar and etc?

willow birch
#

I am so close to finishing my project, all I now need is Jb2a.
I am able to activate the animations by adding their ID manually like this:
<div data-item-id="wxfmcsewxxBgWeix"> </div>
However, all my attempts to automate the recognition has failed like this:
<div data-item-id=${string(sameRow('id'))}$> </div>
printing:
wxfmcsewxxBgWeix> to chat

Any idea how I could add the value into the div? Wether direct or indirect

formal goblet
willow birch
#

Also, thank you so much 💜

worthy bolt
#

Is there any way to check variables?
like in this test, i want to my Total skillcheck changes the totalvalue based on the atribute i change

#

So if its "Força" (STR) it will calculate with the strmod

#

so if its "Destreza" (DEX) it will calculate with the dexmod (atribute modifier key)

formal goblet
worthy bolt
#

kinda confusing for me but i am gonna try it there

formal goblet
worthy bolt
formal goblet
#

Why the prefix with mod?

worthy bolt
#

to identify as modifier

formal goblet
#

And the target components are strmod, dexmod, etc...?

worthy bolt
#

yep

formal goblet
#

You have modfor and strmod? 😅

worthy bolt
#

both needs to be the same?

formal goblet
#

It would make everything easier, because you would be able to do ref(dropdownKey)

#

Otherwise you'll need additional mapping-rules

worthy bolt
#

this question might be dumb, does the command goes on label?

formal goblet
worthy bolt
#

ok

chilly fractal
#

Hello, good evening!

Is it possible to create an itemDisplayer and leave it with the option for players to register their own items directly on the form?

If not, I have to leave all types of items pre-created.

formal goblet
bright berry
#

Absolutely apropos of nothing: I recently found a group of players interested in playing Ryuutama. The game seems seriously unrepresented in terms of Foundry, so I went and threw together a super basic character sheet for it. I more or less just copied the sheet in the book, there's no automation at all, it's all just text entry. But, now it exists, so if anyone else also randomly wants to play Ryuutama using Foundry... Here you go

#

I'm def going to tinker with it until the game starts, so... Yeah

#

Once I figure out how to do formulas in the V12 update

#

My very fancy Break!! sheet's (made in V11) automation is completely broken ><

sinful spade
#

Can i use a label button to modify the value of other labels?

E.g. make a rest button that increases HP by 5, or a level up button that increases your level by 1

#

I have this currently, and it's just spitting out the new value to the chat or if send to chat is disabled it does nothing - no errors:

${xpValue>=requiredXP ? (milestoneValue>=requiredMilestones ? setPropertyInEntity('self', levelValue, levelValue+1) : notify('info', 'You Do Not Have Enough Milestones')) : notify('info', 'You Do Not Have Enough XP')}$

formal goblet
fallen coral
#

What is the component ActiveEffectsContainer? I could not find its documentation.

formal goblet
raven tree
#

If I want to pass a skill value to a macro for it to use a Target Number would the following allow me to do so

${# %{return await game.macros.getName('COPS Roller6').execute({ skillPath: "system.props.Melee_Score" });}%}$
%{throw "Done";}%

I am getting an uncaught promise error and the TN is not updating (everything else works)

wooden pond
#

If there a way to implement an easy if/else within the system formulas?

wooden pond
#

Thanks! Hadnt found that one, my bad! 🙂

formal goblet
wooden pond
#

While you are looking in here, I got another quick question since I am not quite understanding it.

#

If I have a dropdown list, how do I look up which is the currently selected one?

#

Like... I need to reference a key based on which is selected but I can't seem to figure out how to get the data

formal goblet
wooden pond
#

This is the dropdown - not sure what you mean with matching the component keys? 😬

formal goblet
#

What do you wan to do, if e.g. type_static is selected?

wooden pond
#

Concrete example of what I want to do:

A weapon has a specific key that does less damage if the target has type_hv_vehicle

#

So I need to query what type is currently selected and return that, so I can then use the ternary operator you just linked me to set the yes/no on whether I have to change the attack formula

formal goblet
wooden pond
#

So fetchFromActor('unit_type') will return, say, type_hv_vehicle ?

formal goblet
#

Yeah

wooden pond
#

Okay, thanks you kindly. I think I can work with that, then! 🙂

#

🫡

#

You're a gem

sinful spade
formal goblet
#

So yeah, store it in an Input Component

chilly fractal
#

Guys, how do I create a dynamic table with a roll to chat button and use a value from the table itself in that button?

sinful spade
#

alright, i'll hide a number field and have it displayed in the label :I

fallen coral
#

Is it possible to prohibit players from edit text fields in items added to their sheet? If not, is there an alternative to solve that problem, like changing the permission to observer for items added to owned sheet or something similar?

formal goblet
formal goblet
fallen coral
formal goblet
fallen coral
#

Let's consider another approach, a dynamic table that has @uuid[item] in a rich text input column

#

Is it possible (how) to reference that item if that's the only thing written in that column-cell?

formal goblet
fallen coral
#

How complex would that be?

fallen coral
#

Too bad I probably lack fundamental knowledge to deal with that... Got myself in an endless loop trying to await a synchronous function 😮‍💨 geez

#

The amount of issues surging from that wth

storm stream
#

hey, folks! how do I change font for header type text labels?

storm stream
#

is it me or number field can't handle negatives?

#

everytime I hover the mouse it duplicates the current value

formal goblet
storm stream
#

oh

#

ok, thank you!

#

there is no easier way to create sheets on csb is there? like a graphical-based interface?

#

even duplicating items would work for me 😄

formal goblet
formal goblet
storm stream
#

NO WAY

#

Thank you so much 😄

storm stream
#

WHat is the recommended way to create ininventory element for players who'll write items manually?

#

like

#

i don't have an items list

#

this is my current solution

#

I guess it does it

sinful spade
#

i've been tweaking the formula but i'm getting errors.
I've changed levelValue to a number field, and here's the adjusted code:
${xpValue >= requiredXP ? (levelValue == (ceil(ref('levelValue')/5)*5) ? (milestoneValue >= requiredMilestones ? notify('info', 'Congratulations! You have leveled up.') setPropertyInEntity('self', levelValue, levelValue + 1) : notify('info', 'You do not have enough Milestones to level at this time.')) : notify('info', 'Congratulations! You have leveled up.') setPropertyInEntity('self', levelValue, levelValue + 1)) : notify('info', 'You do not have enough XP to level at this time.')}$
Yet, I get errors to do with converting levelValue and 'Congratulations! You have leveled up.' to numbers regardless of how I place the 's.
I think maybe it's another error not showing in console but have no idea how to trace that

formal goblet
#

The only things allowed if you have 2 values x and v:

  • Function arguments: sum(x, y)
  • Operands x + y

This here x y doesn't specify, what you want to do with these 2 values.

somber gull
#

Hi there ! I'm beginning with the system and trying to add attack rolls to my character sheet 🙂
I'm actually struggling to get the roll to be made against the target's evasion. I got my roll up to something like that:
${[1d20+${rollModifier}$]}$

However, as soon as I try to add a cs clause to the roll, it stops working. I've tried something like this:
${[1d20+${rollModifier}$cs>=${targetEvasion}$]}$ but then my roll doesn't work anymore.

Any idea on what I'm doing wrong there ? 😅

somber gull
#

I got an idea of why it doesn't work. The formula 1d20+2cs>=10 actually doesn't work in foundry, as it considers that the cs command is part of the modifier, so it doesn't recognize it...
If I find a way around it, I'll keep you guys posted 🙂

muted fulcrum
#

Is there a way to update the current selection of a drop down? When setting the key using setPropertyInEntity, it doesn't seem to update properly on the sheet, showing the first option selected instead of the updated key being selected.

formal goblet
#

Besides that, it should work

muted fulcrum
#

Ah, well I'm using numeric options keys. An easy change! Thanks!

rocky sable
#

Is it possible to change the name of an actor using setPropertyInEntity (or any other way)?

formal goblet
muted fulcrum
# formal goblet Only works with non-numeric option keys

I actually get an "UncomputableToken" error when I try to set the dropdown key with setPropertyInEntity with the formula being non-numeric.

${setPropertyInEntity('self', 'colorDropdown', 'green')}$
results in
Uncaught (in promise) Error: Uncomputable token "green"

#

whereas something like

${setPropertyInEntity('self', 'colorDropdown', 3)}$

Works in that the property gets updated but doesn't update the dropdown selection and upon closing the sheet the value is reverted to whatever the first key is.

rocky sable
hardy fern
#

Do I understand it correctly that a regular table can't be searched through by rows/collumns, only Dynamic Tables?
Apart from that it seems that a Label in a Dynamic table can't really be edited in any way. Just says "Label" there.

formal goblet
formal goblet
hardy fern
#

Damn... Guess I'll have to stick to doing stuff manually via a regular table.

muted fulcrum
hardy fern
#

Is it somehow possible to make a success/failure roll condition where Success would be green and Failure would be red?
I currently have:
<h1 style="text-align: center;"><strong>${ myRoll <= Punching_Value ? 'Success' : 'Failure' }$</strong></h1>
which works correctly and everything, but is without color. Since chat is HTML I got a red failure HTML code:
<p><strong><span style="color: #ff0000;">Failure</span></strong></p>
However every time I plop it in place of 'Failure' I always get an error which just says Value expected and I don't really understand (Screenshot)
I even tried putting in the colored Failure with just the span and span end and it still didn't work but when I plopped it into Foundry chat, it displays a nice red Failure just how I wanted.

formal goblet
#

The blank HTML shouldn't fail whatsoever

hardy fern
#

I'm supposed to put ! just after ${? Or do I need to put it before the second snippet I posted or somewhere else entirely?

sinful spade
#

and if I delete the notify function within that statement so it only notifies you on failure;
then it stops generating errors but also doesn't do anything.

sinful spade
#

Okay, I managed to sort the version without the notification - i needed to use the ref function to avoid recursion.

sinful spade
#

weridly enough just adding a null if condition worked.

knotty mango
#

Does anyone know how I can change the name and status icons?

dense pine
formal goblet
oblique gyro
#

If I want to print different results when a player rolls for if they rolled a 1-6, 7-9, or 10-12 on a 2d6 roll, how would I go about that? I tried the following code but clearly I just don't know how to do or conditions in if statements in this language that aren't just two options.
Here's the code I tried: Accuracy: ${accRoll <=6 ? 'Failure!' : accRoll >6 || accRoll <=9 ? 'Mixed Success!' : accRoll >9 ? 'Complete Success!'}$

#

Never mind, fixed it myself with this: Accuracy: ${accRoll > 9 ? 'Complete Success!' : accRoll < 7 ? 'Failure!' : 'Mixed Success!'}$

lunar dagger
# formal goblet CTRL + Drag lets you copy Components

On Mac it doesn't seem to work for me either using CMD drag or CTRL drag. With CMD drag, I see the drag outline but when I release nothing is copied.

Foundry Virtual Tabletop: Version 12 Stable, 12.331
Game System: custom-system-builder, 4.2.0
OS: macOS 15.1.1 arm (64-bit)
Client: Brave/131.0.0.0

oblique gyro
hardy fern
# formal goblet `${!...}$`

That's the first thing I originally did when you replied and after I looked into documentation but it seems to give the same error.

formal goblet
hardy fern
hardy fern
#

Yeah, posting that in chat does post Failure in nice bold red. But I wanted it to do that when the roll said failure. I plopped the entirety of this bit into the first one instead of 'Failure' and got:
<h1 style="text-align: center;"><strong>${ myRoll <= Punching_Value ? 'Success' : <p><strong><span style="color: #ff0000;">Failure</span></strong></p> }$</strong></h1>
This didn't work even if I added the ! in front of myRoll.

formal goblet
formal goblet
hardy fern
frank gazelle
#

Is there any way to have input requested only when a certain value is met. The way that i am doing it currently seems to just display the input request any time the value is updated.

#

${attrDamageCurrent == attrDamageMax ? ?#{_damage_threshold} : 0}$

covert linden
#

Hello, hello!

This one's- probably simple, I think. Apologies that I can't really provide much ground to work off of, I'm pretty new to this stuff.

I'm attempting to do a sort of thing wherein items in a player character's inventory can be accessed, used, and then automatically removed from the inventory upon use, and I'm missing some key understandings on how to do this- I'm not even sure how to run macros from an item, nor if that's possible or needed.

Something ala Pokemon-ish, like:

Player opens their sheet
Clicks into item Potion in their inventory
Preferably, uses it through a simple method like a button (Unfortunately, I don't trust my friends to comprehend much beyond clicking on a big red button, lmao)
Button runs macro to simulate effect of item (etc, updating the currenthp value of the current token by adding 20 and sends flavor text to chat)
Macro then removes item from inventory

Is there any advice I could get on making this possible?

tardy rain
#

I've recently transferred a world to a new computer
and mostly things work but
any time I try to place a token I get thrown this expeption

#

which is a problem
these are the modules i'm using

#

not sure if i've tried turning off all of the ones with compatability risks and seeing what happens but it doesn't fix anything

#

i'm not certain weather or not this is a custom system builder issue but

sturdy mesa
#

Is there any way to display an item displayer in a horizontal format? The items are currently represented in a list that goes down indefinitely. However, I would like to present them as if they were in a grid table, with one item next to the other.

The way the items are currently displayed in the item container, depending on the inventory, it becomes very large, and players have to scroll down a lot.

So, is there any way to display an item container in a table/grid format?

void locust
#

So I accidentally messed up and deleted a hidden attribute

#

and I have no idea what it had but it completely destroyed everything

#

is there a way to undo that?

#

the undo feature just alters changes to the visible stuff

formal goblet
formal goblet
# covert linden Hello, hello! This one's- probably simple, I think. Apologies that I can't real...

You'll probably want a Rich Text Area, which contains the Label Roll Message for each individual Item.

In the Label of the Item, you want to run this Script here:

const phrase = await ComputablePhrase.computeMessage(entity.system.props.textAreaKey, entity.system.props, {triggerEntity: entity});

const speaker = ChatMessage.getSpeaker({
  actor: entity.entity,
  token: entity.entity.getActiveTokens()?.[0]?.document ?? null,
  scene: game.scenes.current
});

phrase.postMessage({speaker});
return '';
formal goblet
vagrant hollow
pseudo quartz
#

In the Example actor sheet of the CSB Example module, how is the total armor values being added when the only label formulas seem to be ${round(Armor_Protection_Standard/6)}$?

formal goblet
pseudo quartz
#

Thank you!

formal goblet
void locust
#

That is unfortunate, alas, I did manage to fix it

#

I just kind of reverse engineer what I did

marble mural
#

Sorry to bother folks but I'm just not getting Item Modifiers. I'm trying to give a weapon a bonus to it's attack value calculated in a label on the same row of the item displayer (which is tied to a roll button on the item displayer) but apparently that doesn't work?

formal goblet
marble mural
#

Oh, yeah, I guess I could just mod the item. I was thinking along the lines of adding an attachment to an item (a scope on a crossbow), but I can just give the 'scoped crossbow' a bonus. I'll add a GM visible only option to add attachments, that should work.

frank gazelle
#

Do user input dialogs not update base or am I missing something? I have a label that should display the total points selected but the value stays 0 and never updates.

formal goblet
#

And they don't update on change, yeah

frank gazelle
#

Ah Damn, alright thanks

frank gazelle
#

Is there a way to add a new row to a dynamic table via script, cant find any reference to it in the documentation?

formal goblet
# frank gazelle Is there a way to add a new row to a dynamic table via script, cant find any ref...

https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/src/module/sheets/components/DynamicTable.ts?ref_type=heads#L488

let tableProps = foundry.utils.getProperty(entity.system.props, this.key) ?? {};

if (Object.keys(tableProps).length) {
  const newIdx = Math.max(...Object.keys(tableProps).map((key) => Number(key))) + 1;
  tableProps[newIdx] = { ...sampleNewRow };
} else {
  tableProps = {
    0: { ...sampleNewRow }
  };
}

foundry.utils.setProperty(entity.system.props, this.key, tableProps);

await entity.entity.update({
  system: {
    props: entity.system.props
  }
});
faint wharf
#

hi after update this formula started generating me errors. anyone know why? and(equalText(item.typ,'Ubiór'),item.EQ)
its formula for item visibility on list

faint wharf
#

it works correctly but i have this error message in logs

formal goblet
faint wharf
#

how? i dont understand

formal goblet
golden coral
#

Hello. I need to do a system but I have few questions about this builder

  1. can it add auto damage or auto healing for tokens while rolling?
  2. can it count amount of items in inventory/other types of tablets?
  3. can it change one list property's value automatically when another one's is changed?
  4. can I create items which are affect character's stats in it?
  5. can I add min 0 value or remove it from list property so it can get -5 -10 and lower?
#

Ah. One important too. Is it nessesary know programming for working here and do all that algorithms and scripts sh*t?

formal goblet
# golden coral Hello. I need to do a system but I have few questions about this builder 1) can ...
  1. Self-Healing is fine. But If your players want to change stats of a Token they don't own, they'll run into permission-issues, because they are simply not allowed to do that. So you have to handle that via a Script, which passes a request to the GM
  2. Yeah, that one is easy with count(lookup())
  3. Yeah, the Formula system allows that
  4. Yeah, Item Modifiers can do that (and also Active Effects)
  5. Can you rephrase that question? I didn't understand that point

It depends on how complex your calculations should be, but you'll need to learn some basic concepts of programming (like Variables, Operators, Functions and Types). Just go through this Wiki page: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Formula-System

golden coral
formal goblet
fallen coral
#

I'm failing miserably trying to accomplish a very simple thing which is to increase a roll's (from a label roll formula, with !) font size. How can I do it?
This isn't working:
Resultado: <span style=\"font-weight: bold;font-size: 26px;\">${!roll}$</span>

#

For reasons unknow I wrote \ twice omg

marble mural
#

Can anyone help me with why this isn't working?

<p style="text-align: center;font-size: 24px"><strong>Administer</strong> ${[2d6]+admin+(admin==0?'-1':admin)+(att)}$</p>```
fallen coral
marble mural
#

That's a fair point. So it is a skill check roll button, where you get to select your attribute modifier depending on situation rather than it being static, so I want a simple dialog to pick modifier (which is working in the above formula) and then for the dice roll (the second part) to add the modifier to the roll.

#

From what I am reading this should(could?) work, as the label "att" should be returning "strmod" or other based on choice, which is a key on the player sheet.

formal goblet
marble mural
#

Amazing thank you!

fallen coral
shy osprey
#

I would like to create either a sliding counter or a checkbox "track" of 10 boxes that could be ticked from both ends.
The idea is to create a "stamina" bar, lets say from 0-10 where a starting character has around 4 points that he can use to boost actions.
Now the trick is that when he gets fatigued, the same track gets "eaten" from the right side, meaning his maximum possible stamina gets lower and lower until it is zero.
Is there any way to model this or should I just stick with 2 attributes and explain the mechanic to players?

formal goblet
white hatch
#

Devs.
I know that chances are probably 0, but would be nice if CSB could have Russian language translation. It would help a lot to navigate nicely through basic stuff for better own system creation. For me, for example, its not like impossible wall. But it whats stop me from trying this system more freely.

formal goblet
white hatch
timid marten
#

This line returns an error inside an item sheet:
${(Weight + sum(lookup('test', 'weightfield'))) * poids_variante}$

  • Weight is a label set on the sheet, works perfectly
  • poids_variante is a hidden attribute on the sheet, works perfectly

According to the console, the error originates from the lookup method, so the weightfield data

The ERROR:
Logger.js:33 Custom System Builder | Uncomputable token "lookup('test', 'weightfield', null, null, '===')" Error: Uncomputable token "lookup('test', 'weightfield', null, null, '===')"

Thing is, the dynamic table this line pulls from is perfectly set:

#

(on the real sheet, it looks like that)

#

And here is the number it's supposed to get from the actor sheet called "Sac d'écolier"

#

As we can see, the "weightfield" returns blank on the dynamic table

Any idea why?

#

Here's the weightfield:

#

${fetchFromActor(sameRow('namefield'),'KG_fixed')}$

#

And here's "KG_fixed" on the actor sheet:
${round(round(KGBP *10) /10)*0.4}$

formal goblet
formal goblet
timid marten
#

should I replace "fetchfromactor" with lookup?

white hatch
formal goblet
#

Try it out with a static name in the function

timid marten
#

I'll try

#

Still returns the same error and the result is blank

#

if I do anything else than this actor it returns an error on the line, so it reads the actor

#

but instead of returning the value (0), it returns a blank

#

and the reason is the error

#

🤔

timid marten
#

Any ideas why?

timid marten
#

Fixed it, the label was not set correctly on the actor sheet

#

👍

marble mural
#

So before I go beating my head against the wall, is there an easy way (just with the base functionality, I'm not ready to dive into css and scripts) for me to have a GM visible only checkbox on a character sheet that is toggled by the presence of an Item (a Feat say) in an Item Container?

#

If not I can just check it manually on the character's sheet of course.

fallen coral
#

Now if you really need it to be a checkbox, perhaps not... But I assume the "core" functionality can be achieved regardless

marble mural
# fallen coral yes it is, you use find() to check the name or id of the desired item and use it...

Yeah, I already know how to do this. Sadly I'm trying to target a checkbox in the sheet using an item on the table, as it seems like some of the lookups that I want to use only use the Dynamic Table and not the Item Container. Figuring out functionality between item in container and sheet as a whole is driving me a bit mad if I'm honest, and what's worst is I don't seem to be able to find answers or examples anywhere. Thank for the help though!

#

I can't seem to work out how to get math functions in the sheet as a whole to target specific entries in the item container. And I have no idea how to use Dynamic Tables.

storm stream
#

Hey y'all, how do I change label font?

foggy grotto
storm stream
#

is that possible?

storm stream
storm stream
#

on another question: in the system I got, there are status effects that are temporary and reduce stats sometimes

#

should I make them items? do i use the _weakness template if so?

storm stream
#

nvm! figured it oud 😄

storm stream
#

in a situation lik ethis, how do I make it so that the reult adds all dice and bonuses like

#

1d8+1d2+3

storm stream
#

hmmm

#

can't disable this

#

i I uncheck the option to let players add rolls, the + sign still remains

#

and I would like to remove the ability of players to delete rows too

fierce harbor
storm stream
#

Thank you!

#

Finally, when adding tokens to the initiative tracker, I don't know how it will let me choose the stats I want for hp and so on. I can't figure that out.

formal goblet
prisma anvil
#

Hey folks, I spent about an hour banging my head against a brick wall last night, and was hoping someone could help me- how do you call a value in radio button value?

Specifically, I have a radio button called "Analyse_radio", and when checked need it to call the value in "Analyse_Value", a Number Field. All I seem to get back is literally what's written in the radio value field, ie, the string of the formula.

It's possibly my test button is actually set up wrong, but assuming it isn't at the moment, what would you put in the formula box to call that value?

formal goblet
marble mural
fierce harbor
prisma anvil
#

Yes, sorry, I understand how to reference the group, but not how to reference a variable value in each individual button's value. For example, an attribute value on a character sheet.

Button A needs to read the value from Number box B. Roll message references Group C, checking which Button (A) is selected. I can't however get Button A to then report the associated value from Number Box B

Im using the Radio Button to allow a task roller to select which attribute is going to be rolled. But for that to work, it needs to read the character sheet value, and not just a static value in the template

formal goblet
fallen coral
#

Do we have while?🤔

formal goblet
fallen coral
#

Ok

#

Is it possible to achieve similar behavior setting a label as undefined on purpose until some condition is met?

fallen coral
#

Hm k

formal goblet
#

Scripts is the only way

fallen coral
#

That would work as expected even inside a label?

formal goblet
fallen coral
#

Wouldn't it mess with any sync/async promise or whatever and break the game would it?

formal goblet
fallen coral
#

🤔 what. That means I can't use it in a label without a key, is this correct?

#

Can't

fallen coral
#

The script with while

formal goblet
#

A while-loop is not a asynchronous operation, so you can use that without concerns

fallen coral
#

Oh k

formal goblet
fallen coral
#

Too much hassle to implement such functionality in formulas?

formal goblet
#

And we already have Scripts, so we can also cover advanced stuff for users, who know what they do (mostly)

prisma anvil
fallen coral
#

I'll leave this here in case anyone needs something similar, although this isn't anything too complex to achieve😅 :
%{
let base_exp = 110;
let cur_exp = ${exp_atual}$;
let level = 0;
while(true) {
if (cur_exp < base_exp){
break;
}
cur_exp -= base_exp;
base_exp *= 1.5;
level += 1;
}
return level;
}%
(Use this with caution, always make backups before creating scripts)
base_exp is the required experience to reach the first level, cur_exp is the actual experience number (mine is pointing to a label ${exp_atual}$) and level is the starting level (in case your game starts in level 1, simply replace the 0)

prisma anvil
formal goblet
# prisma anvil Honestly don't mean this to come off as patronising or anything, but I don't kno...

Ah, I've spotted a little bug in the code 😅 . But still, you want to make sure, that all values within the Radio Buttons within a single group stay distinct from each other at all times, which is not given for your case, if you use ${numberFieldKey}$ in the value-fields of your Radio Buttons.

That's why, use only static keys in the Value-fields (e.g. Analyse_Value) and use ref(radioButtonGroup) wherever you reference the Radio Button Group

worthy bolt
#

Is it possible for auto-hp roll?

So like, i select a class that have d10 hp per level and my character is lvl 3, is it possible for when i roll the d10 hp it insert at HP?

worthy bolt
#

this one?

formal goblet
elder raft
#

I'm sorry, I'm just now seeing the 4.2.0 patch notes and
Added function find(), which does the same as first(lookup(...))
???

Amazing! I know it's a tiny tiny change, but with how much I struggled to remember how many damn parenthesis to have using lookup, this will help me 🤣

#

But here's an odd question I think I know the answer too ("there's a way to use a script to do it")
Is there a way to collect inputs from multiple players when a player makes a roll?
For instance, player clicks roll, their user input dialogue pops up and they choose some options, then it pops up for the GM(s) for them to add some stuff (usually complications or whatever) THEN the roll executes with all the parameters?
With my system I don't really want it to go through automated status-checks of various things and would prefer the GM get their manual input each roll.

formal goblet
elder raft
#

Probably beyond my capabilities then, especially because I'm still a n00b with scripts, haha

worthy bolt
#

whats wrong with this?
I want to roll an dice with advantage

${conmod+(vantvida?[1d:dadovida:]:[2d:dadovida:])}$

#

checkbox to confirm advantage

formal goblet
worthy bolt
#

isnt it supposed to delete one dice?

#

since it gotta get the biggest dice value

somber gull
#

Hi there ! Is there any way to use @{actor|property} calls inside a ${}$ formula ? I'd like to compare a roll result to a value on the current player's target, but I get syntax errors every time... :/

prisma anvil
marble mural
#

Okay so here we go, I'm trying to use the following formula
${lookup('edges','name')='On Target'?18/2:str/2}$
to check an item container (edges) for an Edge named On Target, which if true will use 18/2 as a value rather than str/2. What am I doing wrong? How do I target the name column of the item container, and how di I identify the name of the item?

#

As added info, thie item container is in a different tabbed panel than the place I am trying to use this formula, if that matters.

formal goblet
formal goblet
formal goblet
worthy bolt
#

But thank you

#

Appreciate the help you giving me man

somber gull
marble mural
#

Here is how I have it now with your support:
${lookup('foci','name','name','Strong Back')?18/2:str/2}$

#

Realised I was using the wrong names, but even with the correct ones it isn't working.

formal goblet
#

And 18/2 is 9 btw

marble mural
formal goblet
#

What's the error in the console?

marble mural
marble mural
#
    at math.js:24863:47
    at math.js:24864:39
    at Object.evaluate (math.js:24162:45)
    at r.evaluate (math.js:24139:55)
    at Formula.computeStatic (Formula.js:439:27)
    at Formula.compute (Formula.js:366:21)
    at processFormulas (ComputablePhrase.js:103:35)
    at async ComputablePhrase.compute (ComputablePhrase.js:157:34)
    at async ComputablePhrase.computeMessage (ComputablePhrase.js:257:9)
    at async Label._getElement (Label.js:107:26) Object```
#

No idea if that is correct error...scrolling up I more than a few.

formal goblet
#

Yeah, that is correct. Just wrap lookup() with first()

marble mural
#

Oh, okay, one sec.

formal goblet
marble mural
#

${first(lookup('foci','name','name','Strong Back')?9:str/2)}$

formal goblet
#

The closing parens is missplaced. You shouldn't include the part outside of lookup()

marble mural
#

Oh, just wrap lookup, not the whole dang formula, duh.

#

Yep that got it. Now I need to figure out why my attack button that was working yesterday suddenly isn't. Something about a samerow ref. Glad you pointed me at the console though, that at least gives me more information that I had before, even if I won't be able to use it as adroitly.

marble mural
#

According to the console 'atkcalc' in the same row as the label button I'm using isn't targeting the column correctly? The values in that column are only numbers (negative currently, but that shouldn't matter right?)
${[1d20]+sameRow('atkcalc')}$
I entered a default value and it would indeed role, but still wouldn't calculate using 'atkcalc'. Any thoughts anyone?

#

Whats strange is that it was working yesterday, and I haven't changed anything with that table.

marble mural
#
    at sameRow (FormulaFunctionImporter.js:15:27)
    at math.js:26516:56
    at math.js:25781:62
    at Object.evaluate (math.js:24162:45)
    at r.evaluate (math.js:24139:55)
    at Formula.computeStatic (Formula.js:439:27)
    at Formula.compute (Formula.js:366:21)
    at async processFormulas (ComputablePhrase.js:103:21)
    at async ComputablePhrase.compute (ComputablePhrase.js:157:34)
    at async Label.js:480:13```
#

And the column-key is correct.

formal goblet
marble mural
#

Do I just add that to the formula?

formal goblet
marble mural
#

I don't know that I'm doing it right, but this is what I got back

eval    @    VM2064:3```
formal goblet
marble mural
#

VM2064:3 attacks.pLg718JaTHyX6F1C

formal goblet
#

Alright, and now %{console.warn(entity.system.props.attacks['pLg718JaTHyX6F1C'])}%

marble mural
#

{name: 'Knife', id: 'pLg718JaTHyX6F1C', trained: '<i class="fa-regular fa-square "</i>', attack: '0', damage: '1d4+1', …}

marble mural
#

I see, it says 'atkcalc' is undefined. But it isn't, There is a -1 there on the item holder table:

atkcalc
: 
undefined
attack
: 
"0"
damage
: 
"1d4+1"
id
: 
"pLg718JaTHyX6F1C"
name
: 
"Knife"
roll
: 
"Attack!"
trained
: 
"<i class=\"fa-regular fa-square \"</i```
#

And it seems to think there are more columns than I have. Should only be the item name, trained, atkcalc, damage, and roll.

#

Also, if it helps, here is the formula in the atkcalc row that is being computed successfully if that helps:
${(item.usestr?strmod:dexmod)+item.untrainedpen+item.modatkbonus+atkbonus}$

#

I think I have figured out part of the problem, it doesn't like the number the above formula is spitting out.

#

Alright, I found my way around it.

worthy bolt
#

Wsp, i was wondering if there anyway i could make larger text field for big texts.

Like for notes and etc...

worthy bolt
#

Oh, i thought the Rich Text area was only for the gamemaster

#

my bad

willow birch
#

I can't seem to add macros/commands to inline rolls so instead I thought to at least let Dice so nice change the color of enemy dice.

Normally a chat message would look like /r 1d6[fire]
But I can't seem to replicate this when using ${}$ values. Inside it throws an error and outside it just prints as text. Any ideas?

willow birch
#

Welp, now I feel dumb, thank you!

grim vector
#

So, I'm making a character sheet, to keep track of information.

Is it possible to create a new row in a Dynamic Table through Macro scripts?

formal goblet
grim vector
#

Is there a simple way to add objects then? I'm a lil new to this, but learning a lot ^^

grim vector
#

What would the "SampleNewRow" be? It's saying that it isn't defined, so I'm assuming I need to add something, yeh?

formal goblet
grim vector
#

Does it need the elipses? Or is that placeholder?

#

And I tried making the "newrow" like this, but getting major errors, so assuming that's wrong. card is the name of a card

#

Oh, I just made it empty and that cleared some things I think?

formal goblet
grim vector
#

Oooh, so it's saying like- all of it? That's cool ^^

formal goblet
grim vector
#

Riiight, I did the exact same thing just hours ago @w@ I feel blind sometimes

#

Ok, I'm down to the last bit and am unsure how to fix the last bit, can I copy and paste the code here for help?

grim vector
#

let card = token.document.name;

macroID = macroCompendium.index.find(t => t.name === card)._id;

macroCompendium.getDocument(macroID).then(m => m.execute());



let GT = game.actors.getName("Growth Tracker");

let table = GT.system.props.card_use_table;

console.log(Object.keys(table).length);

let NewRow = {
 name: "card_name",
 value: card,
 name: "card_uses",
 value: 1
};

if (Object.keys(table).length) {
  const newIdx = Math.max(...Object.keys(table).map((key) => Number(key))) + 1;
  table[newIdx] = { ...NewRow };
} else {
  table = {
    0: { ...NewRow }
  };
}

foundry.utils.setProperty(GT.system.props, GT._id, table);



await entity.entity.update({
  system: {
    props: entity.system.props
  }
});```

Now it only errors when that last 'await' is there
#

With this error, if it helps

formal goblet
#

It doesn't know what entity is, because you have to define that (TemplateSystem of either Actor or Item)

grim vector
#

I tried this too:

  system: {
    props: GT.system.props
  }
});```

It sadly gives the same error
#

Oh, it wants the template system?

#
let GTT = game.actors.getName("Growth Tracker Template");

await GTT.update({
  system: {
    props: GTT.system.props
  }
});```

I changed it to this, now it doesn't error, but it isn't adding any rows
formal goblet
#

Depends. The first entity is an instance of TemplateSystem while the second one is an instance of CustomActor or CustomItem. You could skip the first one and directly use the Actor or Item

grim vector
#

let card = token.document.name;

macroID = macroCompendium.index.find(t => t.name === card)._id;

macroCompendium.getDocument(macroID).then(m => m.execute());



let GT = game.actors.getName("Growth Tracker");

let table = GT.system.props.card_use_table;

console.log(Object.keys(table).length);

let NewRow = {
 name: "card_name",
 value: card,
 name: "card_uses",
 value: 1
};

if (Object.keys(table).length) {
  const newIdx = Math.max(...Object.keys(table).map((key) => Number(key))) + 1;
  table[newIdx] = { ...NewRow };
} else {
  table = {
    0: { ...NewRow }
  };
}

foundry.utils.setProperty(GT.system.props, GT._id, table);

let GTT = game.actors.getName("Growth Tracker Template");

await GTT.update({
  system: {
    props: GTT.system.props
  }
});```

So, this is what I have now, pardon if I misunderstood anything so far. Now it doesn't error, but it's still not adding anything to the actor's table.
formal goblet
grim vector
#

So, would I want the key to the table there?

formal goblet
grim vector
#

foundry.utils.setProperty(GT.system.props, table._id, table);

I updated it to this, but it nothing changed

grim vector
#

Oh lol, so what would I put there?

formal goblet
#

Just the key of the table as string

grim vector
#

Yay!~ Ok, step in the right direction!~
It's adding a new row, but it's not adding the "NewRow" information, just blank.

grim vector
#

Ooh, gotcha

#

Yep! That did it, thank you so much for your help!!

marble mural
#

Question. Is there a way to target a Text field with a formula so that I can display text from the field in a different Label?

#

And never mind, I figured it out 🙂

low tulip
#

hey, I have a question. How would you go about changing the chat output of a roll from:

#

to foundry's roll style that you'd get rolling from the chat:

willow birch
low tulip
#

in my example I want it to roll 1d20 + str, where 'str' is the key of a label

willow birch
low tulip
#

I just figured it out exactly like that!

low tulip
#

like:

"Strength Check:"
%{let roll = await new Roll('1d20 +${str}$').evaluate(); await roll.toMessage();}%
#

not like that obviously but ya know

low tulip
#

brilliant

#

thanks

#

oh my god

#

I couldn't get it to work and couldn't figure out why for the longest time until I realized it's because my heritage betrayed me

#

I spelled it 'flavour'

sharp ledge
#

So I am super novice to script written but I think I have a simple question. Changing the color of checkboxes. I see there is a spot for script but I am not quite understanding how to use it. What would be a simple example of using the appearance modifier for making a checkbox red?

formal goblet
# sharp ledge So I am super novice to script written but I think I have a simple question. Cha...

Check this article here: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics

Using CSS in CSB:

  • You upload your own CSS-file and reference that in the game settings
  • You use the CustomCSS-module (recommended)
MDN Web Docs

CSS (Cascading Style Sheets) is the code that styles web content. CSS basics walks through what you need to get started. We'll answer questions like: How do I make text red? How do I make content display at a certain location in the (webpage) layout? How do I decorate my webpage with background images and colors?

marble mural
#

So I'm chugging along at my sheets and I'm about done I think, but now I'm wondering if there is a way to make a sheet that tracks stats in other sheets, like a Party Management sheet so I can see all my players characters current hp, AC, etc.

#

No big if it's not possible, I can just look at their sheets, but I was wondering.

formal goblet
marble mural
formal goblet
marble mural
sharp ledge
#

You my friend are an inspiration!

marble mural
#

Dang, not getting it:
${fetchFromActor('Charlemagne',"ac",0)}$
only returns 0. Am I missing a part of the key? Like actor. (which I actually tried and also didn't work).

formal goblet
marble mural
#

With the label I'm using to house the formula that is. It's blank.

formal goblet
#

Then type game.actors in the console and check, if your Actor is actually there

marble mural
#

Well...there appear to be some actors 🙂

: 
{"voXqWEnWRjYHGNCD" => CustomActor}
1
: 
{"vSBJTmxQyx54QXCy" => CustomActor}
2
: 
{"SWUwpPXJQVRr2yXr" => CustomActor}
3
: 
{"pG9HfX8yuInxRYFw" => CustomActor}
4
: 
{"CgG820SQ82ufsMSW" => CustomActor}
5
: 
{"p9ko8cJbSwmv6PdN" => CustomActor}
6
: 
{"EpwROtii6NfVpNxX" => CustomActor}
7
: 
{"ZSi0jcGo8mlcGrX8" => CustomActor}
8
: 
{"4qOb0AUCTJz02s06" => CustomActor}
9
: 
{"wc9pQrBSw5ARSeOe" => CustomActor}
10
: 
{"tMA7VixkZFtTZMXK" => CustomActor}```
#

Why they don't have the names in their Name field I don't know.

#

Oh wait, interesting, I can open the menus and see who they are connected to. Man, looking up their weird id string is going to be onerous

#

Nope, even when I use the alphanumeric string associated with Charlemagne id doesn't work.

#
: 
{"vSBJTmxQyx54QXCy" => CustomActor}
key
: 
"vSBJTmxQyx54QXCy"
value
: 
CustomActor {name: 'Charlemagne', ```
#

hmmm, I may have worked it out.

#

Nevermind, messing about with fetch actor somehow broke the whole character's sheet. Now nothing on it works...that sucks.

#

Duplicating the character and deleting the old one saved the character. No idea what I did to mess it up, to many errors to parse on my own. Ah well, I'll just do a manual entry Journal if I need to for PC stats.

timid marten
#

I'm getting info from an Actor's name, how can I get it from an Actor's ID?

obtuse birch
#

(the drop down menù where you read 003 in the first image in q005)

what i'm doing wrong?

${lookup('q12', 'q10', 'q11', q005, '=')}$

the formula is this one

obtuse birch
formal goblet
obtuse birch
#

still cannot make it work

formal goblet
obtuse birch
#

(001 is q005)

obtuse birch
formal goblet
obtuse birch
formal goblet
#

I just want to know, where q005 is located

timid marten
obtuse birch
#

this is the componet that key is q005 (first image)
in the second image i circled it

formal goblet
formal goblet
timid marten
#

I replaced it here

formal goblet
# timid marten

The error is related to a different formula, that is dependent on that one

timid marten
#

the formula is this one: ${sum(lookup('test', 'weightfield'))}$

#

which works perfectly with my version

formal goblet
formal goblet
timid marten
#

yes

formal goblet
timid marten
#

can I use the UUID instead? it's way easier to get

obtuse birch
#

no visible errors

#

i put the code and reloaded the sheet

timid marten
formal goblet
formal goblet
obtuse birch
timid marten
obtuse birch
#

wait a fucking second, i did not inverted the reaserch collumn

formal goblet
timid marten
#

then this?

`const abacus=await fromUuidSync("${namefield}$")

return game.actors.get(abacus)?.system.props['KG_fixed'] ?? 0;`

formal goblet
#

Because you already fetched the object

#

And remove await, there's nothing to await in a non-async operation

obtuse birch
#

like this it should be more clear what is what and wich is wich

formal goblet
#

And which one is the target column, you want to have the result from?

obtuse birch
#

ok lets start from 0
in the first part i have
a dropdown menu that let me choose beetwen (class1,class2,class3)

when i choose the class, i want in the second drop down menù to chose fromn the ability of that class

so if i choose class 1 i need to be able to choose beetwen pow1 and pow2

in my mind this was feasible with two dynamic table, one with the classes and 1 with the abilites

formal goblet
obtuse birch
#

oh my god

#

it works

#

thx so much man!

timid marten
#

is this one right?

formal goblet
timid marten
#

returns 0

formal goblet
timid marten
#

abacus is null

#

`%{
const abacus = fromUuidSync("${namefield}$");
console.warn(abacus);

return abacus?.system.props['KG_fixed'] ?? 0;}%`

formal goblet
timid marten
formal goblet
# timid marten

Ah right, it's within a Dynamic Table. So you have to use sameRow()

timid marten
#

yeah

obtuse birch
#

uh, that's funny

#

is there a way to not make the class repeat?

formal goblet
# obtuse birch is there a way to not make the class repeat?
%{
const entries = "${lookup('q12', 'q11', 'q10', q005)}$";
return [...new Set(entries.split(','))].join(',');
}%

https://www.geeksforgeeks.org/how-to-remove-duplicate-elements-from-javascript-array/

timid marten
formal goblet
#

${namefield}$ --> ${sameRow('namefield')}$

oblique gyro
#

How do I make it so that, if critCheck isn't equal to 12, nothing is output into the chat? I'd rather not have "not a crit" on every other roll.
${critCheck == 12 ? "CRITICAL HIT!" : "Not a crit."}

formal goblet
low tulip
#

could you have an item displayer only display the first item of the given type dropped onto the character sheet and then subsequent items of that type bounce or overwrite the previous?

#

I'm thinking like adding a class item to a character, where if the character tries to add a different class it doesn't just expand the table

#

also different question, can items be attached to another item so that you could make class items that auto populate class feature items from a table based on matching the level key of the character with the level column of the class feature?

formal goblet
worthy bolt
#

is it possible to show only the item Icon at Item Container?

brazen laurel
#

I am so lost currently. For example _inventory what the hell is {Weight} referring to in the item modifier

formal goblet
brazen laurel
brazen laurel
# formal goblet

Apologies, I was very tired last night and in stupidity I did realize that the component key weight was on the numerical field.. not the label

#

Better question as well is how is total bulk knowing to display the total weight?

And thank you for your time

low tulip
#

is there a good way to lessen the gap between these elements? I'm finding it really difficult to resize the flex groups, especially the ones the display: grid; ones, and on top of that I can't figure out how the parent structure of elements in panels works, when I try to apply a background to panels the background has a higher z-index than some of the elements in the panel so they're hidden behind it, I guess because of their place in the html structure. Feels like I'm going about it the wrong way for sure

sinful spade
low tulip
# sinful spade use CSS to set the margins to <10.

My problem was that the panel 3 column grid was difficult to resize with margins. I fixed it to my liking in a roundabout way but I dont' really feel like I mastered it, I just got around the problem 😄

sinful spade
#

Well, the rows too I assume

low tulip
#

yeah and I did manage that by putting the meter in a different panel so it didn't take up space

sinful spade
#

I see, yeah adding a panel is by far the easiest solution, in fact i'd be overboard and throw a third panel in to group the two together but that's just me.
But you can absolutely manage the same thing with just css

low tulip
#

I'm sure

sinful spade
#

You'd need to either specifically identify the current max and barrier labels and number fields, and set a max-width: x% (or px value). The margins could also be adjusted for further fine tuning.

low tulip
#

I see yeah that might have worked

#

I didn't try max-width

sinful spade
#

Btw just a small suggestion, I'd consider using a table rather than a panel for first section. ^^

#

to be specific, i'd do this:

low tulip
sinful spade
#

nest a table with 3 columns and 2 rows within a verticle panel? The meter is just placed below the table within the same panel

#

that way your HP specific elements are grouped properly, and the table offers better centering and element control for the contents

#

frankly then you could set the meter to auto size and it'd take up the entire width

#

though that last part is entirely optional, Idk what you're going for aesthetically

low tulip
#

smart, I'll give it a try

sinful spade
#

Does this clarify?

#

even just using the built in size property you can change the number fields to be less abrasive:

#

that way you're avoiding additional css code uncessarily, but you also do get the ability to use some really useful CSS functions,
using nth row function to target the header or the content, or just the barrier column for example.

low tulip
#

absolutely, smart

brazen laurel
sinful spade
#

Actually I do have a question while I'm thinking about it. Does anyone know how to change the display of a meter?

Specifically I'd like to use some meters as clocks (like the blades in the dark progression clocks). I'd also like to fill in from the right side for some meters to show temporary hit points or shields if possible 🤔

low tulip
#

sounds like custom script territory to me

low tulip
sinful spade
low tulip
#

no just the first solution that came to mind

sinful spade
#

I think the issue has to do with panels not really taking up space natively.
In fact; I'd just reorganize your setup there.

sinful spade
#

To do this I just made a single table with 2 columns
the Label is just a label with the text being the "row name" but then in the label icon section i used Font Awesome's sword import.

low tulip
#

yeah but my problem is I have custom icons and the background-image property slips behind the neighbouring divs

#

and / or doesn't go outside the label div

#

maybe I could do overflow: visible or something

sinful spade
#

I think the issue is more to do with panels not natively taking up space and your icon being a background property is the same so it's being thrown off the side

low tulip
#

yeah you're right

#

but I don't know how to contain the background-image

sinful spade
#

You can either nest tables like I original had, which is a ugly solution
or I think you may be able to use a min-width property on the panels

low tulip
#

wish there was a foreground-image property 😄

sinful spade
low tulip
#

perhaps

sinful spade
#

Yeah I just tested it

low tulip
sinful spade
#

wait wut lol

low tulip
#

interestingly setting the first icon to a label made all of the others hop into the right place

#

I hate css

sinful spade
#

do you know where the first label went off to?

formal goblet
sinful spade
#

and it's because you've set the first cell on a column to a size now, so the following cells are properly aligned

#

the problem is now that your first icon's position is thrown out

sinful spade
#

shouldn't have stuck your head in >:)

sinful spade
formal goblet
sinful spade
#

Honestly with progression clocks being so dang useful - and with nearly every system having some sort of shield property used... these may be great feature requests built in natively.

#

progression clocks less so - but ever since discovering them I can't stop using them for long term down times, events, healing - etc.

low tulip
sinful spade
#

oh too easy man

#

You can try first placing a single space in the label text area

#

or a <br> tag, either should force it to take some verticle space

low tulip
#

nope

#

wait yes <br> worked but

sinful spade
#

you can add a second <br> for a simple fix.

#

or

low tulip
#

the height of the label is too small so it gets cut off

sinful spade
#

you can force it wiht a css line:
min-height: <x>px;
and set x to the value the other cells take natively

#

frankly i'm a lazy schmuck and would use <br><br>

low tulip
#

well yeah 2 line breaks worked

#

but there's a problem

sinful spade
#

yo?

low tulip
#

the two line break label is untargetable in the template so if I leave it like that I can never edit it again

sinful spade
#

well you'd just edit the template to have more brs

#

but again, lazy solution

low tulip
#

like no

#

you literally cannot click the line breaks

#

they don't have any mouse events

sinful spade
#

are your icons interactive somehow?

low tulip
#

nope

formal goblet
sinful spade
low tulip
#

no but in the template, I can't edit the label

#

which means if I ever need to change it I can't

#

an empty label template has this border you can click to edit it for that exact reason

#

but if I add a line break in there that border disappears because it's not empty anymore. But the line breaks aren't clickable so you can't get into the edit page for the label anymore

sinful spade
#

okay then you're 100% doing the css code

#

you're going to need to set a min-height, and height line

low tulip
#

well that was easy

#

I can't believe I hadn't thought of min-height before

#

there fixed

#

that was faster than the lazy solution

sinful spade
#

🤣 wild

#

it shouldnt have been but hey here we are haha

low tulip
#

final question. Is it possible to make the elements of the sheet resize with the sheet instead of just compressing?

#

probably not but on the off-chance that it's simple to do I'll ask

formal goblet
#

Wasn't there something like a Container viewport?

sinful spade
#

lol dont sob easy easy min-width:

low tulip
#

there fixed

sinful spade
#

so does your stuff not scale natively?

low tulip
sinful spade
#

if so you can set the
height as a %

low tulip
#

and then if I resize it this happens

#

everything just squishes

sinful spade
#

ohh - i see

#

i mean yes you can do that

#

but you'd be basically coding an entire new character sheet

low tulip
#

that's what I figured

sinful spade
#
#

you'd basically be making different displays based on PX size

#

recoding the entire sheet based on the display size being less than or greater than certain page widths

low tulip
#

definitely not doing that

sinful spade
#

🤣 yeah me either - not worth

low tulip
#

btw what I'm doing is trying to make a custom system for the upcoming final fantasy 14 ttrpg that releases in february couse I'm pretty sure no one is gonna make a full on system of it seeing as how strict square enix is with their license and I feel like playing it so here I am

#

and I didn't feel like coding a custom sheet from the ground up with html

sinful spade
#

🤣 who would

#

i just have a homebrew ruleset that takes from a ton of other systems

low tulip
#

btw can you make a border around the first child of a table like this without it getting a border in the column divider?+

#

it's from an item displayer

#

I can get it like these examples but I can't get it to wrap around the item delete button in the table th section

#

without adding the middle border between the two

sinful spade
#

yeah 100%

#

you need to use the nth child property

#

/* Header Row, First Cell (Attribute Name) */
.attributeTable tr:nth-child(1) td:nth-child(1) {
text-align: center;
display: block;
}

#

that's my css for selecting the first cell of a table
first row, first column only

#

tr being row, td being column

#

or wait did you want to include the trashcan in the border without the diving border

brazen laurel
#

Alright I guess I dont understand. How exactly does the item modifier from inventory items know what label to adjust?

formal goblet
low tulip
brazen laurel
sinful spade
brazen laurel
#

And that would have to be in ${}$ syntax

formal goblet
#

You only need a formula, if the key should be variable

low tulip
#

that just does this

sinful spade
#

check the padding

#

can you show the inspect of it?

formal goblet
# low tulip

God damn, I only see the icon and I want to go back playing FF14

sinful spade
#

haha i never played that game but it looks so good

formal goblet
low tulip
#

yeah it sure is, I just finished endwalker

sinful spade
low tulip
#

this is the inspect

#

I just added the padding: 0px; that did nothing

sinful spade
#

is it a margin? hover over it with the inspect tool

#

also what does the div right above that one highlight?

low tulip
#

this

#

and there's the highlight

sinful spade
#

hmm...

#

that div you highlighted is what you'll need to target

#

you may need to target the class item container itself then go up a level from there

brazen laurel
#

Alright, first thank you for helping out. Didnt realize I was being dumb with syntax

Second, if you wanted to do a formula on the number that is modifying that label NOT in the item modifier but in the label itself, how would you do this?

#

With the goal of say dividing the final number that is the weight of the inventory by 2

sinful spade
#

put borders on both the trash can and word individually, just leave off the left and right border respecitvely LOL

low tulip
#

genius

#

oh

#

nevermind I'm just stupid

#
.classField table:first-child {
border: 2px inset #d1bea1;
}
#

this did it