Modding intermediate FAQ

From Wildermyth Wiki
Jump to: navigation, search

This page is a growing FAQ for modding. Please see the basic pages first. Most of these are questions which were asked by modders in the discord modding channel, and answered by the dev team. It's more-or-less chronological. When there are enough questions to see groups of related items, probably we/somebody will create a dedicated guide to that topic.

Q: Am I missing a quick way to win fights in developer mode?

A: To win, you can click "Kill all enemies" in the top left hand corner. This goes for pretty much all objectives. You need to have selected the cheat "Objectives Cheat" in the new game menu beforehand.

Q: If I add a filter based on a theme piece, will it work? Meaning that I want to make an ability that depends on having different themed body parts. So in this case, this ability will only work if I have the themePiece_crow_head, is this correct?

A: Yes. For example:

ModdingIntermediateFilterTheme.png

Q: How are hook encounters linked together? Most hook quests have an intro, an "arrive at site", and one or more resolve encounters.

A: Hook quests start out mildly hard-coded by name. By default, it does hook_HookType_nameOfQuest_intro > hook_HookType_nameOfQuest_arrive > hook_HookType_nameOfQuest_resolve. You should be able to override what events happen by using the AssignToPlot Outcome and setting "arriveEventId" and "resolveEventId" to what you want. We don't set the arriveEventId anywhere currently, but you can see how we use resolveEventId in hook_Brash_theBlinkingGame_arrive to set the resolve event differently depending on the choice you make.

Q: I want to have an encounter which requires a female as one role (because the title I want has a gender.) How do I setup the role?

A: Slightly below the bottom of this screenshot, there is a section called "filter". Open the filter section, under aspects, click new, and select the desired aspect.

ModdingIntermediateAspect.png

Q: Once I have a few text balloons in a comic frame, moving the balloons and the related pointers becomes very difficult. For example, this screenshot:

ModdingIntermediatePointers.png

A: First, if you have more pointers than you want, you can turn off individual ones using the right side panel; click on pointerTarget for the related balloon, and select "null". If you still have too many buttons on the panel, one of the icons for each element is a minus sign. Click the minus sign, and all the related buttons for that element will go away. The minus is then replaced by a plus; click the plus to get all its buttons back. It can be helpful to click all the minuses first, and then one by one, click plus to get the buttons back for an element and position it.

Q: Can I add my own images and backgrounds to the comics?

A: In the December 2019 release, you can add your own images to comics. You cannot yet add a background; but you can add a background-sized image! Add a png graphics file into your mod folder under assets/ui/comics, and it should show up in the "add image" picklist in the comics editor.

Q: In the comic editor, when I click reroll, I get characters who don't match my filters. For example, I set a filter to require the hero to be male, and it is female.

A: The randomly generated characters in the editor don't adhere to the aspects you put in. But, in-game it will work.

Q: If I know one of the characters already has a theme, how do I award them another piece of the theme?

A: You can just use ApplyTheme and set oneRandom to true:

{
	"class": "ApplyTheme",
	"target": "hero",
	"theme": "fire",
	"oneRandom": true
}

Q: I have a pre-battle encounter, linked to a post-battle encounter by victoryEventIds. The pre-battle selected two characters from the party, by a selector which is not unique (HAS_LOVER). In the post-battle, how do I guarantee that the exact same characters are selected?

A: For post-battle encounters, because you're using victoryEventIds, all the roles you used in the pre-battle event will actually be injected into the post-battle encounter. You can use the INJECTED_ENTITY target template, and set injectedRole (in the "Domain" section) to the role from the pre-battle event. (You can take a look at theShapeOfThingsToCome for an example of this)

Q: I'm trying to figure out how to let the player choose a custom name in a choice, I currently managed to get it to where it will just grab a random name and go with it.

A: You can use the extraData field in the choice to create a prompt, as shown below. And in the outcome use Special -> specialAction PROMPT_RENAME_COMPANY or PROMPT_RENAME_SITE depending on what you're up to. It looks like "rename site" is hardcoded to find the "site" target and rename it. But, in theory you could put any entity in the "site" role if you wanted to.

ModdingIntermediateRename.png

Q: I would like to make an encounter with a trigger condition, to choose two characters with the same class. I cannot see how to require that target1.whm must be equal to target2.whm

A: For checking if they're the same class, you could probably use a scoreFunction on the second hero target, something like max((target.hunter+hunter),(target.warrior+warrior),(target.mystic+mystic)) with a scoreThreshold of 2.

Todo: this did not work in early December. It is apparently added in the unstable beta of December 23. Another approach is to copy the encounter to three encounters. The first one requires two party members of warrior class; it won't trigger if it can't find two warriors. The second copy requires two hunters, and the third one requires two mystics. As long as you don't edit much after copying, this works today.


Q: I have an encounter with two roles. the party may be up to five people, or it may be only two. how can i set up a comic panel which has "everybody from the party"?

A: If you add a role that didn't match anything (and is optional, i.e. use choose ANY) to a comic, it just won't show up in the comic. So you can do that to match optional roles, add them to comics in places where it won't be weird if just no one shows up there, and adjust text etc. based on whether or not those roles exist as needed.

Q: During the chapter interlude, some characters fall in love with npcs, or at least they have kids without being in love with any other character. Can i introduce an npc in an event, have one character choose to fall in love, and then make sure that no tiding contradicts that by having that character marry somebody else?

A: Put the aspect npcRomance on the hero who's in love with an NPC