You are here: Foswiki>WorldFoundry Web>AddingANewObjectType (09 Dec 2002, KevinSeghetti;)Edit Attach
Instructions for adding a new object type to WorldFoundry

First, make sure that is really what you want to do, most behaviors can be accomplished though added some script code to an existing object type.

kts note: this is from memory, I haven't tested it lately, object.ccs might need to be updated as well.

  1. Decide what attributes of your new type should be editable by the artists/designers.
  2. Create a .oas file in wfsource/source/oas and fill it out with your attributes (see OAD for more information)
  3. Edit wfsource/source/oas/objects.mac and add your object to it (note that you will need to recompile all code and levels after changing this file)
  4. execute newobj.bat in wfsource/source/game passing in the name of your new object type (kts note: need to make a Linux version of this batch file). This will create the .cc, .hp and .hpi files for you
  5. At this point you can re-build everything and your new object type will work, but not do anything unique (it will prety much be the same as platform).
  6. Edit your new object's files and add custom behavior, using getOAD to read attributes.

kts note: an example should be added here
Topic revision: r1 - 09 Dec 2002, KevinSeghetti;
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback