I asked another question in another thread, but I've come across something else I don't understand, so I'd like to ask a question.
I'm trying to create a mob character that can walk around and talk, like the townspeople you often see in RPGs.
I have no idea how to do this.
Even when I add a move AI component to a character that can talk, like the ones in the 3D playground demo scene, it doesn't move.
I think this is because the character is not a combatant.
Conversely, even if I attach an interaction machine to a spawned combatant and set the conversation schematics to disable combat, no conversation occurs.
What is a typical way to do this?
I'd appreciate some advice.
As to why the interaction machine isn't working could be various things.
Does it have a trigger collider and the player an interaction controller, first thing to check.
I tried various things and found that it was not the machine but the schematics that were being executed that were not working.
It was just a schematic that displayed a dialogue, but it didn't seem to work.
I don't know why this is.
I changed the faction of the monsters that appeared to the spawning combatants to allies
to prevent combat from occurring.
I added an interaction machine and interaction controller to that and set up the schematics to be executed.
I'm also thinking about an NPC controller,
but since I'm using ORK, I want to avoid writing code.
Do you know of any good assets?
The 2D quickstart series has an NPC setup like this.
As for the interaction not working, that's hard to say without knowing the details of your setting. The interaction controller needs to be on your player, not the NPC (or other objects you want to interact with). Interactions need a collider to be recognized by the interaction controller of the player (i.e. for Unity physics to notice it entering the trigger).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'm able to create conversation schematics like in the tutorial, but I'd like the character to be able to walk around the town freely.
Even when I try to move it around using Dotween, it starts moving in the middle of a conversation, so it's not good.
I was also able to generate conversation events with the interaction machine.
But I have an additional question.
As a next step, I would like to have combat with wandering NPCs instead of conversation.
I would like the scene to be the place where the enemy was encountered.
How can I do this?
There are nodes to specify the scene in Schematics,
but I don't know how to keep the scene the player was in and the position the player was in.
There is an NPC with a similar behavior in the 3D Playground demo,
but when I change the spawned enemy character, the movement becomes strange when moving or they don't move at all, so I don't really want to use it.
I also don't know how the Combatant Spawner sends the parameters used in mecanim, so I don't know how to improve it.
So could you tell me how to set the scene used in battle to the current location?
Thank you for your support in the new year.
I would like to fight multiple wandering NPCs that are near the player at once.
Is this possible?
The battle range settings are different, right?
I tried it, but only one enemy appeared.
I attached my own script to the combatant prefab that is summoned by the spawner.
All that's left is, as I mentioned in the previous comment, to fight all wandering NPCs near the player at once.
For other solutions you'll need to handle this differently. E.g. schematics handling this would need to be based on some conditions, e.g. a game state or variable on the game object being set. For custom scripts, you could e.g. call a function on the script via Call Function node to let it know to stop or resume movement.
The 2D and 3D quickstart tutorials use such 'teleport' battles, i.e. encountering an enemy remembers the position at the start of the battle and load the battle scene. After battle, the game returns to the remembered position and scene.
There are also separate schematic tutorials for such a setup, see here for battle start and here for battle end.
As for fighting multiple NPCs, that depends on how you start the battle.
General, there are the Auto Join Settings found in Battles > Battle System > General Settings that allow enemies around a starting battle to automatically join at the start of a battle, or even join an already running battle when coming in range.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Stopping wandering NPCs during combat worked well.
As I asked in another thread
other scripts couldn't read global variables
so instead I attached an empty component at the start of combat
and used that as a trigger to stop them.
As for the spawn position,
I set it to the same as in the 3D Playground tutorial,
so this problem has been solved for now.
Also, it is now possible to fight multiple wandering NPCs at once with the settings I was taught.
https://x.com/LoneWolf_Cat/status/1879095369285726406
As a next step,
I would like to place multiple NPCs at the encounter locations.
Does this require grid battles?
Thanks for your support
However, if you want combatants to remain where they are, you can simply not place them at the battle spots in your battle start schematic.
Also, battle spots are actual game objects, so you can update their positions.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thanks for the advice.
Now, my concern is the range of attacks and magic.
I've confirmed that allies who are left behind by the leader and positioned far away cannot attack when they join the battle.
I believe there might be a setting for the range, but I couldn't find such a setting in the abilities or weapons.
Is there a setting for the attack range?_
With this setting, if characters can move locations with commands during combat, a combat system similar to Wizardry 8 can be created.