
Some tips for using the campaign browser:Ĭlick on the white dot of a parent node to collapse / expand that branch or sub-branch. Useful when the tree feels too cluttered.Ĭlick on the name of a node to open a contextual menu. If the encounter has already been triggered you will see info about it in the contextual menu: If the encounter hasn't been triggered yet, you will see an option to trigger it. There are a couple of buttons in the contextual menus.

One is "Toggle Raw View" (a gears icon) and the other one is "Toggle Private Variables View". Clicking on them will show / hide extra information in the contextual menu when applicable (sometimes there will be no private variables to show). This is useful because we can trigger directly the encounter that we want to debug, instead of a randomly chosen one: If the encounter can spawn more than one encounter, you will see a list of the options available as well as the default trigger.

Some encounters might have extra options in the contextual menus. Other might have requirements that can't be skipped by triggering them with this tool, but you can cheat with the rest of debug tools in order to meet them, and then try to trigger them again. Some encounters will have a timer on them. You can try to trigger them with "Trigger Now" or let the game play at a higher speed to wait until the timer expires. If the encounter is a generator, has some unmet start requirements or has the chance to not spawn a child node, the timer may reset without spawning anything.Ĭampaigns might delete some encounters or chains of encounters once they finish, but if the campaign browser is open when that happens, these encounters will still be shown, so you will get UI errors if you try to click / trigger them. Close and reopen the campaign browser in order to refresh it. If you get any UI errors while using this debug tool, press F5 to reload the UI. You can also start the game master from within the campaign browser if you're in a test world that hasn't initialized it. There's a trigger next to the close button:ĭon't forget to unpause the game when you test the encounters, some of them might need it to finish triggering. The fastest way to spawn enemies when debugging combat-related stuff is triggering the raiding parties from the ambient threats campaign. If you need tougher raids than the initial ones, use other debug tools to increase your net worth or try with other methods (e.g.: preparing a test world with the Microworld mod). To use the AI inspector, select a living entity from inside the game, and open the AI inspector by clicking on it. It will show which actions are currently being considered and which action is currently running. It has a search bar that will highlight matching actions in the tree (it will also highlight the parent nodes of those actions).

You can click on the dashes next to the actions to collapse / expand the nodes. The tree will refresh often (hearthlings and other living entities are constantly thinking) so you might want to pause the game to observe the status of the entity at a given moment.Īt the top of the tool, there's a "pin to entity" option. If you toggle it, the AI inspector will keep showing the AI of that entity, even if you select a different entity or click in the terrain / UI.
#Stonehearth mods 22.5.2 code
If you look at the bottom, there's a little explanation of the color code used in the tree: There are other debug options at the top, too. Blue text is for actions that the entity is currently thinking about whether he/she can execute them or not.
