Thread Tools
Old July 27, 2002, 11:18   #91
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Re: Re: CTPEd v0.2beta Release
Quote:
Originally posted by J Bytheway
Martin: You might like to know that I've implimented your all-controls-in-one-column request.
Well that sounds good.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 27, 2002, 12:19   #92
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Update v0.3.2
Here we are:
Update at:
http://ctpmodmakers.250free.com/JBTW/CTPEd032.zip

New in this version:

Corrected errors in tileimpTerrainEffect.ces (some fields were listed as compulsory when in fact they were not)
Made considerable changes to the GL tool
Added error message for duplication of fields which should not be duplicated (previously it would crash)
Fixed bugs in the GL template interpretaion system (nested .s did not work correctly before)
Rearanged the tab order on the Entries Editing window
Added Ctrl+Up/Down facility on Entries Editing window and GL tool
Introduced preferences - this means that you must add the following lines to your copy of CTPEd.ini:

//Preferences file (looked for in the project path)
Preferences default.prf

(With no preferences file specified the default preferences will be used every time CTPEd starts)
Added 'Controls in one column' and 'Hide disabled controls' options for the Entries Editing window

And for the first time I've moved something off the list of things to do! .

Martin - if you're still having problems under this version with opening files where the { is up against text (which is likely, since I haven't changed anything in that department) then please send me the relevant file and also your project file.
J Bytheway is offline  
Old July 27, 2002, 12:23   #93
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Also...

The new options can be reached through the preferences menu, and to figure out how the GL tool now works read CTPEd.txt.
J Bytheway is offline  
Old July 27, 2002, 12:50   #94
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
One think I found:

There is actual no need to give a tile improvement an enabling advance.

For your other concern it seems that you used your latest official public version as a base of this version therefore I didn't noticed any problems at opening the GM1_tileimp.txt where you find such { against the text.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 27, 2002, 13:16   #95
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Now I found something that annoys me more:

I just tried to modify a file, the GM1_tileimp.txt and had to notice that CTPEd removed all the formatting, you know the usefull spaces and the tab and free lines, it also screwed up something with the GL hidden entry and finally it removed also all the comments in this file, something that is actual very important for me as I added to the coments in this file the database index of all the tileimprovements (usefull for slic) and to the good improvements the goods for for these the effects are. The files about I am talking are in the attachment of this post, so what I want is that CTPEd can also produce some readable code.

-Martin
Attached Files:
File Type: zip gm1_tileimp_txts.zip (8.6 KB, 3 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 27, 2002, 13:20   #96
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
You want it to maintain formatting and comments!!

Umm... That's a tall order... I'll get back to you.
J Bytheway is offline  
Old July 27, 2002, 13:33   #97
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
OK, I see that there are some problems with the current formatting (the close braces indentation is incorrect, and two blank lines are appearing after every such) - I can fix those and certainly add notes along the lines of
Code:
# 1 ########
between entries.

Moving GLHidden somewhere else is easiest of all - that requires only repositioning it in terrain.ces.

I don't really see any way to preserve the other comments in the file though... I think that would require a major overhaul at least, and I can't see what rules could be followed to determine what should be put where or where that information should be stored. Have you any ideas on the former problem?
J Bytheway is offline  
Old July 27, 2002, 15:28   #98
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
The advance of using CTPEd is that you can really accellerate the mod developing process. In return you give up controll over text files, actual something that someone don't want to do if he is used to edit the text files. Therefore it is necessary that the text files stay intact as a whole that includes the comments as well. For example my GM1_strategies.txt is full of comments, usually to indicate the changes who made them what was the original settings and huge outcommented sections to restore the original variables easily. This file also contains some information about the single fields. Of course some of the stuf isn't needed anymore and could be removed but not everything, and I want to decide what is not necessary anymore.

Quote:
Originally posted by J Bytheway
Moving GLHidden somewhere else is easiest of all - that requires only repositioning it in terrain.ces.
Actual in this case tileimp.ces, but I think it has be checked in all of these files, the best thing would be to modify the files so that you can find the entries there where they occur in the original text files.

Quote:
Originally posted by J Bytheway
I don't really see any way to preserve the other comments in the file though... I think that would require a major overhaul at least, and I can't see what rules could be followed to determine what should be put where or where that information should be stored. Have you any ideas on the former problem?
Every line could have a comment at its end. So there are two cases a line contains a comment or it doesn't contain a comment. But actual lienes that doesn't contain a comment only, contain an entry like Icon and the arguments or like GLHidden. In the end comments are just strings.

A little bit more difficuilt are the ones that starts with the line, but it is actual no problem, too. But this comment has a location in the file that could be extracted, for example lies the coment between two tileimprovement bodies or within a tileimprovement body, if it does lie between two entries within a tile improvement body then it could be attached to the upper entry and the nuber of new lines between the upper entry and the comment could be counted and maybe reduced to one space line if you have more space lines then one.

So for the formatting it should be possible to define the format in a script file so it could be easily changed. From the current data structure of CTPEd it would be the best if we would use a standart format. So the entry for a tile improvement for example should start at the begining of the line everything that is in the main body of the tile improvement entry (the stuff between these brackets {}) should have first a tab before the text starts. Such a bracket } gets one line and will have the same number of tabs before like the line where you find the opening one. One space between the opening bracket and the text before, a new line after the opening bracked. Finally one space between an entry and its argument.

