SRL Archive - SRL Suggestions

Random world loading?


tarajunky

2011-02-27 01:16:04

Some recent update is now making SRL choose a world during character login. I think this is kind of annoying. What if I don't want the script to run on a Lithuanian server? What if a laggy server messes up the script? Or what if it loads a world that's swamped with java bots at the location you want to use?

I do specify a world number in my scripts, but SRL doesn't choose that world, it's some random server.

Is there some new variable that I need to change, so that SRL won't mess with the server selected?

Flight

2011-02-27 01:28:27

Isn't this an issue to do with Smart rather than SRL? I thought it was Smart that chooses the world, ect…

Daniel

2011-02-27 02:06:12

From: Flight
Isn't this an issue to do with Smart rather than SRL? I thought it was Smart that chooses the world, ect…


No. SRL loads the worlds' URL so SMART can grab the client iirc.

tarajunky

2011-02-27 02:07:03

No, it's during the SRL LoginPlayer procedure. It never used to do this. Before it would log into the lobby, then click on the "Click Here To Play" button and proceed.

Now after SMART loads, SRL logs into the lobby, changes to the Server screen, and picks a random world before clicking on the "Click Here to Play" button.

Wanted

2011-02-27 02:15:09

The only thing in SRL that was even touched was the .Member choosing a random world even if it's set to False (which unset)

SMART_Server does not chose what world you use unless you are using unsigned (which almost no one uses). This has nothing to do with SMART in any way.

http://villavu.com/forum/showpost.php?p=783307&postcount=3

if you want to log into… say, a specific free player world do this

Players[0].CurrentPlayer.WorldInfo := [False, WorldNo];

just setting Member := True or not setting it (False) will result in a random world selection of a F2P world.

If you wish to not use the world switcher I will add a variable called DisableWorldSwitcher to SRL, I can even make it default set to true in SetUpSRL.

Really nothing has changed in SRL's login in some time, you just never noticed it before because of a small adjustment.

TomTuff

2011-02-27 02:21:23

This is HIGHLY annoying. PLEASE make it non-default.

Wanted

2011-02-27 02:34:50

Whatever, Cheers.

http://villavu.com/forum/announcement.php?a=27

tarajunky

2011-02-27 02:41:31

Yeah, a global DisableWorldSwitcher variable would be appreciated.

But I really don't understand why SRL would ever assume that it needs to change the server, unless you specifically tell it to do so.

If .Member or .WorldInfo aren't declared, it should assume that the server selected is appropriate and leave it alone. Then another global wouldn't be necessary.

Wanted

2011-02-27 02:49:58

From: tarajunky
Yeah, a global DisableWorldSwitcher variable would be appreciated.

But I really don't understand why SRL would ever assume that it needs to change the server, unless you specifically tell it to do so.

If .Member or .WorldInfo aren't declared, it should assume that the server selected is appropriate and leave it alone. Then another global wouldn't be necessary.


.Member is declared False automatically.

The reason for this was simple. Most scripts do not utilize world switching properly or at all. So if world info is defined for one player it would switch to a members world then the next player would go and try and log in to a members world and thus fail.

This (very small) update was put in place so that the script users could have SRL do all the world switching automatically without having to dissect scripts to implement world switchers to accommodate their armies/needs.

But it should be possible for people to disable the world switcher if they wish not to use it, hence the announcement thread here: http://villavu.com/forum/announcement.php?a=27 people wishing to use the world switcher will have to add the line WorldSwitcherEnabled := True; to their script.

There is nothing wrong with the system in place, people just need to learn how to use it properly.

tarajunky

2011-02-27 03:01:17

I don't have WorldSwitcherEnabled:=True in my script, but it still does this.

This (very small) update was put in place so that the script users could have SRL do all the world switching automatically without having to dissect scripts to implement world switchers to accommodate their armies/needs.


Yes, even if you don't want it to, apparently. Look, if I search through 10 different worlds and find a good one to use, then I have to go through and change the WorldInfo settings for every player? And every time I want to run the script I have to go through and enter this information for every player? That seems a lot more onerous than "dissecting scripts" ONE TIME to implement a world switcher.

Wanted

2011-02-27 03:07:49

From: tarajunky
I don't have WorldSwitcherEnabled:=True in my script, but it still does this.



Yes, even if you don't want it to, apparently. Look, if I search through 10 different worlds and find a good one to use, then I have to go through and change the WorldInfo settings for every player? And every time I want to run the script I have to go through and enter this information for every player? That seems a lot more onerous than "dissecting scripts" ONE TIME to implement a world switcher.


