Jump to content

Recommended Posts

So the mod I wrote works on its own. The character I added works fine, and the item I added works fine. The issues comes from when sombody is on another person's server with the mod and they get the item. This sounded like a problem with the onequip action of the item's file. so i changed that around to be as basic as it could be and still no change. Anyway...

 

here is the crash log

[00:00:00]: Starting Up
[00:00:00]: Version: 144673
[00:00:00]: Current time: Sat Jul 25 14:33:53 2015
 
[00:00:00]: Don't Starve Together: 144673 WIN32_STEAM
NNN Build Date: 2015-07-24_16-04-45
[00:00:00]: Parsing command line
[00:00:00]: Command Line Arguments: 
[00:00:00]: Initializin Minidump handler
[00:00:00]: ....Done
[00:00:00]: Initializing Steam
[00:00:00]: Steam AppBuildID: 707839
[00:00:00]: Steam BetaName(Branch): []
[00:00:00]: ....Done
[00:00:00]: Fixing DPI
[00:00:00]: ...Done
[00:00:00]: THREAD - started 'GAClient' (8640)
[00:00:00]: HttpClient::ClientThread::Main()
[00:00:08]: ProfileIndex:7.44
[00:00:08]: THREAD - started 'GAClient' (7840)
[00:00:08]: Network tick rate: U=15(2), D=0
[00:00:08]: THREAD - started 'GAClient' (4400)
[00:00:08]: HttpClient::ClientThread::Main()
[00:00:08]: HttpClient::ClientThread::Main()
[00:00:08]: Network tick rate: U=15(2), D=0
[00:00:08]: Authorized application C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together Beta\bin\dontstarve_steam.exe is enabled in the firewall.
[00:00:08]: WindowsFirewall - Application already authorized
[00:00:08]: loaded ping_cache
[00:00:08]: OnLoadPermissionList: APP:Klei/DoNotStarveTogether/save/blocklist.txt (Failure)
[00:00:08]: OnLoadPermissionList: APP:Klei/DoNotStarveTogether/save/adminlist.txt (Failure)
[00:00:08]: OnLoadUserIdList: APP:Klei/DoNotStarveTogether/save/whitelist.txt (Failure)
[00:00:08]: Offline user name: OU_76561198082975843
[00:00:08]: SteamID: 76561198082975843
[00:00:08]: THREAD - started 'GAClient' (3696)
[00:00:08]: HttpClient::ClientThread::Main()
[00:00:08]: cGame::InitializeOnMainThread
[00:00:08]: THREAD - started 'GAClient' (3000)
[00:00:08]: WindowManager::Initialize
[00:00:08]: HttpClient::ClientThread::Main()
[00:00:08]: CreateWindow: Requesting 1362,705 - 5/6/5 - -1/-1/-1 - 0
[00:00:08]: CreateEGLContext: 16 configs found
[00:00:08]:      0: 8/8/8 -  0/ 0/ 0 - 0
[00:00:08]:      1: 8/8/8 -  0/16/ 0 - 0
[00:00:08]:      2: 8/8/8 -  0/24/ 0 - 0
[00:00:08]:      3: 8/8/8 -  0/24/ 8 - 0
[00:00:08]:      4: 5/5/5 -  0/ 0/ 0 - 0
[00:00:08]:      5: 5/5/5 -  1/ 0/ 0 - 0
[00:00:08]:      6: 5/5/5 -  0/16/ 0 - 0
[00:00:08]:      7: 5/5/5 -  1/16/ 0 - 0
[00:00:08]:      8: 5/5/5 -  0/24/ 0 - 0
[00:00:08]:      9: 5/5/5 -  1/24/ 0 - 0
[00:00:08]:     10: 5/5/5 -  0/24/ 8 - 0
[00:00:08]:     11: 5/5/5 -  1/24/ 8 - 0
[00:00:08]:     12: 8/8/8 -  8/ 0/ 0 - 0
[00:00:08]:     13: 8/8/8 -  8/16/ 0 - 0
[00:00:08]:     14: 8/8/8 -  8/24/ 0 - 0
[00:00:08]:     15: 8/8/8 -  8/24/ 8 - 0
[00:00:08]: RestoreWindowPosition
[00:00:08]:    Saved Client Pos (0 x 23)
[00:00:08]:    Adjusted Window Pos (-8 x -8)
[00:00:08]: EnsureWindowOnScreen
[00:00:08]:    All good.
[00:00:08]: GLInfo
[00:00:08]: ~~~~~~
[00:00:08]: THREAD - started 'WindowsInputManager' (3824)
[00:00:08]: GL_VENDOR: Google Inc.
[00:00:08]: GL_RENDERER: ANGLE (Intel® HD Graphics Family)
[00:00:08]: GL_VERSION: OpenGL ES 2.0 (ANGLE 1.0.0.2249)
[00:00:08]: GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 1.00 (ANGLE 1.0.0.2249)
[00:00:08]: OpenGL extensions (19, 19):
[00:00:08]: GL_ANGLE_depth_texture
[00:00:08]: GL_ANGLE_framebuffer_blit
[00:00:08]: GL_ANGLE_framebuffer_multisample
[00:00:08]: GL_ANGLE_instanced_arrays
[00:00:08]: GL_ANGLE_pack_reverse_row_order
[00:00:08]: GL_ANGLE_texture_compression_dxt3
[00:00:08]: GL_ANGLE_texture_compression_dxt5
[00:00:08]: GL_ANGLE_texture_usage
[00:00:08]: GL_ANGLE_translated_shader_source
[00:00:08]: GL_EXT_read_format_bgra
[00:00:08]: GL_EXT_robustness
[00:00:08]: GL_EXT_texture_compression_dxt1
[00:00:08]: GL_EXT_texture_format_BGRA8888
[00:00:08]: GL_EXT_texture_storage
[00:00:08]: GL_OES_get_program_binary
[00:00:08]: GL_OES_packed_depth_stencil
[00:00:08]: GL_OES_rgb8_rgba8
[00:00:08]: GL_OES_standard_derivatives
[00:00:08]: GL_OES_texture_npot
[00:00:08]: GL_MAX_TEXTURE_SIZE = 8192
[00:00:08]: GL_MAX_TEXTURE_IMAGE_UNITS = 16
[00:00:08]: GL_MAX_RENDERBUFFER_SIZE = 8192
[00:00:08]: GL_MAX_VIEWPORT_DIMS = 8192, 8192
[00:00:08]: GL_MAX_VARYING_VECTORS = 10
[00:00:08]: GL_MAX_VERTEX_ATTRIBS = 16
[00:00:08]: GL_MAX_VERTEX_UNIFORM_VECTORS = 254
[00:00:08]: GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 4
[00:00:08]: GL_MAX_FRAGMENT_UNIFORM_VECTORS = 221
[00:00:08]: 4 compressed texture formats
[00:00:08]: texture format 0x83f0
[00:00:08]: texture format 0x83f1
[00:00:08]: texture format 0x83f2
[00:00:08]: texture format 0x83f3
[00:00:09]: Renderer initialize: Okay
[00:00:09]: AnimManager initialize: Okay
[00:00:09]: Buffers initialize: Okay
[00:00:09]: cDontStarveGame::DoGameSpecificInitialize()
[00:00:09]: GameSpecific initialize: Okay
[00:00:09]: cGame::StartPlaying
[00:00:09]: LOADING LUA
[00:00:09]: DoLuaFile scripts/main.lua
[00:00:09]: DoLuaFile loading buffer scripts/main.lua
[00:00:10]: scripts/main.lua(169,1) running main.lua
 
