#(fullwall) Command queues

1 messages · Page 1 of 1 (latest)

chrome sapphire
#

Current progress is here: https://wiki.citizensnpcs.co/Behaviors

Below is the original post:
Citizens has long flirted with the idea of programming languages - initially in Citizens1 with sub-JARs, then in Adventures with the Adventures rule language, and finally in Citizens2 with the Javascript scripting API and subplugins.
More recently, users frequently use commands as a pseudo-scripting language, probably because of command blocks, datapacks etc.

Denizen now exists as a full-fledged scripting language for Minecraft, and should be a first class citizen (heh) for the Citizens project.

However, I feel there is a useful intermediate between scripting and basic command lists that server owners want.

Enter this idea: the 'command queue' (name TBD)
Essentially, allow users to define in YAML lists with the following features:

  • Run command
  • if/else (with limited maths capabilities)
  • Run external 'command' (e.g. Denizen, which should be a first class citizen)
  • Loops TBD but probably not essential in the spirit of keeping this simple

Entry points from commands and a limited set of events

This will empower slightly more advanced use cases for citizens without taking on significant development burden.
NOTE: this is NOT a programming language, and features should NOT be added to support programming-language-like capabilities.
Tools like denizen and external scripting languages should be preferred instead.

hushed latchBOT
#

(fullwall) Command queues

hushed latchBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

chrome sapphire
#

up for discussion, but I do think there is a need for this - even the ability to define command lists in yaml would be nice.

#

server owners use this all the time in mythic skills

blazing path
#

See #1101529923056832522 message - basically sums up to: Citizens is an NPC plugin, and implementing programming-like features into it doesn't make much sense imo.
Can compare that to Paper adding built-in NPC functionality for example - it's a thing basically all servers have, but it still doesn't make sense to do, plugins build onto Paper to add that

#

