#Custom System Builder

1 messages · Page 9 of 1

formal goblet
#

The keys in the dropdown should match the keys of your number fields (CurrentAgility, CurrentDexterity, etc...). And then, wherever your formula is, you just use ref(dropdownKey).

silver lake
formal goblet
#

yeah

silver lake
#

Awesome!

#

Thank you!

formal goblet
silver lake
#

I will re-iterate about the bug where nothing inside a Table stays saved after a reload.

#

So, bud, you mentioned this being possible in the Beta before

To make a ?{input|<Dropdownlistkey>} in a formula.
How would I go around writing that?

#

making a dropdown list appear to set a value before a roll

silver lake
#

OH
So I didn't need to make that dropdownlist?

#

the values under quotations can be keys that have their own values?

#

I'll try

#

I tried, and even tried copying the example in the readme and running just that

#

but what I get is text/number input.

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

Gives back nothing.

#

This is in a dynamic table btw.

#

But I just tried outside of a Dynamic table and still no dice

silver lake
#

I will bring it up again that I am in the Unstable Version

silver lake
#

I just tested it, and this code does not seem to work on the Beta Version either.

brittle moth
#

The unstable version has some issues at the moment which prevents Foundry from correctly updating it. You may be running an outdated unstable version :/

This Formula should work in the latest beta version (2.3.0-rc5). If it does not, something has gone wrong with your system installation, and you may need to uninstall and reinstall it. Doing so shouldn't cause trouble in your world data 🙂

silver lake
somber bay
#

Do we think a roll command to delete or copy items will be possible? Would help with trading, stores, looting, etc since we cannot drag from character sheet

silver lake
silver lake
brittle moth
silver lake
#

I've been using the app but I tested it on the browser too, going to try clearing the cache now
And yes I can make it public no issue, I'll just make this attempt first

sharp prairie
silver lake
brittle moth
silver lake
#

So, this:

${?{CS:'Character Score?'|"Agility"|"Dexterity"|"Strength"|"Intellect"|"Perspective"|"Presence"}}$

${[2d10] + (sameRow('SLevel'))*2 +CS}$

The selections, even though they are the same name of the keys to the Number Fields, carry no value and cause an error message in the final result.

#
${?{CS:'Character Score?'|@props.Stats.Agility,"Agility"|@props.Stats.Dexterity,"Dexterity"|@props.Stats.Strength,"Strength"|@props.Stats.Intellect,"Intellect"|@props.Stats.Perspective,"Perspective"|@props.Stats.Presence,"Presence"}}$

${[2d10] + (sameRow('SLevel'))*2 +CS}$

Trying this now but it's not working yet.

brittle moth
formal goblet
silver lake
#

Thank you and thank you!

#

With this I think I finally know enough to finish my system, you are all great! I hope I learned enough to assist over here too at some point or another.

silver lake
silver lake
#

It works magnificently! I also figured out what I had done wrong before. Thank you again!

clever wyvern
#

Any help here?
How do I even make configurable rolls at all? Like, using a contents of a rich text area as a roll message.

silver lake
#

I don't believe you can make configurable rolls like that.

#

The way I do it is I have an established roll that pulls values from number fields the players can fill.

clever wyvern
silver lake
#

I mean, if your items have a particular formula to them, you can just have a number field with any of the variables, that you yourself can set.

clever wyvern
silver lake
#

Well, you can pull from Macros for that

#

But in the way you are seeking I don't believe it to yet be possible. Although I hope to be wrong.

clever wyvern
silver lake
#

I'm sorry, but since I have not needed to tinker with Macros on my system, I haven't quite used that yet. But I know people do it from a thread where they also recommended having the Advanced Macros Module to better use that. I'll try to find that thread here.

clever wyvern
silver lake
silver lake
#

very much so

#

That I can help you with then, although I do not know Java Script

#

may I DM you?

clever wyvern
silver lake
#

Besides, for more advanced assistance with macros, you might wwant to check in with the nice folks of #macro-polo
They have helped me time and time again.

silver lake
#

Heey, me again..
So, I don't know how to refer to keys as the values of Radio Buttons:

#

Cause no matter how I write that, evey time I refer to them in formulas, the result is not a value, it just brings me the same formula back:

#

Can Radio Buttons even have a formula as a value?

formal goblet
formal goblet
silver lake
silver lake
#

That would bee amazing.

silver lake
#

And if I'm not seeking assistance I'll be doing bug reports on Git-hub where I imagine it is preferable

formal goblet
#

Yeah, it´s the better place for bug reports and feature request.

formal goblet
silver lake
silver lake
#

Each of these dice only applies to a type of scenario.

#

I want the player to shift click their roll button if they want to make their roll while adding the Aspect Dice they are locked into.

#

So, if I was the character;
Today I feel like it's going to rain, so I'll lock into my Rain Aspect.
So when doing a roll, they can spend energy to add the roll of the specific aspect they marked to be locked in.

formal goblet
silver lake
#

Sorry, I'm super tired and struggling to read this a bit. I'm trying to wrap my head around it

formal goblet
#

If AspectBonus1 is a key to a number field, then it is exactly that

silver lake
#

oh, wait, the Value can be a key?

formal goblet
#

It can be treated as such with ref(). Or more like: I have a value, which needs to be treated as a key, so I can get the value from that key.

silver lake
#

Okay, now I read it with my brain

#

So it can be a value!

#

I understood that you said it couldn't

#

Oh amazing

#

thank youu

#

Yeah I can work with that

#

RIGHT

#

It can't be formulas but it can be a key

#

that was my confusion

#

and you cleared it

#

I'll try to do this

#

In my head it couldn't be either

formal goblet
#

Well, every kind of text/value/whatever can be treated as a key.

silver lake
#

Okay, phew!

#

It WORKS

#

Thank you very very much

#

This will solve A LOT of obstacles I had

silver lake
clever wyvern
formal goblet
clever wyvern
silver lake
#

Is there any way to make two Number Fields share a maximum? As in, both together can't surpass a certain value?

raven seal
silver lake
#

Amazing, thank you. I was pretty sure the mathematical logic would be something like that, but I thought the coding had to be different for some reason. I'm glad it isn't!

#

I mean, of course val1 had to have a limit of max-val2 as well, but yeah.

raven seal
#

glad to be helpful

tiny hinge
#

I am trying to the copy macro script feature on the roll label in an item container but i realized that it doesnt work. right clicking doesnt show the context menu. Is this an expected behavior...or?

silver lake
#

Also, a question (UNSTABLE VERSION); can dropdown list Option Keys be the Key of other Number Fields?
I want the players to be able to select an option in a dropdown inside a dynamic table, and for that value to be added to the value a label shows in the same row.

#

This dropdown would have the key of stat values from another tab.

silver lake
#

Hey hello! I would appreciate an assist while I wait for an answer to the previous question.
So, why does this formula work:

