RPGlib Changelog


Can you imagine her as a DM? She would probably hold grudges.

On one of my pages for a previous project, I wrote about my progress in developing my IRC bot named “Yula”. At the time, I would frequently visit IRC and enjoy coding new features for others to entertain themselves with. However, I stopped visiting IRC around 2013 as the channel I would spend time in began to stagnate with fewer and fewer people logging in. Lately, I have noticed the popularity of the Discord platform growing and was intrigued by their protocol’s allowance for “bot” accounts. When I noticed that some of my old IRC buddies began to frequent various Discord servers, I ended up creating an account as well and soon began to ponder whether I could port Yula to work with Discord.

Yula was built from the ground up in C# to communicate with the IRC protocol by the means of sockets. This was possible after years of playing with the well-documented IRC protocol and figuring out the best way to structure a bot around it. Given that I do not have this experience with the Discord protocol (which is complicated by the fact that it is closed-source), I opted to utilize one of the many available unofficial APIs to develop with until I am familiar enough to write something from scratch. In early December 2016, I created a rudimentary Discord bot named “Fiona“.

One of Yula’s more memorable functions was her ability to turn the chat room into an interactive MUD-style RPG, complete with a monster spawning system, a looting/inventory system, and the newly implemented ability to travel to different maps. Given that Yula was designed in a very modular way to allow for “plugins” to provide new functionality, I began to wonder whether Yula’s “RPG.dll” plugin could be rewritten to work with Fiona; as it was, the plugin was heavily designed around the workings of IRC. I am quite happy with the solution I ultimately came up with — instead of rewriting the code to be Discord-specific, I ended up converting the RPG system into an external library that can be implemented by the means of a wrapper that passes relevant protocol events to the library. The newly termed “RPGlib” is now its own separate project and can be used by Yula, Fiona, or any other chat-based bot in the future.

To better organize development progress regarding Fiona’s implementation of RPGlib, I have created this page. Please feel free to join us at the Discord server here <currently invite-only> to try out the RPG system and please feel free to add suggestions in the comments! If they are here, I am less likely to forget good ideas!



As with all of my bots, I tend to select a character as their “personification” and give them “personality” accordingly. Currently, Fiona is modeled after Vanilla from the Nekopara series. The features implemented as a result of RPGlib are confined to an #rpg channel on the server, while other commands/interactions are available in all server channels.

  • Can be implemented by any C# project with optional protocol-specific features (e.g., Discord bots may have the option to play sound effects in the future)
  • Able to load/save player data
  • Leveling up system with the ability to learn skills
  • Race system with the ability to affect character stats and learned skills
  • Monster and Boss spawning system with customizable AI
  • Looting, Inventory, Item, and Equip systems
  • Ability to explore maps and travel to new areas
  • Functional NPC dialogues


RPGlib Changelog:

13 June 2017:   Shopkeepers will now slowly destock player-sold items over time. Upon defeating an enemy, the gained experience is now expressed as a percentage rather a raw number. Created method to access individual player stats for wrapper classes. Made minor edits to strings used in level-up events. (v3.06)

11 June 2017:   Dropped deprecated feature that used to allow players to passively gain experience by conversing in the channel. Tweaked instantiation method to allow for better configuration when implementing RPGlib. Reordered the manner in which targets are prioritized — if both a player and a mob have the same name, the mob will be targeted. (v3.02)

09 April 2017:   Significantly restructured RPGlib to make it more flexible for use with various implementations. Cleaned up code in order to make it more efficient. (v3.01)

05 February 2017:   Rebalanced monster stats using player feedback. Fixed a minor bug where shop NPCs got confused by items that were obtained before the database set specific prices for each item. (v2.98)

01 February 2017:   Changed the way monster stats are calculated. Changed the way strings are handled for monsters to make it easier to make custom skill strings. Fixed improper AI entries that prevented monsters from casting buffs. Fixed a bug where monster AIs were improperly calculating the odds of a skill successfully casting. (v2.95)

30 January 2017:   Rewrote code pertaining to player movement; certain NPCs can trigger events when players enter their maps. NPCs have the ability to check what players have equipped. Fixed a minor mistake in the character movement strings. Fixed a minor mistake in the equipment strings. (v2.91)

27 January 2017:   NPCs now have the capability to change player spawn points. Added the ability for players to sell items to shops run by NPCs. NPCs can now restock their shops over time. Fixed a bug where items would sometimes improperly stack. Fixed a bug where NPCs would not show the prices of certain items in shops. Changed the way NPCs manage their shop inventories so that custom prices can be set for each item being sold. (v2.88)

22 January 2017:   Added the capability for NPCs to have shop inventories that players can interact with — players can now buy items from merchants. Added a check to the message buffer to ensure that the buffer is properly emptied between messages in order to prevent message desynchronization. Rewrote a chunk of the monster spawning routine to properly handle multiple spawned monsters with the same ID. Changed how respawn cooldowns are tracked after death; cooldowns no longer mysteriously reset when monsters spawn. Players are no longer erroneously prohibited from attacking themselves inside towns. (v2.82)

