Jump to content

Recommended Posts

I've just finished my character, with everything done I tested it, it worked, animations were fine and it load correctly, but when I added a new item, it started giving me some problems.
I followed a tutorial to make it, even cheked to put everything as it said, only changing the name of the item, but since then I can't start any server.

[00:00:23]: Frontend-Unloading mod 'all'.	
[00:00:23]: FrontendLoadMod	Worfid	
[00:00:23]: Could not load mod_config_data/modconfiguration_Worfid	
[00:00:23]: Fontend-Loading mod: Worfid (Worfid, The blessed miner) Version:1.0.0	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	Loading modservercreationmain.lua	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	  Mod had no modservercreationmain.lua. Skipping.	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	Loading modworldgenmain.lua	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	  Mod had no modworldgenmain.lua. Skipping.

This is the only cause I don't really understand about this error, my mod has his modinfo.lua and modmain.lua, it came with his template, but into tutorials and this forum I never saw modworldgenmain.lua or modservercreationmain.lua
 

PrefabFiles = {
	"worfid",
	"worfid_none",
	"blessed_pickaxe",
}

Assets = {
    Asset( "IMAGE", "images/saveslot_portraits/worfid.tex" ),
    Asset( "ATLAS", "images/saveslot_portraits/worfid.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/worfid.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/worfid.xml" ),
	
    Asset( "IMAGE", "images/selectscreen_portraits/worfid_silho.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/worfid_silho.xml" ),

    Asset( "IMAGE", "bigportraits/worfid.tex" ),
    Asset( "ATLAS", "bigportraits/worfid.xml" ),
	
	Asset( "IMAGE", "images/map_icons/worfid.tex" ),
	Asset( "ATLAS", "images/map_icons/worfid.xml" ),
	
	Asset( "IMAGE", "images/avatars/avatar_worfid.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_worfid.xml" ),
	
	Asset( "IMAGE", "images/avatars/avatar_ghost_worfid.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_ghost_worfid.xml" ),
	
	Asset( "IMAGE", "images/avatars/self_inspect_worfid.tex" ),
    Asset( "ATLAS", "images/avatars/self_inspect_worfid.xml" ),
	
	Asset( "IMAGE", "images/names_worfid.tex" ),
    Asset( "ATLAS", "images/names_worfid.xml" ),
	
	Asset( "IMAGE", "images/names_gold_worfid.tex" ),
    Asset( "ATLAS", "images/names_gold_worfid.xml" ),
	
}

AddMinimapAtlas("images/map_icons/worfid.xml")

local require = GLOBAL.require
local STRINGS = GLOBAL.STRINGS

-- The character select screen lines
STRINGS.CHARACTER_TITLES.worfid = "The Blessed Miner"
STRINGS.CHARACTER_NAMES.worfid = "Worfid"
STRINGS.CHARACTER_DESCRIPTIONS.worfid = "*Perk 1\n*Perk 2\n*Perk 3"
STRINGS.CHARACTER_QUOTES.worfid = "\"Quote\""
STRINGS.CHARACTER_SURVIVABILITY.worfid = "Slim"

-- Custom speech strings
STRINGS.CHARACTERS.WORFID = require "speech_worfid"

-- The character's name as appears in-game 
STRINGS.NAMES.WORFID = "Worfid"
STRINGS.SKIN_NAMES.worfid_none = "Worfid"

-- The skins shown in the cycle view window on the character select screen.
-- A good place to see what you can put in here is in skinutils.lua, in the function GetSkinModes
local skin_modes = {
    { 
        type = "ghost_skin",
        anim_bank = "ghost",
        idle_anim = "idle", 
        scale = 0.75, 
        offset = { 0, -25 } 
    },
}

---AddRecipe("blessed_pickaxe",{ Ingredient("goldnugget", 3), Ingredient("nightmarefuel", 2)}, tGLOBAL.RECIPETABS.WAR, GLOBAL.TECH.NONE,nil,nil,nil,1,"miner", "images/inventoryimages/spiritual_gold.xml", "spiritual_gold.tex") 

