#contributing to dnd5e
1 messages ยท Page 1 of 1 (latest)
alright @leaden wagon once you've got git --version returning not an error, contributing requires a few setup steps in vscode
- run
git config user.name yourUserName - run
git config user.email youremail
Specifically the ones associated with your github account
so,
git version 2.42.0.windows.2
and when I run that first line with Zanderaf as username it pops fatal: not in a git directory out
no current git repo
gotta initalize one
ive got a fork of the system if that helps
How did you clone the repository?
from a fork
By clone I mean instantiate this dnd5e folder
Ah, what I did was basically make a fork of FoundryVtt/dnd5e and download it off the fork
Yeah the fork is good
but you specifically need to clone the repository
that will make sure you get all the relevant files, including the .git info
Yeah, you basically need to re-download the dnd5e folder
I gtg tho
hopefully this gets you closer
np ^^ and thanks for the help!
tl;dr you need to make a branch in your fork and then make changes on that, from there you can file a pull request to get your changes merged into the main repository
What step are you at?
Just got home from work, not sure how to exactly clone the repo, think I managed to do it via the Git GUI last night but was too tired to remember
should I be doing it this way?
nah just git bash instead, much easier
git clone LinkGoesHere
also you want it in your systems folder so you can open it in foundry
where does it normally clone to?
Where you decide
got it, clone repo is in my systems folder,
so open with vscode and do the things I was doing before with chaos?
got it
double check but I think the command is npm run build:db
naw
> build:db
> node ./utils/packs.mjs package pack --nedb
node:internal/errors:497
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'nedb-promises' imported from C:\Users\milic\AppData\Local\FoundryVTT\Data\systems\dnd5e\utils\packs.mjs
at new NodeError (node:internal/errors:406:5)
at packageResolve (node:internal/modules/esm/resolve:789:9)
at moduleResolve (node:internal/modules/esm/resolve:838:20)
at defaultResolve (node:internal/modules/esm/resolve:1043:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v20.9.0
might need to do npm install
got it, build:db worked
cool, now shut down vscode, boot up foundry, do your edits, shut down foundry, run the command to unpack back to json files
then create a new branch (on your fork), push the json files to that branch, and if it all seems right, make a PR
thank you for the help!
so I ran npm run build:json
is it suppose to say that all these other files have been modified or was that just it being built from db files
That sems normal
You don't want to commit the db files though
Only any json files that have received changes
they still all look to be db files, did I not convert anything in the end with the build:json command?
Look in that src folder
got it, there it is,
only touched the classes and subclass items and their advancements, so just the 2 folders?
or should I just get the ones I fully changed since I didnt touch monk etc
I'm wondering why it says you have 2k+ changes files
Is it saying every json file has gotten a change?
it says I have backgrounds modified but I never touched them?
Check the diffs ๐
how would I do that again?
Click the branch icon (where it says '2k+'), then select a changed file, what's it saying?
Yeah it would be pretty clear
git's just confused lol
Submit the jsons of items you actually touched
Though I think you can just commit them all, and github will do a proper diff
Try that if you dare lol
do i just select them and then commit?
yah, hit that '+'
(google tells me the diff for 2k+ files is due to line endings, so nothing to be concerned about)
got it, and its been +'ed, so now what?
Well undo that, you're not on a new branch ๐
wheres the undo button
did you stage, or did you also commit?
just stage
ok no problem then
Click 'master' down in the bottom left, make new branch
You should be safe to just revert all changes to files you don't care about for this PR, makes vscode a bit easier to work with
ah question, when I clicked stage changes for those selcted files, theyre gone now
or atleast
i cant find them
sure theyre not just in a dropdown above 'Changes'?
looks like you committed. ๐
damn
did you commit on the master or new branch?
got it, theres 2 folders now, staged changes and changes, staged changes has the files
should i just unstage everything?
Nah, just swap to your proper branch now
where would I go to do that?
Bottom left if you aren't on 'redundantfeatures' already
already am
then you're gucci: commit
Alternatively 'Commit Staged' in the menu
didnt configure username and email in git dammit
can i do that in the vscode terminal?
sure!
If it is pushed to your branch on github, then you should now be able to make a PR.
i gotta publish branch at the bottom of the screen then?
Yes
does this layout look right?
Something's definitely not right here
oh god, itheres
a ton of stuff
yea somethings wrong
I've got a feeling I should maybe start over on a fresh slate, just figure out what went wrong
I am not seeing your commit of any json files?
where exactly?
In your json files
im... not exactly sure? I forked the repo off the main D&D5e one, it for sure wasnt 2.3.1 when i was editing
wouldnt have been able to add slippery mind for rogue otherwise without the update?
Maybe you should rebase to the 2.4.x branch rather than master
got it, got a description typed up of the changes, should I got ahead and post it to 2.4x?
What could go wrong?
This is the weird part. It should just be saying '1 commit ahead'
it feels like I got a 2.3 version for some reason?
Somehow?
I've got no idea what lines got twisted in the work though
Well Kim or Arbron will let you know if it's messed up ๐
im hoping i wont thrown against the wall for trying ๐
but thanks for the help! Sorry It was a bit slow, glad I finally know how all of this works for a start
Could always try again - you can checkout the remote branch (2.4.x) on the actual repo and use that as a base
gotcha, if it does turn out wonky, thats gonna be what I try next
a'ight @leaden wagon you're up, new issue, new PR
gotcha
And welcome to the 'wontfix' club
OK, so, when you change branch, you should be able to see the 2.4.x branch
Try using that instead of master, still dunno why that gave you 2.3.1 code.
so switch branch, and then fork, got it
Nah, you can do all this within vscode
It should show as upstream/2.4.x
Swap to that, and just to be sure, check one of the jsons and see if they are labeled as 2.4.0
how exactly do I do it through vscode?
Click the branch name (bottom left), it should be producing a long list at the top
When you have swapped to that, make a new branch, this should copy it, and then you're good to make any changes.
slowly getting the hang of this
what about jack of all trades?
Im geussin leave it because it affects initiative?
Check the effect. Does it target flags.dnd5e?
ah yup,
flags.dnd5e.jackOfAllTrades
Then leave it.
Advancements can't affect special traits, so all that target those should just be left.
all im really seeing is life domain cleric giving Heavy armor via AE
cant seem to find much else
Druidic, thieves cant?
druidic and theives cant dont have ae's by the looks of it
๐ค
honestly just life domain ๐ค
huh, druidic did have its AE removed.
Was my dev world outdated? ๐
Druid even has the language advancement too
Lemme do a quick scan for items that have effects
[
"Ki: Empty Body",
"Invocation: Devil's Sight",
"Bonus Proficiency (Life Domain)",
"Ki: Diamond Soul",
"Fighting Style: Archery",
"Fiendish Resilience",
"Dragon Ancestor",
"Improved Divine Smite",
"Fast Movement",
"Draconic Resilience",
"Feral Instinct",
"Nature's Ward",
"Unarmored Defense (Barbarian)",
"Unarmored Defense (Monk)",
"Slippery Mind",
"Rage",
"Reliable Talent",
"Purity of Body",
"Divine Health",
"Jack of All Trades",
"Fighting Style: Dueling",
"Hide in Plain Sight",
"Unarmored Movement",
"Fighting Style: Defense"
]
So evidently not a lot, Arbron must have nuked some
Divine Health, already added through traits, so that ae can go,
Slippery Mind?
fo sho
just learning that monks become immune to poison damage through this ๐ค
dragon ancestor is another one, providing a language instead of trait
and I think thats everything
Life Domain Cleric:
- Removed AE granting heavy armor proficiency
Rogue: - Added Slippery Mind Trait Advancement (Wisdom Save Prof)
Paladin: - Removed AE granting Divine Health effect
Monk: - Removed AE granting Purity of Body effect
Sorcerer: - Removed AE granting Draconic Language effect
everything else seems vital to working
ok, few minor hiccups but ive built the json files
2k+ changes
so, before I do anything, what exactly does stage changes mean?
got it, and im making a new branch before I do that
probably a stupid question, but if I cloned the repo directly from the main foundry/dnd5e repo, did I mess up
Well I would have cloned my own fork
If this makes you unable to publish a branch, you should still be able to add your fork as a remote, then publish it there.
got it
man im so damn confused. So i rebuilt the json, make my own branch, and go to select the files to stage, and I stage them by clicking this plus sign
but then they dissapear, and when I click commit, it says nothing staged to commit?
Record it? This sounds super weird
theres sometimes a staged changes folder, but i dont remember the last time it was there
its always been missing ๐ค
Should appear when you actually stage stuff
just staged warlock and sorc, and nothin,
Reboot vscode
Actually, I'm not seeing any changes in those files in your recording?
Did you unpack after editing them in foundry?
built the db before going into foundry, then built json after I was done in dev world stuff
Where are the changes then? 
Oh this is Fighter, you didnt touch that
Check the files you actually did touch
part of the problem, once I stage them I cant find them anywhere
theres no staged folder to see em in
and unstaging doesnt seem to do much
i feel like im working with haunted software
Show me Life Domain cleric
Rather the item from which you removed the effect, I mean
It should show a bunch of changed lines.
in the source control? Was one of the ones I staged that's currently missing
OK, stage all that you changed, then revert all changes on all other files. What's it look like, then?
ah damn I've gotta go for today, need to pick up family- thanks for the extra help, ill see if I cant get back to it later tonight
You still need help here?
Sorry, been at a relatives house since last night watching their dog, dont have my laptop on me try this thing again until tommorrow afternoon
got a decent grasp on what I'm doing, just gotta figure out where the staged stuff dissapear to
You were editing the items in the compendiums, right? ๐
yea, unlocked em to edit
hey zhell- about the CLI thing- what exactly do I have to do different? Spent most of yesterday redo'ing all those installs Chaos worked me through on my laptop to keep it seperate from my PC, and I'm just now getting to trying to figure it out
i've cloned the repo through vscode's console via my own fork and done nothing with it-
Checked the readme on the CLI tool?
yea, been doing that- getting an error whenever I checked the version with fvtt --version
fvtt : File C:\Users\myname\AppData\Roaming\npm\fvtt.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- fvtt --version
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
Ah windows access issue
I remember getting this, and the fix being easy.
As for actually converting between json, nedb, ldb, and back to json, it should go something like this on v11:
- fresh system, no db files, no ldb files, only jsons exist.
- use CLI to convert to ldb
- edit in foundry
- convert ldb to json
- convert json to nedb
- nedb back to json
Hope @daring swift won't mind a ping to tell me if I've lost the cheese off my crackers, but he knows more than I on this and I remember there being something about the json files having different names when generated from the CLI tool (eg barbarian-<item id>.json vs barbarian.json)
ok, managed to fix it- no longer throwing errors, dog got loose and distracted me a bunch, so to turn it from the fresh clone to use cli to unpack, is it
cd foundryvtt-cli
npm install
npm run build
npm link
this part of the readme?
wait, mmm
In your local repo you should only have json files currently. ๐
yea, looks like I do
You want to be on the 2.4.x branch
got it, switched over rn
and then you'll want to build the db files
(using the cli)
and probably fvtt package workon "dnd5e" --type "System"
so ```fvtt package unpack "compendiumName"
to just unpack the specific ones I need?
json files are the "unpacked" state
ah, gotcha- how exactly would building the db files go then? kind of blanking on reading the readme file,- packing instead of unpacking then?
Yeah you want to build the v11 LevelDB files
should hopefully be on the cli tool's page somewhere
I'm a bit on and off rn due to work
its all fine- bit scattered rn too trying to do this while dog-sitting for my nephew
ok im back, where we at?
Currently trying to wrangle dogs from eating the table
hm i dont think there's a cli command for that
Just to be clear, if you are making any changes to the compendiums for the system right now youโll have to do that in Foundry v10, not v11, otherwise youโll end up with backwards incompatible changes since the system still supports v10
In which case you can use our build scripts for extracting/compiling the packs
Which backwards incompatible changes? ๐ค
I know there were some changes to the active effects data structure, not sure if there was anything else
This should be fine though, there are only effects to delete.
Though it would be easier to do on v10.
I'm starting to get lost in most of this, along with babysitting dogs ๐ค
adhd is not doing me any favors trying to learn most of this
Installing v10 would simplify it greatly.
I think I might give up the reins on this for now, and leave it for someone more focused to handle it- and try to get a grasp with it another weekend- got some notes on everything you and chaos taught me zhell, so thanks for all that help- think its slightly overwhelming for me at the moment with everything goin on
ill give it one more try rn
would I need the CLI stuff?
or just do it the way I've been trying
You already did it correctly - was just my bad cus I forgot it was different on v11. What you did the very first time will work on v10.
Clean repo, 2.4.x, pack into db, make edits, unpack
(on v10)
Yes ๐
I do not think it matters, however - as long as it is not older than 10.303, the absolute minimum
few more minutes and should be good to start workin
ok, done, opened up, installed npm, build the db's, deleted the AEs from:
Life Cleric Armor Prof
Divine Health from Paladin
Purity of Body from Monk
Slippery Mind from Rogue
Draconic Language from Draconice Sorc
Double check that they do not also need an advancement
I do not belive Rogue has one for Slippery Mind
or the sorcerer?
should I add in any missing ones as well?
advancement wise?
or do that in a different PR
That would be the correct thing to do ๐
got it
in the case of slippery mind, should the advancement text just say Wisdom, or should I copy paste in the actual text from the feature? aka
By 15th level, you have acquired greater mental strength. You gain proficiency in Wisdom saving throws.
not sure how its regularly done
I think 'Druidic' is a good example to look at
got it, just says druidic
Straight and to the point.
and then theres monk, its always monk
Just gonna keep a list here-
Active Effects Removed in place of Advancement
- Life Domain Cleric: Bonus Proficiency in Heavy Armor
- Monk: Purity of Body Resistance and Condition Immunity
- Paladin: Divine Health Immunity to Disease
- Rogue: Slippery Mind granting Wisdom Saving Throw Proficiency
- Draconic Sorcerer: Dragon Language granted by Dragon Ancestor
Advancement Additions:
- Added trait advancement for Rogue at level 15 to grant Wisdom save proficiency.
- Added language trait advancement for Draconic Bloodline Sorcerer to grant Draconic as a language
umm, something feels wrong?
was there anyone that added item choice advancements to the hunter subclass? or did I pull the wrong system folder
got it, remember doing it the first time like 2 weeks ago when the original thing was labeled wont change
geuss it was built in
Wrong branch at the time I guess ๐
yea, that too
I think thats everything? paladin monk and cleric all have their AE stuff already in trait advancements, just dragon sorc and rogue were missing theirs
and then ya close foundry, and unpack to jsons
and hopefully it actually shows changes this time. 
npm run build:json right?
Yes
progress!
the first time I think ive ever seen red mean I've done something (i hope) right
Remember that you only want to commit the json files you changed. Not the rest, and not the db files
i may have done a stupid- new branch was suppose to be opened before I made changes right?
or is there a way to salvage it?
what branch are you on locally?
2.4x
have you commited?
havnt commited or staged anything
Then just make a new branch now ๐
heres hoping the staging stuff doesnt dissapear into the void
You'll still want to commit the .db files
Yeah, you can just do git checkout -b new-branch and all your changes will remain
We didn't get rid of those?
Not quite yet, when we go v11 only we will be
Huh, I thought they were gonna be in the release action
so, all of this I changed- I gotta stage the db files from them too?
yeah classfeatures.db and classes.db
subclasses too im geussing because of Draconic bloodline
yes
uhhh, so... i may have forgotten to change the title
still says the high elf thing
lol we'll deal
but it looks alright?
KIm usually squashes stuff
Seems to have a merge conflict. What file is it complaining about?
Not entirely certain we care too much about merge conflicts in the db files, since we can just do a rebuild before a release.
that wasnt as bad as I thought- the whole v11 part of it was a mess and a half trying to figure out what was going on
lol yes
