#Custom System Builder

1 messages · Page 28 of 1

earnest imp
#

but i think the syntax and the logic is somewhat transferrable for your use case

#

i use status icon counter so checking status per round is very important for my use case

#

yours may be different

formal goblet
#
Hooks.on('combatRound', async (combat, update, options) => {
  if (options.direction !== 1) return; // Kill hook function if combat round doesn't increment forward.

  const equipmentTemplateIds = game.items
    .filter(item => item.type === '_equippableItemTemplate' && item.name.startsWith('Equipment'))
    .map(item => item.id);

  canvas.tokens.placeables.filter(token => token.inCombat).forEach(token => {
    const statusTable = token.actor.items
      .filter(item => equipmentTemplateIds.includes(item.system.template))
      .filter(item => item.system.props.status_table)
      .map(item => item.system.props.status_table);

    Object.values(statusTable)
      .filter(row => !row.deleted)
      .forEach(row => {
        /* ----- INSERT YOUR CODE TO ADD STATUS PROGRAMMATICALLY BELOW ----- */
      });
  });
});
earnest imp
#

Thanks for the help, still cant intuitively use .map in my head instantly 🥲

formal goblet
#

It's pretty useful if you only need a property of an array of objects (like an id)

uneven quail
#

Completely unrelated:

I don't believe there is a way to sort items in an item list, but would anyone know if it's on the todo list for a future update or anything? I currently have a different item list for every rank of spells, 1-20, and I want to know if I'm wasting my time lol.

uneven quail
#

Oh cool, thanks! I appreciate it!

uneven quail
# formal goblet It's already in in the beta

I'm probably going to have to wait for the patch release, unfortunately, since I have an ongoing game, but I'm curious how you decided to do it. Is it a normal "Sort by item.level, ascending" kind of thing, or can you do a more specific "Sort by item.Slot, in order of Head, Arms, Chest, Legs, Feet".

I think the first covers 99% of use cases, I'm just wondering haha.

formal goblet
uneven quail
potent fossil
#

Hello I have 2 question !

1- Is there any known wat to reload all the items, event those that are already in a sheet?
2- Is it normal that when I use 'Delay entity saving' I cannot save the content of any Rich Text Area?

formal goblet
#

About the second question: This bug is unknown, I'll need to look at it

misty terrace
#

I'm looking to put an image box inside an item to have it hold user-selected images (like the portrait box, but in the body of the sheet). Anyone figure this out already?

misty terrace
#

Think I got a way to do it. Just figuring out how to emulate the image search popup that Foundry uses

sturdy mesa
#

I'm using a dynamic table to create custom skills
The button "USAR" means "USE", and it sends to chat the rich text area message, but it's considering all my formulas only text. Can you help me? I want the formulas to be active when I press "USE" and send to chat, not just the text

sturdy mesa
# formal goblet https://discord.com/channels/170995199584108546/1037072885044477962/122421086662...

Inside the same example,

I have a number field named "uses" in my dynamic table. Im trying to update the same row of the table "uses" for a skill to "uses - 1" when the player press the button to call the macro and send the rich text area to chat, but this is not working

I'm writing the code to update the uses value Inside the rich text area, which is the camp I also write the formulas to roll dice. How can I update the same row value since it's using an macro and the macro can not understand?

lofty goblet
#

How would one change the width of a specific column in a dynamic table?

lofty goblet
#

Also, how would one format a table created by a dynamic table?

grave ether
#

Is there a way to select the last in a dynamic table?

Players will add class to a list of classes they take. The last on the list will be the current class.. and will display as the current class as a lable.

${partitionSelect(fetchFromDynamicTable('titles', 'Title'), '0', compareText)}$```

My thought is to change the 0 above to totallevel -1  but that doesnt work. I thought also about adding another column but I cant figure out how to get it to add+1 if a row is added.. IE 

Fleet Acadamey would be 1. 
Schumuck would be 2.. so on.. 

IDK if that is possible...
#

Can we reference predefinedIdx in a lable?

#

If so that would also work

formal goblet
grave ether
#

educate me lol

#

${partitionSelect(fetchFromDynamicTable('titles', 'Title'), '0', compareText)}$ <--- this populates a value but the 0 <-- which I thought was the placement, doesnt match either the dropdown referenced nor the table, so I am at a lose...

#

${first(fetchFromDynamicTable('titles', 'Title')}$ works for the first value but I need the last value

formal goblet
grave ether
#
      "titles": {
        "0": {
          "deleted": false,
          "predefinedIdx": null,
          "Title": "SCHMUCK",
          "skillPointGained": "0",
          "hpGained": "0",
          "str": "0",
          "dex": "0",
          "con": "0",
          "vit": "0",
          "awa": "0",
          "will": "0",
          "int": "0",
          "cha": "0",
          "luck": "0",
          "speed": "0"
        },
        "1": {
          "deleted": false,
          "predefinedIdx": null,
          "Title": "Truenamer",
          "skillPointGained": "0",
          "hpGained": "0",
          "str": "0",
          "dex": "0",
          "con": "0",
          "vit": "0",
          "awa": "0",
          "will": "0",
          "int": "0",
          "cha": "0",
          "luck": "0",
          "speed": "0"
        },
        "2": {
          "deleted": false,
          "predefinedIdx": null,
          "Title": "Fleet Academy Graduate",
          "skillPointGained": "0",
          "hpGained": "0",
          "str": "0",
          "dex": "0",
          "con": "0",
          "vit": "0",
          "awa": "0",
          "will": "0",
          "int": "0",
          "cha": "0",
          "luck": "0",
          "speed": "0"```
formal goblet
grave ether
#

How do I referece the "0", 1, 2 ,3 etct

#

Looks like there isnt a pid for it ..

#

referencing null..

#

maybe thats why

formal goblet
grave ether
#

It might

formal goblet
#

Othwerwise check the Script I've posted

grave ether
#

Trying to think here... if I count the number of fields created -1 that should give me the number I need to reference

#

inserting that into ${titles.0.Title}$ would adjust correct

#

IE if there are 5, levels ${titles.4.Title}$ would return last in the list

#

Thanks Martin, let me see if I can get it to populate

cinder rock
#

can switchCase() be used to check booleans? For example, if I had a checkbox that was checked, and had something like this: switchCase(checkbox, 1, 'This is true', 'This is not true') would the switchCase return 'This is true'?

#

(I'm currently having no luck trying to set up this behavior, and am wondering if it is user error or if it just can't do that)

formal goblet
cinder rock
#

gotcha. I'll stick with a ternary check for that then.

lofty goblet
formal goblet
lofty goblet
#

Exactly. I have a dynamic table with tables as its entries

#

The tables should have text and number fields, but there's no way to adjust the table before it's generated that I can see

#

Specifically I'm trying to create multiple instances of this table

formal goblet
#

Well, Tables inside Dynamic Tables are simply not supported

lofty goblet
#

Ah... any other way to accomplish something similar?

formal goblet
#

I think the next best thing would be items, but those work quite different

lofty goblet
#

Alright, I'll see if I can make those work. Thanks

sturdy mesa
#

this code is healing my character with the value rolled on a potion

