#Custom System Builder

1 messages · Page 3 of 1

brittle moth
#

You need the following formula :
${[:sameRow('weapon_damage', 0):]}$

The [] indicates you want a roll, and will roll the text inside it
The :: indicates this text should be computed as a formula before executing the roll

This will get the value of ('weapon_damage', 0), and then roll it 🙂

late kite
#

I hope the "modify the values on the item" can be turned off so if multiple characters have the same item, they can use their own values in their own inventory. Ammo being the use case in mind.

formal goblet
velvet sun
sharp grotto
#

@formal goblet i have a problem with a macro i hope you might be able to assist with.
Im trying to call a lable for a value from an actor but im not able to figure out the path to it 🙂

potent fossil
#

Hey guys, I was wondering if inventories (weight) worked with item container the same way they do for dynamic tables. If yes, can you pls send me an existing example of it?

sharp grotto
#

Is there someone that can tell me the path to this part of the sheet for a macro ? What i want is in the Panel Dexterity 🙂

formal goblet
sharp grotto
formal goblet
sharp grotto
formal goblet
#

uhhhh, it should be actor data in the end, I think?

sharp grotto
formal goblet
#

The main data is under actor.system.props. But you have to get the right actor before (with a static name, from a target / selection, etc...)

#

And I can recommend "Hinkik & A Himitsu - Realms", feels a bit like from Feint if you know what I mean 😇

sharp grotto
#

this is the path that i am useing.
OBS. selectedActor is defeind 🙂