Hence why the announcement thread has taken affect, update your SRL and this should no longer occur for you unless you have enabled the worldswitcher. You could also simply do a for do loop to change every player or use a constant for every player.

tarajunky

2011-02-27 03:25:48

The update is not yet available through the Simba SRL updater, but I did a svn update and it is now working as advertised. I haven't done an svn update in a while, I guess I'm spoiled by Simba's updater functionality.

Thanks.

Wanted

2011-02-27 03:26:45

From: tarajunky
The update is not yet available through the Simba SRL updater, but I did a svn update and it is now working as advertised. I haven't done an svn update in a while, I guess I'm spoiled by Simba's updater functionality.

Thanks.


I think it takes 15 minutes or something for the auto updater to pick up SVN changes.

Feroc1ty

2011-02-27 03:27:36

This is the same exact issue that makes my script get stuck at LoginPlayer procedure, random world is fucked up, selects world tab and sits there all day without doing anything.

Wanted

2011-02-27 03:30:14

From: Feroc1ty
This is the same exact issue that makes my script get stuck at LoginPlayer procedure, random world is fucked up, selects world tab and sits there all day without doing anything.


This is not the exact same issue you are having. People here wanted the ability for it not to select worlds at all when logging in.

No one ever said anything about it getting stuck/ not working.

Whatever problem you are having in regards to LoginPlayer getting stuck I am unable to recreate and therefore unable to solve.

My guess is you have favorite worlds.

Train

2011-02-27 03:31:21

From: Feroc1ty
This is the same exact issue that makes my script get stuck at LoginPlayer procedure, random world is fucked up, selects world tab and sits there all day without doing anything.


I'm guessing you have favorite worlds? -.-

Feroc1ty

2011-02-27 03:39:27

From: Train
I'm guessing you have favorite worlds? -.-


am i not allowed to have favorite worlds?


checking to see if not having a fav world fixes this

Wanted

2011-02-27 03:41:10

From: Feroc1ty
am i not allowed to have favorite worlds?


checking to see if not having a fav world fixes this


You can have favorite worlds, but the world switcher isn't going to work.

Feroc1ty

2011-02-27 03:42:27

okay, so you guys don't see a problem with that?

anyways, it was fixed (now that i removed a favorite world, which is quite stupid in my opinion,) and the first damn thing the script does is pick a pvp world… rofl

Train

2011-02-27 03:42:29

From: Feroc1ty
am i not allowed to have favorite worlds?


checking to see if not having a fav world fixes this


I just laughed so hard I woke up everyone in my whole house. Thanks for the laugh man.

Wanted

2011-02-27 03:47:14

From: Feroc1ty
okay, so you guys don't see a problem with that?

anyways, it was fixed (now that i removed a favorite world, which is quite stupid in my opinion,) and the first damn thing the script does is pick a pvp world… rofl


loading a pvp world = problem with the worldarray updater.
Failsafe for that is going to be committed soon, and is rare.

Having favorite worlds isn't exactly the easiest thing to implement into world switching. Take a look through worldswitcher.scar at the algorithms used to scroll the list etc. It's not as simple as having the script just autodelete all your favorite worlds, someone would end up not liking that and complain etc. etc.

Feroc1ty

2011-02-27 03:58:31

im just glad i figured out what was causing all the issues, so when is simba auto updater gonna update? i wanna get that world switcher thing working for my script

Wanted

2011-02-27 04:00:16

From: Feroc1ty
im just glad i figured out what was causing all the issues, so when is simba auto updater gonna update? i wanna get that world switcher thing working for my script


I honestly have no idea.

You could update your SRL with SVN instantly at any time.

Harry

2011-02-27 13:31:13

What was wrong with the previous method of "if .WorldInfo is set, switch; if not set then don't"?

Wanted

2011-02-27 13:33:41

From: Harry
What was wrong with the previous method of "if .WorldInfo is set, switch; if not set then don't"?


From: IceFire908
.Member is declared False automatically.

The reason for this was simple. Most scripts do not utilize world switching properly or at all. So if world info is defined for one player it would switch to a members world then the next player would go and try and log in to a members world and thus fail.

This (very small) update was put in place so that the script users could have SRL do all the world switching automatically without having to dissect scripts to implement world switchers to accommodate their armies/needs.

