Results 1 to 21 of 21

Thread: reports.simba

  1. #1
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default reports.simba

    @Ollybest; mentioned on another thread (or on IRC) that people still use the SRL player reports in /misc/reports.simba, and that it would fit nicely in debug.simba. I agree, but don't particularly like how they're written. They are very long and tough to follow.

    I was was hoping we could come up with some ideas of how to make them simpler. Maybe we should completely remove them? All opinions are welcome.

    At the very least I think they should be split up + add a couple cool things:

    • scriptReport(); ~ The script progress (i.e. time running, players active, etc.).
    • playerReportShort();
    • playerReportLong();
    • progressReport(); ~ Prints all three of the above reports.
    • Option to save to file where file path is set by the scripter (can be saved to SRL-6/reports/ or SRL-6/logs/ by default).
    • Specify the border character. Right now it's always "[" and "]".

    Any other ideas or opinions? If you think we should just remove it, please say so.

    Cheers,
    Cohen

  2. #2
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    What would be the difference between playerReportShort & long?

    I very much like the idea of having srl6/reports file to store them in, and i think we should keep them, there extremely useful.
    Last edited by Olly; 04-15-2013 at 01:59 AM.

  3. #3
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    What would be the difference between playerReportShort & long?

    I very much like the idea of having srl6/reports file to store them in, and i think we should keep them, there extremely useful.
    The difference:

    Progress Report:
    { SRLPlayerReport - short example
    [=======================================================================================]
    [ Nick           | Active | Worked   | Banked | Loc     | fishes | Responses | FishType ]
    [=======================================================================================]
    [ Rasta Magician | True   | 20:10:56 | 43     | lumby   | 26     | 162       | trout    ]
    [ Wizzup?        | False  | 25:25:53 | 83     | draynor | 99     | 190       | shrimps  ]
    [ WT-Fakawi      | True   | 11:37:37 | 55     | draynor | 68     | 122       | shrimps  ]
    [ Hobbit         | False  | 24:17:35 | 31     | lumby   | 14     | 198       | trout    ]
    [ Nielsie95      | True   | 21:04:37 | 24     | draynor | 2      | 192       | shrimps  ]
    [ ------------------------------------------------------------------------------------- ]
    [ ZephyrsFury    | False  | 06:12:55 | 0      | draynor | 48     | 168       | shrimps  ]
    [ Boreas         | True   | 18:52:54 | 77     | lumby   | 94     | 144       | trout    ]
    [ Sumilion       | False  | 15:39:55 | 70     | draynor | 82     | 137       | shrimps  ]
    [ The Claw       | False  | 17:44:36 | 24     | lumby   | 9      | 153       | trout    ]
    [ Tarajunky      | False  | 14:31:38 | 18     | draynor | 97     | 146       | shrimps  ]
    [ ------------------------------------------------------------------------------------- ]
    [ Ray            | False  | 27:11:36 | 94     | lumby   | 43     | 122       | trout    ]
    [ Nava2          | False  | 99:59:59 | 86145  | guild   | 167854 | 9999785   | SHARK    ]
    [=======================================================================================]
    }
    
    { SRLPlayerReport - long example
    [=========================]
    [     Rasta Magician      ]
    [ Active    : True        ]
    [ Worked    : 20h 10m 56s ]
    [ Banked    : 43          ]
    [ Location  : lumby       ]
    [ fishes    : 26          ]
    [ Responses : 162         ]
    [ FishType  : trout       ]
    [=========================]
    [         Wizzup?         ]
    [ Active    : False       ]
    [ Worked    : 25h 25m 53s ]
    [ Banked    : 83          ]
    [ Location  : draynor     ]
    [ fishes    : 99          ]
    [ Responses : 190         ]
    [ FishType  : shrimps     ]
    [=========================]

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    I wasn't aware people were still using them? It is like one of those things which is actually fun to write, the proggie :P.
    Working on: Tithe Farmer

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    I wasn't aware people were still using them? It is like one of those things which is actually fun to write, the proggie :P.
    I used to think that too. Now, though, I find it repetitive and boring. I'm sure there are people out there that would love this option. Plus, I think it's quite nice. This way no one has an excuse for not having a progress report.

  6. #6
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    I wasn't aware people were still using them? It is like one of those things which is actually fun to write, the proggie :P.
    I use them all the time... also @Flight does that should change your mind.

  7. #7
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    I use them all the time... also @Flight does that should change your mind.
    Absolutely, they're organized and look quite nice already. I use them in all of my scripts, even those in the unreleased folder. I don't plan on parting from SRL's report system any time soon.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  8. #8
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Great, I'll get working on this soon.

  9. #9
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    I think renaming playerReportShort() to playerReportWide() or something along those lines would be good. When I see the distinction of long and short options I figure short would tell me overview stuff like script run time, total loads, number of logins, etc and long in addition to the short info will tell me about each player, time, active state, loads, etc.

    Just my interpretations.
    STOP PM'ING ME

  10. #10
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by Hobbit View Post
    I think renaming playerReportShort() to playerReportWide() or something along those lines would be good. When I see the distinction of long and short options I figure short would tell me overview stuff like script run time, total loads, number of logins, etc and long in addition to the short info will tell me about each player, time, active state, loads, etc.

    Just my interpretations.
    Agreed, I said as much to Coh3n a little while back.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  11. #11
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    I just had this idea. Maybe we should add them to the players type. So:

    Players.report();

    I think it looks neat, on the otherhand I don't think it adds anything.
    Working on: Tithe Farmer

  12. #12
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Okay, I'll make sure to make the names more clear.

    Quote Originally Posted by masterBB View Post
    I just had this idea. Maybe we should add them to the players type. So:

    Players.report();

    I think it looks neat, on the otherhand I don't think it adds anything.
    I think that's pretty cool. It would make sense anyway. I actually like that. That way if, for whatever reason, someone wants to have multiple player arrays, they can.

  13. #13
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Players.toString() and then Players.reportInfo(const reportStyle : TReport = REPORT_WIDE): overload; perhaps?
    writeLn(Players.reportInfo());

  14. #14
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    Players.toString() and then Players.reportInfo(const reportStyle : TReport = REPORT_WIDE): overload; perhaps?
    writeLn(Players.reportInfo());
    I'd rather just see TPlayerArray.printReport(style: integer = REPORT_WIDE). No need to complicate things at all.

    E: Could probably have TPlayer.printReport() to give that option (TPlayerArray.printReport would call this as well).

  15. #15
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    The problem is that it's not the TPlayer that is doing the writing, it's the TReport that is doing the writing.
    You'd also have to include reports.simba into the players.simba file

  16. #16
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    The problem is that it's not the TPlayer that is doing the writing, it's the TReport that is doing the writing.
    Yeah fair enough. We could do TPlayerArray.createReport which creates a progress report off of the TPlayerArray. I'm not really sure how a TReport type would work. I guess you could have TReport.saveToFile, .print. May not be a bad idea. Or even TReport.create(basedOn: TPlayerArray).

    Quote Originally Posted by Zyt3x View Post
    You'd also have to include reports.simba into the players.simba file
    reports.simba is only two functions, albeit pretty long. I'm not sure if they can be split up.

  17. #17
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    I can't really see TReport being that useful for anything, really; I just used it as a synonym for reports.simba

  18. #18
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    I can't really see TReport being that useful for anything, really; I just used it as a synonym for reports.simba
    The only thing I can see it being useful for is to have a TReport.saveToFile procedure. It would also allow users the option to create multiple progress reports. Why they would want to do that, though, I'm not sure. And I think it could be included in the TPlayer type because the entire report is based off of a TPlayerArray. You could think of it like a TPlayerArray is creating a progress report of itself.

    What would you guys rather see? All of it included in the TPlayer type, kept as is in a separate file, or made into a TReport type and kept in a separate file?

    I think I prefer a TReport type, that way we can make it more customizable:
    Simba Code:
    program new;

    type
      TReport = record
        str: string;
        tokenBorder, tokenInner: string;
        title, author: string;
        booleans, integers, etc. // whatever the other parameters are for the current reports.simba
        // plus anything else to customize it
      end;

    procedure TReport.create();
    begin
    end;

    procedure TReport.print(toLog: boolean; wide: boolean = false);
    begin
    end;

    function TReport.saveToFile(fileName: string): boolean;
    begin
    end;

    begin
    end.


    @Zyt3x; @masterBB; @euphemism; @Ollybest;

  19. #19
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    I see no problem in that, iirc the current reports uses a TVariantArray for all the info.

    also we should make a dedicated reports folder (srl6/reports/) and have that as the default filename/savepath for saveToFile.

  20. #20
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    I see, yeah, I like the TReport one

  21. #21
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Moving this to the public -- we'd like to hear what you guys think should be added/removed/changed from SRL-5's reports.simba.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •