zhnkc9 / skin-generator

饥荒皮肤生成器
Apache License 2.0
46 stars 17 forks source link

mod冲突。这个大概是哪里的问题?报错代码如下 #4

Open junglejdx opened 10 months ago

junglejdx commented 10 months ago

LUA ERROR stack traceback: ../mods/workshop-3140042632/skinloader/skinloader.lua:353 in () ? (Lua) <351-358> name = livinglog skin = 1 arg = nil ent = 120272 - livinglog (valid:true) =(tail call):-1 in () (tail) <-1--1> ../mods/workshop-1909182187/scripts/medal_globalfn.lua:366 in (global) DropBundle (Lua) <311-391> target = 120263 - medal_naughty_krampus (valid:true) player = 119553 - wathgrithr (valid:true) pos = nil bundleitems = table: 0000000069952FC0 destiny_num = 0.24819667499855 gift_count = 1 i = 1 ../mods/workshop-1909182187/scripts/medal_globalfn.lua:397 in (global) DropLossBundle (Lua) <394-399> target = 120263 - medal_naughty_krampus (valid:true) player = 119553 - wathgrithr (valid:true) num = nil spawnNum = 1 i = 1 ../mods/workshop-1909182187/scripts/medal_defs/functional_medal_defs.lua:1477 in (field) justiceKilled (Lua) <1441-1579> self (valid:true) = _PostActivateHandshakeState_Client = 0 GetMoistureRateScale = function - scripts/prefabs/player_common.lua:254 SetCameraDistance = function - scripts/prefabs/player_common.lua:1478 CanSeePointOnMiniMap = function - scripts/prefabs/player_common_extensions.lua:812 skeleton_prefab = skeleton_player EnableBoatCamera = function - scripts/prefabs/player_common.lua:893 IsOverheating = function - scripts/prefabs/player_common.lua:224 IsActing = function - scripts/prefabs/player_common_extensions.lua:864 Light = Light (0000000042D6B8E0) ShowHUD = function - scripts/prefabs/player_common.lua:1450 ResetMinimapOffset = function - scripts/prefabs/player_common.lua:1462 medal_build_list = net_string (0000000043E23330) ApplyScale = function - scripts/prefabs/player_common.lua:1557 SetGhostMode = function - scripts/prefabs/player_common.lua:902 ShowActions = function - scripts/prefabs/player_common.lua:1444 SetGymStartState = function - scripts/prefabs/player_common.lua:55 Transform = Transform (0000000042D6B310) actionreplica = table: 00000000339385C0 event_listening = table: 00000000339383E0 actioncomponents = table: 0000000033937DF0 medal_fixtag = table: 0000000043E22430 SwapAllCharacteristics = function - scripts/prefabs/player_common.lua:2043 bufferedaction = 攻击 120263 - medal_naughty_krampus (valid:true) prefab = wathgrithr updatecomponents = table: 000000003393B450 YOTB_issetunlocked = function - scripts/prefabs/player_common.lua:85 ShakeCamera = function - scripts/prefabs/player_common.lua:1498 YOTB_isskinunlocked = function - scripts/prefabs/player_common.lua:92 MiniMapEntity = MiniMapEntity (0000000042D6B7C0) replica = table: 0000000033937C60 OnSleepIn = function - scripts/prefabs/player_common.lua:1280 _underleafcanopy = net_bool (0000000033945270) IsChannelCasting = function - scripts/prefabs/player_common.lua:286 SetCameraZoomed = function - scripts/prefabs/player_common.lua:1484 TargetForceAttackOnly = function - scripts/prefabs/player_common.lua:51 CanSeeTileOnMiniMap = function - scripts/prefabs/player_common_extensions.lua:808 DisableLoadingProtection = function - scripts/prefabs/player_common.lua:1059 Network = Network (0000000042D6BCA0) userid = KU_Chwn OnPreLoad = function - scripts/prefabs/player_common.lua:1180 name = 小鱼 Advertisee = net_entity (0000000043E1CA30) wintertask = PERIODIC 119553: 1.000000 _OnPreLoad = function - scripts/prefabs/wathgrithr.lua:139 ScreenFade = function - scripts/prefabs/player_common.lua:1531 um_all_followers = table: 0000000043E1D430 medalblinkable = net_bool (0000000043E229D0) ChangeToMonkey = function - scripts/prefabs/player_common.lua:2062 _PostActivateHandshakeState_Server = 3 AttachClassified = function - scripts/prefabs/playe

