Thread Tools
Old December 2, 2002, 19:19   #1
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
CTPEd 0.5.0beta
Time for a new thread...
(Old thread at http://apolyton.net/forums/showthrea...threadid=50102 )

OK, I've been working away slowly at this for a while and am now prepared to release another version.

CTPEd will (should!) allow you to edit many of the various CTP2 data files (advance.txt, etc.) through a graphical interface to speed mod development, decrease the chance of errors and help in any other way I could think of and have had time to code.

Other features of note:
- A Great Library (GL) tool which allows use of templates to quickly generate many GL entries.
- The ability to quickly make mass changes to entries in a data file.
- A sorting tool to rearrange the entries of a file
- A means to easily generate repetitive SLIC code

Should be available at:

http://ctpmodmakers.250free.com/JBTW/CTPEdit.zip
(current version 0.5.0beta - check the last available update on the thread and if that is a later version then download it after this)

Unzip to a temporary directory and run Setup.exe. The setup program is a bit crummy but appears to work. The default install path is in Program files - but I recommend you change this to something like [Your CTP Path]\ctp_data\CTPEd\, but it's up to you.

Or, if you want an update to a previous version use:
http://ctpmodmakers.250free.com/JBTW/CTPEd050.zip

Have a go, but remember:

READ THE README before you start! It will not correctly execute until you have followed the instructions therin.
If this screws your computer up, I'm sorry but hard luck. Backups are always a Good Thing.
This is tested only under Windows XP.
This is a beta version. Expect bugs.
READ THE README!

Feedback always welcome. Bug reports and any other comments to this thread, or if you prefer privacy to jjb48@cam.ac.uk

Last edited by J Bytheway; April 24, 2003 at 05:46.
J Bytheway is offline  
Old December 2, 2002, 19:19   #2
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
New in version 0.5.0:

- Added sort tool
- Refined the GL tool further to get you even more space should you need it, and considerably sped up the interface refresh rate
- Added support for editing Newsprite.txt (This necessitated changing the project file format *again*, so projects from prior versions will no longer work - please reload from *_gamefile.txt
- Extended the GL template system, adding further syntax and the abilityto use script files to automate things further
- SLIC template processor tool (using the same (newly extended) template system as the GL)

Still on the to do list (down to just 9 things now - sorry about the continued lack of multi-language support):

- Add error checking systems to allow you to track down problems before you crash CTP2.
- Option to hide fields which are superfluous or always set to the same thing (e.g. Branch in advance.txt).
- Dropdown list for field values with only certain options like CanSee:.
- Multi-language support.
- Track modification to remove unnecessary overwrites on export.
- Make it possible to see more than one of a multiple field at once.
- Support for DiffDB.txt, map.txt.
- Multi-entry copy/cut/paste/delete.
- Make project files portable by saving relative paths rather than absolute ones
J Bytheway is offline  
Old January 1, 2003, 19:28   #3
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 13:57
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
OK finally I found some time to test your latest version, John.

First I made a *.ces file for the specattack.txt. I would like to be to put everything like I want between the fields. The original file has a new line for every entry, it has two fields, without a new line in between so far I was only able to generate a file with two spaces in between of the two fields.

Another bug I found is that it doesn't work anymore to open another file of the same type. I get instead of the second file an error message:

Laufzeitfehler '1100':

Failed to provide interface when initializing FileAccess

Laufzeitfehler -> RunTimeError

Another but small problem I found is that if I open the Open... file box and press the Cancel button I get a File not found error message. The same is true is I press the cancel button on the Read from gamefile.txt box.

-Martin
Attached Files:
File Type: zip specattack.zip (1.3 KB, 7 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old April 16, 2003, 17:19   #4
Zaphod Beeblebrox
Call to Power II Democracy Game
King
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Aug 1999
Location: aachen, germany
Posts: 1,100
i simply cannot make it run.
whenever i try to make a project of my own, i get the error 76 path not found
Zaphod Beeblebrox is offline  
Old April 21, 2003, 12:20   #5
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
A slightly belated response, but I did give warning that my development tends to go in fits and spurts. Thanks to Zaphod for bumping this thread.

Quote:
Originally posted by Martin Gühmann
First I made a *.ces file for the specattack.txt. I would like to be to put everything like I want between the fields. The original file has a new line for every entry, it has two fields, without a new line in between so far I was only able to generate a file with two spaces in between of the two fields.
And you would like one space, rather than two?

Quote:
Another bug I found is that it doesn't work anymore to open another file of the same type. I get instead of the second file an error message:

Laufzeitfehler '1100':

Failed to provide interface when initializing FileAccess

Laufzeitfehler -> RunTimeError
Thanks for pointing that out. I've now fixed that.

Quote:
Another but small problem I found is that if I open the Open... file box and press the Cancel button I get a File not found error message. The same is true is I press the cancel button on the Read from gamefile.txt box.
That's intentional (Sort of) - since you didn't specify a file it's hardly surprising that it couldn't find it .

Quote:
Originally posted by Zaphod Beeblebrox
whenever i try to make a project of my own, i get the error 76 path not found
Do you get this error before or after you see the Save Project As... dialog?
J Bytheway is offline  
Old April 24, 2003, 03:25   #6
Zaphod Beeblebrox
Call to Power II Democracy Game
King
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Aug 1999
Location: aachen, germany
Posts: 1,100
after the properties dialog, regardless of what options i use there.
Zaphod Beeblebrox is offline  
Old April 24, 2003, 05:55   #7
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Update v0.5.1
Updated to v0.5.1. Update at:
http://ctpmodmakers.250free.com/JBTW/CTPEd051.zip

Unzip over the installed version. Again, this will reset your preferences to defaults (unless you select not to extract default.prf, which is safe so long as you're updating v0.5.0).

New in this version:

- Added GL templates for wonder.txt and govern.txt
- Improved error messages due to missing paths related to CheckFilesExist form
- Repaired the 'Open another file of this type...' feature

Zaphod:
Try this one, you will still get an error, but it should be a better error, which will enable me to track the problem. Thanks.
J Bytheway is offline  
Old April 25, 2003, 13:38   #8
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 13:57
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
It works now with the open another file of the same type thanks.

One improvement for the single column view would be to put the field name and the actual field into one line instead of one line for the field name and a text line in the next line for the value. This would save some space and increases the overview.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old April 28, 2003, 05:37   #9
Zaphod Beeblebrox
Call to Power II Democracy Game
King
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Aug 1999
Location: aachen, germany
Posts: 1,100
still looks the same.
when closing the properties windows a new empty!window named project files opens and i get the error 76 path not found. when pressing ok to that message the programm exits.
Zaphod Beeblebrox is offline  
Old April 28, 2003, 10:55   #10
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Update v0.5.2
Updated to v0.5.2. Update at:
http://ctpmodmakers.250free.com/JBTW/CTPEd052.zip

Unzip over the installed version. Again, this will reset your preferences to defaults (unless you select not to extract default.prf, which is safe so long as you're updating v0.5.0 or later).

For those not experiencing the same problem as Zaphod, this update is probably not worthwhile.

New in this version:

- Improved error messages due to missing paths in several other places that I missed in v0.5.1

Zaphod:
Here's another attempt. I think you made it past the bit causing the error before, but I found some more places (worryingly many, in fact) which could be causing the same error you were seeing, and again I hope I have fixed them so that they give a more informative error or none at all. So, please try this and tell me what happens.

Martin:
Yes, I see what you mean. I was programming in C# yesterday and it has given me (in a roundabout fasion) an idea for a better way to handle the whole system of aligning the controls on that form. It should provide for what you want, and also allow better handling of multiple instances of a field, which has always been a weakpoint in my design.

Unfortunately I'd probably need to devote more time than I have right now (I have a project deadline and exams approaching (not to mention a probable appointment as President in the DG)), so I make no promises. OTOH, it might turn out to be really simple and quick, as have some other things I dreaded in this project. I'll keep you informed.
J Bytheway is offline  
Old April 28, 2003, 11:07   #11
Zaphod Beeblebrox
Call to Power II Democracy Game
King
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Aug 1999
Location: aachen, germany
Posts: 1,100
ok, now i get a clearer error message
the programme tried to write files in a nonexistant folder

still getting another error, but i presume thats my current gamefiles fault, will check later.

thank you
Zaphod Beeblebrox is offline  
Old April 28, 2003, 12:25   #12
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
My pleasure .
J Bytheway is offline  
Old April 28, 2003, 12:53   #13
Zaphod Beeblebrox
Call to Power II Democracy Game
King
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Aug 1999
Location: aachen, germany
Posts: 1,100
Quote:
Originally posted by Zaphod Beeblebrox
still getting another error, but i presume thats my current gamefiles fault, will check later.
yup, ctped finds stupid mistakes ctp2.exe doesn't even notice
Zaphod Beeblebrox is offline  
Old May 16, 2003, 13:31   #14
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 13:57
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
From some testing, I just opened two files and had three windows of Mozilla 1.3 open I got out of memory errors, I never got something like this in earlier versions.

Another thing I see is that the compare function just shows me the different entries but not the defferences in detail that is a little bit user unfriendly.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old May 16, 2003, 16:43   #15
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Quote:
Originally posted by Martin Gühmann
From some testing, I just opened two files and had three windows of Mozilla 1.3 open I got out of memory errors, I never got something like this in earlier versions.
Well, I did, which is why I was paranoid about addind comment preservation and so forth, but when I upgraded from 72MB RAM to more than 200MB I stopped getting that. However, I think that the biggest load is from all the controls loaded onto the form, rather than the data itself so I was probably worrying over nothing. Either way, loading units.txt is much more significant than loading any of the other files, so beware of doing so if you're having problems.

Could you try it with task manager (or some other system performance monitor) open and see when it is that much memory is being used? Also, it might be a good idea to check total memory before and after to see if there's a memory leak of some kind (which wouldn't surprise me).

The plan I had to improve the control positioning methods would probably cause a significant hit on memory too, which might be a problem.

Quote:
Another thing I see is that the compare function just shows me the different entries but not the defferences in detail that is a little bit user unfriendly.
What kind of format would you like to be told what the differences are in detail? I guess I could highlight the controls pertaining to the differing fields in some way, or else output a report detailing all of the differences (to a text file or to screen, in a text box).
J Bytheway is offline  
Old May 17, 2003, 13:42   #16
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 13:57
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
For the memory usage, I wasn't able to find a program that gives me the total number of memory used, but I used the Windows System Ressource Monitor. I could monitor how much memory was used, and the unit.txt used indeed much. I open a window of that file that took one five or one fourth of my system ressource, maybe M$ means here memory. I open another file of units.txt for comparison and it used again such memory, afterwards I closed the window the memory was not freed until I closed or better CTPEd closed, actual not very user fiendly if the whole program closed just, because it can't open a file.

For the memory use it could be reduced if not all entries are shown that would also help so you can edit only the important stuff.

For the comparison, I thought of something like you did for the list of the items but now for the fields, something like an icon in front of such an entry.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old May 17, 2003, 15:59   #17
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 12:57
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Update v0.5.3
Updated to v0.5.3. Update at:
http://ctpmodmakers.250free.com/JBTW/CTPEd053.zip

Unzip over the installed version. Again, this will reset your preferences to defaults (unless you select not to extract default.prf, which is safe so long as you're updating v0.5.0 or later).

New in this version:

- Added the capability to create an ini file if it is missing
- Updated Readme.txt and CTPEd.txt
- Added a better dialog to replace the 'Export all files now?' messagebox
- Save paths in project files as relative paths to provide portability of project files
- Generally tidied the method of writing project files so that they are legible if you open them in a text editor
- When you do a comparison, the controls pertaining to the differing fields are highlightedby having their text in italics


Martin: I think this addresses some of your problems, including a comment you made a very long time ago about the message you get when you close CTPEd (at least to a certain extent), but not the memory issue.

With regards to the memory:
I was checking and on my machine loading units.txt requires only 1 or 2 MB of page file, so I think there might be something more complicated going on here than just shortage of memory. What version of Windows are you running, because I was having problems with 95, but am not with XP...

When you say "not all entries are shown" I assume you mean fields, in which case it's already possible to not show some of them (with the 'Hide Disabled Controls' option in preferences), and I was hoping to allow hiding more of them (the ones which are irrelevant, like Branch in advance.txt) but they are still there, and in memory, just not visible, so that's not really helpful. In addition, when you close the editing window it is only hidden, not unloaded, which is why you don't get the memory back until you close CTPEd. This is a holdover from my original design when I assumed there would be no memory problems and optimised for speed, but unfortunately it would be difficult to change now.
J Bytheway is offline  
Old May 17, 2003, 17:28   #18
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 13:57
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Re: Update v0.5.3
Quote:
Originally posted by J Bytheway
With regards to the memory:
I was checking and on my machine loading units.txt requires only 1 or 2 MB of page file, so I think there might be something more complicated going on here than just shortage of memory. What version of Windows are you running, because I was having problems with 95, but am not with XP...
Windoze 98, and I won't buy a patch for something like 150 or was it 250 Euros.

Quote:
Originally posted by J Bytheway
When you say "not all entries are shown" I assume you mean fields, in which case it's already possible to not show some of them (with the 'Hide Disabled Controls' option in preferences), and I was hoping to allow hiding more of them (the ones which are irrelevant, like Branch in advance.txt) but they are still there, and in memory, just not visible, so that's not really helpful. In addition, when you close the editing window it is only hidden, not unloaded, which is why you don't get the memory back until you close CTPEd. This is a holdover from my original design when I assumed there would be no memory problems and optimised for speed, but unfortunately it would be difficult to change now.
For hiding fields I'd like to be able to decide which field should be hidden, for instance if I modify the govern.txt and I am only interested in these fields:

RationsExpectation -1
WorkdayExpectation -1
WagesExpectation -1

I'd like to be able to hide the rest of the fields.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:57.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team