#contributing to dnd5e

1 messages ยท Page 1 of 1 (latest)

deep pivot
#

alright @leaden wagon once you've got git --version returning not an error, contributing requires a few setup steps in vscode

  1. run git config user.name yourUserName
  2. run git config user.email youremail
#

Specifically the ones associated with your github account

leaden wagon
#

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

deep pivot
#

hmmmm

#

what do you have in this tab

leaden wagon
#

no current git repo

#

gotta initalize one

#

ive got a fork of the system if that helps

deep pivot
#

How did you clone the repository?

leaden wagon
#

from a fork

deep pivot
#

By clone I mean instantiate this dnd5e folder

leaden wagon
#

Ah, what I did was basically make a fork of FoundryVtt/dnd5e and download it off the fork

deep pivot
#

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

leaden wagon
#

ah gotcha

#

so put that into git?

deep pivot
#

Yeah, you basically need to re-download the dnd5e folder

#

I gtg tho

#

hopefully this gets you closer

leaden wagon
#

np ^^ and thanks for the help!

deep pivot
#

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

runic tusk
leaden wagon
# runic tusk 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?

runic tusk
#

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

leaden wagon
#

where does it normally clone to?

runic tusk
#

Where you decide

leaden wagon
#

got it, clone repo is in my systems folder,

#

so open with vscode and do the things I was doing before with chaos?

runic tusk
#

open the repo with vscode, then open a terminal

#

(you can do that in vscode)

leaden wagon
#

got it

runic tusk
#

double check but I think the command is npm run build:db

leaden wagon
#

i dont need to do npm ci on this do i?

#

or should that be a start

runic tusk
#

naw

leaden wagon
#

> 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
runic tusk
#

might need to do npm install

leaden wagon
#

got it, build:db worked

runic tusk
#

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

leaden wagon
#

thank you for the help!

leaden wagon
#

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

runic tusk
#

That sems normal

#

You don't want to commit the db files though

#

Only any json files that have received changes

leaden wagon
#

they still all look to be db files, did I not convert anything in the end with the build:json command?

runic tusk
#

Look in that src folder

leaden wagon
#

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

runic tusk
#

I'm wondering why it says you have 2k+ changes files

#

Is it saying every json file has gotten a change?

leaden wagon
#

it says I have backgrounds modified but I never touched them?

runic tusk
#

Check the diffs ๐Ÿ™‚

leaden wagon
#

how would I do that again?

runic tusk
#

Click the branch icon (where it says '2k+'), then select a changed file, what's it saying?

leaden wagon
#

got it

#

all looks to be identical acolyte wise?

runic tusk
#

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

leaden wagon
#

do i just select them and then commit?

runic tusk
#

yah, hit that '+'

#

(google tells me the diff for 2k+ files is due to line endings, so nothing to be concerned about)

leaden wagon
#

got it, and its been +'ed, so now what?

runic tusk
#

Well undo that, you're not on a new branch ๐Ÿ™‚

leaden wagon
#

wheres the undo button

runic tusk
#

did you stage, or did you also commit?

leaden wagon
#

just stage

runic tusk
#

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

leaden wagon
#

ah question, when I clicked stage changes for those selcted files, theyre gone now

#

or atleast

#

i cant find them

runic tusk
#

sure theyre not just in a dropdown above 'Changes'?

leaden wagon
#

just the changes folder visible here

runic tusk
#

looks like you committed. ๐Ÿ™‚

leaden wagon
#

damn

runic tusk
#

did you commit on the master or new branch?

leaden wagon
#

it was before the new branch, so yea master Id assume

#

this mean a restart?

runic tusk
#

easy fix, just go to master and find 'undo last commit'

#

It's in the '...' menu

leaden wagon
#

got it, theres 2 folders now, staged changes and changes, staged changes has the files

#

should i just unstage everything?

runic tusk
#

Nah, just swap to your proper branch now

leaden wagon
#

where would I go to do that?

runic tusk
#

Bottom left if you aren't on 'redundantfeatures' already

leaden wagon
#

already am

runic tusk
#

then you're gucci: commit

leaden wagon
#

this button up top?

#

the checkmark*

runic tusk
#

Alternatively 'Commit Staged' in the menu

leaden wagon
#

didnt configure username and email in git dammit

#

can i do that in the vscode terminal?

runic tusk
#

sure!

leaden wagon
#

done and commited

#

where exactly did this go then? original clone was a fork

runic tusk
#

If it is pushed to your branch on github, then you should now be able to make a PR.

leaden wagon
#

