Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Modding the Sperm Whale; a Monomaniacal Quest.  (Read 6215 times)

MJMCP

  • Bay Watcher
    • View Profile
Modding the Sperm Whale; a Monomaniacal Quest.
« on: November 24, 2014, 02:53:39 pm »

As briefly mentioned on Reddit, I'm interested in adding some of the more valuable whaling products to the game. Namely, spermaceti, which when pressed would yield wax and oil.

There have been a few suggestions on how to do this already.

  • Make a new material for the brain of the whale, and then make a reaction using said brain after butchering.
  • Use EXTRA_BUTCHER_OBJECT to simply add the item (Spermaceti) to the game at the time of butchering. It would then be pressed using a new reaction into Spermaceti Wax and Sperm Oil.

I originally started to try adding an entirely new organ to the whale (since technically that's how it works in real life) made out of a new material, and so on. I failed miserably.

Alternatively, it's been suggested that an easy workaround would be to boost the value of whale soap.

In any case, I thought I'd see what kind of wider interest there might be for this kind of addition to the game, and if anyone else has ideas about the best way to go about. Also, if you have any other ideas about what could be added when it comes to whales. Ambergris was mentioned, and that could be fun as well.
Logged

Ladygolem

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #1 on: November 24, 2014, 05:44:24 pm »

Don't have any specific ideas to contribute, but I do support this wholeheartedly! Hurrah for really, really specific and obscure creatures and features!

Illogical_Blox

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #2 on: November 24, 2014, 09:20:38 pm »

I shall attempt to add this new organ.
Logged
Me: "Just imagine a load of dwarves sitting round a table, and one of them says, 'I like stranglers for... for their... their...'"
Brother: "SOFT HANDS!"

rmblr

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #3 on: November 25, 2014, 05:31:07 am »

Also as I expressed on reddit, I would absolutely love to see this feature. The other sperm whale thread and Sphalerite's Sea Serpent farming thread have got me very excited to become the foremost exporter of Sperm Whale goods in my dwarven civilization.

Much like the Spanish Monarchs greenlit Colombus, Pizzaro, et al to go forth and harvest the bounty of riches from the new world, I would like to head across the savagest oceans to an uncharted and unsettled land to establish a dwarven colony to bring wealth and glory to my empire civilization. Mass native population extinction and wholesale abuse of non-renewable physical resources is expected.

A spermacity organ that produces wax and oil to use as trade goods would be a great start. More complicated perhaps would be to make those reagents in other jobs.

A nice bonus would be winter/freezing processing used to produce "winter-strained sperm oil". From Spermaceti processing:
Quote
The harvested matter, raw spermaceti, was stored in casks to be processed back on land. A large whale could yield as much as 500 gallons. The spermaceti was boiled and strained of impurities to prevent it from going rancid. On land, the casks were allowed to chill during the winter, causing the spermaceti to congeal into a spongy and viscous mass. The congealed matter was then loaded into wool sacks and placed in a press to squeeze out the liquid. This liquid was bottled and sold as "winter-strained sperm oil". This was the most valuable product: an oil that remained liquid in freezing winter temperatures.
Logged

smeeprocket

  • Bay Watcher
  • Collectivist Socialist Feminist Freeloader
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #4 on: November 25, 2014, 07:09:12 am »

I'd would use this if I could ever figure out my tanks. I suspect I am going to have to find out for myself whether bridges decon under giant sperm whales.

it would be nice if the value was higher than other oils and beeswax, it would certainly be much harder to obtain.
Logged
Steam Name: Ratpocalypse
Transpersons and intersex persons mod for Fortress mode of DF: http://dffd.wimbli.com/file.php?id=10204

Twitch: http://www.twitch.tv/princessslaughter/

"I can't wait to throw your corpse on to a jump pad and watch it take to the air like a child's imagination."

MJMCP

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #5 on: November 25, 2014, 11:01:49 am »


A spermaceti organ that produces wax and oil to use as trade goods would be a great start. More complicated perhaps would be to make those reagents in other jobs.


This is most likely the right way to start. I think my huge mistake was trying to do all of them at once.

Tried something that did not work; will post files here in about 2 hours after I escape this pointless work meeting.

Here are the raws I set up.

Material for Spermaceti
Spoiler (click to show/hide)

Raws for Sperm Whale, additions in bold
Spoiler (click to show/hide)

Body RCP token
Spoiler (click to show/hide)

Body Default token
Spoiler (click to show/hide)

Tissue Template for Spermaceti
Spoiler (click to show/hide)

With all of these added, I haven't successfully gotten the Spermaceti to show up upon butchering in the arena. Any ideas?
« Last Edit: November 25, 2014, 03:22:52 pm by MJMCP »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #6 on: November 25, 2014, 07:36:26 pm »

RCP stands for "random creature part", btw; they're for forgotten beasts.

MJMCP

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #7 on: November 25, 2014, 10:06:29 pm »

RCP stands for "random creature part", btw; they're for forgotten beasts.

That could be wonderful and bizarre. Leaving it.
Logged

Ladygolem

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #8 on: November 25, 2014, 10:09:25 pm »

RCP stands for "random creature part", btw; they're for forgotten beasts.

That could be wonderful and bizarre. Leaving it.

After all, you can get forgotten beast shells, chitin, leather, bones, hair; stands to reason there could be a weird-ass underground monster with a head of oil!

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #9 on: November 26, 2014, 04:57:56 am »

I implemented this myself for personal use. I don't know if it would be useful. I tested it by giving dogs the same raws and butchered them in fortress mode, but haven't tried it with a real sperm whale; It was for in case I randomly happen upon one in fort mode.

To the sperm whales I add a new organ and a load of materials. When you butcher one you get globs of spermaceti because the new organ is made of it.
Spoiler (click to show/hide)

The organ:
Spoiler (click to show/hide)

Then the reactions for boiling it to purify and pressing into oil and wax:
Spoiler (click to show/hide)

The wax and oil can be used for crafts and soap respectively (like bees wax and plant oil).

Spoiler: Stockpiles (click to show/hide)

One thing that needs looking at is values; I mean to make it so the products of spermaceti are more valuable than the default oil/wax.

Another thing is that the LIQUID_MISC_CREATURE token on the raw and pure spermaceti materials cause them to be listed by their liquid name in the stockpile menu, yet this token is needed to get the items stockpiled sensibly. To get around this I just gave them the same liquid and solid names. It does mean if it melts it won't be called molten, but I see no other way.
« Last Edit: November 26, 2014, 05:19:59 am by Vattic »
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

rmblr

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #10 on: November 26, 2014, 10:50:15 am »

Bah, I tired to go into arena mode to test this, but after spawning the whale, I've no idea how to kill it so iI can butcher it!
Logged

MDFification

  • Bay Watcher
  • Hammerer at Law
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #11 on: November 26, 2014, 10:54:41 am »

Bah, I tired to go into arena mode to test this, but after spawning the whale, I've no idea how to kill it so iI can butcher it!

Air-drowning. Just spawn it on land and wait till it croaks.

Your bigger problem is probably lack of a fort-mode butchershop.
Logged

rmblr

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #12 on: November 26, 2014, 11:07:40 am »

Alright, I've no idea what I'm doing really when it comes to raw editing. I read somewhere that the individual text files don't matter, DF loads em all.

So I added the first raw tags Vattic posted in what looks like the appropriate space, after the [CARNIVORE] tag and before [SELECT_TISSUE_LAYER:HEART:BY_CATEGORY:HEART] (replacing the duplicated [BODY:BASIC_2PARTBODY:....more body parts list]).

Then before [CREATURE:SPERM_WHALE], I appended the rest of the raws he posted (reactions and BODY:SPERMACETI_ORGAN). Loaded up Arena mode, air drowned a sperm whale, and butchered it.

Results? No Spermaceti :-(

Obviously DF is a little more strict with its raws than I imagined. Any tips?

edit: my raws:

Spoiler (click to show/hide)
Logged

Ladygolem

  • Bay Watcher
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #13 on: November 26, 2014, 11:18:27 am »

I think the reactions have to be in a reaction file, though. And if the materials are before e the OBJECT:CREATURE then they won't count. Try appending the body parts to the end of the whale raws, instead of the beginning, see if that works.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Modding the Sperm Whale; a Monomaniacal Quest.
« Reply #14 on: November 26, 2014, 11:21:00 am »

Alright, I've no idea what I'm doing really when it comes to raw editing. I read somewhere that the individual text files don't matter, DF loads em all.

So I added the first raw tags Vattic posted in what looks like the appropriate space, after the [CARNIVORE] tag and before [SELECT_TISSUE_LAYER:HEART:BY_CATEGORY:HEART] (replacing the duplicated [BODY:BASIC_2PARTBODY:....more body parts list]).

Then before [CREATURE:SPERM_WHALE], I appended the rest of the raws he posted (reactions and BODY:SPERMACETI_ORGAN). Loaded up Arena mode, air drowned a sperm whale, and butchered it.

Results? No Spermaceti :-(

Obviously DF is a little more strict with its raws than I imagined. Any tips?

edit: my raws:

Spoiler (click to show/hide)
It doesn't matter if you edit the vanilla files or add your own, but it does matter that reactions go into a reaction file, bodies go into a body file, etc.

To make troubleshooting easier, I'd recommend keeping your body and reactions out of the vanilla files and replacing the creature_ocean_new.txt file since your intent is to modify vanilla creatures.

So you will end up with creature_ocean_new.txt, body_ahab.txt, and reaction_ahab.txt.  The filename needs to be on the first line (without the extension), just follow the pattern in the vanilla raws.

To clarify: The first set of raws gets put into the whale creature definition.  The organ goes into body_ahab.txt (or whatever you're calling it).
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map
Pages: [1] 2 3