Insimenator.org

Sims 2 Community Downloads => Misc. Mods and Careers => Topic started by: albmont on January 21, 2007, 01:28:53 pm



Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on January 21, 2007, 01:28:53 pm
I wrote a script in R that can detect which packages were created with the old (and wrong) version of the Pets EP Body Shop.

Thanks to Delphy (that guided me in the labirinth of the DBPF format) and dmchess (for his perl code).

The source code can be found in the Sims2 Wiki project, at http://www.sims2wiki.info/wiki.php?title=Detect_Pets_Body_Shop_bug/Source_Code (http://www.sims2wiki.info/wiki.php?title=Detect_Pets_Body_Shop_bug/Source_Code)


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: ancienthighway on January 22, 2007, 12:07:41 am
Great job.  I'm going to have to give this a shot.  Just out of curiosity, since you can detect them, can you modify the program to fix them?


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on January 22, 2007, 06:22:15 am
Quote from: ancienthighway;539502
Great job.  I'm going to have to give this a shot.  Just out of curiosity, since you can detect them, can you modify the program to fix them?


That's the power of a collaborative effort - as Newton said, I just sat a little routine over the shoulders of giant efforts. But now I am in no condition to try to fix them - changing just one bit in a DBPF file will probably change everything. Try the instuctions in  http://www.modthesims2.com/showthread.php?p=1466927 (http://www.modthesims2.com/showthread.php?p=1466927) to fix those files using SimPe. And don't forget that you have to delete groups.cache.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: PiperK1980 on January 30, 2007, 10:47:26 pm
Maybe I'm just dumb, but I've never heard of 'R'. What is it and how do I do this code you speak of?


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on January 31, 2007, 10:18:21 am
Quote from: Piper1980;554372
Maybe I'm just dumb, but I've never heard of 'R'. What is it and how do I do this code you speak of?


R is nicknamed GNU/S, and it's the free source version of the S language. There's also a commercial version, SPlus, for this S language. It's purpose is handling statistical data, and it's optimized to do huge numerical computations (like mathlab and other vector-oriented languages).
 
But it's generic, and can easily handle those horrid dbpf packages, or create jpeg images as if it's a plotting language. The Windows version (which I use at work) and the Linux version (which I use at home) are almost 100% compatible, so when I play with dbpf at home I am doing something useful to improve my working skills, and when I work hard developing statistical analyses at work I am also improving my modding skills :-)

The syntax of R is very simple, anyone who knows C, fortran, mathlab, basic or any modern language may learn its basics in a few minutes.

Using R is very simple too. Just start the interpreter (in Linux, just type R at the command prompt, in Windows, click wherever you installed it), load the source file using the command source(name_of_filename.r), and run the function by typing its name.

For example, if you saved the script as "r_sims2_package.r", and you want to find which *.package files have the Pets Ep Bug, you do this:

(1) start R
#
# this is a comment in R - now you are using R!
#
# (2) load the source file
#
source("/path/path/path/r_sims2_package.r")
#
# (3) set the default working directory to the Downloads package of The Sims 2
#
setwd("/windows/Documents and Settings/TheSims/My Documents/EA Games/The Sims 2/Downloads")
#
# (4) run the script
#
find_pets_ep_bug()
#
# The script will list all *.package files that have the Pets Ep Bug.
#
# (5) Exit R
#
q()


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: BeosBoxBoy on January 31, 2007, 11:43:37 am
Piper1980: "GNU/S" or "R" is a fourth generation programming language that will have little use for the average computer user; with no disrespect to albmont,  albmont is doing work that is needed, but is in a form that most users will not be able to comprehend or willing to use.  Most computer users are completely lost without a graphical user interface, so albmont's posts are directed at those computer users who are comfortable with a more or less technical user of a computer rather than a casual user.  Whereas I find no difficulty in using his scripts or R-language, I have every confidence that it is quite beyond most people, like quantuum physics.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on January 31, 2007, 08:55:42 pm
Quote from: beosboxboy;554933
Piper1980: "GNU/S" or "R" is a fourth generation programming language that will have little use for the average computer user; with no disrespect to albmont,  albmont is doing work that is needed, but is in a form that most users will not be able to comprehend or willing to use.  Most computer users are completely lost without a graphical user interface, so albmont's posts are directed at those computer users who are comfortable with a more or less technical user of a computer rather than a casual user.  Whereas I find no difficulty in using his scripts or R-language, I have every confidence that it is quite beyond most people, like quantuum physics.


