Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Trying to change all the animal raw so I can train anything I capture.  (Read 531 times)

dirty foot

  • Bay Watcher
    • View Profile

What's the most effective way of doing this? If, indeed, it is just to go through them one-by-one in the raws, do I also have to add [trainable] to them so I can attach them to dwarves?

I'd prefer to use an add-on, if there is one. That's a lot of raws to dig through, even when using the find button.
Logged

Reelyanoob

  • Bay Watcher
    • View Profile

What's the most effective way of doing this? If, indeed, it is just to go through them one-by-one in the raws, do I also have to add [trainable] to them so I can attach them to dwarves?

I'd prefer to use an add-on, if there is one. That's a lot of raws to dig through, even when using the find button.
do a global search / replace for [PET_EXOTIC] and change to [PET][TRAINABLE][COMMON_DOMESTIC]

Are you using Windows? I can give you detailed step-by-step if you like.

EDIT : i'll just add quick details

navigate to DF\Raw\Objects and hit F3. Select "All files and folders" and type [PET_EXOTIC] into the box "a word or phrase in the file". Important part to save typing :- highlight [PET_EXOTIC] with the mouse and hit CTRL-C to copy it.

open each found file one at a time and hit CTRL-H. Now hit CTRL-V to paste the tag into the "find what" box and in the "replace with" box type [PET][TRAINABLE][COMMON_DOMESTIC]. Then select "Replace All", close the file and do the next one (NOTE : some entries with have [TRAINABLE] tag twice, but this shouldn't hurt).

You should now get a VERY long list of pet animals to buy on embark. Leave COMMON_DOMESTIC out if you want to avoid this, and to avoid immigrants having pet Dragons etc.
« Last Edit: April 07, 2011, 01:58:01 am by Reelyanoob »
Logged

dirty foot

  • Bay Watcher
    • View Profile

Thanks!
Logged

Drawde

  • Bay Watcher
    • View Profile

Someone also wrote a program to do all that for you:  NoExotic.

It doesn't do anything about making the war trainable though.
Logged

nanomage

  • Bay Watcher
    • View Profile

erm i'm sorry it's still under construction
edit:

type this

foreach ($file in (ls *.raw)) {$cont = cat $file; rm $file; foreach ($str in ($cont)) {$str = $str -replace '\[PET_EXOTIC\]', '[PET][TRAINABLE]';$str | out-file -append -filepath $file -encoding ascii;}}
in powershell in raws folder.
it reads the .raw files, deletes them and writes anew replacing [PET_EXOTIC] with [PET][TRAINABLE]

 didn't test it against actual raws though so you'd better back up.
« Last Edit: April 07, 2011, 04:18:48 am by nanomage »
Logged