Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2016, 12:49 PM
Demonwolf37's Avatar
Demonwolf37 Demonwolf37 is offline
Trans with a plan
 
Join Date: Sep 2016
Posts: 21
Gender: Male
Credits: 3,785
Demonwolf37 is on a distinguished road
Default More than 3 Levels of pet:: hide species name

Just as the title says, is it possible to get more than three levels of pet? I'd assume there is, but I'd like to know for sure before I start making multi-level pets.

Also, is there a way to hide the species name and replace it with a level name instead? And also have individual descriptions for each level? I have some pets where I'd like it to be a secret what they are until they level up.

Thanks.
__________________
I keep coming back to my dragons, even though I know there's nothing to do with them :/
Reply With Quote
  #2  
Old 09-12-2016, 01:24 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 391,776
Hall of Famer is on a distinguished road
Default

You can create as many levels as you like, even a million or billion is possible. There is no upper limit to the number of levels you can make for each pet.

There is a way of course, but Mysidia by default does not come with a level name, and the level is identified by species ID/name and level number. You can achieve this by adding a new field called 'levelname' in database table adopts_levels, and then modify the file /classes/class_adoptlevel.php file to add a new field for adoptable's level class.

This is not the end yet, you have to edit the level.php file in admincp folder to change how levels are inserted to database, so you wont break admin control panel. Finally, you can edit every file that shows adoptable's species name to the level name. I cant think of where these files are, but you can search for keywords such as $adopt->getType() and you may find them. For level description, you can do something similar here with new field 'description', it will be just like how you add level name.

Anyway it is not very hard, with basic coding skills it should be perfectly doable. Just it can be tedious and will require you to change code in many files. Take care, and have fun coding.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 09-12-2016, 01:41 PM
Demonwolf37's Avatar
Demonwolf37 Demonwolf37 is offline
Trans with a plan
 
Join Date: Sep 2016
Posts: 21
Gender: Male
Credits: 3,785
Demonwolf37 is on a distinguished road
Default

How would I go about searching the interiors of the php files for the $adopt->getType()? Is there a search function that will search all the files for it at once?
__________________
I keep coming back to my dragons, even though I know there's nothing to do with them :/
Reply With Quote
  #4  
Old 09-12-2016, 02:20 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 391,776
Hall of Famer is on a distinguished road
Default

If you use an IDE like netbeans, then yes you can search on project basis. If you use notepad++ or just plain notepad, you will have to search everything on your own. The files will be located in /view or /admincp/view folders, so there aint really many files to search.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 09-12-2016, 02:43 PM
Demonwolf37's Avatar
Demonwolf37 Demonwolf37 is offline
Trans with a plan
 
Join Date: Sep 2016
Posts: 21
Gender: Male
Credits: 3,785
Demonwolf37 is on a distinguished road
Default

I'll probably just do it by hand then. What should I change $adopt->getType() to? Assuming that I use 'levelname', would it be something like $levelname->getType(), or am I way off here?

Also, how exactly do you add additional levels? Right now I'm seeing this, and I can only add 3 levels. Do I just rewrite the level cap in one of the php files?
"This page will allow you to create new level(s) for 0_testAdoptable2. Right now there are 0 levels that exist for 0_testAdoptable2, the level cap is 3. That means that you can create up to 3 levels for 0_testAdoptable2. right now."

When adding the new field in class_adoptlevel, would it be something like this?

public function getLevelname($fetchMode = ""){
if($fetchMode == Model::MODEL) return new Adoptable($this->lvlname);
else return $this->lvlname;
}


And then add this with the others at the top?

protected $lvlname;

I'm not great at code, so I'm just kind of copying and modifying what was already there for the others...

And I'm not really sure what to do with level.php? Just add $current level = $mysidia->input->post("lvlname"); ????
__________________
I keep coming back to my dragons, even though I know there's nothing to do with them :/
Reply With Quote
  #6  
Old 09-16-2016, 04:52 PM
Demonwolf37's Avatar
Demonwolf37 Demonwolf37 is offline
Trans with a plan
 
Join Date: Sep 2016
Posts: 21
Gender: Male
Credits: 3,785
Demonwolf37 is on a distinguished road
Default

Bump, bump?
__________________
I keep coming back to my dragons, even though I know there's nothing to do with them :/
Reply With Quote
Reply


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


All times are GMT -5. The time now is 02:55 AM.

Currently Active Users: 801 (0 members and 801 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