饥荒联机版

饥荒联机版

Glassic API
25 条留言
小鸭momo  [作者] 2024 年 12 月 5 日 上午 5:03 
@Applejack 本模组只保证与官方兼容,不保证与第三方模组的兼容性,有需求可以联系对方。
Applejack 2024 年 12 月 3 日 上午 12:45 
在两者都启用的情况下这个mod提供的皮肤会透明并制作就会报错
Applejack 2024 年 12 月 3 日 上午 12:44 
@小鸭momo 它只是和Modded Skins冲突,关掉后者之后就不会闪退了
小鸭momo  [作者] 2024 年 11 月 30 日 下午 8:58 
@Applejack Please describe what's happening before game crashed.
Applejack 2024 年 11 月 29 日 下午 11:22 
[05:01:57]: [string "../mods/workshop-2521851770/utils/skinhandl..."]:128: attempt to index field '?' (a nil value)
LUA ERROR stack traceback:
../mods/workshop-2521851770/utils/skinhandler.lua:148 in (method) ReskinEntity (Lua) <142-151>
scripts/prefabs/reskin_tool.lua:181 in (field) fn (Lua) <131-201>
scripts/scheduler.lua:186 in (method) OnTick (Lua) <164-216>
scripts/scheduler.lua:409 in (global) RunScheduler (Lua) <407-415>
scripts/update.lua:240 in () ? (Lua) <224-298>

[05:01:57]: Could not find anim build ms_spear_obsidian_spinner
小鸭momo  [作者] 2024 年 10 月 20 日 上午 5:54 
@FishCakesVT Read docs in modmain.
FishCakes 2024 年 10 月 16 日 下午 3:43 
how does it work?
Monc 2023 年 6 月 17 日 上午 11:00 
how can i make a mod?
Haruhi Kawaii (^ O ω < ^) 2023 年 3 月 19 日 上午 8:11 
@Civi Thank you very much, all problem solved
小鸭momo  [作者] 2023 年 3 月 19 日 上午 6:07 
@Haruhi Kawaii (*ෆ´ ˘ `ෆ*) I've seen that. Here's my suggestion.
1. Move "prefabskin.lua" from "scripts" to "main" to avoid compatibility issues.
2. Add a line "init_fn = GlassicAPI.BasicInitFn " in "CreatePrefabSkin(...)". e.g.
table.insert(prefabs, CreatePrefabSkin("kochosei_hat2", {
...
init_fn = GlassicAPI.BasicInitFn,
...
3. Comment line 9 in "prefabskin.lua".
-- GlassicAPI.SetOnequipSkinItem("kochosei_hat1", {"swap_object", "swap_hat", "swap_hat"})
* Because you have written "owner.AnimState:OverrideItemSkinSymbol" in OnEquip fn in "kochosei_hat1.lua", so you don't need to set onequipskinitem for it anymore. "GlassicAPI.SetOnequipSkinItem" is somehow a way to hack in items that are missing "owner.AnimState:OverrideItemSkinSymbol" in their OnEquip function.
Haruhi Kawaii (^ O ω < ^) 2023 年 3 月 18 日 下午 10:41 
@Civi https://pastebin.com/GbgPyeZu
Video here https://gofile.io/d/LIWlvk , I have attached my mod in if you want to check more
小鸭momo  [作者] 2023 年 3 月 18 日 上午 10:26 
@Haruhi Kawaii (*ෆ´ ˘ `ෆ*) Show me your code or video about your question. Thanks.
Haruhi Kawaii (^ O ω < ^) 2023 年 3 月 18 日 上午 12:35 
@Civi How to add inventory image for item with skin? I tried quite a few ways but still the image basic prefab, also I found that Clean Sweeper seems to have an error when sweaping on skinned and equipable items will cause Clean Sweeper to use the anim of the item with the skin, weird
小鸭momo  [作者] 2023 年 3 月 17 日 下午 8:10 
@Haruhi Kawaii (*ෆ´ ˘ `ෆ*) As for GlassicAPI.BasicInitFn, it shall only be used in CreatePrefabSkin, and param "skin_name" is no need anymore.
小鸭momo  [作者] 2023 年 3 月 17 日 下午 7:55 
@Haruhi Kawaii (*ෆ´ ˘ `ෆ*) Fix missing "anim/glassicrarities.zip".
Haruhi Kawaii (^ O ω < ^) 2023 年 3 月 17 日 下午 7:41 
I tried creating item skins and character skins, everything works fine except for inventory image I tried GlassicAPI.BasicInitFn(inst, "skin_name") if in modmain it gives an error
2521851770/modmain.lua"]:195: attempt to index local 'inst' (a nil value)
if using mod import it gives variable error 'inst' is not declared
Haruhi Kawaii (^ O ω < ^) 2023 年 3 月 17 日 下午 7:37 
version:4.0.1 Could not find an asset matching anim/glassicrarities.zip in any of the search paths
After the update it seems that the avatar background color when choosing a character is not normal, normally it is green
Haruhi Kawaii (^ O ω < ^) 2023 年 1 月 20 日 上午 5:58 
Thanks for your API, easy to use and stable
小鸭momo  [作者] 2021 年 11 月 26 日 下午 5:01 
@啦啦啦 已修复
True 2021 年 11 月 26 日 上午 10:35 
mods/workshop-2521851770/scripts/prefabs..."]:208: attempt to index field 'GLASSCICUTTER' (a nil value)
LUA ERROR stack traceback:
workshop-2521851770/scripts/prefabs/glassiccutter.lua:208 in (local) fn (Lua) <206-226>
scripts/entityscript.lua:1112 in (method) PushEvent (Lua) <1099-1126>
scripts/components/container.lua:281 in (method) GiveItem (Lua) <211-299>
scripts/components/container.lua:632 in (method) OnLoad (Lua) <627-636>
scripts/entityscript.lua:1695 in (method) SetPersistData (Lua) <1682-1703>
scripts/mainfunctions.lua:398 in (global) SpawnSaveRecord (Lua) <363-405>
scripts/gamelogic.lua:592 in (upvalue) PopulateWorld (Lua) <349-628>
scripts/gamelogic.lua:852 in (upvalue) DoInitGame (Lua) <727-931>
scripts/gamelogic.lua:965 in (local) cb (Lua) <959-966>
scripts/shardindex.lua:209 in (upvalue) OnLoadSaveDataFile (Lua) <191-210>
scripts/shardindex.lua:214 in () ? (Lua) <213-215>
=[C]:-1 in (method) GetPersistentString (C) <-1--1>
小鸭momo  [作者] 2021 年 6 月 26 日 上午 5:34 
@琪莎猫 没研究过单机,理论上不一样的
Tony  [作者] 2021 年 6 月 26 日 上午 5:34 
@琪莎猫 不太一样
琪莎猫 2021 年 6 月 26 日 上午 3:18 
看了一下,虽然不懂mod制作,不过是不是和单机版以前的人物和物品皮肤mod原理差不多|ू・ω・` )
Flipped 2021 年 6 月 20 日 下午 7:18 
等大佬出皮肤
喜欢闻欧巴的胖次 2021 年 6 月 20 日 上午 12:09 
包含了皮肤组件和一套玻璃工具.可以看该模组下的\scripts\prefabs查看添加的物品,昨晚秋一忙的很晚才做出来的,感谢感谢