Following my research on how to delete visible objects from a prp, I have made a tool for hackers that does the tedious job for you.
This tool is a script that uses libHPlasma tools. It is written in VBscript, so Linux and Mac users will have to use it in a Windows VM or find a VBscript interpreter for their OS. Until I translate it in Python, that is.
Usage
PrpDelObj.vbs [name of prp file][Name of object]
The script needs two parameters:
1- name of prp file, with .prp extension, without the path;
2- name of the object you want to delete (specifically, name of plSceneObject).
You can start the script without arguments (by dbl-clicking on the PrpDelObject.vbs icon), in which case it will let you enter them in input boxes, or you can start it on the command line with the two arguments, such as in this batch file:
It is a good idea to make a batch file such as this, and then you can run it by double-clicking its icon.
Configuration
The script will need to know your local paths for the Uru files and the libHPlasma tools. It will read those from a config.xml file in the script folder. You can edit this file and change the default values with your own values.
The default content is this:
The only lines that need changing are the paths in the <clientconfig> part.
Function
The script will perform the following operations:
1- Copy the prp file from the Uru /dat folder into the script folder
2- Backup the prp file (because you won't do it even if I tell you to) the a /backup subfolder in the script folder
3- Delete all the object's drawables (by setting icicle length to 0 for all of the object's icicles)
3- Delete the object's collision mesh if any (by deleting the plGenericPhysical object)
4- Copy the modified prp file back to the Uru /dat folder
5- Delete the modified prp file from the script folder
For now the script does nothing else: it does not remove the plSceneObject or any of its interfaces, and does not remove the object from the plSceneNode. It does not delete the backup, so you should clean the backup folder as needed.
Because it calls the libHPlasma tools, you will see several DOS windows pop up and close. You must be patient, because some of the operations can take a long time, depending on the size of the Age, or more specifically on the size of the plDrawableSpans.
You must wait until the last DOS window has closed.
The script will create a detailed log file. You can look at it to check for errors.
The code is commented, so reading it can help you understand how a prp file represents visible objects. Looking a the log file and some objects exported in .prc files can help too.
Installation
Simply copy the files in the following zip file to any folder on your computer.