${selectedActor.value.system.props.dexterity_mod}`
formal goblet
#

Might also fit

formal goblet
#

D&B 😅

sharp grotto
formal goblet
#

Are you trying it from a formula?

sharp grotto
#
            // Roll the Attack!
            callback: async () => {
                console.log(token.actor.getRollData())
            let newRollString = `1d20 + ${selectedActor.value.system.props.dexterity_mod}`
            console.log(newRollString)
            let roll = await new Roll(newRollString).roll()
            let result = roll.total 
            console.log(result);
            }
        },
        close: {
          label: "Close"  
        }

    }
       
    }).render(true);
}
formal goblet
#

ok, that´s definitely a macro

#

This is what I did to get the right data (part of the system code):

getPropertyDataFromActor: (actorName, formula, fallbackValue = null) => {
                    formula = formula.replaceAll('"', ' ');
                    formula = '${' + formula + '}$';

                    let actor;
                    switch (actorName) {
                        case 'selected':
                            actor = canvas.tokens.controlled[0]?.actor ?? game.user.character;
                            break;
                        case 'target':
                            actor = game.user.targets.values().next().value?.actor;
                            break;
                        case 'attached':
                            actor = parentActor;
                            break;
                        default:
                            actor = game.actors.filter((e) => e.name === actorName)[0];
                    }

                    // If actor was found
                    if (actor) {
                        let actorProps = actor.system.props;
                        let returnValue = getNumberCastValue(new ComputablePhrase(formula).computeStatic(actorProps));

                        return returnValue ?? fallbackValue ?? defaultValue;
                    }

                    return fallbackValue ?? defaultValue;
                }
sharp grotto
formal goblet
#

A working example from the console (with a selected token):

new ComputablePhrase('${Dexterity}$').computeStatic(canvas.tokens.controlled[0]?.actor.system.props)
sharp grotto
formal goblet
# sharp grotto is that a system or ?

btw, not knowing "Feint" is a sin when I see you hearing music from artists like "Voicians", "Telomic", "Bert H", "SQL", "Koven", "T & Sugah" and so on 😂

sharp grotto
#

@formal goblet Thank you so much for the help ❤️ I HAVE FOUND IT!!!!!
I can now get on with the project to make a roll with a macro useing this awsome system ❤️

formal goblet
#

Glad I could help. But why do you need a macro for a roll?

sharp grotto
#

i was trying to do it with items but somehow i dont understand how to make an item or a spell make a callback to the actors sheet who is haveing that item or spell.
So i am not able to make a 1d20+dex

formal goblet
#

So the roll would be performed from an Item?

sharp grotto
#

Yes since the system i am doing is completly custom and is useing alot of items / spells to have diffrent rolls and stuff 🙂

formal goblet
#

Well, this would also be doable with the new feature... You´re just a bit too early 😅

sharp grotto
formal goblet
#

I also spend hours to implement this, you´re not the only one 🥲

#

And LinkedFluuush is a monster, implementing drag & drop-functionality as it was nothing 🥲

sharp grotto
#

well cant wait to see what you guys are able to do with this 🙂
Are you up for another headic :p

sharp grotto
formal goblet
# potent fossil up 😅

ah yeah, there was something, oops 🤣 . Item Containers work a bit different. Instead of using fetchFromDynamicTable(), you use Item Modifiers to modify a Label containing your weight.

potent fossil
#

I see thanks Imma give it a try

potent fossil
#

also I have this very weird error cause it does not seem that any of my variables in my character sheet starts with a $

Uncaught (in promise) Error: Field names cannot begin with the $ character
    at checkKey (opt/foundryvtt/node_modules/nedb/lib/model.js:32:11)
    at opt/foundryvtt/node_modules/nedb/lib/model.js:54:7
    at Array.forEach (<anonymous>)
    at checkObject (opt/foundryvtt/node_modules/nedb/lib/model.js:53:22)
    at opt/foundryvtt/node_modules/nedb/lib/model.js:55:7
    at Array.forEach (<anonymous>)
    at checkObject (opt/foundryvtt/node_modules/nedb/lib/model.js:53:22)
    at opt/foundryvtt/node_modules/nedb/lib/model.js:55:7
    at Array.forEach (<anonymous>)
    at checkObject (opt/foundryvtt/node_modules/nedb/lib/model.js:53:22)
formal goblet
#

Interesting. Enable log-level: verbose and check at which computation it fails.

velvet heron
#

I know there's a way to add a minimum role and permission level to view a component. But is there a way to allow a player to view a component but not edit it? Specifically Rich Text Areas, in my case.

formal goblet
#

Although... Custom-CSS?

velvet heron
#

That's beyond me, sadly. Unless you can provide the code I would need to input?

potent fossil
#
Uncaught (in promise) Error: Field names cannot begin with the $ character
    at checkKey (opt/foundryvtt/node_modules/nedb/lib/model.js:32:11)
    at opt/foundryvtt/node_modules/nedb/lib/model.js:54:7
    at Array.forEach (<anonymous>)
    at checkObject (opt/foundryvtt/node_modules/nedb/lib/model.js:53:22)
    at opt/foundryvtt/node_modules/nedb/lib/model.js:55:7
    at Array.forEach (<anonymous>)
    at checkObject (opt/foundryvtt/node_modules/nedb/lib/model.js:53:22)
    at opt/foundryvtt/node_modules/nedb/lib/model.js:55:7
    at Array.forEach (<anonymous>)
    at checkObject (opt/foundryvtt/node_modules/nedb/lib/model.js:53:22)
_handleError @ foundry.js:2913
(anonymous) @ foundry.js:2897
value @ socket.js:309
value @ socket.js:239
x.emit @ index.mjs:136
value @ manager.js:200
x.emit @ index.mjs:136
value @ index.js:119
value @ manager.js:192
x.emit @ index.mjs:136
value @ socket.js:323
x.emit @ index.mjs:136
value @ transport.js:104
value @ transport.js:97
ws.onmessage @ websocket.js:79
Promise.then (async)
reloadTemplate @ actor.js:590
(anonymous) @ template-sheet.js:131
yes @ template-sheet.js:130
callback @ foundry.js:56465
button.callback @ foundry.js:56516
submit @ foundry.js:56403
_onClickButton @ foundry.js:56332
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:
formal goblet
potent fossil
#

this is all what I can see

potent fossil
#

This is the error message above, it's in red tho

Field names cannot begin with the $ character
fetch @ foundry.js:59187
notify @ foundry.js:59114
error @ foundry.js:59150
_handleError @ foundry.js:2915
(anonymous) @ foundry.js:2897
value @ socket.js:309
value @ socket.js:239
x.emit @ index.mjs:136
value @ manager.js:200
x.emit @ index.mjs:136
value @ index.js:119
value @ manager.js:192
x.emit @ index.mjs:136
value @ socket.js:323
x.emit @ index.mjs:136
value @ transport.js:104
value @ transport.js:97
ws.onmessage @ websocket.js:79
velvet heron
formal goblet
#

You see which keys are getting computed before the error occurs

#

In this case my result key has an error.

potent fossil
#

Weird I don't see it... would it be easier if I filter only by Verbose ?

formal goblet
#

You would see more with verbose on

potent fossil
#

it is on

formal goblet
#

Huh, this is a tricky one

potent fossil
#

isn't 😂

formal goblet
#

I don´t even know where to look further besides in the JSON

potent fossil
#

When I try to look for a "key":"$ there is no result

#

which means that, theoretically, there is no key starting with $

#

if I'm not wrong

formal goblet
#

Theoretically yes.

potent fossil
#

I mean, so far, it's just a warning, but it doesn't seem to prevent me from doing anything

#

it's very weird tho

formal goblet
#

Actually, the keys from hidden attributes are named name instead of key

potent fossil
formal goblet
#

Ah, you actually forgot a whitespace between : and "

#

🤣

potent fossil
#

really? cause it only works when there is no space

formal goblet
#

I mean for the key-part

#

Atleast what I figured out with VS-Code

#

Although, my code is autoformatted......

potent fossil
#

I only works with no space

#
  • it's only the export of CSB's JSON, I didn't edit it
formal goblet
#

Like I said, mine is autoformatted, so it´s my fault 😅

potent fossil
#

hahah I see 😅

#

Actually I figured out something, the error only happens when I reload a one specific sheet

#

but not with the others, so it should be something hidden inside this character sheet

#

I'm gonna scan this real quick, I should be able to find it, If not I'll come back to you guys later

#

anyway thanks a lot for your time Martin !

formal goblet
#

I do what I can

late kite
#

Is it possible to use a put referenced data within a roll message without it appearing like this?

I want it to appear as plain text (like, without the rectangle that can be clicked in the chat). Also, the "Effect Tab" manifests as a small, thin, vertical rectangle because it's a Rich Text type of object.

elder arch
#

How would I change the text color in a field? I have a custom theme that changes everything to super dark (I have migraine issues that require ultra-dark UIs) and I was able to set the color of all other text, but not the ones in text/number fields.

#

I couldn't find anything in the CSS files that obviously referred to the color of this text (or any text).

vagrant hollow
late kite
#

It's not empty. The Effect is an RTF object that contains the shown paragraph. It just looks weird like that for some reason.

vagrant hollow
late kite
#

This one is a more complete image:

vagrant hollow
dire socket
#

Hey actually, does anyone know how to hide an empty result in a chat message? Like if a message for a roll has an empty field or something, so instead it can just not show anything at all.

late kite
vagrant hollow
quasi sonnet
#

So if I have a hidden attribute that calculates number of dice (nodice) and another that calculates type of dice (dicetype), with dice type being either d20kh or d20kl. How can I combine them into making a roll?

#

Ok, solved it.

#

${roll:=[:nodice::dicetype:]}$

robust wren
#

hello,
is it possible to let the player make a roll with a manual modifier?
for example the player rolls a d20 and before the roll he gets a windows asking him of any modifiers?
edit: by clicking on a label

robust wren
#

and another Question: i have a rollmessage with ${Name_FGEW1}$, to display the name of a Talent in a Textfield. Can i make it more pretty, so it wont have the border of a roll if displayed to chat? i think i have seen something on reddit, but couldnt find it again. Something like value:Name_FGEW1

violet latch
#

Has any CSB setup ever been released as a full add-on module? Is that possible?

quasi sonnet
#

it is possible

violet latch
#

Basically what I'm wondering is if I could stick all the Templates into compendiums instead of using the "Export/Import templates JSON" buttons.

quasi sonnet
#

Yes

#

You can

violet latch
#

(obviously I also want to put a bunch of non-template stuff into compendiums as well.

#

Okay. I'll explore this idea and see if I can flesh it out. It would definitely be nice to define dependencies on modules that are needed, etc.

quasi sonnet
violet latch
#

Thanks for that link! I'm bookmarking that. lol. I've made modules by hand before, but this is definitely a fun way to get a stub to start from!

late kite
#

A little ignorance speaking here, but how do I change the unit of measurement in CSB?

quasi sonnet
#

It has nothing to do with the system, you change the scale and unit of the grid in the scene's grid setting.

late kite
#

OH

quasi sonnet
#

So, I have a question. If an item has a set penalty to a specific skill, how do I check that value of the item, if it is equipped on the character, when I parse the roll to to output?

#

Example: Plate Armor - 5 to Sneaking, when rolling Sneaking skill, how do I fetch that -5 value from the item on the character?

#

It works to fetch it within the item container, with item.sneakingmod. But not outside it.

violet latch
#

@vivid ice shoutout ^

quasi sonnet
#

Yes, and it is set in the item. However, I can not call upon it for a skill roll outside the item container.

formal goblet
quasi sonnet
#

Hmm

formal goblet
formal goblet
# quasi sonnet

Open the Item (not Item Template) and click on Configure item modifiers

quasi sonnet
#

Oh

#

Thank you

quasi sonnet
#

Hmm, so the values etc I have added on each object through the template is meaningless?

robust wren
robust wren
#

is it possible to add all the Values from the Number Fields in a dynamic table?

formal goblet
storm matrix
#

just had a major problem if anyone can help

#

I cannot open my actors sheets

#

I tried making a new actor and the sheet won't reload to look like my sheet template

#

I checked the console and when I click on an actor I get this

#

TypeError: An error occurred while rendering CharacterSheet 38. text.includes is not a function
[Detected 2 packages: pdfoundry, system:custom-system-builder]

storm matrix
#

Ok I figured it out, I had some modules that were not compatible which were messing with things, and turning them off fixed the problem

vagrant hollow
robust wren
#

is it possible to easy move a table or smth like this? i have the issue, that i started creating the table and after i realised, that i cant fit the other things on the same page. so i want to create a tabbed panel and have the table in one of them. But i dont know how to put the table into the tabed panel. Do i need to make the wohle table again? i was thinking about copying the part from the json file, but i am not sure i can find it and put it in the right place withour breaking the whole sheat.
Additionally i just read the part about subtemplates. Do i understand that right, that i can make the table as a subtemplate and just drag and drop it where i need it? That would be pretty awesome, because then i can make all the needed Data in Subtemplates and can easily make another Design for my sheat without doing everything completly new.

robust wren
fathom sable
#

afternoon everyone. Can someone help me understand how to process an array in a label field? For example, I know you can get the items in a column from a dynamic table, but how does one loop through those items? Immediate use case is to sum a column of numbers; but I can see places where I might want to process all the items in a table individually.

brittle moth
fathom sable
#

evening everyone. Can someone help me understand how to process an array in a label field? For example, I know you can get the items in a column from a dynamic table, but how does one loop through those items? Immediate use case is to sum a column of numbers; but I can see places where I might want to process all the items in a table individually.

crimson rain
#

Custom System Builder has been suprisingly helpful for quickly throwing together a sheet for a system I found which currently lacks Foundry support!

However, I have a question.

How do I add 5e style attacks as a button in the sheet?
you know, 1d20+modifier+proficency modifer

#

and how do I add them to a dynamic table?

vivid ice
#

do you know how to set true of false a checkbox with a Item Modifier formula ?

fathom sable
#

not me, if you find out let me know.

crimson rain
#

I am trying to figure out how to make the sheet roll off of something put into a text box.

#

like if I put in 2d6+3 it will roll that when I press a button

formal goblet
crimson rain
#

I tried that

#

${[:damage_box:]}$

#

with damage_box being the textbox with the die in it

formal goblet
fathom sable
formal goblet
fathom sable
formal goblet
crimson rain
# formal goblet ok, any errors in the console, when you try to roll? (press F12)

Formula.js:723 Uncaught (in promise) Error: Uncomputable token end at Function.math.SymbolNode.onUndefinedSymbol (Formula.js:723) at math.js:26377 at math.js:26118 at Object.evaluate (math.js:24162) at r.evaluate (math.js:24139) at Formula.computeStatic (Formula.js:728) at Formula.compute (Formula.js:292) at ComputablePhrase.compute (ComputablePhrase.js:128) at HTMLAnchorElement.<anonymous> (Label.js:247) at HTMLAnchorElement.dispatch (jquery.min.js:2) UncomputableError @ errors.js:13 math.SymbolNode.onUndefinedSymbol @ Formula.js:723 (anonymous) @ math.js:26377 (anonymous) @ math.js:26118 evaluate @ math.js:24162 r.evaluate @ math.js:24139 computeStatic @ Formula.js:728 compute @ Formula.js:292 compute @ ComputablePhrase.js:128 (anonymous) @ Label.js:247 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2 async function (async) (anonymous) @ Label.js:247 dispatch @ jquery.min.js:2 y.handle @ jquery.min.js:2

#

alright, for shits and giggles, I rewrote this: ${[:damage_box:]}$ and now it works as intended

#

I guess there were some spaces gunking things up

stiff canopy
#

One of my PCs is a summoner, and he wants the ability to toss his summons (as tokens) onto the board himself. Is there any way to allow this?

undone smelt
stiff canopy
#

Awesome, thank you very much @undone smelt.

robust wren
#

hello, i need a little bit help with the conditions:
i have a dynamic table and in the dynamic table a dropdown "Hand_WF". i want to have a specific value (in this Case "Schaden_Ges_ArmL" (Numeric)) based on the choice in the Dropdownlist Hand_WF. "WF_L" is a key of the dropdown. So i want this:

if Hand_WF the option WF_L, then Schaden = Schaden_Ges_ArmL

This is my try so far:

${Schaden:=[sameRow('Hand_WF')=='WF_L'?'Schaden_Ges_ArmL' : 'Schaden_Ges_ArmL'+'Schaden_Ges_ArmR']}$
${floor(sameRow('Punkte_WF',0)/10)-'Abzug_RS'-'Schaden'}$

Hand_WF - key of the dropdown in the dynamic table (Strings)
Schaden_Ges_ArmL - key of a value in a different table (Numeric)
Punkte_WF - key of a value in the dynamic table (Numeric)
Abzug_RS - key of a value in another Table (Numeric)

formal goblet
storm matrix
#

Having a bit of an issue

#

Didn't change anything, system was working yesterday

#

then today all my character sheets are blank with "owned items" in the upper left hand corner

#

anyone have any idea what happened?

robust wren
formal goblet
#

Ja, string-comparison funktioniert nicht mit dem Gleichheits-Operator 😅

formal goblet
storm matrix
#

it says its rendering my sheet

#

I also can't reload them or add to them

#

this is my template atm

formal goblet
#

Huh. Restart?

storm matrix
#

I tried that...

#

not sure if its a compatibility issue, but it was working like 8 hours ago without issue

#

I haven't installed any new modules or anything

#

I am using Forge, not sure if its on their end or something

formal goblet
#

There was a system update yesterday, but it shouldn't break the template.

storm matrix
#

thought it may be world size or something, but I'm pretty new and its 6mb which doesn't seem huge

formal goblet
#

Are you able to create a new template?

storm matrix
#

No, it brings up the same thing

formal goblet
#

Ok, now it gets complicated...

storm matrix
#

that's concerning

formal goblet
#

Try to create a new world and see if the problem is still there.

#

What is the foundry and system version?

storm matrix
#

I'm updated to foundry 10.291 and I updated custom system builder yesterday

#

to 2.2.0

#

The New World loaded very slowly and is very slow. When I made a template it eventually appeared in my actors, but when I click it nothing happens, no sheet comes up

#

in the console, I see no errors

#

though there does seem to be connection issues

formal goblet
#

I think there's something wrong with Forge

storm matrix
#

yeah, I think that'd be the most likely situation

storm matrix
#

it gets stranger

#

so I turned off the server and waited a bit, then went back in

#

the chat is now black and the character sheets have changed

#

things have returned but..... its a little odd

formal goblet
#

Looks interesting 😅

storm matrix
#

but I think that confirms its forge

robust wren
#

Next question from me 🙂
i have my dynamic table. i have a checkbox (Checkbox_WF), to mark, if it is equipped.
Now i have a value (Wert_WF) (also in my Dynamic table)

A Person can equip two items. The Bonus a person gets is Wert_WF-10 for each Weapon
So i need a roll message looking for the checked items, roll 2d10 and and add Wert_WF-10 for every checked item

formal goblet
robust wren
#

ah, da ist mein Fehler, ich hab durch die conditions eingetragen 'Checked' 😄

formal goblet
#

Auch gut 😂

fathom sable
#

evening all. I have a question about item containers. Can you access the attribute data from the item without adding it as a column in the item container? I'd really like to be able to access the attributes without cluttering up my character sheet. Any ideas?

formal goblet
fathom sable
fathom sable
formal goblet
fathom sable
formal goblet
#

You can delete the column if you don't need it. Otherwise... maybe you can do it in the advanced settings of the Label.

fathom sable
crimson rain
#

How do I get something like this: ${[:damage_box:]}$ to work in a dymanic table.

The idea is that I can put a die roll into the damage_box and cause it to roll when I press the button.

#

I have been trying to reverse engineer it from other people's work, but man, the examples people made are inscrutable to me.

robust wren
#

for example: ${[1d:sameRow('Damage_box']):}$
If Damage_box is '10' it will roll 1d10

crimson rain
#

for what I want, I want the ability to put '2d6' into a box and press Attack and it rolls the to hit and damage

#

and the ability to turn that 2d6 into 4d4, or 3d10+4, or 9d99-69 or whatever

#

but your example seems like it could do that with a bit of tweaking

#

I will give it a try, and thanks for answering!

robust wren
#

if i understand right, you can do something like this:
Dynamic table:
1 Column for the Number of dices, 1 Column for the Dice, 1 Column for the modifier

Then the field for the roll with
${[:sameRow('Dice_Number'):d:sameRow('Dice_Value'):+:sameRow('Modifier'):]}$

crimson rain
#

that works, thanks!

#

a bit clunky, but better then nothing

#

I wish I understood what code magic people did to make their damage rolls fit into one box

robust wren
#

i mean, you can make this with user input too, then you dont need a dynamic table
?{<varName>|<defaultValue>}

#

@formal goblet hast du eine gute Idee, wie ich ein Zauberbuch umsetzen kann?
Das würfeln selbst wird nur durch die Fertigkeit gemacht, unabhängig vom Zauber.

Ich kann einen Item Container nehmen und die Zauber erstellen, das funktioniert an sich gut, allerdings hätte ich gerne noch ein Text Field oder ähnliches.
Alternativ ginge natürlich auch eine Dynamic table, allerdings wird das dann schwierig mit der Masse an Informationen und der Beschreibung.

crimson rain
#

unless the user input stays?

robust wren
#

nope, the user input is everytime you click on the roll

formal goblet
robust wren
# formal goblet Musst mir genauer erklären, was du erreichen willst 😅

Ok, ich hab eine Idee, ich frag einfach Mal, da ich nicht am PC bin:
In item Container kann ich nur weitere Labels hinzufügen. Kann ich hier auf die Werte des Items zurückgreifen? Z.b. mit item.zauber_stufe, sodass mir in der gleichen Zeile, in der das Item liegt (und im Item die Stufe unter zauber_stufe gespeichert ist) anzeigen zu lassen?
Evtl. Dann auch eine Roll message machen und auf Item. Werte und normale Werte vom Bogen zurückgreifen?

formal goblet
robust wren
formal goblet
#

Ne, bezieht sich automatisch auf dieselbe Zeile

faint wharf
#

friends help! i moved large section (with skills lists) on character sheet wanted to put it into a tab. and it disapered! I can still reference values in it. so i hope there is a chance to get it back. As for how it happened i dont know, few fields didnt had a problem, and bam the one to do me most damage did disapear

vagrant hollow
robust wren
#

Würde natürlich vieles vereinfachen.
Aber ich hab vorher noch eine andere Idee:
Kann ich bei einem wurf auch ein Makro aktivieren?
Die Idee wäre ein Item zu erstellen, ein Makro für das Item machen und beim Wurf im Charakterbogen im Item Container das Makro auszuführen um bspw. Mit Sequencer Animationen hinzuzufügen

edit: solved - habs gefunden im Chatverlauf, danke an TwistedDM
Module Adcanved Macros und dann über /amacro

crimson rain
#

I have an issue where I cannot delete tabs

it pops up an error

#

Uncaught (in promise) TypeError: undefined. this.parent.deleteComponent is not a function [Detected 1 package: system:custom-system-builder] at Tab.delete (systems/custom-system-builder/module/sheets/components/Component.js:407) at HTMLAnchorElement.<anonymous> (systems/custom-system-builder/module/sheets/components/TabbedPanel.js:221) at HTMLAnchorElement.dispatch (jquery.min.js:2) at HTMLAnchorElement.y.handle (jquery.min.js:2)

crimson rain
#

anyone knows how to get the Boss Bar module to work with a Custom Sheet?

#

I need to be able to get current and maximum hitpoints

robust wren
#

you can set up the current and max HP in the configs of the Boss Bar.
You need the correct Data Path.
Unfortunetly i dont know the path 😄

robust wren
# robust wren Würde natürlich vieles vereinfachen. Aber ich hab vorher noch eine andere Idee: ...

edit: Doch nicht ganz 😄
Wie kann ich das Macro im Item Abspeichern (mit /amacro) und dann auf dem Charabogen über den ItemContainer den Text dartellen, sodass das Macro abgespielt wird?
und wie kann ich das ganze mit der Label Roll Messge verknüpfen?
Alternativ muss ich die Rollmessage im Makro neu machen, aber dann muss ich immer noch das Makro vom Charabogen aus starten, welches im item hinterlegt ist

edit: Hat sich wieder erledigt 😄
${!item.Sequencer_Macro}$ war die Lösung, wobei im Item unter dem Key Sequencer_Macro das entsprechende Macro mit /amacro hinterlegt ist

robust wren
#

How can i make different Item Containers?
i have two Item Containers and each with a different key, but both Containers have the same Items. I can only make different labels

formal goblet
formal goblet
robust wren
#

i got the same problem just this moment 😄
i could fix it within the json and an older template i made for Backup.
i can send you the damaged file, and tell you, where you have to look.
But i dont know what it was exactly.

formal goblet
robust wren
faint wharf
faint wharf
formal goblet
#

I´ll try some things out. I have an idea I have to test

brittle moth
#

If you have characters, DO NOT REFRESH. The data will be lost if you do

faint wharf
brittle moth
#

I'll investigate what could have caused that and add some failsafes to prevent those case, like maybe as you said a 'ctrl-z button'

#

Ok, please send an export of your character and template, and some keys to find the missing table in the template 🙂

formal goblet
#

If you have a file, you can import it via right click on the item/actor/template. I recommend creating a new one and import it on it.

faint wharf
#

ok i got old file can anyone help me revive those3 tables?

brittle moth
#

These can be exports obtained by right clicking on the template

faint wharf
#

I have db file

brittle moth
#

ah

faint wharf
#

not an export

brittle moth
#

can you send me the db file by DM ?

faint wharf
#

ok

brittle moth
#

I'll try and find a solution tonight, I can't really work on it right now but I'll try in a few hours 🙂

robust wren
#

Can i change the value of a numeric field (in this case for all in the Clumn)?
For example i have my dynamic table with Wounds and if i press Rest it should reduce every Wound by 1
i found the recalculate formula, but i am not sure if it dies what i need, and if it can do it in a dynamic table

formal goblet
robust wren
void dove
#

Would it be possible to create new attacks for a PC?

#

For pathfinder 2e

potent fossil
#

Hey guys, does CSB work with Drag Ruler? Cause I cant't get the module to recognise the attribute for speed

formal goblet
formal goblet
crimson rain
#

since I know where I store the current and maximum hitpoints (within the framework of CSB)

crimson rain
formal goblet
#

props stores only the current value. I think you have to look after ...attributeBar.words or so.

crimson rain
#

ah

dire socket
#

So with the new update, the whole referencing properties/keys on another sheet thing was supposed to be implemented/working, but I'm pretty sure I still have the same error. Anyone know how to get it working or at least any idea on if its working?

formal goblet
dire socket
#

Oh I actually just got it, thank you, I was just using the old way which only returns a key in chat

formal goblet
#

Ah, ok. Yeah, the old thing is also still there 😄

dire socket
#

I was super confused until I gave it all another look and I just managed to glance over the new feature, which made me feel REAL dumb.

dire socket
#

Actually, @formal goblet if possible, could I ask how you implemented the reference feature? I'm having some random issues that I don't think I understand at all. I'm trying to use it to calculate damage types against a targets defense in the results, it seems to just not work at all with what I'm doing currently. I hope the @ isn't too much.

formal goblet
#

It isn't. Show me what you did.

dire socket
#

Oh okay, well its a number of things, I'm just testing it out before actually trying to implement the feature into my actual sheet. It pulls up this error when I use this ${sameRow('Dmg_Type_1')==1? getPropertyDataFromActor("target", "Prc_Def"):sameRow('Dmg_Type_1')==2?getPropertyDataFromActor("select", "Sla_Def"):1}$

#

whats strange is that it doesn't do this if I do this: ``${sameRow('Dmg_Type_1')==1?70:sameRow('Dmg_Type_1')==2?getPropertyDataFromActor("select", "Sla_Def"):1}$ ` instead it pulls up a different error and the second result doesn't work right (the result being an empty field). I have to be doing something wrong here.

