#Whatever tickles your fancy without

1 messages ยท Page 1 of 1 (latest)

rigid cradle
#

My plan would be to do the following things in any order:

  • make importer language independent
  • allow multiple imports into the same sheet
  • auto-create vehicles/spirits/sprites etc when importing
hazy panther
#

Sounds like good improvements. If you have questions, let me know.

You'll find two main issues:

  • the character importer is the oldest and most hacky code and is JavaScript still while the rest is TypeScript.
  • character and item importers aren't much connected. There's been some tries to use the item importers from the character importer, but they stopped
deep pewter
#

@rigid cradle I've also been working on importer updates. Primarily I've been focusing on doing automatic icon assignment for items, but I also made some related additions to new data flags for imported items that could help with preventing duplicates and/or language independence.

I don't know if that's useful or helpful for you, but I have a draft PR that you can look through if you want to see how I structured it. If you think something else would work better, I'm also happy to re-work my stuff to fit what works for you.

rigid cradle
#

I guess the code is written in a node.js ecosystem?

deep pewter
#

I do it using the desktop app and VS Code

#

I set it up using the readme-dev instructions and followed this video to get breakpoints and such enabled in VS Code
https://www.youtube.com/watch?v=CQ5UiDud60o

A quick guide on how to set up debugging for client side foundryvtt modules in the VSCode editor.

Tag me @vance on the foundry discord if you have any questions.

Sorry about the barking dogs, hard to keep them quiet long enough to record when squirrels are running around the backyard :)

โ–ถ Play video
rigid cradle
#

My VSCode does not know the foundry terms. Can I enable that?

deep pewter
#

Yeah you can add the correct folder to the workspace to enable it

#

Lemme check what that should be

#

For me it's C:\Program Files\Foundry Virtual Tabletop\resources\app

hazy panther
#

If you've followed the readme-dev.md you should have a full TypeScript node.js setup and the (if very outdated) Foundry types should also provide you some auto-completion.

#

The Foundry types are still v9, since the league of foundry devs didn't update further, due to the schema changes in Foundry. Haven't checked for a while if there's been some updates on that or a fully new typing approach I could follow...
...the v9 types do work still though (mostly)

rigid cradle
#

Yeah, my npm install was still running... my bad ๐Ÿ™‚

rigid cradle
#

The part of linking the dev folder to foundry data is not clear

#

underneath your development shadowrun5e system directory. -> in the src folder?

hazy panther
#

You're runnig Windows?

rigid cradle
#

Yes

hazy panther
#

Option B is using the mklink command from within your cmd, which also doesn't need admin perms. For this you'd have to link your project folder to shadowrun5e within the foundry data ./systems folder. This option doesn't need the foundryconfig.json at all.
Edit: it's the project folder, not the /dist folder within. ๐Ÿ™‚

#

For me the foundryconfig.json is

{
  "dataPath": "..\\..\\FoundryData\\v11",
  "linkTargetDirName": "shadowrun5e"
}

My data path is not default, but two folders up from my project dir.

#

After linking you can build (by gulp build or gulp watch) this will craete the /dist folder in your project, which allows the system to run in Foundry.

rigid cradle
#

Ah, that just creates a symlink

#

Win10 with PowerShell should be able to do that nativly but I didnt try that yet

hazy panther
#

mklink and PowerShell should both do, the gulp link is mostly to catch all OS'es

rigid cradle
#

So I linked it, but foundry does not pick it up as the system

hazy panther
#

Try restarting foundry

rigid cradle
#

I guess I need to build each time I try to test things?

hazy panther
#

gulp watch will auto build on all changes. So a typical dev flow would be:

  • start foundry (I do it via vscode tasks)
  • gulp watch
  • dev away
rigid cradle
#

That works ๐Ÿ‘

hazy panther
#

Enjoy coding. ๐Ÿ™‚

#

If you have improvements for the Readme-dev.md either let me know or PR them.

rigid cradle
hazy panther
#

Likely language, since I'm not a native english speaker.

rigid cradle
#

How can I execute the unit tests? This needs some more description in the readMe

rigid cradle
#

@hazy panther I refactored the importer and made it language independent. Should I put this already as a pull request? Or are you okay with larger PRs that might take some time to review

hazy panther
rigid cradle
#

I tested it manually and let npm: test run

#

Dont know if thats sufficient

#

I made a PR and use this branch as base for the next feature ๐Ÿ™‚

hazy panther
#

There isn't really a npm testing suite, since the foundry runtime is needed. There is a foundry module called quench and a small testing suite for that (that doesn't cover the importer at all)

#

Also I don't expect other devs to write tests for their features. ๐Ÿ™‚ It's mostly for whenever I refactor or rebuild system parts.

rigid cradle
#

I want to create an actor programmatically, but I cannot manage to get the right type. Is there a trick to get the predefined types? Currently I just use the string, but that feels kind of wrong

rigid cradle
rigid cradle
#

@hazy panther do you already know when you want to have the next release? Due to the bundling I cannot use my changes in the system without you updating the whole system ๐Ÿ™‚