#1
|
||||
|
||||
Item 'Rarity' Column
I'd like to add a column to the item table in the database, and make sure its included properly in places like class_item.php, so it can be rendered in shop and inventory pages. It also needs to be included in the admin back end when an item is created.
So~ just how many pages will I need to be editing/how painful is this going to be? Should I just basically be imitating how categories are done? The rarity will initially be used as a visual indicator of how potent or costly the item is. Later, when I make a system that will dispense random items from a specific category, the rarity will determine the percent chance you will end up having that random item dispensed. - In phpMyAdmin, I already added the column to the database with - Code:
ALTER TABLE `adopts_items` ADD `rarity` VARCHAR(40) NOT NULL DEFAULT 'common' ; - OK NVM. Apparently that was literally all I needed to do. I can already use {$item->rarity}. For example, in inventoryview.php, all I had to do was add rarity to the headers - PHP Code:
PHP Code:
SO all I have left to do is make it so I can add the rarity on the admin end during item creation...
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 11-08-2014 at 04:26 PM. |
Tags |
items, rarity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mys v1.3.4 Item Shop Mod(s): NPC + Item Display + Tooltips | Kyttias | Mys v1.3.x Mods | 55 | 06-19-2020 11:21 AM |
Edit rarity code for 1.3.2 to the 1.3.3 script | kristhasirah | Questions and Supports | 5 | 04-22-2015 11:36 AM |
A 2-column table? | Quillink | Suggestions and Feature Requests | 8 | 09-23-2010 02:26 PM |
Adding a column to owned_adoptables? | Tkrules | Questions and Supports | 1 | 01-22-2010 10:02 PM |
What's New? |
What's Hot? |
What's Popular? |