718
edits
Kernelmethod (talk | contribs) m (Add details about BioAmmoLoader; add more info on what springiness does.) |
Kernelmethod (talk | contribs) (Add info about the new removal tags) |
||
(11 intermediate revisions by the same user not shown) | |||
Line 31: | Line 31: | ||
| <code><nowiki><part></nowiki></code> | | <code><nowiki><part></nowiki></code> | ||
| Indicates that this object should load the part with the specified name. A parts is any C# class that inherits <code>IPart</code>.<br>You don't need to know how to code to add a part though, there are a lot of useful parts already available in the base game that you can steal from other objects. | | Indicates that this object should load the part with the specified name. A parts is any C# class that inherits <code>IPart</code>.<br>You don't need to know how to code to add a part though, there are a lot of useful parts already available in the base game that you can steal from other objects. | ||
|- | |- | ||
| <code><nowiki><mutation></nowiki></code> | | <code><nowiki><mutation></nowiki></code> | ||
Line 45: | Line 42: | ||
|- | |- | ||
| <code><nowiki><inventoryobject></nowiki></code> | | <code><nowiki><inventoryobject></nowiki></code> | ||
| | | Adds an object to a creature's inventory. <code>Number</code> can be specified to say how many of the object the creature should have. In addition, a blueprint can be prefixed with <code>@</code> to sample the inventory objects from a population table, e.g. <code>Blueprint="@DynamicObjectsTable:EnergyCells:Tier{ownertier}"</code>. | ||
|- | |- | ||
| <code><nowiki><stat></nowiki></code> | | <code><nowiki><stat></nowiki></code> | ||
Line 63: | Line 60: | ||
|- | |- | ||
| <code><nowiki><stag></nowiki></code> | | <code><nowiki><stag></nowiki></code> | ||
| | | Adds an object to a [[Modding: Encounters and Population#DynamicSemanticTable|dynamic semantic table]]. | ||
|- | |||
| <code><nowiki><mixin></nowiki></code> | |||
| Adds a "mixin" to an object. This can be used in place of (or in addition to) inheritance to automatically copy parts and tags to an object from another object. <code>mixin</code> supports the following attributes: | |||
* '''Name (string):''' blueprint used in mixin | |||
* '''Include (string):''' comma-delimited string of elements to include | |||
* '''Exclude (string):''' comma-delimited string of elements to exclude | |||
* '''Priority (int):''' mixin priority (lower comes earlier) | |||
* '''Fill (bool):''' whether to add the mixin before or after normal inheritance | |||
|- | |- | ||
|} | |} | ||
The effects of most objects tags can be reverted using a <code>remove*</code> tag. For instance, <code><nowiki><removepart Name="..." /></nowiki></code> will remove a part from an object blueprint; <code><nowiki><removemutation Name="..." /></nowiki></code> can be used to remove a mutation from a creature{{Code Reference|namespace=XRL.World.Loaders|class=ObjectBlueprintLoader.RemovalNode}}. | |||
==Adding the object to encounters== | ==Adding the object to encounters== | ||
Line 94: | Line 101: | ||
| Short | | Short | ||
| Affects the description of an object when you look at it. | | Affects the description of an object when you look at it. | ||
|- | |||
| DeployWith | |||
| Blueprint, PreferredDirection, SameCell, SolidOkay, SeepingOkay, Chance, CarryOverOwner | |||
| Ensure that the object spawns alongside other objects. This is used, for example, by {{favilink|air well|plural}} to ensure that they spawn with {{favilink|catch basin|plural}}. | |||
|- | |- | ||
| Food | | Food | ||
Line 134: | Line 145: | ||
| OnSuccessAmount, OnSuccess | | OnSuccessAmount, OnSuccess | ||
| Can be applied to a creature's corpse to make it [[butchery|butcherable]]. | | Can be applied to a creature's corpse to make it [[butchery|butcherable]]. | ||
|- | |||
| Consumer | |||
| Chance, WeightThresholdPercentage, SuppressCorpseDrops, Message, FloatMessage | |||
| Causes a creature to destroy objects and creatures in its path. This is used by {{favilink|salt kraken|plural}} and {{favilink|star kraken|plural}} (along with the <code>SlowDangerousMovement</code> and and <code>AIWanderingJuggernaut</code> parts). | |||
|- | |- | ||
| ConversationScript | | ConversationScript | ||
Line 142: | Line 157: | ||
| CorpseBlueprint, CorpseRequiresBodyPart, BurntCorpseBlueprint, BurntCorpseRequiresBodyPart, VaporizedCorpseBlueprint, VaporizedCorpseRequiresBodyPart | | CorpseBlueprint, CorpseRequiresBodyPart, BurntCorpseBlueprint, BurntCorpseRequiresBodyPart, VaporizedCorpseBlueprint, VaporizedCorpseRequiresBodyPart | ||
| Specifies the [[corpse]] left by a creature. | | Specifies the [[corpse]] left by a creature. | ||
|- | |||
| Followers | |||
| Table | |||
| Generate followers for a creature from a given population table upon spawning. | |||
|- | |||
| GenerateName | |||
| SpecialType, NamingContext | |||
| Gives the creature a proper name upon spawning. | |||
|- | |- | ||
| GivesRep | | GivesRep | ||
Line 150: | Line 173: | ||
| | | | ||
| Gives a creature a [[mental shield]]. | | Gives a creature a [[mental shield]]. | ||
|- | |||
| SocialRoles | |||
| Roles | |||
| Add a list of "roles" that appear at the end of a creature's name. For instance, non-named creatures living in {{favilink|Yd Freehold}} are given the role "denizen of the Yd Freehold". | |||
|- | |||
| Titles | |||
| Primary, Ordinary | |||
| Add a title that appears after a creature's name. This is used, for example, by {{favilink|Oboroqoru, Ape God}} and {{favilink|Hamilcrab, cyclopean merchant}}. | |||
|} | |} | ||
Line 158: | Line 189: | ||
! style="width: 40%;" | Attributes | ! style="width: 40%;" | Attributes | ||
! Description | ! Description | ||
|- | |||
| Animated | |||
| ChanceOneIn | |||
| Makes an item [[animated]] with a probability given by the <code>ChanceOneIn</code> attribute. | |||
|- | |||
| BootSequence | |||
| BootTime, VariableBootTime, ReadoutInName, ReadoutInDescription, AlwaysObvious, ObviousIfUnderstood, TextInDescription, VerbOnBootInitialized, VerbOnBootDone, VerbOnBootAborted, SoundOnBootInitialized, SoundOnBootDone, SoundOnBootAborted | |||
| Forces an item to undergo a "boot sequence" before its effects are activated. Examples of items that use this part include {{favilink|thermo cask}}, {{favilink|ganglionic teleprojector}}, and {{favilink|telemetric visor}}. | |||
|- | |- | ||
| Chat | | Chat | ||
Line 182: | Line 221: | ||
| InitialLiquid, MaxVolume, StartVolume, ManualSeal, LiquidVisibleWhenSealed | | InitialLiquid, MaxVolume, StartVolume, ManualSeal, LiquidVisibleWhenSealed | ||
| Allows an item to hold [[liquid]]. | | Allows an item to hold [[liquid]]. | ||
|- | |||
| MutationOnEquip | |||
| Level, ClassName, Constructor, Describe | |||
| Grants a creature the mutation specified by the class name and constructor upon equipping the item (or increases the rank of the mutation if it's already present). | |||
('''Note:''' <code>Constructor</code> is typically used to differentiate between alternate versions of the same mutation; for instance, {{favilink|Stinger (Paralyzing Venom)}}, {{favilink|Stinger (Confusing Venom)}}, and {{favilink|Stinger (Poisoning Venom)}} all use the same class, but have different constructors.) | |||
|- | |- | ||
| TinkerItem | | TinkerItem | ||
Line 194: | Line 239: | ||
! style="width: 40%;" | Attributes | ! style="width: 40%;" | Attributes | ||
! Description | ! Description | ||
|- | |||
| Interior | |||
| Cell, WX, WY, X, Y, Z, FallDistance, CarriedWeight, Unique | |||
| Gives an object an interior zone, which may be entered from outside. | |||
|- | |- | ||
| Metal | | Metal | ||
Line 267: | Line 316: | ||
*<span class="plugin_pagetree_children_span" id="childrenspan25690143-0"> [[Modding: Giving Creatures Inventory Items|Giving Creatures Inventory Items]] </span> | *<span class="plugin_pagetree_children_span" id="childrenspan25690143-0"> [[Modding: Giving Creatures Inventory Items|Giving Creatures Inventory Items]] </span> | ||
*<span class="plugin_pagetree_children_span" id="childrenspan25690130-0"> [[Modding: Ranged Weapons|Ranged Weapons]] </span> | *<span class="plugin_pagetree_children_span" id="childrenspan25690130-0"> [[Modding: Ranged Weapons|Ranged Weapons]] </span> | ||
== References == | |||
<references /> | |||
{{Modding Navbox}} | {{Modding Navbox}} |