#

I'll probably figure out another way around this, since it seems to just not like being included in some things (or I just have no idea what im actually doing, which is definitely true)

formal goblet
#

You can use Label prefixes for testing

dire socket
formal goblet
#

And ${typeOf(sameRow('Dmg_Type_1'))}$ ?

dire socket
#

Sorry, do I literally just put that in? Doesn't seem to be returning anything other than an error.

formal goblet
#

Just a test

dire socket
#

Well ``${typeOf(sameRow('Dmg_Type_1))}$` doesn't seem to work then. I'm not 100% sure what it's testing though.

formal goblet
#

Ah, forgot a ' 😅

dire socket
#

OH

#

Oh, so thats what it does. Yeah, it's returning "number"

formal goblet
#

Ok, and the actor thing alone?

dire socket
#

What do you mean?

formal goblet
#

Just ${getPropertyDataFromActor('select', "Sla_Def", 0)}$

dire socket
#

Huh, it only seems to work on target, not select.

#

It works though, shows the multiplier.

formal goblet
#

Well, 'select' is just the left click selected token and 'target' is the targeted token.

dire socket
#

No idea why it acts the way it does, but regardless I still don't know how to get this property data working in a dynamic table. It's got to do a lot of things, but it just doesn't feel like cooperating, no idea why. I'll have to figure something out eventually though.

formal goblet
dire socket
#

That would be greatly appreciated, I do not mind the wait. Thank you for everything so far. For now I'll tinker about with some other ideas, I have something that may work, it just won't be pretty.

umbral glen
#

Hey everyone ! Does somebody knows if it is possible to change the icon of an item located in an item container of an actor to match the actual icon of the item? (instead of the classic grey link)

formal goblet
umbral glen
#

Okay thank you

#

By the way could you explain me what are used the label options such as prefix/suffix and icon?

formal goblet
umbral glen
#

ho okay thought it was used for entering specific formulas, I feel stupid now x)

formal goblet
#

For the icon: It will display an icon if you enter a valid font-awesome string (like 'dice-20'), check the website for it.

potent fossil
#

Hello, I hope your are all doing good!
is there a way to set up by default item modifiers in a template ?

potent fossil
#

Should we expect this feature any time soon 😂 ? or is it fundamentally impossible ?

#

Also, can you put a variable key in the item modifiers ? For example ref(stat)

#

ref(stat) + ${preitem}$

faint wharf
#

Guys i wanted to import from excel items. I dont understand data toolbox . Anyone know how to import items from excel? I have item template in system too

formal goblet
formal goblet
somber bay
#

Whenever I create an HP box and give it an MHP (maximum hp) for some reason the attribute box only shows the current but not the max

#

is there a way to edit the attribute bar directly or fix this?

formal goblet
# somber bay

Is it a manually created Attribute bar or was it automatically created by the system? Because the manual ones don't support token edit.

An Attribute Bars is automatically created when a number field has a defined max-value.

somber bay
#

This is the automatic one

#

but my max value is a variable which might be the problem MHP

#

(yeah just created NHP and NMHP same thing it shows the max empty when trying to assign the attributebar.nhp)

formal goblet
faint wharf
somber bay
faint wharf
somber bay
#

Yup! I can send you some of my files see if that helps crack the code

#

of stuff I successfully uploaded

#

I think the big part is that the JSON file needs some very specific editing

faint wharf
#

great! if i had somethin working i may reversingenner

somber bay
#

Like here I exported 'fireball' and turned it into a template where instead of the items name it uses "name":"{{iname}}" and so on for the rest of the variables

#

(this is for my friends weird d100 system not like D&D or anything in case it looks weird)

faint wharf
#

ok so round two 😄

somber bay
#

message me if you need more help I only come here when I need help so I rarely notice

thin leaf
#

Hello! I am trying to use a piece of text as a roll. I'll explain.
I have a variable that imports a text formated as a dice roll (like it literally says '2d6'), so I want to slot that into brackets so that I have a button that rolls a different amount depending on said variable.
Writing ${[dmgMain]}$ and ${[ref(dmgMain)]}$ both don't work. How would I go about doing this?

somber bay
#

@formal goblet not sure why but by default it shows up in my JSON as "mlife" instead of "${mlife}$" so I just edited the JSON weird but it works now

somber bay
thin leaf
somber bay
#

it looks like this on mine but I'm getting my dice from an item so keep that in mind

#

${item.idice}$

#

and to roll ${[:item.idice:]}$

thin leaf
#

After further testing, sending the value to a different label and trying to roll that label also fails. It is just not recognizing my dmgMain as 2d6 for some reason

thin leaf
somber bay
#

Yeah, but if you are doing it without an Item container I can take a look might be simpler

thin leaf
#

I just have an item attribute that sets a hidden value as "2d6" and I'm trying to use that hidden value, what do you wanna see?

somber bay
#

so if it is on an item you should be able to add a column to your item container that can present what the dice is and then in the roll part be able to roll 'em... if it is just an attribute on the character then yeah no need for a container it should grab the text from 2d6 and be able to roll it when you reference the object

thin leaf
#

I don't want it as part of the item container because I feel like it's cleaner to have a separated label

somber bay
#

so if it is an item but not referenced in a container not sure how to do it

thin leaf
#

this is the current design

#

There IS an item container, but I'd rather keep it for information instead of rolls

#

so in the item I have an item modifier that sets a variable as "2d6"

#

since that's the longsword damage in this instance

#

I tested with simply writing ${ref('dmgMain')}$ and that returns 2d6 with no issue

thin leaf
#

Let me double check

#

ok it's my bad, it IS working

#

I wrote ${[:dmgMain.]}$ by accident

#

god dammit

#

ok thank you very much

floral crater
#

hey!
how does the new implementation work: visibility formula?

faint wharf
#

hey guys how to add to roll popup with dropdown with value i want to add to calc ? like choose from -30 to +30

formal goblet
formal goblet
floral crater
#

an example?
like ${mycheckbox?}$

formal goblet
faint wharf
formal goblet
faint wharf
#

ok it musp be named userinput?

formal goblet
#

Nah, every name does

faint wharf
#

works! thanks mate!

potent fossil
#

Hello, i'm coming back with a new tricky roll I cannot get to work.
For a specific item that scales with rarity, I set up a label with the following formula :

${jetitemqte + ( modraritem * rar )}$d${jetitem}$

When computed this formula displays for example 4d6 in the corresponding label. I also have a hidden attribute with the same formula in it stored into the key : jettotal
In parallel I also have another attribute that is not supposed to be a roll bu a fixed value computed in a label and in a hidden attribute (bontotal) as follows :

${bonitem + (modraritem * rar)}$

When this item is dropped into the character sheet, the player can roll through a button that has for message roll this :

${#jet_item:= [item.jettotal]}$
[${jet_item}$]
${#bonus_item:= [item.bontotal]}$
${bonus_item}$

But the roll do not display offering the following error message :

foundry.js:11730 Uncaught (in promise) Error: undefined. Unresolved StringTerm item.jettotal requested for evaluation
[Detected 1 package: system:custom-system-builder]
    at StringTerm.evaluate (foundry.js:11730:11)
    at Roll._evaluate (foundry.js:9292:42)
    at Roll.evaluate (foundry.js:9256:25)
    at Formula.evaluateRoll (Formula.js:815:24)
    at async Formula.compute (Formula.js:270:30)
    at async ComputablePhrase.compute (ComputablePhrase.js:128:13)
    at async HTMLAnchorElement.<anonymous> (Label.js:247:21)
formal goblet
potent fossil
#

oh I see I'm missing the ":"

#

I'm feeling kinda stupid rn 😂

#

anyway thanks alot

robust wren
#

hello,
i need a little help with my rest macro.
i got this so far for the selected token:

const arr = a.props.Table_Schaden.Schaden.map(i => i - 1);
await a.update({"props.Table_Schaden.Schaden": arr});```

but i got this in my console: 
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'Table_Schaden')
That is the Part in actors.data under props:
edit: i mean game.actors
formal goblet
# dire socket That would be greatly appreciated, I do not mind the wait. Thank you for everyth...

Ok, I found out some things:

  1. It´s selected and not select 😅
  2. I don´t know why, but it doesn´t like sameRow() and getPropertyDataFromActor() in the same formula in the Label Roll Message (but normal Labels are fine? Idk, weird bug). At least the workaround is pretty simple. Just use a temporary variable for sameRow():
${#temp:= sameRow('Dmg_Type_1')}$
${temp == 1 ? getPropertyDataFromActor('target', "Prc_Def", 0) : temp == 2 ? getPropertyDataFromActor('selected', "Sla_Def", 0) : 1}$
faint wharf
#

guys how to refer name not value from dropdown?

formal goblet
faint wharf
formal goblet
faint wharf
formal goblet
#

It depends what you want to do. If you have the following dropdown-options

Key - Value
1 - Strength
2 - Dexterity
3 - Constitution

then yeah, you have to check for each case. It might be easier for you to use equal values like:

Key - Value
Strength - Strength
Dexterity - Dexterity
Constitution - Constitution

This would simplify A LOT

faint wharf
formal goblet
faint wharf
formal goblet
faint wharf
formal goblet
#

ok, and you also need the quality name from the dropdown?

faint wharf
#

yes adresed from outside like i do now ${item.jakosc}$ but its only number i need value not key

formal goblet
#

Then you have 2 options: Either with nested (or summarized) ifs or with a lookup table (dynamic table ftw).

faint wharf
#

hoped it will be adresable i think if must suffice ;] thankls

shy tendon
#

Is anyone having issues with deleting tabs within tabbed panels?

#

For some reason, a tab within a tabbed panel is not deletable for me. I can delete everything from within the tab but not the tab itself

robust wren
shy tendon
#

Okay, thank god its not just me

#

Appreciate your response. Its not mega big deal, just ugly to look at

formal goblet
#

Sorry, we don't have enough monkeys for testing 😅

shy tendon
#

😄

dire socket
shy tendon
#

Im a bit confused on css styling, iv never done css before, if I just want to change the background of the character sheet in general or change maybe some color of the text, i do have programming experience but have never done anything related to webpages lol. Does anyone have any resources to use? Or maybe even an example of their own "Additional CSS Classes" and from there I could just extrapolate how to do it? lol

ashen yarrow
#

I've puzzled out that nested ternaries work, but I'm wondering is there a better way to manage if/elseif/else or switch style logic?

This calculation is working for me in a hidden attribute, but feels really kludgy, and having to run everything through Math.js had me scratching my head.

${ (equalText(ref('class'), 'adept') or equalText(ref('class'), 'warrior')) ? floor((level-1)/4)+2 : (equalText(ref('class'), 'devoted') or equalText(ref('class'), 'expert')) ? (floor((level+3)/4)) : (floor((level+8)/6)-1) }$

I feel certain there's a better way?

ashen yarrow
dire socket
#

turns out shared vision breaks longer rolls that rely on getproperty, not sure why, but it just made it so that tokens that dont have permission to access certain tokens cant actually pull keys from them.

formal goblet
ashen yarrow
#

Gotcha, thanks!

prisma orchid
#

So if i'm reading this right the scenario of having a dynamic number of dice in a dicepool and having to evaluate them separately is going to be a bit of a problem, correct?

robust wren
potent fossil
#

Hello, is there a way to create an equality between a value and an array of value ?

#

for example if if 1 < x < 8 then y = 2

robust wren
#

Well no, you can't change a dofferent key

potent fossil
#

Yes also :/ I'll probably need some elseif cause the array is a bit more complex than 2 values

#

The idea behind it is you upscale the dice you use when you increase you stat

robust wren
#

Can you explain it s bit more? I am pretty sure there is a way.

potent fossil
#

In my system, it's called the intensity dices. If your stat is between 1 and 7, you use a 1d4 as intensity dice. If your stat is between 8 and 13, then it's 1d6....
0 = 0
1-7 = 1d4
8-13 = 1d6
14-16 = 1d8
17-19 = 1d10
20 = 1d12

This value has to be stored in key because some weapons relies on it for damage, dealing for example 2 intensity dices.

#

I have to find a way for the sheet to understand for example that is the stat is between 1 and 7 then the corresponding should store a value equal to d4.

robust wren
#

Table woth 2 columns
${'key' == 0 ? 0 : 'key' <= 7 ? 1d4 : 'key' <= 13 ? 1d6 : .......
That should do the job I think
The last one is >= 20

#

Key is the value of the stat

potent fossil
#

I'll try it and let you know

robust wren
#

I finished my rest macro. The Main part is reducing the value of a Numeric field in a dynamic table.
just in case someone will ever need it:

//this part detects, if a Token is selected. If not or more than one, it returns an error message
console.log("Tokens: ", canvas.tokens.controlled)
  if(canvas.tokens.controlled.length == 0 || canvas.tokens.controlled.length > 1){
    ui.notifications.error("Bitte nur einen Token auswählen");
    return;
  }
  let currentActor = canvas.tokens.controlled[0].actor

//this part reduces the value of the key 'Schaden', which is found in the dynamic table with the key 'Table_Schaden',  by 1, but not under 0
const a = currentActor;
const obj = Object.entries(a.system.props.Table_Schaden).reduce((acc, [i, vals]) => {
  acc[i] = {...vals, Schaden: Math.max(0, vals.Schaden -1)};
  return acc;
}, {});
await a.update({"system.props.Table_Schaden": obj});

//this part creates a chat message with the content and the selected Actor as speaker
ChatMessage.create({content: "Hat eine Rast eingelegt", speaker: {alias: currentActor.name}})```
floral crater
#

the move before/after function has disappeared?

formal goblet
robust wren
#

but maybe the move button isn't that bad. i had the point where i wanted to add a new column in the front of the table and had to drag every entry.......
well, while writing it down, i could have drag the empty field to the front, god i´m dumb

potent fossil
formal goblet
#

You forgot quotes at your dices, because these are strings.

robust wren
#

${'feu' == 0 ? 0 : 'feu'<= 7 ? d4 : 'feu'<= 13 ? d6 : 'feu'<= 16 ? d8 : 'feu'<= 19 ? d10 : 'feu'>= 20 ? d12}$

formal goblet
#

Comparing a string with a number is... mutig 😄

robust wren
#

yeah, i miss that more often, it is more a trail and error, label or rollmessage and all the other.
Just saw he missed the 1 before the rolls

#

${feu == 0 ? 0 : feu <= 7 ? 1d4 : feu <= 13 ? 1d6 : feu <= 16 ? 1d8 : feu <= 19 ? 1d10 : feu >= 20 ? 1d12}$

potent fossil
potent fossil
formal goblet
#

Almost. You forgot a final :

potent fossil
#

${feu == 0 ? '0' : feu <= 7 ? 'd4' : feu <= 13 ? 'd6' : feu <= 16 ? 'd8' : feu <= 19 ? 'd10' : feu >= 20 ? 'd12' :}$

#

yeah sorry with the quotes

formal goblet
#

And the value after the :

potent fossil
#

the value ? what value ?

formal goblet
#

Condition ? Statement1 : Statement2

#

You cannot finish with only 1 Statement

potent fossil
#

The Statement 2 would correspond to the value if every other condition are false ?

formal goblet
#

Yes

potent fossil
#

Perfect it works now

#

I actually enjoy this more than expected 😂 I wish I had the chance to learn more about it before

robust wren
formal goblet
#

And in the meantime you learn some programming basics

robust wren
#

yeah, and i could have made alot of things way more easy for me 😄

That is a rollmessage from me and i copied this message for every attribute. i tried to make as little changes as possible after copying.
Then i realised, i could have used replaceALL, change just the value i needed and never had to bother about correcting every entry, didnt i?

${#?{Erschwernis|0}}$
<h3>${!sameRow('Name_FGE')}$ erschwert um ${![:Erschwernis:]}$</h3>
<p><strong> Wurf 1: </strong>${roll:=[1d10%10]}$ <strong> Wurf 2: </strong> ${roll2:=[1d10%10]}$</p>
<p><strong>Probe: </strong> ${![:Wert:-:roll:-:Erschwernis:]}$ netto</p>
<p><strong>Schicksalsprobe: </strong>${![:Wert:-:roll:-:roll2:-:Erschwernis:]}$ netto</p>```
potent fossil
#

Hey guys I have a question for you guys
In my system upgrades can be installed on weapons to increase their efficiency. Since, there is no way of dropping an item in a item, is there still a way to automatise the process ?
I imagine a system with a dynamic table and a drop down list, but also I cannot see how to apply automatically the modification

cinder rock
#

In custom system builder, for getPropertyDataFromActor, can I fetch the actorName from a dynamic table? I would like to be able to easily adjust the actors that my formulas are calling from.

oblique spear
#

Fixed it

oblique spear
#

im having this weird problem where i moved something in a character sheet template and now i cant open any Effected* character sheets

cinder rock
# formal goblet Should be possible

It wouldn't let me. It's ok, I'll just hard code all my party member names in. Just means that if I need to change their names or if I run the game with a different group I'll have to change a lot of fields.

wary wedge
#

Hey guys
I need some help
Im trying to make a count success for system that im building, but I can't get it right
Skill checks in my system is 1d20 + statnumberD6
In d6 array any 5 is counting +1 to 1d20 result, and any 6 is +2 to 1d20 result
I was trying to use count success, but its working only on 5 or 6, I can't create a formula for 2 cs to work simultaneously

robust wren
#

If you have a working sheet, do not update it

storm matrix
#

Hey I was working on a macro and I was trying to get it to roll. When I run the macro it doesn't do anything but I get this error in the console

#

Uncaught (in promise) Error: undefined. Unresolved StringTerm undefined requested for evaluation
[No packages detected]
at StringTerm.evaluate (foundry.js:11730:11)
at Roll._evaluate (foundry.js:9292:42)

#

I'm new to coding. Does anyone have any idea what this error message means?

potent fossil
#

maybe if you send your macro it would be more clear

storm matrix
#

This is the part that started to get a bit wonky, Its a script macro so I'm a bit hesitant pasting the whole thing

potent fossil
#

You'll need someone with a higher level than me 😂

#

sorry, the others will probably answer you soon

prisma orchid
faint wharf
#

Can you aid me my popup does not compute into calculation

${?{wplyw1 | 0}}$ Test umiejętności ${sameRow('umsn')}$ ${fix((((ref(sameRow('umsa'), 0)+(sameRow('UMSWY')<-5 ? 0 : sameRow('UMSWY')))/(sameRow('UMSWY')<-5 ? 2 : 1))+wplyw1-[1d100])/10)}$ sukcesów

after i added wplyw1 popup and +wplyw1 to calculation i have error it posup but result is error

Uncaught (in promise) Error: undefined. Uncomputable token wplyw1 [Detected 1 package: system:custom-system-builder] at math.SymbolNode.onUndefinedSymbol

Without it it all works

somber bay
#

So I've been working on my best friends RPG for 6 months and accomplished A LOT

#

That said might try to adapt an indie game we like... do I need to take any extra steps to release it as a system? Do people need to download CSB? Do I just delete the templates and stuff?

oblique spear
#

${5+(equalText(Rank,'Starter')?5:equalText(Rank,'Beginner')?9:equalText(Rank,'Amateur')?12:equalText(Rank,'Ace')?14:15)+(Champion?1:0)-Ski_T}$ Rank is a dropdown list, Champion is a Check Box, And Ski_T is 16 Stats added together in hidden why am i outputing nothing?

#

Ski_T = 0 at the moment* rank is set to starter* champion is False

shut harness
potent fossil
#

Hey guys I think I discorverd somekind of bug, I don't know if you know the solution for it. If you reload a sheet while putting a key to hidden "${key}$" it will corrupt the sheet prevent you from reloading it again

#

seems like the $ is stored in the data of the sheet, and causes the bug with no way of removing it since it's hidden and the sheet won't reload

oblique spear
#

yeay @formal goblet you are on!

#

how do i better optimize this?

#

${equalText(ATK_TYP,'Normal')?(equalText(T_1,'Fighting')?-1:0+equalText(T_2,'Fighting')?-1:0):}$

formal goblet
# shut harness (Proof we need switch statements) 👆

Yeah, I agree on that. I like the switch-formula from Excel/Google Sheet way more than the ternary operator if you check one value against multiple cases. Give me a sec, I´ll implement this rn, I have some time to spare 😅

oblique spear
#

i got the above working

#

just the new thing rn

formal goblet
oblique spear
#

havent even tried to put it in yet..... im trying to make the type matchup from pokemon, i have ATK_TYP set to the moves Type And T_1 And T_2 Are The Defending type

#

any idea?

formal goblet
#

Fixed some mistakes: ${equalText(ATK_TYP,'Normal') ? 0 : (equalText(T_1,'Fighting') ? -1 : 0 + (equalText(T_2,'Fighting') ? -1 : 0))}$

oblique spear
#

Um it's (If ATK_TYPE = Normal Then If T_1 = Fighting Then -1 Otherwise 0 Plus If T_2 = Fighting then -1 Otherwise 0 Otherwise If ATK_TYP = ....... )

#

Is the logic that I can workout but if I'm not mistaken you put (If ATK_TYP = Normal Then 0 otherwise if T_1 = Fighting then -1 otherwise 0 plus......

#

I habitually nest Ifs that's why I ask for the more accurate solution

formal goblet
#

The type table for pokemon is pretty large, isn´t it? If you´re trying to check if the attack type has an advantage, disadvantage or nothing from both against the defending type, then I´d recommend to use a Lookup-Table instead of trying to catch every case in formulas.

oblique spear
#

Ok how would I do that:
1 Where would I make the table?
2 how can I get a single output from 1 move type and 2 defending types
3 thank you so much for all your help

#

I'm trying to have this ready for tomorrow to play.... Or at least somewhere remotely functional I'll add more complicated stuff later

formal goblet
#
Dynamic Table: Type_Table
Rows: Attacker, Columns: Defender
|  -    | Fire  | Water | Gras  | ...
| Fire  |  0.5  |  0.5  |   2   | ...
| Water |   2   |  0.5  |  0.5  | ...
| Gras  |  0.5  |   2   |  0.5  | ...
...

Formula would be something like ${fetchFromDynamicTable('Type_Table', DefenderType, 'AttackTypes', AttackerType)}$ (for checking 1 Attack Type against 1 Defender type).

oblique spear
#

And I can do that 2x In hidden then have my single output be the 2x hidden together?

formal goblet
#

Normal Label formula or Label Roll Message?

oblique spear
#

label as in the future i intend to call on it

formal goblet
#

Btw, what happens mathematically if a pokemon has 2 types?

#

Are the factors just multiplied together?

oblique spear
#

yea in the games the multipliers can be .25-4x damage

formal goblet
#

ok, that´s simple. Just multiply both results

oblique spear
#

in the tabletop version its from -2 to +2

formal goblet
#

Ok, in this case it would be an addition, but that wouldn´t change the complexity

oblique spear
#

thank you so much and sorry for being so needy

formal goblet
#

Anything else that you need?

oblique spear
#

yea i just went to make the dynamic table... i dont see an option for rows and columns.... is that in the read me how to do?

#

i can look there if it is

formal goblet
#

You can create columns as soon as you´ve created the table. Rows must be added in the character sheet (not in the template)

oblique spear
#

so i have to make the Type Match up on each character sheet i make?

formal goblet
#

Yeah, or you make a default character and duplicate him for new characters. That would spare you the time to recreate it

oblique spear
#

is there any way i can put it in a journal entry?

formal goblet
#

Nope 😅

oblique spear
#

Whelp looks like imma do it that way

formal goblet
#

I think I have a good idea, but I have to check it out because I´ve never done this before. How about creating the table in an item and do the calculation on an Item Container? But first I have to check if you can do something like fetchFromDynamicTable('item.TableKey', ...) 😅

oblique spear
#

lol That would help Alot!

formal goblet
#

It actually works, WTF

oblique spear
#

here is something else i have the chart ready to be filled how would i put in ineffective (Normal moves do no damage to Ghost types)

formal goblet
#

-99? 🤣

oblique spear
#

then i would have to add something at the end like If(total)<-2?"No Damage":(total)

#

correct?

formal goblet
#

Would be the easiest, I guess.

oblique spear
#

and by that logic i could use -4 rather as thats even simpler

oblique spear
#

${fetchFromDynamicTable('item.Type_M', T_1, 'AttackTypes', ATK_TYP)}$

#

Correct?

#

so what would happen is It would look for the Table, then the Column that matches T_1, then go to the first column to look for the one that matches ATK_TYP?

#

@formal goblet ?

faint wharf
faint wharf
formal goblet
formal goblet
#

Ok, it´s more it selects the defender value, not the type of it. So a bit of a wrong wording from my side, but the formula should still do what I expect to do.

shy tendon
#

Hey, quick question about conditionals, is there a reason I cant check strings or something?

Lets say this:

${sameRow('weapon_magazine_bullet_type')=="H" ? 0 : 1}$

#

this sameRow key that im calling is just a text field. How do I get this to actually check if the strings match

#

Am i dumb?

formal goblet
#

Use equalText()

shy tendon
#

lol

#

so like

equalText('weapon_magazine_bullet_type'), "H") ? 0 : 1

formal goblet
#

Strings are a bit special in terms of equality 😅

#

1 Parenthesis too much

shy tendon
#

oh yeah, my bad, i mean id still have to sameRow that key

#

but okay, that is basically how you use it, thank you i appreciate it

fair lotus
#

hello, complete newbie here! I'd like to make a custom game system and was wondering how to get started?

uneven grove
#

https://youtu.be/yGVOj_iqiKg I used this to get going with my first world. After a while you should know enough to be able to play around and try new things

fair lotus
#

thanks!

formal goblet
shy tendon
#

Any way that you can kinda do what FetchFromDynamicTable does but for an item container?

#

As an example, I have the weight of an item in an item container that I want to add to the actors weight on its sheet

uneven grove
# storm matrix

Your error message means that one of your string variables has no value assigned to it when you attempt to use it. I suspect token.actor.getRollData.Accuracy_bonus. Try adding console.log(token) and make sure it's got the data you're expecting.
Also, what you have will only get it to roll internally. If you want to be able to see the roll, you'll need to put it in a chat dialogue window. Also, this error doesn't seem specific to custom system builder. If you try macro-polo for your macro issues, they are usually super quick and helpful

faint wharf
#

someone have idea how to deal with temporary modificators? So that thay work on stats and can be add multiple times like in dynamic table or item table?

formal goblet
formal goblet
faint wharf
stoic loom
#

Does anybody know the component key to the PC´s name?

formal goblet
stoic loom
#

Damn.

#

${#?{Modifikation|0}}$
Can anybody tell me why this (Roll Message) is shown in chat, although I should´ve played the # right?

formal goblet
#

It shouldn´t and it doesn´t on my end

stoic loom
#

Alright, thanks!

formal goblet
#

The only thing you get is an empty chat message

stoic loom
#

That isn´t supposed to happen either, it´s supposed to ask you for a value input and then give an empty chat message

formal goblet
#

Well, it does both on my side

stoic loom
#

Okay, now that´s weird. Thanks!

formal goblet
#

I copy & pasted your formula and it works like intended

dire socket
#

So uh, can't delete tabs ig? Very weird

umbral glen
#

Hello! Is is possible to only display the results of a dice roll made from a label instead of having the click box? i use only D6 so i would to have the classic results appearance or so like this, if not, if there a possibility to get the results of the results of the dice so i can display it in a message for exemple?

umbral glen
#

Sry for asking help, i took time to re-read the gitlab, i didn't saw it at first, sorry to have bothered you, you can delete the messages if you want ^^

somber bay
#

Can a custom system be released Standalone or only as a World requiring Custom System Builder? Thinking of building Liminal Horror without just hacking Cairn

formal goblet
robust wren
robust wren
robust wren
ashen yarrow
#

@robust wren here's an example from the 5e-based system I'm working on:

${#check_type:='Strength Check'}$
${#modifier:=ref('mod_str')}$
${#roll1:=[1d20]}$
${#roll2:=[1d20]}$


<!--DO NOT EDIT BELOW-->
<div class="mb-roll">
<h3>${!check_type}$</h3>
${! (equalText(ref('roll_type'), 'advantage')) ? '<p>Advantage</p>' : (equalText(ref('roll_type'), 'disadvantage')) ? '<p>Disadvantage</p>' : '' }$

1d20 + ${!ref('mod_str')}$

${! (equalText(ref('roll_type'), 'advantage')) ? concat( '<br><strong class=\"result\">', string(max(roll1, roll2)+modifier), '</strong><br><small>(rolls ', string(roll1), ', ', string(roll2), ') +', string(modifier), '</small>' ) : (equalText(ref('roll_type'), 'disadvantage')) ? concat( '<br><strong class=\"result\">', string(min(roll1, roll2)+modifier), '</strong><br><small>(rolls ', string(roll1), ', ', string(roll2), ') +', string(modifier), '</small>' ) : concat('<br><strong class=\"result\">', string(roll1+modifier), '</strong><br><small>(roll ', string(roll1),')</small>')}$

${! (equalText(ref('roll_type'), 'advantage')) ? (max(roll1,roll2)==20 ? '<p class=\"critical\">CRITICAL SUCCESS!</p>' : max(roll1,roll2)==1 ? '<p class=\"fumble\">FUMBLE!</p>' : '') : '' }$

${! (equalText(ref('roll_type'), 'disadvantage')) ? (min(roll1,roll2)==20 ? '<p class=\"critical\">CRITICAL SUCCESS!</p>' : min(roll1,roll2)==1 ? '<p class=\"fumble\">FUMBLE!</p>' : '') : '' }$

${! (equalText(ref('roll_type'), 'normal')) ? (roll1==20 ? '<p class=\"critical\">CRITICAL SUCCESS!</p>' : roll1==1 ? '<p class=\"fumble\">FUMBLE!</p>' : '') : '' }$
</div>

And here's a snip from my css file

.mb-roll{ text-align: center; }
.mb-roll .result{ font-size:2em; }
.mb-roll .critical{ color: #0c6400; }
.mb-roll .fumble{ color: #640000; }
#

^Note: this is another place where I just really wish switch statements were a thing.

ashen yarrow
formal goblet
#

Adding pure functions is the easiest in this system.

prisma orchid
# umbral glen Hello! Is is possible to only display the results of a dice roll made from a la...

The default for foundry VTT dice rolls is to only show the dice total and then unfold the view on click. This is not desirable for a lot of systems. There are several ways to change this as a user,…

umbral glen
prisma orchid
umbral glen
# robust wren Tell us what you found 😄

Sorry we were actually playing ^^
What i found is that you can change the formulas of a roll to be like a normal roll:
on a label for rolling 4d6 you put ${[4d6]}$, just add a ! before the roll parameters like this ${![4d6]}$

dire socket
#

Oh wait

#

you literally just said that

umbral glen
#

hahaha no problems friend

robust wren
sharp prairie
#

This^^^ Ya'll are great in here and I've learned so much but I know I've barely scratched the surface of any "basic understanding of html/css/js". I am CERTAINLY having a ton of fun though!😆

umbral glen
#

Is there anyway to change a label icon with a formula between two ? (fontawesome compatible i talk) . Or AI saw in Label an Advanced configuration with a Visibility Formula, can someone tell me how does it work?

fair lotus
#

okay, so I'm having a slight bit of trouble with the Custom System Builder. I have a drop down menu that I want to use to select which stat is rolled with an attack. How do I do that? Currently doing this:
Attack Roll: ${ATTACK_STAT == hard ? [2d10] + HARD + MOD : ATTACK_STAT == keen ? [2d10] + KEEN + MOD : ATTACK_STAT == calm ? [2d10] + CALM + MOD : ATTACK_STAT == daring ? [2d10] + DARE + MOD :}$

#

but its throwing an error

fair lotus
#

got it working, thanks!

#

now I'm wondering how to add "If And" conditions

#

is that mentioned in the main docs?

fair lotus
#

actually, at this stage I'm trying to implement a loop of some kind or other

#

is there a way to roll a varying number of dice and not sum them?

#

working on a system where you can have 1 weapon make multiple d20 attack rolls

robust wren
#

Maye a dynamic table or item Container. An then a field to put the number of d20 in there. Or can the same weapon have different d20 on the same Charakter?

#

Maybe with a user input asking how many d20 to roll?

fair lotus
#

I've got an input for the number of d20s to roll and can get that number of dice rolled

#

but Foundry automatically sums all of the d20s

#

instead of parsing them individually and displaying their values

robust wren
#

I think this is only doable with a macro.

fair lotus
#

welp, time to teach myself how to add one of those to foundry

robust wren
#

I made it with the module advanced macros. Then you can run a macro via /amacro <macronsme>
I am using it for Sequencer and adding animated spell effects

brittle moth
#

Custom System Builder - 2.2.1 Beta version

A small beta version has just been released with the following changes :

### Fixes

  • [#229] Fixed drag & drop issues
  • [#223] Fixed tab window edit title
  • Fixed tab deletion issue

I should be releasing it completely on Tuesday, if it does not cause more bugs 🙂

robust wren
brittle moth
#

Sadly, I can't be sure every drag&drop issue will be solved, as I couldn't reproduce the data loss behaviour :/

#

But the fix I made may be fixing the data loss as well, since it has to do with how the template is saved on drag & drop 🙂

shy tendon
brave trench
#

@formal goblet Hi! I read somewhere that you have a work around for summing up values in an item container. Ex: tallying up total item weight in a container. Would you mind directing me to info on how to do that?

brave trench
#

Thank you!

robust wren
#

Hello,
just wanted to Share my Macro for automated Backups:
This is a Worldscript. For using as a Macro ingame you have to make a few changes.
The Script starts with Asking you, if you want to export the Actos into a Compendium
if yes, The Macro will do this every 30 Minutes. You can Change the Interval in the Script under setInterval(() => {exportToCompendium(); }, 30 * 60 * 1000);
The Macro will create a new Compendium in the format "Template Backup YYMMDD"
So you have a new Compendium for every Day. This prevents the Compendium to get to big and makes it more easy to delete old Backups.

I have only the Macro tested and i haven't tested it for a longer Duration, but i dont expect anything going wrong.

The Script will only Backup you Actor templates, no items. And Only the templates.

#
Hooks.on("ready", async function() {
  // Popup if backup should start
  let confirmed = await Dialog.confirm({
    title: "Export Actors to Compendium",
    content: "Do you want to export Actors to the Compendium?",
  });

  if (confirmed) {
    exportToCompendium();
    setInterval(() => {
      exportToCompendium();
    }, 30 * 60 * 1000);
  }
});

async function exportToCompendium() {
    const now = new Date();
    let dateString = `${now.getFullYear().toString().slice(2)}${(now.getMonth() + 1).toString().padStart(2, "0")}${now.getDate().toString().padStart(2, "0")}`;
    let compendium = game.packs.get(`world.template-backup-${dateString}`) ||  
                     await CompendiumCollection.createCompendium({
                        label: `Template Backup ${dateString}`,
                        id: `world.template-backup-${dateString}`,
                        private: true,
                        type: "Actor"
                     });
    let actorsToExport = game.actors.filter(actor => {
        // filter for _template type
        let isTemplate = actor.type === "_template";
        let isInCompendium = compendium.index.find(e => e.name === actor.name) !== undefined;
        return isTemplate && !isInCompendium;
    });
    let completeDate = dateString + `_${now.getHours().toString().padStart(2, "0")}${now.getMinutes().toString().padStart(2, "0")}`;
    const toCreate = actorsToExport.map(actor => {
        let actorData = actor.toObject();
        // change Name with timestamp
        let actorName = actorData.name.replace(/\s/g, ""); 
        let newActorName = `${actorName}_${completeDate}`;
        actorData.name = newActorName;
        return actorData;
    });
    await Actor.createDocuments(toCreate, {pack: `world.template-backup-${dateString}`})
}```
sharp prairie
#

Since I have no idea what any of this says, am I safe to say that all I need to do here to use this is copy/paste into the macro bar? Is there anything I need to do prior? Like make a Base compendium? Or anything in the code I need to replace with my info? Thank you so much for making this BTW!!

#

Also, once I push the button the first time it just auto does it or do I need to do anything else?

robust wren
#

The World Script starts with the World loading. There are some preperations you have to do:
https://foundryvtt.wiki/en/basics/world-scripts

that would be the Macro you can use from the macro Bar.

 // Popup if backup should start
  let confirmed = await Dialog.confirm({
    title: "Export Actors to Compendium",
    content: "Do you want to export Actors to the Compendium?",
  });

  if (confirmed) {
    exportToCompendium();
    setInterval(() => {
      exportToCompendium();
    }, 30 * 60 * 1000);
  }
;

async function exportToCompendium() {
    const now = new Date();
    let dateString = `${now.getFullYear().toString().slice(2)}${(now.getMonth() + 1).toString().padStart(2, "0")}${now.getDate().toString().padStart(2, "0")}`;
    let compendium = game.packs.get(`world.template-backup-${dateString}`) ||  
                     await CompendiumCollection.createCompendium({
                        label: `Template Backup ${dateString}`,
                        id: `world.template-backup-${dateString}`,
                        private: true,
                        type: "Actor"
                     });
    let actorsToExport = game.actors.filter(actor => {
        // filter for _template type
        let isTemplate = actor.type === "_template";
        let isInCompendium = compendium.index.find(e => e.name === actor.name) !== undefined;
        return isTemplate && !isInCompendium;
    });
    let completeDate = dateString + `_${now.getHours().toString().padStart(2, "0")}${now.getMinutes().toString().padStart(2, "0")}`;
    const toCreate = actorsToExport.map(actor => {
        let actorData = actor.toObject();
        // change Name with timestamp
        let actorName = actorData.name.replace(/\s/g, ""); 
        let newActorName = `${actorName}_${completeDate}`;
        actorData.name = newActorName;
        return actorData;
    });
    await Actor.createDocuments(toCreate, {pack: `world.template-backup-${dateString}`})
}
robust wren
sharp prairie
#

oh OH wow Definitely above my pay grade😅Thank you!

shy tendon
#

when i attempt to configure an item modifier to be able to add weight, all i get inside my label on my actor sheet is a "NaN"

robust wren
shy tendon
#

i have that open and used that to get here

#

but it just gave me NaN

robust wren
#

so you have a Key ToalWeight on your template?

#

or PC_weapon_weight on yout Actor template as far as i see on the picture?

shy tendon
#

the "Key" you see on the left is a label with default 0 and the value formula on the right is the key for the weight on the item

#

yeah exactly

#

it definitely does modify the key on the actor sheet, just seems to be strange. I presume its some sort of like issue with maybe something being a string or integer, idk, but idk how to fix it

robust wren
#

and the weight is a label and not numeric field, Textfield or something like that?

shy tendon
#

the weight on the actor sheet is a label with the optional text set to 0

#

if i change the optional text to nothing, it just gives me nothing as well lol

robust wren
#

give me 2 min i will try it on my version

shy tendon
#

thx

robust wren
#

yeah no, i tried alot, but i get only the error No Access to property "Weight"

shy tendon
#

okay, so its just like a bug or something then? Damn, alright

#

thats fine

brave trench
#

@formal goblet I tried to do a quick test on a new/blank sheet using your FAQ instructions regarding item container weights and keep getting NaN. I may be doing the default value 0 wrong, how do I do that? I'm assuming just entering 0 in the label is incorrect lol

robust wren
#

someone seeing, what is wrong here?:

<p>${!(equalText(ref('Art'), 'Probe')) ? (roll1 <= ref('modifier') ? '<p style="color: green; font-weight: bold;">Erfolg!</p>' : '<p style="color: red; font-weight: bold;">Fehlschlag!</p>' ) : ''}$ </p>
ashen yarrow
#

A couple of things stand out, not sure what you are seeing that is unexpected, but you need to escape the quotes i.e. style=\"

#

You also shouldn't put <p> tags inside other <p> tags. Paragraphs are block elements. That's not likely to break anything, but it might look weird.

#

Does anyone have a good example I could look at for d&d style classes?

I'm curious how other folks are implementing levels/classes in systems that have them. Using item containers for class abilities seems close, but not quite what I'm looking for. Dynamic tables similarly seem close, but a bit limited. What I want to do is minimize the amount of lookups and/or copy/paste tasks for someone to add levels on the sheet. Ideally, levelling up would just prepopulate the right abilities on the sheet for that class/level combo.

shy tendon
robust wren
robust wren
ashen yarrow
#

Ah, that's not how a style tag works. Try changing those back to <p> tags, and the one wrapping it all up to a <div>

robust wren
#

oh man, i am not the type for html 😄

ashen yarrow
#

style tags hold css rules, like what goes in a css file. they don't render anything themselves

robust wren
#

ah yes, that works now 😄

shy tendon
#

quick question, if i wanted to include the name of an item in a chat message like when rolling, how would I do that? What is the code to get the name of the item like if i wanted a roll message to say

"You are shooting an [item name] "

robust wren
shy tendon
#

yes

#

i will say the name of the item is nowhere on the item sheet as a key, only in the name

robust wren
shy tendon
#

hm, lemme try again, didnt seem to work first time but i could also be dum

#

okay, it worked this time, lol sorry for dumb question smh

umbral glen
sharp grotto
#

I want to update health on an actor with a macro.
The path i have found for my Current health is a string and is located here js canvas.tokens.controlled[0].actorsystem.props.current_hp
were do i look for a Integer instead ?

robust wren
#

Does anyone know how to build the Chat message with a part looking like the default roll?
So i have the border and can click on it to see what dice were rolled?

robust wren
ashen yarrow
# umbral glen I'm agree with you on this point i'm pretty curious

Without some sort of action buttons in the sheet that could trigger some fairly complex javascript to manipulate fields I'm kind of thinking this isn't going to totally work how I'd like it to (i.e. no way to replicate something like the roll20 charactermancer), but I do think I can mostly make do with plain html/css and stuff that into the sheet. There will be a fair amount of hidden stuff in the dom, but the formula calls should be minimal.

robust wren
ashen yarrow
sharp grotto
robust wren
fair lotus
#

how do I prompt a player for input inside a formula? I know in the documents it says to use
?{<varName>} but when I use that it just throws an error

#

or, more specifically, when I type out:
${${Save}}$

umbral glen
#

You're using twice the '$' symbol imo, which is used only for start and end of the formula, if your field is called 'Save' then the second line should be ${Save}$

fair lotus
#

that didn't work either

#

it doesn't do anything now

umbral glen
#

ho and also i'm not entirely sure but i don't think it is handled without any module

fair lotus
#

what?

umbral glen
#

I mean the fact of asking a user an input, maybe it's not handled without a complementary module

fair lotus
#

I don't fully follow what you are saying

#

what is a complementary module in this instance?

umbral glen
fair lotus
#

but in the documentation for the CSB itself it says this:

#

I'm an idiot

#

I've been using '$' instead of '?' this whole time

#

it works now

#

it always worked

#

am dumb

#

thank you Zog!

umbral glen
#

No problem i didn't helped that much haha

robust wren
#

anyone seeing what is wrong here?:
${!equalText(ref('Art'), 'Probe') ? concat('<li class="roll die d10">', string(roll1), '</li>') : concat('<li class="roll die d10">', string(roll1), '</li>', '<li class="roll die d10">', string(roll2), '</li>')}$

#

i see it, just a sec for testing

#

yep, fogot to space out the "

#

that is the html formula for the Standard Roll, when you type /r 1d10 into the Chat.
just change the values with your formula and you should be ready to go.
You can make your own changes, too.

<div class="message-content">
        <div class="dice-roll">
    <div class="dice-result">
        <div class="dice-formula">1d10</div>
        <div class="dice-tooltip expanded" style="display: block;">
    <section class="tooltip-part">
        <div class="dice">
            <header class="part-header flexrow">
                <span class="part-formula">1d10</span>
                
                <span class="part-total">5</span>
            </header>
            <ol class="dice-rolls">
                <li class="roll die d10">5</li>
            </ol>
        </div>
    </section>
</div>

        <h4 class="dice-total">5</h4>
    </div>
</div>

    </div>
#

for example, i added a Title just under the first div

#

@formal goblet i think i already asked this, but it is not possible to get a popup / userInput with just two Buttons, isn't it?

#

Like asking for Advantage and Disadvantage

ashen yarrow
robust wren
#

yeah, my system has only two options: 1d10 or 2d10
So i think i will just make two Roll-labels next to each other. Should be ok with the Space

ivory dome
#

Is there a way to hide certain stats in a Item Container for certain items? I have a "weapons" where I need to show the Defend Roll for melee weapons, but not for ranged ones. I tried putting "item.range==0" in the visibility formula for the label, but it just hides it for all items.

#

In the image, the Defend Column should be showing for the Unarmed and Baton attacks, and not for the Heavy Beam Pistol

umbral glen
#

Use a formula in the label with a condition, something like this should do :
${item.range!=0? 'Yes' : 'No' }$
Replace Yes by your icon and the stat you want, for no simply let a blank ' '

#

Is it possible to call a Macro from a label ?

formal goblet
onyx hull
#

Hey, not sure if it's correct channel to ask this question, but I'm trying to translate one game system for my party. So, I tried to translate the text manually using visual studio, but it the Foundry cyrillic letters are showing as squares with "?" sign. Is there a way to change it somehow?

#

Never worked with json before tbh

umbral glen
#

Have you tried with another program like the base note app from windows or notepadd++? seems strange

#

@formal goblet Can you use a fetch in a dropdown list ?
I have multiple careers divided each in 3 sub careers.
In 1- the list of all careers
In 2- Here is my question. I want to make the dropdown list n°2 correspond to the results of dropdown n°1
In 3- For instance Academician has 3 results Engie, Scholar, Strategist

onyx hull
#

Yet another time disappointed in VS

robust wren
umbral glen
#

Okay good to know thanks Mot'!

brave trench
robust wren
#

Question about the Macro API
I have a roll message, that I will use for every roll, with just two changes.
Can I make a macro, call this roll message with given parameters?
For example actor.roll(defaultRoll){modifier := ref('STR'), dice:= 2d10}
Or something like this?

ashen yarrow
# umbral glen <@199124934880919552> Can you use a fetch in a dropdown list ? I have multiple ...

I tried and failed to come up with a good way to do that same thing. Ultimately I made separate dropdowns for each group of subclasses and show/hide them with visibility rules. There is a small downside to this though - each dropdown has a different key so before I can use it elsewhere I have to check the parent class also. (i.e. I can't just call something like ref('subclass'), I have to do something like ${equalText(ref('class'), 'adept') ? subclass_adept : ''}$

pale summit
#

Am I missing something really obvious regarding cloning fields? Is there a way to do this that I am overlooking?

#

Like can I create a default layout for a weapon and then clone it twice for them to have three weapons on the sheet?

robust wren
pale summit
#

Oh I hadn't realize I could drag between template. That will work. Thanks!

formal goblet
#

You can also hold CTRL. Instead of moving, the component will be duplicated.

brave trench
#

Is there some function that lets me duplicate sections of my sheet in the template? I was moving panels around and it duplicated the entire panel which had a lot of stuff in it.

Not sure if it was a bug or a normal function and accidentally triggered it. And if it isn't an intended function it totally should be lol...

spare sky
#

Hello!

I have a problem and I hope someone here can help me with it!

I have designed some templates for Actors and Items in the system "Custom System Builder" in a test environment and created them from scratch.

Now I wanted to integrate these into my game world - but I overlooked that I had implemented them with the system "Simple World-Building".

Since I have invested a lot of work in this world: do I have the possibility to somehow transfer the templates from the CSB system into the other game world?

Thank you very much for your help! 🙂

umbral glen
robust wren
robust wren
# spare sky Hello! I have a problem and I hope someone here can help me with it! I have ...

I think that is more a question for #core-how-to
But for a workaround:
#513918036919713802 look at the first pinned comment. That is shared Compendium Module. You can put everything you created into compendiums (Macro, Scenes, Journals, Music, etc.) An import them into your new World.
Just as an Idea'
Maybe you can just copy the things from your world (Scenes.db
, and so on) but I am not sure of it works

stiff forge
#

Here is hopefully an easy question: How would I call for a roll from a table in a Label using the label Roll Message? I have a hit location table that I would like to call with my 'Make an Attack' label, but I haven't a clue how the syntax goes for making a call to that table...

umbral glen
prisma orchid
#

Hey! I'm back. I've spent a little time wrapping my head around using the computablePhrase API and have a theoretical question: If i'm getting this right i could build a computablePhrase that just lists all the csb variables from a sheet, compute the values and then use them for writing foundry core macros, including the roll API and core chat-message behaviour. Or am i missing something? (This seems promising in regard of my problem of evaluating individual dice from a roll. might be a bit overkill but hey...)

formal goblet
prisma orchid
formal goblet
ashen yarrow
robust wren
#

i have done alot with Macros and the System 😄
Some good to know things:
await a.update({system: {props: {<key>: <value>, <key2>: <value2>}}}); - let you change the Value of one or more keys

const obj = Object.entries(a.system.props.Table_Schaden).reduce((acc, [i, vals]) => {
  const s = Math.max(0, vals.Schaden - 1);
  const d = s === 0;
  acc[i] = {...vals, Schaden: s, deleted: d};
  return acc;
}, {});
await a.update({"system.props.Table_Schaden": obj});
``` - reduces every entry with Key Schaden in my dynamic table Table_Schaden by 1 and deletes the ones, that reach 0

alternatively you can use Advanced Macro module to call Macros from a sheetroll with /amacro <macroname>, or you can use the (propably easier solution) of mattbeck 😄
stiff forge
# umbral glen on your label roll message put this ${#Your table name}$

Thanks- I tried that, using my table name ${#Hit_Location}$ but I get the following error in the console:

Uncaught (in promise) Error: undefined. Uncomputable token Hit_Location
[Detected 1 package: system:custom-system-builder]
at math.SymbolNode.onUndefinedSymbol (Formula.js:723:27)
at math.js:26377:89
at Object.evaluate (math.js:24162:45)
at r.evaluate (math.js:24139:55)
at Formula.computeStatic (Formula.js:728:27)
at Formula.compute (Formula.js:292:21)
at ComputablePhrase.compute (ComputablePhrase.js:128:27)
at async HTMLAnchorElement.<anonymous> (Label.js:247:21)

formal goblet
stiff forge
#

its a normal table

formal goblet
#

Well, normal tables are irrelevant in terms of computations. So you cannot reference them

#

It doesn´t matter if a key is inside or outside of a normal table

stiff forge
#

ahhh, so you cant call a table (using the label message) from a normal table in Foundry ? This is not a table in the CSB/character sheet, just a table created in my Foundry game that I would like to have the label message roll on...I was not clear on that I think

formal goblet
shy tendon
#

I presume you put the [] around the hit table in your actual code?

stiff forge
#

ahh, yes, I forgot the [ ] ...thanks!!!

shy tendon
#

🙌🙌

formal goblet
#
You can also use Roll Tables, using the syntax [#<rollTableName>]. Just put a # before your roll table name, inside
brackets, and the system will roll its default formula and integrate the result in the message.

You can customize the Roll Table formula by adding a Roll formula in this
syntax : [#<rollTableName>|<rollFormula>]. The formula must follow roll formula syntax, with :: to delimit the keys.
This formula can be a Dice roll or a constant value, the latter drawing always the same result from the Roll Table.
stiff forge
#

Yeap..."RTFM" is something ive told others to do...lol shame

#

Seriously - Thank you folks very much for the help, I appreciate it

formal goblet
# ashen yarrow <@303274115433889794> , <@199124934880919552> I've been playing around with ad...

It looks promising from the first sight. If you like, we could integrate this component into the system as a core feature.

Please let me know by an issue if you implement a Component you think should be available to all ! Link your
implementation, and I'll most likely add it to the system !

One thing I´d do different is to do the alteration of the value via key + formula (almost like Item Modifiers work) instead of via a script. This makes it easier for the user (better readability, no boilerplate-code like document.querySelector()) and is also safer.

carmine escarp
#

afternoon fellas. I am totally new to this and am hoping to hop on in. I have a rudimentary knowledge of C++ and was hoping if I could find some help for the baby steps of making a character sheet

formal goblet
carmine escarp
#

safe to assume it is a key'd term with a value attached to it?

ashen yarrow
formal goblet
carmine escarp
#

i have that site open but it still seems kinda confused and sterile

#

well, guess i should be able to beat my head against this wall till one of us breaks

formal goblet
ashen yarrow
shy tendon
#

Like, a roll is done, ammo is subtracted by 1

#

I was planning to do the macro but this could be simpler?

brittle moth
ashen yarrow
# shy tendon I was planning to do the macro but this could be simpler?

I suspect for what you are describing using a macro is probably actually easier, or at least as easy. 🤷‍♂️

Basically this just creates a button with a click handler you can pass js to. So, I imagine you could code a button so that the js fires the roll and changes the ammo counter, but I'm not sure it saves you anything vs using a label roll and calling a macro to do other stuff along with it.

You'd use this instead of a rollable label and key off of it to do whatever other manipulations you need.

ashen yarrow
#

For my specific use cases I have at least 2 things I'll be building with this.

  1. New Character button that sets up a character at 1st level
  2. Add Level button that handles all of the conditional logic for what you get at a certain level for your class/subclass/etc. I can sort of do this with just labels and existing fields, but not for things that rely on user choice. For example w/o this I can fairly easily render spells per day, but not pick 2 more spells or pick a new feat that you qualify for.
brittle moth
ashen yarrow
#

One thing that I think might help folks would be some sort of scaffold or a super minimal hello world example along with the docs. I had to sort of muddle through some of it, not too bad but I had to dig into the system source a fair bit to puzzle out some bits.

brittle moth
umbral glen
#

What is that @brittle moth? priorizing quality over quantity hmmmm? sigma.

spare sky
#

Hello!
Somewhere I still have a bug here, which I'm sure you can help me with:

I have an item container "item_container_armor", in which I list all armor parts. In this container I give the respective armor value per part to "key_item_rw".

Now I want to output the sum of all armor values in another place. This is what I did, but unfortunately it does not work:

${floor(sum(item_container_armor$key_item_rw))}$

Can you tell me where my error is?

Thanks a lot!

spare sky
formal goblet
#

Nope

spare sky
#

Ok... Danke!

umbral glen
#

Does someone can tell me how i can access an item Field Text from a Js file? I don't know Js ^^"

umbral glen
#

I tried theses:
let itemDescription = {{item.description}};
And
let itemDescription = ${item.description};
But it doesnt work as you can tell lol

floral crater
#

:= not = ?!

formal goblet
# umbral glen I tried theses: let itemDescription = {{item.description}}; And let itemDescript...

You need a reference to the Item Path. It might be easier if you do the call from the Item directly, but if you do it from an Actor (or elsewhere), you have to get the right reference first (which includes some filtering logic to get the right Item). After that, you can call system.props.Key on the Item reference to get the value of your Text Field.

{{ }} is something I only saw in HTML (data binding in Angular), not JS 😅
${ } are template literals and also something completely different from what you want: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals?retiredLocale=en

Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates.

brittle moth
#

Custom System Builder 2.3.0 - Roadmap !
Hello everyone !

Here are the features I will integrate in the version 2.3.0 of Custom System Builder ! They are listed by order of priority, meaning the most top ones will be developed first and the last items may not be in 2.3.0 if I can't develop them and release 2.3.0 in a reasonable amount of time 🙂

- Formula computing [#126 - Allow roll messages to edit values on the sheet]
More customization, as clicking on labels will allow you to directly edit values in the sheet ! This will unlock new possibilities like healing, recovering spell slots, or ammunition management !

- Component configuration [#215 - Add delete warning on component deletion]
Little safety update to prevent deleting components by mistake, just like it is in place for dynamic table rows.

- Component configuration [#166 - Predefined lines in Dynamic Tables]
You have Dynamic Tables that always begin with the same rows on character creation ? You will be able to configure them so that newly created characters get some pre-entered rows !

- Formula computing [#170 - User input dialog rework, with more field choices like dropdown or number fields]
A full rework of the User Input dialog to allow more flexibility on rolls with options, with number fields, dropdowns or checkboxes to use freely !

- Item management [#5 - Ability to add items to other items]
Big, BIG work on this one but you want it so much, you will be able to add items to items, create bags with all your belongings, guns with accessories to enhance their capacities, enchanted weapons with spells directly attached to them !

- Item management [#155 - Conditional item & active effects modifiers]
You have situational modifiers, coming from items or status, and it's a pain to remember them all and add them when rolling ? This will allow you to select modifiers when triggering a label, to add the correct bonuses at the right times !

#

These will be shipped with other small features and bugfixes 🙂

Thank you again for using the system !

formal goblet
floral crater
#

Youston I have a problem!!

After the last but one update I moved a Panel from a tabbed-panel in order to remove a tab from this Tabbed Panel. I couldn't delete it at that time. I made the last update and was able to delete the recalcitrant tab.
Since then I can't use the form to create a new character and my test character is not accessible anymore. (the model sheet is still accessible).
What can I do to make things right?

dire socket
#

I am absolutely losing my mind over 126, the ability to edit values with roll messages is going to be so so useful

robust wren
sharp grotto
#

anything gonna change if i update to the newest from the last one ?

brittle moth
floral crater
ashen yarrow
#

Here's a thing I'm fiddling with that others might find helpful and/or if anyone has a better suggestion I'd love to hear it 😉

I'm working on some sheets with a lot of conditional logic via javascript. I'm mostly using a custom module for this, but it could also be a worldscript or macro if that's your jam.

For my use, I'm putting a lot of the mechanics of leveling up characters into the sheet. To keep that manageable, I'm storing the reference data for it in various json objects. Initially, I had them in hidden fields on the sheet itself, but that meant that every character using the sheet would have this sort of hidden bloat weighing down it's data, kind of ballooning the props.

So instead, I've put them in a template called globals. It has no other fields aside from those hidden fields. Even though it's a template, not a sheet itself - templates are Actors so I can reference them like:

const globalsActor = game.actors.find(actor => actor.name === 'globals');
const globalFields = globalsActor.system.hidden;
const class_levels = JSON.parse(globalFields.find(row => row.name === 'class_levels').value);

Keeps things nice and contained, and let's me keep the hidden fields on the sheet itself to things that normal formulas doing calculations needed for rolls, etc. (ability score mods, etc).

manic junco
#

A question on the plan for 2.3.0. Will the changes to items and formulas mean that a macro can safely change one of the values on an item? Currently, if I have a macro change an item (one of the parameters of the item that is used by the sheet), it makes all the computed values NaN.

sharp grotto
delicate citrus
#

quick question: does Custom System Builder support the Forge's Shared Compendium module? I'm trying to import some data from another world and not having any luck getting it to show on the Manage Modules page

undone smelt
delicate citrus
#

ah gotcha that makes sense, thank you!

velvet heron
brittle moth
#

I have been made aware of some bugs in the last version regarding Component saving
Currently (in v2.2.2) it is impossible to save columns in Dynamic Table and Item Containers. I am working on it at the moment, it should not take long to fix.
Please do not hesitate to tell me if you run across other bugs like this 🙂

brittle moth
#

Everything should be good with the fresh 2.2.3 version 🙂

formal goblet
#

RIP Version number 2.2.2 😅

brittle moth
#

Short lived, but forever in our hearts

delicate citrus
#

great update! thank you!

delicate citrus
#

got another quick question for you folks:

I can't quite wrap my head around the formula syntax for updating an actor property upon item equip. I've read through the FAQ and believe I've followed the instructions correctly for the example there (https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/FAQ/Frequently-Asked-Questions#q-i-have-an-item-container-with-inventory-items-and-i-want-to-sum-up-the-weight-of-each-item-but-sumfetchfromdynamictableinventory_container-weight-doesnt-work-is-there-a-way)

attached show what my setup looks like right now. for the item modifier key, I've tried:

  • attack_dice_hero
  • ref(attack_dice_hero)
  • getPropertyDataFromActor("selected", "attack_dice_hero")

have I completely veered off course? can someone show me the light?

formal goblet
delicate citrus
# formal goblet The modifier-formula should be without the `item.`-prefix.

thank you! I updated the formula as you suggested and the console seems to show everything falling into place correctly, but I'm not seeing the character get updated after adding the item to the inventory. I know the target value to be updated should be a Label component, but does the source component in the item sheet need to also be a Label? I also want to be sure I'm future-proofing since I read that some older syntax is being deprecated

vagrant hollow
brittle moth
#

Sure looks like a bug 🙂

vagrant hollow
#

Ok, so rolling out the red carpet for the amazing and all mighty version 2.2.4!? 🥳
May the Fluuuush be with you.

#

Sorry for finding bugs so often...

#

I am absolutely thankful for your work.

brittle moth
#

No, I am sorry for making them 🙂
I thank you for finding the bugs ^^

#

2.2.4 Available with the bugfix 🙂

#

Drag&Drop changed many things in the component saving procedure, so these bugs are understandable, but I'm sorry if it affects you right now 🙂

shy tendon
#

fucking sick update, wow i cant wait

velvet heron
#

I am unable to create any new actors at the moment, after updating to 2.2.4. As soon as I open the sheet for an actor, I get this first error. Hitting the template refresh button nets me the second error and nothing loads.

stiff forge
#

I can confirm the above issue, my console gives the following error message:

actor-sheet.js:76 Uncaught TypeError: undefined. Cannot read properties of undefined (reading 'getAllKeys')
[Detected 1 package: system:custom-system-builder]
at TemplateSheet.getTemplateKeys (actor-sheet.js:76:65)
at CustomActor.getKeys (actor.js:537:42)
at CustomActor.reloadTemplate (actor.js:564:38)
at HTMLAnchorElement.<anonymous> (character-sheet.js:80:28)
at HTMLAnchorElement.dispatch (jquery.min.js:2:43064)
at y.handle (jquery.min.js:2:41048)

stiff forge
#

I just posted this ^ issue on the gitlab issues tracker for CSB.

shut harness
#

Can I make levels and durations for status effects or do I have to use items?

shut harness
#

A tab got deleted from my charactersheet. I do not know how. I didn't reload any of my other actors. Is there any way I can recover it?

delicate citrus
#

some additional feedback: I think part of the issue is that when dragging a component to a new panel, or even just across the existing panel to a new spot, it seems that the system tries to make a copy of it by appending "_copy" on it, but it doesn't remove the _copy after successfully moving the component

brittle moth
shut harness
#

How do I get the name of the actor that the player is targeting?

ivory dome
#

I know this might be a long shot but...is there a way to create a permanent dynamic table? Where you can add entries and (most importantly to me) use fetchFromDynamicTable, but the actual data in the table is the same between characters/templates?
I have a pretty big list of skills (22 or so) and each one adds a stat and a specialization bonus to the skill roll. I bascially want to create a lookup table that will search for the name of a skill, add the associated stat and specialization bonus, and return the total to the roll. But the only thing I can think of to make sure the info is permenent across templates is to use a standard table, which means naming each cell.

#

If I could use dynamic table, I can just define the columns and enter the skill names and bonuses one, and copy it to the template so all characters have it

severe hazel
#

damn, no pins

vagrant hollow
#

I have a pretty big list of skills (22 or so)
Haha...come back when you get over 150...🥺

ashen yarrow
robust wren
dire socket
#

I also seem to have issues with the advanced config, specifically hiding tabs with the formulas. It hadn't been working very well in the previous versions, but now it seems to not work at all with the current version.

crimson rain
#

it seems that the latest update broke the ability to apply a template to sheets.

#

nevermind, it was just lagging real bad for a bit

thick crescent
#

Heya, is there a simple guide available for building character sheets? perhaps with some examples, how-to's, and other protips? I've been somewhat struggling with it.

wide tartan
#

Pinging @stuck python to try and pull you into this channel

stuck python
#

got it!

#

hey! I started using this as I'm developing my own system, and am thinking that Foundry would be a good platform to automate some stuff in. I've managed to do some character sheet creation, but I'm a little stuck on basic macros. I have no experience with CSS so I'm a little lost

wide tartan
#

Well, for macros it's gonna be JavaScript. CSS is for styling stuff, while JS is for doing code stuff

stuck python
#

Right, yeah
I have no experience with that either

wide tartan
#

Fortunately there are a lot of helpful people around if you have specific questions

stuck python
#

I'm basically trying to start with a macro that would read a value I have on a character sheet, and add it to a d20 roll. I'll go further from there

#

sort of confused how the compute prhase and stuff works, does that go in the macro?

wide tartan
#

So, grab the value, roll d20, add them together, and output it in chat? ```js
new Roll(1d20+${actor.system.value}).toMessage()


Where `actor.system.value` is pulling `system.value` from an actor, using JS string literals with `${}` to pull a JS variable into a string to feed into the Roll before using `toMessage()` to evaluate the roll and post it to chat
stuck python
#

alright, how do I know what the current "actor" is?

wide tartan
#

I'm not sure how CSB actually stores all its values, I haven't used it myself. That's just the general idea for how stuff would go

wide tartan
# stuck python alright, how do I know what the current "actor" is?

If you're running it in a macro while you have a token selected, it should be the actor for the currently selected token (either that or the current user's selected character, I can't remember; token.actor will always get the selected token's actor, so that's also an option)

stuck python
#

does .system need to be something specific?

wide tartan
#

The whole .system.value part is the path to the data in the actor that you actually want to pull stuff from. I've got no clue how CSB actually stores its data. If you bring up your browser console (F12), select a token, and run _token.actor, it should spit out the actor data of that token, which you can poke around in to find the exact variable you want (there are other ways of finding stuff, but that's my go-to)

stuck python
#

I think I'm a little confused in some areas. The ReadMe talks about ComputablePhrase. Am I suppose to build my own ComputablePhrase things within the code itself, or am I supposed to somehow put that into the macros, or is it just something I don't touch?

ashen yarrow
stuck python
#

True, I did find out how to do that
However, if I want do so something like an attack, where an enemy is targeted, can I do that in a label roll?

stuck python
#

awesome thanks!

pastel orchid
#

I have a question how can you get a player sheet to factor bonus like if you have 12 strength how do you get it to register the plus 1 bonus to profenceny

uneven grove
brittle moth
#

Hello @here 🙂
I am working the the fix for the issue preventing template reloading, or character creation.
In the meantime, there is a workaround :
When Reloading a template, if you have the template actor sheet open next to the character, it should work.
Please ping me if this workaround does not work for you 🙂

brittle moth
potent fossil
#

Hello I'm really not trying to rush anything, I'm just curious, when should we expect the 2.3.0 ? This update is incredible and I want to see if it's worth for me waiting in order to design some aspects of my system using the new features of this update

#

thanks you again for the huge work on CSB btw

ashen yarrow
stuck python
#

I was wondering about the hidden attributes vs regular attributes. Do the regular attributes somewhere? They didnt seem to show up in any obvious way so I'm just using number fields to store player stats

shut harness
#

Number fields, text fields, etc will map the key’s value

stuck python
#

Ah, so if I set an attribute key as like, "Strength", and have a label in the sheet read from the "Strength" key, it would copy any number in there?

formal goblet
stuck python
#

Okay, cool

stuck python
#

alright, i think I'm getting it now, I can have labels in my sheet that perform attacks, and then I can have a macro which just calls that label's key so the sheet doesn't necessarily have to be open

delicate citrus
stuck python
#

What's the "recalculate" function good for? Would it be useful to detect when a value is changed somewhere and update something on the sheet?

#

also, trying to get a basic attack roll vs dodge thing to work, but its giving an error, and I can't figure out why

#

whoops it should be target not targeted

formal goblet
#

It's useful if you want a way to parse custom formulas from the user-side. For example: Text input inputField: ${Strength}$ and Label test: ${recalculate(inputField)}$... Label would return the formula result of inputField

stuck python
#

ahh cool

brittle moth
velvet heron
#

If I change a rich text area in an actor template from in sheet editor to dialog box, will that erase all the text that's already been written? I don't want to try it and potentially lose dozens of hours of writing and have to start over.

brittle moth
thick crescent
potent fossil
#

Hey guys any ideas why this is not working ? Any of if ?

${fetchFromDynamicTable('runes' , 'effet', 'effet', 'Étourdissement')}$ 
${fetchFromDynamicTable('runes', 'qteeff', 'effet', 'Étourdissement')}$


${fetchFromDynamicTable('runes', 'effet', 'effet', 'Saignement')}$ ${fetchFromDynamicTable('runes', 'qteeff', 'effet', 'Saignement')}$

${fetchFromDynamicTable('runes', 'effet','effet','Poison')}$ ${fetchFromDynamicTable('runes', 'qteeff', 'effet', 'Poison')}$

runes is the name of the dynamic table
effet is the key of of its columns
qteeff us too
Étourdissement, Saignement, Poison are values that use to filter the Fetch.

These formulas are stored in a label that return no result

stuck python
#

Is it possible to create a dynamic table with varying columns depending on what you put in a dropdown menu?
Right now I have a dynamic table, and if "Multi" is selected in the Type dropdown with a fresh row, I want a number field to appear in the "Multi Count" column. I'm thinking that the "visibility formula" should handle that, but it doesnt appear to do anything. Any advice?

formal goblet
stuck python
#

Dang
Would it be possible with a regular table?

formal goblet
#

I don´t think so. You´d only be able to hide the content of a table cell, not the cell itself.

formal goblet
stuck python
#

I believe that actually works for what i'm going for

formal goblet
# potent fossil yes

Oh, that´s good. So if you use ${fetchFromDynamicTable('runes', 'effet', 'effet', 'Poison')}$, it should return Poison if you have a row, where effet = Poison

potent fossil
#

It's what I want it to do

#

but for some reason it does not work

#

maybe because effet is a label that coded so that it takes different values depending on another variable?

#

this is how effet is set :

${sameRow('name', 0) == 1 ? 'Dé de dégâts' : sameRow('name', 0) == 2 ? 'Dé de dégâts' : sameRow('name', 0) == 3 ? 'Blocage' : sameRow('name', 0) == 4 ? 'Blocage' : sameRow('name', 0) == 5 ? 'Précision' : sameRow('name', 0) == 6 ? 'Précision' : sameRow('name', 0) == 7 ? 'Magie' : sameRow('name', 0) == 8 ? 'Magie' : sameRow('name', 0) == 9 ? 'Étourdissement' : sameRow('name', 0) == 10 ? 'Étourdissement' : sameRow('name', 0) == 11 ? 'Chargeur' : sameRow('name', 0) == 12 ? 'Chargeur' : sameRow('name', 0) == 13 ? 'Saignement' : sameRow('name', 0) == 14 ? 'Saignement' : sameRow('name', 0) == 15 ? 'Poison' : sameRow('name', 0) == 16 ? 'Poison' : sameRow('name', 0) == 17 ? 'Portée' : sameRow('name', 0) == 18 ? 'Portée' : ' Aucune Rune'}$
formal goblet
#

Uiiiiiiiiiiiiii, that´s long

potent fossil
#

but it works don't worry

#

I mean it displays the correct message for the correct value, and the text is fetchable if I do not filter it

#

the problem only occurs when I try to fetch and filter

formal goblet
#

huh, weird

potent fossil
#

yeah xD

dire socket
#

Does it pull up any specific error in the console? I might know the issue, but I could be wrong.

formal goblet
potent fossil
#

using a system of conditions

formal goblet
dire socket
formal goblet
dire socket
#

Oh I think I get it, I hadn't actually done that, but it would definitely help with the absolute *mess my formulas end up being a lot of the time

potent fossil
formal goblet
#

Imagine we can raise a value from 0-25:

#

And the values in column A are the costs, which are needed to raise our value.

#

We would simply look, which our current value is and filter by it in the dynamic table

#

The formula would look like this: fetchFromDynamicTable('LookupTable', 'A', 'Value', sameRow('Raise'))

potent fossil
#

I see... clever

dire socket
#

Oh I already do this proficiencies in my system, it took me a moment to get it, I felt very lost ngl.

potent fossil
#

So I'd need to create a dynamic table that contains every rune and their description, then make in hidden. In this table I'd need to set a number as I did with my condition formula where every number corresponds to a raw where each column correspond to a specific information about the rune. Then, when the players select in a dropdown list a rune that is linked with a number the label will fetch the values from the table

#

correct ?

shy tendon
#

im having a weird issue. I have one item template that has a roll and when rolled it has a header at the top before the rest of the formula that simply outputs the name of that item. So its just ${name}$ wrapped in a header. Simple and it works fine

I have another item that is almost the exact same thing and it works completely fine when rolled. But as soon as I put ${name}$ it doesn't output anything. I can even put regular text like "TESTING" and it makes it a header. But if I put code, it gives me nothing

#

it is a longer piece of text with more code in it so idk if that makes a difference

burnt ridge
#

Hi, brand new to Foundry and found CSB, really enjoying learning it and trying to implement a new game system I've been working on. I do not have a technical or coding background at all so just wanted to say I'm extremely grateful for you making this kind of thing accessible

potent fossil
#

also look the error message in the console

stuck python
#

Hey, so I'm doing a item container. One of my columns is labeled "Damage", with the key being "Weapon_Damage". I have another column which makes a button which should make a roll for what is listed in the "Weapon_Damage" column, which is ${[:sameRow('Weapon_Damage'):]}$
I have "1d6" for a particular item in the Weapon_Damage column, but for some reason the formula isnt working, any insights?

shy tendon
#

just tells me uncomputable token name.

#

which is confusing since ${name}$ worked on the other item

dire socket
shy tendon
#

sorry for big spam

#

and in my other code for my other item, its exactly like this with ${name}$ at the top and it works fine, outputs name of the item

#

okay i delete, never fucking mind, i figured it out

dire socket
#

relax, I was looking

shy tendon
#

sorry for wasting your time. I realized that it worked when it was within an item container but if it was just an item without belonging to an item container the ${name}$ did not work

#

I appreciate it

dire socket
#

Ah okay

shy tendon
#

I just figured since my roll is from within the item sheet, the item container didnt matter

#

i figured wrong

dire socket
#

oops

#

I get you, make mistakes like that all the time

formal goblet
formal goblet
stuck python
#

Wanted to use item containers to easily give weapons to players

formal goblet
#

Items are still very beneficial. It´s just that formulas can get redundant if your calculations can be dependant on your columns

stuck python
#

Yeah
The issue is my weapons generally have similar values and properties, except one or two "types" are handled a bit differently and have a couple extra values. I wanted to have a table that could have spots for those values if a weapon was that specific type, and then be able to read from those.

#

I can do that with a table, but the issue there is I have to have each row have its own key for each column, so Weapon_Damage_1, Weapon_Damage_2, etc, which would get a bit messy

#

actually, i think I just figured it out with dynamic tables, nevermind

potent fossil
#

what's the equivalent of fatch fetchFromDynamicTable() for a regular table?

shy tendon
#

not really anything I believe, you just have to reference the key

potent fossil
#

why was I trying to make things more difficult that they are

runic turret
#

I have a form-fillable PDF for character sheets, but I'm trying to make a macro that interacts with the fields. I'm just learning Foundry, any advice?

pastel orchid
#

you guys are very helpful ill prob have alot of questions bout to start doing little more design on my system right now

stuck python
#

Does anyone know a way to measure the distance between two tokens within a formula? I'd like to be able to determine the distance between the actor and target token within a label formula if possible

#

if not, is there some way I could do that with a macro or script and read the value from that into a label formula?

formal goblet
prisma orchid
#

So, maybe this is interesting for someone here (or maybe, you'll tell me i could have had that way easier 😄 ): Building a computablePhrase that just lists a bunch of properties from your sheet and using that in vanilla-style macros works. Some example:

`//generate computablePhrase from csb-sheet

let phrase = new ComputablePhrase("${ROLL_ATTR1_VAL}$, ${ROLL_ATTR2_VAL}$, ${ROLL_GAD_VAL}$, ${ROLL_RISK_VAL}$, ${ROLL_SKILL_VAL}$, ${ROLL_SKILL_DD}$");

await phrase.compute(actor.getRollData());
let buildPhrase = phrase.buildPhrase;
let values= phrase.values;

//translate CSB-Phrase-values to named variables
let Attr1 = Number(values.form0._result)
let Attr2 = Number(values.form1._result)
let Gad = Number(values.form2._result)
let Risk = Number(values.form3._result)
let Skill_value = Number(values.form4._result)
let Skill_name = values.form5._result

//roll formula

let roll = await new Roll((Attr1+Attr2+Gad)+"d6cs>3").evaluate({async: true});
let riskroll = await new Roll(Risk+"d8cs>5").roll({async: true});`

pastel orchid
#

im working on gear section of my character sheet and how would you make a panel for say the primary weapon would you do a table and just put how many columns and rows you need to put in info
for example

Name | Attribute
Dice | Mods

or is there a better way to design weapon holders for character sheet

stuck python
#

Hm i wonder if I can put an item container inside an item

shut harness
#

Make a dynamic table with two item containers. Closest you can get

stuck python
#

I'm going to assume there's not really a way to modify an item's values from a formula on a character sheet

#

I think Version 2.3 with items within items and such would allow me to do what I'd like to do

#

Basically, I want to be able to have an item in an item container have an amount of ammo within it, which goes down when attacking. Additionally, you could select different kinds of ammo which modify the item's values in different ways