[00:00:10]: loaded modindex
[00:00:10]: ModIndex: Beginning normal load sequence.
 
[00:00:10]: WARNING: icon paths for mod My Dev (Mark Wilson) are not valid. Got icon_atlas="modicon.xml" and icon="modicon.tex".
Please ensure that these point to valid files in your mod folder, or else comment out those lines from your modinfo.lua.
[00:00:11]: LOADING LUA SUCCESS
[00:00:11]: PlayerDeaths loaded morgue 3870
[00:00:11]: PlayerHistory could not load player_history
[00:00:11]: loaded profile
[00:00:11]: bloom_enabled false
[00:00:11]: loaded saveindex
[00:00:11]: OnFilesLoaded()
[00:00:11]: OnUpdatePurchaseStateComplete
[00:00:12]: Load FE
[00:00:12]: Load FE: done
[00:00:12]: SimLuaProxy::QueryServer()
[00:00:12]: SimLuaProxy::QueryServer()
[00:00:12]: ModIndex: Load sequence finished successfully.
[00:00:12]: Reset() returning
[00:00:13]: [200] Account Communication Success (6)
[00:00:13]: [ACCOUNT_ACTION_TOKEN_PURPOSE] Received UserId from TokenPurpose: KU_7PKjHkA3
[00:00:13]: [steam] Auth Session Ticket requested...
[00:00:13]: [steam] Got Auth Session Ticket
[00:00:14]: SimLuaProxy::QueryServer()
[00:00:14]: SimLuaProxy::QueryServer()
[00:00:16]: QueryStats: { "req":"modrank", "field":"Session.Loads.Mods.list", "fieldop":"unwind", "linkpref":"external", "limit": 20}
[00:03:02]: QueryStats: { "req":"modrank", "field":"Session.Loads.Mods.list", "fieldop":"unwind", "linkpref":"external", "limit": 20}
[00:06:19]: OnSteamLobbyJoinRequested( 109775242220367486 )
[00:06:19]: DownloadAndJoinSteamServer: 109775242220367486
[00:06:19]: Friends are currently playing in 1 room(s)!
[00:06:19]: You belong to 0 clan(s)!
[00:06:31]: Attempting to join: TEST at 98.223.235.119:10999
[00:06:31]: [200] Account Communication Success (13)
[00:06:31]: Joining Steam Room : 109775242220367486
[00:06:31]: void cSteamPunchthrough::MessageResult( RakNet::Console_JoinRoom * message )
[00:06:31]: MemberJoinedRoom: Member named Woah and ID 76561198041732846 joined room with ID 109775242220367486
[00:06:31]: Connecting using Steam Punchthrough address
[00:06:31]: Steam tell us to connect to 53.234.153.96:1 
[00:06:31]: Connection attempts done. Result: 0
[00:06:35]: Connection request accepted to 53.234.153.96|1 with GUID 1031324454903128515
[00:06:35]: Network external address discovered: 196.161.172.166|1
[00:06:35]: SendClientHandShakePacket: re^eyJVc2VySUQiOiJLVV83UEtqSGtBMyIsIkdhbWUiOiJEb250U3RhcnZlVG9nZXRoZXIiLCJQdXJwb3NlIjoiR2FtZVNlc3Npb24ifQ==^AGBMYNaz4HeC8JxbU7XPc1hb6q4mA14A to 1031324454903128515
[00:06:36]: DeserializeHandShakeServerListing
[00:06:36]: Network tick rate: U=10(3), D=15
[00:06:36]: Version: 144673
[00:06:36]: Begin Session: 08900020A32F7E1A
[00:06:36]: Done Downloading Client Object Data
[00:06:36]: DownloadMods and temp disable
[00:06:36]: Does My Dev v:1.04 exist? true
[00:06:36]: We now have the required mods, enable them for server
[00:06:36]: Temp Enabling My Dev
[00:06:36]: ModIndex:SetTempModConfigData
[00:06:36]: Setting temp mod config for mod My Dev
[00:06:36]: Mods are setup for server, save the mod index and proceed.
[00:06:36]: 
[00:06:36]: Downloading [0] From: server_temp
[00:06:36]: 0 (54%) 1/1 server_temp\server_save 114000b / 207299b
[00:06:36]: 0 (100%) 1/1 server_temp\server_save 207299b / 207299b
[00:06:36]: Download complete[0] Files: 1 Size: 207299
[00:06:38]: Collecting garbage...
[00:06:38]: lua_gc took 0.01 seconds
[00:06:38]: ~NetworkLuaProxy()
[00:06:38]: ~SimLuaProxy()
[00:06:38]: SteamWorkshop::CancelDownloads clearing all unfinished downloads
[00:06:38]: lua_close took 0.03 seconds
[00:06:38]: ReleaseAll
[00:06:38]: ReleaseAll Finished
[00:06:38]: cGame::StartPlaying
[00:06:39]: LOADING LUA
[00:06:39]: DoLuaFile scripts/main.lua
[00:06:39]: DoLuaFile loading buffer scripts/main.lua
[00:06:39]: scripts/main.lua(169,1) running main.lua
 
