More than 3 Levels of pet:: hide species name

Forum
Last Post
Threads / Messages

Demonwolf37

Trans with a plan
Member
Joined
Sep 8, 2016
Messages
20
Points
0
Age
26
Mysidian Dollar
0
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.
 
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.
 
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?
 
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.
 
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"); ????
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

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

Latest Threads

Latest Posts

Top