Author Topic: Making Packages?  (Read 22925 times)

Offline Basil Beard

Re: Making Packages?
« Reply #30 on: February 27, 2007, 06:05:00 am »
Ok. New problem. Txt isn't loading right. It appears that profile.php won't load shop.english.php

Is there any easier way to do that than to move all the needed txt lines into profile.english.php?
Arrrrr!

Offline TechnoDragon

Re: Making Packages?
« Reply #31 on: February 27, 2007, 06:30:30 am »
Ahhh, so the error is caused by whitespace in the breed name?

EDIT:

OK, great news!  after correcting all of the erros i could find and a few tweaks here and there I have sucessfully integrated this into shop version 2.3!  Now about those food and cage items...

Oh, and how do I create additional skills for the pets?

EDIT EDIT:

Ok, nevermind, figured that part out, and OOOOOHHHHH am I going to have fun with this!

EDITEDITEDIT:

Yes there is basil...use this right above the lines you want to use the shop language file:
loadLanguage('Shop');
« Last Edit: February 27, 2007, 09:05:08 am by TechnoDragon »
Don't tell me to get into shape...I have a shape...It is round!


Offline Basil Beard

Re: Making Packages?
« Reply #32 on: February 27, 2007, 10:45:42 am »
Ok. Awesome thanks.

Food and cage are easy to code, I just havn't done it yet.

Basically, food should increase the hunger and happy by values(ones hopefully set by the admin). Users, on use, will be asked which pet they want to feed.

Cage will increase the maxpets value in the member database by one. It will include a preset "Maxmaxpets" which puts a maximum on the number of maxpets(so like, say you want a user to have no more than three pets but start with one pet. You set maxmaxpets at three for the cage item. Or, if you want each pet to cost progressivly more, you make multiple cages each with a higher maxmaxpets value).

My plan is to finish coding these items, add the loadLanguage line, and release the 0.0 version tonight. I'll then keep it here for a couple of months as people find any holes in it and I make it easier to add and manage pets. Once that is all done, I'll submit the 1.0 version to the official smf mods website.

Also keep in mind that I will probably, for ease of use, remain with SMF Shop 3.0 and SMF 1.1.2 for the time being, unless any large updates are released, simply because I really don't want to manage multiple updates nor trying to fix it so that it works with the newer update. I mean, once it is at a more done stage I can update it, but I probably won't before then. =)

Anyways, I'll hopefully be creating an actual topic for it later tonight =) 

Edit: Oops. I forgot to replace the uninstallscript. Thus I just cleared all my shop databases. I can't uninstall smfshop because it can't delete the databases, and I can't uninstall smfshop pets for the same reason. I aslo cannot reinstall either. This is why you use a test forum, XD. Meebee have it fixed now.
« Last Edit: February 27, 2007, 11:32:15 am by Basil Beard »
Arrrrr!

Offline TechnoDragon

Re: Making Packages?
« Reply #33 on: February 27, 2007, 12:02:06 pm »
Ahhh, so I could basically translate say the increasekarma item to do what you suggest...so yes that would be easy...one suggestion I may add...to put an admin panel in the shops area (or even one of your own) so that the admin can change settings theough there without having to edit the databse...  use the $modSettings concept...love the mod though...now that i have it on my ancient smfshop version it is truely a great shop mod!

EDIT

Ok I have created several items for the pets...let me know what you think!

EDIT EDIT

Found a typo and modified the cage item to have a max allowed....

updated attachment
« Last Edit: February 27, 2007, 01:20:20 pm by TechnoDragon »
Don't tell me to get into shape...I have a shape...It is round!


Offline Basil Beard

Re: Making Packages?
« Reply #34 on: February 27, 2007, 12:26:00 pm »
Awesome. You do know that curap gets reset each day, right?

Anyways, I would like to direct you all here:
http://www.daniel15.com/forum/index.php/topic,642.0.html

Have fun everyone.

Oh, and one last thing. Whitespace is allowed in breednames afterall(just not in filenames). It turns out it was another bug causing this error =D
Arrrrr!