But it should be possible for people to disable the world switcher if they wish not to use it, hence the announcement thread here: http://villavu.com/forum/announcement.php?a=27 people wishing to use the world switcher will have to add the line WorldSwitcherEnabled := True; to their script.

There is nothing wrong with the system in place, people just need to learn how to use it properly.


Its the exact same thing as it is now, only Member := False (which is also unset) and not just Member := True changes the world if the world switcher is enabled.

Harry

2011-02-27 13:45:39

Yeah, but WorldSwitcherEnabled is False by default. The current system is exactly like how it was before, only with extra vars the scripter would have to set. The scripter would have to know about var WorldSwitcherEnabled, and if they did know of that, they could just set .WorldInfo if they want switching…. it just adds more confusion I think.

I agree with Tarajunky that it should be disabled by default, and that you shouldn't set the .WorldInfo if the scriper does not choose to set it themselves. :V

Nava2

2011-02-27 13:48:48

In regards to Ferocity's comments, perhaps we should have a warning occur if there are favourite worlds.

The hanging is an issue… I think it should just basically just return false, but still allow LoginPlayer to progress as you can still login regardless.

E: The point of .WorldInfo was actually for end users rather than scripters. By adding in this new variable we have now changed the responsibility. I disagree with this.

I think we should have the responsibility in the users perspective. This makes more sense to me. I actually disagree with the new variable. But I think that checking if the length of the .WorldInfo is 0 would be a fair check to do the same thing as setting it to be false.

Nose Smasher

2011-02-27 13:56:34

What exactly is the reason why it hangs when one has a fav world (or 2)?

Wanted

2011-02-27 17:37:59

Alright, I've updated SRL to only need EnableWorldSwitcher if you're expecting it to switch worlds by using .Member, if you use WorldInfo it will do it automatically.

http://villavu.com/forum/announcement.php?f=202

Feroc1ty

2011-02-27 21:18:19

I have WorldSwitcherEnabled := true yet the dumb switcher switches my world anyways; and here's the reason why.

if (WorldSwitcherEnabled) then
if (Length(Players[CurrentPlayer].WorldInfo) < 1) then
Players[CurrentPlayer].WorldInfo := [Players[CurrentPlayer].Member, 0, AllowPVP];

case Length(Players[CurrentPlayer].WorldInfo) of
2: SelectWorld(Players[CurrentPlayer].WorldInfo[1]);
3: begin
if (Players[CurrentPlayer].WorldInfo[0]) then
B := True
else
B := False;
if (Players[CurrentPlayer].WorldInfo[2]) then
BB := True
else
BB := False;
SelectWorld(RandomWorld(B, BB));
end;
end;

It makes no fucking difference if you have it enabled or disabled, still does the same fucking shit, why can't my login player procedure do what it's supposed to do and login the player, not change my shit around or select some random world (2/4 of the times i used it, it picked a pvp one btw)

edit: sorry about my rage but i though srl functions were supposed to be upgraded and useful, i just removed the whole world switcher snippet from my include and its working perfectly to my needs.

Wanted

2011-02-27 21:24:58

From: Feroc1ty
I have WorldSwitcherEnabled := true yet the dumb switcher switches my world anyways; and here's the reason why.


Well if you have world switcher "enabled" := true then it going to change your world.

If you don't want enabled then use WorldInfo, it's now the same system it was a few days ago and the only difference is there's an extra var for people who want to use .Member to change world for them, it's completely optional.

You're raging because you failed to understand something so simple, calm down, think, and be rational.

Feroc1ty

2011-02-27 21:27:09

From: IceFire908
Well if you have world switcher "enabled" := true then it going to change your world.

If you don't want enabled then use WorldInfo, it's now the same system it was a few days ago and the only difference is there's an extra var for people who want to use .Member to change world for them, it's completely optional.

You're raging because you failed to understand something so simple, calm down, think, and be rational.


ever since its been in place it's been completely shitty, starting with no favorite worlds to pvp worlds to changing worlds when it doesnt need to

Wanted

2011-02-27 21:28:27

From: Feroc1ty
ever since its been in place it's been completely shitty, starting with no favorite worlds to pvp worlds to changing worlds when it doesnt need to


Don't put WorldSwitchEnabled := True in your script and you won't notice any difference, are you done making yourself look foolish yet?

Jason2gs

2011-02-27 21:56:23


Harri: thanks babe.

YoHoJo: love ya.

Train

2011-02-27 21:58:25

Bad image. EDIT: O nvm, visit the site first.