Nils Posted March 21, 2014 Share Posted March 21, 2014 I've been dabbling with modding PZ but am having issues getting my newly created items to spawn on the player. A bit of background: I used RJ's guide on how to set up the modloader. This seems to work fine. It shows up, turns on, that's all great. I then used RM's tutorial on using lua to create a "cheatmod" to spawn my newly created items. All I did was copy and paste his code and change the items given. This is where I seem to run into issues. I've tried placing my .lua script in both my mod/media/lua folder as well as zomboid/lua folder but either way when I load up the game and press P I don't get any items. I've loaded the script with both custom items and default items, neither of which appear so I don't think it's an item creation problem. Also, I don't get key presses showing up in the console window which is what makes me think the script isn't running at all. Any help would be appreciated. Link to comment Share on other sites More sharing options...
syfy Posted March 21, 2014 Share Posted March 21, 2014 which version of the game are you currently playing? which build? Link to comment Share on other sites More sharing options...
Nils Posted March 21, 2014 Author Share Posted March 21, 2014 I'm running build 25. Messing around some more, I looked at the console log and saw it's only loading scripts from the Steam/blahblah/Project Zomboid directory instead of the Users/Me/Zomboid directory. I put the script in the Steam folder and now it runs and my items get added. I guess my question is how to include a lua script with my mod without having to add it to the main folder? I saw lemmy's post about directory changes with lua scripts but I don't think that applies. Edit: modified title to reflect real issue Link to comment Share on other sites More sharing options...
Nils Posted March 22, 2014 Author Share Posted March 22, 2014 Looks like my problem was that you can't just dump the lua file in the lua folder. It still has to reflect the directory structure from the main folder. So putting the script in: Users/Me/Zomboid/mods/mymod/media/lua/ does not work But putting it in: Users/Me/Zomboid/mods/mymod/media/lua/client/ does work Link to comment Share on other sites More sharing options...
EnigmaGrey Posted March 22, 2014 Share Posted March 22, 2014 Welcome to the crazy world of Sudden-Multiplayer, Nils. Link to comment Share on other sites More sharing options...
Nils Posted March 22, 2014 Author Share Posted March 22, 2014 Sudden-Multiplayer is what got me here so I can't really complain. Also, still infinitely easier to mod than most games. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now