kilroy23 Posted January 22, 2014 Share Posted January 22, 2014 Alright, so I figure I will start of with HI! I am the new guy on the block. I would have brought you a fruit basket or something but those pesky zombies ate the fruit... and the basket Then they ate lead from my shotgun :cool: I would also like to apologize in advance if there is already a thread on this topic, I did have a look for one but I came up with nothing. Now, down to business. I am attempting to write LUA mods/addons for PZ. so far I have just followed these two tutorials on how to do this:http://pz-mods.net/guide/your-first-pz-lua-script/http://pz-mods.net/guide/robomats-mod-tutorials/#toc4 (only the I Love turtles script so far) I have experience programming in C++, VB, and Python. I am fairly confident in my ability to program but for the life on me I cannot figure out how to get the scripts I have written to run in game. I am simply looking for suggestions for the mistake(s) I am making and or what it is I am messing up. Thank you in advance for your help for the convience of all I have attached the two LUA Files I wrote as .txt files hastalavista.txtIliketurtles.txt Link to comment Share on other sites More sharing options...
ExcentriCreation Posted January 22, 2014 Share Posted January 22, 2014 (edited) I'm assuming you just want to test your .lua files? Its been a while since I've done that myself but I think they should load if you put them in "....\Steam\SteamApps\common\ProjectZomboid\media\lua" Just make a new folder there so you can remove them again easily.... "....\Users\....\Zomboid\Lua" MIGHT work, but like I said I havent had to do this since before the Modloader If those dont work, you will have to set up your Mods filesystem.... I explained to someone else how it works here EDITYou should see your .lua file load in the console window if you run PZ in compatibility mode EDIT 2OnPlayerUpdate doesn't carry a key value..... Just use a:if isKeyDown(keyvalue) then inside the method Edited January 22, 2014 by ExcentriCreation kilroy23 1 Link to comment Share on other sites More sharing options...
RoboMat Posted January 22, 2014 Share Posted January 22, 2014 Users/Zomboid/Lua is just where the files created and being read via lua are placed. It won't help moving your files there As EC said either place them directly in the game files or create a "dummy"-mod so to speak (I have one of these to test random stuff). I suggest you read through this part of my tutorial: http://theindiestone.com/forums/index.php/topic/61-robomats-modding-tutorials-updated-12112013/#III (the one on pz-mods is a bit outdated unfortunately ) ExcentriCreation and kilroy23 2 Link to comment Share on other sites More sharing options...
ExcentriCreation Posted January 22, 2014 Share Posted January 22, 2014 Users/Zomboid/Lua is just where the files created and being read via lua are placed. It won't help moving your files there As EC said either place them directly in the game files or create a "dummy"-mod so to speak (I have one of these to test random stuff). Cool.... Since I'm only working on NecroForge atm, I usually just test in there Link to comment Share on other sites More sharing options...
RoboMat Posted January 22, 2014 Share Posted January 22, 2014 That works too... I just tend to eff up the rest of the mod when I do that Link to comment Share on other sites More sharing options...
kilroy23 Posted January 22, 2014 Author Share Posted January 22, 2014 Thank you both of you for your help. I was able to figure out exavlty what is was I had done wrong. I was putting the LUA files in C:\Users\Me\Zomboid\Lua when really they needed to be going into C:\Program Files (x86)\Steam\SteamApps\common\ProjectZomboid\media\lua as ExcentriCreation had suggested. They both work like a charm, and now that I have an idea of what it is I am doing I can start planning and writing my own addons I am all the excited! Link to comment Share on other sites More sharing options...
turbotutone Posted January 29, 2014 Share Posted January 29, 2014 A little addition...You may know so already, but you can also test lua files with the lua binary: http://www.lua.org/download.html Obviously this doesnt work for PZ lua stuff, so if your code is heavily dependant on that dont bother. However i use it allot to test small classes/functions (sometimes adding dummies for PZ lua references) or just to test conceptual things. (its faster then booting the game huh ) 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