[Request]Randomized results for recipes

Started by Razzoriel, April 11, 2017, 03:49:00 PM

Previous topic - Next topic

Razzoriel

Let's say you want to add a hole in the ground as a new facility, and pawns who dig there have a set chance of finding one variant of each stone per recipe use. Is it possible to set a specific recipe from this facility to give different types of stone.

So, for instance, I set a pawn to work in such hole, and in the .xml, I set it to give me all rocks. So each type of rock gets an equal percentage chance of giving me a stone boulder type after every recipe cycle.

Is this in vanilla yet? Cuz I haven't found anything that gives this sort of thing yet.

Shinzy


minimurgle

Yah Shinzy is right here. Though something similar could be done.
Don't mind the questions. I'm probably just confused.

faltonico

Quote from: Razzoriel on April 11, 2017, 03:49:00 PM
Let's say you want to add a hole in the ground as a new facility, and pawns who dig there have a set chance of finding one variant of each stone per recipe use. Is it possible to set a specific recipe from this facility to give different types of stone.

So, for instance, I set a pawn to work in such hole, and in the .xml, I set it to give me all rocks. So each type of rock gets an equal percentage chance of giving me a stone boulder type after every recipe cycle.

Is this in vanilla yet? Cuz I haven't found anything that gives this sort of thing yet.
CuproPanda made something like that with his Quarry mod, sadly, it is not updated for A16.

Greep

I'm probably going to be doing something similar for Armok, I can separate it out of the .dll if you guys want it.  It'd be something like making a deep drill pull random metal without depleting the source.  But you'd have to wait a few days/weeks till I get to that point.
1.0 Mods: Raid size limiter:
https://ludeon.com/forums/index.php?topic=42721.0

MineTortoise:
https://ludeon.com/forums/index.php?topic=42792.0
HELLO!

(WIPish)Strategy Mode: The experienced player's "vanilla"
https://ludeon.com/forums/index.php?topic=43044.0

Razzoriel

Quote from: Greep on April 13, 2017, 12:54:15 AM
I'm probably going to be doing something similar for Armok, I can separate it out of the .dll if you guys want it.  It'd be something like making a deep drill pull random metal without depleting the source.  But you'd have to wait a few days/weeks till I get to that point.
It'd be a huge deal for many modders, since this would allow randomized items to be acquired, and opens the floodgates for modders to assign rare items from recipes, or even multiple items out of a single recipe for a set chance.

notfood

I implemented this for HardcoreSK's quarry. Digging has a chance to get something random, valuable or just rocks. The chances are read from xml. With Skyarkangel's permission I could share the code.

minimurgle

Quote from: notfood on April 14, 2017, 11:57:56 AM
I implemented this for HardcoreSK's quarry. Digging has a chance to get something random, valuable or just rocks. The chances are read from xml. With Skyarkangel's permission I could share the code.

That would be amazing. I'm working on something right now that would benefit greatly. Of course I'd give credit where it's due.
Don't mind the questions. I'm probably just confused.

skyarkhangel

Quote from: notfood on April 14, 2017, 11:57:56 AM
I implemented this for HardcoreSK's quarry. Digging has a chance to get something random, valuable or just rocks. The chances are read from xml. With Skyarkangel's permission I could share the code.

Ok

notfood

I attach the source for Quarry. Works in A17.


[attachment deleted by admin due to age]