#Custom System Builder

1 messages Β· Page 53 of 1

deft sluice
formal goblet
#

Check the error in the console with F12

deft sluice
#

Console is empty :/

#

I tried to put recalculate formula at some place but it didn't do anything

deft sluice
#

maybe the list Skills_Selection is in cause ?

manic crypt
deft sluice
#

What do you mean by DT settings ? πŸ˜…
I've make my own skills name yeah

manic crypt
#

You could also try ref(Competence)

manic crypt
deft sluice
#

oh DT dynamic table, get it

#

Yeah my Skills_selection was list based on the DT

manic crypt
#

Ok. Try the ref() in the filter value?

deft sluice
#

in the lookup function ?

manic crypt
#

Yes

deft sluice
#

erf, not showing anymore

#

ref what, name of the DT ? or a skills in particular ?

#

maybe we could PM, for not messing the channel

manic crypt
#

Sure, if you like.

rigid shoal
#

Hello everyone!, I was wondering if someone could help me everytime I try to create a new item or feature for a character it keeps spamming me with this, any help would be amazing :3

#

I scrapped an item concept and the template for it and deleted both but thats when this kept popping up

manic crypt
#

The game is refreshing the canvas and trying to reload an item that's set to use a template you deleted. You probably still have a copy of the item on a test character.

rigid shoal
#

I've only got one test character and its not on there what I can see, so I don't know

manic crypt
#

It's kind of a problem, because you deleted the template, so the item won't show up on any of the character's item displayers, since they only show selected templates (which you can't select because you deleted ...)

rigid shoal
#

so should I just purge the test sheet?

manic crypt
#

The simple way is to create a new template using the same name of the old template.

#

or you could just delete the character, yeah.

rigid shoal
#

damn it was that simple thank you so much

manic crypt
#

No problem πŸ™‚

formal goblet
manic crypt
formal goblet
manic crypt
formal goblet
manic crypt
#

Got it. I was just trying to make sure I had the terminology right for if it comes up again. Thanks.

fresh arrow
#

@formal goblet btw is there a way to block templates from accidential delete?
that could cause heavy problems and can already destroy whole system in worst case πŸ€”

manic crypt
#

The best way would be to export them to a compendium and be able to re-import them if you accidentally do, then prevent players from deleting actors in permissions.

formal goblet
#

Once the Templates are done, you can just export them to Compendiums or even files.

#

A backup of the world also helps

#

Otherwise there's no regular way for a GM to block deletions of Documents

grand obsidian
#

Hello, I'm still improving my Supers RED CSB and I would like how to make a total. Here is my use case. I would like automatication of a chacacter values in Creation Dices. For instance, The Resistance value begins at 1D free and each subsequent Dice is 1 creation dice. So my formula is :
${(COMPOSURE_MAX+FORTITUDE_MAX+REACTION_MAX+WILL_MAX)-4}$ but it displays nothing on my NPC

#

Here is the NPC I use as a test

#

I wonder if my formulae is wrong

#

I also tried ${COMPOSURE_MAX+FORTITUDE_MAX+REACTION_MAX+WILL_MAX-4}$

#

I have an idea, let me check πŸ™‚

#

Tried this

#

${=(COMPOSURE_MAX+FORTITUDE_MAX+REACTION_MAX+WILL_MAX)-4}$

manic crypt
#

You're trying to sum the values in the Resistances into the Resistances at the bottom?

manic crypt
manic crypt
#

@formal goblet I was just poking at things and noticed that math.js has a forEach() function; can you use the callback with CSB functions, or is it limited to math.js functions? I'll experiment with it, but I was wondering if you had any insights with it.

grand obsidian
manic crypt
formal goblet
formal goblet
manic crypt
spark lotus
#

Hi! Does the fetchFromActor function work if the key is a label with a formula? I originally had a number key (char_ac) where a number value for armor class was entered by the player. I changed the key to a label with a formula where char_ac is calculated as a base value of 9 plus player entered temporary bonus & penalty. The fetchFromActor function worked perfectly with the number key but only return the default value of '0' when I use the label key with the formula. Am I using the wrong function? Any advice is greatly appreciated. here is the snippet of formula that is trying to fetch the Ac value from the selected token: ${char_ac:= fetchFromActor('selected',"char_ac", 0)}$

#

Here is the char_ac formula.

manic crypt
spark lotus
#

It's supposed to fetch the AC of the selected token (like a targeted enemy). I'm probably going to change it from selected to targeted.

#

I switched from having the player enter a number for their AC to using the formula so i could create drag and drop equipment that would automatically update the player's Ac without them needing to make any adjustments.

#

here is what the chat output looks like

#

The lackey has an AC of 9 per the formula but the default value of zero is being outputted.

manic crypt
# spark lotus

The only thing i can see that I would have done differently on that line (ther than using target, like you said) is that I would have used ' ' instead of " ". Not sure why it's not pulling when it's working fine with the name.

spark lotus
#

I'm not sure I understand how/where I would use "instead of". is that a type of operator?

manic crypt
#

You have fetchFromActor('selected',"char_ac",...)

I would have used 'char_ac' instead.

#

But sometimes you can use " instead of ' without issue, and I'm still sorting out where those places are.

spark lotus
#

Oh! Thanks. I'll try that.

#

I'm stumped. I changed it from selected token to target token and it still returns the default value of zero instead of the calculated AC from the formula.

manic crypt
#

So.. this may seem weird, but have you deleted all the tokens from the canvas and replaced them with the updated formulae from the sidebar? I've had plenty of times where I was using a token with a way outdated actor file.

spark lotus
#

Good suggestion. I just tried and no change though.

#

It has to be something simple that I'm missing. Everything works but the fetching of the AC.

spark lotus
#

i figured it out. I had an unused variable/key in the formula. Once I removed it, everything worked fine.

manic crypt
#

Nice

austere lava
#

Is there a way to have items placed in an Item Displayer to not create a copy within the CSB Embedded Items Folder but instead link directly back to the original?

normal jolt
#

Is it possible - through script or macro - to add an item automatically to an inventory, without needing to drag it in the player's sheet?

#

Essentially, what I'm looking to do is to create an item with a modifier on it, and to be able to add it to all the players at once, to be able to set 'global modifiers' for an area.

brisk galleon
#

Hi! I'm Calesella Marco from Winged Lion Games, a small Italian team of ttrpg authors. First of all, congratulations on your fantastic project, it's really well structured and incredibly convenient for transposing game systems for those who are not familiar with programming. I'm contacting you because I created with your addon a transposition of our latest game in development, Purple Reaping, a Sword&Sorcery Horror ttrpg inspired by Conan the Barbarian with a narrative game system whose Kickstarter will start in July (here a link if you want to know more about the project https://bit.ly/43AQEST) . I would like to kindly ask you if it is possible to include the exported file together with the ones you made available in the template link on your project page. If you need anything in particular, there is something to correct or for anything else, please contact me at my email wingedliongames@gmail.com . Thanks for everything!

Kickstarter

Inspired by Howard's classics like Conan, adventurers face horrors of all kinds risking their souls and sanity, as well as their lives.

manic crypt
grand obsidian
#

Logger.js:33 Custom System Builder | Value expected (char 1) SyntaxError: Value expected (char 1) (at math.js:27324:37)
at pe (math.js:27324:37)
at math.js:27252:85
at math.js:27253:77
at math.js:27254:73
at math.js:27255:69
at math.js:27256:65
at math.js:27257:61
at math.js:27258:57
at math.js:27259:53
at math.js:27260:49 {formula: '=(COMPOSURE_MAX+FORTITUDE_MAX+REACTION_MAX+WILL_MAX)-4', props: {…}}

manic crypt
grand obsidian
#

I will put it in english if you prefer

manic crypt
#

The reason it's not totaling is because you're just changing the minimum value, not setting it. If you change the component type to label and put the formula into the label field, it should work.

grand obsidian
#

I will try that thanks πŸ™‚

grand obsidian
#

The issue with the label component is that it display the word "resistances" and not the value. Ideally I should have a label and a value

#

Oh I know πŸ™‚

#

Well no it was not that ^^

formal goblet
grand obsidian
#

Logger.js:33 Custom System Builder | Cannot convert "${(COMPOSURE_MAX+FORTITUDE_MAX+REACTION_MAX+WILL_MAX)-4)$}" to a number Error: Cannot convert "${(COMPOSURE_MAX+FORTITUDE_MAX+REACTION_MAX+WILL_MAX)-4)$}" to a number
at convert (math.js:12242:57)
at Array.t (math.js:6552:67)
at Function.r (math.js:6691:72)
at Function.oe (math.js:6724:82)
at Function.addScalar (math.js:6740:54)
at Function.oe (math.js:6724:82)
at add (math.js:6740:54)
at math.js:25781:48
at math.js:25781:50
at math.js:25781:50 Object

#

I am watching an (old) CSB tutorial to better understand it

#

