Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
Stat/Skill System(Tested with V.1.3.3)
Please pardon my poor explanation skills, but here's a quick guide to creating random-generated stats for adoptables. Please save back ups before beginning as this works perfectly for my site but I don't know what may happen with yours. Hence, please don't unleash your anger on me if there is anything amiss. :3
This first post shall cover assigning stats to created adoptables. 1. Go to PHPMyAdmin->your site's database->prefix_owned_adoptables Once there, there should be a "structure" tab at the top of the screen - click that and then scroll to the bottom of the page until you find: Press go. Then you'll come to a page that looks like this: There, set the values to match those in the example and press "save". 2. In the "adopt.php" file, there should be something like this from lines 29 to 32: PHP Code:
$statname = rand(minimum value,maximum value); Then find this on lines 33 to 34: PHP Code:
PHP Code:
PHP Code:
$statname = rand(minimum value,maximum value) ; and PHP Code:
elseif($mysidia->input->post("shoptype") == "adoptshop"){ Put this under that: $statname = rand(minimum value,maximum value) ; And put this under that: PHP Code:
PHP Code:
$statname = rand(minimum value,maximum value) ; Put this under that: PHP Code:
$mysidia->db->update("owned_adoptables",array("statname" => "value"),"") ; Once that is done, save all changes to the file but don't close it. After that, go to your site and create a quick free adoptable. Adopt that adoptable once. This will update all adoptables in the database to have the set stat. Go back to the "adopt.php" file and delete what you just added or right-click and select "undo". Tada! Please contact me or post in the thread if you have any questions! This includes adding extra stats. The next section shall cover how to display those stats on an adoptable's levelup page. Last edited by Hwona; 07-02-2014 at 03:49 PM. |
#2
|
||||
|
||||
Displaying Stats On Levelup Page
This post will cover how to display stats on an adoptable's click page
1. Go to the "class_ownedadoptable.php" file(inside the "classes" folder). There, at the top, there's a bunch of "protected" variables. Add this below them: protected $statname; Add this function to the list of functions below: public function getAdoptstatname(){ return $this->statname; } 2. Got to the "levelup.php" file. On line 29, there should be something like this: $ip = secure($_SERVER['REMOTE_ADDR']); Under that with this: $adoptablestatname = $this->adopt->getAdoptstatname(); On line 33, there's a piece of code like this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
else{ Under that, put: PHP Code:
$document->add($summary); Under that, put: $document->addLangvar($message); Tada! The next section will go over the "stat-raising system". Last edited by Hwona; 07-02-2014 at 11:03 AM. |
#3
|
||||
|
||||
Creating Items to Raise Stats
This post will explain how to create items to raise an adoptable's stats.
1. Go to the “item_functions” table in your database. Once there, click the “insert” tab at the top of the page. You should arrive at a page like this: Fill out the values to match those in the example and then press “Go”. 2.Go to the “functions_items.php” file in the “functions” folder. Add this item function to the list: PHP Code:
PHP Code:
Tada! The next post shall cover the award system! Last edited by Hwona; 07-01-2014 at 01:32 PM. |
#4
|
||||
|
||||
**Squees **
Okay gonna try this out, thank you soooooooo much for this!!! :) |
#5
|
||||
|
||||
Would you possibly be able to just upload your modded levelup file? I keep getting errors on that part of the changeover of code!
**Also, is there any way to just get the code for your brilliant and beautiful layout? I really am dying to see this as part of my display, it's gorgeous!! Thank you ! Last edited by Missy Master; 06-29-2014 at 10:22 AM. |
#6
|
||||
|
||||
Award System
Allowing pets to earn "awards" through training.
1. Go to PHPMyAdmin->your site's database->prefix_owned_adoptables Once there, there should be a "structure" tab at the top of the screen - click that and then scroll to the bottom of the page until you find: Press go. Then you'll come to a page that looks like this: Set the values to match the example shown above and press "save". 2. Remember the item function we made earlier in the "functions_items.php" file? Go there and replace that part of the code with this: PHP Code:
protected $statnamemedalstatus; Add this to the list of functions: public function getAdoptObedienceMedalStatus(){ return $this->obediencemedalstatus; } 4. Go to "levelup.php" and find this piece of code: $adoptablestatname = $this->adopt->getAdoptstatname(); Under that, put: $statnamemedalstatus = $this->adopt->getAdoptStatNameMedalStatus(); PHP Code:
<div id='stats'> Statname: {$adoptablestatname} </div><br> Add: <div id ='trainingawards'><img src='{$mysidia->path->getAbsolute()}picuploads/awards/statnamemedalstatus{$statnamemedalstatus}.png'></div> 5. Awards Folder(Zipped) to your picuploads folder and unzip it. Here are some Photoshop bases you can color if you want to swap out the images provided in the folder: Trophy Base Ribbon Base Medal Base If you need non-photshop bases, please tell me. That's done! Now, you may have noticed that the levelup page might not look as visually-appealing as you want it to be. The next post will take care of that. Last edited by Hwona; 07-01-2014 at 06:52 PM. |
#7
|
||||
|
||||
I'm not sure :3
I will take another crack at this today, but I got a white screen when I did the edits on levelup ... maybe someone else can try and see what you get? Might be error on my part pretty easy heheh :) |
#8
|
||||
|
||||
Styling The Levelup Page
Styling the levelup page
Ok... just a heads up, I don't really know how to explain this, but I'll give it a shot! So, do you all remember the "div id" stuff we added to the levelup page earlier on?: PHP Code:
#stats { } #trainingawards { } Add CSS code between those brackets to style the boxes the stats and awards are in! I'll make a custom them just for this. :3 Go to this thread for a CSS theme with levelup page styling: Spring Theme Last edited by Hwona; 07-02-2014 at 11:52 AM. |
#9
|
||||
|
||||
Oh sure I can test it out for you! No problem! :)
|
#10
|
||||
|
||||
^Thanks a bunch! Ehh... it doesn't say what version you're using? Do you think this would work for earlier and later versions?
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trade System | Kyttias | Questions and Supports | 4 | 05-29-2016 01:29 AM |
Making v.1.3.3 Stat Mod Compatible with V.1.3.4 | Hwona | Questions and Supports | 0 | 07-08-2014 02:37 PM |
Stat Inheritance Mod * thanks to Wallie! * | Missy Master | Mys v1.3.x Mods | 0 | 06-30-2014 03:23 PM |
Anyone Want to Have a Stat System | Hwona | Feedback and Suggestions | 12 | 06-30-2014 10:30 AM |
Basic Stat System | Hedgen | Questions and Supports | 3 | 03-10-2013 03:47 PM |
What's New? |
What's Hot? |
What's Popular? |