Sign in to follow this  
Ipsquiggle

Preview Mod Upgrade Issues

Recommended Posts

chromiumboy    330

Let me know if you manage to fix it [MENTION=10028]tehMugwump[/MENTION], good luck! :)Another odd problem has popped up: I am no longer able to override terrain.lua or terrain_types.lua files by having my own terrain.lua or terrain_types.lua file sitting in "modname/scripts/map"I even put deliberate syntax errors in my terrain.lua file, and the game didn't crash on worldgen, so the games is not referencing it at all.I altered line 101 of the main directories terrain.lua to:

local TERRAIN_TYPES = require "map/terrain_types2"
and got the following error:
DoLuaFile Error: ...apps/common/dont_starve/data/scripts/map/terrain.lua:101: module 'map/terrain_types2' not found:	no file 'data/scripts/map/terrain_types2.lua' (checked with custom loader)	no file 'data/scriptlibs/map/terrain_types2.lua' (checked with custom loader)	no field package.preload['map/terrain_types2']	no file 'data\scripts\map/terrain_types2.lua'	no file 'data\scriptlibs\map/terrain_types2.lua'	no file 'C:\Program Files (x86)\Steam\steamapps\common\dont_starve\bin\lualib\map/terrain_types2.dll'
Does this mean that its not checking the mod paths at all? Edited by chromiumboy

Share this post


Link to post
Share on other sites
tehMugwump    443

I got around my problem by giving up and using an alternate, existing texture in the hud.tex file for the extra backpack equip slot. :disturbed:One thing I've noticed about this last update is that 1.) there are far fewer folks even attempting mods and 2.) those of us that are left cannot figure a lot of this hud/map stuff out without the dev's help.I will say, however, that I absolutely love the new mod load screen/process.

Let me know if you manage to fix it [MENTION=10028]tehMugwump[/MENTION], good luck! :)Another odd problem has popped up: I am no longer able to override terrain.lua or terrain_types.lua files by having my own terrain.lua or terrain_types.lua file sitting in "modname/scripts/map"I even put deliberate syntax errors in my terrain.lua file, and the game didn't crash on worldgen, so the games is not referencing it at all.I altered line 101 of the main directories terrain.lua to:

local TERRAIN_TYPES = require "map/terrain_types2"
and got the following error:
DoLuaFile Error: ...apps/common/dont_starve/data/scripts/map/terrain.lua:101: module 'map/terrain_types2' not found:	no file 'data/scripts/map/terrain_types2.lua' (checked with custom loader)	no file 'data/scriptlibs/map/terrain_types2.lua' (checked with custom loader)	no field package.preload['map/terrain_types2']	no file 'data\scripts\map/terrain_types2.lua'	no file 'data\scriptlibs\map/terrain_types2.lua'	no file 'C:\Program Files (x86)\Steam\steamapps\common\dont_starve\bin\lualib\map/terrain_types2.dll'
Does this mean that its not checking the mod paths at all?

Share this post


Link to post
Share on other sites
Lexicroft    77

I got a problemeven i do everything as you say

function handgun()local rhammo = GLOBAL.Recipe("rhammo", { Ingredient("slurtle_shellpieces", 3), Ingredient("flint", 6), Ingredient("gunpowder", 2) }, RECIPETABS.MAGIC, 0)local srhammo = GLOBAL.Recipe("srhammo", { Ingredient("rhammo", 1), Ingredient("silk", 12), Ingredient("spidergland", 6) }, RECIPETABS.MAGIC, 0)rhammo.atlas = "inventoryimages/rhammo.xml"srhammo.atlas = "inventoryimages/srhammo.xml"endAddGamePostInit(handgun)
post-23254-13764596348616_thumb.jpg

Share this post


Link to post
Share on other sites
chromiumboy    330

I got a problem

Yup its a known issue. I posted about it just above. Ingredients with custom inventory images will not appear due to the way the atlas is loaded for ingredients.

Share this post


Link to post
Share on other sites
tehMugwump    443

Aren't the inventory images supposed to be in "images/inventoryimages/rhammo.xml"?

This was stated, but I'm not sure if it can just be in inventoryimages if you've called out the path.

Also, I had to have this in the actual prefab to get the image to show in the inventory bar (in my mod):

inst:AddComponent("inventoryitem")

inst.components.inventoryitem.atlasname = "images/inventoryimages/skeletonrod.xml"

I got a problem

even i do everything as you say

