Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Make the random generator available to modders  (Read 897 times)

Robosaur

  • Bay Watcher
  • [POOP:INORGANIC: NUCLEAR_BOMBS]
    • View Profile
Make the random generator available to modders
« on: March 23, 2012, 12:17:47 pm »

Right now, necromancers, werewolves, evil clouds, demons, and night creatures are all very much hardcoded into the game. There should be a way for it to be soft coded so we can modify it. Currently the closest we can do is disable them all and mod in new stuff instead, but that doesn't work as well as actively being able to mod the random generator.
Logged
You are a terrible person and the sad truth is deep down you know it.

Di

  • Bay Watcher
    • View Profile
Re: Make the random generator available to modders
« Reply #1 on: March 23, 2012, 12:52:48 pm »

I agree. Tweaking ranges of rng and selecting what tags it can place for a specific type of creature would be great.
Isn't this already planned though? ???
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

Robosaur

  • Bay Watcher
  • [POOP:INORGANIC: NUCLEAR_BOMBS]
    • View Profile
Re: Make the random generator available to modders
« Reply #2 on: March 23, 2012, 01:41:14 pm »

I have no idea, to be honest
but if it is, I really really really hope it's high priority as I don't plan on modding (or playing, as I only play DF so I can mod it) until it comes around, as it's really annoying making a new secret type and only ever having 1 or 2 running around at a time, while necromancers are a dime a dozen.
Logged
You are a terrible person and the sad truth is deep down you know it.

Courtesy Arloban

  • Bay Watcher
  • This isn't a fortress... ...It's also not a map.
    • View Profile
Re: Make the random generator available to modders
« Reply #3 on: March 23, 2012, 02:32:14 pm »

It would be very doable with a file called c_variation_rcp.txt, which would contain creature variations for Demons, Titans, Forgotten Beasts, Night Hunters, Bogeymen, and Werebeasts that the game references when it generates the procedural creatures.  Even if it couldn't parse new entrys, many people would gladly overwrite one or more of those with a creature they would like to be procedurally generated.

One way for modders to make a somewhat random creature is to make a creature that COPY_TAGS_FROM one of the procedurally generated creatures, like for example a werebeast, which would be NIGHT_CREATURE_XXX one plus whatever the number of Night Hunters + Bogeymen in your init file.  Or another example ChaosSpawn can copy from DEMON_XXX whatever.
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!"

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Make the random generator available to modders
« Reply #4 on: March 23, 2012, 05:12:51 pm »

It's planned.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Make the random generator available to modders
« Reply #5 on: March 23, 2012, 05:23:25 pm »

To be more specific, this is part of the Old Devpages.

Quote
RANDOMIZATION AND RAWS ARC: More things need to make it out to the raws, and when they arrive, there should be some ability to randomize what you get in play. Current raw objects such as creatures, entities, plants, metals or even stone should also be randomizable. This doesn't just include randomizing an existing entry, but, more importantly, the creation of entirely new objects. This behavior should be controlled by the world parameters so that you can run anything from a stock universe to a complete replacement of all existing raw objects. In worlds with random objects, the random objects need to be introduced to the player in such a way that familiarity can be gained (involving descriptions, back stories, etc.) so that it isn't just a mess of static with garbage names. Related to Core53, Core92, Core93, Core94, Core95 and Core96.

If you haven't looked at the old devpages yet, you should try doing so.  It's filled with neat stuff, and the stuff to spark new ideas.

In general Toady wants to do this, but has trouble getting much of the procedural stuff to "play nice" with the raws - there is a lot of syntax to iron out and make work well with the C++ object system when you're basically passing a giant stream of scripts into it to run the code.

There's also the issue that many things in the raws are just plain not complete yet.  There's only one kind of vampire because Toady hasn't had time to make more.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Robosaur

  • Bay Watcher
  • [POOP:INORGANIC: NUCLEAR_BOMBS]
    • View Profile
Re: Make the random generator available to modders
« Reply #6 on: March 23, 2012, 05:29:47 pm »

Okay.

For the record, I did look at that page a lot. I must have missed that one.
Logged
You are a terrible person and the sad truth is deep down you know it.