srg-kostyrko / hoom3-map-viewer

1 stars 1 forks source link

Module not found Can't resolve '../../assets/homm3/ui/army_icons.css #2

Closed Sajjon closed 2 years ago

Sajjon commented 3 years ago
/src/components/town/Garrison.tsx
Module not found: Can't resolve '../../assets/homm3/ui/army_icons.css' in '/Users/sajjon/Developer/homm3-map-viewer/src/components/town'

I get this when I run npm start (after npm install), any ideas? Which node version are you using?

srg-kostyrko commented 3 years ago

Sorry, I was confident that I added instruction to readme file.

This repository does not have resource files - only scripts to extract them from game resource files. So before starting - you first need to copy resource archives from installed game (all .lod files in Data folder) into scripts/in folder and run npm run extract. This will generate needed images and css files. I also noticed that I committed demo map import without map itself - so you'll need to adjust src/store/AppStore commenting out import demoMap from "../assets/homm3/maps/rnd1.json"; and this.changeMap(demoMap as H3MFile);

Sajjon commented 3 years ago

Yeah I figured this was the cause. Maybe we can improve the error message by eagerly verifying the Data/Maps folders exists?

srg-kostyrko commented 3 years ago

I won't be working on this any time soon But feel free to submit PRs