[HN Gopher] Show HN: Initiative.sh, an in-browser command line f...
       ___________________________________________________________________
        
       Show HN: Initiative.sh, an in-browser command line for D&D
        
       Author : mikkelpaulson
       Score  : 179 points
       Date   : 2021-11-04 12:59 UTC (10 hours ago)
        
 (HTM) web link (initiative.sh)
 (TXT) w3m dump (initiative.sh)
        
       | jwithington wrote:
       | This is amazing! I dungeon master for a online D&D experience
       | (https://www.haze-saltborne.com/). Look forward to using this
       | when I'm generating NPCs and such.
        
         | mikkelpaulson wrote:
         | Thank you! The best complement I receive is when I hear that
         | people are actually using this at the table. I'd appreciate if
         | you stopped by the Discord (linked on the homepage) to share
         | your experiences using it.
        
       | JimWestergren wrote:
       | Very cool. What about support for the metric system in
       | measurements for weight, size etc? Perhaps specify both formats
       | in the ouput.
        
         | mikkelpaulson wrote:
         | I would dearly love that. The D&D ruleset speaks imperial, so
         | so do I. (I'm assuming that's because they're trying to be old
         | timey.) Adding metric alongside is easy enough, though!
        
           | ExtraE wrote:
           | I think it's because Wizards of the Coast is an American
           | company.
        
         | [deleted]
        
       | sdmike1 wrote:
       | Have you considered any level of FoundryVTT[0] integration? That
       | could be a really cool plugin!
       | 
       | [0] https://foundryvtt.com
        
         | mikkelpaulson wrote:
         | Agreed! The first integration I build will be webhooks to allow
         | people to extend it however they see fit. Currently my built-in
         | integrations are planned to skew simpler, like switching
         | Spotify playlists when the location changes. However, it really
         | comes down to a time investment/feature desirability tradeoff.
         | If users are really excited about something like that, I'm not
         | going to argue!
        
       | jedimastert wrote:
       | Has there been any community consensus towards what to replace
       | "game master" with?
        
         | diablerouge wrote:
         | If you want an alternative to GM (I can see why you might want
         | to, but I'd be curious to know how many people see it as a
         | problem), "referee" works well. Has an old-school flavor, and
         | because it's an old term it won't really raise any eyebrows or
         | "why don't you just use game master?" questions.
        
         | jefurii wrote:
         | I'm curious as to the reasoning here. I know the word "master"
         | has some seriously negative associations when opposite the word
         | "slave", but that's not the case here. Nobody that I'm aware of
         | calls D&D or other RPG players "slaves". If anything, a good GM
         | is there to serve the players, not the other way around.
         | 
         | Edit: I support replacing usages of the paired words "master"
         | and "slave" so as not to reference the very real history of
         | slavery. I'm also totally fine with using "referee" instead of
         | "game master". But I'm concerned that other senses of "master",
         | like "master craftsman" or "gold master" or "game master" which
         | refer to mastery (of a craft or some such) and don't (to my
         | knowledge) connote "master/slave" are being lumped in here.
        
           | jedimastert wrote:
           | It doesn't have to be opposite the word "slave". Really just
           | the word "master" as a position of power.
        
             | jefurii wrote:
             | There are other senses of the word which are more about
             | mastery of a craft or a body of knowledge. Language is a
             | complicated thing.
        
         | mikkelpaulson wrote:
         | I've wondered about that myself. I did swap out "race" for
         | "species", but I don't know of a preferred term there.
        
       | ping00 wrote:
       | Just wanted to chime in and say that I think this is a beautiful
       | piece of software: fast, responsive, and intuitive. It's a
       | pleasure to use, and your tutorial did a great job walking me
       | through it. Congratulations!
       | 
       | I've already tossed this into our DnD Discord, and our DM may use
       | it in the next session.
        
       | peterkos wrote:
       | To learn Rust, I started building a D&D character-management CLI
       | tool just last week. (Might rename to "terminal roll", eh?)
       | 
       | Cool to see a fully featured one from the DM side!
       | 
       | [0] https://github.com/peterkos/calcdnd
        
         | mikkelpaulson wrote:
         | Awesome! Looks like a great way to learn a new programming
         | language. I suggest attempting to recompile to WebAssembly as
         | part of the learning process - it can be a bit frustrating, but
         | very cool to see your code running in browser!
         | 
         | I use Caith[0] to handle dice parsing and rolling, although if
         | this is a learning project you may want to reimplement that
         | part yourself.
         | 
         | [0] https://crates.io/crates/caith
        
       | thesuitonym wrote:
       | One suggestion I would love is to see a command like 'inn 10',
       | giving the GM a list of 10 names to choose from.
       | 
       | Very cool project!
        
         | Dolo wrote:
         | You can seemingly say "inn" and then follow it with "more" to
         | do exactly what you're after.
        
       | [deleted]
        
       | bovermyer wrote:
       | I love this. You should be in the RPG generator authors Discord,
       | send me an email if you're interested and I'll get you an invite.
        
         | mikkelpaulson wrote:
         | Sounds great, I didn't know that was a thing! I don't see a
         | public email address on your profile, though. You can reach out
         | to me at support@initiative.sh.
        
           | bovermyer wrote:
           | You would have had to go through my personal website to get
           | the email. I'll send you an email.
        
       | Dibes wrote:
       | This is super cool! I love it overall but couldn't help but want
       | for it to let me link NPCs/things to locations and just generally
       | add more metadata for when campaigns progress and the world
       | fleshes out more
        
         | mikkelpaulson wrote:
         | Yup, notes and relationships are high on my list! I've been
         | mulling those over this morning. I added a ton of place types
         | yesterday, and another high priority is to give them name
         | generators to get rid of that clunky error message about
         | needing to name your kingdoms.
        
           | brightstep wrote:
           | I will start using this for my group immediately after this
           | feature is released.
        
       | mikkelpaulson wrote:
       | This project has been my full-time for the past six months or so
       | (coming up on a year since I joined the Great Resignation and
       | decided to try my hand at self-employment). I release somewhere
       | between 2 and 10 times per week.
       | 
       | I set out to build something that I could use as a game master at
       | the table without having to put the game on hold as I navigated
       | through menus and bookmarks for the various references and
       | generators I use. My general design principle is that everything
       | in the app should be available at any time, with no need to
       | navigate menus on one extreme, or read documentation on the
       | other.
       | 
       | The core is written entirely in Rust with a couple of hundred
       | lines of JS glue. I was running it as a command-line app for the
       | first month of development, and it still works as such. However,
       | since I added autocomplete to the web interface, the web version
       | is now more feature-complete than the command line. I don't see
       | much value in the extra work of backporting features to the
       | command line at this point. (Turns out Rust was the wrong choice
       | for this particular project, but the die is cast for the moment,
       | and it has been fun.)
       | 
       | I've barely scratched the surface of the feature that I'm most
       | excited by, namely context. Soon it will be possible to tell the
       | app where the party is and what they're doing, and the
       | demographics of suggestions (and ultimately music, lighting, and
       | other integrations) will be updated accordingly. In a seedy bar
       | in the docks district? You're more likely to run into sailors
       | down on their luck. Pick a fight? Cue the epic music. Sun sets?
       | Dim the lights.
       | 
       | More details are available on my blog:
       | 
       | https://mikkel.ca/blog/introducing-initiative-sh/
       | 
       | I do have plans to monetize this project in the future, charging
       | for the server-side features (integrations and cloud sync) while
       | keeping the client-side features free. Everything that is
       | currently implemented will always be free.
        
         | kyrra wrote:
         | Super awesome!
         | 
         | Feature request: up-arrow support (like bash shell has). IE: I
         | want to reply the last command, or fix something in it (because
         | I typed it wrong). Being able to up-arrow through my command
         | history is something I use regularly on my normal command line,
         | and would be cool to have here.
        
           | mikkelpaulson wrote:
           | Yup, that's planned for the next milestone. :)
        
           | jvalencia wrote:
           | Agree with this 100%
        
         | joe_the_user wrote:
         | I run an active PbP on Paizo.com and pre-covid I ran a lot of
         | in-person games.
         | 
         | Before I was active DM, I thought computer initiative and rule
         | aids would be great. As a DM, I don't imagine they would be for
         | several reasons. A) I have accumulated an encyclopedic master
         | of game rules (running the Pathfinder system, perhaps the most
         | complex D&D variant). B) Dice and tables have a certain "feel"
         | to them that stopping and doing something on one's laptop just
         | doesn't. C) In person, I keep each players stats on a 3"x5" and
         | stack the cards for initiative - this solve 99% of initiative
         | problems, it has a nice physical feel and all my players, some
         | of who will be computer-incompetent if not computer-illiterate.
         | 
         | I say all this because I think there are places where computer
         | aids could shine:
         | 
         | 1) Character generation - despite lots of projects, there's
         | nothing yet that quickly and complete edittable characters for
         | Pathfinder at least.
         | 
         | 2) Map-aids for PbP. Roll20 and related systems simulate the
         | whole in person game framework. Discord and most PbP basically
         | just let you roll dice and maybe change stats with markup. A
         | markup system that also allows change one's location on a map,
         | along with system to manage that, would be cool and make the
         | PbP system richer without forcing it into a "heavy" Roll20 type
         | approach.
        
         | klik99 wrote:
         | Wow, this is one of those elegant solutions that seems so
         | obvious in retrospect - I tried developing a custom iPad app
         | for DMing and found the huge amount of complexity of DMing
         | really difficult to design around - a text interface is a
         | really fantastic idea
         | 
         | Surprised noone has asked - any plans to make it open source
         | and/or a self-hosted option? Would love to hack away at it, and
         | would love to see the source or at the very least an API for
         | integrations
        
           | mikkelpaulson wrote:
           | Currently the core is planned to remain closed source,
           | although if I decide to put the project on ice at any point
           | in the future I'll definitely put the source out there, that
           | being a general pet peeve of mine.
           | 
           | I do have plans to build out integrations, starting with
           | webhooks triggered on events like creating characters,
           | advancing time, or moving between places. I've also heard
           | some requests for a bona fide command-line binary, which I
           | might do if the demand is there. The maintenance overhead is
           | not insignificant, though.
        
             | klik99 wrote:
             | Sounds like a good plan - hooks for datastores or even data
             | types along with event hooks would also be good, but not as
             | key. Being able to place arbitrary notes on
             | characters/items/objects would be good (For example - I'd
             | like to say this NPC is a ranger, and someday you may add
             | classes, but arbitrary notes would be also just as good)
             | 
             | This is where my mind goes - If this acted like a very thin
             | layer that integrated with the plentiful amount of DM tools
             | that already existed, and brought the context info with it,
             | it would be a very powerful tool to centralize all this
             | info. For example, I create a dungeon, the name generated
             | either by your tool or by an API call to an existing
             | service that parses and passes data into your system, then
             | another hook generates a map and saves the persistent
             | url/hash/some identifier into a custom field on that
             | object.
             | 
             | If done right, there could be a minimal but flexible API
             | with purely client side hooks that the community could
             | leverage to bring more features - off loading a lot of work
             | without needing to opensource it.
             | 
             | Of course, having said all that, even just as it is right
             | now is super useful and exciting and I likely will use it
             | even without any of those things!
        
         | valenaut wrote:
         | This is great! Charging for integrations is a nice idea.
         | 
         | I wrote a Discord bot to trade stocks for my current industrial
         | revolution campaign, as our DM maintains a stock market in
         | Google Sheets. If I could upload my node modules somewhere and
         | have it run on command like the Discord bot, I'd never have to
         | leave this command line.
         | 
         | One of my biggest complaints about Discord for D&D is that it
         | doesn't have command line functionality. Excited to hear that
         | up-arrow is coming to this.
        
         | scubbo wrote:
         | > the die is cast
         | 
         | Bravo
        
         | tadzik_ wrote:
         | > Turns out Rust was the wrong choice for this particular
         | project
         | 
         | Curious. What made it a bad choice for this?
        
           | mikkelpaulson wrote:
           | I'll write a blog post on the subject in a few weeks, which
           | will probably end up here because Rust. The short version:
           | 
           | * This use case involves tons of string parsing and
           | concatenating, which vanilla Rust does not make intuitive. A
           | garbage-collected language would also probably handle this
           | more efficiently than I can, given that Rust is doing exactly
           | what I tell it and I don't have the time or inclination to
           | microoptimize piles of parsing code.
           | 
           | * Generally, the work is sufficiently high-level to require
           | large swaths of the standard library and a fair number of
           | dependencies despite my best efforts.
           | 
           | * I've built a brick wall between myself and my data store.
           | Ultimately persistence happens in IndexedDB with a JS shim,
           | but currently the application loads the entire contents of
           | your IndexedDB database into memory and runs based on that.
           | 
           | The WASM binary weighs in at 1.6 MB (500 kB over the wire).
           | The source, without excluding tests, comes in at 580 kB
           | (estimate 400 kB of actual code). If it were Typescript, I
           | could probably minify that down to 200 kB or less, and that
           | would still be plain text and achieve a better compression
           | ratio than my WASM binary.
           | 
           | Mind you, I haven't put in a huge amount of work to stripping
           | down the binary. But that's more or less the point: choosing
           | Rust/WASM ended up having a lot of down sides without much in
           | the way of up side, save for one: it's been a lot of fun to
           | do, and I probably wouldn't have made it this far in a
           | language I didn't enjoy as much.
        
         | johnm_io wrote:
         | This is an interesting tool and I could easily see it becoming
         | a great add-on to campaigns as-is, and hopefully become more
         | usable and feature-rich as you develop it further. Reading your
         | replies to other comments about what you want to add to it and
         | the ability to make changes to the world based upon input
         | sounds awesome. Keep up the great work!
        
       | pugworthy wrote:
       | I'd love to link things in the journal. Here's an example of what
       | I mean.
       | 
       | First I create some entries...                 character named
       | "Rocky"       city named Snootville       bar named "Drunken Pug"
       | character named "Nick"
       | 
       | But then I want to do some little associations like this...
       | Drunken Pug is noisy <arbitrary attribute, not just gender
       | related>       Drunken Pug at Snootville       Rocky likes
       | perfume <another arbitrary attribute>       Rocky likes Drunken
       | Pug <Show character and location associations>       Nick likes
       | Drunken Pug       Nick hates Rocky
       | 
       | This lets me define relationships as well as attributes, and
       | doesn't limit me to just gender related ones. Gender is just one
       | of many attributes one may have, and may or may not have any
       | relation at all to gameplay. Rocky's gender is secondary to the
       | fact that they like perfume for example.
       | 
       | And by showing that Nick hates Rocky, but they both like the
       | Drunken Pug (which is noisy), we've got a whole scenario defined
       | for a DM. And given Rocky likes perfume, well there's the reason
       | for the conflict right there if you want. "Nick didn't hear Rocky
       | enter the Drunken Pug, but his nostrils flared at the scent of
       | their cheap perfume..."
       | 
       | You could do a lot with a sort of "contains" relationship too.
       | Create an island, which contains a city, which contains a
       | district, which contains a neighborhood, which contains an inn.
        
         | mikkelpaulson wrote:
         | I love the idea of cataloguing (and presumably generating) a
         | lot of attributes about a character, but in general I'm not
         | anticipating leaning too heavily into the generator side of
         | things, so much as general campaign and world management. It's
         | still up to the DM to breathe life into the world.
         | 
         | That said, I definitely intend to add relationships (initially
         | hierarchical, which will be reflected in the journal view). It
         | seems like it would be valuable to support arbitrary user-
         | defined relationships between entities, although syntax and
         | interpretation start to get fuzzy the more user-provided terms
         | you throw into the mix. If you tell me "nick is at war with
         | rocky", does that define a relationship between Nick and Rocky
         | or does it tell me that Nick is at a place called "War With
         | Rocky"?
        
       | dunefox wrote:
       | It seems the commands like 'next' are case sensitive. Is this
       | intended?
        
         | mikkelpaulson wrote:
         | It was a deliberate design choice, but one that I've come to
         | regret. (A lot of people are also commenting on this.) I'll be
         | switching to case-insensitive in an upcoming release.
        
       | armoredkitten wrote:
       | This looks really cool! One small suggestion -- I found it
       | difficult to read the text that I was typing. The black text on
       | dark grey is hard to read. The dark theme is nice, but I could
       | only read what I was typing when there was a tooltip showing
       | possible commands.
        
         | mikkelpaulson wrote:
         | Oops, that's a bug! The site responds to your browser's dark
         | mode preferences, and apparently I've been using it exclusively
         | in light mode for a while. I'll get a fix out this afternoon.
         | :)
         | 
         | Edit: Fixed now.
        
           | armoredkitten wrote:
           | Much better :)
        
       | eminence32 wrote:
       | Very nice. Small suggestion: The commands are case-sensitive, and
       | that's not immediately obvious. For example, entering "dagger"
       | does nothing, as you have to instead enter "Dagger"
        
       | onion2k wrote:
       | One small bug - clicking on the "Roger is a non-binary halfling"
       | example says it's unable to interpret the command, and neither of
       | the suggested interpretations work either.
        
         | mikkelpaulson wrote:
         | More of a miscommunication than a bug, but still something that
         | needs fixing. Since the command renames an existing NPC, you
         | already need to have created a `character named Roger`. Once
         | that's done, the command should work as expected.
        
       | david2ndaccount wrote:
       | Despite being named initiative.sh, I can't find any commands to
       | help track initiative?
        
       ___________________________________________________________________
       (page generated 2021-11-04 23:01 UTC)