(the version is older but that's just for me to understand the logic)

formal goblet
#

And you have 1 opening vs. 2 closing parens ()

grand obsidian
#

I see

grand obsidian
#

Seems to work πŸ™‚

#

(I also redesigned the character sheet a bit)

deep lichen
#

I'm just starting to get into CSB and I'm not understanding how roll formulas apply to labels. I'm probably missing something basic.
On the left is a label with a roll message on click that runs the 'setPropertyInEntity' formula to modify the label value on the right. It correctly spits out the result of the formula in chat, but it doesn't actually modify the value itself. Other values on the sheet seem to also correctly adjust according to the values already listed on the sheet. But there isn't any way to modify the value of the label directly from what I can tell aside from item modifiers. I know number fields and text fields exist, but they seem to be more limited with what you can do with them in terms of formulas, such as item modifiers not working with them.
Again, I think I'm just missing something simple, that, or I'm approaching what I'm doing the wrong way. Any pointers?

formal goblet
deep lichen
formal goblet
deep lichen
#

Ah, that'd explain it then. Is there another function I should use instead or a better way to approach modifying label values?

formal goblet
deep lichen
#

Lets say that I had a stat value such as Strength, and I wanted to have it be easily edited manually on the sheet, but I also wanted to have it be edited by modifiers. Would there be a way to approach that, or would I be better off just going with one or the other?

formal goblet
deep lichen
#

Gotcha. I'll have to figure out a new layout then. Thanks for the help. :)

elfin lark
#

Could someone give me a hint of whats wrong here?

${roll > [:Skill_Aim:]? 'Failure' : 'Success'}$

${roll >= fetchFromActor('selected','Exploit', 20)? 'Exploited' : 'No Complications'}$```

Basically enemy has a numberfield with the component key Exploit. When a player targets the enemy and rolls, it should check if the roll is equal or greter than its exploit. Problem is right now its always defualting to the 20
#

(tryna use this for the first time, so still lernin)

formal goblet
elfin lark
#

targeted. (im basing my code off some other peoples messages here so that was a slip up.)
however changing the 'selected' to 'targeted' does not fix the issue, its still defaulting to 20

formal goblet
elfin lark
#

ah well there we go

#

thanks

#

sorry for dum questions, still getting a hang of this

faint beacon
#

Is there a way to only have item modifiers applied from equipped gear?

formal goblet
shy stag
#

trying to use this to check if a checkbox is checked, and if so, multiply a stat by 1.5, wasnt working so i used a label to test it but the value isnt changing when the box gets checked: ${ checkboxTransform ? '1.5' : '1' }$. even tried reloading the sheet and it still didnt change

formal goblet
shy stag
formal goblet
shy stag
#

same error basically

formal goblet
shy stag
#

what am i supposed to use? the component key of the checkbox?

formal goblet
shy stag
formal goblet
shy stag
#

found the checkbox, it seems to be fine as far as i can tell, dont know why it isnt being noticed when its checked

formal goblet
#

The key of this Checkbox is Transform though, not checkboxTransform

shy stag
#

yeah it works now, sorry, the github page led me to believe i needed the checkbox there

formal goblet
halcyon inlet
#

Is there a way to change a label's visibility/CSS class depending on if a number is above 0?
I'd like to make the AVAST! text look normal until the count is above 1 to signal to my players that there is a resource available that they can (and should) use.
They are utterly blind, nothing short of animated neon clown-vomit will make them remember that they can use this thing and even then i'm thinking about implementing airhorns just to make sure.

fresh arrow
#

@formal goblet I'm not sure if that was recently touched, if so please let me know and I will do better search πŸ˜‰ but do we have possibility to set template in Roll Message to which we will pass some specific information?
LIke I have chat msg for test done for skills, attributes, attach, damage, etc... but most of those msgs are same and in case of change right now (with my approach) its necessary to change every single roll msg instaed of jsut one part of common template..

formal goblet
#

Or you use a Macro, which will be called from your Label Roll Messages.

fresh arrow
#

but macro will be encapsulated from data normally available in Roll Message formulas or they could be used?

formal goblet
fresh arrow
#

😈

fresh arrow
#

give me a try πŸ™‚

fresh arrow
formal goblet
# fresh arrow

Different roll modes (public, private, gm-only) have different colours.

fresh arrow
#

but... what is correct way then to pass information about "item" at "item displayer" from which "roll msg" macro was called? πŸ€”
eaither I have item is not defiend when "... item: item, ..." or unexpected identifier 'Object' when "...item: ${item}$, ..." 😦

fresh arrow
#

ok... I'm sorry that I didn't read that with understanding... thank you

silver lake
#

please, does anyone know how to hide this from chat?:
%{${item.Sound}$}%

#

And yes, I have tried %{${#item.Sound}$}%

#

I just want it not to appear in the chat message

formal goblet
halcyon inlet
#

Is there a way to copy and paste things like lables and such in the character sheet?
i feel like i'm being a massive dumbo by making a copy of the character sheet and dragging over things i want to copy :p

halcyon inlet
fresh arrow
#

can we already call for macro via macro.execute() within Roll Label without trigering "roll sound" and "sending msg to chat" ? πŸ€”
or maybe someone has already good experiance and example with templates with chat message results to be called from Label Roll Message via Macro to avoid changes in too many places in case of change of result view?

formal goblet
fresh arrow
#

of course πŸ˜„

fresh arrow
#

by doing that through macro I have my dice so nice rolling dices back !

#

or not 😦
when 2 rolls are triggered then dices are not rolled 😭

halcyon inlet
#

How do i make equippable items work? i'm looking at the custom system builder documentation but i can't drag equippable items on to character sheets to make them appear.

fresh arrow
#

you have to have:
container (item displayer)
item
you have to define:
your item displayer have to have set Filter Items to item template you want to add/see
then drag item on char sheet

halcyon inlet
#

Right! that makes sense. thanks!

halcyon inlet
#

So, when i try to apply the modifier to the sheet it becomes NaN. The default is 0 so when i untick the conditional modifier selector it returns to 0.
I'm assuming my formulation is wrong but i'm not entirely sure in which way.

formal goblet
halcyon inlet
#

OH I FORGOT THE [${$ thing!
I swear, this dosen't usually happen (it happens a lot)

#

The worst thing about computers and code is that it does exactly what i tell it to do, and i'm the last person i would listen to for suggestions of how to do things. :p
But it works! (even if i thought that inventory_weight had to have the curly-bois around it too but this is a learning experience)
Thanks!

short phoenix
#

Is there a FAQ or something I can look things up on? I am just moving to CSB after a Sandbox catastrophe destroyed all of my data... Everything looks like it is similar, but improved here. Maybe not quite as simple, but better... There is 1 thing I haven't figured out how to do yet though, which is kind of essential to my goal...

#

I am making a system similar to World of Darkness in that it has visual representation of scores in the form of "dots"... That was the radio button function with a max higher than one in Sandbox, but that doesn't seem to be the case on CSB...

fading turret
#

Hello there!
I’ve been trying to use the Show Drag Distance Module with the system that I am currently working on. The problem is that I have little to no idea how to relate the movement capacity of my system with the data that the module uses to determine the base speed movement of the actor.
I would really appreciate it if anyone can help me out!
Thanks in advance!

short phoenix
#

Looking at some walk throughs, some of them say there should be a button to launch some type of UI inside of foundry for CSB... Is this accurate? I have options to create actors/templates from the create actors button, and the Equippable Item, Equippable Item Template, Subtemplate, User Input Template options in the create items button... foundry says I am using 4.4.2... Is something corrupt?

formal goblet
formal goblet
fading turret
#

I'll try to use that one and see if a can work something out. Thanks!

short phoenix
#

I suspect I was looking at a bad walkthrough.

short phoenix
formal goblet
fading turret
#

I've been trying to figure it out with the Dragruler but I can't make it work

formal goblet
short phoenix
fresh arrow
#

@formal goblet as mentioned there is a way to pass item as en object for further fetching, but is there some better way to pass dynamic table information than pushing every column through parameters?
in case when script was initiated from dynamic table label

formal goblet
fresh arrow
#

what do you mean by 'options.reference'? I tried to identify such tandem but so far nowhere console, actor, dynamic table as CSB comoponent options nor through console... 😦

formal goblet
fresh arrow
#

${#%{return await game.macros.getName("RollChatMsg").execute({type: 'skillCheck', entity: entity.entity, options: options});}%}$
gave me an error inside macro:

const props = entity.system.props;
const options = options;
console.log(props);
console.log(options);
Generate an console error:
Uncaught (in promise) ReferenceError: undefined. Cannot access 'options' before initialization
[Detected 1 package: system:custom-system-builder(4.4.2)]

formal goblet
fresh arrow
#

for itemContainers and linkedEntity it work (with changes) like a charm as per your guide...

#

when I remove options from script I can see reference "dt_A.0"

formal goblet
fresh arrow
#

but same script was used for dynamic table and item displayer... for linkedEntity it is possible to assign even if its empty via

const item = (linkedEntity && linkedEntity.system && linkedEntity.system.props) || {};
but when same approach I set to options it raised an error... or... let me check one more thing

formal goblet
fresh arrow
#

when I run macro from itemDisplayer it raised error due to missing options

#

I saw that shorter one also, but it cause an error

#

ok got it πŸ˜„

fresh arrow
#

Ok... not it works as should for Skills (dynamic table) and Weapons (item in item displayer)... and most important Dices are back πŸ˜„
thank you very much Martin for your help and patience πŸ™‚

silver lake
stone oak
#

Hello I'm using the CSS for really basic stuff and have only basic technical knowledge with computers and code, I've looked through the documentation and I can't seem to find a way to make an if statement.
From what I understand putting a condition in a formula only works for boolean, so the number you input is either considered false if it's 0 or true if it's anything else, how do I do something that would work like "If [Thing you want to read] is equal or higher than X then [Return]" ?

#

sorry if this has already been answered a thousand times

formal goblet
stone oak
#

that's very handy, but I just don't know how to code something from scratch, I've only gotten so far by finding example code, dissecting it and modifying the right pieces to have it do what I want

#

I only learned right now that CSS works with javascript

formal goblet
formal goblet
stone oak
#

I think I get it, thank you

dense pine
#

Question about roll modes: When doing private Rolls, other players and GM see this in the Chat Messages:

#

Any way to get rid of all these lines with question marks?

velvet heron
#

If I am using a custom macro for dice rolls, how is it possible to include a reference to a componentKey within the macro?

For instance, toward the bottom after the text "makes an attack" I'd like to make it "makes an attack, dealing componentKey text damage."

Do you need to see the macro text?

timid marten
#

Do you guys think it would be possible to play a sound for each player when they move items from their inventory?

I tried with this module but it struggles a lot to find the player ID and completely breaks with Item Piles

GitHub

Foundry VTT Module. Contribute to Chrisrous/Chris-Sound-Module development by creating an account on GitHub.

formal goblet
formal goblet
sharp grotto
#

Would it be posible to post an item to the chat by creating a buton at the item with a string of code that takes the UUID from the item an instert into chat in the right formular ?

manic crypt
fresh arrow
#

I think I saw in some systems that on chat msg have possibility to click and then it will popup you journal, item or even continue roll base on original poster attrs... so somehow its possible, but its more like foundry feature not CSB i guess πŸ€”

austere lava
#

Is there a way to have items placed in an Item Displayer to not create a separate copies within the CSB Embedded Items Folder but instead link directly back to the original?

formal goblet
austere lava
sharp grotto
dense pine
austere lava
fading turret
#

Hello there! Can anyone help me on building a iniciative button on my character sheet? By helping I mean how do I create an order of action while a combat encounter is happening?

limpid gull
#

Hi there. I have a question. If I use setPropertyInEntity() and setValues() in same code, some things updates only after I update them.
Code:

${#hasammo:= item.wpnHasAmmo}$
${#ammoval:= item.wpnAmmoCount}$
${#ammomax:= item.wpnMagazine}$
${#ammoitem:= item.wpnAmmoItem}$

${reload:= fallback(fetchFromUuid(ammoitem, 'ammoQuantity'), 0)}$

${ammorel:= reload <= 0 ? '0' : (ammomax - ammoval) > reload ? reload : ammomax - ammoval}$

${setPropertyInEntity('item', 'wpnAmmoCount', "hasammo ? ammoval + ammorel : '0'")}$

${setValues(ammoitem, 'ammoQuantity', "target.ammoQuantity - ammorel")}$

after click on button with this code, updates wpnAmmoCount in item, but dont ammoQuantity in ammoitem, after that if I open and close ammoitem sheet ammoQuantity updates

manic crypt
#

Are there errors, even warnings like uncomputed props? Is the ammoitem an item-in-item? I don't know the answer offhand, I would need to model it to see the behavior.

limpid gull
#

no errors or warnings.
ammoitem is dropdown in item with key-options ${fetchFromParent("lookup('itemsGear','uuid','gearType','Ammo','~')")}$, and label-options ${fetchFromParent("lookup('itemsGear','name','gearType','Ammo','~')")}$

manic crypt
#

I think that it's not updating the new dropdown values until you render the item again, thus reloading the item and updating the prop.

limpid gull
manic crypt
#

It might be a use-case for the recalculate() function?

limpid gull
manic crypt
#

I meant recalculate the ammoQuantity field as a separate line-item in the roll.

#

it doesn't seem to be that the value isn't being updated, just the field on the sheet.

#

Because as soon as you open the item, it's already correct in the number field.

limpid gull
#

yeah, maybe, but..

#

if we swap ${setPropertyInEntity('item', 'wpnAmmoCount', "hasammo ? ammoval + ammorel : '0'")}$ and ${setValues(ammoitem, 'ammoQuantity', "target.ammoQuantity - ammorel")}$, will not updating ammo in weapon (the red numbers), only ammo in gear

limpid gull
manic crypt
#

What happens if you change that number field into a label? I know it's harder to edit later (requires something like a button control with another number field to add ammo) but it could be something with processing the change from a number input field.

#

that number field meaning the Quantity feild on the ammo item

limpid gull
#

into a label? or text field?

manic crypt
#

One sec while I think more about it. It's 2am here so I'm not totally awake.

limpid gull
#

changing into text field didnt work

limpid gull
#

i can share system with you, if you want of course. but in some place you can find Russian πŸ‡·πŸ‡Ί languages (keys in eng)

manic crypt
#

if the keys are in english I can sort it out, but it'll have to wait until morning my time. I don't mind taking a look at it tomorrow.

#

or.. later today I mean.

limpid gull
#

ok

manic crypt
#

do you want to just DM me the JSON and I'll load the sheet and see what I can do with it, or should we get together later?

austere lava
#

Is there a way to keep a dice roll in a variable? So that you could chose after to keep the lowest or highest.
EG: [3d20] places in the varHat. Then use varHat to give the player a choice to only keep the highest 1 or 2 dice.

fading turret
#

The way my system handles iniciative rolls is by using this formula ${roll_formula:= dexterity_level == 1 ? '1d20' : dexterity_level == 2 ? '2d20kl1' : dexterity_level == 3 ? '2d20kh1' : '0d0'}$ ${[:roll_formula:]}$. Unfortunately it doesn't work into the Iniciative Formula in CSB, even if I try to remove the ${}$ of the second formula. I want to know if there is any way to make it work

manic crypt
fading turret
#

It's working perfectly! thanks!

manic crypt
fading turret
#

Actually, if you know any way to make a iniciative button in the sheet it would be great

manic crypt
#

Initiative is handled by Foundry, not by CSB separately, so it would require an initiative roll macro; just a label set to button mode then one of the various macro formats in a script to execute. It's a lot easier to just train your players to go to the sidebar and roll it through the interface when you're setting up the combat.

manic crypt
# limpid gull

@formal goblet When you get a chance, can you look at the behavior in the .gif and see if that's something expected? His formulae seem to work fine, and it doesn't throw any errors, but the ammo item seems to need to be opened and closed before the ammo count display will update. Is there some kind of refresh script that he could add to the roll formula to either bypass or automate that?

@limpid gull I poked at the JSON and I couldn't figure out a way to accomplish what you're doing without the same thing happening, so I thought I'd ask Martin.

formal goblet
manic crypt
#

Looks like exactly the same situation, thanks!

austere lava
#

anyone got an idea why my css is turning out like this? With a strange space on the left side.

.mcss-attributes-score-entries{
  border: 2px solid #54544f;
  border-radius: 8px;
  background-color: rgba(232, 228, 216, 0.3);
  width: 140px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0px;
  float: center;
  margin: 0;
}
#

The components inside the panel seem to be pushed a little to the right.

#

aligned to the right and left,

austere lava
#

Found the answer. Its a class called "custom-system-field-root" that gives everything a 10px margin-left.

deep lichen
#

I'm unsure if its the intended behavior, but if you have a negative value on a number field with relative modification enabled, and you click off of the field, it will subtract onto itself. It can cascade pretty quick. lol

formal goblet
deep lichen
#

Fair enough, just thought it was something you should know.

faint beacon
#

Is there anywhere that key values are set in the actor object? I see in the actor object that actor.system.hidden[x] is where hidden attributes are located. For example, I have a hidden attr 'STR' that is equal to ${STRCore + STRMod}$ -- how would I go about getting the value of STR? -- This is in reference for macros

copper glade
#

hi guys, I'm trying to grab the value off a dropdown on the sheet for a macro, but I can't find the right term, I have tried;
nDice = actor.system.props.drop_name.value;
I know it should be something like drop_name.selectedIndex but I don't know exactly

copper glade
sick bone
#

Hello, i'm new and trying to implement an old French RPG in FVTT with CSB but I have encountered a roadblock.
I need to link an actor of one type to another actor of another type (for example: linking an NPC actor as a mount to a a Player actor), but I can't find how to do it in the doc or the example module.

copper glade
#

Weird. I just get nothing in my message output for it then

formal goblet
copper glade
#

should it need parsed in some way to output in a chat message?

copper glade
#

Alright, it was coming back null, even tho the sheet has a selection chosen. Ugh I'll just use something else instead of dropdowns.

formal goblet
copper glade
#

dunno. If I make it a numfield it works just fine

#

it's fine, i'll just use that instead

sick bone
formal goblet
sick bone
faint wharf
#

I'm running into a weird issue. I have a lot of item instances already placed inside my characters and their spawns. At some point, I added new functionality that relies on a field which doesn’t exist in these previously deployed instances (saved characters, etc.), and now I’m getting errors because of that.

Is there a way to force-update all existing instances to match the new version of the item? I found a button that sounds like it might do that, but it only seems to affect presets, not the actual instances.

Sorry if I’m not using the right terminologyβ€”hope this makes sense!

formal goblet
# faint wharf I'm running into a weird issue. I have a lot of item instances already placed in...

The Button to reload the Templates of all Items only reloads those in the world collection. Meaning only non-embedded Items will be updated via this way. If you want to update embedded Items, you'll need a little script that will do so (item.templateSystem.reloadTemplate() for each item instance). Just bear in mind, that Items can be embedded into Actors, Actors into Tokens and Tokens into Scenes. So if you really mean ALL ITEMS, you'd need to iterate over all scenes -> all tokens (filtered by non-linked actors) -> all actors (indcluding the ones in the world collection) -> all items (filtered by the Item Template).

#

And this can take several minutes to do so depending on the complexity/size of your world

faint wharf
#

will this code do it for all?

#

can you ade me with such atomic script? i think it may be usefull for more people

formal goblet
faint wharf
#

will try thank you. Can i somehow access how far token is moved in combat? for example to track action points?

formal goblet
faint wharf
#

so i cant for example limit movement in combat to spped in character sheet?

formal goblet
faint wharf
#

ok

sick bone
#

Is there a way to get the image path of an actor using a fetchFromUuid() ?

formal goblet
sick bone
#

For example, i'm in the player character actor sheet and want to show the image of an NPC actor that serves as his mount and for which I have the UUID.

formal goblet
sick bone
#

That worked perfectly, thx.

#

The doc for the fromUuidSync() function and other are in the FVTT API right ?

formal goblet
sick bone
#

Guess I'll have to actually learn how FVTT to do what I want then. ^^'

#

Any advice on what to read ?

sick bone
#

Thanks a lot, now I know what my bedtime reading will be for the coming weeks. x)

silver lake
#

I'm looking to automate damage dealing. Is there a template somewhere I could look at for rolling a dice, checking a value in the target sheet, and if the roll goes over it, reducing a value in the targe sheet?

frosty niche
#

I have two dynamic tables with matching name columns between them, one on an actor, one on an item. Is it possible to make a single item modifier that adds from all the rows on one into the other, or do I have to make one item modifier for each row?

vocal sorrel
#

Hello, could I have some expert help on this roll-message? It is supposed to work like a radio button that sets all of the Item Displayer's Active checkbox within the item to to 'false' and then if the Active_Key that you are clicking on is 0, it sets it to 1. If the Active_Key was a 1 however it would set it back to 0 leaving no Active items in the Displayer.
I feel like there is a better way to go about this, especially when it comes to two different formulas here.

oblique willow
#

Is there a way to have vertical text?

restive nymph
#

Heya! Is it possible to add buttons to chat formulas? I.e. a re-roll button that appears after the result?

oblique willow
#

Why is my attribute bar not adding woundedCurrent like the other two health types?
They are copied identically (other than changing key values of course)

sick bone
#

Is it expected behavior when using fetchFromUuid(X,Y) where Y is a key that point to a boolean value of X it returns me a String value of the boolean ?
(Example: I use fetchFromUuid() from an actor to fetch the 'Equipped' value from an item on the character sheet, it will return me either 'true' or 'false' as a String instead of a boolean.)

twilit path
#

I'm using Custom System Builder + Foundry v11 and I keep running into this issue where I can't create a new actor because the type field is missing and throws an error. Has anyone encountered this issue before?

frosty niche
#

Is there a way to either show an item, and, more preferably, turn a formula directly into a string instead of a button that shows the formula, inside a roll message?

sick bone
frosty niche
#

Just to double check, though, this isn't a dumb way of doing item references?

#

This, specifically, I mean. @UUID[${!sameRow('uuid')}$]{${!item.name}$}

sick bone
#

You can add HTML & JS script in the roll message to show any element in the chat, including the image of the item but you will need to use a script %{...}% to get the image path to add in the <img> element.
Example : <img src="%{return fromUuidSync('INSERT_UUID_OF_ITEM_HERE.img;}%"> will add an image to the chat message

#

Can't tell you much about your way of using item reference in chat, but it's seems OK to use the UUID as long as you intend to show a specific instance of the item.

#

I'm still learning myself ^^

sick bone
frosty niche
#

Oh, turns out you don't even need to do the {${!item.name}$} part. @UUID[${!sameRow('uuid')}$] alone works.

sick bone
#

It seems so indeed, where did you find the reference to the @UUID[...] trick in the Doc ? there might be a way to add the image from the item with just another argument instead of using an <img> element.

frosty niche
#

I didn't. I just clicked and dragged an item into the chatbox and saw what it gave me.

sick bone
#

oh, must be a FVTT API function then

frosty niche
#

Then I went looking for "uuid" in the docs. Apparently there's a hidden column in the item displayer for it.

sick bone
#

You can see these info in the console when you display them in there

#

You can use the command fromUuidSync('REPLACE_WITH_ACTOR_UUID').system.props in the console and it will show you all the elements from the components in you actorsheet such as the item-displayers.

#

and you can get your actor UUID by clicking on the little book icon on the upper left side of the actor sheet

frosty niche
sick bone
#

I would be interested in that as well. Haven't yet dug the doc too much on that front though

quiet stump
#

I am struggling with the implementation of a fairly simple function. I want to create a hidden attribute based on a label cs_skmod. if the cs_skmod is 5 or less, the hidden attribute should be -1, from 5-10 it should be zero, from 11-15 +1 and from 16-20 +2. I tried it as in the instructions with a table with two columns and
${lookupRange('cs_table', 'Modifier', 'Score', cs_skmod)}$
, but it always returns ERROR.

frosty niche
#

Do you need single-quotes around cs_skmod?

#

Hm... Maybe not.

quiet stump
frosty niche
#

Modifier and Score, are those component names, or column labels?

quiet stump
#

Column labels

frosty niche
#

There's your problem.

quiet stump
#

I am so confused, I tried to replicate the example in the documentation. How do I get it to compare cs_skmod to the first column of cs_table and return the second column if it matches?

frosty niche
#

I don't have enough context (or experience) to tell you much more.

quiet stump
sick bone
#

Is cs_table a dynamicTable or an itemDisplayer ?

#

Cause lookupRange() only work on those 2, otherwise it will throw an error

quiet stump
#

it is just a normal table, that might be the problem

sick bone
#

That is the problem yes

#

normal table are nothing more than fancily displayed labels

#

They don't really have any relationship between their columns in the eye of the system

#

So you will have to change your cs_table to a dynamicTable if you want to use lookupRange() on it

quiet stump
#

I just did it, the ERROR is gone but now there is no result at all.

frosty niche
#

Really wanting for a way to have variable width panels and not have them vertically centered.

sick bone
frosty niche
#

Well that much I know. Was hoping not to have to break out the css for it, though.

sick bone
#

Yeah, me neither, but sometime you don't really have the choice...

sick bone
quiet stump
sick bone
#

As a general principle, names are only for display.

formal goblet
twilit path
#

Yeah I think I edited it to the point of breaking it, I'm starting from scratch

formal goblet
#

Try to redownload the system

formal goblet
formal goblet
formal goblet
formal goblet
sick bone
formal goblet
sick bone
#

Oh, so would you say that warrant an issue on the gitlab ? I was not sure if it was a bug or intended behavior.

formal goblet
sick bone
formal goblet
#

k, then probably a bug

sick bone
#

Ok wait a sec, I think I have found something off

#

Ok, if I first use fetchFromUuid(...) and store the result in a hidden attribute variable and then do a typeOf(...) on said value it returns me String but if I do typeOf(fetchFromUuid(...)) it returns me boolean.

#

Example:
If I defined an hidden attribute weaponRCrit with the following formula ${fetchFromUuid(weaponRight, 'critDouble', false)}$ and then do a typeOf(weaponRCrit) ==> return boolean.
But if I just do typeOf(fetchFromUuid(weaponRight, 'critDouble', false)) ==> return String.

formal goblet
sick bone
#

Even numbers will be cast as string when declared in hidden attributes ?

formal goblet
#

Yeah. But usually not an issue with numbers, because the usual operators coerce them back to numbers

sick bone
#

Was wondering why I was not forced to use equalText() for equality comparison on numbers stored in hidden attributes yeah.

formal goblet
#

Yep, and there's no string concat with +

sick bone
#

So if neither labels nor hidden attributes are 'safe' place to store boolean result, any idea of where I could store them on an actor sheet without having them turn into string ?

#

Ah, maybe hidden checkbox I guess

formal goblet
sick bone
#

I suppose it's on the to-do list then ?

#

Might be quite the breaking change

sick bone
#

'1 year ago', yup definitly in the todo list then. 😁 But wouldn't this change risk breaking systems developped using workaround in previous versions of the CSB ?

#

Like if I use equalText() to circumvent the issue of my boolean hidden attributes turning into a string, would that be problematic in the future ?

formal goblet
sick bone
#

So I guess hidden attributes wouldn't be affected by this change then.

formal goblet
sick bone
#

Guess then with the old labels & hidden attributes defaulting to 'string' like you said should be enough to ensure backward compatibility.

formal goblet
fresh arrow
lethal rover
#

Heyo, long time no post! I've finally come back to running my home system and wanted to make some incremental upgrades. Hit another wall (I've forgotten most of what I learned over a year ago now πŸ˜… ). I'm trying to roll dice using a text field in a dynamic table... I'm getting errors and I just want to know if I'm missing something super obvious or whether this just isn't a viable function.

${sameRow('WEAPONNAME')}$ : ${sameRow('DAMAGEDIE') + ref(sameRow('WEAPONABILITY'))}$ ${sameRow('DAMAGETYPE')}$

Currently outputs with the Weapon Name : ERROR Damage Type.

I've tried a few different things but this is the closest to outputting what I'm looking for. Take mercy for I am no keyboard wizard πŸ™

restive nymph
#

Could someone help me get my head around css. I've built the css in notepad, put in in the data folder and saved it as a .css but now, when I go to select it in the CSS style file in Game Settings, it won't show up?

vagrant hollow
restive nymph
#

Huh, I actually thought to try that already but still doesn't seem to be working, unless I'm making a very nooblike mistake?

restive nymph
#

Ahahaha I'm such an idiot

austere lava
#

Is there a simple way to get the number of entries in a Dynamic Table?

austere lava
#

Oh I didn't see count in the Repository

formal goblet
austere lava
#

Yes I just saw that. Thanks πŸ˜„ .

sinful spade
#

man looks like i've been missing a lot

latent moon
#

How do i fix this, i was told to delete the item ID but idk how

deft sluice
#

Hi @formal goblet ,
I don't know if it's a bug .. but everytime I use "use an extended text editor" in a chat message, all my > and < in an ${value}$ transform into &lt; and &gt;, and messed up all my condition πŸ˜‚

cerulean adder
#

Hello! Is there a way to get the system to pull up the radius tool when you click a button on the sheet? I know in other systems if you cast fireball or something, as part of the chat log it will automatically get you to select a circle template with a predefined radius to drop where you'd like.

sly mason
#

Has anyone created a HeroQuest system on Foundry? I am just loving this game and it would be fun to play online with my out of state friends.

#

Due to copyright stuff I would think we wouldn't be able to have adventures and stuff like that built in, but if we simply had a system where we could have the character sheets and NPC sheets and the dice rolls then users would just have to manually enter there adventures and PCs/NPCs and upload maps. But just to have the system available would be cool. Maybe it could even include the free download adventures from HQ. And there are people who make their own adventures that they could share.

keen lance
deft sluice
deft sluice
formal goblet
formal goblet
formal goblet
deft sluice
oblique willow
#

How would I make a roll label set initiative for that token?

faint wharf
#

please help. I have macro to randomize NPC it worked realy well and fast for long. but since updating csb it started to work reaaaaly slow like minutes to proces 3+ tokens. Do i use something depricated or something? please help

oblique willow
#

How would I add a modifier if the die roll was a certain number?

manic crypt
formal goblet
brave oar
#

Hi, I'm kinda unexperienced with Custom System Builder and I want to set up an inventory kinda like pic related (You click on the container in the inventory to look inside it). This is for an OSR system, so the backpack/belt pouch/whatever would have its own weight added to that of all the items inside it, and then the weight of the container added to the character's total encumbrance. I have no clue how to accomplish this or even if it's possible lol so I was wondering if any of you guys could give some pointers.

manic crypt
#

Have you read the wiki about setting up labels and then using the formulae to total them out? The value in the Total Weight label would look like ${sum(sum(lookup('<contents key>', '<Weight key>')),<base weight key>)}$

#

in the picture you have there, it would return 110, because you don't have a weight set in the base weight label.

deft sluice
#

@formal goblet Is it possible to add an option for coloring jauges ? for skills points,action points etc. 😊

manic crypt
deft sluice
#

Arigato πŸ‘Œ

#

Maybe an option for it will be easier for beginners πŸ˜…

#

If you have time @sinful spade can you take a moment to explain me your css class ? πŸ™

frosty niche
#

What's wrong with this item filter?
equalText(item.PerkType, "Advancement") and equalText(item.PerkCategory, CategoryA)
It works without the second term. CategoryA is on the item sheet as a text field.

#

Says it's an uncomputable token.

sinful spade
sinful spade
sinful spade
#

replace .meterclass with whatever class you give your desired meter(s) πŸ˜‰

manic crypt
sinful spade
#

i cant even code a single line of JS -- which i think bars me from any actual web dev job haha

lilac panther
#

I want to make a uniform size system, and I have information about it in one place.
But I need that information on every item and every character. Can I somehow access a dynamic table from another sheet?
Or can I make some static constant info and not be afraid of deleting it?

sinful spade
#

{rather by same information - i dont mean values , but the same fields}

lilac panther
#

Uniform size system, like, 1 = 2-5 meters no matter if it's an item or a creature
And stater is 0 = 1-2 meters, like a human and also a longsword or a greatsword.
I have values from -13 to 62 rn and redacting them in two or more places would be such a pain.

#

And a dynamic table to hold the relation of size number to meters it represents.

sinful spade
#

ok im following so far.
do you need to reference that in formula or something?
i'd think you could use a subitem template and place that into all your items as needed

#

-- or an item for actor sheets

#

as far as referencing it outside of the actor... I know i've seen others do it with JS but that's out of my league.

#
  • i suppose a CSB function would work as well find, lookup, etc... depending on your usecase
#

i've referenced dynamic tables from the parent actor in items before

lilac panther
#

I need to get the data from a table by key, i know how to do that, but the table has to be in some way connected to the field, either it has to be on the sheet, or through parent-child connection.
Subitem template is not an option, as i can't update it properly, as i want to add new sizes up to -100.

#

Yes, i am crazy

#

And also, can I update dynamic tables with code? So they can update on their own, when i do a specific thing

frosty niche
#

I feel like I must be missing something, here.
I have a perk in a class as an item. So long as you have the permission, if you try to move the perk to a character sheet, it removes it from the class. It seems like there's not even a modifier key to make it a copy.
So is having items in items that you're expected to copy over to your sheet not intended, or is there something I can do to make it so you don't have to go looking through the items list for a fresh copy?

sinful spade
sinful spade
#

now that's within sheet, you'll probably have to identify target actor somehow outside

lilac panther
#

and how are you looking up a field and not it's value?

#

how understanding this is harder than an actual code?!

sinful spade
sinful spade
#

idk if i follow correctly but sounds like your classes arent items themselves?

frosty niche
#

Doesn't work and yes they are, respectively.

sinful spade
sinful spade
lilac panther
lilac panther
frosty niche
#

Note that I opened the class from the actor.

lilac panther
#

thank you for the demonstration

sinful spade
#

are you moving the subitem from the class template?

#

thats how it looks

frosty niche
#

It's not a template. The template doesn't have any items at all.

lilac panther
#

i think it does that to prevent duplication

frosty niche
#

I mean ideally none of these things would get fully cloned without explicitly telling it to, and everything would be references, but I am given to understand that that's not something CSB does.

lilac panther
#

if you need to avoid that, you can use a UUID link:
@UUID[Item.mgY46jgoqYJGqO0U]{aaaaa}

frosty niche
#

So... What, have a big rich text field instead of an item display?

lilac panther
#

it works in rich text

lilac panther
#

it's not pretty, but

frosty niche
#

Hm... Maybe I can use a dynamic table, and have it look up the item by UUID for the description.

lilac panther
#

oh

#

you can add a row with a uuid link to the item container

#

or you can't?

frosty niche
#

Let's find out...

lilac panther
#

what i hate is, it can't see items inside other items to update them, when you reload all sheets. But i think it's a bug. (items inside actors too)

lilac panther
frosty niche
#

So close.

lilac panther
#

it's not a rich text, is it?

frosty niche
#

That's a label, there.

lilac panther
#

TIHI

frosty niche
#

Rich text is... Interesting.

lilac panther
#

what the hell is that

frosty niche
#

I switched it over to Dialogue Editor.

lilac panther
#

is it rich text or is it a label?

frosty niche
#

That's rich text.

lilac panther
#

so we can't put it on item container?

frosty niche
#

Oh wait what
that's what I was supposed to do? Uh, hold on...

lilac panther
#

nah, you can't

frosty niche
#

Just labels and meters.

lilac panther
#

yep

frosty niche
#

In any case, this isn't a half bad compromise. Dynamic table where you put the UUID in and it gives you the reference and description.

#

Can hide the UUID for players.

lilac panther
#

i just want to shoot that mf item container

frosty niche
#

It's certainly special.

lilac panther
#

it's so handicapped, that i want to put it at rest

#

i just want a checkbox, is it that much i'm asking for?!

#

i hope that next update would make item containers better

lilac panther
#

Just make the UUID field seen only by gm, so players can't break it

frosty niche
#

Yeah, probably.

lilac panther
#

I know i would)

frosty niche
#

Yyyyep, looks like it's not gonna take.

sinful spade
#

Has anyone figured out how to edit item displayer tooltips?

#

I'd love for there to be a display under there saying basic weapon properties rather than needing to open it (quick view)

manic crypt
sinful spade
manic crypt
sinful spade
manic crypt
#

it's a one-line change if you create a tooltip field in your items and change that line to item.tooltip. You just have to go back and change it when they update, or like you said, add a world script to change it on load. If an item doesn't have item.tooltip it already has a fallback of just showing Item in the tooltip.

sinful spade
#

i'll put that somewhere on my todo list.

manic crypt
#

The world script answer is definitely the better choice, after all, the other way you're mucking around under Linked and Martin's hood directly.

sinful spade
manic crypt
#

This section right here is the one generating the item on the item displayer: (the highlighted line is the tooltip instruction)

#

That's line 700.

deft sluice
sinful spade
#

you'll need a css file eventually, best to just do that.

#

or use the customcss module, i'd have done that in hindsight if i had known about it

manic crypt
deft sluice
#

And I choose the css file in the module's option right ?

sinful spade
#

though, it can be a bit annoying to navigate once you start getting large amounts of css in there.

#

maybe i should edit in custom css module then save it to my normal file once i'm happy with that 'component'? i wonder if that'd work.

sinful spade
manic crypt
#

In the csb settings options.

deft sluice
#

Sorry, english Is not my native language and it's early πŸ˜‚

sinful spade
#

my concentration is very low atm

deft sluice
#

So, in the meter I put "name of the class" in the css field, and I create a css file with the line of code you give me ?

sinful spade
#

yep.
just dont forget to name the meterclass in the code provided as well

#

also -- 0, 0, 0, 1 is black so . change that to whatever

deft sluice
#

Thanks, I will try πŸ‘

#

Can I put a html name instead of rgb values ?

sinful spade
#

why would you ever 😭

#

you can but i'll be very disapointed in you.
background-color: coral;

deft sluice
#

It feels easier, I'm really sorry, πŸ˜‚

sinful spade
#

bro out here color coding with 2012 minecraft color codes 😭

sinful spade
#

@deft sluice haha sorry I thought that'd be better received. Just pulling your chain. Whatever works for your sheet and time allows.

deft sluice
#

I'm not the only one who found it simpliestπŸ˜‚

sinful spade
deft sluice
#

It's already complicated for me, I will stick to a simple recoloring πŸ˜…

#

"keep it simple" like they said

#

(πŸ‘ for your sheet, it look awesome)

cerulean trench
#

im new to CSB's formulas, & am trying to figure out how to make the meter on the left hand sheet for the item "Vessel: Cat" equal the "Vessel Body" on the item

the meter seems like the best way to do hit points, but im struggling to figure out how to make it work?

cerulean trench
#

sorry the image didnt attach

sinful spade
#

Ah so how to make the meter value == a number value?

cerulean trench
#

yeah i made an item template for "vessels" which have HP ratings called "Vessel Body"

#

but im just struggling to figure out what formula would link it to show up in the left sheets item displayer

sinful spade
sinful spade
cerulean trench
#

im not sure, ive not worked with these formullas before. last time i set this up a friend did it so I'm completely green to this aspect

sinful spade
#

If so, we can just set the meter value to
${item.VesselHP}$ assuming that vesslehp is the component inside vessel: Cat

cerulean trench
#

so you need to do the item. before the tag you set it up as?

sinful spade
#

Pretty much!

cerulean trench
#

succcess on the rating one!

#

hmmm, the label text for rating worked, but the meter isnt

sinful spade
#

Btw just a UIX question for you,
But you are aware that if your hp is nested in an item you'll need to either code a button to modify it, or you'll need to open sub items every time.

It may be worth the time considering if that structure is best long term

cerulean trench
cerulean trench
#

is there a way other then meter that might be preferable?

#

OH it did work

sinful spade
#

It wasn't the meter I was bringing up but the actual number field value that may be irksome.

A dynamic table may be easier depending on your usecase

cerulean trench
#

i just didnt update the item on the sheet

sinful spade
#

And it looks fine? You just set it to be the max not the current πŸ™

cerulean trench
#

oh thats an idea

sinful spade
#

Oh good! Glad it worked

cerulean trench
#

yeah i forgot the item on the sheet wasnt the one i had opened

#

yeah the meter has the look id want but adjusting it would be a pain.

sinful spade
#

You can put a meter in a dynamic table with a bit of work fyi

cerulean trench
#

would i put that in the item or the item displayer?

#

i only see the option of a label or meter

sinful spade
#

Or if you're good with JavaScript you could just write a macro that updates health values for you, thought idk anything about that

deft sluice
sinful spade
sinful spade
#

No custom macros here haha

deft sluice
#

Maybe later, I will call you, I'm thinking of my magic system
There's damage multiplier for each magical element, weakness and resistance, etc.. ..

cerulean trench
#

yea vessels are numerous & more like items that have HP then anything. so it wont be tokens so much as just a way to track home damaged their current meat suit is

#

items just make it easier because there are tons of different vessel types for people to purchase, & drag/drop onto the sheet

sinful spade
#

Items can hold sub items no problem

deft sluice
cerulean trench
# sinful spade Items can hold sub items no problem

thats actually very relevant too, im reading through the chapter on them now, they can get "roles" & other options added to them. vessels are very complex. and this is just the core book for In Nomine, ive got like 5 more books of content to add to it once i get the base sheet ready πŸ˜„

#

im wondering if there is a way to setup buttons that might adjust a vessels body HP up & down. hmmm

#

ugh that would be complicated

sinful spade
sinful spade
#

Well I say 'slower' maybe the same time overall

cerulean trench
sinful spade
#

πŸ€” interesting

cerulean trench
#

i might have to give up on having an identifier for each vessel

#

and instead have a "current vessel HP"

#

heres how the pen & paper sheet looks,

sinful spade
#

Nah you can absolutely have the meter and it'll work no problem

#

I'm just obsessive about not having to click through tabs or open sheets I don't have to in my system

#

Also just workshoping ideas with you.

cerulean trench
#

so in this case they only use 1 vessel, but as a campaign goes on they will get more. like animals & other mortal forms.

sinful spade
#

Yeah I think you're on the right track with using items for vessels then... Opening their sheets isn't the worst thing

#

Well I guess it really depends on what tokens / actors you end up needing.

cerulean trench
#

ok i got it tracking the active HP vs max now

sinful spade
#

But anyway whatever what you want it to work.
You can absolutely have the meters displayed for shorthand in the item displayer for a quick view and have buttons for adding / removing 1 hp at a time (+1 additional interval of choice)

cerulean trench
cerulean trench
#

the mind & soul HP would also benefit from that as well, but thankfully those are just static so i can figure those out later. i mostly wanted to get vessels figured out since they are the more complex of the 3 types of character options

#

thanks for your help on this @sinful spade. im slowly figuring this out

sinful spade
#

Dude I get it haha.
I only got to where I am because of how helpful everyone here is, especially martin.

#

πŸ€”
You could stack all three on top of each other to display but that may get kinda cramp

#

Something like:
Mindvalue mindmeter
Soulvalue soulmeter
Bodyvalue bodymeter.
In either two columns or one column showing a 2x3 table with the content

cerulean trench
#

working on organizing the skills now.

cerulean trench
#

ok so now im running into my radio buttons for skills not being clickable effectively

#

so ill click one & sometimes it will select the one i clicked, but other times will just jump the selected one to another

sinful spade
#

I think that may have something to do with your radio key values

#

But I'm not sure, check for errors in the console

cerulean trench
#

that fixed it! the left hand side ones had it set to 0 vs the others just being blank

#

the way the game works this is really useful to have them laid out like this, because every skill comes with an untrained penalty. so these are the defaults if someone doesnt buy a skill up

sinful spade
cerulean trench
#

oh its alot of fun. its In Nomine by steve jackson games. same people who made gurps. you basically play angels & demons good omens style.

oblique willow
#

How would I make a roll label set initiative for that token?

oblique gyro
#

hey gang - I did my first session in CSB yesterday and ran into an issue where some actors' health and other resources were uneditable outside of their character sheets, like as values attached to their tokens. This even applied to me as GM. Any idea what's going on and how to fix it? You can see in the screenshots that the one on the left has the text for their health and other resource greyed out and uneditable, but the enemy on the right's health is editable.

manic crypt
# oblique willow How would I make a roll label set initiative for that token?

It would have to be through a script, initiative is handled through Foundry's interface normally, so its not a set function of the sheet. A way to do it could be to find a macro that does just that, then use that text along with some csb formulas to set the values it's looking for from the sheet. Encompass it all in a ${#%{}%}$ and it'll happen invisibly on the roll label. It's not something I've personally already done though, so outside that theoretic direction I dont have any hard examples.

olive trellis
#

hey i have a quick question i created a dynamic table for armor locations i want to sum up the armor value of all rows that have the specific locations checkbox ticked if the checkbox is not ticked it should just add 0 how would i do that? what i have so far is this for the head for example:

${(sum(find('armor', 'head') ? lookup('armor', 'av') : 0))}$

the problem is it adds the value of all rows even if just one checkbox is ticked

broken pumice
olive trellis
#

now it prints an error in the label

#

${sum(lookup('armor', 'av', 'head', true))}$

#

nevermind had a typo

#

sorry XD

#

thank you so much

broken pumice
#

You are welcomed πŸ™‚

formal goblet
oblique gyro
# formal goblet It depends on how your Attribute Bars are set up, because there are also read-on...

I think I figured out the issue - the ones that I can edit are essentially custom values, while the uneditable ones use a health attribute bar that's based on their max and current health values, which are established directly from their sheet. What would you recommend I do to make a functional HP attribute bar that directly ties to both a character's current_hp and max_hp variables? As far as I can tell, I can't tie a bar to two variables at once.

formal goblet
oblique gyro
#

Assuming I want the bar's values themselves to be editable on the token rather than having to open the character sheet to edit them, I mean.

formal goblet
oblique gyro
#

Perfect! I literally just realized it as you sent the message. Thanks a ton!

velvet heron
#

Is there a method to get one Dynamic Table to show as 2 columns? I can't think of any shortcuts to make it happen, figured I'd ask here.

velvet heron
# formal goblet wdym?

This table is quite long as 1 column, but there is enough space to its right to have it show as 2 columns, half where it is now, and the latter half continuing at the right of it.

#

Kind of like so:

formal goblet
#

I see. Not that I know though

velvet heron
#

Hm, very well. Thanks.

I had tried adding additional columns and naming them the same (e.g, 2 checkbox keys), but CSB really didn't like that. It would display correctly, but if I tried ticking any of the boxes, it would select everything.

I will keep it as is.

#

Related: I haven't been keeping up with CSB lately, but is it yet possible to have a table with, say, 3 columns display a component across more than 1 column?

For instance, column 1 would be one component like a Label, and columns 2+3 have another component, maybe a table or whatever.

sinful spade
manic crypt
#

He might be doing an operation on the column, like a lookup()

velvet heron
manic crypt
#

That COULD be less efficiently done with individual checks, (I did it recently) but it's not very pretty, code-wise.

velvet heron
#

I'm already not great with the coding aspect of it, I'd prefer to keep it as simple as I can.

manic crypt
#
if(${equalText(WepTypSel,"BW")}$){
if(${equalText(BWBV,"inf")?true:BWBV>1?true:false}$){let BV = '${concat("BV",${BWBV}$)}$';WepTyp.push(BV)};
if(${BWWU>=1?true:false}$){let WU = '${concat("WU ",BWWU)}$';WepTyp.push(WU)};
if(${not(equalText(BWWiA,"None"))}$){let WiA = '${concat("WA ","${BWWiA}$")}$';WepTyp.push(WiA)};
if(${BWAMiss}$){WepTyp.push("AMiss")};
if(${BWVAMiss}$){WepTyp.push("Var. AMiss")};
if(${BWAPers}$){WepTyp.push("APers")};
if(${BWVAPers}$){WepTyp.push("Var. APers")};
if(${BWAllPur}$){WepTyp.push("All Purpose")};
if(${BWFrag}$){WepTyp.push("Fragile")};
if(${BWMega}$){WepTyp.push("Mega-Beam")};
if(${BWHydro}$){WepTyp.push("Hydro")};
if(${BWDisr}$){WepTyp.push("Disrupter")};
return WepTyp;}%```

Spits out an array of the various selected checkboxes, when they're checked.
#

They're contained as individual checkboxes on the sheet, which allows them to be moved around.

velvet heron
#

That could work, but I'm not sure the juice is worth the squeeze.

sinful spade
#

You could also double up the lookup with the and, or functions

#

Or if you're looking for css solutions, you can just add a max height to the table and a scroll bar

velvet heron
#

It's fine, I can keep it as-is and just reorient the visual formatting.

manic crypt
velvet heron
#

I didn't think so, but thank you.

manic crypt
#

Unless CSS can make a div overwrite a following div, Scy?

sinful spade
#

Not sure why you'd do it that way, you could just make two columns and make the second column twice as wide? Same effect no?

#

You can't necessarily overwrite a div in css, but you can use pseudo selectors so select where things should be in a hypothetical div?

Like row 1 row 2... Row 3 doesn't exist but
Row-2::after

velvet heron
#

No because 1. resizing the window screws that up, and 2. there is no way of setting a specific width. There is only the guesswork of "Tiny" > "Gigantic"

sinful spade
#

Side note, you can set specific width with css, the csb just gives you quick access to predetermined values for ease.

sinful spade
#

Heck, their 'grid panels' are just basic bootstrap principles, you can just manually change the values and what not.. I have several '2 grid panels' where it's split 70% 30% not 50/50

velvet heron
#

In case it isn't clear, this is what I'm talking about. Blue is a 3 column table, orange are two components where one takes up one column and the other takes up 2.

sinful spade
#

So you're not even using rows

velvet heron
#

No, just columns

sinful spade
#

Then don't use a table, use a panel and set the width

#

Make it 70/30 instead of 50/50

velvet heron
#

How? Setting a panel with X columns still doesn't allow you to have something take up more than its column

sinful spade
#

Actually depending on what comments you're putting in there, you could just do a horizontal panel and let the components figure their own spacing out

velvet heron
#

Please show me, I'm not sure it's possible

sinful spade
#

Do you have a css file?

velvet heron
#

Yeah

sinful spade
#

Give the panel a class

#

Let me open my css file one sec I'll give you the code e

formal goblet
sinful spade
#

^ pretty much

velvet heron
#

Cool, thanks much. Cheers

sinful spade
formal goblet
#

No, but the normal style attributes are also listed there, so you can just map them

sinful spade
#
        grid-template-columns: 75% 25% !important;
        gap: 0px;
    }
