Thread Tools
Old July 31, 2002, 11:07   #121
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
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.
It's in CTPEd.txt but I'll post it here anyway:

- Extend the GL template system to assist with SLIC coding.
- Add error checking systems to allow you to track down problems before you crash CTP2.
- Write more structure files (You can help me with this! Yes, that means YOU!)
- Optimise the code to increase speed and reduce memory consumption.
- Add the option to hide fields which are superfluous
- Add sorting tool to rearrange entries in files
- Add error checking tool to spot common problems
- Add dropdown list for field values with only certain options like CanSee:
- Add multi-language support
- Preserve comments in files
- Allow for varied export formats
- Track modification to remove unnecessary overwrites on export

Quote:
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.
OK

Quote:
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.
If you put citysize0.txt as the file name then that will by written in the gamefile.txt and then when you try to play the mod CTP2 will look for citysize00.txt, and not find it. I'm not quite sure if that's what you've done.
J Bytheway is offline  
Old July 31, 2002, 12:04   #122
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
- Write more structure files (You can help me with this! Yes, that means YOU!)
I posted three files in my last post but I wonder why you didn't downloaded them.

Quote:
Originally posted by J Bytheway
If you put citysize0.txt as the file name then that will by written in the gamefile.txt and then when you try to play the mod CTP2 will look for citysize00.txt, and not find it. I'm not quite sure if that's what you've done.
I did that but actual only to test wheather my file is ok.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old July 31, 2002, 17:03   #123
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
I posted three files in my last post but I wonder why you didn't downloaded them.
I was in a hurry, I knew I wasn't going to get any work done on CTPEd today and my reply was on a new page, so I would have had to go back to the previous page to find them.

But I really do appreciate all your help .
J Bytheway is offline  
Old August 2, 2002, 09:53   #124
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
Well, in my typical unreliable style I haven't been doing what I said I would - I've implimented an (optional) shared clipboard to facilitate copying entries from one file to another of the same type (though only one at a time...), and now I've started on making the citysize?.txt files work.
J Bytheway is offline  
Old August 3, 2002, 10:06   #125
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
Well, in my typical unreliable style I haven't been doing what I said I would - I've implimented an (optional) shared clipboard to facilitate copying entries from one file to another of the same type (though only one at a time...), and now I've started on making the citysize?.txt files work.
That are good news John. Actual what I like to see in the next version of CTPEd is the support of multiple comment styles in one file, that would allow me to start the strategies.ces and all the *.ces files related to this file.

Comment preservation is the other thing that has a high priority for until, can't be shure that my comments are also intact after editing the files I can't start to use CTPEd.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 3, 2002, 17:07   #126
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
OK here are three more *..ces files, the first one the wondermovie.ces does work. The EndGameObjects.ces doesn't work so far, because of the diffrent comment style, and I don't want to modify the file for this purpose, the last one is the Newsprites.ces, don't know if it work, I didn't tested it, because I don't know how to make CTPEd to use it.

You can find the tree files in the attachment.

