Creating a "Faction" for adoptables/owned adoptables

Forum
Last Post
Threads / Messages

Vaporman87

Member
Member
Joined
Feb 14, 2014
Messages
32
Points
0
Mysidian Dollar
3,037
Some time ago, I asked about adding a description (that would be created in the ACP during adoptable creation) that would display on the myadopts/stats/ page.

Thanks to you guys, I got that done.

Now I want to add yet another option called "Faction" to be specified during the adoptable creation process in ACP. Only, I need this new option to carry over from the adopts_adoptables table in the database to the adopts_owned_adoptables in the database (whenever someone buys/adopts the adoptable).

So essentially, this new option needs to show up in every table in the database that an adoptable shows up in. Mainly because I am planning to use this new option in a custom battle system I'll be having made.

Any help is welcome!!!
 
Last edited:
If it's already in the adopts_adoptable table, you don't need to carry it over since all OwnedAdoptables inherit all properties from an Adoptable. To the class adoptable, you need to add a new variable $faction to the attribute list (this variable has to have the same name as the one you got in your database, but with a $ behind it) and create a function similar to others in that file to return that $faction (getFaction() ). You can then use the getFaction() on an OwnedAdoptable like that to obtain its faction. Of course with this all OwnedAdoptables of the same species/type will have the same faction
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top