-- Add mod character to mod character list. Also specify a gender. Possible genders are MALE, FEMALE, ROBOT, NEUTRAL, and PLURAL.
AddModCharacter("worfid", "MALE", skin_modes)

This is the hole modmain.lua code, I commented the recipe to test it and the difference was that now it takes longer to try to start the server, but still not starting.
 

local assets= {

	Asset( "ANIM", "anim/blessed_pickaxe.zip"),
	Asset( "ANIM", "anim/swap_blessed_pickaxe.zip"),
	Asset( "ATLAS", "images/inventoryimages/blessed_pickaxe.xml"),
	Asset( "IMAGE", "images/inventoryimages/blessed_pickaxe.tex"),
	
	}
prefabs = {}local function fn() 
	local function OnEquipo(inst,owner)
	owner.AnimState:OverrideSymbol("swap_object","swap_blessed_pickaxe","swap_blessed_pickaxe")
	owner.AnimState:Show("ARM_carry")
	owner-AnimState:Hide("ARM_normal")
end

local function OnUnequip(inst,owner)
	owner.AnimState:Hide("ARM_carry")
	owner.AnimState:Show("ARM_normal")
end

	local inst = CreateEntity()
	local trans = inst.entity:AddTransform()
	local anim = inst.entity:AddAnimState()
	local sound = inst.entity:AddSoundEmitter()
	
	MakeInventoryPhysics(inst)
	
	anim:SetBank("blessed_pickaxe")
	anim:SetBuild("blessed_pickaxe")
	anim:PlayAnimation("idle")
----
	inst:AddComponent("inspectable")
----
	inst:AddComponent("inventoryitem")
	inst.components.inventoryitem.imagename = "blessed_pickaxe"
	inst.components.inventoryitem.atlasname = "images/inventoryimages/blessed_pickaxe.xml"
	
    inst:AddTag("tool")

    inst:AddTag("weapon")

	if not TheWorld.ismastersim then
        return inst
    end
    inst.entity:SetPristine()
	
	inst:AddComponent("tool")
    inst.components.tool:SetAction(ACTIONS.MINE, 20)
	
----

	inst:AddComponent("finiteuses")
	inst.components.finiteuses:SetOnFinished(inst.Remove)
    inst.components.finiteuses:SetMaxUses(320)
    inst.components.finiteuses:SetUses(320)
    inst.components.finiteuses:SetConsumption(ACTIONS.MINE, 1)

	
----

	inst:AddComponent("weapon")
    inst.components.weapon:SetDamage(32)
	
----

	inst:AddComponent("equippable")
	inst.components.equippable:SetOnEquip( OnEquip )
	inst.components.equippable:SetOnUnequip( OnUnequip )
	
----
	
	inst.components.finiteuses:SetConsumption(ACTIONS.MINE, 1)
	inst.components.weapon.attackwear = 1
	
return instendreturn Prefab("common/inventory/blessed_pickaxe", fn, assets, prefabs)

This is the item I created, I don't understand why, but I made a copy of the mod without anything about this item and the server functions. my character shows up with everything fine, all the animations, no problem with mod icons, but adding the item gives trouble starting the server, actually I modified a little bit the code, so it doesn't crash the game, but it's not starting the server with the mod.

I'll be totally grateful to anyone that could give me an answer, I'm trying to change some code, and testing it, but still not working. I can share my lua files if needed, but everything should be in this to codes I posted.
 

This is the tutorial I used for my item.

On 5/12/2023 at 9:10 PM, Ifnerr said:

I've just finished my character, with everything done I tested it, it worked, animations were fine and it load correctly, but when I added a new item, it started giving me some problems.
I followed a tutorial to make it, even cheked to put everything as it said, only changing the name of the item, but since then I can't start any server.