${#setPropertyInEntity('self', 'hpvalue', "hpvalue + hphealed")}$

but if the max health is 20, whenever this code is used, the healed amount bypasses the max health
then I need to click on the health field to update to max again, I also receive an error "warning, the max health is..."

is there a way to use the code but to not heal more than the max health?

lofty goblet
#

I've managed to set it up as an item container. I'm not fond of the aesthetics of it, but we'll try to adjust that later.
On a simpler aesthetic front though, is there any documentation relating to valid HTML/CSS for panels?

#

I want to adjust the padding of the grid and some other minor things

fierce harbor
sturdy mesa
fierce harbor
sturdy mesa
fierce harbor
sturdy mesa
formal goblet
lofty goblet
#

Gotcha, I'll delve into that tomorrow. Thanks!

signal river
#

Hello everyone, is there any way to override the system giving error if there is a duplicate key? It either gives an error or cahnges the name of the key. I know it might not be the best but the way I am using it I need a duplicate.

I want to be able to show a hidden variable for players to see but not edit, so i create a number that is a duplicate of the hidden attribute, this way the players can see the hidden attribute and if they change it it reverts back automatically.

formal goblet
signal river
#

Oh, I was having toruble understanding since it showed like the formula and not the result. But on the actor's sheet it shows correctly. Thank you!

misty terrace
#

OK, another conundrum. Admittedly advanced and I may be barking up the wrong tree. I'm trying to update an Item, using the results from a File Picker.
The item has a text field called "imgSrc" which I use to hold the path to the image used elsewhere.

I have put this script into the label that holds the image and am getting the error below. Am I calling the update function incorrectly on the entity? What am I missing?

const path = "/uploads/artwork/IRIS";
const props = entity.system.props;
let pickedImage = await new FilePicker({
    type: "image",
    callback: (path) => {
      console.log(path);
      console.log(props['imgSrc']);  
      props['imgSrc'] = '/' & path;
      entity.update({'system.props' : props       });
    }
});
return pickedImage.browse();
}%```
fierce harbor
#

Is it linkedentity.update or my memory is failing me as usual?

misty terrace
#

I'm calling it from the item itself, not within an item container....will linkedEntity work?

#

got a different error using linkedEntity

#

I pulled from the code Martin put up in the Formula System guide for that entity.update()

fierce harbor
fierce harbor
formal goblet
misty terrace
#

so is there a CustomItem and does it have an .update method?

formal goblet
misty terrace
#

so change the entity.update to entity.entity.update?

misty terrace
#

that works...just making a minor error somewhere with constructing the new value

#

but if I get this working, I have figured out how to use images in labels that can be updated realtime with the build in filepicker

#

Got it!

uneven quail
#

I know this has come up before, but I made a script for anyone who needs it. This will reload all of the items attached to your characters, in case you had to update the templates and don't want to go around manually hitting the refresh on all of the items.

formal goblet
signal river
#

How is it that active effects work?
I am not sure if I got it wrong, shoudn't HP be 0?

formal goblet
signal river
#

Ooh, let me try that

formal goblet
#

And you want to remove the Group if you don't have additional conditions

signal river
#

Yup, it works, thanks!

signal river
#

Im sorry to bother so much. I have been trying all day to set a label for the HP in such a way that the player rolls a dice and then the rolled number is added to that HP. I was able to get it done as a number. But if i try to use a label instead, It fails. Is there any way to get it done?

The main issue is that i have no way to create a label with a number that can be modified, can set a label as 0 but then it is a constant and changes back to 0. So if I add the roll then it goes back to 0. And i cannot find a way to make it roll itself and add that to itself.

signal river
#

Nvm i got it

sturdy mesa
#

Is there an easy way to add a different sound to the dice rolling buttons? For example, I have an item that is a pistol, and I would like to add the sound of a gunshot when the player presses to roll the dice

desert fern
#

I am having issue referencing the selected value from a dropdown list. How would I write a formula that returns true if the selected value in this example is "Minstrel" (key minstrel) from this dropdown list? (for example to determine the conditional visibility of another item)

fierce harbor
desert fern
#

Thanks a lot!

mint basalt
#

So, a bit new at this entire thing. I'm trying to set up a d100 system using CSB. Wondering how I would go about doing derived statistics that poll from other areas? And also how to set up buttons to do rolls that will evaluate whether or not something falls into a category of being a variable degree of success. I'm impelementing the Laundry system in Foundry if that helps.

formal goblet
# mint basalt So, a bit new at this entire thing. I'm trying to set up a d100 system using CSB...

There's a Readme online which covers basic questions like this: https://gitlab.com/custom-system-builder/custom-system-builder

Roll-Buttons are being made with Labels containing a Label Roll Message.

It's also worth to take a look at the Wiki-page, which covers more details: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/home

mint basalt
#

So... this was the intitial way I went about setting up base stats, and then derived stats. I apparently am messing up whatever formula would grab the key value for the number fields holding the default values. Would any people have suggestions of easier ways to go about getting the value I am looking to multiple by 5 for a derived stat?

#

IE, would a single table with more columns make it easier to reference?

formal goblet
onyx fiber
#

Hi everyone, I recently started configuring a custom system and I'm trying to use item modifier as specified in the instructions but apparently if the key belongs to a label I can't make it work. While if I associate the key with a hidden value everything works perfectly.
I only use the key value, while value formula is a fixed number.
Am I doing something wrong in the syntax of the key?
NAME_KEY => works only with hidden value
${NAME_KEY}$ =>doesn't work
Or do I have to write some formula in the label text?

formal goblet
onyx fiber
#

ok, setting the label text with a number now works! Thank you!

lofty goblet
#

Alright, so I was very sleep deprived when I wrote this, so it's a bit mad, but is there a function to just list the names instead of posting them to the console?
%{return game.actors.filter(actor=>actor.name=='${name}$')[0].items.filter(name=>name).forEach((element)=>console.log(element.name));}%

#

JavaScript's not my preferred language if that was at all unclear, so scripts and macros are fun to figure out

formal goblet
lofty goblet
#

Item names. All the first part is just because I couldn't figure out how to correctly call this.actor or whatever the correct syntax would be

formal goblet
lofty goblet
#

...that is certainly way simpler. Nice!

lofty goblet
#

Minor follow-up: Is there a way to get rid of the comma from map?

formal goblet
lofty goblet
#

I'll give it a shot

#

Perfect!

lofty goblet
#

How do you execute a macro from the compendium rather than from the Macro Bar with a script?
I got everything functioning with a button to create items, but it only works as long as the macro is in the bar, and doesn't work when it's only in the compendium

lofty goblet
#

Much obliged!

mint basalt
#

Alright, got a question for people. Anyone have a good idea of how to either A) grab variable roll result levels of success from the Call of Cthulhu 7 setup? Or what is used in Laundry? Or B) how to implement that for button rolls for skills etc? Would that be more of a script thing called from a compendium entry? Or is it something you can put in a button and call a stat to compare?

#

Basically what I am trying to figure out how to execute is a comparison of a d100 roll to the skill %, and then a comparison to this chart for degree of success or failure. Special success being if the roll is in the bottom 20% of the skill %.

floral crater
formal rapids
#

Greetings. I've made an unofficial Ker Nathalas module using Custom System Builder and I've run into a small problem that I'm not sure how to resolve. When setting up a new world for the module, the templates are imported, but my equipable containers do not preserve the filter items templates selection. I have to go back afterwards and manually set those. Has anyone else experienced this and/or know of a way to prevent that from happening. Thanks!

vagrant hollow
formal rapids
#

I've just found a workaround, go figure. If you make your own module and keep the templates in a compendium, you can import the templates with "Keep Document IDs" checked and it will restore the selected templates.

bright berry
#

Question: Someone is trying to load in a single character sheet template into the CSB game, and is getting the error message maximum object depth expansion exceeded. Any idea what that's about?

#

I tested it in my own system and the same JSON works fine

#

They do seem to be on Foundry 11 build 305, that's the only thing I can think that's breaking stuff

formal goblet
bright berry
#

Gotcha, thanks

lofty goblet
#

As a continuation to my descent into madness, is there a function to open an equippableItem from the sheet?

#

Y'know, as opposed to just clicking it

#

Actually, new question. Is there a way to execute a script when a text field is changed?

formal goblet
formal goblet
lofty goblet
formal goblet
lofty goblet
#

The label component

formal goblet
#

Well... there's none

lofty goblet
#

I managed to do so since it's in a table simply by using sameRow and specifying the label's own column. Now my only problem is it posting an unwanted chat message whenever I click it.

formal goblet
lofty goblet
#

Ah, will do. Thanks!

lofty goblet
#

So I've been running into an issue since yesterday, that I initially brushed off, but it's becoming increasingly difficult to ignore. Referencing a macro from the compendium fails unless the macro has been recently opened.
game.packs.get('world.macros') returns CompendiumCollection(0), but when the macro has been opened (not even executed) it suddenly returns CompendiumCollection(1) for like 10 minutes, then returns to CompendiumCollection(0). What the fuck is going on?

#

I have to figure it out at this point because it's stopping me from troubleshooting other problems

lofty goblet
#

Oh, and on an unrelated front: Is there a way to refresh or repaint a sheet?

#

Ah, just found "templateSystem.reloadTemplate()". So that one's solved

lament flint
#

Can anyone help me sum up a column of values from dynamic table. I tried using the sum command but it won't even work with an inputted matrix. I attacked 2 pics to show what I am trying to do

grave ether
#

Remove the []

lament flint
#

wow, that was a simple fix, thank you

grave ether
#

Np 🙂

lament flint
#

How do I redo this so it only rolls the selected option?

grave ether
#

What does the console say

formal goblet
earnest imp
#

so im a bit lost, how do i update CSB to use the beta version? i already have a game that im looking to change the version of CSB for

formal goblet
earnest imp
#

i hope i dont have to rebuild the campaign in the new beta version

formal goblet
earnest imp
#

Ah so the former, I'd have to make a new game; but for the latter, I can probably keep my entire game just with an upped CSB version?

grave ether
#

When do you expect to push the beta into production?

formal goblet
#

Or you change which system the world should load (I've never tried this, so unexpected behavior might occur)

earnest imp
#

hmmmmm ill keep a backup for everything then

#

even a whole snapshot

#

in case things go horribly wrong

formal goblet
grave ether
#

Lol completely get it. You need a PM with Agile experience hehe

formal goblet
#

It's not even a lack of a PM or PO, it's just that the work times (and thus the velocity) for CSB are unpredictable

earnest imp
#

ive worked on a startup and man estimations are horrible to make on your own

#

we got no managers, no system, no structure

#

we all just have to estimate how much we can do in a week or so

#

and that leads to a super messy roadmap and schedule which is all chaotic

#

and we didnt even realize how far or close we are to the finishing line

grave ether
#

I completely get it Nao, I am a Scrum Master so it's what I do day in and day out.

earnest imp
#

the worst part is i still dont know how scrum and actual agile experience pans

#

the only thing i know is "estimate ur workload, finish on a reasonable timespan"

#

minuses of working on a startup i guess

#

and you know its startup

#

things move like crazy

#

and unreasonable deadlines left and right

grave ether
#

Yep, startups were our main clientele but I can help if you need

earnest imp
#

good money though

#

so im not complaining too much about unreasonable deadlines

#

its horrible but it pays well

grave ether
#

Indeed

#

Agile is the mindset, Scum, Scumban, Kanbane, are ways to develop. Basically, its all about the values of developing the product you want. You have 3 basic roles, Product Owner (or Stakeholder), Project Manager( Scrum Master), Developers. Each have their own basic job but the PO delivers the vision, the PM takes that vision and breaks to down into small chunks, the Developers will estimate the work in short durations,

Scum deals with Sprints (short durations, over a set course of time, normally 2 weeks but could be up to 4). There is more to this, but generally speaking you pull in work you can accomplish in that 2 weeks without leaving anything on the table.

Kanban - is less structured, but the timeline isn't a strict and the number of meetings can be a lot less..

I am oversimplifying it, but my suggestion if you do not have a road map is to figure out who your PM and PO is and work with them to get the vision, write out some user stories( A user story is an informal, general explanation of a software feature written from the perspective of the end user. Its purpose is to articulate how a software feature will provide value to the customer) this is not coding, this is high level basic features. The development team with deem how they want it developed.

Sorry if this is long, I can go on and on but hopefully, it gives you a starting point and helps a bit

grave ether
earnest imp
#

oooooooooh, thanks for the input, so i didnt even realize i was doing an Agile mindset

#

as a developer

#

sprint is pretty similar to weekly meeting it feels like

grave ether
#

Normally in a sprint you have daily standup, planning meeting, retrospective and sprint ceremonies. Its very structured but works.

earnest imp
#

ohhhhh then i have done sprints then

#

thanks for the info

#

planning, daily standup and retrospective im familiar

grave ether
#

Yep, your in an agile framework then

formal goblet
#

agile development is industry standard nowadays, I don't know anybody who sticks to the waterfall model 😅

grave ether
#

Agreed

#

The company I use to work out up until recently ran all their projects as waterfall.. it was a nightmare. It took a lot of convincing to move to agile and then their problems with waterfall disappeared and clients were a lot happier..

#

Then they let me go ... Thanks for making me money.. cya

formal goblet
#

ooof

grave ether
#

Yeppp oooof is right lol

#

It will be fine 🙂

earnest imp
#

does this expect to return true?

#

this is on item container

#

i assume yes but

#

using the new filter format in 3.1.0-rc2 makes string comparison not applicable unfortunately, whereas you could in 3.0.0 before

#

ill make an issue on the repo

formal goblet
earnest imp
#

ohhhhhhh alright

formal goblet
#

So basically the same as visiblity formulas

earnest imp
#

works like a charm, thanks

#

what if i want to have two conditional clauses?

#

right now this is what i have

#
equalText(item.item_type,"Throwables") && item.quantity > 0```
formal goblet
#

It's one of the things I actually dislike, but it is what it is...

earnest imp
#

aaaah

#

also i dont think disabling this option works

#

disabled, it still shows the delete button

#

like so

#

(this is item container)

formal goblet
earnest imp
#

@formal goblet by any chance, does formula js has a function to concat a string together as well?