formal goblet
sinful spade
#

had to go digging for what class it was haha

sinful spade
#

the gap controls your 'grid margins'

velvet heron
#

I will give it a shot.

sinful spade
#

anyway Teld, it seems that using a dynamic table for your list is what's limiting you in terms of horizontal spacing. Why not use a regular table with 4 columns? or even just 2 columns with a panel in every cell that contains the checkbox and label?

#

I hear that you want to use lookup functions but not sure how using a bunch of sameRows is better than just checking the value of the checkboxes

velvet heron
#

Which.. I suppose could be possible now that I think of it

sinful spade
velvet heron
sinful spade
#

very fair

#

the names are just for testing purposes 😭 dont judge

velvet heron
#

Hey @formal goblet , how many steps can a template's undo button go back? Is there a hard limit before it can't undo any more or does something else?

formal goblet
#

I think it was 10 steps in either side

velvet heron
#

Hrm, okay. Thanks

rocky sable
empty osprey
#

Hello guys, I would like to know if you had any YouTube tutorial videos to recommend For someone trying to learn how to use CSB ?

austere lava
#

How can you catch an 'ERROR' and/or replace it with a '0'?

manic crypt
#

fallback() could work for that, depending on the error.

austere lava
#

Ty that seems to have got it to work.

sinful spade
sinful spade
#