[00:06:39]: loaded modindex
[00:06:39]: ModIndex: Beginning normal load sequence.
 
[00:06:39]: WARNING: icon paths for mod My Dev (Mark Wilson) are not valid. Got icon_atlas="modicon.xml" and icon="modicon.tex".
Please ensure that these point to valid files in your mod folder, or else comment out those lines from your modinfo.lua.
[00:06:39]: ModIndex:GetModsToLoad inserting moddir, My Dev
[00:06:39]: Could not load mod_config_data/modconfiguration_My Dev_CLIENT
[00:06:39]: Loading mod: My Dev (Mark Wilson) Version:1.04
[00:06:39]: Mod: My Dev (Mark Wilson) Loading modworldgenmain.lua
[00:06:39]: Mod: My Dev (Mark Wilson)  Mod had no modworldgenmain.lua. Skipping.
[00:06:39]: Mod: My Dev (Mark Wilson) Loading modmain.lua
[00:06:39]: LOADING LUA SUCCESS
[00:06:39]: PlayerDeaths loaded morgue 3870
[00:06:39]: PlayerHistory could not load player_history
[00:06:39]: loaded profile
[00:06:39]: bloom_enabled false
[00:06:39]: loaded saveindex
[00:06:39]: OnFilesLoaded()
[00:06:39]: OnUpdatePurchaseStateComplete
[00:06:39]: Unload FE
[00:06:39]: Unload FE done
[00:06:40]: Mod: My Dev (Mark Wilson) Registering prefabs
[00:06:40]: Mod: My Dev (Mark Wilson)  Registering prefab file: prefabs/mwilson
[00:06:40]: Mod: My Dev (Mark Wilson)    mwilson
[00:06:40]: Mod: My Dev (Mark Wilson)  Registering prefab file: prefabs/twoclaps
[00:06:40]: Mod: My Dev (Mark Wilson)    twoclaps
[00:06:40]: Mod: My Dev (Mark Wilson)  Registering default mod prefab
[00:06:40]: LOAD BE
[00:06:43]: LOAD BE: done
[00:06:43]: Deserialize world session from client_temp/server_save
[00:06:43]: Save file is at version 1
[00:06:43]: MiniMapComponent::AddAtlas( minimap/minimap_data.xml )
[00:06:43]: MiniMapComponent::AddAtlas( ../mods/My Dev/images/map_icons/mwilson.xml )
[00:06:44]: Loading Nav Grid
[00:06:44]: setting summerlength 15
[00:06:44]: setting elapseddaysinseason 0
[00:06:44]: setting isfullmoon false
[00:06:44]: setting moisture 2.5583391189575
[00:06:44]: setting springlength 20
[00:06:44]: setting moonphase quarter
[00:06:44]: setting precipitationrate 0
[00:06:44]: setting iswet false
[00:06:44]: setting winterlength 15
[00:06:44]: setting iswinter false
[00:06:44]: setting issummer false
[00:06:44]: setting moistureceil 815.48876953125
[00:06:44]: setting isday true
[00:06:44]: setting wetness 0
[00:06:44]: setting isnight false
[00:06:44]: setting isdusk false
[00:06:44]: setting isspring false
[00:06:44]: setting isautumn true
[00:06:44]: setting issnowing false
[00:06:44]: setting snowlevel 0
[00:06:44]: setting issnowcovered false
[00:06:44]: setting autumnlength 20
[00:06:44]: setting phase day
[00:06:44]: setting timeinphase 0.042647997538249
[00:06:44]: setting precipitation none
[00:06:44]: setting cycles 0
[00:06:44]: setting time 0.021323998769124
[00:06:44]: setting remainingdaysinseason 20
[00:06:44]: setting israining false
[00:06:44]: setting season autumn
[00:06:44]: setting pop 0.0031371849797859
[00:06:44]: setting temperature 33.14339192079
[00:06:44]: Reconstructing topology
[00:06:44]: ...Sorting points
[00:06:44]: ...Sorting edges
[00:06:44]: ...Connecting nodes
[00:06:44]: ...Validating connections
[00:06:44]: ...Housekeeping
[00:06:44]: ...Done!
[00:06:44]: ModIndex: Load sequence finished successfully.
[00:06:44]: Reset() returning
[00:06:45]: Attempting to send resume request
[00:06:45]: ReceiveResumeNotification
[00:06:45]: Deleting user session from session/08900020A32F7E1A/KU_7PKjHkA3_/0000000001
[00:06:53]: Movement prediction enabled
[00:06:53]: Loading minimap from session/08900020A32F7E1A/KU_7PKjHkA3_/minimap
[00:06:53]: Clearing minimap
[00:07:29]: NO INVENTORY ITEM COMPONENTtwoclaps 101266 - twoclaps
[00:07:29]: [string "scripts/widgets/itemtile.lua"]:178: attempt to index field 'wetness' (a nil value)
LUA ERROR stack traceback:
scripts/widgets/itemtile.lua:178 in (method) Refresh (Lua) <142-181>
   self =
      shown = true
      inst = 101268 -  (valid:true)
      focus = false
      children = table: 2389F1A0
      ispreviewing = false
      focus_target = false
      isactivetile = false
      can_fade_alpha = true
      focus_flow_args = table: 2389F650
      parent = ItemSlot
      name = ItemTile
      callbacks = table: 2389F358
      focus_flow = table: 2389F628
      enabled = true
      ismoving = false
      item = 101266 - twoclaps (valid:true)
