Hi folks, hope you can help - maybe I'm missing something simple
I have a chat system in development based on a Youtube build - link below. It seems pretty simple, bits seem to work just fine - and then there's the glitch - getting a fail on a simple tellraw. The notion is that a player can approach an 'NPC' - a villager summoned without trades and which the player can click on to get dialogue. The state of the 'conversation' is held by scoreboard data, resets occur when the player is a certain radius away from the entity.
The villager has been tagged with the value npc - and I'm using a kind of flag npcSay as tag on the player to prevent message spam in the tellraw - it gets flipped on by a block when an scoreboard value increments (tied in with stat.talkedToVillager)
When the chain executes I get a couple of fails with 'Failed to execute <command> as Yaxxbarl [villager Name:]
First noticed the failure on a second command chain - one that detects the incremental clicks on said villager and provides a different tellraw per increment - a simple chat system:
/execute @e[type=villager,tag=npc] ~ ~ ~ /tellraw @a[score_npcTalk_min=1,score_npcTalk=1,r=4,tag=!npcSay] ["",{"text":"Celeborn:","color":"gold"},{"text":" Welcome Jacobly, Son of Nibb!","color":"none"}]
Weird bit - if I remove that tag=!npcSay tag in the execute above - the damn tellraw works - but of course spams - the negated npsSay is supposed to trap more than one message (3rd command block chain removes the tag as soon as conditions are right)
I'm about out of ideas for any further debugging - at first I thought I had the entity selector wrong - but it works in other examples (clearly the case when I remove the !npcsay) - then I recalled seeing something somewhere about not putting the / in - as it causes the execution to either be on the part of the player - or not - but swapping them out makes no difference to the events and indeed - copied them slavishly from the vid where the guy has them working just right.
Dunno if it's affecting anything, but first thing I noticed, you shouldn't have backslashes in the commands nested in your execute commands. Also, if these are in command blocks, you don't need the slashes at all, even for /execute.
> Notice that the first message uses a score of 0 for npcHeard. This one will use a score of 1. As it only targets players who have clicked on the NPC... you get it.
But now that I'm reading over this and thinking about it, this actually seems like ridiculous overkill. You should be able to tell when a player has clicked on a villager, test to see if there are any NPC's around them ("NPC", in this case, meaning villagers who give dialogue), and if there are, then test to see if they give certain types of dialogue. If they do, then give it. Otherwise, for any player who has npcHeard of 1 or greater, test to see if there are any NPC's around them. If there aren't, set npcHeard to 0. Tagging seems very unnecessary. I'll see if I can't work out a simpler one.
I did try the comms without slashes - seemed to make little difference, but hey - its been a bit random in effect here and there, hence I wondered if it was more to do with the update. That said I'm going to try out your neat approach
I agree, there should be a better way, I've tried other systems using comparators that - with the 1 tick difference - block out the spam on the chat - I liked Tallones system because it was elegant and compact - just a bunch of easily copyable CB's. Bizarrely, I took a schematic of the semi-working one out the test world I have to drop into a neutral area of the Adventure world - and got completely different results - same set of gamerules. Weird!
Just tried it Dscutt - cut n paste, step by step. Only thing I wasn't sure of is whether this is one command block chain- and whether the last two commands are part of the same chain and 'chain' 'conditional' / 'unconditional'. Alas - got diddly out of it. I don't think the click is working - don't see any increment occuring so NPCtalking never gets set - which is odd. I have the sidebar running on NPClick and get a zip score. The villager is added to the teams - alas with 4 others that happened to be in the same world, did a more atomic add of village @e[type=villager,name="Larry"] - reckons its added to the group.
Started afresh in my 'live' world - and get similar results - i have the layout of blocks like this - so I reckon its entirely possible I've got them in the wrong configuration,: blast - cant add the screenshot. I've basically done one long command chain with the first as Repeat, Unconditional, Always Active - and all subsequent blocks piped after this one as Chain, Unconditional, Always active , indeed I then tried them all as needing redstone - just for the heck of it.
No dice. the tag never gets added to the player even though the npcClick escalates.
Would you be able to attach a world save of the working model you have? Just wondering if theres something glitchy in my minecraft setup or the rules for the world; ah - heres the image sorry: Yup - afraid Larry looks less like a villager or a cucumber and more like Galadriel - I've messed with the skins
Dummy test, but are you running 1.12? If you're running 1.13, the commands are going to be different. But yeah. Let me find somewhere to drop one.
On that note, the reason it seems like more ovekill to me, maybe, is I've been writing my functions in 1.13's version of commands and they've done a few things that greatly simplify some stuff. Mainly, you can target a single entity with an entire function, running commands from their location, targeting them with @p or @e[limit=1] or @s or whatever, and not have to constantly put in the criteria for which mob you want (ie. @e[type=villager,team=NPC,score_stuff]). If you are in 1.12, and can switch to 1.13, the latest snapshot *seems* to be a lot more stable than it's been in the last few weeks.
So, I just made a data pack instead. This is for 1.12.2. If you're running 1.13, we need to rebuild it using the new commands.
2) Put the zip file into your world save folder (main directory). If you don't know how to get to it, type in %AppData%, click on Minecraft on the top, open up Saves, then open the folder for the world you wanna run this in.
3) Once the zip file is in the save folder, just unzip it. This might conflict with existing data packs if you have any.
4) If you're already logged into this world, type /reload. Then type /function custom:setup. You should get no errors.
5) Then type /gamerule gameLoopFunction custom:master
6) The villager that was spawned by the setup function should now be clickable.
If you have any issues, we'll do a full world upload. I was just trying to minimize the stuff you had to download. Provided the above works, you should be able to open up the files and see how it all works. I left comments to explain what's happening. And it's already pretty simple. One function checks to see if someone has clicked on an NPC and sets up the NPC and player for dialogue. The second one gives dialogue. The third one resets scores based on certain criteria.
think its got one on here - just under the paragraph and in the middle - world symbol -thanks for taking so much effort. I'm on 1.12.1 - hoping this adventure doesn't get broken by the upgrade to 1.13
They said they're trying to make the switch from 1.12 to 1.13 work, but if I'm being honest, so much is changing, I think it's worth starting with a fresh world. A lot is being added, and especially if you've already explored a lot of your world, you're going to have a hard time seeing some of the new stuff.
** also, try the datapack. No command blocks required. Much better.
I think I need a primer on how to upload world saves. Seems to require you do it through CurseForge. Which isn't a big deal, but I can't figure out how to do it there, either. Wonder if you need a paid account.
Bleh. It was only 4mb anyway. Here it is, the world save.
Hey there, works on my setup - so its not anything knackered in MC per se, but it could be a world rule - or I pondered it might be something to do with too many villagers in a certain radius - never know. I couldn't see where you have the command blocks though - are they buried someplace? Couldn't find Larry's pants at all!
Well - NPC chats allow a great deal of creative freedom in building adventure style quests into MC. When I started writing this adventure for my son - the greatest amount of interaction was in a sky city that he has to get to and a 'escalator trade' - that's where there are a pile of traders in this place each doing at least one trade of A->B. You enter the arena with a sure amount of one thing (16 gold ingots raided from pirates) - you need to leave with a pressure plate that allows a skywalk to the next section. Somewhere in the mix is a dude who does 2 trades - one of which delivers 32 gold ingots - you can go around the loop a number of times building up what is needed - and even walk out with more than one of the best items you'd otherwise lose in trade - a legendary sword.
Nowthat works okdok - but its flat ... I'm left to deal with the majority of clues and prompts in written books or PNG overwritten maps dumped as 'notes' onto item frames by myself as an off-screen protagonist building the story. Which is ok - but a little flat again. Having some characters enliven a section with story - clues - even some tellraw click choices or a clean out of an inventory of certain items = deliver of a needed quest item - lots and lots of scope.
There are 11 'realms' - some of them span more than a few chunks - one - the end-game is an area with a massive iron wall splitting the ancient west from the zombie ridden lands of the east - a bit tolkein'y I guess, but it works nicely. Movement between most of the realms is via teleporting Command Blocks activated with 'Ancient keys' - all technology from the ancient past - part of the back story. When he's done he gets a chest full of stuff that would take a serious amount of playing to do - elytra, shulker boxes, highly enhanced armour - and a written book with useful commands in that he can click on - teleports to all the places he has visited and then some.
I can shunt the story in here - the world save is really big
had a peep at the datapack - looks to be the way forward, assuming as I couldn't see command blocks thats the solution employed in your world save - just going to have a peep at that and see.
Notice that according to the Wiki datapack's are 1.13
Only just seen the full part re: the Dummy test and data pack - weird - think the forum didn't completely update the page - going to check it out - thanks again!
had a real good look - smashing, works a treat. I think you had a query up top regards the need for tags - I believe they are used as a flagging method to allow conversation / chat streams - so you could have a generic NPC team - all NPC's belong to that team, but tagging different NPC's as NPC1 NPC2 ....NP[N] - allows different conversations - additional tag value to check for in the dialogues so you'd have:
# Second Message
execute @e[tag=NPCTalking,tag=NPC1] ~ ~ ~ tellraw @a[r=4,score_npcHeard=2,score_npcHeard_min=2,score_npcClick_min=1] {"text":"My pants are missing! Find my pants!"}
and
NPC2
# First Message
execute @e[tag=NPCTalking,tag=NPC2] ~ ~ ~ tellraw @a[r=4,score_npcHeard=1,score_npcHeard_min=1,score_npcClick_min=1] {"text":"I have purloined the Gloomy Pants of Uncle Vanya"}
# Second Message
execute @e[tag=NPCTalking,tag=NPC2] ~ ~ ~ tellraw @a[r=4,score_npcHeard=2,score_npcHeard_min=2,score_npcClick_min=1] {"text":"Next the One Ring and then..... Droitwich!"}
had a real good look - smashing, works a treat. I think you had a query up top regards the need for tags - I believe they are used as a flagging method to allow conversation / chat streams - so you could have a generic NPC team - all NPC's belong to that team, but tagging different NPC's as NPC1 NPC2 ....NP[N] - allows different conversations - additional tag value to check for in the dialogues so you'd have:
# Second Message
execute @e[tag=NPCTalking,tag=NPC1] ~ ~ ~ tellraw @a[r=4,score_npcHeard=2,score_npcHeard_min=2,score_npcClick_min=1] {"text":"My pants are missing! Find my pants!"}
and
NPC2
# First Message
execute @e[tag=NPCTalking,tag=NPC2] ~ ~ ~ tellraw @a[r=4,score_npcHeard=1,score_npcHeard_min=1,score_npcClick_min=1] {"text":"I have purloined the Gloomy Pants of Uncle Vanya"}
# Second Message
execute @e[tag=NPCTalking,tag=NPC2] ~ ~ ~ tellraw @a[r=4,score_npcHeard=2,score_npcHeard_min=2,score_npcClick_min=1] {"text":"Next the One Ring and then..... Droitwich!"}
Tried this and indeed added a separate setup file - figured could have one per NPC in the world whilst building -nice way of summoning without messy commands etc. And it all works brilliantly! Thanks so much Dscutt!
Just a thought - and another assumption, we can control the flow of stuff with Command blocks using chains and preconditions - the commands in the setup files - and here is the assumption - just executed serially as they appear but governed by the test @e[blah]?
So.... thinking about how to handle separate events - a conversation that reaches a point and needs not then to repeat but take another form, or a different element creeping in - the player approaches but with a certain quest item necessitating a different chat line
I think it may be that tags become required as flags to accomplish this
The Meaning of Life, the Universe, and Everything.
Join Date:
1/26/2018
Posts:
48
Member Details
Just was reading this thread, and say you're doing it in 1.12.2, and hoped it wouldn't break in 1.13. It will.
All commands are breaking in 1.13, as they have been totally revamped to be faster/efficient, and reduce redundancies. Any system that uses execute (read: every single adventure map) will be broken as of 1.13.
Just giving a (sad) heads up. I, myself, have been working with the 1.13 syntax lately, and programming an entirely new map for the update when it comes out. Doing it with datapacks is A+, since all I have to do is take them from the test environment I have, and drop them on the new map.
Hi folks, hope you can help - maybe I'm missing something simple
I have a chat system in development based on a Youtube build - link below. It seems pretty simple, bits seem to work just fine - and then there's the glitch - getting a fail on a simple tellraw. The notion is that a player can approach an 'NPC' - a villager summoned without trades and which the player can click on to get dialogue. The state of the 'conversation' is held by scoreboard data, resets occur when the player is a certain radius away from the entity.
The villager has been tagged with the value npc - and I'm using a kind of flag npcSay as tag on the player to prevent message spam in the tellraw - it gets flipped on by a block when an scoreboard value increments (tied in with stat.talkedToVillager)
When the chain executes I get a couple of fails with 'Failed to execute <command> as Yaxxbarl [villager Name:]
/scoreboard players add @a[score_npcClick_min=1] npcTalk 1
/execute @e[type=villager,tag=npc] ~ ~ ~ /scoreboard players set @a[r=6,rm=5] npcTalk 0
/execute @e[type=villager,tag=npc] ~ ~ ~ /scoreboard players tag @a[r=6,rm=5] remove npcSay
First noticed the failure on a second command chain - one that detects the incremental clicks on said villager and provides a different tellraw per increment - a simple chat system:
/execute @e[type=villager,tag=npc] ~ ~ ~ /tellraw @a[score_npcTalk_min=1,score_npcTalk=1,r=4,tag=!npcSay] ["",{"text":"Celeborn:","color":"gold"},{"text":" Welcome Jacobly, Son of Nibb!","color":"none"}]
Weird bit - if I remove that tag=!npcSay tag in the execute above - the damn tellraw works - but of course spams - the negated npsSay is supposed to trap more than one message (3rd command block chain removes the tag as soon as conditions are right)
I'm about out of ideas for any further debugging - at first I thought I had the entity selector wrong - but it works in other examples (clearly the case when I remove the !npcsay) - then I recalled seeing something somewhere about not putting the / in - as it causes the execution to either be on the part of the player - or not - but swapping them out makes no difference to the events and indeed - copied them slavishly from the vid where the guy has them working just right.
Any ideas greatly appreciated - driving me nuts!
best wishes and thanks in advance
ps: here's the Youtube if it helps clarify:
Complete command set:
Command Chain block (1)
/scoreboard players add @a[score_npcClick_min=1] npcTalk 1
/execute @e[type=villager,tag=npc] ~ ~ ~ /scoreboard players set @a[r=6,rm=5] npcTalk 0
/execute @e[type=villager,tag=npc] ~ ~ ~ /scoreboard players tag @a[r=6,rm=5] remove npcSay
Command Chain Block (2) [chat message chain]
/execute @e[type=villager,tag=npc] ~ ~ ~ /tellraw @a[score_npcTalk_min=1,score_npcTalk=1,r=4,tag=!npcSay] ["",{"text":"Celeborn:","color":"gold"},{"text":" Welcome Jacobly, Son of Nibb!","color":"none"}]
Command Chain block (3) [resets values to allow the player to revisit the area]
/scoreboard players tag @a[score_npcClick_min=1] add npcSay
scoreboard players set @a npcClick 0
I'm gonna take a look at this. This is a neat concept, and it's giving me a few good ideas. I'll see if I can't sort out your problem as well.
Dunno if it's affecting anything, but first thing I noticed, you shouldn't have backslashes in the commands nested in your execute commands. Also, if these are in command blocks, you don't need the slashes at all, even for /execute.
/execute @e[type=villager,tag=npc] ~ ~ ~ scoreboard players set @a[r=6,rm=5] npcTalk 0
/execute @e[type=villager,tag=npc] ~ ~ ~ scoreboard players tag @a[r=6,rm=5] remove npcSay
/execute @e[type=villager,tag=npc] ~ ~ ~ tellraw @a[score_npcTalk_min=1,score_npcTalk=1,r=4,tag=!npcSay] ["",{"text":"Celeborn:","color":"gold"},{"text":" Welcome Jacobly, Son of Nibb!","color":"none"}]
or
execute @e[type=villager,tag=npc] ~ ~ ~ scoreboard players set @a[r=6,rm=5] npcTalk 0
execute @e[type=villager,tag=npc] ~ ~ ~ scoreboard players tag @a[r=6,rm=5] remove npcSay
execute @e[type=villager,tag=npc] ~ ~ ~ tellraw @a[score_npcTalk_min=1,score_npcTalk=1,r=4,tag=!npcSay] ["",{"text":"Celeborn:","color":"gold"},{"text":" Welcome Jacobly, Son of Nibb!","color":"none"}]
So, here's how I did it. I tested this. It works.
Step 1: The scoreboard
/scoreboard teams add NPC
/scoreboard objectives add npcClick stat.talkedToVillager
/scoreboard objectives add npcHeard dummy
/scoreboard teams option NPC collisionRule never
Step 2: Summon in your villager
/summon minecraft:villager ~ ~ ~ {Offers:{},Profession:2,CustomNameVisible:0,CustomName:"Larry",Invulnerable:1,NoGravity:1,Attributes:[{Name:"generic.movementSpeed",Base:-100.00}]}
Step 3: Add your villager to the NPC team
/scoreboard teams join NPC @e[type=villager]
(now starts the command blocks)
Step 4: Repeating command block
> Look for NPCs in radius of players with npcClick scores and "activate" them with NPCTalking
execute @a[score_npcClick_min=1] ~ ~ ~ scoreboard players tag @e[type=villager,team=NPC,r=4] add NPCTalking
Step 5: First Message (chain,unconditional)
> For all villagers with the NPCTalking tag, ping players who have an npcHeard score of 0
execute @e[tag=NPCTalking] ~ ~ ~ tellraw @a[r=4,score_npcHeard=0,score_npcHeard_min=0,score_npcClick_min=1] {"text":"Hello adventurer!"}
Step 6: Second Message (chain,unconditional)
> Notice that the first message uses a score of 0 for npcHeard. This one will use a score of 1. As it only targets players who have clicked on the NPC... you get it.
execute @e[tag=NPCTalking] ~ ~ ~ tellraw @a[r=4,score_npcHeard=1,score_npcHeard_min=1,score_npcClick_min=1] {"text":"Please bring me bread!"}
Step 7: Increment npcHeard (chain,unconditional)
> This will increment npcHeard for all players who have the npcClick score.
execute @e[tag=NPCTalking] ~ ~ ~ scoreboard players add @a[r=4,score_npcClick_min=1] npcHeard 1
Step 8: Reset chat for all players who leave the NPC (chain,unconditional)
execute @a[score_npcHeard_min=1] ~ ~ ~ execute @e[team=NPC,rm=5,r=6] ~ ~ ~ scoreboard players set @a[score_npcHeard_min=1,rm=5,r=6] npcHeard 0
Step 9: Reset scores
> npcClick is reset to tell the command chain to now ignore the player, since they aren't ready to hear the next line of dialogue
> NPCTalking is removed because the villager isn't prepared to give their dialogue
scoreboard players set @a[score_npcClick_min=1] npcClick 0
scoreboard players tag @e[tag=NPCTalking] remove NPCTalking
But now that I'm reading over this and thinking about it, this actually seems like ridiculous overkill. You should be able to tell when a player has clicked on a villager, test to see if there are any NPC's around them ("NPC", in this case, meaning villagers who give dialogue), and if there are, then test to see if they give certain types of dialogue. If they do, then give it. Otherwise, for any player who has npcHeard of 1 or greater, test to see if there are any NPC's around them. If there aren't, set npcHeard to 0. Tagging seems very unnecessary. I'll see if I can't work out a simpler one.
** edit - Hmm. The one I'm working on doesn't work right. I've removed it for now
Dscutt - amazing - thanks for all your work!
I did try the comms without slashes - seemed to make little difference, but hey - its been a bit random in effect here and there, hence I wondered if it was more to do with the update. That said I'm going to try out your neat approach
I agree, there should be a better way, I've tried other systems using comparators that - with the 1 tick difference - block out the spam on the chat - I liked Tallones system because it was elegant and compact - just a bunch of easily copyable CB's. Bizarrely, I took a schematic of the semi-working one out the test world I have to drop into a neutral area of the Adventure world - and got completely different results - same set of gamerules. Weird!
Just tried it Dscutt - cut n paste, step by step. Only thing I wasn't sure of is whether this is one command block chain- and whether the last two commands are part of the same chain and 'chain' 'conditional' / 'unconditional'. Alas - got diddly out of it. I don't think the click is working - don't see any increment occuring so NPCtalking never gets set - which is odd. I have the sidebar running on NPClick and get a zip score. The villager is added to the teams - alas with 4 others that happened to be in the same world, did a more atomic add of village @e[type=villager,name="Larry"] - reckons its added to the group.
Started afresh in my 'live' world - and get similar results - i have the layout of blocks like this - so I reckon its entirely possible I've got them in the wrong configuration,: blast - cant add the screenshot. I've basically done one long command chain with the first as Repeat, Unconditional, Always Active - and all subsequent blocks piped after this one as Chain, Unconditional, Always active , indeed I then tried them all as needing redstone - just for the heck of it.
No dice. the tag never gets added to the player even though the npcClick escalates.
Would you be able to attach a world save of the working model you have? Just wondering if theres something glitchy in my minecraft setup or the rules for the world; ah - heres the image sorry: Yup - afraid Larry looks less like a villager or a cucumber and more like Galadriel - I've messed with the skins
Dummy test, but are you running 1.12? If you're running 1.13, the commands are going to be different. But yeah. Let me find somewhere to drop one.
On that note, the reason it seems like more ovekill to me, maybe, is I've been writing my functions in 1.13's version of commands and they've done a few things that greatly simplify some stuff. Mainly, you can target a single entity with an entire function, running commands from their location, targeting them with @p or @e[limit=1] or @s or whatever, and not have to constantly put in the criteria for which mob you want (ie. @e[type=villager,team=NPC,score_stuff]). If you are in 1.12, and can switch to 1.13, the latest snapshot *seems* to be a lot more stable than it's been in the last few weeks.
So, I just made a data pack instead. This is for 1.12.2. If you're running 1.13, we need to rebuild it using the new commands.
1) https://drive.google.com/open?id=16fcJV_SuemmwhVp7EKtFTwdPJiNtBixn
2) Put the zip file into your world save folder (main directory). If you don't know how to get to it, type in %AppData%, click on Minecraft on the top, open up Saves, then open the folder for the world you wanna run this in.
3) Once the zip file is in the save folder, just unzip it. This might conflict with existing data packs if you have any.
4) If you're already logged into this world, type /reload. Then type /function custom:setup. You should get no errors.
5) Then type /gamerule gameLoopFunction custom:master
6) The villager that was spawned by the setup function should now be clickable.
If you have any issues, we'll do a full world upload. I was just trying to minimize the stuff you had to download. Provided the above works, you should be able to open up the files and see how it all works. I left comments to explain what's happening. And it's already pretty simple. One function checks to see if someone has clicked on an NPC and sets up the NPC and player for dialogue. The second one gives dialogue. The third one resets scores based on certain criteria.
think its got one on here - just under the paragraph and in the middle - world symbol -thanks for taking so much effort. I'm on 1.12.1 - hoping this adventure doesn't get broken by the upgrade to 1.13
They said they're trying to make the switch from 1.12 to 1.13 work, but if I'm being honest, so much is changing, I think it's worth starting with a fresh world. A lot is being added, and especially if you've already explored a lot of your world, you're going to have a hard time seeing some of the new stuff.
** also, try the datapack. No command blocks required. Much better.
I think I need a primer on how to upload world saves. Seems to require you do it through CurseForge. Which isn't a big deal, but I can't figure out how to do it there, either. Wonder if you need a paid account.
Bleh. It was only 4mb anyway. Here it is, the world save.
https://drive.google.com/file/d/1FhldUWtzORR-XWskbinTDT3TMHDFy1D7/view?usp=sharing
I'm out for a few hours. Got a long drive. Good luck!
Out of curiosity, what are you attempting to do with this?
Hey there, works on my setup - so its not anything knackered in MC per se, but it could be a world rule - or I pondered it might be something to do with too many villagers in a certain radius - never know. I couldn't see where you have the command blocks though - are they buried someplace? Couldn't find Larry's pants at all!
Well - NPC chats allow a great deal of creative freedom in building adventure style quests into MC. When I started writing this adventure for my son - the greatest amount of interaction was in a sky city that he has to get to and a 'escalator trade' - that's where there are a pile of traders in this place each doing at least one trade of A->B. You enter the arena with a sure amount of one thing (16 gold ingots raided from pirates) - you need to leave with a pressure plate that allows a skywalk to the next section. Somewhere in the mix is a dude who does 2 trades - one of which delivers 32 gold ingots - you can go around the loop a number of times building up what is needed - and even walk out with more than one of the best items you'd otherwise lose in trade - a legendary sword.
Nowthat works okdok - but its flat ... I'm left to deal with the majority of clues and prompts in written books or PNG overwritten maps dumped as 'notes' onto item frames by myself as an off-screen protagonist building the story. Which is ok - but a little flat again. Having some characters enliven a section with story - clues - even some tellraw click choices or a clean out of an inventory of certain items = deliver of a needed quest item - lots and lots of scope.
There are 11 'realms' - some of them span more than a few chunks - one - the end-game is an area with a massive iron wall splitting the ancient west from the zombie ridden lands of the east - a bit tolkein'y I guess, but it works nicely. Movement between most of the realms is via teleporting Command Blocks activated with 'Ancient keys' - all technology from the ancient past - part of the back story. When he's done he gets a chest full of stuff that would take a serious amount of playing to do - elytra, shulker boxes, highly enhanced armour - and a written book with useful commands in that he can click on - teleports to all the places he has visited and then some.
I can shunt the story in here - the world save is really big
had a peep at the datapack - looks to be the way forward, assuming as I couldn't see command blocks thats the solution employed in your world save - just going to have a peep at that and see.
Notice that according to the Wiki datapack's are 1.13
Only just seen the full part re: the Dummy test and data pack - weird - think the forum didn't completely update the page - going to check it out - thanks again!
Righty
had a real good look - smashing, works a treat. I think you had a query up top regards the need for tags - I believe they are used as a flagging method to allow conversation / chat streams - so you could have a generic NPC team - all NPC's belong to that team, but tagging different NPC's as NPC1 NPC2 ....NP[N] - allows different conversations - additional tag value to check for in the dialogues so you'd have:
# NPC1
# First Message
execute @e[tag=NPCTalking,tag=NPC1] ~ ~ ~ tellraw @a[r=4,score_npcHeard=1,score_npcHeard_min=1,score_npcClick_min=1] {"text":"Hello adventurer!"}
# Second Message
execute @e[tag=NPCTalking,tag=NPC1] ~ ~ ~ tellraw @a[r=4,score_npcHeard=2,score_npcHeard_min=2,score_npcClick_min=1] {"text":"My pants are missing! Find my pants!"}
and
NPC2
# First Message
execute @e[tag=NPCTalking,tag=NPC2] ~ ~ ~ tellraw @a[r=4,score_npcHeard=1,score_npcHeard_min=1,score_npcClick_min=1] {"text":"I have purloined the Gloomy Pants of Uncle Vanya"}
# Second Message
execute @e[tag=NPCTalking,tag=NPC2] ~ ~ ~ tellraw @a[r=4,score_npcHeard=2,score_npcHeard_min=2,score_npcClick_min=1] {"text":"Next the One Ring and then..... Droitwich!"}
Tried this and indeed added a separate setup file - figured could have one per NPC in the world whilst building -nice way of summoning without messy commands etc. And it all works brilliantly! Thanks so much Dscutt!
Just a thought - and another assumption, we can control the flow of stuff with Command blocks using chains and preconditions - the commands in the setup files - and here is the assumption - just executed serially as they appear but governed by the test @e[blah]?
So.... thinking about how to handle separate events - a conversation that reaches a point and needs not then to repeat but take another form, or a different element creeping in - the player approaches but with a certain quest item necessitating a different chat line
I think it may be that tags become required as flags to accomplish this
cool stuff possible
Just was reading this thread, and say you're doing it in 1.12.2, and hoped it wouldn't break in 1.13. It will.
All commands are breaking in 1.13, as they have been totally revamped to be faster/efficient, and reduce redundancies. Any system that uses execute (read: every single adventure map) will be broken as of 1.13.
Just giving a (sad) heads up. I, myself, have been working with the 1.13 syntax lately, and programming an entirely new map for the update when it comes out. Doing it with datapacks is A+, since all I have to do is take them from the test environment I have, and drop them on the new map.