Mining Widget

Joined: Nov 8 2014, 03:26 PM

Dec 14 2014, 01:52 AM #1

This is a simple bit of code for the mining function.
  • Mining an item

The terrain requirement: cave.
There must be a cave floor tile near.
You must be up against a wall (high cliff) in the cave.
You need to possess the item called miner pick.

This code goes into a diy_whatever.txt file.
//Bulk ore collection to be concentrated, 14 lb harvest
.Ore. "Stone" [effort:4] [phys:stance,arms,hands] [noquality] *SURVIVAL* /2h/
{[TERRAIN:cave]} 'You need find a cave'
{[NEARBY_TILE:Cave floor]} 'Get underground to dig'
{[NEARBY_TILE:High cliff]} 'Find vein in cave wall'
{Miner Pick} <Miner pick> 'A miners pick for digging'
  • Simple Miners tool code
.Miner Pick. "Wooden shovel" [effort:2] [noquality] *CARPENTRY* /30/
This item requires nothing to create in this form.
  • Add menu for task
This code goes into a menudef_whatever.txt file.
.mining.   -S- *MAKE*
The -S- should be changed if you are already using it for a sub menu.

Feel free to use or change any portion of this.
Quote
Like
Share

Joined: Dec 24 2013, 07:29 AM

Dec 21 2014, 04:41 PM #2

I think that need to go to the mountains to get the ore is better. I am just wondering - wouldn't it be possible to create new building - shaft that you first would need to build. Only then it would be possible to do the mining. The outcome would then be some random variable. Would it even be possible?
Quote
Like
Share

Joined: Nov 8 2014, 03:26 PM

Dec 21 2014, 10:39 PM #3

pitersi @ Dec 21 2014, 04:41 PM wrote: I think that need to go to the mountains to get the ore is better. I am just wondering - wouldn't it be possible to create new building - shaft that you first would need to build. Only then it would be possible to do the mining. The outcome would then be some random variable. Would it even be possible?
From what I've seen caves are usually in the mountains, however when it moves you from travel to local map the terrain is cave, at the entrance to the inside of a cave is a tile "Surface of the earth", inside the cave the tiles are cave floor.

You could do a series of build actions to change a tile from say; ground, to surface of the earth, to cave floor, to base rock. But this type of manipulation is a bit of an exploit and has side effects.

So for this little widget I was merely forcing you to be under ground.
I've not seen that random quantities are supports, but this would be a great addition for modding.
Quote
Like
Share

Joined: Nov 8 2014, 03:26 PM

Dec 12 2015, 09:26 PM #4

My head is spinning with the 3.3 Alpha and all the options which are now open!
Quote
Like
Share