Nature In The Valley Documentation
  • Nature In The Valley As A Framework
  • Adding a creature
    • Picking Your Format
    • Using Content Patcher
    • Using a Content Pack
    • The Creature Model
  • Making Creature Sprite
    • Making Creature Sprites 101
  • New Game-State-Queries and Trigger Actions
    • New Game State Queries
  • Making Rewards
    • Adding Custom Rewards
Powered by GitBook
On this page
  • The Key: The Creature's Code/Internal Name
  • The Values:
  1. Adding a creature

The Creature Model

PreviousUsing a Content PackNextMaking Creature Sprites 101

Last updated 29 days ago

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" 100-All locations {Outdoor, forest, beach, cave or desert}

222-Volcano dungeon

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.

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!

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.

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)

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 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

packSize (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

alternativeDrop (string, default "")

The qualified item ID associated with an alternative item to drop when "caught". (Like a bird dropping a special feather for crafting or something)

41

onlyAlternativeDrop (bool, default false)

Whether only the alternative drop will be given to the player when the creature is caught.

42

isTerrariumable (bool, default true)

Whether or not the creature can be put into a terrarium.

43

isDonatable (bool, default true)

Whether or not the creature can be donated to the insectarium, and whether or not it will appear in the encyclopedia.

44

alternativeDropChance (float, default 1)

If the creature has an alternative drop, the chance for that drop to occur (0-1, where 1 is 100%)

45

semiAquatic (bool, default false)

Whether the creature should go over both water and ground. If set to true the sprite sheet will be "doubled" an example will be shown soon in the sprite sheet section.

46

soundRange (float, default 500f)

The range in which a creature's cue sound will be played, the volume will decrease with distance to creature in respect to this range.

47

soundFrequency (int, default 1150)

The average amount of time between sounds from the creature being played. 1150 is about equal to 7 seconds.

48

useBetterCreatureBounds (bool, default false)

Are you annoyed by some creatures seemingly being able to be walked "over" by the player? Setting this to true should fix that. This is mostly for bigger creatures.

49

displayedLocation (string, default "")

The string to display in the creature encyclopedia, if set it will replace the location information. Good if the creature has GSQs or some other spawn conditions.

50

displayedLocalLocation (string, default "")

The string to display in the creature encyclopedia, if set it will replace the local location information. Good if the creature has GSQs or some other spawn conditions.

51

secondStartTime (int, default 0)

Allows you to set an duration of time in which the unit spawns, for example if a unit spawns in the morning and evening but not in between.

52

secondEndTime (int, default 0)

Allows you to set an duration of time in which the unit spawns, for example if a unit spawns in the morning and evening but not in between.

53

variantGSQs (List<string>, default empty)

If set, should have the same length as the list of variants. Each string is the condition which needs to be true for that variant to be applied. (Like a creature having a coat in a season, or something)

54

extraDescription (string, default "")

An extra description which is shown in the creature encyclopedia for this creature, could be a joke or fact or anything else.

55

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
- see Making Creature Sprite for more details
- see Making Creature Sprite for more details
- see Making Creature Sprite for more details
Game-State-Query
- see Making Creature Sprite for more details