14 January 2017:   Created a new item type that allows for the summoning of monsters. Added the capability for monsters to use items. Added the capability for monsters to call for help and spawn additional monsters. Fixed a bug where monster AIs were improperly calculating the odds of a skill successfully casting. Modified default spawn times and timeout before freezing spawns due to inactivity. Changed the formula to calculate penalties and bonuses due to level differences in battles. (v2.76)

08 January 2017:   Completely rewrote spawn system to support multiple maps; the old code predated the map system and was centered on randomly spawning level-appropriate mobs (determined by the average level of online players) for the entire channel. Maps now have independent spawn rates, boss chances, and spawn lists. Spawn timers will now freeze when channel activity is absent, rather than reset. Notifications to encourage exploration are no longer sent if there are no players on field maps. Console window now specifies where monsters spawn. Nerfed default monsters stats. Fixed a bug where certain accessories may have their effects improperly nullified after equipping a new accessory. (v2.71)

05 January 2017:   Added the ability for NPCs to trade items with players, including the ability to define actions on trade success or failure. Infrastructure was added for NPCs to track conditional events for each player. Corrected a bug where messages were duplicated when attempting to receive an item when their inventory is full. Corrected a bug where random values may not change seeds when attacking. (v2.68)

04 January 2017:   Added the ability for NPCs to give items to players. Changed the way players are tracked across maps to differentiate whether they are alive or dead. The !look command was completely rewritten to account for this change and is also now free from grammatical errors when listing players. Added enumerator for PvP-only maps (as opposed to normal field maps where there is both PvP and PvM). PvP is no longer permitted in towns. Added an easy multiplier for exp rates. Fixed various strings pertaining to skill descriptions and effects. (v2.63)

30 December 2016:   Added support for NPC dialogues and player responses. In order to do this, support was in turn added to the Line Processor for messages that are sent directly to the bot. NPCs are able to support responses to a variety of different dialogue trees based on specified response IDs. NPCs were designed to stop expecting dialogue responses once the player leaves the map. !greet command is added and map strings have been changed accordingly to provide hints to its use. The ability to !greet NPCs by their proper names was also added. The character information screen now correctly lists level 1 players as having an <Unknown Race> as opposed to erroneously listing them as a “Human.” Using !move now consumes 1 stamina point. A new field map has been added. (v2.57)

28 December 2016:   Maps now have different descriptions depending on whether the !look command is used or if the player is simply entering the map with !move. The !look command now has an allowance to list the players that are currently on the map, depending on how the map is configured. The player list was also made to be hidden in the event that the user is the only player on the map. (v2.51)

24 December 2016:   Corrected a massive save bug that would corrupt save files after battling spawned monsters. Fixed a bug with the spawn routine where the idle timer would not reset correctly, depending on the channel being used. Removed redundant player damage routine. Altered actor classes to use proper clean-up methods. (v2.49)

20 December 2016:   Changed the way channels are monitored. There is now an option to specify a “main” channel where RPG events occur as well as secondary channels where players can converse and use minor commands including as !bag, !char, !equip, !desc, and !help. All channels are taken into account when determining whether the system should enter idle-mode. (v2.46)

10 December 2016:   The RPG system has officially been written to be invoked as an external library rather than a protocol-specific Object. Load/Save system was rewritten to remove redundant code. Line Processor was rewritten to better handle messages from different protocols. Fixed broken strings to correctly state which map spawned a monster. Rewrote the way time-based notifications are handled (e.g., when buffs wear off). The “Weakness” de-buff on respawn now correctly notifies you when it wears off. Fixed a bug where the “Weakness” de-buff would attempt to load missing strings under certain circumstances. Minor cosmetic changes to indicate in console that the library has been loaded. (v2.45)

