Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couple of problems with challenges #27

Closed
6 of 8 tasks
Kryniowesegryderiusz opened this issue Nov 8, 2018 · 23 comments
Closed
6 of 8 tasks

Couple of problems with challenges #27

Kryniowesegryderiusz opened this issue Nov 8, 2018 · 23 comments
Assignees

Comments

@Kryniowesegryderiusz
Copy link

Kryniowesegryderiusz commented Nov 8, 2018

Hi,
I have a couple of problems with challenges:

  • type: island Does not recognise paintings on walls
  • type: island Does not recognise armour stands. All mobs and players are working
  • type: inventory It does not recognise FIREWORK_ROCKET if made by crafting not taked from eq - still says that item is missing
  • type: inventory does not recognise WRITTEN_BOOK - still says that item is missing
  • type: inventory does not recognise ENCHANTED_BOOK- still says that item is missing
  • type: inventory does not recognise FILLED_MAP- still says that item is missing
  • type: inventory does not recognise POTION anymore
  • type: inventory cant set nbttags of items - i know that is feature request, but i think it can be with all of these things

Server Information:

[Please complete the following information:]

Database being used (Flat file, MySQL, Mongo): MySQL
OS: Ubuntu
Java Version: 8
BentoBox version: 0.14.0
Addons installed?
BSkyBLock 0.5.0
WelcomeWarps 0.1.0
Level 0.1.0
Challenges 0.0.3

@tastybento tastybento added the bug label Nov 12, 2018
@tastybento
Copy link
Member

I have a plan to be able to enable editing of challenges in-game, which will enable precise types of items to be specified, but I need to wait until I get a long holiday so I can focus on it! Maybe in a couple of weeks when I'm on Thanksgiving vacation.

@Kryniowesegryderiusz
Copy link
Author

Okay, but what about level challenges or armor stands?

@tastybento
Copy link
Member

Armor stands and paintings are actually entities, so you need to put them in the required entities section of the challenge after importing it. The "real" challenges are stored in the database/Challenges folder. So, like this.

# Any entities that must be in the area for SURROUNDING type challenges. Map EntityType, Number
requiredEntities:
  ENDERMAN: 1
  PAINTING: 1
  ARMOR_STAND: 1

@Kryniowesegryderiusz
Copy link
Author

If i would change that files in database, how can i reload it ingame? Is it possible or have I to restart the server?

@tastybento
Copy link
Member

You have to stop, edit and restart for now. Ultimately, there will be in-game management tools.

@Kryniowesegryderiusz
Copy link
Author

Is it possible to add /bsb challenges reload besides ingame management? It is often easier to change it in files

@tastybento
Copy link
Member

By the way - the issue with FIREWORK_ROCKET, ENCHANTED_BOOK, WRITTEN_BOOK, POTION and FILLED_MAP are that the items are not exactly the same (meta data is different), so the matching does not work yet. For these, I can make it generic for now.

Let me look at a reload and see if it's possible.

@Kryniowesegryderiusz
Copy link
Author

It would be good if they would be generic. Especially FILLED_MAP, written book and firework. I think that they all could stay like that

@tastybento tastybento self-assigned this Nov 12, 2018
tastybento added a commit that referenced this issue Nov 12, 2018
FIREWORK_ROCKET, ENCHANTED_BOOK, WRITTEN_BOOK and FILLED_MAP will be
checked generically instead of specifically because meta data can be
different when created each time.

#27
tastybento added a commit that referenced this issue Nov 12, 2018
This reloads from the database files so admins can edit the challenges
and then reload them without restarting the server.

#27
@Kryniowesegryderiusz
Copy link
Author

Kryniowesegryderiusz commented Nov 12, 2018

There is a problem with generic filled_map. Its not taked from inventory and challenge is not beeing completed, but it takes all other required items. And other items are taked for multiplicity of items in config. Ex if there is 16 soulsand it would take 16, 32, 48 etc, like some looping

@tastybento
Copy link
Member

Okay, thanks. I'll test it more later.

@Kryniowesegryderiusz
Copy link
Author

Kryniowesegryderiusz commented Nov 12, 2018

Little update. This problem is not if you have filled map in eq, but if you havent.

EDIT: It doesnt matter. It takes a few items despite the generic item is in hand or not

@Kryniowesegryderiusz
Copy link
Author

With armorstands the problem is that they are added to requiredblocks and requiredentities while importing and it should be only in required entities

@tastybento
Copy link
Member

This problem is not if you have filled map in eq, but if you havent

What does "eq" mean?

@Kryniowesegryderiusz
Copy link
Author

equipement, inventory

