Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,7 @@ def fatal(error):

shutil.copytree(os.path.join(kristal_path, "mod_template", "assets"), os.path.join(build_path, "example", "assets"))
shutil.copytree(os.path.join(kristal_path, "mod_template", "scripts"), os.path.join(build_path, "example", "scripts"))
shutil.copy(os.path.join(kristal_path, "mods", "example", "mod.json"), os.path.join(build_path, "example", "mod.json"))
shutil.copy(os.path.join(kristal_path, "mod_template", "mod.lua"), os.path.join(build_path, "example", "mod.lua"))
shutil.copy(os.path.join(kristal_path, "mods", "example", "mod.lua"), os.path.join(build_path, "example", "mod.lua"))

shutil.make_archive(os.path.join(output_path, "example-mod"), 'zip', os.path.join(build_path, "example"))

Expand Down
67 changes: 0 additions & 67 deletions mod_template/mod.json

This file was deleted.

70 changes: 67 additions & 3 deletions mod_template/mod.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
function Mod:init()
print("Loaded "..self.info.name.."!")
end
return {
-- The ID of your mod. Should be unique!!
id = "{id}",
-- Displays on the main menu.
name = "{name}",
-- Displays underneath the name. Optional.
subtitle = "",

-- The version of your mod.
version = "v1.0.0",
-- What version of the engine your mod was made with.
engineVer = "{engineVer}",

-- The Deltarune chapter you'd like to base your mod off of.
-- Do keep in mind that you can control chapter-specific features
-- one by one using the config below.
chapter = {chapter},

-- The map that you start in when first starting the mod.
map = "room1",

-- The party. The first character is the player.
party = {"kris", "susie", "ralsei"},

-- The inventory. Contains three darkburgers, a cell phone, and a shadow crystal by default.
inventory = {
items = {"glowshard", "darkburger", "darkburger", "darkburger"},
key_items = {"cell_phone", "shadowcrystal"},
},

-- Equipment for your party. Not specifying equipment defaults to the following:
equipment = {
kris = {
weapon = "wood_blade",
armor = {"amber_card", "amber_card"},
},
susie = {
weapon = "mane_ax",
armor = {"amber_card", "amber_card"},
},
ralsei = {
weapon = "red_scarf",
armor = {"amber_card", "amber_card"},
}
},

-- Should never be true, but just in case. Restarts the entire engine when leaving the mod.
-- If you need this, you're most likely doing something wrong.
hardReset = false,

-- Whether the mod is hidden from mod selection.
hidden = false,

-- Whether the game window's title should be set to the mod's menu, and the icon to the image
-- in the file `window_icon.png`.
-- When your mod is configured as the engine's target mod, it's automatically done unless if
-- this option is explicitly set to false; else, it's done if this is set to true.
setWindowTitleAndIcon = nil,

-- Config values for the engine and any libraries you may have.
-- These config values can control chapter-specific features as well.
config = {
kristal = {
{config}
}
}
}
3 changes: 3 additions & 0 deletions mod_template/scripts/main.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function Mod:init()
print("Loaded "..self.info.name.."!")
end
15 changes: 0 additions & 15 deletions mods/_testmod/libraries/speeb/lib.json

This file was deleted.

74 changes: 15 additions & 59 deletions mods/_testmod/libraries/speeb/lib.lua
Original file line number Diff line number Diff line change
@@ -1,59 +1,15 @@
local lib = {}

local msg_suffix = libRequire("speeb", "reqtest")

function lib:init()
print("Loaded speeb library"..msg_suffix)

Utils.hook(Player, "update", function(orig, self)

if Input.down("superfast") then
self.walk_speed = 16
self.run_timer = 999
end

if self.run_timer > 60 then
self.walk_speed = self.walk_speed + DT
elseif self.walk_speed > 4 then
self.walk_speed = 4
end

orig(self)

if self.last_collided_x or self.last_collided_y then
if self.walk_speed >= 16 then
self:explode()
Game.world.music:stop()

Game.stage.timer:after(2, function()
local rect = Rectangle(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
rect:setColor(0, 0, 0)
rect:setLayer(100000)
rect.alpha = 0
Game.stage:addChild(rect)

Game.stage.timer:tween(2, rect, {alpha = 1}, "linear", function()
rect:remove()
Game:gameOver(0, 0)
Game.gameover.soul:remove()
Game.gameover.soul = nil
Game.gameover.screenshot = nil
Game.gameover.timer = 150
Game.gameover.current_stage = 4
end)
end)
elseif self.walk_speed >= 10 then
Game.world:hurtParty(20)
end
end
end)
end

--[[function lib:onFootstep(chara, num)
if chara:includes(Player) and love.math.random() < 0.01 then
chara:explode()
Game.world.music:stop()
end
end]]

return lib
return {
id = "speeb",
authors = {
"Sylvi"
},
version = "v1.1.0",
engineVer = "v0.4.0",
keybinds = {
{
name = "Go superrr fast",
id = "superfast",
keys = {"a"}
}
}
}
59 changes: 59 additions & 0 deletions mods/_testmod/libraries/speeb/scripts/main.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
local lib = {}

local msg_suffix = libRequire("speeb", "reqtest")

function lib:init()
print("Loaded speeb library"..msg_suffix)

Utils.hook(Player, "update", function(orig, self)

if Input.down("superfast") then
self.walk_speed = 16
self.run_timer = 999
end

if self.run_timer > 60 then
self.walk_speed = self.walk_speed + DT
elseif self.walk_speed > 4 then
self.walk_speed = 4
end

orig(self)

if self.last_collided_x or self.last_collided_y then
if self.walk_speed >= 16 then
self:explode()
Game.world.music:stop()

Game.stage.timer:after(2, function()
local rect = Rectangle(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
rect:setColor(0, 0, 0)
rect:setLayer(100000)
rect.alpha = 0
Game.stage:addChild(rect)

Game.stage.timer:tween(2, rect, {alpha = 1}, "linear", function()
rect:remove()
Game:gameOver(0, 0)
Game.gameover.soul:remove()
Game.gameover.soul = nil
Game.gameover.screenshot = nil
Game.gameover.timer = 150
Game.gameover.current_stage = 4
end)
end)
elseif self.walk_speed >= 10 then
Game.world:hurtParty(20)
end
end
end)
end

--[[function lib:onFootstep(chara, num)
if chara:includes(Player) and love.math.random() < 0.01 then
chara:explode()
Game.world.music:stop()
end
end]]

return lib
27 changes: 0 additions & 27 deletions mods/_testmod/libraries/virovirokun/lib.json

This file was deleted.

27 changes: 27 additions & 0 deletions mods/_testmod/libraries/virovirokun/lib.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
return {
id = "virovirokun",
authors = {
"Sylvi",
"Nyako"
},
version = "v1.1.0",
engineVer = "v0.4.0",

config = {
enable_cook = false,
enable_quarantine = false,

take_care_sprites = {
kris = {"enemies/virovirokun/take_care/kris_nurse", "enemies/virovirokun/take_care/kris_doctor"},
susie = "enemies/virovirokun/take_care/susie",
ralsei = "enemies/virovirokun/take_care/ralsei",
noelle = "enemies/virovirokun/take_care/noelle"
},
take_care_offsets = {
kris = {-4, -2},
susie = {-6, 0},
ralsei = {6, -1},
noelle = {-7, 0}
}
}
}
Loading