scripts/widgets/inventorybar.lua:877 in (method) Refresh (Lua) <862-913>
   self =
      hudcompass = Hud Compass
      shown = true
      actionstringtitle = Text - 
      repeat_time = 0
      bg = Image - images/hud.xml:inventory_bg.tex
      enabled = true
      in_pos = (0.00, 102.00, 0.00)
      actionstringtime = -0.0047281235456467
      root = root
      bgcover = Image - images/hud.xml:inventory_bg_cover.tex
      inv = table: 33B51D60
      name = Inventory
      focus_flow = table: 214920D0
      toprow = toprow
      out_pos = (0.00, 68.00, 0.00)
      autoanchor = WorldResetTimer
      callbacks = table: 2148E750
      inst = 100493 -  (valid:true)
      focus = false
      equip = table: 33B51BF8
      reps = 0
      children = table: 2148E778
      current_list = table: 33B51D60
      focus_flow_args = table: 21491D88
      focus_target = false
      openhint = Text - 
      selected_scale = 0.8
      bottomrow = toprow
      owner = 100397 - mwilson (valid:true)
      actionstring = actionstring
      can_fade_alpha = true
      parent = bottom_scale_root
      equipslotinfo = table: 0B6CF218
      base_scale = 0.6
      active_slot = ItemSlot
      backpackinv = table: 33B51C70
      hint_update_check = 1.3166511300951
      rebuild_pending = false
      actionstringbody = Text - 
   inventory = table: 33B4CD10
   items = table: 2389FD30
   equips = table: 2389FD58
   activeitem = nil
   i = 1
   v = ItemSlot
   item = 101266 - twoclaps (valid:true)