i gotta publish branch at the bottom of the screen then?

runic tusk
#

Yes

leaden wagon
#

does this layout look right?

runic tusk
#

Something's definitely not right here

leaden wagon
#

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

runic tusk
#

I am not seeing your commit of any json files?

leaden wagon
#

ok, think I fixed it?

#

only 13 files changed now

runic tusk
#

Why is it saying 2.3.1

leaden wagon
#

where exactly?

runic tusk
#

In your json files

leaden wagon
#

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?

runic tusk
#

Maybe you should rebase to the 2.4.x branch rather than master

leaden wagon
#

got it, got a description typed up of the changes, should I got ahead and post it to 2.4x?

runic tusk
#

What could go wrong?

leaden wagon
#

welp I did it

#

hopefully it isnt too atrocious

runic tusk
#

This is the weird part. It should just be saying '1 commit ahead'

leaden wagon
#

it feels like I got a 2.3 version for some reason?

runic tusk
#

Somehow?

leaden wagon
#

I've got no idea what lines got twisted in the work though

runic tusk
#

Well Kim or Arbron will let you know if it's messed up ๐Ÿ˜„

leaden wagon
#

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

runic tusk
#

Could always try again - you can checkout the remote branch (2.4.x) on the actual repo and use that as a base

leaden wagon
#

gotcha, if it does turn out wonky, thats gonna be what I try next

runic tusk
#

a'ight @leaden wagon you're up, new issue, new PR

leaden wagon
#

gotcha

runic tusk
#

And welcome to the 'wontfix' club

leaden wagon
#

im still forking over the master branch right?

#

wanted to start from the beginning

runic tusk
#

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.

leaden wagon
#

so switch branch, and then fork, got it

runic tusk
#

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

leaden wagon
#

how exactly do I do it through vscode?

runic tusk
#

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.

leaden wagon
#

slowly getting the hang of this

#

what about jack of all trades?

#

Im geussin leave it because it affects initiative?

runic tusk
#

Check the effect. Does it target flags.dnd5e?

leaden wagon
#

ah yup,
flags.dnd5e.jackOfAllTrades

runic tusk
#

Then leave it.

#

Advancements can't affect special traits, so all that target those should just be left.

leaden wagon
#

all im really seeing is life domain cleric giving Heavy armor via AE

#

cant seem to find much else

runic tusk
#

Druidic, thieves cant?

leaden wagon
#

druidic and theives cant dont have ae's by the looks of it

runic tusk
#

๐Ÿค”

leaden wagon
#

honestly just life domain ๐Ÿค”

runic tusk
#

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

leaden wagon
#

Divine Health, already added through traits, so that ae can go,

runic tusk
#

Slippery Mind?

leaden wagon
#

right, that one needs a full trait advancement

#

remove the ae / add it in then?

runic tusk
#

fo sho

leaden wagon
#

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

runic tusk
#

2k+ changes

leaden wagon
#

so, before I do anything, what exactly does stage changes mean?

runic tusk
#

'These are the files I want to commit'

#

You 'put them on the stage'

leaden wagon
#

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

runic tusk
#

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.

leaden wagon
#

got it

leaden wagon
#

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?

runic tusk
#

Record it? This sounds super weird

leaden wagon
#

unless im doing something terribly wrong

runic tusk
#

What if you scroll up to the top?

leaden wagon
#

theres sometimes a staged changes folder, but i dont remember the last time it was there

#

its always been missing ๐Ÿค”

runic tusk
#

Should appear when you actually stage stuff

leaden wagon
#

just staged warlock and sorc, and nothin,

runic tusk
#

Reboot vscode

#

Actually, I'm not seeing any changes in those files in your recording?

#

Did you unpack after editing them in foundry?

leaden wagon
#

built the db before going into foundry, then built json after I was done in dev world stuff

runic tusk
#

Where are the changes then? thinkcat

#

Oh this is Fighter, you didnt touch that

#

Check the files you actually did touch

leaden wagon
#

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

runic tusk
#

Show me Life Domain cleric

#

Rather the item from which you removed the effect, I mean

#

It should show a bunch of changed lines.

leaden wagon
#

in the source control? Was one of the ones I staged that's currently missing

runic tusk
#

OK, stage all that you changed, then revert all changes on all other files. What's it look like, then?

leaden wagon
#

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

runic tusk
#

You still need help here?

leaden wagon
#

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

runic tusk
#

You were editing the items in the compendiums, right? ๐Ÿ™‚

leaden wagon
#

yea, unlocked em to edit

leaden wagon
#

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-

