aikaterna / gobcog Goto Github PK
View Code? Open in Web Editor NEWThis project forked from locastan/gobcog
RPG Adventure Cog for Red v3
This project forked from locastan/gobcog
RPG Adventure Cog for Red v3
The code max the item distribution proportional to the max roll, so luck is unaffected.
If you start opening a chest before combat resolves (e.g. while it's still calculating or just before), and finish after the conflict resolves, and chests rewarded by that combat will be lost:
https://i.imgur.com/MdlJNsA.png
I'd guess the looting function uses a stale count to update the player's chests, but I haven't taken the time to confirm this in the code.
Add an adventurestats
command or similar, with almost the same function as audio's [p]audiostats
. Basically, show current active adventures and corresponding servers with time to end.
This could be useful for bot restarts/cog reload without bothering anyone in active adventure.
Currently when you do [p]help backpack you see this output
But that help command for trading is wrong, cus then you do [p]backpack trade you see this output
Which is the proper syntax for trading an item between players. Just an opening the issue so that the help can be fixed to represent the proper order of the command
This happens once in a while and after this error occurs, bot keeps saying "There's already another adventure going on in this server." and new adventure only happens if I manually reload the cog.
Feb 04 01:55:40 ec2 redbot[22606]: [2020-02-04 01:55:40] [ERROR] red.cogs.adventure: Something went wrong controlling the game
Feb 04 01:55:40 ec2 redbot[22606]: Traceback (most recent call last):
Feb 04 01:55:40 ec2 redbot[22606]: File "/home/ubuntu/v3/v3/cogs/CogManager/cogs/adventure/adventure.py", line 3408, in _adventure
Feb 04 01:55:40 ec2 redbot[22606]: reward, participants = await self._simple(ctx, adventure_msg, challenge)
Feb 04 01:55:40 ec2 redbot[22606]: File "/home/ubuntu/v3/v3/cogs/CogManager/cogs/adventure/adventure.py", line 3531, in _simple
Feb 04 01:55:40 ec2 redbot[22606]: await self._choice(ctx, adventure_msg)
Feb 04 01:55:40 ec2 redbot[22606]: File "/home/ubuntu/v3/v3/cogs/CogManager/cogs/adventure/adventure.py", line 3649, in _choice
Feb 04 01:55:40 ec2 redbot[22606]: return await self._result(ctx, adventure_msg)
Feb 04 01:55:40 ec2 redbot[22606]: File "/home/ubuntu/v3/v3/cogs/CogManager/cogs/adventure/adventure.py", line 4147, in _result
Feb 04 01:55:40 ec2 redbot[22606]: text += await self._reward(
Feb 04 01:55:40 ec2 redbot[22606]: File "/home/ubuntu/v3/v3/cogs/CogManager/cogs/adventure/adventure.py", line 5397, in _reward
Feb 04 01:55:40 ec2 redbot[22606]: chest_type = types[special.index(1)]
Feb 04 01:55:40 ec2 redbot[22606]: IndexError: list index out of range
Fix:
if item.rarity == "forgeable":
into
if item.rarity == "forged":
Unequipping a 2h item makes 2 of the item appear in the backpack.
This Issue will be for new ideas and features to maybe add to the cog. Please leave comments here for ideas or suggestions. For issues with the code make a separate issue.
When using backpack sell and or sellall in dms the command errors out with the following traceback
Traceback (most recent call last):
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/kstjohn_kstj_us/.local/share/Red-DiscordBot/cogs/CogManager/cogs/adventure/adventure.py", line 478, in backpack_sell
await bank.deposit_credits(ctx.author, price)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/redbot/core/bank.py", line 303, in deposit_credits
return await set_balance(member, amount + bal)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/redbot/core/bank.py", line 199, in set_balance
max_bal = await get_max_balance(member.guild)
AttributeError: 'User' object has no attribute 'guild'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/redbot/core/commands/commands.py", line 570, in invoke
await super().invoke(ctx)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 1158, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/kstjohn_kstj_us/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'User' object has no attribute 'guild
If you use [p]unequip head, for example and you have nothing on in the head slot, it will throw an error:
Traceback (most recent call last):
File "/root/.local/share/catv3/lib/python3.7/site-packages/discord/ext/commands/core.py", line 63, in wrapped
ret = await coro(*args, **kwargs)
File "/root/.local/share/Red-DiscordBot/cogs/CogManager/cogs/adventure/adventure.py", line 2687, in unequip
await c._unequip_item(current_item)
File "/root/.local/share/Red-DiscordBot/cogs/CogManager/cogs/adventure/charsheet.py", line 570, in _unequip_item
if item.name in self.backpack:
AttributeError: 'NoneType' object has no attribute 'name'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/.local/share/catv3/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 860, in invoke
await ctx.command.invoke(ctx)
File "/root/.local/share/catv3/lib/python3.7/site-packages/discord/ext/commands/core.py", line 698, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/root/.local/share/catv3/lib/python3.7/site-packages/discord/ext/commands/core.py", line 72, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'name'
This happens because user's lock is acquired while sellall command sells all the items and session isn't removed before all characters are saved.
Reproduction:
Issue
This may be hugely misleading, as a player might for example expect their new one handed katana with 20 ATT to be more useful than their 2-handed greatsword showing as 15 ATT, while the actual stat the greatsword provides is 30 ATT when equipped.
Something to do with being rate limited I guess? Probably need to remove dupes when generating the results.
Todd Burgundy's prayer called upon the mighty Asian Andy to help you. (+60:dagger:/+0:speech_left:)
NitroDubbbz's prayers went unanswered.
Attack Party: | AnonymousChris: 🎲(18) +🗡️44 | | Not Lakey. 🔪: 🎲(6) +💥:anger_right:️15 +🗡️30 | | Todd Burgundy: 🎲(18) +💥:anger_right:️14 +🗡️50 | | NitroDubbbz: 🎲(9) +💥:anger_right:️12 +🗡️61 | | 😌 (Lil Humble): 🎲(17) +💥:anger_right:️12 +🗡️33 | | XXX: 🎲(6) +🗡️52 |
Add a goblin or some sort of random, interactive attack where people have to click a reaction or other interaction to defend their loot chests that they are holding onto, or some will be taken. Dissuades people from holding chests as a currency sink or other safeguard against currency being removed/players not being docked appropriate amounts of credits.
Due to str.lower()
check, its unable to unequip "Unnamed Artifact", which produced when name for artifact in forging is not set
Noticed a trend in not triggering pet bonus
when attacking. Granted it's rand/probability based, but sample size was enough to take notice.
I believe the issue is with this conditional of the check:
https://github.com/aikaterna/gobcog/blob/master/adventure/adventure.py#L3033
If your first/initial heroclass
is set to Ranger, the "ability" boolean is never accurately set to True, and said class has no methods that modify the boolean.
If you've swapped from another class, "ability" appears to be properly reset in the transition methods
As it stands, if a high luck character buys an item en masse from the trader and sells it right back, they make a profit off of it. Sometimes a major profit.
For each trader that comes along, a high luck character can end up multiplying their currency several times over. Sometimes to ridiculous levels.
There should be commands written for clearing a user's character and resetting them to zero, and also a command to take an item from a user.
Suggestion is to add command that will equip all possible best equipment with selected stat (ATT/CHA/INT/DEX/LUCK).
Because i too lazy to equip all things after loot one-by-one
The regex should be adjusted in the Stats class converter in the charsheet.py file to accept positive or negative numbers.
9b8e63e won't work for translated strings unless the len matches.
I noticed this with a few users who finally hit Rebirth 15. Then I tested it out for myself using devrebirth. Users rb15+ can no longer use the =adventure command when they reach that rebirth level. Doesn't trigger any errors in the bot too.
EDIT: I went back to default theme and it finally worked, though it pulled an Ascended monster (which I hadn't made yet for my custom theme).
If you equip an item that your pet finds, it disappears.
Traceback:
Exception in command 'forge'
Traceback (most recent call last):
File "/home/ubuntu/red-venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 63, in wrapped
ret = await coro(*args, **kwargs)
File "/home/ubuntu/red-data/cogs/CogManager/cogs/adventure/adventure.py", line 1228, in forge
if item.rarity == "forgeable":
AttributeError: 'NoneType' object has no attribute 'rarity'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/red-venv/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 860, in invoke
await ctx.command.invoke(ctx)
File "/home/ubuntu/red-venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 698, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/ubuntu/red-venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 72, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'rarity'
Would it be possible to make a sellall except item
and a sellall slot
command
sellall except item
so we could keep one item (like the miniboss weapon) in our backpacks without having to sell items one by one? Can get quite consuming when looting a bunch of chests
sellall slot
so we could just sell a particular item slot in our backpack?
Not sure how much work these would entail but thank you for considering! :)
Currently, if global bank is enabled, [p]give
acts like exploit for admins of guilds, as they can use [p]give funds
to acquire credits.
The class hall is back in town.
)heroclass <non-existing-class> info
withdraws money without doing anything:
[p]heroclass IDONTEXIST
Idontexist may be a class somewhere, but not on my watch.
, which makes sense[p]heroclass IDONTEXIST info
This will cost %amount%%currency%. Do you want to continue, %name%
%name%, you need to be at least level 10 to choose a class.
Normal user seems to able to run give item. I think it's the same for give loot
This one is normal user running give item
suspected lines
https://github.com/aikaterna/gobcog/blob/master/adventure/adventure.py#L1563
https://github.com/aikaterna/gobcog/blob/master/adventure/adventure.py#L1602
since then I have unloaded adventure
There should be a command or set of commands for adding entries into the json files for the theme you have selected permanently (I specify only because you can generate items but they are unique). I have over 200 people messing with this cog, and many submit new stuff for me to add to the theme all the time and it's a lot to constantly have to manually add this data.
(possibly with the ability to allow certain users via their ID to do this)
This would allow for rapid growth of custom themes, and also get people very involved with the bot. Just a thought...
Some have been changed already. Just adding this to be seen.
https://ptb.discordapp.com/channels/240154543684321280/240212783503900673/674739667567902741
When an adventure message is deleted the lock on the adventure is never lifted, so any subsequent adventure command just tells the users that there's already an existing adventure game.
So I've noticed that pets are extremely hard to tame, which I had attributed to the fact that were so many total and my charisma stat (still called diplomacy some places for whatever reason) was low.
Well I was testing this morning, with 211 charisma... Which according to the data json file for pets should be enough to tame more than half of the entire list of pets (almost) and still noticed I was failing to tame things such as a Desert Armadillo for example, which the json says requires 15 Cha.
This isn't making a whole lot of sense, am I missing something?
Line 2622 in fe71475
maybe be elif?
Allow [p]backpack
to specify certain slots for easier navigation of a lot of equipment.
For example [p]backpack head
will list only items that can be equipped in the head slot.
The cart (seems to) show up after a certain amount of time and a random check both pass on_message, however it sends with the message sent that triggers it. I propose a short asyncio.sleep() be added to not hide the message said or spam chat when someone just says something and to make the message seem a little more natural than it currently does.
Wouldn't it be better/make more sense to use strength instead of attack? It's a little confusing for new adventurers it seems. Not that hard to understand the more you play of course, but still. It's also not an attribute, while using charisma and intelligence for diplomacy and magic, also makes 'attack' a bit out of place IMO. str
would fit perfectly for this. I even see some trying to skill str(ength) instead of attack
sometimes.
Equipped both items of Badass Bop set, all of my item stats got Zeroed out.
If only equipping one part from the set, my other stats are normal:
Verified it happened with no other gear:
Looking at the Set item page, it looks like the Badass Bop set has a set bonus of all 0's, perhaps it is overwriting stats instead of adding those to existing?
"{Gear_Set:'Shiny Dragonplate Gauntlets'}": {"slot": ["gloves"], "set": "Badass Bop", "parts": 2, "cha": 1, "int": 4, "dex": 12, "luck": 1, "bonus": {"att": 0, "cha": 0, "int": 0, "dex": 0, "luck": 0, "statmult": 0, "xpmult": 0, "cpmult": 0}},
"{Gear_Set:'Shiny Dragonplate Sling'}": {"slot": ["left"], "set": "Badass Bop", "parts": 2, "att": 20, "dex": 8, "luck": -39, "bonus": {"att": 0, "cha": 0, "int": 0, "dex": 0, "luck": 0, "statmult": 0, "xpmult": 0, "cpmult": 0}}
With the update to the weapons, all the weapons which were previously set weapons have now changed into normal weapons.
So, for example, my {Gear_Set: Masterwork Ebony Wand} and {Gear_Set: Elven Mithril Dagger} have both been changed to normal items.
Sometimes the loot command while opening a box will cause the bot to "hang", it will still be responsive but the loot command will not show the output and the bot will continue typing. Running the loot command again will open the box as expected but the bot continues to type. Reloading the cog will not get rid of the typing indicator and the bot has to be restarted to make it go away.
From every game I've played within the rpg genre that has items of various quality-the names of the items mean something. While it's possible you meant it to be this way... Currently the names mean nothing.
Legendary: Godly cloth hat (0, 0, 0, 2 , 1)
Stuff like that. Monsters follow the same pattern as do pets.
The whole feel seems a bit rushed and the names just make it sound odd. I'll post screen shots following this.
I know that experience gain depends on many things like rebirths, stats etc.
But I don't think the xp-boost from ranger pets should be THAT high.
My friend just rebirthed and got 38000xp with a pet (with 36% bonus) from a fight where I (1 less rebirth, much higher stats, bard) got just 24000xp. I don't this that's normal...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.