scripts/widgets/inventorybar.lua:84 in (local) fn (Lua) <84-84>
scripts/entityscript.lua:938 in (method) PushEvent (Lua) <932-955>
   self (valid:true) =
      DynamicShadow = DynamicShadow (337ECE10)
      inlimbo = false
      GetMoistureRateScale = function - scripts/prefabs/player_common.lua:86
      ghostenabled = true
      EnableMovementPrediction = function - scripts/prefabs/player_common.lua:396
      player_classified = 100390 - player_classified (valid:true)
      playercolour = table: 0BDC7F00
      IsOverheating = function - scripts/prefabs/player_common.lua:56
      Light = Light (337E4150)
      Network = Network (337ECC90)
      OnRemoveEntity = function - scripts/prefabs/player_common.lua:519
      GetMoisture = function - scripts/prefabs/player_common.lua:66
      pendingtasks = table: 0BDC79B0
      LightWatcher = LightWatcher (337ECD70)
      sg = sg="wilson_client", state="idle", time=0.73, tags = "idle,"
      spawntime = 7.7000004015863
      SetGhostMode = function - scripts/prefabs/player_common.lua:435
      HUD = HUD
      Transform = Transform (337ECD30)
      replica = table: 0BDD6FC8
      inherentactions = table: 33B4D580
      actionreplica = table: 0BDC7898
      event_listening = table: 0BDC7640
      GUID = 100397
      actioncomponents = table: 33B4D648
      ondetachclassified = function - scripts/prefabs/player_common.lua:510
      lower_components_shadow = table: 0BDD6ED8
      GetMaxMoisture = function - scripts/prefabs/player_common.lua:76
      userid = KU_7PKjHkA3
      entity = Entity (368243F0)
      name = Cjstas
      prefab = mwilson
      updatecomponents = table: 2347CDB0
      AttachClassified = function - scripts/prefabs/player_common.lua:508
      IsActionsVisible = function - scripts/prefabs/player_common.lua:1050
      persists = true
      MiniMapEntity = MiniMapEntity (337ED070)
      SoundEmitter = SoundEmitter (337ECCD0)
      ShakeCamera = f
