Coder Social home page Coder Social logo

ker0olos / fable Goto Github PK

View Code? Open in Web Editor NEW
30.0 3.0 25.0 115.35 MB

Fable is a free, open-source gacha bot — a powerful Mudae alternative

Home Page: https://fable.deno.dev/invite

License: MIT License

TypeScript 100.00%
discord typescript discord-bot discord-interactions serverless discord-slash-commands anime manga mudae waifus

fable's Introduction

Fable Logo

top.gg page

Discord Bot Invite Discord Server

GitHub Workflow Status codecov

Buy me a coffee

List of features and how Fable compares to other bots

100% FREE

100% FREE

No more users paying to get ahead of you.

Fable has no in-app purchases, no premiums, and no bullshit.



Animated Pulls

Animated Pulls

Build anticipation and excitement with animated gacha pulls.



Merging

Merge

Merge those 200 characters you have sitting in your inventory doing nothing to get 2 characters that you might actually like.



Stealing

Stealing

When all negotiations fail, taking what you want by force is fine, right? Steal characters from that one annoying server member that refuses to trade.



Community Packs

Community Packs

As easy as installing an app on your phone, add community-made character packs to your server, or create your own.



Fable compared to other bots
(Animated Pulls)
Animated Pulls

Fable is a free, open-source gacha bot — a great alternative to bots like Mudae, Sofi, Karuta. Like those bots, you can pull anime characters, customize, and upgrade them.

Unlike those bots, Fable is NOT a cash-grab scam, everything in Fable is free, no players can pay to get ahead.

Fable comes with a system where anyone can create new characters, or add characters that are missing from Fable. Then publish them for anyone else using Fable to install, wanna start creating your own pack? Visit https://packs.deno.dev


(Character Descriptions)
Searching

Get Started

  • /now, /tu: check what you can do right now
  • /gacha, /w: start a new gacha pull
  • /character, /char: search for a character
  • /search, /anime: search for an anime or manga
  • /help, /tuto: to learn about features and commands

Useful Links


FAQ

How can I limit Fable to 1 channel?

Go to Server Settings then Integrations then Fable
From there you can control the permissions globally or even per command.

Can I use prefixes like $ or @Fable?

No. Fable was built from the ground up to only support slash commands, prefixes are an entirely different thing that requires the bot to manually monitor all incoming messages in a server. We won't add prefixes to Fable, but you can go tell discord to add custom prefixes to "slash" commands instead of "/" for all bots.

How can I install a new pack on my server?

Check the most popular packs or create your own pack at https://packs.deno.dev

Manage Server permission is required to install packs on "your" server

How can I create a new pack?

It's very easy to create and update community packs, No coding required. Go to https://packs.deno.dev

How to uninstall a pack from my server?

Use /packs uninstall id: pack-id.

How are you keeping Fable free?

We use serverless since it's cheaper and easier to maintain. Fable been getting bigger and bigger recently and it's hard for me to keep paying the bill out of my own pocket.

If you love Fable and want to keep it running forever, consider donating just a single dollar, it will help a lot.

fable's People

Contributors

ellielikespasta avatar github-actions[bot] avatar ker0olos avatar luanalatte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fable's Issues

Stealing

Steal characters from other users.

It becomes easier to steal from inactive users and unmaintained characters.

A rough draft is: (base chance based on character rating [with 1* having a better success rate than 5*] + (a boost based on the inactive time of your opponent) + (the number of stars you are willing to pay to boost the rate capped at 50%?) + your steal skill proficiency) - your opponent anti-theft skill proficiency.

New players are not allowed to steal or be stolen from for 3 days

You get 3 attempts each week. You can't attempt to steal a character again until after 48 hours

installing community packs

