SRL Archive - Senior News and General

SRL 5 + BareBones + Leecher Friendliness


Sir R. M8gic1an

2010-06-20 07:21:36

BareBones project by boreas:
http://villavu.com/forum/showthread.php?t=55301

A barebones script? : MiniBury by marpis
http://villavu.com/forum/showthread.php?t=57330

Here's my idea:
Barebones is supposed to be a basic thing that allows people to add modules & functionality to a script.

marpis script has no custom functions. This seems to be a perfect skeleton, no? No flesh whatsoever.

I think we could have a script for each skill, fully SRL based, so it never goes out of date, this could be used as barebones, they would be maintained by SRL devs (through SRL Include) and these such scripts could be put into the SRL include (easier maintenance) and it would make it very leecher friendly, as it would allow anyone who just downloaded SRL to have a choice of scripts to run. Not perfect, but more than good enough to show functionality without much hassle.


eg
Power Miner,
Power Cutter,
Power Fisher,
Power Power Power.

~RM

King of Knives

2010-06-20 08:56:31

I think this could have great public-relations potential. With the release of Simba coming up (or whatever, I'm not so well-informed) having some leecherfriendly material to show off can be a tremendous advantage. I know, it will take some time to develop these Barebones-scripts and put them in SRL. But I think creating leecher- and user-friendly material bundled with SRL can be a good incentive for people to try Simba and SRL, which is just what we need, since people say Simba is pretty leecher-unfriendly.

But with that in mind, some things cross my mind.
For example:
For a PowerCutter, you need a function to find a tree and the same goes for finding rocks in PowerMiners. Does SRL have inbuilt functions like this: "FindMithrilRock" ? Else, it would require a bit of "flesh on the bones", so to speak.

lordsaturn

2010-06-20 13:47:11

Nice idea. Instead of updating the script we would only be updating the functions in the include.

Like King said, will require updatedness of the skills/ folder.

Sir R. M8gic1an

2010-06-20 13:50:49

@KoK

For mining, SRL has FindRock. Similar could be done for the other skills;
Also, one of SRL 5's theme is 'leave nothing empty', meaning no empty files in /skills/

I think all scripts could have a bit of flesh, such as stats and multiplayer and so on, but not anything like world switching, banking and so on.

~RM

King of Knives

2010-06-20 13:59:22

Sounds good, RM. I like that plan for SRL 5.

But it was not because I was sceptical about it, but it's so long since I took a good wander through the SRL Include, and I didn't remember if any such functions existed. But if they exist and work properly, I think the idea of Barebones-scripts is one hell of a winner.
Especially for PR-reasons.

NCDS

2010-06-20 14:51:50

I really like the idea. Generally very easy maintenance, and I really don't see it even taking really that long to make a few power skill scripts.

Would be great to have this addition complete with Simba's release.

Coh3n

2010-06-20 20:26:59

It's a neat idea, but isn't Simba going to have a script database and a button to automatically download SRL? So with the click of a couple buttons, the user has SRL and whatever scripts are available (which will include MSI & all the power scripts). I'd call that pretty leecher-friendly.

Narcle

2010-06-20 20:47:47

Going off what Coh3n said, it could be neat/good but I think it would make SRL 5 too bloated, and we already have the script database that's going to be implemented. To keep the scripts updated I believe that's what SRL Guild Membership is for. I'll be trying to upkeep at least 2 of my color scripts for it as well (AK Smelter).

Coh3n

2010-06-20 21:21:41

From: Narcle
Going off what Coh3n said, it could be neat/good but I think it would make SRL 5 too bloated, and we already have the script database that's going to be implemented. To keep the scripts updated I believe that's what SRL Guild Membership is for. I'll be trying to upkeep at least 2 of my color scripts for it as well (AK Smelter).

Yeah and as long as I'm around, MSI won't ever go out of date. :D

Dan Cardin

2010-06-20 21:44:49

This makes sense. It kind of shows off what SRL can do without any actual user input in the form of scripts. The thought of easy scripts that never go out of date is nifty as well. Even then, people don't have to use it, it can just serve as a generic starting point for people that want to get into scripting or don't want to have to deal with the simple things when making a new script. It's not as if there will be hundreds of these scrips, so i doubt it will add bloat anyway.

Sir R. M8gic1an

2010-06-21 05:34:16

From: Dan Cardin
Even then, people don't have to use it, it can just serve as a generic starting point for people that want to get into scripting or don't want to have to deal with the simple things when making a new script.


^ This. Hopefully some time soon boreas will have the time to explain how much can be learnt and gained from barebones. I'd post his explanation but I'm in Poland without access to my logs.

The basic idea is that barebones would allow people to make scripts quickly, focusing and what they'd rather practice.

eg: From the barebones powerminer I can make a VEM (practice walking) or I can make a superheater + miner in karamja and so on.

~RM

The Claw

2010-06-21 11:21:40

Kind of like http://villavu.com/forum/showthread.php?t=54623 ?

King of Knives

2010-06-21 12:48:57

From: Rasta Magician

eg: From the barebones powerminer I can make a VEM (practice walking) or I can make a superheater + miner in karamja and so on.
~RM


I think we should limit the Barebones scripts to Powerskillers. Giving the leechers a script that can both mine and bank for them is just too much. Imagine giving a leecher a script that never gets seriously outdated and is able to mine and bank your ores. The leecher would never return to the forums! So I say we stay at Powerskillers.
Mine - drop
Chop - drop
Fish - drop
Stop - drop - AND ROLL.

-Knives

Town

2010-06-21 14:50:58

Since SRL still supports all of the banking functions, the only thing between a powerskiller script and a banking script is walking.

Put into action, this would be a great way to show programming basics to incoming scripters. There's no better example than writing up this:


whichrock = coal;
begin
repeat
repeat
MineRock(whichrock);
until(invfull);
DropRocks;
until(false);
end.

And having that compile.

Boreas

2010-06-21 15:17:18

TL;DR: Imagine Jim's journey as he learns scripting. Imagine a line graph showing how much he knows about scripting on the X axis (or time spent learning scripting), and how what kind of script (RS? Auto-Ban? Player Swicthing?) he can produce on the Y axis. Notice the low part on the left. What if he gives up before he gets past that part? Now imagine what a lot of Jims could do if they could contribute a little more with a little less knowledge/time.

As we all know, there are several levels in the community; lurker, script users, poster, tester, script learner, script modifier, script writer, semi advanced script writer, advanced script writer, developer. Each group is smaller than the last, as only a certain percentage makes each jump. For years we have tried to help people make these jumps, and increase these percentages to increase activity and improve the community overall. While this is still important, I was thinking that we could do more to help out the people that don't make the jump, and stay in one of the lower groups. These groups are huge, and just because someone doesn't fully make it to 'scripter level' it doesn't mean they aren't willing to contribute (more than just testing). So while script managers and the like make it easier for new people to use scripts, we can also make it easier for new people to put together something that actually works well on RS.

My hope is for a layer over SRL (this is where MSI comes in), that can make it ridiculously easy to throw together a script (obviously not for SRL Member Apps). Experienced scripters may forget this, but it is a pretty big difference between knowing pascal syntax and actually writing a fully featured script. Luckily, a lot of what goes into a fully featured script can be the same. For example, DeclarePlayers (or the form version) and other setup stuff, stats, player switching, break handling, main loop. All this could be in a skeleton

GoToPlace
DoStuff
GoToBank
DoBank
LoopStuff

DoBank could be like DoBank(1 mould, 27 gold bars), and if the inventory currently contained 5 gold bars, 3 gold rings and a mould, it would know to deposit the rings, and withdraw 22 gold bars.

Beginners could then copy/paste modules into DoStuff etc, which they get from MSI/BareBones or SRL/Skills or a module request forum. In some cases, this would literally be all that is needed to make a new combination of pre-existing code. As their skill progresses, they can make tweaks, and eventually write their own modules. Even if their skill does not progress to writing their own scripts, at least they still have done a little (and in such big groups, a little adds up).

As a community on the whole, I think this would be more efficient use of effort. I mean we really don't need everyone to write their own DoFurnance function. More advanced scripters can continue to write their scripts the regular way, or they can contribute to modules or the skeleton. More complicated scripts do not fit in the skeleton, but 90% do.

King of Knives

2010-06-22 17:27:32

For fucks sake, Boreas? I feel like smacking you with a blunt object square in the face so we're on the same level of intelligence. Where does this stuff come from :p ?
I'm pretty much entirely in support of Boreas' idea, but I still think a Barebones script or two in SRL wouldn't hurt, as to show the newcomers how it actually works (and works well!)

-Knives
(For those who, like me, occasionally like to turn down their brain-usage, I didn't mean anything bad about Boreas. I would never hit him with a shovel either.)

marpis

2010-06-22 18:24:47

Why not just make a few simple scripts like my MiniBury and add them to SRL separately?

Here's a few I will make and let them rely 100% on SRL:
  • Burier Already done
  • Fletcher as fast as I get a PIN
  • Alcher
  • Superheater

And will take like 20 minutes per script including testing.

Town

2010-06-22 18:53:52

I think the idea is to not have entire scripts, but to have very large blocks of code precreated. This way members who now can barely make a script, can easily put together these blocks of code to create scripts that do what they would like. The "modules" as Boreas put it would house functions like "MineRock", "MineLoadofRocks", or even "MineThenDropRocks". It's not quite the equivalent of premaking scripts, since these blocks of code can be manipulated in whatever way the user wants.

Narcle

2010-06-22 18:55:31

Well if do do "bare bone scripts" I suggest to have at least all the simple ones then.

marpis's list plus any others where u just stand there next to the bank or in one area i.e.
-Potion making
-Power miner, woodcutting etc.

I could see maybe at most 10 scripts? (small scripts)

Sir R. M8gic1an

2010-06-22 19:17:22

These small scripts would indeed be very easy to make. Would also help us make sure we keep /skills/ updated. When I have the time (back in brussels) I'll be working on MSI's Fisher, therefore if it hasn't been done by then I can pretty much look at a barebone power fisher as well.

~RM

The Claw

2010-06-23 00:16:51

The small scripts just need one script as the backbone, because the logic for each is pretty similar. So you'd get smaller modules which can be included/coded into the backbone easily, and the only difference for the end user is they select what they want to do in declareplayers.

From: marpis
Why not just make a few simple scripts like my MiniBury and add them to SRL separately?

Here's a few I will make and let them rely 100% on SRL:
  • Burier Already done
  • Fletcher as fast as I get a PIN
  • Alcher
  • Superheater

And will take like 20 minutes per script including testing.


repeat
DoALoop (cases to determine what - could be alch x times, mine a load, make a load of potions)
Antirandoms
DoAnotherLoop (cases again - could be continue alching, or drop the ore, or bank the potions, or withdraw bones depending on module selected)
until False

The backbone would be something like http://villavu.com/forum/showthread.php?t=54623. Basically what I'm getting at is that theres no point in coding declareplayers, main loops, all that stuff that doesnt change when the logic is very similar for each script and it makes more sense to just add in scripts as modules.

So rather than having 10 "little" scripts, have 1 backbone which contains all the modules/the ability for more modules to be added. That way it can be multiplayer and you can have 1 person powermining, switch to next person who alchs, etc. Depending on what you want each character to auto.

I'm seeing no disadvantages to having them all in the one script coded as modules and many disadvantages to having lots of little scripts (all players have to do the same thing, harder to update, probably inconsistent logic across them all, more effort on the end user having to download and find them etc)

NCDS

2010-06-23 00:23:22

From: The Claw
The small scripts just need one script as the backbone, because the logic for each is pretty similar. So you'd get smaller modules which can be included/coded into the backbone easily, and the only difference for the end user is they select what they want to do in declareplayers.



repeat
DoALoop (cases to determine what - could be alch x times, mine a load, make a load of potions)
Antirandoms
DoAnotherLoop (cases again - could be continue alching, or drop the ore, or bank the potions, or withdraw bones depending on module selected)
until False

The backbone would be something like http://villavu.com/forum/showthread.php?t=54623. Basically what I'm getting at is that theres no point in coding declareplayers, main loops, all that stuff that doesnt change when the logic is very similar for each script and it makes more sense to just add in scripts as modules.

So rather than having 10 "little" scripts, have 1 backbone which contains all the modules/the ability for more modules to be added. That way it can be multiplayer and you can have 1 person powermining, switch to next person who alchs, etc. Depending on what you want each character to auto.

I'm seeing no disadvantages to having them all in the one script coded as modules and many disadvantages to having lots of little scripts (all players have to do the same thing, harder to update, probably inconsistent logic across them all, more effort on the end user having to download and find them etc)


I was kind of under the impression that's what would be done all along. Anyways, that's the idea I agree with. Very simple, very basic, yet effective.

Sir R. M8gic1an

2010-06-23 05:14:10

I disagree with the claw..

If I was wanting to write a VEM, and I had a 'MiniMiner' I would use that as a starting point and develop it from there. I wouldn't want some scary big script full of cool logic and cases and a million modules for me to start a new script.

Here's my list of thoughts:
  • Barebones would be distributed with SRL, allowing easy access to scripts (by leechers)
  • Barebones would be extremely simple in design, allowing new scripters to easily add features to it
  • Barebones would be 100% SRL/Simba based, making it unbreakable except if SRL is broken
  • Barebones is aimed at teaching new scripters and increasing productivity
  • Barebones is not aimed at providing excellent scripts for newbs

A few more things to add:
Me & Boreas had talked about the possibility of MSI & Barebones working together to both reach our aims.

This would require a clear separation between the two projects to ensure they cover their original aims, but the thinking was that MSI is providing a quite healthy second layer on top of SRL and therefore it would be very easy to make a script using the SRL & MSI Includes together.

I would be happier if the parts of SRL for which MSI would be useful for barebones were just simply updated in SRL, rather than using MSI, as MSI is supposed to be a script and not an include. However, if boreas wants to use MSI to give barebones a kick-start I don't think there would be opposition to it.

And finally, yesterday I was playing with the idea of having MSI & Barebones distributed with SRL, as both are community projects, open source, reliable and serve a purpose for this community.

~RM

The Claw

2010-06-23 05:59:28

If I was wanting to write a VEM, and I had a 'MiniMiner' I would use that as a starting point and develop it from there. I wouldn't want some scary big script full of cool logic and cases and a million modules for me to start a new script.


That's why the modules would come seperately, which is what people would script.

So a standard script like you guys are saying, perhaps a seperate subversion for the "modules". The barebones script would include a file, Modules.simba, which would do what SRL.simba does - include each other module, and initialise some variables so ideally the end-user would just have to set 1 thing - Players[0].Action := 'WizzupEssenceMiner' for example. This would tell the script to use the modules for Wizzup's essence miner, which would be in a seperate file in the subversion (helps with updating as well - a couple of clicks to update all the scripts/modules at once rather than going on to the forums, downloading a script, saving it, repeat).

The modules would be built using MSI/SRL. There would have to be some standards for multiple modules to be used at once, like always leaving a character at a bank. Each module could get as complex as they need to be, because theres no limit on the number of functions etc each module can include in itself and use.

So for an end-user to set up a script, they would download the subversion's etc and edit the main bare-bone script and tell it what modules to use - this would be as simple as filling in declareplayers. It would be possible to: run each module a set number of times, or run a module then move onto another for a set number of times for example: mine some iron at VEM (module leaves character in bank), move onto superheating ore a few times (with coal we already have), go mine some ore again, repeat. Or mine, chop some trees, then alch, then walk to catherby and fish, then get a new slayer task and complete it, then go mine again :D. Just by filling out a few lines in this standard script, because all modules would be included.

Coding of modules would have to fit the logic and limitations needed, but other than that would be no different to coding a normal function which uses other functions - MSI would benefit this greatly. Both multiplayer and single player autoing would be extremely flexible too. Have 1 char mine, 1 woodcutting, the first mining go woodcut, etc.

tl;dr - A way of combining all scripts, barebones, MSI and SRL into a giant "do-everything" bot. :p

Sir R. M8gic1an

2010-06-23 06:14:06

hummm.. I now see where you're going..


begin
DeclarePlayers;
repeat
NextScript(VEM, [ORE_IRON, ORE_COPPER, ORE_TIN]);
NextScript(SuperHeater, [BAR_BRONZE]);
NextScript(GE_Sell, [BAR_BRONZE, ORE_IRON]);

if BestTool(Skill_Mining) <> Players[CurrentPlayer].Integers[P_TOOL] then
NextScript(GE_Buy, [RUNE_NATURE, BestTool(Skill_Mining)
else
NextScript(GE_Buy, [RUNE_NATURE]);
until(AllPlayersInactive)
end.

Would this translate your thoughts into code?

~RM

The Claw

2010-06-23 06:34:18

Yea sort of.

begin
DeclarePlayers;
repeat
DoSomething(Players[CurrentPlayer].Action, [Players[CurrentPlayer].VarsNeededForModule]);
DoReport(Players[CurrentPlayer].Action)
until False;
end;

and in Modules.simba:

{.include Modules/Sudoku.simba}
{.include Modules/VEM.simba}

procedure DoSomething(WhatDo: String)
begin
case WhatDo of:
'VEM': VEMModule;
'Sudoku': SudokuModule;
end;
end;

And in VEM.simba:

procedure WalkToMine
begin
..
end;

...

procedure VEMModule
begin
WalkToMine;
Mine;
WalkToBank;
end;

So by having the same player Declared 3 times, each time with a different action, it will go and do three different things. If desired.

marpis

2010-06-23 07:04:52

Tell me the downsides of making several 100-line scripts? It will be easiest for the user to go to the /SRL/Scripts/ and pick Fletching.simba, Burier.simba etc.
And those small scripts would be so much easier to modify than this module system. In the module system, user would have to go to different files.

Sir R. M8gic1an

2010-06-23 07:05:12

Well, MSI will support ScriptSwitching, therefore no need to declare the player three times.

I think it's completly possible to do what you're suggesting, although the picture I had in mind for barebones was of smaller scripts. Simpler scripts.

Meaning they would use lower level modules, not at such a high level.
I think that if such high level modules are used, you are looking more at 999s of scripts produced with little learning, rather than 100s of scripts with some learning.

~RM

Boreas

2010-06-23 08:28:43

From: Rasta Magician

I would be happier if the parts of SRL for which MSI would be useful for barebones were just simply updated in SRL, rather than using MSI, as MSI is supposed to be a script and not an include. However, if boreas wants to use MSI to give barebones a kick-start I don't think there would be opposition to it.


I don't mind either way, especially as I'm not active enough to have a vote. Basically whatever you guys think is the easiest way for a new person to make a fully functioning RS script in an hour instead of a 50 line practice script for a flash game.

I just thought of a little add on to this; a script release guide. It would tell them how to create a script release thread with a standard format of what this script does, instructions, requirements etc, signing up for stats. Anything to encourage them to post their script.

The Claw

2010-06-23 08:35:19

From: marpis
Tell me the downsides of making several 100-line scripts? It will be easiest for the user to go to the /SRL/Scripts/ and pick Fletching.simba, Burier.simba etc.
And those small scripts would be so much easier to modify than this module system. In the module system, user would have to go to different files.


With the modules, the user wouldnt ever have to access them if they didn't want to. In the barebones DeclarePlayers they would just change a Player setup to "MarpisBurier" and the script would use that module. Rather than going through each single script, typing in players names, and so on.

From: Rasta Magician
Well, MSI will support ScriptSwitching, therefore no need to declare the player three times.

I think it's completly possible to do what you're suggesting, although the picture I had in mind for barebones was of smaller scripts. Simpler scripts.

Meaning they would use lower level modules, not at such a high level.
I think that if such high level modules are used, you are looking more at 999s of scripts produced with little learning, rather than 100s of scripts with some learning.

~RM


Well the modules themselves are basically scripts without the "junk", in a format where they can be used and combined easily. You'd still have to learn to script them, as you would a normal script. The barebones script you run would be as simple as you can get, basically a template with some logic, declareplayers, etc.

I guess this is kind of a different idea lol, because the simpler smaller scripts bit would be done inside the modules - you could have modules 1000 lines long or 200 lines long.

Sir R. M8gic1an

2010-06-23 08:43:56

Well, I definitely do not have the time to take another project on hand, so unless anyone does I don't see the point of arguing this too much further..

~RM

Narcle

2010-06-23 10:23:06

From: Rasta Magician
Well, MSI will support ScriptSwitching, therefore no need to declare the player three times.
~RM


I believe a type of player save form was going to be added to Simba so we could keep all the player info saved… If this is the case we could have 100 scripts and all they would have to change is what they are making/powering etc.

EvilChicken!

2010-06-25 03:09:07

Everyone's said what there is to say already, so I'm simply going to state that I'm all for this idea, due to two-three very important reasons;

- Barebones provide a template for more advanced scripts, and aids in saving time and motivation upon starting a new project. Let's face it, it's no fun having to scrap together the very basic stuff, you always would prefer to have something to build on, no?
- A script that could be location-independent due to it's simplicity (I'm imagining all of these scripts to be "power"-scripts of sorts) would be extremely convenient to have in a lot of cases. Being 100% backed up by SRL would also mean highly increased stability and overall ~100% "uptime"/availability. This would again benefit the community as a whole, considering that the userfriendliness of this concept aids leechers as much as it benefits members; users as much as scripters.

Besides, I really don't see what's wrong with having additional features? Sure, simplicity is gold, but usefulness must then be platina?
Anyway, I'm 100% up for this. I'm willing to create the scripts if someone PMs me .. something. Lists over desired scripts, desired elements to include, even comments on why this is/isn't a good idea, et cetera.