Jump to content

DEVBLOG: MERCURY LUA API REVAMP - discussion thread


NQ-Wanderer

Recommended Posts

is the version on pts what more or less all we get? Or can we expect other big changes? 

you said that you want to reduce json use, could you maybe give us an non lua decode and encode? so that the remaining json computing for widgets could get reduced (you could also accept and give us lua tables and just convert them before we get them).  

Link to comment
Share on other sites

35 minutes ago, blazemonger said:

Please, pretty please.. provide an offline codex or at least the scripting section. It's HTML anyway so should not be that hard ..

 

having to go in and out of the in game one is not very nice.

Just get a second PC, then a third to open up VS code.

Link to comment
Share on other sites

14 minutes ago, Bobbie said:

Add the Alt-0 (option0) action while you're at it. Allows users to input numbers while pressing Alt. We already have Alt-1 through Alt-9, only 0 is (still!!!) missing.

 

P.S. There is an official DU github?? Where is it??
 

Star the project and developer if you use GitHub accounts.

 

It's also super easy to find.

https://github.com/dual-universe

Link to comment
Share on other sites

Feedback for devs:

 

You say deprecated but you mean overhauled and broke. Many of the functions changed output types, so a lot of my scripts where complete dumpster fires when I ran them on the PTS. If the popular scripts like archhud don't get an update then your going to have a lot of upset players very soon. The casual players aren't going to know how to fix these issues, and they are going to leave the game.

 

We need access to the codex offline and in advance of the PTS. The way your running these critical updates is very upsetting, and your only causing frustration in the community by not telling us your plans. Not just here for the Lua, but the big stuff. 

Link to comment
Share on other sites

Ideas to reduce LUA requests on the servers:

- Add in the core, a construct version number. a Lot of lua code, start by scanning all elements in a construct, then doing its thing. 99% of the time, the construct haven't been modified inbetween 2 executions, so all Luas could just skip the scanning part by comparing the edition number (this number chould only be changed when you edit the construct by adding/removing/renaming an element).

- For space station/industrialist, i do need to query containers  volume & names and do a correlation with my industries, because the output element count returned by industries is not reliable. This bug has been reported since years now, and still not fixed. So fixing current lua bugs would be a great plus before going in to a new revamp.

- Having a fast element & recipe API would also be great - glad to see the direction you guys are taking with the item API. Right now a lot of my lua in term of sizes, are tables with all the elements. 

- Very happy with the inclusion of the core as a default slot; a lot of my code was complicated for nothing, because it was not possible for me to have a connection for all my prog boards to the core.

- A way to query the current FPS, so script can scale down computing/display on already strugging computers.

 

 

 

Link to comment
Share on other sites

24 minutes ago, space_man said:

Elastic Search, on everything. It's 2022, not 1992, we expect this basic QOL on everything from the market to the codex.

I'm always hitting CTRL-S after making changes all the time. be nice if this was a thing too.

Link to comment
Share on other sites

Hi Noveans !

First of all thank you for telling us what you think of the additions and changes exposed in the devblog (although this is only a selection) and the global direction we chosen for the Lua feature, before you even formulate serial requests. Thanks :) 

Secondly, please understand that some changes can be much more complicated than they seem, especially due to architecture choices for the Lua binding made many years ago. Many of the changes require substantive changes and others are planned as general changes.


Concerning the offline CODEX, it turns out that there were multiple reasons for its removal including maintainability issues, anyway, I just published the API mockup for the 0.30 Mercury on our official github to allow you to have it updated, here:
https://github.com/dual-universe/lua-examples
151397975-02664bb7-019e-4942-b555-08e74ece98d9.jpg

Moreover, a detailed thread is being finalized as exposed on the devblog, it will give you a much more detailed view of the changes by telling you what is new, by what has been replaced such or such function ... etc :) 


Regarding deprecation @space_man, it is a complete deprecation, nothing has been removed or changed without deprecation.
I personally followed the Lua players tests to make sure that everything was working well, especially with the community custom systems like ArchHud. No concerns about deprecation have been reported. When a change of return type was made, we deprecated the old one and changed the name of the new one to avoid any problems.
If any problem appeared, please report it to us with a ticket. ;) 

Concerning the suggestions @P4rty_Boy, as always, I'll be happy to discuss them on a specific thread where you can tag me to explain them in more details. ;) 

Overall, I really hope that all the changes will please and show the interest of Lua for us, many of them are not listed in this devblog and will be clearer on the detailed thread. Thank you.

Link to comment
Share on other sites

3 minutes ago, NQ-Ligo said:

Concerning the offline CODEX, it turns out that there were multiple reasons for its removal including maintainability issues, anyway, I just published the API mockup for the 0.30 Mercury on our official github to allow you to have it updated.

 

Thank for the update. But I can't say I find this a very satisfying answer.

 

A straight text/raw HTML dump on every patch for the codex will be good, we are well capable, and many  probably will, add styling ourselves.

 

Stop overthinking this please, stop thinking you need to make it all fancy and shiny, especially for this. The mockup is nice and may be useful for some but IMO it overshoots the simple and much broader ask for a simple list of the API calls

Link to comment
Share on other sites

4 hours ago, NQ-Ligo said:

Regarding deprecation @space_man, it is a complete deprecation, nothing has been removed or changed without deprecation.


I have an industry script that looks at the machine status, in which case you modified the output to now be an int, where it was previously a string. This is not deprecation, thats a new API function. I had a handful of other updates that needed to be made, for the script to work on the PTS, as every deprecated call was causing issues beyond what a normal deprecation should do. That being said, its overall a step in the right direction. 

 

 

Link to comment
Share on other sites

18 hours ago, Bobbie said:

Also please for the love of god make slots and events available programmatically from Lua, so we don't have to choose between the in-game editor or YAML for hooking up a script. Just allow the script to hook itself up please thank you.

+1

Link to comment
Share on other sites

4 hours ago, NQ-Ligo said:

@space_man I have identified your problem. Indeed, we did not add the depreciation of the getStatus function. We're fixing it for the Mercury update.
 

Please report this type of problem to support next time to let us know that it happens. :) 

Thanks for cleaning that up. I can now be less angry.

 

I was sort of still peeved about a databank bug that broke all of my mining platforms, and because I used a detection zone to trigger the program board, all 20 of these constructs had to be deleted. 

 

Anyways, I can't wait for the release....

Link to comment
Share on other sites

12 hours ago, space_man said:

I was sort of still peeved about a databank bug that broke all of my mining platforms, and because I used a detection zone to trigger the program board, all 20 of these constructs had to be deleted. 

Can you please share some details about that so we don't fall in the same trap? No need if it is fixed already though.

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...