Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Workshop-based technology mod  (Read 847 times)

skelepound

  • Bay Watcher
  • Deciever, I name thee Cael
    • View Profile
Workshop-based technology mod
« on: January 26, 2017, 06:06:40 pm »

hey, in a couple of other posts, i mentioned that someone could make a tech-tree via the addition of items makable in normal workshops, which are used to construct other workshops. Like, a metalsmith makes copper wires, which can make an electricians workshop. At THAT workshop, you can make microchips out of crystals/gems, which let you make a Electronics workshop. Which lets you use iron or steel to make servos, for a Basic Robotics workshop. Or you can go to make a Magnetics Workshop from an electricians workshop, which lets you make magnetic coils for an Electromagnet Workshop, which give your dorfs coildguns. But I dont know how to mod Workshops very well. So, for an advanced tech mod, while i add in new creatures and syndromes and such, i wanted to know if i can get someone to help me with the workshops - so dorfs can go from battleaxes n' shit to having robotic golems, genetically engineered supersoldiers and monsters, and giant railgun turrets that will fuck up a Bronze Collosus in no-time flat. They need to require many different resources, so even a well-placed fortress wont be able to mine up a shit-ton of copper and iron and gems, and effortlessly build robo-soldiers. High tier items like adamantium should be key to some of the high-level technologies. And as i said, ill be adding in wandering robot enemies, experiments gone wrong, and maybe some science based secrets. But I need homies to help me, and i cant start this project myself for at least a week. Anyone who thinks they can help when the time comes, plz post below.
Logged
My magic mod, Schools of Magic:
----------------------------------
http://www.bay12forums.com/smf/index.php?topic=162596.0
----------------------------------
GENERATION 28:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.

Kyubee

  • Bay Watcher
  • modding is hard
    • View Profile
Re: Workshop-based technology mod
« Reply #1 on: January 26, 2017, 06:48:24 pm »

I intend to create a similar  concept, myself, though for both a tech tree for one of my civs and a magic tree for another
Logged
My (long abandoned) mod: http://www.bay12forums.com/smf/index.php?topic=176501.0
The litten is wandering around the dump now, occasionally exploding.

skelepound

  • Bay Watcher
  • Deciever, I name thee Cael
    • View Profile
Re: Workshop-based technology mod
« Reply #2 on: January 26, 2017, 07:02:35 pm »

Well, if a raw could be made of a magic book, a magic tree would work the same. I just feel that this is the best way so far to incorporate technological advancement in the game. The addition of mounts will help, if they do it in an update soon, cus then we could throw in the invention of aircraft and spacecraft(well, not spacecraft probably). But yea, if the once can be made, the same it true of the other.
Logged
My magic mod, Schools of Magic:
----------------------------------
http://www.bay12forums.com/smf/index.php?topic=162596.0
----------------------------------
GENERATION 28:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.

DrTank09

  • Bay Watcher
    • View Profile
Re: Workshop-based technology mod
« Reply #3 on: January 26, 2017, 11:50:27 pm »

Another thing you could do is require blueprints.  In order to make a circuit board, you need circuit blueprints that must be bought from the caravan.  You don't know when they are going to bring the ones you need, but they are used in reactions?
Logged

skelepound

  • Bay Watcher
  • Deciever, I name thee Cael
    • View Profile
Re: Workshop-based technology mod
« Reply #4 on: January 27, 2017, 01:29:37 am »

Look, my skills are kinda limited and specialized into interactions; the idea is that building high tech workshops will require either a) blueprints, which is a great idea, or b) parts from preceding workshops; or ideally c) both. I dnk what a reaction is, to be honest - and im still struggling with how to build a workshop, its entirely different from interaction and creature raws(which are closely related). And yeah, a blueprint would be something you trade for, and like an anvil, would be required for a specific workshop. But it might need other parts that you get from different workshops - so you can get a robotics workshop blueprint, but without parts from an electronics workshop, you cannot build it. Thus making progression.
Logged
My magic mod, Schools of Magic:
----------------------------------
http://www.bay12forums.com/smf/index.php?topic=162596.0
----------------------------------
GENERATION 28:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.

DrTank09

  • Bay Watcher
    • View Profile
Re: Workshop-based technology mod
« Reply #5 on: January 27, 2017, 02:04:14 am »

I'm currently working on a project to make a renaissance aged technology group.  Its really amazing because in some parts of the world, at this time, people are using stone tools in rural areas, while in others, people have waterwheel powered tilt hammers for ore breaking.  Building a workshop is actually not all that hard, copy an existing workshop and learn what each of the functions do, then tweak it based on what you have learned.  This is what I did when I was working on an economy mod to create a more organized, player-controlled economy.  The building I made was a counting table, and I copied most of the information from the quern before modifying it as I saw fit.

Now, the reactions are a bit different, and don't get confused into thinking that interactions and reactions are the same thing.  It seems that interaction tokens mainly detail what specific parameters about how or when things happen and who or what they should happen to.  I'm not quite clear on this as I haven't delved into interactions, I'm still doin research before modding any more.  Reactions are specific and player controlled, more or less.  Reactions require a location for them to occur, ingredients, and usually products.  You can put a great deal of technological structure here by saying that this building has to be built with these products, then this building has to be built the products that the previous building had.

Of course, there is always the chance that the caravan will bring you the tools you need to progress.

Now here is the way that you can use blueprints.

1. buildings require blueprints to be made.
2. each item interaction requires a blueprint to be made.

The first one just means that you add the blueprint to the building materials, but it also means that it can't be used again.
The second one means that you can use the blueprint multiple times, but if your dwarves move it around a lot, this may cause unwated hauling jobs.  It also means that you could duplicate this blueprint and give yourself a reason to start a scroll industry.

I'm still trying to figure out if I can set the parameters so that only people of a certain skill can craft a specific set of items.  Such as only a fluid engineer can craft a pump.
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Workshop-based technology mod
« Reply #6 on: January 27, 2017, 01:48:47 pm »

I'm still trying to figure out if I can set the parameters so that only people of a certain skill can craft a specific set of items.  Such as only a fluid engineer can craft a pump.

This is possible, but you will need to use DFHack. Basically what you need to do is listen for completing jobs and cancel any jobs that are done by an unqualified worker.

For reactions this is easy, but I don't know if would be possible to extend to other jobs or not...

Here is an example of canceling a reaction based on entity positions:
Code: [Select]
local mechHook = function(reaction, reaction_product, unit, input_items, input_reagents, output_items, call_native)
positions = dfhack.units.getNoblePositions(unit)
if positions ~= nil then
for i = 1, #positions, 1 do
if positions[i].position.code == "TECHPRIEST" then
call_native.value = true
return
end
end
end

-- Prevent reagents from being consumed
input_items:resize(0)

call_native.value = false
if reaction_product == reaction.products[0] then
-- ^^^ Prevent message spam
announce(dfhack.TranslateName(dfhack.units.getVisibleName(unit))..": Cannot work at machine shrine, not a techpriest.", unit)
end
end
Registering a hook like this is done with eventful, I won't document it here.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

DrTank09

  • Bay Watcher
    • View Profile
Re: Workshop-based technology mod
« Reply #7 on: January 27, 2017, 11:47:22 pm »

Milo, do you happen to know of any documentation other than the GitHub site for learning more about dfhack and scripting with it?  As I mentioned in the other topic, I wouldn't mind learning how to do more extensive work with it.
Logged

skelepound

  • Bay Watcher
  • Deciever, I name thee Cael
    • View Profile
Re: Workshop-based technology mod
« Reply #8 on: January 28, 2017, 02:11:26 pm »

Well, im pretty comfortable with a simpler approach; that is, i dnk whether a specific scroll/blueprint for each item you craft is a good idea. Building a coilgun in real life only requires a basic understanding of magnetic coils and the right materials - and if you use a blueprint, you don't even need an understanding, really. And blueprints are, in the real world, re-usable. I just feel that the items added in should be attributed to a certain level of technological advancement, and a specifc path of technology - forcing people to seperately obtain each sub category, after they've worked so long to just get the right workshop, seems a bit of a dick move. I think if someone builds a robotics workshop, they should be able to have robot laborers/fighters, and maybe an advanced workshop for things like specialized med-bots - and giant mechs that slaughter invaders and are basically badass. To even reach that point you need LOADS of preceding parts, ALL of the blueprints for the tech leading UP to this invention, and you still won't have access to genetically engineered monsters that spew dragonfire and regenerate wounds in less than a day. You still won't have dwarven cyborgs, which would require both advanced robo-technology and medical technology. You won't have chemicals that turn the drinker into the hulk for 3 hours, so he kills everyone, and they regenrates him as a mild mannered scientist. It should take time to get high tier stuff, and some workshops should require materials from higher tier wokshops of MULTIPLE types, as WELL as a blueprint. But individual stuff is taking it a bit far to me.
Logged
My magic mod, Schools of Magic:
----------------------------------
http://www.bay12forums.com/smf/index.php?topic=162596.0
----------------------------------
GENERATION 28:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Workshop-based technology mod
« Reply #9 on: January 31, 2017, 02:04:28 pm »

Milo, do you happen to know of any documentation other than the GitHub site for learning more about dfhack and scripting with it?  As I mentioned in the other topic, I wouldn't mind learning how to do more extensive work with it.

Not really. Everything I know I learned by playing around with existing scripts and exploring the DFHack header files.

Oh. The DFHack header files...

If you don't already know, DFHack has some XML files that define the layout of each known structure. These are invaluable sources of information. (you should be able to find them in the DFHack repository on github)
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS