Error in AssignID

Place to get help with not working mods / modding interface.
User avatar
Blu3wolf
Fast Inserter
Fast Inserter
Posts: 203
Joined: Thu Apr 09, 2015 5:20 am
Contact:

Error in AssignID

Post by Blu3wolf »

So Ive deliberately caused one of these errors, by setting a specific item (diamond-ore) to nil, essentially deleting it. Something is evidently referencing this item, otherwise I would not be getting the error. I cant find what is referencing it though, and Ive been at it for a few hours.

Is there an easier way to find it, other than opening all the lua files I can find and searching for the string 'diamond-ore'? because if thats the only way, then Im stumped - the string is only in two places, and both of those places in turn should not be getting as far as AssignID (as they have also been set to nil).

Related to the above, when does the AssignID process happen in relation to data.lua, data-updates.lua, and data-final-fixes.lua? Im guessing after all of them, but Im not sure.

Cheers all!

Rseding91
Factorio Staff
Factorio Staff
Posts: 14102
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Error in AssignID

Post by Rseding91 »

What's the exact message you're getting? It should contain the mod(s) the error is coming from (or at least point to one of them to get started).

The ID assignment happens after all of the mods are loaded (after all data----.lua phases).
If you want to get ahold of me I'm almost always on Discord.

User avatar
Blu3wolf
Fast Inserter
Fast Inserter
Posts: 203
Joined: Thu Apr 09, 2015 5:20 am
Contact:

Re: Error in AssignID

Post by Blu3wolf »

Error in AssignID, item with name 'diamond-ore' does not exist

That is the entire error message I am getting.

matjojo
Filter Inserter
Filter Inserter
Posts: 337
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

Re: Error in AssignID

Post by matjojo »

Blu3wolf wrote:Error in AssignID, item with name 'diamond-ore' does not exist

That is the entire error message I am getting.
I remember getting this when trying to give a name in the locale files to things that don't exist. those error messages do indeed not specify all too much.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14102
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Error in AssignID

Post by Rseding91 »

What I'd do is simply open all of the files in the mod and do a search for the text. It will show anywhere that it's being used and you can remove it.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Blu3wolf
Fast Inserter
Fast Inserter
Posts: 203
Joined: Thu Apr 09, 2015 5:20 am
Contact:

Re: Error in AssignID

Post by Blu3wolf »

Took me a while but that was ultimately the solution I had to use Rseding. Cheers for the suggestion.

Is that an error message that could be improved in a future version?

Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: Error in AssignID

Post by Rockstar04 »

I just had to battle this non descript error the other day, where the FARL mod was looping through every electric-pole item, and not calling it by name, so it was even harder to find the error.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14102
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Error in AssignID

Post by Rseding91 »

Blu3wolf wrote:Took me a while but that was ultimately the solution I had to use Rseding. Cheers for the suggestion.

Is that an error message that could be improved in a future version?
Can you upload a mod set that reproduces the error so I can test different error messages?
If you want to get ahold of me I'm almost always on Discord.

User avatar
Blu3wolf
Fast Inserter
Fast Inserter
Posts: 203
Joined: Thu Apr 09, 2015 5:20 am
Contact:

Re: Error in AssignID

Post by Blu3wolf »

I could, but an easy way to replicate it would be to load up any mod, and in data set something to nil.

Data.raw["item-group"]["production"] = nil

For instance. The error comes up most often for me when removing things this way, which has been a more common use scenario for me than I expected - its useful to disabled things present in other mods when your mod is loaded, but getting factorio to start means all the references to the removed item/item-group/whatever need to get removed as well. Finding those can be hard. It wouldnt hurt to have an error that specifies what is causing it.

Otherwise tonight I could upload a set of mods that would replicate the error.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14102
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Error in AssignID

Post by Rseding91 »

Blu3wolf wrote:I could, but an easy way to replicate it would be to load up any mod, and in data set something to nil.

Data.raw["item-group"]["production"] = nil

For instance. The error comes up most often for me when removing things this way, which has been a more common use scenario for me than I expected - its useful to disabled things present in other mods when your mod is loaded, but getting factorio to start means all the references to the removed item/item-group/whatever need to get removed as well. Finding those can be hard. It wouldnt hurt to have an error that specifies what is causing it.

Otherwise tonight I could upload a set of mods that would replicate the error.
A set of mods would be nice.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Blu3wolf
Fast Inserter
Fast Inserter
Posts: 203
Joined: Thu Apr 09, 2015 5:20 am
Contact:

Re: Error in AssignID

Post by Blu3wolf »

mod is here: https://github.com/Blu3wolf/HARDmod/arc ... eShoot.zip

rename to HARDmod_0.1.0.zip

dependencies can be found online but are mirrored here for your convenience: http://blu3wolf.com/Factorio/

The set of mods provided here will cause an error on starting Factorio "Error in AssignID; item with name "raw-ruby" does not exist."

An ideal error message could identify the line in the file that tries to reference the item with name 'raw-ruby' in question.

Thanks for looking into this!

Boogieman14
Filter Inserter
Filter Inserter
Posts: 776
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: Error in AssignID

Post by Boogieman14 »

Version 0.14.21 is still giving this rather nondescript error message with the following mod set:

https://www.dropbox.com/s/q5w7nc2etloxdhy/mods.zip?dl=0

Just including the name of the item that's trying to include the missing item would probably already help massively.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14102
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Error in AssignID

Post by Rseding91 »

Boogieman14 wrote:Version 0.14.21 is still giving this rather nondescript error message with the following mod set:

https://www.dropbox.com/s/q5w7nc2etloxdhy/mods.zip?dl=0

Just including the name of the item that's trying to include the missing item would probably already help massively.
Any prototype can have that error - it's nothing specific to items.

Also I improved the error for 0.15.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding help”