[00:00:23]: Frontend-Unloading mod 'all'.	
[00:00:23]: FrontendLoadMod	Worfid	
[00:00:23]: Could not load mod_config_data/modconfiguration_Worfid	
[00:00:23]: Fontend-Loading mod: Worfid (Worfid, The blessed miner) Version:1.0.0	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	Loading modservercreationmain.lua	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	  Mod had no modservercreationmain.lua. Skipping.	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	Loading modworldgenmain.lua	
[00:00:23]: Mod: Worfid (Worfid, The blessed miner)	  Mod had no modworldgenmain.lua. Skipping.

This is the only cause I don't really understand about this error, my mod has his modinfo.lua and modmain.lua, it came with his template, but into tutorials and this forum I never saw modworldgenmain.lua or modservercreationmain.lua
 

PrefabFiles = {
	"worfid",
	"worfid_none",
	"blessed_pickaxe",
}

Assets = {
    Asset( "IMAGE", "images/saveslot_portraits/worfid.tex" ),
    Asset( "ATLAS", "images/saveslot_portraits/worfid.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/worfid.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/worfid.xml" ),
	
    Asset( "IMAGE", "images/selectscreen_portraits/worfid_silho.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/worfid_silho.xml" ),

    Asset( "IMAGE", "bigportraits/worfid.tex" ),
    Asset( "ATLAS", "bigportraits/worfid.xml" ),
	
	Asset( "IMAGE", "images/map_icons/worfid.tex" ),
	Asset( "ATLAS", "images/map_icons/worfid.xml" ),
	
	Asset( "IMAGE", "images/avatars/avatar_worfid.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_worfid.xml" ),
	
	Asset( "IMAGE", "images/avatars/avatar_ghost_worfid.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_ghost_worfid.xml" ),
	
	Asset( "IMAGE", "images/avatars/self_inspect_worfid.tex" ),
    Asset( "ATLAS", "images/avatars/self_inspect_worfid.xml" ),
	
	Asset( "IMAGE", "images/names_worfid.tex" ),
    Asset( "ATLAS", "images/names_worfid.xml" ),
	
	Asset( "IMAGE", "images/names_gold_worfid.tex" ),
    Asset( "ATLAS", "images/names_gold_worfid.xml" ),
	
}

AddMinimapAtlas("images/map_icons/worfid.xml")

local require = GLOBAL.require
local STRINGS = GLOBAL.STRINGS

-- The character select screen lines
STRINGS.CHARACTER_TITLES.worfid = "The Blessed Miner"
STRINGS.CHARACTER_NAMES.worfid = "Worfid"
STRINGS.CHARACTER_DESCRIPTIONS.worfid = "*Perk 1\n*Perk 2\n*Perk 3"
STRINGS.CHARACTER_QUOTES.worfid = "\"Quote\""
STRINGS.CHARACTER_SURVIVABILITY.worfid = "Slim"

-- Custom speech strings
STRINGS.CHARACTERS.WORFID = require "speech_worfid"

-- The character's name as appears in-game 
STRINGS.NAMES.WORFID = "Worfid"
STRINGS.SKIN_NAMES.worfid_none = "Worfid"

-- The skins shown in the cycle view window on the character select screen.
-- A good place to see what you can put in here is in skinutils.lua, in the function GetSkinModes
local skin_modes = {
    { 
        type = "ghost_skin",
        anim_bank = "ghost",
        idle_anim = "idle", 
        scale = 0.75, 
        offset = { 0, -25 } 
    },
}

---AddRecipe("blessed_pickaxe",{ Ingredient("goldnugget", 3), Ingredient("nightmarefuel", 2)}, tGLOBAL.RECIPETABS.WAR, GLOBAL.TECH.NONE,nil,nil,nil,1,"miner", "images/inventoryimages/spiritual_gold.xml", "spiritual_gold.tex") 

