Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: maxim4o on August 19, 2008, 07:11:04 am
-
I could find the VP file specification - http://www.hard-light.net/wiki/index.php/VP,
so I am beginning to develop a new VP viewer, creator, and editor - VPEdit... For now only the read library is done, and user interface is still very primitive...
Also, I the full VP read support is less than 90 lines of code. VPEdit uses .NET as a platform and should run on Linux, too (using Mono), because it is not using any platform-dependent resources.
-
Well there's already a very good VP editor out there (Maja), but go on.
-
He has had issues with Maja (http://www.hard-light.net/forums/index.php/topic,55882.0.html). Besides, it never hurts to have more tools.
-
I have finally finished a somewhat-functional version of VPEdit.
It is able to open and create new VP files, export them, and edit the text files.
It needs two working directories, a main and backup ones.
The backup is used to restore the originals of edited files. While a file is being edited, its original copy can be restored from that backup folder.
Enjoy.
Edit: oh by the way please notify me of the bugs you encounter...
Yes, VPEdit requires .NET Framework 2 on WIndows, it is installed automatically...
I hope I will think off something for Linux, too...
[attachment stolen by Slimey Goober]
-
I have finally finished a somewhat-functional version of VPEdit.
It is able to open and create new VP files, export them, and edit the text files.
It needs two working directories, a main and backup ones.
The backup is used to restore the originals of edited files. While a file is being edited, its original copy can be restored from that backup folder.
I tested it, interesting tool tnks.
A note for you to consider:
You might want to add an option or restrict the amount of aplications the program can cast, I started looking some of the ani files and when I closed VPview I had like 30 windows showing the anis and they were still going, you can make all of the other windows to close when the main program is finished and also restrict the amount of windows that can be opened with an option or something if you like.
-
Yes, a nice idea indeed!
I am also considering drag-and-drop support, what do you think?
-
it's a good idea, but what are you suporting on draging and droping? like making a copy-past from one ani to another... or a .tbl onto another .tbl right?
You could first add support for multiple vp's working at the same instance or program, that way dragging and droping will show it's real potential.
-
Well it's like dragging the TBL from Windows Explorer and it's added in the corresponding VP folder.
And yes, I will add tabs, but I will first do the drag-and-dropping.
-
good, I can peek a little at it when you are done. ^^
-
Version 0.11 is ready.
Here's the new:
-When closing VPEdit the user is prompted to close all applications opened by VPEdit(idea by Rodo)
-Drag-and-drop support for the tree view and the edit field, files and folders can be dragged into the list view, and supported text files and plain text can be dragged into the edit field
-And an About menu entry too :)
Edit: i totally forgot, a New File button too - creates an empty file.
[attachment stolen by Slimey Goober]
-
Version 0.11 is ready.
Here's the new:
-When closing VPEdit the user is prompted to close all applications opened by VPEdit(idea by Rodo)
-Drag-and-drop support for the tree view and the edit field, files and folders can be dragged into the list view, and supported text files and plain text can be dragged into the edit field
-And an About menu entry too :)
It works just fine, I just copyed an entire tango vp and the files work ok, the closing menu helps a lot and works just fine.
A drop list menu when clicking with the right button over the files would also be usefull as everyone tends to edit the files name and everything else by doing so, but it works just fine, nice work, and really fast indeed.
-
Version 0.11 is ready.
Getting a Unhandled exception as soon as both paths are entered for install.
Tested earlier version with same result.
************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'VPEdit.exe' is denied.
-
Thanks for reporting that!
Could you specify the paths you entered? They should be with full read/write authorization.
-
Thanks for reporting that!
Could you specify the paths you entered? They should be with full read/write authorization.
Just noticed that some of the vp's I was testing it with had the attributes set to RA instead of A. It doesn't like that :p
Associated vp with VPEdit and it went through the "find the folders again" It's doesn't seem set up to handle file associations though.
Is there any real dis-advantage to the software creating both the folders in the VPEdit directory. Only one of the folders held files during edit, the other remained empty.
-
That's strange - I entered the same here and there weren't any problems...
By the way, what OS are you using?
Edit: ops. late post
I am still trying to figure out the file associations... Will be there soon, I am working on a tabbed interface for now... Harder than I thought!
-
By the way, what OS are you using?
XP sp2
-
VPEdit 0.12 is ready.
The new:
-Tabbed user interface(right click on tabs to close etc.)
-.VP extension association(via the More menu or during the first-start settings dialog)
-Full drag and drop inside the tree list(you can now move the folders in there just like you do in Windows Explorer)
-Directory extract(extracts the opened tab content in a chosen directory)
-VPEdit now has an "icon"
-And some little fixes here and there
Edit: I had no time to test, I suppose there will be issues with the tabs...
Please tell me about any bugs!
Enjoy.
In the new version I will be adding a right-click menu on the tree list.
[attachment stolen by Slimey Goober]
-
Just curious is there any size limit to the VP files it can open? Quite a few of the viewers choke on anything over a gig.
-
Well it should open vps over a gb
The problem here is the hdd space
Excuse me for any typos i am postin from my cell
-
You moved "open vp" to import, but it will still crash if the vp is read only. The association part worked well.
It created a 1.2gb vp without a problem and vpwiew32 opened it without difficultly.
When opening a large vp, all directories are open showing every file which means a lot of scrolling. A better option may be to start but only show just the directories under data.
Minor stuff
Directory extract - Extracts everything in the vp (eg with maps directory selected) Just rename to extract all.
very minor stuff - The date stamp for all files in the created vp was set to 1/01/1970
-
He's invented a time travel program! :p :lol:
-
Ops now, I forgot to set the time :D
Actually I can't figure out how exactly to produce Unix time? :lol:
-
when opening huge vp files such us the new media vps, the program takes a long time to open, that's the only thing I've noticed so far.
-
Yes that is because it unpacks the entire VP file into the work directory.
I have to think of a way to minimize the performance impact though.
-
VPEdit 0.13 is ready
-a context menu is added for the tree list
-read-only VPs can be imported, too
-entries get correct timestamps when VP is extracted(at least I think so :D)
-Extract directory renamed to Extract all
-Better handling of some errors
I have added a version without installation too, you can try if it works on Linux :)
Remember, you need to install Mono on Linux first(and do not set file associations)
[attachment stolen by Slimey Goober]
-
Found another crash. In the tabs if you select close all except this tab you get
************** Exception Text **************
System.IO.IOException: The directory is not empty.
May be clearer to rename close file to close tab and export all to export tab :nervous:
When closing a tab that had saved a new vp I got this.
************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\FreeSpace2\a\1'.
This app *can delete* the directories used in the setup phase. (on some crashes) I wasn't 100% sure before due to testing it late. You may want to take creation of those directories out of the users hands. It will recreate them but any other data in them is gone.
-
Happy New Year by the way!
It crashes this way because it(for now) tries to delete the entire directory, and if the directory is opened in Explorer or some other program... you know what happens :D
That's why the program is still 0.1x, because it's pretty unstable... I hope some work will bring it closer to Maja...
-
Happy New Year by the way!
Cheers ;)
The thing is, you are asking people to choose two directories. So one of my choices the day before was C:\FreeSpace2 ;) Some people here may have a minor problem with this :p
That's why I'm wondering why the directories are a user choice. Shouldn't the software create it's own working directories leaving a users data safe. If someone set their mod directory as a path, with no real backup it could be a bit more than a minor issue.
-
Lol I have never thought of that.
Reminds me of a CD burning program that had an option "Delete files' folder after burning".
If you selected that option and added something directly from C:...
I gets fun! :D
I will make the folders not be deleted entirely, but just emptied of their contents.
This will fix many bugs I hope.
Any suggestion about the "hard-coded" temporary folders?
It should be something the user isn't going to create in the VPEdit directory... this way his info might be overwritten!
-
A user won't be messing about in the VPEdit directory. Keep your software seperate from the data. If it is in Program Files then there are two ways to use it. Either from the start menu or from association with a vp.
Keep the working directory in the VPEdit directory. You will either be importing files mostly from a data\* directory to create vp's or as a viewer/extractor for vp's
Do you really need the backup directory? How do you use the current backup folder? When saving a vp with the same name you get the standard do you want to replace? dialog box
-
For now the backup directory saves only the currently edited file, so it can be quickly restored to the original one.
However in that version I am adding a new option.
In when extracting a VP another VP is overwritten, if VPEdit crashes both VPs are gone.
Now there is an option to move the overwritten VP file to the backup directory, so it will be safe there, and even if the program crashes, the VP file will still be in that backup folder.
Additionally, VPEdit now notifies the user when the backup directory isn't empty, and asks if it should be emptied.
-
Why not rename the old one to file.bak write the new one, when that completes delete file.bak
-
Well I guess I can remove the backup directory...
-
VPEdit 0.14 is ready
-the backup directory is gone
-directories are now emptied, not deleted entirely
-a new About box
-optional backup for overwritten files during export
-the working directory is no longer chosen by the user - however it can be changed by editing the config2.txt file in the VPEdit folder
Enjoy! (I have added a noinstall version, too, hope it works on Linux)
[attachment stolen by Slimey Goober]
-
I get an access error every time I try to import any VP, I checked the maindump folder and edited it so it's r/w able but it still crashes.
Is there an error log where I can get the message from? it's quite large to type directly.
might as well want to disable the export button if the explored vp contains no files.
-
@Rodo
Did the program ask you about new first-start settings?
You can try to open config2.txt in the program folder and post it here.
By the way I-ve found a bug by myself - the Backup option isn't saved in the config file except the first time the config file is made.
-
@Rodo
Did the program ask you about new first-start settings?
You can try to open config2.txt in the program folder and post it here.
By the way I-ve found a bug by myself - the Backup option isn't saved in the config file except the first time the config file is made.
It did asked if I wanted to make back ups and if I wanted to make VPEdit as the default .vp tool, I checked both.
the config file seems to be congruent with my earlier choice.
-
That's good.
Can you post only the exception text(it's usually only one row).
It should say something like System.xxx.xxx.xxxException.
-
I tested VPEdit_0_1_4 on MacOS X and Mono2.0.
Is is importing a vp-file but I get this files in the parent folder -> see PNG
so I think the file-management is windows only and it will most likely run with the same issues under Linux
[attachment stolen by Slimey Goober]
-
Well anyway it is good that it runs.
I will try to improve the file management.
By the way what is the directory separator on OSX?
-
System.unauthorizedAccessException: Access to the path 'C:\VPedit\maintemp' is denied.
Already checked changing the properties of the folder and putting it into read and write enabled but it keeps coming back to read-only, I'm guessing is that what's bugging the program.
-
Well anyway it is good that it runs.
Indeed. :yes:
By the way what is the directory separator on OSX?
Downloads/VPEdit/VPEdit.exe, so /, same as on Linux I think
-
Some of the FSPort vp's crash VPEdit.
************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'C:\VPEdit\maintemp' is denied.
Maja reports
Note: Imported VP lacked ending backdirs
http://fsport.freespacemods.net/releases/fsport-hi_res.zip (http://fsport.freespacemods.net/releases/fsport-hi_res.zip) fsport-hi_res.zip is the smallest zip I could find - 6Mb
-
I got to make it able to open VP files with little defects...
I am not able to open some Babylon Project files too.
-
VPEdit 0.15 is ready, it is a small release
-directory separators are no-longer hardcoded, the program should work well on other OS-es now
-when setting the backup option from the menu entry in VPEdit the change is saved in the configuration file
-packages with corrupted dirs, backdirs, and nameless files should be opened flawlessly now, the program gives a report of the errors after import is finished
Enjoy :)
noinstall version is added again
[attachment stolen by Slimey Goober]
-
It handled all the vp's without problem. ;)
The warnings on some of the packages may be a bit strong. For a zip file when I see the word corrupt it usually can't be opened. Maja's way of describing the problems is a bit more restrained Note: Imported VP lacked ending backdirs - Basically a small technical error rather than should I trust any of the data in the corrupt vp.
If you start a new project and import a maps directory, (forgot data) Then create a new dir and rename to data, and then drag maps onto data.
When you export the vp, you end up with
--data-------->maps
--maps
The other option would be to place any imported directory (except data) in data
-
Yes will check that problem.
-
VPEdit 0.16 is ready - only drag-and-drop improvements here
-drag-and-drop bugs reported by Water should be fixed
-drag-and-drop between tabs
-not so strong warning on package damage
Enjoy!
[attachment stolen by Slimey Goober]
-
VPEdit 0.16 is ready [...]
-not so strong warning on package damage
Enjoy!
Impressive! Works well on MacOS X, too. :yes:
Small typo in the "damaged VP" info :)
-
Impressive! Works well on MacOS X, too.
Great! I got to VPEdit as good as possible overall, because after 2 days school begins :( :mad:
By the way, did anybody test it on Linux(I think that if it runs under MacOS X, it will run on Linux too)
I will work on the typo too :D
Any suggestions for 0.17?
-
Minor install bug. ;)
Wants to make work directory R/W, tries and fails. (doesn't exist yet)
Once the program is launched it creates the work directory
Another crash
************** Exception Text **************
System.IO.IOException: Source and destination path must be different.
New project
import map directory
import model directory
create new directory
Drag both onto new directory
Rename new directory to data
Since it's still called New Folder - rename again - then it crashes.
Suggestions: Add the first two icon tasks to the import menu eg.
Import Files(s)
Import Directory
Would it be possible to add another two items - Export File(s) and Export Directory
If it could remember the last used import and export directories from the last session would be good.
-
So you renamed it and it still was New Folder?
-
So you renamed it and it still was New Folder?
Yup. If you name it and drag the other folders onto it then it's fine. But if you try rename it to data with folders inside it, the first time doesn't work. Second time crashes.
-
Yes, I figured it out it's because of the sorting...
I fixed, gonna add some other things and release.
I got a plan for dropping from the list to explorer directly, but it's not that easy...
I can't think how will I drop 2 different data types- one for the internal drag-drop and another for the external.
-
I can't think how will I drop 2 different data types- one for the internal drag-drop and another for the external.
What's the issue? I know a thing or two about Java (although I've never used the built in dnd classes), maybe I can help.
-
Well nice you want to help.
The issue is that I have to do two things when dragging and dropping an item from the tree list:
1. If the item is dropped into the same tree list or in a tree list in other program tab, moving the item must be done
2. If the item is dropped outside the program, copying must be done
I can now either do internal dropping or do external dropping. But not both,
because the DataFormat for dropping a item in the tree list is absolutely different from the DataFormat for dropping the item in Explorer, for example.
I can't carry two DataFormats with one drag-drop. I can change the DataFormat that is used for the tree list, but how can I identify where the item is dropped - outside or inside - there are no notifiers...
-
VPEdit 0.17 is ready
-added Import directory, Import files, Export selected directory, and Export files from selected directory in the menu
-Renaming bug should be fixed
-new icon added(the previous was really unhealthy for the eyes :D)
-the Export entries now refuse to export if there are no files in the selected tab
Enjoy!
[attachment stolen by Slimey Goober]
-
The drag and drop seems to be ok. Get a minor error about lack of directories on open (after renaming a non empty data) If I do it properly it's fine. (create data and then drag stuff on to it)
Crash on exit - Caused by viewing item in external application. eg. PCS2, Infranview
VPEdit will then crash on each attempted start until the external application has been closed. (maintemp not empty)
************** Exception Text **************
System.IO.IOException: The process cannot access the file 'C:\VPEdit\maintemp\1\data\maps' because it is being used by another process.
I hope these ones are minor :nervous:
Crash exporting single file
************** Exception Text **************
System.IO.IOException: The filename, directory name, or volume label syntax is incorrect.
Crash on exporting directory
************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\FreeSpace2\TVWP\data\intelanims\JC.ani'.
-
Yummy so many bugs :)
For the crash on exit - the external application opens the file from the external directory. If a file is used the directory cannot be emptied(which happens after closing).
After that, at startup, it tries to empty the folder again, but if a file in it is used, it fails again.
Get a minor error about lack of directories on open (after renaming a non empty data) If I do it properly it's fine. (create data and then drag stuff on to it)
Hmm, I couldn't understand that?
Yes, the others are minor, it's a new functionality :D... Do errors occur with them all the time? Because they mostly work on my PC.
-
Yummy so many bugs :)
Yes, the others are minor, it's a new functionality :D... Do errors occur with them all the time? Because they mostly work on my PC.
The export directory problem - I have managed to get it to work a couple of times. But couldn't figure why it worked those times.
The export file problem- crash every time.
Get a minor error about lack of directories on open (after renaming a non empty data) If I do it properly it's fine. (create data and then drag stuff on to it)
Hmm, I couldn't understand that?
New project
import map directory
import model directory
create new directory
Drag both onto new directory
Rename new directory to data (renaming and crash bug gone ;) )
Export vp
open vp by association
Gives warning about lack of directories
-
Thanks for the feedback!
I will try to fix that tomorrow...
-
By the way, how does extracting multiple files work? When a directory is selected and Extract files
clicked there is a dialog allowing you to select files to export.
-
Sorry about not responding, if you need help, be sure to look at Java's API first (this is in Java, right?)
-
No, it is in .NET.
I think it's much better platform than Java :)
-
VPEdit 0.18 is ready - only bugfixes in this release
-Export files should work now
-Export directory should also work
-Work dir is not cleaned if the user hasn't closed all processes, associated with VPEdit
I couldn't fix the "lacking directories" bug, I couldn't replicate it :(
Now the files are on a server:
http://maxim4o.110mb.com/VPEdit_0_1_8.zip (http://maxim4o.110mb.com/VPEdit_0_1_8.zip)
http://maxim4o.110mb.com/VPEdit_0_1_8-noinstall.zip (http://maxim4o.110mb.com/VPEdit_0_1_8-noinstall.zip)
I am adding them as attachments too.
[attachment stolen by Slimey Goober]
-
By the way, how does extracting multiple files work? When a directory is selected and Extract files
clicked there is a dialog allowing you to select files to export.
Well to be honest, without your explanation I wouldn't have figured it out. I had tried to select multiple files but couldn't. Selecting a directory first seems a bit strange, but it does work. :p
If that stays as the standard, you may need to have a tool tip or a small help note about exporting multiple files.
Also you do have to click twice per file though, once to select the file, and then again to get the tick box to select.
Still crashes on quit if another process is still using maintemp. Any chance they can be opened in memory only?
-
Still crashes on quit if another process is still using maintemp. Any chance they can be opened in memory only?
I fear not, I am not sure there is a way to achieve that. I can copy the file to other directory, but I got no way to identify when it is saved, to copy it back to the work dir.
-
Haha, from the error type names I assumed it was Java.
Are the errors serious, or are these just being generated by people trying to break it on purpose?
Edit:
Can't you check the files' timestamps whenever the next operation that would affect stuff happens?
-
Are the errors serious, or are these just being generated by people trying to break it on purpose?
Some are, some are not. VPEdit still isn't very stable, and doesn't handle errors well...
For example, the renaming bug wasn't so serious, but the Export file and directory bugs were. I don't have much time to test for bugs myself...
So I release it to the community, where it can be tested well. :D
The good thing is that, while buggy, VPEdit can very hardly "trash" a VP file. I had such issues with other VP tools, where a VP file is "destroyed" by errors during writing, and I have tried to minimize them as much as possible in VPEdit. Just enable the backup option and your VPs will be safe. :)
-
Still crashes on quit if another process is still using maintemp. Any chance they can be opened in memory only?
I fear not, I am not sure there is a way to achieve that. I can copy the file to other directory, but I got no way to identify when it is saved, to copy it back to the work dir.
Oooopps. I didn't check for any of that. Edited a texture map and saved ok. For PCS2 you do need to know where to save the pof - saved ok.
New crash. Importing a file that already exists.
************** Exception Text **************
System.IO.IOException: The file 'C:\VPEdit\\maintemp\1\data\models\chaos.pof' already exists.
-
Yeah I still haven't handled that...
I consider adding an Open in external program button on the built-in editor... for more specialized editing.
Also a Find tool for the editor - I think it's pretty needed sometimes.
Edit: I won't be here for a couple of days probably.
-
Ouch. I said several days... and it became several months.
Sorry for that, I will continue developing VPEdit, but I have no time just now.
I think that a complete rewrite will be needed for v0.20.