Pets with Personality?

Forum
Last Post
Threads / Messages

Kyttias

Super Moderator
Super Mod
Joined
Jan 26, 2014
Messages
849
Points
18
Mysidian Dollar
58,199
I was stumbling through random generators earlier and one I found had a distinct pattern:

"This {adjective}{age}{species} is {size} and {intelligence}. {Gender} likes {likes} and hates {hates}."

I think this is cool from the sense someone could integrate random generation for their creatures, from a purely flavor text standpoint.

"This affectionate young {species} is smaller than average and unusually intelligent. {Gender} likes making noise and hates strangers."

You could even include one to three likes and hates, also randomized. Each creature will feel unique as they pull from a random array that sticks with them their entire life, except for age, which should change based on their level.

I think this might be a fun feature to implement. Enough so that if anyone had interest in making it, I'd be willing to pay a bit for it just so the entire community could have it if they wanted it. ovo
 
This might be fun to have. It's definitely not on my priority list, but I would enjoy this feature.
 
I tried doing something similar, but I don't think I know the best way to do this. XP You could try to add an extra column in the owned_adoptables database. Then, on each page where an adoptable is created, you could select a random word from an array and then put that into one of the columns. I'm using v.1.3.3, but I can try and play around with some things. :3
 
It actually isnt difficult, unless its time-based and require cron jobs/scheduled tasks. The real question is, what do you want the pets personality to do? Is it just for display on pets profile to make it look more interesting? Or do you have other plans for pets personality like it may affect how it battles/interacts with owners in future versions?
 
Nah, nothing fancy, just flavor text, for now.

But I'm sure some would be curious about things sort of more in the direction of Pokemon, as well. For example, 'likes sweet things' and from a list of sweet, sour, bitter, spicy and bland foods to choose from. (Click bonus/level up would not occur upon visit, but upon food selection, with a bonus given to choosing the proper food.) I've seen other sites already implement similar things, it's quite entertaining.

Just having a static variable attached to an adoptable that never changes is a big step forward for those who want to code past that. Unfortunately, I'm pretty bad about database entry. For now, I'm eagerly watching what Wallie's doing, because it sounds super close to what I want to do.

I'm glad that Mysidia's intention is to be here for beginners who don't need complex websites. Some of us are big dreamers, though, so we can't wait for some actual documentation and tutorials. Now that I've finally settled into my new home, I've had a lot more time to appreciate the inner workings of the script. ^^
 
^ Edit: Everything works! Should I share this as a modification? I can't figure out how to give each existing adoptable their own random personality, but you can change them to something unique maybe? :3
There's probably an easy way to make all of this editable through the ACP, but I have no idea how to work with addons.
 
Last edited:
Ah, so their personalities are being set to something when they're created, though? (So they all have the same personality for now?) Have you tried grabbing from array? In PHP there's an array_rand function (php.net / w3schools).

If you hand it over I'll attempt to take a look at it, but I'll be spending the next week someplace without convenient internet. ><
 
^ New adoptables will have different personalities.(I used that function) :3 However, on my site, there are existing adopts and I can't give them different personalities, so I'm just going to go ahead and give them a "special" personality.
Edit: What are your thoughts? It would be great if you could fix that tiny thing, but I've got everything else. :3
 
Last edited:
Ah, some supplement script would have to be made to insert (or very literally install?) data for older adoptables. Once it's run once then the file could be tossed out.
 
Interesting, looks like you two are already trying to get it to work. ^^ Like I said, it shouldnt be hard, just need some creativity and efforts. If you want random personality but with different chance/probability to occur, you may try the class Probability. It is very simple to use, and will generate the appropriate personality for you based on the chance/probability you assign. A chance of 20 is higher than 10, so more likely to occur. Hope this helps.
 
Wallie, you finished this, right? You can go ahead and share it? (And just making sure, this and your stats mod work on new adopts that come from promocodes, too, right?) What did you want in return? ovo
 
Gah! Promocodes... got it...
Thanks for reminding me! Should I share this as a mod? As of now, I haven't gotten to the part where you can alter the likelyhood of an adoptable getting a certain stat, but I'll add that later on. Also, I'm working with v.1.3.3 and I found out that the levelup.php file is quite different in the newset version, so I may need to do a bit of tweaking. I'm pretty certain that personalities will be assigned with just some slight repositioning but I can't figure out how to display it on the levelup page... :3
One more thing... what did you mean by what I want in return?
 
Last edited:
Eh, I'd make you something if you like. I'm thankful for your efforts! ^^ Maybe some delicious flowers for your catepillars?

I'm not so concerned about the positioning, so long as I can get it down to a {$variable} form, I'll be able to place it in wherever I like.

But yeah, promo code babies are super important. ^^; Next I want to know how to give a creature directly to a person without having to use the promo code as a go between (with a 'will you accept this creature? y/n?' dialog).

As for sharing it, I suppose it's up to you? If you have PayPal, I can always donate a little bit of money, too.
 
Last edited:
^Aww, thanks! I really don't need anything, but flowers sound really nice! :D Are you good with just personalities having an equal chance of being picked? If so, I'm going to go ahead and make the thread. Getting it into a variable is not a problem. The issue we had with converting the stat system to v.1.3.4 was that I couldn't find a way to add an extra message to put the variable in. Do you know how to do that?
 
Equally random, yup.

As for an 'extra message'? Uhmm... well... there's this, for example:

Code:
$online = $mysidia->db->select("online", array(), "username != 'Visitor'")->rowCount();
$offline = $mysidia->db->select("online", array(), "username = 'Visitor'")->rowCount();
$this->assign("population","{$online} Users Online + {$offline} Guests");

If you call just {$online} or {$offline}, you receive just a number. But if you call {$population} it'll render something like "12 Users Online + 17 Guests" wherever you choose to place it.

I'm super not sure if that's helpful. =/ I hope so.
 
I'm not sure if that'll work with the levelup page. Do you know if the comment function works with v.1.3.4? How about addLangVar?
 
I don't know how the comment function works, no. ><; I just know how to make variables that can be used in pages.
 

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

Top