Little Hoarders
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Mining Hidden Resources

Go down

Mining Hidden Resources Empty Mining Hidden Resources

Post by judder Fri Jan 04, 2019 12:13 pm

Allowing a player to mine a hidden resource becomes an issue when a geologist discovers it, as it will turn into a discovered resource and then the amount of resources left will become the maximum again.
for example:
a hidden resource has 5 stone, a mine take 3 stone from it leaving it with 2 stone, the geologist discovers it making it become a discovered resource with 5 stone. This means the player will end up getting 8 stone from the resource, way more than the intended 5.

I have come up with a solution to this problem that I have used in More Mining

The trick is to have many map items, one for each amount of item (these can all use the same image set).
for example; we have a map item called hidden stone 5, hidden stone 4, hidden stone 3 etc
and some more map items called stone resource 5, stone resource 4, stone resource 3 etc

hidden stone 5 would have actions like as follows:
Mining Hidden Resources Hidden5action
discovering is called by the geologist and turn the map item into stone resource 5
remove 1 stone is called by the mine and turn the map item into hidden stone 4

hidden stone 4 gets turned into stone resource 4 by the geologist or hidden stone 3 by the mine.

and so on until hidden stone 1 where destruction is called

as the hidden resources will always get turned into another map item, we only need a single item as an attribute that does nothing on depletion, like as follows:
Mining Hidden Resources Hiddenattr

stone resource 5 has the following actions:
Mining Hidden Resources Discovered
where cleared is called on depletion that destroys the map item
get one stone is called by the mine.

The stone resource does not turn into anything, so it's attributes is as follows:
Mining Hidden Resources Discoveredattr
note that stone resource 4 has an amount of 4 etc

The mine requirement is:
Mining Hidden Resources Mine-requirement
simply bread and stone for 10 map items

The 10 map items are all the hidden resources and discovered resource:
Mining Hidden Resources Mine-map-items

The geologist is only look for hidden stone map items, calling discovering:
Mining Hidden Resources Geo-mapitems


All this is repeated for coal, iron ore and copper ore

click here to download an rar archive of the project

judder

Posts : 4
Join date : 2018-12-14

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum