Ty ThomTHOM wrote: ↑Sat Sep 21, 2019 9:18 amCode: Select all
function champXP() for i=1,4 do local ch = party.party:getChampion(i) if ch:isAlive() then ch:gainExp(50) hudPrint(" "..ch:getName().." gained 50 XP.") end end playSound("level_up") end
Ty ThomTHOM wrote: ↑Sat Sep 21, 2019 9:18 amCode: Select all
function champXP() for i=1,4 do local ch = party.party:getChampion(i) if ch:isAlive() then ch:gainExp(50) hudPrint(" "..ch:getName().." gained 50 XP.") end end playSound("level_up") end
Code: Select all
defineObject{
name = "itm_food_cheese_big",
baseObject = "base_item",
components = {
{
class = "Model",
model = "mod_assets/models/items/food/cheese_big.fbx",
},
{
class = "Item",
uiName = "Big Cheese",
gfxAtlas = "mod_assets/textures/gui/gui_icons_food.tga",
gfxIndex = 2,
weight = 0.5,
description = "Big extra tasty cheese.",
traits = { "consumable" },
},
{
class = "UsableItem",
onUseItem = function(self, champion) --- Champ 1 or 2 to 4 names show when the eat the cheese ---
hudPrint("eats the cheese")
end,
nutritionValue = 250,
},
},
tags = { "item_food" },
}
Code: Select all
hudPrint(champion:getName() .. " won't eat that.")
Yes, that's what I finally understood. Currently I'm preparing my mod for this change. Changing all music in my maps to my custom ones before I remove the ambient line.Isaac wrote: ↑Tue Sep 24, 2019 4:15 pm Just make edits [and omissions] to a copy of the standard_assets.lua file from the asset pack, and replace the call to include it in your init file, with calling your edited copy instead.
For example, if you don't use the Tomb tile-set, then you can remove it from the edited standard_assets.lua.
Code: Select all
-- import standard assets
import "mod_assets/scripts/standard_assets.lua"
import "assets/scripts/objects/base.lua"
import "assets/scripts/objects/generic.lua"
import "assets/scripts/spells/blob.lua"
import "assets/scripts/monsters/skeleton_knight_trooper.lua"
import "assets/scripts/monsters/uggardian.lua"