Jump to content

DevBlog: Lua Improvements and Changes - Discussion Thread


NQ-Deckard

Recommended Posts

Can radars be connected to programming boards or only seats? I don't think so from memory, but may remember wrong.

 

If not, why not? Connecting to programming boards would open up the option to build radar systems at bases, space stations, and so on. Would be fun.

 

 

Link to comment
Share on other sites

18 minutes ago, Doombad said:

Can radars be connected to programming boards or only seats? I don't think so from memory, but may remember wrong.

 

If not, why not? Connecting to programming boards would open up the option to build radar systems at bases, space stations, and so on. Would be fun.

 

 

Seats only.

Link to comment
Share on other sites

Hello there. In case anyone missed it, I'm running a poll for basically what NQ should probably work on next. Of course, they probably won't go adding a major feature out of the blue, but it should help them know what to prioritize.

Link: https://strawpoll.com/vk4u24pfd

I also linked discussions on each item, so if you haven't already, vote. You might be able to shift some stuff.
Currently 33 voters, I'm sure there are more of you out there.

Link to comment
Share on other sites

Quote

LUA ATLAS ADDITION

The Lua atlas will be useful. But, is it a just a .lua file in Game/data/lua, which has to be updated manually (or with a script) by someone from NQ? It may be better (more future-proof) to have a system function that would generate the atlas at runtime from game data.  system.getPlanetAtlas() could even return a JSON string, as the scripts would only need to parse it once.

Link to comment
Share on other sites

Hi everyone !

As some of you, and others will discover, we released the third and last part of the devblog.
Let me expose you some points before check your feedbacks.

  • The atlas library has been done with a similar structure with what the community is used to have. It can respond to your major use cases and let you save characters and space on your databanks. We may consider adding the API later.
     
  • The event library; I know many of you were expecting an API to be able to subscribe to item events. But that's not what we offered, and we never promised it.
    Indeed, this library was designed to help players to create or manage events in pure Lua, for inter-constructions communication, custom event management interfaces ...etc. And at the same time, as a first example of a local library to see if you would like to have more Lua libraries or deeper libraries, like GUI libraries or something else.
    Keep in mind that even though we have good Lua developers in this community, a lot of the community is not necessarily familiar with how a GUI works for the example. So you may find this unnecessary, and that's fine. ;) 
     
  • The examples provided are simple, and may even expose some "ridiculous" code blocks ... "ridiculously" simple, like the event handling on the button example. But this is normal, as we want to keep the examples simple and clear for all players.
Link to comment
Share on other sites

On 10/13/2021 at 6:29 PM, Zeddrick said:

You made it look like I said something in your quote there when I actually said the exact opposite!  Be careful to quote people properly ...

Sorry, what? You said "Drop Lua". I said "Lua isn't really the problem".

 

Maybe be careful to use the right words, if you said "Drop Lua", but didn't mean "Drop Lua".

 

Yeah, apologies - quoting SNAFU.

 

Link to comment
Share on other sites

2 hours ago, CptLoRes said:

DU already has a official feature up vote system https://upvote.dualuniverse.game/ that NQ is mostly ignoring.

And considering the fact that NQ is ignoring the official list, I am sorry to say it is unlikely they will care about another one.

 

Yes, but that is general game design and I decided to reference some already upvoted posts there. I'm not sure why they abandoned it, maybe something to do with JC leaving, but Lua is a little different. We have a Github to bring attention to Lua stuff. So far, some bugs we caught have been fixed and some of the things on the Github have been added.

Now we're allowing NQ Lua team to see what people want the most, and probably by that and how difficult it is to do (or implications of doing it), they will go by it.

Link to comment
Share on other sites

Lua ATLAS

22 minutes ago, hdparm said:

The Lua atlas will be useful. But, is it a just a .lua file in Game/data/lua, which has to be updated manually (or with a script) by someone from NQ? It may be better (more future-proof) to have a system function that would generate the atlas at runtime from game data.  system.getPlanetAtlas() could even return a JSON string, as the scripts would only need to parse it once.

I agree with you @hdparm, but keep in mind that some of this data is only server side or computed, so we want to avoid server requests. Considering that the stellar body information is static, it is easy to keep a local atlas generated, so we took that choice.

Also, we don't want to add more lua functions returning JSON, we know it's heavy in terms of performance and CPU overhead limit.
 


Suggestions and polls

2 hours ago, CptLoRes said:

DU already has a official feature up vote system https://upvote.dualuniverse.game/ that NQ is mostly ignoring.