Now you are hurting my feelings [let's suppose for the sake of argument that I have any ]!!! Do you think those scripts would be more user-friendly if they had a GUI? That's something that could be done with a little work. R can use Tcl/Tk.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: BeosBoxBoy on February 01, 2007, 11:22:11 am
albmont, like I said above, I mean no disrespect, but after spending the past 5 years as an instructor at a mid-sized US university, I have discovered that even college level people get that slack face and blank stare when you start talking about code and languages.  My first years invariably think I am satan for even suggesting they do something without a GUI.  Perhaps 1 in 200 has used a DOS batch file or done anything from the command line in LINUX or another OS.

It is a common problem for us sort that do things like this and think it "normal" to know and do this sort of thing to assume that everyone will be comfortable with this level of use.  The sad reality is we are not "normal" by a long shot.  Probably more than 95% of all computer users have no experience of anything without a GUI, save perhaps they have seen the BIOS boot screen or whatever occurs before the OS loads.

I have been using computers since the days before GUIs were common, so I can say with some strong belief that GUIs made computers vastly more user-friendly.  So try to remember that The Sims 2 has a fan base of some millions of people drawn from all levels of computer experience, but the vast majority are not technologically erudite; indeed, for most of them, if it does not come with an installer and a desktop icon to start the programme, it is useless to them.

And truth be told, for most people, trying to sort through the R-language site to figure out how to install the language support files would be an exercise in futility.  So I assumed you understood and knew all this, and have likewise assumed your software was never intended for the common user.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on February 01, 2007, 06:55:35 pm
Quote from: beosboxboy;556299
albmont, like I said above, I mean no disrespect, but after spending the past 5 years as an instructor at a mid-sized US university, I have discovered that even college level people get that slack face and blank stare when you start talking about code and languages.  My first years invariably think I am satan for even suggesting they do something without a GUI.  Perhaps 1 in 200 has used a DOS batch file or done anything from the command line in LINUX or another OS.


This is scary. Maybe I deal with an elite minority, or maybe they can hide quite well the ignorance, but most people seem to understand when I suggest things done from the command line. But I never tried to teach computer stuff to a huge and unknown horde...

Quote from: beosboxboy;556299
It is a common problem for us sort that do things like this and think it "normal" to know and do this sort of thing to assume that everyone will be comfortable with this level of use.  The sad reality is we are not "normal" by a long shot.  Probably more than 95% of all computer users have no experience of anything without a GUI, save perhaps they have seen the BIOS boot screen or whatever occurs before the OS loads.


And with the increasing popularization of computers, this number tends to grow. But then how can I blame computer-challenged people, when I am cell-phone-challenged? I am absolutely unable to do even simple things, like disabling the alarm or setting the correct time in cell phones. (the number of people with cell phones is alarming; last year I saw a homeless beggar pick up an alluminium can and make a cell-phone call. I guess he was asking about the price of allumium in the Chicago Futures Market...)

Quote from: beosboxboy;556299
I have been using computers since the days before GUIs were common, so I can say with some strong belief that GUIs made computers vastly more user-friendly.  So try to remember that The Sims 2 has a fan base of some millions of people drawn from all levels of computer experience, but the vast majority are not technologically erudite; indeed, for most of them, if it does not come with an installer and a desktop icon to start the programme, it is useless to them.


Some things were made easier with GUIs, while other things are much harder. I hate to click deeper and deeper inside obscure and badly designed menus just to get what I could with a single command line. Windows is getting worse at each new version, with less functions that can be done with the command line.

But all those programs and tutorials are not for the vast majority of Sims users, they are for the tiny elite that knows how to download files, how to extract files to the The Sims 2/Downloads folder, and knows how to use SimPE to edit them.

Quote from: beosboxboy;556299
And truth be told, for most people, trying to sort through the R-language site to figure out how to install the language support files would be an exercise in futility.  So I assumed you understood and knew all this, and have likewise assumed your software was never intended for the common user.


It was intended for the user that has enough computer wisdom to install and run SimPE. It's simpler to install and run R than to install and run SimPE.

So, here I will ask again: if I can rewrite the R script so that it has some GUI interface, will it increase the utility of the scripts? Alternatively, I can pour my energy into other projects, like mapping useful information inside the packages.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on February 01, 2007, 07:08:57 pm
And just to show how annoyed I am for having my feelings hurt [is this a correct English sentence?], I have just uploaded an image of myself with a GUN!!! :-)))))))))))))))))


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: BeosBoxBoy on February 06, 2007, 02:55:36 am
Your English is mostly perfect, better than most of my American students. :lol:

