This object is in archive! 

[Scripts] How to make scripts viable in multiplayer? Script PCU cost!

Usernamenotshown shared this feedback 12 months ago
Not Enough Votes

As fas as I know, scripts are disabled in servers because they cause lag, right? What if lightweight functions had a low PCU cost and heavy functions had a high PCU cost? It's probably complex to estimate the exact impact of code, given the infinite combinations it can produce, but please consider it. How resource-intensive can a solar tracker be?

Replies (2)

photo
1

Most servers permit players to run scripts. Maybe you are referring to the Keen servers? I don't know, since I don't play on them. But every server I do play on, permits scripts.

You are correct that assigning PCU based on script complexity is "pretty complex." This is an actual field of study in computer science -- to algorithmically determine the complexity or efficiency or quality of source code -- and there are currently no serviceable solutions.

photo
1

It is possible to assign a cost to each instruction or some instructions inside a script (similarly to how code running on decentralized networks like Ethereum have gas costs to run it). So it's not impossible but yea, it is way too complex for this purpose. I wonder how servers that allow scripts keep players from abusing them. I'm assuming it involves the manual work of admins to some extent

photo
photo
2

I think a workable solution might be to allow servers to whitelist scripts that are known to be "safe".

Leave a Comment
 
Attach a file