SRL Archive - Senior Scripts and Snippets

External Status and Progress Reports


RAM

2007-11-02 18:43:39

OK, So here's my thoughts….

One of the best things I have found about SMART is, being able to check the debug and status box as the script is running, I find this invaluable when creating or editing scripts, or just in general to be able to see how the script is progressing…. I like to add status to all scripts as well as write in, so I know EXACTLY what is going on…..

Having looked at the SCAR movie made by MasterRaymond, my idea is…being able to project the status of your script, to a custom debug box, to make it easier to read…..especially with SMART,I think it would be nice to be able to watch the box as your script is running, with SMART minimized, so if you are at the computer, you wouldn't have to check on your characters….

some variables could be…..
  • Status
  • Location
  • Time Running
  • Time Left before switching character
  • Hit Points (which could be in the form of a bar to turn red if to low)
  • Progress Reports
  • Random Reports
Just a few uses I could think of for now…..

What if…it was made as an include, so it could be used universally, and not have to edit each script ?

Please Discuss…

~RAM
[LEFT]
[/LEFT]

pwnaz0r

2007-11-02 20:57:13

Yeah, I get what you are saying now. Took me a sec. That sounds like a good idea to me.

Smartzkid

2007-11-02 22:44:49

I made something just like that. Called it UNCR (UN Connected Report).

First mistake: I used ISM. Eventually, I came to the conclusion that for it to be practical, it'd have to be a plugin, and I abandoned the project.

One of the main problems was that the handshake performed to set the random prefix to keep reports from overlapping would get fuddled if you ran two at the nearly the time. Solved by adding a random 10 second wait, but still not bulletproof. Also, various sized reports, the added weight of running double the amount of SCARs, and many other small problems plagued the first versions.

Later on, I solved many of the problems by implementing a 'Single-UNCR' setup. All reports would go to one larger box and would have prefixes; SCAR 1, SCAR 2, etc. I could have easily added a custom naming system had I not abandoned the project.

It actually worked pretty well, but it just wasn't worth keeping. If I ever attempt something like it again, I'll use a standalone app (C++?) and plugins.

mastaraymond

2007-11-03 07:35:46

Correct me if im wrong.

You want something that debugs every player on the debug image? Like
Player: ASdAS
Loc : Rimington
Active : True
Time : 29 Mins

Player: RAM
Loc: Bank
Active: False
Time 5 mins

You could identify different scripts by using GetSelf.Handle, isn't that hard.. You can do this in scar easily to, i guess. I think you can do it in scar to, with some ISM.

Or do you want something that sends reports to a server? Wizzup made something like that, better ask him ;).

~Raymond

Wizzup?

2007-11-03 07:40:17

Do you mean Online Remote Control?

The Claw

2007-11-03 10:18:43

Progress reports shown in forms, I think?

Special Ed

2007-11-03 12:44:16

I had always wanted to do something like that, I'm starting to get involved in forms and I was wondering if it would be possible (I'm sure it is) to just have SCAR send the "Writeln" or whatever you changed it to, to print on the form.

What I am trying to do / figuring out, is just how to have constantly changing variables on a form that aren't in the "textbox" but are just written on a form.

I definitely think this is possible although I don't know enough about form / C++ to tell you how to do it.

RAM

2007-11-03 19:32:13

Yeah, Kind of What Claw said…just a fancy Progress report…but instead of having to pull SCAR up and check on it…you could have a small box displaying Status and Write ins ….ok.. let me set up the scenario….

You have SMART minimized…you're surfing the forums, etc…. your current player gets a random, or low on hit points….Luckily, we have a small report box (with an option to keep on top of all other windows ?)..that has alerted us to the situation…much easier than having to keep checking on the client…

Or…when I test scripts….I always add status to each procedure…I sit down with a pen and paper and take notes…. this way, I can look in this small box, and see exactly where the "script is at"….not saying I can't arrange the client and SCAR, where the debug box is viewable, but this would be much easier….

EDIT: BTW…would there be a way to add a scroll button to the side, to be able to read the previous text?

and an offtopic question…..Is there a way to define or change the colors of the text in SCAR…like being able to comment the script in Red or Blue (not just green), to emphasize certain areas, such as changes that were made to a script, etc….

Special Ed

2007-11-03 19:37:27

Yea, I think (if we could) make a "Client" that basically is like you standard computer monitoring program. You can set it to give you "alerts" if something happens and constantly displays data in a (Multi - Tabbed?) little window that can anchor to the sides of your screen.

I'd love to have something like this although like I said before I'm not the best with C++ / Forms.

RAM

2007-11-03 19:39:31