*hugs* albmont - don't be hurt.  You are doing great and much needed work.  Besides, I like guns, they're sexy :lol:

But all kidding aside, a GUI would make this easier for the average Sim player (keep in mind most are 14-15 year old girls according to EA/Maxis)


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on February 06, 2007, 08:19:04 am
Quote from: beosboxboy;565063
Your English is mostly perfect, better than most of my American students. :lol:


That's because it's a learned language, that I write almost as much as I write my own mother tongue (Portuguese). That's Globalization :-)

Quote from: beosboxboy;565063
*hugs* albmont - don't be hurt.  You are doing great and much needed work.  Besides, I like guns, they're sexy :lol:


Guns are a kind of ultimate Evil here in Brazil. The laws treat gun ownership almost as hard as drug dealing, abortion or pedophily. Of couse these laws don't prevent gun shootings (nor drug use, etc).

Quote from: beosboxboy;565063
But all kidding aside, a GUI would make this easier for the average Sim player (keep in mind most are 14-15 year old girls according to EA/Maxis)


Ok, maybe tomorrow I will start working on it. It will be a nice passtime, as I get back to work (today is my last vacation day), and I can use the (real) excuse that learing to make a GUI will be useful for my work projects in R :-)


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: PiperK1980 on February 14, 2007, 07:17:07 pm
Thanks for all your help..........

I found the program, but how do I save the code? I know my way around the computer in and out but this program....grrrrr. I actually copy and pasted it into the workspace and when I put in the find pets bug it told me 12files processed. But it won't show me the files and I know I have more than 12. I changed the working directory. Is there anyway someone could message me in Yahoo Messenger, Windows Messenger or AIM or take the time over phone (I'll call cause I have unlimited long distance) and go through this with me? There doesn't seem to be many people doing this. Or I could just pay someone to take my clothing and hair and do it. I'm desperate. I'm about to get a new computer and I want those fixed.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on February 25, 2007, 10:38:46 am
Quote from: PiperK1980;579391
Thanks for all your help..........

I found the program, but how do I save the code? I know my way around the computer in and out but this program....grrrrr. I actually copy and pasted it into the workspace and when I put in the find pets bug it told me 12files processed. But it won't show me the files and I know I have more than 12. I changed the working directory. Is there anyway someone could message me in Yahoo Messenger, Windows Messenger or AIM or take the time over phone (I'll call cause I have unlimited long distance) and go through this with me? There doesn't seem to be many people doing this. Or I could just pay someone to take my clothing and hair and do it. I'm desperate. I'm about to get a new computer and I want those fixed.


Sorry to take so long to reply!

If the script said 12 files processed, and no file had the pets ep bug, then it means
that it scanned only 12 package files, and all of them were ok.

Where were those 12 files? I can't believe you have only 12 files in the Downloads
folder! Probably you must do this:

setwd("/path1") # set the path to where you placed the r script

source("filename.r") # load the r script

setwd("/Documents and Settings/TheSims2/My Documents/EA Games/The Sims 2/Downloads") # replace it with your Downloads folder

find_pets_ep_bug()

