Author Topic: System_Syerjchep --- New player list! Chat! New rating system! Other stuff!  (Read 2176 times)

So yes, I have attempted a modification of the default player list.
Said mod adds two extra fields to the player list.
It also let's the server, weather it be by other mods or the host, manually, choose what values they should represent.
The mod is here:
http://www.gamefront.com/files/20139443/System_Syerjchep.zip
And it looks like this ingame:


By default the two buttons will just say "N/A1" and "N/A2" but it relies on a mod to change that.
Here's a modified version of Kalphiter's infinite mining gamemode that makes those values track money and dirt mined:
http://www.gamefront.com/files/20139446/Gamemode_Mining.zip
The way this works is by adding code into the script like this:
Code: [Select]
if(!$syj::loadedvarprefs)
exec("add-ons/system_syerjchep/server.cs");

$syj::loadedvarprefs = 1;
$syj::varprefoverride = 1;
$syj::primarytitle = "Money";
$syj::secondarytitle = "Dirt";
$syj::primaryvar = "mineMoney";
$syj::secondaryvar = "dig_dirt";
That is at the start of the gamemode script.
The first two lines check to see if the mod has been executed yet, if not, execute it.
The rest tell the mod that the prefs don't need to be reset and what values to use.
The "title"s are the names of the buttons that clients will see on their new player lists.
And the "var"s are the actual vars. Taken as a child of the client. If one of my vars was "money" the mod would update with '%client.money' each time.
Then, at the position in the script where the player's money and dirt count are updated, there is this script:
Code: [Select]
   updatefirstsr(%obj.client.bl_id);
   updatesecondsr(%obj.client.bl_id);
Which tell the mod when to update the values, rather than just using a loop for every update.

The mod also takes trust values, button clickability, and side button functions from the old list.
The mod will not add an index to the new player list that has a BL_ID that was not on the old list, to prevent abuse.
The mod disables itself in servers that do not have the mod themselves, and enables it on servers that do.

I have posted this in Mod. Discussion because I feel I still need more testing before I post it in add-ons.
If you find any bugs or problems just tell me and I will fix them, though I have tried to test this myself, it was often in
single player, which makes less applicable results.
« Last Edit: March 20, 2011, 03:09:39 PM by DrenDran »

By default the two buttons will just say "N/A1" and "N/A2" but it relies on a mod to change that.
If it doesn't already it should just hide the buttons when they aren't set or the server doesn't have the mod.

If it doesn't already it should just hide the buttons when they aren't set or the server doesn't have the mod.
If the server doesn't have the mod, it uses the old player list.
If it hasn't set anything, it defaults to calling the buttons N/A1 and N/A2 and having no values below, though I guess I could change that.

Could you make this work with VCE aswell?

Could you make this work with VCE aswell?
Every VCE variable is actually a player variable, I believe.

Could you make this work with VCE aswell?
Because it uses eval, you could do this:

$syj::primaryvar = "a;%ret = \"VariableGroup_\"@%client.bl_id@\".getVariable(Client,nameofyourvariable,\" @ %client @ \")\"";

Replace nameofyourvariable with the name of the variable. This is untested. It might not work.

For a player variable, replace Client with Player, and %client with %client.player:

$syj::primaryvar = "a;%ret = \"VariableGroup_\"@%client.bl_id@\".getVariable(Player,nameofyourvariable,\" @ %client.player @ \")\"";


Every VCE variable is actually a player variable, I believe.
They're stored in an object.

Helpful. Make sure to have a way to check if the client has the mod or not, so you know whether or not to display those variables to the client manually. Maybe even make it possible to load more values on the GUI. Like have an option to change N/A1 and 2 to 3 and 4 and so on.

Helpful. Make sure to have a way to check if the client has the mod or not, so you know whether or not to display those variables to the client manually. Maybe even make it possible to load more values on the GUI. Like have an option to change N/A1 and 2 to 3 and 4 and so on.
Not sure if the GUI could fit that much.

Also would it would be nice if you put score after BL_ID and Trust.

Because it uses eval, you could do this:

$syj::primaryvar = "a;%ret = \"VariableGroup_\"@%client.bl_id@\".getVariable(Client,nameofyourvariable,\" @ %client @ \")\"";

Replace nameofyourvariable with the name of the variable. This is untested. It might not work.

For a player variable, replace Client with Player, and %client with %client.player:

$syj::primaryvar = "a;%ret = \"VariableGroup_\"@%client.bl_id@\".getVariable(Player,nameofyourvariable,\" @ %client.player @ \")\"";


They're stored in an object.
Looks intresting, but I haven't really worked with VCE so I'm not completly sure of it's operation.
Also would it would be nice if you put score after BL_ID and Trust.
Seems like a simple change, sure.
Are you using the mod?

Also, has anyone found any bugs yet?

Seems like a simple change, sure.
Are you using the mod?
No, I haven't been playing Blockland recently.

Also, the change is simple as moving the buttons around and changing the numbers of the columns.

They don't have to be from lowest to highest.

0 10 60 300 100
The 5th column will show up before the 4th, but will still be the 5th field.

So, would this work to see if certain players have a VCE variable?

So, would this work to see if certain players have a VCE variable?
Yes, if the line I put there works.

I suppose I could quickly test it out.

No what I did wont work.

So, would this work to see if certain players have a VCE variable?
What do you guys mean a VCE variable?
It works with anything that can be done as a child of a client object. Thus any variable, method or tagged, and of course any variable of the player of the client, may be displayed.

What do you guys mean a VCE variable?
It works with anything that can be done as a child of a client object. Thus any variable, method or tagged, and of course any variable of the player of the client, may be displayed.
VCE variable as in from Event_Variables.

However, all the values said add-on modifies is a child of a scirpt object, rather than the client object.