The Creature Model

Each creature, whether added through content patcher or through a content pack, uses the same data format. This is the key to making a creature. Note that for content packs, all variables MUST be defined up until xSpriteSize. For Content Patcher mods, you can use the leave variables open to have them as default.

The Key: The Creature's Code/Internal Name

This isn't the creatures display name, just their internal name. Use the same internal name as a creature in the base mod to replace it!

The Values:

1

rarity (Int, default is 0)

The creature's rarity is a number 0-4 where 0 is common and 4 is exquisite. This will add on the creature's rarity to it's description and determine the amount of experience received when caught. Very rare and exquisite creatures are not catchable until a certain amount of creatures are donated to the insectarium (Unless that creature uses a separate GSQ)

2

grounded (bool, default is true)

This determines whether the animal will fly above its shadow or be on the ground. This should be set to true for creatures on trees, bushes and stumps generally.

3

speed (float, default is 0.007)

This is a number for the relative speed of the creature when moving (Best between 0.001 - 0.01, where 0.001 is very slow and 0.01 is quite fast)

4

pauseTime (int, default is 0)

A number representing how long (in milliseconds) the creature stops between movements.

5

scale (float, default is 1.0)

This number is the relative scale of the creature (Below 0.8 removes the creature’s shadow, for creatures like ants, big creatures are typically around 3-3.5)

6

doesRun (bool, default is true)

This determines whether or not the creature runs from the player. If dangerous is set to true this instead determines whether or not the creature chases the player.

7

isMover (bool, default is true)

This determines whether or not the creature moves around

8

range (int, default is 3)

The range in tiles for player detection, either running away or towards. Note that for dangerous creatures, once they spot the player their range is increased.

9

dangerous (bool, default is false)

Whether or not the creature deals damage (if run is also true then the creature chases the player).

10

seasons (List<string>, no default, example "spring", "winter", "summer")

A list of strings which match the lowercase names of the seasons in which the creature should spawn. This shouldn’t even be only one season, repeat a season if needed. (winter, winter)

11

weatherCode (string, default is "0")

A code which represents the weather the creature can spawn in.

Weather codes:

"0"-All weather,"1"-All sunny weather,"2"-All wet weather,"3"-Storms,"4"-Snow

12

locations (List<string>, no default, example "0", "0")

A list of codes representing locations the creature can spawn in, again this shouldn’t ever be only one location, repeat a location if needed (0,0)

Location codes:

0-All outdoor locations,

1-Forest Locations Includes "SecretWoods", "Forest", "Backwoods", "Woods", "Mountain", "Farm_Forest", "NIVOuterInsec" and anywhere with >60 trees

2-Beachy / water locations Includes "Beach", "BeachNightMarket", "IslandWest", "IslandSouth", "IslandSouthEast", "IslandSouthEastCave", "Farm_Beach" and anywhere with over 40% water),

3-Cave locations Includes "FarmCave", "Mine", "UndergroundMine", "BugLand", "WitchWarpCave", "SkullCave", "WitchSwamp", "MasteryCave", "IslandSoutheastCave" and floors in the mines divisible by 5,

4-Desert locations Includes "Desert", "SkullCave", "DesertFestival"

You can also just put the name of a specific location (Like “SeedShop” in the example mod)

13

minTime (int, default is 600)

The time code which represents the time of day when the creature starts spawning.

14

maxTime (int, default is 2600)

The time code which represents the time of day when the creature stops existing.

15

frames (int, default is 4)

The number of frames per animation on their sprite sheet. Most animals use four, but this is fully customizable, and can sometimes help show unique animations/behaviours. - see Making Creature Sprite for more details

16

spritePath (string)

The path for the texture of their sprite sheet (from earlier this would be Mods/NITVExample/Fly), but this is also customizable and depends on how you like to load your content! - see Making Creature Sprite for more details

17

xShadow (int, default is 0)

The offset present in the x direction for their shadow. Generally values -10 to 10 are used to make it look centered.

18

localSpawnCode (string, default is "0")

The local location / spawning code of the creature.

Local Location Codes:

"0"-Wandering,"1"-On trees,"2"-On Bushes,"3"-On Water,"4"-On large stumps.

If you want to make your creature spawn through other means, set this so whatever fits description wise and set the "GSQ" to "FALSE" then use trigger actions to spawn your creature!

19

yShadow (int, default is 0)

The offset present in the y direction for their shadow. Generally values -10 to 10 are used to make it look centered

20

price (int, default is 100)

The relative price of the creature before multipliers. A moth for example is 50 which becomes 30ish unless the config for price is changed.

21

spriteIndex (int, default is 0)

The sprite index of the creature’s item image; generally 0 but can change if you are adding multiple creatures with a single item sprite to share between them. - see Making Creature Sprite for more details

22

xDef (float, default is 60.0)

The X position in tiles of the creature’s position in the museum.

23

yDef (float, default is 15.0)

The Y position in tiles of the creature’s position in the museum.

24

itemTexture (string, default Mods\NatureInTheValley\Creatures\Items)

The path for the creature’s item texture. (from earlier this would be Mods/NITVExample/FlyItem) - see Making Creature Sprite for more details