runic tusk
#

Checked the readme on the CLI tool?

leaden wagon
#

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
runic tusk
#

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)

leaden wagon
#

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

runic tusk
#

In your local repo you should only have json files currently. ๐Ÿ™‚

leaden wagon
#

yea, looks like I do

runic tusk
#

You want to be on the 2.4.x branch

leaden wagon
#

got it, switched over rn

runic tusk
#

and then you'll want to build the db files

#

(using the cli)

#

and probably fvtt package workon "dnd5e" --type "System"

leaden wagon
#

so ```fvtt package unpack "compendiumName"

#

to just unpack the specific ones I need?

runic tusk
#

json files are the "unpacked" state

leaden wagon
#

ah, gotcha- how exactly would building the db files go then? kind of blanking on reading the readme file,- packing instead of unpacking then?

runic tusk
#

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

leaden wagon
#

its all fine- bit scattered rn too trying to do this while dog-sitting for my nephew

leaden wagon
#

Currently trying to wrangle dogs from eating the table

runic tusk
#

hm i dont think there's a cli command for that

daring swift
#

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

runic tusk
#

Which backwards incompatible changes? ๐Ÿค”

daring swift
#

I know there were some changes to the active effects data structure, not sure if there was anything else

runic tusk
#

This should be fine though, there are only effects to delete.

#

Though it would be easier to do on v10.

leaden wagon
#

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

runic tusk
#

Installing v10 would simplify it greatly.

leaden wagon
#

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

runic tusk
#

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)

leaden wagon
#

got it, I'll get to downloading it on this wifi then

#

ho boi, 25 minutes sweaty

leaden wagon
#

should of maybe asked before, but 10.312 right?

#

the last v10 build?

runic tusk
#

Yes ๐Ÿ™‚

#

I do not think it matters, however - as long as it is not older than 10.303, the absolute minimum

leaden wagon
#

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

runic tusk
#

Double check that they do not also need an advancement

#

I do not belive Rogue has one for Slippery Mind

#

or the sorcerer?

leaden wagon
#

should I add in any missing ones as well?

#

advancement wise?

#

or do that in a different PR

runic tusk
#

That would be the correct thing to do ๐Ÿ™‚

leaden wagon
#

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

runic tusk
#

I think 'Druidic' is a good example to look at

leaden wagon
#

got it, just says druidic

runic tusk
#

Straight and to the point.

leaden wagon
#

and then theres monk, its always monk

runic tusk
#

Heh.

#

Go with the full one then, drop the "By 15th level"

leaden wagon
#

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

runic tusk
#

Lemme take a look

#

Yes, the hunter subclass has Item Choice advancements

leaden wagon
#

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

runic tusk
#

Wrong branch at the time I guess ๐Ÿ™‚

leaden wagon
#

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

runic tusk
#

and then ya close foundry, and unpack to jsons

#

and hopefully it actually shows changes this time. rainberk

leaden wagon
#

npm run build:json right?

runic tusk
#

Yes

leaden wagon
#

progress!

#

the first time I think ive ever seen red mean I've done something (i hope) right

runic tusk
#

Remember that you only want to commit the json files you changed. Not the rest, and not the db files

leaden wagon
#

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?

runic tusk
#

what branch are you on locally?

leaden wagon
#

2.4x

runic tusk
#

have you commited?

leaden wagon
#

havnt commited or staged anything

runic tusk
#

Then just make a new branch now ๐Ÿ™‚

leaden wagon
#

heres hoping the staging stuff doesnt dissapear into the void

daring swift
#

Yeah, you can just do git checkout -b new-branch and all your changes will remain

runic tusk
#

We didn't get rid of those?

daring swift
#

Not quite yet, when we go v11 only we will be

runic tusk
#

Huh, I thought they were gonna be in the release action

leaden wagon
#

so, all of this I changed- I gotta stage the db files from them too?

runic tusk
#

yeah classfeatures.db and classes.db

leaden wagon
#

subclasses too im geussing because of Draconic bloodline

runic tusk
#

yes

leaden wagon
#

uhhh, so... i may have forgotten to change the title

#

still says the high elf thing

runic tusk
#

lol we'll deal

leaden wagon
#

but it looks alright?

runic tusk
#

KIm usually squashes stuff

#

Seems to have a merge conflict. What file is it complaining about?

leaden wagon
#

packs/classes.db

runic tusk
#

Not entirely certain we care too much about merge conflicts in the db files, since we can just do a rebuild before a release.

leaden wagon
#

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

runic tusk
#

lol yes