real quick, i'm trying to get an item filter to work based on names containing a partial string -- anyone have any ideas?

not even
equalText(item.name, 'sword')
is working

manic crypt
#

I have a thought, but let me try it out first and get back to you.

#

What's your desired use? A lookup?

sinful spade
#

nah, item displayer filter

#

i'd love to get all items with 'sword' in their name ideally

manic crypt
#

Ah, right. You said that.

#

I'm thinking something with compareText() might work for it, but I want to see what the output looks like.

sinful spade
#

is that not the same as CSB's equalText?

manic crypt
#

nope.

#

and it's math.js's equalText(), they're both from that library.

#

And.. nope, that's a miss.

#

same output for 'Mace' as for 'Sword, Long' from its perspective (compared against 'sword')

#

It could be done more indirectly with a script, but I don't know that's what you're after.

sinful spade
#

haha it's okay, totally unecessary

#

thanks for looking out tho

manic crypt
#

it's sort of frustrating, tbh. Like if it would just look at a script form, something like %{let text = "${item.name}$";let result = text.toLowerCase().includes("sword"); return result;}% should return true, but it doesn't seem to want to nest the formula delimiters.

frosty niche
# frosty niche

Aha! I did it!
I looked at the actual HTML for the item reference, copied it over, and stripped out anything that didn't look important and didn't make it break when it was removed.
<a class="content-link" draggable="true" data-link="" data-uuid="${sameRow('AdvancementUuid')}$"><i class="fas fa-suitcase"></i>${fetchFromUuid(sameRow('AdvancementUuid'), 'name')}$</a> This, in a label, works.

