Information for object creators
Using Pi Sim Sounds with your objects:Pi Sim Sounds is free for anyone to use with their objects. We do request that you do not distribute the application with your objects to allow updates and upgrades to be released via our website. We request you place a link to the Pi Sim Sounds website with the object at (http://pisimsounds.parsimonious.org). Also, any object which makes use of the Pi Sim Sounds program must include the PSS_readme.txt file in the download for the users. We request you put whichever version of Pi Sim Sounds the object requires on the page as well as correcting the on stated in the PSS_readme.txt file if not already correct.
Should your object cause problems for the user, we request access to at least one copy for the object at no charge to attempt to diagnose to problem. This object will not be made available to others. If the problem is with the object we will inform you and redirect all emails to you.
Even if you are charging for objects which use Pi Sim Sounds, then a donation is not required but would be appreciated.
Creating Objects With Custom SoundsIn order to use Pi Sim Sounds, you will need IFF Pencil 2 or similar editor. There are 4 things involved in sounds for Sims objects.
1. FWAV section of an IFF object file.
2. Play Sound BHAV section command.
3. Sound File Format.
4. Associating Sound Files With In Game Resources (Or What Pi Sim Sounds does)
FWAV section of an IFF object fileObjects can have any number of sounds associated with them, and inside the object file, each sound has it's own FWAV section. The FWAV section is very basic, essentially all it contains is an index and a text string. The text string is actually an audio resource identifier or 'tag'. This 'tag' has to be unique for every different sound in the game. In order to change / add new sound to an object you need an fwav section identifying it. See below for how to determine a 'tag' from the filename with Pi Sim Sounds.
Play Sound BHAV section commandThe sounds are actually played during the execution of a behaviour. In order to play a sound, simply add the play sound command (function 23) to the BHAV section, with parameter 1 set to the index of the FWAV section you wish to play, and parameters 2, 3, & 4 set to 0. Parameters 2 - 4 can do other things but these are beyond the scope of this document. This is a fairly simple command. One thing to note, The Sims can't play a sound twice at the same time, so if you request it, and it is already playing, it ignores the second request. This also means if you wish the sound to loop, you need to ask for the sound to be played repeatedly, and it will simply play again once it has finished.
Sound File FormatThe placement of the sound file (which directory) is explained in the usage instructions.
The following are the KNOWN working formats:
Other formats may work but they have not been tested. The application currently installs (although they may not play) any file ending in .mp3, .wav and .ax.
Associating Sound Files With In Game Resources (Or What Pi Sim Sounds does)The actual problem with sounds is the associating the 'tag' text string mentioned above with an actual file and telling The Sims how to play it. The actual details of Pi Sim Sounds operation are not important, but basically it extracts the master sounds index file from the sounddata.far file, scans it to see which sounds ID's are not in use and then adds the sound files in the PiSimSounds directory. The program generates unique 'tags' for every audio file based on it's file name.
The 'tag' is created by starting with "PSS_" then the filename (converted to lower case although the tags are case insensitive), with all spaces and periods converted to underscores. See the examples below:
"happy birthday.mp3" => "PSS_happy_birthday_mp3"
"apples.and.orranges.wav" => "PSS_apples_and_oranges_wav"
"SIMPLE.AX" => "PSS_simple_ax"
The PSS_ is to help ensure no sounds clash with existing sounds. The following naming convention is recommended for all audio file names:
The reason for this is the user can sort the sound directory by name and all the sounds associated with a particular object will be together and identify the object they relate to. E.g.:
If an object (myneworgan.iff) has 3 sounds, (play, close, and open) all in mp3 format, the recommended names would be:
The sounds 'tags' would each be:
This means the user can easily find the sound files for any object should they wish to remove / re-install the object, as well as enabling the object which uses any sound to be identified.
Any further questions?If you have any questions regarding the use of the program, or if you have requests / suggestions for improved functionality, please feel free to email me.