function handgun()local rhammo = GLOBAL.Recipe("rhammo", { Ingredient("slurtle_shellpieces", 3), Ingredient("flint", 6), Ingredient("gunpowder", 2) }, RECIPETABS.MAGIC, 0)local srhammo = GLOBAL.Recipe("srhammo", { Ingredient("rhammo", 1), Ingredient("silk", 12), Ingredient("spidergland", 6) }, RECIPETABS.MAGIC, 0)rhammo.atlas = "inventoryimages/rhammo.xml"srhammo.atlas = "inventoryimages/srhammo.xml"endAddGamePostInit(handgun)
[ATTACH=CONFIG]10627[/ATTACH]

Share this post


Link to post
Share on other sites
Lexicroft    77

Aren't the inventory images supposed to be in "images/inventoryimages/rhammo.xml"?

This was stated, but I'm not sure if it can just be in inventoryimages if you've called out the path.

Also, I had to have this in the actual prefab to get the image to show in the inventory bar (in my mod):

inst:AddComponent("inventoryitem")

inst.components.inventoryitem.atlasname = "images/inventoryimages/skeletonrod.xml"

I don't have image folder in my mods, just inventoryimages folder, so the path is straight into it ^_^

Share this post


Link to post
Share on other sites
tehMugwump    443

My mod crashes when I put it in the mods folder. It worked before heeeeeeeeelp

This really gives us nothing to go on. Have you read through this thread, especially the first post?

Share this post


Link to post
Share on other sites
Ipsquiggle    5784

I'm waitting for fix custom recipe tab image

Posted Image

A solution for this will be in today's release. I'll post the instruction in this thread's first post now, but it won't "work" until later today.

Share this post


Link to post
Share on other sites
Ipsquiggle    5784

Hey @Ipsquiggle, got another one for you: prefabs with custom textures do not show up in the crafting tab when they are ingredients. I have the atlases in the ingredient prefabs, and they show up on the inventory bar, just not in the crafting tab. I check my log and found these warning messages:

WARNING! Could not set texture: 'bearclaws.tex' from atlas 'data/images/inventoryimages.xml'
So while you set the atlas for recipes, can you set the image paths for ingredient?

---

EDIT: Found the answer to my own question: nope.

In crafting.lua, the ingredient atlas is locally defined.

Starting from line 432 of crafting.lua:

local inventory_atlas = resolvefilepath("data/images/inventoryimages.xml")        for k,v in pairs(recipe.ingredients) do                    local has, num_found = owner.components.inventory:Has(v.type, v.amount)                        local ing = self.contents:AddChild(IngredientUI(inventory_atlas, v.type..".tex", v.amount, num_found, has, STRINGS.NAMES[string.upper(v.type)], owner))            ing:SetPosition(Vector3(offset, 80, 0))            offset = offset + (w+ div)            self.ing[k] = ing        end
I'd need to override the script I think.
Good catch, thanks. I'll resolve this in a similar manner to the other ones. I'll let you know when it's live (probably not today though).

Share this post


Link to post
Share on other sites
Ipsquiggle    5784

@Ipsquiggle any foot notes about the issue I am currently running into?

I have attached the mod I am working on, any information would be greatly appreciated. (It's pretty much just a copy of the Chester_Eyebone.lua file, with some additional stuff to make it only visible at night.)

It looks like it's because you've included your own copy of components/inventoryitem.lua which doesn't have the latest changes in it.

Share this post


Link to post
Share on other sites
Ipsquiggle    5784

I got a problemeven i do everything as you say

function handgun()local rhammo = GLOBAL.Recipe("rhammo", { Ingredient("slurtle_shellpieces", 3), Ingredient("flint", 6), Ingredient("gunpowder", 2) }, RECIPETABS.MAGIC, 0)local srhammo = GLOBAL.Recipe("srhammo", { Ingredient("rhammo", 1), Ingredient("silk", 12), Ingredient("spidergland", 6) }, RECIPETABS.MAGIC, 0)rhammo.atlas = "inventoryimages/rhammo.xml"srhammo.atlas = "inventoryimages/srhammo.xml"endAddGamePostInit(handgun)
I think this is the same problem as chromium is having: Custom ingredient images aren't showing up. Working on a fix.

Share this post


Link to post
Share on other sites
Ipsquiggle    5784

My mod crashes when I put it in the mods folder. It worked before heeeeeeeeelp

Work through the instructions in the first post of this thread; if those aren't clear, or if you still have issues, let us know! :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this