Jump to content

The forgotten LUA API for dispensers


Yoarii

Recommended Posts

55 minutes ago, NQ-Ligo said:

and even though you can use a lot of programming cards ... etc, it's still not as convenient, and so it pushes players to not have too much of that. Simplifying things is going to push more people to do it, and the people who were already doing it, are going to be able to do it even more. That's why I said server requests. ;) 

Lets be constructive and find solutions instead of adding limitations. First of all, how often would a dispenser be updated? The intention is not to play the 0.01 quanta game as on the market where there is a five minute limit on order updated if I remember correctly. So lets add a per-dispenser limit of 5 minutes for updates (per API so that setting the price doesn't prevent changing batch content etc).

 

Or even better - as Endstar suggested - a UI for all dispensers, at least on a per-construct basis, that allows importing/exporting a Json document that we can work with outside the game. You could even set a limit on the import function to 5 minutes or whatever is suitable.

 

1 hour ago, NQ-Ligo said:

it will prevent the player to take a batch on other dispensers of the tagged group

Oh, it's that tag. I had forgotten it existed. Isn't that a number though, does it accept any string?

Link to comment
Share on other sites

3 hours ago, NQ-Ligo said:

you would no longer need a soo large array of dispenser

I can only connect one dispenser to a container (or hub), currently I need an extra container for every dispenser, if I want to sell warp cells in batches of 10 and 100, I need 2 dispensers and each need a container.

I am a shopkeeper, not a coder, so I just quickly describe what I currently think I can do (or want to be able to do) with the new LUA:

-Allow a customer to interact with a screen, in order to change batch size. The screen stuff is already in, so setBatchContent and setPrice is all I need there.
-Allow a customer to select which items he wants (only for small items like operators, cables, barriers, furniture, plants). So he can, via screen, just click here and there and then finalize at the dispenser to get his 3 fruitplants and 5 AND operators.

I would personally will stick with 1 dispenser, 1 board, 1 screen, 1 container for most items

 

 

3 hours ago, NQ-Ligo said:

the point is simply that there is no state

There is "unconfigured", in which case the dispenser simply states an error message.

 

Link to comment
Share on other sites

@Gottchar


If we're able to implement the API as I would like, should be able to do that by using the PB to set the content of the batch from the screen , yes no issues on that.
However, in absolute, I can't promise you that it will be possible, there are still some points to study. But that's the goal.

And as usual, if we implement it, I will publish a code example to do that. ;) 

Link to comment
Share on other sites

1 hour ago, Gottchar said:

Allow a customer to interact with a screen, in order to change batch size. The screen stuff is already in, so setBatchContent and setPrice is all I need there.

Nice thinking!

Link to comment
Share on other sites

I want to add a small but important note here, that stuff you folks are suggesting, such as being able to change dispenser values or even charge/pay players directly would probably need a new kind of Control Unit that executed code on a safe environment, such as the server.

 

The reason for that is that since all Lua runs on the client, in theory it could be possible to a malicious person to modify a Lua script in run-time and take over control, then do whatever they want with it (eg: changing prices on your dispensers or sending money to someone else). This sort of thing only works in MMOs such as Second Life because the scripts actually run on the server, which mean they are mostly safe (still, it asks for permission for the owner before doing it). Yes EQU8 would catch most cases but still, this will eventually be abused, since the scripts will always be on the client somewhere in memory.

 

Something I really wish we had though were better dispenser UI, at least to be able to dispense larger quantities (like if I want to buy 10 batches of something). This could also come with a small setting where we could set bulk pricing options, so for example, we could have a setting where the base batch price is 100k quanta, but for 10+ batches it drops to 95k, then for 20+ it drops to 90k, etc.

 

Reverse dispensers would also be very welcome too.

Link to comment
Share on other sites

Hi @Wolfram

Indeed, thanks for your comment! It is indeed a tricky implementation to set up. We would like to add a lot of things you know, but sometimes it takes more time or sometimes it needs a restriction to save the security aspect or the server data exchange ...etc.
This is one of the main reasons why we prefer not to promise things, but to check with you your wishes in order to be able to design a solution adapted between our constraints and your wishes.

As far as the user interface goes, I'm less in the business, but we could add something, like a price reduction rate by tens or something like that; we'll think about that and discuss it with the team.

Link to comment
Share on other sites

Also, something as simple as adding a multiplier to the normal dispenser interface (assuming the limit and cooldown are set to zero) would already be super sweet.

So if I, the seller, set my dispenser to sell you a batch for 9600, you can just have an input to buy that x times..

image.png.bbb42d65f1d68eb75498ce0f498d5fe2.png

As you can see, I am not a graphic design dude :D

Link to comment
Share on other sites

  • 2 months later...

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