Jump to content

RoboMat

Member
  • Posts

    3439
  • Joined

Everything posted by RoboMat

  1. I'm pretty sure the OS related functions have been deactivated (for good reasons) and since the game doesn't use plain Lua you don't have much choice. Well depending on your OS I guess you could just try to pipe it directly to the clipboard when you run it from your terminal. On OSX you can do it via 'pbcopy' for example.
  2. Just print to console and pipe the output to a text file. IIRC that's how I've always done it.
  3. Like the others said I'm using the LÖVE framework. The beauty about ASCII is that it has this level of abstraction where you can fill in as many details as you want without having to worry about creating a bazzilion graphical representations. Don't starve <3
  4. Haven't posted here in a while. I'm working on a new game inspired by xcom. Very little gameplay to show off as I am still trying to figure out the basic engine stuff.
  5. I don't think removing event hooks is possible ... you could spelunk in the java source and check the EventManager if you want to be sure (it's been quite some time since I've actively written mods so it might have changed in the meantime).
  6. You could use a flag: if updatePlayer then -- doStuffend When you don't want to fire the event simply set updatePlayer to false. It's a bit hacky but it should work.
  7. Hey, do you have a mod.info and all the other stuff needed? Did you activate the mod in the mod manager?
  8. These aren't done via recipes but via Lua scripts. Check the ContextMenu.lua files for examples.
  9. You should be able to find them in the game's source folder (or are they encoded ... can't remember??).
  10. RoboMat

    Smash and Grab Mod

    Cool stuff! I like your code
  11. Try getWorldObjects? Also check this out: http://projectzomboid.com/modding/zombie/iso/IsoGridSquare.html It's a bit outdated, but you should be able to find what you need there.
  12. I don't think so, but I am not 100% sure. You could look through the javadocs. I'd try something like this: local objects = square:getObjects()for i = 0, #objects - 1 do if instanceof(objects[i], 'ItemContainer') then -- Or was it InventoryContainer?? :S return true; endend
  13. I that case you'll need a reference to the world / cell and then can do something like getGridSquare(sx, sy, sz). That should work. Look through the Lua-sources - I'm sure you'll find an example for something like this (the world context menu code is a good place to start).
  14. I think this can be done with the OnFillWorldObjectContextMenu event. You should be able to iterate through the worldObjects parameter and check if one of the objects is a container. Here is how the lockpicking mod checks for doors on right-clicks: https://github.com/cyberbobjr/pz-lockpicking-mod/blob/master/RMLockpickingMod/media/lua/client/UI/UIDoorMenu.lua Also search through the vanilla .lua files and look for the "WorldContextMenu" (or something like that - can't remember the full name atm).
  15. If I recall correctly Lemmy said the NPCs are going to be pretty modular. Currently I'd say a total conversion mod would be pretty hard to achieve. A lot of the game's mechanics are still "hardcoded" on the java side. For example Skills are an ENUM, which makes it impossible to add new Skills on the Lua side (don't quote me on that - RJ said he wanted to change that and maybe it has already found its way into the game). The other problem is that the game is constantly changing and new builds regularly change the API and require mods to be updated often. But those are just things one has to live with when modding (especially an EA title). I'm pretty confident once PZ is in a more stable state, bigger mods will pop up around it
  16. As a dev / modder I understand the downloads-factor - back in the day I thought the same way... It's a bit like the good old "Facebook likes". In my opinion you are actually limiting your "target audience" by not allowing your mod to be packaged. I'm sure a lot more people would get exposed to your work through servers. I wonder if there would be any noticeable difference in the download rates at all. Even if you don't get the downloads you get the recognition for your work and make a few more people happy (and I guess that's what EG was trying to say as well ). I can see your point here too. But as far as I can tell most people have their favorite servers they'll stick too and how many servers does one have to visit before the download of one extra mod (bundled with a bunch of others) becomes a problem? The only possible problem I could see with something like this is that servers might use an outdated version of your mod but that could be avoided by adding a changelog file or just a txt file naming the version. So when people report bugs you can ask them what version they are using -> not a problem anymore. It's your work and you get to decide - just my 2 cents P.S.: Last but not least, have you thought about putting the mod on github?
  17. Have you taken a look at the code they use for journal writing? If you want to have an in-game text editor that might be the better choice anyway.
  18. Write your own ISTextEntryBox class or fix the existing one of course
  19. I never wrote that part of the tutorial, but you can take a look at the lockpicking mod to see how we implemented the profession related stuff. If you have more questions feel free to open a thread in the Help section
  20. Lua doesn't have type definitions. Every variable can carry any type. Add this line to your code right in front of the faulty if statement and see what it says in the console: print(type(info.plant.compost))I'm afraid I can't say much about the other stuff without digging deeper into the code.
  21. __le refers to a metamethod in Lua. To be more specific it is the metamethod for (less or equal). You can find more info here: http://www.lua.org/pil/13.2.html Basically what Lua is telling you here is that you are trying to compare something with less or equal which can't be compared like that. What type is the variable you are storing in info.plant.compost?
  22. Can't you use the OnGameStart event for this? This should allow you to add the traits right when the game is starting.
  23. Moved this to the pz-suggestions forum
×
×
  • Create New...