And as I said there ^ as well, I feel like programming-like functionality will either end up being too little (I.e. nice to have sometimes, but for a lot of use-cases won't be enough & users will keep wanting more stuff), or an entire programming language, in which point just use Denizen/Java

chrome sapphire
#

I understand the concerns, because I have the same and why I held off on adding /npc command for a very long time. seeing that /npc command is the most used feature atm has made me rethink my stance however towards a middle ground approach

#

I think if you restrict it to just command lists then that is sufficient

#

the quests feature in citizens1 was abused to create a pseudo-programming language haha back in the day

blazing path
#

Yeah but like, take the if command you mentioned above for example - what if you want to compare the player's location? item being held? display name of the item being held? color of a leather armor piece a player is wearing?

chrome sapphire
#

agreed

#

I was toying with the idea of calling out if to denizen for that reason

#

perhaps this feature could start with just events and command lists then? no if?

#

I think it's important to have that, especially with #1101530307129266218 this feature

blazing path
#

/npc command makes more sense imo, as it's a one-time thing - run commands, no specific features need to be added (although could definitely be a Denizen script you just pop in to the scripts folder and use the same way, for that matter)

chrome sapphire
#

/npc command is a special case of a on-click command queue

#

we've had a lot of feature requests asking for more than that, probably because mythic skills allow you to have more than that

#

and yes, these are almost universally covered by denizen

blazing path
#

MythicMobs' point is to have scriptable mobs, I just don't feel like that makes much sense for Citizens

chrome sapphire
#

hmm, I'll have a think but I think this feature is desired by the citizens community

#

polls would be nice 😛

#

a proxy for that may be looking in to how people are using /npc command for example

#

it was really surprising to see the majority of people using commandtrait, which I previously said never in a million years to to avoid 'creating a programming language'

#

this is medium priority for a reason as well

blazing path
#

Also another point to bring up is the recent thread/few threads where users were complaining about Citizens having too many extra stuff and wanting a compact version - obviously that's not actually valid as having it there will do nothing, but might still matter to users who don't know that

chrome sapphire
#

there's always a balance between feature creep and performance, but I don't think Citizens2 has ever gone on feature creep haha

#

that's a user perception based on timings mostly

#

(and maybe jar size?)

blazing path
#

Yeah no that's obviously invalid, just a matter of users making assumptions (which I brought up since iirc you talked about that in #helpers before?)

#

But either way my opinion is just: If it's not an entire lang, users will want more features and have to resort to something else either way.
If it is a lang/lang-like, users will need to learn the basics of programming anyway, and it either won't be as useful due to lack of features, or require a ton of work to actually support everything

chrome sapphire
#

yeah, but the first thing is how it is currently

silver pilotBOT
blazing path
#

But still, it existing isn't a reason to make the situation "worse" - especially not when there are valid alternatives that were created specifically for this

chrome sapphire
#

Anything can be a denizen script, just as anything can be a piece of java code

#

I don’t think this idea is an entire programming setup

blazing path
#

I mean, this is what all my message above were referring to

#

If it's a programming-like setup (e.g. basic conditions, events, whatever), users will just want more and it'll either not be as widely used due to users not being able to do everything, or become a full programming language

chrome sapphire
#

People already want more, and I’m perfectly happy to continue to direct them elsewhere

#

I trust myself enough to not turn it into a full programming language

blazing path
#

Basically, what I'm saying is that as far as I can see there are 2 options:

  • Make a full programming language, in which case it's a lot of unnecessary effort
  • Make a partial thing (only some events, some functions of a language, not being able to read everything), in which case some users will probably use it, but eventually run into more and more roadblocks due to it only being a partial thing
chrome sapphire
#

Yep

#

I don’t see partial solutions as necessarily a problem I guess, because ultimately most code you write is a partial solution

#

The question is whether that’s a useful thing to spend time on

#

I think it is

#

Happy to try and collect more data

#

This is not an immediate priority for me

#

It’s an idea on a list

blazing path
#

Fair enough, at the end of the day it's your decision ofc - just one last thing I'd like to say: currently you seem to be going in a have everything built-in direction, which is fine, but might be better to focus on making it easier for other existing plugins to integrate into Citizens/others to contribute to Citizens (e.g. #1101531063479709769: could have a built-in system for that, but might be a better idea to integrate with popular existing plugins such as ModelEngine, ItemsAdder... and direct development effort towards adding whatever API they need to have a stable integration). I think @proven locust mentioned something like this as well

chrome sapphire
#

It’s a fine line for sure, but some features are expected to be built in by the community to integrate with

#

Also, modelengine/itemsadder are paid and all

blazing path
#

Yeah fair enough, might not be the best example lol but you get the point

chrome sapphire
#

Yeah totally, and I’m always happy to hear suggestions and feature requests. We don’t really have a large external developer presence here

#

Remember also I’ve previously been burnt by having an api, having things like sentry, builder, postal, etc exist and then go unmaintained for a long time. You get into a spot where you really kind of need some of those features still but nothing exists to fill it

proven locust
#

i made the script for it specifically because it was starting to be a topic that people really wanted an easy way

#

so I made a point of making an easy way via Denizen that would then redirect to "is this pile of features not enough? You can use any Denizen tag you want so start learning about those. Still not enough? Maybe you're interested in write a Denizen command?"

#

a linear pipeline where the more scripty features you need the more you dive into Denizen itself

#

The reason I stopped making scripts like that is because fullwall keeps adding features to Citizens btw

#

most of my old user-friendly Citizens-addon scripts and even java code have been invalidated by Citizens changes

#

which, uh, heavily discourages developing anything more in that direction as it's not going to be used

#

which is a problem with the slow expansion of features (vs a pre-set plan) - if we don't know what Citizens intends to support we can't make community tools around it

#

I really like when Citizens was a core and then addons defined traits/commands/etc., as (A) it was very clear in organization and (B) it was easy to build surrounding tools for

#

if we had the opposite state, Citizens as a monolith, that'd be cool too, albeit one helluva transition from here to there. From there on we just PR to main any features and all and it's good. Requires a lot of changes to how its run to get close to that tho.

#

the middle-state, where Citizens requires addons for advanced features but they randomly are invalidated over time, is frustrating

proven locust
#

as jrbudda faded out i took over first with a fork, then a Denizen script, then Sentinel. At all points there was an active solution for end-users

#

Builder/Postal, yeah. Taking and maintaining those officially in Citizens would be good. Could even clean them up and make them official Citizens example addons to use as references for future devs

#

(the same way I sometimes use Sentinel as a reference for that)

chrome sapphire
#

I don’t want to return to the citizens1 days necessarily

#

Haha

#

But yeah, I guess it’s nice when citizens is an api core, but some features just seem to be essential

#

For a very long time (6-8 years?) citizens was just the core

#

When in citizens1 it had all those sub features like quests and guard and trader and stuff

blazing path
#

^ Having Citizens addons officially maintained by Citizens isn't a bad idea, would work for both people who only want a core and for ones who want built-in features

chrome sapphire
#

For a time, it seemed like dtltraders, postal, builder etc would be good replacements for that system but then it didn’t quite work out

chrome sapphire
#

I mean, mcmonkey would have to guide that since sentinel is like the only plugin that would participate like that atm

chrome sapphire
#

Also we’re kind of drifting off topic here

#

Maybe move to #1101526181502795776

#

And I need to insist I go to bed cos it’s 3am

vale phoenixBOT
#
Thread Reopened

Thread was manually reopened by @proven locust.