Assign ID

Place to get help with not working mods / modding interface.
Post Reply
Night_Ange1
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed Dec 03, 2014 1:23 pm
Contact:

Assign ID

Post by Night_Ange1 »

Having some issues with my code assigning ID to an Item I've created. The names are the same (capitals sensitive) in my recipe item and entity files.

Here is the only info I found and it was capitalization error https://forums.factorio.com/forum/vie ... n+ID#p1390

Any ideas. The error occurs in the item.lua file under place_result = "item",

User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: Assign ID

Post by L0771 »

Night_Ange1 wrote:Having some issues with my code assigning ID to an Item I've created. The names are the same (capitals sensitive) in my recipe item and entity files.

Here is the only info I found and it was capitalization error viewtopic.php?f=34&t=56&p=1390&hilit=assign+ID#p1390

Any ideas. The error occurs in the item.lua file under place_result = "item",
must be place_result = "entity", but if you have the same name this isn't the problem.
You load the entity in data.lua?
can show some code?

Night_Ange1
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed Dec 03, 2014 1:23 pm
Contact:

Re: Assign ID

Post by Night_Ange1 »

Sorry for the delay here is the mod so far.

Very basic just trying to get an item in game that I understand all the code for.
Attachments
Trucking_0.0.1.zip
(Missing Graphics)
(2.89 KiB) Downloaded 146 times

User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: Assign ID

Post by L0771 »

place_result = "trucks"
Must be
place_result = "truck",

Night_Ange1
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed Dec 03, 2014 1:23 pm
Contact:

Re: Assign ID

Post by Night_Ange1 »

Did you run the mod in your game? I believe thats where I narrowed down the culprit to which naming was having issues. My fault for not fixing it back before submitting :/

User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: Assign ID

Post by L0771 »

Night_Ange1 wrote:Did you run the mod in your game? I believe thats where I narrowed down the culprit to which naming was having issues. My fault for not fixing it back before submitting :/
__Trucking__/graphics don't exist.

entity.lua is

Code: Select all

data:extend(
{  
	{
	type = "car",
	name = "truck",
	...
	}
})
" { } " is missing.

Need changes in entity.lua, i think you use a old version, the new car has got more than 240 lines, your entity.lua has got 157 (with the change of above)

Night_Ange1
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed Dec 03, 2014 1:23 pm
Contact:

Re: Assign ID

Post by Night_Ange1 »

Yeah I tries to remove a lot of the layers so when I do get graphics I dont need 3 sets of drawings. Thanks for the help. And sorry forgot I didnt include the graphics. It was too big

Edit: Uploaded Mod to GitHub so I can easily share and work on it. https://github.com/NightAnge1/Trucking_0.0.2

P.S. THANKS L0771 That fixed my entity problem now i have a Missing node (direction_count) problem :/

Night_Ange1
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed Dec 03, 2014 1:23 pm
Contact:

Re: Assign ID

Post by Night_Ange1 »

Ok New problem and I figured I'd just append it to this thread. I'm having a problem with the Direction_Count on my animation set. Says it can't find it. Any help would be appreciated

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Assign ID

Post by Adil »

In case it's still needed:

In base car keyword "layers" is separated by two "{" from "direction_count" and in your code there seems to be only one.
Which means that instead of being inside a table inside a table labeled "layers", your "direction_count" is located right on the first level of inclusion, while the program needs to go deeper.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Night_Ange1
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Wed Dec 03, 2014 1:23 pm
Contact:

Re: Assign ID

Post by Night_Ange1 »

thanks so much man... These double layers keep getting me :?

siblingdragons
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Jul 09, 2017 5:21 pm
Contact:

Re: Assign ID

Post by siblingdragons »

I have the error : Error in AssignID, an item with the name "..." does not exist. I have installed a few mods in the steam version and now the game is not running anymore... I dont want to lose my progress in the game with deinstalling it and i cant find the mods folder , so what can I do because i cant delete the mods when the game wont start due an error in the mods ... who had this stupid idea ...

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: Assign ID

Post by Choumiko »

For steam it should be in %appdata%/Factorio (translates to "C:\Users\Choumiko\AppData\Roaming\Factorio for me. might be different for you). If you can't find it search for one of the mod names or for factorio-current.log on your PC, that should lead you to it.

Post Reply

Return to “Modding help”