Custom design pets

Forum
Last Post
Threads / Messages

Chibi_Chicken

Niwatori Kami
Member
Joined
Jun 11, 2011
Messages
63
Points
0
Mysidian Dollar
3,168
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-v1-Installation.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 :displeased:
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:
Looks quite amazing.

Basically using GD to generate a color for specified areas?

or by having the bg color magenta and having whatever color specified replace the magenta?

Either way I can't wait to mess with that code. :3
 
Sounds promising, but I hate to be the bad guy to tell you that this forum is only for mods/addons that are already completed and ready for users to download. For ideas or projects you are currently working on, post in Questions & Support forum so members can have a preview of your script.
 
Looks quite amazing.

Basically using GD to generate a color for specified areas?

or by having the bg color magenta and having whatever color specified replace the magenta?

Either way I can't wait to mess with that code. :3

it basically takes the template png image and replaces the color but it still saves the alpha channel so you can get a blending effect when you add more than just one layer.

Sounds promising, but I hate to be the bad guy to tell you that this forum is only for mods/addons that are already completed and ready for users to download. For ideas or projects you are currently working on, post in Questions & Support forum so members can have a preview of your script.

ok, wasn't to sure were it went, please move it to the right place, thank you.
 
This is awesome! It could work pretty cool with breeding sites, if possible I think it would be cool to also be able to have it get markings and such kind of like Wajas. But first things first, of course. :3 It looks great.
 
Its a complex script. Your average newbie would get frustrated with it rather quickly. It will be a long way off before it could be edited from the admin panel, if at all. We do most of our editing directly in the database, so admin is kinda useless.
 
Well, I'm sure if you make a little guide you can explain to people how to edit from the database, rather then go through the trouble of coding more. By now I'm used to a database so I think I'd be fine with a little instruction. I don't know about other people though. :eek:
 
Alright, thanks for understanding. Will you continue to develop this product? And is it going to be completed soon? If so, I will leave it here as it is.
 
It will be a long way off before it could be edited from the admin panel, if at all. We do most of our editing directly in the database, so admin is kinda useless.


well at the moment i am working on the admin panel for custom pet. I need a page that lets me upload images and put the needed info in to a table with as few user errors as i can get.

I have also finished the adoption process, so after a user has picked their color for their pet they can adopt it with the doadopt. it saves the file and inserts it to the owned_adoptables under image url. however most pages when they load the images for the pets they just grab the default image instead of checking for a custom image.


Alright, thanks for understanding. Will you continue to develop this product? And is it going to be completed soon? If so, I will leave it here as it is.

I intend to release at least a beta of it; as for completion i can give the estimate of up to 3-4 months. i am focusing a lot of energy to it right now but i have a lot of pending/partial projects that might come up.
 
well at the moment i am working on the admin panel for custom pet. I need a page that lets me upload images and put the needed info in to a table with as few user errors as i can get.

I have also finished the adoption process, so after a user has picked their color for their pet they can adopt it with the doadopt. it saves the file and inserts it to the owned_adoptables under image url. however most pages when they load the images for the pets they just grab the default image instead of checking for a custom image.

My bad, I thought you didn't like the admin page.
 
That was when i was working with Rusnak Ver 1 and even then i didnt look at the admin page too much. I have found the admin plug in system will work for the basic add or delete of image layers.
 
Its a complex script. Your average newbie would get frustrated with it rather quickly. It will be a long way off before it could be edited from the admin panel, if at all. We do most of our editing directly in the database, so admin is kinda useless.

I know what you mean. I have to remember to offer clients who hire me to add admin functions for their new upgrades because I almost prefer doing everything in the phpMyAdmin. XD
 
You took the words right out of my mouth. I used to love the admin panel, but after doing everything in the database you really have so much more control.
 
Update:

so i have gotten all of the basic custom pet functions working with the needed php pages: adopt.php, breeding.php doadopt.php levelup.php

their is minor items like displaying the pet on pages like stats.php and myadopts.php (when you click on the individual pet it will show the image) that need to be worked on.

i need to also check and see if the admin functions will bug up any of this as well.

so i can release it soon however i am unsure how i should do that; just have one zip file with all of the modded files, as a fresh install with the mod added to it or a list of were to make the changes in the different files.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top