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 12-17-2016, 02:34 AM
bisexuowl bisexuowl is offline
x3 furry trash x3
 
Join Date: Sep 2015
Location: California
Posts: 22
Gender: Male
Credits: 6,442
bisexuowl is on a distinguished road
Default How to remove gender from breeding?

I want to make it so that my adoptables can breed regardless of their gender, as I plan to make gender a non-required field for pets that users can enter and keep track of strictly for role-playing purposes.

I've tried switching "female" to "parent1" and male to "parent2" in most places, and in places where the breeding checks for it being a male and female I've tried switching it to check "sex" which is only "omni", so both parents would be omnis anyway and it'd work out. However, it kept telling me "parent1" and "parent2" and told me there was an error in class_language.php, which is something I don't want to mess with ^^'

I'm a beginner in PHP so I was wondering if anyone could point me in the right direction?
Reply With Quote
  #2  
Old 12-17-2016, 11:01 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 81,603
Dinocanid is on a distinguished road
Default

I believe the only files you'll have to edit would be breeding.php, breedingview.php, lang_breeding, and class_breeding.php. I doubt you'll ever have to edit class_language, for any script really. You were on the right track already, with changing female to parent1 and male to parent2. You may have been getting the error message because you forgot to edit lang_breeding, which you would need to change these two lines:
PHP Code:
$lang['female'] = "None of your female adoptables can breed at the time.<br>";
$lang['male'] = "None of your male adoptables can breed at the time.<br>"
to:

PHP Code:
$lang['parent1'] = "None of your female adoptables can breed at the time.<br>";
$lang['parent2'] = "None of your male adoptables can breed at the time.<br>"
In order for the dropdown on the breeding page to not be restricted on only male adopts and female adopts, you would change the last few lines of breeding.php like so:

PHP Code:
$stmt $mysidia->db->select("owned_adoptables", array("name""aid"), "owner = '{$mysidia->user->username}' AND currentlevel >= {$settings->level} AND lastbred <= '{$lasttime}'");
        
$female = ($stmt->rowcount() == 0)?new Null:$mysidia->db->fetchMap($stmt);
        
$this->setField("parent1Map"$parent1);
  
        
$stmt $mysidia->db->select("owned_adoptables", array("name""aid"), "owner = '{$mysidia->user->username}' AND currentlevel >= {$settings->level} AND lastbred <= '{$lasttime}'");
        
$male = ($stmt->rowcount() == 0)?new Null:$mysidia->db->fetchMap($stmt);
        
$this->setField("parent1Map"$parent1); 
You also wouldn't want users to be able to breed by choosing the same adopt in both dropdowns (I assume), so you would change this line in breeding.php:

PHP Code:
if($mysidia->input->post("female") == "none" or $mysidia->input->post("male") == "none"){ 
to this:

PHP Code:
if($mysidia->input->post("female") == "none" or $mysidia->input->post("male") == "none" or $mysidia->input->post("female") == $mysidia->input->post("male")){ 
This is just off the top of my head and I haven't tested it, but it should point you in the right direction. I also haven't properly changed every line that includes "female" and "male" to "parent1" and "parent2", so you'll have to do that on your own.
__________________
Reply With Quote
  #3  
Old 12-17-2016, 02:59 PM
bisexuowl bisexuowl is offline
x3 furry trash x3
 
Join Date: Sep 2015
Location: California
Posts: 22
Gender: Male
Credits: 6,442
bisexuowl is on a distinguished road
Default

thank you! i'll try this after i finish playing D&D with the family. :D

edit: it worked! thanks again

Last edited by bisexuowl; 12-17-2016 at 03:31 PM.
Reply With Quote
Reply

Tags
breeding, gender, mysidia v1.3.4


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 09:00 AM.

Currently Active Users: 463 (0 members and 463 guests)
Threads: 4,081, Posts: 32,032, 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