#
${
  concat(
    fetchFromActor('GM Panel', "fetchFromDynamicTable('all_skill_table', 'all_skills')"),
    ",ATK,DEF,EVA,HEA,UTL,ALL"
  )
}$```
#

The following is my initial code but it returns this error

formal goblet
earnest imp
#

ohhhh thats the link

#

ty

peak jacinth
#

Is there any way to fix the 'item template has been deleted for item' error on a character sheet? I added an item and forgot to edit its item template beforehand and now I get that error every time I add something to the sheet, and there's no way to actually see the broken item to delete it in the first place.

formal goblet
peak jacinth
#

Oh, thank you so much!

hazy saffron
#

This is an odd question: We are using CSB to create sheets with a lot of item containers and items. These items all use templates with a lot of hidden attributes. The hidden attributes on these items basically read/store keys from the actor sheet that we want the items to be able to change.

Example: Every item reads/stores the 9 attributes of the actor (Str, Dex, Sta, etc) so that if the item needs to modify the actor's attribute, it does so using 'item modifiers' that change the hidden attribute.

We've noticed a lot of lag when making any change to an item, is this just a by-product of using so many hidden attributes on items?

onyx fiber
#

I'm trying to set up a system of equippable weapons, with item containers I can divide them correctly, but I can't understand how to recover the statistics of the primary weapon rather than the secondary. I tried with Template Item Modifiers and Conditionals but I only get the value of the last equipped weapon data. Where am I doing wrong? Keys are weapon_slot from a radio group 0,1,2 as values ​​and weapon_damage is one of needed key. Any suggestions?

formal goblet
hazy saffron
formal goblet
#

Otherwise... it's not the most efficient system, so performance issues can occur

formal goblet
hazy saffron
formal goblet
hazy saffron
# formal goblet Wdym just in time? The whole sheet is recalculated upon changes

So currently, the hidden attributes are used to getProperrtyFromActor() and assign to an item key. That item key then can be modified by the item's "item modifier" code. Trying to modify an actor key directly using an item's "item modifier" code doesn't work.

So let's say we want feat items (built from a feat template) to be able to modify any attribute. Right now, in the feat template, we have 9 hidden attributes that basically assign a call from getProperrtyFromActor(strength) to an item key called 'strength'. Then in the item modifiers for a specific feat, you can have strength modified by some code or number when the item is attached to the actor.

Is it possible to modifier an actor key directly from the item modifier code of an attached item without first assigning it using a hidden attribute? I thought items only had scope to see their own keys or those defined in hidden attributes?

formal goblet
oblique willow
#

How come
token.toggleEffect(statusPath, {active:true})
creates a new instance of the status every time?

formal goblet
hazy saffron
# formal goblet Btw, `getPropertyFromActor()` is outdated and got even removed in the current ve...

Sorry we are using the new function (fetch maybe?). Our item modifiers do modifier the values of labels of actors, but only (I thought) if they were read and stored into the item through fetchFromActor first as a hidden attribute? Otherwise, if you reference an actor label key in an item modifier does it automatically know it's supposed to change the actor value? (What if an item has a label key the same as open actor label key?)

formal goblet
hazy saffron
hazy saffron
# formal goblet Yep

What about references used in the formula? Can actor label keys be referenced there directly without assigning them via hidden attributes?

formal goblet
hazy saffron
#

We might be able to change that though do to the lag

formal goblet
oblique willow
#

I don't know what other method I would use to enable or disable a status effect on a token

onyx fiber
#

here an example, both values are the same, danno_attacco should be 3d12

#

template modifiers

#

and one of the weapons items

formal goblet
# onyx fiber template modifiers

Well, template modifiers apply for all Items of that Template. And because you are using the Set-Operator, the last Item will always override the values set by other Items

#

What you're probably missing is a Formula for the Modifier Key to change the target you want to modify

formal goblet
oblique willow
#

Oh yeah but thats just a fault in my example, I used the path

formal goblet
#

Then idk, someone familiar with the Foundry-API can help better in this case

onyx fiber
formal goblet
#

If I understand it correctly ofc

onyx fiber
onyx fiber
#

it would be useful to have the possibility to set the size of the item container reference label, like all the other labels thxblob

lament flint
#

is there a way to make this work for initiative? I keep getting a finite number error.

formal goblet
lament flint
mint basalt
#

Anyone have a suggestion of how to set the initiative to a static attribute from the character? IE, laundry system, init starts as the dex stat for the character, but their position in the battle queue is adjusted depending on what actions they decide they will take.

grave ether
#

You can adjust that in the settings for init

mint basalt
#

I have tried a couple times, it is just defaulting to 0 regardless of how I try to point it to the dex stat on the sheets.

grave ether
#

I have mine rolling 2d10 + speed, maybe try 0d0+dex?

#

I will open my foundry here and take a look getting kiddo to wchool

#

School

mint basalt
#

I'll be, that worked. Thank you very much.

boreal hull
#

hey, might be a multipart answer but I need some help, its been aminute since ive added to the system i built out, but now this roll command isnt outputting anything, any suggestions? Thanks. : <p>Attack Roll:  ${item.name}$ </p>
${current_endurance>=item.weapon_endurance_expenditure_requirement ? [1d20+:virtue_body:+:agility_mastery_bonus:] : notify('warn', 'Not enough Endurance')}$
<p>${#setPropertyInEntity('self', 'current_endurance', "current_endurance - item.weapon_endurance_expenditure_requirement")}$</p>
<p>${#setPropertyInEntity('self', 'spent_endurance', "spent_endurance + item.weapon_endurance_expenditure_requirement")}$</p>
<p>${name}$ expent ${item.weapon_endurance_expenditure_requirement}$ Endurance Point(s).</p>
Wielding State: ${ athletics_mastery_bonus < item.athletics_weapon_mastery_requirement ? 'Weak' : athletics_mastery_bonus > item.athletics_weapon_mastery_requirement ? 'Strong' : 'Normal' }$
<p>BHR Range: ${item.weapon_bloody_hit_range}$ </p>

formal goblet
formal goblet
onyx fiber
#

Hi everyone, can anyone tell me the syntax for the visibility formula in the advanced configuration? I would like to hide a label if the value of a key is different from a specific value, I tried with weapon_type !='shotgun' but it doesn't work

fierce harbor
formal goblet
onyx fiber
#

great now it works! thank you all!

formal goblet
boreal hull
#

i have no idea 😅

#

im really not sure what it means

formal goblet
#

It's my first time seeing this type of error message

boreal hull
#

hmm

#

it suddenly just broke out of nowhere one day

#

and I hadnt changed any of it either

formal goblet
#

Ok, let's do some common troubleshooting... I need:

  • Foundry-Version
  • CSB-Version
  • Activated Modules
  • Browser-Type
boreal hull
#

Chrome

formal goblet
#

You have a pretty old V11-Build. The latest one is 315. There might be a bug related to this version, but I cannot tell for certain

boreal hull
#

okay so i should just update CSB

formal goblet
#

It's Foundry, not CSB

#

CSB is still 3.0.0

boreal hull
#

gotcha, hmm, im worried if i update though itll mess up other stuff

formal goblet
#

It shouldn't break anything with minor version-updates, but backups are always advised with updates

mint basalt
#

Ok, I am getting to the point of adding in items. I'm assuming using the item container is the proper receptical on the char sheet side. To have the item impact character stats... I assume you utilize the conditional modifier tab?

#

Also... for the drop down menu on items for what skill is used by different weapons for instance.... what would be the best way to have that directly correlate to the skills on char sheets?

alpine roost
#

It says that this system works with drag ruler on the wiki but I can’t figure out how to assign the speed attribute in the module’s settings.

fierce harbor
fierce harbor
alpine roost
#

Can you make a macro which activates/deactivates a checkbox within a character's sheet?

fierce harbor
alpine roost
#

Thank you both!

hazy saffron
#

I don't know how to ask this question, but is there a limit to the number of ternary operators that can be used in a Rich Text Field and displayed?

Here's my example: This is content in a rich text field column of a Dynamic Table of an Item. When it's displayed, most of the ternary operators display the right content, but then it starts displaying 00, 01, and 02 for the rest.

Below is the code in the Rich Text Field (Which check for other values in other dynamic tables of the item) and how it displays. you'll see that the "Boost" statement is the same code listed twice and the first time it works and the second time it displays 02.

#

Boost allows a character to increase ${(fetchFromDynamicTable('drawbacks_selection', 'drawback_title', 'drawback_is_selected', true).toString().includes("Single"))?concat("a single Trait type"):concat("one of their Attributes, Abilities, or Powers")}$ temporarily, ${(fetchFromDynamicTable('extras_selection', 'extra_title', 'extra_is_selected', true).toString().includes("Omni-Boost"))?concat("chosen each time the power is used"):concat("specified when the power is purchased")}$.

Attributes: Dots put onto an Attribute ${(fetchFromDynamicTable('drawbacks_selection', 'drawback_title', 'drawback_is_selected', true).toString().includes("Limited"))?concat("increase the base Attribute only"):concat("roll over into the Mega Attribute at 1:1 to the specified limit (normally Quantum+1)")}$

Boost allows a character to increase ${(fetchFromDynamicTable('drawbacks_selection', 'drawback_title', 'drawback_is_selected', true).toString().includes("Single"))?concat("a single Trait type"):concat("one of their Attributes, Abilities, or Powers")}$ temporarily, ${(fetchFromDynamicTable('extras_selection', 'extra_title', 'extra_is_selected', true).toString().includes("Omni-Boost"))?concat("chosen each time the power is used"):concat("specified when the power is purchased")}$.

System: For each dot of Boost, the character gains +1 Dot to the specified Trait or Traits while Boost is active.```
hazy saffron
#

The reason it feels like some 'limit' causing the issue is if I reorder the "Fetch/Ternary" statements, it's always the last ones that get the '00' regardless of which they are

peak jacinth
#

Anyone know the best way to make a shopkeeper template? If I put an item container and a dynamic table side-by-side, they don't line up. Also, I can't seem to figure out how to reference a dynamic table's entries for labels, if that's even possible.

fierce harbor
peak jacinth
#

I could do that, but then the price for an item will always be the same, right?

fierce harbor
peak jacinth
#

Well, what I mean is - if I have an item that costs 5 gold, then it'll cost 5 gold in every shop I put it inside, right?

fierce harbor
peak jacinth
#

-Oooh, good point. That solves that problem, thanks!

fierce harbor
hazy saffron
torn abyss
#

@wet heronyour making RMU for foundry im long time RM player 20+ years plus and i am running 3 games.

formal goblet
hazy saffron
mint basalt
#

So pardon my ignorance, but what am I doing wrong to get the "true" response instead of the desired damage bonus value?

formal goblet
mint basalt
#

Alright, the variable is defined in hidden attributes. It currently is functioning for values -1d6, -1d4, and 0. But anything above that spits an error.

#

Never mind, I missed a couple "?" to make it work.

formal goblet
hazy saffron
mint basalt
#

Does anyone have some sample weapon templates they made that I could take a look at? Or item templates? I'm looking to better understand how to set them up.

tough ridge
#

Hi guys. I"m trying to install the CSB system but i have an error. It ask me to install a module, and this one is not working/findable.

#

