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:
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)
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)
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
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
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!
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
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
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"
(1.2.8) complexIdling (bool, default is false)
Whether the creature has complex idling animations. This only applies if the creature also has complexAnims, in which case 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, 1 line for each moving animation, 1 line for each idling animation, 1 line for running away.
(1.2.8) 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.
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