Page 1 of 1

Error Physics model Not found. ( Help me )

Posted: Wed May 22, 2019 8:18 am
by Petas
Hi.
Creating a new map, but suddenly nothing appeared to me this message


Image

Code: Select all

CreateObjectType("Egypt Pyramid", "Prop")
{
  GameObj()
  {
   Properties()
    {
     Add("Filter::World");
    }
  }

  MapObj()
  {
    GodFile("Pyramid.god");
    PhysicsModel("building");
    NearFadeFactor(0);
    ShowAlways(1);
    DarkenUnderFog(1);
  }
}

CreateObjectType("ambient.deserto.rock4", "Prop")
{
  GameObj()
  {
   Properties()
    {
     Add("Filter::World");
    }
  }

  MapObj()
  {
    GodFile("do_amb_rock04.god");
    PhysicsModel("building");
    NearFadeFactor(0);
    ShowAlways(1);
    DarkenUnderFog(1);
  }
}

CreateObjectType("ambient.deserto.rock5", "Prop")
{
  GameObj()
  {
   Properties()
    {
     Add("Filter::World");
    }
  }

  MapObj()
  {
    GodFile("do_amb_rock05.god");
    PhysicsModel("building");
    NearFadeFactor(0);
    ShowAlways(1);
    DarkenUnderFog(1);
  }
}

CreateObjectType("ambient.deserto.rock6", "Prop")
{
  GameObj()
  {
   Properties()
    {
     Add("Filter::World");
    }
  }

  MapObj()
  {
    GodFile("do_amb_rock06.god");
    PhysicsModel("building");
    NearFadeFactor(0);
    ShowAlways(1);
    DarkenUnderFog(1);
  }
}
Help me solve this problem

Re: Error Physics model Not found. ( Help me )

Posted: Wed May 22, 2019 11:10 am
by j3rry
Check your types.cfg file, which is stored in map folder. There should be a line:

Code: Select all

#include "types_physics.cfg"

Re: Error Physics model Not found. ( Help me )

Posted: Thu May 23, 2019 11:26 am
by TommyCD1
Little fun fact: If your mission is missing it's types.cfg file entirely, then the game will provide a backup directly from base.x which actually includes all necessary files, such as types_physics.cfg. However, if you do have a types.cfg file in your mission, then the game will read from that, regardless if it's valid.

Anyway, the error you are receiving is related to the line in an objects code that refers to it's Physics model, which determines how it interacts with the ground itself. It is typically located in the object's main .cfg file under the MapObj() module.

Code: Select all

CreateObjectType("Egypt Pyramid", "Prop")
{
  GameObj()
  {
   Properties()
    {
     Add("Filter::World");
    }
  }

  MapObj()
  {
    GodFile("Pyramid.god");
    PhysicsModel("building");  // this line here defines the physics.
    NearFadeFactor(0);
    ShowAlways(1);
    DarkenUnderFog(1);
  }
}
I've highlited the involved line in your example. Unfortunately, the error you are receiving tells me that you are trying to use a physics model that does not exist; in this case "Flyer". The issue is that the example code you provided here does not include the offending code that is causing this conflict.

If you would like to see the different types of physics, and the differences between them, you can check out the types_physics.cfg file, which IIRC is located in the 'misc' folder when unpacking base.x

Finally, sorry if I'm being particularly unhelpful, but my modding memory is rusty and I don't have any of my resources available to look at for reference, being that I'm currently on a library computer. :W