[0.14] What is it used for?

Topics and discussion about specific mods
Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: [0.14] What is it used for?

Post by Ratzap »

Similar bug, I tried to load an older save that had not been made with this mod and it crashed.

Image
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: [0.14] What is it used for?

Post by MrDoomah »

Both bugs have been fixed in 1.1.1.
Pe334
Inserter
Inserter
Posts: 44
Joined: Thu Jun 16, 2016 4:00 pm
Contact:

Re: [0.14] What is it used for?

Post by Pe334 »

This mod is cool !!!!!!!!!! :D :D :D :D
It helps a lot when playing Angel & Bob for the first time...
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [0.14] What is it used for?

Post by aubergine18 »

This mod has been huge help in developing my own mods, because I can quickly check that my prototypes are doing what I expect...

I did notice one omission though - for materials which place tiles when used, eg. like concrete or landfil, the mod doesn't mention it.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: [0.14] What is it used for?

Post by MrDoomah »

aubergine18 wrote:I did notice one omission though - for materials which place tiles when used, eg. like concrete or landfil, the mod doesn't mention it.
What do you mean by this? I think it is quite obvious what item places what tile. Landfill places landfill, concrete places concrete and stone brick places stone bricks.
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: [0.14] What is it used for?

Post by MrDoomah »

Update 1.1.2
  • Bugfix: Closing the searchbar now also closes the results list
  • Feature: Searchbar now also searches fluids
  • Optimisation: Search results are only shown when the search string is more than one character to prevent hangup.
Modportal download

With thanks to Credomane for his contributions
Last edited by MrDoomah on Fri Oct 07, 2016 11:48 am, edited 1 time in total.
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: [0.14] What is it used for?

Post by Arch666Angel »

So I have a little issue: If you lookup something it will also show recipes/technologies which are hidden.
Exasperation
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Fri Apr 22, 2016 9:55 pm
Contact:

Re: [0.14] What is it used for?

Post by Exasperation »

Arch666Angel wrote:So I have a little issue: If you lookup something it will also show recipes/technologies which are hidden.
I took a look at it, and hiding unresearchable recipes seems fairly straightforward, just a couple of changes in control.lua needed.

Code: Select all

function find_technology(recipe, player)
	for _,tech in pairs(player.force.technologies) do
		if tech.enabled and not tech.researched then
			for _, effect in pairs(tech.effects) do
				if effect.type == "unlock-recipe" then
					if effect.recipe == recipe then
						return tech.localised_name
					end
				end
			end
		end
	end
	return false
end

Code: Select all

	-- ingredient in
	if #ingredient_in > 0 or not side then
		local ingredient_frame = body_flow.add{type = "frame", name = "wiiuf_ingredient_frame", caption = {"ingredient_in"}}
		local ingredient_scroll = ingredient_frame.add{type = "scroll-pane", name = "wiiuf_ingredient_scroll"}
		ingredient_scroll.style.minimal_height = table_height
		ingredient_scroll.style.maximal_height = table_height
		local ingredient_table = ingredient_scroll.add{type = "table", name = "wiiuf_ingredient_table", colspan = 2}
		for i, recipe in pairs(ingredient_in) do
			local from_research = recipe.enabled or find_technology(recipe.name, player)
			if from_research then
				ingredient_table.add{type = "sprite", name = "wiiuf_sprite_" .. i, sprite = "recipe/"..recipe.name}
				local label = ingredient_table.add{type = "label", name = "wiiuf_label_" .. i, caption = recipe.localised_name}
				label.style.minimal_height = 34
				if not recipe.enabled then
					label.style = "invalid_label_style"
					label.tooltip = {"behind_research", from_research}
				end
			end
		end
	end
	-- product of
	if #product_of > 0 or not side then
		local product_frame = body_flow.add{type = "frame", name = "wiiuf_product_frame", caption = {"product_of"}}
		local product_scroll = product_frame.add{type = "scroll-pane", name = "wiiuf_product_scroll"}
		product_scroll.style.minimal_height = table_height
		product_scroll.style.maximal_height = table_height
		local product_table = product_scroll.add{type = "table", name = "wiiuf_product_table", colspan = 2}
		for i, recipe in pairs(product_of) do
			local from_research = recipe.enabled or find_technology(recipe.name, player)
			if from_research then
				product_table.add{type = "sprite", name = "wiiuf_sprite_" .. i, sprite = "recipe/"..recipe.name}
				local label = product_table.add{type = "label", name = "wiiuf_label_" .. i, caption = recipe.localised_name}
				label.style.minimal_height = 34
				if not recipe.enabled then
					label.style = "invalid_label_style"
					label.tooltip = {"behind_research", from_research}
				end
			end
		end
	end
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: [0.14] What is it used for?

Post by MrDoomah »

Arch666Angel wrote:So I have a little issue: If you lookup something it will also show recipes/technologies which are hidden.
You're right, this wasn't important when you could only look up items in your inventory since you couldn't really get items that where hidden. But now you can search for items there are some issues with that.

For example, it now also shows items that are used by mods internally and don't have a recipe to create or consume it.
Exasperation wrote:
Arch666Angel wrote:So I have a little issue: If you lookup something it will also show recipes/technologies which are hidden.
I took a look at it, and hiding unresearchable recipes seems fairly straightforward, just a couple of changes in control.lua needed.

Code: Select all

...
This code will probably hide all the unlocked recipes since the find_technology() function only searches trough technologies that aren't researched yet. I haven't ran your code yet, so you might have coded something around that. (Also quick tip, next time you post some edited code, mark what you've changed; eg some white space around it or a comment)
So it does work with that. nvm then. (The code part still stands) And it now can show empty columns in the side bar because it filters out recipes after it checks if there are recipes to display.

Besides, showing technologies as not found makes mod makers aware that a recipe isn't linked to a technology, hiding them can cause confusion whether the recipe isn't linked in a technology, or if the recipe isn't loaded in the game.
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: [0.14] What is it used for?

Post by MrDoomah »

Update 1.1.3
  • Recipes locked behind disabled technologies are now hidden.
  • Disabled recipes without any technology to unlock them are hidden.
  • To show the above, chance SHOW_ALL to true in control.lua
  • Hidden recipes now do show up (eg: the recipe for rocket parts is hidden, so before this update rocket fuel would not be an ingredient in anything)
Modportal download

With thanks to Exasperation for his contribution
Drake1500
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jul 05, 2016 10:51 pm
Contact:

Re: [0.14] What is it used for?

Post by Drake1500 »

Thanks MrDoomah, this is an amazing mod! Especially now that I'm using Bob's and Angel's mods, this is really helping me plan out my production and giving me some clarity on what needs what and what I need to do! :D

However, I've seen others recommend making the icons/text in the GUI popup clickable so that you can easily browse the production chain (ie, I open up the recipes for Iron Plate -> click on "Gear Wheels" in the popup -> it switches to showing the recipes for Gear Wheels). This is a change that I am REALLY looking forward to, it'll push your mod from the "very helpful" category to "indi-freaking-spensible" category.

Have you looked much at making this change? I'm not a modder, so I don't know how difficult it would be, so if you don't have time or if it's just too difficult or impossible, I understand. I'm just wondering if you have a timeline on if/when this will be implemented.
Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [0.14] What is it used for?

Post by Peter34 »

Will this be updated to 0.15?
Yann20x
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Apr 29, 2017 4:51 am
Contact:

Re: [0.14] What is it used for?

Post by Yann20x »

The mod can be updated by simply replacing

Code: Select all

"factorio_version": "0.14"
with

Code: Select all

"factorio_version": "0.15"
in

Code: Select all

info.json
.

I guess if the original author doesn't update this in the next few weeks, I'll upload a copied version (with credits obviously, no intend to steal anything) to the mod portal.
Coppermine
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat May 06, 2017 11:25 am
Contact:

Re: [0.14] What is it used for?

Post by Coppermine »

For those waiting for a 0.15 version of this, I've just released "What is it really used for?", a fork of this mod. See https://mods.factorio.com/mods/Coppermi ... y-used-for.

It works in 0.15. It also adds the oft-requested feature of navigating around items by clicking on the recipes in the list.

I've only tested it fairly lightly, so bugs are certainly possible. Reports welcome.

I received no response from Mr Doomah regarding incorporating these changes into his version. I hope he doesn't mind me releasing this, and using this thread for feedback on it.
AndrewIRL
Fast Inserter
Fast Inserter
Posts: 240
Joined: Fri Mar 24, 2017 2:17 pm
Contact:

Re: [0.14] What is it used for?

Post by AndrewIRL »

Coppermine wrote:For those waiting for a 0.15 version of this, I've just released "What is it really used for?", a fork of this mod.
Thanks for this mod fork, tried it today, works in 0.15
Creat
Inserter
Inserter
Posts: 41
Joined: Sun Jun 22, 2014 4:35 pm
Contact:

Re: [0.14] What is it used for?

Post by Creat »

Coppermine wrote:using this thread for feedback on it.
First of all, thanks for the update/maintenance! Navigating through the list is a huge help and makes this mod massively more useful than it already was.

I do have a bug to report though: Some recipes are just missing in some contexts but work fine in others.

As a specific example: I'm playing a bobs/angels campaign (why else would need this mod ;) ) and I don't have Bob's Warfare. So the "Grenade" recipe is the default vanilla one (untouched by mods as far as I know).
When searching for "Grenade", it shows up and with the fork I can click on it and see that it needs coal. I'm also crafting a bunch of those for the military science packs, so the recipe is clearly there (not hidden/disabled) and works.
When searching for "Coal" it doesn't list "Grenade" in the "Ingredient in" column though for some reason.

This shows the described situation. I've done my best to scroll the "Ingredient in"-column to show all items, and all of them are (mostly) visible.
Since I happen to report a bug in factorio a short while ago, the (almost current) save game is attached to this post, in case you want to take a look at it (and it doesn't happen in your game(s)).
Coppermine
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat May 06, 2017 11:25 am
Contact:

Re: [0.14] What is it used for?

Post by Coppermine »

Creat wrote:I do have a bug to report though: Some recipes are just missing in some contexts but work fine in others.
Thanks for the report. On a quick test I don't observe the same issue. I'll try with your save when I get the chance.
Coppermine
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat May 06, 2017 11:25 am
Contact:

Re: [0.14] What is it used for?

Post by Coppermine »

OK, I think it's fixed. I've uploaded version 1.2.2 to the portal. Fixed another unrelated crashing bug also.

Creat: Thanks for providing your save game; I don't think I could have tracked down the issue without it.
TokMor
Inserter
Inserter
Posts: 31
Joined: Mon Jan 23, 2017 3:37 am
Contact:

Re: [0.14] What is it used for?

Post by TokMor »

Thanks for this mod it is really a huge improvement. Could you also have the recipe pane show the buildings that the recipe can be constructed in?
Thanks!
Coppermine
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat May 06, 2017 11:25 am
Contact:

Re: [0.14] What is it used for?

Post by Coppermine »

TokMor wrote:Thanks for this mod it is really a huge improvement. Could you also have the recipe pane show the buildings that the recipe can be constructed in?
Thanks!
Indeed, that was a feature I was already thinking of. I believe I've implemented it in the new 1.2.3 I've just uploaded. Let me know if you run into any issues.
What is it really used for? 1.2.3
  • List crafting machines for recipes.
  • Bold subheadings in the recipe pane.
  • Fixed height of recipe pane.
Last edited by Coppermine on Sun Jun 04, 2017 7:58 pm, edited 1 time in total.
Post Reply

Return to “Mods”