BPL_BL_Mod
BurrowLib 0.2.0, in the palette under BurrowLib › Mod.
What a mod knows about itself.
The game mounts each mod’s pak at /Game/Mods/<Name>/, so every Blueprint of a mod is saved under its mod’s folder, and the folder’s name is the mod’s. Pass self from any Blueprint of your mod:
on ReceiveBeginPlay { BPL_BL_Mod.Log(self, "map loaded")}writes “PK_MyMod: map loaded” to the game’s mod log.
Functions
Section titled “Functions”The name of the mod whose Blueprint made this object, e.g. “PK_MyMod”, or “” for an object made by the game itself.
fn Name(object: Object) -> stringWrites a line to the game’s mod log, with the mod’s name in front, so a player’s log shows which mod said what.
fn Log(object: Object, message: string)Folder
Section titled “Folder”The folder under /Game/Mods/ that an asset path lies in, or “” for a path outside it. A mod does not need to call it.
fn Folder(path: string) -> stringExamples
Section titled “Examples”Naming the mod a Blueprint belongs to
Section titled “Naming the mod a Blueprint belongs to”Greet asks which mod this Blueprint belongs to, and BeginPlay writes the answer to the game’s mod log. The examples live in /Game/Mods/BurrowLibExamples, so the name is BurrowLibExamples.
An Actor Blueprint, BP_ModName, with:
- a variable Greeting, String
Function Greet
Event Graph
blueprint BP_ModName : Actor at /Game/Mods/BurrowLibExamples/ModName/Loom/BP_ModNameuse /Game/Mods/BurrowLib_0_2_0
// What Greet made.var Greeting: string = ""
on ReceiveBeginPlay { Greet() BPL_BL_Mod.Log(self, Greeting)}
// Names the mod this Blueprint belongs to.fn Greet() { Greeting = "Hello from " + BPL_BL_Mod.Name(self)}