-Martin
Attached Files:
File Type: zip more_ces.zip (1.5 KB, 3 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 5, 2002, 09:16   #127
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
Thanks. I'm still not sure about Newsprite myself, since it's something of a unique file thanks to the way gamefile.txt is put together. No progress yesterday because I tried (and failed) to climb Table Mountain.
J Bytheway is offline  
Old August 5, 2002, 10:36   #128
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:
Original posted by J Bytheway
I'm still not sure about Newsprite myself, since it's something of a unique file thanks to the way gamefile.txt is put together.
It is a unique file. Yes it is true but only for the original game and the ctp2.exe. For ModSwapper mods it is just under the name of the mod. So the only unique thing of it is that it is under the name and not above. But actual this file has to be linked with the unit.txt, also other files must be linked together, for example if you had a unit to the unit.txt then it should be added to the unitbuildlist.txt. But I think this has a low priority.

Quote:
Original posted by J Bytheway
No progress yesterday because I tried (and failed) to climb Table Mountain.
Yes some sport is always good, I am shure it is a wonderful place espeacily you climbed it with your own hands and feet.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 5, 2002, 14:13   #129
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
It is a unique file. Yes it is true but only for the original game and the ctp2.exe. For ModSwapper mods it is just under the name of the mod. So the only unique thing of it is that it is under the name and not above. But actual this file has to be linked with the unit.txt, also other files must be linked together, for example if you had a unit to the unit.txt then it should be added to the unitbuildlist.txt. But I think this has a low priority.
I foolishly carried over the uniqueness into CTPEd - that was largely unnecessary and I think should be relatively easy to fix.

Quote:
Yes some sport is always good, I am shure it is a wonderful place espeacily you climbed it with your own hands and feet.
Indeed - I did (I've been up the cable car before), but I'm a lot more out of shape than I thought, after 120m (out of 600m) I gave up with the climbing and went along the contour path instead.

It was mostly feet and not hands - I was going up the easy path which is steep, but just like a steep (irregular, rocky) staircase.
J Bytheway is offline  
Old August 7, 2002, 11:32   #130
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
Have *finally* got citysize working (I opened them without a crash, anyway - see attachment) . It was somewhat harder than I had anticipated... Are there any files which refer to the things therein, because that probably wouldn't work at the moment?.. I also haven't tried editing them yet, but I'm fairly sure that'll work.

(And the code gets ever uglier... I'm close to the point where it would be a good idea to rewrite the whole lot, taking into account all the lessons I've learnt on the way. But I won't. I might end up rewriting fairly large chunks if I feel inclined, but even that seems unlikely at prsent.)
Attached Thumbnails:
Click image for larger version

Name:	citysize.jpg
Views:	89
Size:	18.7 KB
ID:	21627  
J Bytheway is offline  
Old August 9, 2002, 10:15   #131
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'm working slowly on the comment preservation, but I've run into a problem with the comments which are associated with the various field instances.

Because the entry is totally taken to pieces and rebuilt from scratch every time you change it in the entries editing window (which may seem silly, but it works well) the comments cannot easily be associated with the field instance object as would appear to be best at first (and that's what I thought I'd do...). I can try to track them in a different way or attempt to preserve the association over the deconstruction and reconstruction of all the field instances, but neither option is easy.

The substructures make the whole problem considerably more complex too.

If anyone has any advice, I'd welcome it, but otherwise I'm just letting you know that this is unlikely to be done any time soon.
J Bytheway is offline  
Old August 10, 2002, 07:35   #132
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
OK, I'm working slowly on the comment preservation, but I've run into a problem with the comments which are associated with the various field instances.

Because the entry is totally taken to pieces and rebuilt from scratch every time you change it in the entries editing window (which may seem silly, but it works well) the comments cannot easily be associated with the field instance object as would appear to be best at first (and that's what I thought I'd do...). I can try to track them in a different way or attempt to preserve the association over the deconstruction and reconstruction of all the field instances, but neither option is easy.

The substructures make the whole problem considerably more complex too.

If anyone has any advice, I'd welcome it, but otherwise I'm just letting you know that this is unlikely to be done any time soon.
You could treat value of the field and the associated comment as one argument. At least this would work for fields with values like numbers or strings.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 10, 2002, 08:43   #133
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
You could treat value of the field and the associated comment as one argument. At least this would work for fields with values like numbers or strings.
This has problems - primarily that it makes the values much longer, but also the comments can contain new lines and it's harder to resolve a string to an object.

The best suggestion I've had so far is from my Dad - to store the comments in the ToolTipText of the controls on the entries editing window.

In the mean time I've been working on the easy bit, and I have at least got the comments being preserved now, but they're coming out in the wrong place, for example, I put this in:

Code:
#a

ADVANCE_ADV_INFANTRY_TACTICS #b
{ #c
#d
 Prerequisites #e
#f
ADVANCE_NAVAL_AVIATION #g
#h
 Prerequisites ADVANCE_VERTICAL_FLIGHT_AIRCRAFT
 Cost 43080
 Icon ICON_ADVANCE_ADV_INFANTRY_TACTICS
 Branch 0
 Age AGE_THREE #x
} #y
#z
And got this out:

Code:
#a

#b
#c
ADVANCE_ADV_INFANTRY_TACTICS {
#d
#e
#f
#g
#h

 Prerequisites ADVANCE_NAVAL_AVIATION
 Prerequisites ADVANCE_VERTICAL_FLIGHT_AIRCRAFT
 Cost 43080
 Icon ICON_ADVANCE_ADV_INFANTRY_TACTICS
#x
 Branch 0
#y
 Age AGE_THREE
}
#z
It looks like they're all being read a line too early or something similar. I have no ideas at the m,oment but I'm sure I'll sort it out...
J Bytheway is offline  
Old August 11, 2002, 17:57   #134
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
It looks like they're all being read a line too early or something similar. I have no ideas at the m,oment but I'm sure I'll sort it out...
I am shure, too. And when it is done I think it is time for the next public version of CTPEd. So far I tried to make a DiffDB.ces, but it contains some difficuilties.

The first one is that it contains six entries for the different difficuilty settings, but unfortunatly these entries don't have a name. One entry just opens with { and it is closed with }.

The second problem I had was that there are also fileds with more then one argument. Actual I have no idea how the according entry in the *.ces file should look so I only could guess.

The third problem I found is that I have a substructure it just contains a list of advances and two other arguments, actual I have no real idea how to treat with it. So I tried to treat it as a repeatly appearing field without a name.

I think that a substructure in a substructure shouldn't be a problem.

So finally I tried to create a new project from a gamefile.txt, but unfortunatly I got a runtime error '1035' Fields allow multiple but has no argument.

Unfortunatly this error don't give me a file location neither in the *.ces file nor in the *.txt, as the DiffDB.txt file is huge I gave up. Maybe you could take a look on it. You find the for files I made in the attachment.

-Martin
Attached Files:
File Type: zip diffdb.zip (3.2 KB, 3 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 11, 2002, 18:49   #135
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
I am shure, too. And when it is done I think it is time for the next public version of CTPEd.
OK, time for another progress report... Comment preservation is apparently all done. At present any comment associated with a deleted field instance or entry is lost - if that's a big deal for anyone then tell me and I'll add the option to save them as I described a few posts ago.

Other than that I'm just about finished, and I will release the new version soon, after a little more testing, and a couple of last small changes (like that noted below). Of course it's always the last small changes which make for bugs .

I was planning to impliment the adding of the info about where to put blank lines, etc. in the exported files, but I probably won't bother since it's been nearly a fortnight since the last release.

Quote:
So far I tried to make a DiffDB.ces, but it contains some difficuilties.
I had looked at DiffDB.txt, and silently screamed because it's so totally different from the other files (in all the ways that you said).

I'm inclined to not support it. It's a lot of work for just one file, and I think other things are more important. Certainly I won't be supporting it soon.

In the mean time I'll make a format 0 .ces file for it.

Quote:
The second problem I had was that there are also fileds with more then one argument. Actual I have no idea how the according entry in the *.ces file should look so I only could guess.
The NumArgs thing in theory allows more than one argument, but in practice I haven't implimented it yet, and anything other than 0 will be treated as 1.

Quote:
The third problem I found is that I have a substructure it just contains a list of advances and two other arguments, actual I have no real idea how to treat with it. So I tried to treat it as a repeatly appearing field without a name.
That wouldn't work - that's where your 'field allows multiple but has no arguments' error is probably coming from.

Quote:
I think that a substructure in a substructure shouldn't be a problem.
I've worked very hard to ensure that it isn't a problem. But it isn't used anywhere yet, AFAIK.

Quote:
So finally I tried to create a new project from a gamefile.txt, but unfortunatly I got a runtime error '1035' Fields allow multiple but has no argument.

Unfortunatly this error don't give me a file location neither in the *.ces file nor in the *.txt, as the DiffDB.txt file is huge I gave up. Maybe you could take a look on it. You find the for files I made in the attachment.
I'll make that error more clear, but as I said above, if you put fields with no name they're almost certainly the problem.

Last edited by J Bytheway; August 11, 2002 at 19:10.
J Bytheway is offline  
Old August 12, 2002, 08:45   #136
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've encountered a couple of problems (one minor, one major) - this means further delays I'm afraid...
J Bytheway is offline  
Old August 12, 2002, 10:44   #137
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
OK, time for another progress report... Comment preservation is apparently all done. At present any comment associated with a deleted field instance or entry is lost - if that's a big deal for anyone then tell me and I'll add the option to save them as I described a few posts ago.
I think I can live with this, shure we have have to see how it comes out.

Quote:
Originally posted by J Bytheway
I was planning to impliment the adding of the info about where to put blank lines, etc. in the exported files, but I probably won't bother since it's been nearly a fortnight since the last release.
I forgot this one another important think for me, the decission here is hard: On the one hand if you implement it first we have to wait much longer for the next version. But on the other hand a new version would give me more to play.
Quote:
Originally posted by J Bytheway
I had looked at DiffDB.txt, and silently screamed because it's so totally different from the other files (in all the ways that you said).

I'm inclined to not support it. It's a lot of work for just one file, and I think other things are more important. Certainly I won't be supporting it soon.

In the mean time I'll make a format 0 .ces file for it.
That can only be a temporial sollution the aim of CTPEd should be to allow evreyone to modify the files much easier and faster as one could do it with a text editor, that's also the reason why I am not confident with format of the const.ces file. But as you said there are more improtant things. In the case of the DiffDB.txt I agree.

Quote:
Originally posted by J Bytheway
The NumArgs thing in theory allows more than one argument, but in practice I haven't implimented it yet, and anything other than 0 will be treated as 1.
I think this can wait. IIRC I didn't see it anywhere else.

Quote:
Originally posted by J Bytheway
I've worked very hard to ensure that it isn't a problem. But it isn't used anywhere yet, AFAIK.
That is good , because if you want to use CTPEd for CTP1 you might want to make a age.ces for the CTP1 age.txt it contains a substructure in a substructure, too.

Quote:
Originally posted by J Bytheway
I'll make that error more clear, but as I said above, if you put fields with no name they're almost certainly the problem.
Thanks.

In the mean time I made a map.ces, although this files contains two problems:

The first one is that it has an unusual name as Locutus pointed out in another thread. The names contain spaces.

The second problem is again no names for multiple substructures. These entries contain a lot of them. But I think this could be solved if you would use a special caracter in the *.ces file to indicate that the entry has no name and right start with a '{' and will be closed somewhere with a '}'. To be able to view the map.txt in CTPEd I modified the map.txt a little bit. I removed the spaces in the entry name and I added an 'S' before the entries. So I was able to view this file in CTPEd but unfortunatly I was only able to view the first substructure field per entry I wasn't able to access the other ones.

Finally I found some small problem in the govern.ces, the last fields GLHidden and another one weren't editable.

You can find the three files in the attachment.

-Martin
Attached Files:
File Type: zip map_gov.zip (4.2 KB, 3 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 12, 2002, 14:27   #138
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
I think I can live with this, shure we have have to see how it comes out.
Indeed

Quote:
I forgot this one another important think for me, the decission here is hard: On the one hand if you implement it first we have to wait much longer for the next version. But on the other hand a new version would give me more to play.
I think I have an idea for a compromise that will give us the best of both worlds.

Quote:
That can only be a temporial sollution the aim of CTPEd should be to allow evreyone to modify the files much easier and faster as one could do it with a text editor, that's also the reason why I am not confident with format of the const.ces file. But as you said there are more improtant things. In the case of the DiffDB.txt I agree.
Good, and I agree with you in the long term.

Quote:
I think this can wait. IIRC I didn't see it anywhere else.
Until I noticed it in DiffDB.txt I thought It was not present anywhere in CTP2, I had included the option only for the possibility of extending to CTP (where it occurs frequently).

Quote:
In the mean time I made a map.ces, although this files contains two problems:

The first one is that it has an unusual name as Locutus pointed out in another thread. The names contain spaces.

The second problem is again no names for multiple substructures.
I think I see a way to approach both of these problems from a programming point of view.

Quote:
Finally I found some small problem in the govern.ces, the last fields GLHidden and another one weren't editable.
Thanks

I've just thought of a solution to the major problem I mentioned in my last post, so I'll try to get that dealt with tonight.

After the upcoming release I probably won't be doing any new features for a while (thoguh I will do small changes/bugfixes) because I need to start my Uni holiday work.
J Bytheway is offline  
Old August 12, 2002, 20:09   #139
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! This time I really think the comment preservation is working properly. I've tested it on tileimp.txt, which is just about the most complicated file around, and here's another before-and-after for you:

I put in:
Code:
#0
TILEIMP_ADVANCED_FARMS
#1
 {
#2
   Icon ICON_TILEIMP_ADVANCED_FARMS
#3
   Tooltip TOOLTIP_TILEIMP_SELECT_FARM2_BUTTON
   Statusbar STATUSBAR_TILEIMP_SELECT_FARM2_BUTTON
   Level 2
   Class:Farm
#4
   ConstructionTiles 1
#5
   ConstructionTiles 6 #6
   ConstructionTiles 7 #7

   CantBuildOn TERRAIN_BROWN_MOUNTAIN
   CantBuildOn TERRAIN_GLACIER
   CantBuildOn TERRAIN_MOUNTAIN
   CantBuildOn TERRAIN_TUNDRA
   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
   CantBuildOn TERRAIN_WHITE_HILL
   CantBuildOn TERRAIN_WHITE_MOUNTAIN

   Excludes:ATM
   Excludes:Farm
   Excludes:LandDetector
   Excludes:Mine
   Excludes:OceanFarm
   Excludes:OceanDetector
   Excludes:OceanATM
   Excludes:Structure1
   Excludes:Structure2
   Excludes:OceanMine
#8
   TerrainEffect
#9
{
#10
      Terrain TERRAIN_DESERT
      Terrain TERRAIN_GRASSLAND#11
#12
      Terrain TERRAIN_PLAINS
#13
      BonusFood 20
      EnableAdvance ADVANCE_AGRICULTURAL_REVOLUTION
      ProductionCost 500
      ProductionTime 2
      TilesetIndex 8
#14
   }
#15
}
I fiddled for a while without actually changing anything and then got out:
Code:
#0
#1
TILEIMP_ADVANCED_FARMS {
 #2
 Icon ICON_TILEIMP_ADVANCED_FARMS
 #3
 Tooltip TOOLTIP_TILEIMP_SELECT_FARM2_BUTTON
 Statusbar STATUSBAR_TILEIMP_SELECT_FARM2_BUTTON
 Level 2
 Class: Farm
 #4
 ConstructionTiles 1
 #5
 #6
 ConstructionTiles 6
 #7
 ConstructionTiles 7
 CantBuildOn TERRAIN_BROWN_MOUNTAIN
 CantBuildOn TERRAIN_GLACIER
 CantBuildOn TERRAIN_MOUNTAIN
 CantBuildOn TERRAIN_TUNDRA
 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
 CantBuildOn TERRAIN_WHITE_HILL
 CantBuildOn TERRAIN_WHITE_MOUNTAIN
 Excludes: ATM
 Excludes: Farm
 Excludes: LandDetector
 Excludes: Mine
 Excludes: OceanFarm
 Excludes: OceanDetector
 Excludes: OceanATM
 Excludes: Structure1
 Excludes: Structure2
 Excludes: OceanMine

 TerrainEffect #8
 #9
  {
  #10
  Terrain TERRAIN_DESERT
  #11
  Terrain TERRAIN_GRASSLAND
  #12
  Terrain TERRAIN_PLAINS
  #13
  BonusFood 20
  EnableAdvance ADVANCE_AGRICULTURAL_REVOLUTION
  ProductionCost 500
  ProductionTime 2
  TilesetIndex 8
  #14
 }
 #15
}
Which has everything pretty much in the same place. As you can see (depending on how good you are at spot-the-difference ), sometimes the comments move from beside a line to above it or vice versa, but that shouldn't be too drastic, I hope.

I still haven't checked what happens if I actually make modifications to the entry, but I'm fairly confident.

Tomorrow I aim to arrange the compromise I mentioned above for the output format, and that should be all. I hope...

It's past 2am and I'm tired. Good night. (I don't think I've ever used that smily before...)

Last edited by J Bytheway; August 12, 2002 at 20:26.
J Bytheway is offline  
Old August 13, 2002, 10:48   #140
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.4.0
Exactly one fortnight since the last one...
Update at:
http://ctpmodmakers.250free.com/JBTW/CTPEd040.zip

New in this version:

- Added option to share clipboard between files of same type
- Added many more of Martin's structure files
- Added support for citysize?.txt
- Moved definition of comment and delimiter charachters from project files to structure files (not necessary in substructure definition files)
- Fixed minor bugs with the calculation of when to put a scrollbar on the entries editing window
- Implemented crude comment preservation - comments will be kept in roughly the same place between importing and exporting, or lost if their associated entry/field instance is deleted
- Put preference to allow for alteration of the indent increment
- Added option for number at the top of files of format 3 to provide for messageicon.txt
- Improved information in 'Field allows multiple but has no argument' error
- Added the possibility to include additional format information in the .ces files
- Fixed a bug with the help that appears in the status bar
- Advanced file version number to 0.3 due to significant changes - do not use project files from the previous version, rather import from *_gamefile.txt

Still on my to-do list:

- Extend the GL template system to assist with SLIC coding.
- Add error checking systems to allow you to track down problems before you crash CTP2.
- Write more structure files (You can help me with this! Yes, that means YOU!)
- Optimise the code to increase speed and reduce memory consumption.
- Option to hide fields which are superfluous or always set to the same thing (e.g. Branch in advance.txt)
- Sorting tool to rearrange entries in files
- Error checking tool to spot common problems
- 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 newsprite.txt, DiffDB.txt, map.txt
- Multi-entry copy/cut/paste/delete

Warnings:

Not tested as much as I would have liked, especially with regard to the formatting (the last thing that I did), and how it behaves in concert with the comment preservation. I think things might get a little strange if you are playing with comments in a file with more than one field instance on a line.

I recommend that you back things up if they have comments which you're especially attached to.

This will overwrite your preferences when you unzip it.

If you suffer from out of memory errors then please tell me and also (if you can do without it) turn off comment preservation.

As I said before, I won't be doing any major work for a while now, but I'll certainly fix bugs and make small changes.

Things that have changed in the structure files (for those who wish to assist with their creation):

I've shifted the specification of the various comment and delimiter characters in - that goes just under the version number, but not in files which are specifying a substructure (which inherit the information from their 'parent' file). At present all files support both # and // comments, but you can remove support for one if it was necessary for some reason (e.g. in script.slc we don't want # comments, not that script.slc is likely to ever be editable through CTPEd).

The new formatting (for blank lines, etc. in data files) works like this:

In the .ces file (If it's format 1 - too many meanings for format!) you specify whether you're going to bother to include the format information as one of the boolean options at the start.

If you say you will you have to put a lot more info into the .ces file (I've done it for advance.ces, so you can look there for an example) specifying how many new lines are placed between and after field instances. Note that that is new lines, not blank lines. One new line is zero blank lines.

If you say that this information will not be included then it will all revert to the default of one new line in each place - that is the state all the other .ces files are in at present.

As a result the formatting of some files actually looks worse in this version than in the last , but has the potential to look better .

If you put formating info into any .ces file(s) then please post it/them here for inclusion in the next version.

Last edited by J Bytheway; August 14, 2002 at 19:40.
J Bytheway is offline  
Old August 14, 2002, 19:41   #141
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
Don't let the horrific dire warnings and threats of lack-of-support put you off, will you .
J Bytheway is offline  
Old August 17, 2002, 00:50   #142
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 21:38
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
How do i intall this version of the ctped? I did not followed much the recent versions but the readme remais the same as the 0.2 version still i cant find the .ini or even have a clue on how to make it work.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old August 17, 2002, 08:31   #143
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
This is an update - You unzip it over the top of an existing install. If you don't have an existing install then you won't have the ini file, nor the necessary dlls and so forth (well, actually you probably do, since I only used standard MS ones, but you might not...). You need to install the version linked to on the first post of the thread first and then unzip the update over it.
J Bytheway is offline  
Old August 17, 2002, 09:21   #144
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 21:38
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
The version 0.22 download is in a broken link.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old August 17, 2002, 15:34   #145
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
Yes, I removed the updates prior to v0.3.0 because they probably shouldn't be needed by anyone... I'll edit the posts to that effect.
J Bytheway is offline  
Old August 22, 2002, 10:35   #146
Ekmek
Call to Power II Democracy GameCTP2 Source Code Project
Emperor
 
Ekmek's Avatar
 
Local Time: 17:38
Local Date: October 31, 2010
Join Date: May 1999
Posts: 3,156
can I add new civs with this?
__________________
Formerly known as "E" on Apolyton

See me at Civfanatics.com
Ekmek is offline  
Old August 22, 2002, 11:03   #147
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
Not easily and not at the moment, because no structure file has been made for civilization.txt (IIRC that's the relevant file). If you made a structure file, then you could, but I think that has a lot of multiple fields, which are not supported very well at present.
J Bytheway is offline  
Old August 27, 2002, 12:14   #148
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
Not easily and not at the moment, because no structure file has been made for civilization.txt (IIRC that's the relevant file). If you made a structure file, then you could, but I think that has a lot of multiple fields, which are not supported very well at present.
Actual only the city fields are multiple, so it shouldn't be a problem fro CTPEd to handle it but it wouldn't do it in a very comfortablle way. By the way you need another file the civ_str.txt that store all the strings.

So far I thought I could test the layout preservation on the advance.txt and modified the advance.txt. I think this will be the first file modified with CTPEd that will be released. Unfortunatly I wasn't content with the output layout. First I wasn't able to find the place where you define the numbers of spaces or tabs in front of the fields in the substructures. Second I wasn't able to find the place where I could difine I many new lines should be between the different entries. Third I think it would be better if you could specify how many new lines should be before the first field instance. That would be better instead of just having the how meany new lines at the start of an entry definition. In the attachment you can find the original file generated by CTPEd and the file with the layout I want and achieved after some manual editing.

So far I didn't figured out how the mass modifing option work, but it seems that I can modify with it also an single entry like multiplying and interger field or devide it.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 27, 2002, 12:15   #149
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
Forgot the attachment.
Attached Files:
File Type: zip advances.zip (6.3 KB, 4 views)
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old August 27, 2002, 15:29   #150
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'm sorry - I can't get online with my PC right now, so I can't help with that - I'll do so just as soon as I can. The numbers of spaces or tabs is defined in the preferences, not the .ces file. That's a bit inconsistant, nut I seem to recall you requesting that at some point...
J Bytheway 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