ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Wed Jul 26, 2017 2:34 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Automatizing automatizer
PostPosted: Tue Jun 30, 2015 7:48 pm 
Offline
Low Yeek

Joined: Wed May 27, 2015 1:32 pm
Posts: 8
Remembered about my old old script and .prf file from times when I decided not to write automat.atm by hand but to generate it from the start of every new game by destroying certain unneeded items. I found it more handy comparing to any universal pre-written rules. Ok, more controllable at least.

I use F8 and F9 keys to "destroy and add rule" for item on the floor (by type and by family respectively), and F10 to "save rules and exit":
Code:
A:\e\e\e\e\e\e\e\e\e\e099^D$-\ry\sST
P:\[F8]
A:\e\e\e\e\e\e\e\e\e\e099^D$-\ry\sSF
P:\[F9]
A:\e\e\e\e\e\e\e\e\e\e=Ts\ry\s\e\e^X\e
P:\[F10]


Also I wrote this script to erase dupes from automat.atm, and to have more sensible names like "d RING" or "d POTION" instead of this bunch of nameless "destroy"-s:
Code:
#!/bin/bash
d=$HOME/.tome/2.4
a=$d/automat.atm
[ -f $a ] && {
  cat $a | tr '\n' ' ' | tr -s ' ' | sed 's/{\s*"action":/\n&/g; s/\s*]\s*$/\n]/' |
    grep '^{' | sort -u >$a.tmp
  grep -o 'TV_[a-Z0-9_]*]*  *[0-9][0-9]*' <lib/help/defines.txt | tr -d ']' | sed s/TV_// |
    while read tv n; do
      sed -i '/"tval": '$n',/ s/"name": "destroy"/"name": "d '$tv'"/' $a.tmp
    done
  { echo \[
    grep -o '"name":[^}]*' $a.tmp | cut -d \" -f4 | sort -u | while read n; do
      grep '"name": "'"$n"\" $a.tmp
    done | sed 's/}$/},/; $ s/},\s*$/}/'
    echo \]
  } >$a
  rm $a.tmp
}
./src/tome


Maybe someone else will find it useful.


Top
 Profile  
 
PostPosted: Sat Jul 04, 2015 10:41 am 
Offline
Reaper

Joined: Sun Jan 26, 2003 11:49 pm
Posts: 1714
Location: West Virginia
I have always used (N)ame instead of (T)ype. I assume that they do the same thing most of the time, although some ego items like indestructible rings have different names from vanilla ones.


Top
 Profile  
 
PostPosted: Tue Jul 07, 2015 1:41 pm 
Offline
Low Yeek

Joined: Wed May 27, 2015 1:32 pm
Posts: 8
Yottle wrote:
I have always used (N)ame instead of (T)ype. I assume that they do the same thing most of the time, although some ego items like indestructible rings have different names from vanilla ones.

Maybe I used (T)ype because I played an Alchemist, so I never destroyed any "very good" and better equipment, but extracted essences from it. For other classes it's a good idea to use (N)ame instead.


Top
 Profile  
 
PostPosted: Thu Oct 29, 2015 11:58 pm 
Offline

Joined: Tue Oct 27, 2015 10:58 pm
Posts: 1
Is alchemist is good? What is this all about? And is the main function of an Alchemist?

_______________
automatic knife


Last edited by jacobrosoto on Mon Nov 23, 2015 7:00 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Oct 31, 2015 12:29 pm 
Offline
Reaper

Joined: Sun Jan 26, 2003 11:49 pm
Posts: 1714
Location: West Virginia
jacobrosoto wrote:
Is alchemist is good? What is this all about? And is the main function of an Alchemist?

Alchemists can learn to make potions, scrolls, rings, amulets, weapons, and armor at will. At high levels they can add properties and increase the pluses on artifacts.

They need tons of gold to buy stuff to learn the recipes to make it, but they can make valuable stuff from trash, including essences. So they are pretty easy to play early on. Once they can make artifacts with high +life they are invincible (and boring). Take a look at the alchemist winners on the ladder.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group