Page 1 of 1
(recipe): conversion of data to type "t" failed
Posted: Sat Sep 26, 2015 11:40 pm
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.
Re: (recipe): conversion of data to type "t" failed
Posted: Mon Sep 28, 2015 10:43 am
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
}
Re: (recipe): conversion of data to type "t" failed
Posted: Mon Sep 28, 2015 3:21 pm
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...
Re: (recipe): conversion of data to type "t" failed
Posted: Mon Sep 28, 2015 7:18 pm
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.)
Re: (recipe): conversion of data to type "t" failed
Posted: Tue Sep 29, 2015 4:57 am
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.
Re: (recipe): conversion of data to type "t" failed
Posted: Thu Oct 01, 2015 8:44 pm
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...