(recipe): conversion of data to type "t" failed

Place to get help with not working mods / modding interface.
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

(recipe): conversion of data to type "t" failed

Post by vzybilly »

I'm not to sure why thing is happening... I don't see why it is erroring out...

Code: Select all

  14.943 Error Util.cpp:46: Error while loading recipe prototype "coloured-tile-lv1" (recipe): conversion of data to type "t" failed
Modifications: vzyColouredTiles
recipe from the data.raw just before the error...

Code: Select all

ingredients.1={
    amount[number] = 1
    name[string] = raw-coloured-tile}
name[string] = coloured-tile-lv1
result[string] = coloured-tile-lv1
result_count[number] = 2
type[string] = recipe
I've looked at other recipes in data.raw and everything seems to be correct... This whole mod has given me abit of a headache and taking a long time.
Will code for Food. I also have 11+ mods!
keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: (recipe): conversion of data to type "t" failed

Post by keyboardhack »

I don't have the whole mod so i can't test it but i think this is what you want

Code: Select all

{
	type = "recipe",
	name = "coloured-tile-lv1",
	ingredients = 
	{
		{"raw-coloured-tile", 1}
	},
	result = "coloured-tile-lv1",
	result_count = 2
}
Waste of bytes : P
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: (recipe): conversion of data to type "t" failed

Post by vzybilly »

keyboardhack wrote:I don't have the whole mod so i can't test it but i think this is what you want

Code: Select all

{
	type = "recipe",
	name = "coloured-tile-lv1",
	ingredients = 
	{
		{"raw-coloured-tile", 1}
	},
	result = "coloured-tile-lv1",
	result_count = 2
}
that is how it is... it's just sorted thanks to the dumping program... I'll see if I can't package it up to post it up here... this is pretty much the only thing holding me back from getting the nine mods out... though, I might get the special tenth one finished before...
Will code for Food. I also have 11+ mods!
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: (recipe): conversion of data to type "t" failed

Post by vzybilly »

Here are the mods.
"vzy" adds in the API to make tweaked copies of other things
"vzyColouredTiles" is all the backbone of it, where this is erroring
"vzyColouredTiles1Bit" is the functions for the backbone to tell how many to make and the ingredients, it also provides an interface for the backbone to know what to do during the actual game.

I don't really see where things are failing, if you want to look at the data after the mods, I have a useful mod-thing (on the forums) that will dump the entire data table to the console when included (Scala program can turn that into a useful webpage that is easier to navigate.)
Attachments
derpped mods.zip
The mods used
(9.58 KiB) Downloaded 148 times
Will code for Food. I also have 11+ mods!
Rseding91
Factorio Staff
Factorio Staff
Posts: 14269
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: (recipe): conversion of data to type "t" failed

Post by Rseding91 »

Firstly: that's the most confusing method of making a mod I've ever seen. I recommend anyone looking to make Factorio mods use this mothod: https://github.com/Rseding91/Stainless- ... tities.lua

That method provides the best forward compatibility and is super easy to understand what's going on. All of the logic for the new entity you're adding is in the one location and anyone can edit anything you've set.

I spent 15 minutes just trying to understand how it was working to know where the data was coming from and going to. If it wasn't using that system I would venture to say you would have found the mistake your self instead of getting stuck.


Now that I've got that off my chest: you set type=item when it should have been type="item" in data-updates.lua for vzyColouredTiles_0.1.0 lines 9, 10, 13, and 16.

Once that's fixed you'll have other assorted errors to resolve but those are easily solvable by the messages they give.
If you want to get ahold of me I'm almost always on Discord.
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: (recipe): conversion of data to type "t" failed

Post by vzybilly »

the API is still in the middle of a refactor and abit complicated but with two lines of code I could make 9001 items and recipes for compressed coal. that's more of the purpose of the API mod, I just haven't finished cleaning it all up...

thanks for the help, I'm finally able to sit with my computer and work so I'll see if I can't get things rolling again...
Will code for Food. I also have 11+ mods!
Post Reply

Return to “Modding help”