@@ -6,18 +6,18 @@ provides this for new items so it is not something you have to give
...
@@ -6,18 +6,18 @@ provides this for new items so it is not something you have to give
- name - the name of the vanity item
- name - the name of the vanity item
- description - short explanation of what the vanity item looks like
- description - short explanation of what the vanity item looks like
- textureName - name of the sprite png (from above step, without “.png”)
- textureName - name of the sprite png (from above step, without “.png”)
- type - the type of vanity item (eyes, hat, shirt, etc., all types can be found in VanityType.java)
- type - the type of vanity item (eyes, hat, shirt, etc., all types can be found in [VanityType.java](https://gitlab.engr.ship.edu/merlin/freshmanrpgsuite/-/blob/main/FreshmanRPG/GameShared/src/main/java/datatypes/VanityType.java))
3. For use with testing, this information can be added to VanityForTest.java, and when the database is rebuilt it will be added to the VanityItems table on the database.
3. For use with testing, this information can be added to [VanityForTest.java](https://gitlab.engr.ship.edu/merlin/freshmanrpgsuite/-/blob/main/FreshmanRPG/GameShared/src/main/java/datatypes/VanityForTest.java), and when the database is rebuilt it will be added to the VanityItems table on the database.
## Extras
## Extras
### Add vanity item as a default
### Add vanity item as a default
1. The default table represents vanity items that are included in every player’s inventory. It just consists of a list of vanity ID’s of the items that should be included as default.
1. The default table represents vanity items that are included in every player’s inventory. It just consists of a list of vanity ID’s of the items that should be included as default.
1. To add a new default item, add the ID to DefaultItemsForTest.java, and when the database is rebuilt, it will be located in the DefaultItems table.
1. To add a new default item, add the ID to [DefaultItemsForTest.java](https://gitlab.engr.ship.edu/merlin/freshmanrpgsuite/-/blob/main/FreshmanRPG/GameShared/src/main/java/datatypes/DefaultItemsForTest.java), and when the database is rebuilt, it will be located in the DefaultItems table.
### Add vanity item to the shop
### Add vanity item to the shop
1. Add the items price to the items creation line of code in VanityForTest.java
1. Add the items price to the items creation line of code in [VanityForTest.java](https://gitlab.engr.ship.edu/merlin/freshmanrpgsuite/-/blob/main/FreshmanRPG/GameShared/src/main/java/datatypes/VanityForTest.java)
1. The shop table is created from the items table so it does not have to be explicitly added by someone here.
1. The shop table is created from the items table so it does not have to be explicitly added by someone here.
### Add vanity item to a players inventory
### Add vanity item to a players inventory
1. The inventory table consists of a player ID, a vanity ID, and a flag for if they are currently wearing that item.
1. The inventory table consists of a player ID, a vanity ID, and a flag for if they are currently wearing that item.
1. To add an item to a player’s inventory, add the ID of the player who is going to own the item, the ID of the vanity item they should own, and a 1 if they are wearing it or 0 if they are not to PlayerOwnsVanityForTest.java, and once the database is rebuilt, it will be located in the VanityInventory table.
1. To add an item to a player’s inventory, add the ID of the player who is going to own the item, the ID of the vanity item they should own, and a 1 if they are wearing it or 0 if they are not to [PlayerOwnsVanityForTest.java](https://gitlab.engr.ship.edu/merlin/freshmanrpgsuite/-/blob/main/FreshmanRPG/GameShared/src/main/java/datatypes/PlayerOwnsVanityForTest.java), and once the database is rebuilt, it will be located in the VanityInventory table.