Skip to content

Require and Path #27

@terminator-ger

Description

@terminator-ger

I have an existing mod from a github repo (https://github.com/jotakami/warroom) which i would like to edit.
I placed a copy of the repo in c:/users//Tabletop Simulator/warroom-tts.
The Global.-1.lua from my custom savefile only contains the lines:

--[[ Lua code. See documentation: https://api.tabletopsimulator.com/ --]]
require("warroom-tts/global")

--[[ The onLoad event is called after the game save finishes loading. --]]
function onLoad()
    --[[ print('onLoad!') --]]
end

--[[ The onUpdate event is called once per frame. --]]
function onUpdate()
    --[[ print('onUpdate loop!') --]]
end

in order to embed the games global file.
Upon using Save and Play i get the errors
Error in Script (Global): libfunc_require:(12,1-44): module 'warroom-tts/global' not found
Failed to bundle resolved module warroom-tts/global

Is the problem here a misunderstanding of tts concepts or is my setup not compatible with the way the vscode extension is supposed to work? (Looking at #11 it seems a bit fiddly)
I also tried absolute paths. Interestingly the TTS Includes section in VSCode lists all the game files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions