Request for Mod: "Early Blueprints"

This is the place to request new mods or give ideas about what could be done.
silverkitty23
Fast Inserter
Fast Inserter
Posts: 117
Joined: Wed May 11, 2016 6:52 am
Contact:

Request for Mod: "Early Blueprints"

Post by silverkitty23 »

It should be a dirt simple mod, but I don't want to learn Lua just now... the requested mod would do the following things only:

1) change name of tech "Automated Construction" to "Construction Planning"
2) make it cost 100 or 150 red science and NO green science (from 75/75)
3) make it have either no prerequisites or an early prereq like Logistics 1 or Electronics
4) change the cost of blueprints/decon planner from 1 red to 10 green
5) it should not rely on or require any other mod (though I fully intend to use it with the 'Blueprint String' mod) - whether or not you choose to make it compatible with other mod packs like Bob's or whatever is up to you (presumably this wouldn't be too hard, but it depends on how much they changed the resources and tech tree)

That's it. It wouldn't make construction bots earlier or easier - the blueprints would only be for your own planning purposes. You would have to fill them in yourself (or not as you see fit), but at least you could import your blueprint strings and stamp them down to check size/space and plan your early base better.

My apologies if this mod already exists - I did look at *most* of the existing mods already, but I'm sure I missed some.

Using my 30 years of programming experience, 23 of which are professional, I estimate it would take me 2-6 hours to write this mod (since I'd have to learn all the stuff), and I guess it would take Bob about 20 minutes (I'm not tasking Bob to write it, just using him as an example). There's probably(?) no actual coding involved, even, just setting variables (well, probably hash values in existing global variables). But since I don't know which variables/values, I'm up a creek :) I found the docs on which classes and functions exist, but I didn't find a list of existing names of things (like, I could probably figure out how to change some tech in 15-45 minutes, but not how to change a particular existing tech)
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Request for Mod: "Early Blueprints"

Post by prg »

Well let's see...
silverkitty23 wrote:1) change name of tech "Automated Construction" to "Construction Planning"
locale/en/en.cfg:

Code: Select all

[technology-name]
automated-construction=Construction planning
silverkitty23 wrote:2) make it cost 100 or 150 red science and NO green science (from 75/75)
data-updates.lua:

Code: Select all

data.raw.technology["automated-construction"].unit={count=100, ingredients={{"science-pack-1", 1}}, time=30}
silverkitty23 wrote:3) make it have either no prerequisites or an early prereq like Logistics 1 or Electronics
data-updates.lua:

Code: Select all

data.raw.technology["automated-construction"].prerequisites={"logistics"}
silverkitty23 wrote:4) change the cost of blueprints/decon planner from 1 red to 10 green
data-updates.lua:

Code: Select all

data.raw.recipe.blueprint.ingredients={{"electronic-circuit", 10}}
silverkitty23 wrote:5) it should not rely on or require any other mod (though I fully intend to use it with the 'Blueprint String' mod) - whether or not you choose to make it compatible with other mod packs like Bob's or whatever is up to you (presumably this wouldn't be too hard, but it depends on how much they changed the resources and tech tree)
This works on its own. Not tested if it breaks other mods.
Attachments
early_blueprints_0.1.0.zip
(1.5 KiB) Downloaded 123 times
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
silverkitty23
Fast Inserter
Fast Inserter
Posts: 117
Joined: Wed May 11, 2016 6:52 am
Contact:

Re: Request for Mod: "Early Blueprints"

Post by silverkitty23 »

You are truly awesome, thanks!

data.raw.recipe.blueprint.ingredients

don't suppose you know the magic name of deconstruction planner that would sub for blueprint in there?
I might hope for "deconstruction-planner" but that would be too easy, no?
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Request for Mod: "Early Blueprints"

Post by prg »

That thing is indeed just called deconstruction-planner. But since the name contains a dash, thus rendering it invalid as a Lua identifier, you need to use a different syntax here:

Code: Select all

data.raw.recipe["deconstruction-planner"].ingredients
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
silverkitty23
Fast Inserter
Fast Inserter
Posts: 117
Joined: Wed May 11, 2016 6:52 am
Contact:

Re: Request for Mod: "Early Blueprints"

Post by silverkitty23 »

Just like javascript. maybe Lua won't be so bad to learn.

Thanks again!
Nebbeh
Inserter
Inserter
Posts: 48
Joined: Sat Apr 16, 2016 1:46 pm
Contact:

Re: Request for Mod: "Early Blueprints"

Post by Nebbeh »

Nice mod, been searching for something like this! Thanks for the request Silverkitty23 and the mod prg! :D
User avatar
ArderBlackard
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Thu May 05, 2016 12:41 pm
Contact:

Re: Request for Mod: "Early Blueprints"

Post by ArderBlackard »

silverkitty23 wrote:Just like javascript. maybe Lua won't be so bad to learn.
It's much simpler actually. :)
Gib dich hin bis du Glück bist
Sean Mirrsen
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Apr 27, 2016 6:30 pm
Contact:

Re: Request for Mod: "Early Blueprints"

Post by Sean Mirrsen »

Hm. You know, it could be a fun idea to try and make blueprints manually fillable. Click a blueprint ghost, and if you have the requisite item in the inventory you place it down. No robots needed.

...I will feel very silly if that's already how it works. >_>
Post Reply

Return to “Ideas and Requests For Mods”