-
Posts
2,392 -
Joined
-
Last visited
-
Days Won
62
Content Type
Profiles
Forums
Events
Everything posted by Sim
-
I should have know TBG is text based game. There isn't many people on this forum who cant code text based game. And this forum is mostly about text based games. I been thinking about adding a turn based feature to my game so that's why I said turn based.
-
To be able to access public methods from other mods. $this->mods->MODNAME->publicMethod(); Say I wanted to commit a crime from my mod. Be able to call this code below from my mod. Ex: $this->mods->crimes->method_commit(); Of course with this example, one would have to adjust the URL to to be able to use this method, but people might start changing there code to include parameters. So $this->mods->crimes->method_commit(3); would commit the crime with ID #3. Why I say this is, with the inventory mod I am creating there's no pretty way to reuse all my methods without modifying a file or two in GL.
-
Im a few years behind myself on other languages. C# and .net(if people are still using them). TBG is turn based game? Any details?
-
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. 🙂
-
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.
-
Thanks for explaining how the health system works @Tom V. I never looked into it yet since I hadn't had a need to.
-
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. 🙂
-
If they die. Don't let them know they are dead? Just make a fake health bar until it off hospital? Say 100 minutes in hospital then you revive them. Every minute is a % of health refilled.
-
As far as I am aware, health is always 0 in GL? Your either dead or your alive? Var_dump? US_shotBy is valid.
-
Whatever yo did? Yuou never told us what's wrong?
-
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.
-
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.
-
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.
-
Congrats @urbanmafia I only submitted my entry for GP. I knew that was winner once submitted. 🙂 I only submitted my entry for GP. I knew that was winner once submitted. 🙂 Edit: now if I could only get yo to reply to my messages like to do forum posts. 🙂
-
I still don't have the code tag at in the menus @Dave Here's a quick rundown from some code used in my schooling mod. I added some quick comments //checks if there is a timer if (!$this->user->checkTimer('timerName')) { //gets how many minutes are left till reaches zero $time = $this->user->getTimer('timerName'); //a display message timer $schoolError = array( "timer" => "school", "text"=>"You cant take another class until this one is finished!", "time" => $this->user->getTimer("timerName") ); //puts timer on page $this->html .= $this->page->buildElement('timer', $schoolError); } //Create or update a timer. This creates a timer if it doesnt exist already. $this->user->updateTimer("timerName", $classInfo['seconds'] * 60, true); //No need to update databases to update the timers. Edit: I'm glad someone finally posting coding questions on this form. 🙂
-
That's what I just said about COBOL. And you said
-
Company's are still using COBOL and see no problem using that 🙂
-
Aight guys. I am seeking someone who would like to help run and manage a game. Revenue split will be 60/40. The extra %10 will go towards game resources. Hosting, designs, art, ECT. What yo get from me is a programmer with over 20 testers experience. If it can be done, it will get done. I will also be adding new content and advertising myself. Ex: everyday I log in, add one or two new things to the game minimum and the content will grow tremendously over the year. Besides what is already posted about some of the uniqueness, I already have established a modified crimes and theft mod which allows the crimes to be committed against a random player and theft against a random player. The crime messages are also not your standard GL messages. Custom success fail messages are displayed as well as a separate messages for being committed against a user. I also have a very detailed item system in the works. If your programmer, the item system uses 8 separate table's. Now that fairly big if yo ask me. 🙂 Edit: I'm glad MWG saves your message while swhipping since I just got the back button. 🙂
-
Version 1.10 Released. Players can now be rewarded items from crimes and admins have the options to allow the rewarded item to be from another player. This mod also created two additional tables. itemTypes and inventory. Although the inventory is useless as of now with the default GL item system. It still stopped all items in there. Next mod: an enhanced black market/item system after this other mod I am working on. It turned out as an experiment, but I liked the code to much not to continue. 🙂
-
I didn't get to finish my mod that adds a ton of features, but here's mine. The new version is much less editing the the 1st version, and now allows items to be rewarded from the crimes and allow items to be taken from other players. 🙂
-
LoL https://www.jesuisundev.com/en/why-developers-hate-php/
-
Thanks. Like I said was staring at screen to long.