-- Add mod character to mod character list. Also specify a gender. Possible genders are MALE, FEMALE, ROBOT, NEUTRAL, and PLURAL.
AddModCharacter("worfid", "MALE", skin_modes)

This is the hole modmain.lua code, I commented the recipe to test it and the difference was that now it takes longer to try to start the server, but still not starting.
 

local assets= {

	Asset( "ANIM", "anim/blessed_pickaxe.zip"),
	Asset( "ANIM", "anim/swap_blessed_pickaxe.zip"),
	Asset( "ATLAS", "images/inventoryimages/blessed_pickaxe.xml"),
	Asset( "IMAGE", "images/inventoryimages/blessed_pickaxe.tex"),
	
	}
prefabs = {}local function fn() 
	local function OnEquipo(inst,owner)
	owner.AnimState:OverrideSymbol("swap_object","swap_blessed_pickaxe","swap_blessed_pickaxe")
	owner.AnimState:Show("ARM_carry")
	owner-AnimState:Hide("ARM_normal")
end

local function OnUnequip(inst,owner)
	owner.AnimState:Hide("ARM_carry")
	owner.AnimState:Show("ARM_normal")
end

	local inst = CreateEntity()
	local trans = inst.entity:AddTransform()
	local anim = inst.entity:AddAnimState()
	local sound = inst.entity:AddSoundEmitter()
	
	MakeInventoryPhysics(inst)
	
	anim:SetBank("blessed_pickaxe")
	anim:SetBuild("blessed_pickaxe")
	anim:PlayAnimation("idle")
----
	inst:AddComponent("inspectable")
----
	inst:AddComponent("inventoryitem")
	inst.components.inventoryitem.imagename = "blessed_pickaxe"
	inst.components.inventoryitem.atlasname = "images/inventoryimages/blessed_pickaxe.xml"
	
    inst:AddTag("tool")

    inst:AddTag("weapon")

	if not TheWorld.ismastersim then
        return inst
    end
    inst.entity:SetPristine()
	
	inst:AddComponent("tool")
    inst.components.tool:SetAction(ACTIONS.MINE, 20)
	
----

	inst:AddComponent("finiteuses")
	inst.components.finiteuses:SetOnFinished(inst.Remove)
    inst.components.finiteuses:SetMaxUses(320)
    inst.components.finiteuses:SetUses(320)
    inst.components.finiteuses:SetConsumption(ACTIONS.MINE, 1)

	
----

	inst:AddComponent("weapon")
    inst.components.weapon:SetDamage(32)
	
----

	inst:AddComponent("equippable")
	inst.components.equippable:SetOnEquip( OnEquip )
	inst.components.equippable:SetOnUnequip( OnUnequip )
	
----
	
	inst.components.finiteuses:SetConsumption(ACTIONS.MINE, 1)
	inst.components.weapon.attackwear = 1
	
return instendreturn Prefab("common/inventory/blessed_pickaxe", fn, assets, prefabs)

This is the item I created, I don't understand why, but I made a copy of the mod without anything about this item and the server functions. my character shows up with everything fine, all the animations, no problem with mod icons, but adding the item gives trouble starting the server, actually I modified a little bit the code, so it doesn't crash the game, but it's not starting the server with the mod.

I'll be totally grateful to anyone that could give me an answer, I'm trying to change some code, and testing it, but still not working. I can share my lua files if needed, but everything should be in this to codes I posted.
 

This is the tutorial I used for my item.

I fixed it but not sure if it will work, you can also follow this guide

 

blessed_pickaxe.lua

  • Like 1
On 5/14/2023 at 11:51 AM, Haruhi Kawaii said:

I fixed it but not sure if it will work, you can also follow this guide

 

blessed_pickaxe.lua 1.9 kB · 1 download