Offline TechnoDragon

Re: Making Packages?
« Reply #35 on: February 27, 2007, 12:26:57 pm »
Where does that get done at? (the reset)
Don't tell me to get into shape...I have a shape...It is round!


Offline Basil Beard

Re: Making Packages?
« Reply #36 on: February 27, 2007, 12:36:05 pm »
Code is found in shop-subs.php, because that is where code like that goes. it gets called in shop.php. Please note that it will only work if someone visits your shop that day. I didn't want to do a cron job, because I know some people cannot use them, and I dislike they anyways. But yeah, if no one visits any shop files on a given day, pets will not age and hunger/happiness will not decrease. This will be one of the first things I look to fix. Shouldn't be too hard, just the new years will be annyoying.
Arrrrr!

Offline TechnoDragon

Re: Making Packages?
« Reply #37 on: February 27, 2007, 12:43:24 pm »
thing is, depending on what kind of "actions" you give skills, that item could still come in handy...at least my concept of what I plan on doing with the pets...
Don't tell me to get into shape...I have a shape...It is round!


Alexander

  • Guest
Re: Making Packages?
« Reply #38 on: March 03, 2007, 06:17:03 am »
TechnoDragon, the pet items you made are pretty cool, but it affects all the pets the owner has instead of just one.

Offline TechnoDragon

Re: Making Packages?
« Reply #39 on: March 03, 2007, 06:26:46 am »
hmmm, I hadn't tested that yet (only have one pet myself...let me take a look at it and see if i can fix that

EDIT:

Ok, updated the pet items to allow the member to select whic pet to use it on attached to this post (note, in the future you can always pick up the most recent pet items at my forum in my downloads section.)
« Last Edit: March 03, 2007, 07:57:37 am by TechnoDragon »
Don't tell me to get into shape...I have a shape...It is round!


Offline Basil Beard

Re: Making Packages?
« Reply #40 on: March 11, 2007, 08:34:25 am »
What do I need to do different for updates? Like, I am working on an update for the petmod, but when I try to install it, I get a blank screen. =(
Arrrrr!

Offline TechnoDragon

Re: Making Packages?
« Reply #41 on: March 11, 2007, 09:32:32 am »
basically only package up the update, then apply it...that should work.
Don't tell me to get into shape...I have a shape...It is round!


Offline Basil Beard

Re: Making Packages?
« Reply #42 on: March 11, 2007, 09:56:41 am »
I did. Its very strange. Should the XML file for the update be any different.
Arrrrr!

Offline Daniel15

Re: Making Packages?
« Reply #43 on: March 11, 2007, 11:06:08 am »
Quote
(note, in the future you can always pick up the most recent pet items at my forum in my downloads section.)
Sign up on dev.dansoftaustralia.net, and get Basil Beard to add you as a developer of SMFPets. Then, you can upload all your items there (into a seperate 'package') :D

Quote
What do I need to do different for updates? Like, I am working on an update for the petmod, but when I try to install it, I get a blank screen. =(
You can do what I do with SMFShop (update package), although it's not recommended (I have my reasons for doing it ;)).
In the package itself, add an <upgrade> section. Something like:
Code: [Select]
<!-- Upgrade from version 1.0 -->
<upgrade from="1.0">
<readme>upgrade_1-0_1-1-readme.txt</readme>
<modification format="xml" type="file">upgrade_1-0_1-1.xml</modification>
<code>upgrade_1-0_1-1.php</code>
</upgrade>
would be fine. Basically, add a <require-file> line for each changed file, put all the modifications needed into a seperate .xml file, and all the database changes needed into a seperate .php file.

Offline Basil Beard

Re: Making Packages?
« Reply #44 on: March 12, 2007, 05:47:19 am »
Yeah. I copied it based on yours. Yet I still get a blank screen when clicking the "apply link"

Your sever thing for like, testing packages doesn't appear to be on line. Maybe I made a dumb error and trying that(when it is back) will help figgure out what is up.
Arrrrr!