manic crypt
# sinful spade thanks for looking out tho

Sometimes I can't leave well enough alone. I got it working, with two caveats that make it a bit sub-optimal. The first is that you need to create a checker label on each item template. The second is that the code is for exactly one item displayer that can be filtered. The result though, looks like this:

sinful spade
manic crypt
#

The code on the item (key = itemFilterMatch) is: %{let text = "${name}$";let result = text.includes("${fetchFromParent('filterValue')}$");return result;}%

#

And then the filter config is just:

#

itemFilterMatch is the code on the item.

#

well.. it doesn't SORT them, it just hides anything that doesn't match the filter. And it's limited to one filter, so having multiple ID's with their own filters won't work for it. It's not a perfect solution.

#

but if you blank the filter it does show all the items.

sinful spade
#

god you're beautiful πŸ˜‚
i'll be snagging that and making it beautiful soon

manic crypt
frosty niche
#

GM Side:

#

Player side:

#

Items can be clicked and dragged into sheets without removing them, and it doesn't create any item embeds.

#

Wish the item references in the description labels worked, though.

manic crypt
#

Looks really nice though, congrats on overcoming!

sinful spade
empty osprey
sinful spade
#

you're like the 10th person i've seen in here askin

empty osprey
#

HO YO

#

Thk's lad