Previous entries to this library’s changelog can be found on this page before it was branched off to become a separate project


  1. balance
    Rooftop Dreamer
    Class 1-B
    Seat no. 6
    Valid from: 02/18/2017 at 5:14 pm

    An idea for a mob that I’ve mentioned once before: Ragekan.

    This would definitely require a bit of new coding on your end, but I think it’d lead to some interesting ways of exploring the game. I have some ideas on how to spawn ragekan.

    1. When a cheekan spawns, the killing move must be done while torch has been thrown onto the mob. When “killed”, Ragekan is spawned.

    2. You must go to a specific location to find “medical records”. Once retrieved, when the string “!item medicalrecords” is used, the player summons ragekan much like how Sanic is summoned with weed.

    3. Kind of combining the first two, instead of throwing a torch onto cheekan, have “medical records” be some kind of mob instead (making it more relevant as that would indeed make cheekan rage hardcore).

    4. Add fireplace map and make it so “!throw medicalrecords firepit” would summon ragekan.


  2. Cybolt
    Shy Bibliophile
    Class 4-E
    Seat no. 7
    Valid from: 02/14/2017 at 1:47 am


    Just wanted to post some of the bugs that I have encountered:

    1. Magica skill seems to be bugged.
    The description is – magica: Uses 25% of your HP to increase MaxMana by 50% for 2 minutes.
    Actually using the skill reads: Cybolt casts Magica on themselves. MaxHP increased by 25%!
    The skill actually just increases maxHP.

    2. Gelati and negative attack?
    Since the item gelati can lower attack, there was at least one instance where a monster seemed to do negative damage.

    3. Cura effect might need rewording
    When casting the effect on another individual, the description reads, “Cybolt casts Cura on [player]. HP healing by 1% Cybolt’s MaxHP every second!”
    The way it is worded, it still sounds like the caster is being healed. Maybe something like “Cybolt casts Cura on [player]. [Player]’s HP began healing by [1% Cybolt’s MaxHP (actual value here)] every second!”?

    Those are some of the ones that I have seen for the time being. If I see any more, I will be sure to post them!


  3. Fen
    Shy Bibliophile
    Class 4-A
    Seat no. 8

    Respawn timer resets?? Don’t remember why. Maybe it’s linked to everyone’s death.

    Something about being allowed to kill yourself. I thought that was what yolo skill is for

    The “if you summon multiple sanics on different maps you won’t be able to move after they’re gone” is still present


    • Nightmaren
      Student Council
      会長 | Class 4-B
      Seat no. 1
      Valid from: 01/18/2017 at 7:56 pm

      Thank you! I have fixed all of these issues in the latest build.


  4. Transfer Student
    Class 4-A
    Valid from: 01/10/2017 at 4:57 pm

    The Emoji mob I mentioned and the mob that hates emojis in people’s name. If it misses it’ll just complain about how so and so is using emojis in their name?


  5. Blackygritte
    Transfer Student
    Class 2-B
    Valid from: 01/10/2017 at 2:43 pm

    have the confusing blackygritte @lightningsabre and lightningsabre @blackygritte as schizoprenic boss or duo :P

    not sure what is possible in the engine but maybe it’s possible to have fiona spawn higher lvl mobs when higher level people are online and lower level when only low level people are on or maybe just increase the odds of one or the other.


    • Nightmaren
      Student Council
      会長 | Class 4-B
      Seat no. 1

      The request for the boss has been fulfilled in the latest build. Great idea by the way — it was something that was not possible with how limited the AI engine was in the past.

      I will keep your second suggestion in mind — now that maps support custom spawn lists, this may or may not be necessary. I will keep watching the test channel!


  6. Akiha
    Transfer Student
    Class 3-D
    Valid from: 12/29/2016 at 4:33 am

    mentions for whenever someone is being attacked?

    — Have Fiona tag an @here whenever monsters spawn, die, or leave
    — Have Fiona tag a person with their handle when they’re being attacked
    EG Trashlance hits @Fen dealing 1 point of damage
    EG2 Fen hits @Balance I mean Trashlance dealing 1 point of damage


    • Nightmaren
      Student Council
      会長 | Class 4-B
      Seat no. 1
      Valid from: 12/29/2016 at 9:18 pm

      Thank you for the suggestions! I have made the requested changes except for an @here mention when monsters die or leave. (I just think it would be redundant if there is already a notification about the monster spawning). I will reassess as more maps/content are added.

      For those curious about the technical specifics, I handled this at the implementation-level of RPGlib, not within RPGlib itself. This is why you will not see these features added in the main changelog.


  7. Fen
    Shy Bibliophile
    Class 4-A
    Seat no. 8

    1) have two channels, one for player to player talk, another for the command inputs
    2) have an option to add custom dialog (likely for between players only) that can add to the story
    3) maybe, regarding the custom dialog, have it linked from the command channel to the relevant part of the chatter channel that sparked whatever happens

    3rd option I’m just thinking like if A (playfully) insulted B in the chatter channel, B’s character in game could maybe decide to not help A’s character when A gets eaten by a slime or something, and B’s character could say something like “i swear i know you from a past life and you insulted my pajamas” (or something), and since it links to that part of the convo, A would know why they were suddenly left to die

    of course stuff like this could be troublesome to manage for a gm like say if A and B were to start cussing at each other all over the place. or they could keep it to killing each other at every turn ingame. it really dpeends on the people. spam detection would probably help in this case.

    but other than that the whole custom dialog thing would sorta mimic the environment in say a tabletop rpg is basically what i’m thinking. but rather than the players being in a party everyone’s out for themselves unless they choose to.

    still trying to wrap my head around it but that’s sorta what I’m thinking?


Leave a Comment

Hi there! Are you the new transfer student? You should probably register at the faculty office first so you can get an ID. Maybe we'll be in the same class!