Page 1 of 1

Automatizing automatizer

Posted: Tue Jun 30, 2015 7:48 pm
by Shany
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: Select all

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: Select all

#!/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.

Re: Automatizing automatizer

Posted: Sat Jul 04, 2015 10:41 am
by Yottle
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.

Re: Automatizing automatizer

Posted: Tue Jul 07, 2015 1:41 pm
by Shany
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.

Re: Automatizing automatizer

Posted: Thu Oct 29, 2015 11:58 pm
by jacobrosoto
Is alchemist is good? What is this all about? And is the main function of an Alchemist?

_______________
automatic knife

Re: Automatizing automatizer

Posted: Sat Oct 31, 2015 12:29 pm
by Yottle
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.