sinful spade
#

yt upload times probably mean check back in a few hours

#

and it's not comprehensive or anything, just a strong set on the basics - most middle level stuff. didnt cover csb functions or anything. that's for a later date.

empty osprey
#

I've been browsing the wiki for six hours, but a video really helps !

And the basics are already good; this is stil a good starting point !

sinful spade
#

I'd always setup my pdfs in a reader and tolerate the awful ai voice before i read anything lol

#

I think this'll get you pretty dang far. Some to be desired with dynamic tables - mostly because i avoided getting into csb functions and what not.

#

at least, i think this'll get you far enough that you're in here asking the right questions while i work on another video if there's demand for it

sinful spade
sinful spade
# empty osprey I've been browsing the wiki for six hours, but a video really helps ! And the b...

This tutorial covers the basics to intermediate functions of CSB without the use of JavaScript. We cover item / actor templates and sheets, as well as what most of the components do at their core.

We do not cover CSB provided functions, or advanced uses of components (aside from the label), which will be left for another tutorial if there's en...

β–Ά Play video
#

@formal goblet consider pinning this if you approve? may eliminate a fair chunk of your repeat questions

sinful spade
#

Also even if you know csb please interact with the video πŸ™ help get it to the top of the list for new visitors

hard cedar
#

Hi HWhat is the old command fetchfromdymanictable command been replaced with, as I am getting errors.

