+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: console echo show list in console

  1. #1
    Junior Member BlastOut is on a distinguished road
    Join Date
    Aug 2010
    Posts
    7

    console echo show list in console

    Hi. I have a somewhat strange question. Could the echo command in console display items in list somehow?
    To explain:
    I have made a list of map vote aliases to my cfg like
    Code:
    alias vote_camp "callvote map campgrounds"
    etc.
    I have also defined a few aliases to show different map groups i.e CA maps, FFA maps and so forth. The lists would serve to remind me all the aliases I have set for various maps, as i can't remember them all by heart
    So far I have managed only to display them in a continuous line using echo.
    Code:
    alias camaps "echo camp:Campgrounds - lost:Lost World - ... - asy:Asylum"
    I have searched around but have not found a solution as to how or even if it is possible to display a list in console.
    Could any of you suggest a better way to display a list, preferably in console, or some other solution to my aliases construct.
    Have tried
    Code:
    \n
    and
    Code:
    echo.
    options but with little success.

    Thanks ahead..

  2. #2
    Senior Member Fi is on a distinguished road
    Join Date
    Jan 2011
    Posts
    1,105
    Found a way.

    Console
    Code:
    listcmds vote_
    It will list all your aliases starting with vote_ and that is kind of what you wanted, right?

  3. #3
    Junior Member BlastOut is on a distinguished road
    Join Date
    Aug 2010
    Posts
    7
    Thanks. This is not quite exactly what i wanted, but it helps Thanks for quick reply.
    Like I explained I'm trying to simply display text in a column in console. By using any of the aliases camaps, ffamaps, (or whatever else) they would "list" each map name in a different row (not sure this is even possible)

    So far I have managed only to display them in a continuous line using echo.
    Code:
    alias camaps "echo camp:Campgrounds --- lost:Lost World --- ... --- asy:Asylum"
    The result now is this: (these are just names i have come up with (the shortname part : full name part))

    camp : Campgrounds --- lost : Lost World --- asy : Asylum

    The expected result after the alias command "camaps" might look like the following

    camp : Campgrounds
    lost : Lost World
    asy : Asylum


    In short: I want to know if and how I can get multiple lines to display, using echo or any other command

    Again thanks

  4. #4
    *kadle
    Guest
    Do this to echo multiple lines:

    bind space "echo 1;echo 2;echo 3"

    Change the binds and the text you want to echo to what you want.

    Best Regards
    Kadle

  5. #5
    Senior Member KETNAR will become famous soon enough KETNAR's Avatar
    Join Date
    Aug 2010
    Posts
    693
    Quote Originally Posted by kadle View Post
    Do this to echo multiple lines:

    bind space "echo 1;echo 2;echo 3"

    Change the binds and the text you want to echo to what you want.

    Best Regards
    Kadle
    What he said, but one additional trick..

    To keep your config file from getting ungodly huge, you can put your lists in separate cfg files. and then execute them separately, it will help you keep things organized, and keep you away from some of the bugs that happen when your config is just one huge honking file.
    REFLEX
    (Note:Woooo!)
    [The next FPS game you should check out!]

  6. #6
    Junior Member BlastOut is on a distinguished road
    Join Date
    Aug 2010
    Posts
    7
    Might say you Railed it kadle . That's what I was looking for. Turned out it was a simple matter of stacking commands, whereas I tried to construct a single echo. Great job. The command delimiter I missed was " ; ".
    However, I didn't go with your bind construct. It works nicely, but I found a bit better solution.
    Instead of binding each list to a key I made a variable string (vstr) for each list

    set _camaps "echo camp - Campgrounds; echo lost - Almost Lost"

    and then set aliases for those strings.

    alias camaps "vstr _camaps"

    Now when I call \camaps from console I get a nice list like I wanted.
    This is better, because alias command has some limitations. Namely the command part of alias is limited to 256 chars in length and there can't be more than 128 unique aliases at any one time.
    For the moment I left the voting part as is, but this process might aswell be edited to be a little more streamlined.

    I also took note from KETNAR and divided my config to parts. As he suggested it may lead to plugin crashes, few of which I experienced after updating my cfg. Thanks for the tip. I created maps.cfg for my map aliases and vstr's and refer to it via exec "maps.cfg" from my main cfg.
    I've added the contents of my maps.cfg to this post so anyone could try it out.

    Code:
    set _camaps "echo camp - Campgrounds; echo lost - Almost Lost; echo asy - Asylum; echo hellsgr - Hell's Gate Redux; echo hidden - Hidden Fortress; echo evi - Eviscerated; echo hearth - Hearth; echo quar - Quarantine; echo retri - Rertribution; echo trin - Trinity; echo longest - Longest Yard"
    alias camaps "vstr _camaps"
    set _ffamaps "echo blood - Bloodrun; echo chem - Chemical Reaction; echo furi - Furious heights; echo hellsg - Hell's Gate; echo tree - Lost World; echo vertical - Vertical Vengeance"
    alias ffamaps "vstr _ffamaps"
    alias vote lost		"callvote map almostlost"
    alias vote asy   	"callvote map asylum"
    alias vote blood	"callvote map bloodrun"
    alias vote camp 	"callvote map campgrounds"
    alias vote chem 	"callvote map chemicalreaction"
    alias vote evi 		"callvote map eviscerated"
    alias vote furi 	"callvote map furiousheights"
    alias vote hearth 	"callvote map hearth"
    alias vote hellsg 	"callvote map hellsgate"
    alias vote hellsgr 	"callvote map hellsgateredux"
    alias vote hidden 	"callvote map hiddenfortress"
    alias vote longest 	"callvote map longestyard"
    alias vote tree 	"callvote map lostworld"
    alias vote quar 	"callvote map quarantine"
    alias vote retri 	"callvote map retribution"
    alias vote trin 	"callvote map trinity"
    alias vote vertical	"callvote map verticalvengeance"
    http://www.quakelive.com/forum/showt...write-a-config - useful config tutorial

  7. #7
    Senior Member Lam has a spectacular aura about Lam has a spectacular aura about Lam has a spectacular aura about Lam's Avatar
    Join Date
    Aug 2010
    Posts
    3,763
    Using www.esreality.com/?a=post&id=1914569 epsy did a callvote menu for maps (and using /print instead of /tell_buddy self), but I can't find it now... Anyone has a link?

  8. #8
    *kadle
    Guest
    Quote Originally Posted by BlastOut View Post
    Instead of binding each list to a key I made a variable string (vstr) for each list
    That's the way to go. It has been years since I did advanced quake scripting. Now I just use binds. I did some experiments with quakelive scripting a while back and found that the scripting engine was buggy - it seems to be ok now though. I wanted to copy and convert my old q2 or q3 scroll wheel zoom, but instead I settled on binding wheelup and wheeldown to zoom a lot and zoom a little. Sometimes I bind wheeldown to zoom very little (zoomfov 70 or 80). Eventually I will convert my zoom script, because I am not satisfied with the zoom sensitivity.

    As some the other posters wrote, you should not use too many variables and aliases and you should limit the size of your configuration files. This will avoid errors caused by internal data structures being too small. Split your configuration into several files and reuse alias and variable names to prevent triggering bugs/features. Always do this, no matter what game you are writing configuration files for. EDIT: And avoid too many characters on a single line.

    And thank you for sharing your configuration with other users of the forum.

    Best Regards
    Kadle
    Last edited by kadle; 12-29-2011 at 05:58 AM.

  9. #9
    Senior Member ybl is on a distinguished road ybl's Avatar
    Join Date
    Aug 2010
    Posts
    1,487
    i made this here, press ENTER and get this screen in the HUD

    http://www.pic-upload.de/view-124455...t0001.jpg.html

    then, if press J its vote for shuffle or press 1-7 for mapvoting (could ad more maps ofc)


    if pressing K i get new screen saying "1-8", then press number 1-8 for vote teamsize
    CA with <16 slots is nothing.

  10. #10
    Junior Member BlastOut is on a distinguished road
    Join Date
    Aug 2010
    Posts
    7
    Quote Originally Posted by kadle View Post
    It has been years since I did advanced quake scripting. Now I just use binds. I did some experiments with quakelive scripting a while back and found that the scripting engine was buggy - it seems to be ok now though.
    As you might have guessed I'm rather new to this. Haven't got too deep into scripting just yet. For now I have just tinkered with the original cfg.

    Quote Originally Posted by stuhl View Post
    i made this here, press ENTER and get this screen in the HUD

    http://www.pic-upload.de/view-124455...t0001.jpg.html

    then, if press J its vote for shuffle or press 1-7 for mapvoting (could ad more maps ofc)


    if pressing K i get new screen saying "1-8", then press number 1-8 for vote teamsize
    This is great stuhl. Could you share the code or a link to the source? Thanks.
    Play fair. Play well. Have fun while doing so.

+ Reply to Thread

Tags for this Thread

Posting Permissions

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