[00:07:29]: [string "scripts/widgets/itemtile.lua"]:178: attempt to index field 'wetness' (a nil value)
LUA ERROR stack traceback:
    scripts/widgets/itemtile.lua:178 in (method) Refresh (Lua) <142-181>
    scripts/widgets/inventorybar.lua:877 in (method) Refresh (Lua) <862-913>
    scripts/widgets/inventorybar.lua:84 in (local) fn (Lua) <84-84>
    scripts/entityscript.lua:938 in (method) PushEvent (Lua) <932-955>
    scripts/prefabs/inventory_classified.lua:221 in (field) fn (Lua) <213-223>
    scripts/scheduler.lua:187 in (method) OnTick (Lua) <161-217>
    scripts/scheduler.lua:398 in (global) RunScheduler (Lua) <396-404>
    scripts/update.lua:162 in () ? (Lua) <146-219>
 
[00:07:29]: SCRIPT ERROR! Showing error screen
[00:08:29]: Force aborting...
 

 

It says that the problem comes from it trying to index the wetness field (I would assume of the item). I have no idea what i need to change to fix this... so...

 

here is the modmain file

GLOBAL.STRINGS.NAMES.TWOCLAPS = "Magic Hands"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.TWOCLAPS = "Magic Hands"
 
PrefabFiles = {
"mwilson",
"twoclaps"
}
 
Assets = {
    Asset( "IMAGE", "images/saveslot_portraits/mwilson.tex" ),
    Asset( "ATLAS", "images/saveslot_portraits/mwilson.xml" ),
 
    Asset( "IMAGE", "images/selectscreen_portraits/mwilson.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/mwilson.xml" ),
 
    Asset( "IMAGE", "images/selectscreen_portraits/mwilson_silho.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/mwilson_silho.xml" ),
 
    Asset( "IMAGE", "bigportraits/mwilson.tex" ),
    Asset( "ATLAS", "bigportraits/mwilson.xml" ),
 
Asset( "IMAGE", "images/map_icons/mwilson.tex" ),
Asset( "ATLAS", "images/map_icons/mwilson.xml" ),
 
Asset( "IMAGE", "images/avatars/avatar_mwilson.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_mwilson.xml" ),
 
Asset( "IMAGE", "images/avatars/avatar_ghost_mwilson.tex" ),
    Asset( "ATLAS", "images/avatars/avatar_ghost_mwilson.xml" ),
 
}
 
local require = GLOBAL.require
local STRINGS = GLOBAL.STRINGS
 
-- The character select screen lines
STRINGS.CHARACTER_TITLES.mwilson = "Mark Wilson"
STRINGS.CHARACTER_NAMES.mwilson = "Mark"
STRINGS.CHARACTER_DESCRIPTIONS.mwilson = "*Science Master\n*No Shave November"
STRINGS.CHARACTER_QUOTES.mwilson = "\"This Isn't What I ordered\""
 
-- Custom speech strings
STRINGS.CHARACTERS.MWILSON = require "speech_mwilson"
 
-- The character's name as appears in-game 
STRINGS.NAMES.MWILSON = "Mark"
 
-- The default responses of examining the character
STRINGS.CHARACTERS.GENERIC.DESCRIBE.MWILSON = 
{
GENERIC = "It's Mark!",
ATTACKER = "That Guy looks shifty...",
MURDERER = "Murderer!",
REVIVER = "Mark, friend of ghosts.",
GHOST = "Mark could use a heart.",
}
 
 
AddMinimapAtlas("images/map_icons/mwilson.xml")
 
-- Add mod character to mod character list. Also specify a gender. Possible genders are MALE, FEMALE, ROBOT, NEUTRAL, and PLURAL.
AddModCharacter("mwilson", "MALE")
 

 

Pretty sure everything should be correct there.

 

Here is the item file...

local assets=
{
    Asset("ANIM", "anim/twoclaps.zip"),
    Asset("ANIM", "anim/swap_twoclaps.zip"),
 
    Asset("ATLAS", "images/inventoryimages/twoclaps.xml"),
    Asset("IMAGE", "images/inventoryimages/twoclaps.tex"),
}
prefabs = {
"groundpound_fx",
"groundpoundring_fx",
}
 
local function OnUse(inst, data)
local ring = SpawnPrefab("groundpoundring_fx")
local pound = SpawnPrefab("groundpound_fx")
pound.Transform:SetPosition(inst.Transform:GetWorldPosition())
ring.Transform:SetPosition(inst.Transform:GetWorldPosition())
end
 
    local function OnEquip(inst, owner)
        owner.AnimState:OverrideSymbol("swap_object", "swap_twoclaps", "swap_twoclaps")
        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 function fn()
 
    local inst = CreateEntity()
 
    if not TheWorld.ismastersim then
        return inst
    end
 
    local trans = inst.entity:AddTransform()
    local anim = inst.entity:AddAnimState()
    local sound = inst.entity:AddSoundEmitter()
    MakeInventoryPhysics(inst)
     
    anim:SetBank("twoclaps")
    anim:SetBuild("twoclaps")
    anim:PlayAnimation("idle")
 
inst.entity:SetPristine()
 
    inst:AddComponent("inspectable")
 
    inst:AddComponent("weapon")
    inst.components.weapon:SetDamage(40)
    inst.components.weapon:SetRange(8, 8)
inst.components.weapon:SetOnAttack(OnUse)
 
inst:AddComponent("inventoryitem")
    inst.components.inventoryitem.imagename = "twoclaps"
    inst.components.inventoryitem.atlasname = "images/inventoryimages/twoclaps.xml"
     
    inst:AddComponent("equippable")
    inst.components.equippable:SetOnEquip( OnEquip )
    inst.components.equippable:SetOnUnequip( OnUnequip )
 
inst.components.weapon:SetProjectile("bishop_charge")
inst.entity:AddNetwork()
 
MakeHauntableLaunch(inst)
    return inst
end
return  Prefab("common/inventory/twoclaps", fn, assets, prefabs)

 

Not sure what the problem is with it (if anything)...

 

Testing this problem has been difficult because you physically need two+ people to get the errors so I don't know much other than what I previously explained. 

 

I am going to attach a zipped version of the mod in case you need to look at the character's file or info or something...

 

Help would be great. Thanks.

My Dev.zip

In the item file, this line:

inst.entity:AddNetwork()

and those few:

local trans = inst.entity:AddTransform()local anim = inst.entity:AddAnimState()local sound = inst.entity:AddSoundEmitter()MakeInventoryPhysics(inst) 

should be placed before

if not TheWorld.ismastersim then    return instend

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...