#1
|
|||
|
|||
Pet personalities?
Is there a way I could give pets a randomly generated personality on creation? And maybe have it display a bit of text related to that on the profile(assuming I can get one set up)/on the stats page?
|
#2
|
||||
|
||||
Oh lords, I just typed out a bunch of information for you and the internet glitched and ate my entire post.
Okay, I'll edit this post in a moment, just adding the codes that you'll need at the moment. Edit: You will need to create two new files, one where the base files for your site are (adopt.php, account.php, etc): personality.php PHP Code:
personalityview.php PHP Code:
name: id type: int(20) null: No default: None extra: AUTO_INCREMENT name: pers type: varchar(100) collation: latin1_swedish_ci null: Yes default: Null Now move on over to owned_adoptables and add a new column with the following info: name: personality type: varchar(100) collation: latin1_swedish_ci null: No default: Easy Going Now for the tedious part. You will need to make the same edits, more or less, to the following five files: adopt.php classes/class_breeding.php classes/class_promocode.php classes/class_stockadopt.php admincp/ownedadopt.php Find the insert line in each file that starts like this: $mysidia->db->insert("owned_adoptables", array("aid" => NULL... At the end of that, before the closing )); add a comma behind whatever is last, and then add this: PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 04-25-2017 at 08:38 PM. |
#3
|
|||
|
|||
Quote:
|
#4
|
||||
|
||||
Sorry, internet shorted out again before I could finish @_@
Okay, here are the rest of the instructions: In the same 5 files I mentioned, find the insert line again, and right above it add this line; PHP Code:
PHP Code:
PHP Code:
And that should be it!
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 04-26-2017 at 10:13 AM. |
#5
|
||||
|
||||
I probably screwed something up, but my site returns a 500 error when I try to access mysite/personality
|
#6
|
||||
|
||||
Did you edit anything in the files at all?
Make sure everything's in the right folder?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#7
|
||||
|
||||
The only edits I made are the ones you said to make, and I double checked the positions, so I'm pretty sure that's not it
|
#8
|
||||
|
||||
Alright, could you show me the sections in the 5 files that have been edited? (adopt.php, class_breeding.php, class_promocode.php, class_stockadopt.php, and admincp/ownedadopt.php)
Edit: Before doing that, try adding this about the index function in personality.php: PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 04-27-2017 at 08:33 AM. |
#9
|
||||
|
||||
adopt.php
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
#10
|
||||
|
||||
I posted a snippet of code above, could you try that and let me know the results?
__________________
My Mods Site (1.3.4, 2020 Mods) |
|
|
What's New? |
What's Hot? |
What's Popular? |