Thanks a lot for your help, now it works properly!! But now the object in swap is invisible, I tried looking into the tutorial and looking for code but it was nothing there, I tried copying some code from other mod but the thing is not there, the ground and inventory image are functional but there no item in hand, I can use the item and the character plays an animation but with no item in hand, maybe you have an answer to that problem.

I'll leave the mod main in case there's something left there, and the blessed pickaxe code, I didn't change that much of what you give me, only names or order.

modmain.lua blessedpickaxe.lua

Edited by Ifnerr
4 hours ago, Ifnerr said:

Thanks a lot for your help, now it works properly!! But now the object in swap is invisible, I tried looking into the tutorial and looking for code but it was nothing there, I tried copying some code from other mod but the thing is not there, the ground and inventory image are functional but there no item in hand, I can use the item and the character plays an animation but with no item in hand, maybe you have an answer to that problem.

I'll leave the mod main in case there's something left there, and the blessed pickaxe code, I didn't change that much of what you give me, only names or order.

modmain.lua 2.91 kB · 0 downloads blessedpickaxe.lua 2.04 kB · 0 downloads

Maybe because the way you created the anim file is not correct, please attach the folder exported blessed_pickaxe

9 hours ago, Ifnerr said:

I made noted in blessedpickaxe.lua, you can check the forum topic Custom Hat, Armor & Handslot Item Templates for more understanding. The way you created the swap anim is correct but there is a problem with the code

image.thumb.png.207f087e340457f1e7a20dcfc8ec30a4.png

blessedpickaxe.lua

On 5/17/2023 at 11:50 AM, Haruhi Kawaii said:

I made noted in blessedpickaxe.lua, you can check the forum topic Custom Hat, Armor & Handslot Item Templates for more understanding. The way you created the swap anim is correct but there is a problem with the code

image.thumb.png.207f087e340457f1e7a20dcfc8ec30a4.png

blessedpickaxe.lua 2.42 kB · 1 download

I tried cheking that link, and I realice that it all should be fine, but in little free times I get to make a mining helmet for the mod, now the server doesn't generate world, it will stay generating world until I cancel it, the client log doesn't tells anything now I'm totally lost, so I decided to ask If you or someone else could check the mod and test it maybe it's my computer, or maybe in the lua files I did something I didn't realice or comment something I shouldn't, but comparing codes it looks the same as in the forum tutorial, but with my names on it.

Here it is all the content I made, but I don't really see the error here.

Worfid.rar

58 minutes ago, Ifnerr said:

I tried cheking that link, and I realice that it all should be fine, but in little free times I get to make a mining helmet for the mod, now the server doesn't generate world, it will stay generating world until I cancel it, the client log doesn't tells anything now I'm totally lost, so I decided to ask If you or someone else could check the mod and test it maybe it's my computer, or maybe in the lua files I did something I didn't realice or comment something I shouldn't, but comparing codes it looks the same as in the forum tutorial, but with my names on it.

Here it is all the content I made, but I don't really see the error here.

Worfid.rar 3.11 MB · 1 download

There is a syntax error on lines 42-43, I have fixed it for you

modmain.lua

On 5/23/2023 at 8:25 AM, Haruhi Kawaii said:

There is a syntax error on lines 42-43, I have fixed it for you

modmain.lua 3.95 kB · 0 downloads

Now it works!!! thanks a lot! do you know why the item is small?  is a pickaxe but its the size of my character's hand, and trying to put my helmet as a starting item gives me a lost connection when I start the server. But when I left it as a recipe its okay, but I can't craft the pickaxe or the helmet it says "I can't do that", I tried looking for crafting tables or tech types and it doesn't seem to be a problem with that, but there is something I don't get. I tried also looking for those syntax errors and i couldn't find any.

12 hours ago, Ifnerr said:

Now it works!!! thanks a lot! do you know why the item is small?  is a pickaxe but its the size of my character's hand

The image size of swap_blessedpickaxe.png  is too small, you need to resize it

12 hours ago, Ifnerr said:

but I can't craft the pickaxe or the helmet it says "I can't do that",

Cause you're trying to craft a prefab that doesn't exist

Worfid.zip

11 hours ago, Haruhi Kawaii said:

The image size of swap_blessedpickaxe.png  is too small, you need to resize it

Cause you're trying to craft a prefab that doesn't exist

Worfid.zip 6.87 MB · 1 download

I'm completly grateful for your help, this is really the best help I could have, you solved all the problems I couldn't find here. I have a little issue, I found a tutorial but it seems it wasn't the same problem, my character's name and gold name is not showing, it's like the last character I put the mouse on is the name of my character, for example if I touch the random when I go to my character it says Random not worfid as it's programmed to I tried resizing it, remaking the tex and xml files, and nothing seems to change a thing, the mod is funtional but the names not, and my items names as the pickaxe and helmet says missing name, I saw another mod having that issue and tried to copy what they did but it didn't work. Some say something about <elements> and I don't know where that folder is or what is that.
Really thanks for your help!!! <3

9 hours ago, Ifnerr said:

I'm completly grateful for your help, this is really the best help I could have, you solved all the problems I couldn't find here. I have a little issue, I found a tutorial but it seems it wasn't the same problem, my character's name and gold name is not showing, it's like the last character I put the mouse on is the name of my character, for example if I touch the random when I go to my character it says Random not worfid as it's programmed to I tried resizing it, remaking the tex and xml files, and nothing seems to change a thing, the mod is funtional but the names not, and my items names as the pickaxe and helmet says missing name, I saw another mod having that issue and tried to copy what they did but it didn't work. Some say something about <elements> and I don't know where that folder is or what is that.
Really thanks for your help!!! <3

The name of the item you fix modmain looks like this.
image.thumb.png.dd77f58ad07b1740941d1c1589df00fb.png
As for names_gold_character there have been posts on other forums talking about it

 

1 hour ago, Haruhi Kawaii said:

The name of the item you fix modmain looks like this.
image.thumb.png.dd77f58ad07b1740941d1c1589df00fb.png
As for names_gold_character there have been posts on other forums talking about it

 

Thanks for this post, today my browser on the page was acting weird, it said something like an error when I searched on topics>mod, but I have the items like you put there, and in game. in my inventory or equipped it will always say MISSING NAME, and for what I understand the code says it's name everywhere.

 

2 hours ago, Ifnerr said:

Thanks for this post, today my browser on the page was acting weird, it said something like an error when I searched on topics>mod, but I have the items like you put there, and in game. in my inventory or equipped it will always say MISSING NAME, and for what I understand the code says it's name everywhere.

 

Maybe you did something wrong, it still works for me

Worfid.zip

On 5/26/2023 at 2:14 AM, Haruhi Kawaii said:

Maybe you did something wrong, it still works for me

Worfid.zip 6.87 MB · 0 downloads

I've solved everything, thanks a lot, now the problem is when I drop the helmet, it drops the whole turn around

drops 4.png

5 hours ago, Ifnerr said:

I've solved everything, thanks a lot, now the problem is when I drop the helmet, it drops the whole turn around

drops 4.png

My bad, you can check in the exported folder and delete the other three

blessedmininghelmet.zip

Edited by Haruhi Kawaii
On 5/28/2023 at 9:40 AM, Haruhi Kawaii said:

My bad, you can check in the exported folder and delete the other three

blessedmininghelmet.zip 323.57 kB · 1 download

Hey I just realice that in game all the items are not saying their names, like when you go and try to craft them it says nothing, and in game when you pick up the item it says MISSING NAME, I thought I corrected it but stills that way, I checked the modmain.lua and search for syntax errors or something like that but nothing happened. Here I send you my last version, I added a new item and it all works properly but the names are still missing.

 

I SOLVED IT, SORRY

Worfid test.rar

Edited by Ifnerr
  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...