Adding Heads and Weapons to AI

From The DarkMod Wiki
Jump to navigationJump to search

For attaching non-weapons and other items to AI see Attaching Props to AI

Changing (attaching) weapons to AI

This section possibly needs expanding but here is some basic info:

def_attach1 <weapon name> is sufficient now to attach working weapons to AI.


To make a builder use a sword instead of a hammer weapon:

def_attach atdm:moveable_longsword

By default that is carried on the back. I think there is a spawnarg to carry it at the belt (TO DO)

So, if you wanted say, a builder to use a bow then try this (I've not tested this):

def_attach1 atdm:moveable_longbow

Optionally also add...

def_attach2 atdm:prop_quiver_full

def_attach3 atdm:prop_quiver_arrow

You might, for instance, find the above is optimally position on the back of the builder. TODO add offset spawnargs to modify position

Changing (attaching) heads on AI

def_head <head name> is sufficient now to attach heads. But Dark Radiant now has a visual head browser so the easiest way is to enter the property def_head with some random characters as value, select it, then select the select head button at the bottom of the Entity Inspector panel.

Details are at:

Swapping Heads on AI Models
Heads Available for AI

Removing inherited Attachments from AI

It's possible to remove inherited AI attachments like weapons in DarkRadiant by overriding the inherited spawnargs. To do this, select the entity in DarkRadiant, select "Show inherited properties" and browse to the offending attachment (for instance "def_attach1") and set its value to the minus sign "-". (Note: It's not possible to store empty spawnargs (this would be a deletion in DarkRadiant), the "empty" value has been set to the minus "-" - this is just a convention, the SDK will ignore the minus signs. Other values will throw an error).

"def_attach1"   "-"

This will override the inherited spawnarg and in fact remove the attachment from the AI without throwing a console error on map load.