#Custom System Builder

1 messages Β· Page 30 of 1

bronze moon
#

it shows img.profile-img

#

that was my reason for asking

brave trench
#

Installed 3.1 and having some issues...

For starters I can't open a character sheet. What does this error mean?

formal goblet
brave trench
formal goblet
stone swan
#

That doesn't seem to have helped?

bronze moon
#

Can you limit the number of items in an item container

acoustic geyser
#
Rolling Combat Skill: 
${rawRoll:=[1d100]}$
${#macroResult:=%{return await game.macros.getName('KNRollD100').execute({skillVal:${combatSkill}$,advVal:'${advGroup}$',skBonus: ${bonusPenaltyVal}$, roll: ${rawRoll}$})}%}$
${!macroResult}$``` i'm seeing `Unexpected token ','` from this output from a CSB system. anyone know where the stray comma is?
viral hornet
#

Hi - I am a complete noob at this, I have written and designed rules for a pretty complex TTRPG in the Fallout Universe and am trying to build a system in it. Sorry in advance for any stupid questions.

Is there a way to reference text from text fields in the character sheets when doing rolls? I.e. for the roll text have " <character> makes a STENGTH roll with a score of 15" and for the system to automatically pull the text from one of my text fields on that players sheet?

#

Or just to pull text from text fields in general... everything I have seen on the github is only referencing how to deal with numeric values

stone swan
#

Yes, though the answer is somewhat dependent on what kind of text you want to pull and where the field and button are located.

viral hornet
#

I just want to pull the characters name - and add it to rolls

which isn't exactly critical for the game, but there is a lot of stuff like that I may want to do in the future so I'm just trying to figure out how it works

#

is there any reference material you could link me to that might help?

#

the button is on the character's sheet

#

for the roll

#

as is the field

stone swan
#

Yeah and if it's just the character's name it should actually be a lot simpler than arbitrary text. Quick question, is the name the same as the name of the sheet and/or token or does it need to come from a field specifically?

viral hornet
#

In this case the sheet is named test_pc and there is a field called "pc_name"

#

so in this case it needs to come from a field - but this is such an early build that I would probably change that in the future

#

I've only had Foundry for a couple days now so I'm just playing around with the CSB and trying to understand it

stone swan
#

We've all been there. I'm asking these questions because they can change the answer.

viral hornet
#

yeah - I'm sure they can, I really appreciate the help!

stone swan
#

The short version is you can reference other fields in script formulas by calling their key. So if you include something like ${pc_name}$ in the roll message, it'll output the contents of pc_name, the same way it would output the contents of a strength field, or what have you. It gets a little bit more complicated if you want it to properly handle formatting and/or formulas in the text field, but that doesn't sound like it should be an issue for you.

#

You might want to read the formula system page on the wiki for more information on that.

viral hornet
#

oh wow - that was so easy, I had been adding the : : 's the whole time and screwing it up hahahaha

#

that was way easier than I was making it - thank you!

stone swan
#

With that said, name is a special case, since it's a reserved key that every sheet and token has. If you use that, rather than something like pc_name, you can do fancy things like this formula:

${fetchFromActor('target','name','error')}$ takes ${[round((1d20+(:Boosts:*4)+1)/20)*(:Cal:*5)]}$ damage

The fetchFromActor() bit lets you use foundry's targeting feature to select an enemy token and automatically get their name for your message and, because it's using the generic name, rather than something that's PC or NCP specific, it should work for any target.

viral hornet
#

Thank you! I will save this to a document because I will certainly use it eventually!

stone swan
#

You only need the :: if you want to reference fields in actual rolls, not just CSB scripts. I've seen that mistake before, so here's a quick breakdown that might help you.

You can write three kinds of scripts:
β–ͺCSB scripts/${}$ anything between the dollar-sign currly braces is going to be a CSB script and will use CSB formating. You normally shouldn't need to do special things to reference other fields in this case (though if those fields are in dynamic tables or item containers/item you will.
β–ͺTS Scripts/%{}%: Anything between the percent-sign curly braces is going to be Type Script and it can do most things you'd expect from Type Script. This can be really powerful and CSB has it's own API that can let it go even further, but it does tend to increase the complexity of the script, compared to just CSB scripts.
β–ͺRoll Formulas/[]: These use foundry's roll api to roll dice. They have to go inside CSB scripts, that are themselves inside Label roll messages. Also, since they use Foundry's api, if you want to pull something from CSB into them, you need a way to tell it to pass the appropriate value along. that's where the :: come in.

You can read more about Roll Formulas in the section of the same name of the document I linked you.

Additionally, you can nest CSB and TS scripts, if you want, but you should read the Transfering Data section of that page first.

#

Actually, speaking of fetchFromActor and target, is there a way to specifically get token data. So, for example, if you have a bunch of monsters based on the same sheet, but you used token mold to give them different names as you dragged them to the canvas, could you have your formula reference their token name, to make it easier to see which one is being targeted?

viral hornet
#

I know there is a way to do so by putting the 'target' command somewhere lol

#

that's about all I know about that haha

formal goblet
stone swan
#

I think game.user.targets.values().next().value.name gets the closest? It's a bit of a mess though. Also, it only seems to return one result, even if multiple tokens are targeted, and I'm not sure how to correct that.

formal goblet
formal goblet
stone swan
formal goblet
stone swan
#

Specifically, it seems to be converting the '>' into '&gt', which is new and interesting.

formal goblet
stone swan
#

It kind-of has to be, with how the Stuff of Legends works. When I first started poking at setting up the system, you actually helped me come up with the script that would let the Label properly execute the code in the Rich Text Field. At the time I was using a Dynamic Table, but after the update I made some minor modifications to make it work with Items and Item Containers.

formal goblet
#

I think at this point I'd give a fuck about CSB-Formulas and do the whole thing in a single Script (including fetching all necessary values)

stone swan
#

Honestly, I started considering that after the forEach version and that's probably what I'll go with. It should also let me handle single target vs multiple targets a little bit more gracefully.

formal goblet
#

You also have full access to the options of a ComputablePhrase now (including hiding the result, showing FormulaExplanation, local Variables, etc...)

bronze moon
#

Ok i just realized that all item containers on a character are a single container is that correct?

formal goblet
bronze moon
#

Yep thank you for the confirmation. I was really hoping they were independant

stone swan
# formal goblet You also have full access to the options of a ComputablePhrase now (including hi...

It's already using computable phrase. Just for reference, here's the original version, that you wrote:

%{
const ref = '${!sameRowRef('CombatAbilityMain')}$'.split('.');
const rollText = foundry.utils.getProperty(entity.system.props, ref.join('.'));

let phrase = new ComputablePhrase(rollText);
await phrase.compute(entity.system.props, {
  computeExplanation: true,
  triggerEntity: entity,
  reference: ref[0] + '.' + ref[1]
});

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

phrase.postMessage({
  speaker: speakerData
});

throw 'done';
}%```
and here's what I've done with the update so far:
```TS
%{
const rollText = foundry.utils.getProperty(linkedEntity.system.props, 'ComAb');
let phrase = new ComputablePhrase(rollText);
await phrase.compute(entity.system.props, {
  computeExplanation: true,
  triggerEntity: entity
});

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

phrase.postMessage({
  speaker: speakerData
});

throw 'done';
}%```

It works for basic usage, but breaks if you try to reference other fields on the item or if you try to the key in `item.Key` form, so I'm trying to get a better handle on how Compute phrase works, so I can fix it.
stone swan
iron badger
#

Hi, total newbie to CSS and CSB here. How can i change the font type on CSB?

toxic lintel
#

can a player change the template on their sheet, and thereby lose their data? If they can, how can I lock that down?

brittle moth
dusty barn
#

My programming mojo is miniscule and I am trying to figure out the best way to impliment the Kamigakari spirit dice mechanism. How it works- The player rolls a set of six sided dice (spirit dice) and sets them aside. He may exchange portions of his various skill checks and attack rolls with the spirit dice changing the pool and improving (or worsening) his checks. The spirit dice pool is also used to activate abilities and cast spells using various dice combinations.

#

Any recommendations are appreciated

earnest imp
#

oh sweet 3.1.0 is out o:

#

time to backup and migrate

formal goblet
dusty barn
formal goblet
dusty barn
dusty barn
formal goblet
formal goblet
earnest imp
#

quick question, how do i update my csb from 3.0.0 to 3.1.0?

formal goblet
bronze moon
#

Can the same keys be present in multiple Item templates? I am assuming yes but want to confirm

vagrant hollow
bronze moon
#

This makes life much easier

#

Because I can add a filter to an item container that searches for a specific field

#

Now to figure out how to do that lol

#

So what I am looking to do is create a filter that searches a drop down and chooses a specific answer. Main Hand, Off Hand and so on

#

and only displays items with that selection

bronze moon
#

I really thought this would work. Any hints?

ref(item.Weap_Hand)= Main_H

faint wharf
bronze moon
#

Haha i guess not. @formal goblet will swoop in with a direction for me to search and ill share whatever i find

faint wharf
#

yee i tried to use regular conditions but it looks i did something wrong: item.typ=='ubrania'?true:false

bronze moon
#

The Item filter formula already searches for true false

faint wharf
#

item.typ=='ubrania' does not work eighder

bronze moon
#

and you need to at least ref(

faint wharf
#

checked

bronze moon
#

item.typ alone wouldnt search for anything would it?

faint wharf
#

oh

bronze moon
#

dont get me wrong i know i am missing something. because

ref(item.Weap_Hand)== 'Main_H'

Doesnt work either

faint wharf
#

so i have one to one issue like you ref(item.typ)='ubrania' also not working

#

at same time a checkbox i use as fiiltrt item.EQ works alike a charm no added things

bronze moon
#

no idea.

#

Error: Uncomputable token ref(Main_H)... so maybe this needs to be a fetch

#

So it is outputting the correct answer

faint wharf
#

i just sliced a goat for a summuning, dev should spawn soon

bronze moon
#

but it cannot compute the answer...

#

@faint wharf I am just throwing my steps on here incase you see something that points us in the correct direction

#

oh can you not use words with ==?

formal goblet
faint wharf
#

Thanks

earnest imp
#

question, can lookup be already used in 3.1.0 to prepare ahead of time for jump to 4.0.0?

earnest imp
#

thank youuu gonna start slowly phasing out fetchfromDynamicTable

bronze moon
#

@formal goblet What section is that from on the wiki?

bronze moon
#

Ahh ok thank you! I didnt check FAQ

faint wharf
#

or(x,y)?

brittle moth
#

equalText(item.Weap_Hand, 'Main_H') and equalText(item.Weap_Type, 'Sword') works fine !

faint wharf
#

Also a thing! Wasnt 3.1 to have posibility for items to hold other items?

brittle moth
faint wharf
#

other thing. Anyone made visual or not Action points counter with restock on end turn?

faint wharf
stone swan
# dusty barn My programming mojo is miniscule and I am trying to figure out the best way to i...

If you don't mind modifying things a little bit, I feel like what you're describing might be easier with a deck, since you could have the spirit dice act as a a hand and then when you draw a new "roll" you could just swap cards between your hand and the new ones. With that said, I don't know the system well enough to know if that will work out for you and I also don't know how well CSB can interact with cards.

acoustic geyser
#

it seems like when reading a number field from a dialog, entering -20 (or other negative values) defaults to 0

north nebula
#

I have been banging my head against the wall with this for awhile. In this sheet, the player can choose one style and depending on the style pick one or two forms. All of these are drop downs that draw from dynamic tables.

I have a checkbox that I only want to have revealed if a specific form is selected. The parameters I am using are either form11 matches the form or style is 'Forbidden' (the style that lets you have two forms) and form12 matches the form.

or(equalText(form11,'Wild'), and(equalText(style1,'Forbidden'), equalText(form12,'Wild')))

The issue I am running into is that on a fresh sheet, even if form11 is 'Wild', it will not show the check until I have also satisfied the second condition. Once I have done that, everything is fine and works as intended.

faint wharf
#

Big question i use some fine agnostic module that shows amazing combat caruzel, but it does not see bar values made in CSB can i somewhat make CSB bars visible for those?

formal goblet
north nebula
#

Yes that works for form11 being Wild

#

For testing purposes, I made a label with the formula I had above, which I put back into the check box.

I made a fresh sheet and picked some options, and you can see, it correctly says false, and no checkbox.

Then I select Wild and it shows true, but no check box.

Then I select Forbidden, and pick Wild in the new second drop down that is not visible and the check box appears.

Now if I go back to not forbidden and pick Wild, it shows up.

#

(I realize the second image does not go low enough, but I assure you there is no check box in that one)

#

(and to make sure things are clear, I did deslect wild from the second form option before changing the style off of Forbidden)

#

I also considered that even though the formula was producing a 'true' result, because form12 was null or '' until it was initially populated, that was throwing things off for some reason. I tried a work around for that in javascript that just produced the same results, though my workaround could have been faulty.

zinc verge
#

any news on the next CSB update?

brittle moth
zinc verge
#

POG?! Holy shit my CSB didn't notify me that there was an update when I checked last night that's hype!!

#

made my day, thank you fam

stone swan
zinc verge
#

doesn't look like it from what I see in the patch notes but just to be sure: are items placeable inside of items as of these updates?

Also, very hype to see some of these changes. Collapsable panels, item container sorting, moving items using the whole item name, and meter element are all huge

stone swan
#

Oh, speaking of meter elements, are they purely for display or is there a way to interact with them on the sheet?

crimson aspen
#

Is there a way to do nothing when a condition or a case (switchCase) isnt met?

stone swan
brittle moth
crimson aspen
# stone swan Define do nothing? (E.g. do you want to prevent an action, post a blank message,...

Alright - so...
i try to get a user prompt where the user chooses a stat that is to be rolled. Lets say he chooses power.
In the code after that, i need to check for 6 stats to find out how many dice need to be rolled.

Here a short part of the code:
`${?#{SingleRoll}}$

${diceCount:= switchCase(rollStat1, 'Power', PowValue, 0)}$
${diceCount:= switchCase(rollStat1, 'Precision', PreValue, 0)}$`

Power and Precision are the chooses stats that i get over RollStat1 (one because there can be multiple rolls, but doesnt matter here).
Of course the problem now is, that it overrides itself.

I hope i got that good for you to understand ^^ if not let me know and i will try again ^^
Ah - i dont take normal conditions since i dont get it working to write into a variable with a condition somehow...

brittle moth
zinc verge
toxic lintel
#

dumb question, how do I reference a property from the actor when I am using a macro? e.g. I have a field with key = 'threat'

stone swan
crimson aspen
#

i tried so much... and then this...

stone swan
stone swan
brittle moth
stone swan
#

There is a lot of cool new stuff in the update and even the things I didn't expect to use, like the collapsible panels, have proven to be amazingly helpful so far. Thank you.

stone swan
formal goblet
formal goblet
stone swan
north nebula
#

I do appreciate your help with all of this though.

stone swan
#

Huh. On the topic of data structures and resource bars, it seems like the attributeBars don't exist at the source level, only the derived. Is that normal and could that be why they're not showing up in the Combat Carousel settings?

stone swan
toxic lintel
# formal goblet `actor.system.props.key` (you need the actor-context prior)

I'm doing something wrong. This is part of the macro
console.log("Overlord actor found:", overlord);

// Get conquest points and threat level from the Overlord actor
let hConquest = actor.system.props.hConquest ?? 0;
let oConquest = actor.system.props.oConquest ?? 0;
let threat = actor.system.props.threat ?? 0;

let remaining = actor.system.props.remaining ?? 0;
let handSize = actor.system.props.handSize ?? 0;

console.log(`Heroes' Conquest: ${hConquest}, Overlord's Conquest: ${oConquest}, Threat: ${threat}, , Hand Size: ${handSize}`);

The first log statement proves I am getting the right actor, but the output values are all zero, which they are currently not when viewed on the sheet

fresh arrow
#

Good ... night I guess πŸ˜‰
A 2 hopefully short questions.

  1. more related to discord and current thread. How it is possible to search for some "text" within only current thread of "diy-systems"? if there is something possible I guess will be more likely to look for already asked questions instead of asking question again (probably)
  2. specific question: there is an possibility to add css to specific item within "advanced configuration" of item. Can anyone direct me how to use it? I.e. we have an table and for that specific table I would like to have background #ccc, how it shall be done?
    Edit: I have created parameters.css file in FoundryVTT\Data folder as:
    <style type="text/css"> table { background-color: #ccc; } </style>
    and added into css of "advanced configurator" parameters.css, but it doesnt change anything 😦 [already tried with different background approach]
formal goblet
formal goblet
toxic lintel
formal goblet
north nebula
formal goblet
#

Well, the Custom CSS module might also be an option. It's easier to use most of the time

north nebula
#

I will probably take a break for the day at this point. I should be good for awhile. At least until I come across some other problem I cannot figure out. Thanks for your help though. It is much appreciated.

fresh arrow
#

Custom CSS worked as a charm... and I also identified why I had a problem with original approach πŸ™‚ it worked, but required logout and login (so most probably refresh)

bronze moon
#

How would i call out a roll icon in css?

#

.custom-system-dynamic-table-row-icons doesnt work for a roll iton

mortal stag
#

Hi, does anyone know if there's a way to modify the value in a number field using a formula?

formal goblet
mortal stag
#

ah sorry should have specified, I want the value to be modified when the user clicks a label, so the formula would be in the label

formal goblet
dire socket
#

Hey so, I've been trying to get my lookup to work in my attack dynamic table, but it just, isn't working. It either gives no errors or I get a bunch with the most helpful thing being this.

mortal stag
formal goblet
bronze moon
#

@formal goblet I have to say telling me to check the console has saved me so many hours of questions

#

@dire socket can you copy the code. I dont know if i can helpo but it would help those that know things

dire socket
#

I THINK the best thing to do here is just to try remaking the whole thing from scratch, cause it's honestly a mess.

dire socket
#

yes, the issue persists

formal goblet
#

Alright, then I need the whole Formula

#

Because the issue is not solely from lookup(). It only happens together with other functions

dire socket
#

Got it, I'll put together what I've tried to isolate then.

bronze moon
#

Ok this is my first item roll formula and I seem to be messing up again.

${Roll:= [:('item.Gun_Dam') :x] + item.Gun_Bon_Dam }$ Damage

formal goblet
bronze moon
#

Error: Uncomputable token "item"

#

do i not need to add item when inside the item?

formal goblet
#

No

#

The item.-prefix is only available in an Item Container. Nowhere else

dire socket
#

${fetchFromDynamicTable('Roll_Table_Atk', 'Dmg_BonusA1', 'Name', sameRow('Form_Ref'))+fetchFromDynamicTable('Roll_Table_Art', 'Dmg_ModF', 'Name', sameRow('Art_Ref'))}$
Okay so, this is the simplest example, this is the formula causing the specific error. For some reason it does not like to work as a label, BUT if I were to make it a roll/chat message, it resolves just fine.

formal goblet
dire socket
#

I see, yeah that makes sense. What would a solution be, this wasn't an issue before 3.0.0, so I'm not exactly sure how to proceed since this is popping up all over the labels in the dynamic table.

formal goblet
stone swan
#

Ok. I've been poking at this for a while and I think I've hit a wall, so I'm just going to ask. Can a manually called computable phrase make sense of the 'item.Key' format and, if so how? I thought it passing it the linkedEntity option would do it, but either that doesn't work or I'm doing it wrong.

Any ideas?

dire socket
#

New error.

dire socket
formal goblet
formal goblet
stone swan
bronze moon
#

Can you make a label in an item container contain the roll formula from an item? basically trigger the roll from the item?

formal goblet
formal goblet
bronze moon
#

Damn this would be super useful. This would allow me to have seperate formula stored in the item

dire socket
# formal goblet Then something is wrong with the second lookup

You think so? What could it be, cause again, when applied as a message it returns the value like it should. Could it be the table itself thats the issue?

Heres the result of the message and then the label, the formula below is whats used for both. well the assa prefix is just to help me find the label.

${first(lookup('Roll_Table_Atk', 'Dmg_BonusA1', 'Name', sameRow('Form_Ref')))+first(lookup('Roll_Table_Art', 'Dmg_ModF', 'Name', sameRow('Art_Ref')))}$
1st
${first(lookup('Roll_Table_Atk', 'Dmg_BonusA1', 'Name', sameRow('Form_Ref')))}$
2nd
${first(lookup('Roll_Table_Art', 'Dmg_ModF', 'Name', sameRow('Art_Ref')))}$``

formal goblet
bronze moon
#

@formal goblet I know its crazy busy in here... but a start on what the script that does the following.
execute roll item.item_roll
Would help a ton

dire socket
formal goblet
bronze moon
#

thank you as always

#

TypeError: linkedEntity.roll is not a function

formal goblet
formal goblet
bronze moon
#

Thanks

dire socket
dire socket
toxic lintel
#

how can I (in a macro) return and display in chat links to all the items on an actor's sheet?

bronze moon
#

Ok i feel like we are getting close. but i am getting error
Error: Label Roll Message with the key "item_roll" not found in Entity

I have tried with item.item_roll as well

formal goblet
bronze moon
#

thats what i thought but same error either way

formal goblet
#

What's the key of the Label containing the Roll?

bronze moon
#

item_roll

formal goblet
#

Well... what does console.warn(linkedEntity.templateSystem.getCustomRolls()); print in the console when executed?

bronze moon
#

ReferenceError: linkedEntity is not defined

#

Thats what i get when putting it directly in console. but nothing if i put in code

formal goblet
bronze moon
#

so make a roll label with it?

#

TypeError: Cannot read properties of undefined (reading 'templateSystem')
at eval (eval at processFormulas (ComputablePhrase.ts:211:40),

#

oh wait

formal goblet
#
%{
console.warn(linkedEntity.templateSystem.getCustomRolls());
}%
bronze moon
#

{}

#

thats all it returns

formal goblet
#

Can you roll from the Item?

bronze moon
#

yes

peak jacinth
#

Where'd you find this menu?

formal goblet
bronze moon
#

is there something wrong in here?

formal goblet
bronze moon
#

would be an awesome feature!

dire socket
# dire socket Hm

@formal goblet Sorry to be a bother, but any ideas? I've done everything you've asked, everything except for this seem to be working just fine.

dusty barn
bronze moon
#

@formal goblet ok I am an idiot {item_roll: {…}}

#

is what it returns

#

It works just fine

#

I hadnt updated the item

toxic lintel
#

any help on a macro that reports the items on an actor into the chat window would be much appreciated. I have all items on the actor reporting, but I don't know how to filter them down to just the ones I want to display. I have figured it out - well at least, it works:
let <newCollectionName> = actor.items.filter(item => item.system.props.<key> === true); //since in this specific scenario the field I am looking for is a checkbox

stone swan
dusty barn
stone swan
dusty barn
stone swan
dusty barn
stone swan
#

You could also, maybe, do something with giving each card multiple faces and drawing to a random face, but I don't actually know how the different faces get handled. (They're easy to add in the configuration, I just don't know how it decides which one gets shown and whether or not that can be randomized.)

dusty barn
toxic lintel
toxic lintel
#

how do I retrieve the number of items in a particular item container (so as to display a count of items in the tab name on the sheet)?

toxic lintel
#

also, if I place a button label on a sheet, how do I trigger a dialog or macro off it?

broken pumice
#

Just wanted to pop by and say a big THANK YOU to the dev (devs ?) for the update. Every little problem I had seems to now have a fix.
Thanks for your hard work πŸ™‚

brittle moth
pale tusk
#

Is anyone aware of a reason why Foundry would refuse to let me update CSB to version 3.1.1? Every time I try it, it fails.

bronze moon
#

Is there a way to have a panel fill more than one space on a table?

vocal sorrel
#

Hello, probably a silly question but how do I set the Default Value of a Number Field / Slider to its Maximum? (when Maximum is determined by a Formula.)

bronze moon
#

@vocal sorrel I am def not an expert but i would assume the it is done by putting the formula in the Default value field

vocal sorrel
#

No, doesn't seem to work. I'll keep looking, but thanks for the suggestion.

bronze moon
#

sorry

faint wharf
#

Ok i belive someone may had this issue already. i wanted to import besitiary via CSV, excel and tried to make a patern file for the importer, but the exported character sheed does have absoluetly gigantic number of exxces data that are from template, anyone had some idea how to easly import data into CSB game?

fresh arrow
#

Do we have some special approach to pass information from item to char?
ie. we have rtxt_luck field on char sheet and item which has rtxt_luckInput field on. I have found some old FAQ that it shall be done via Configure modifers, so I open item add modifier like Key: "rtxt_luck", Op: "=", Value formula: "${rtxt_luckInput}$"... but it doesnt work when I add item to container on char

EDIT: seems that Label has to be used πŸ€ͺ

swift cloak
#

Morning all, this might have been answered elsewhere, and I apologise if it has but I can't find it. I'm using a configure modifer for an inventory item, in this case an armour value. It adds the given armour value to a value on the character sheet, but for some reason it's doubling it.

I can resolve it for this armour value by adding a divide by two (turns a 10 into a 5), but this work-around isn't working for another value; weapon strength. Even though I've got a divide by two, it adds half the value again. EG 1 to 1.5, or 2 to 3.

Is this an issue with having multiple inventories? I've got three; generic items, armour and weapons.

pale tusk
#

Re: above, I'm running the latest Foundry, but on one screen CSB says "not compatible with your Foundry version," and on another screen it says it can update but it fails every time.

toxic lintel
#

Please with this - a macro that takes info from the overlord's actor sheet and presents it in chat, allowing the players to view in play and revealed 'cards'. The overlord actor isn't selected, just present on the canvas.

#

Next challenge is to trigger a combat 'roll' from the hero actor's weapon sheet and combines the trait dice of the actor with the weapon dice as a starting point for a modifiable attack roll. This game has custom dice facing, and I have not found a module that allows custom dice models, so I have implement the dice as rolltables. I assume /roll is not much use in that case.

formal goblet
faint wharf
crimson aspen
#

Once again i am here with a problem with conditions. So i am trying to check a diffuculty against a roll that i save earlier. 'Dif1' is the variable where the difficulty is saved, and 'roll' is the roll. I just want to simply ask > and <. But i get a error saying that Uncomputable token "gt".

This is my Code:
${Dif1 < roll ? success : ''}$${Dif1 > roll ? failure : ''}$

It seems that in the HTML Editor it resolves > < as > and < which i guess causes this error. Anyone with experience with this? i dont really get how i should work around that.

Here is the line how it shows in the HTML Editor:
<div>${Dif1 &lt; roll ? Success : ''}$${Dif1 &gt; roll ? Failure : ''}$</div>

formal goblet
crimson aspen
#

that did it! thanks!

copper glade
#

If I have an Item Modifier set to increase a value, will it automatically decrease by that value when the item is deleted in the actor sheet, or would I need to setup that functionality as well?

copper glade
#

thanks

#

To follow that up then, and maybe someone could just point me to where i can look this up, rather than just having ${valueName}$ for the Item Modifier formula, how would I go about adding a requisite condition to that (so I can check if the item is also marked equipped or something)?

#

sort of, if{equipped == true}

toxic lintel
#

the formula can include a condition (condition ? T:F)

#

where T is whatever you want true to be etc

#

which could even be another formula

copper glade
#

I take it this is in the API doc somewhere

toxic lintel
#

probably, but I don't understand API speak... so it's been trial and error and questions here.

copper glade
#

cool, thanks again

toxic lintel
#

this is using a high default value of maxMove where the actor's currMove is the less of currMove and maxMove - so wearing armor degrades maxMove a lot, and probably means your movement is capped

copper glade
#

is that the right syntax? I've got ${drop_equip ? 4:0}$ and that just works the same as ${4}$
Just seems to ignore the conditional.

bronze moon
#

Since we are on item modifiers. I am trying to figure this first one out

fierce harbor
crimson aspen
#

I am trying to get a script macro of this label. But when i right click in the character sheet, and say "Copy macro script" it just copys nothing. Am i forgetting something?

In the console i get this error: Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')

bronze moon
#

i am getting NaN

fierce harbor
bronze moon
#

No on the character sheet

#

No errors

#

in console

formal goblet
# bronze moon i am getting NaN

NaN is short for "Not a Number". So I think that Gear_Dam_Red (or anything else, that modifies Dam_Reduct) is not a number

copper glade
#

this just returns 4 regardless of what drop_equip is set to.
Is it perhaps only checking that drop_equip exists?

formal goblet
bronze moon
#

Do item modifiers not copy from template?

fierce harbor
bronze moon
#

I dont see them when i click item modifiers it shows none

formal goblet
bronze moon
#

When you update the template does it update the item?

fierce harbor
bronze moon
#

Yah i just tested and it works sorry to bother yall

fierce harbor
bronze moon
#

I have been blowing this chat up with questions for 2 weeks. I will say that I am now reasonably self sufficent in the things i have done already though

#

Oh i asked this before but is it possible to have a panel or picture or something of that nature take up more than one table space?

fierce harbor
bronze moon
#

There was a new way to call out a checkbox that was part of previous release notes. 3.0 i believe but i cannot find it anymore

bronze moon
#

So i am doing an (equipped) checkbox. I want to put in the item container a filter. but just doing ${(item.equipped)}$ doesnt work. so i it should be what?

formal goblet
bronze moon
#

I am getting unexecpected operator from that one

copper glade
#

Well, I've tried this a few ways but really I don't know how to get the value i want from drop_equip to run the ifelse.

${if(drop_equip.key.value == 0) { return 0; }else{return 4;}}$

${if(drop_equip.value == 0) { 0; }else{4;}}$

${if(drop_equip == true) {return 0; }else{return 4;}}$

just NaN from any of them

copper glade
#

well that explains that

formal goblet
bronze moon
formal goblet
bronze moon
#

Damnit i forgot about that

#

thanks

crimson aspen
broken pumice
#

Hello !
I'm trying to migrate form 3.0 to 3.1.1 and I'm encountering a problem.
Previously I had empty labels in my template that I was then setting one way or an other on the character sheet through some other labels that I use as buttons. Those labels now stay empty and I cannot set or modify them.
For exemple, I had a pc_inspirations label empty, a reset label which on click would setPropertyInEntity('self', 'pc_inspirations', 0) and a + label which would setPropertyInEntity('self', 'pc_inspirations', pc_inspirations + 1). None of those work anymore, I seem to not be able to change label text through setPropertyInEntity.
Was there something about setPropertyINEntity or labels in particular that I missed ?

foggy grotto
#

What is the CSS term for the character sheet background??

formal goblet
fresh arrow
#

I see that Items and their usage is currently hot topic πŸ˜‰
Therefore I have a question regarding Best Practice to approach that topic.
How to handle different items like weapons, armour, artefacts which could be worn / active and just carried / not active.

Ie. I see that possible approach is to use "equiped" checkbox on item level.
But is it ie possible to have container "equiped left hand" + "equiped right hand" + "worn" and another container like "backpack" and by that trigger bonus left + worn or right + worn without impact on statistics by "backpack"?

copper glade
#

yes

#

something like this

#

you just have each container filter which items appear (by values etc.) The item modifiers can bet set to trigger by values within each item.

#

If I'm understanding you right

#

I've used different templates to differentiate my items, but you could just use a dropdownon them or something

fresh arrow
#

so you managed bonuses from item to be added/used/etc when they are in hand, but are not giving bonuses when in backpack i.e.?

copper glade
#

yeah. For mine I have a dropdown for equipped/unequipped, but you could use a checkbox or w/e to filter them by

#

and then the Item Modifier is where you set the trigger

#

(I literally learned this this afternoon)

fresh arrow
copper glade
#

Mine's a dropdown, which is something like;
0 Unequip
1 LeftHand
2 RightHand

In Item Modifier you just check for drop_down == 1 ? TrueValue:FalseValue

that'll set your value depending on the drop_down's selection

so you're not really triggering it by the container, but by the choice within the item (which causes it to filter visually in the container)

swift wolf
#

I'm looking to see if I can make a button for making attack rolls in an inventory container.

Is it possible to take the following

${first(lookup('skills_table_dyn', 'skill_rating', 'skill_name', 'Melee'))}$

and make it so that "Melee" is variable based on a value set in the item template?

fresh arrow
copper glade
#

aye. the container itself is just like a window view of the items in the actor

bronze moon
#

If i wanted to fetch information from actors in a specific folder. is that possible?

#

As in i want to see the health of all actors in PC folder

formal goblet
bronze moon
#

No stress. I can pull from specific actors correct

#

by name?

formal goblet
#

Either name or ID

formal goblet
swift wolf
#

heh. awesome. your edit answered my question. πŸ™‚

broken pumice
crimson aspen
#

Is it possible to give a macro script a parameter to use in a label it executes? Sadly i cant access the Macro API since it says me a 404. If someone has the correct link i would also be gratefull for that. So in know how to insert a general argument inside a macro, but i dont know how to hand it over to the label.

bronze moon
#

@formal goblet I was wondering if it was possible to allow players template acess? So they can move between templates and so on

vale remnant
#

Tyty

pale tusk
#

Is CSB not compatible with the current version of Foundry?

formal goblet
pale tusk
#

Oh. That would have been useful to know.

vale remnant
foggy grotto
#

Looking for the CSS grouping to change the grey backgrounds of items on the actor sheet.

#

If anyone can help please

brittle moth
foggy grotto
brittle moth
#

#package-releases message
Hey everyone ! πŸ™‚ More bugfixes for you !

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

Fixes

  • Added item filter migration
    • If you haven't already upgraded to 3.1.x, your item filters in Item Containers should be automatically converted to their Formula counterpart
    • If you have already upgraded, I'm sorry, there is nothing I can do. You can restore a backup made before upgrading to a 3.1.x version, and relaunch your world, this should work.
  • Fixed item container display when bold head and empty column name
  • [336] Fixed arguments for calls to getConfigForm
  • Fixed issue with Dropdowns in templates

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

iron badger
#

Is it possible to put an item outside of an item container?

brittle moth
iron badger
brittle moth
#

As I mentioned, the item container is just a way to display items. You can try to uncheck "Display Column Names" and "Show delete button" on an Item Container, which disables the Table view and only shows the Item button

stone swan
#

I feel like there'd be less confusion if you called them Item Displays or Item Viewers, rather than containers.

brittle moth
stone swan
mortal stag
#

Hi, does anyone have any pointers on how to get item filter formulas working?

I have a backpack item container and a belt item container on my character sheet. My item has a dropdown that has the two slots as possible values. What I have right now is

item.item_slot==slot_backpack

item_slot is the key for the dropdown, and slot_backpack is the key for the backpack value in the dropdown. This formula doesn't work though

pale tusk
#

Since the update, some of my item templates won't open anymore. I'm seeing this error in the console: lookup("effects", "effect_notes", "effect_name", "", "===") This appears to relate to a dynamic table that's linked to a select dropdown.

bronze moon
#

So i just found a bug in my sheet and i dont know how to fix it. When a character has a piece of gear in there inventory all the bonuses apply. how do i limit this to only when the item is equiped?

#

equiped is a check box

pale tusk
bronze moon
#

Yes

pale tusk
#

The checkbox is on the item to indicate that it's equipped?

bronze moon
#

Yep

pale tusk
#

So the item modifier should probably look something like ${equipped?BONUSKEY:0}$

#

If the checkbox is saved as "equipped"

bronze moon
#

It is

#

Thanks

#

I'll check it out

pale tusk
#

Here's what an armor item modifer looks like on one of my items:

formal goblet
formal goblet
pale tusk
#

Another template has a similar error, which reads:

Error: An error occurred while rendering EquippableItemTemplateSheet 216. Uncomputable token lookup("effects", "effect_notes", "effect_rank", "", "===")

#

This is the line in my JSON that was causing the issue:

"defaultValue": "${recalculate(fetchFromDynamicTable('effects', 'effect_notes', 'effect_rank', rank))}$",

#

I can use the code in the normal item fields. It's just the default value that was causing the trouble.

#

(I also know that I need to change to lookup.)

formal goblet
formal goblet
pale tusk
#

Here's an odd thing. When I import an updated JSON for an item, the item is moved from its folder in the Items tab to the root.

formal goblet
#

Ah wait, I remember what we've changed... Yeah, bugticket it is

vale remnant
#

me again.

how do I get an item to reference a stat on a character's sheet, to modify another stat on a character's sheet?

Example: 5e Natural Armor with Con, using Con instead of Dex in the formulat for the actor's Armor Class that is normally 10 + Dex.

Trying to use the Item modifier field on the item (made from the equippableitem template) just nets either an error or a 0 (because the item does not have a Con field/label). So I am confusion

normal ore
#

Hey everyone, how are you doing?

I need to retrieve the ID of an item associated with an actor. However, I would like ${id}$ to be associated in the item's sheet. Is that possible?

The reason I need to have a formula in the item template is to use it in another field in the character's sheet!

formal goblet
formal goblet
normal ore
#

Nice!!!!!! thanks!!!!

vale remnant
formal goblet
#

Choose one of both

vale remnant
formal goblet
vale remnant
#

fetchFromActor('attached', stat_con) returns a 0
fetchFromActor('attached', ${stat_con}$) and ${fetchFromActor('attached', stat_con)}$ return errors.

will give other combos after a quick foundry reset. cat did cat things.

formal goblet
#

And btw, if stat_con is a variable of the Actor, then you should surround that with ""

mortal stag
vale remnant
#

Foundry VTT | Created Item with id [IKLSQfq9N9fXGJ7C] in parent Actor [gJnlbrm4I7SBB7CE] is what the console puts forth.

formal goblet
mortal stag
vale remnant
formal goblet
bronze moon
#

Well this is interesting

#

TypeError: Failed to set the 'value' property on 'HTMLMeterElement': The provided double value is non-finite

formal goblet
bronze moon
#

Im special

vale remnant
#

Gonna be quick with this gotta jet soon aaa

bronze moon
#

that error when i am trying to make new character sheet

vale remnant
# formal goblet Show me your whole setup

Last panel is on the test sheet, to show what the Con is.

Even if it wouldn't calculate in the rest of the formula (due to being lower), it would show up on the label next to the other 2.

The label used to read as 0. changing it to nothing didn't help

formal goblet
vale remnant
#

It changes correctly if I set it to a number like 4 or something

formal goblet
#

Ok, so my assumption is wrong

bronze moon
#

@formal goblet FYI i fixed the issue. It was because health had no default value so when it created a character sheet the Meter didnt have 2 numbers

formal goblet
bronze moon
#

It literally blocked the creation of character sheets which suprised me. Console to the win again

#

I have my first game in my system tonight so we will see how much I need to change. but the system works amazing. Huge thank you to both you and Threz! Yall have made this so much more accessable to people like me

vale remnant
vale remnant
#

Yep. Thanks for the help still.

copper glade
#

is there a way to have an AND operator in the ${}$ formula, like

${equip == 1 && class > 0 ? 1:0}$

quasi plume
safe halo
#

is it possible in CSB to make numerical radio buttons like in sandbox ?

copper glade
# quasi plume `${equip == 1 and class > ? 1 : 0}$` CSB uses `and` `or`

Thanks!
Hmm. Well it's not giving me an error now but, it still isn't doing anything. They work separately.
I also tried it as
${drop_playerClass == 0 ? 0 : drop_equip == 1 ? 1 : 0}$
but that also just doesn't do anything for the other classes once equip is changed. I'm not sure where it's going wrong.

toxic lintel
#

with a tabbed panel I want to present the number of items in the item containers under each tab. what is the formula to return a count of items in an item container?

formal goblet
foggy grotto
#

.content-link { background-color: #fff; }

brittle moth
foggy grotto
fresh arrow
#

Good afternoon... could be a very stupid issue, but I have no idea where from I have an additional row in item container. Could you help with identification or provide solution how to get rid of it?
There is nothing inside TD.

brittle moth
dire socket
#

Hey @brittle moth I mentioned this issue the other day, but when using a dynamic table that references two others, some values are not being fetched with lookup after the update to 3.1.x. This issue only occurs in labels within the dynamic table, but when the exact same formula is used in a roll/message, it works just fine. I believe this is some kind of bug, but the issue could be on my end, just forgetting some sorta change after the update.

fresh arrow
quasi plume
brittle moth
brittle moth
formal goblet
#

It depends on which parts of CSB. You definitely know more about computation handling than me

formal goblet
copper glade
brittle moth
copper glade
#

right, i just assumed cos it was already writing to labels on the actor without a ref it didn't need it

brittle moth
#

It depends. Is the formula executed on the item, or on the actor ?

copper glade
#

item modifier

brittle moth
#

Then yeah, you need that. Item modifiers formulas execute from the item context πŸ™‚

copper glade
#

alrighty, thanks for your patience guys

brittle moth
#

No problem πŸ™‚

#

Items and especially modifiers are in the most complicated features of the system, it's totally understandable that people won't get it right away ^^

earnest imp
#

Thought I should flag this up to you guys, ever since transferring from 3.0.0 to 3.1.1, manually sorting dynamic table on template actors has been utterly wonky, and Undo stops functioning as well

#

I don't know if this is a known issue or not so I thought I'd bring it up

brittle moth
earnest imp
#

let me get another video

#

sorting on character actor definitely works, its just that template actor that gets all wonky

#

Ill make an issue in git

#

By the way, your fix works for my case, thank you!

#

@formal goblet I don't think I've said enough thanks about how much you helped me get started on CSB, so thank you so much for helping me the past few months

Player feedback to the homebrew system made from CSB has been glowing

fresh arrow
# brittle moth Items and especially modifiers are in the most complicated features of the syste...

ou yes, they are πŸ™‚
And so I have an question 🀣
There is an item with "grupa" dropdown field with numbers as keys and "mod" number field. I add item to container and create label in it where in roll message I use "item.mod" to add modifier to the roll and it works.
But I also tried to use "item.grupa" in swtich to modify roll: ${atrybut:=switchCase(item.grupa,1,a_zrecznosc,2,a_krzepa,0)}$, it always is resolved as "0", most probably as "item.grupa" is threated as an object and not value... some hint or clue please πŸ€“

brittle moth
# fresh arrow ou yes, they are πŸ™‚ And so I have an question 🀣 There is an item with "grupa" ...

The item showing as [object Object] is not the cause of your issue, it's just an issue with the explanation system which doesn't handle the item very nicely (I'll need to fix this)

Can you try to output just 'item.grupa' in your roll, to check its value ?
If the value is 1 or 2, can you try enclosing the values in ' ? The value could be treated as a string, and not matching a number πŸ™‚

Like this :
${atrybut:=switchCase(item.grupa,'1',a_zrecznosc,'2',a_krzepa,0)}$

fresh arrow
velvet heron
#

I have an issue I need some help with. In the first image here is an item on the left and character sheet on the right. I'm trying to get the circled number in the item get referenced in the character sheet which contains that item.

For reference in the second and third images are the templates for the item and character sheet with each relevant component.

Why does it display blank?

raven raven
#

How do I change the default width of the dialogue box?

velvet heron
#

That button

brittle moth
velvet heron
fresh arrow
#

is there possible to hide calculation at label value? '#' deosnt work and also as I see in documention in label values will not, but is there other way?
example:
${#dice:= dmg_d4>0 ? 'd4' : (dmg_d6>0 ? 'd6' :(dmg_d8 > 0 ? 'd8' : ''))}$
${ref(concat('dmg_', dice))}$${dice}$
Expected example: "2d4" but instead "d4 2d4"

formal goblet
fresh arrow
formal goblet
#

I've planned to rework a few things with 4.0.0 to get rid of annoying limitations by the computation system (especially things like conditional dialogs and rolls).

fresh arrow
#

sounds like a not small amount of codding 😎

formal goblet
#

It's not even that much, but migration will be horrible, because I want to get rid of the mathjs-library

dire socket
#

Will it be possible to change the colors a meter will have? Like, instead of just green yellow red?

formal goblet
dire socket
#

got it

copper glade
#

I may as well ask this before delving any deeper myself, but has anyone worked on implementing an item trade/buy/sell function within CSB? The sell function ought to be simple enough (using a button on the item, updating a currency label, removing the item in question) but the buying I'm not as sure about.

fresh arrow
vagrant hollow
raven raven
# velvet heron

Isnt this the character sheet? Im talking about the pop up dialogue box...

brittle moth
#

#package-releases message
Hey everyone ! πŸ™‚ Even more bugfixes !

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

Fixes

  • [#364] Fixed error with lookup function when Table key does not have values
  • Fixed error with ConditionalModifierList computing on Templates
  • Fixed error on component edition falsely believing being in an extensible table (and requiring a key)
  • Fixed issue with Modifier keys computing in User Input Templates + Local vars editing objects
  • [#366] Fixed issue with Predefined Lines sorting & Undo / Redo handling
  • [#288] Fixed reference displaying in in-sheet rich text editors

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

alpine tiger
#

If I use a module like PDF Pager to import a form-fillable PDF into my world Is there way to add CSB macros embedded in that form-fillable PDF? Or even better allow Items such as Skills/Traits/Equipment that I create to be dragged and dropped onto that form-fillable PDF?

formal goblet
# alpine tiger If I use a module like PDF Pager to import a form-fillable PDF into my world I...

We don't know the module enough to give you a definite answer, but it's highly likely that you cannot use anything from CSB there (except maybe simple stat blocks from Input Fields). The reason behind this is, that the computation system of CSB is not just a simple Macro. It's actually pretty complex. And without the computation-part of CSB (just check the ComputablePhrase and Formula-classes to even grasp what work is done in the background), you won't even have a chance to resolve your Formulas correctly.

In short: We don't have any integration for external systems and such. And transforming data between heterogenous systems is a tedious task.

alpine tiger
#

Roger that

rain rapids
#

Is it possible to prefill values in a dialog when it pops up? Like if I want to have a label in there set to a value based on an actor?

toxic lintel
brittle moth
zinc verge
#

loving collapsible panels. Was able to save a ton of screen real-estate thanks to the changes it let me make to my game's spell cards

zinc verge
#

Thank you!

rain rapids
#

I think the main trouble I'm having is populating it with data from a dynamic table.

Basically, I have a popup that helps autocalculate things before rolling and I'd like to add some default values based on the row's values

rain rapids
#

Actually what would really be helpful: is there a way to see what a dialog/actor/item's data is?

zinc verge
vale remnant
#

Uh, sorry to ask an obvious question

How can I get a dynamic table to populate from an item container? I'm trying to build an object/player inventory. I've seen a few examples here and I can't wrap my head around how to do it.

vale remnant
zinc verge
cinder rock
#

Updating to 3.1.1+ has reset all my player's number fields to the template default, putting all their stats to 1. Is there anyway I can get a hold of the older version of CSB so I can go in and write down all their stats?

#

Specifically v 3.0.0

brittle moth
brittle moth
solar zephyr
zinc verge
solar zephyr
#

nice

cinder rock
copper glade
#

Can you access an actor's token from an item modifier's 'key' designation?

#

Ah I guess it wouldn't matter sinc eit needs to return a label

silver lake
#

Eyo

#

Trying to get the Module 'Boss Bar' to work, but it won't and I think it might be the pathing in the system

#

For the current health for example, I'm using attributeBar.CCon for example, to refer to a number field. Should I be adding anything more?

cinder rock
#

I think you @ the wrong person, but thank you anyway

silver lake
rotund mason
#

Hello. I just updated to Version 3.1.3 from 3.0.0 and I am having a slight problem with some filter term in an item container. Before the update I was using this filter to sort items in different lists (while technically they all are the same kind of item) but after the update all the items show in all the lists ignoring the filter.
Did the filter sintaxis change?

cinder rock
#

I had the same problem

rotund mason
#

Dind't like it, like, at all.

#

tom System Builder | Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: boolean, index: 0) TypeError: Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: boolean, index: 0)

rotund mason
#

Ok, fixed it.
The problem was with the checkboxes. Before a equalText(component key, 'true') or '' false worked, now, a compenent key=='1' or '0' works

vocal sorrel
#

Hi, using the "sameRow()" function is it possible to get the "Label" of a "Dropdown" component rather than its "Key"?

brittle moth
vocal sorrel
#

Alright, thanks!

fresh arrow
#

good afternoon. Most probably I missed something, but... is there special reason why "item modifiers" set it "configure item modifiers" on "template" are not forwared into "item" base on "template" ?
"template" = 1 item modifier
"specific item base on template" = 0 item modifiers

brittle moth
formal goblet
brittle moth
#

Well, with the amount of work required for the v12 compatibility, I may do a small 3.2 release with quick features like that πŸ€”

fresh arrow
fresh arrow
rotund mason
#

Hi. I have a question.
can you make use of a variable from an actor in a calculated formula in an item?
For example, let's say the actor has a Power attribute somewhere and I want to create a item called Fireball witch has a damage attribute calculated with, let's say Power*5

formal goblet
rotund mason
#

thanks!

swift wolf
#

Out of curiosity, is it possible to tweak the size of the Name column on an inventory container? I've got two inventory containers that I'm trying to line up and it pains me when the length of an item's name adjusts the columns. It's not a huge deal, but I figured I'd see if there was a way to do so just in case.

hazy saffron
#

In the last few versions, did the actor.roll() function change? It used to take the Roll Message and options that included whether to Post the message to chat (Boolean) and whether to use the 'alternative' roll (Shift-click)). In the current github I don't see that option for actor.roll anymore

Edit: So it appears there is now a checkbox for sending the alternative roll message to chat. It appears to still work with shift-click but running /sheetroll label by default rolls the alternative message regardless of the state of that checkbox

velvet heron
#

Question: For items listed in item containers, how do I get it to reference the label from a dropdown list instead of the key?

I am using ${item.*}$, where * is the different kind key of the different types of items being referenced.

velvet heron
hazy saffron
#

Question: How do you run the 'lookup' function from within a macro?

bright berry
#

v12

#

...

#

I clicked on the search bar and typed that but okay discord, you do you

#

not yet compatible as of four days okay. Okiedoke!

#

V11 we stay

hazy saffron
bright berry
#

I'm not too fussed, so long as it all works Β―_(ツ)_/Β―

#

They'll get to it eventually

barren vine
#

Hey guys, is there a way for me to set a text-field to contain the dice a label is going to use in a roll?

#

for instance, text field with key damagedice, value 1d10

#

and on my label I have the roll message be ${[damagedice]}$

#

is something like this or close to this possible?

formal goblet
peak jacinth
#

Just trying to get the custom css module working with CSB. Anyone know what I'm doing wrong?

formal goblet
peak jacinth
#

Ooh, that worked! Thank you!

hazy saffron
#

Anyone know how to use actor.roll or /sheetroll now to differentiate between rolling the normal label or the alternative label? Itt seems to have changed

brittle moth
# hazy saffron Anyone know how to use actor.roll or /sheetroll now to differentiate between rol...

/sheetRoll should roll the main message, and /sheetAltRoll should roll the alternative

As for actor.roll, the function doc is

roll(rollKey: string, {alternative?: boolean, sendToChat?: boolean}?): Promise<ComputablePhrase>

The alternative option controls whether the main or alternative roll is performed. It is false by default.

You say it always rolls the alternative version ? If so, that is not right, I'll take a look πŸ™‚

rotund mason
#

Hi again.
This time I'm trying to put a dropdown list in my item, so the player can select from one of the character skills, for this the dropdown should fetch from a dynamic table (where the skills are in the character). I had done this in another part of the character sheet, with the dynamic table origin option, in this case, table key "habilidades" and option key "habilidades_nombre".
I tried the same in the item (witch does nothing), the tried "fetchFromActor('attached', "habilidades")" (witch also does nothing).
I know the item can access the list, since the next line is a label with this formula "${fetchFromActor('attached', "lookup('habilidades','habilidades_nivel','habilidades_nombre','Poder Natural')*5")}$" and this is working correctly.
Any advice?

drowsy rune
#

Well I'm gonna need help. I cannot open my template anymore because it says "maximum object expansion depth excessed". I would undo the changes I made but I just can't since I cannot open the template anymore...

#

Any way I can save my template and not start all over again ?

#

I spent the last 4 hours on this...

#

Last thing I tried to do was putting a tabbed panel in another tabbed panel 😦

vocal sorrel
#

You can probably still Export the template as a JSON file, though it will probably still have the issue.

#

Happened to me too once right after the 3.1.0 release, had to re-do a whole day of work.

drowsy rune
#

You mean exporting the template, and fixing the error directly in the text editor ?

#

I don't know how to do that, it's way beyond what I'm capable of

vocal sorrel
#

I don't know how to do that either, sorry.
But at least if you Export it, you will have it saved somewhere rather than just losing it completely. In case you do find a solution for it at some point.

drowsy rune
#

I'll try and see if one of the CSB creators can help me and work on something else in my system in the meantime I guess...

fresh arrow
vocal sorrel
#

Hi, my character sheet is beginning to get quite "feature-dense" and now it takes a almost an entire second (if not more) for all things to update on the sheet when a thing is changed. The console is saying that I am looping through quite a lot of things, so I assume that is why.
Is there anything I can do to improve performance?

formal goblet
formal goblet
formal goblet
drowsy rune
formal goblet
#

Alright, can you give me the template?

drowsy rune
#

I deleted it, I'm sorry. I remade the whole thing from scratch.

#

So far it's working, but is there a risk of it happening again on my other templates ? Because I have a few tabbed panels in tabbed panels

formal goblet
#

As long as we cannot reproduce the issue, we cannot fix it

drowsy rune
#

And I'm pretty sure that's what caused the issue in the first place. I created a tabbed panel in another tabbed panel and added panels and labels in those, then when I wanted to delete something, clicking didn't do anything. So I closed the whole template and was unable to open it again

#

I have the JSON template exported, would that work ?

formal goblet
#

Yeah yeah, the export is what I need

drowsy rune
#

Oh ok

#

I had the issue when creating the "pistols_carbines" tabbed panel

hazy saffron
brittle moth
hazy saffron
hazy saffron
#

I assume it's somewhat similar to an eval?

brittle moth
#

Something like

let phrase = new ComputablePhrase(
  "${lookup('dtableKey', 'column')}$)"
);
// Computing phrase with actor props
const result = (await phrase.compute(actor.system.props)).result;
hazy saffron
drowsy rune
formal goblet
drowsy rune
#

Yeah, didn't want to rush you πŸ˜…

#

It's probably a PEBKAC anyway

brittle moth
brittle moth
# drowsy rune

Is this export supposed to have the issue ? I can open just fine :/

drowsy rune
#

Yeah it is

#

It is straight up exported from a template I couldn't even open because "maximum object expansion depth excessed"

#

I just tested it again, imported the data in Foundry, tried to open it, same message

brittle moth
#

Oh you're right...
I was in a v12 instance, it worked in v12 but not in v11... weird ^^"

drowsy rune
#

πŸ€”

#

I updated my CSB today before starting my work on this template

#

Is V11 the available version right now ?

brittle moth
#

No, I'm talking Foundry versions πŸ™‚
I was in a v12 Foundry instance, working on v12 Compatibility for CSB, and your template opened just fine after import.
I tried laanching a Foundry v11.315, and it doesn't work there

drowsy rune
#

Oh, ok

#

Well anyway I remade the template and tried to put things a little bit differently

#

Thanks tho, I will make duplicates of my templates now before trying anything 🀭

drowsy rune
brittle moth
#

If you want the fixed template, I can send it to you πŸ™‚

drowsy rune
#

I found another, lighter solution but thanks !

#

Keep up the good work

#

Also thrilled to find out CSB creator is french 😎😎😎

formal goblet
brittle moth
#

Okay πŸ™‚
@formal goblet looks like the maximum supported depth is 14 ^^"

formal goblet
#

That's... not thaaat much

drowsy rune
#

So, just to make sure, how is this calculated ?

#

Putting a panel in a panel makes a depth of 2 ?

brittle moth
#

It's the number of parents a component has. So a panel in a panel would be 2, exactly (Body > Panel > Panel)

formal goblet
brittle moth
#

14 is a large number in my opinion

drowsy rune
#

I mean I’m pretty sure I didn’t reach 14, did I ? 😳

brittle moth
#

But it's all personal opinion I guess :/

formal goblet
#

Every Container-like Component increases the depth

brittle moth
#

Technically you reached 15 with this ^^"

drowsy rune
#

😳😳

formal goblet
#

And yeah, the content of your Dynamic Table reached 15

drowsy rune
#

Ok so I’m kinda scared of editing my two other templates now

formal goblet
#

The thing is, I don't think we can fix this, because that is a limit set by Foundry itself

drowsy rune
#

Yes, I understood that part 🀣

brittle moth
#

there may be something else, I'll look, because even when emptying the Dynamic Table it fails, even if other components reach the same depth...

formal goblet
#

Oh true, the ones over the Dynamic Table are also Containers...

#

heeeeh?

brittle moth
#

Got it. It's the flag setting for the row-ordering that fails. Still an foundry-based issue, but could be fixable by saving the flag with the component's key instead of its address

drowsy rune
#

Am I at risk with that ? πŸ˜‚

formal goblet
#

That is the Table in question, so actually yeah. But you can fix that easily by deleting it again in the Template export

drowsy rune
#

It's on another of my templates

#

So what you're saying is I should reduce the number of panels

#

This one hasn't been edited in a while

#

I'll try to think of something

formal goblet
#

Well, surprisingly it doesn't seem to be an issue with V12, so it should be less of a problem with the major update

drowsy rune
#

Ok

#

I won't try anything until it's released then

formal goblet
#

This can take a while until CSB reaches V12

drowsy rune
#

mmh

#

I'm gonna finish with this template and see if I can make the two others somewhat lighter

#

Would you be able to tell me if they are at risk if I send the exports here ?

brittle moth
#

To be precise (and technical) :
The maximum depth for a flag setting is 30 (just tested it out)
That means, considering the way flags are set in CSB, the limit is around 14 container depth as of now. You should be able to determine this on your own by counting the number of containers containing your element πŸ™‚

Furthermore, this impacts mainly Dynamic Tables, Item Containers , Collapsible Panels & Tabbed Panels, since these are the only elements setting Flags

#

Lastly, this should be fixable by saving the flag with the key of the container instead of its address. It would need to make the key mandatory on Tabbed Panels & Collapsible Panels though :/

drowsy rune
#

I see, I'll just try to make lighter things

formal goblet
brittle moth
#

FYI in Foundry v12 the limit on flags is 98 depth, so roughly 48 Containers

drowsy rune
#

Noice

formal goblet
#

Yeah, ok. That is actually more than enough

brittle moth
#

We could also save it with the templateAddress by replacing . with -
Making it a really long key but not nested objects

formal goblet
#

- are not allowed in keys, so that could work

brittle moth
#

Not relevant, the template address is composed from contents and indexes ^^"

formal goblet
#

Ah yeah, that was something completely different

brittle moth
#

The string in the case of this tempalte is 160 characters long. I'm trying in foundry v12 to get the max string length for a Flag, but it seems to take a long time, indicating there may not be one

formal goblet
#

Until you reach Stack Overflow 🀣

drowsy rune
#

I'm making my tabs lighter because of this πŸ˜‚

#

It's proving easy for the clones, but for the Jedi and the Wayfarers, might prove a bit more tricky

brave trench
#

I'm not sure if there is any noob friendly documentation regarding changes but I just updated from 3.0 to 3.1.3 and have 2600+ errors lol. First one I'm looking at seems to be related to equalText. What changed?

formal goblet
rotund mason
heavy elm
#

Hello, I try to rebuild the System "Arcane Codex" in custom system builder. So there are a few range cast's and attaks in this system. How can I build them using custom system builder? Do I use macros?

heavy elm
#

Arcane Codex or CSB?

#

Oh never mind, CSB.

formal goblet
#

AC actually

heavy elm
#

2nd editon, 3rd suck

formal goblet
#

Yeah, I heard many complaints about the Vampires there πŸ˜‚

heavy elm
#

They have alot more issues

#

AC isnt flawless, but I like it.

formal goblet
#

Well, there were also issues with the authors (one of my friends worked with them and I heared interesting stories)... whatever, I won't go into the specifics. So, what exactly do you wanna have in the combat system?

heavy elm
#

Spells and the Kampfschulen Levels. I'm actually new to foundry and dont know how to create a spell in an elegant way. The whole dice throwing and damage I could do manualy If I have to. But it would be way more elegant to have it as a "click and it works"

formal goblet
heavy elm
#

Thought about that too

#

You seem interested, have you ever played "Das Lied der Gier"?

formal goblet
#

I have that pdf, but no

heavy elm
#

ATM I do all places, Charakters, Battlemaps etc for foundry

formal goblet
#

I see, a tedious task you have ahead

heavy elm
#

Actually Im almost done with chapter maps. The rough part with rebuilding the System is coming.

velvet heron
#

For Label Style: Button, if I'm reading the system document correctly... there's no way to make the button actually do anything, right? It's just there for visuals?

formal goblet
velvet heron
#

Ah, I see.

#

But, for instance, it can't redirect to another tab of a Tabbed Panel?

formal goblet
#

You could. With a Script

velvet heron
#

Unfortunately, scripting is where I hit my limit of knowledge.

#

I'll make due with what I have, thank you.

elder raft
#

CSB isn't up to Foundry v12 yet right?

I went looking for a way to reference the player color and noticed they have this in v12 now, but unless there's another way to ref play color in a chat card I'm gonna have to wait right?

torn wigeon
formal goblet
torn wigeon
#

I can talk in server VC if you want

tawny galleon
#

I just updated and I can't seem to get setPropertyInEntity expressions to work and was hoping someone could help me out?

//refills a character's action dice when they click it
${setPropertyInEntity('self', 'actionDice', 4)}$

Another is when a player consumes an action dice doing something and I want to decrement it.

${skillsGenSel}$ 1d6+(${!modVal}$)
${Roll:=[1d6x6]+modVal}$
${setPropertyInEntity('self', 'actionDice', "actionDice - 1")}$

sharp geyser
hallow ginkgo
pale tusk
#

So, ever since the recent updates (unsure which one, exactly, as I haven't been able to go through every one of my many items with each update) some of my items just cause Foundry to completely lock up when I try to open them. I'm finding no errors in the console that seem to relate to these specific items. Other items using the same template aren't having problems.

The item seems to get "stuck" while attempting to load, not even generating an error to the console. Specificaly, it getts stuck on the Rendering EquippableItemSheet call.

pale tusk
peak jacinth
#

Funny, I thought the latest update of CSB fixed that bug. Are you on the latest version?

drowsy rune
#

Alright, time to go from this:

#

To something more like this:

tawny galleon
heavy elm
#

Hey, is it possible to write a forumular for depenencies? Like when I chose in a dropdown-menu my race then increase or decrease stats? Like when 'Elf' is selected in dropdown make it +1 AG and -1 STR?

brittle moth
# pale tusk So, ever since the recent updates (unsure which one, exactly, as I haven't been ...

Did you try reloading the template in these items ?
You have two ways of doing this :
If the items are in the sidebar, you can open the template and click "Reload all item sheets"
If the items are linked to an actor, you need to do it manually. You can run this script in your JS console, or in a Script Macro to update every item of every actor :

game.actors.forEach((actor) => {
  actor.items.forEach((item) => {
    item.reloadTemplate();
  });
});

Be careful, this could take a reaaaaally long time, depending of your number of actors, and of the number of items in each actor πŸ™‚

hazy saffron
brittle moth
drowsy rune
#

Hey Linked

#

I'm still trying to make my templates lighter

#

So far it's going pretty well πŸ˜›

hazy saffron
drowsy rune
#

Would I be able to click and drag or copy one part of a template to another tho ?

#

of course I am

#

That's dope

hazy saffron
#
[Detected 1 package: advanced-macros]
    anonymous https://mythara-game-dev-st.forge-vtt.com/scripts/foundry.js line 22924 > AsyncFunction:5
    forEach https://mythara-game-dev-st.forge-vtt.com/scripts/commons.js:4213
    anonymous https://mythara-game-dev-st.forge-vtt.com/scripts/foundry.js line 22924 > AsyncFunction:4
    forEach https://mythara-game-dev-st.forge-vtt.com/scripts/commons.js:4213
    anonymous https://mythara-game-dev-st.forge-vtt.com/scripts/foundry.js line 22924 > AsyncFunction:3
    #executeScript https://mythara-game-dev-st.forge-vtt.com/scripts/foundry.js:22928
    execute https://mythara-game-dev-st.forge-vtt.com/scripts/foundry.js:22876
    execute https://assets.forge-vtt.com/bazaar/modules/advanced-macros/2.1.0/main.js:40
    _onClickMacro https://mythara-game-dev-st.forg```
formal goblet
brittle moth
swift wolf
#

Is it at all possible to have a dropdown that changes its key and labels based on a second dropdown?

Basically, if I have a dropdown that asks the player to pick between two options, is it then possible to have the second dropdown populate based on the choice in the first one?

Currently I'm doing it with three dropdowns where the first tells the final formula which of the other two pull the value from. Which... uhh.. works. But it bothers me because I feel like there has to be a better answer.

Unless there's a better way that I'm not thinking of.

formal goblet
swift wolf
#

wait. no that's not right. crap. will pound keyboard until I figure this out. πŸ˜›

swift wolf
#

oh damn. that was... very easy. I should have realized. I was making things way too complicated in my head, because I can absolutely do it with a single dropdown, which is just as good if not better.

${lookup('skills_main', 'skill_name')}$ , ${lookup('skills_specialized', 'skill_name')}$

Martin, I don't know how you put up with us all, but I'm really glad you do. πŸ™‚

half beacon
#

I'd like to divide my players' inventory into different categories: Key Items, Weapons, Consumables, Ingredients. Their inventory is a separate tab on the character sheet. I know it can be done with Item Containers, but is it possible to make a button or a dropdown arrow to hide/show Item Containers? For example, if my players only want to see their Key Items, they can click the dropdown arrows to hide Weapons, Consumables, and Ingredients.

elder jasper
#

Is there the possibility of creating a roll on an item, where it pulls some attribute from the character's sheet?

rotund mason
swift wolf
rotund mason
elder jasper
#

tks

bronze moon
#

Good morning

#

is it possible to add multiple keys to a drop down key? Like Main_H, equiped

half beacon
#

Didn't realize I missed some updates! My panels didn't have that option. Oops!

tawny galleon
#

sorry to bug but hoping to bump this issue and see if someone could help with why this expression isn't working?

I've tried looking through the syntax changes and don't see a reason why it shouldn't work

${setPropertyInEntity('self', 'actionDice', "actionDice - 1")}$

formal goblet
tawny galleon
#

It's a number field. Using action dice as a resource id like to decrement when they make a roll

formal goblet
#

And actionDice is the key of the number field, right?

formal goblet
bronze moon
#

Would the tags be separated by commas?

tawny galleon
formal goblet
#

It should update the character sheet

tawny galleon
rotund mason
#

Ok, I'm not sure if this is even possible.
I'm working on a "Generic Buff" as an item. The idea is the player puts the values the buff... buffs in the item, and they get applied to the char. I know how to do that with item modifiers, but I'm trying to make it faster and more user friendly to the players

formal goblet
bronze moon
#

I want it to have 2 separate tags. Main hand will put it in the main hands. Spot and equipped will take it out of the backpack

#

This will be important because ring slot 1 and ring slot 2 will have a similar issue.

formal goblet
bronze moon
#

Yeah that was why I was asking if the key slot can have multiple keys in it

#

Or if it is one key per option.

formal goblet
bronze moon
#

My backpack search for options that aren't equipped. So if it has the equipped. Key. It should go in the backpack correct

formal goblet
bronze moon
#

Ok

#

it doesnt work. no suprise i guess

#

So new idea. So if an item has a specific drop down selected i want it to not be visible in a specific item container. SO if Main_H is selected it should not show in the backpack. not(item.Main_H) does not work i assume because its in a drop down?

hazy saffron
bronze moon
#

So interesting sort of bug. When a number box with allow relative modification becomes a negative number. It will continue to double itself

#

Im sorry i am spamming with questions.

In a visability formula. I am trying to make the words dead appear when you are negative more than your max HP. This does not work. any ideas?
Health <=(-Max_HP)

brittle moth
brittle moth
# bronze moon So interesting sort of bug. When a number box with allow relative modification b...

It's not a "bug", more like a "side effect". What I mean by that is : Suppose you have a Number Field with relative modification activated. You input "-2". The system can not know if you want the field to have the "-2" value, or if you want to decrease the value by 2. Given relative modification is activated, it chooses the latter. Now if your field is already negative when editing it, well, all the system sees is that the value of the field is "-2". And it decides you want to decrease the value by 2. So it does that.

TL;DR : The relative modification feature is not supposed to be used with Number Fields that can be negative πŸ™‚

bronze moon
brittle moth
formal goblet
bronze moon
#

Well tried it again and now it works go figure

#

I would love item containers that only contain the items dropped in them. This would be huge for me

#

like monumentally huge.

brittle moth
#

I understand, but it's also monumentally difficult, as Foundry links items to the actors, and it would be difficult to know which container the item was dropped on ^^"

bronze moon
#

I completely get that. I am incredibly greatful for all the work you have alrady done!

heavy elm
#

Hello, is anybody able to help me with a specific formular question? I need a formular that compares one numeric value thats filled out by by the player, calculates another value calculated by stats on the sheet and returns an specific value. Like chained 'if-then'.

#

I actually dont know where to look for this in math.js, I'm kinda overwhelmed.

iron badger
#

How can i activate a roll inside an actor sheet through a macro script?

sharp geyser
#

Loving the new additions to V-11. Currently enjoying the use of "Meters" πŸ˜„

velvet heron
#

What do I have to do if I have deleted an item template and now any time I add any other kind of item to an actor's item container, I keep getting this error message?

torn wigeon
#

question how do i install the custom builder?

brittle moth
# foggy grotto Meters?

It's a new element added with 3.1.0, allowing to display a value in a gauge-like style. @sharp geyser displayed it in his screenshot, the yellow bar just below the Reputation labels

brittle moth
dire socket
#

Is there an issue with updating rich text editor text? I can't seem to actually save any changes in the component menu for default value or for the sheets themselves

torn wigeon
#

as i want to try to figure out my character sheet of my w.i.p. system

foggy grotto
boreal hull
#

What symbol do I use in equations for division

#

Is it /

sturdy mesa
half beacon
#

I'm having trouble getting Item Containers to filter based on what's selected in a dropdown menu on the item. Tried using the key from the options, and then tried using the label too. Tried item.key and just key. Regardless of what I try, it either displays all items or none at all. It worked just fine before I updated from 3.0.0... πŸ˜…

quasi plume
iron badger
#

is it possible to put macros inside individual items (not on the templates itself)?

half beacon
hallow ginkgo
#

Hey folks, is there a way to set a global and comunnal variable that all the players can pull from?

#

I'm creating a Ten Candles sheet. All players roll the same amount of dice of the candles that are in the table

sharp geyser
frank creek
#

im trying to write a macro that pulls an attribute value from a character sheet and adds it to a chat message, but it keeps saying fetchFromActor is undefined, is there something i need to do so i can use that function

#

or is fetchfromactor not something i can use in macros

brittle moth
brittle moth
brittle moth
brittle moth
brittle moth
frank creek
frank creek
#

its a key named 'str'

#

this seems like a super simple task im just struggling to find a usable example to model off of

formal goblet
formal goblet
drowsy rune
#

Hey Linked and Martin, thank you for your help the other day. I was able to make all my templates lighter to make sure I wouldn't run into the same issues again. That was very cool of you.

pale tusk
#

Is there a way to make a panel define its width based on whether its visible? I love the panel visibility toggle, but I'd really like to be able to have a panel shrink down to a very small size, out of view, if it's not being used, then expand to its full size when it's open.

sharp geyser
#

Every time I try and use Dynamic Tables to referrence other dynamic tables I feel like I hit a brick wall :|

tawny galleon
#

does anyone have an example of a macro that would update a specific property of all actors to a constant value? Or if there's a repository somewhere of some simple macros to look through for examples?

toxic lintel
hallow ginkgo
drowsy rune
#

Can I get help with a formula ?

So I have reconnaissance regiments in my army and their bonuses is that the first one adds +2 intelligence levels to my army, and subsequent regiments add only a bonus of +1. How can I write a formula that will calculate this ?

formal goblet
drowsy rune
#

It's the number field on the left

formal goblet
#

${(x > 0 ? 1 : 0) + x}$

drowsy rune
#

I know the formula is wrong, I just copy pasted the formula

#

Oooh

#

Thanks !

#

I'm gonna try this right now

#

What if I have 0 recon regiments ?

#

The bonus should be 0 then

formal goblet
#

Yeah, it would

drowsy rune
#

Ok, I'm trying to figure it out then :p

#

Thank you so much !

dusky mauve
#

using in Label Roll Message
${#ENERGY_STR:= ENERGY >= ENERGY_COST ? '':"<h4 class='dice-total failure'>Not Enough energy</h4>"}$

After upgrading to ** 3.1.* ** start throwing an error.

Logger.js:33 Custom System Builder | Unsupported type of condition "Array"
TypeError: Unsupported type of condition "Array"

formal goblet
drowsy rune
#

${medical_regiments_total > 0 ? 5 + medical_regiments_total*5 : 0}$%

Managed to do this, where one Medical regiment adds +10%, then subsequent medical regiments add 5% each. Not sure of how this works but my GF is helping me πŸ˜‚

dusky mauve
formal goblet
dusky mauve
formal goblet
formal goblet
#

Yep, that would be the issue. You can go down the variables of ENERGY_COST to see which one of them is an Array

dusky mauve
#

${CLASS_MASTERY_EFFICIENCY:=fetchFromActor('ServiceUser',"lookup('game_level', 'energy_efficiency','level_value','${CLASS_MASTERY_LEVEL}$')", '1.5')}$

Returning 1.3 as an Array 0_o

rotund mason
#

One half math half code question. I'm using a ugly nest of ifs to compute the level of an ability from the character points invested in it. The formula for a level is double the level in points plus the already accumulated value, so a first level would be 2 points, second level 6 (2x2+2), third 12 (3x2+6), fourth 20 (4x2+12) etc. Any advice to make it more... decent? The formula is in a label baked into a dynamic table if it's relevant

formal goblet
formal goblet
# rotund mason One half math half code question. I'm using a ugly nest of ifs to compute the le...

It is actually a purely mathematical question. What you're looking for is a function, which maps to the values you need. Take an example from the Gauss Summation: https://letstalkscience.ca/educational-resources/backgrounders/gauss-summation

In this case, x = (n * (n + 1)) / 2. So your challenge is to find a function, which meets your requirements (which can be challenging without a solid understanding of algebra)

Edit: (n * (n + 1)) should solve your problem

Let's Talk Science

Learn about the history and math of the Gauss Summation.

drowsy rune
#

${(jetpacks_regiments_total > 0 ? 5), (jetpacks_regiments_total > 1 ? 5+(2*jetpacks_regiments_total)): 0}$ cases

What am I missing here ?

I am trying to have:
if x = 0 -> 0
if x = 1 -> 5
if x = 2 -> 7
if x = 3 -> 9

And so on

#

I'm pretty sure I'm not far from the solution and the problem lies in how I am wording the formula

formal goblet
#

${(jetpacks_regiments_total > 0 ? 3 : 0) + 2 * jetpacks_regiments_total}$

drowsy rune
#

Much simpler

#

I keep forgetting stuff. Man i have a long way before being comfortable around this

#

What would I want to add to the formula to prevent it to grow past a given number ?

formal goblet
drowsy rune
#

Thanks

#

I'm not sure I understand...

#

At x = 4, result is 11 but I don't want it to go past 10

rotund mason
#

put a min(10, formula) and it will take 10 or the formula result, whatever is lesser

#

${(min(10,jetpacks_regiments_total > 0 ? 3 : 0) + 2 * jetpacks_regiments_total)}$ using martin's formula

drowsy rune
#

Oh...

#

Mh, it isn't working

#

Still gives me 11 at x=4

rotund mason
#

try ${(min(10,(jetpacks_regiments_total > 0 ? 3 : 0) + 2 * jetpacks_regiments_total))}$

drowsy rune
#

Works !

#

Thanks, sooo

#

When I want a value not to exceed a number, it is to be put in the beginning of the formula

formal goblet
rotund mason
#

And the () do matter, as this example shows

drowsy rune
formal goblet
drowsy rune
#

Sure

#

Yeah no I can't because I need an open bracket ahahahah

#

I guess I have my answer, always put the min function at the beginning of the formula

#

I know you guys use the math.js library a lot and also the CSB readme but is there anywhere I can learn json from the very start with some progression ? I love how helpful everyone is but sometimes I'd like to figure things out for myself

#

I have zero experience with any of this

drowsy rune
#

Whatever is needed to use CSB

formal goblet
drowsy rune
#

Ok, thank you

dire socket
#

Oh I noticed an issue, at least with my client, whenever I use the in sheet editor for the rich text editor, it does not update when I try to save it. The other options seem to work just fine though. Oh and when setting the default it gives an Error, No Form Element Found, but if I put the <p> around it, it saves with it still there.

fresh arrow
#

Dears, a question...
I have made an item with "status" (0=unequiped, 1=equipted) and "location" (0=none,1=left hand, 2=right hand) dropdown fields.
On char sheet in item container for those items I have added two labels "equip" and "unequip" which set item property to 1 or 2 corresponding.
Quite interesting thing is happening when I add an item. If I will open it and manually change values to status=1 and location =1 I can see that item will change those statuses (there is additional item container for only equiped ones) and land in special container. Now on if I will use labels "equip" and "unequip" I can see that item will change and once will be visilble on container for equiped and other way not, so it works as shoud.
... but if Item is equiped and I will open item its status will be visible as "unequiped" (0) but item is still in "equiped" container and if I will close item window it will be removed from "equiped" container...

... I'm confused, any one can explain why?
(I can send recorder video if could help)

sharp geyser
#

Is there another way to do this? This is currently breaking absolutely everything 😒

sharp geyser
fresh arrow
sharp geyser
alpine tiger
#

Hey there, I am asking some help with a couple of macros for a Skill Check and Attribute Check:

Attribute Check- There would be two different checks: Single Attribute and Dual Attribute. The Single Attribute Check is 2d6 + One Attribute, Target Number 12. The Dual Attribute Check is 2d6 + Two Attributes, Target Number 18.

Skill Check- This would be a single check. The Skill Check is 2d6 + Skill Level + Link (a modifier based on Attribute). The Target Number is based on the Complexity of the Skill:

Simple-Basic (SB) - 7
Simple-Advanced (SA) - 8
Complex-Basic (CB) - 8
Complex-Advances (CA) - 9

I would like to create a macro especially for the Skill Checks where a prompt could pop up where you can input the Skill Level and (hopefully) choose the Complexity from a dropdown.

Finally if possible I would like to see if the Dice Result could be accompanied with a Margin of Success/Failure message with the actual MOS/MOF and a small description:

+7 or more - Spectacular
+6 to +5 - Extraordinary
+3 to +4 - Good
+1 to +2 - It'll do...
0 - Barely made it!
-1 to -2 - Almost...
-3 to -4 - Bad
-5 to -6 - Terrible
-7 or worse - Disastrous

sharp geyser
fresh arrow
pale tusk
#

Is there a way to make a panel define its width based on whether it's visible? I love the panel visibility toggle, but I'd really like to be able to have a panel shrink down to a very small size, out of view, if it's not being used, then expand to its full size when it's open.

frank creek
#

hmm weird, when i tried to run that it gave me the error "TypeError: undefined. Cannot read properties of undefined (reading 'system')
[No packages detected]"

formal goblet
frank creek
#

oh yeah i fixed it and it didnt throw the error message

#

although i still got "Your current strength is ${str_val}" instead of the value i was trying to assign, hmm

#

but, when it encouters an error it aborts before it even sends the message so this is progress lol

#

interesting when i assign just a string value to the variable it still prints the variable name, curious

#

aha! i figured it out and its working now

#

now, would subbing in the targetted token (or whatever the syntax for the actor that's activating the macro is, still getting the hang of it) work for that function

median mirage
#

Hi, I'm working on an implementation for Godbound, I was wondering if there's a way to have derived values like modifiers or rolling from number fields. Not looked long, but feels like I'm probably missing something

quasi plume
# median mirage Hi, I'm working on an implementation for Godbound, I was wondering if there's a ...

I would look at this for using rolls in formulas
https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/main/README.md#46-add-rolls

You can give a value to a key and use that value derived key in rolls.
${[:key_Of_something:d12]}$
Or

${[:key:d:other_Key:]}$

Essentially rolling whatever numbers you like based off the values of your keys.

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

I'd like to be able to hide the blank space if the character image panel is hidden.

formal goblet
formal goblet
pale tusk
hazy saffron
#

Is there a new function for a 'sheet toggle' that can appear on items / item containers on an actor sheet that can be used to 'activate/deactivate' a buff or item's effectst from the sheet rather than opening the item and using a checkbox?

copper glade
#

What's the path for accessing a player-held item's template?
actor.items.find(item => item.???)

#

or is there something like getTemplate()?
I'm just looking to find itesms using a certain template which are on the player

iron badger
#

i've been trying to make macro calls through my label rolls but i can only make it work when i put the exact macro name in the formula (i'm trying to use it in my items)

thought that %{game.macros.getName"${!item.name}$".execute();}% would work but my ignorance in coding shows i guess. any tips on how to solve that?

hazy saffron
#

General question: Is there any good practices we could look at to reduce lag in our games? Love all the CSB capabilities but we seem to have a lot of lag in games with 4-5 characters. We use a lot of items, but have really slimmed down the hidden attributes. This may just be a product of using the system, but wanted to check if there was anything else we could do.

hazy saffron
dusky mauve
#

Custom System Builder | All props for Beastmaster (ibJ55IrmRWDC2ACv) computed in 1 loops.
foundry.js:13544 Foundry VTT | Item creation prevented during pre-create

Can't add items directly from compendium more than one (different item).
If import Entry and than end all good.
It worked before upgrade.

faint wharf
#

hi guys anyone tried to make some AP toolbar? with regain on endturn or something similar?

rotund mason
faint wharf
rotund mason
#

something simple like that?

faint wharf
rotund mason
#

more than that, you need someone who can use css or something

faint wharf
faint wharf
#

thx

rotund mason
#

code looks something like this

faint wharf
#

ok great now i need to csss it into seperate points πŸ˜„ thanks

faint wharf
#

other thing. Can be something done to atributebars so they are sin as native atribute bars to bie picjed by other modules? like battle carusell from ripper?

rotund mason
#

you would need to read the code from the module, look where it's looking for data and make sure your bars supply that info... that's... easily said than done

#

even more since battle carrousel doesn't work with the custom system builder at least last time I checked a few versions ago

faint wharf
rotund mason
#

that's way over my head, maybe Martin1522 or LinkedFluuuush can help you

faint wharf
#

think so tho , will try :]

brittle moth
#

#package-releases message
Hey everyone ! πŸ™‚ I lied, I had some more quick features for you while working on v12 compatibility !

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

Features

  • Added button to open the assigned template sheet on a character or item
  • Added display of template modifiers in item modifier dialog
  • Added display of hidden attributes and attribute bars in actors
  • Reworked Meter rendering to allow for value display

Fixes

  • Fixed an issue with Label chat functions
  • Fixed an issue with components nested too deep into sheets
  • [#361] Fixed issue with rich text editors closing on error in component dialogs
  • Fixed an issue with number Field which would not save the value 0 when empty

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

hazy saffron
hazy saffron
faint wharf
brittle moth
hazy saffron
hazy saffron
faint wharf
hazy saffron
faint wharf