I will soon do a minor update in the Sims2 Wiki, but this should work.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: PiperK1980 on February 25, 2007, 04:31:20 pm
I'm pretty sure they were in my Downloads folder. I wasn't able to get it to work right. I'm not computer illiterate by any means, but this program is a bit advanced for my knowledge. I was able to fix the items, but I had to start the game in debug, and make a new sim. When I flipped through the catalog, it displayed the files names of the items needed to be fixed (it did that with all items). I wrote them down and manually did it in SimPE. I have no naked bodies, but I do have a few items that shows the female/male adult defaults in just outfits, tops and bottoms. I'm assuming I'm missing a mesh or recolor. I know who there from, just don't know which outfits they are so I can redownload them. I should just delete them. I have 13,000+ some in my dnld folder. WOW!!!


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on February 25, 2007, 08:14:49 pm
Quote from: PiperK1980;598261
I'm pretty sure they were in my Downloads folder. I wasn't able to get it to work right. I'm not computer illiterate by any means, but this program is a bit advanced for my knowledge. I was able to fix the items, but I had to start the game in debug, and make a new sim. When I flipped through the catalog, it displayed the files names of the items needed to be fixed (it did that with all items). I wrote them down and manually did it in SimPE. I have no naked bodies, but I do have a few items that shows the female/male adult defaults in just outfits, tops and bottoms. I'm assuming I'm missing a mesh or recolor. I know who there from, just don't know which outfits they are so I can redownload them. I should just delete them. I have 13,000+ some in my dnld folder. WOW!!!


I am not sure what's your problem. Did you re-run the R script? I have c. 7500 files, and it takes about 5 minutes just to count them! But the script runs in almost the same time; it should scan your Downloads folder in 10 minutes.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: JCSpencer on June 30, 2007, 08:04:33 pm
I need an aspirin.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on October 23, 2007, 04:40:10 pm
Quote from: beosboxboy;565063

But all kidding aside, a GUI would make this easier for the average Sim player (keep in mind most are 14-15 year old girls according to EA/Maxis)


After a looong time, I started recoding my R sims2 scripts to use a GUI. But I will place them, with examples (aka manual, but nobody rtms) in the Adult site - the examples start by taking up a nude model and adding clothes.


Title: Detect packages that were created with the old version of Pets EP Body Shop
Post by: BBoom on April 12, 2008, 07:16:45 am
Hi Albmont, Thanks for this great little utility. However, I would like to let you know that what  beosboxboy stated is quite right. Most gamers are so used to GUI format that they have a hard time trying to use a command line and deal with non-gui applications. Considering how complex SimPE is - despite the GUI- one could easily assume that if a user is able to tinker with SimPE, he or she could easily handle R as per your instructions. Unfortunately, that's not the case. Therefore, I highly recommend that you provide a GUI interface of your application along with a PDF or Text downloadable version of the source and instructions. Your application is awesome and deserves to be recognized and used by Sims 2 gamers. Thank you so much for your contribution and, please, don't feel offended! Those of us who are technically inclined tend to forget that a large majority of the population is not and may not easily understand computer jargon and coding. I know this for a fact since I am also an instructor and have had to "learn" to be "less technical" when dealing with my students. That said, keep up the great work you are doing creating useful and badly needed utilities for our community. I'll gladly help you within my capabilities, if you need someone to create the documentation. I wish I had your talent in coding, but I can assist you in other areas.


Title: Re: Detect packages that were created with the old version of Pets EP Body Shop
Post by: Xordaii on January 15, 2010, 02:41:40 am
Personally, yes, I have programming experience, and even enjoy programming assembly.

That aside, I have been using Linux a lot longer than I have been programming, about when I got married was my first experience in it, 15 years ago. Our kids could probably use this code with a little prompting. I think it has to do with what you are experienced with and used to, and how willing you are to learn something new. I tell everyone Linux isn't too hard, nor are command lines, my kids figured it out between 3 and 5 years old.  If kiddies can, you can.  If you read other posts by me, you know we all have learning problems, too.

Linux users are a lot more likely to use something that has to be run at the prompt.  Anyone who has experience with command line programs (Windows has these, too) will be willing to try it. I agree the average user won't, but it isn't like this is rocket science either. I think your instructions were very clear (even for inexperienced people, because I have never used R or S, and was completely lost.)  I think your programming has a certain elegance, too, with straightforward results and easy to figure out what you need to solve.  You even provided links to information on how to fix the files found.

Personally, I think if someone wants a GUI badly enough, they will either find a friend to write one for them and link to it here, as happens in Open Source a lot, especially if you give permission, or they will learn to use the scripts.  GREAT JOB! Don't let complaints make you feel bad.  The job you set out to code, you coded, and did beautifully. :D  Two thumbs up.


Title: Re: Detect packages that were created with the old version of Pets EP Body Shop
Post by: albmont on January 19, 2010, 09:57:52 pm
It's a long time since I got any reply for this - and I still plan to add a GUI. But I keep postponing this project...


SimplePortal 2.1.1