RoboMat Posted August 7, 2013 Posted August 7, 2013 Like on the old forums people can post their requests for lua additions in this thread. Please just post requests here and don't debate about the ones made. The devs are perfectly capable of deciding what to add and what not to add Anyway, here we go: New / Changed Events:EveryMinute: Self explanatory.EveryHour: Self explanatory.OnUnequip: When Item is unequipped from the primary or secondary slot.OnItemUse: When item is used in the inventory. (E.g. "Eat Food" or "Bandage Wound")OnContainerUpdate: When the item containers are updated (parameters: table of contained items, getType() of the updated container) New / Changed Functions:IsoFloorBloodSplats(): in the Chunk class (or whatever is necessary to retrieve blood on walls and floors and remove it)FIX ItemContainer:isInCharacterInventory()getFps() in GameWindow.Getter / Setter for amount of splattered blood. Finished (already in the game)setPermaLocked(boolean) in IsoWindow -- RM : Done for 2.9.9.17isPermaLocked() in IsoWindow -- RM: Done for 2.9.9.17OnRainStart -- RJ : Done for 2.9.9.14OnRainStop -- RJ : Done for 2.9.9.14OnEquipPrimary: Fires when an item is equipped as primary weapon.-- RJ : Done for 2.9.9.14, param : player, itemOnEquipSecondary: Fires when an item is equipped as secondary weapon.-- RJ : Done for 2.9.9.14, param : player, itemOnItemEquipAny -- RJ : Use the OnPrimaryItem/OnSecondaryItem instead OnAmbientSound: Fires when ambient sounds is played (helicopters, gunshots ... etc.) - RJ : Done for 2.9.9.14, param : name of the ambient sound (like "chopper1", "pistolgun2",..)getClosedSprite() -- RJ : use getSprite()setClosedSprite()-- RJ : use setSprite(IsoSprite)getOpenSprite(...)-- RJ : Done for 2.9.9.14setOpenSprite(...)-- RJ : Done for 2.9.9.14setSmashed(...)-- RJ : Done for 2.9.9.14, use isDestroyed() to know if it's already smashed or notgetSmashedSprite()-- RJ : Done for 2.9.9.14 bassair, Skallagrim, Suomiboi and 3 others 6
RobertJohnson Posted August 7, 2013 Posted August 7, 2013 Pinned it bro' ! Don't hesitate to ask me stuff, will keep editing the OP when stuff is done RoboMat and grammarsalad 2
Suomiboi Posted August 7, 2013 Posted August 7, 2013 Great ideas! Event.OnItem/Weapon/AnythingEquip primary and secondary or just both together would make things alot easier for me I thinks. I'm just learning the stuff but it's something I missed when I started fidling. (clyde) (clyde)Some clydes for you guys.
Aricane Posted August 7, 2013 Posted August 7, 2013 You're probably aware but the current weather state can be retrieved. One could check it 10 minutes, don't remember how though.
Austin Posted August 8, 2013 Posted August 8, 2013 Great ideas! Event.OnItem/Weapon/AnythingEquip primary and secondary or just both together would make things alot easier for me I thinks. I'm just learning the stuff but it's something I missed when I started fidling. (clyde) (clyde)Some clydes for you guys.You could use Hooks, such has Hook.Attack.Add(EventGoesHere); LuaHookManager.class <-- You're probably aware but the current weather state can be retrieved. One could check it 10 minutes, don't remember how though.Yea, I remember reading some of the source files. I think it had something to do with ambient or something. not sure.
RoboMat Posted August 8, 2013 Author Posted August 8, 2013 Thanks for the suggestions guys, but please don't turn this thread away from its original purpose Don't debate about the suggestions being made. RobertJohnson will decide what to add and what not to add I know that we already can check if it is raining (it's "RainManager.isRaining()" btw) but I want an Event that fires exactly when it starts / stops to rain I have the feeling that this sounds way more "annoyed" than it should Just wanted to say this before this turns into a discussion thread. Great ideas! Event.OnItem/Weapon/AnythingEquip primary and secondary or just both together would make things alot easier for me I thinks. I'm just learning the stuff but it's something I missed when I started fidling. (clyde) (clyde)Some clydes for you guys. I have added your suggestions (if I understood them correctly^^) to the OP. Suomiboi and Aricane 2
Austin Posted August 8, 2013 Posted August 8, 2013 Thanks for the suggestions guys, but please don't turn this thread away from its original purpose Don't debate about the suggestions being made. RobertJohnson will decide what to add and what not to add I know that we already can check if it is raining (it's "RainManager.isRaining()" btw) but I want an Event that fires exactly when it starts / stops to rain I have the feeling that this sounds way more "annoyed" than it should Just wanted to say this before this turns into a discussion thread. Great ideas! Event.OnItem/Weapon/AnythingEquip primary and secondary or just both together would make things alot easier for me I thinks. I'm just learning the stuff but it's something I missed when I started fidling. (clyde) (clyde)Some clydes for you guys. I have added your suggestions (if I understood them correctly^^) to the OP.I apologize. I was just answering both of their questions. edit: Aricane didn't actually have a question, I was just agreeing with him and adding on.
RoboMat Posted August 8, 2013 Author Posted August 8, 2013 A few more getters and setters that would be useful in the future Functions:getClosedSprite() for IsoDoor, IsoThumpable and IsoWindow.setClosedSprite() for IsoDoor, IsoThumpable and IsoWindow.getOpenSprite(...) for IsoDoor, IsoThumpable and IsoWindow.setOpenSprite(...) for IsoDoor, IsoThumpable and IsoWindow.setSmashed(...) for IsoWindow and (?) IsoThumpable.getSmashedSprite() for IsoWindow and (?) IsoThumpable.
Suomiboi Posted August 8, 2013 Posted August 8, 2013 I have added your suggestions (if I understood them correctly^^) to the OP.Exactly like that, but you accidentally put the OnEquipPrimary two times. The explanations are correct though.Great, thanks man! You could use Hooks, such has Hook.Attack.Add(EventGoesHere); LuaHookManager.class <--Yeah thanks for the info! I saw that one used somewhere but wasn't sure about how to use it myself. Much to learn...
Dr.Gigglestein Posted August 10, 2013 Posted August 10, 2013 Ahoy everyone! was thinking if item properties were added along the lines of strength change, stealth change etc, similar to the UnhappyChange, StressChange, etc... we could easily make timed boost items, such as the "adrenaline shots" someone was suggesting somewhere, or zombie guts to add a temp. stealth boost. just randomly thinking it would open a world of mod possibilities without hopefully too much JAVA work. (thanks RJ for being awesome even if this doesnt happen)
RegularX Posted August 11, 2013 Posted August 11, 2013 +1 for OnRainStop - it would be great to somehow add a "Wait till Rain Stops" option. I might even request the same events for Dawn and Dusk, tbh - for similar reasons. I wouldn't expect this anytime soon, but imo it would be great to see: Wider array of item modifiers (like It think GiggleStein suggests) - especially PainChange, i.e. the modifiers currently being held behind Java for pillsbetter tile properties. It would be nice to be able to easily discern between something like a TV, Bathtub, etc - for adding new context actions on them.
RobertJohnson Posted August 12, 2013 Posted August 12, 2013 Edited the OP with the stuff already done Gonna post a list with lua event commented soon Suomiboi 1
Suomiboi Posted August 12, 2013 Posted August 12, 2013 Edited the OP with the stuff already done Gonna post a list with lua event commented soon Oh wow, thank you so much RJ! This is awesome! I think now I can finally get my mod working right!
RoboMat Posted August 14, 2013 Author Posted August 14, 2013 InventoryItem.setExactCondition(): A setter that allows us to set a condition directly (e.g.: 93). -- RJ : you can use setCondition(int) already, check with the getConditionMax() what's the highest value Unfortunately we can't use the setCondition(int) setter, because it multiplies all entries by ten, so if you for example want the condition to be 93 it will be 930 in the game actually. As it only takes an int you can't use 9,3 either because it will be rounded to 90 in the game So my request still stands (I hope) ^^
johndough Posted August 20, 2013 Posted August 20, 2013 - Getter method for the IsoFloorBloodSplats in the Chunk class (or whatever is necessary to retrieve blood on walls and floors and remove it)- Fix ItemContainer:isInCharacterInventory() or provide another way of checking whether a particular container is in a player's inventory
RoboMat Posted August 20, 2013 Author Posted August 20, 2013 - Getter method for the IsoFloorBloodSplats in the Chunk class (or whatever is necessary to retrieve blood on walls and floors and remove it) - Fix ItemContainer:isInCharacterInventory() or provide another way of checking whether a particular container is in a player's inventory Added to the OP + setPermaLocked(boolean) in IsoWindow
johndough Posted August 23, 2013 Posted August 23, 2013 Thanks. I would also like to see some way of controlling the amount of blood/gore that is splattered. So: - Getter and setter method for blood/gore amount
Eggplanticus Posted September 2, 2013 Posted September 2, 2013 Is GameWindow::fps a good measure of the fps that pz is running at? If so, could we have a getter for this variable? That would make it much easier to determine fps.
Suomiboi Posted September 5, 2013 Posted September 5, 2013 event: OnUnequip This would feel natural with the OnEquipPrimary and secondary already in. Wouldn't prbobably be necessary to have primary and secondary as there isn't such command in game. Btw the OnEquipPrimary was working beautifully when I played around with it! So thanks again for that!
Skallagrim Posted October 25, 2013 Posted October 25, 2013 event: OnGameEndLoadGridsquare At the begin of a game "LoadGridsquare" seems to be called for all gridsquares, which makes it possible to load and display, all barrels for example, on the whole map.But after that, only grids around the player are accessible.This means that, for example water levels stored in the moddata of a gridsquare, can not be updated in grids the player is not close too.If one exists the game far away from, lets say barrels, the change of waterlevel since leaving them will be lost. If there is no alternative already, I would like to have an event that triggers when one exits the game, before all griddata are stored on HD, to give the chance of updating the gridsquare values all over the map.
Viceroy Posted November 18, 2013 Posted November 18, 2013 Maybe something along the lines of: OnTimedActionStartOnTimedActionEndOnMakeItemStart <- like OnMakeItem but this is when the action is started. Apologies if these are noted elsewhere.
RoboMat Posted November 18, 2013 Author Posted November 18, 2013 Maybe something along the lines of: OnTimedActionStartOnTimedActionEndOnMakeItemStart <- like OnMakeItem but this is when the action is started. Apologies if these are noted elsewhere. Just in case you didn't know, every TA already has a start() and stop() function.
Viceroy Posted November 18, 2013 Posted November 18, 2013 (edited) Maybe something along the lines of: OnTimedActionStartOnTimedActionEndOnMakeItemStart <- like OnMakeItem but this is when the action is started. Apologies if these are noted elsewhere. Just in case you didn't know, every TA already has a start() and stop() function. How would I go about accessing that from a mod script? Like for instance say I have a mod that adds a sound on the start of a certain action. (i.e. Gulp sound when drinking and then zombie attraction logic or such) Would I have to over-write the start function or hook it somehow? And thanks by the way. -EDIT: OnItemDropped would also be useful come to think of it, I can't seem to find something similar that would give me access to the Item that was dropped. Any Ideas? Edited November 18, 2013 by Viceroy
RoboMat Posted November 20, 2013 Author Posted November 20, 2013 How would I go about accessing that from a mod script? Like for instance say I have a mod that adds a sound on the start of a certain action. (i.e. Gulp sound when drinking and then zombie attraction logic or such) Would I have to over-write the start function or hook it somehow? Check out the code of my Lockpicking Mod (TAPickDoorLock.lua): function TAPickDoorLock:start()self.sound = getSoundManager():PlayWorldSound("rm_loud_Lockpicking", false, self.object:getSquare(), 0, 10, 1, true);end
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