[fixed][14.21]Error: Unit prototype required but missing.

Place to get help with not working mods / modding interface.
Post Reply
matjojo
Filter Inserter
Filter Inserter
Posts: 337
Joined: Wed Jun 17, 2015 6:08 pm
Contact:

[fixed][14.21]Error: Unit prototype required but missing.

Post by matjojo »

Still working on a base replacement, and an error has popped up I can't figure out.

Code: Select all

Error: Unit prototype required but missing.
Unit prototype? I have literally no idea what this might mean, I'm in the process of indexing all the game files to allow me to search through them, but that is taking ages, so I hope anyone of you guys has done that, or can help me with the error.
For now I have been manually opening all the prototype files and using CTRL-F to look for 'unit'. But I have not been able to find it.

The error message ingame:
Image
Last edited by matjojo on Wed Dec 21, 2016 8:44 pm, edited 1 time in total.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [14.21]Error: Unit prototype required but missing.

Post by Nexela »

Look in demo-entities.lua

Unit is the biters/etc


You can usually open a whole directory up in your editor and make use of its find in files features to search that way.

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

Re: [14.21]Error: Unit prototype required but missing.

Post by matjojo »

demo-entities only found this line which is not it:

Code: Select all

function make_unit_melee_ammo_type(damagevalue)
but your idea is a smart one, I'll see how NPP likes opening all those files. I really should have thought about that on my own instead of opening the files one by one.

as for the enemies, I can find the entity that has as it's type "unit", being the small-biter, adding this to the prototypes worked, although the error message did not say small-biter prototype. Kinda weird, but I guess that nobody should actually be reading these.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [fixed][14.21]Error: Unit prototype required but missing.

Post by Nexela »

small-biter is just the name for "unit"

Also NPP has an open folder option. Still might be worth moving to an editor or IDE that supports linting though :)

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [fixed][14.21]Error: Unit prototype required but missing.

Post by daniel34 »

It is the biter/spitter units. Removing both files demo-enemies.lua and enemies.lua, removing their references from data.lua and the steamrolled achievement that requires the type unit-spawner will result in that exact error message.
You can then actually continue to the main menu, but on creating a new map it will give the same error and quit.

As Nexela already mentioned it is a unit prototype:

Code: Select all

    type = "unit",
    name = "small-biter",
You are probably required to create a unit prototype, even if it's just a dummy. As long as you don't also require a unit-spawner prototype there shouldn't be a way to actually spawn them, or you disable them in your scenario.
quick links: log file | graphical issues | wiki

Post Reply

Return to “Modding help”