wiki:ServerProgrammingItems

We've added some items to Quagents. In line with our efforts to not disrupt the existing functionality of the game, these items are of a new type that is not automatically picked up when a bot or client touches it. All items of the type IT_QUAGENTITEM cannot be picked up normally but otherwise act as regular items. All items of type IT_QUAGENTSENSE cannot be seen or picked up, except by the ra command.

Adding New Items

To create a new item, edit the following files:

  • game/bg_misc.c - add your item to the end of the list of items, following the same format as the other quagent items.
  • game/inv.h - define your item at the end of the list of quagent items. Make sure to change the value of QUAGENT_ITEM_END accordingly.
  • game/ai_quagentnodes.c - add a case for your new item in the put down, check inventory, and alchemize functions.
  • game/ai_directorcommands.c - add a case for your new item in the drop function
Last modified 9 years ago Last modified on Aug 26, 2011 4:11:40 PM