25

displayName (string)

The twenty fifth is the creature’s display name.

26

displayDescription (string)

The twenty fifth is the creature’s display description.

EVERYTHING AFTER THIS IS OPTIONAL IF USING CONTENT PACK

27

xSpriteSize (int, default is 32)

The pixel width of each from in the creature's sprite texture.

28

ySpriteSize (int, default is 32)

The pixel height of each from in the creature's sprite texture.

29

GSQ (string, default is " ")

A Game-State-Query which serves as an additional spawn condition, leave as " " or "TRUE" for no extra spawn condition. Use "FALSE" to disable nature spawning. Heres some other useful uses! ANY "SEASON Winter" "SEASON Spring, DAY_OF_WEEK Friday"

Will mean a creature is able to spawn when it's either winter or it's a friday in spring.

FARM_CAVE Bats, SEASON Summer

Will mean a creature is able to spawn when both the farm cave is of type bats and the season is summer.

LOCATION_CONTEXT Here Island

Will mean a creature can only spawn in locations with the location context "Island"

30

(int, default is 1)

This is a number representing the max pack size of that creature. When naturally spawned, the game will try to spawn X many more nearby.

31

rotaryAnims (bool, default is false)

Whether your creature will rotate its sprite to "face" the direction it is going while moving. Only really applicable for "top down" moving creatures. The sprite sheet should have duplicate animations as if the creature is "facing" right.

32

complexIdling (bool, default is false)

Whether the creature has complex idling animations. Instead of there being a single frame per idling direction, each direction has its own idling animation. When making the art this essentially means that you have 9 lines for complex anims or 5 lines for noncomplex, 1 line for each moving animation, 1 line for each idling animation, 1 line for running away.

33

friendlyFollower (bool, default is false)

When set to true, the creature will follow the player as long as they are within the given playerRange, and doesRun is set to true. The behavior right now is that they will follow the player until they are within 128pixels (About 2 tiles), before using regular movement AI.

34

dangerDamage (int, default 25)

The amount of damage done if creature is dangerous.

35

health (int, default 0)

If 0 and dangerous, sword swings will cause creature to run away. If more than zero the creature is caught once their health reaches zero.

36

forceSword (bool, default false)

if true, removes the ability for the net to catch this creature. (Should only really be true if dangerous and health > 0)

37

cueName (string, default "")

the string for the ambient sound effect that the creature makes when nearby.

38

variantList (List<string>, default empty)

List of textures which have a possibility to replace the default sprite.

39

variantChance (float, default 0.1)

Chance (1=100%) that any given variant is chosen, this chance will be checked for each variant.

40

(1.3.0) alternativeDrop (string, default "")

The qualified item id of the alternative item to drop when caught.

41

(1.3.0) onlyAlternativeDrop (bool, default false)

If set to true the creature will only drop their alternative item and not the creature item.

42

(1.3.0) alternativeDropChance (float, default 1)

The chance (1 =100%) that the alternative drop would be chosen.

43

(1.3.0) isTerrariumable (bool, default true)

Whether this creature can be made into a terrarium.

44

(1.3.0) isDonatable (bool, default true)

Whether this creature can be donated to the insectarium / if it should show up in the encyclopedia.

45

semiAquatic (bool, default false)

Whether creature can move both on land and water, requires unique sprite sheet.

46

soundRange (float, default 500)

Range in which sound plays

47

soundFrequency (int, default 1150)

Frequency with which sound plays

48

useBetterCreatureBounds (bool, default false) RECCOMENDED!!!

Whether to use the new advanced creature bounds logic for the "z" location of creatures and hitbox.

49

displayedLocation (string, default empty)

String to display in encyclopedia for location, if different than automatic display.

50

displayedLocalLocation (string, default empty)

String to display in encyclopedia for local location, if different than automatic display.

51

secondStartTime (int, default 0)

Start for a second period of spawning for creature.

52

secondEndTime (int, default 0)

End of a second period of spawning for creature.

53

variantGSQs (List<string>, default empty)

GSQs validating the use of different variants.

54

extraDescription (string, default empty)

Additional description to display in encyclopedia.

55

itemDropItemIds (List<string>, default empty)

Should be same length as other lists in group. Represents the possible items to give player.

56

itemDropItemChances (List<float>, default empty)

Chance for each item in itemDropItemIds to be picked, as a float from 0 - 1.

57

itemDropOnlyBools (List<bool>, default empty)

Whether each item in itemDropItemIds should be the only item from that list given if picked.

58

itemDropExclusiveItem (List<bool>, default empty)

Whether each item in itemDropItemIds should cause the base creature item to not be given.

59

consistentSoundFrequency (bool, default false)

Whether the sound's "frequency" should be consistent (aka: the duration between sound effects is always the same instead of being semi random)

60

compelxAnims (bool, default is false)

Whether the creature has complex animations. Complex animations mean the creature will have up and down walking animations, as well as a separate frame for when they are not moving per direction. (Example a snake could be coiled up between movements, then uncoiled when moving) - see Making Creature Sprite for more details

Last updated