Solved Plugin Magma

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Py is easy too and you can write everything in less code. Lua stinks. Oxide devs know that too. Thats ehy they copy pasted all our engines atm. xD

Sent from my Samsung Galaxy S4
 

MasterPeace

Retired Staff
Retired Staff
Feb 2, 2015
269
69
28
45
Poland
I think that by adding more languages you just complicating whole module. For me Javascript + Python + C# is even too much. Should be only JS + C# or PY + C#.

But almost all scripts are now in PY, and some in JS, so just leave it like it is. Just please add SQL databases. Think about that you could maybe manipulate MySQL or SqLite database by Rust server and PHP website at once. What that mean?

With proper configuration and webmaster knowledge (like me) you can:

- Make panel admin on website to manage players VIP / Admin / Moderator, even Ban or Kick with proper plugin (with checker if kick request is in database)
- Make some Players online / SErver status graphics, like it should be with game servers
- Make even Players stats graphics for bigger servers
- Make advanced stats for websites like C4 usage, C4 crafting, to check in admin panel on website, not in rust or stupid logs,
- Editable databases - you can just download to your PC, open with software, edit what you want, add what you want, remove what you want, upload back to server
- No more random wipes, like with ini files
- No more ini files
- Freedom.

I will probably not be online anymore when you add it, but maybe someone will do something good from it.
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
I think that by adding more languages you just complicating whole module. For me Javascript + Python + C# is even too much. Should be only JS + C# or PY + C#.

But almost all scripts are now in PY, and some in JS, so just leave it like it is. Just please add SQL databases. Think about that you could maybe manipulate MySQL or SqLite database by Rust server and PHP website at once. What that mean?

With proper configuration and webmaster knowledge (like me) you can:

- Make panel admin on website to manage players VIP / Admin / Moderator, even Ban or Kick with proper plugin (with checker if kick request is in database)
- Make some Players online / SErver status graphics, like it should be with game servers
- Make even Players stats graphics for bigger servers
- Make advanced stats for websites like C4 usage, C4 crafting, to check in admin panel on website, not in rust or stupid logs,
- Editable databases - you can just download to your PC, open with software, edit what you want, add what you want, remove what you want, upload back to server
- No more random wipes, like with ini files
- No more ini files
- Freedom.

I will probably not be online anymore when you add it, but maybe someone will do something good from it.
You can just send DATA from your server (Web.POST("http://google.com/user=" + Player.Name)) to a PHP script on your website to put it into a MySQL.
I'm not sure how you would send data back to the server, Maybe another PHP script
 

Snake

Moderator
Moderator
Jul 13, 2014
288
174
28
You can just send DATA from your server (Web.POST("http://google.com/user=" + Player.Name)) to a PHP script on your website to put it into a MySQL.
I'm not sure how you would send data back to the server, Maybe another PHP script
The same you use to send data should allow you to get it back. Also, Unity has a specific class for that.

http://docs.unity3d.com/ScriptReference/WWW.html

In C# you just need to add reference to UnityEngine.dll to use it. In other languages I guess it's possible too.
 
  • Like
Reactions: MasterPeace

MasterPeace

Retired Staff
Retired Staff
Feb 2, 2015
269
69
28
45
Poland
@Jakkee
if your answer for "get rid of ini", "stop clearing datastore after restart", "make database editable from 2 ways - disc / web", "add possibilities to make more features with Rust <-> Web connection"

is

"keep ini", "still clear datastore after restart", "don't make databses editable from 2 ways, just ini files from disc", "don't add possibilities with Rust <-> Web connection"

- you didn't say anything new. :oops:

But yes, maybe this WEB is something worth to check? It don't get full choice, but some of features would work - I will check it.

@Snake - I think it's not possible even with this WWW. Why? Because only way I see to do that is to create loop, time event, whatever, what would download updated variables from server (like change player to VIP) in minute after minute. You can send, ok, but you can't receive that easily as you sent.
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
@Jakkee
if your answer for "get rid of ini", "stop clearing datastore after restart", "make database editable from 2 ways - disc / web", "add possibilities to make more features with Rust <-> Web connection"

is

"keep ini", "still clear datastore after restart", "don't make databses editable from 2 ways, just ini files from disc", "don't add possibilities with Rust <-> Web connection"

- you didn't say anything new. :oops:
I didn't say anything about getting rid of INI files.
And for the clearing the DataStore on reload is because if a player changes a setting in the INI File it will add it to DataStore on a reload.
Also i do not hold any data in DataStore that needs to be kept, If it needs to be kept I put it in a INI File.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Every file can cause some sort of lagg when It's full. I know that Sqlite would solve that problem. I will have to support Sqlite for ironpython, but It will need a dll reference.
 

Snake

Moderator
Moderator
Jul 13, 2014
288
174
28
@Jakkee
if your answer for "get rid of ini", "stop clearing datastore after restart", "make database editable from 2 ways - disc / web", "add possibilities to make more features with Rust <-> Web connection"

is

"keep ini", "still clear datastore after restart", "don't make databses editable from 2 ways, just ini files from disc", "don't add possibilities with Rust <-> Web connection"

- you didn't say anything new. :oops:

But yes, maybe this WEB is something worth to check? It don't get full choice, but some of features would work - I will check it.

@Snake - I think it's not possible even with this WWW. Why? Because only way I see to do that is to create loop, time event, whatever, what would download updated variables from server (like change player to VIP) in minute after minute. You can send, ok, but you can't receive that easily as you sent.
You can. Of course, it's not a simple line of code. I'm not sure but it has something to do with coroutines. Sending data it's okay, it's just creating a packet and sending it. But receiveing it requires sending a request and then waiting for it. You can't just let the code stop and wait for it, you have to do coroutines.

I need to research a bit on this but it is possible.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
No offense to the LUA users at all seriously.

Even javascript handles a lot of thing better than that. So looking at the interpreters now:

Py > Js > Lua

Python vs Lua

Lua is absolutely unreadable. It is something that was made to look really different than every other languages.

In every modern language, you use the + sign to connect variables.

var = word + word2

In lua you do:

var = word .. word2;

How to check if something is not equal with something:

1 ~= 2

Basic concept that you do in 90% of the programming languages:

1 != 2


But seriously It's just against every programming concept.

Python is thought to be useful as a general programming language while Lua is totally targeted to be an embedded scripting language.

And I didn't even mention the performance.

But LUA wins in the size. It's really small. Due to that size, It has limitations. I would say that you should start practicing some javascript or python. Both languages will make you benefit a lot later.
 
  • Agree
  • Like
Reactions: Jakkee and Snake