@Kryniowesegryderiusz
Copy link
Author

From latest version I have problems with some challenges, that they are taking items and not completing.

Ex.

deployed: true
# Name of the icon and challenge. May include color codes. Single line.
friendlyName: Ogrodnik
# Description of the challenge. Will become the lore on the icon. Can include & color codes. String List.
description:
- Zbierz stack nasion
- arbuza, dyni i zboza
# The icon in the GUI for this challenge. ItemStack.
icon:
  ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: PUMPKIN_SEEDS
# Icon slot where this challenge should be placed. 0 to 49. A negative value means any slot
slot: -1
# Challenge level. Default is Free
level: Nowicjusz
# Challenge type can be ICON, INVENTORY, LEVEL or SURROUNDING.
challengeType: INVENTORY
# World where this challenge operates. List only overworld. Nether and end are automatically covered.
world: SkyBlock
# List of environments where this challenge will occur: NETHER, NORMAL, THE_END. Leave blank for all.
environment: []
# The required permissions to see this challenge. String list.
reqPerms: []
# The number of blocks around the player to search for items on an island
searchRadius: 10
# If true, the challenge will disappear from the GUI when completed
removeWhenCompleted: false
# Take the required items from the player
takeItems: true
# Take the money from the player
takeMoney: false
# This is a map of the blocks required in a SURROUNDING challenge. Material, Integer
requiredBlocks: {}
# The items that must be in the inventory to complete the challenge. ItemStack List.
requiredItems:
- ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: MELON_SEEDS
  amount: 64
- ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: PUMPKIN_SEEDS
  amount: 64
- ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: WHEAT_SEEDS
  amount: 64
# Any entities that must be in the area for SURROUNDING type challenges. Map EntityType, Number
requiredEntities: {}
# Required experience
reqExp: 0
# Required island level for this challenge. Only works if Level Addon is being used.
reqIslandlevel: 0
# Required money
reqMoney: 0
# List of items the player will receive first time. ItemStack List.
rewardItems:
- ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: DIRT
  amount: 5
- ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: VINE
  amount: 20
# If this is blank, the reward text will be auto-generated, otherwise this will be used.
rewardText: 5 blokow ziemi i 20 pnacz
# Experience point reward
rewardExp: 30
# Money reward
rewardMoney: 100
# Commands to run when the player completes the challenge for the first time. String List
rewardCommands:
- cmi money give [player] 100
# True if the challenge is repeatable
repeatable: false
# Maximum number of times the challenge can be repeated
maxTimes: 0
# Repeat exp award
repeatExpReward: 10
# Reward items for repeating the challenge. List of ItemStacks.
repeatItemReward:
- ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: DIRT
  amount: 2
- ==: org.bukkit.inventory.ItemStack
  v: 1628
  type: VINE
  amount: 20
# Repeat money award
repeatMoneyReward: 0
# Commands to run when challenge is repeated. String List.
repeatRewardCommands: []
# Description of the repeat rewards. If blank, it will be autogenerated.
repeatRewardText: 2 dirt blocks and 5 vines
# Unique name of the challenge
uniqueId: SkyBlock_nowicjusz_seedbank

@Kryniowesegryderiusz
Copy link
Author

@tastybento The problem might be when you dont have equal number of items - too much or not enough

@Kryniowesegryderiusz
Copy link
Author

@tastybento Im sorry for bothering you, but this is quite a serious problem :/

@Poslovitch
Copy link
Member

You're not bothering anyone, no worries. We're very busy at work/school, so that's why it takes time to fix bugs, etc.

@tastybento
Copy link
Member

@Kryniowesegryderiusz I was at work. I'll have a look at this over the next few days.

tastybento added a commit that referenced this issue Nov 19, 2018
#27

Also added admin challenge reset command.
@tastybento
Copy link
Member

@Kryniowesegryderiusz Should be fixed now. Please test.

@Kryniowesegryderiusz
Copy link
Author

@tastybento Now it takes all items that type from inv.

Ex. Paper maker needs 21 papers, if you have 32 it takes it all

tastybento added a commit that referenced this issue Nov 19, 2018
@tastybento
Copy link
Member

Sorry. I fixed and added test cases to check functionality. It should work correctly now.

@tastybento
Copy link
Member

Wow, this is still not working. I'll fix now. The issue is that I'm taking items twice, which is not caught by the test cases because it doesn't actually use the Bukkit API.

tastybento added a commit that referenced this issue Nov 23, 2018
Also saves player data after player completes a challenge or the
challenge is reset. Now reloading challenges doesn't cause challenge
completion loss.

#27
#30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants