Jump to content

Lua requests


RoboMat

Recommended Posts

OnAIStateChange is not called in one of the changeState functions. Also please make it trigger after the state change happens so it's possible to revert state changes. And on the subject of StateMachine.class, it is not exposed to the LuaManager. Please expose the StateMachine.class.

Link to comment
Share on other sites

  • 5 months later...

Hi, is that possible to add something like getCustomBuildArea(...)?

 

A lot of modders and many of gamers want to make their objects private in multiplayer game. Right now it is possible only to game-own houses, but not for a custom buildings. Just an example it will be worth to retrieve area based on the custom floors. Returns an area if custom build floor is connected to the in-game building OR (floor area have a square more than YxY AND this area is the first player floor object [preventing a lot of small floors on a map]).  

 

I.e. the idea is to have in-game mechanism that clarify custom buildings.

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 7 months later...
  • 3 weeks later...
  • 3 weeks later...
  • 2 weeks later...

- OnScratched (one event for scratches, bites, fractures etc with details which type, is infected or not, what zombie/player/item causes wound etc)

- OnTreatment (one event for scratches, bites, fractures etc with details what is doctor level, used items etc)

- OnHit (by zombie on humans and walls)

- EveryOneMinute - good alternative to OnPlayerUpdate

- OnDrop(item)

- OnPickup(item)

- OnUse(item) - very important event which makes possible very interesting mods with vanilla (or custom) consumables.

- OnDeplete(item)

 

And it would be very nice to see the documentation for all existing events. Thank you!

Edited by Maris
Link to comment
Share on other sites

  • 1 year later...

This thread is rather old, but I still hope that the devs are looking in here from time to time.

 

I'm currently coding a mod where the helicopter drops a crate with loot in it. The basic functionality is already done, but I'm now struggling with the helicopter. The Helicopter.class is not exposed to Lua, so I can't instantiate a new one. The one instantiated in IsoWorld is not really accessible.

 

So I hope that you (@TIS) can expose the Helicopter.class so that I can set a target with Lua using the "setTarget()" method.

Link to comment
Share on other sites

  • 9 months later...

Working with 3D models through Lua code (add/remove, move, scale, etc.). I tried to add a cable model to the Towing a car mod, but nothing came of it. Didn't find a way to add my own model and move it in space (and draw). The lua manager has a method loadZomboidModel-, but it is not used anywhere and it does not help here (you still cannot draw).

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Change freeze system for food (that affect on roting). Let it depend on the temperature of the container.

 

Example - I want create movable cooler box. I can set custom temperature, but in class Food in method updateAge asking for working electrecity in square. (need way to create freezer too)

0FD795F593832F7B48196387808D3DDF453DD125

Link to comment
Share on other sites

Hi,

 

Would it be possible to have a function that return the full date without having to rebuild it from ground ?

And also a function that calculate time past between 2 dates without having to rebuild the whole gregorian calendar functions ?

 

Thanks a lot for the great job !

Link to comment
Share on other sites

Request: OnInventoryItemTooltip

 

It would be nice, if mods could implement dynamic tooltips on inventory items, based on the game's or character's state. Example: achieve something like the vanilla game's "already read" on literature items.

Link to comment
Share on other sites

On 11/28/2020 at 6:14 PM, Asilar said:

This is doable Tiax. I do it very often in the mod I'm working on. You have to use ModData and item:setToolTip().

I can give you some code and/or help you if you want, just ping me on discord.

Doing it like that seems like a bit of a hack though, since you're changing it globally, not just based on the current player?

 

Edit: this *has* to be done with an event. You could have multiple players look at an item in a container. You will need to show each player a tooltip based on the player's state, which may not be the same one, when sticking to the read/unread example.

Edited by Tiax
Link to comment
Share on other sites

  • 9 months later...

Can it be done that the following static method returns IsoFire instance(success) or Null/Nil(failure) instead of void ?

IsoFireManager.StartFire(cell, square, b, energy, life);

 

It would open a great door to fire manipulation from Lua.

 

Edited by Tchernobill
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

I think it would be super freaking cute if there would be an event which fires when the character speaks (says a text line)
Such as "HEY!" "OVER HERE!" or "I already know that..." and such text which appear over player's head.

Basically whenever the `IGUI_PlayerText` appear on screen, there should be an event and  that would be super cool.
This would in the future also be useful when it fires in case an NPC speaks.

yes, it would be cool.


 

On 11/23/2021 at 6:32 PM, Aiteron said:

GetSaveFileReader and GetSaveFileWriter. Sometimes useful to write some data to file in save. Now we need litter Lua folder with files like Config_SAVENAME.txt

I want this too, It's annoying because everyone has to setup their own system to save stuff. Would be good if saving data into the save would be possible on the server and client. Also per client on the server ( that way we don't need to make our own dictionary per client )

Link to comment
Share on other sites

  • 2 weeks later...
  • 8 months later...

25% Zoom mod please PLEASE! I posted this on two other discussion bored on this site before I saw this one but anyways id really like to be able to see closer to appreciate the jewelry and make up and small details people get on their characters. I just don't see why have aesthetics like make up and jewelry when no one can see them. When creating new character or applying make up you can see most things but I've never seen the belly button ring or rings on the fingers cause they're just too small.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...
  • 3 months later...

A couple things that have been on my mind for a bit:

  • For sound emitters, could we have a way to start from/seek to a specific time in a sound? There's soundTimeline scripts to set specific times you can seek to, but they only work for FMOD events, which afaik mods can't create.
  • VehiclePart:setModelVisible() doesn't apply the transform of the vehicle to the new model until the vehicle updates on the next tick; this is really obvious and distracting at 60fps. Attached is an image of what this can look like. The only way I've found around this is to call the vehicle's entire update method after setting model visibility but that's probably not a good idea?
  • Some way to control shader uniforms from Lua would let us get a lot more creative with visuals.

pz.png

Link to comment
Share on other sites

  • 5 months later...

I would dearly love a couple of things

 

- Proper documentation for the LUA API, including events. Ideally auto generated for each release.

- JSON version of LUA/Java api docs.

 

The first request is probably obvious but let me dive into the second one.

 

JSON dumps would make it trivial to

- Automate creation of cross language bindings. Specifically it would be awesome to generate typescript stubs for everything without having to de-compile the java and do hacky things in lua. The typescript2lua project is great and I'd love to use it. A project already exists to do this but it relies on some very very janky de-compilation of java (PipeWrench)

- Maintain fan hosted docs sites

- Easy IDE plugins with autocomplete

 

There's a few JavaDoc custom doclets out there that seem pretty plug and play for dumping json. The lua stuff y'all might have get creative.

 

Edited by collectablecat
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...