How to code workshop?

Started by Morrneyo, April 21, 2016, 05:46:42 AM

Previous topic - Next topic

Morrneyo

I'm Planning to make 'mining drill' in the form of workshop,
but I have no idea where to start!

This would appear like this :

1. Colonists will interact to run the machine.
2. High electricity required, and need 1 component to run 1 time.
3. There is a chance to mine steel, plasteel, silver, and gold. Or nothing. (Chance system?)
4. Need mining skill to work better.

I have made only some turrets, so... is it possible to make this stuff?



PS : I'm expecting the 'Miner' from Sims 3.  → http://sims.wikia.com/wiki/Miner

RawCode

workshop that have recipe that cost 1 X and produce 1 Y.

when Y is spawned, it instantly decay into Z,Q,W or E.

energy consumption nodes can be taken from smelter.

Morrneyo

Quote from: RawCode on April 21, 2016, 06:28:55 AM
workshop that have recipe that cost 1 X and produce 1 Y.

when Y is spawned, it instantly decay into Z,Q,W or E.

energy consumption nodes can be taken from smelter.

Random decay system? How can I code it?

RawCode

you dont need to code it, it already present, check "natural stone walls" they have chance to drop stone boulder on "death".

decay can be taken from food, just set spoil timer to single tick.

cuproPanda

You can check the source code on my thread. In the folder QRY there's a file called Item_Conglomerate, which handles all of the spawning.

Quote from: RawCode on April 21, 2016, 07:54:44 AM
you dont need to code it, it already present, check "natural stone walls" they have chance to drop stone boulder on "death".

decay can be taken from food, just set spoil timer to single tick.
That only allows for a single ThingDef, making a list would require .dll
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Morrneyo

Quote from: cuproPanda on April 22, 2016, 11:27:39 PM
You can check the source code on my thread. In the folder QRY there's a file called Item_Conglomerate, which handles all of the spawning.

Quote from: RawCode on April 21, 2016, 07:54:44 AM
you dont need to code it, it already present, check "natural stone walls" they have chance to drop stone boulder on "death".

decay can be taken from food, just set spoil timer to single tick.
That only allows for a single ThingDef, making a list would require .dll


Does it requires dll file? I can't even open it.

cuproPanda

Quote from: Morrneyo on April 23, 2016, 02:30:23 AM
Quote from: cuproPanda on April 22, 2016, 11:27:39 PM
You can check the source code on my thread. In the folder QRY there's a file called Item_Conglomerate, which handles all of the spawning.

Quote from: RawCode on April 21, 2016, 07:54:44 AM
you dont need to code it, it already present, check "natural stone walls" they have chance to drop stone boulder on "death".

decay can be taken from food, just set spoil timer to single tick.
That only allows for a single ThingDef, making a list would require .dll


Does it requires dll file? I can't even open it.

The .cs file? You should be able to open it with any text editor, but I recommend something like MonoDevelop or Visual Studio. It wouldn't do you any good unless you plan on making a .dll mod, though.
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Morrneyo

Quote from: cuproPanda on April 23, 2016, 02:55:26 AM
Quote from: Morrneyo on April 23, 2016, 02:30:23 AM
Quote from: cuproPanda on April 22, 2016, 11:27:39 PM
You can check the source code on my thread. In the folder QRY there's a file called Item_Conglomerate, which handles all of the spawning.

Quote from: RawCode on April 21, 2016, 07:54:44 AM
you dont need to code it, it already present, check "natural stone walls" they have chance to drop stone boulder on "death".

decay can be taken from food, just set spoil timer to single tick.
That only allows for a single ThingDef, making a list would require .dll


Does it requires dll file? I can't even open it.

The .cs file? You should be able to open it with any text editor, but I recommend something like MonoDevelop or Visual Studio. It wouldn't do you any good unless you plan on making a .dll mod, though.

That's relief I don't have to do that complex thing. I just wanted to build simple workbench but I didn't work anyway