TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

saving command files with formatting

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
rdemanow



Joined: 17 Apr 2006
Posts: 15

PostPosted: Mon Apr 24, 2006 4:34 pm    Post subject: saving command files with formatting Reply with quote

Is there a way to get tintin's #write command to save the file in a more human-readable format?

I have several triggers that use nested commands and calls, and it's a pain when I need to go in and edit them by hand (I use vi to do this offline), when they're saved like this:

Code:
#ACTION           {^<HP: %0/%1 Mana: %2/%3 Mv: %4/%5 %6 %7}  {#var hpcol @colscale{%0 %1};#var mncol @colscale{%2 %3};#var mvcol @colscale{%4 %5};#math perhp {100*%0/%1};#var perhpc @colscale{$perhp 100};#math permana {100*%2/%3};#var permanac @colscale{$permana 100};#format epoch %T;#format time %t $epoch;#format {prompt1}{%c H: %s%+4s%c/%c%-4s%s%+3s}{{dim yellow} {$hpcol} {%0} {white} {white} {%1} {$perhpc} {$perhp}};#format prompt2}{%cMn:%s%+4s%c/%-4s%s%+3s}{{dim yellow}
{$mncol} {%2} {white} {%3} {$permanac} {$permana}};#format {prompt3}{%cMv:%s%-4s %c %G/%G   %s %s}{{dim yellow} {$mvcol} {%4} {white} {%6} {$LandGoal} {%7} {$time}};#format {prompt4}{%s  %s  %s}{{$prompt1} {$prompt2} {$prompt3}}}  {1}


Can the #write command be made to output the command file more like this:

Code:

#ACTION           {^<HP: %0/%1 Mana: %2/%3 Mv: %4/%5 %6 %7}
  {
    #var hpcol @colscale{%0 %1}
    #var mncol @colscale{%2 %3}
    #var mvcol @colscale{%4 %5}
    #math perhp {100*%0/%1}
    #var perhpc @colscale{$perhp 100}
    #math permana {100*%2/%3}
    #var permanac @colscale{$permana 100}
    #format epoch %T
    #format time %t $epoch
    #format {prompt1}
        {%c H: %s%+4s%c/%c%-4s%s%+3s}
        {{dim yellow} {$hpcol} {%0} {white} {white} {%1} {$perhpc} {$perhp}}
    #format {prompt2}
        {%cMn:%s%+4s%c/%-4s%s%+3s}
        {{dim yellow} {$mncol} {%2} {white} {%3} {$permanac} {$permana}}
    #format {prompt3}
        {%cMv:%s%-4s %c %G/%G   %s %s}
        {{dim yellow} {$mvcol} {%4} {white} {%6} {$LandGoal} {%7} {$time}}
    #format {prompt4}
        {%s  %s  %s}
        {{$prompt1} {$prompt2} {$prompt3}}
  }  {1}
[/code]
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Apr 24, 2006 6:18 pm    Post subject: Reply with quote

Will add it to the todo list, but don't think I'll feel like working on it anytime soon.

The general idea is to not use #write and make all changes directly in the file itself.
Back to top
View user's profile Send private message Send e-mail
rdemanow



Joined: 17 Apr 2006
Posts: 15

PostPosted: Mon Apr 24, 2006 7:54 pm    Post subject: Reply with quote

Hmmm ... that makes it a bit difficult to generate fastwalk paths in-game and store them in the command file.

Is there an easy way to get vim or emacs to re-format the raw file in a more ... pretty ... way?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Apr 24, 2006 8:53 pm    Post subject: Reply with quote

Not that I know of.

You can save paths to a seperate file by utilizing the class command.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group