manic crypt
empty osprey
lethal rover
manic crypt
#

Like if a value in a dt was set to :1d8: it would reroll that every time the sheet refreshed

lethal rover
# manic crypt Can you give a little more context? Generally you can't use rolls in anything ou...

This was my suspicion. I essentially want to set up a way for my players to input the dice they want to roll when using their gear. For example, the damage die for their weapons. I know there is a more sophisticated pathway of creating the items and having things run through there, but I'm currently in the playtesting stage and would rather have a more flexible way of inputting and processing that information.

#

A.k.a, create text box for players to put 1d6 + 2, click a button and it rolls that out.

#

This is how I have it set up currently.

#

Managed to get everything else working other than the rolling of the damage die.

manic crypt
#

OH, that's much simpler. You want to take the text of the Damage Die field and have it roll that. Not what I was thinking at all.

manic crypt
#

And what you're looking for is the text output line, right? So you'd like to have a text output that says "Sword : 1d6 + 1 Slashing", correct? You have the rolling part covered?

#

or do you need the whole damage roll handled too?

lethal rover
lethal rover
manic crypt
#

Working on an example for you to go off, essentially you're not rolling anything there. One sec and I'll be done and then you can edit it however you like πŸ™‚

lethal rover
#

This is how it currently outputs for reference.

#

Happy with the top row, need the error section to roll the dice from the text box.

formal goblet
lethal rover
#

The reality being I actually had it like that before makes me very upset.

manic crypt
#

I did guess about the key for the Ability Modifier, so fix that if it's something else.

sinful spade
humble geyser
#

How do I show a custom stat on a character sheet in a Rich Text Field

#

Cause I know that when I drag and drop an item or chacater into the Rich Text Field it show as this: @UUID[Actor.8GnUu61ZlIiJcJ2z]{Talion v2}

#

So how do I get it to recall a Label that has the key of CON

sinful spade
humble geyser
#

inside

sinful spade
#

fetchFromActor('John', "Strength")

#

Oh, inside the same sheet? Just reference it normally

#

${CON}$

humble geyser
#

Tried that, doesn't work inside of a rich text field

#

like nothing seems to work

sinful spade
#

You can try to be more explicit with ref() but I don't think it'll help.
You may just need to use a regular label with inline styling

humble geyser
#

I just want my players to be able to take notes about there characters here, and be able to make it where it can auto recall a stat in said notes, so it will change as they lvl it

sinful spade
#

You could also try playing with the escape quotes function to see if it lets anything through

humble geyser
#

nope, didn't work either

#

damn

sinful spade
#

yeah i think you're stuck with a stat section somewhere either above, to the side, or below the rich text area.

sinful spade
humble geyser
formal goblet
#

RTAs don't resolve Formulas

manic crypt
# formal goblet RTAs don't resolve Formulas

Would an enricher-like system be a feasible feature request? I see that there's a mod (MoreJournalEnrichers) that lets you set a variable enricher with key, which I assume (I haven't played with it yet to be sure) can be tied to a document value. I can see how an additional system of delimiters would be confusing for some people though.

cursive heron
#

Hi everyone. I will inevitably be back with questions later, but for now I wanted to say CSB helped me complete NaGaDeMon (National Game Design Month) last year in November and I just wanted to drop in and say thank you for giving me the tools to do that and run my game in Foundry.

raven raven
#

Hi, is there any way to present the current status of a charcter that I choose from a dropdown menu on the character sheet at the token... so i mean like a health bar.... but with text.... it would say, wounded, blodied, dyeing, dead?

proven lily
#

hey so i am wanting to trry and use the UESRPG 3e (the unofficial elder scrolls RPG) and im wondering if this system would be a good base for it?

hard cedar
#

Another question. The character templates seem to be getting larger due to template history being stored in them. This seems to make the actors and world slow to load. Is there an easy way to remove this besides editing the Jason file?

#

"Json" file

manic crypt
bleak marsh
vagrant hollow
deft sluice
proven lily
elfin lark
#

I got to come here for help again. Cant for the life of me figure out how to get the desired result.

${roll > [:Skill_Aim:]? 'Failure' : 'Success'}$

