Jump to content

Very important question


Ihnify

Recommended Posts

  • Scripting Moderators
33 minutes ago, Ihnify said:

Is there a difference in performance if the entire mod is in 1 resource, or consists of several. Or who is comfortable?

One resource:

No need for use exports (which are slow) or triggers.

Direct access to functions.

If you want to introduce/change something - you need to restart whole mod.

Several resources:

In order to have all functionality exports are needed or triggers.

Using functions through exports/triggers (if function is in other resource).

If you want to introduce/change something - you just restart desired resource.


In other words, one resource for best performance, or several resources for elasticity.

33 minutes ago, Ihnify said:

And how relevant is it https://luac.multitheftauto.com/

LUAC compiles (and obfuscates code if selected), compiling script converts it directly to Lua bytecode, therefore client/server doesn't need to do that.

Edited by majqq
  • Like 1
Link to comment
16 minutes ago, majqq said:

One resource:

No need for use exports (which are slow) or triggers.

Direct access to functions.

If you want to introduce/change something - you need to restart whole mod.

Several resources:

In order to have all functionality exports are needed or triggers.

Using functions through exports/triggers (if function is in other resource).

If you want to introduce/change something - you just restart desired resource.


In other words, one resource for best performance, or several resources for elasticity.

LUAC compiles (and obfuscates code if selected), compiling script converts it directly to Lua bytecode, therefore client/server doesn't need to do that.

how can I protect my scripts, if possible in more detail

Link to comment
  • Scripting Moderators

Just compile them with highest level of obfuscation. For client-side scripts use cache="false" in meta.xml aswell.

Edited by majqq
  • Like 1
Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...