Villager NPCs

From wiki
Revision as of 03:24, 17 November 2017 by DeamonHunter (Talk | contribs) (Update formatting and added some missing information.)

Jump to: navigation, search

Villagers in Staxel are fairly moddable, with many parts being able to be switched out, and new creations can add to the pool.

This page is about Villager NPC, these are found in .villagernpc files and contains information for how to create a character. That is it contains info for;

  • What job this npc should have.
  • What personality this npc has.
  • What the npc will look like.
  • The totem that signifies their home
  • Regards and dialogues specific for the villagers happiness towards you.

This therefore contains all the information needed to spawn a villager into the world. It basically brings together all other Villager files into a single file.

Creating a *.villagernpc file

The villager NPC file mainly just specifies each individual Villager file that would be necessary to making an NPC. The basic layout is as follows;

{
  "code": "staxel.village.character.Emilia",
  "name": "Emilia",
  "personality": "staxel.village.personality.Cutesy",
  "job": "staxel.village.job.Patissier",
  "initialDesign": "staxel.village.design.Emilia",
  "initialOutfit": "staxel.village.outfit.Emilia",
  "regards" : [
    {
      "kind" : "staxel.concepts.Item",
      "attitude" : 4.5,
      "concept" : {
        "item" : {
          "code" : "staxel.item.crops.Banana"
        }
      }
    }
  ],
  "bestFriendUniqueDialogue": [
    "staxel.dialoguePool.CecileFond"
  ]
  "homeTotem" : "staxel.totem.EmiliaHome"
}

Each property is mainly self explanatory. "initialDesign" is the code of a Villager Designs file etc. There are two not so self explanatory properties which are to do with villager friendship. This system is currently being developed and will be elaborated on in future.

With all of this done, you know have a villager that can be spawned.


Config Options

"code"

Valid options (String): A unique string which villager what this object is.

Default Value: No default value is specified. Always need to provide your own.


A string containing the code of the villager this file will be referring to.


"homeTotem"

Valid options (String): A string that points to a Totem.

Default Value: If not specified, the villager will not care for totems.


This is the totem that the villager will look for at it's home. If this home is missing then the villager can have extra stuff defined in it's personality.


"initialDesign"

Valid options (String): A string that points to a Villager Design.

Default Value: If not specified, the villager will have a random design.


This is the design that the villager will have.


"initialOutfit"

Valid options (String): A string that points to a Villager Outfit.

Default Value: If not specified, the villager will have a random outfit.


This is the outfit that the villager will have.


"introductionDialogue"

Valid options (String): A string that points to a Dialogue

Default Value: If not specified, normal dialogue will play.


This adds a Dialogue that must be played before all other dialogue. This dialogue should act as the Introduction and have the Introduction Type.


"job"

Valid options (String): A string that points to a Villager Job.

Default Value: If not specified, the villager will act as if they are jobless.


This is the job that the villager will have.


"name"

Valid options (String): A string that specifies the default name for this villager.

Default Value: No default value is specified. Always need to provide your own.


This is the default name the villager will have. This name can be translated into a different language however.


"personality"

Valid options (String): A string that points to a Villager Personality.

Default Value: No default value is specified. Always need to provide your own.


This is the personality that the villager will have.


"regards"

Valid options (Listof Blobs): A blob containing several properties.

Default Value: Can be omitted.


Regards are a system that involves villager friendship. Will elaborate in the future.


Unique Dialogues

This contains all the information needed for "baseUniqueDialogue", "likedUniqueDialogue", "fondUniqueDialogue" and "bestFriendUniqueDialogue".

Valid options (String): A string that points to a Dialogue

Default Value: If not specified, normal dialogue will play


These properties adds in extra dialogues that can play once the villager likes you enough. (Listed above in ascending order). More elaborations will be added later when regards are elaborated.