Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.2.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-11-2011, 06:28 AM
Chibi_Chicken Chibi_Chicken is offline
Niwatori Kami
 
Join Date: Jun 2011
Posts: 63
Gender: Unknown/Other
Credits: 5,047
Chibi_Chicken is on a distinguished road
Default Custom design pets

Custom Pet Mod for Mysidia Adoptables v1.2.1

This mod will allow users to pick the background color of the pet that they adopt, and as the adopt levels up their color choice will effect that level as well.

Demo: http://www.plumagedoom.com/cpet/petdemo.php?id=3
Download: http://www.plumagedoom.com/cpet/Cpet...stallation.zip

Installation Notes:
I have put this mod on to a fresh copy of Mysidia v1.2.1 after installing the basic script run the installer install.php in the main folder. You will need to be logged in as a admin to install it. This will add in the needed two tables and update the apc hooks; Remember to remove the install.php!

Now that you have installed Cpets create any adoptable like you would normally do however when making an adoptable do not use Alternate Outcomes Settings** after adding in adopts and any levels for it go to the Site Settings page and in the Plugin Settings use the Custom Pet Admin to add the needed layers for the adopt and its levels.
You have just added a new custom adopt for users to play with.
**Alternate Outcomes Settings has not been tested with this mod, I am not sure how it will handle it. what I think will happen is when any of the scripts call for the image of the pet it will find that alter images is on and will use that image instead of the one on the owned_adoptables.imageurl

Custom Pet Admin Notes:
At the moment you have two choices; add in a new image and delete an image (manage image layer.)
When you chose to upload an image you will need:

Layer name: This can be a readable name used when you want to manage the image at a latter time
Body or Lines: This will set up what type of layer it will be. If you were to add in more than one of either type the likely thing that would happen is the script will grab them and what ever one was sorted (added?) last will be used.
Pet ID: Pick what pet this layer is for.
Pet Level: Add in the level that this is for, note that level 0 is the egg level or first level that you make for an adoptable.
File to Upload: The image you want to use for the layer effect.
Image Requirements: The image must me less than 150kb.
It must be PNG-8 file, this script will allow gifs to load however the image functions will only handle pngs right now so it will just give you errors for trying to use gifs.
Body layers can be any color(s) the scrip will just go in and replace any value it finds. it handles transparency with the alpha channel.

Adding Cpets to a pre-existing install:

If you want to install this code to an already installed copy of Mysidia Adoptables, run the install.php script to add in the tables and apc hook. For the pages look for:
#//----------
#custom pet mod
#//----------
this is the start of the new code that I have added in, I tried not to alter any code outside of this. The exceptions are in adopt.php I relinked from doadopt.php to customadopt.php, this also doesnt have the custom pet mod comments.

Here is the list of the files.
inc/functions.php //added in link to the cpet functions forgot to add in the comment however it is basically the third line.
adopt.php //redirected page and clear out/build a new variable in the session
breeding.php //added in section for the pet to breed with the custom background. note: I just had it pick a color randomly for the new adoptable.
doadopt.php //added in section to add the info from the custom pet session pet save it. Then build the image and save that to the adoptable.
levelup.php //added in find the parent id then level up the adoptable, level up rebuilds and saves the image again.

Altered
myadopts.php //altered how the image is taken from the db and displayed.
stats.php //altered how the image is taken from the db and displayed. Note: I missed a spot when the code get a random set of adoptable, it shows the egg image instead.

New Files
preview.php //used to display the new colors. Note: This may have caching issues with some browsers, I am not sure.
customadopt.php //form used to build the new pet.
cpetadmin.php //admin that manages the image assets for the custom adopts.
custompet_functions.php //core engine of the custom adopts does stuff minus toast.

Please leave any comments and questions in this thread.
[original post]

I have been working on this on and off for months now. i am at a point were i can show an example of what i am building

this mod will allow users to pick a pet type and then pick the color of the body also add in different effects. then when the pet levels or breeds the effects stick with it and can be passed on to the offspring.

so far this all i have gotten done
http://plumagedoom.com/cpet/petdemo.php

I am still learning how the different scripts work with each other.

any comments or interest is welcomed.

Last edited by Chibi_Chicken; 06-22-2011 at 06:33 PM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to design a theme? CallumCharlton Questions and Supports 6 04-03-2015 11:44 AM
Name for my web design service? tahbikat Webmasters Area 7 04-05-2014 02:08 AM
Need Opinions Please (card design) Tequila Other Chat 6 05-02-2013 07:14 PM
Responsive design Kesstryl Suggestions and Feature Requests 5 03-06-2013 02:34 PM
Ugliest Design Ever?? Tequila Other Chat 9 10-28-2011 04:37 AM


All times are GMT -5. The time now is 01:02 PM.

Currently Active Users: 9775 (0 members and 9775 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636