You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: projects/make-a-bg3-mod-with-lua/make-a-bg3-mod-with-lua.mdx
+21-18Lines changed: 21 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,16 +100,7 @@ Mods/Frog/Mods/Frog
100
100
101
101
An **.lsx** (XML) file tells Baldur’s Gate 3 about your mod, including its name, author, folder location, version, and unique ID, so the game can recognize and load it correctly.
102
102
103
-
We’ve provided you with a boilerplate **meta.lsx file** inside the project folder.
104
-
105
-
A **UUID (Universally Unique Identifier)** is a 128-bit value used to uniquely identify information across systems or databases without significant risk of duplication. It looks something like: `87654321-DCBA-4321-DCBA-0987654321AB`.
106
-
107
-
It'll make sure your mod is unique and doesn't interfere with another mod installed on the same system. We’ve left it blank, so generate your own by using this [online UUID generator](https://www.uuidgenerator.net/version4), and paste it in here:
The **meta.lsx** file tells the game info about your mod, including what the mod is called, who made it, where its files live, and how to tell it apart from other mods.
103
+
The **meta.lsx** file tells the game info about your mod, including what the mod is called, who made it, where its files live, and how to tell it apart from other mods. We’ve provided you with a boilerplate **meta.lsx file** inside the project folder.
113
104
114
105
It contains the following components:
115
106
@@ -122,6 +113,16 @@ It contains the following components:
122
113
123
114
Without this file, the game doesn’t know your mod exists.
124
115
116
+
A **UUID (Universally Unique Identifier)** is a 128-bit value used to uniquely identify information across systems or databases without significant risk of duplication. It looks something like: `30b78323-c06f-4a66-9767-6241f5ee4656`.
117
+
118
+
It'll make sure your mod is unique and doesn't interfere with another mod installed on the same system. We’ve left it blank, so generate your own by using this [online UUID generator](https://www.uuidgenerator.net/version4), and paste it in here:
In Baldur’s Gate 3, most of the game’s data, like characters, spells, and items, is stored inside **.pak** files. These are packed files that the game reads directly, so you can’t edit them in a normal text editor.
@@ -160,6 +161,8 @@ data "Wisdom" "8"
160
161
data "Charisma" "4"
161
162
```
162
163
164
+
<ImageZoomsrc="https://i.imgur.com/5kqogmE.png"style={{ width: "80%", height: "auto" }}alt="image of frog's stats"/>
165
+
163
166
These are all standard DnD stats. Feel free to change these numbers around!
164
167
165
168
```
@@ -190,7 +193,7 @@ data "UnarmedRangedAttackAbility" "Dexterity"
190
193
-`data "DifficultyStatuses"` adjusts stats or abilities based on game difficulty.
191
194
-`data "UnarmedRangedAttackAbility"` determines which stat the creature uses for unarmed ranged attacks, in this case it’ll use Dexterity.
192
195
193
-
<ImageZoomsrc="insert image before publishing"style={{ width: "80%", height: "auto" }}alt="image of frog in battle casting spell"/>
196
+
<ImageZoomsrc="https://i.imgur.com/1ATlFDZ.gif"style={{ width: "80%", height: "auto" }}alt="image of frog in battle casting spell"/>
194
197
195
198
Phew, our frog friend sure is powerful!
196
199
@@ -221,9 +224,9 @@ Write the following code:
221
224
localfunctionKillFrog()
222
225
localsummons=Osi.DB_PlayerSummons:Get(nil)
223
226
for_, summoninpairs(summons) do
224
-
ifstring.match(summon[1],"Frog") ~=nilthen
225
-
Die(summon[1])
226
-
end
227
+
ifstring.match(summon[1],"Frog") ~=nilthen
228
+
Die(summon[1])
229
+
end
227
230
end
228
231
end
229
232
```
@@ -248,7 +251,7 @@ end)
248
251
249
252
Inside the callback function, we check if the spell being cast is `Target_Summon_Frog`. If yes, the program runs `KillFrog()` to clean up any old frogs.
250
253
251
-
<ImageZoomsrc="insert image before publishing"style={{ width: "80%", height: "auto" }}alt="image of spell being cast/frog spawning"/>
254
+
<ImageZoomsrc="https://i.imgur.com/Upz0Qc3.gif"style={{ width: "80%", height: "auto" }}alt="image of spell being cast/frog spawning"/>
252
255
253
256
## Export your Mod to a .pak
254
257
@@ -265,7 +268,7 @@ Extract the contents of the .zip folder into the `ModdingTools` folder so you ca
265
268
- Select your project folder (`Mods`).
266
269
- Click Build Mod, which generates a .pak file.
267
270
268
-
<ImageZoomsrc="insert image before publishing"style={{ width: "80%", height: "auto" }}alt="screenshot of multitool"/>
271
+
<ImageZoomsrc="https://i.imgur.com/JVOmY04.png"style={{ width: "80%", height: "auto" }}alt="screenshot of multitool"/>
269
272
270
273
The **.pak** should be saved here:
271
274
@@ -285,7 +288,7 @@ The Script Extender console should load automatically, but if you don’t see it
285
288
286
289
You’ll be able to find the teapot containing the frog in the Tutorial Chest at the very beginning of the game, on the Tutorial Level (the Nautiloid ship). Walk past Shadowheart and open the chest in the next room.
287
290
288
-
<ImageZoomsrc="insert image before publishing"style={{ width: "80%", height: "auto" }}alt="Discovering the teapot containing Frog"/>
291
+
<ImageZoomsrc="https://i.imgur.com/iO4Zxr3.png"style={{ width: "80%", height: "auto" }}alt="Discovering the teapot containing Frog"/>
289
292
290
293
## Bonus Challenges
291
294
@@ -321,7 +324,7 @@ Scratch told us he wants you to share your projects with the team [@codedex_io](
0 commit comments