@bf6mods/cli 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/README.md +70 -0
  2. package/dist/cli/index.js +541 -76
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/resources/prepare/bf6.d.ts +2 -0
  5. package/dist/resources/prepare/tsconfig.json +14 -15
  6. package/dist/resources/prepare/types/config.ts +139 -4
  7. package/dist/resources/templates/All/package.json +1 -1
  8. package/dist/resources/templates/Basic/bf6.config.ts +5 -1
  9. package/package.json +48 -41
  10. package/dist/resources/templates/AcePursuit/src/index.ts +0 -3421
  11. package/dist/resources/templates/AcePursuit/src/levels.tscn +0 -6922
  12. package/dist/resources/templates/AcePursuit/src/strings.json +0 -191
  13. package/dist/resources/templates/All/bf6.config.ts +0 -6
  14. package/dist/resources/templates/BombSquad/src/index.ts +0 -3683
  15. package/dist/resources/templates/BombSquad/src/levels.tscn +0 -3212
  16. package/dist/resources/templates/BombSquad/src/strings.json +0 -123
  17. package/dist/resources/templates/Exfil/src/index.ts +0 -2393
  18. package/dist/resources/templates/Exfil/src/levels.tscn +0 -5600
  19. package/dist/resources/templates/Exfil/src/strings.json +0 -185
  20. package/dist/resources/templates/Vertigo/src/index.ts +0 -1948
  21. package/dist/resources/templates/Vertigo/src/levels.tscn +0 -6387
  22. package/dist/resources/templates/Vertigo/src/strings.json +0 -308
  23. /package/dist/resources/templates/{AcePursuit/src/config.json → AcePursuit.json} +0 -0
  24. /package/dist/resources/templates/{BombSquad/src/config.json → BombSquad.json} +0 -0
  25. /package/dist/resources/templates/{Exfil/src/config.json → Exfil.json} +0 -0
  26. /package/dist/resources/templates/{Vertigo/src/config.json → Vertigo.json} +0 -0
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # bf6mods
2
+
3
+ Create Battlefield 6 mods quickly with a vite like development experience.
4
+
5
+ ## Getting Started
6
+
7
+ To create a new project, simply run the following command and answer the questions
8
+
9
+ ```
10
+ npx bf6mods init
11
+ ```
12
+
13
+ ## Import from JSON
14
+
15
+ Already have a project? Just export your currently existing project in [portal.battlefield.com](https://portal.battlefield.com), and run...
16
+
17
+ ```
18
+ npx bf6mods import <input> <output>
19
+ ```
20
+
21
+ ## Deploying Project to Portal
22
+
23
+ Just run `npm run build` in your project dir, open [portal.battlefield.com](https://portal.battlefield.com), click import, and select the `dist/mod.json` file.
24
+
25
+ ## Features
26
+
27
+ - Use multiple different files, instead of just one large TypeScript file!
28
+ - Use a programatic interface for defining your gamemode.
29
+ - Extensive documentation
30
+ - Extended standard library
31
+ - Hot reload
32
+
33
+ ## Structure
34
+
35
+ `bf6mods` is very configurable, but the following structure is what can be expected from any mod.
36
+
37
+ ```
38
+ my-mod/
39
+ ├─ src/
40
+ │ ├─ index.ts
41
+ │ ├─ scenes/
42
+ │ │ └─ MyMap.spatial.json
43
+ ├─ bf6.config.ts
44
+ ├─ package.json
45
+ └─ dist/
46
+ └─ mod.json
47
+ ```
48
+
49
+ ## `bf6.config.ts`
50
+
51
+ Here is a short example of a `bf6.config.ts`.
52
+
53
+ ```ts
54
+ export default defineBf6Config({
55
+ name: "AcePursuit",
56
+ description: "A fast-paced race mod",
57
+ outDir: "dist",
58
+ entrypoint: "src/index.ts",
59
+ scenes: [[MapId.LiberationPeak, "src/scenes/AcePursuit.spatial.json"]],
60
+ game: {
61
+ mutators: {
62
+ // ...
63
+ },
64
+ },
65
+ });
66
+ ````
67
+
68
+ ## @bf6mods/sdk
69
+
70
+ This is a seperate library that exports the `PortalSdk`'s `mod` and `modlib`. Additionally it exports some stdlib helper functions and classes to help accelerate development.