Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    Vanek got a reaction from ZimTown in Help with building mods   
    Hey ZimTown,
    Sorry, this got lost in my inbox I did manage to get the console to print out usable names for me. This is how I did it. This function prints out whatever is on the gridSquare under the mouse cursor. You could easily adapt it to whatever is under the player or npc, etc.
    function objectsUnderMouse() local world = getWorld(); local cell = world:getCell(); local mx = getMouseX(); local my = getMouseY(); local player = getPlayer(); local wz = math.floor(player:getZ()); local wx, wy = ISCoordConversion.ToWorld(mx, my, wz); wx = math.floor(wx); wy = math.floor(wy); print("Under the mouse:"); local square = cell:getGridSquare(wx, wy, wz); local objects = square:getObjects(); for i=0, objects:size() - 1 do print(i); local v = objects:get(i); local t = v:getTextureName(); print(t); endendI hope that helps
  2. Like
    Vanek got a reaction from Kidlonewolf in Help with building mods   
    Thanks I certainly hope I'll be able to get them done! Baby steps.
  3. Like
    Vanek got a reaction from Kidlonewolf in Help with building mods   
    Hi all,

    First off I just want to say that I love PZ and I am excited to watch it grow into something great. I've been playing for a while now and I wanted to try my hand at creating a mod or two.

    I have an idea for a series of mods that I'm going to start working on called PZMD. I'm a medical student and basically, I'd like to try and inject some more realism regarding human physiology, medicine, pharmacology, etc. However, a lot of this is pretty complex so I wanted to start somewhere easy so my first mod is going to be "PZMD Hygeine". This is what I would like to to do:

        Track player hygeine level and have effects based around poor/good hygiene (increased happiness, decreased chance of infection, etc.)
        Allow player to perform hygiene related actions such as brush teeth, shower, wash hands, etc.

    To that end, I've decided to start with the "Brush Teeth" action. I'd like to use the existing toothbrush and toothpaste items in the players inventory to allow for the activation of a timed action when either the player right clicks on a water source (e.g. sink, bathtub) or has a water source in their inventory (e.g. bottle of water).

    So, I've started but I think I need a little direction. I've been trying to do some reverse engineering (RoboMat's Lockpicking mod) and I've been looking through the javadocs but I can't seem to figure out how to determine if the player is clicking on a water source item or not. Getting the inventory shouldn't be too difficult but I'm a little lost with the other bits. If any one could havefer a nudge in the right direction, that would be great. Thanks!


     - Vanek
  • Create New...