#Custom System Builder

1 messages Β· Page 46 of 1

formal goblet
#

setProperyInEntity() does that

#

Next version

heavy elm
formal goblet
heavy elm
formal goblet
brittle moth
#

#package-releases message

... And it's now in the stable release !

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

Features

  • Added ability to add items to other items
  • Added function fetchFromParent(), which will replace fetchFromActor('attached', ...)
  • Added new functions alookup(), lookupRange(), fallback(), fetchFromUuid(), setValues(), array()
  • Reworked the function concat()
  • Added the possibility to have multiple keys inside 1 modifier (separated by comma)
  • Adjusted lookupRef() to return an Array instead of a single value due to the change above
  • Adjusted parameter propertyName in setPropertyInEntity() to also accept an Array due to the change above
  • Switched all Rich Text Editors to ProseMirror

Fixes

  • consoleLog() and consoleTable() now actually let values pass through as they should instead of returning undefined
  • Fixed an issue, where user-defined properties could collide with Token-properties
  • [#409] Fixed a bug, where Template IDs wouldn't be exported
  • Fixed a bug, where local variables in Label Roll Messages wouldn't be considered when calling user input dialogs
  • [#379] Fixed a bug causing undefined values in Item Displayers to be populated with the values of previous items
  • [#418] Fixed Dynamic Tables & Item Container sorting system
  • [#397] Fixed Dynamic Tables default value handling, correctly computing default values & formulas in default values
  • [#417] Fixed an issue with text editors opening too small
  • Fixed an issue, where names of Active Effect wouldn't be displayed in ActiveEffectModifiers when using a custom configuration

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

sick cedar
#

Is there a section on the wiki about how to proceed with the update to the newest stable version? I remember reading something a couple of weeks ago

signal panther
#

Ah, thank you! ❀️ That would be a major part of my problem. That part is at least resolved now

bronze halo
#

Hi, CSB is awesome. I would really love for the future to have a value/check box or dependency for status effects. If we could use setPropertyInEnmity to activate and deactivate status effects it would be incredible!

signal panther
#

Haha and after remembering proper syntax, it's fixed! Tytyty

#

Now to do that for every stat

bronze halo
#

Which bring me to my current problem. I'm trying to find a way to activate an ActiveEffect (status) via command. I try to used the workaround explained here https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Scripts/Scripts-for-Active-Effects but unfortunately it seems like the "status icon counters" module was updated and I get a legacy notification. Unfortunately I do not understand their new command. Is there any other way to get it running?

signal panther
#

Alright, new feature, and I couldn't find documentation for this specifically (apologies, I'm very new to this). I have a table that I'm already pulling bonuses from based on stats, in the first screenshot. Currently it doesn't consider checkboxes. It pulls the sum of the "Bonus" column, filtered by the "Attribute" column and sets that value as a hidden attribute with the following formula: ${sum(lookup('DT_ATT_BNS', 'BNS_NUM', 'BNS_ATT', 'BRAWN'))}$.

The documentation doesn't say anything about filtering by multiple criteria, is there a way for me to modify this by only rows that have their "Active" boxes checked?

brittle moth
bronze halo
#

does "Dfreds convinient effects" work with CSB if I only rely on custom build active effects? Want to later use the API to apply and remove effects

fossil brook
#

Hello everyone, I have a question about CSB (Custom system builder). I have special dice in my game that I would need to implement into the game. They have their own walls with special markers (d6), I would need a rolled one to subtract 1 success, a two and a three are empty walls, a four, a five is for one success and a six rolled gives two successes. But I can't get over the fact that VTT evaluates all my achievements one by one, or none of them as it should.
I'm done with this one for now.

${[:hodz:d6cf=1:cs>=4]}$

Which counts anything rolled over a four as a success and a one as a failure, but nothing else. Any advice?

#

If there is an easier way to show cube walls in the program's chat, then I'd appreciate it too.

#

I am newbie for all of this, but for the play i need just this one dice πŸ˜„ Thank you for all advices guys.

rain glen
#

I found this system last night and I'm wondering how to make a stat a dice size like in the savage worlds system. (Strength = 1d6 Dexterity = 1d10) and also how to call that function as an attack.

void spire
#

I have something that bugs me a bit (it's not an issue, just something, that could make life a little better): currently I don't see any option to replicate existing element on the character template (like copy and paste). It would be helpful, if there would be such option. @formal goblet, is this something planned?

void spire
austere mirage
#

Hey folks. Sorry if this is a stupid question.

I have been trying to use Object.values(ui.windows).find(w => w instanceof ActorSheet)?.actor?.uuid to get the uuid of the actor that is linked with the current character sheet. This works in console and macros, but I get either a value expected (char xyz) error or a left hand assignment error if I try to assign this to a variable inside of ${}$. I imagine that math.js is concerned about the type it is being passed.

Is there a better or more suitable way of referring to the uuid from inside of character sheet context? I have a roll to basically decrement ammo count in response to the roll, i.e. it expends ammunition:

Ammo Count Updated For: ${

ref('universal_roller_ammo_choice')

setValues("uuid", ref('universal_roller_ammo_choice').concat(" -1"))

}$

It works if I give it a static uuid for a character. But I am not sure what is the best way of inserting the uuid corresponding to the char sheet it is invoked from in a way that works with CSB.

Thank you!

#

some players might control multiple units, so I don't think that I can refer specifically to the linked character

formal goblet
modern hemlock
#

Is there a way to display a label in the item displayer before the item reference button? (i.e. an item count) (including possibly using custom CSS)

#

I basically want a nice way to have things like arrows that have their count removed every time you shoot (with a macro) and the display should reflect that

austere mirage
brittle moth
modern hemlock
#

What does an item inside an item mean? πŸ€” sounds like it might be useful

brittle moth
# modern hemlock What does an item inside an item mean? πŸ€” sounds like it might be useful

Items can be anything you want. Items inside items is a very versatile (and new) feature, allowing you to (for example) :

  • Create backpacks and add items inside them
  • Create enchantments and apply them to other objects
  • Create attachments and add them to weapons
  • Create symptoms to attach to a "disease" item, to then apply on a character
  • ... I don't have more ideas but that's not bad, I think ^^
modern hemlock
#

Do you have anything that could maybe change how items on actors are displayed in the item displayer (to add a picture, count before the name, or format things better) (or a way to drive a dynamic table with the actor data using a macro or something - not sure what I'd hook that under to make it refresh when needed)?

brittle moth
modern hemlock
#

I might restyle the main item reference button to be a constant-width button without text with CSS and use the labels then, sounds like it should work

modern hemlock
#

seems to be working

lone patrol
#

how can i add multiple checks to an item filter for a container? && doesnt seem to work.

#

say, i want to check that a dropdown has a certain key selected and a checkbox is ticked

#

putting a space between the clauses seemed to just work? would appreciate confirmation on that tho

modern hemlock
#

Is it a formula? Try or or and (math.js)

normal ore
#

Good evening!
Just a quick questionβ€”how do I call my own active effect through a macro?

I do have an example macro, but the issue is that the modifications I made to the template sheet are not being applied. I created an Active Effects container to check, and the effect isn't showing up.

I think my macro is creating a new effect, whereas I actually want to call an existing effect that I've already created so I can make use of the modifiers I set up in it.

How can I do this?

normal ore
#

I achieved!

oblique willow
#

Is there a way to reference a variable in a rich text field? [[/r @variable]] works since it gets the rolldata correctly, but only when you press it to send to chat. [[@variable]] does not appear in the text field as anything but 0.
${variable}$ doesn't work either

formal goblet
oblique willow
#

Why doesn't the [[@var]] values work though, they do in other systems?

#

And it's in the rolldata since it works if you do [[/r ]]

formal goblet
oblique willow
#

That's surprising, I've used it in basically every system I've played

ornate haven
#

Is there a method to detect a certain die roll value and highlight it? Looking at raw die values. If a d10 rolled = 10, show extra text in the roll value. Ideally this would work to detect against multiple dice (checking each) rather than combined.

crystal quarry
#

Ok thank you. I've been informed there is an official Foundry system on the works so it's not a big deal

#

Thank you for the help anyhow

void spire
dense pine
#

Question about These β€žsub-Itemsβ€œ. In my actors Item displayer, Can i directly Access properties that are inside a β€žsub-Itemβ€œ of my displayed Items? Like item.item.prop

formal goblet
modern hemlock
sturdy mesa
#

Thanks, but can you help me with the default value?

I am able to generate the dropdown with the list of skills that the character possesses.

However, I would like it to recommend the skill of the weapon the player is using by default.

In the weapon's sheet, there is a field called "periciamodeloitem", which references the name in a text field for the recommended skill.

In the dropdown of the user input template, I need to reference this variable "periciamodeloitem" in the default value. How do I do this?

#

I'm trying like this, but it's not working

#

The field with the key "periciamodeloitem" is basically the name of the skill, in a text field.
I tried to use lookup to compare the name of the skill inside the weapon with the name of the skill on the dynamic table but didn't work

fair yoke
sturdy mesa
fair yoke
sturdy mesa
#

Oh, I did it

sturdy mesa
# fair yoke Can you share your rollmessage ?

I was using the dynamic table option key with the skill levels, so if one skill had the same level as another, the first one to appear would show up as the default.

Now, I changed the option to the skill names, so the correct skill will always appear, and I just adjusted the code. Thanks!

dense pine
#

@formal goblet i created my own custom Status Effects with the Script in CSB Wiki. I would like to know how to find the UUIDs of These Effects as i would like to activate them with a Script and Therefore i Need the UUIDs. Any idea?

formal goblet
dense pine
formal goblet
# dense pine Ja

These don't contain any UUID, they are not Documents. Just some configuration data

kind folio
#

Hello! I am creating a system and most of it is ready, but I have a question that I haven't been able to solve yet. I want a roll that asks for the number of d6 dice to be rolled and requests the attribute value and bonus value. The result should be the sum of everything. However, while it asks for the dice and values, it doesn't actually roll the dice.

Here is the code:

<table>
<tr>
<th>Technique</th>
</tr>
<tr>
<td>Roll</td>
<td>
${DiceNumber=: ?{How many d6 dice do you want to roll? (Maximum 3)|1|2|3}}$
${Roll=:[DiceNumber]d6}$
</td>
</tr>
<tr>
<td>Attribute Modifier</td>
<td>${AttributeModifier=: ?{Attribute Modifier[number]|0}}$</td>
</tr>
<tr>
<td>Bonus Modifier</td>
<td>${BonusModifier=: ?{Bonus Modifier[number]|0}}$</td>
</tr>
<tr>
<td><strong>Result</strong></td>
<td><strong>${Roll + AttributeModifier + BonusModifier}$</strong></td>
</tr>
</table>

Any Tips?

formal goblet
#

And Dialogs already store your data in local variables

kind folio
#

I'm not sure I understand, sorry. I really don’t know much about how it works, but through trial and error, I’ve learned the basics. Where exactly should I put ${var:= value}$? Do you have an example of how the code should look? Like, just asking for the number of dice and rolling with the attribute?

potent fossil
#

is there an equivalent in CSB to the set() or =Unique() function. Like returning every different value in a list ignoring the repeating one ?
Example [A, A, B, B, C, C, C, D] ==> [A, B, C, D]

modern hemlock
#

custom CSS is cool

#

item displayer

dense pine
#

What is teh deal with "CSB - Embedded Items Folder"?

modern hemlock
#

Why doesn't this work?

%{return ${sameRow('macro_invocation', '')}$;}%

these both work
%{return "aa";}%
${sameRow('macro_invocation', '')}$

I want to do an eval on a user-defined JS (basically call a macro with arbitrary number of params I guess)
I'm making a dynamic table with user-defined macros for items that players can use to e.g. attack

#

Im getting this on the first one

heavy elm
#

So I can add items to items now. Can I also add itemmodifiers to to added items which then change Values of an actor?

void spire
#

Thank you all for help.
One more question: is there any way to mark somehow the result of the dice roll? I'm preparing CJ Carolla Witchraft, which use 1d10 for testing, and usally sum up with the attribute + skill. If on the d10 is 1 or 10, there is some special effects to be displayed. But for the ${[1d10]+attribute+skill}$ the result is a sum, so I need to click on the roll to see, if there aren't any 10s or 1s.
Is this something that can be done? I would be fine with a message (but condition don't work for the numbers I guess) or mark the roll with some colors.

marble mural
#

Duplicating any item makes copies of every item now...great.

#

and now I have to go back through and remove all the duplicates, and fix all the dead links in my notes and on sheets, because there is no way to know which "duplicate" the link is linked too.

#

I shouldn't have updated.

dusky mauve
#

@formal goblet Does Dynamic Table iterate over deleted elements?
because I got an issue - its give me an error on the already deleted element

dynamic table dt_cleric_gods

{
    "0": {
        "god_name": "GOD_MISTRESS_OF_CROSSROADS",
        "god_points": "5",
        "$deleted": false
    },
    "1": {
        "god_name": "GOD_LADY_LAKE",
        "god_points": "0",
        "$deleted": false
    },
    "2": {
        "$deleted": true,
        "god_name": "GOD_NO_GOD",
        "god_points": "0",
        "$predefinedIdx": 0,
        "$deletionDisabled": true
    }
}```

Formula on field `Max` :
```${CLERIC_GODS_SERVE > 0? max(lookup('ic_cleric_cults', 'level','god_key', '${sameRow("god_name")}$')) * ${CLERIC_EFFICENCY}$ + ${CLERIC_EFFICENCY}$: 100}$```

error:
```CLERIC_GODS_SERVE > 0? max(lookup('ic_cleric_cults', 'level','god_key', 'GOD_NO_GOD')) * 25 + 25: 100```
potent fossil
#

Do any of you guys have problem with duplicating items? When I do it duplicates all of my items several times

marble mural
heavy elm
#

I'll not duplicate my items Till hotfix πŸ˜…

modern hemlock
#

what's up with duplicating? I thought duplicating an item always made an independent copy πŸ€”

marble mural
modern hemlock
#

Oh duck, you're right 😡

#

I shouldn't've clicked that πŸ˜‚

modern hemlock
#

is there a way to get the n-th element from the dynamic table? (something like ${lookup('item.rolls', 'roll_description')[1]}$, this index syntax doesn't work however)

formal goblet
formal goblet
modern hemlock
modern hemlock
#

%{alert('${sameRow('macro_invocation', '')}$');}%

the row contains this (raw html) <p>console.log("hello");</p>

#

hmm

#

okay it works after I replaced the rich text area with a text input, rich text was adding <p>

formal goblet
#

Your URL is in there

modern hemlock
#

Yey it works - a button to roll an item's 'macro' (using eval on a string) directly from the actor

modern hemlock
#

I was so excited I didn't notice 🀣

formal goblet
modern hemlock
#

technically it's not even my server πŸ˜‚

#

lol

#

there was no identifiable info there but I suppose if you went and probed on the server maybe you'd find something on my friend idk
the worst that could probably happen is something not being password protected correctly and you could delete files off of it maybe idk

formal goblet
#

Not really. Just saw the URL in the screenshot and warned you

modern hemlock
#

yeah, thanks anyways πŸ˜„

sullen spoke
#

Im attempting to use a dropdown list in a user input. I had the dropdown list working off a dynamic table and it worked fine, but since I wanted to do something different with the sheet I changed it to a custom dropdown, but now it wont call the values despite the keys being in order. Any advice?

#

When I roll the relevant skill it gives no response, but when I removed the dropdown list from the third pic it worked fine, so i know its the dropdown causing issues

sullen spoke
#

I decided to create the same dropdown list in the sheet proper incase an issue with the user input was the culprit. As you can see when it attempts to simply add the selection plus 1 it returns an error. staskill is the component key for the first line in the second pic, which returns "1" but doesn't complete the equation at the bottom

sullen spoke
#

How do you reference a checkbox thats contained within a dynamic table?

heavy elm
#

Good Morning, is it possible now to use an item inside of an item with Itemmodifiers? Which property is then modified, the item or the actor? How can I change a property of an actor with an item inside an item?

formal goblet
heavy elm
#

Okay, still awesome

formal goblet
dense pine
formal goblet
willow birch
#

Soo, I have a skills as items currently. But item displayers don't have checkboxes to track if they have been used. But they do have meters,
How would I write a reset script to turn all "meters" back to 0?

I can't even find how to reference them...

modern hemlock
#

You can use a label with a formula and HTML

#

For a read-only checkbox

willow birch
modern hemlock
#

You should be able to plug javascript into the formula with %{} %

#

And generate as many as you want

#

Tho they're all in the same column

#

Though I'm not sure why you need to have multiple checkboxes per item

willow birch
modern hemlock
#

Just make a label as part of the item displayer and write the html into it

#

Into the label text

#

You can also use custom css to style it

willow birch
#

That was so easy... Still unsure how to reset them though.

modern hemlock
#

When are you resetting them?

#

Just by hand?

willow birch
#

Although that's extra, it would be nice.

#

At long rests

#

I'd like to write a button that resets all of them

#

I just don't know how to reference them

modern hemlock
#

If you have a macro or something for long rests, you can hook it there, but I'm not sure the exact syntax to get to the checkboxes quite yet

#

Wait

#

They just represent the item value, so just set the used attribute on the item to true

#

Or false

#

Or whatever values you're using

#

It should redraw the table/row

ornate haven
#

Is it possible to pull data from a dynamic table to a macro? I have my damage rolls pulling from sameRow into a roll currently, but would like utilize a macro and foundry API to format the roll and catch things like when a damage die rolls a 10

#

I would just do the formatting adjustment within the roll macro, but I have to account for multiple d10's. If you are familiar, I am looking to format the way that pathfinder 2e highlights when a d20 roll is a 20 (indicating a critical)

willow birch
modern hemlock
#

macros can pull data from CSB actors/tokens, but idk how to do it for a dynamic table
here's a simple property getter

heavy elm
#

Is there a fix for the all items will be duplicated two times when duplicate any item?

heavy elm
#

4.3.1

dense pine
#

any idea what i con do when i get these errors?

formal goblet
dense pine
sullen spoke
storm stream
#

Hey peeps, a friend wants to collab on a system I have been working with, how do you suggest I set it up? Should I use git?

#

We're gonna create actors, items, etc

heavy elm
#

Is there a way to limit the amount of items an item displayer can hold?

modern hemlock
#

because item displayer doesn't hold items, it just shows what the actor has

heavy elm
modern hemlock
#

okay I don't know how items inside items work yet so I can't help any further

zenith rover
#

Is there a way to duplicate a component, such as a finished table, within the same sheet?

modern hemlock
trail lake
#

Is it possible to change the token status icons to have your own status icons and remove those you don't want?

modern hemlock
shy osprey
#

Trying to get Griddy (inventory management module) to work. I have troubles getting the items stacked there and browsing this Discord I found old messages that explained that item stacking in CSB is not possible yet. Is this still true?

modern hemlock
#

I mean... You can make an amount property and macros, but it's not supported natively

trail lake
shy osprey
#

@modern hemlock Thank you for the reply. Having extremely limited computer skills I never know if it is about lack of skill or stuff simply not being possible at all.πŸ˜…

elder raft
#

Is there a way to populate a dropdown with a list of character names? Even if it only pulls from a specific character folder?
Or is using a FetchFromActor-Target kinda the best way to pull a list of selections from another character sheet?

formal goblet
tawdry crag
#

I'm just getting started and I'm reading about Meters; I'm a little bit confused about the Value field. The documentation says if the gauge has the key it can be used in other formulas, but I'm not sure what exactly I'm supposed to put in there. Is that supposed to be its current numerical value or something else that I'm missing?

#

Also, I'd like to use checkboxes or radio buttons to have traits which can modify the Max value, for example, of my meters. Is that possible? I didn't see a way to have a checkbox recalculate other fields, and I'm not sure how to reference specific fields in my meters either

dire socket
#

Is there a way to change the color of meters

#

Like specifically, I'm not sure how css would interact with the component

formal goblet
# dense pine

I don't see CSB involved in there. When does the error appear?

formal goblet
formal goblet
formal goblet
sullen spoke
formal goblet
formal goblet
sullen spoke
formal goblet
sullen spoke
dense pine
sullen spoke
# sullen spoke label text

I found that the lookup function is working fine, for some reason CSB just doesn't like it when you use the lookup function within the creation of a value like I was doing

#

So I just created a place on the sheet to store the lookup function and called the value from it

feral owl
#

Heya, is there a way to copy a component. Just made a dropdown list with like 18 things in it which will be used elsewhere and really don't wanna have to type it all out again πŸ˜…

modern hemlock
#

You can draganddrop it somewhere else

#

Hold the handle at the top of the component

feral owl
#

Ahh keyboard stuff, luvly

#

Is there a big list of this in the documentation I'm missing?

formal goblet
#

I think it's mentioned somewhere at the top of the readme

#

Otherwise Readme and Wiki are the 2 big sources of CSB

feral owl
#

Righto, ty πŸ™‚

modern hemlock
feral owl
#

Hmm seems like the Ctrl doesn't work to put it in as a dynamic table field

#

Wait no that makes sense if the inputs are the dropdown but not the column itself

formal goblet
modern hemlock
#

That's neat, I didn't know that

#

Also, any way to make a panel / vertical layout with several input fields in a dynamic table row?

modern hemlock
#

Ah πŸ˜”

#

Well, static fields it is then, no table

high stag
#

is there any way to reroll the initiative every turn?

even modules aren't system agnostic.

modern hemlock
#

Any chance we can get the item duplication fix released within the next few days? I'd really appreciate that

#

I saw it's been fixed in a commit so shouldn't be too hard

brittle moth
modern hemlock
#

Damn... πŸ˜‚ πŸ₯³

storm stream
#

I have no idea how to go about this

formal goblet
modern hemlock
#

hmm, the fix doesn't seem to work πŸ€”

brittle moth
#

Insert "it works on my machine" excuse here

What are your steps ? can you provide a reproduction scenario ?
The issue that was pointed out originally was on item duplication : Right click on an item -> duplicate
This should be fixed, and should no longer cause issues.
But maybe your issue is something else

final mural
#

custom system builder just vanished from my foundry, i downloading it doesn't do anything
how do i fix it?

formal goblet
modern hemlock
#

by duplicating I mean this

#

and I have nothing in the console either, no errors

#

I'll try creating a new world and new templates and try there a little later

formal goblet
modern hemlock
modern hemlock
#

Oh, okay, now it works

#

I didn't think of that

modern hemlock
#

can you embed formulas inside rich text fields?

#

Cuz that would be nice for a DM to make spell descriptions and stuff

formal goblet
final mural
#

beta version installs normally so i have no idea what could be the problem

brittle moth
#

When you try to install the main version, what happens ? Can you find it in the system explorer ?

supple latch
#

I have a question-
I am trying to have an item holder where I can drag and drop an item with their own dice rolls.
does anyone has an idea of how to go about it? I saw some youtube videos, but none that i watched actually covered this aspect
i can call out labels, but not rolls.

modern hemlock
#

I have items with user defined roll macros

#

And the 2 first rolls show up in the displayer

supple latch
#

that would be great for me to take a look and see if i can reproduce something close to my needs

modern hemlock
#

Yeah, if you can remind me in about 16 hours that would be great, I've just turned my pc off for the day

#

I can send you the entire thing

bronze moon
#

is it possible to add an image box?

modern hemlock
bronze moon
#

but no simple options

modern hemlock
#

I don't think there are any simple options

modern hemlock
#

You can use {item.roll1macro} to call it from the item displayer label that is also styled as a button

supple latch
#

i thought i needed a label/key to call it
but i didnt know exactly how

#

those are, like, actual macros then?
i see i see...

modern hemlock
#

No, I only use a macro to define the rolls behavior

#

You can use a formula/script formula to do everything else

#

And you could use it to define the roll too, I just wanted it to be extra flexible

bronze moon
#

ok I have a quick question... ${%{
linkedEntity.templateSystem.roll('item_roll', {postMessage: true});
}%}$

#

Why is this rolling twice with an error "roll" then a normal one"

supple latch
modern hemlock
#

You can put javascript into a formula

#

And call a macro or something that uses stuff that's not available in math.js (the math library used for normal formulas)

#

Also, you got some nice art on your deviantart page!

supple latch
formal goblet
bronze moon
normal ore
formal goblet
supple latch
#

Let me give it a try and see if I can make it work

trail lake
#

If I update the Custom System Builder to the new version, will it effect what i have already designed?

formal goblet
trail lake
#

4.2.0

formal goblet
#

It shouldn't effect anything. But backups are always advised

trail lake
#

Ok. I can just keep the version I have. What benefits from updating?

fringe silo
#

how whould one do a d100 roll where a success is <= targetnumber

#

${d100cs<=:tarnumnum:}$ is what i have right now and in getting an error

fringe silo
#

${[d100cs<=:tarnumnum:]}$ is now working but id like it to show me the rolled number and weather it is a success or not its showing a 1 for success 0 for no success but not showing the roll

oblique willow
#

How do I change the message type of a label message? For it to be self, blind, to GM etc?

fringe silo
#

under advanced config for the field

modern hemlock
oblique willow
supple latch
supple latch
#

ah, i did it!

fringe silo
#

somethinf like minimum role to see

modern hemlock
#

they should work together

supple latch
#

yes yes, i imported it
now i am trying to figure out how to make the roll work
gives me an error

modern hemlock
#

ah I need the macro

#

(it's for items that cover multiple slots and preventing multiple of the same slot from being equipped)

supple latch
# modern hemlock name this `item_equipper`

stares at screen
...and this is why the common folk shouldt try to do whatever witchcraft you all are on about
i have no clue of what this all is or how it works
but we press on!

i created a script macro, copy and pasted the text and named it item_equipper
was thats what i was supposed to do, yes?

modern hemlock
#

yeah

#

that should be enough

#

(this is purely some automatic rule enforcing for item equipping, nothing else)

supple latch
modern hemlock
#

hold on Im gonna change it and tell you what to do

#

hmm, actually, I don't know how to evaluate a formula from an external place πŸ€”

#

cuz I'm pretty sure something like ${${item.formula}$}$ wouldn't work

supple latch
#

oh-

modern hemlock
#

(I'm intending on calling macros with it so eval with JS works fine for me)

supple latch
#

shoot i think i pinged them, forgot to hit the button to not to

modern hemlock
#

hmm, or maybe you can do that πŸ€”

supple latch
#

apologies, but thank you very much for your help

modern hemlock
#

hmm, you gotta change these then, and put ${${item.roll_1_macro}$}$ (and roll_2_macro for the other) I think

#

okay that works

#

but inside the item, put [1d10] instead of ${[1d10]}$ if you do
and enable roll msg to chat option

formal goblet
#

Should be ${${!key}$}$ to be fair if in a Label Roll Message

modern hemlock
#

what does ! do? (I suspect it's not the NOT operator)

formal goblet
#

It removes the <span>-wrapper around the result in the Chat Message, otherwise you'll get issues reparsing it.

modern hemlock
#

also, any way to do something like this in a roll message? (including with JS/macros)

#

fancy message visuals

formal goblet
#

It's all HTML, so sure. But don't ask me, how to style it this way πŸ˜…

modern hemlock
#

Ah, gotcha

#

I'll be able to figure it out, just needed something to latch onto

supple latch
#

I am doing something wrong...

formal goblet
modern hemlock
#

yeah, not label text

supple latch
#

It shows!
but it doesnt roll

modern hemlock
#

try removing the outer ${}$ from the roll definition inside the item

supple latch
#

HAHAHAHA
It rolled!
An error XD

dusky mauve
dusky mauve
modern hemlock
#

Lol, my VSCode just crapped itself trying to update

supple latch
# supple latch let me try

though, if i enable roll msg to chat can i still call out things like 'strenght' and 'endurance' keys?

modern hemlock
#

it deleted the entire folder without pasting the update I guess

modern hemlock
supple latch
#

gosh darn it english

modern hemlock
#

yep, I didn't know that at one point too

supple latch
#

hm, it really doesnt want to roll
i tried a fell different ways to type it in the rich text
but it refused and called my mother names
very rude

supple latch
#

nothing pops up when i roll i think

formal goblet
supple latch
#

weapon_type_roll

#

and it is what i am calling

modern hemlock
#

add another ${}$ in the actor

formal goblet
modern hemlock
#

and yeah, where's the roll content

formal goblet
#

Nvm, that's the template

formal goblet
#

Try out ${consoleLog(item)}$ in the Label Roll Message

modern hemlock
#

there's a formula for console.log? πŸ‘€

supple latch
#

ok, let me try

formal goblet
supple latch
#

another error
i am probably just doing some important, simple thing wrong

formal goblet
#

And watch the console

supple latch
#

nothing popped in there

formal goblet
supple latch
#

i did?
i F5 now and them because sometimes the changes dont seem to go through

#

how the hell can you even tell wtf

formal goblet
#

Our last resort would be %{console.error(entity.entity)}%. If this doesn't show up, then the changes didn't apply.

fringe silo
#

${
$[[/roll 1d100]] >= 95 ? "❌ Failure (Auto-Fail)" :
$[[/roll 1d100]] > targetKey ? "❌ Failure" :
(rankKey == "gold" || rankKey == "diamond" || rankKey == "transcendent") ?
βœ… Success (Degree [[ 1 + floor((targetKey - $[[/roll 1d100]]) / 10)]]) :
(rankKey == "silver" && $[[/roll 1d100]] <= 4) ?
🎯 Critical Success! (Degree [[ 4 + floor((targetKey - $[[/roll 1d100]]) / 10)]]) :
(rankKey != "silver" && $[[/roll 1d100]] <= 10) ?
🎯 Critical Success! (Degree [[ 4 + floor((targetKey - $[[/roll 1d100]]) / 10)]]) :
`βœ… Success (Degree [[ 1 + floor((targetKey - $[[/roll 1d100]]) / 10)]]), this is the basic roll formula im looking to get to work in csb, what would i have to change?

#

keys changed for simplicity cause they will be diffent for a few rolls

formal goblet
supple latch
#

shruuuuuuuugs
i will just play around and find out now
surely there is something funky going on

#

oh, i got a new error at least

fringe silo
#

@formal goblet ill give it a go when i get back to the house

formal goblet
supple latch
#

i did it though...

#

i tried a few more things in the item text field too, but the results are the same
refreshed the page as well

#

oh well
i think thats enough head hammering for today
thank you very much for you all's help

frosty charm
#

Hello, im new at CSB, trying to create basic healing macro
What's wrong with this syntax?

${setPropertyInEntity('self', 'HP_Current', "HP_Current + [1d6]"}$

HP_Current is a number field with number like 5 and max number like 999

modern hemlock
rain glen
#

@formal goblet im trying to make a simple inventory where i can display the item and its description in the chat. So far i have an itemdisplay, items and the label. How would i go about making my idea work?

formal goblet
frosty charm
# formal goblet There's nothing wrong with it

This is a console log after using macro, maybe it will help

foundry-esm.js:4621 Error: You are accessing ChatMessage#user which has been migrated to ChatMessage#author
Deprecated since Version 12
Backwards-compatible support will be removed in Version 14
at logCompatibilityWarning (foundry-esm.js:4609:19)
at ChatMessage._logDataFieldMigration (foundry-esm.js:12119:14)
at get user (foundry-esm.js:14117:24)
at checkChatMessage$1 (aa-chatmessage.js:11:13)
at Object.fn (aa-chatmessage.js:7:51)
at #call (foundry.js:632:20)
at Hooks.callAll (foundry.js:589:17)
at foundry-esm.js:56440:17
at foundry-esm.js:56445:43
at Array.map (<anonymous>)
at #handleCreateDocuments (foundry-esm.js:56445:33)

formal goblet
frosty charm
oblique willow
#

I just wanted to know if there was a way to self-post the message or blind do it to the gm

formal goblet
oblique willow
#

Like how you can use

ChatMessage.applyRollMode(message, mode);
modern hemlock
#

Surely there's a better way of doing this, right...? (values pulled from a dynamic table)

#

62 modifiers for 31 stats (flat + percent)

formal goblet
oblique willow
#

Which doesn't affect roll messages, sadly.
So I'll add it to my wishlist of features πŸ˜„

formal goblet
#

You might need to set it in the settings, but that should be possible

oblique willow
#

is that "Expand Roll Visibility to whole Chat Messages"?

rapid hare
#

Hello, I return with a simple issue: I wish to make a button appear when a specific combination of two dropdown lists is chosen (WeaponClass == 7 and Status == 2). Either this, or a dropdown list and a checkbox. Is there a way to do that?

formal goblet
rapid hare
#

And here I tried to experiment with ? and : , thank you!

modern hemlock
sonic marsh
#

I'm looking for help with setting initiative. We are using a variant initiative system where initiative is rolled per character and can be rolled in one of 3 ways: normal, fast or slow. Normal initiative is 1d20+Dexterity modifier; Fast initiative is 1d20+Dexterity modifier+10; Slow initiative is 1d20+Dexterity modifier-10.

#

Is there a way to add buttons on the character sheet to allow it set initiative in different ways?

modern hemlock
#

Any way I can (with a JS macro) group items embedded in actors by the sidebar item they were created from, or do I have to give them a separate id property? (for automatic combining of separate documents (that have amount property) into stacks)

formal goblet
#

Or you merge by name

modern hemlock
dense pine
#

Inside an item displayer i would like to check if a text field in my item has text and if yes i want to display it. If this field is empty i dont want to display anything.
Whats the correct formula for this?

${item.waffe_DESC2 != ' ' ? concat(string(item.waffe_DESC2)) : ' ' }$

#

throws an error (Cannot convert xyz to a number

dense pine
#

${item.waffe_DESC2 != '' ? string(item.waffe_DESC2) : ''}$

#

same error

#

${item.waffe_DESC2 != '' ? item.waffe_DESC2 : ''}$

#

same error

modern hemlock
#

it'll show the element if it evaluates to true

dense pine
fringe silo
#

so i need to ref a drop down in a label formula, what i have so far is Power Target: ref (dropdownkey, key (which is a number)), its just giving me the formula instead of the value on the sheet, how do i make it give the value what am i doing wrong

#

nvm got it to work another way

modern hemlock
#

Is there a function/something to update the specified item from its template (using a JS macro)?
I want to update all items attached to an actor when the GM clicks a button on that actor's sheet

#

basically a way to call this button's listener via JS

frosty charm
#

Is there's a way to use JB2A Animation in CSB?

vagrant hollow
fringe silo
#

can items effect number fields, like a talent which is a kind of item that can effect a number field that is used to calculate hitpoints, like stone body that would give 1 armor and 10 max hit points

vagrant hollow
twin goblet
#

I'm asking for your help, because I've been trying to solve the code for the two rolls below for a day and a half, but it doesn't work πŸ€”

the first roll is on the character sheet, and it works fine.

it compares the roll with the Skill_value1 Key, and also displays it in the Chat window.
${[1d100cs<=:Skill_value1:]}$ #Skill Check

my problem with this is that the result is a not very informative 0 or 1 - and depending on the result, it would be good if it would print Success or Failure.

The second macro:

Here the result was formatted successfully, and the roll is running in its current state. The problem is that the difficulty level is written in it - and it would be good if it used the value of the key: Skill_value1 from the character sheet of the selected character.

I think that's why it needs to be started with a check:
let actor = game.user.character || canvas.tokens.controlled[0]?.actor;
if (actor) {
console.log(actor.getRollData());}
else {
ui.notifications.warn("Please select a character!");
}

then using the Uuid of the character sheet template (Actor.UN6TYJNxbKCmghKg) need to retrieve the value of the Skill_value1 key and compare it with the result of the roll. I couldn't solve this with this macro.

I hope you can help!

candid badger
#

can an item added to an item template modify it?
...or can items modify items at all?

zinc verge
#

hey, so I'm trying to create a Short Rest button for my game, but I'm finding that when the button puts the current HP and Energy over their maximum values, it won't correct the issue until the button is pressed again.

The formula I'm using is as follows. Is there some way to make it say, "if this formula resolving puts the values over their maximums, set them to their maximums"? As it stands it only corrects if the values were already over their maximums when the button was pressed.

hollow crow
#

Evening Guys! Just updated to 4.3.2 and my Attribute Bars don't seem to work anymore. They cant read the component key reference, only the numbers directly. E.g., i have my current health points in a number field (component key "custom_hp") and my maximum health points in a label (component key "max_hp"). I put these two components respectively in the "Value" and "Maximum" fields of the Attribute Bar Editor, and named 'HP' the bar in the "Name" field (which is a simple string to identify the bar). However the fields of the attribute bar won't populate, as shown in image. If i put in those fields simple numbers (e.g. 182 in the value field and 200 in the maximum field), the bar shows up, but i need it to change dinamically as the field on the character's sheet. Any ideas why is this?

ornate junco
#

Quick question. What formula should be used to find the durability of an amor piece (item) and apply it to a number field either in a Table or Dynamic table.

#

Would it be find or?

ornate junco
#

Please ping me when someone can answer. Thanks. :)

formal goblet
formal goblet
formal goblet
formal goblet
formal goblet
formal goblet
ornate junco
#

I wanted to provide more context to my original question: #1037072885044477962 message

I am trying to take the durability of the listed armor items shown in the image and apply them to the other table. For example, taking the helmet durability and putting into the total armor.

ornate junco
#

I didn't know if there was a new way with the system's updates to fetch the durability number from the column and apply it to the number field.

#

For reference on how my players are equipping armor currently.

formal goblet
#

Why not just an equipped-property in the Item itself?

ornate junco
formal goblet
#

I see, and for what do you need the Table?

ornate junco
formal goblet
#

I see, you have zone hitpoints

ornate junco
#

I do indeed.

#

My players enjoy having a more "complex" system for rp purposes.

#

I have a majority that like to do medical based roleplay within my campaigns, which leads to the zone hitpoints coming into play.

ornate junco
# formal goblet I see, you have zone hitpoints

My thought process behind the formula I’m trying to create is as follows: If an item is equipped, its value is pulled from the item container and applied to the total armor value.

For example, if a Cloth Helmet is equipped and has an armor value of 10, that value is retrieved from the item container and transferred to my Combat Table, where it is applied to the corresponding fieldβ€”Helmet’s Total Armor.

#

Not sure if that explanation helps.

hollow crow
ornate junco
#

Ping me whenever you get the chance to answer Martin. Thanks for the help as always.

zinc verge
formal goblet
ornate junco
formal goblet
ornate junco
#

I can always make it a Dynamic table if needed.

formal goblet
ornate junco
#

Its pulled from a seperate section in the sheet.

#

Its in my GM/DM section.

formal goblet
#

But these are different per zone, so they're not equal.

#

And your value in your Number Field won't update automatically. You can try that out.

ornate junco
#

So pull from the item and feed it into a label is what I'm gathering, correct?

formal goblet
#

I'd use a Dynamic Table to reduce redundancy, but that's your choice at the end

#

If Dynamic Table, then I'd create an additional (maybe hidden) column to reflect the percentage of the total HP for each zone.

#

And then I'd use fetchFromParent("lookupRef('dynamicTableKey', 'armor', 'Body_Part', '${Body_Part}$')") in the Key of the modifier to select the right Label.

ornate junco
formal goblet
ornate junco
formal goblet
#

Your Armor Items should have a Dropdown to allow the selection, to which body part they apply. This way, we can select the right row to modify later.

ornate junco
#

Can I default that value per item just to make it easier?

formal goblet
ornate junco
# formal goblet Dropdowns can have default values, yeah.

Perfect. Would I be able to feed the label value of Total Armor into just a number field for armor? (I'm assuming no.)

Is it possible to pull the number field value within the item itself into another number field within the sheet?

formal goblet
ornate junco
#

I was just trying to think of a way for a repair button. That will pull from the total armor equipped and place that number within the number field that the players use.

#

I'll work on this more tomorrow and poke your brain again if needed. Thanks Martin.

formal goblet
#

A repair button would be something different, because you'd use a Label Roll Message for that. And these allow you to override the current value of any Input Component

ornate junco
formal goblet
#

Sure, read through setPropertyInEntity() and setValue()

ornate junco
#

Oh interesting.

#

See I have something like that going on now with the labels I showed you prior.

#

But that was to equip the armor pieces originally.

formal goblet
#

You'll run into consistency issues if your players decide not to use your button to equip an Armor Item.

ornate junco
fringe silo
#

how would you, ref a drp down in a roll formula that would decide on which skill to use for that roll,

#

what i have fpr one of my rolls is

#

${#?{tarnumnummod:'Roll Modifier'[number]|0}}$
${#tarnumnum:=sum(powrankpc,powscorepc*2,comskilldd_unarmed)}$
<table>
<th>Roll Results</th>
<tr><td>Target Number:</td><td>${!rolltar:= min((tarnumnum + tarnumnummod),95)}$</td></tr>
<tr><td>Roll:</td><td> ${roll:=[1d100]}$</td></tr>
<tr><td>${#degsuc:= roll <= 5 ? 4 + floor((rolltar - roll)/15) : roll <= rolltar ? 1 + floor((rolltar - roll)/15) : 0}$</td><td>${!roll <= 5 ? "Critical Success!" : ' '}$</td></tr>
<tr></tr>
<tr><td>Result:</td><td> ${roll <= rolltar ? concat(degsuc, " Degrees of Success!") : 'Abject Failure'}$</td></tr>
<tr>${#setPropertyInEntity('self', 'lastDOS', 'degsuc')}$
<tr></tr> <tr><td>Base Damage:</td><td>${!basedam:=item.damagedrop}$</td></tr>
<tr><td>Total Damage:</td><td>${!(basedam * degsuc)}$ ${!item.damagetypedrop}$ ${!item.damagetypedrop2 ? concat("and ", 'item.damagetypedrop2') : ' '}$ damage</td>

#

where would i add a drop down chk to this to decide on weather to use this which is unarmed skill or one lets say set up for melee, ranged or casting

formal goblet
sinful spade
#

hey martin

#

long time no see

#

im working on a character creation process within the sheet, but am having difficulty figuring out how to make buttons that give players items (e.g. choose race), and update fields elsewhere in the sheet.
So entering your characters height in the creator updates it elsewhere in the sheet.

#

Any suggestions?

formal goblet
sinful spade
#

not creating a new item but adding it to a character sheet, does that make a difference?

formal goblet
sinful spade
#

i see... πŸ€”
i checked the FAQ for a prewritten give player script but there isn't one.
I'll see if GPT can help write one

formal goblet
#

Look for createEmbeddedDocuments() or something similar.

austere lantern
#

I've been trying to get some rollable stats for a system. The problem is the way the system works the GM sets the difficulty of the roll and then the player compares the character stat to the roll then depending on the difference that tells them what dice to roll. As an example if the stat is = to difficulty of the check, the player would roll 2d8, if the stat is 1 higher than the difficulty then they roll 1d8+1d10, if its 1 lower then they roll 1d8+1d6. The system can go all the way up to 2d12 and all the way down to 2d4. I was orignally trying to make a dynamic table to do something like a find function where the filter was (CharacterStat - CheckDifficulty) to pull the result from the coresponding row. However, I kept getting the reading '0' undefined error. Even trying to pull the stat number via component key gives me that error. I'm at a loss as to what I'm doing wrong. I'll try posting some of the things I've tried tomorrow, but help would be appreciated if anybody could help me with this.

sinful spade
sinful spade
#

you good @clever patio ?

clever patio
#

Sorry if I disupt the chain. Does the "dynamic table" mentioned in dropdown is the same "dynamic table" in Component library? Coz I am a bit confused and don't know how to put a salection from a dropdown list into a formula.

sinful spade
#

I think I also used this function for reputation levels, as well as selecting what skill / attribute a player is using to attack with given a weapon

clever patio
#

I see. My idea is something like: Selecting skill + attribute + weapon.

#

So I have made a few dropdown lists form players for their attack.

sinful spade
#

you can do it that way, though i made the attack a part of the weapon itself, and the selection of skill and ability as well

clever patio
#

Sorry for my bad wording, I was referring to damage. My idea is that the damage is base on the Magic class and the Gem a PC is holding, it create a multiply factor (listed in the photo) and multiply to the attribute. So I am thinking about making a formula that will involve three dropdown list (Magic class, Gem, attribute).

sinful spade
#

are the gem and class static?

clever patio
sinful spade
# clever patio Yes,

I see, in that case I'd make a dynmaic table, reference the column and row to a label outside the table and reference the label whenever i needed that information

clever patio
sinful spade
#

i mean as long as it's not every roll for example then i'd do the same thing

#

if it's something that happens on occasion you'd just need to change the items and the label should update.

#

and by items i mean however you're telling the system to check what column and row, dropdowns, radio buttons, whatever.

#

if it's frequent then i'd have a dialog prompt asking for that information each roll

clever patio
#

Thanks! I will try to make it then.

sinful spade
#

Over 12 hours of work getting these buttons to work so far, but I feel like we needed a win in the chat

#

havent really done much of the css yet - and i need more input fields but. so far so good ^^

fringe silo
#

im running into a problem with items, so with equipment items id like the modifiers they give to only be active when equiped right now they do the adjustments when not equiped an just in the inventory page how can i fix this

waxen thorn
#

Hello Community. I'm strugling with an item-modifier. The modifier should increase a label-value in a dynamic-table in the actor which holds the item. i tried lookupref in the keyfield but it doesnt work. if i enter the datapath in keyfield it does work. if i use a hidden attribute in the actor to check if the lookupref works it does. the lookupRef would be lookupRef('TBL_Basic_Skills','Basic_Skill_Value','Basic_Skill_Name','Sneak'). Im realy clueless how to get it to work as intended. Maybe someone can point me in the right direction. Thanks!

formal goblet
formal goblet
marble mural
#

Is there a way to add a label button to a sheet that will activate a macro?

#

Hmmm...I think I figured out how to do it.

waxen thorn
candid badger
#

can an item added to an item template modify it?
...or can items modify items at all?

formal goblet
normal ore
#

@formal goblet, is there a way to do something similar in the new version?
I tried it this way, but it didn’t work!

candid badger
formal goblet
normal ore
#

thank you!

ionic wing
#

Hi ! Do someone know how I can send an actor ID to a macro in CSB? I talk about the _id field in the json of the actor. Here is the code i'm trying to run, I wrote HERE where I want the actor id to be added
%{return await game.macros.getName('JetCaractΓ©ristique').execute({actorId: 'HERE'})}%

Thanks !

ionic wing
#

Thanks πŸ™‚

calm fable
#

Any idea why if I use $ {label}$ with label being the component key of a Label element gives me an error?

formal goblet
calm fable
#

Uncaught (in promise) Error: undefined. Uncomputable token "magmagialab"

#

magmagialab being the component key

formal goblet
#

Do you have uncomputed props-warnings?

calm fable
#

like this?
Error: Failed data preparation for Actor.hrwYKCEiNaitDuIt. Invalid left-hand side expression in prefix operation

#

ah yes, I just saw what you said

formal goblet
formal goblet
#

If you have a dependency chain, then you have to go down the whole chain until you find the root cause

calm fable
#

I don't see the relationship in this case

#

I'm trying in a new world just in case

ornate junco
#

@formal goblet Hey, I wanted to follow up from our conversation from a day or two ago. I decided to stick with a regular table after getting some feedback from my players.

I am changing my "Total Armor" number fields to labels to pull in the total value of the durability per armor piece.

However, I am a little confused on how to use the find and setPropertyEntity in this case. I am trying to find the durablity value of an armor piece that is equipped, has the name helmet in it, and then apply that durablity number to the label in the table.

How exactly would I be combing these formulas to do so? Are they going to be separate formulas in different places?

I'll provide pictures as well for reference.

formal goblet
# ornate junco <@199124934880919552> Hey, I wanted to follow up from our conversation from a da...

You don't need setPropertyInEntity() if the goal is to automatically adjust a Label, simply find() in the Label will suffice. HOWEVER, looking for something, that contains a certain text, is something, that can't be accomplished with find(). And also, searching with multiple criteria is also not doable with find() (but can be done with alookup(), but suffers the same issue with the contains). It would be the best, if your Items would contain a Dropdown, which selects the Zone for which the Armor should apply and you reflect that in the Item Displayer. This way, we can use alookup() and sum() or first() (If you want to allow stacking or not).

ornate junco
formal goblet
ornate junco
formal goblet
#

Ah, yeah. It only depends on the filter

ornate junco
#

I'll add the dropdown in and get back to you.

#

Thank you.

ornate junco
feral owl
#

πŸ‘πŸ‘Ž Are if statements in label roll functions nest-able?

#

(Or do I have to go mingle with macros?)

feral owl
#

Cool ty I’ll just be getting some of the logic wrong then

flat hazel
#

Monk Enchanted Journal adds currency to an actor but I can't write it out ,
Does anyone know how to output a number from an attribute in the currency folder, currency.BI to display the amount of currency the character currently has or some alternative? ,
My attempts only gave only NaN or Error results , maybe am stupid or something or this module don t work great with CSB .

formal goblet
flat hazel
#

How do i check that to be sure , I don t get a wrong one ?

formal goblet
flat hazel
#

Wait my friend gonna send this

final mural
flat hazel
#

I think this currency is not stored in the props but only in the currency(folder) in the actor , or maybe am stupid enough.

#

thats, interesting

formal goblet
final mural
#

fair enough

#

what to look for so i can help narrow it down?

formal goblet
#

But I can tell, that the folder-prop at the top doesn't come from Foundry or CSB.

formal goblet
flat hazel
#

em I found it

#

thats it

#

XD

formal goblet
#

You should have access to it with %{return entity.system.currency;}%

flat hazel
#

Man i love you 😭 it works

candid badger
#

I have a label component that is a die (e.g. 1d4, 1d6, etc.) I want to roll that die by clicking on the label, but all I get in the chat message is the die (e.g. 1d4, 1d6, etc.) but not the result of the roll which is what I am aiming for. How would you type that formula?

formal goblet
candid badger
sinful spade
#

Does anyone know why using
${[1d6]+9}$ as a defualt number doesn't work?

#

it comes back as not a number

sturdy mesa
#

Does anyone know a macro to reload all item template inside a compendium?

ruby frigate
#

Hi does anyone know if there is a way to move item between actors without duplicating them?

ruby frigate
formal goblet
waxen thorn
#

Hello again. Is it possible to trigger an individual userinput inside a rollmessage only if a certain condition is met eg ${equaltext(Skill,'Sneak')?<call userinput>:<do smthing else>}$

sinful spade
sinful spade
silver lake
#

Can someone tell me what's wrong with this:

${?{Oddity:'Oddity?'|"${!fetchFromDynamicTable('OddityTable', 'CSpheres').join('"|"')}$"}}$
#

It's part of a roll macro in the sheet. It's meant to create a dropdown in a roll prompt window, which will later be used to lower the CSpheres value from the referenced dynamic table.

#

Later in the roll that is

#

I'm on version 3.0.0

#

It just gives me an ERROR in a text box instead.

#

The name of the Table is 'OddityTable', the name of the numberfield to be modified is 'CSpheres'

candid badger
#

Hello
I have an item displayer on an equippable item, but when I try to display the item in that container on the character sheet it is showing up as [object Object]. Is there a special syntax needed to get these to show up?

normal ore
#

Hey everyone! Hope you're doing well.

I'm facing an issue and would love to hear any suggestions.

I have attribute bars set as numeric values in CSB, which allows me to modify them using the setValues formula. This works fine for direct adjustments.

However, some of my items need to increase HP or MP by a specific percentage, such as 10% of HP or 10% of MP. The issue is that these attributes (HP and MP) are set as numeric fields in CSB, rather than labels.

Because of this, I'm unable to apply the percentage-based modification correctly. Has anyone dealt with this before or have any suggestions on how to fix it?

austere lantern
sinful spade
austere lantern
#

yeah. also here is a look at how one of the stats is on the sheet, I want to make sure that the way I have it setup won't cause problems

#

The system uses a progression sheet so I have a bunch of checkboxes that you click when spending exp to buy the stat. I have those added together on the stat lable.

#

since it's a boolean value and goes from 0 to 1 when checked it seems to work to add them all together, but I can't help but think I might be doing something janky.

austere lantern
#

So would I use something like the find function or would I use lookup for the dynamic table?

#

I cannibalized the popup example, but I think I got the first part right.

#

ok, I'm just trying to get the a number that is the checkdifficulty - statchoice number just to test it and nothing prints.

${#Roll(
?{checkdifficulty: "Check Difficulty"[number]},
?{statchoice:'Which Stat'|"MEstat","Mind"|"BEstat","Body"|"CEstat","Community"}
)[(:checkdifficulty: - :statchoice:)]}$
#

where am I going wrong?

austere lantern
#

actually I can't even get it to print a stat number to chat. In the roll message I just tried

${BEstat}$

and it won't print that stat to the chat. Am I doing it wrong?

jaunty rock
#

Is there a way to make an inventory similar to the 5e sheet (attached)? It seems the item displayer only displays items with a way to edit stats by clicking on the item itself, but I'd like to have a number field on the same row as the item so players can edit the item count on their sheet. I don't want something where players input items in themselves, I want the ability to drop items onto the sheet to add them.

If it's not possible with the current tools, is there a module that could help me achieve this? Thanks!

jaunty rock
sullen spoke
#

Is there any way to apply a penalty to all rolls without having to edit each roll formula on the sheet?

waxen thorn
brave trench
#

I'm not sure how to word this question so I'll give context. In regards to an actor with a bow (item on an actor) with various arrows (items on items). Is it possible to have the various arrow options show on the actor sheet? Or am I limited to opening the bow item then rolling the attack/dmg dice from the list of arrows there?

sullen spoke
heavy elm
#

Hey, when I try to drop an item from an actor to my itemfolders I get an error.

#

Whats this and how to fix? I dropped an Item on an actor and want to drop it back to my folders because I delelted it there

waxen thorn
heavy elm
#

I really need that item as blueprint, It contains alot of work...

waxen thorn
heavy elm
#

I'll try

heavy elm
#

It worked πŸ˜„

#

Thank you, you saved me alot of time

waxen thorn
heavy elm
#

Still I dont understand why the whole thing changed the way it worked. I had no trouble before moving items around.

bleak wyvern
#

Heya, looking for some help with the Custom System Builder... been trying to figure out how to make a button to roll attack/damage dice, and other things like that, any helpful answers? πŸ˜…

mortal flower
#

Someone can help me? I wanna make an item rollable just by clicking in the name in an item holder, this is possible?

coral hemlock
# mortal flower Someone can help me? I wanna make an item rollable just by clicking in the name ...

Yes. Use a Label with a roll value. Label text is the name of the field. Label roll message is where you put the roll expression. Or do you mean an item in an item container? In which case I don't think it's possible from the name as clicking it opens the item. However in item template you create a label (for example rollLabel) use icon only and include the roll expression, then in the item container add a column with a label with the label text pointing to the item roll label. ${item.rollLabel}$ this would then be a clickable icon next to the name of the item, The colums can be moved so the icon could be before the name

coral hemlock
sinful spade
#

In mine i've referenced damage values and exported them to a button that rolls that quanitity of dice and relevant modifiers.
I'd be pretty confidident in making buttons that increase ore decrease a quantity value being possible πŸ€”

sinful spade
sinful spade
#

within my items i check if the player wants to use an attribute or ability (skill), and which of each to roll with using a radio button and dropdown combo

sinful spade
# mortal flower Someone can help me? I wanna make an item rollable just by clicking in the name ...

erm, not necessarily the name? but I've made dice buttons appear next to items with an attack feature that can be clicked, see the image I attached responding to Lavaman.
I suppose using css you could disable the pointer-event that would open the item info and make the button span the entire width... though then you'd be also making a button to open the item info, which wouldn't be too bad but eh.

sinful spade
bleak wyvern
bleak wyvern
#

like I used a table, not dynamic table just regular table, and am putting skills that include attribute scores, ranks, and other bonuses...

sinful spade
bleak wyvern
#

yeah, like later wanna do the same for attacks but rn just figuring out the rolls for skills

sinful spade
#

is it a dice pool? or a d20+mod system?

bleak wyvern
#

rn just using the custom system builder... didn't add other mods or systems

sinful spade
#

nono i mean like

#

what value are you referencing? the quanity of dice? the face of the dice (d4, d6, d8...), or a modifier like say D&D where it's diceroll + strength modifier

bleak wyvern
#

like adding strength mod yeeeee

sinful spade
#

to a flat d20 yes?

bleak wyvern
#

ummm yes the skills of this are all flat d20

#

then it would be plus mod, plus rank, and plus bonus, ill put picture reference

sinful spade
#

${[1d20]+ref('Strength')}$

#

erm is the bonus already on the character sheet or do you need to prompt to ask for it?

bleak wyvern
#

have yet to have players make characters so number is not decided if thats what ur asking πŸ‘€

sinful spade
#

so if you want to ask as a popup at the time of roll:
${#?{bonus[number]}}$
Rolling ${roll:=[1d20]}$
<br><br>
Result : ${roll + ref('Strength') + bonus}$

#

idk what your rank system is but same concepts apply

bleak wyvern
#

but is that to the point that it will auto update if any of the numbers (rank, mod, bonus) were to change? πŸ‘€

bleak wyvern
# bleak wyvern

like refering my screenshot there is button in bottom right, can it be set up to whatever the values are in the 3 surrounding areas will auto be put in? if that makes sense πŸ˜…

sinful spade
#

it actively asks for the bonus that the user inputs at the time of roll, and gets the strength value at the time of roll from the character sheet. No value is pre-defined before the roll

#

i mean you can 'get' the roll stat referenced in the dropdown.

bleak wyvern
#

it doesn't seem to be working...... πŸ₯²

#

like it gave prompt for bonus and thats nice... but how to have it actually roll... cuz it didnt roll

sinful spade
#

change it to be your strength value

bleak wyvern
sinful spade
#

what even? lol what is the dropdown mod?

#

what is the value?

bleak wyvern
#

I do apologize πŸ˜… πŸ˜‚ I am new to foundry as it is so I may not be doing things correctly, but like the value for example would be 12, thus making the mod +1
I made it dropdown cuz its all I could figure out to do... πŸ‘‰ πŸ‘ˆ ... πŸ˜‚ 😭

sinful spade
#

ehh? so is the dropdown selection values +1 +2 +3...?

bleak wyvern
#

essentially, its not automated either, just manually done cuz I didnt know how to make it automated based on the value πŸ₯²

sinful spade
#

i mean how is it caluclated?

bleak wyvern
sinful spade
#

πŸ‘

bleak wyvern
#

so 10/11 is a mod of zero...... every two up or down in value equates to (+/-)1 mod
so like 9 and 8 value is both -1 mod

sinful spade
#

so dnd 5e?

bleak wyvern
#

and so on......

#

I suppose so yeeeeee

sinful spade
#

this, right?

bleak wyvern
#

yup pretty much πŸ˜‚

sinful spade
#

er,
%{floor(${(ref('Value')}$-10)/2)}%

bleak wyvern
#

where do I plug that in???

sinful spade
#

hold onthere's an erro with that

#

im trying to find it

bleak wyvern
#

gotcha

sinful spade
#

ok apparently referencing math JS isn't showing me love but doing it through CSB is fine

sinful spade
#

put that in label text, replacing the dropdown by strength

#

change Strength to the component key of strength's value number field

bleak wyvern
#

😱 ITS WORKING!!!!!!!!!

#

lemme try that with the rest to make sure I got it down real quick...

#

I Understand how it works... thank you so much it looks so much nicer!!! 🀩

sinful spade
#

all good.

#

so you still need your attack button?

bleak wyvern
sinful spade
#

what is rank and how does it factor in?

bleak wyvern
#

so rank is depending on lvl of characters... it can be manually entered in so thats not my current concern... just on the number in the rank text to be auto added to the roll

#

cuz the skills go up by one every 2 levels automatically, but when favored go up every level(+3) so at lvl 1, unfavored is rank 1, favored is rank 4

#

again not that it matters much but just thought I'd answer the question πŸ˜‚

sinful spade
#

right but how does that impact your roll

#

a level 1 'atheletics' check vs a level 2 for example

bleak wyvern
#

just adding it to the roll, just like the mod is being added to the roll

#

so if it rank 4, then its a +4 to the roll, straight forward : D

sinful spade
#

you still want the bonus popup? or you wanna grab it from the numberfield you have

bleak wyvern
#

if it can be grabbed from the number entered in the bonus field that would be great yes πŸ‘€

sinful spade
#
${ref('skillSelect') == 1 ? [1d20]+ref('Strength')+ref('rankValue') : ref('skillSelect') == 2 ? [1d20]+ref('Dex')+ref('rankValue') :
[1d20]}$
#

checks the dropdown, if the selected key = 1, roll a d20 add strength, add the value of the rank number field, if it's == 2, roll d20, add dex, add value of rank number, if it's anything else just roll a d20.

#

add ref('bonus') if you'd like

#

i guess you could also just roll one dice at the start - and save the value to be added rather than having multiple hidden dice rolls. that may be cleaner.

#

so

<br><br>
${
ref('skillSelect') == 1 ? roll+ref('Strength')+ref('rankValue') : ref('skillSelect') == 2 ? roll+ref('Dex')+ref('rankValue') :
roll}$```
sinful spade
#

you need to update the component keys

#

the things in the 'apostrophies'

#

idk what you called your shit lol

bleak wyvern
#

is the skill select the mod from the table you helped me with? πŸ‘€

sinful spade
#

no skill select is the dropdown

#

look at the image i snet

#

of the dropdown

bleak wyvern
#

ahhhhhhhhh

austere lantern
sinful spade
austere lantern
#

gotcha. It's kinda late for me, so I can check tomorrow when I get up.

bleak wyvern
austere lantern
#

also I just now saw your message.

sinful spade
#

your 'Key*' needs to be set to 1, 2, and soforth, and you need to exand the logic the = the number of keys you have

austere lantern
#

so i think I'll go to bed and hit you all up earlier when I'm awake and I have enough time to walk through the proper steps.

sinful spade
#

again, refer to the image

austere lantern
#

Thanks, have a good morning/afternoon/night!

bleak wyvern
sinful spade
#

capitalization matters

#

skillSelect != SkillSelect

bleak wyvern
#

I made all the capitalization the same

sinful spade
#

and what's the error coming up?

bleak wyvern
#

nothing was added to the d20, I even put '3' in the text for the rank and it wasnt added

sinful spade
#

ok so it rolls the d20 fine but there's an error where the addition occurs. You are referencing the component key 'STR' is that the component key for the strength modifer value we made earlier?

bleak wyvern
#

the key component on the mod in the table correct?

bleak wyvern
# sinful spade mhm

Im not sure if it is working correctly but its not error and is actually showing result now πŸ˜‚

#

Scratch that it is working, had to make sure by playing around with it

#

Ill now test it with one more from the table to make sure I got it down

#

I Understand it now, it works Loevely... now to try and add bonus to the equation like you prompted earlier...

#

I GOT DOWN THE BONUS!!!

sinful spade
#

you can include a "value" line then a total line if you want.

#

just duplicate the logic less the roll.

#
<br><br>
Adding ${
ref('skillSelect') == 1 ? ref('Strength')+ref('rankValue') : ref('skillSelect') == 2 ? ref('Dex')+ref('rankValue') :
roll}$
<br><br>
Total ${
ref('skillSelect') == 1 ? roll+ref('Strength')+ref('rankValue') : ref('skillSelect') == 2 ? roll+ref('Dex')+ref('rankValue') :
roll}$```
#

you can (again optionally) clean up the logic as well

#
<br><br>
Adding ${
ref('skillSelect') == 1 ? strMod:=ref('Strength')+ref('rankValue') : ref('skillSelect') == 2 ? dexMod:=ref('Dex')+ref('rankValue') :
roll}$
<br><br>
Total ${
ref('skillSelect') == 1 ? roll+strMod : ref('skillSelect') == 2 ? roll+dexMod :
roll}$```

something like this, though i already deleted my test character so idk if that's the exact syntax
bleak wyvern
#

I mean I'm not picky about how clean it is... πŸ‘€ Like its working now and I have no prob duplicating the process

sinful spade
#

lol 🀣 yeah im the same way
you don't actually have to call ref('key') like I do.
martin had a fit when he was i do that haha
but it makes it readble for me and it's how i learned, now im too lazy to fix the habit

#

i think you can just 'componentKey' in most cases

bleak wyvern
#

yeah its working out for me so no complaints here πŸ˜‚

#

I will say tho its past midnight where Im at so me brain is not gonna be able to go on much longer, Ill prob finish doing this for the rest of the things that need it, and then might come back asking bout attacks when needed lol, but seriously I appreciate the help m8, my dumb butt has such hard time understanding code as is, thank you for you patience with me πŸ™

sinful spade
#

lol all good.
I can't code either πŸ’€
just learning as i go along building my sheet.
I rely heavily on chat gpt to get most of my more advanced features to run.

#

I've spent the last 4 hours trying to make a 'random' button for selecting a dropdown value if the players want to tempt fate

#

if it takes me more than another hours im telling them to roll a d12 irl and manually put it in fuck it

bleak wyvern
#

πŸ˜‚ 😭 I feel that man

#

but anyways I do bid thee a Good Night/Day, happy travels πŸ«‚ and much luck in your endeavors

#

dont cry m8 πŸ˜‚

sinful spade
#

my css file just hit 850 lines long and my random roll button only works on one dropdown but not the other

#

i have rightfully earned a few tears.

bleak wyvern
sinful spade
#

... i lied

#

my random button is not working on either dropdown

#

it was an illusion

sinful spade
#

ok do not hit me with sad tennant at 12:30 in the morning

#

or i will return fire

#

if sad wilfred doesnt make you actually sob, you may be broken inside

#

wooo!!

formal goblet
heavy elm
#

How to implement Background images like this? CSS?

sinful spade
#

Martin πŸ₯²
this code gives no error but doesnt work any ideas?

    'self', 
    first(lookup('attributeTable', 'attributeBase', 'attributeName', 'Physical')),
    (first(lookup('attributeTable', 'attributeBase', 'attributeName', 'Physical')) + ref('ccPhysicalAdd')))}$;}%```
formal goblet
sinful spade
#

for some reason any time I try to do multiple thigns within ? : notation, it wont work.

#

i need to check if all stats are distributed (pointsum=0), then get the correct stat value (lookup...physical), then get the number of points added (or removed from) that stat in the creator (ref('ccPhysicalAdd'), then sum those values and then override the initial value in the dynamic table

waxen thorn
sinful spade
#

not sure how switchCase would do that

#

well, i guess short of
if value in number field = -2 get origional value -2 set value..

waxen thorn
#

hmm.. i would build an item with itemmodifier that uses lookup in keyfield and in valuefield ccPhysicalAdd. then build in a hidden attribute as flag in actor when flag set then add modifier if unset add 0.

sinful spade
#

ok i had to made a display label that referenced the physical value in the table.
%{await ${setPropertyInEntity('self',lookupRef('attributeTable','attributeBase','attributeName','Physical'),ref('ccPhysicalDisplay')+ref('ccPhysicalAdd'))}$;return "";}%

I guess getting a original value then modifying it may have been a recursive error or something.

sinful spade
waxen thorn
#

you might want to look into gitlab-readme the part about item and itemmodifiers. i use items in my project to modify basevalues in actor.

sinful spade
#

oh is see what you mean

#

yeah i use those as well

sinful spade
#

i can pres this button as may times as I want lol

waxen thorn
#

if(${ref('editStats')}$ inside a script you use csb with ${}$ so the value gets resolved. i used that in another script. worked fine.

sinful spade
#

also, Martin, if setPropertyInEntity is used to adjust a number-field, you can set it above the maximum value defined in the field, refreshing the sheet does not adjust back to max.
There needs to potentially be a check maximum values on template reload.

#

and yes there's more after that and it ends with a }%

sinful spade
#

i've massively simplified the logic to

if(${ref('editStats')}$===1 && ${ref('ccAddPointsSum')}$===0){...} return "";
}%``` but it's not working still πŸ₯²
waxen thorn
sinful spade
#

number

#

just a numberfield that's either 0 or 1. Could do a checkbox to ensure that fact

waxen thorn
#

aah checkboxes are text with true/false..

#

i had that problem.

sinful spade
#

i meant that I could do that.
it's currently a numberfield

#

I really want to avoid doing one liner CSB logic or external macros if possible

#

I may have to just...

${ref('editStats') == 1 ? ref('ccAddPointsSum') == 0 ? setPropertyInEntity('self', 'Phsical', Physical + PhysicalBonus) : '' : ''}$
...```
#

just like 15 different CSB conditions built per line.

waxen thorn
#

@sinful spade mind if we try step by step?

#

to get to the error: first i would try to just log the first variable to console and check if i get the right values. e.g.: %{ const checkvalue = ${ref('editStats')}$; console.warn(checkvalue); }%

#

if im not wrong this could also work: %{ const currentActor = entity; const currentProps = currentActor.system.props; console.warn(currentProps.editStats); }%

sinful spade
# waxen thorn <@155143448029167616> mind if we try step by step?

sorry didnt see your message.
I was knuckle deep in writing this monstrosity:


${ref('editStats') == 1 ? (ref('ccAddPointsSum') == 0 ? setPropertyInEntity('self', 'editStats', 0) : ' ') : ' '}$

${ref('editStats') == 1 ? (ref('ccAddPointsSum') == 0 ? setPropertyInEntity('self', lookupRef('attributeTable', 'attributeBase', 'attributeName', 'Physical'), (ref('ccPhysicalAdd') + ref('ccPhysicalDisplay'))) : ' ') : ' '}$

and add about 4 other stats to that lol

#

outputs a warning sign and a green 0

#

chat puts out an undefined error if enabled

#

ccPhysicalAdd output a green 2, error still in chat

#

neither had an error in console.

waxen thorn
sinful spade
#

it has a value of 0, but can be "toggled" to 1 by other buttons

#

using CSB internal logic it works, though i still have no idea why the if statement didnt work

waxen thorn
sinful spade
#

just a warning sign and a green 1.

#

if i set it to 'off' aka 0
its a warning sign and a green 0

waxen thorn
#

so try adding the other fields to check.

sinful spade
#

they all just output their expected numbers

waxen thorn
#

great. so no problem at this point.

#

so time to extend on that.

#

define a const for every value that you need. e.g. const local_editStat = currentProps.editStat; and then try a simple if like if (!local_editStat) {return "editStat not set";};

sinful spade
#

%{const local_editStat = entity.system.props?.editStat; if (!local_editStat) {return "editStat not set";};}% returns nothing at all lol

#

if i enable it to go to chat it does say editStat not set tho πŸ€”

waxen thorn
#

o.O unexpected. i tought ! means not? so !local_editStat would return true if editStat would be 0 (zero) ?

formal goblet
sinful spade
#

hey martin

#

so is that why the lock wasn't working???

#

also do you know of an easy way to find where an error is coming from 🀣

#

i just realized on compiling a sheet i get a ton of:
Custom System Builder | Uncomputable token "lookup('attributeTable', 'attributeBase', 'attributeName', 'Mental', '===')" Error: Uncomputable token "lookup('attributeTable', 'attributeBase', 'attributeName', 'Mental', '===')" for example, and that could really be anywhere on my sheet

formal goblet
sinful spade
#

both levelValue and healingClockInput are defaulted to 0

formal goblet
#

And uncomputedProps is also important, so check that as well

sinful spade
#

scope only appears in the warning though and not the errors?

#

seems like burrined in the mess there's a
Custom System Builder | Value expected (char 7)
Custom System Builder | Cannot convert "ERROR" to a number Error: Cannot convert "ERROR" to a number

They may be causing the other errors

ionic wing
#

Not sure if it is linked to CSB, but I just updated to 4.3.2 and I get an error when I try to insert an EquipableItem in a compendium . Do someone have experienced something similar.

ionic wing
#

Worked, thanks a lot πŸ™‚

ionic wing
#

I saw that when I add an item B in another item A, the item B goes to "CSB - Embedded Items Folder - DO NOT RENAME OR REMOVE"
My question is : what if I add this item A in a compendium, and then use this compendium in another world? Do I need to import the CSB Folder too ?

waxen thorn
#

i tried to write a script that calls a userinputtemplate and returns its values. first screenshot is when i execute it with standard CSB. Second if i call it in script. in script i dont get return values. it says returning undefined..

sinful spade
formal goblet
waxen thorn
sinful spade
#

im geting errors / undefines from this code.

#

yet it displays fine?

#

attributeBase is a numberfield in the dynamic table

waxen thorn
sinful spade
#

even with that the issue is unresolved

#

weirdly enough
Custom System Builder | Cannot convert "physicalRef" to a number Error: Cannot convert "physicalRef" to a number

#

only one of these should be showing at a time.
they have visability formulas of:
ref('physicalRef') == 1 and ref('physicalRef') != 1

sinful spade
#

weirdly enough updating any field manually resolves this - buttons do not count.

rapid hare
# dusky mauve Can't drag and drop item to the compendium.

Hi, wanted to join this report here, I cannot drag items from NPCs to a compendium. I tend to modify weapons/abilities inside a character sheet, then drag it to the compendium after I'm done - but since the latest CSB update, it just doesn't work. Any way around that? Console outputs this error:

Uncaught (in promise) TypeError: undefined. document.toObject is not a function
[No packages detected]
at ItemDirectory._createDroppedEntry (foundry.js:74055:27)
at ItemDirectory._handleDroppedEntry (foundry.js:73516:28)

formal goblet
formal goblet
rapid hare
formal goblet
bleak wyvern
# sinful spade

That’s freakin cool to be on a sheet 😨πŸ”₯

sinful spade
past laurel
#

Question, is it possible to make a blank Actor sheet, then you can attach an Item sheet that has data to fill it with?

sinful spade
formal goblet
# sinful spade

Seems fine. I need the full error message with uncomputedProps

sinful spade
twin goblet
#

Hello Martin,
Thanks for your help last time - it works great πŸ’―

but today I have a dynamic table...
one of the elements of the table is a radio button, by selecting which row (KE column) the data is needed.
But
the radio button takes the specified value (1) in every row in the dynamic table - therefore the lookup returns every row. πŸ€”

How can I set the radio button so that it takes the specified value only in the actually selected row in the dynamic table?
Or
any tips, how could I solve this differently?

This would be the combat value of one of the weapons used, which the player can swap at will. But the values ​​change depending on what weapon he is using - and the combat value is made up of the character's attributes, skills, weapons and other modifiers. The initiative roll
, which is rolled every round in this system, changes. That's why the radio button seemed like a good idea - because the player can only choose one weapon.

formal goblet
formal goblet
sinful spade
# formal goblet Can't spot anything there. Any other relevant errors?

not really honestly, there's just a ton of repeats and i dont see where they're coming from.
the few that had locations / objects with the formula where i could find what it was talking about all seemeed to reference my stat references such as physicalRef (to get info out of dynamic table easier since it's called so often) yet there doesnt seem to be any issue with the code.

sinful spade
thorny ledge
#

How may I get the value from a text field maked in a sheet in CSB module and use this value to execute a Macro?
Example: %{return await game.macros.getName(toString(MacroName)).execute()}%

marble beacon
#

I have done a Chinese translation for the system, where should I put it?

thorny ledge
#

I have another question: %{return entity.system.props.Health}% Will return the value of Health in the triggering entity, but if the component Health it's included in a Dynamic Table? How can I get it?

thorny ledge
#

It is possible combine scripts %{}% with ${}$?

sinful spade
sinful spade
sinful spade
sinful spade
# thorny ledge I have another question: %{return entity.system.props.Health}% Will return the v...

not sure the structure of your system, but once you have your actor selected somehow

//get table
const myTable = actor.system.props?.tableName;
//get row
const thisRow = Object.values(table).find(row => row columnToFilterBy === "valueToFilterBy");
//get cell in row
const entityHealth = thisRow.componentKeyOfColumn;```
so

//get the player stats table
const myTable = actor.system.props?.playerStats;
//get the row containing the stat name Health
const thisRow = Object.values(myTable).find(row => row.statName === "Health");
//get the cell in the currentValue column of the Health row
const entityHealth = thisRow.currentValue;

modern hemlock
#

Can I somehow move the actor from a scene to the sidebar? (I copied+edited an actor and want to include that copy as a new actor in the panel on the right - what is the panel called btw?)

waxen thorn
sinful spade
# modern hemlock Can I somehow move the actor from a scene to the sidebar? (I copied+edited an ac...

@waxen thorn is absolutely correct, updates to a charactersheet accessed through a token updates the actual character sheet.
If however, you mean that you've updated a token and you have two tokens that are different, those are absolutely unique and if you want to keep the second token - you can duplacte the origional actor as lewell advised and then click prototype token, click the new token, and assign token. This way you have two of the same actor with the two unique tokens.

modern hemlock
sinful spade
#

One minute

#

yeah short of someone who's better at javascript than me making a macro that gets the infromation the actor is referncing and imports that over the existing template that NPC Na Szybko uses - your best bet is to duplicate NPC Na Szybko, manually make the same changes you did to the token using the token as a reference.

modern hemlock
#

Well I could make that macro, I was just hoping there was a way to do it built into Foundry

waxen thorn
#

@sinful spade I've got a problem with item-modifiers not updating keys in actor. i got actor a item b and item c. item c is linked to item b which itself is linked to actor a. itemmodfiers that should update keys in actor a dont get apllied even if i target fetchFromParent ({top: true}). any idea on that matter?

sinful spade
#

but honestly, i'm a bit worried about your workflow there - what's the usecase?

waxen thorn
#

the use case would be a piece of armor that applies armorvalue to actor. and then it can have different properties (each property itself an item) e.g. Enhanced Hearing +10 so the property when dragged into the piece of armor should add +10 to hearing of actor.

sinful spade
#

Interesting.
Why not just apply the enchanced hearing modifier straight onto the armor in that case?

waxen thorn
#

i would have to build alot of item/property-combinations.. and im lazy so i prefer a modular system

sinful spade
#

I felt that in my soul

#

i know martin mentioned it would be very taxing on the system to do it this way (because i was trying to this earlier)

But i had a template with all the modifiers i was likely to use in that category already made and set to 0, that way when the item was created I could just change the values.

waxen thorn
#

and my idea is even further down.. some properties can only applied once even if multiple items would grant them. if each pΓΌroperty is in itself an item i could check that and rule out duplicate or multiple bonus.

sinful spade
#

πŸ€”
i think to minimize resources and maximize usability

#

i'd personally create an template for those modifiers individually, as well as a item container for those items and just set it to GM only view.

#

Especially given in the new versions of CSB you can create items that house other items (still havent updated to know how it works for sure) but effectively use the armor to give the player those other items directly like a trojen horse lol

waxen thorn
sinful spade
#

you want item b to give a player item c

waxen thorn
#

exactly.

#

so to say a passthrough. if you wear a helm of hearing it is a helm-template with template enhanced hearing applied to it. advanced hearing affects actor and not the helm itself.

sinful spade
waxen thorn
#

or i would have to manually drag those modifier-items on the actor as gm.. but as i said earlier.. im lazy i dont like that.

#

@sinful spade oh. @formal goblet helped me to write the script i needed to conditionally open a userinputtemplate and get the values back to work with them. would that be intessting for your project?

sinful spade
#

I actually have a similar usecase for the current system i'm working on.

Professions come with a bunch of bonsues and a lot of times they overlap. rather than creating "+1 strength" as a modifier for each profession, having the professions act as a backpack of bonuses would be nice.

Let me look into that for a second, I havent gotten that far yet but I'll need to figure it out eventually so imma dig for a sec

sinful spade
#

what user input template, and work with what values how

waxen thorn
# sinful spade im confused what you mean 🀣

in my actortemplate there is a dynamictable containing basic skills every playercharacter has. the table can be edited by players to add custom skills that must be learned. i included a dice-script-label so the players can roll for skilltest from the dynamic table. but some skills like Awareness need more specific details in this case the sense you are using eg hearing, sight etc. so i made a template for awareness that only gets called if the skill is awareness.

#

this template has localvariables that i can evaluate to pick the right sense for awareness from hidden attributes and roll this hidden attributes instead of plain awareness-skill.

#

you are blind.. no sight-sense my friend. you got item with enhanced hearing.. your awareness for hearing is +10.

sinful spade
#

Oh i see that's nifty,
I sorted that problem a while back by having "abilites / skills" reference "attributes / stats"
So like in 5e having a high dex score makes you better at stealth, but you can increase specifically stealth with proficency, or expertise.

#

i just made a second dynamic table that links to the first and called it a day 🀣

#

so in your example,
i'd just have a Perception (Hearing) skill that's based on the Awareness attribute

waxen thorn
#

awarenesskill is based on perception in deathwatch-ttrpg. and i needed to roll on specialised awareness-sense and didnt want to add 5-times awareness to skilltable..

sinful spade
#

I hear you haha, and while it would be cool to go a level deeper- at some point it'd bog my players down in mechancis they'd need to learn. Two levels is plenty, especially given i can specialize further just by naming it.

#

E.g. a player may have 3d6 awareness, and +1 with Perception (Sensory), then if i wanted them to hear really well but be poor-sighted it'd be Sensory (Hearing) +2 and Sensory (Seeing) -2

waxen thorn
#

okay. that sounds interesting. any chance i could get a peek at your csb-template-code?

sinful spade
#

I mean it's an entire homebrew system
is there a specific thing you're interested in?

#

for example, currently I am working on a minigame in character creation that determines character background.
@waxen thorn

#

very bare bones since i just started on it yesterday but we're getting there lol

#

the fundamentals are in place.

twin goblet
#

hello, I would like to replace the icons of EFFECT.Status. In which file can I find which icon is used for an EFFECT.Status?
edit: I found the Condition Lab module πŸ™‚

sinful spade
#

😩 finally done with the visuals.
next up... items, buttons, and general function.

void locust
#

Hello

#

is there any prefix, similar to item. I can use for Dynamic tables? Specifically I want the label project_cost to be the formula for (project_scope + project_misc) * project_resistance for each item in the list

manic crypt
#

No, but you can use the samerow reference.

void locust
#

How would I do that?

#

just samerowref(('project_scope' + 'project_misc') * 'project_resistance') ?

manic crypt
#

I think that wouldn't work as well. More like ((sameRow('project_scope', 0) + sameRow('project_misc', 0) * sameRow('project_resistance', 1))

#

and maybe include fallbacks.

void locust
#

Gotcha, thank you

#

Current formula that worked for posterity

${
(sameRow('project_scope', 1) + sameRow('project_misc', 0)) * sameRow('project_resistance', 1)
}$
brave trench
#

can actor sheets retrieve data from an item in an item that is on the actor? Something like this: find('item.ammoDisplayer','dmgTotal','equippedCheck','true','==')

manic crypt
#

There's two ways to do it. One is to pull the data into an item displayer that filters to show the item, then you can do the above, or you can find the uuid from the item in a displayer, then use that for a fetchFromUuid() command.

sinful spade
#
const actor = game.actors.get(entity._id);
if (!actor) {
  ui.notifications.error("Could not find the current Actor!");
  return;
}

const classificationUuid = "Item.HDfSD8Jc6R6uaOeO"; // Humanoid
const speciesUuid        = "Item.kpwc8ShKA5Yzu7p3"; // Human

const classificationItem = await fromUuid(classificationUuid);
const speciesItem        = await fromUuid(speciesUuid);

if (!classificationItem && !speciesItem) {
  ui.notifications.error("Could not find Humanoid or Human items by their UUIDs.");
  return;
}
waxen thorn
sinful spade
waxen thorn
brave trench
manic crypt
# brave trench This uuid stuff is new with the recent update and I don't understand it. Where/w...

You can use it to directly reference an item.key without having to pull the information out into a keyed entry in an item displayer. As a case use, I have a sheet with an item displayer that only ever displays one item. I want it to have the description of the item in a verbose format below the item container on the sheet, so I used this:

${fetchFromUuid(find('Ability1','uuid'),'AbDesc',"None")}$

Which resolves to: