Changing vanilla production (HELP)

Started by diablz, January 05, 2017, 02:01:08 PM

Previous topic - Next topic

diablz

I am currently changing some of the vanilla production, like deep-drill.
I am changing the original XML file to a different type of resources needed to build, and i am getting an unexpected error that i cannot find a way to solve...

this one:

This happens only in certain item not all of them, i would like to know what can i do to stop this from happening

Please guide me :P

sulusdacor

QuoteI am currently changing some of the vanilla production, like deep-drill.
I am changing the original XML file to a different type of resources needed to build, and i am getting an unexpected error that i cannot find a way to solve...
i hope that you mean you made an own mod folder and copied the files there. for the folder structure, just look at any mod/core and you get the general idea what the structure/naming should be.

For you error, missing thingclass. means the game does not know what kinda of object your deepdrill is. every thing ingame get's a certain thingclass. the thingclass is determined in the code of the game and definies some properties, how the object "acts", what textures you can use, what xml lines you can use and more. the vanilla deep drill has his thingclass determined in the abstract  BuildingBase (xml file with similar name in core/defs/thingdef_buildings folder). you need to define the abstracts you use for your mod in the xml files of your mod. so either you forgot the abstract or you might have the abstract but forgot to tell the deep drill def section to use the abstract as parent. to solve just add the abstract to you files or the missing xml line. or you could copie the abstract lines in your deep drill section. abstract are basiclly just a way to "save" work/ have a framework for similar objects.

diablz

Quote from: sulusdacor on January 05, 2017, 05:31:32 PM
QuoteI am currently changing some of the vanilla production, like deep-drill.
I am changing the original XML file to a different type of resources needed to build, and i am getting an unexpected error that i cannot find a way to solve...
i hope that you mean you made an own mod folder and copied the files there. for the folder structure, just look at any mod/core and you get the general idea what the structure/naming should be.


thank you i will look into that

For you error, missing thingclass. means the game does not know what kinda of object your deepdrill is. every thing ingame get's a certain thingclass. the thingclass is determined in the code of the game and definies some properties, how the object "acts", what textures you can use, what xml lines you can use and more. the vanilla deep drill has his thingclass determined in the abstract  BuildingBase (xml file with similar name in core/defs/thingdef_buildings folder). you need to define the abstracts you use for your mod in the xml files of your mod. so either you forgot the abstract or you might have the abstract but forgot to tell the deep drill def section to use the abstract as parent. to solve just add the abstract to you files or the missing xml line. or you could copie the abstract lines in your deep drill section. abstract are basiclly just a way to "save" work/ have a framework for similar objects.