Topic: Modding and Customization  (Read 2242 times)

0 Members and 1 Guest are viewing this topic.

Offline [UFP]Exeter

  • Moderator
  • Lt. Commander
  • *
  • Posts: 1080
  • SFC4 Lead Developer
Modding and Customization
« on: June 26, 2013, 09:51:11 am »
This thread is to discuss madding and customization ideas.  Granted this comes as the end but some ideas may required changes to the game code to even incorporate.

1.  Lets plan on LUA.  The necessary libraries for integration of LUA to the game are built and included.

2.  I redid the game structure a little and altered the existing game code.  This was to allow greater flexibility for LUA access to the game.  This puts only core functionality out of the area of LUA.  The core is defined as building the game structure, graphics device initialization, sound initialization, game state, event handler, game loop etc.  The core calls other "managers" to achieve functionality such as model display etc.  The managers "methods" will be open to LUA so customization may call them.  The data in the managers will not be alterable directly , just as the core does not alter the managers data directly.

Example:  Sound, the manager has a method to play background sound with parameters such as repeat, 3D etc.  The game core calls this to play the initial startup sounds.  LUA may also ccall this to alter the background.  But LUA cannot alter directly the variables that control how sound is played.

From the start I wanted the graphics and ship selection moddable, but I have been convinced other wise so I will attempt to open things as much as possible for modding.

Offline [UFP]Exeter

  • Moderator
  • Lt. Commander
  • *
  • Posts: 1080
  • SFC4 Lead Developer
Re: Modding and Customization
« Reply #1 on: July 20, 2013, 10:18:21 pm »
Part of my reorganization I redid many of the date types to allow modding.  I declared certain types such as ship classes to be enumerations.  The idea is that to change or select a ship class, for example, the specify it by the type name rather that a number.  This will prevent an accidental error by specifying illegal numbers.  When they compile they will get the errors.

I am utilizing many of the C++ 11 features to improve the code but I find it makes it better for the modders, they find errors when they build rather than running the mod.