HOW-TO: Work with clues, containers (all that glows)
Find out how to use entities which are highlighted while using Witcher senses.
Which objects glow while you highlight them? If we were to keep it short and sweet: gameplay entities. The ones which can be seen. Some examples would include: containers, posters, clues, lights, doors, some windows (which entity class is basically door) and traps.
Table of contents:
Containers
Containers all have the node tag [HighlightedByMedalionFX], it is within their templates as well, as is a particle effect that plays whenever the entity gets highlighted. Containers usually have loot entities inside of them.
Herbs are also a type of container, but they bear another type of tag: Herb, and their entity class is W3Herb. They have no effects under the Effects tab.
Miscellaneous gameplay entities
If an entity’s class is CGameplayEntity, then it gets a property in which the user can set isHighlightedByMedallion to true.
Lights, for example, are gameplay entities, so they also have that property.
Posters, like traps, are special, as they have their own entity class, and are automatically set to be highlighted by Geralt’s medallion.
Clues
Clues are a bit more complicated. One thing they share is that most of them have [fm_object] tag. Their entity class should be W3MonsterClue, and while the generic ones also have templates (located in: gameplay → focus_mode_clues), not all of them do.
Clues are usually quest-specific, as they only become visible once a quest becomes available (either by progress inside of the story, or by travelling to a location).
These are controlled inside of the questgraph of the game, and so are some of the clues.The quest node responsible for this is the Script block, and the functionName property needs to be set to FocusClueManager or FocusDestroyableClueManager (the latter is not very popular within the main game, but it can be used nontheless).
Feed the block the clue’s unique tag, and set some properties (namely isAvailable, isInteractive and isVisible if set to FocusClueManager, or destroyable and triggerDestruction if set to FocusDestroyableClueManager) to true, and now your clue glows brighter than the winter sun does at noon.
Making a clue
If I want to make a clue for a quest, how would I go about it? Well, we first need to determine if the clues can be randomly found in the world, or if they only become visible after some event.
A) Part of the living world
If they can be randomly found throughout the world, then we just need to make a clue and add it to the world. We’d probably like to include a clue template inside of it.
Go to gameplay → focus_mode_clues → generic_clues_misc → generic_clue_interaction_without_mesh.
Drag and drop it inside of an empty entity template.
Add the mesh you’d like to have for the clue.
Under W3AnimationInteractionEntity, there’s a property line which’s name is interactionAnim.
Select an appropriate interaction animation for your entity.
Don’t forget to add W3MonsterClue entity class into the template, and to set isInteractive property to true under W3MonsterClue.
Now you can add it inside of the world.
For it to unlock journal entries, add an element under clueEntries and assign a fact tag, which you can refer to inside of the questgraph. After the clue has been found, this fact gets added to the facts' database. Add a pause with the condition of it being discovered before activating the journal entry you’d like to reveal.
B) Event-specific
If it only becomes visible after a certain event, then either add a factdbchange that is tied to the event, and then have a pause waiting for that change before having the Script [FocusClueManager] block make your clue available, or just have the Script [FocusClueManager] block unlock it for you after your event (for example a cutscene).
If you’d like Geralt to say something, you can do it two ways:
add a fact into the entity as described above, and put a pause into the quest graph that waits for this fact - put a scene / one-liner after the pause.
if it is a MonsterClue, you can set a Voiceset to be played after interacting with the clue: it can be found under W3MonsterClue, and the property’s name is playerVoiceset.
If you add/copy-paste an effect with particle component into your entity template, be sure to add an fx_slot for it as well.
Â
______________________________________
The Witcher 3: Wild Hunt Complete Edition © 2024 CD PROJEKT S.A. Published by CD PROJEKT S.A. Developed by CD PROJEKT RED. CD PROJEKT®, The Witcher®, REDengine® are registered trademarks of CD PROJEKT Capital Group. All rights reserved. The Witcher game is set in the universe created by Andrzej Sapkowski in his series of books. All rights reserved.