And considering the fact that NQ is ignoring the official list, I am sorry to say it is unlikely they will care about another one.

 

I know that sometimes you may feel that opinions or suggestions are not necessarily listened to, but be sure that we are always interested in knowing what is considered important for our players at the moment.

Also, don't forget that we are always working and what you will see today will have been designed, developed and tested for a few months before. So on this subject, I'll just say that we are keeping a close eye on these kinds of surveys.
 

Although many things can be complicated to consider in terms of resources or technical involvement etc. we are looking at the suggestions whatever it is.

 

Link to comment
Share on other sites

Quote

<string> system.getOrganizationTag(<int> oid) : Returns the tag of the given organization, if known, e.g. broadcasted by a transponder.

Is there a new gameplay feature involving organization transponder tags? If I set tags aaa,bbb,ccc on a transponder on an organization's construct, how will system.getOrganizationTag decide what to return?

Link to comment
Share on other sites

15 minutes ago, hdparm said:

Is there a new gameplay feature involving organization transponder tags? If I set tags aaa,bbb,ccc on a transponder on an organization's construct, how will system.getOrganizationTag decide what to return?

This is the organization tag, not the transponder tag. The tag of an organization is defined when you create an organization and is a string of 3 to 4 characters.

Link to comment
Share on other sites

7 minutes ago, AstronIsTaken said:

Can you give an example what database.getPlayer(<int> pid) returns?

Database is a wrapper around core and system functions. It doesn't return anything you couldn't get directly, and there is no function to get skills.

Link to comment
Share on other sites

5 minutes ago, AstronIsTaken said:

Can you give an example what database.getPlayer(<int> pid) returns?

 

Will it return information about skills? If not, please add it to this or different method. It would allow to greatly improve resources like du-craft.net which I maintain

Because of your question and considering that some players seems not know that, but database.lua library is already in the game folder. It's an old library which hasn't been updated since a long time, it was important at the occasion to update it.

This library is simply a collection of functions compiling all API functions you got, to return a structure containing all informations.
You will not get any informations for crafting, like skills ...etc .

Link to comment
Share on other sites

4 minutes ago, NQ-Ligo said:

Because of your question and considering that some players seems not know that, but database.lua library is already in the game folder. It's an old library which hasn't been updated since a long time, it was important at the occasion to update it.

This library is simply a collection of functions compiling all API functions you got, to return a structure containing all informations.
You will not get any informations for crafting, like skills ...etc .

Thanks for clarification!

 

In this case I want to request this feature, one way or another :) 

Link to comment
Share on other sites

35 minutes ago, NQ-Ligo said:

I invite you @AstronIsTaken and all others who will read it to take time to expose clearly and detailled enough what you would like to see added around the Lua. It's interesting, even if I can't give you any promise ;) 

Keep in mind the dev time in your suggestion obviously ... Thanks

Simplest scenario:

1. Developer (me or someone working on similar tools) provides either lua code to interested Player or shares preconfigured programming board somewhere in game.

2. Player approaches programming board and activates it

3. LUA code reads player ID and fetches their active skills

4. LUA outputs map of skill to value to console. Skill here is skill name used in game, some id or code whichever DU decides to give us)

5. Player copy-pastes output from console into a field on external tool (e.g. du-craft.net)

6. Player uses tool to figure out what resources, factory units etc required for whatever they want to produce.

 

Currently it's done by player manually (see screenshot) and updating it is a headache: player needs to remember what skills got improved since last time.

 