From: Special Ed
Yea, I think (if we could) make a "Client" that basically is like you standard computer monitoring program. You can set it to give you "alerts" if something happens and constantly displays data in a (Multi - Tabbed?) little window that can anchor to the sides of your screen.

I'd love to have something like this although like I said before I'm not the best with C++ / Forms.


Well, I was hoping Ben would pick up on the idea, and maybe at least add a status bar to the bottom of SMART Client window ?

EDIT: My left brain is competing with my right and I am thinking of 2 different things…
  1. Separate Small box for when SMART is minimized
  2. Status/Debug/Proggy on SMART client when testing scripts

mastaraymond

2007-11-03 19:40:24

From: Special Ed
Yea, I think (if we could) make a "Client" that basically is like you standard computer monitoring program. You can set it to give you "alerts" if something happens and constantly displays data in a (Multi - Tabbed?) little window that can anchor to the sides of your screen.

I'd love to have something like this although like I said before I'm not the best with C++ / Forms.

This is really simple.. You can do it in a debug image, or in a Memo, which allows you to scroll up and down.. Its just like the debug box in scar ;). But then in a separate form, or indeed, make a separate program that keeps mentoring the ISM's and make them draw. Not hard to make, just some time needed.

Special Ed

2007-11-03 19:56:45

From: mastaraymond
This is really simple.. You can do it in a debug image, or in a Memo, which allows you to scroll up and down.. Its just like the debug box in scar ;). But then in a separate form, or indeed, make a separate program that keeps mentoring the ISM's and make them draw. Not hard to make, just some time needed.


Maybe its easy for you to say… but… yeah…

@ RAM- Yea I think the integrated side sounds like a good idea, although I think if we made it into a plugin and made sort of a "Universal" monitoring system for scripts (like SRL Stats) but with tabs I think a vast majority of the people here would use it / want to help develop it. This way we would also be advancing the general SCAR public as well as helping the people who use SMART stay organized.

shaunthasheep

2007-11-05 15:53:42

Meh..?


program New;


procedure Writeln(s : string);
var
w, h, maxwidth, maxheight, bmptext, before : integer;
begin

//max width + height of debug window.
maxwidth := 300;
maxheight := 400;
//displays debug window
DisplayDebugImgWindow(Maxwidth, Maxheight);
//Converts string s to a picture with a random color.
bmptext := CreateBitmapFromText(s, UpChars, RGBToColor(random(150) + 105, random(150) + 105, random(150) + 105));
GetBitmapSize(bmptext, w, h);
//Creates new bitmap
before := BitmapFromString(maxwidth, maxheight, '');
//Copys debug image to our new bitmap cutting of the last line.
CopyCanvas(GetDebugCanvas, GetBitmapCanvas(before), 0, h, maxwidth, maxheight + h, 0, 0, maxwidth, maxheight);
//Adds new line to our bitmap.
CopyCanvas(GetBitmapCanvas(bmptext), getbitmapcanvas(before), 0, 0, w, h, 0, maxheight - h, w, maxheight);
//Copy bitmap onto debug canvas.
CopyCanvas(GetBitmapCanvas(before), getdebugcanvas, 0, 0, maxwidth, maxheight, 0, 0, maxwidth, maxheight);
//Frees our bitmaps.
FreeBitmap(bmptext);
FreeBitmap(before);
end;

begin
Writeln('MONKEYS R US SCRIPTS PRESENTS');

Wait(400);

Writeln('SOME RANDOM SCRIPT NAME');

Wait(100);

Writeln('<~~~~~ Monkeys Progress Report ~~~~~>');
Writeln(' > Worked -1 minute and 1337 seconds ');
Writeln(' > Picked 20 Bananas ');
Writeln(' > Sliced 5 Bananas ');
Writeln(' > Killed 100 imps ');
Writeln('<~~~~~~~~~ Player Report ~~~~~~~~~~~>');
Writeln(' #: W - Active - Name ');
Writeln(' 0: 10 - True - Monkeys R Us ');
Writeln('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
Writeln(' ');

Wait(2000);

Writeln('Picking Bananas...');

Wait(500);

Writeln('Picking Bananas...');

Wait(500);

Writeln('Picking Bananas...');

Wait(1000);

Writeln('Slicing...');

Wait(1000);

Writeln('Sliced 3 Bananas');

Writeln('CRITICAL:');
Writeln('Cannot find imps on Karamaja!! Terminating...');
end.

doesn't write to debug however…

Special Ed

2007-11-05 16:06:06

Yea that basically what we need… As for making it writeln… just add a writeln to your writeln procedure or would that create an error? Either way you could just change the name of your procedure.