(sorry it's in french)

#

any clues ?

fierce harbor
tough ridge
#

no auto available

#

it's grey

fierce harbor
#

No idea sorry

tough ridge
#

i have finally found a way... installing the previous 2.0.0 version

peak jacinth
#

How do you find system.props again? I need to check a variable but I can't find it at all.

formal goblet
peak jacinth
#

That works perfect, thank you!

narrow hollow
#

hey so im encountering a really odd bug here. I have an item being added to a sheet from a compendium which i sent to a gm of my system. this error keeps happening every time a edit is made to the sheet. the items are not showing up in any item containers either. happens for items with the unique tag and without it. i have tried a reload of the item sheets to no avail.

formal goblet
narrow hollow
#

how do i resync the template and base item though?

formal goblet
#

Create the Item Container, reload the Actor, go into the Items and select the right Templates. That's it

narrow hollow
#

i see

slate cliff
#

So I'm having a small issue with the item container, red circle in pic , which is probably due to me being a dummy, but I tried making labels for for people to have section to put down item quantity and I have other tabs inside the page, blue circle in pic, when anything outside the item container is edited it erases the item containers quantity and misc section information. Anyone know what Im probably be doing wrong?

formal goblet
slate cliff
#

Sorry for delay im juggiling like 3 different things right now lol

formal goblet
#

And now the config-form of Quantity

slate cliff
formal goblet
#

I see. Well, the input won't be saved this way

slate cliff
#

Gotcha, yeah I figure I was doing something stupid

#

Just don't know how to do so, if there's a library of code I can look up or something so I can try and learn I can be pointed towards Id appreciate it.

formal goblet
#

You can emulate the Checkbox by using an Icon and setPropertyInEntity() in the Label Roll Message to change the state.

slate cliff
#

gotcha yeah Ill try that, thank you so much

formal goblet
#

Number and text-fields would be harder

mint basalt
#

Ok... question. I see that it say == only works on integers and not on strings? How would I go about doing the logic of "if keyA=stringB, then value = X"?

#

Basically for creating backend logic for items within a dropdown menu.

fierce harbor
mint basalt
#

Hmmm, I must be messing something up then.

#

${equalText(wealth_dropdown,destitute)? '5':equalText(wealth_dropdown,poor) ? '25': equalText(wealth_dropdown,average) ? '50': equalText(wealth_dropdown,affluent) ? '75': equalText(wealth_dropdown,wealthy) ? '95': ''}$

#

I have that currently as a hidden attribute. With a key of wealth_value

#

But am getting zero return on wealth_value regardless of the dropdown menu position.

#

In the setup of equalText(stringA, stringB) stringA is the dropdown menu component key, and stringB is the dropdown menu item key.

fierce harbor
mint basalt
#

@fierce harbor THANK you so much!

signal river
#

Hello everyone! would someone be albe to help me understand how to fix this issue when a player tries to alter teh hp of an enemy?

fierce harbor
signal river
#

oh crap

#

Well, thank you

fierce harbor
earnest imp
#

Not a question, i just wanna share what i made with CSB murderkitty

earnest imp
#

the most time consuming part is the Data tab

#

i started this homebrew project about 3 months ago

#

its a full blown customizable ability builder

#

some abilities hit multiple times so its a lot of dynamic table mess-arounds

#

most of my time on this homebrew are now spent on actually building the content, i got 124 abilities implemented, 11/48 equipments and 33 enemies (and counting)

#

all 124 abilities are from the ability builder from pic above

peak jacinth
#

Is there a way to move/copy an item from a character sheet without having to re-make it? An item was modified inside a character's sheet after being added during the campaign, so I want to be able to keep all those settings without having to re-make them from scratch

iron badger
#

Hi, i have question. I've just acquired Foundry and i'm trying to do a simple d20 roll through the character sheet, but even though the d20 appears the roll just doesn't work. Instead, it just sends the message in the chat.

foggy grotto
peak jacinth
#

I was trying to drag the name xD

foggy grotto
vagrant hollow
mint basalt
#

Ok, how far off am I with this?

#

Conditional modifier screenshot is from an item, which is a pistol. Trying to get an weapon agnostic variable set which can be called for a roller icon on the sheet for any weapon dropped into the inventory. Trying to set the value for the weapon by grabbing the target skill to be used from the actor it is placed on.

iron badger
formal goblet
hazy saffron
# formal goblet You should test if `toString()` returns the desired result. Keep in mind that CS...

UPDATE: With more testing, it seems that this is a limit on the number of times you can use ${...}$ within a label Text field, or a field in a Dynamic Table at least (Might be a universal limit). Any use of ${...}$ (Not just fetch) after the 10th gets weird numbers 01 through 09 then 10 to 19, etc.

I've done some more testing on this and it's very strange. I seem to have narrowed it down to a limit of 10 fetchFromDynamicTable calls. I tried it using two fetchFromDynamicTable calls that alternate from 2 different dynamic tables and then 1 repeated call from one table and results all start to act weird after the 10th call.

Here is what I did (Simplifying everything down to just outputting the results from the toString() calls)

If I have a Rich Text Area that repeats the same fetchFromDynamicTable from 1 Table over and over, it outputs correctly. However, if I alternate calls between 2 Tables, it works a few times, then starts getting messed up. It appears to call one of them and returns a 0 for the other.

hazy saffron
wicked pulsar
#

Hi everyone !

Need a little help, i have a question, can i fetch a value of an item into an other item plz ?

formal goblet
mint basalt
#

@formal goblet fa_base_pistol is a key on the actor for their base pistol skill.

grave ether
#

@formal goblet - I am getting errors in a template and sheet that I cant fix. Hope you can provide direction.

    at fetchFromDynamicTable (Formula.js:590:47)
    at math.js:26531:54
    at math.js:26516:66
    at Object.evaluate (math.js:24162:45)
    at r.evaluate (math.js:24139:55)
    at Formula.computeStatic (Formula.js:858:27)
    at Formula.compute (Formula.js:442:21)
    at processFormulas (ComputablePhrase.js:139:35)
    at async processFormulas (ComputablePhrase.js:156:46)
    at async ComputablePhrase.compute (ComputablePhrase.js:212:34)
    at async ComputablePhrase.computeMessage (ComputablePhrase.js:352:9)
    at async Label._getElement (Label.js:171:21)
onError @ foundry.js:753
:gift:call_wrapped @ libWrapper-wrapper.js:507
:gift:Hooks.onError#lib-wrapper @ listeners.js:138
:gift:Hooks.onError#0 @ libWrapper-wrapper.js:187
(anonymous) @ foundry.js:5771
Promise.catch (async)
render @ foundry.js:5769
render @ foundry.js:7111
render @ character-sheet.js:27
render @ foundry.js:14259
_onUpdate @ foundry.js:14363
_onUpdate @ foundry.js:19131
callback @ foundry.js:13737
(anonymous) @ foundry.js:13711
#handleUpdateDocuments @ foundry.js:13711
await in #handleUpdateDocuments (async)
_updateDocuments @ foundry.js:13458
await in _updateDocuments (async)
update @ commons.js:8677
await in update (async)
updateDocuments @ commons.js:8001
update @ commons.js:8098
reloadTemplate @ templateSystem.js:778
(anonymous) @ templateSystem.js:1081
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2Understand this error ```
#

If I recreate the template and drag and drop some of the elements I get the following

fetch    @    foundry.js:68326
notify    @    foundry.js:68223
error    @    foundry.js:68260
_handleError    @    foundry.js:3468
(anonymous)    @    foundry.js:3450
value    @    socket.js:532
value    @    socket.js:459
L.emit    @    index.mjs:136
(anonymous)    @    manager.js:207
Promise.then (async)        
it    @    websocket-constructor.browser.js:5
value    @    manager.js:206
L.emit    @    index.mjs:136
value    @    index.js:131
value    @    manager.js:193
L.emit    @    index.mjs:136
value    @    socket.js:324
L.emit    @    index.mjs:136
value    @    transport.js:97
value    @    transport.js:89
ws.onmessage    @    websocket.js:69``

Is there a limit to the number of nested items?
#

Weird part is, I have been working on this all day without issue. I allowed a player to come in and test, then started to get issues.. They do not have access to the template just the sheet.

formal goblet
grave ether
#

I used items as a whole in general term

#

not specifically speaking about items as a component.

formal goblet
#

You mean Documents then or what exactly?

grave ether
#

Trying to fix my template and sheet because at this point its not useable.

#

The error regarding foundry.js:68326 Maximum object expansion depth exceeded

#

the second is the error regarding ncomputable token fetchFromDynamicTable("Attributes", "Base_Total", "Attribute", "Constitution", "===")
at fetchFromDynamicTable (Formula.js:590:47)

#

I figured a bit a of direction will help, I cant determine exactly the issue since this references something that worked earlier

#

nothing changed

formal goblet
#

Hmmm... I'd check if the json-structure of the template is still valid or not

grave ether
#

How would I do that

formal goblet
#

Export and inspect the file via an editor or an IDE

grave ether
#

I have it open currently in visual studio code right now

formal goblet
grave ether
#

Yeah, thats what I attempted at first, and threw and error as I was copying things over

#

I will look through the file.. I would love to clean up the doc make cleaning. Remove the deleted columns and what not but that will be a secondary project

grave ether
#

Is there a way to convert a character file to a template?

hazy saffron
formal goblet
grave ether
#

I will try that

#

Nope, doesnt even populate at that point lol

#

I will dive into it tomorrow..... ugh... this is agravating

brave trench
#

Did anyone ever get Item Piles to work with CSB?

earnest imp
#

its pretty workable, scant few bugs though

iron badger
#

I'm trying to understand how item modifiers work, can someone please explain?
I'm trying to make an item that gives attribute bonus

sleek violet
#

Hi, does anyone know a custom sheet for Icons?

iron badger
static cargo
#

Is there a means of getting the total kg's of all the vendor trash an Actor is lugging around?

sturdy mesa
#

In this example, the variable is the question "Will you heal?", and the player can check or not check it
But, if the player doesn't mark the box and press "V", the "setPropertyInEntity" will still update the health, but without sending it to the chat

${!willheal? 'HP: ${!setPropertyInEntity('self', 'HP', "min(20 + constitution * 6, HP + 5)")}$' : ' '}$

I want to NOT heal my player if the variable is unmarked. How can I do this?

formal goblet
sturdy mesa
#

Thx I'll try

sturdy mesa
formal goblet
sturdy mesa
vagrant hollow
# iron badger I read all about it already but i couldn't solve my problem. I'm trying to under...

On the actor place a “label” with “label text” 0 (zero).
Make a item with item modifier and use as “key” the “component key” of the above label.
Chose “op” + and “value formula” 1
Then see how the above label will change if you drag the item (or even several copies of it) into a container of the actor.

You can not modify a “number field” (most probably your attribute is one).
So you need to have several steps and use them together.
The “number field” attribute, the modified “label” and one more “label” as sum calculator for the both bevor and roll message (I myself placed the last one inside the attribute name description).

earnest imp
#

@brave trench Right so to move the convo from DM to this channel about setting up Item Piles on CSB

#

Here are the list of configs you should set up to get things going

#
  1. Set actor class type
#
  1. Set datapath to quantity and price, in this case we'll assume the component quantity and key exists in your item template, but you can change it to anything you want, as long as the data type is numeric
#
  1. In System Specific Settings, Set currency, this assumes your actor template has the component zeny as the main currency, feel free to change the currency name as you see fit
#
  1. Set item pile similarities, this makes it so that purchasing an item, or looting an item, properly stacks to each other, just input the value name and type there
#

And that's it, anything else you can check the documentation on how to use Item Piles, the above is just the CSB-specific settings 😅

brave trench
jolly latch
#

Hello, how do I write the formula to show the number of 6 I made with my roll? I wrote ${:roll:d6cs>5}$ but it doesnt work

earnest imp
#

thats it

normal ore
#

Guys, good afternoon!
The CSB gives an error when I run this script generated from an item. Is this something the CSB doesn't support, or am I doing it incorrectly?

formal goblet
normal ore
formal goblet
# normal ore

The /sheetRoll-command only works with Actor Roll Keys

brave trench
# earnest imp on item pile type item pile, the below settings (not sharing settings) cannot be...

That's odd because I'm having no issues creating an item pile, merchant, and a container.

I did run into an issue though, I'll ask here first in case it is something you know of. When I buy 1 item, it works fine. When i try to set that amount to anything other than 1 in the interface, my browser freezes. (I'm using the browser as a player to test the buying/picking up side of the module.

I've set my ammunition items to have their own quantity property so that they stack. I thought maybe this was the issue since its quantity is an item property rather than an actor property but when I buy 1 at a time, it stacks properly. If i try to buy 3 at once, it breaks. Any thoughts?

formal goblet
brave trench
grave ether
#

I am a bit crazy today it seems. I am trying to use a script to generate as a label. The script take the current value of current dice size (i.e. 1d6) and increase it a number of steps based on a value. I pass these through using ${sameRow(dicesize)}$ and ${DICE0}$.

If I assign them static values and use this a rolled macro it populates only as it should but only for rolling purposes. It errors out if I try to pass the values above and doesnt populate AT ALL in the label field. It gives me a wall of text almost like its not seeing the %{}%.

Maybe I am missing something or I am tired..

%{const initialFaces = [2, 3, 4, 6, 8, 10, 12];
const extendedFaces = [6, 8];

function getNextDice(currentDice, steps) {
  // Function to find the initial index in the sequence
  const findStartIndex = (currentDice) => {
    const match = currentDice.match(/(\d+)d(\d+)/);
    if (!match) throw new Error("Invalid dice reference");
    const [, n, f] = match.map(Number);
    return { numberOfDice: n, face: f };
  };

  const start = findStartIndex(currentDice);

  let numberOfDice, faces;
  if (start.numberOfDice === 1) {
    numberOfDice = 1;
    faces = initialFaces;
  } else {
    numberOfDice = start.numberOfDice;
    faces = extendedFaces;
  }

  let faceIndex = faces.indexOf(start.face);
  if (faceIndex === -1) throw new Error("Invalid dice face");

  // Advance the steps
  for (let i = 0; i < steps; i++) {
    faceIndex++;
    if (faceIndex >= faces.length) {
      faceIndex = 0;
      numberOfDice++;
      if (numberOfDice % 2 === 0) {
        faces = extendedFaces;
      } else {
        faces = extendedFaces;
      }
    }
  }

  return `${numberOfDice}d${faces[faceIndex]}`;
}

// Example usage:
const currentDice = ${sameRow(`dicesize`)}$; // Starting point
const steps = ${DICE0}$; // Number of steps to advance
const result = getNextDice(currentDice, steps);
return result; // Output the result after advancing the steps
}%
formal goblet
grave ether
#

its returns a range but example would be 1d6

formal goblet
#
const currentDice = 1d6; // Starting point

This is how it will look like after the inner Formula resolves

grave ether
#

correct

formal goblet
#

This is how it should look like:

const currentDice = '1d6'; // Starting point
grave ether
#

I just need to bracket it give me a second

#

this is what it produces in the label

#

this is what I get running it as a roll

#

I need it ultimately as a label .. I will reference it in the roll function later on manually

formal goblet
#

remove the function declaration and check if it solves the issue temporarily

grave ether
#

does not resolve

#

this resolves as a roll fuction (this is hard coded tho)

This DOESNOT produce a result in a label

const extendedFaces = [6, 8];

function getNextDice(currentDice, steps) {
  // Function to find the initial index in the sequence
  const findStartIndex = (currentDice) => {
    const match = currentDice.match(/(\d+)d(\d+)/);
    if (!match) throw new Error("Invalid dice reference");
    const [, n, f] = match.map(Number);
    return { numberOfDice: n, face: f };
  };

  const start = findStartIndex(currentDice);

  let numberOfDice, faces;
  if (start.numberOfDice === 1) {
    numberOfDice = 1;
    faces = initialFaces;
  } else {
    numberOfDice = start.numberOfDice;
    faces = extendedFaces;
  }

  let faceIndex = faces.indexOf(start.face);
  if (faceIndex === -1) throw new Error("Invalid dice face");

  // Advance the steps
  for (let i = 0; i < steps; i++) {
    faceIndex++;
    if (faceIndex >= faces.length) {
      faceIndex = 0;
      numberOfDice++;
      if (numberOfDice % 2 === 0) {
        faces = extendedFaces;
      } else {
        faces = extendedFaces;
      }
    }
  }

  return `${numberOfDice}d${faces[faceIndex]}`;
}

// Example usage:
const currentDice = "1d6"; // Starting point
const steps = 10; // Number of steps to advance
const result = getNextDice(currentDice, steps);
return result; // Output the result after advancing the steps```
#

result as a roll

#

nothing much text as a label

#

clarifying, I am calling this as a macro in the roll fuction, returns text if pasted in the field..

#

using %{return game.macros.getName('dice0').execute();}% produces a object

formal goblet
#

Macro execution is asynchronous

grave ether
#

SyntaxError: await is only valid in async functions and the top level bodies of modules

formal goblet
#

Labels with keys are executed synchronously

grave ether
#

I removed the await because it was throwing errors about the async

formal goblet
#

Without the await it will always return an unresolved promise

grave ether
#

hmmm

#

OK

formal goblet
#

Btw, what is your procedure supposed to do?

grave ether
#

scale the dice rolled based on a stat. So say you normally roll 1d6 I will pass 1 to the formula and it will scale to 1d8, then 1d10, 1d12, etc.. this is dynamic and can go on forever since stats can increase to over 100, this number could be 30d6 at the end of it

#

So each weapon will get a value to start and be stagnic and that value will grow based on the the str of the character

formal goblet
#

Ok, and when does it increase the amount of dices?

grave ether
#

I believe I have it set at strength value/6+1, so ever 6 levels or so

#

let me verify that tho

formal goblet
grave ether
#

+1 after 10, but yes thats basicly it

#

Yeah I got it correct in Foundry, this is my chicken scratch on excel

#

I type my notes while thinking through layouts, not everything is correct lol

#

Maybe I need to rethink the approach

#

I was thinking of just passing in the steps and the starting die and letting it scale from there

formal goblet
#

Having a linear mathematical expression is better than having for-loops

grave ether
#

let me revisit my code and see if I can figure out a better option then

formal goblet
#

I have the following sequence in mind:

0: 1d6
1: 1d8
2: 1d10
3: 1d12
4: 1d14
5: 1d16
6: 1d18
7: 1d20
8: 1d22
9: 1d24
10: 2d6
11: 2d8

Would that be correct or should it be different?

grave ether
#

again the roll function works.. I just dont know why the label doesnt lol

#

thats close

formal goblet
#

I need it exactly, close is not enough 😅

grave ether
#

1
1d2
1d3
1d4
1d6
1d8
1d10
2d6
2d8
3d6
3d8
4d6
4d8
6d6
6d8
8d6
8d8
12d6
12d8
16d6

formal goblet
#

huh, that escalates quickly

grave ether
#

LOL

#

would have to come up with something after 16d6

#

but figure alternating them between 8 and 6s

#

would work

#

I might be able to get away with just going d6s, but I would have to discuss with the PO

#

[2d6]->(3d6)->[4d6]->(6d6)->[8d6]->(12d6)->[16d6]..

#

from 2d6 -> on

#

each dice would double from the last

#

something like that, I can mess with numbers as we go to see what scales right

formal goblet
#

Ok, finding a mathematical function, that would fit for this sequence, would be challenging... I love irregularities

grave ether
#

hahah

#

Let me sleep on this, and come back fresh in the morning, if you think of anything in general let me know. I can sell it based on scaling.. IDK yet

brave trench
#

@formal goblet I want to create a sheet for a ship... It needs stats just like a character would (HP, attributes like handling, armor etc, slots for cargo) so I figure a typical character sheet should work.

The different thing about a vessel vs a character though is that it is piloted by a character, and guns maybe by another couple of characters. Is it possible to set this up so that all players can access this one "actor" but perform different tasks, like piloting or gunnery using their stats mixed with the stats of the ship?

formal goblet
#

Having multiple roles makes it more complex

brave trench
#

Do you have an example sheet of where you did that? I'm contemplating even going through all this. Ultimately the vehicles in my systems impose limitations or caps so it really isnt hard to just know the cap and let players roll from their sheets. Might not be worth the hassle to automate a vehicle when its that simple.

formal goblet
brave trench
# formal goblet Having multiple roles makes it more complex

I just tried that, pretty simple. What about multiple roles makes it complex? cant you just have different players plug in names at different text fields? As long as each of the separate battle stations are different rolls targetting different keys?

formal goblet
#

It gets way easier if you only need to fetch stats from players and nothing more

brave trench
#

Oh, I see what you mean. Ive never played with hiding components/tabs before, but I've seen something like that in the sheets. Is that possible? To hide parts of the vehicle they don't have access to?

I don't even need it that complex, just curious if that would even work.

formal goblet
#

The visibility formula doesn't allow Scripts, so probably not

brave trench
#

That would be cool but not necessary, I'll just tell my players not to push buttons not in their station or they get blown up. 😁

somber bay
#

Has anyone tried v12? I'm assuming it will not work for a while but just curious.

silver hazel
#

If anyone can help me. I have a system configured in the custom system builder and both the Crag character and the one circled in red manually have the same settings but only Crag stands out when I hover the mouse over it. The other one in red only shows the name through the option but does not highlight it.

quick turret
quick turret
#

I could also see this being user error, but I can't for the life of me think of how I could've screwed a simple dice command to not give out a 3D Dice so Nice roll.

drowsy rune
#

Sup, I think I need a bit of help.

I have a working character sheet template which took time to create, but is working properly, all my formulas are working and reloading the sheets does not erase data.

However, I created another template by duplicating the first, and my formulas (which are the same for the most part) are not working. Worse, reloading the sheets erase the data.

I assume this is a classic case of "problem exists between keyboard and chair" but can anyone help me ? 😅

#

Actually, merely closing a sheet erases its data.

drowsy rune
#

I deleted the sheet and created another one and a few formulas worked, but other number fields show [object Object], updating them then closing the sheet erases them again back to [object Object]. I'm kinda lost...

fierce harbor
drowsy rune
#

They do

#

I have freedom_template and jedi_template

#

Whenever I add something new to the template, reloading or closing the sheet erases it

fierce harbor
#

Any console error?

drowsy rune
#

Nope

#

But if I delete the sheet, then create it again, the new modifications work

fierce harbor
drowsy rune
#

The first template is doing ok.

#

I'm gonna at the very least finish the first draft of the new one and see how it goes after

#

I have three different classes so far (Jedi, Clone and Wanderer) and they all have unique mechanics, so they need different character sheets :/

fierce harbor
drowsy rune
#

Oh, I wouldn't say my system is not simple, it's kinda fluid and quick because I try to get only one roll per action, but yeah each class is unique and while the mechanics are easy and simple, they require dedicated tabs in the character sheets

#

And that might be what is generating these errors

fierce harbor
#

Yes, it almost always gets down to the little details that mess the whole mechanism.

vagrant hollow
drowsy rune
#

I definitely duplicated from the sidebar

#

Meaning, from freedom_template I got freedom_template(Copy) or something

#

Which I renamed to jedi_template

vagrant hollow
drowsy rune
#

I have zero scripts or getfromactor. The most complex formula I'm currently using is ceil(x) 😂

#

The keys are alright.

#

I think the fact I didn't delete one of the tabs in the new template was messing with most of the values

#

Right now I'm able to edit and reload without an issue

formal goblet
drowsy rune
#

I didn't.

formal goblet
#

Hmm, weird. Well, whatever

lethal flax
#

so uh, is CSB usable in foundry V12?

brave trench
#

@formal goblet I'm just getting a zero here instead of the correct number, does the filter value need to be on the actor?

Formula is in an item, trying to fetch from an actor the value on a table that matches the item's name

fetchFromActor('attached',"fetchFromDynamicTable('stations','testTotal','stationName','name')")

formal goblet
brave trench
#

I don't think Ive ever seen ${}$ inside another ${}$, is that mentioned anywhere in the wiki/readme?

brave trench
#

Works though, thank you ^_^ I'll check that out too while I'm at it. I figured the 'name' part was what was giving me trouble.

iron badger
#

I managed to make my equippable items have a roll button on the actor sheet, but inside the equippable item sheet i can't seem to be able to get any information on the actor sheet. Any tips on how to solve that?

formal goblet
vagrant hollow
#

Just testing V12
I can not drag an CSB actor onto the canvas anymore.
In other systems no such problem.
CSB Actor sheet (formulas, rolls, items) working as far as tested
Just to let you know.

formal goblet
iron badger
wintry crow
#

Given that I have a roll message set to roll a dice, how would I make it so I run a macro or a single line of JS?

wintry crow
#

Basically I am adding AutomatedAnimations.playAnimation to play AA macros that match the item name

formal goblet
#

${#'%{...}%'}$

wintry crow
#

Aaah, like the one I used in #Roll, thank you!

drowsy rune
#

Would I be able to put a link to a journal entry in a rich text editor on a character's sheet ?

formal goblet
drowsy rune
#

Oh nice. I guess I cannot do the same in a Label ?

#

The only other option being I start being more concise on my character's sheets 😂

formal goblet
#

You could do it in a Label too, but with some additional steps required, because you need HTML

drowsy rune
#

I see. Thanks !

faint wharf
#

is CSB ready for 12?

formal goblet
wintry crow
#

I want to set the maximum of a number field to the value of another number field. Is it possible?
I tried with and without ${} but I can't seem to get it to work

vagrant hollow
wintry crow
#

That was it, thanks!

misty terrace
#

fiddly question for everyone here. My system is a Forged in the Dark-based system. In that system, when you make a Skill roll, you roll Xd6 where X=the current rank of that skill. If that rank is 0, you roll 2d6 and keep the lowest.

I have the bit working in a label roll message if the skill is 1 or greater. Trying to figure out how to handle if the skill is 0.

For reference, the skill in question here is detect. Here's the current code in the Label Roll Message:

<table>
<tr>
<th>Detecting ... </th>
</tr>
<tr>
<td><strong>Results</strong></td>
<td><strong>${Roll}$ successes</strong></td>
</tr>
</table>```
formal goblet
misty terrace
#

THANKS!!

brave trench
#

Anyone know why this conditonal statement doesn't perform the if false statement? Item is looking for a check box in a dynamic table on actor. all 3 parts act properly when separated, the condition returns true/false, the if true or if false formulas both return properly... Add the conditional bits (? and : ) and it just acts as if always true.

${fetchFromActor('attached',"fetchFromDynamicTable('stations','sizeMod','stationName','${name}$')") ? fetchFromActor('attached','actor_size')+sameRow('damage') : sameRow('damage')}$

formal goblet
brave trench
formal goblet
#

And an empty Array is always truthy

brave trench
formal goblet
#

That's why there's also first(), that can be used to pick the first value in an Array

brave trench
#

how does first() decide what is actually first? or maybe the better question is in what order does an array get listed?

Either way I don't think that will help in this situation, right? Is there a way to get this to work with checkboxes?

formal goblet
#

This would be the solution:

${sameRow('damage') + (fetchFromActor('attached',"first(fetchFromDynamicTable('stations','sizeMod','stationName','${name}$'))") ? fetchFromActor('attached','actor_size') : 0)}$
brave trench
#

Still getting the same result. no errors, just always acting true no matter checked / unchecked

pale tusk
#

Would it seem like a viable feature request to be able to adjust item properties from an item container? (For example, being able to put a checkbox or dropdown menu in an item container, such that adjusting them would also adjust the item, too.)

formal goblet
pale tusk
#

Oh, that's what that means! I saw that, but I misunderstood what it meant. Thank you.

#

Though I'll point out, I think it would be a pretty significant QoL improvement more than a small one--but happily upvoting!

#

That and the ability to reorder item container items are probably the big two things I'd love to see.

formal goblet
formal goblet
brave trench
empty glen
#

Is it possible to make a /sheetRoll label in an item that uses the owner actor's sheet?

brave trench
brave trench
vagrant hollow
brave trench
high stag
#

Some related doubt, i can't make this work.
Could anyone help me?

${fetchFromDynamicTable('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', 'first(sameRow('talentotree_atributo','fisico'))')}$

What im trying to do its to take a value from a dynamic table, that is chosen with a dropdown list. Then that value its a variable that refers to an actor ${variable_modifier}$.

formal goblet
high stag
#

the dropdown list its in a dynamic table, so it doens't have to refer the same row value?.

high stag
#

${fetchFromDynamicTable('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', sameRow('talentotree_atributo',fisico))}$

#

It works, thanks @formal goblet

high stag
# high stag ${fetchFromDynamicTable('escondidos_atributo', 'escondido_atributo', 'keyescondi...

Its possible to make that inside a variable?
${roll:=[ 3d20dhdl - %{return await game.macros.getName('HE').execute({entity: entity})}% + ${sameRow('talentotree_tree', 0)}$+${fetchFromDynamicTable('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', sameRow('talentotree_atributo',fisico))}$]}$

i want something like
${roll:=[ 3d20dhdl +${mod:= - %{return await game.macros.getName('HE').execute({entity: entity})}% + ${sameRow('talentotree_tree', 0)}$+${fetchFromDynamicTable('escondidos_atributo', 'escondido_atributo', 'keyescondidos_atributos', sameRow('talentotree_atributo',fisico))}$]}$}$
to reuse this mod

formal goblet
high stag
#

Thanks

real shuttle
#

should we go ahead and upgrade to v12, or wait for the CSB update?

earnest imp
#

@formal goblet So hey, as a player, when I try to look into other people's sheet (permission: observer), i can do it

#

But why is it when I add an item to that actor, I can no longer look into the sheet?

#

item added to actor

#

player view:

#

for some reason, having any item causes this error to appear on the player and they cannot view the character profile

formal goblet
earnest imp
#

hmmmm alright, lemme try to reproduce it though, fresh install of csb seems to work fine

#

@formal goblet Oh one more thing, by any chance, do we have any feature for item drag-and-drop on actor sheet in CSB? apparently its a core feature but i have no idea how to drag an item off an actor

formal goblet
earnest imp
#

OOOOOOOOOOOOOOOOOOOOOOOOOOOH

#

Thanks!

earnest imp
#

I'll make an issue at github

#

or ticket

calm dock
#

hey dpose the custom system builder work with the new update ?

sturdy mesa
#

I have an rich text area in a dynamic table for skill icon input, so my player can just copy and paste an icon to the rich text area with key "iconskill"
But whenever I edit the label button "Roll Skill" placing ${iconskill}$ in the last line (in the other lines, I have things like rolled, skill value and other things), I get an error and the skill is not rolling
Without the icon it's rolling perfectly.

Can someone help me plz? I want to send the icon to the chat on the same message

formal goblet
formal goblet
sturdy mesa
# formal goblet Can you show the exact setup?

Yes, but is in portuguese

(this down is just an normal skill roll, it's working, but when I try to refer to ${iconepericia}$, the key of my rich text area where my player can put an image, to just print on the roll message the skill Icon, I get an error)

${!selecaodepericia}$

🎲 Rolagem: ${rolagem:=[:tipodarolagempericia:]}$
📖 ${!selecaodeatributo}$: ${atributo:=switchCase(selecaodeatributo, 'Vigor', valorvigor, 'Força', valorforca, 'Destreza', valordestreza, 'Sabedoria', valorsabedoria, 'Inteligência', valorinteligencia, 'Vontade', valorvontade, 'Consciência', valorconsciencia, 'Manipulação', valormanipulacao, 'Carisma', valorcarisma, 'Sorte', valorsorte, 0)}$ 
📖 ${!selecaodepericia}$: ${pericia:=(fetchFromDynamicTable('pericias', 'nivelpericia', 'nomedapericia', selecaodepericia))}$
⭐ ${higieneimportapericia ? 'Higiene afetou em ${valorhigiene}$' : '...' }$ ⭐
✨ Modificador: ${modificadorpericia}$

📜 Resultado Final:
${rolagem + atributo + pericia + modificadorpericia + (higieneimportapericia ? '${valorhigiene}$' : '0' )}$${!rolagem == 20 ? ' ACERTO CRÍTICO' : ''}$${!rolagem == 1 ? ' FALHA CRÍTICA' : ''}$

(I want to include "iconepericia" rich text area with the custom Icon made by player here, after "Resultado Final (final result)"

formal goblet
sturdy mesa
#

So, basically, this "iconepericia" rich text area it's only the skill Icon on the dynamic table, because I want my players to put custom icons on this area, and when I try to print "iconepericia" key inside the roll message area, I get this error

formal goblet
#

Ah yeah, Dynamic Table. You have to use sameRow()

sturdy mesa
sturdy mesa
#

With the code:

${sameRowRef('iconepericia')}$

formal goblet
#

No Ref

sturdy mesa
#

Ok

sturdy mesa
#

maybe it's because my roll button is on another panel?

#

the code to roll is in "rolar perícia" button

#

and the dynamic table is separated

formal goblet
#

Yeah, that makes a difference

#

Then you have to use fetchFromDynamicTable()

sturdy mesa
#

Wait, I'll try something

#

${fetchFromDynamicTable('pericias', 'iconepericia', 'nomedapericia', selecaodepericia)}$

I'm using this and i'm getting another error

#

"selecaodepericia" is my dropdown key with all the skills (pericia), where my player can select the skill to roll

#

nomedapericia is skill name

formal goblet
sturdy mesa
formal goblet
#

However the Actor is named, y

sturdy mesa
formal goblet
#

Then without .iconepericia

sturdy mesa
formal goblet
#

Expand that one

sturdy mesa
#

Here it's the table "pericias"

#

Martin, I guess we solved it

#

It was necessary to open the icon image rich text camp

#

And save it, to update the path

#

Now it's working and it's showing the icon on the roll message

#

Thanks ^-^

#

It was because I added this camp with icon image later

#

So it wasn't updated because some ready skills I never opened the rich text area default Icon

oblique spear
#

So, I'm trying to build a new game world, and get CSB up and running, and I'm bumping into this error:

#

Running Version 11, Build 315.

formal goblet
oblique spear
night wraith
formal goblet
dusky parrot
#

I am having a bit of a brain fart right now. I am trying to make a dice function based off of a number field that rolls X+1 dice and keeps the highest. It should be something like ${ (str + 1)d20k1 }$ but I can't seem to get it right

dusky parrot
#

ty

dusky mist
#

I am looking to try Custom System Builder coming from Simple World Builder. is it possible to import compendiums built in simple into custom so I can clean them up for this builder insteead of starting over? I made a module and put all my compendiums into it however they do not show when enabling that module on Custom System Builder.

formal goblet
dusky mist
#

oh ok. dang. i was hoping scenes and tables could at least come over. thanks for the quick response.

formal goblet
#

Scenes without Tokens and Journals without links are less of an issue

dusky mist
#

awesome. i will try that

uneven quail
#

I got something like this to work a while ago, but I'm having issues now. I have an AttackBonus label that, when clicked, rolls ${[1d20]+AttackBonus}$ to chat.

The actual AttackBonus label is ${Strength + AttackMisc}$ which are both Number Fields. My goal, preferably, is to make AttackMisc a text field where the players can write, like, 1[Feat]+2[Proficiency] etc, to comment their Misc bonuses. What would be the best way to do this, because I keep running into different issues. If I do ${Strength + [${AttackMisc}$]}$ then it returns [#] instead of just #. If I do ${Strength + [:AttackMisc:]}$ then it returns the proper result, but as a string so when I click the label I get an "Uncomputable token" error.

uneven quail
#

Maybe it's my formatting? Here's it exactly:

#

Where lblInitDex is a label of their Dex bonus, and txtInitMisc is the Text Box

formal goblet
#

This is the problematic part

uneven quail
#

Sorry, that's my current formula. As previously stated, when I change it to ${Strength + [:AttackMisc:]}$ it gives the the uncomputable error

#

I've also tried ${Strength + [${AttackMisc}$]}$

formal goblet
#

You cannot use Roll Formulas in a Label text

#

That doesn't make sense anyway

uneven quail
#

Sorry, I was looking at two different ones for the names, lol.

But the label on those with actually SHOW the correct number, even with the Roll Formulas.

#

That's with ${lblInitDex + [:txtInitMisc:]}$

#

It just gives me the error when I actually click the button

#

(I have to go do something, so I'll be slow to reply

formal goblet
#

There are still several issues with using [] in Label text. You could just show the string, that wouldn't be a problem. But it gets one when you try to parse it as a Roll Formula

#

Because every time you reload the sheet, the value changes (if you have dice-formulas, not only static values)

uneven quail
#

Yeah, I'm with you there, I just thought that was the only way to get the comments on the numbers to work. Like in my screenshot, with the [Feat] comment. The comments were my main goal to get them working.

formal goblet
#

You can get it to work if you use the Formula in the Label Roll Message directly instead of saving it in the Label text

uneven quail
#

Okay, yeah, that does work. Unfortunately, it's suboptimal for the way I've done my sheet but thank you!

latent imp
formal goblet
real shuttle
#

what does this warning mean? can I just drag and drop the css file into the relevant place in my library files, or is there some other mechanic it's referring to?

formal goblet
real shuttle
#

ahhhhh I see what you mean

#

hoping i'll have enough data loaded in to start styling soon 🙂

formal goblet
#

I can also recommend the Custom CSS module, which works better than what CSB offers

real shuttle
#

I just added it! haven't played with it yet, but I'm looking forward to it

tame berry
#

I'm testing this out for the first time, and having trouble placing an actor on my scene. When I drag my test actor onto the scene, it doesn't place, and the console gives the error:

    at new PlaceableObject (foundry.js:26050:13)
    at new Token (foundry.js:58249:5)
    at TokenLayer.createObject (foundry.js:33985:12)
    at TokenLayer._onDropActorData (foundry.js:41484:20)```
Forgive me if this is the wrong place to ask, but I'm not really good enough to know where to go for help from here.
formal goblet
brave trench
#

Can the dropdown list formula option grab a column from a dynamic table as well as adding a few custom options?

brave trench
# formal goblet Yeah it can

I tried to do fetchFromDynamicTable('station','stationName') just to grab the array but its coming up blank. Also said to separate the diff labels with commas, tried that and it just threw errors. I've never tried this before and not sure how to set it up and the guide is kind of confusing to me.

formal goblet
brave trench
brave trench
#

Is it possible to fetch an array from a dynamic table using two different filters?

brave trench
#

Are you aware of a bug, or maybe just a reason why this is happening?
label 1 = ${sum(fetchFromDynamicTable('damageTable','integrityLoss', Whole Vehicle))}$"}

Label 2 = label 1's key. throws a some props not computed error in console.

This only happens when filtering off of the dropdown menu. If I remove that filter the field computes, minus the filter of course. Label 1 computes accurately either way.

formal goblet
brave trench
#

lol yeah you're right. I thought it was working fine since it summed everything properly. 😅 Thank you.

dusky mist
#

Are there any tutorials available? the Git readme has answered a lot of questions but would like to watch someone else do it and explain stuff about items and maybe abilities/magic.

brave trench
brave trench
#

It has something to do with the formula on the drop down list, If I switch to custom keys it works fine. What am I doing wrong?

#

nm, I think I actually got it this time. dropdown formula had to be in single quotes ${'totalHardware'}$,${fetchFrom...}$

tame berry
formal goblet
mint basalt
#

Ok, perhaps a stupid question. But if I wanted to write something that would evaluate and then use the lower between two values, how would I go about doing that?

#

IE, I want to have something along the lines of value = (lower of variableX or variableY)

dusky mist
#

For the visibility formula for a section on a character sheet. I want to make a table only show if the name field on a character sheet matches a string. how would I write that formula? thank you for any help provided.

formal goblet
dusky mist
#

oh ok that seems way more easy than expected. if i want to check it against multiple strings should i just use or between?

dusky mist
#

awesome!

#

thank you

mint basalt
#

Probably ghetto, but it is functioning. So... meh

mint basalt
faint wharf
#

RAndom dice question, i have large formula that conciders roll this or that, and it rolls all the dice regardles if its true or false. any idea how to fix it? we use dice so nice so the roll looks like a bug

dusky mist
#

For the dynamic table in template does the slash through trash can mean they cannot delete it?

formal goblet
formal goblet
tulip obsidian
#

Hello, my tabbed panel is not working, it let me click to create a newe tab but it doesnt allow me to proced after that

#

Anyone knows how to fix it?

fierce harbor
tulip obsidian
fierce harbor
tulip obsidian
#

Let me see

#

Yes, this one

fierce harbor
#

Can you show the tabbed panel setup, please?

tulip obsidian
fierce harbor
#

It needs a key written in component key, otherwise it is null.

tulip obsidian
#

Ok, i will try it

#

didnt work

#

Did i do something wrong with the componente key?

fierce harbor
tulip obsidian
#

I am able to save it

fierce harbor
#

Well, it should work...

tulip obsidian
#

The yellow error happens when i open de edit component

#

The red one when i try to add a tab to the tabbed panel

#

Maybe some file is missing?

fierce harbor
#

Try deleting the panel and remaking it giving it a new name from the start.

fierce harbor
tulip obsidian
#

Same problem

#

Well, thanks for trying at least

fierce harbor
#

Oh well, I literally did nothing 😅
Sorry for not being of real help, cannot seem to fix the problem.

formal goblet
tulip obsidian
#

v11 is the foundry version or the cbs version?

formal goblet
#

Foundry

tulip obsidian
#

Ok, thks

tulip obsidian
marble timber
#

Hello, I am currently testing CSB and would like to know if it is possible to "nest" equippableItem : for example I have a "People" equippableItem in which I could add another equippableItem like a "Trait". Then if I drop the people equippableItem on the actor, will I have the People and Traits items on it (certainly the good item containers on the actor sheet) ?

#

It seems that I can't add an equippableItem in another one (or maybe I am doing wrong)...

formal goblet
pale tusk
#

Is there a way to make a sheet element only visible based on the visibility formula if the viewer has permission? It seems like when I try that the formula overrides the sheet permissions.

formal goblet
pale tusk
formal goblet
pale tusk
dusky mist
#

is there a way to have a label roll message drop a /command into chat? I am looking to implement the module special dice roller and it uses /commands to process the special dice

formal goblet
dusky mist
#

oh dang i dont know how to write js. thanks for the info. I'll see what i can try. may have to learn js.

formal goblet
# dusky mist oh dang i dont know how to write js. thanks for the info. I'll see what i can tr...

https://github.com/BernhardPosselt/foundryvtt-special-dice-roller?tab=readme-ov-file#rolling-dice-programmatically

%{
game.specialDiceRoller.l5r.rollFormula('rr2w');
}%

That would be an example.

GitHub

A FoundryVTT module that supports rolling L5R, VtM 5e, Genesys and SWTTRP dice in chat - BernhardPosselt/foundryvtt-special-dice-roller

dusky mist
#

ooooh wow you are amazing

velvet heron
#

Looking at these two checkboxes, is it possible to make it so that they are mutually exclusive? In other words, if one box is checked, the other gets automatically unchecked and vice versa.

formal goblet
velvet heron
#

I haven't fiddled in CSB in over a year I think. Last time I recall radio buttons weren't a thing. Are they available now?

formal goblet
#

Yep

velvet heron
#

Oh, rad!

formal goblet
#

A year is quite a lot 😅

#

You can go through the changelog if you want to know what changed so far

velvet heron
#

Heh, yeah. I just made the systems and settings my game required and called it a day.

#

Easiest system update ever 😄 Thanks, Martin!

vocal sorrel
#

Hello, newbie here. Trying to build my custom system in CSB, but when I look at Formulas I just check out mentally...
Trying to set up my component based item system where Players and GM can make items with predetermined components.
My current goal is to make the "PropertyModifier" field only appear when a specific option is selected from the Dropdown in the "ComponentProperty". How would I go about doing that?
(For example, the Modifier field only shows up when the GUTS component is selected (GUTS component key is IC-GUTS))

grave ether
#

Should be able to do this by using the advanced option for visability

#

Example

#

write whatever formula that might be viable and put it in there. I use this for fields I dont want other to see I make it something x =0 and players cant see the field.

vocal sorrel
#

Ohh, I see, I missed that field there. I'll try to figure out what formula goes here, thanks!

grave ether
#

No worries, I planned on making something based on class but I havent gotten around to it yet

empty glen
#

Hey, I've got a label setup to show the number of types of cards in a hand. The only problem is it doesn't update with the hand as cards get drawn and discarded. Any fix for that?

Here is the label text: %{return game.cards.getName('Chips - ${name}$').cards.filter(e => e.name === 'White Chip').length}%

formal goblet
empty glen
#

Ok. Thanks!

late ferry
#

hey guys can anyone help me please. right now im using Roll20 but want to switch to foundryvtt. I use my own set of rules with self made character sheets in excel etc. Is it possible to create like an own sheet in foundry with macros in the sheet? and which system should i install then? because right now my friends have to switch between the excel and roll20 and then just roll the dice there. i tried to install for example D&D but the initiative there is rolled with d20 but in my game i use d6. so basicly what i want is to "copy" my excel into foundry and choose fields when players press on it a dice will be rolled. i read about 2 systems. first is simple world-building (Which i havent tried yet) the other is custom-system builder which i tryied but got this error message when downloading it. (i also changend or older foundry version 11 Build 315 but noting changes)

#

which one is better for me? i tried simple worldbulding and it seems to be fine. but can i change somehow the initaitve dice? and in the charakter sheets there are 3 tabs (info, inventory and attributes) can i add more? spells, traits etc?

formal goblet
formal goblet
late ferry
#

Thanks !

fierce harbor
#

I'm a bit swamped by an unexpected behaviour. Shouldn't this conditional disable the prompt if the condition is not met?
${darknessChance>(item.baseCostDD*20)?(#concat(?{challenge:"Difficulty: "|0|5|10|15|20|25|30|35|40|45|50|60},'')):''}$

concat() is useless, but the result is the same with or without it.

formal goblet
fierce harbor
formal goblet
#

The conditional will be evaluated after these special cases

fierce harbor
silver lake
#

Heyo! I need an assist with a code:

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

${#Aspect:= ref(AspectLocked)}$
${#AspectDice:= equalText(Energy, 'None') ? 1 : 0}$
${AD:= [:AspectDice:d:Aspect:]}$
${setPropertyInEntity('self', Energy, "equalText(Energy, 'None') ? ref(Energy) : ref(Energy) - 1")}$

The idea here, is if the player selects the option 'None', the AD shouldn't roll. But it's still rolling every time.

#

Any idea where my mistake is? I made this a while ago, and don't really remember how to read it anymore

#

${#AspectDice:= equalText(Energy, 'None') ? 1 : 0}$
This part more specifically

#

if I switch the 1 : 0 btw, it never rolls.

formal goblet
silver lake
formal goblet
#

${Energy}$ somewhere

silver lake
#

okay, just checking

#

it returns the key, either CNothing, CStam, or CWill

#

Depending on the choice.

formal goblet
#

Then it should be one of the 3 instead of 'None'

silver lake
#

Someone here had told me iit should be 'none' in the past, since I don't know how to read it, I left it that way.

#

Okay, lemme try

#

What should the order of the 1 : 0 be?

#

I was also tolld 0 : 1, but that never rolled.

formal goblet
#

The first one is taken if the expression resolves to true, otherwise it takes the second one

silver lake
#

Gotcha

#

thank you.

#

Now I understand it

#

It works

#

thank you!

#

All the love!

high stag
#

I need to catch the last and first number of a number field, its that possible?

#

so 2d6
i need the 2 and the 6
a 28d8
i need the 28 and the 8

#

will always be a dice

formal goblet
high stag
#

It is on a dynamic table. and they need to be separed
It's also on a item container roll

#

so how can i use the correct key?

formal goblet
#

You just add [0] or [1] at the end

#

I need to know where the key is and where the formula will be

high stag
#

From the dynamic table im using:
${#dice:= sameRow('matrizdmg_mod')}$${[:dice:]}$
and for the item container im using:
${!item.wpdmg}$

#

the formula
intentionally it's supposed to be something ${}$+%{}%

high stag
#

simplifying if the dice is 2d6 I want the run macro to be 2*6

formal goblet
high stag
#

thank you

dusky mist
#

quick little question is there a way to say roll n d6's in a row where n is a value in a number field? I am looking to make it A roll label roll message

#

not to be added together

#

but 1d6 n times

velvet heron
#

Yesterday, I spoke too soon. This change with the Radio Buttons broke the logic in the character sheets that calculates item numbering.

I checked the gitlab article for Radio Buttons...so if I understand this correctly:

WARNING : Contrary to the other components, the value of a radio buttons group is obtained in Formulas by using the name of the group, not the key to the radio buttons.
then changing the Label Text formula to

${item.weaponsGroup ? 'Yes' : 'No' }$ 

Now it looks like I can't get the character sheet to display a Yes for a selected Radio Button and a No for an unselected one. They just both say the same.

I assume this is because the Value is not correct. In my thinking, the Value should be some sort of if/else statement, like "if this Radio Button is selected, then 1. Otherwise, 0" but I don't know how to codify this and would appreciate some help.

Unless I'm overthinking it and it's a simpler solution.

The first of two screenshots here shows the character sheet and its template on the right top and bottom, with the Label Text showing the new item calculation for the Radio Button group. The second screenshot shows an item and its template with the component for one of the radio buttons.

formal goblet
formal goblet
formal goblet
#

weaponsGroup will always be '1' in your case

velvet heron
#

I don't know what to put so that if Equipped is selected, the sheet says Yes for that column and No for the Inv slot column. And then if it changes and the player selects Takes up inv slot the yes/no switch.

formal goblet
#

Then make one value 0 and the other one 1

dusky mist
velvet heron
formal goblet
velvet heron
#

${item.weaponsGroup ? 'Yes' : 'No' }$ is not correct?

formal goblet
#

'0' and '1' are both truthy, so you have to compare the values

#

'0' is not the same as 0

velvet heron
#

Do you mean like so?

formal goblet
#

${item.weaponsGroup == 1 ? 'Yes' : 'No' }$

velvet heron
#

That seems to work correctly if the second radio button is selected but not for the first one.

formal goblet
velvet heron
#

Sorry, I think I got confused. I forgot to update the Inv slot column on the character sheet. Once I did, it now works correctly. Thanks for your help again!

velvet heron
#

One thing just keeps leading to another 😓 And this one is a head scratcher for me.

The character sheet should be looking at every Yes under the Inv slot column and summing them up. But not only is it doing that incorrectly now (after updating the items as discussed above), but I'm not even sure how it's calculating anything at all, considering I don't see a formula for it where there should be one. Obviously I'm missing something here.

velvet heron
formal goblet
velvet heron
molten pollen
#

This has probably been asked before but there is no way to set an Initative roll button on the sheet correct? I got it set up properly through the token just wanted to confirm there is no way to set it up on the sheet

late ferry
#

hey guys, i guess i have some kind of complicated question: i just started with foundry and have my own system, thats why i use Custom System Builder. First of all and most important: I have this excel, is it even possible to display all the fuctions in the sheet in foundry?

formal goblet
molten pollen
#

Awesome thank you

late ferry
#

Then i would like to ask: 1. Is it possible to set individual initiative rolls for every player? 2. Is it possible to make a rule in the game when a d20 is rolled for "Intelligenz" for example and you value is 13 and you roll a 12 that there is a "Success" notification. other when above 13 then not success? also when you have to roll two dices and both need to be sucessfull? 3. as you can also see in my excel a lot of attribtus are conected to each other is it possible to make this formalas also in the sheet or must i just enter the value? and always when i player is lvl up i need to change everything in the excel and then transfer it into foundry? How difficult would you say are my questions to adapt for me as someone how cant program and is new to foundry?

formal goblet
# late ferry Then i would like to ask: 1. Is it possible to set individual initiative rolls f...

There's an example-template for the project, which you can use to get an overview of the functionalities: https://gitlab.com/custom-system-builder/custom-system-builder/-/tree/feature/referenceItemContainer/sheet-library/Example?ref_type=heads

  1. Doable
  2. Doable
  3. You can also use Formulas to connect stats together. You should check the following 2 docs for more info:

The difficulty depends on how complex your calculations are, so it is pretty much comparable to Excel (which also has a ton of complex functions like ARRAYFORMULA())

late ferry
#

thanks a lot! i will try it out!

hazy saffron
#

Can you have panels within another panel that are laid out in columns that are not equal width? For instance, a panel taking up 1/3 of the width and a panel taking up 2/3 of the width?

formal goblet
hazy saffron
#

nods Thank you

iron badger
hazy saffron
#

${fetchFromActor("attached","varname",0)}$

iron badger
#

"max_for" is the key to the value of the maximum strenght of the actor. I have a feeling what i'm doing wrong is on the 1d20 though

hazy saffron
#

Hmm we haven't used it for a roll, so the only thing I can think is try it out of [] and see if it works?

formal goblet
mint basalt
#

Ok... so question. I'm trying to have a variable on an item populate via a stat variable on any actor it is attached to.

#

I've tried ${fetchFromActor("attached", "dex_stat")}$

#

${ref(target.dex_stat)}$

formal goblet
mint basalt
late ferry
#

hey guys small questions, whats wrong here? i try to make the result rounded with no dezimal. i checked every key and its right and when deleting the math.round i get a result. do i use wrong formula?

formal goblet
late ferry
#

haha damn it thanks!

high stag
#

never lucky with "fetch from dynamictables".
did i misstype something?
fetchFromDynamicTable('talentotree', 'talentotree_tree', 'talentotree_nome', Test)

bassicaly i want the variable "talentotree_tree", from the dynamictable "talentotree", that have the name Test "talentotree_nome"

formal goblet
high stag
#

thanks!

#

there's a way to multiply a variable?
like 12*${}$

#

being more specific
12*max(${idk}$,1)

#

something like this

high stag
#

thanks

tulip obsidian
#

Hello, how do i use a item value on a formula? For context , i was trying to make the character hp be based on his (class + his con)* his level

tulip obsidian
#

And a side question, can i make a tabbed panel inside a table?

misty terrace
#

Anyone know how I can retrieve the Label Text (or component key) from a label so that I can pass it into a macro that I'm calling from the Label Roll Message on that same label?

elder turret
#

Hello,

I am trying to clear out a dynamic table called history. It is a history of every roll the character has made, and gets a little big. (the roll is how exp is calculated so I need to keep a history of it until after DM approval)
This is my current code ... but nothing seems to happen.
%{
update = {};
update['system.props.history'] = {};
entity.entity.update(update);
}%

any idea why that would not erase the values?

#

Ok figured it out. I will leave my notes here in case anyone else needs to search for how to clear a dynamic table. Even though it is an object in memory if you treat like an array it will work so the following worked.

%{
update = {};
update['system.props.history'] = [];
entity.entity.update(update);
}%

late ferry
#

quick question can i somehow make this fields clickable so that a dice will be rolled? the players will enter there a number (1-20 as its a d20 game, but 1 i critical success) . Would it also be possible to make a rule that when the dice is same or lower then the number there will be a success text or something? And would it also be possible to make double dices because on some talents i need this fuction as well because player have to throw a STR and DEX throw at once. but as soon es one is not achieved is a failure

formal goblet
formal goblet
formal goblet
late ferry
formal goblet
late ferry
formal goblet
late ferry
formal goblet
#

Ist vermutlich Gen statt Genetik, wenn ich das richtig sehe

late ferry
#

ok jetzt check ichs 😄 der text kommt ins lable rein aber der key muss von der zahl sein. macht natürlich sinn! Danke schonmal! wie kann ich dann noch zusätzlich im chatlog neben dem "Erfolg" die gewürfelte zahl direkt anzeigen lassen? aktuell muss ich auf das "Erfolg" draufklicken um den Wert zu sehen. wenn es ein doppelwurf ist muss ich dann in die formel die du mir geschickt hast neben dem Genetik dann zum Beispiel +Stärke eintragen oder wie funzt dass dann?

formal goblet
#

Und zum Doppelwurf... brauchst dann natürlich nen zweiten Wurf. Kannst einfach den aus der 1. Zeile kopieren und eine andere Variable verwenden. Die Auswertung, ob es ein Erfolg ist, erfolgt dann in etwa so:
(RollErgebnis <= Gen and RollErgebnis2 <= Sta) ? 'Erfolg' : 'Fehlschlag'

late ferry
late ferry
# formal goblet Einfach das `#`, das versteckt einzelne Formeln

So hat alles soweit geklappt 😄 letzte frage für heute:(Versprochen) In meinem Regelwerk werfen die Spieler bei Talenten auf Doppelwürfe. In dem Beispiel Springen ist Körper & Genetik jeweils ein W20. Der wurf klappt soweit. Eine besonderheit wäre jedoch, das Ihnen sogenannt Ausgleichspunkte zur Verfügung stehen. UKP und Expertise. Diesee Werte in dem Beispiel sind 4 & 5 also ingesamt 9. Das bedeutet wenn ein Spieler auf z.B. 10 & 10 Würfeln muss, aber jetzt eine 8 & 15 gewürfelt hat hätte er ja den zweiten Wurf um 5 Punkte nicht erreicht. Diese Ausgleichspunkte können deswegen bei jedem Wurf passiv den Wert ausgleichen. Quasi 9 Ausgleichpunkte hätte er, braucht aber nur 5 um aus der 15 einen 10 zum machen die dann zum Erfolg führt. Eine 20 bleibt aber ein critischer Misserfolg und führt in jedem Fall zum nicht gelinge des Talents. Kann man das in einer Formal hier darstellen?

formal goblet
mint basalt
#

Hmmm, so I have a question. I currently have an item container that displays various things it pulls from items placed in it. For instance:

#

Is there a way.. to instead of having a label that displays only what it pulls from the item, have the capability to add or subtract from the total on the item?

#

I notice I can only make those displays in the item container labels. But I'm curious if there would be some way to pull it off in the "roll" label, which has other elements it does? IE, could you have some sort of pop up that would inquire how many shots are used? And then adjust the running total on the associated item?

#

Roll label:
${#?{difficulty:'Difficulty'[check]|'Average'|'Easy'|'Difficult'}}$
Modified Percentage:${value:= (ref(item.skill_name) + firearm_mod) * switchCase(difficulty, 'Easy', 2, 'Difficult', 0.5, 1)}$

${#specialsuccess:=ceil(value/5)}$
${#fumble:=100-(floor((100-value)/20))}$
${item.name}$ roll is:
${die_roll:=[1d100]}$

Which is a
${die_roll<=specialsuccess?'special Success':die_roll>=fumble?'Fumble':die_roll<=value?'success':die_roll>value?'failure':''}$

mint basalt
#

Ok... another question for folks. How can you (or can you at all) have a formula in a ternary operator?

What I am looking to do... is reduce various variable aspects of a vehicle, when the HP of the vehicle is reduced to half or lower.

#

What I'm currently dorking around with is:
${current_hp <= breaking_point ? '{vehicle_base_speed / 2}': '{vehicle_base_speed}'}$