@bf6mods/cli 1.0.0 → 1.0.2
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.
- package/README.md +72 -0
- package/dist/cli/index.js +541 -76
- package/dist/cli/index.js.map +1 -1
- package/dist/resources/prepare/bf6.d.ts +2 -0
- package/dist/resources/prepare/tsconfig.json +14 -15
- package/dist/resources/prepare/types/config.ts +139 -4
- package/dist/resources/templates/All/package.json +1 -1
- package/dist/resources/templates/Basic/bf6.config.ts +5 -1
- package/package.json +48 -41
- package/dist/resources/templates/AcePursuit/src/index.ts +0 -3421
- package/dist/resources/templates/AcePursuit/src/levels.tscn +0 -6922
- package/dist/resources/templates/AcePursuit/src/strings.json +0 -191
- package/dist/resources/templates/All/bf6.config.ts +0 -6
- package/dist/resources/templates/BombSquad/src/index.ts +0 -3683
- package/dist/resources/templates/BombSquad/src/levels.tscn +0 -3212
- package/dist/resources/templates/BombSquad/src/strings.json +0 -123
- package/dist/resources/templates/Exfil/src/index.ts +0 -2393
- package/dist/resources/templates/Exfil/src/levels.tscn +0 -5600
- package/dist/resources/templates/Exfil/src/strings.json +0 -185
- package/dist/resources/templates/Vertigo/src/index.ts +0 -1948
- package/dist/resources/templates/Vertigo/src/levels.tscn +0 -6387
- package/dist/resources/templates/Vertigo/src/strings.json +0 -308
- /package/dist/resources/templates/{AcePursuit/src/config.json → AcePursuit.json} +0 -0
- /package/dist/resources/templates/{BombSquad/src/config.json → BombSquad.json} +0 -0
- /package/dist/resources/templates/{Exfil/src/config.json → Exfil.json} +0 -0
- /package/dist/resources/templates/{Vertigo/src/config.json → Vertigo.json} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
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/cli init
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
## Import from JSON
|
|
16
|
+
|
|
17
|
+
Already have a project? Just export your currently existing project in [portal.battlefield.com](https://portal.battlefield.com), and run...
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npx @bf6mods/cli import <input> <output>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Deploying Project to Portal
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- Use multiple different files, instead of just one large TypeScript file!
|
|
30
|
+
- Use a programatic interface for defining your gamemode.
|
|
31
|
+
- Extensive documentation
|
|
32
|
+
- Extended standard library
|
|
33
|
+
- Hot reload
|
|
34
|
+
|
|
35
|
+
## Structure
|
|
36
|
+
|
|
37
|
+
`bf6mods` is very configurable, but the following structure is what can be expected from any mod.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
my-mod/
|
|
41
|
+
├─ src/
|
|
42
|
+
│ ├─ index.ts
|
|
43
|
+
│ ├─ scenes/
|
|
44
|
+
│ │ └─ MyMap.spatial.json
|
|
45
|
+
├─ bf6.config.ts
|
|
46
|
+
├─ package.json
|
|
47
|
+
└─ dist/
|
|
48
|
+
└─ mod.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## `bf6.config.ts`
|
|
52
|
+
|
|
53
|
+
Here is a short example of a `bf6.config.ts`.
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
export default defineBf6Config({
|
|
57
|
+
name: "AcePursuit",
|
|
58
|
+
description: "A fast-paced race mod",
|
|
59
|
+
outDir: "dist",
|
|
60
|
+
entrypoint: "src/index.ts",
|
|
61
|
+
scenes: [[MapId.LiberationPeak, "src/scenes/AcePursuit.spatial.json"]],
|
|
62
|
+
game: {
|
|
63
|
+
mutators: {
|
|
64
|
+
// ...
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
````
|
|
69
|
+
|
|
70
|
+
## @bf6mods/sdk
|
|
71
|
+
|
|
72
|
+
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.
|