${roll > fetchFromActor('target','Exploit', 20)? 'Exploited' : 'No Complications'}$```

I want to change this so that the ```${roll > fetchFromActor('target','Exploit', 20)? 'Exploited' : 'No Complications'}$``` only activates if there is a targeted token with an Exploit variable
formal goblet
elfin lark
elfin lark
#

uh... what?

formal goblet
elfin lark
#

ah okay, thank you

cerulean adder
#

Is there a way to get a button to appear in the chat box to activate a different roll? Like if I do an attack roll from the sheet can I get it to create a damage roll that you can use in the chat box? Is there an example?

bleak marsh
#

It's not a full blown button (looks like a link) but I managed it with this (which is the foundry chat commands)
Hello, [[/r 3d10]]

#

it gets you this

#

I imagine you could replace the dice text with a specific formula too, as long as it results in the standard dice format "[number]d[sides]"

bleak marsh
#

oh, the button's kinda easy actually (in this example I connected one to a chat macro to test it, and one for just a roll formula)

cerulean adder
cerulean adder
bleak marsh
#

I don't know if you can do it with just the roll command... you can do
<button>Roll Damage [[/r 3d10]]</button>
and that would say "Roll Damage vtt 3d10" on it , but I don't know about replacing the roll text...

sinful spade
#

I'm bored and too lazy to work on my own sheet right now - system design road block.
Anyone need any help with anything?

cerulean adder
cerulean adder
sinful spade
cerulean adder
#

I'll start trying to tackle that! Thanks! If shadoghast reads this an example will help go a long way!

formal goblet
cerulean adder
#

The system is kind of big and clunky and each body part has AC and Health so it would speed up combat a LOT to be able to apply that with a tool.

formal goblet
#

Then you can just use setPropertyInEntity() from the sheet or actor.update() in a script.

cerulean adder
#

Perfect! I'll see what I can get cooking!

velvet heron
#

If an item placed in an actor sheet contains a dropdown list (only numbers), the sheet should still display the dropdown selection if there is a label on the sheet referencing that, no? I keep getting an error.

#

Actually, it appears it still displays ERROR even on a brand new actor with no items on it, so it must be a wrong formula.

manic crypt
velvet heron
#

Welp, part of my issue was that I was looking at the wrong component, so wrong key. DERP. Corrected that but still blank readout.

Here is the item (middle), the item template (right), and the dropdown component w/ key.

So if the character sheet contains this item, then what formula should I be using for a label on the actor's sheet referencing this item key?

frosty niche
#

Is there a way to check if an item has a parent?

#

And on a less specific note, is there a standard way to mark where a particular item is? Eg equipped, dropped, specific bag...

manic crypt
manic crypt
frosty niche
#

Neither does isNull(parent)

#

isNull isn't defined.

manic crypt
#

There should be something like that from the math.js library, one sec.

#

${equalText(typeOf(fetchFromParent('name'),"null")?"no parent":"parent exists"}$

#

I was clearly adding functions to math.js in my head again.

frosty niche
#

Seems like it always returns false.

cerulean adder
#

If you call a function in a chat bubble can you pass values to it? So if I roll 1d6+5 damage can I pass that value to the funtion to know what to subtract?

#

chat log I mean

cerulean adder
#

Right, so I'm doing most of the Attack and Damage rolls in the character sheet. They then appear in the chat and I can create a button to roll the damage right in the chat so I don't have to go back to the sheet to roll damage. Now I'd like to pass that damage value to a script so I can select an actor and have the script decrease their health. Is that possible?

frosty niche
#

I don't know about that exact sequence of events, but there should be away to get the current targeted actor.

cerulean adder
#

I'm using this to get the AC so I'm sure I can grab the Actor ID.

{#targetAC:=fetchFromActor('target',bodyValue,'99')}$

But I'm just going to have the GM select the token and have them decrease the HP. The real issue I'm having is how to pass the damage to the script

frosty niche
#

@cerulean adder You said you put a button in the chat message? How'd you do that?

cerulean adder
frosty niche
sinful spade
velvet heron
# manic crypt The easy way to get it on a sheet is to have the reference in an item displayer,...

You're right. An item displayer was the correct choice. I'm just confused about how the item filter formula works, even after reading the directions about it on gitlab. It says The Item Displayer will only display those Items, for which the Formula resolves to true.

But does this mean if the filter formula resolves to true, it will display the item in the container, or will it just display the value for the filter formula? Because it appears to be the former, but the wording makes me think the latter.

manic crypt
#

It's the former. You type in a formula in the filter that has a boolean result (true/false or 1/0) without the normal ${}$ delimiters, and if the formula, from the Actor's perspective (meaning that if you're looking at keys on the item they have to be worded as item.key) resolves to true, the item appears.

velvet heron
#

Bet. Now, if I only have the one label column inside this item displayer for the value I'm looking for - which does display correctly - how can I make just the value appear and not show the boxed item name?

manic crypt
# frosty niche Seems like it always returns false.

I wasn't in front of my computer then, and I'm awful at coding when I can't type and see what I'm doing wrong, so I probably jacked something in the code there. Did you get it working?

On a related note, any item without a parent of some kind (either an Actor or a parent item in the case of item-in-item) can't really interact with anything, what are you trying to make happen?

manic crypt
frosty niche
#

Unless you know a better way to store metadata about items on the sheet.

sinful spade
twin goblet
#

hello guys,

i have a problem with weapon damage.
i entered the damage as two data (string and number):
base dice count ${item.Weapon_Damage}$ - e.g. 2d6 and a calculated modifier (number), which can be + and -
there is no problem with the - value, because it is stored with a sign.
but i can't insert the + value. everything works fine separately, but not together.

The calculated modifier (this is in one of the lines of an item displayer):
${item.Weapon_Level == 0 ? item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_DamageMod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_Level == 1 ? item.Weapon_damage_mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_Damage_mod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_damage_mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_Damage_mod', 'Weapon_Level', '${(item.Weapon_Level)}$'))}$

So what I was able to achieve was to insert the line ${item.Weapon_Damage}$ into the label prefix.
I inserted the calculated modifier into the label suffix.
The result is that e.g. it calculates and displays the value 2d6-1 correctly, but instead of the value 2d6+1 it displays 2d61. Skips the + symbol for positive numbers - which would normally not be a problem.
I tried to enter a condition like this in the label:

`${#DamageModNumber:=[${item.Weapon_Level == 0 ? item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_Damage_Mod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_Level == 1 ? item.Weapon_damage_mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_Damage_mod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_damage_mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_Damage_mod', 'Weapon_Level', '${(item.Weapon_Level)}$'))}$]}$

${DamageModNumber > 0 ? '+' : ' '}$
`

#

this works by itself, but... the result will be e.g. 1+, because I do the analysis at the end, and I don't know how to hide the calculation before it, or change the order.

If anyone has any insight or solution, I'd love to read it.

formal goblet
twin goblet
velvet heron
sinful spade
#

^ Solved πŸ™‚

sinful spade
cerulean adder
#

Okay, I was able to get a script going that allows the user to input the damage, select the body part targeted, and input how much to modify AC by. It works great but I was wondering if there was a way to pass results from a sheet roll to the script? Instead of inputting damage and all that would be awesome to click a button and have all of this information autofill and apply it to the selected token.

sinful spade
#

Has anyone sorted Dynamic Party Sheets yet?
Had all sorts of ideas to get a sheet where i could drag actors onto it like an item displayer but just realized that I cant actually do that lol

#

I could put an item in all character sheets that reference their stats, but then how do i real time clone those to a mirror item in the party sheet

manic crypt
sinful spade
#

I was thinking about that, i may be able to
fetchFromActor(sameRow())

#

that'd let me get most of their important stats, not nearly as convient as just a dragdrop actor dispalyer

#

but it's doable

manic crypt
#

It would only need to be set up once.

sinful spade
#

i meant less convenient since it'd be based on actor name (MAYBE UUID) but if player changes the name, even accidentily since it's a big editable bar at the top... it'd break

#

idk how spaces interact with the name field

#

may cause issues in diagnosis

manic crypt
#

I've never had a player accidentally change their name lol.

sinful spade
#

🀷 i plan for worst case senario. play players sent me on a 15m bug hunt because the info they entered int he character creator wasnt shown on their actual sheet.... they never hit save on the rich text areas

#

they're not computer-y people

#

honestly a part of me is worried about my stats being dynamic tables for the same reason

#

one errant click and space into the name field? oops there go all my refs

#

Maybe i'll hide the input and show a ref label there lmao

manic crypt
#

That's going to be an issue you just have, unless you have the whole sheet locked down with a checkbox to allow editing.

sinful spade
#

yeep.

#

at least on critical areas (referenced names etc)

sinful spade
#

I wonder if there's a way to auto populate a drop down with all existing actors

manic crypt
#

ALL the actors? You could write a script that selects all the actors that are controlled by players and then populate it with that.

sinful spade
#

Probably a case of using a formula that gets all actors using a given template plus another template (players vs npcs)

twin goblet
# sinful spade and you solved the + not showing up as well, right?

The + symbol was fine in the end. I simply added it to the label prefix πŸ˜„
you can see the result in the picture, and the code behind it looks like this (ugly, but it works):

label prefix:
${item.Weapon_Damage}$+

label suffix:
${item.Weapon_Level == 0 ? item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_DamageMod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_Level == 1 ? item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_DamageMod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_DamageMod', 'Weapon_Level', '${(item.Weapon_Level)}$'))}$

label icon:
dice

dice code:
${item.WeaponName}$ damage: ${[:item.Weapon_Damage:+:${item.Weapon_Level == 0 ? item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_DamageMod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_Level == 1 ? item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_Damage_Mod', 'Weapon_Level', '${(item.Weapon_Level)}$')) : item.Weapon_Damage_Mod+(item.Weapon_Type == 1 ? Strength_Damage : 0)+(lookup('Weapon', 'Weapon_Damage_Mod', 'Weapon_Level', '${(item.Weapon_Level)}$'))}$:]}$

sinful spade
twin goblet
sinful spade
#

Glad it helped!

#

there's a steep learning curve to csb but it's a godsend

formal goblet
sinful spade
#

still no shabang

formal goblet
sinful spade
#

! A charm!

#

Thanks martin!

cursive heron
#

Cannot get a button to roll with my Strength mod following your tutorial @sinful spade and I cannot figure out what I've done differently from what you demonstrated.

It's literally just this and I've double checked that it's making the right reference to the component key... There's so little here idk how I'm screwing it up?
${[!1d20]+STRmod}$

sinful spade
cursive heron
#

oh wait, duh. Yeah there is, I forgot I refreshed.

sinful spade
#

You've included text inside the strmod label, it needs to only be a number. If you'd like it to have words before the number include them in the prefix or suffix πŸ’ͺ

cursive heron
#

Ah it's trying to convert the whole label, not just the number part.

#

Yeah, I get it now. Lesson learned, look at error logs.

sinful spade
#

πŸ˜‚ all good, martin caught me slacking too many times for me to shame you

cursive heron
#

Thank you so much. For the tutorial and helping me out.

sinful spade
#

No problem, happy building!

sinful spade
#

Martin, i've got a function that's working fine as a label but when added to a meter is errors out. no error in console?

#
${fetchFromActor(find('memberList',  'actorDropdown', 'tableIndex', 1, '=='), 'healthCurrent')}$
#

when placed in a label it outputs: 6

#

in a meter it comes back as just 'error'

cerulean adder
velvet heron
#

Do Panel titles allow for formulas or fontawesome icons?

velvet heron
#

Second question. It looks like the timing of the mouseover tooltip for components is about 1 second, is it possible to change it to be faster/instant?

manic crypt
velvet heron
#

Shame. Thanks, still.

manic crypt
velvet heron
#

I feel like this might be possible, but I'm not smart enough to figure out the coding part of it.

If I have two checkboxes, can I get it so that if one checkbox is ticked, the other becomes untickable somehow, and vice versa?

manic crypt
#

That's how Radio Buttons work

velvet heron
#

I realize that, but once you select a radio button, it remains permanently selected until you select another one. I also need to be able to deselect a radio button, which AFAICR, is not currently possible.

manic crypt
#

Make a third button with "None"

velvet heron
#

Damn, that's one of those solutions where I smack my forehead and go, damn that was so simple, how did I not see it?? lol

sinful spade
#

Also if you really want to use check boxes, you can have them set the other ones visibility formula to false. That way if one is checked you can't see (and can't click) the other.

#

Dunno why you'd want to do it that way, but you 'could'.

velvet heron
sinful spade
#

depends on what you're putting in it i guess, you'd be limited to hard coding the contents within that label as well which'll eat your time.

#

You could use a label with a collapsible panel right below it.

#

[label]
[panel]

#

then css style them to look like it's one element