${?{CS:'Character Score?'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"} ?{Sphere:"Spend Sphere?"[check]}}$◄ CS |                        

▼TOTAL▼
${floor([2d10] + (sameRow('SLevel'))*2 + CS + (Sphere)*2)}$
▲▲▲▲▲

————————

${CharName}$

And this one doesn't:

${?{CS:'Character Score?'|CAgility,"Agility"|CDexterity,"Dexterity"|CStrength,"Strength"|CIntellect,"Intellect"|CPerspective,"Perspective"|CPresence,"Presence"} ?{Sphere:"Spend Sphere?"[check]}}$◄ CS | AD ►${#AD:= ref(AspectLocked)}$ ${Aspect:= [1d:AD:]}$

▼TOTAL▼
${floor([2d10] + (sameRow('SLevel'))*2 + CS + ((Sphere)*2) + AD)}$
▲▲▲▲▲
►SPEND ENERGY◄

————————

${CharName}$

The core difference is the one that works doesn't have this part:

${#AD:= ref(AspectLocked)}$

With the addition of the AD on the total formula.

Now, the one that doesn't work does function without this part:

?{Sphere:"Spend Sphere?"[check]}}$
tiny hinge
silver lake
#

I'll be on my PC again tomorrow if you need an assist

tiny hinge
#

but sure! just tag me when you post it

clever wyvern
#

I have another thing to complain. It's quite big I think.

It seems like each entity you create copies its template in, instead of just referencing it. So, when you build a compendium, each item there contains copy of complete layout, formulas, tables e.t.c. That makes importing stuff a wild task.

I intended to just import my thousand items/spells/feats excel table but it seems I'm expected to input stuff manually. If that's the case, I'm not sure why I bothered implementing my system there at all.

#

Sorry, to be more precise, it does referece the template, but by ID instead of a name, which is still an obstacle.

vagrant hollow
formal goblet
clever wyvern
#

That’s not a point auf CustomSystemBuilder.
I thought it supposed to fascilate building custom systems. That kinda includes filling them with content
Foundry is not designed to have import functions for Excel.
It, however, has compendiums with import/export. Building a script for converting csv->json would be a 15min task if it had a sane format for entity.

Why couldn't item be just e.g. this:

{
    "name": "TestSpell",
    "type": "equippableItem",
    "img": "icons/svg/item-bag.svg",
    "system": {
        "template": "BEZsPAq0O9diZJT2",
        "props": {
            "name": "TestSpell",
            "LEVEL": "1",
            "DISPLAY": "Parry",
            "TARGET": "SELF",
            "CAST": "4",
            "DURATION": "TURN",
            "REQUIREMENTS": "@martial",
            "TAGS": "#martial",
            "HOLD": "CON",
            "DESCRIPTION": "<p class=\"p1\">When another creature damages you with a melee attack, you can reduce the damage by <em>PB</em>. Twice that, if you have <strong>@body[Dexterous]</strong></p>",
            "TITLE": "1 lvl.   4 ap.   Concentration."
        },
        "modifiers": [],
        "unique": false
    },
}
vagrant hollow
clever wyvern
#

Well, it was never intended that stuff should be importable from other sources.
Can it be made to though? Can I maybe help?

#

But you will find the same problem with every game system in foundry.
Is it really like that? How do they share those huge compendiums around the internet then? Don't tell me somebody sits down and inputs e.g. hundreds of dnd spells in foundry interface

formal goblet
clever wyvern
vagrant hollow
vagrant hollow
clever wyvern
#

Problem here is that the item settings of all gamesystems are different.
Shifting keys around in json is not much of an issue though. And in my case, my system is already made to accomodate my stuff

formal goblet
# clever wyvern I guessed just that 🙂 What I was asking is if the feature I'm talking about is ...
  • Desirable: Its not highly valued for us but we also have nothing against it
  • Implementable: I´d need to take a closer look at the system for that. It might be easy if you can just copy the existing template and extend the values, or it might be way harder. I even think that the functionality of importing/exporting Actors/Items comes from Foundry itself and not from CSB. We only have a custom implementation for these 2
  • You can check the custom-implementation here: https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/module/exports.js
clever wyvern
formal goblet
#

Good question... I´d probably mirror it. Or extend the current import/export-buttons, so that you can select, if you want Templates, Items or both. @brittle moth your opinion might be good here 😅

clever wyvern
vagrant hollow
brittle moth
#

@clever wyvern @formal goblet
I know the import / export functionality is not optimal. When I made it, I did not know how Compendium worked and did not think how much it would be a bother, especially for items. There is much room for improvement on this front, I agree. You should open issues on GitLab if you have any proposition, messages on the Discord get lost far too quickly 🙂

To answer on some questions :

  • Template structure is copied in each item / actor to avoid data loss. If the structure was only referenced from the template, you'd risk losing actor data on a wrong move on the template (like accidentally deleting a panel) with no possibility of recovering. Same thing if you are working on the template and moving stuff, you may need to delete and recreate things, having a simple reference to the template would be too risky. I'm aware this makes the actors and items json pretty heavy, but I can't think of another way to protect their structure while someone is working on the template 🙂

  • The reference to the template is used to refresh the template. It uses the templates ID, which is a wrong move, since on importing, it changes. This causes issues in item importing as well as in Item Containers, which lose their configuration after each import. This will be fixed at some point.

  • Nothing was made to import data from external sources and I don't plan to add something like this to the system. I truly believe the players importing their spell lists on other systems use custom scripts to transform their raw data into foundry-compatible data. The same can be made for data compatible with Custom System Builder, the internal format is not that complicated. You need to be a little tech-savvy though, I agree, but the issue lies with the templating system which makes it quite complicated to do an external import system tailored to every possible template.

brittle moth
clever wyvern
# brittle moth <@210481395678576641> <@199124934880919552> I know the import / export function...

First, thank you for the most detailed answer I could hope for.

but I can't think of another way to protect their structure while someone is working on the template
When I initially picked up CSB I expected templates to behave like forms and concrete entities to be like filled data for said forms. Data loss could be prevented simply by retaining filled data in shapeless fashion. Basically, like how right now rows in dynamic tables retain values even for deleted columns (which might be a mis-feature tbh). However I think I can see the merit in both approaches.

It uses the templates ID, which is a wrong move, since on importing, it changes
This sounds critical. Does that mean I should not use current import/export feature while having any entities tied to reloaded templates?
Does that also mean implementing entity export separate from templates would not be possible as it is?

Nothing was made to import data from external sources and I don't plan to add something like this to the system
While I don't think/expect you should waste your time implementing rich/arbitrary format import, having simple json format for that would be immensely beneficial to users. I mean, they can figure to export json themselves, and most entities can be boiled down to a plain dictionary anyways.

clever wyvern
brittle moth
# clever wyvern First, thank you for the most detailed answer I could hope for. > but I can't t...

When I initially picked up CSB I expected templates to behave like forms and concrete entities to be like filled data for said forms. Data loss could be prevented simply by retaining filled data in shapeless fashion. Basically, like how right now rows in dynamic tables retain values even for deleted columns (which might be a mis-feature tbh). However I think I can see the merit in both approaches.
A data cleanup is made on sheet reload, because not cleaning the keys could lead to data corruption in some cases. It has been implemented this way because actual data corruption happened to someone in the past (it don't remember the details, but it was caused by a deleted field which retained its properties in entities). The way it works in dynamic tables does not satisfy me, but I never could make it work with how Foundry handles data deletion for this specific case ^^"

This sounds critical. Does that mean I should not use current import/export feature while having any entities tied to reloaded templates?
Does that also mean implementing entity export separate from templates would not be possible as it is?
Since structure data is stored in the entities, it does not cause issue to export only the entity without the template, as long as you do not try to reload it 🙂

Does that mean I should probably not touch anything and wait? I think you mentioned august as a time frame for v11 support somewhere
It's all up to you. I want to release the v11 compatible version by the end of August, but this will be just that : a compatible and tested version, no additional features. Next releases will include more features, including this one, but I can't give you an estimation of when it will be added 🙂

clever wyvern
#

Since structure data is stored in the entities, it does not cause issue to export only the entity without the template, as long as you do not try to reload it
But I do want to reload %)
It's all up to you.
Understood, I'll see what I can do!

#

Again, thank you very much

formal goblet
brittle moth
formal goblet
brittle moth
#

Yeah, I should be more precise : to reload, you need to either reselect the template in the dropdown if the template has been imported as well, or recreate a template and select this one 🙂

formal goblet
silver lake
# tiny hinge but sure! just tag me when you post it

This is a copied macro-script from my system:

let rollMessage = await actor.roll(
    'SkillList(Skill1=Abstract Defense*).SRoll',
    { postMessage: false}
);

let speakerData = ChatMessage.getSpeaker({
    actor: actor,
    token: actor.getActiveTokens()?.[0]?.document,
    scene: game.scenes.current
});

rollMessage.postMessage({speaker: speakerData});

This is a roll button added as a macro:

/sheetRoll SkillList(Skill1=Abstract Defense*).SRoll
silver lake
clever wyvern
silver lake
#

Maybe with the module Advanced Macros. I think they mention something like that in the Readme

clever wyvern
#

Maybe with the module Advanced Macros. I think they mention something like that in the Readme
I think advanced macros was only mentioned here in discord

silver lake
silver lake
formal goblet
silver lake
#

I'm on Unstable

silver lake
#

when I refer to them it only brings the name of the key instead of the intended value

formal goblet
#

Then the issue lies within the formula, not with the dropdown

silver lake
#

oh, wonderful

#

I'm glad it's possible then

#

Although I do not know how

#

should in the dropdown option the key be between ${}$?

formal goblet
#

You have to process the key. If you go through the example which I´ve posted (the one with ref()), you should see why.

formal goblet
silver lake
#

Okay, lemme look into that.

silver lake
#

I think I tried that already but maybe I enclosed it with a formul

formal goblet
silver lake
silver lake
#

Red is dropdown.
Green pulls from a dynamic table.
Blue shows the total of them while making it so that every 5 points in them is 1 point in this label.

#

Dropdown

#

Dropdown dynamic

formal goblet
#

I can bring up the example with ref():

Let´s assume we have the following entries:

  • strength: 1 (numberField)
  • textInput: strength (textField)

${strength}$ -> 1
${textInput}$ -> strength
${ref('strength')}$ -> 1
${ref('textInput')}$ -> strength

And now the most important one:
${ref(textInput)}$ -> 1

The reason behind this is that before textInput is passed to the ref()-function, it will be processed and replaced by it´s value (in this case: strength). So ${ref(textInput)}$ becomes ${ref('strength')}$, which results to 1.

silver lake
#

Result

silver lake
silver lake
# silver lake Result

Sorry, this is the code I was trying for this:

${ceil((10 + ((sameRow('ACCS', 0))*2) + ((sameRow('ACS', 0))*2))/5)}$
#

the one in the print was me just doing tests

formal goblet
# silver lake Oh, that's what you meant! I read this in the readme, but I tried all of those o...

That´s not it. You just entirely forgot to use ref(). sameRow('ACCS') will only retrieve the value of the column ACCS in the same row. And because the current selection is "Agi", it will return CAgility. But that is not enough. You have to tell the system, that it should handle the value as a key, that it retrieves the value from that. That´s why you have to use ref(sameRow('ACCS')). To break it up:

  • sameRow('ACCS') becomes CAgility -> ref('CAgility')
  • ref('Agility') becomes 5 (whatever the current number is) -> 5
silver lake
#

I see I see

#

so using ref(ACCS) should work then? I'm going to try

#

thank you very much for your patience

formal goblet
silver lake
#

okay, I didn't know ref(samerow('')) was a thing, this opened a few windows for me. Thank you! I'll implement this here

formal goblet
#

You can nest functions into more functions. The underlying functions will be handled first and return their value before the upper functions get processed.

#

So if you have something like ref(sameRow(concat(fetchFromDynamicTable()))), the order of processing would be:
fetchFromDynamicTable(), then concat(), then sameRow() and finally ref()

silver lake
#

Right yeah, I undertand that. But I thought that sameRow and ref were like, contradicting functions or something.

#

What is concat for?

#

I used it once before here, but I'm not sure what it does, while I do understand the others (I believe)

#

Actually, sorry, I shouldn't waste your time with something I can google

formal goblet
silver lake
#

yeah, I took a while to figure out that I shouldn't add Math.<function> when reading from it to make formulas xD

#

in CSB I mean

tiny hinge
#

some how right clicking item container rolls doesnt show the context menu for copying roll as macro not sure why even on blank sheets it doesnt show

#

i already change over to dynamic tables instead and that works

#

@formal goblet is it a known bug/limitation or something ?

brittle moth
dire socket
#

Is there a way to import item templates into the beta? I can't seem to get it to work. I only now noticed that all my templates are completely blank.

formal goblet
dire socket
#

Got it working, I guess I was just doing it wrong? I just exported the items alone via the template setting, not sure what caused them all to become blank but it's not an issue anymore.

formal goblet
dire socket
#

I will, trying to replicate it rn

dire socket
#

As for the item templates going blank, I believe that it happened sometime after I updated the Beta. I had only really checked the items a few times before (seeming fine) and only now have I acually checked on them.

formal goblet
dire socket
#

Yeah, it's not a big one really.

keen carbon
#

what's up with these wild decimals?

#

the formula is just "amount*weight" and "amount*value", and they only appear on certain multiples

#

when the amount is 11 it's fine, and so with 13, but 12 and 17 both do that

keen carbon
#

i went ahead and changed the inventory columns to round to 3 decimals, but i also use the item modifier system to total all of the carried weight like so

#

and these funky decimals are still showing up where i total it

#

any ideas?

formal goblet
keen carbon
formal goblet
pale tusk
#

So, when I modify a value on the Actor sheet that is passed to an Item sheet, the values don't seem to update correctly until I reload both the Actor and the Item sheets. Is there a way to fix this?

formal goblet
pale tusk
formal goblet
pale tusk
formal goblet
#

And updating a value on the Item?

#

You can also check the console if you find anything suspicious like errors or uncomputed props.

pale tusk
clever wyvern
#

I'm encountering an issue: for some reason, the system hangs somewhere mid-process rendering ComputablePhrases. How do I debug that?

keen carbon
#

and i guess letting us just handle the rounding is a way better solution than anything else

brittle moth
#

**Beta version 2.3.0-rc6 is now available, with the following changes : **

Features

  • [#262] Added Radio Button components
  • Added button style for Labels
  • Added save on close for Rich Text Dialogs
  • [#246] Added User Input Templates

Fixes

  • Fixed issue with fields inside Tables
  • Fixed issue preventing beta & unstable version from displaying the updated dialogs & windows

Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta

If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new

#

Please wait a little more for the definitive 2.3.0, and the following v11 supporting version 🙂

clever wyvern
#

Good news!

New radio-buttons are kinda weird though

prisma orchid
#

Hey there! Has anyone tried to add an item to an actor via macro (actor.createEmbeddedDocuments('item', [] )? I've been trying and i feel like the standard method isn't working as i get "item is not a valid embedded Document within the Actor Document". but when i look at the collections, the type should be 'item' ... or i'm just to dumb to do it right 😄

clever wyvern
#

@brittle moth Seems like the update breaks columns in item-containers. Newly placed item-containers are fine though

clever wyvern
brittle moth
#

It seems so indeed 🙂
Gonna fix that ^^

EDIT : Fixed in unstable, I'll release another beta version soon 🙂

bleak cosmos
#

Hey, with the Dark Heresy system for foundry is there a way i could build a simple sheet for a Vehicle?

formal goblet
bleak cosmos
#

ah so no go then?

formal goblet
bleak cosmos
#

damn, i'll have to find a workaround

#

no worries thank you

glossy hare
#

hey, does CSB is foundryv10 compatible?

formal goblet
hazy saffron
#

Is it possible to reference Modules directly in Label Text? For instance, referencing SimpleCalendar.currentdaateTime() function as a 'label text' on a character sheet?
I tried: ${SimpleCalendar.api.currentDateTime().year}$ but nothing appeared

hazy saffron
#

If we're on the stable release version that's not doable?

formal goblet
#

Nope, not released there

hazy saffron
#

Thank you!

glossy hare
#

I TYPED WRONG

#

i meant foundry11

#

😞

formal goblet
glossy hare
#

me rn:

formal goblet
glossy hare
#

and i discovered if the CSB is v11 compatible

#

i updated foundry

#

thinking it was v11 compatible

#

LOL

#

gonna to have 2 foundries now

analog terrace
#

is there a way to use count success with a variable target rather than hardset? The player being able to enter the target.
${#?{targetValue}}$
${roll:=[({:focus_value:} + 4)d12cs>=targetValue]}$

If I replace targetValue with a number it works fine, but if I use target value it doesn't work, just shows blank in the formula even though outputting target value after set shows the correct number. All of the dice pool examples hard set the value as well in the dice modifiers article

clever wyvern
clever wyvern
analog terrace
clever wyvern
#

I'm getting "row is not iterable" at times when moving/adding a component to a table. Both beta and unstable. Is that known?

tiny hinge
#

where is this template modifiers btw? can't find it. 🤔

brittle moth
brittle moth
tiny hinge
#

Awwww dang ok 😦

#

My bad just saw it's 2.2.7

hazy saffron
#

Is there a way for a macro run from a character sheet to know what order the character is in the initiative order?

hazy saffron
#

Question: Is there a way to set the width of a dialog box in CSB?

shy tendon
#

hey so for CSB right now, the newest version

#

what version of foundry is compatible with it right now?

#

the most recent version of 10.xxx is good right?

sharp prairie
dire socket
#

If any of you have an idea or example on how you could do item/condtion durations, could you enlighten me as to how you can (or can't) get it done?

clever wyvern
formal goblet
scarlet skiff
scarlet skiff
solar zephyr
# glossy hare LOL

Maybe I should do that too, I'm going to want v11 badly so I can build Kineticists in pf2e, but I still need my CSB to work.

solar zephyr
#

(that was in response to running 2 instances of Foundry)

analog terrace
white pumice
robust wren
#
${#check_type:='Körperkraft'}$
${#Art:='Schicksalsprobe'}$
${#modifier:=ref('KK')}$
${#?{Erschwernis|0}}$
${#roll1:=[1d10%10]}$
${#roll2:=[1d10%10]}$


<div class="message-content">
<h3>${!check_type}$ erschwert um ${!Erschwernis}$</h3>
        <div class="dice-roll">
        
    <div class="dice-result">
        <div class="dice-formula">${! (equalText(ref('Art'), 'Probe')) ? '1d10' : '2d10' }$</div>
        <div class="dice-tooltip">
    <section class="tooltip-part">
        <div class="dice">
            <header class="part-header flexrow">
                <span class="part-formula">${! (equalText(ref('Art'), 'Probe')) ? '1d10' : '2d10' }$</span>
                
                <span class="part-total">${! (equalText(ref('Art'), 'Probe')) ? roll1 : roll1 + roll2 }$</span>
            </header>
            <ol class="dice-rolls">
                Probe unter ${!modifier - Erschwernis}$ <br>
                ${!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>')}$ 
            </ol>
        </div>
    </section>
</div>

        <h4 class="dice-total">${! (equalText(ref('Art'), 'Probe')) ? roll1 : roll1 + roll2 }$</h4>
    </div>
</div>
${!(equalText(ref('Art'), 'Probe')) ? (roll1 <= (ref('modifier')- ref('Erschwernis')) ? '<p style=\"color: green; font-weight: bold; font-size: 2em; border-radius: 10px;\">Erfolg! </p>' : '<p style=\"color: red; font-weight: bold; font-size: 2em;\">Fehlschlag!</p>' ) : ''}$ 

${!(equalText(ref('Art'), 'Schicksalsprobe')) ? ((roll1 + roll2) <= (ref('modifier') - ref('Erschwernis')) ? '<p style=\"color: green; font-weight: bold; font-size: 2em;\">Erfolg! </p>' : '<p style=\"color: red; font-weight: bold; font-size: 2em;\">Fehlschlag!</p>' ) : ''}$ 
    </div>```
tiny hinge
tiny hinge
#

Is it possible to fire a macro when ticking a check box in a CSB sheet? The idea is when my players tick a check box for a specific status ailment, the token they control gets tagged with the same status icon.

#

I know you can use macro to update token with DAE just not sure if you can fire a macro from CSB

scarlet skiff
#

I think i would rather Set Up a world Script for that. Seems much more fail Proof.
Can do apply and remove with a world Script.

tiny hinge
scarlet skiff
# tiny hinge a world script? havent heard of it. i will look into it. do you have a sample of...

in macro-polo channel there is a pin which explains the setup.
after that it should be pretty simple

  • hook into updateActor
  • check the status of your checkbox
  • depending on checked/unchecked apply or delete the effect (or toggle)

if you want to do it smart you might want to look into checking the "updateActor delta" first to see if any relevant checkbox was changed and return if not. might save some computation 🤷‍♂️

brittle moth
#

**Beta version 2.3.0-rc7 is now available, with the following changes : **

Features

  • Added v11 compatibility ! fvttpride

Fixes

  • Fixed issue with column edition in Item Containers
  • [#201] Fixed dynamic table function usage in Number fields min & max values
  • [#209] Fixed Dice Pool display exploding in chat message explanation
  • [#270] Fixed issue with Table causing error when trying to add a component in a row after an empty row
  • [#216] Fixed issues with default values not added to character from the initial reload
  • Fixed issues with Right click on Labels
  • Fixed issues with chat message visibility
  • Fixed issues with actor & item data handling

Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta

If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new

#

Hey everyone !
As you may have seen right above, turns out v11 compatibility was not so much after all ! So I made it available for 2.3.0, in beta for now, but it will be in the final release

2.3.* will be available in v10 & v11, should any fix be made to the version
The version after will be 3.0.0, available only to v11. All deprecations currently in the system will be dropped in 3.0.0, so please make sure everything is fine before updating to 3.0.0 🙂

For v11 users out there, please tell me if you encounter unusual behaviour !

scarlet skiff
#

hey - i updated my foundry + CSB version (upgrade from 2.2.4 --> 2.2.7) and now i have a strange interaction.
entries in the compendium are blank. if i look at the compendium packs file the information is there.
if i import all entries they are blank. if i import one by hand (dragging into items or dragging on an actor) the item shows the right stats.
if i export the item back to the compendium it shows the right stats also in the compendium.

any of you maybe already got such an error? is there a way to fix this? dragging all items into the item folder and then exporting back into compendium is tedious...

here is an example screenshot (left is the item in the compendium and right is the item which was dragged into the items bar:

trim frost
#

how can i change in a World the Modul from Custom System Builder to the Beta ?

narrow ginkgo
scarlet skiff
restive raven
#

hello wanted to know if you can make collapsible tabs and panels with the checkboxs?
if so would ye be able to help or gib and example?

scarlet skiff
vagrant hollow
# trim frost how can i change in a World the Modul from Custom System Builder to the Beta ?

I suggest you have already installed the beta.
First you have to shutdown your foundry and make a backup of your world data’s!

Head to your data/systems/custom-system-builder folder. Open system.json in editor, search “id” and change it to example “custom-system-builder-stable”. Change the folder name to exact the same as id.

Head to your data/systems/custom-system-builder-beta folder. Open system.json in editor, search “id” and change it to “custom-system-builder”. Change the folder name to exact the same as id.

Restart your foundry.
This worked for me but I don’t guarantee for any problems with your world datas.
So, backup before !!!

restive raven
#

Need to figure out how crafting items work in it.

short plinth
#

When outputting a roll result to chat I'm trying to see if I can add a simple Failure, Success, or Special Success under the roll in chat depending on if the roll was higher than, lower than, or equal to an attribute key. I guess it's basically an if...else statement but I'm not sure if I can do that or what the proper way to do it is. I know I can reference the roll with := but I'm not sure how to output the result.

The second question, if the first is possible, can I change the color of the Failure and Special Success to red and green in that same statement?

raven seal
#

you can do Success Level: ${roll<thresholdKey? 'Fail' : roll==thresholdKey? 'Special' : 'Success'}$ to get it to print the word, not sure about color but that's probably a css thing

formal goblet
short plinth
outer marsh
#

Hello guys... I have been using CSB for a while but... I am making a item template in which I need a intem container. But it doesnt work properly. when I create a item with this definition, I can't add the items... I mean is an item with an item list (is like a trait list for every item) maybe is super easy... but I don't know how to make it work... any help is needed

outer marsh
#

(The item instance, with no capability to add traits in the item container)

formal goblet
outer marsh
#

And... a quick question. CSB isn't still V11 compatible , right?

formal goblet
formal goblet
outer marsh
#

Understood!!! thanks!!!

#

Very Grateful 🙂

#

(obviously, not english native speaker)

short plinth
#

You guys have been super helpful, I got almost everything to work but I have one last question. Is it possible to have a drop down selection user query for a normal roll, roll with advantage, and a roll with disadvantage?

short plinth
#

I'm just using the regular version, is the beta stable enough to run a game on or should I just stick with the base version?

formal goblet
tranquil hollow
#

Sounds great. Is there an ETA on a stable release?

formal goblet
#

The last beta-version will be released this week. Then it will only take a few days.

topaz coyote
#

Hi all. I want to make sure I'm not overlooking something obvious. Using Monk's Enhanced Journal in a CSB world. I can't seem to drag items into the shop or person journals from an Actor sheet's Item Container object (trading functions of Ironmonk's journal). Double-checking that it's not supported in CSB?

#

I'm on V11 using CSB beta

formal goblet
topaz coyote
#

Thanks for the quick response

outer marsh
#

Hi guys, good morning to all... Is there a way to display the item icon in a ItemContainer? Only for the looks.

scarlet skiff
#

hey, im not sure if this issue is already known so here it goes: CSB-Beta, V10
i create items with a macro (which worked with 2.2.4).
now with the beta the items don't get updated properly. the stats/modifiers etc. is all there but the visuals are wrong/not present. also dragging into an actor places the item in there but it's not visible (since the template filter seems to not fit).
i think the problem is that there is no template - but i dont know why it doesnt work anymore 😐
does this code not work anymore with the beta version?

            if (newItem.reloadTemplate) {
                await newItem.reloadTemplate("DHQaHYIKz2WcKiSO");}

here are a few pictures:

formal goblet
scarlet skiff
#

😅
So is there a full list of all Changes?
I'm struggling with navigating the git...

formal goblet
scarlet skiff
#

Thanks maybe i find a solution in there. Else i need to get creative...

formal goblet
keen carbon
#

using polyglot and it says,

If your system has languages set in actors data and aren't being loaded properly, it might be using another data path. Input the date path to the correct attribute (e.g. actor.system.languages or actor.system.speak).
actor.items would be the way to target the inventory, right? is there a way to target a specific item container?

formal goblet
keen carbon
#

okay, bless

scarlet skiff
#

after reloading the application the item is correct

#

well it seems not quite right. the reloadtemplate doesnt work as i want it to
but reloading doesn't do anything until i reload foundry...

formal goblet
#

Btw, these functions are not async

scarlet skiff
#

i think the bigger problem atm is that even if i create a new item and reload the new template by hand - it doesnt show anything until i reload foundry

#

ok so the issue is:
creating a new item and selecting a template + clicking reload doesn't reload the item properly. i have to ESC -> reload application / restart foundry for anything to show up.
there seems to be a similar problem with actors but not 100% the same.
it might have to do with "old version templates"?
i think i created one actor template with V2.2.7 - all other with 2.2.4
if i reload a old template it does nothing. if i change to the "new" one it loads properly. after i loaded the new one i can change to old templates.
i tried creating a new item template. i could load the new item but i cant reload to the older items.
after reload foundry all templates work.

i hope this is enough information for you to investigate? if you need anything else please ask.

keen carbon
clever wyvern
scarlet skiff
formal goblet
formal goblet
keen carbon
# formal goblet I don't really understand the question. Do you want to rename all your items in ...

normally there would be a system key for languages (say, system.actor.languages) that you would add all the names of all the different languages an actor can speak to
i could maybe have it reference a text field in the actor sheet with the same key, but then my players would have to type in all of the languages manually (and that would probably be a disaster if they misspell, etc)
is there any way i could use an item modifier to add a value to a key to to get the same effect?
(like adding 'Dwarvish' to a key called 'languages'?)

#

or, something similar, so long as it would define a referrable key using specific items

brittle moth
formal goblet
outer marsh
keen carbon
formal goblet
#

Atleast if you plan to use multiple language items. If it's just one per actor, it would be a bit easier (but still a bit messy)

keen carbon
#

this does narrow it a lot down, so thank you

#

and i guess if all else fails i can just regex find and replace in the .db's

formal goblet
#

Item modifiers can only modify already existing keys in the actor-props.

keen carbon
#

maybe i could cook something up using hidden modifiers in the actor sheet, then

formal goblet
keen carbon
sharp prairie
#

What's the best way to make a clickable journal entry link on a character sheet? Like as a label?

vagrant hollow
sharp prairie
#

hmm, ok so not on the template? mmmkay, I'll try something like that. Thank you!

vagrant hollow
scarlet skiff
glossy hare
#

YOU ARE A GOD THANK YOU

robust wren
sharp nest
#

Is there a term for referencing "own line" on a dynamic table? A "this" or some keyword like that ?
(Trying to make a dynamic table for skills+ rolling skills)

outer marsh
#

Hello all... Hope you can help me... I have a table (1row x 3cols) and panels in every column. How can I make a kind of "valing='top'" in my table row? I don´t need code if its too simple or complex, if you point some article or some... hint it would be great (or somewhere to understand the "additional css" field)

#

Thanks!!

glossy hare
#

you want to show the row if the var is true?

outer marsh
#

I'll explain further 🙂 Thanks

#

this is the design in CSB

glossy hare
#

👍

outer marsh
#

I love to put all aligned top...

#

trying to emulate the Fading Suns 4 character sheet 😄

glossy hare
#

now i understand

#

you want to make everything aligned

outer marsh
#

An image is worth a million words 🙂

#

That is 🙂 I am no english native so maybe my explanations are a bit clumsy

glossy hare
#

LMAO

#

i will test one thing

#

give me a minute

outer marsh
#

of course and thanks a lot for helping me!

glossy hare
#

okay

#

it worked

#

i need one thing from you

outer marsh
#

Wooooo

glossy hare
#

can you get in module-dev voice-chat?

#

system-dev

outer marsh
#

sure (I am looking)

glossy hare
#

@outer marsh

#

later, send a printscreen for the elements

#

or you know how to make the css

outer marsh
#

Thanks a lot fot the help @glossy hare you are awesome man

outer marsh
glossy hare
#

GOOD

#

congrats

#

have fun lol

outer marsh
#

Hey good night all... does anyone knows why do I get a "TypeError: Row is not iterable" when adding components in my actor template? (no code added not even the css code I asked before)

#

(This error appears saving wichever element I want to create or edit)

#

(Maybe I have to use it with V11 now I see it has been added in GitLab? Is it safe to update Foundry to v11 with other worlds using this system?)

brittle moth
brittle moth
brittle moth
#

**Version 2.3.0 is now generally available, with the following changes : **

Features
Added consoleLog and consoleTable functions
Added undo / redo buttons
Added new function: switchCase()
Added 'fetchFromActor()' ('getPropertyDataFromActor()' is now deprecated)
Added option to use formulas for keys in item modifiers
[#200] Added item template modifiers
[#126] Added ability to edit properties from Formulas
[#153] Added ability to apply modifiers to Dynamic Table Fields
[#166] Added predefined lines to Dynamic Tables
Updated chat commands library verified version
[#215] Added delete warning on component deletion
[#205] Added possibility to retrieve the name of Actors and Items with the key 'name'
[#233], [#242], [#251] Added possibility to include custom JavaScript
[#271] Added ability to reference actor's dynamic table in an item's dropdown list
[#170] Added more options to user inputs
Added item image display in item containers in place of the briefcase icon
[#262] Added Radio Button components
Added button style for Labels
Added save on close for Rich Text Dialogs
[#246] Added User Input Templates
Added v11 compatibility

Fixes
[#245] Fixed issue where fetchFromActor wouldn´t work in item modifiers
[#236] Fixed tabs error when pre-selected or first tab visibility is false
[#245] Fixed tabs error when pre-selected or first tab permission is not enough
[#264] Fixed import of Item Templates
[#201] Fixed dynamic table function usage in Number fields min & max values
[#209] Fixed Dice Pool display exploding in chat message explanation
[#270] Fixed issue with Table causing error when trying to add a component in a row after an empty row
[#216] Fixed issues with default values not added to character from the initial reload
Fixed issues with Right click on Labels
Fixed issues with chat message visibility
Fixed issues with actor & item data handling

formal goblet
#

I had to laugh so hard because this list filled my whole discord page as soon as you´ve posted it 🤣

fierce harbor
outer marsh
#

can we update the system and then Foudry itself... and it would not change other installed worlds? or do we have to do something in order not to break previous games (I did Pendragon sheet and... I'll die if it brokes!!!)

formal goblet
fierce harbor
#

Murphy's law anyone? 😂

sweet fjord
#

2.3.0 version I get a lot of warnings for items which aren't visible in the sheet. "item template has been deleted". I guess this is normal but it's a new warning and I think I'd have to locate the items in .json export to get rid of them.

short plinth
#

I've been wracking my brain trying to figure out how to do a drop down query in a roll for a normal roll, advantage, and disadvantage. I can get the query to pop up but all 3 options under the drop down say ERROR and it doesn't roll anything, I have a feeling I've got something in the wrong order but I can't figure out what.
${Roll:= ?{Type|[1d20]:'Normal'|[2d20kl]:'Disadvantage'|[2d20kh]:'Advantage'} + ?{Modifier|0} }$
Any ideas what or where I messed up?

formal goblet
formal goblet
sweet fjord
#

is it safe to use built in foundry export/import json on a sheet template rather than the export buttons in the CSB settings?

formal goblet
outer marsh
#

I have to say that I love you guys... I've updated foundry and CSB and... everything is running smooth!!! Thanks for your GREAT work and support!!!

pale tusk
#

Anyone able to spot what I'm doing wrong with this roll message? The console error log says I have a misplaced ( or ), but I can't find one. There's zero output to chat, not even an error message.
${[(ref(sameRow('rote_attribute', wit)) + sameRow('rote_bonus_dice', 0) + :magic_dice: + ref(concat(sameRow('rote_ability', metaphysics),'_dice')))d10x10cs>=sameRow('rote_dif', 6)]}$

Update: I think I added in the missing ) (added above), but the same error persists.

pale tusk
formal goblet
pale tusk
pale tusk
# formal goblet Yeah

I'll try that. That's really nice. Unfortunately, using :'s didnt' solve my problem, though.

pale tusk
#

However, cleaning it up with temporary variables seems to have done the trick. Thanks!

pale tusk
#

I may be missing this, but I can't figure it out. Is there an easy way to track how many items are entered into a dynamic table (i.e., how many lines are added to it)?

formal goblet
pale tusk
slim canopy
#

im a bit new to Custom System Builder. Is there a way to use active effect to change the value of the check box in the actor sheet? For example, i want to add a Poisoned status effect to the token and it will change the value of isPoisoned in the actor sheet to true. isPoisoned is the component key of a checkbox in actor sheet

formal goblet
slim canopy
#

i dont really understand what you mean by "change the icon display of a Label"?

formal goblet
slim canopy
#

Ah i think i got what u mean now. I will try it later. Tks for the help

pale tusk
#

I must be doing something really dumb, here, but can anyone tell me why ${capitalize(variable_name)}$ wouldn't work, where variable_name is a key that's set to a string?

tiny hinge
#

the active effects doesnt seem to work for v 2.3.0 . i am on foundry v11

#

can anyone confirm if its working and its just error on my end?

#

just a very simple output to label but it doesnt seem to work even tho i double check that the key is correct after the status is applied (there is only 1 so no mistaking it for another status effect).

formal goblet
formal goblet
tiny hinge
robust wren
#

hello,
since the system is updatet to v11, i was thinking in investing time again and improving my system 🙂
but i got the the console output. Someone know why?

robust wren
formal goblet
robust wren
formal goblet
#

That is probably not the issue. You can revert it and check it by yourself

robust wren
#

hmm, yeah, i undo it and it still works 😄

formal goblet
#

I call it "Habs ja gesagt"

robust wren
# formal goblet I call it "Habs ja gesagt"

Vielleicht, weil ich mein System als Modul gespeichert habe mit allem in Compendiums. Und nach dem Import der iwas nicht lesen konnte, aber nach der Änderung und dem Speichern das dann hinbekommen hat

formal goblet
potent fossil
#

Hello guys I was wondering if you can help me with little something. Is it possible to change the text color to something else for the items?

#

it turned orange at some point and I don't know why

formal goblet
full loom
#

HI. Is there a way of changing the background in the default character window ? I'd like to get away from teh grey, or even include a watermark type logo.

formal goblet
#

Maybe CSS-conflicts with other modules?

potent fossil
formal goblet
potent fossil
formal goblet
potent fossil
#

Is there a away to override it with a css class ?

formal goblet
#

Look few answers above

potent fossil
#

thanks

robust wren
#

nächste frage: ich hab zuvor mit dem module advanced Makros gearbeitet. Da nun Macros unterstützt werden (und anscheinend auch etwas an macros geändert wurde in v11) wollte ich das natürlich nutzen.
Kann ich Parameter mitgeben?

formal goblet
robust wren
# formal goblet Ja, Beispiele sind in der README

Das hab ich gefunden: %{return await game.macros.getName('YourMacro').execute()}%
Aber ich möchte nun dem Macro parameter mitgeben. Also im Macro soll der genutzt werden.
ich hatte %{return await game.macros.getName('YourMacro').execute(${KK}$, ${Körperkraft}$)}% probiert, was leider nicht funktionierte

#
  • Name des Macros habe ich natürlich geändert
formal goblet
#

Wo wirds ausgeführt?

robust wren
#

label roll message

formal goblet
#

Dann sollte das eigentlich passen. Irgendwelche Meldungen in der Konsole?

#

Kannst auch versuchsweise das in der Konsole mit aufgelösten Werten probieren.

robust wren
#

ja ich prüfe gerade, bekomme uncomputable token, glaube da liegt dann der Fehler iwo im Makro. Hat sich vermutlich was geändert mit der Version, oder ich hab falsche Parameter mitgegeben

#

Kann ich mittlerweile mit einem label roll message ein anderes label verändern?

formal goblet
robust wren
#

ich habe zuvor immer per Makro: await a.update({system: {props: {Wert: args[0], check_type: args[1]}}}); die labels geändert, werden die mittlerweile anders gespeichert?

formal goblet
#

Die nicht, aber das ganze Template-System 😅

robust wren
#

okay, dann muss ich mich damit wohl nochmal etwas stärker auseinandersetzen wieder 😄
Funktioniert die übergabe von Parametern aus Dynamischen Tabellen? ja oder?

brave trench
#

Hi! Love the new update!

formal goblet
#

Good to hear 😄

pale tusk
#

So is there no way to capitalize a string, then?

formal goblet
brave trench
#

Is it possible to remove the validation button from the new popup box, and have it close after choosing a roll? I have a popup that, instead of having a dropdown with advantage/disadvantage choices, simply has extra roll buttons to choose from. The buttons work, but then I need to X off the pop up or hit the validate button. Simply trying to reduce number of actions. No big deal either way, just curious.

pale tusk
formal goblet
pale tusk
formal goblet
#

Yeah, only with version 2.3.0

outer marsh
#

Hello folks... I have a formula question:
ddlSkill is a dropdown list containing in the key field the id/key of other numberFields in the sheet.

  • ${ fetchFromActor(name,ddlSkill) }$ <--- returns txtCharm, txtWhatever, that all are number fields
  • ${ fetchFromActor(name,fetchFromActor(name,ddlSkill)) }$ <---- error
    is there a way to do this "indirect" pointing to fields? Thanks!
formal goblet
outer marsh
#

I'll try to explain

#

its fading suns.. Target Number for a roll = skill+characteristic . I have skills and characteristics in number fields in the sheet, and you can mix skills with characteristics "freely". So I got a "roll area" where the player selects the skill (dropdownList) and the characteristic (another dropDownList), then I need to get the numberField value selected in the skill dropDownList then the characteristic value selected in the other dropdown list and add those numbers to get my Target Number

#

Maybe I am making it overly complex 😦

#

It's kind of a pointer pointing a pointer

outer marsh
#

GOOOD

#

Thanks!!!!!!!!

#

That's EXACTLY I have missed that golden function... THANKS!!!!

formal goblet
pale tusk
#

If I want to install the new version, would that be the beta or the stable version?

formal goblet
pale tusk
tiny hinge
formal goblet
#

Ah right, I´ll check that now

tiny hinge
#

appreciate it!

formal goblet
pale tusk
#

So, for some reason, if I put %{return ${magic_ability}$.toUpperCase()}% in a label, all my labels in the entire sheet go blank. I upgraded.

#

("magic_ability" is a key on the sheet, a string, that's otherwise worked fine)

formal goblet
pale tusk
formal goblet
#

You can also experiment a bit in the console btw

pale tusk
formal goblet
raven seal
#

don't you need to concat the rest of the string on the end with something like + '${magic_ability}$'.slice(1)?

#

oh, lol

pale tusk
#

Sorry, I'm definitely out of my depth, here. I'm used to having a simple function like capitalize() to do this sort of thing.

raven seal
#

sadly JS isn't python

pale tusk
raven seal
#

I think that should go inside the script, giving you full line that looks something like %{return '${magic_ability}$'[0].toUpperCase() + '${magic_ability}$'.slice(1)}%

pale tusk
#

Okay, ${concat(%{return '${magic_ability}$'[0].toUpperCase()}%,'${magic_ability}$'.slice(1))}$ seems to work okay.

raven seal
#

yeah the concat function should work too

pale tusk
#

Thanks!

vagrant hollow
tiny hinge
floral crater
#

I have a small problem, in a label, I do a search in a dynamic table, I get the right result (a number) and if I add another number I get the right result.
However, as soon as I give a Component key to this label I don't get any results and if I add a number I get an error.
What is the problem?
I'd like to take this opportunity to thank you for your excellent work.

pale tusk
#

I'm not sure how to tell--is the new CSB version compatible with V.11 Foundry, or is that the next release?

formal goblet
formal goblet
#

Then I need more context

floral crater
#

ERROR = with component key else without component key

formal goblet
outer marsh
#

A quick one (I hope) Why ${ ref(string(ddlDropDown)) }$ is ok but ${ numb:=ref(string(ddlDropDown)) }$ displays an error? (At least I made it with ref, as been adviced before)

oblique spear
#

Hi. Is it possible to add a script macro dice roll to the character sheet? Thanks for any help.

formal goblet
oblique spear
#

Thanks @formal goblet, I didn’t read the guide properly and only added the %%.

outer marsh
formal goblet
outer marsh
#

Yes, the white space was the problem

noble tendon
#

Hi. With the lastest versión can upgrade to v.11 and use old templates, compendiums items?

formal goblet
#

Y

oblique spear
oblique spear
outer marsh
#

Want to put a value in a NumberField of the character sheet (key: txtReservaVP) ... but I keep getting an error ${setPropertyInEntity(name,"txtReservaVP",6)}$
I tried 'self' instead of name and 'txtReservaVP' also... Thanks for your help, time and (above all) patience

brittle moth
topaz coyote
#

Hi all. Trying to use setPropertyInEntity to adjust a resource quantity in an item in item container. ( just like the example.) Works fine on the roll message. Is there a way to silent the chat message entirely? I don't want the sound cue or chat clutter.
EDIT : v11. CSB beta

floral crater
formal goblet
formal goblet
formal goblet
topaz coyote
brittle moth
formal goblet
outer marsh
tiny hinge
lethal flax
#

So how can i make something not visible if a checkbox is checked. I know how to make a sheet aspect visible with a checkbox but not the inverse.

topaz coyote
cinder rock
#

Ok, I want to ask if this is possible because the last time I tried it didn't work.

I have an actor that is fetching values from all of my player actor sheets and then evaluate what the highest number is among them. For example, I have one player with 1 Arcana and one with 5 Arcana. The actor I'm making is fetching the 1 and the 5, and then utilizes the 5 because it is a bigger number.

I need to do this for several different traits, which I have, but this now means that if I add a player, if a player changes their name, or if a player becomes a different character, I have to go through and manually change the template in EVERY SINGLE SPOT.

SO, what I'd like to do is have a dynamic table hold the values of all the player characters names and then fetch from that table. (So, if the table has the player name "anna", it would fetch the name "anna" and then use that to fetch anna's arcana trait). This would mean that to edit player names, I'd only need to change the table, BUT it didn't work when I set it up. Either I've done something wrong OR it isn't possible.

So before I spend a lot of time troubleshooting, is it possible to fetch a thing and use that fetched thing to fetch again?

pale tusk
#

Is anyone else having an issue since updating where sheets won't reload?

dim socket
#

Hi! JS and Foundry noob here. I'm trying to create a formula that is dependent on a dropdown list component, where each key must return a specific value. Such as Aero returning 35, Airship returning 30. (Example keys provided below). How can I achieve this?

floral crater
vagrant hollow
formal goblet
formal goblet
formal goblet
dim socket
formal goblet
glossy hare
dim socket
#

Thank you! I've tried both methods, but I keep getting errors. I can't tell what's missing or wrong.
Ternary Operator
${equalText(chassis, 'aero') ? 35 : equalText(chassis, 'airship') ? 30 : equalText(chassis, 'hover') ? 25 : 0}$

SwitchCase
${switchCase(chassis, 'aero', 35, 'airship', 30, 'hover, 20, 0)}$

glossy hare
dim socket
#

Ah. That's embarrassing. I will now go and hide in a closet forever.

glossy hare
#

we all have momentes like this

dim socket
#

Thank you though, I don't suppose you know what the issue seems to be with the Ternary Operator?

glossy hare
#

idk what you were talking, just scrolled down

#

whats happening

#

if you can ping where you started talking about it

glossy hare
#

okay

#

there's a way around it

#

but the key will be numbers

glossy hare
dim socket
#

The choice of chassis affects movement and a bunch of other resources, so I wanted a formula that could provide a specific value depending on the key selected. In this case, I was trying to set up the value for movement speed (35 for aero, 30 for airship, 25 for hover, etc).

The switchCase solves my issue, but I'd like to know what I did wrong with the ternary-operator just to learn 🙂

glossy hare
#

probably a logic problem or a really small typo

noble tendon
#

Hi, i found two problems migrating to v.11

First is that i can import old templates and see, configure the sheet, objetc. But when i create a new item, foundry dont recognize template and show a blank.

Second. I have items from varios templates, weapon, ammon, magic, physic... I can create a compedium for the world, but when i import the compendium in other world, all items change the template for the first alphabatecally, in case arma(weapon)

glossy hare
lethal flax
#

so, how do i make a item filter filter by the selected dropdown option?

glossy hare
lethal flax
# glossy hare 🤔

the selected option from the dropdown menu is what talking about. So if i select "Small (1)" from the dropdown menu the item container would filter by that.

formal goblet
#

It doesn't

glossy hare
#

because i can't create new actors

potent fossil
#

Hello I have a question, now that we can use formulas into items modifier, I was wondering if, using a specific formula, it was possible to create modifier from a dynamic table.
For example if in a dynamic table I chose in dropdown lists "dexterity" "+" and "4", it would apply a +4 modifier to dex

#

Or is this still out of reach

formal goblet
potent fossil
formal goblet
dim socket
#

Hello again, I made a dynamic table that shows different attack modifiers for each Melee Form, and was wondering if there is a way to add the attack modifier to the label roll message? I've tried with switchCase but it either ends up breaking or the value doesn't get assigned to the roll, so I'm assuming I have to try a different method.

formal goblet
narrow ginkgo
#

i uh...2.3 seems to have done something to these item containers lol. any guesses why or a css fix for this?

hazy saffron
#

Macro Calling Question: I had this solved until we upgraded to the new CSB/new Foundry and removed Advanced Macros module. I have an Item that gets added to an Actor sheet. You click a label on the item and run a macro that needs to know the item's name. What is the proper syntax for calling the macro shown in the label roll message below when I want to pass the item.name as a parameter? Do I enclose item.name with any symbols?

%{return game.macros.getName('TestMyMacro').execute({param1=item.name})}%

dim socket
# formal goblet The `sameRowRef()` is probably the issue

Maybe I'm doing it wrong? I tried to assign it to attackmod in the example below, and got the error 'Value Expected'.


${#attackmod:= switchCase(ref('meleeForm'), 
'aegis', strength+capacity,
'aggressive', strength+endurance,
 'attuned', strength+willpower,
 'elegant', strength+discipline,
 'precise', strength+agility)}$

${attack:=roll+attackMod}$```
formal goblet
formal goblet
narrow ginkgo
dim socket
# formal goblet `attackmod` has a typo

Ah, fixed! Thank you. Unfortunately the issue still remains and I'm not sure how else to fix it.. 😵‍💫 I continued digging into the console logs; the attackmod expects a value despite the switchCase, which leads to the attack formula breaking due to 'uncomputable token'.

narrow ginkgo
#

this is with absolutely no css styling... could there be a bug with table density perhaps? other containers on the sheet dont do this

hazy saffron
#

I hope you're enjoying yourself somewhere fun and not too consumed with answering our questions 😄

brittle moth
#

**Version 2.3.1 is now generally available, with the following changes : **

**Fixes : **
Fixed issue with active effects not computing correctly
Fixed issue with dice so nice integration and chat messages display
[#275] Fixed issue with legacy templates not displaying correctly in new actors & items
Fixed issue when using Numbers inside setPropertyInEntity function

If you encounter any issue with this new version, please post an issue on Gitlab : https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new

hazy saffron
formal goblet
hazy saffron
#

Thank you. I just need to figure out the right format to send an item property key 😉

#

I'm getting a weird error at the end of macro call from a label roll message. The macro works fine but I get this error:

Uncaught (in promise) Error: Unresolved StringTerm object Object requested for evaluation
[Detected 1 package: system:custom-system-builder]

This is the last part of the macro where it seems to be happening:

if (rollOptionValues.cancel === false) { //ChatMessage.create(chatData, {}); return ChatMessage.create(chatData, {}); } else { return true; }

#

It displays the chat message correctly but I'm getting an error. Maybe the chat message is displaying because o the .create call and the return is having an issue

narrow ginkgo
keen carbon
#

any ideas on a "view source" sheet button that displays a list of an actor/item's keys and their values, akin to on roll20?

#

although i guess i could just use the export button

topaz coyote
#

Ah. Please disregard. This worked
Would lovely to have the ReadMe in git updated with an example syntax or screenshot like this

formal goblet
tiny hinge
#

Not sure if this is a bug but i noticed that the item modifiers from the templates doesnt get 'inherited' by new items that are created. Am i using it wrongly or this is a bug? 🤔

tiny hinge
formal goblet
tiny hinge
#

i see. alright. thanks for the explanation. maybe i can try a feature request to have them being displayed.

#

its minor but i see value in it being shown. helps with troubleshooting in scenarios where you do not know where the mysterious value is coming from.

tiny hinge
#

on a side note thanks for the fast fix on the active effect modifiers! 😄

hearty zinc
#

@formal goblet setPropertyInEntity does not work for hidden attributes?

formal goblet
hearty zinc
#

yeah it looks like it does not work correctly at least for me in v10. Do not know about v11 but should most likely not make a difference

hearty zinc
#

I will create a bug report on gitlab for it

outer marsh
#

Good morning to all! I am in a continuing awe with this software, for real!
now, the question (the awe is real!!)
in a roll message i can write %{ game.journal.getName("entry name").sheet.render(true); }% and works perfectly
how can I do something like this? %{ game.journal.getName(${txtLinkItemJournal}$).sheet.render(true); }% (Being txtLinkItemJournal a text field with "entry name" value)
Thanks a lot!!!

outer marsh
hearty zinc
#

Next Question, how do you get the values of a filled user input template in a roll message?

#

Nevermind, you just have to use keys in the input template corresponding to existing keys in the sheet using the roll

keen carbon
keen carbon
#

oh man

formal goblet
#

You can basically create your own pull-strategy if you really need this 😅

#

So in the formula it would be something like:

  • get all items on the current actor
  • filter by specified item template
  • flatMap by item prop
  • aggregate or concat values
keen carbon
#

i guess yeah i should probably do this on the character sheet itself rather than on the item

#

that makes much more sense

#

while experimenting i found that setting the key languages=dwarvish worked and i was wondering if there was an easier way to just combine multiple like that directly

formal goblet
#

And the language-prop would contain a simple fetchFrom()

keen carbon
#

I'm just particularly attached to using items because i have all the descriptions and the xp cost of all of it written out there

#

maybe i can just go about all of this in a very roundabout way

#

if i can't get the scripting to work, i mean

formal goblet
#

I kinda feel like that I need some Wiki-entries for the scripting-part alone...

keen carbon
#

a list of commonly used commands would be REAL helpful honestly

formal goblet
#

Well, most of the common stuff can be done with Formulas alone. Scripting is there to have a way to extend common behaviour

keen carbon
#

true

#

i'm just a js noob, tbh

keen carbon
#

so, i've cannibalized some code from the module itself

#

in theory, could i set a hidden attribute on the character sheet and define it as: ?

    let customLanguages = new Array();
    let templateID = "nd75dp1Vd1GTa1S1";
    for (let item of game.actors.items) {
        const template = item.template;
        const name = item.name;
        if (templateID.test(template)) customLanguages.concat(name);
    }
    return [customLanguages];
}%```
#

like, this would return an array of dwarvish,elvish,etc, if i set it up properly, right?

#

i'm not sure if i'm trying to fix something that can't be fixed or not

formal goblet
#

And I can't say if test() has an equality-check.

faint wharf
#

ok i see there are now also equipable items. so how i can i equip? or unequip but have? for example i planed for items to not impact waight by 0.5 of norm if equiped also only then i wanted modifiers to work

formal goblet
faint wharf
formal goblet
#

Nope

raven raven
#

How do you create something like this: with the current radio buttons?

#

I can see that you can only use radio buttons as "switches" or value replacements...

#

At the moment I can do this:

#

but the space between dots is huge

formal goblet
#

This is actually non-standardized (HTML) behaviour for radio groups, it is actually closer to Slider-behaviour than anything else. But yeah, currently not supported in CSB.

raven raven
#

I think if you could just reduce the minimum space between dots that would solve the problem...

#

The way it is, radio buttons can not be used on character sheets as value indicators. They behave more like a switch on a One multiple-choice form.

brittle moth
#

I don't understand how the two screens are different apart from the radio buttons spacing :/
If it's just that, you can solve it by using custom CSS

formal goblet
#

I thought he wanted something like a bar, e.g. if the 3rd element gets selected, 1 & 2 get selected aswell (equivalent to a number field with max-value)

faint wharf
#

anyone solved containers? for item to have items inside? if i want seperate bags?

brittle moth
scarlet skiff
#

hey @brittle moth thank you very much for fixing the item template bug with 2.3.1 🙂
by any chance do you know a working api command (for script macro) to reload a template?
item.reloadTemplate(); doesn't work 😦

faint wharf
#

i have red about adding css but i dont know where to add my custom css so it reads it

torpid plaza
#

whoops wrong channel

scarlet skiff
vagrant hollow
shy tendon
#

tried reading through the last few days of chat logs, curiuous if anyone could help regarding the item issues im having? I admit my code is quite bad and i have some pretty intense nested if statements (before switches were in here) and now if i open a character sheet that has like 3-4 items in it, the console displays all the computations for calculating everything within the items and it will go for about 5-6 minutes while task manager says firefox is using 50% cpu lol

#

basically almost breaks my pc lmfao

#

couldnt find anything specifically mentioning a lot of this

tiny hinge
#

Is it possible to hide and display a component by clicking on a button (label) in csb? basically like furl and unfurl function for a specific section. I know you can control the visibility but I am mostly using that with check boxes and field values; not so much from the new buttons yet.

shy tendon
#

Right now, I have items that are guns, the guns are matched up with specific bullets of which those bullets have specific damages and specific weights to each bullet. I have 20+ bullets, all that is then added up and calculated when magazines are added on the item for players so that way weight and damage is always calculated depending on which bullet is within the magazine. And people can have up to like 10+ magazines. And then actor sheets sometimes have up to 3-5 items (the guns) on their character sheet within the item container.

Looks like when I boot up an actor sheet, foundry runs the code for every single bullet, magazine, and gun and it lags horrifically to the point where it takes 5+ minutes for the actor sheet to open along with the earlier mentioned performance issue where my CPU is working overtime. This was never an issue in previous versions.

Ill probably recreate this somewhat from scratch if I have to but im just so confused why the item containers and the items seem to be computed and then those computations seem to just break everything else

formal goblet
tiny hinge
#

i think i know the logic. i can probably do a hidden label that changes value when a button is clicked and the visibility is based on the hidden label value

#

just not sure how the button dispatches actions

formal goblet
#

Or you change the display (text) of the button, so you can take that to construct your predicate

tiny hinge
#

oh shit

#

yeah that works LOL

#

ok

#

i think i get it

#

thanks!

formal goblet
shy tendon
#

alright, i will try to get that when i can, im still doing some troubleshooting. IM genuinely getting thousands of console logs

#

im just glad my browsers havent crashed

formal goblet
shy tendon
#

You mean on like my console output? I have errors, warnings, and debug only showing i think

formal goblet
#

That's why I usually set it to 'error' and 'warning' only

shy tendon
#

but yeah, when my friend opens a sheet, it also bricks my cpu usage along with his own lol

#

yeah, i also had debug on, i can turn that off and only have error/warning on

shy tendon
#

I have found the main issue. I had a previous way of adding weight within an item container. It would call the total weight of an item (that involves checking which bullet is used in each magazine and then assigning the weight and then multiplying weight of each bullet by # of bullets in magazine using long nested if statements) and then it would modify an actor key. That's how I had it working from before I believe however this never fully worked and I had left it just sitting there

Upon updating to this, i figured item modifiers had to be an issue, we eventually were able to get through the lag and delete all previous item modifiers thereby finally fixing our issue. Something with our previous item modifiers had completely broken everything and was making it so that calculations would go on for 5-10 minutes straight.

What a struggle lol but I appreciate the help and I prob wont make an issue in gitlab now

#

This little snipet of a nested if statement....the culprit i believe

#

😍

formal goblet
# shy tendon

Holy shit, satan has to come before I even try to debug this.

shy tendon
#

😘

#

Sorry man, but hey, alls well that ends well : D

#

the funny thing is...thats only one. I do that multiple times for bullet weight and bullet damage along with having to do that again for every magazine

formal goblet
#

...

shy tendon
#

Now, I admit that its awful code....its disgusting and i am ashamed to have done it (im also very lazy) BUT in my defense, IT WORKED BEFORE THIS RECENT VERSION IT WORKED FINE

#

and it actually works again now that i got rid of item modifiers lol

formal goblet
#

There must be a way to optimize it atleast tenfold

shy tendon
#

Yeah, im prob gonna redo all of this and make it much better and not be really lazy. I honestly wrote this in notepad++ and then just did a bunch of ctrl-f and replace and copy pasted it, so while its ugly as hell, I made that in maybe 2 minutes or less lol

#

But yeah... anyways, alls well that ends well and i appreciate input and responses : )

formal goblet
#

For that I'd need to know what you have and what you desire.

shy tendon
#

sorry, i meant i appreciated the inputs and respones from you. I think im good for now. Thank you

faint wharf
#

can i put field in tooltip? i tried ${}$ without succes i wanted to description be shown

raven seal
#

What class should be used to apply css styling to the user input dialog box when making a roll?

bitter perch
#

Hi hi, is it possible to set some classes to only appear if you select a specific race when building a sheet?

prisma orchid
#

@brittle moth, @formal goblet I just skimmed all the new features that came with 2. 3 and I have to say: you are among my favourite people now 🙂 awesome work and much appreciated!

pale tusk
#

Any known issues with items not saving changes when you edit them? Like, it'll seem to show the change has saved, but then when you close the item and re-open it, none of the information you entered is there anymore.

scarlet skiff
brave trench
#

Hi all! Can someone help direct me on how to have multiple attack options from a weapon in an item container? Example, an SMG with two attack options, single fire that rolls 1 attack and 1 damage dice, or full auto that rolls 1 attack and X damage dice.

I've read a lot of the how-to stuff but I'm no good at this and kind of need help getting started.

formal goblet
brave trench
#

Thank you Martin! How does the player choose between the two modes? Since only labels can be used in the container would they have to open up the item and use the drop down?

or maybe a pop up box instead? Since in full auto case, with X, the player would have to input the desired number of bullets fired.

formal goblet
brave trench
#

Thank you!

wise cloud
#

I am super new to Foundry and am wanting to adapt a game I have written to the VTT. Can someone please tell me how to best get started?

faint wharf
#

the king is online! can i put field in tooltip? i tried ${}$ without success i wanted to description be shown from the item

formal goblet
pale tusk
scarlet skiff
pale tusk
scarlet skiff
#

🤷‍♂️ without code no idea

pale tusk
#

I was asking if it's a known bug because this is bizarre, and I have a hard time believing that a basic set of fields would just magically stop holding information, even after a version change. I can grab the code when I get to my computer.

pale tusk
#

I'm going to reload the game and try again. Maybe there was some kind of connection issue that prevented saving last night.

brave trench
scarlet skiff
#

how would i get the following / is it doable?:
color the background of an item container depending on the rarity key of the item in it.
for example if the first item in the item container has the key "itemrarity" (0 / 1 / 2) of 1 then the background should be blue.
is this doable?

finite pasture
#

Hello, I just ran into an issue when I updated to the lastest version, it appears to be one that was already mentioned previously where the number field box disappears when permissions for Observer is given to other players to view sheets. I reverted back to 1.7.3 and it seemed to fix the issue. Is there by any chance a newer version without the number field permission issue?

hallow salmon
#

how can i use 2 attributes to derive a third value? phyvalue + mstvalue is what I want - but confused on the script to use. and where it would go.

covert crescent
#

Hello everyone. I am new here and have a couple of basic questions.

#

Is there any documentation for this module and if so, where can I find it?

covert crescent
#

Thanks!

#

Secondly, is it normal for the "Configure sheet display" to not pass changes for "Sheet Default width" and "Sheet default height"?

brave trench
#

are you closing and reopening the sheet? I dont think the changes will immediately take effect, but they should the next time it is opened

#

and keep in mind, a template is not a sheet. the sheet display settings wont affect your template, only a sheet

covert crescent
#

Yeah, tried that. Gotcha! I work in software tech support, so closing an reopening is pretty standard. I just need to make those sorts of changes in the template and then should see them applied in the actual actor sheets!

brave trench
#

correct!

#

and that concludes the amount of help I can give lol... I'm usually the one asking for help here.

covert crescent
#

10-4, I will save the more complex questions for later then 🙂

brittle moth
covert crescent
#

Is there a way to create a panel with unequal columns?

#

NM, I will use a table

brittle moth
#

You can by using a grid panel layout, and adding in your component the custom classes grid-span-2 to grid-span-12, which spans elements over 2 to 12 columns

bitter perch
#

Is there a way to add an item to a dropdown menu based on the value of another? (Ex: choosing a specific race adds an extra class you can choose)

brittle moth
#

No, that is not possible

bitter perch
#

Okie dokie. Thanks

dire socket
#

Can I use 2.3.1 on version 11?

formal goblet
formal goblet
dire socket
#

got it

formal goblet
silver lake
#

Any way yet, at least on Unstable, to make a Roll automatically deduct a point from a resource? Like, rolling something that spends stamina, and the roll automatically spends that stamina?

hallow salmon
silver lake
# brittle moth Not only is it on unstable, it is on the stable 2.3.1 version ! https://gitlab.c...

Okay, I have a question about how this can work within a formula.
If I set a query in the roll message attributed to 2 different stats in a dropdown:

${?{Energy:'Energy Spent ='|CWill,"Willpower"|CStam,"Stamina"}}$

How do I then deduct from the selected stat?

This:

${setPropertyInEntity('self', 'Energy', ref('Energy') - 1)}$

Or without the Ref, only brings up howw much the stat would be if deducted, but doesn't actually deduct from it.

Anyy help would be appreciated!

#

Cause it seems I only know how to refer to the value within the formula.

hallow salmon
#

Back with another script item. ${movetotal <= 10? @mvsqtest=2: @mvsqtest=3}$ works giving me either a 2 or a 3 However, I now need to add the rest in which is basically greater than ## or less than, ever 10 numbers up to 60 then switches to ever 20. . I tried using ||in the formula but comes up with an error. ${movetotal <= 10? @mvsqtest=2: movetotal =>11||<= 20? @mvsqtest=3}$ what might be a better way to formulate this.

raven seal
#

although I'm not sure why you need the first half, as it should only reach that second if statement when the first is false, ie. movetotal > 10

raven seal
#

now that i'm reading the docs, I'm not sure if the OR operator is supported at all

#

oh and your second conditional needs something for when it evaluates to false (it should have a : somewhere)

#

are you trying to do an OR statement or an AND statement here?

hallow salmon
hallow salmon
raven seal
#

If i'm understanding the docs correctly, an if else chain should be structured as
cond1?value1:cond2?value2:cond3?value3:...condN?valueN:default

#

that is, assuming a switch statement doesn't work for whatever reason

raven seal
hallow salmon
#

I tried this as yousuggested: ${movetotal <= 10? mvsqtest=2 : movetotal <= 30? mvsqtest=3 : movetotal <= 40? mvsqtest=4 : movetotal <= 50? mvsqtest=5 : movetotal <= 60? mvsqtest=6 : movetotal <= 80? mvsqtest=7 : movetotal <= 100? mvsqtest=8}$ but is an error.

raven seal
#

you need one last value so it knows what to do if everything evaluates to false

hallow salmon
#

how would that be written?

raven seal
#

it should end with movetotal <= 100? mvsqtest=8 : mvsqtest=someValue

#

for whenever movetotal is greater than 100

hallow salmon
#

that was it - thanks a lot

#

now I have 8 more stats to do

somber bay
#

I feel like there is a formula that would work for you but I forget my math statements

#

In my friends game modifier is basically (stat/20)+1 and no decimals and no weirdness happens due to rounding.

brave trench
#

floor() gets rid of of decimals/truncates a number, if that is what you mean

silver lake
brittle moth
silver lake
brittle moth
#

I'm going to need more info on your template to help you. Are you trying to substract from a field keyed 'Energy' ? is it a standard field or is it in a dynamic table ?

silver lake
#
${?{Energy:'Energy Spent ='|CWill,"Willpower"|CStam,"Stamina"}}$
${setPropertyInEntity('self', 'Energy', ref('Energy') - 1)}$

This is the formula. The CWill and CStam are keys to text-fields in another tab. They're not in a dynamic table.

brittle moth
#

Sorry, I re-read your first message.

So you're trying to update the CWill or CStam field ? And your player needs to choose it in a user input ?

silver lake
#

Yeah!

brittle moth
#

Your user input there sends back the value of the fields. They need to send back the key for the rest to work

${?{Energy:'Energy Spent ='|"CWill","Willpower"|"CStam","Stamina"}}$
${setPropertyInEntity('self', Energy, ref(Energy) - 1)}$

This should work

#

Be sure to use ref(Energy) when you want to use the value, and Energy when you want to get the name of the original field

formal goblet
brittle moth
#

EDIT - Removed quotes in the ref function

silver lake
#

:P I'll try! thank you!

knotty minnow
#

I could use some help on this one little project. I have a macro that rolls 2d6 with a prompt to add a static modifier (attached). How would I convert it into a button action on a character sheet? I have the die roll action but I haven't been able to figure out how to do the modifier prompt. Thanks!

brave trench
#

If this is even possible.... how do I go about having a button or roll that adjusts a value on multiple items at once?

silver lake
#

So, a glitch that I was having since before the 2.30, and that is still present is that if a dropdown refers to a dynamic table, and I select an option which has a value equal to another option in the same dynamic table, it just defaults to the first one alphabetically with the same value. Which is far from ideal.

dusky mauve
#

Hi,
Can't understand how to use switchCase

${switchCase('combat_level', '0', 'novice', '1', 'base', '2', 'advanced', '3', 'expert', '4', 'master', '5', 'grand master', '6', 'god', 'UNEXPECTED')}$
is always show UNEXPECTED, but if I use

${combat_level==0?'novice':combat_level==1?'base':combat_level==2?'advanced':combat_level==3?'expert':combat_level==4?'master':combat_level==5?'grand master':combat_level==6?'god':'UNEXPECTED'}$
it is changing the value accordingly to combat_level value

formal goblet
dusky mauve
#

My bad - thank you)

dusky mauve
#

By the way is it possible store dynamic table for usage for items or actor
I mean globally and not hardcode values in templates - without using JS directly.

For example create rollTable and just get specific row by value

formal goblet
dusky mauve
#

Also they can be imported by compendium, same for actor

faint wharf
#

how to make double conditions? OR AND?${Glo AND PP ? pp : 0}$ I wanted for both checkboxes to be true

keen carbon
dusky mauve
formal goblet
keen carbon
# formal goblet This is a comma-separated value (CSV), not an Array 😅. An Array looks like this...

so, i've written this (based on the code from the module itself) just to test the very basics:

const name1 = 'Elvish';
const name2 = 'Dwarvish';
customLanguages.add(name1.trim().toLowerCase());
customLanguages.add(name2.trim().toLowerCase());
return [Array.from(customLanguages.values())];}%```
but it throws up an error, and in the js playground i'm using, says `illegal return statement`
but, when i change `return [` to `console.log(`, it works just fine, and gives me `elvish,dwarvish`
#

is it something with the way i'm formatting it? the original module just uses return [customLanguages];, but that doesn't work, either

#

is the scripting more limited than i'm thinking, or is there something i'm missing?

formal goblet
#

You can also shorten it to this:

const customLanguages = [];
const name1 = 'Elvish';
const name2 = 'Dwarvish';

customLanguages.push(name1.trim().toLowerCase());
customLanguages.push(name2.trim().toLowerCase());

return customLanguages;
keen carbon
#

i'm typing this in to the Hidden Attributes section of the character sheet template, defining the key of "languages" exactly as i typed above

#

i'm hoping this isn't just a limitation of the character sheet scripting, but i would assume it's not

formal goblet
keen carbon
#

but setting the languages key to elvish,dwarvish by itself works fine?

shy tendon
#

${roll<=(item.weapon_prof_current) ? setPropertyInEntity('selected','pc_damagevariable', "pc_damagevariable + dmg") : "No Damage"}$

Just curious if anyone had an idea about this. The pc_damagevariable ends up changing to what "dmg" is but it never adds it. When I roll and get another number, it just changes pc_damagevariable to whatever the dmg is, it doesnt add. Any ideas?

dusky mauve
# formal goblet You mean something like a lookup-table? You could create a global actor, which h...

When I use this in ACTOR_ONE with FILTER VALUE from ACTOR_ONE key it's worked
Running from ACTOR_ONE:
${fetchFromActor('ACTOR_ONE', "getRefFromDynamicTable('<DYNAMIC TABLE KEY>', '<TARGET COLUMN KEY>', '<FILTER COLUMN>', '<FILTER VALUE ACTOR ONE>')")}$

But FILTER not work if it referenced to the key of ACTOR_TWO sheet
Running from ACTOR_TWO:
${fetchFromActor('ACTOR_ONE', "getRefFromDynamicTable('<DYNAMIC TABLE KEY>', '<TARGET COLUMN KEY>', '<FILTER COLUMN>', '<FILTER VALUE ACTOR TWO>')")}$

formal goblet
dusky mauve
keen carbon
#

which i think might not be so simple

keen carbon
#

this works perfectly in a js playground:

const name1 = 'Elvish';
const name2 = 'Dwarvish';
customLanguages.push(name1.trim().toLowerCase());
customLanguages.push(name2.trim().toLowerCase());
let test = `\'${customLanguages}\'`;
console.log(test)```
but putting it in to csb doesn't work (it causes the script to break entirely and not just throw an error)
however, putting the console output of the above in directly works just fine:
```let test = 'elvish,dwarvish';
return (test)```
so i *know* it's just an issue with the formatting
#

@formal goblet do you have any idea how to fix this (hopefully) final issue?

hallow salmon
#

I thought I read some where that scripts (well at least the more involved ones) in this system and dice so nice do not play well together- or am I wrong? or more probably it is me? this script works - but rolls every dice in the script not just the one requested . the keep success out puts correctly.....am I missing something? I have experemented with several ideas - but no luck. ${strvalue <= 4? [1d6cs>4] : strvalue <= 7? [2d6cs>4] : strvalue <= 10? [3d6cs>4] : strvalue <= 12? [4d6cs>4] : strvalue <= 14? [5d6cs>4] : strvalue <= 15? [6d6cs>4] : strvalue <= 16? [7d6cs>4]: strvalue <= 17? [8d6cs>4] : strvalue <= 18? [9d6cs>4] : strvalue <= 19? [10d6cs>4] : sotcstr= [11d6cs>4]}$

brittle moth
#

**Beta version 2.4.0-rc1 is now available, with the following changes : **

Features

  • Added checked by default option to checkboxes
  • Added control style option to number fields
  • [#155] Added Conditional Modifiers

Fixes

  • Fix NumberField hidden on uneditable, non-template actors

Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta

If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new
GitLab

formal goblet
brave trench
#

I have a dynamic table for armor (i use layering armor that combines resistances into a total) that used this formula for different body parts ${sum(dotMultiply(fetchFromDynamicTable('armor_table','arms'), fetchFromDynamicTable('armor_table','resistance')))}$

Will this work using item containers instead? not sure what formula to use.

brave trench
formal goblet
#

fetchFromDynamicTable() doesn´t work on Item Containers at all

brave trench
#

right, I didn't think so. sorry I'm not very good at this lol.

floral crater
hallow salmon
brittle moth
#

**Beta version 2.4.0-rc2 is now available, with the following changes : **

Fixes

  • Fixed issue with Conditional Modifier List not displaying correctly on legacy sheets

Please refer to the README BETA for instructions on new features : https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/README_BETA.md
FYI, Manifest URL for the beta version is https://gitlab.com/api/v4/projects/31995966/jobs/artifacts/beta/raw/out/system.json?job=build-beta

If you encounter any issues with the beta version, please open issues on gitlab and specify you are using the Beta in the issue title !
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/new

dusky mauve
#

Is it possible use dynamic filter field in ItemContainer?
As documentation said The value can not be a formula, it must be a fixed value.
So filter must be KEY inside the ItemContainer and Value it's a string and not any way to make reference for example to Dropdown List value. It will be good have interactive filter for such tables

formal goblet
# dusky mauve Is it possible use dynamic filter field in **ItemContainer**? As documentation s...

The filter key in the Item Container has to be fixed, the value in the Item can be dynamic.

Let´s say we have Inventory-Items with a Dropdown, that indicates, where the Items are stored. We could create multiple Item Containers, with different filters. Each filter would check for the same key, but with a different value (depending on what options the dropdown has). This way you would be able to store your Item Links in different Item Containers.

hallow salmon
formal goblet
hallow salmon
# formal goblet What the hell are these dices? 😅

custom dice - I added to Dice so Nice. well custom pips...from Siege of the Citadel game long ago. (they should be all 6 sided - but I couldn't get the additional d6's (I tried to add) to work in dice so nice. so I cooped the 8 and 12 since that had the same odds when scaled

dusky mauve
pale tusk
#

Any known issue where when you setup a dropdown to pull from a dynamic table that the dropdown will just display...nothing at all?

dusky mauve
pale tusk
dusky mauve
pale tusk
dusky mauve
pale tusk
formal goblet
#

Sorry, I have difficulties to comprehend your issue 😅 So I´ll just show what I have.

M_Aktiv is a key to a checkbox in an Item. If the checkbox in the Item is checked (M_Aktiv is true), it will be displayed in the Item Container. Otherwise it won´t be displayed there. The filter only determines if the Item should be displayed in this specific Item Container or not.

pale tusk
#

It's like the dynamic table just doesn't even exist or something. Bizarre.

formal goblet
#

Any errors?

pale tusk
#

Not that I can see related to the table. I have an error from an unfinished formula elsewhere on the sheet.

formal goblet
#

That is probably the issue. If something fails, it will stop computations at this cycle

pale tusk
#

Interesting. Let me put dummy numbers into the formula and see if it fixes.

#

Nope. The error is gone, but the dropdown is still blank.

formal goblet
#

You can validate it if you try to change other stuff in the sheet

pale tusk
#

Okay...it's that weird error again where default values don't do anything.

#

I have to physically click every field in the table before the dropdown will acknowledge them.

#

Is there any way around that? That's an enormously frustrating bug and will make this implementation impossible, since it's supposed to be a table that the user can't click.

formal goblet
#

Usually an update anywhere on the sheet is enough to fetch all missing values.

pale tusk
#

I've usually found that doesn't work. I usually have to click every field.

formal goblet
#

That´s... unusual

pale tusk
#

Every sheet I've built has that issue. Until I click or fill a field, it's like it doesn't exist.

formal goblet
#

Well, I cannot say why to be fair

#

If I create a new Actor, the initial load has like 80% of all values. And after I update some random field, it has every value set

pale tusk
#

Could it be isolated based on the panel it's in or something?

formal goblet
#

Nah, Panels don´t matter at all

pale tusk
#

Then I have no idea. It's a persistent issue, though, and very consistently so.

formal goblet
#

Are you using a Browser?

pale tusk
#

Yes. Firefox.

formal goblet
#

Well, same for me, when I´m actually playing

pale tusk
#

I run from Forge, so the browser is the only way I can access the game.

formal goblet
#

Well. I have no clue if there might be issues with Forge and it´s pretty hard to verify that.

#

Do you also have a Foundry-Client, where you can run a test-world?

pale tusk
#

I have the client installed, but I'm not sure what I have set up on it. I never use it at all.

formal goblet
#

Wanna join my world then it test it there?

pale tusk
#

If that would be helpful, sure

formal goblet
#

Check DM

shy tendon
#

can you fetch a dynamic table from an item from within an item container?

#

I tried to do that but it seems to not be working? No errors are thrown in console?

#

i get this output in the message log but it returns nothing even though that should work

#

originally I tried doing fetchFromDynamicTable('item.weapon_magazine_dyntable','item.weapon_magazine_ammo_current')

Because I understand this should return me a matrix of all the values within the column weapon_magazine_ammo_current and then I was going to do first() to get the first value. However, when I do that first line written above to get the matrix, it says uncomputable phrase

shy tendon
shy tendon
formal goblet
# shy tendon this?

Ah, I see. You only need the item.-prefix for the first parameter, target and filter-values do not need the prefix

shy tendon
#

ohhhh

#

it worked, thanks so much

shy tendon
#

I now have another question lol

So, getting the value worked. Now I have this issue:

#

${setPropertyInEntity('item', "getRefFromDynamicTable('item.weapon_magazine_dyntable','weapon_magazine_ammo_current','weapon_magazine_used','1')", "first(fetchFromDynamicTable('item.weapon_magazine_dyntable', 'weapon_magazine_ammo_current')) - 1")}$

In this, I am attempting to set a value within a dynamic table, essentially attempting to reduce ammo by 1. So, in this code, I have it so it looks into the item, it finds the reference of the dynamic table named 'weapon_magazine_dyntable' and then looks under column weapon_magazine_ammo_current and then finds the value where weapon_magazine_used (which is a checkbox) has a value of 1 meaning it is currently checked. Then, I fetch the value it currently is and deduct it by 1 in the next part.

Now, when I run this, it actually doesn't give me an error. In fact, the chat-log gives me the appropriate value where its clearly found the ammo value and deducts it by 1. However, it doesn't actually set the value to that new reduced number. I presume this means that my getRef code is not properly built

#

As while it's able to find the value I want it to change to, it's not finding the data path within the dynamic table and therefore not able to change the value

#

I did notice in the example given on GitLab setPropertyInEntity('self', getRefFromDynamicTable('Spells', 'Uses_left', 'Name', 'Fireball'), "min(first(fetchFromDynamicTable('Spells', 'Uses_left', 'Name', 'Fireball')) - 1, 0)")

when getRef is used, they don't put it in quotations. However, if I remove it from quotations, I'm actually getting the same error as before where it states it is not a computable phrase

shy tendon
#

I suppose a good question to ask just incase if this all sounds confusing as well is: if my filterColumn argument is a checkbox, what should I put for the filterValue argument? Should I put '1' or 1 or True or 'True'

#

in previous things I've done with fetchFromDynamicTable, I've done '1' and then done a filterOperator of '>='

#

Well, I put 'Checked' since that seems to be usable as well but unfortunately that still doesn't actually change the value of the cell I want

shy tendon
#

hm alright ill try that

#

while that does roll fine and throws no errors in console, still doesn't change the value of the cell within the dynamic table

drifting raft
#

Hello, is it possible to utilize a formula to set all checkboxes to either a 'false' or 'true' state? In other words, I am interested in creating a button that will reset all currently checked checkboxes.

dense pine
#

Hello there, does anyone play DSA with Custom System Builder?

scarlet skiff
brave trench
#

is it possible to use setPropertyInEntity on multiple items in a container at once? or does that only work with dynamic tables?

drifting raft
# scarlet skiff Could you explain your goal and use case please?

Yes. I have sveral skills that when you succed a checkbox is marked for later leveling up (a la Call of Cthulhu). I use macros to check the checkboxes of the skills. I wander if it is posibble to make a label with a formula in the character sheet that uncheck all those checkboxes at a time once the leveling phase is over, instead of unchecking all one by one.

scarlet skiff
# drifting raft Yes. I have sveral skills that when you succed a checkbox is marked for later le...

i'm not experienced with the new setPropertyInEntity method. maybe it could be done by this?
on the other hand would it be easier to write a short macro to set all the desired checkboxes by hand? i think i would write a macro which resets all the appropriate boxes of the selected character. you can even target all player characters and press the macro only once and you are done (of course if all level at the same time, etc...). for me personally i think it would not be worth creating a button in the character sheet.

drifting raft
misty terrace
#

Quick question. Do conditional checks allow for compound checks? (so If X is true AND Y is true)?

formal goblet
formal goblet
misty terrace
#

I am prototyping a new system. It's a d100 roll-under model that features character improvement through skill/item use.

For example, the character can learn to use the Longsword, when they use it, they roll a d100 and compare to their current Skill with Longsword.

If they ROLL UNDER the skill, they "hit", if they roll JUST under the skill, not only do they hit, but the attribute that is associated with the skill/item (Might, for example) improves by 1%.

If they ROLL OVER the Skill, they miss/fail. But if that roll is JUST over the Skill then they learned something new and their Skill improves by 1.

I'm trying to automate the check and the Attribute or Skill change in code. So far, I've tried to do that in the Label roll message in an Item Container on the Character sheet. Where I just can't seem to get it right is coding the logic structure to compare the results. I've tried nested Ternary ?, I tried a switchCase, but I can't get anything to work. Am I doing this the right way in the right place, or is there a better place to put the code, or a better way to do this?

#

(sorry for the wall of text)

formal goblet
#

The Label Roll Message seems the right place for me, but I´d probably use the ternary operator instead of switchCase(), because this one only checks for equality, but you need range-checks aswell.

misty terrace
#

Trying to lay out the nested Ternary is diriving me nuts. Can you use arbitrary spacing?

formal goblet
#

Whitespaces are fine (in most cases). Newlines can cause issues

misty terrace
#

I took out the skill/attribute improve code, still can't get the Ternary to work. Getting a "False part of conditional expected" error.

#

${#roll:=[1d100]}$ ${#skillName:=item.name}$ ${#skill:=item.skill_score}$ ${#impScore:=round((skill*(100-skill)*.01)/2)}$ ${#attrImpBase:=skill-impScore}$ ${#skillImpCap:=skill+impScore}$ ${#attribute:=item.skill_attribute}$
<h3>${item.name}$ Test</h3>
<table>
<tbody>
<tr>
<td>Target score: ${skill}$</td>
</tr>
<tr>
<td>Result: ${roll < skill ? roll >= attrImpBase ? ' Attribute Increase!' : 'Success' : roll <= skillImpCap ? ' Skill Increase!' : 'Failure'}$</td>
</tr>
</tbody>
</table>

#

I'm missing something basic, I know it

formal goblet
#

Try to use brackets in the nested checks.
${roll < skill ? (roll >= attrImpBase ? 'Attribute Increase!' : 'Success') : roll <= skillImpCap ? 'Skill Increase!' : 'Failure'}$

formal goblet
misty terrace
formal goblet
#

Yep, would suggest that. Try to find the culprit in it

misty terrace
#

becuase that's and IF elseIF elseIF

#

easy to get crosseyed

#

hey, can I output HTML as part of a Ternary check?

#

(so only build the <TR> if an expression is true?

formal goblet
#

I think it gets sanitized

misty terrace
#

I was a coder 20 years ago. trying to remember some of the tricks from the first days of the web

formal goblet
#

I´m glad that nowadays it´s more convenient to build web-apps because we have powerful frameworks now 😅

runic flax
#

I was curious if anyone here would be willing to host a short session to show how they use Custom System Builder to create their worlds? It would be great to actually see how others use FVTT in actual use.

misty terrace
#

No JCL and HEx dumps for me!

#

@formal goblet Can I run a setPropertyInEntity from within a Ternary? And can I run code and also return some text to the chat from within that Ternary?

formal goblet