When you want to create an npc, or another character that's not editable by the player, you need to use an avatar passage. An avatar passage is simple, you just need to create a new passage, give the passage a name that corresponds to the ID you want the avatar to have, and then place JSON data (we'll get into that in a moment) representing the character inside:
:: some-lady [avatar]
{"accessories":"./cac/accessories/accessory_1.png","base":"./cac/base/f/head_f3.png","beard":"","eyes":"./cac/eyes/f/eye_f5.png","features":"./cac/features/scar_2.png","glasses":"./cac/glasses/eyepatch_1.png","hair":"./cac/hair/f/hair_f1.png","mouths":"./cac/mouths/f/mouth_f1.png","neck":"./cac/neck/necklace_4.png"}
The above passage would create an avatar with the ID 'some-lady'
. You can then use this avatar the same way you would any other:
<<pt 'some-lady'>>
To create the avatar's JSON data, you could edit it by hand, but there's a much easier way; you can use your own story to do it for you. You can do this using an <<avatarmaker>>
macro, either one that already exists in your story, or one dedicated to this purpose that you place somewhere. Regardless, you'll probably want to make sure you either change the macro back, get rid of it, or make it unreachable before shipping your game. All you need to do is add an additional truthy argument to the normal <<avatarmaker>>
macro. I prefer just adding the keyword debug
to make it obvious and easy to underrtand, but anything that evaluates to true will work.
<<avatarmaker 'some-id' 'some passage' debug>>
<<avatarmaker 'some-id' 'some passage' true>>
<<avatarmaker 'some-id' 'some passage' 'hi mark'>>
<<avatarmaker 'some-id' 'some passage' 1>>
etc...
Once you do, you can style a character however you like using the editor generated by this <<avatarmaker>>
macro. When you're done, click on the character's image in the editor to see the JSON data. You can copy and paste this info into an avatar
-tagged passage to do the deed.