Diferenças entre edições de "Modificações:Dados do NPC"
Linha 21: | Linha 21: | ||
|- | |- | ||
! index | ! index | ||
− | ! | + | ! campo |
− | ! | + | ! Exemplo |
− | ! | + | ! Objetivo |
|- | |- | ||
| 0 | | 0 | ||
| Idade | | Idade | ||
| <tt>teen</tt> | | <tt>teen</tt> | ||
− | | | + | | Quando o NPC é uma <tt>child</tt>, <tt>teen</tt>, or <tt>adult</tt>. <span color="red">TODO</span>: O que isso afeta? |
|- | |- | ||
| 1 | | 1 | ||
− | | | + | | Comportamento |
| <tt>rude</tt> | | <tt>rude</tt> | ||
− | | | + | | Quando o NPC é <tt>polite</tt>, <tt>rude</tt>, or <tt>neutral</tt>. Isso afeta alguns diálogos. |
|- | |- | ||
| 2 | | 2 | ||
− | | social | + | | Ansiedade social |
| <tt>outgoing</tt> | | <tt>outgoing</tt> | ||
− | | | + | | Quando o NPC é <tt>outgoing</tt>, <tt>shy</tt>, or <tt>neutral</tt>. Isso afeta alguns diálogos. |
|- | |- | ||
| 3 | | 3 | ||
− | | | + | | Otimismo |
| <tt>neutral</tt> | | <tt>neutral</tt> | ||
− | | | + | | Quando o NPC é <tt>positive</tt>, <tt>negative</tt>, or <tt>neutral</tt>. <span color="red">TODO</span>: O que isso afeta? |
|- | |- | ||
− | | | + | | Genero |
− | |||
| <tt>female</tt> | | <tt>female</tt> | ||
− | | | + | | Quando o NPC é <tt>male</tt> or <tt>female</tt>. Isso afeta dialogo, quando a criança no casamento é obtida por adoção ou parto, e seus frames reservados e posições na spritesheet. |
|- | |- | ||
| 5 | | 5 | ||
− | | | + | | Solteira/o |
| <tt>datable</tt> | | <tt>datable</tt> | ||
− | | | + | | Quando o NPC é <tt>datable</tt> ou <tt>non-datable</tt>. Isso altera seus recursos em relações (por exemplo a etiqueta 'solteira/o no meno social, presentear buques e casamento). |
|- | |- | ||
| 6 | | 6 | ||
− | | | + | | Interesse amoroso |
| <tt>Sebastian</tt> | | <tt>Sebastian</tt> | ||
− | | '' | + | | ''sem uso'' |
|- | |- | ||
| 7 | | 7 | ||
− | | | + | | Região da casa |
| <tt>Town</tt> | | <tt>Town</tt> | ||
− | | | + | | Quando o NPC mora no <tt>Desert</tt>, <tt>Town</tt>, ou <tt>Other</tt>. Isso é usado para aumentar os pontos de amizade de todos os NPCs de determinada região, atualmente apenas usado no [[Luau]] (Que apenas afeta os NPCs na <tt>Town</tt> region). |
|- | |- | ||
| 8 | | 8 | ||
− | | | + | | Aniversário |
| <tt>fall 13</tt> | | <tt>fall 13</tt> | ||
− | | | + | | A estação e dia do aniversário do NPC. |
|- | |- | ||
| 9 | | 9 | ||
− | | | + | | Relações |
| <tt>Caroline 'mom' Pierre 'dad'</tt> | | <tt>Caroline 'mom' Pierre 'dad'</tt> | ||
− | | | + | | Determina dialogos genericos 'especiais' para revelar gostos e desgostos de familiares. Pode também afetar os dialogos "inlaw" do <NPC>. |
|- | |- | ||
| 10 | | 10 | ||
− | | | + | | mapa padrão e posições |
| <tt>SeedShop 1 9</tt> | | <tt>SeedShop 1 9</tt> | ||
| The location name and [[Modding:Modder Guide/Game Fundamentals#Tiles|tile position]] where the NPC starts and ends each day. | | The location name and [[Modding:Modder Guide/Game Fundamentals#Tiles|tile position]] where the NPC starts and ends each day. | ||
|- | |- | ||
| 11 | | 11 | ||
− | | | + | | Nome mostrado no jogo |
| <tt>Abigail</tt> | | <tt>Abigail</tt> | ||
| The NPC name shown to the player. | | The NPC name shown to the player. |
Revisão das 13h55min de 4 de agosto de 2020
Tradução incompleta Este artigo ou seção não foi completamente traduzido para o português.
Você está convidado a ajudar na sua construção editando-o |
← Index
This page provides an overview of what's needed to create a custom NPC. This is an advanced guide for mod developers.
Before reading this page, see Modding:Editing XNB files for the basic concepts.
Arquivos para editar
Para criar um novo NPC,você precisara editar um número diferente de Saves. Enfim, Você não precisara de experiencia de programação e isso pode ser feito com Content Patcher (com algumas ajudas.)
Informação Basíca
O Arquivo\NPCDispositions ativo contem informação basíca para seu personagem, incluindo seu nome, aniversário, relações com outros personagens, personalidade, e eles também podem ser datados. O arquivo possui uma linha como a seguir:
Abigail: "teen/rude/outgoing/neutral/female/datable/Sebastian/Town/fall 13/Caroline 'mom' Pierre 'dad'/SeedShop 1 9/Abigail"
A chave (antes dos dois pontos) é o nome interno que identifica especificamente aquele NPC. esse nome não é mostrado a jogador, mas pode ser usado para referenciar aquele NPC em outros Saves. O valor contem no campo a seguir:
index | campo | Exemplo | Objetivo |
---|---|---|---|
0 | Idade | teen | Quando o NPC é uma child, teen, or adult. TODO: O que isso afeta? |
1 | Comportamento | rude | Quando o NPC é polite, rude, or neutral. Isso afeta alguns diálogos. |
2 | Ansiedade social | outgoing | Quando o NPC é outgoing, shy, or neutral. Isso afeta alguns diálogos. |
3 | Otimismo | neutral | Quando o NPC é positive, negative, or neutral. TODO: O que isso afeta? |
Genero | female | Quando o NPC é male or female. Isso afeta dialogo, quando a criança no casamento é obtida por adoção ou parto, e seus frames reservados e posições na spritesheet. | |
5 | Solteira/o | datable | Quando o NPC é datable ou non-datable. Isso altera seus recursos em relações (por exemplo a etiqueta 'solteira/o no meno social, presentear buques e casamento). |
6 | Interesse amoroso | Sebastian | sem uso |
7 | Região da casa | Town | Quando o NPC mora no Desert, Town, ou Other. Isso é usado para aumentar os pontos de amizade de todos os NPCs de determinada região, atualmente apenas usado no Luau (Que apenas afeta os NPCs na Town region). |
8 | Aniversário | fall 13 | A estação e dia do aniversário do NPC. |
9 | Relações | Caroline 'mom' Pierre 'dad' | Determina dialogos genericos 'especiais' para revelar gostos e desgostos de familiares. Pode também afetar os dialogos "inlaw" do <NPC>. |
10 | mapa padrão e posições | SeedShop 1 9 | The location name and tile position where the NPC starts and ends each day. |
11 | Nome mostrado no jogo | Abigail | The NPC name shown to the player. |
Gift tastes
The Data\NPCGiftTastes asset contains their gift preferences (e.g. which gifts they love or hate), and their responses when they receive one. See Modding:Gift taste data for more info.
The file has one row per NPC like this:
Abigail: "I seriously love this! You're the best, @!/66 128 220 226 276 611/Hey, how'd you know I was hungry? This looks delicious!//What am I supposed to do with this?/-5 -75 -79 16 245 246/What were you thinking? This is awful!/330/You brought me a present? Thanks.// " #!String
The line can be broken down into 5 pairs of dialogue + item IDs in this order: Love, Like, Neutral, Dislike, Hate. If a dialogue field is empty, the game will use a generic dialogue text. See Modding:Object data for the item IDs.
Overworld sprites
The overworld sprites are stored in Characters/NpcName, including movement and animation frames. Each frame is exactly 16x32 pixels, and some positions are reserved for certain actions:
- the first sixteen frames are generic movement (four frames per direction);
- frames 33 (female) and 35 (male) must be the kissing sprite if they're marriageable;
- frames 40–47 (female) and 44–47 (male) must be the Flower Dance dance, if they participate;
- frames 36–38 (female) 48–50 (male) are reserved for marriageable NPCs (Contains Wedding sprite).
Portraits
The dialogue portraits are stored in Portraits/NpcName. Each frame is exactly 64x64 per portrait. The first six represent specific emotions (see Modding:Dialogue#Portrait commands), followed by any number of custom portraits. The first portrait is used when the dialogue doesn't specify one. Each NPC can have up to 12 portraits.
Schedule
Their schedule file tells the game where the NPC starts and moves based on on the time. You need to add strings to a separate schedules file found in the Strings folder to allow custom dialogue. See Modding:Schedule data for more info.
Dialogue and events
The NPC dialogue and events are stored in several files; see Modding:Dialogue and Modding:Event data for more info.
Festivals
Festivals are tricky things. Everyone in the vanilla game is added to the festival map by placing tiles on the Set-Up and MainEvent map layers from a character tilesheet that draws from NPCDispositions to get exactly who to place. This is not ideal for custom NPCs, since you have no way of knowing where on the NPCDispositions data list your NPC goes when a player is using multiple custom NPCs. For this reason, it is recommended to use TMXLoader, as it has a festival addition function to add your character to the Festival Maps, since it will draw upon your character's internal name instead of their position on the list. It's fairly easy to do, and there's an explanation on the TMXLoader Nexus Description.
O arquivo esta sendo traduzido por Zoz0207
Adding your NPC
Here's how you'd create an example NPC we'll name Dobson:
- Create an empty Content Patcher content pack. By convention, we'll name the folder [CP] Dobson.
- Create the following files:
- assets/dialogue.json containing the dialogue.
- assets/marriageDialogue.json containing the marriage dialogue (if applicable).
- assets/sprites.png containing their overworld sprites.
- assets/portraits.png containing their portraits.
- assets/schedule.json containing their schedule data.
- Edit the content.json to load the files:
{ "Format": "1.5", "Changes": [ { "LogName": "Sprites", "Action": "Load", "Target": "Characters/Dobson", "FromFile": "assets/sprites.png", }, { "LogName": "Portraits", "Action": "Load", "Target": "Portraits/Dobson", "FromFile": "assets/portraits.png", }, { "LogName": "Dialogue", "Action": "Load", "Target": "Characters/Dialogue/Dobson", "FromFile": "assets/dialogue.json", }, { "LogName": "Marriage Dialogue", "Action": "Load", "Target": "Characters/Dialogue/MarriageDialogueDobson", "FromFile": "assets/marriageDialogue.json", }, { "LogName": "Schedule", "Action": "Load", "Target": "Characters/schedules/Dobson", "FromFile": "assets/schedule.json", }, { "LogName": "NPC Dispositions", "Action": "EditData", "Target": "Data/NPCDispositions", "Entries": { "Dobson": "adult/rude/neutral/positive/male/datable//Town/summer 7//BusStop 19 4/Dobson" }, }, { "LogName": "Gift tastes", "Action": "EditData", "Target": "Data/NPCGiftTastes", "Entries": { "Dobson": "You're giving this to me? This is amazing!/207 232 233 400/Thank you! This is a very interesting specimen./-5 -79 422/...What is this?/80 330/This is disgusting./2/That was very thoughtful of you./-4/ ", }, }, ] }
That's it! If you load your game, the NPC should appear. If you want to create events, don't forget to add that file too.