junglejdx commented 10 months ago

local _SpawnPrefab = SpawnPrefab function SpawnPrefab(name, skin, ...) local ent = _SpawnPrefab(name, skin, ...) if ent and skin and skin:start_with_that_prefix() then name = name:gsub("_placer", "") ApplySkin(ent, name, skin) end return ent end

这段代码的作用是什么?删除什么影响吗?

zhnkc9 commented 10 months ago

local _SpawnPrefab = SpawnPrefab function SpawnPrefab(name, skin, ...) local ent = _SpawnPrefab(name, skin, ...) if ent and skin and skin:start_with_that_prefix() then name = name:gsub("_placer", "") ApplySkin(ent, name, skin) end return ent end

这段代码的作用是什么?删除什么影响吗?

spawnprefab是创造物品的核心方法 不能删 skin:start_with_that_prefix() 判断是不是模组加的皮肤 如果是的话就给他用皮肤

你发一下 skinloader353的代码

junglejdx commented 10 months ago

local _SpawnPrefab = SpawnPrefab 函数 SpawnPrefab(name, skin, ...) local ent = _SpawnPrefab(name, skin, ...) if ent and skin and skin:start_with_that_prefix() then name = name:gsub(“_placer”, “”) ApplySkin(ent, name, skin) end return ent end 这段代码的作用是什么?删除什么影响吗?

spawnprefab是创造物品的核心方法 不能删 skin:start_with_that_prefix() 判断是不是模组加的皮肤 如果是的话就给他用皮肤

你发一下 skinloader353的代码

local _SpawnPrefab = SpawnPrefab function SpawnPrefab(name, skin, ...) local ent = _SpawnPrefab(name, skin, ...) if ent and skin and skin:start_with_that_prefix() then name = name:gsub("_placer", "") ApplySkin(ent, name, skin) end return ent end

就是这个 350到358

junglejdx commented 10 months ago

这个崩溃发生在打mod怪,爆了某个物品就会崩溃 如果skin:start_with_that_prefix() 判断是不是模组加的皮肤 如果是的话就给他用皮肤 那应该就是350-358的判定问题 我删除这些代码后 击杀那个怪物就不会崩溃。问题是删除了这段代码我不知道会产生其他的什么bug 有没有更好的办法例如加上一些判定。

zhnkc9 commented 10 months ago

这个崩溃发生在打mod怪,爆了某个物品就会崩溃 如果skin:start_with_that_prefix() 判断是不是模组加的皮肤 如果是的话就给他用皮肤 那应该就是350-358的判定问题 我删除这些代码后 击杀那个怪物就不会崩溃。问题是删除了这段代码我不知道会产生其他的什么bug 有没有更好的办法例如加上一些判定。

if ent and skin and type(skin) == "string" and skin:start_with_that_prefix() then

好像现在要加个string判断才行 , 你这样改试一下

junglejdx commented 10 months ago

这个崩溃发生在打mod怪,爆了某个物品就会崩溃 如果skin:start_with_that_prefix() 判断是不是模组加的皮肤 如果是的话就给他用皮肤 那应该就是350-358的判定问题 我删除这些代码后 击杀那个怪物就不会崩溃。问题是删除了这段代码我不知道会产生其他的什么bug 有没有更好的办法例如加上一些判定。

如果 ent 和 skin 和 type(skin) == “string” 和 skin:start_with_that_prefix() 那么

好像现在要加个string判断才行 , 你这样改试一下

非常感谢问题解决了。

junglejdx commented 10 months ago

之前看别人问题 人物大头像下面的座右铭有办法正确显示吗?虽然那个无关大雅~~~

zhnkc9 commented 10 months ago

之前看别人问题 人物大头像下面的座右铭有办法正确显示吗?虽然那个无关大雅~~~

关于0.3.0版本对应最新版生成没有人物视图不显示 #2