Possible in-game API that would allow it (note: I'm not writing LUA code regularly):

 

<json> getPlayerSkills(<int> pid) - returns all acquired player skills (with 1+ level)

Example of return:

{
    "Products.Basic Product Refining.Al-Fe Alloy": 2,
    "Products.Uncommon Product Refining.Efficiency": 3,
    "Products.Uncommon Product Refining.Stainless Steel": 2
}

Note: using here arbitrary skill code (used in my tool). It can be anything as long as we as tool developers can map it to in-game skill.

 

Optional useful methods:

<json> getPlayerSkills(<int> pid, <string> skill_category) - returns all acquired player skills for category

Example of use: getPlayerSkills(somePlayerId, "Products");

 

<int> getPlayerSkill(<int> pid, <string> skill_code) - returns skill level (0-5)

Example of use: getPlayerSkill(somePlayerId, "Products.Basic Product Refining.Al-Fe Alloy") 

skills.jpeg

Link to comment
Share on other sites

8 minutes ago, AstronIsTaken said:

Simplest scenario:

1. Developer (me or someone working on similar tools) provides either lua code to interested Player or shares preconfigured programming board somewhere in game.
...

I second this. I wanted to make a Discord bot for skills and such but I gave up because it would be a massive pain to export skills and make them from the ground up with their given effects.

Link to comment
Share on other sites

8 hours ago, Samedi said:

Sorry, what? You said "Drop Lua". I said "Lua isn't really the problem".

 

Maybe be careful to use the right words, if you said "Drop Lua", but didn't mean "Drop Lua".

 

 

Can you actually read?  Generally if someone says they were misquoted it's clever to go back and see if they actually were before brainfarting out another reply.

Someone else said drop lua.  I replied to it saying that I'm not a lua fan but dropping it was a bad idea.  You replied to me, edited the message and bungled it so it looked like I said drop lua.

GO back and read the thread if you don't believe me!

Link to comment
Share on other sites

Quote
  • <float> radius: The nominal radius of the stellar body.
  • <float> atmosphereThickness: The atmosphere thickness in meters.
  • <float> atmosphereRadius: The radius of the sphere of the atmosphere measured from the center of the stellar body.
  1. Is atmosphereRadius equal to radius+atmosphereThickness?
  2. Is the thickness the altitude at which space engines start generating thrust (i.e. atmospheric density equals .1) or when space engines can achieve maximum thrust (and atmospheric engines generate zero thrust)? I think both values are useful.
Quote

... and let us know what Lua-related improvements you’d like to see in the future. 

I submitted my suggestions at https://upvote.dualuniverse.game/suggestions/150263/support-lua-readwrite-access-to-voxels (do new players even know about the suggestion page?). Even the ability to query a voxel's vertex position would expose a capability that is not otherwise available and essential to building an in-game vertex editor. Of course, if NQ plans on releasing their own, there would be no need for it I guess.

Link to comment
Share on other sites

17 minutes ago, JayleBreak said:
  1. Is atmosphereRadius equal to radius+atmosphereThickness?
  2. Is the thickness the altitude at which space engines start generating thrust (i.e. atmospheric density equals .1) or when space engines can achieve maximum thrust (and atmospheric engines generate zero thrust)? I think both values are useful.

I submitted my suggestions at https://upvote.dualuniverse.game/suggestions/150263/support-lua-readwrite-access-to-voxels (do new players even know about the suggestion page?). Even the ability to query a voxel's vertex position would expose a capability that is not otherwise available and essential to building an in-game vertex editor. Of course, if NQ plans on releasing their own, there would be no need for it I guess.

Hi JayleBreak!

To answer your questions:
1. Yes exactly
2. The thickness is the actual thickness where the density of the atmosphere is less than 0.0001, reach 0. So "when space engines can reach maximum thrust"; that's when you are in the real space void.

We check the suggestions done on upvote don't worry. ;) 

Link to comment
Share on other sites

7 hours ago, JayleBreak said:

I submitted my suggestions at https://upvote.dualuniverse.game/suggestions/150263/support-lua-readwrite-access-to-voxels (do new players even know about the suggestion page?). Even the ability to query a voxel's vertex position would expose a capability that is not otherwise available and essential to building an in-game vertex editor. Of course, if NQ plans on releasing their own, there would be no need for it I guess.


I wonder about this... because I've asked for just getting the number of a particular type of voxel and they basically said an out right no because it's "not that simple". I don't think the voxel tech is something remotely manipulatable by the Lua side of things or even readable... unless they have a way they store each voxel with a unique identifier or something is somehow useable.

It would be very nice, and really really powerful, but I have my doubts it's possible.

I suggest you make a post on the Github page for Deckard to comment on, when he gets time.

Link to comment
Share on other sites

When will all of the lua changes P1-3 be delivered - Target Date? 

Will you do comprehensive / robust testing before its released or will this be released into the community with your usual quality?

Can we have the offline documentation back so we don't have to be logged into the game to read it?

Link to comment
Share on other sites

7 hours ago, Mucus said:

When will all of the lua changes P1-3 be delivered - Target Date? 

Will you do comprehensive / robust testing before its released or will this be released into the community with your usual quality?

Can we have the offline documentation back so we don't have to be logged into the game to read it?

Some issues may slip through our cracks during our testing, but be sure this update has been tested and reviewed for some time.

 

For the date I will just to tell you soon, we avoid giving precise dates.

 

About the offline documentation, be sure I will check that with the team, can't promise anything.

 

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