|
The Problem:Whenever someone comes to your palace and puts on a prop, that prop is saved in the pserver.prp file on the server's host machine. So, for anyone running a palace at which custom props are allowed, that means your pserver.prp file will grow over time until it becomes unmanageably large. To solve this problem, you can flush props in god mode using `flushprops; however, this will not only flush the props other people have brought to your server, but also the ones you have put there yourself and want to keep. How can you flush the props you don't want while keeping the ones you do? Below, I provide two solutions --- one doing it by hand, the other using a bot + room script combination. Even if you go with the latter solution, I recommend you read both methods so that you understand the basic concept behind the scripts. I have used this system at Catch 22's palace, Paradox (palace://neon.communities.com:10180), as well as Virtual (palace://virtual.dyc.edu:9998), and have never lost a prop. |
||||||||||||||||||||||||||||||||||||
How to backup your props by hand:Here's how you can prevent loosing props from your server. This is especially important when flushing props, but it will also prevent props from getting lost in other ways. First a warning: Props are stored in two places, at the client end (in the palace.prp file) and at the server end (in the pserver.prp file). It is important to keep this in mind: just because you see a prop at your palace, doesn't mean your server has it stored in its pserver.prp file. This can cause confusion because you may see a prop and think your server has it stored, but it does not! That prop is actually *only* in your client's palace.prp file. If someone else who doesn't have the prop in their client's palace.prp file goes into the same room, they will not see that prop. How to know what props your server has stored in its pserver.prp file? The trick here is to use a virgin palace.prp file for your client, one that has never been used before. You can download one form the palace website. When you then go to your palace, NONE of the props stored on the server will be in your client's palace.prp file. When you go to a prop dispenser room (or enter a storage room with looseprops), the prop MUST download for you to see it. If it does not download, then you know the server doesn't have that prop stored. Now, about flushprops. Your server's pserver.prp file will grow as people come to your palace. If it gets too large, it becomes very inefficient, so you want to flush away props to keep it as small as possible. But how do you flush away the props you don't want and keep the ones you do want. Here's step by step instructions: 0. Make sure that all the props you want to keep are backed up in your client's palace.prp file. Make several backups of this file on separate disks JUST IN CASE!!!! 1. Make sure that all the props you want to keep are placed as loose props in storage rooms or are in prop dispenser rooms. 2. Start up your palace client with a virgin palace.prp file. IT IS CRUCIAL THAT IT BE A VIRGIN FILE! 3. Go through all your storage and prop dispenser rooms one by one. As you do, you will notice that the props are downloaded to your client. When this happens, the props are flagged as having been recently downloaded. Be careful, if you miss a prop, you may loose that prop upon flushing. The crucial point is this: you must force a download of all the props you want to keep. 4. In god mode, issue the following command in the dialogue box: `flushprops 1 This will cause all props which have not been downloaded in the past 1 days to be removed from your server's pserver.prp file. Since you just caused the props you want to keep to download in step 3, these will not be flushed. 5. You can check to see that you have not lost any props you want to keep by starting up your palace client again with a virgin prop file and then going through the storage and the prop dispenser rooms. If any of the props do not download, the server has lost those props from the pserver.prp file. 6. If you have lost any props, start up your palace client with your backup palace.prp file (step 0), connect to your palace, and simply drop the lost props *anywhere*. Go back to step 5 and repeat it to make sure you have all the props this time. You can repeat 5 and 6 until all the props are back. You almost never have to do steps 5 and 6. But, they are a good idea just in case. (Always have backup plans in case things go wrong for some reason.) |
||||||||||||||||||||||||||||||||||||
An Automated Backup System Based on the Above:With over 800 avs (about 4000 props) at Paradox, Catch 22 and I quickly realized how onerous the above task was by hand! I then set myself to writing a bot backup system. This entails running a client with a special cyborg.ipt file (the bot) and putting special prop dispenser scripts into the rooms. The following two links give you the bot and room scripts. Please note: make sure you understand what the scripts are doing and adopt them for your palace. cyborg.txt (Please read the terms of use!)
The following explains the features of the prop dispenser rooms and . There are three sections: A. ON BACKING UP explains how to run the bot. B. ON RECONSTRUCTING THE PSERVER.PRP FILE describes how to use your palace.prp file to recover all your props should your pserver corrupt the pserver.prp file. C. ON CREATING A NEW PROP DISPENSOR ROOM explains how to add new prop dispenser rooms to your palace.
A. ON BACKING UP: 1. Put a virgin Palace.prp file in the client folder. 2. Put the appropriate Cyborg.ipt file in the same folder. 3. Start up the client. 4. Log onto your server. 5. Wiz up so that the bot can run scripts even when scripts are off. 6. Say 'start' (without the quotes). 7. After some time (5-10 secs per av), the bot will return to the gate. It has cycled through all the props by this time. 8. Shut the client down and save this palace.prp file, just in case. You will not see the props if you open up your prop bag, but they are there nonetheless --- the client's palace.prp file holds props in two ways: those which you can see when you open up the prop bag, and those which you cannot. Nonetheless, the later are still there and are accessible via the prop id numbers. This file can be used to reconstruct the server's pserver.prp file as discussed in section C below. (Whatever you do, however, don't purge this prop bag!!!) 9. If you want to stop the bot at any time, just say 'stop' and it will return to the gate. If you want the bot to restart at a certain room number, just say 'restart 777'.
B. ON RECONSTRUCTING THE PSERVER.PRP FILE It can happen (as it did once at Paradox) that you loose the entire pserver.prp file. Again, you should back this file up, but what happens if you loose it? You can reconstruct it from the palace.prp file that you saved in step 8 above. 1. First, let me explain how you can access those props which you cannot see in your prop bag. If you start up your client with the palace.prp file after step 8 above, and you issue the following iptscrae in the dialogue box, you will put on the lost av. /[ lost_prop_ids ] SETPROPS You can then take the pieces off and put them in the server ... thus recovering the av. 2. Of course, proceeding via just step 1 is tedious if you have about 800 avs to replace. Luckily, you can run a two bot combination which will completely reconstruct the pserver.prp file by forcing the lost props to upload and then download again. In so doing, they are stored in the pserver.prp file and ... voila! ... a new pserver.prp file. For pcs and macs, you will have to start up the pserver with a virgin pserver.prp file which you can get from the palace website. For unix boxes, you can just create an empty file called pserver.prp and that will do. 3. Once your pserver is running with the virgin pserver.prp, start up one bot (the leader) with the palace.prp file from step 8 above. Start up a second bot (the follower) with a virgin palace.prp file. 4. Start the leader bot going, and then a few seconds after, start the follower bot. 5. As the leader bot puts on the lost avs, the follower bot forces them to be uploaded to the server and then downloaded again; thus, saving the uploaded avs in the pserver.prp file 6. Once the two bots have run their course, return with a client running a virgin palace.prp file and check if the lost avs have been replaced.
C. ON CREATING A NEW PROP DISPENSOR ROOM: THE THEORY: The prop dispensor rooms must be linked together in what is called a "linked list". What this means is that each room must "point" to the next room in the list. Eg. At Paradox, the prop rooms are linked as follows:
What does this list mean? When the bot starts, it goes first to the first room in the list, room 98 (Women 1). After it cycles through all the avs there, it then goes to the next room in the list, room 109 (Women's 2), because that is the room that 98 points to next. It then keeps repeating this in the order of the list: 98 -> 109 -> 96 -> 155 -> 156 -> .... -> 86 PLEASE NOTE: The order of this list has nothing to do with the order of the room numbers, nor the order in which the rooms are in the palace's Room List. (The latter can be changed using `uplist and `downlist). It is, however, the order in which the bot will go through the rooms.
In theory then, how do you insert a room to the middle of this list? Suppose you create a new room, room 200, and you call it Women 10, how do you insert it in the list after Women 9 (160), but before Chich's b/w Women (161)? Right now, the way the list goes is ..... -> 160 -> 161 -> ..... Well, first change room 160 so that it points to 200, and then make room 200 point to 161 and voila, you've inserted room 200 like this: ..... -> 160 -> 200 -> 161 -> .....
That's just the theory. How do you make a new room in practice then?
THE PRACTICE: 1. Go into any of the prop dispenser rooms and duplicate it using `duplicate. 2. Change the name of the room to whatever you want. 3. Open up spot number 3. 4. In there you will see code which looks like:
[[ -1299863329 -1299863335 -1299863339 -1299863346 -1299863353 -1299863362 ]
Put the prop id numbers between [ and ] brackets and put them inside the array. For instance, suppose the prop ids for a three prop av are -1111111111, -2222222222, -3333333333. You want to add that av to your room. Change the above code so that it reads:
[[ -1299863329 -1299863335 -1299863339 -1299863346 -1299863353 -1299863362 ] Note: A maximum of 31 avs per room. Better yet, keep it to about 28.
5. You've now added the avs, but you have to insert the room into the linked list. Suppose the room number is 200 and you want to insert it between rooms 160 and 161. Then, in room 200, open up spot number 1. You will see code which looks like the following towards the bottom:
ON ALARM {177 GOTOROOM
Since you want room 200 to point to room 161, change the number 177 (or whatever it is) to 161 so that the code reads:
ON ALARM {161 GOTOROOM
Now room 200 points to room 161.
6. Now go into room 160, and open up the same spot, spot number 1. It should read:
ON ALARM {161 GOTOROOM
Since room 160 points to 161, you will see that room number there. But you don't want 160 to point to 161, but to 200, so change it to:
ON ALARM {200 GOTOROOM
Now room 160 points to 200, room 200 points to 161 and the rooms are linked as follows:
..... -> 160 -> 200 -> 161 -> .....
Room 200 has now been inserted into the linked list. When the bot moves throught these rooms, it will proceed to back up 160, then 200, then 161. |