Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Using Hardcoded Interactions  (Read 1800 times)

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Using Hardcoded Interactions
« on: April 29, 2012, 07:11:29 pm »

I know that the procedurally generated interactions and stuff are stored in the world's raws somewhere. This should include everthing from vampire curses to those mists that turn people into husks.

How would I use the interactions or whatever thusly generated to, say, make an alcohol that can turn people into vampires, or to allow adventurers in a destructive mood to transform into husks?
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Blakmane

  • Bay Watcher
    • View Profile
Re: Using Hardcoded Interactions
« Reply #1 on: April 30, 2012, 12:12:52 am »

I could be mistaken but I'm pretty sure whilst that folder is not technically part of the raws, the tags in then 'interaction examples' folder can still be called elsewhere successfully. The generation of these interactions is currently hardcoded, so you can't fiddle with the interactions themselves.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Using Hardcoded Interactions
« Reply #2 on: April 30, 2012, 12:17:34 am »

Since the tags in the interaction examples folders have "example" in the name, I doubt it.

I'm guessing that they have names like [VAMPIRE_1] or [MAJOR_CURSE_1], much like Demons, FBs and Night creatures have [DEMON_1], [FORGOTTEN_BEAST_1], and [NIGHT_CREATURE_1].

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Using Hardcoded Interactions
« Reply #3 on: April 30, 2012, 03:59:27 pm »

...Has anyone actually looked? I've seen someone post raws of a few titans they got, so it must be possible somehow.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Using Hardcoded Interactions
« Reply #4 on: April 30, 2012, 05:11:27 pm »

Just open your world.dat with a text editor while you have uncompressed saves ON.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Using Hardcoded Interactions
« Reply #5 on: April 30, 2012, 08:32:29 pm »

...Ah, so that's the trick I was missing!
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Using Hardcoded Interactions
« Reply #6 on: April 30, 2012, 08:44:01 pm »

Erm, what do I open with the text editors, again?
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Using Hardcoded Interactions
« Reply #7 on: April 30, 2012, 08:45:32 pm »

Erm, what do I open with the text editors, again?

It's in the topic >_>

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Using Hardcoded Interactions
« Reply #8 on: April 30, 2012, 08:46:54 pm »

...Oookay, then, that seems...my computer didn't like opening a .dat for some reason, okay?
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Using Hardcoded Interactions
« Reply #9 on: April 30, 2012, 08:47:35 pm »

Make sure uncompressed saves are on and you have to gen a new world after that?

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Using Hardcoded Interactions
« Reply #10 on: April 30, 2012, 08:58:23 pm »

If you've got PHP on your system, you can run this script to extract all of the raws from a given savegame. It works on both idle worlds (.dat) and active saves (.sav) and it works on both uncompressed and compressed files.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

FingO

  • Bay Watcher
    • View Profile
Re: Using Hardcoded Interactions
« Reply #11 on: June 27, 2012, 02:52:00 am »

@Quetust:

I recently used your php-script (thanks a lot btw) with my genned, idle world (while idle is the wrong term, I'm currently addicted to reading through legends...). Several types of txt-files were generated:

DEITY_CURSE_VAMPIRE_x.txt
DEITY_CURSE_WEREBEAST_x.txt
DEMON_x.txt
DISTURBANCE_x.txt
DISTURBANCE_ANIMATE_x.txt
DUSTURBANCE_CURSE_x.txt
EVIL_CLOUD_x.txt
EVIL_RAIN_x.txt
FORGOTTEN_BEAST_x.txt
NIGHT_CREATURE_x.txt
REGIONAL_x.txt
SECRET_x.txt
SECRET_ANIMATE_x.txt
TITAN_x.txt
UNDERGROUND_SPECIAL.txt

as far as I understand the files, most of them deal with the extraordinary stuff like with titans, forgotten beasts, nightcreatures, evil rain etc. - Do I get it wrong or is there no information about the "normal" civs? A second question is whether I can extract from these raws where eg the titans are located on the world map.
Logged
"In Plaguemoments I slew a human over a week." - Em Kisstorments, administrator

"Can Kutsmob Pimplehate save the world?" was a legendary bone-bound book. The written portion consists of a 30 page essay entitled "Can Kutsmob Pimplehate save the world? authored by Kutsmob Pimplehate. It concerns the giving up on being a fishery worker of the goblin necromancer Kutsmob Pimplehate in Bristleseductions in 29. The writing has its moments of cleverness.

Courtesy Arloban

  • Bay Watcher
  • This isn't a fortress... ...It's also not a map.
    • View Profile
Re: Using Hardcoded Interactions
« Reply #12 on: June 27, 2012, 10:56:16 am »

There is some information about the normal civs in the game as part of the map.  Changing that data in the save can cause a crash.  One example of useable extracted information for a civ is what it calls its procedurally genned professions. Like calling priests doom jesters, and law givers masters.

For those who don't have PHP and have compressed saves on, you can change it to off, play the game a short while and save.  The save will be uncompressed.
« Last Edit: June 27, 2012, 10:59:12 am by Courtesy Arloban »
Logged
Maybe that the dwarves never died and everyone is just shunning them.
"Wait, what are you doing?  I don't want to go in there!  No, I'm still alive, you can't do this to me!  Is Anybody listening?  Hello... Can someone let me out?  Help me!  Is anyone there?  I'm running out of air!"

FingO

  • Bay Watcher
    • View Profile
Re: Using Hardcoded Interactions
« Reply #13 on: June 27, 2012, 12:33:30 pm »

But where do I find this map?

I don't want to change any of these data, but I'd like to have a possibility to read out as much information out of the files as possible. 

The point is as follows: To top my programming skills up another notch (so that I own approx two notches...) I am currently writing a roguelike with the T-Engine. The Background will be based on one world I genned with Masterwork Dwarf Fortress. Since I am a lazy dude and don't want to copy the already existing world map I would like to be able to read out basic information from the data files.

Information about creatures like certain stats and talents is not difficult to read as they are found in the creature_standard.txt etc pp. What would help me quite a lot would be to have coordinates of distinct features on the world map so that I can eg generate there a small specific dungeon, a vault or whatnot.
« Last Edit: June 27, 2012, 12:46:03 pm by FingO »
Logged
"In Plaguemoments I slew a human over a week." - Em Kisstorments, administrator

"Can Kutsmob Pimplehate save the world?" was a legendary bone-bound book. The written portion consists of a 30 page essay entitled "Can Kutsmob Pimplehate save the world? authored by Kutsmob Pimplehate. It concerns the giving up on being a fishery worker of the goblin necromancer Kutsmob Pimplehate in Bristleseductions in 29. The writing has its moments of cleverness.

Courtesy Arloban

  • Bay Watcher
  • This isn't a fortress... ...It's also not a map.
    • View Profile
Re: Using Hardcoded Interactions
« Reply #14 on: June 27, 2012, 01:11:03 pm »

The map I was reffering to is in the world.dat file, opening it with a text editor, you get the information the script gives you with some non-text characters between them I think they're asciiz strings.  down below there is a list of all words, symbols, minerals, animals, plants, reactions, and items that were in the raws you generated the world with and you can add to that list. The bottom of the file is a huge string containing the map of the world, and legendary figures, it has the names of some of the procedurally generated positions as tags for historical figures that are in a physical position.
Logged
Maybe that the dwarves never died and everyone is just shunning them.
"Wait, what are you doing?  I don't want to go in there!  No, I'm still alive, you can't do this to me!  Is Anybody listening?  Hello... Can someone let me out?  Help me!  Is anyone there?  I'm running out of air!"