#Custom System Builder
1 messages Β· Page 30 of 1
Installed 3.1 and having some issues...
For starters I can't open a character sheet. What does this error mean?
That's a rare one. Can you send me the character sheet?
I cant even open a template to fix whatever is going on... Template throwing errors a mile long. Didn't have this problem before update.
Open a new ticket with this issue. I'll see if I can take a look at a later time
That doesn't seem to have helped?
Can you limit the number of items in an item container
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?
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
Yes, though the answer is somewhat dependent on what kind of text you want to pull and where the field and button are located.
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
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?
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
We've all been there. I'm asking these questions because they can change the answer.
yeah - I'm sure they can, I really appreciate the help!
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.
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!
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.
Thank you! I will save this to a document because I will certainly use it eventually!
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?
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
Choose one of these without .actor
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.
game.user.targets returns a Set of the targeted Tokens. You should work from there
Not without a World Script
I did not realize Sets were a distinct thing. So ... forEach and push the name values to a new array?
Uhm... maybe Array.from(game.user.targets.map(token => token.name)).join(',');?
Ok. Under normal circumstances, that works. However, because the script is stored in a text field (in an item) and then being called by a Label roll message (with its own complicated script), it's throwing an error.
Specifically, it seems to be converting the '>' into '>', which is new and interesting.
Uhhhhh... You sure, that this should be in a Text Field?
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.
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)
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.
You also have full access to the options of a ComputablePhrase now (including hiding the result, showing FormulaExplanation, local Variables, etc...)
Ok i just realized that all item containers on a character are a single container is that correct?
More or less, but your explanation is a bit off. Just imagine that all your Items are stored in a single bag and that Item Containers are only displaying the content of the bag.
Yep thank you for the confirmation. I was really hoping they were independant
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.
They're more item displays than item containers.
Hi, total newbie to CSS and CSB here. How can i change the font type on CSB?
can a player change the template on their sheet, and thereby lose their data? If they can, how can I lock that down?
By default only the GM can reload a sheet (aka apply the latest template version)
You can change this in the system settings π
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
So all these actions are happening after the dices are rolled? Oooffff
Yes the spirit dice are held as a reserve pool... I was thinking I could do it with a fillable PDF and use Monks Active tiles to access it. But it isnt an elegant solution
I think you either need a lot of Scripts in the Chat Message with Buttons or you transfer the roll result to the character sheet and do your things there with additional Label Roll Messages or Scripts
Not being super familiar with the CSB set-up... Is it easier to set it up in the character sheet?
There is a Kamigakari System in foundry I could take a look at for ideas, but I dont have a ton of skills in that area.
It is probably easier, because you don't really have to think about how to access values (because all values necessary are already present in the sheet)
Well, I don't know anything about this system, so you probably have a better idea than me
quick question, how do i update my csb from 3.0.0 to 3.1.0?
From the Foundry setup screen. Just go to the systems-tab
Can the same keys be present in multiple Item templates? I am assuming yes but want to confirm
Yes they can
Keys can be reused / copy to diverent templates (actor or item) .
Just not reused on same template.
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
I really thought this would work. Any hints?
ref(item.Weap_Hand)= Main_H
oh so not only me lost item filtering
Haha i guess not. @formal goblet will swoop in with a direction for me to search and ill share whatever i find
yee i tried to use regular conditions but it looks i did something wrong: item.typ=='ubrania'?true:false
The Item filter formula already searches for true false
item.typ=='ubrania' does not work eighder
and you need to at least ref(
checked
item.typ alone wouldnt search for anything would it?
oh
dont get me wrong i know i am missing something. because
ref(item.Weap_Hand)== 'Main_H'
Doesnt work either
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
no idea.
Error: Uncomputable token ref(Main_H)... so maybe this needs to be a fetch
So it is outputting the correct answer
i just sliced a goat for a summuning, dev should spawn soon
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 ==?
equalText(item.Weap_Hand, 'Main_H')
question, can lookup be already used in 3.1.0 to prepare ahead of time for jump to 4.0.0?
y
@formal goblet What section is that from on the wiki?
Ahh ok thank you! I didnt check FAQ
can negetion or "or" "and" be used with it?
or(x,y)?
Absolutely !
equalText(item.Weap_Hand, 'Main_H') and equalText(item.Weap_Type, 'Sword') works fine !
Hey everyone ! π
Version 3.1.1 is now generally available, with the following changes :
Fixes
- [363] [356] Fixed issue with duplicated keys in templates causing actors not to open
- Fixed issue with lookup computation
- Fixed issue with Dynamic Tables and Item Containers autosorting
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
Also a thing! Wasnt 3.1 to have posibility for items to hold other items?
It didn't make the cut. This feature will be hard to implement, as it is not handled by native Foundry at all, so I chose to delay it to a further version in order to release this one now ^^
The 3.1 took much longer than initially planned already ^^
other thing. Anyone made visual or not Action points counter with restock on end turn?
Like for all intent and purpose i believe items should still be on actor, just tagged together for calculation(in actor or container) like weight, group creation/destruction and marker to hide show on total list, Actualy ill stop here for sure you gave it a lot more thought and had those ideas looong time ago too
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.
it seems like when reading a number field from a dialog, entering -20 (or other negative values) defaults to 0
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.
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?
See if you get a result with only equalText(form11,'Wild')
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.
any news on the next CSB update?
3.1.0 was released two days ago, and 3.1.1 a few hours ago π
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
So if we extrapolate from the increasing rate of releases, we should expect 5.0 sometime early tomorrow? π
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
I'm pretty sure I've gotten that module to work. I'll double check when I get back to my computer.
Oh, speaking of meter elements, are they purely for display or is there a way to interact with them on the sheet?
Is there a way to do nothing when a condition or a case (switchCase) isnt met?
Define do nothing? (E.g. do you want to prevent an action, post a blank message, something else?)
Calm down, now :p
No, items in items could not be added to this version, not if I wanted to release it anytime soon ^^
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...
They are for display, and compute a usable value in other Formulas, just like labels. If you need a slider input, there is the new display option in Number Fields
understandable. Great update all the same! π
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'
Is there a reason you can't nest the cases?
im so dumb.... xD thanks!
i tried so much... and then this...
Oh, cool. I didn't notice the slider option before.
We've all been there.
It's brand new as well ^^
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.
Just to double check, is this the module you're using: https://github.com/theripper93/combat-tracker-dock
How about verifying your values with game.actors.getName('actorName').system.props in the console?
actor.system.props.key (you need the actor-context prior)
There's also a module called Data Inspector that can be useful for quickly verifying a sheet's data structure, though learning to use the console is still a good idea. https://gitlab.com/koboldworks/agnostic/data-inspector
I am an idiot and was on 3.0.0 and decided to update to 3.1.1 and now I am having to fix things. I will keep a pin in this for when I have successfully unbroken everything.
I do appreciate your help with all of this though.
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?
Related question, is there a way to display the max value as a postfix? For example, I want HP to display as "HP: 30/48" and to accomplish that I'm currently using a number field for the "HP: 30" portion, but I'm having to resort to a secondary label for the "/40" portion.
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
Good ... night I guess π
A 2 hopefully short questions.
- 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)
- 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]
Make sure that you have the sheet of the Token and not from the Actor in the directory (or any other Actor)
A CSS-file doesn't have the <style>-tag, that is part of HTML. What you want to do instead is this here:
.table {
background-color: #ccc;
}
Additional CSS classes: table
I see - simply putting the actor on the current scene and linking the actor sheet was enough to get that working
Still nothing... π€ͺ
I think you need a forward-slash, not backslash in the path
Just as an update, I went from 3.0.0 to 3.1.1. It was not without issues, but after interpretting some of the error messages console was sending me, I made some changes I planned on making anyways, and... while not everything works again, the check box does appear properly without doing the other steps.
Well, the Custom CSS module might also be an option. It's easier to use most of the time
At least something
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.
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)
How would i call out a roll icon in css?
.custom-system-dynamic-table-row-icons doesnt work for a roll iton
Hi, does anyone know if there's a way to modify the value in a number field using a formula?
And when should the value be modified?
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
setPropertyInEntity() is the right choice then.
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.
ooo thanks!
That's my first time seeing someone causing a dimension mismatch error. Which other functions did you use?
@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
oof... like a lot, a potential issue is that the attack dynamic table attempts to pull keys from other dynamic tables (weapon and art dynamic tables). This wasn't an issue before, but after the update it seems like some of the attack table's lookup/fetchproperty labels just don't work anymore.
I THINK the best thing to do here is just to try remaking the whole thing from scratch, cause it's honestly a mess.
Did you update to 3.1.1?
yes, the issue persists
Alright, then I need the whole Formula
Because the issue is not solely from lookup(). It only happens together with other functions
Got it, I'll put together what I've tried to isolate then.
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
Just remove ('') and the whitespace after
${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.
I see the issue. When you resolve lookup() it will return an Array (look up what that is if you don't know). And Array + Array has other rules than number + number
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.
It's more or less a hidden issue (even in prior versions). If you only need 1 value, surround lookup() with first()
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?
New error.
and when I seperate the two lookups, it only retreives one value, the other just, does not appear at all
We modify the passed props by creating the property item, which is an Object with the properties of the Item
Then something is wrong with the second lookup
Ok. Is there a way to invoke that or is it something I'd need to do manually (I'd assume this would just involve passing the prop portion of the item into a new object) and how would I get it into the computable phrase?
Can you make a label in an item container contain the roll formula from an item? basically trigger the roll from the item?
Yep, that needs to be done manually. You can check the code of the Item Container component if you want to know how
Not without a Script, because CSB-Formulas cannot access the content of Label Roll Messages (or trigger them)
Damn this would be super useful. This would allow me to have seperate formula stored in the item
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')))}$``
Try it out without the first lookup before the +-operator
@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
2nd
${first(lookup('Roll_Table_Art', 'Dmg_ModF', 'Name', sameRow('Art_Ref')))}$ like this? Cause it returns nothing (the first "2nd" is just a prefix to show where it is). The roll returns the the second message.
%{
linkedEntity.templateSystem.roll('key', {postMessage: true});
}%
Check your values with game.actors.getName('actorName').system.props. Also make sure, that you don't have UncomputedProps-warnings when updating a sheet.
Fixed
Thanks
No uncomputed props and I'm not sure what to look for with the console command I think everything is there (well labeled values in dynamic tables don't appear from the looks of it).
Er wait I can check the values
Hm
how can I (in a macro) return and display in chat links to all the items on an actor's sheet?
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
linkedEntity is already the item, so no prefix needed
thats what i thought but same error either way
What's the key of the Label containing the Roll?
item_roll
Well... what does console.warn(linkedEntity.templateSystem.getCustomRolls()); print in the console when executed?
ReferenceError: linkedEntity is not defined
Thats what i get when putting it directly in console. but nothing if i put in code
This needs to be executed from the Item Container
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
%{
console.warn(linkedEntity.templateSystem.getCustomRolls());
}%
Can you roll from the Item?
yes
Where'd you find this menu?
Well, I can't tell why it's not in there, so...
Nah, it's internal stuff
would be an awesome feature!
@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.
Oh nice thanks... So here is what I am considering. I think I can use Monks Active Tiles to call a table for the roll and display the pool of dice next to the map. (With little programming knowledge at that) Would a deck be easier? I have never messed with decks.
@formal goblet ok I am an idiot {item_roll: {β¦}}
is what it returns
It works just fine
I hadnt updated the item
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
I'd think using the cards feature would be a lot simpler than all of that, but I also don't have much experience using the card system. After a brief poke at it, I think the two biggest issues are that it doesn't seem to have a bottomless deck feature and hands and piles seem to exist in their own windows, rather than on the table.
Thank you... I will tinker with them.
The Card Tiles and/or Card Hands List modules might help with the display problem.
This seems much easier for sure. It bugs me a little that drawing a card reduces the chance of drawing that card a second time.
Eliminates it, unless you have duplicates. That's why I said it was annoying that it can't have unlimited decks.
Yeah thanks again for the idea. Maybe there is some way to shuffle the deck leaving the hand on the table
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.)
I think you can 'reset the deck' in a module... (Ready To Use Card Module) That might do it. Appreciate the advice
There is a module that allows cards to be played to the canvas. You couldn't use token vision in such a scene though.
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)?
also, if I place a button label on a sheet, how do I trigger a dialog or macro off it?
vyes
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 π
No, there is no postfix for Number Fields :/
Label is your only option :/
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.
Is there a way to have a panel fill more than one space on a table?
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.)
@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
No, doesn't seem to work. I'll keep looking, but thanks for the suggestion.
sorry
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?
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 π€ͺ
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.
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.
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.
There's only the hard way π
yeee but at least i found i just need shorter prompt list and file is much more usable
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 < roll ? Success : ''}$${Dif1 > roll ? Failure : ''}$</div>
Deactivate the Rich Text Editor and replace it with < and > again
alright - will try - thanks
that did it! thanks!
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?
yes (to the first)
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}
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
I take it this is in the API doc somewhere
probably, but I don't understand API speak... so it's been trial and error and questions here.
cool, thanks again
e.g.
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
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.
What's your goal?
What you have there will add the indicated formula to the chosen field with key Dam_Reduct.
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')
i am getting NaN
Errors in the console?
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
this just returns 4 regardless of what drop_equip is set to.
Is it perhaps only checking that drop_equip exists?
That's what you have, yeah
Which Foundry version are you running?
Do item modifiers not copy from template?
Item template you mean? They do.
I dont see them when i click item modifiers it shows none
It won't be displayed there
When you update the template does it update the item?
There should be a 'reload all' button...or something similar.
Yah i just tested and it works sorry to bother yall
Asking is the only way to learn, and we all did it π
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?
I think you should use heavy CSS, but not an expert here
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
Wdym call out?
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?
Well, the Formula is correct (although () is quite unnecessary)
I am getting unexecpected operator from that one
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
There's no if()-function
well that explains that
Show me your setup
Item Filter Formula without ${}$
Ah - found it myself. For anyone that might drop onto this issue in future. This happens when you try to copy to your clipboard and dont have a SSL Certificate. So it is insecure and wont copy. Nothing anyone here can do anything about ^^
Will update if i find a workarround
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 ?
What is the CSS term for the character sheet background??
Labels were never meant to be changed to be honest. So this case would actually be a unintended fix instead of a bug
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"?
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
That looks awesome and exactly direction of the question π
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.?
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)
So there is some good way to trigger usage of item bonuses when its added only to "equiped" container?
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)
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?
ok so its still on item level to determine if or where its equipped?
aye. the container itself is just like a window view of the items in the actor
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
You'll need a module for that, because neither Foundry nor CSB does that
Either name or ID
Yeah, just use the key with the item.-preifx in the last argument: ${first(lookup('skills_table_dyn', 'skill_rating', 'skill_name', item.key))}$
Ok, cool. That's way easier than I was afraid it was going to be.
So, if the key on the item was "item_inv_skill", I would use "item.item_inv_skill"?
heh. awesome. your edit answered my question. π
ok, I'll have to revise my whole workflow then, thanks for the answer
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.
@formal goblet I was wondering if it was possible to allow players template acess? So they can move between templates and so on
Check the settings π
Tyty
I'm using what I understand to be the current version of Foundry: V12 Stable 4 Build 327
Is CSB not compatible with the current version of Foundry?
Not with V12
Oh. That would have been useful to know.
huh. upgrading 3.0.0 to 3.1.0. broke my meter html.
Rather:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter worked fully. Was useful for quickly looking over HP and other resources.
Looking for the CSS grouping to change the grey backgrounds of items on the actor sheet.
If anyone can help please
The class for these is .content-link π
Thank you so much. I will try it once I'm home.
#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
Is it possible to put an item outside of an item container?
What do you mean exactly ?
For the record, items are linked to an actor. Item Containers are just a way to display the items, with filters attached to them to have a nice display.
i want the item to be displayed on the actor sheet without the need of being inside an item container, but when i try to put the item outside of an item container it just does not appear
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
I feel like there'd be less confusion if you called them Item Displays or Item Viewers, rather than containers.
Yeah, I thought about that, the name might change in a future release ^^
There are ways to reference items outside of item containers, but they rapidly become less convenient. There area also ways to make item containers look different, depending on what you want to do with them. Why do you want items outside of containers and where would you like them to go?
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
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.
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
Are your bonuses added as item modifers?
Yes
The checkbox is on the item to indicate that it's equipped?
Yep
So the item modifier should probably look something like ${equipped?BONUSKEY:0}$
If the checkbox is saved as "equipped"
Here's what an armor item modifer looks like on one of my items:
equalText(item.item_slot, 'slot_backpack')
That is the formula in question but not the error message. I need to also know the cause
As near as I can tell, it seems that having that formula as a "default value" prevented the item template from loading at all. Removing that, it now opens.
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.)
Well... That's a case for a bug-ticket
It's fine for now, but it might change in the future
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.
I can't even tell if we can influence that or not, but I agree that this is somewhat weird.
Ah wait, I remember what we've changed... Yeah, bugticket it is
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
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!
fetchFromActor('attached', ...) is able to pull data from an Actor into an Item (or Item Modifier)
A Label with %{return entity.entity.id;}% would suffice
Nice!!!!!! thanks!!!!
Configure Item Modifier tab, or on as a label on the item itself?
Doesn't really matter tbh
Choose one of both
both are sadly returning erros.
Give me info about the error
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.
Open the console with F12 and show the error message
And btw, if stat_con is a variable of the Actor, then you should surround that with ""
Thanks! Also how do I specify the key that I want a column in my container to reference? I have a size column in a container and I want it to display the contents of each item's item_size text field
${item.item_size}$
Not showing errors now after using "" (thanks for that tbh), but it's still rendering as 0.
Foundry VTT | Created Item with id [IKLSQfq9N9fXGJ7C] in parent Actor [gJnlbrm4I7SBB7CE] is what the console puts forth.
${fetchFromActor('attached', "stat_con")}$?
thanks. I found out my syntax was right but I forgot to specify the size in the instance π
Same thing. x.x
Show me your whole setup
Well this is interesting
TypeError: Failed to set the 'value' property on 'HTMLMeterElement': The provided double value is non-finite
Huh? How did you even manage that?
Im special
Gonna be quick with this gotta jet soon aaa
that error when i am trying to make new character sheet
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
Your modifier key seems wrong
It changes correctly if I set it to a number like 4 or something
Ok, so my assumption is wrong
@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
The value is mandatory in this case, yeah
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
Salright.
I think I fixed it. Just changed the code on everything. Apparently the system didn't like stat_acadditional
At least it works now
Yep. Thanks for the help still.
is there a way to have an AND operator in the ${}$ formula, like
${equip == 1 && class > 0 ? 1:0}$
${equip == 1 and class > ? 1 : 0}$
CSB uses and or
is it possible in CSB to make numerical radio buttons like in sandbox ?
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.
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?
Should be count(lookup(...))
That didn't seem to work to change the colouring.
.content-link { background-color: #fff; }
Maybe try
.content-link {
background-color: #fff!important;
}
That did it, Thank you so much!
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.
This looks like the head row, with the column names, and the Item Name Label has been emptied
Is this what you did ?
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.
EDITED: Seems, that problem could be somewhere on my side, as after few trials and refreshes I achive result without error...
yhh.. seems I have some strange behavior as sometimes it works and sometimes not... will probably delete it and start from scratch :/
Give Martin a ping, I only know little things like
- check console for errors
-basic CSB formula - CSB syntax
Martin is great, he knows all.
There is a confirmed issue with lookup, it should be resolved with the next release (3.1.3) π
I truly believe Martin knows more about CSB than I do ^^
It depends on which parts of CSB. You definitely know more about computation handling than me
Can you show what drop_playerClass and drop_equip return? Otherwise ${drop_playerClass > 0 and drop_equip == 1 ? 1 : 0}$ seems fine for me.
Awesome, thank you!
Well, I thought they'd return the key selection for the respective dropdowns, but testing here drop_playerClass (which is on the actor) is giving me -1.
Meanwhile drop_equip is on the item and appears to work fine, returning the correct index key.
Do I need something like actor.drop_playerClass maybe?
You need fetchFromActor('attached', 'drop_playerClass') to get it from the actor. I'd also recommend parenthesis to make averything clearer :
${(fetchFromActor('attached', 'drop_playerClass') > 0 and drop_equip == 1) ? 1 : 0}$
Docs for fetchFromActor : https://gitlab.com/custom-system-builder/custom-system-builder#4211-fetchfromactor
right, i just assumed cos it was already writing to labels on the actor without a ref it didn't need it
It depends. Is the formula executed on the item, or on the actor ?
item modifier
Then yeah, you need that. Item modifiers formulas execute from the item context π
alrighty, thanks for your patience guys
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 ^^
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
Not sure I tested sorting predefined lines, I'm definitely going to take a look at this
Undo worked fine for me in 3.1.0, and I didn't change it, so I'm surprised :/
What do you mean by "not working"?
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
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 π€
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)}$
works perfectly, thank you very much π
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?
How do I change the default width of the dialogue box?
In Item Containers, you can use the item's properties by prefixing them with item.
In your case, the formula in the Label should be ${item.skill_used_num}$
Brilliant, thank you so much! I had a feeling I was missing something but couldn't remember that detail. Cheers.
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"
Theoretically, you could use a Script to access the computation options, in which you can set the hide-flag:
%{
const props = entity.system.props;
options.hide = true;
localVars.dice = props.dmgd4 > 0 ? 'd4' : props.dmg_d6 > 0 ? 'd6' : props.dmg_d8 > 0 ? 'd8' : '';
}%
${dice}$
interesting workaround... will try that, thank you very much π
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).
sounds like a not small amount of codding π
It's not even that much, but migration will be horrible, because I want to get rid of the mathjs-library
Will it be possible to change the colors a meter will have? Like, instead of just green yellow red?
At least not via the component config.
got it
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.
Like
you can drag new item into trade chat, and then use button to confirm exchange π
The module item-piles is/was compatible with CSB.
I didn't had time to test it with 3.1 till now.
Isnt this the character sheet? Im talking about the pop up dialogue box...
#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
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?
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.
Roger that
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?
I am doing that in my game with a macro, but I have yet to figure how to fire that macro from the actor sheet (or an item on the actor). my macros are running from the macro bar
If it's a User Input Template, you can use a Formula in the default value setting, which uses the actor context on rolling
If it's a simple prompt, the default value is a Formula
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
Wow ! Gorgeous sheets !
Thank you!
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
Actually what would really be helpful: is there a way to see what a dialog/actor/item's data is?
teach me your secrets, holy
Download the custom CSS mod it helps a lot. I have no idea how to do actual CSS styling but the mod makes it way easier
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.
Yo, this is amazing. Can I pick your brain later?
Sure dude Iβd be happy to help out βοΈ
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
You need to uninstall the system, and reinstall it using this manifest link :
https://gitlab.com/custom-system-builder/custom-system-builder/-/raw/3.0.0/system.json
That's really weird...
Migrations for 3.1.x trigger template reloading, and attempt to fix issues with duplicated keys, maybe you had duplicated keys within your number fields?
I'd like to investigate this, could you send me an export of your templates and an actor which had the issue, so that I can take a look ?
sorry for the question, but is this a new built-in CSB feature, or something you added yourself?
The collapsible panels? Thatβs a new CSB feature
nice
It was specifically number fields and text fields held within tabs. I'm not home right now, but I'll get them to you once I am
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
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?
I think you @ the wrong person, but thank you anyway
Indeed I did. Sorry for @ing, I didn't realize I was 'replying' before.
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?
try removing the equalText and doing == instead.
(item.keyname == 1) for example
I had the same problem
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)
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
Bumping my question
Hi, using the "sameRow()" function is it possible to get the "Label" of a "Dropdown" component rather than its "Key"?
No, only the key is saved, you need to do the mapping yourself.
You can either use the switch function or set up a Dynamic Table with your Dropdoiwn Keys & Labels, and use the lookup function
Alright, thanks!
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
The modifiers are not repeated on the item, but are applied on assignation to a player. It could be a good idea to add them in readonly mode, just to see them on the items π
Yep, had the same idea. We could also include hidden attributes with resolved values
Well, with the amount of work required for the v12 compatibility, I may do a small 3.2 release with quick features like that π€
so whatever I will design on template level will be applied on char when item created from that template will be assigned to char even that I will not see (right now) that information on item or assigned item level?
exactly
oki dokie :D, thank you π
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
You can use fetchFromActor('attached', "Power * 5") for this case
thanks!
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.
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
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.
Never mind. Apparently it is not possible, as per the gitlab instructions for Dropdowns.
Question: How do you run the 'lookup' function from within a macro?
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
yeah we ran into that and it was a bit disappointing
I'm not too fussed, so long as it all works Β―_(γ)_/Β―
They'll get to it eventually
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?
Change it to ${[:damagedice:]}$ and you're good to go
Just trying to get the custom css module working with CSB. Anyone know what I'm doing wrong?
Just put nametag in the field
Ooh, that worked! Thank you!
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
/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 π
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?
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 π¦
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.
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
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.
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...
Edit: I was wrong π
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?
Which CSB-version are you using?
Not really. You can adjust, what is being logged in the console, but besides that you have no real control about optimization
Alright, thank you!
If you're using the Dynamic Table option, you can prefix the Dynamic Table key with parent.. Otherwise the combination of fetchFromActor() and lookup() should also work in the Formula option
The last one, updated today.
Alright, can you give me the template?
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
As long as we cannot reproduce the issue, we cannot fix it
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 ?
Yeah yeah, the export is what I need
Thank you for the syntax of both. Neither of those are currently documented in the Github documentation so it would be good to add them. I'v'e not seen question marks on variables, is that how the variable name should be?
The /sheetroll command is performing the alternative roll by default as is actor.roll it seems
The question marks denotes that the parameters are optional π
Indeed, they are not directly documented in the Readme, I'll fix that ! π
I'll give it a try and see if it fixes my needs. One further question, how would one access the 'lookup' function from within a macro? Just using 'lookup' in the macro retturns an error that it doesn't exist as a function
You should instanciate a ComputablePhrase :
https://gitlab.com/custom-system-builder/custom-system-builder#722-computablephrase
Okay I'll have to look into that and give it a try. It's a first time I've needed to do that
I assume it's somewhat similar to an eval?
Something like
let phrase = new ComputablePhrase(
"${lookup('dtableKey', 'column')}$)"
);
// Computing phrase with actor props
const result = (await phrase.compute(actor.system.props)).result;
That makes sense thank you!!!
Hope you can make sense of it so I don't reproduce the issue
I'm investigating. Can take a while
Found the issue, indeed, alternative roll message always takes the palce of the main message π
Will be fixed soon π
Glad it wasn't me then!
Is this export supposed to have the issue ? I can open just fine :/
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
Oh you're right...
I was in a v12 instance, it worked in v12 but not in v11... weird ^^"
π€
I updated my CSB today before starting my work on this template
Is V11 the available version right now ?
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
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 π€
So was I actually putting too much things in my successive panels ?
Looks like it. I never thought this could happen, but maybe Foundry v11 does not like too much imbrication
I tried just deleting the TabbedPanel you were talking about from the export, and the templates opens with no issues
If you want the fixed template, I can send it to you π
I found another, lighter solution but thanks !
Keep up the good work
Also thrilled to find out CSB creator is french πππ
It seems that if I delete this table here, it starts working again. But I can't spot any issues with this definition. So I also think that Foundry doesn't like Objects being too deep
Okay π
@formal goblet looks like the maximum supported depth is 14 ^^"
That's... not thaaat much
So, just to make sure, how is this calculated ?
Putting a panel in a panel makes a depth of 2 ?
It's the number of parents a component has. So a panel in a panel would be 2, exactly (Body > Panel > Panel)
Seems to be right if we take body as base
14 is a large number in my opinion
I mean Iβm pretty sure I didnβt reach 14, did I ? π³
But it's all personal opinion I guess :/
Every Container-like Component increases the depth
Technically you reached 15 with this ^^"
π³π³
And yeah, the content of your Dynamic Table reached 15
Ok so Iβm kinda scared of editing my two other templates now
The thing is, I don't think we can fix this, because that is a limit set by Foundry itself
Yes, I understood that part π€£
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...
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
That is the Table in question, so actually yeah. But you can fix that easily by deleting it again in the Template export
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
Well, surprisingly it doesn't seem to be an issue with V12, so it should be less of a problem with the major update
This can take a while until CSB reaches V12
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 ?
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 :/
I see, I'll just try to make lighter things
That's meh, but we could set it with a random id instead if the key-field is left empty
FYI in Foundry v12 the limit on flags is 98 depth, so roughly 48 Containers
Noice
Yeah, ok. That is actually more than enough
We could also save it with the templateAddress by replacing . with -
Making it a really long key but not nested objects
- are not allowed in keys, so that could work
Not relevant, the template address is composed from contents and indexes ^^"
Ah yeah, that was something completely different
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
Until you reach Stack Overflow π€£
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
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?
I'd say it is related to the change of Checkboxes returning booleans instead of strings. That's why equalText() fails
Ok, using .parent works.
But I must be missing something obvious.
I was expecting a 4 in the label, instead of nothing
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?
Oof, V2 or V3?
AC actually
2nd editon, 3rd suck
Yeah, I heard many complaints about the Vampires there π
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?
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"
I'd do them as Items. Same with Advantages and Disadvantages
I have that pdf, but no
ATM I do all places, Charakters, Battlemaps etc for foundry
I see, a tedious task you have ahead
Actually Im almost done with chapter maps. The rough part with rebuilding the System is coming.
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?
It will do something if you have a Label Roll Message. But that is independent from the Label style
You could. With a Script
Unfortunately, scripting is where I hit my limit of knowledge.
I'll make due with what I have, thank you.
Check this if you still want to try: https://gitlab.com/custom-system-builder/custom-system-builder/-/blob/develop/src/module/sheets/components/TabbedPanel.js?ref_type=heads#L105
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?
Hey. I have a system i was building slowly since 2012. I have most of core mechanics down and character sheet but i would like second opinion. would you like to see?
Feedback in terms of usage with CSB or more about the system rules itself?
well a bit of both. Honest opinion for sure. But if possible i would like to do it in private without sharing links here. A bit paranoid but someone thretened me in the past that they will "steal" my system
I can talk in server VC if you want
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")}$
I'm not 100% sure, but the fact that it's ${skillsGenSel}$ 1d6+(${!modVal}$) could be an issue? Mostly because you're trying to do math outside of a function, as well as you've parenthesis'd the function (${}$)? But that's just a guess.
Hey folks, I`m having this issue. I can't find a solution. Does anyone know what is it?
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.
Create a blank item container in the sheet and those items will show up. You need to make sure the item template is set correctly, and then hit the reload button for each item to fix that.
Funny, I thought the latest update of CSB fixed that bug. Are you on the latest version?
yea that part is still working correctly, the parenthesis are for formatting when it's put into chat.
All my functions using setPropertyInEntity modifying items still work fine so I'm at a loss to what is going on
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?
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 π
Does #1 above also refresh Compendium items? Is there a way to do that with "Reload all item sheets" somewhere?
No, Compendium are not officially handled by CSB yet, sorry
Hey Linked
I'm still trying to make my templates lighter
So far it's going pretty well π
Thanks, the Reload all Items seems to have worked so farr, goign to try the actor one now
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
Running the macro as a script macro from the hotbar gave this error:
[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```
Should be item.templateSystem.reloadTemplate()
Oops, error from me, try
game.actors.forEach((actor) => {
actor.items.forEach((item) => {
item.templateSystem.reloadTemplate();
});
});
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.
That's possible if you use the Formula option of the Dropdown. You only need to generate a comma-separated string with your Formula
Trying that, thank you
Good to know it's possible. I was afraid I was completely on the wrong track.
So, something like this?
${lookup('skills_main', 'skill_name') , lookup('skills_specialized', 'skill_name')}$
wait. no that's not right. crap. will pound keyboard until I figure this out. π
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. π
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.
Is there the possibility of creating a roll on an item, where it pulls some attribute from the character's sheet?
Put each category in a different panel, and make it collapsible, seems like the easiest way
Nest each inventory container inside a panel, panels have an option for allowing it to be collapsible.
edit - hit enter a little late. lol.
yes, use ${fetchFromActor('attached', "variable"}$ in the roll formula, assuming the item is attached to the actor
tks
Good morning
is it possible to add multiple keys to a drop down key? Like Main_H, equiped
Didn't realize I missed some updates! My panels didn't have that option. Oops!
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")}$
The expression seems correct. What Component are you trying to change?
It's a number field. Using action dice as a resource id like to decrement when they make a roll
And actionDice is the key of the number field, right?
You can add whatever you like to your dropdown options. There's no limitation
Would the tags be separated by commas?
Correct. Is it possible it's just not updating on the character sheet?
Is it also executed from the same sheet where the number field resides?
It should update the character sheet
Yup, it was working before I updated so wasn't sure if there was just a syntax change
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
I think I should ask before you go in the wrong direction. What result do you expect?
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.
A Dropdown component allows to select only 1 option, it's not a multi-select. An option consists of 1 key and 1 label. The Key and Label can be any text you can think of.
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.
It can, something like Strength, Dexterity would be possible as a single Key. But what are you gonna da with that?
My backpack search for options that aren't equipped. So if it has the equipped. Key. It should go in the backpack correct
I think I'll let you try π
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?
This appears to have worked! It did take a long time but I think it works. Curious, when did the "Reload all items" get implemented? (Also I assume it only reloads items that use the template that you click the button from?)
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)
It was there since version 1.3.0 ^^
And yes, it only reloads items linked to this template, in the sidebar (not items in compendiums nor items embedded in actors)
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 π
Thats what i figured, I couldnt imagine a way to make it work with coding so you can have your cake and eat it to
This works on my machine ^^"
What is the issue ? Word never appears ? Always displayed ? How did you set-up you label exactly ?
That's what every dev wants to hear π€£
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.
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 ^^"
I completely get that. I am incredibly greatful for all the work you have alrady done!
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.
How can i activate a roll inside an actor sheet through a macro script?
Loving the new additions to V-11. Currently enjoying the use of "Meters" π
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?
Meters?
superior units when it comes to precise science.
question how do i install the custom builder?
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
It's a system, it should be available directly in FoudryVTT v11 in the System Browser. It is not yet compatible with Foundry v12, so it will not appear in this version π
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
good thing i made a backup of v11 before going to v12
as i want to try to figure out my character sheet of my w.i.p. system
what is exact name?
Omg, I need to update and try these out.
I have various "fetchfromdynamictable" codes. I will need to change it manually to lookup in the new version?
It's not a problem, I'm just curious
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... π
Yes / is the division operator. CSB uses math.js
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
is it possible to put macros inside individual items (not on the templates itself)?
Noticed I had a lot more problems, like character sheets not opening at all. Restored a backup, then tried updating again and both problems were fixed.
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
I've noticed a bug with meters, where if the "value" of them isn't correct, the sheet won't update. It may be linked to that?
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
It's Custom System Builder π
The simplest solution is to export your templates (using the export template Button ik the Settings tab), open the file, do a Search and replace of fetchFromDynamicTable to lookup, and getRefFromDynamicTable to lookupRef, and reimporting the updated file in your Server π
Thx!
I don't understand your question :/
What are you trying to achieve ?
You could create a Global character all players can edit, and use the fetchFromActor and setPropertyInEntity functions to interact with it π
This fonction is only usable in ComputablePhrases, which Is the object used to compute formulas is sheets. If You are writing a script macro, you can pull the data directly from actor.system.props
If you're writing a chat macro, I guess the easiest way would be to define an hidden Label with the message you want in your template, and call /sheetRoll labelKey from the macro π
script macro, ill try that out thanks
how do i pull the data from actor.system.props? the foundry wiki is not super helpful when it comes to accessing data in an actor
its a key named 'str'
this seems like a super simple task im just struggling to find a usable example to model off of
It should be equalText(item.key, 'dropdownOptionKey')
There are several ways depending on from which Actor you want to pull from. If the Actor stays the same in every case, pulling it from the global game-object should be enough -> game.actors.getName('actorName').system.props.str;
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.
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.
Martin's just a chad. It's what he do.
Every time I try and use Dynamic Tables to referrence other dynamic tables I feel like I hit a brick wall :|
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?
macro polo can def help you. one kind spirit wrote the specific macro I needed for me
Good ideia. I`ll create a GM sheet, for tracking purposes and all players can pull from that. Thanks
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 ?
And what type is recon_regiments_total?
It's the number field on the left
${(x > 0 ? 1 : 0) + x}$
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
Yeah, it would
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"
Check the props in the error message and make sure, that neither ENERGY nor ENERGY_COST are of type Array
${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 π
ENERGY is 57 (Red Color)
ENERGY_COST in the result is 32 (Green Color)
To be fair, the displayed value in the Chat Message is not enough to determine if the internal value is of type Array (with only 1 entry) or number
hm, ok will try some other way check the type
You can use this function here to check: https://mathjs.org/docs/reference/functions/typeOf.html
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
Cool Thanks
Yep, that would be the issue. You can go down the variables of ENERGY_COST to see which one of them is an Array
${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
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
lookup() will always return an Array, that is your issue. If you're only interested in the first value, wrap it with first()
Yes it works, thank you
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
${(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
Your initial value should be 3 and not 5, because 1 * 2 is 2 and not 0
${(jetpacks_regiments_total > 0 ? 3 : 0) + 2 * jetpacks_regiments_total}$
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 ?
Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser.
Thanks
I'm not sure I understand...
At x = 4, result is 11 but I don't want it to go past 10
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
try ${(min(10,(jetpacks_regiments_total > 0 ? 3 : 0) + 2 * jetpacks_regiments_total))}$
Works !
Thanks, sooo
When I want a value not to exceed a number, it is to be put in the beginning of the formula
The order doesn't matter. If you have min(5, 3, 7), it will return 3, because it is the smallest of all values within this function
And the () do matter, as this example shows
I understand, but I couldn't put the min at the end of the formula, could I ?
Can you show what you mean?
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
JSON or Javascript?
Whatever is needed to use CSB
Mostly just the mathjs-library, because that one will parse your expressions. The expressions do not defer much from common JavaScript, but there are also differences. A good starting point would be here: https://gitlab.com/custom-system-builder/custom-system-builder/-/wikis/Guides/Formula-System
Ok, thank you
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.
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)
Containers can be a little funny to work with. Firstly, have you set up the filters for the Containers up? :)
Is there another way to do this? This is currently breaking absolutely everything π’
The formula behind stage_radiation
But its fine to show items in container... equiped changed inside item works, and same on container level also.. but problem is when status is set on container and then item is opened... data simply doesn't match π
Hmm ... I wish I could be more help, but containers are a mystery to me π’
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
I think for the most part you should be able to create an item which is a template and use that? Beyond that, I- I really can't help :(
Additional question first from me above,
I have an 2d6 roll + modifications, how I can extract what values were for each roll? I'm looking for double 1 or double 6 and wonder how to approach that π§ ,
${result:=[2d6]+attribute+skill+modificator}$
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.
thanks!
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]"
It means it couldn't find the actor under that name
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
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
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.
You can use the Formula System together with the Label Component to have derived values. Labels can also include Chat Messages, meaning you can roll from them. Other Components do not offer roll-capabilities
Nope, the width is auto-calculated. Only way would be a different panel-setup or your own CSS
Roll Formulas only return the sum instead of the values separately. So I'd suggest to roll 1d6 twice and save their result. With that you should be able to determine pairs.
Would it be worth suggesting such a thing, do you suppose?
All can be done within a Label Roll Message of a Label, so Macros wouldn't really be necessary.
Labels with a Label Roll Message can also be targeted by Macros to trigger their Rolls. Check this section here: https://gitlab.com/custom-system-builder/custom-system-builder#72-macro-api
Can you show how it behaves on your end and what you'd expect instead?
Currently, this is the layout I have: panel showing.
Panel hidden:
I'd like to be able to hide the blank space if the character image panel is hidden.
I think there' s a type-mismatch when you're trying to change the value in the Item from the Container (1 is not the same as '1'). If a Dropdowns current value is not present in the options, it will fall back to the first option
I'd say it behaves as I'd expect. The Panel collapses in the vertical-axe, not on the horizontal-axe. That's what you'll see in most websites with collapsable sections.
I don't know what Linked thinks about this, so you can have a try, but in my opinion it does what I'd expect.
Fair enough! It would be handy, but it's a great feature as-is, and I'm in love with the changes to item containers!
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?
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
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?
Nope
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.
Are there any plans to have item containers support a 'checkbox' column?
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.
hi guys anyone tried to make some AP toolbar? with regain on endturn or something similar?
You mean some pool of points and a series of actions with different costs?
no i dont care about points logic exxcept way to replenish on palyer turn.
im looking for visual representation on character sheet or better on visual menu.
- the logic i mentioned
that good too
more than that, you need someone who can use css or something
so how you made this bar?
thx
ok great now i need to csss it into seperate points π thanks
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?
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
i think i found searching piece dont know how to later it tho getData() { const attributes = TokenDocument.implementation.getTrackedAttributes(); attributes.bar.forEach(a => a.push("value")); const attributeChoices = TokenDocument.implementation.getTrackedAttributeChoices(attributes) return {attributes: game.settings.get(MODULE_ID, "attributes"), attributeChoices}; }
that's way over my head, maybe Martin1522 or LinkedFluuuush can help you
think so tho , will try :]
#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
Thank you! Did this by chance fix the "always displaying alternative roll message with /sheetroll"?
Absolutely !
Great thank you!
it would be cool to also make a meeter work as not bar but dots (falout style AP)
Yeah, I'll add more meter visuals in the future ^^
This might not be allowed, but on the matter of adding new functions to item containers, I'd love to bump this one. The ability to toggle item checkboxes from the item container would be huge!
https://gitlab.com/custom-system-builder/custom-system-builder/-/issues/181
Very much like the new changes to item containers
finally skills as items would be possible
Yea! And activating or deactivating spells or item effects would be a lot easier!
i think issue here is complexity. not lack of efforts, one at a time, cheer the DEV and be patient, Patient hunter gets the pray