feat: possibility to persist NPC on map with /n talkaction #2682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Sometimes, we need to add a NPC to the map, and we can do this in two ways:
We can add it via RME or we can add it in the XML directly.
This PR will give the possibility to persist the recently spawned NPC on the map, just using a command with GOD character.
It will be placed in GOD's position.
USAGE:
Add the param true after the NPC Name.
/n NpcName,true
This will add the NPC tag to the npcs xml file.
Behaviour
Actual
Use /n npcName, the NPC will be spawned and removed after the server closes.
Expected
Use /n npcName when you want to add a temporary NPC to the map.
Use /n npcName,true when you want to add a persistent NPC to the map.
Type of change
How Has This Been Tested
Join the game with GOD, spawn a npc with the following command:
/n npcName,true
Close and reopen the server. The NPC will spawn in the same position.