Use GitHub URLs to install community packs on servers.

  • resolve GitHub URLs, download and retrieve manifest.json in the repo's root

  • validate manifest against the JSON schema

  • check for pack depends and conflicts

  • store manifest.json on the database (so that we don't require each manifest from GitHub individually which would take a long time).

  • track added packs so that we know how popular each pack is, (see #21)

    • active on n servers
    • first and last install timestamps

support additional instances per guild

The database schema already allows multiple instances per guild. What's left to implement is a system that takes channel ids and maps to instances, and a command to allow admins to assign channels to different instances.

Packs

Allow guilds to use custom repos packs to override and extend the builtin repos packs.

Design a system where guilds are allowed to modify/extend/override their gacha pool using git repos

We created @fable-community, it'll have (enabled by default) verified repos like a repo pack for vtubers.

Badges

Users can obtain limited rare badges. Badges are meant to be similar to discord badges, there will only be very few of them, they're useless, but you can show them off.

Demo application

create a website that allows new people to test the gacha command without having to add Fable to their server, use the same roll animation with a similar theme to the discord embeds

mudae migration

Mudae includes a command called haremcopy. It allows you to clone your harem,
to severs where Mudae is younger than 30 days.

While I don't plan on adding this exact feature to Fable anytime, I want to allow people to migrate from Mudae to Fable (on the same server), automatically to allow the user to migrate their harems from Mudae to Fable easily

Mass Pulling

Switching /pull to mass pull characters. Each call will pull 5 characters max.

I still love the pull animation but as I thought when I first made it. It gets old after a few tries.
/gacha will continue to be recommended and referenced as the main entry point.
/pull /q will be a way to get rid of your pulls quickly in bulks of 5s.

Server vs. Server

Warning Will be available only in vanilla game mode with the builtin packs and verified subset of community SFW packs.

All discord servers will fight in an all-out war to decide who wins and becomes the champion.

This event will occur on weekends and will span those two days (Saturday and Sunday).

Most of the details are already determined but will be added to GitHub shortly before development to avoid plagiarism.

This is a big feature that will take months to develop and test, and its arrival date is too far into the future.

Auto Battles

This is one of the foundations for adding PVE.

Establishing the main 3 stats, strength, stamina, and agility. How they interact and affect each other during active combat.

Establishing how party synergy is displayed and its effects.

Establishing the look and feel of all battle modes UI.

The players should be able to set their characters' stat points freely as they wish until PVE is implemented.

Compiled JSON Schema

We need to make a compiled JSON schema file available because referring to 'json/index.json' won't work for most validators. While we can work around that, I don't expect people to import each file individually.

pack webhooks

DRAFT

Like how builtin packs can register extra non-standard commands, they also should be able to register

VNDB pack

Visual Novels are a big part of anime. Adding them to the pool is a huge plus for us.

https://vndb.org is a great and mature database. The problem strifes from the fact that anime adapted from VNs (in the existing anilist pack) will end up clashing with VNs resulting in duplicates.

If we can reorganize this automatically and filter out one of the two. Supporting VNDB will be left to just figure out their API.

discord thread https://discord.com/channels/992416714497212518/1076040759251316736

Gallery

A place where people can browse popular packs

improve `/collection`

It can be very hard to get a general idea of all the characters you own since the only way to browse through your collection is one by one.

slow loading gacha

Gacha takes too long to create pools, this is due to the Anilist API which doesn't leave us a lot of breathing room, but there is room for improvements.

database schema

For this, we are using a MongoDB instance. We need to design a future-proof scheme that will allow cross-server activities but also sandbox each server and user.

Featured Art

While a lot of the base code is solid at the moment. One thing I would like to touch upon is the images. We are using the same format as anilist, naturally, I haven't altered it much to save processing power but it's inevitable. Anilist API script now recursively transforms all results.

We need a better schema for arts, we can feature arts from the community and help credit them and showcase their work.

We also should proxy all images through as so that we can make sure that they work and offer customization options. The proxy is already implemented, all that's left on this issue is the new schema and how will it be implemented.

Images are one of the most important core parts of Fable. So I will get on this issue as soon as possible.

Player vs. Environment (Battle Tower)

An infinitely randomly generated tower-based mode

  • A new seed will be generated for each server to ensure the floors are the same across players.

  • Bosses
    A boss will appear every 10 floors (e.g. 1-9 are normal floors. Floor 10 is boss. Floor 11 is easier than 10 but the difficulty will increase until the user reaches floor 15 which will be harder than floor 10 despite not being a boss).

  • Danger Rating
    Monsters will be ranked using a star-based system, from 1* to 5_?_* instead of levels
    That rating will be an estimate of the danger of the monster based on the monster's total stats. Monsters might have an uneven distribution of stats meaning they can be easily countered but still have high danger ratings due to the sum of their stats.

Pagination

Having more than 3 embeds on the same message is very aesthetically unpleasant.
And discord maxes embeds at 10 anyway.

Group Quests

Depends on #75

Creating quests that require players to group up and complete them together, ensuring these quests can only be completed with others will enforce social interaction.

using discord attachments

A few pull requests back, I added an image proxy that wraps all character/media images, so that we can edit/modify them before they reach the users.

The intent was to resize images to provide consistent UI and maybe later on the road integrate it into the gameplay (similar to how twitch lets users modify emotes using channel points).

But while working on implementing the resize logic right now, I was thinking of ways to fix #39 and came up with "what if we use discord attachments".

Attachments will allow us to avoid using a proxy URL directly there for fixing that file extension issue.

But it also allows us to serve the image once, to discord. And that's it. The current way it works at the moment is that each user in the guild will request the image thru us causing a lot of unnecessary load on our servers. But if we upload the images to attachments, discord becomes the host that will have to serve the image to each user, lowering the load on our server tremendously.

This doesn't come with no cons though, the upload size of images becomes attached to the guild boost tier, which means just 8 mbs for most guilds at the default tier;

But it's a small sacrifice we will have to make. Besides we will compress images before we upload them to discord. Chances are most people will never see the upload limit error, but there will be an upload limit, unfortunately.

View Characters

Add view characters button to media. Where you will be able to view all characters using the pagination api

Support all git repos

We only support adding packs from GitHub due to the lack of a Deno-compatible wasm port of libgit2. ker0olos/wasm-git#1 is being worked on for that goal until it's done. We'll continue to only be able to download repos from GitHub.

bad pack manifests

Make sure that badly configured manifests (e.g. characters?.new is an object instead of an array)
Don't break the code and make sure those errors are handled and reported properly

pack components

Like how builtin packs can register extra non-standard commands, they also should be able to respond to components if they registered them.

Note this is currently not required by any builtin pack so implementing should be a non-priority

Game Mode 2

A mix of Anigame / Waifugame / Mudae

A 5? 3? hours global /drop command
drops 5 characters with a first come first serve style

Each user can only claim one character every 5? 3? hours

That will be the only change from making this different from the vanilla game mode.

It's still undecided whether or not this will be allowed in SvS. Then it's a kind of self-imposed handicap on servers it most likely will be allowed.

More AniList Integrations

Add more anilist features to /anilist.

  • Authenticate users anilist accounts /anilist link

  • Print user's top anime

  • Print user's top manga

  • Print trending

Synthesis

Merging 1-4* characters to get specific grade pulls (e.g. Synthesizing five 1* characters gives a pull where you are guaranteed a 2* character)

hourly pulls

Changed in #62

a fixed hourly quota of pulls, each player gets let's say 5 pulls an hour, and players get to keep all of the characters they pull.
This a straight ripoff from mudae, though I highly doubt it was their own original idea, it's a very good spin on the typical energy bars you see in different ftp games, just tailored to fit gacha games and very effective at building a habit.
Once a player finds a character, said character cannot be pulled by any other player on the server. Players cannot pull duplicated characters.
It was decided during design that the timer won't be on a set interval but the timer only starts if and only if the player has 0 pulls, it's more of a dark pattern than mudae in which players are more pressured to come back exactly one hour each time or be behind other guild members since every second you have pulls in your account is a second you are not getting back.

view characters maxes out at 25 on anilist media

View Characters maxes out at 25 on anilist media.

Since we only get the first page of characters and anilist API max characters per page is 25

Note this only occurs in View Characters and does not affect character search or gacha pools, this can be considered as a purely visual bug

characters(sort: ${characterDefaultSort}) {

We have had a lot of issues with anilist pagination API throughout Fable, this is not a new issue. This is nearly impossible to fix efficiently since anilist just doesn't return the correct total number of characters in a media.

Better Animations

Animations
  • Unique loading animation themed for gacha pulls (portrait)
    context: the animation is played while the player is waiting for a new gacha pull to start

  • Unique loading animation themed for synthesis (landscape)
    context: the animation is played while the player is sacrificing 5 characters to get a new character

  • Unique loading animation themed for stealing (landscape)
    context: the animation is played while the player is waiting to know whether or not they succeded in stealing a character from another player

Requirements

primary: #feb500

portrait size: 230x325
landscape size: 450x190

Skill Points And Classes

Level 1 characters can fight up to level 5 enemies.

Starting from level 10 characters get to choose a class (swordman, archer, wizard. etc).
On level 50 characters get 2nd class advancement.
On level 100 characters get 3rd class advancement.

Unique classes can be achieved by certain hidden actions.

Unique classes are more powerful because they are more specialized than normal classes but require more experience to level up.

Characters gain exp by fighting monsters.

Classes come with a bunch of unique skills. As well as stats boost (10% boost to Hp, 5% boost to Mp, etc).

Stats are leveled separately from classes through stat points you get each time you level the characters.

Stat points can be used to increase specific stats (e.g. you can use 1 stat point to increase Mana by 1 or Agility by 1, but not both).

Monorepo Packs

Currently packs only support one single manifest.json file

But it will be helpful to a allow people to at least split long manifest
(it doesn't have to be multiple individual packs)

This can be achieved easily without major changes by merging the file pre-install, and also pre-validate

Think of it similar to how webpack and other tools bundle code.

Media Conflict

Character search shows the default media of the character;

But if the character exists (found in gacha by a user) their mediaId is saved to the database and no longer up to the pack's metadata, only search.ts ignores that mediaId metadata for performance sake since querying mediaId to resolve it and get its title is extra steps that will further slowdown the search.

This will cause an issue if a pack updates its data to change the character default media, there will be a conflict between the character media on the search and the character media on /collection and /party and anything else that query the character from the database and uses the response mediaId

Add more unit tests

Some parts of the code are still untested.

  • searching for media
  • searching for characters
  • searching for theme songs
  • searching for the next episode

Party

Parties are constructed of 5 characters and are required for the majority of vanilla gameplay.

Parties will consist of up to 5 members, you get synergy boosts when using a team that's from the same series.

Daily Quests

While rewarding the player it also works as a reminder of what the player can do each day (e.g. do 10 gacha pulls. climb 2 floors. upgrade 1 character.)

/now will act as a quest center where be able to see all your daily quests and their progress.

  • Convert the daily token on the first pull into a quest

automate missing relations

If a relation exists in a media but does not exist in a character or vica versa.
Create the missing relations automatically before installing.

Anilist max items per page

Anilist queries max at 50 items per page per query, resulting in limited pool numbers.

We need a way to work around this without querying each page individually. Caching the most requested results every time and giving the cache a short life would be the most common way of doing this.

But we can get away with querying for the page info getting back the number of available pages then querying for a single random page. The result would be in real-time and we wouldn't have to implement caching in a serverless environment

we need the lastPage number to get one random page from the search results

https://github.com/AniList/ApiV2-GraphQL-Docs/issues/159 page queries return invalid page data, the only reliable value is hasNextPage. And seems like they are not very interested in fixing it. A workaround for this, and only because all our queries are currently predictable, is to hardcode the last page number ourselves into each possible query.

So I'm coding a script that would manually run over each query using hasNextPage until it finds the last page and saves the page number. It will be a GitHub action cron job that will run each week and open a pull request if the results differ from the current ones in the repo.

Not ideal or anything but it's a much better solution than leaving this issue open.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.