Sim Posted May 24, 2020 Share Posted May 24, 2020 (edited) See, I know I mentioned a new item system, so here's some previews as well as a complete list of what my plan is on this new item/inventory system. The hardest part of the item system is done for the most part. The relationships between item types and slots since multiplier selections can be selected at once. Updating was a pain in the DB. Item Types: (Finished) You can create item types based on the 3 basic item types I have created thus far. Weapon, Armour, health (like health potion). More can be added from a itemType class file once I can think of a design for them. Item Slots(not required)(Finished) This is for people who wish to allow multiple items of the same type. Say equiping a left handed weapon, right handed weapon, headgear, best, ect. Instead of the basic one armour and on weapon. For ease, you can add item Slots from item types and vice versa. Items (Finished) I have not started this page yet. But it's fairly basic, image, price , value(strength, defense, ect.) and choose item type. If the item type needs more fields for creation in the class files I will be setting it up where it can be done. Inventory (Finished) Your basic inventory. Will show which items to own. Also your equiped items. Items that are non-equipable can be 'consumed or used'. Health or item boost. "Item Packages/Item Groups" (Scrapped) This will be used to create multiple items in one item. Ex: a briefcase, you open it and get 3items. Or a safe: you open it and get 6items. I decided to turn this into an item type as it saves code, and will be a create example for people on how to make other item types. Gift Items (Completed) This will allow players to send other players items. Shop(Finished) Your basic shop, will have categories and items for sale and can choose location of shops. User Shops(Finished) Allows players to add items from there inventory to there own shop. I suppose to could say it's very similar to the black market except all items are not in one place. Users can view all items for sale by a specific item. Black market(Finished) All user items for sale. May also include a place on user profiles showing items they have for sale. Trade Zone(Not Started) Players can select what items they would like to trade and other players can select items back in a trade deal where the original player can accept or decline. Edited June 8, 2020 by Sim Updated Progress 2 Quote Link to comment Share on other sites More sharing options...
Spydre452 Posted May 25, 2020 Share Posted May 25, 2020 Looks good Sim 1 Quote Link to comment Share on other sites More sharing options...
ags_cs4 Posted May 25, 2020 Share Posted May 25, 2020 @Sim are you in any way have access to my trello todolist??? xD 1 Quote Link to comment Share on other sites More sharing options...
Sim Posted May 25, 2020 Author Share Posted May 25, 2020 LoL.. no, but I have access to our private messages. Nah. J/K.. this is a lot of the stuff I had coded for oRPG Creator. Maybe we should just team up? I know yo can design 🙂 And when I code something I make sure it's not half ass. If yo leave any features out, yo have to go back and redesign it most likely. Might as well do it right the first time. My first few mods was buggy upon release. Not anymore. Coding is like riding a bike. LoL Also, the way GL is. Isn't there anyway to include a real fight system. 1 Quote Link to comment Share on other sites More sharing options...
ags_cs4 Posted May 25, 2020 Share Posted May 25, 2020 😄 missed GL engine been working with a client for his theses , havent touch GL in a week or more, didnt finish the trading system, nor my inv system 😞 wish i get back to my own work fast Quote Link to comment Share on other sites More sharing options...
Sim Posted May 25, 2020 Author Share Posted May 25, 2020 I got the class files done for two "Main Item Types". Just to lay the foundation down to mark the features done that's already started. When creating a item type it will inherit the properties from the main type choose. Weapon/Armours add bonus to attacks and defense. HealthBonus will be next easy main easy item to create. Then certain item boost types will be created. If anyone got any suggestions for item types, reply. I decided to use in interface instead of main class interface ItemType { public function __construct($data = array()); public function getID(); public function getValue(); public function getName(); public function getPrice(); //return results or msg or whatevee you like, if type different from weapon, armour. public function useIT(); } <?php class Weapon implements ItemType{ public $desc = "increases attack power"; public $itemType = "Weapon"; public $itemID = null; public $name = null; public $value = 0; public $price = 0; //pass any data needed for item type to be used. public function __construct($data = array()) { $this->itemID = $data['id']; $this->name = $data['name']; $this->value = $data['value']; $this->price = $data['price']; } public function getID(){ return $this->itemID; } public function getValue(){ return $this->value; } public function getName(){ return $this->name; } public function getPrice(){ } //returns value. public function useIT(){ //was testing to see if could access properties global $db, $user; $user = new user(1, false); $user->set("US_money", $user->user->info->US_money + 10000); return $this->value; } } Items should be as simple as when pulling from DB. //Creating any item $item = new $rec->parentName($rec->data); //Def/attack $value .= $item->getValue(); //Or if want to return value in iseIt $value .= $item->useIt(); //Or action items, refill Health, action points, revive, ECT. $item->useIt(); Edit: easier reading Edit: and yes still coding on phone 🙂 Anyone got a image class they can recommend for resizing images? Other then that, the items are done now. Yo can choose default image size to save the few seconds of adding it to the items. It preloads the fields. But there may be instances to need a different size for different types of items so I allowed for this field to be changed. 4 Quote Link to comment Share on other sites More sharing options...
Sim Posted May 27, 2020 Author Share Posted May 27, 2020 (edited) ACP Shop section done: that means 80% of ACP done. You can add all items to Shop from shop page. Next I have to go back to the items page and allow users to add the items to shops from creating and editing item pages. Then add the upload images on items and might as well add them to shops. And ACP mostly done. Next purchasing items, inventory. Then user shops/black market. Whichever yo want to call it. 🙂 Edited May 27, 2020 by Sim 1 Quote Link to comment Share on other sites More sharing options...
Spydre452 Posted May 27, 2020 Share Posted May 27, 2020 Coming along real nice sim, good work! 1 Quote Link to comment Share on other sites More sharing options...
Sim Posted May 29, 2020 Author Share Posted May 29, 2020 I decided to use a open source class called simple image. The Shops are now done. Except for images https://gist.github.com/miguelxt/908143/8453383dba9adde2d13395e6e3ba5094aea52b0a The inventory system and user shops have been started. Quote Link to comment Share on other sites More sharing options...
Sim Posted May 30, 2020 Author Share Posted May 30, 2020 I am off work for the weekend, so this should allow me to develop a little faster(if my phone will sty online long enough). Here's a working preview of the inventory. It looks like I need to go back and edit the item module again to add resell price or add a settings to items for item sell %. Quick sell item at %50 as default sounds good . As you can see the links on right side. It looks like I have another feature to add to the item system. Gifting items to other players. The item system should be nearly complete by end of weekend. My dev phone on 0% right now though so this is holding me up. I believe everything but the player trades should be completed. BTW, I also keep the main post updated. Gifting users is complete. It also sends notification to user who receives item. I also have it send notifications to user id 1 if I believed the user is trying to cheat. Gift items they don't own. This can only be done by altering form data(usually outside program). 😉 You can click the item you wish to gift and it goes to this form. From there you can add more items and enter username. The gift feature can be reached outside your inventory as we The best part about multiple selections of gifts. Every mod created for the item system allows this. If yo receive an error. You don't have to reselect all your options again. Imagine clicking 20 items but made a typo in a username then had to redo it. 🙂 Quote Link to comment Share on other sites More sharing options...
Sim Posted June 1, 2020 Author Share Posted June 1, 2020 User Shops done: Some Proper error handling screen shots added as well.(altering values in URL) 2 Quote Link to comment Share on other sites More sharing options...
Sim Posted June 2, 2020 Author Share Posted June 2, 2020 Black market is finished except for images. It is nearly identical except lists all items for sale instead of like user shops only showing items from owner of shop. Only two additional features for item mod then nearly complete Quote Link to comment Share on other sites More sharing options...
Dave Posted June 2, 2020 Share Posted June 2, 2020 This is a hugeee feature, excited to see it finished 🙂 3 Quote Link to comment Share on other sites More sharing options...
Sim Posted June 2, 2020 Author Share Posted June 2, 2020 (edited) Thanks. I can't wait till it's finished myself I bet you are. This was something I planned on creating for oRPG Creator. It was unfinished, but was more extensive due to the flexibility of oRPG Creator. Had to create stats and add them to the item types. LoL. I wanted to enter this item system in the mod Contest. 🙂 Edited June 2, 2020 by Sim Quote Link to comment Share on other sites More sharing options...
Dave Posted June 2, 2020 Share Posted June 2, 2020 4 hours ago, Sim said: I wanted to enter this item system in the mod Contest. 🙂 You should have built it quicker than 😛 Quote Link to comment Share on other sites More sharing options...
Sim Posted June 3, 2020 Author Share Posted June 3, 2020 Maybe I'll wait till there's another one before I release it? ;) Scrapped the actuall item groups/packages module itself. It could be done using item types and will be a great example on how to create your own item type with the item type class files itself. All that's left is the user trades then add the image features will give this mod the much need appeal. Scrapped the actuall item groups/packages module itself. It could be done using item types and will be a great example on how to create your own item type with the item type class files itself. All that's left is the user trades then add the image features will give this mod the much need appeal. Quote Link to comment Share on other sites More sharing options...
Sim Posted June 5, 2020 Author Share Posted June 5, 2020 Trade Zone has been started. This mod involved a bit more thinking on design, but now that I have it figured out how I would like it to fully work it development will be faster. People can reply to a listing much like adding a listing picture below. Then the Creator can approve the trade or deny it. Quote Link to comment Share on other sites More sharing options...
Sim Posted June 7, 2020 Author Share Posted June 7, 2020 Since I am nearing completion of this module, I decided to do away with adding all the modules to the menu and create a custom menu for it using the custom menu hook. It's a nice touch. The trade zone link will end up looking like this Trade Zone( # ) if there any transactions that need the players approval. Here's what everyone been waiting for besides the release. All places where an item should be is now there. I just uploaded the shops folder 10x wondering why something wasn't working until I realized I was uploading the wrong folder so that just means I am to tired. Lol... All that's left is the user trades and then some extensive testing since it's a fairly large mod. Quote Link to comment Share on other sites More sharing options...
Sim Posted June 8, 2020 Author Share Posted June 8, 2020 No comments in days with all new updates and pictures with pretty pictures. Very discouraging. 🙂 Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted June 8, 2020 Share Posted June 8, 2020 Alright guys, gals, and everything in between! All together now! And 1.. 2.. 3.. Yay Sim! Go Sim for doing the thing! Where's the band?! Start the fanfare! Edit: Found the band https://music.youtube.com/watch?v=wA-NRyWoYII 5 Quote Link to comment Share on other sites More sharing options...
Sim Posted June 12, 2020 Author Share Posted June 12, 2020 I'm hoping to allow some people test it this weekend for bugs I've overlooked. I had to restart the trade zone yesterday because I made a mistake in my database design. And, it's a pain cycling threw the items from inventory or store, or blackmarket, ECT. And getting item types. The trade zone is even more complicated. Especially since the functions that are needed for every mod to work properly is a couple hundred lines of code and are copied and pasted in every mod. On Cell Phone to. I'm sure the hundred of lines of code wouldn't bother me so bad if I wasn't coding on cell. (CODE CLEAN UP LATER). Quote Link to comment Share on other sites More sharing options...
MNG Posted June 13, 2020 Share Posted June 13, 2020 Honestly, this is pretty good and excited to see it release! 1 Quote Link to comment Share on other sites More sharing options...
Sim Posted June 21, 2020 Author Share Posted June 21, 2020 I started cleaning up the code with a ItemHelperFunction class. I done removed over 1,000 lines of code across all files into less then 200 lines in the function class For fun: I also broke the item slots ACP and can't get it to work again(same code from item types ACP but produces two different results). Quote Link to comment Share on other sites More sharing options...
Sim Posted July 5, 2020 Author Share Posted July 5, 2020 I am going to try and finish this mod up today. I am fairly certain everyone is going to be pleased with the price of this module. Quote Link to comment Share on other sites More sharing options...
Sim Posted July 8, 2020 Author Share Posted July 8, 2020 It's been awhile since I have made any updates to the mood as I was struggling with how to equip items to the created item slots. Us programmers tend to over complicate things and this is how easy it was. :).. I have a few minor things to fix, only allow a players item to be in one place. Not equipped, in shop, in player shop, in blackmarket, ect Theni also need to do some tweaking to what's already implemented into GL's item (System so items actually matter.) Add the values from my item System to take effect into GL. I ALSO might release a few mods using this item System such as a new attack, mug, fight mod. So the item System plays a larger part in games. As I will be creating these miss for my game anyway. I also have a very interesting new daily game mod I should be releasing soon as soon I figured out this JavaScript error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.