Finally I would like to request another feature, in order to reduce the costs for the techs in the APOL_advances.txt I opened two times CTPEd to have two windows of CTPEd. So it would be good to have a compare file feature so that I can open a file of my project and open another file from somewhere of my hard drive for comparision.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 27, 2002, 16:26   #99
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Quote:
Originally posted by Martin Gühmann
Actual in this case tileimp.ces, but I think it has be checked in all of these files, the best thing would be to modify the files so that you can find the entries there where they occur in the original text files.
That's what I did, but GLHidden never appears in the original tileimp.ces, and was at the end in most of the other files with the same flag, so I put it at the end.

Quote:
Every line could have a comment at its end...
[snip]
...upper entry and the comment could be counted and maybe reduced to one space line if you have more space lines then one.
I thought initially that this would cause an untenable increase of memory consumption (estimates from my initial plan ran to 32MB RAM for MM2_units.txt just to contain the information that said "there's no comments anywhere" but I've thought of a much better way to do it now, which should be much more efficient (unless a file has a huge quantity of comments, like one on every third line...)

I could do the following:
Any comment outside of the brackets of any entry is associated with the entry below it and will be reinserted there (or shifted to the bottom of the file if you delete the entry, possibly with the option to delete it).
Any comment within an entry will be associated with the field instance preceding it (noting whether it was on the same line as that instance, or a subsequent one), and will be shifted to the start of the entry if you delete that field instance, or else to the end of the file if you delete the whole entry (again, possibly with the option for deletion). The comments at the end of the file or the start of an entry would be a special case. I wouldn't store blank lines, but I would store lines containing only a #. Would that do?

Quote:
So for the formatting it should be possible to define the format in a script file so it could be easily changed.
Here's a sample from the way it's coded now, after I spent a few moments cleaning up the code:
Code:
TILEIMP_ADVANCED_MINES {
 Icon ICON_TILEIMP_ADVANCED_MINES
 Tooltip TOOLTIP_TILEIMP_SELECT_MINE2_BUTTON
 Statusbar STATUSBAR_TILEIMP_SELECT_MINE2_BUTTON
 Level 2
 Class: Mine
 ConstructionTiles 1
 ConstructionTiles 15
 ConstructionTiles 16
 CantBuildOn TERRAIN_WATER_BEACH
 CantBuildOn TERRAIN_WATER_DEEP
 CantBuildOn TERRAIN_WATER_RIFT
 CantBuildOn TERRAIN_WATER_SHALLOW
 CantBuildOn TERRAIN_WATER_SHELF
 CantBuildOn TERRAIN_WATER_TRENCH
 CantBuildOn TERRAIN_WATER_VOLCANO
 Excludes: ATM
 Excludes: Farm
 Excludes: LandDetector
 Excludes: Mine
 Excludes: OceanFarm
 Excludes: OceanDetector
 Excludes: OceanATM
 Excludes: Structure1
 Excludes: Structure2
 Excludes: OceanMine

 TerrainEffect  {
  Terrain TERRAIN_DESERT
  Terrain TERRAIN_GRASSLAND
  Terrain TERRAIN_PLAINS
  BonusProduction 10
  BonusGold 5
  EnableAdvance ADVANCE_FAKE
  ProductionCost 800
  ProductionTime 2
  TilesetIndex 17
 }

 TerrainEffect  {
  Terrain TERRAIN_BROWN_HILL
  Terrain TERRAIN_HILL
  Terrain TERRAIN_WHITE_HILL
  BonusProduction 20
  BonusGold 5
  EnableAdvance ADVANCE_FAKE
  ProductionCost 1000
  ProductionTime 2
  TilesetIndex 17
 }

 TerrainEffect  {
  Terrain TERRAIN_BROWN_MOUNTAIN
  Terrain TERRAIN_MOUNTAIN
  Terrain TERRAIN_WHITE_MOUNTAIN
  BonusProduction 30
  BonusGold 5
  EnableAdvance ADVANCE_FAKE
  ProductionCost 1200
  ProductionTime 2
  TilesetIndex 17
 }
}
I can (relatively) easily implement variable indent - but should this be stored at the level of files, projects or CTPEd as a whole? I would tend to the last option, possibly put it in the preferences.

If you want blank lines between fields e.g. between the lines:
Code:
  Terrain TERRAIN_WHITE_MOUNTAIN
  BonusProduction 30
then I guess that info should go in the *.ces file. What do you think?

Is there anything else you'd like to be able to change?

Quote:
Finally I would like to request another feature, in order to reduce the costs for the techs in the APOL_advances.txt I opened two times CTPEd to have two windows of CTPEd. So it would be good to have a compare file feature so that I can open a file of my project and open another file from somewhere of my hard drive for comparision.
I'm glad you're around to keep my nose to the grindstone - that's another tough one, but I'll see what I can do. What kind of detail would you like - and in what format? I'm thinking a list of the entries in each not in the other, and another list of those entries which changed from one to the other, with a summary of the differences and shortcuts to jump to the entries editing window for each.

Next you're going to ask for me to impliment application of mod updates via diff (although I believe that could actually be done anyway without confusing the matter by involving CTPEd).

I was planning to do multi-lingual support next (which will be another big job...). What's most urgent for you?
J Bytheway is offline  
Old July 27, 2002, 18:10   #100
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
I found a fairly critical bug - it will obviously be fixed in the next version but I thought I should mention it anyway since it could be important:
When you click 'Export Selected' on the project window it does not actually export the selected items, but only the one with the 'focus rectangle'.
J Bytheway is offline  
Old July 28, 2002, 09:39   #101
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by J Bytheway
That's what I did, but GLHidden never appears in the original tileimp.ces, and was at the end in most of the other files with the same flag, so I put it at the end.
Yes my addition but actual in the case of the tileimp.txt it doesn't look good at the end of the tileimp body, therefore I inserted after the class entry.

Quote:
Originally posted by J Bytheway
I could do the following:
Any comment outside of the brackets of any entry is associated with the entry below it and will be reinserted there (or shifted to the bottom of the file if you delete the entry, possibly with the option to delete it). Any comment within an entry will be associated with the field instance preceding it (noting whether it was on the same line as that instance, or a subsequent one), and will be shifted to the start of the entry if you delete that field instance, or else to the end of the file if you delete the whole entry (again, possibly with the option for deletion). The comments at the end of the file or the start of an entry would be a special case. I wouldn't store blank lines, but I would store lines containing only a #. Would that do?
That should it do but I would insert a blanc line between a comment and an entry.

Quote:
Originally posted by J Bytheway
I can (relatively) easily implement variable indent - but should this be stored at the level of files, projects or CTPEd as a whole? I would tend to the last option, possibly put it in the preferences.
I think all the files of a mod should have the same layout. That leads me to another thing CTPEd overwrote every file that I imported as I used the export function actual it should only overwrite the files that have been modified, so you can keep track if you have a new version of a mod which files have been modified from the last version, of course the export all files option should be also available. (Maybe I missed here something but that is the option that I only have when I close CTPEd.) So both features are global ones and should be stored therefore on the level of CTPEd.

Quote:
Originally posted by J Bytheway
If you want blank lines between fields e.g. between the lines:

Code:
  Terrain TERRAIN_WHITE_MOUNTAIN
  BonusProduction 30
then I guess that info should go in the *.ces file. What do you think?
Yes I want this, and I think there is actual no other place where it could be stored as the *.ces file.

But now to the numbers of the spaces your example code looks better, but of course the blank lines are missing. Another thingis the number of spaces before a line starts in a substructure: It is not enough, in the original tileimp.txt you have three spaces per substructure, that should be the minimum. But actual tabs instead of spaces would reduce the file size, so I would prefer tabs.

Quote:
Originally posted by J Bytheway
I'm glad you're around to keep my nose to the grindstone - that's another tough one, but I'll see what I can do. What kind of detail would you like - and in what format? I'm thinking a list of the entries in each not in the other, and another list of those entries which changed from one to the other, with a summary of the differences and shortcuts to jump to the entries editing window for each.

Next you're going to ask for me to impliment application of mod updates via diff (although I believe that could actually be done anyway without confusing the matter by involving CTPEd).

I was planning to do multi-lingual support next (which will be another big job...). What's most urgent for you?
Yeah CTPEd has to get as good as possible, to make modding of CTP2 much easier then the limited modding in Civ3 with its editor allows. Altough the translation work is based on comparising files (especial the GL). The file comparision would be a step to multi-lingual support. So comparing files has the higher priority.

For the level of details: As I want to compare files and of course to change the stuff in one of the files, in order to get the best stuff of a file the comparision tool needs editing abilities, so the level of details could be just the changes (one option) or everything (the other option). Since we have the controls in one column, it could be realized that you have on the left side the contend list of the one file and on right side the contend list of the entries (for instance the tileimps list) of the other file. In the middle you have all the fields of the entry. Of course if you don't need the comparision tool it is disabled.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 28, 2002, 14:52   #102
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by Martin Gühmann
I think all the files of a mod should have the same layout. That leads me to another thing CTPEd overwrote every file that I imported as I used the export function actual it should only overwrite the files that have been modified, so you can keep track if you have a new version of a mod which files have been modified from the last version, of course the export all files option should be also available. (Maybe I missed here something but that is the option that I only have when I close CTPEd.) So both features are global ones and should be stored therefore on the level of CTPEd.
So I am trying now to make an agecitystyle.ces and I see that there areno line wraps within the Sprites boddies, so that means the layout definition has to be found in the *.ces files themselves.

Another problem I found is that there are two kind of comment singn in the text files in use on the one hand you have the # like in the advance.txt, goods.txt... on the other hand you have the // the comment sign that is used in Java, C++, Slic and in your *.ces files, this can be found in the strategies.txt and other aidata files. Finally you find both ways to comment something in the Orders.txt. I tried to make a *.ces file for the Orders.txt but I had a this problem. I am also not confident with the way I implemented all these UnitPretest_ entries. Maybay you could take a look into this file.

-Martin
Attached Files:
File Type: zip orders.zip (1.7 KB, 3 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 28, 2002, 16:14   #103
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Quote:
Originally posted by Martin Gühmann
Yes my addition but actual in the case of the tileimp.txt it doesn't look good at the end of the tileimp body, therefore I inserted after the class entry.
I've moved it to just above the TerrainEffect.

Quote:
That should it do but I would insert a blanc line between a comment and an entry.
Indeed

Quote:
I think all the files of a mod should have the same layout. That leads me to another thing CTPEd overwrote every file that I imported as I used the export function actual it should only overwrite the files that have been modified
Keeping trank of modifications is surprisingly difficult, I tried to implement this previously and eventually abandoned the attempt, but I'll add it to the list.

Quote:
both features are global ones and should be stored therefore on the level of CTPEd.
I think I agree.

Quote:
Another thingis the number of spaces before a line starts in a substructure: It is not enough, in the original tileimp.txt you have three spaces per substructure, that should be the minimum. But actual tabs instead of spaces would reduce the file size, so I would prefer tabs.
I dislike tabs on principle because they are different lengths in different places, and I tend towards smaller indents in general, but I'll add the option to use tabs, multiple spaces or whatever the user desires.

Quote:
The file comparision would be a step to multi-lingual support. So comparing files has the higher priority.
I'm not so sure about that, I envision them as quite different, but I may be able to use some of the features developed for one in the other.

Quote:
For the level of details: As I want to compare files and of course to change the stuff in one of the files, in order to get the best stuff of a file the comparision tool needs editing abilities, so the level of details could be just the changes (one option) or everything (the other option). Since we have the controls in one column, it could be realized that you have on the left side the contend list of the one file and on right side the contend list of the entries (for instance the tileimps list) of the other file. In the middle you have all the fields of the entry. Of course if you don't need the comparision tool it is disabled.
As a step on the way I have made it possible to open an Entries Editing window for files outside the project (though only one of each kind at present, that could be changed (with a little difficulty) if you think you'd want more). It is also impossible to edit the other file at present, but that is easy to change, and from what you say I take it that you would like the ability to edit files outside the project.

The lists of entries used in the window support icons, which could be used to quickly display which entries are not present in the other file, and which are different, with the editing ability implicit. That would be the simplest option.

Alternatively (probably additionally), I could create a new window for comparative purposes with more detail (like where two entries differ) but which referred you back to the editing windows for modification.

I think I'll do the first now, and the second if there is demand/time.
J Bytheway is offline  
Old July 28, 2002, 17:05   #104
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Quote:
Originally posted by Martin Gühmann
So I am trying now to make an agecitystyle.ces and I see that there areno line wraps within the Sprites boddies, so that means the layout definition has to be found in the *.ces files themselves.
OK, I'll try and think of a way to arrange this.

Quote:
Another problem I found is that there are two kind of comment singn in the text files in use on the one hand you have the # like in the advance.txt, goods.txt... on the other hand you have the // the comment sign that is used in Java, C++, Slic and in your *.ces files, this can be found in the strategies.txt and other aidata files. Finally you find both ways to comment something in the Orders.txt.
Shifting the comment specification to the ces file to allow for different comments in different files is easy, but allowing for two different comment styles in the same file will be slightly harder. Let me think about that.

Quote:
I tried to make a *.ces file for the Orders.txt but I had a this problem. I am also not confident with the way I implemented all these UnitPretest_ entries. Maybay you could take a look into this file.
It looks good to me - just one thing which you couldn't have known (unless you'd noticed it in goods.ces and terrain.ces) because it's undocumented: Change the very last line to:
* meaning 'a string containing "ORDER_"' since not all the names begin with ORDER_ (The first four don't) and thus it's not sufficient to have simply a prefix specified.

That was an annoying workaround I had to make because of both goods and terrains beginning their names with TERRAIN_ but it comes in handy here.
J Bytheway is offline  
Old July 28, 2002, 17:10   #105
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by J Bytheway
Keeping trank of modifications is surprisingly difficult, I tried to implement this previously and eventually abandoned the attempt, but I'll add it to the list.
Could this be done by just comparing the contend of the file in the memory and the file on the harddrive, when you save the project?

Quote:
Originally posted by J Bytheway
As a step on the way I have made it possible to open an Entries Editing window for files outside the project (though only one of each kind at present, that could be changed (with a little difficulty) if you think you'd want more). It is also impossible to edit the other file at present, but that is easy to change, and from what you say I take it that you would like the ability to edit files outside the project.
Comparing two files at once is good, I don't know if three or more files are really necessary but I know that I already did this by hand.

Quote:
Originally posted by J Bytheway
The lists of entries used in the window support icons, which could be used to quickly display which entries are not present in the other file, and which are different, with the editing ability implicit. That would be the simplest option.

Alternatively (probably additionally), I could create a new window for comparative purposes with more detail (like where two entries differ) but which referred you back to the editing windows for modification.

I think I'll do the first now, and the second if there is demand/time.
I think this is the way to go then I can see if the more detailed one is really necessary.

Just to make shure about the layout:
Don't forget the layout of the agecitystyle.txt this file has a different one the entries of the Sprites substructure all in one line, I tried to create a agecitystyle.ces but I wasn't able to get it working as I tried to load the agecitystyle.txt I got an runtime error about dublicated keys and CTPEd quitted. I made also a citystyle.ces, I got it working but without, the agecitystyle.ces I can't import the agecitystyles.

You can find the three *.ces files I made in the attachment. The third file is for the substructure "Sprites" in the agecitystyle.txt.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 28, 2002, 17:14   #106
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
And I forgot the attachment. As the two different comment styles in one file I can't test your suggestion. Of course feel free to use my *.ces files.

Edit: One thing I thing I forgot to mention is that it should be possible that you can Multiple entries in different rows instead with this pulldown menue, this feature would be very useful in the citystyle.txt, there you have for the different citystyles just one multiple entry.

-Martin
Attached Files:
File Type: zip cityst.zip (1.4 KB, 3 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 28, 2002, 17:36   #107
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Quote:
Originally posted by Martin Gühmann
Could this be done by just comparing the contend of the file in the memory and the file on the harddrive, when you save the project?
Ingenious! I think that would indeed be the best way (though I'll make it optional because it could cause memory problems).

Quote:
I think this is the way to go then I can see if the more detailed one is really necessary.
OK

Quote:
Just to make shure about the layout:
Don't forget the layout of the agecitystyle.txt this file has a different one the entries of the Sprites substructure all in one line, I tried to create a agecitystyle.ces but I wasn't able to get it working as I tried to load the agecitystyle.txt I got an runtime error about dublicated keys and CTPEd quitted. I made also a citystyle.ces, I got it working but without, the agecitystyle.ces I can't import the agecitystyles.

You can find the three *.ces files I made in the attachment. The third file is for the substructure "Sprites" in the agecitystyle.txt.
I'll check, but I think I know what the problem is.
J Bytheway is offline  
Old July 28, 2002, 17:39   #108
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Quote:
Originally posted by Martin Gühmann
Edit: One thing I thing I forgot to mention is that it should be possible that you can Multiple entries in different rows instead with this pulldown menue, this feature would be very useful in the citystyle.txt, there you have for the different citystyles just one multiple entry.
Yeah, I agree with you there. The way it works at the moment is ugly. It's a (say it with me) "dumbass workaround for dumbass design flaw".

But it took me so long to get it to work at all I'm scared of fiddling with it now.

But it must be done some time - it's certainly necessary for the *buildlist.txt files.
J Bytheway is offline  
Old July 28, 2002, 17:42   #109
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Quote:
Originally posted by Martin Gühmann
As the two different comment styles in one file I can't test your suggestion.
Just do a find and replace // with # - that's what I did...

Incidentally, that change to the last line is not in fact necessary - I was basing my comments on the lines from gl_str.txt which had UNIT_ORDER_ at the start, but those lines are in fact totally meaningless. Probably an obsolete relic of CTP1, like the POP_ lines in the same file.
J Bytheway is offline  
Old July 28, 2002, 17:49   #110
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by J Bytheway
Just do a find and replace // with # - that's what I did...
Yeah I could do this but actual I don't want to modify this file in this way, and to test a strategies.ces is impossible at least in a fair amount of time as I would have remove it afterwards as the strategies.txt only allows one comment style.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 28, 2002, 17:54   #111
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Your structure files work fine (although I corrected a spelling error in the comment and changed the name of Sprites.ces to agecitystyleSprites.txt to fit with my naming convention).

Whatever problem you were having must be due to a bug I've since fixed - you'll just have to wait for the next update
Attached Files:
File Type: zip agecitystyle.zip (997 Bytes, 3 views)
J Bytheway is offline  
Old July 28, 2002, 18:02   #112
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
On another subject entirely: I noticed I'd stopped a sentence halfway through in CTPEd.txt thanking you two for your help because I didn't know Pedrunn's real name. Pedrunn - do you mind being credited as just Pedrunn, or would you like a name too (Presumably that in your profile)?
J Bytheway is offline  
Old July 28, 2002, 18:47   #113
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by J Bytheway
Your structure files work fine (although I corrected a spelling error in the comment and changed the name of Sprites.ces to agecitystyleSprites.txt to fit with my naming convention).
That was the problem thanks.

Quote:
Originally posted by J Bytheway
Whatever problem you were having must be due to a bug I've since fixed - you'll just have to wait for the next update
But this does not stop me from posting more problems.

Yeah I just made a citysize.ces and I can't get it to work so that I can edit the six files maybe I overlooked here something.

-Martin
Attached Files:
File Type: zip citysize.zip (895 Bytes, 2 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 28, 2002, 19:48   #114
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Erm... the whole 6-files citystyle.txt is not handled too well (I can't even remember how I got round it - it was a big problem for a while) but I suspect my workaround fails when you actually try to edit the file. Yet more to concern me...

In the mean time I've written most of the comparison code (it won't handle substructures yet...) and attach a demonstration - most of the advances are the same, writing is different (check the cost) and GOO is missing from one file. I'm sure you can see what's going on. Obviously I have to get hold of/make some smaller icons.
Attached Thumbnails:
Click image for larger version

Name:	compexample.jpg
Views:	70
Size:	61.5 KB
ID:	20841  
J Bytheway is offline  
Old July 29, 2002, 13:34   #115
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 00:38
Local Date: November 1, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
Hey! It's looking like a vast improvement! Even non-techs like me can see what's going on.Will you announce a final version(?) - if something like this has one.I'm just a bit to try it at the momment(!), although I'm looking forward to trying it soon
__________________
'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you.info here. prove me wrong.

Bush's Republican=Neo-con for all intent and purpose. be afraid.
child of Thor is offline  
Old July 29, 2002, 13:55   #116
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
A final version is unlikely. I'll just keep working until my interest wanes again, then come back a couple of months after that, and so on. That's how development tends to go with me.

A non-beta version is concievable, perhaps - once there's been at least two new versions with no new major changes I'll consider dropping the beta suffix.

I think the most stable release was the most recent one, and the next is likely to be less stable, so delaying could make your problems worse .

All I've done today is fiddle with the icons there - those were too big, and the next ones were too small. I'm hoping for third time lucky .

I think I'll release this once I've got the comparison working properly so that it can be scrutinised by Martin while I work on comment-preservation.
J Bytheway is offline  
Old July 29, 2002, 14:18   #117
child of Thor
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
child of Thor's Avatar
 
Local Time: 00:38
Local Date: November 1, 2010
Join Date: Jan 2002
Location: UK
Posts: 3,272
Quote:
Originally posted by J Bytheway
edit.......

I think the most stable release was the most recent one, and the next is likely to be less stable, so delaying could make your problems worse .

edit......
the classic sale's pitch
Allright i'll give it a go and see what dammage i can do!(it does come with insurence against killing computers doesn't it? )

EDIT: erm.....which one was the 'most recent'? I see lots of little .zip files but i think they are specific things you and martin are working on.
__________________
'The very basis of the liberal idea – the belief of individual freedom is what causes the chaos' - William Kristol, son of the founder of neo-conservitivism, talking about neo-con ideology and its agenda for you.info here. prove me wrong.

Bush's Republican=Neo-con for all intent and purpose. be afraid.

Last edited by child of Thor; July 29, 2002 at 14:44.
child of Thor is offline  
Old July 29, 2002, 17:13   #118
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
It can hardly be a sales pitch when I'm not making a sale!

Most recent would be 0.3.2 - look for posts with the title Update for the official versions (You'll need to download the one at the start of the thread first - I'm on a low bandwidth connection now, so I'm not updating the full install).
J Bytheway is offline  
Old July 30, 2002, 10:11   #119
J Bytheway
Call to Power PBEMCall to Power II Democracy GameCTP2 Source Code Project
Emperor
 
J Bytheway's Avatar
 
Local Time: 01:38
Local Date: November 1, 2010
Join Date: Jul 2001
Location: England
Posts: 3,826
Update v0.3.3
As promised:
Update at:
http://ctpmodmakers.250free.com/JBTW/CTPEd033.zip

This will overwite default.prf, so your preferences will be put back to default (and Martin: your new .ces files will be overwritten by my slight modifications). I had to include default.prf to cater for people upgrading from 0.3.0 - and those people will need to add the two lines to their ctped.ini mentioned in the last update:

//Preferences file (looked for in the project path)
Preferences default.prf

New in this version:

Improved formatting on exported files
Updated/corrected tileimp.ces, units.ces and tileimpTerrainEffect.ces
Added some structure files by Martin
Fixed bug whereby the 'Export selected' button did not work
Added a right-click menu for the files list in the project window with the following functionality:
- Import/export from/to the default file
- Import/export from/to another file of the appropriate type
- Open another file of the type (for comparative purpose)
Added comparison tool (access through tools menu)
Added right-click menu on the entries list on the Entries Editing window for tree-based files to allow for easy addition of advances as prerequisites/consequences

As I said before, this is probably a less stable version (it's not tested as much as I would have liked to, but Martin seems to test stuff better than me because he actually has time to use it rather than just design it), and of course I welcome comments from anyone else.

My to-do list now contains 12 items, the next thing I intend to do is comment preservation and further formatting options.
J Bytheway is offline  
Old July 30, 2002, 17:42   #120
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: 02:38
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
Originally posted by J Bytheway
My to-do list now contains 12 items, the next thing I intend to do is comment preservation and further formatting options.
It would be nice if you could post it, John. So I would know which features aren't on your to do list so I can request only the ones that aren't already on it.

So far I made two other *.ces files the risks.ces that works fine and the messageicon.ces that doesn't work actual it is a file of type three (only contains strings which are used at another place of the game) but it also contains a number at the start. Unfortunatly the t's and f's for type one doesn't work for type three.

In the attachment you can find three files the risks.ces, the messageicon.ces and the citysize.ces, the last file works as I replaced citysize.ces in the default.ced by citysize0.txt.

-Martin
Attached Files:
File Type: zip threeces.zip (2.2 KB, 3 views)
__________________
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 20:38.


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