Difference between revisions of "Villager NPCs"

From wiki
Jump to: navigation, search
(Updated to new category.)
(Update formatting and added some missing information.)
Line 46: Line 46:
  
 
= Config Options =
 
= Config Options =
 
 
== "code" ==
 
== "code" ==
'''Valid options (String): <code>A unique string which villager what this object is.</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A unique string which villager what this object is.</code>'''
  
 
'''Default Value:''' No default value is specified. Always need to provide your own.
 
'''Default Value:''' No default value is specified. Always need to provide your own.
Line 57: Line 56:
  
 
== "homeTotem" ==
 
== "homeTotem" ==
'''Valid options (String): <code>A string that points to a [[Totems|Totem]].</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to a [[Totems|Totem]].</code>'''
  
'''Default Value:''' Can be omitted. Omitting leads to the villager not caring about totems at all.
+
'''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.
 
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" ==
 
== "initialDesign" ==
'''Valid options (String): <code>A string that points to a [[Villager Designs|Villager Design]].</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to a [[Villager Designs|Villager Design]].</code>'''
  
'''Default Value:''' Can be omitted. Omitting leads to a random design.
+
'''Default Value:''' If not specified, the villager will have a random design.
  
  
Line 74: Line 74:
  
 
== "initialOutfit" ==
 
== "initialOutfit" ==
'''Valid options (String): <code>A string that points to a [[Villager Outfits|Villager Outfit]].</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to a [[Villager Outfits|Villager Outfit]].</code>'''
  
'''Default Value:''' Can be omitted. Omitting leads to a random outfit.
+
'''Default Value:''' If not specified, the villager will have a random outfit.
  
  
 
This is the outfit that the villager will have.
 
This is the outfit that the villager will have.
 +
 +
 +
== "introductionDialogue" ==
 +
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to a [[Dialogue]]</code>'''
 +
 +
'''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" ==
 
== "job" ==
'''Valid options (String): <code>A string that points to a [[Villager Jobs|Villager Job]].</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to a [[Villager Jobs|Villager Job]].</code>'''
  
'''Default Value:''' Can be omitted. Omitting leads to the villager having no job.
+
'''Default Value:''' If not specified, the villager will act as if they are jobless.
  
  
Line 92: Line 101:
  
 
== "name" ==
 
== "name" ==
'''Valid options (String): <code>A string that specifies the default name for this villager.</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that specifies the default name for this villager.</code>'''
  
 
'''Default Value:''' No default value is specified. Always need to provide your own.
 
'''Default Value:''' No default value is specified. Always need to provide your own.
Line 101: Line 110:
  
 
== "personality" ==
 
== "personality" ==
'''Valid options (String): <code>A string that points to a [[Villager Personalities|Villager Personality]].</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to a [[Villager Personalities|Villager Personality]].</code>'''
  
 
'''Default Value:''' No default value is specified. Always need to provide your own.
 
'''Default Value:''' No default value is specified. Always need to provide your own.
Line 110: Line 119:
  
 
== "regards" ==
 
== "regards" ==
'''Valid options (List of Blobs): <code>A blob containing several properties.</code>'''
+
'''Valid options ([[Modding_Key_Terms#List|List]]of [[Modding_Key_Terms#Blob|Blobs]]): <code>A blob containing several properties.</code>'''
  
 
'''Default Value:''' Can be omitted.
 
'''Default Value:''' Can be omitted.
Line 121: Line 130:
 
This contains all the information needed for "baseUniqueDialogue", "likedUniqueDialogue", "fondUniqueDialogue" and "bestFriendUniqueDialogue".
 
This contains all the information needed for "baseUniqueDialogue", "likedUniqueDialogue", "fondUniqueDialogue" and "bestFriendUniqueDialogue".
  
'''Valid options (String): <code>A string that points to a [[Dialogue]]</code>'''
+
'''Valid options ([[Modding_Key_Terms#String|String]]): <code>A string that points to a [[Dialogue]]</code>'''
  
'''Default Value:''' Can be omitted. Omiting will just lead to normal dialogue being played.
+
'''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.
 
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.

Revision as of 02:24, 17 November 2017

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.