Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Source Code Project > DESIGN: Changing the units.txt layout
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
CivGroups
CTP2 Source Code Project (59): Not a Member - Join

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 11-03-2004 21:06
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
DESIGN: Changing the units.txt layout Put an end to popups!

Hi all,

I was just trying to 'import' the units.txt-file into an excel-file to be able to have an easier overview over the different values. I did it because of the discussion in DESIGN: Armor and HP's. I must admit I am still having a headache to finish it.

My idea, which I would like to propose (and I would be willing to create it) is instead of having the till now structure in the units.txt file changing it to a more moder and user-friendly version, based on Excel.

So instead of really changing it by hand, we could do it via Excel. The changes for this to implement (me thinks) shall be easy.

The file shall be saved as csv, all entries ,even if empty would have a comma-delimiter, so making it easier to check afterwards. This would also allow to re-import into Excel, although I would suggest to have just one master-template (as I said I would be willing to create it, so that you would just select (like: Yes/no, or a value).

Example:

So instead of looking like this:

## UNIT 0
UNIT_ABOLITIONIST {
Description DESCRIPTION_UNIT_ABOLITIONIST
DefaultIcon ICON_UNIT_ABOLITIONIST
DefaultSprite SPRITE_ABOLITIONIST
Category UNIT_CATEGORY_SPECIAL
Attack 0
Defense 10
ZBRangeAttack 0
Firepower 1
Armor 1
MaxHP 10
ShieldCost 540
PowerPoints 250
ShieldHunger 5
FoodHunger 0
MaxMovePoints 300
VisionRange 1
EnableAdvance ADVANCE_CLASSICAL_EDUCATION
ActiveDefenseRange 0
LossMoveToDmgNone
MaxFuel 0
IgnoreZOC
NoZoc
CanBeExpelled
CantCaptureCity
NoSlaves
IsSpecialForces
Civilian
SoundSelect1 SOUND_SELECT1_ABOLITIONIST
SoundSelect2 SOUND_SELECT2_ABOLITIONIST
SoundMove SOUND_MOVE_ABOLITIONIST
SoundAcknowledge SOUND_ACKNOWLEDGE_ABOLITIONIST
SoundCantMove SOUND_CANTMOVE_ABOLITIONIST
SoundAttack SOUND_ATTACK_ABOLITIONIST
SoundWork SOUND_WORK_ABOLITIONIST
SoundVictory SOUND_VICTORY_ABOLITIONIST
SoundDeath SOUND_DEATH_ABOLITIONIST

CanSee: Standard
CanSee: Stealth
MovementType: Land
MovementType: Mountain
Size: Small
VisionClass: Stealth

SlaveUprising {
Sound SOUND_ID_SLAVE_UPRISING
Effect SPECEFFECT_SLAVE_UPRISING
}

UndergroundRailway {
Chance 0.75
DeathChance 0.5
Sound SOUND_ID_UNDERGROUND_RAILWAY
Effect SPECEFFECT_UNDERGROUND_RAILWAY
}
}

##################################################
##########


It would be looking like this:

##_UNIT_0;UNIT_ABOLITIONIST;{;Description;DESCRIPT
ION_UNIT_ABOLITIONIST;DefaultIcon;ICON_UNIT_ABOLIT
IONIST;DefaultSprite;SPRITE_ABOLITIONIST;Category;
;UNIT_CATEGORY_SPECIAL;Attack;0;Defense;10;ZBRange
Attack;0;Firepower;1;Armor;1;MaxHP;10;ShieldCost;5
40;PowerPoints;250;ShieldHunger;5;FoodHunger;0;Max
MovePoints;300;VisionRange;1;EnableAdvance;ADVANCE
_CLASSICAL_EDUCATION;ActiveDefenseRange;0;LossMove
ToDmgNone;MaxFuel;0;IgnoreZOC;NoZoc;CanBeExpelled;
CantCaptureCity;NoSlaves;IsSpecialForces;Civilian;
SoundSelect1;SOUND_SELECT1_ABOLITIONIST;SoundSelec
t2;SOUND_SELECT2_ABOLITIONIST;SoundMove;SOUND_MOVE
_ABOLITIONIST;SoundAcknowledge;SOUND_ACKNOWLEDGE_A
BOLITIONIST;SoundCantMove;SOUND_CANTMOVE_ABOLITION
IST;SoundAttack;SOUND_ATTACK_ABOLITIONIST;SoundWor
k;SOUND_WORK_ABOLITIONIST;SoundVictory;SOUND_VICTO
RY_ABOLITIONIST;SoundDeath;SOUND_DEATH_ABOLITIONIS
T;CanSee:;Standard;CanSee:;Stealth;MovementType:;L
and;MovementType:;Mountain;Size:;Small;VisionClass
:;Stealth;SlaveUprising;{;;;;Sound;SOUND_ID_SLAVE_
UPRISING;;;;Effect;SPECEFFECT_SLAVE_UPRISING;};Und
ergroundRailway;{;;;;Chance;0.75;;;;DeathChance;0. 5;;;;Sound;SOUND_ID_UNDERGROUND_RAILWAY;;;;Effect;
SPECEFFECT_UNDERGROUND_RAILWAY;};};;

Actually a few commas missing, as I said still working on. And it doesn't appear correctly, everything shall be in one line , whatever....I hope you get my idea anyway.

For purpose I didn't open a poll as I am not 100% sure, if it would take a lot of effort to change it, if it is possible and if we want to do it. As I said, I would do the excel-sheet. If for any reason CTP2 can not read such a long line, there would be another possibilty to translate all commas into 0d0a (CR/LF) sequence with either a hex-editor or an external program (would need to be writen in any language).

Attahced is my pure excel-file so that people get a better idea. I will update it once I got further.

Attachment: unitsxls3.zip
This has been downloaded 0 time(s).

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 11-03-2004 21:18
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Enter the AD-FREE zone

I guess we could... but I don't think we should.

My vote would be... no.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 11-03-2004 22:29 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Errrm... you call that modmakers friendly?

Excel can work with the existing setup as well and there are programs like J Bytheway's CtPEd for those who want more advanced editing tools. For those of us who actually have and know how to use a decent text editor (i.e. NOT Notepad/Wordpad), the current setup works great. Your proposal makes text-file editing near impossible.

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:34
  Old Post 11-03-2004 22:31 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

I'd like to see it in a format that would allow for an easier mod editor, i guess excel would be one way.

It should also allow for a lot of different abilities or requirements (like consume shield, food each turn, or resources) in anticipation of new features

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:34
  Old Post 11-03-2004 22:45 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Put an end to popups!

what about linux

i don't play ctp2 on Linux but I would say at the moment most scenarios are probably compatible with Linux ( tell me if I am wrong) if we change it to this set up the linux moders will lose out

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 00:12 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Browse Apolyton AD-FREE

There's no such thing as a CtP2 port to Linux for CtP2. Some people are working on it but it doesn't exist yet. And no, for Linux it shouldn't make an awful lot of difference how the scenarios/mods are organised as far as I can see. But because the end-of-line characters are different in Linux, they'll will have annoying reduntant /r's at the end of every line. Shouldn't cause any problems, but in some text editors it looks ugly (but the better editors can even deal with all sorts of EOL formats -- I know mine can )

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 12-03-2004 13:17
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by Locutus
Errrm... you call that modmakers friendly?

Excel can work with the existing setup as well and there are programs like J Bytheway's CtPEd for those who want more advanced editing tools. For those of us who actually have and know how to use a decent text editor (i.e. NOT Notepad/Wordpad), the current setup works great. Your proposal makes text-file editing near impossible.


CtPed, is it in the directory? I haven't seen it there.

How do you want to have it working with the current setup? It ttok me quite some work (hex-editor) to get it into this format?

BigMc,

as I said, it shall be saved as a csv-file, means comma-delimited and IIRC also under Unix/Linux there are programs like excel which can read those files.

Coming back to those text-editor guys:

There wouldn't be really any need anymore, just use the master-sheet, change&save. Easy to go.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 14:49 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Increase the size of your Attachments

quote:
Originally posted by Gilgamensch


CtPed, is it in the directory? I haven't seen it there.


Not sure, don't think so. But it's in the topped threads in the CtP Creation forum for sure. Here's the CtPEd thread: http://apolyton.net/forums/showthre...&threadid=50102

quote:
How do you want to have it working with the current setup? It ttok me quite some work (hex-editor) to get it into this format?


I never try to use Excel for stuff it wasn't meant to be used for, but I suggest you ask the guy who did the Excel sheet for CtP1.

quote:
There wouldn't be really any need anymore, just use the master-sheet, change&save. Easy to go.


Yes, there would be a need for something more for most people: about €200 to buy a stupid M$ product you'd probably never use for anything else.

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 12-03-2004 15:12
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Thanks for the link

I'll have a look, if you remember who it was I would appreciate it

quote:

Yes, there would be a need for something more for most people: about €200 to buy a stupid M$ product you'd probably never use for anything else.


Most computers which you by nowadays (even for the last 2 years) are normally equiped with it and second as the file is saved as cvs you can use any similar program. IIRC even the (IIRC) free star-excel (or however it is called) can import from a csv-file. It would be just, that we would just need to change once, what you use afterwards, isn't really the question. Excel I suggested as I know it not to bad and it is fairly easy to use (if you know what you are doing )

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 15:30 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

quote:
Originally posted by Gilgamensch
I'll have a look, if you remember who it was I would appreciate it


I remember who it was just fine, it was Fin Fahey. But since I doubt you know him I figured I wouldn't mention him by name.

But I did you a favour and looked the file up: turns out it's Access, not Excel. Which makes sense, since Fin was a very intelligent guy, he's smart enough not to use a Spreadsheet program to manage a database. The file can be downloaded here: http://apolyton.net/dir/index.php?i...its=4650&cat=36

quote:
Most computers which you by nowadays (even for the last 2 years) are normally equiped with it


No, they don't. Maybe if you buy a HP or Packard Bell PC, but how many people are that stupid? And even those people who do still pay the €200, they just don't realize that.

quote:
Excel I suggested as I know it not to bad and it is fairly easy to use (if you know what you are doing )


Excel works fairly well if you use it properly -- as a Spreadsheet. Why people always complain it's a crappy database manager is beyond me: it isn't a database manager at all, so you shouldn't use it as such.

Either way, I don't think we should shut those of us who don't know how to use Excel (or similar programs who can open the same file) out of modmaking. Which is probably about 70-80% of all PC users. A text file everyone can deal with.

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 12-03-2004 16:19
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Thanks for the link, just downloaded it and checked. Even into there you can import csv without problems.

But I am not talking about having an mdb-file, which we can't use at all for CTP2. I was talking about using excel (and similar programs) to create

CSV-files not an XLS file. Those files you can still edit via a text-editor or use Excel (and similar) to modify it easily.

And I am not talking about having excel as a database-manager, just a tool to make it easier to change.

SO Excel would just be a tool to create csv-files, if you still don't understand what csv stands for:

CSV, comma separated view, so a normal text-file.

The Excel would be for people, who have it and could use it to CREATE a csv-file. If you don't have excel, just import the CSV to any program which can handle csv and you can do whatever you want, just has to be saved again as CSV.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 16:59 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Put an end to popups!

The MDB file links to the text files, it updates them as well, while leaving them in their original format (or at least that's my understanding, I have little experience with Access myself, not exactly my favourite database program).

I'm not opposed to having tools to help modding, aux contraire. But I *am* opposed to using a format for the text files that seriously hinders modding, as your proposal does.

If Excel doesn't have a decent import function that can handle EOLs, that's a deficiency of Excel, not CtP2 (but again, Excel was never intended as database program, so you can hardly hold that against the program). A deficiency which other programs (such as Access, to the best of my knowledge) don't have, so you could use one of those instead.

But if you want to use CSV to store CtP2 data, you could easily write a simple script that converts CSV files to and from CtP2 format. Doesn't Excel have (limited?) VBscript support? Never used it myself, but I think I read about that somewhere. Even a simple VB script should be able to handle such a conversion.

I know what a CSV file is but have you ever actually tried editing one with a text editor? CtP2's file format is by far superior for its purpose, much easier to read and edit without the aid of non-standard software. By using a CSV file, you pretty much force people to use a database-like program rather than a simple text editor. A lot of people wouldn't even know any such programs, let alone be happy to have to buy/download and learn to use one.

Adding extra tools for CtP2 modding is great, but the tools should be designed for CtP2, not the other way around.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:34
  Old Post 12-03-2004 17:09 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Increase the size of your Attachments

yes locutus excel does have vba code. it would be posible to generate the code to change it but why bother the amount of code needed would never pay for the time you save

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 17:11 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Tired of ads?

Well, I don't know how VB works in Excel but replacing a few comma's with EOLs and vice-versa and inserting a few braces shouldn't be that much work...

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 12-03-2004 17:26
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy Call to Power 2

The file by Fin Fahey is only partially 'useful'. Some files are covered some others aren't.

And Access is even less known as Excel or similar.

But if you want to use CSV to store CtP2 data, you could easily write a simple script that converts CSV files to and from CtP2 format.

The reason why I suggested to move to csv is, that a lot of programs alow import/export of csv without any problem. CSV was/is a 'standard' transfer format, even for databases.

quote:

Even a simple VB script should be able to handle such a conversion.

Yes you can, but that would ultimitvly restrict it only to excel.

I don't know access to well, but there isn't any EOL into whatever translation.

When importing a csv-file (supposed all the commas are there), you can use any program and have a nice overview, like in a table. Same goes for modifying, just change it, save it as csv and all done.

quote:

CtP2's file format is by far superior for its purpose, much easier to read and edit without the aid of non-standard software


don't really agree, have you ever tried to find units with certain values/restrictions ? Like which units are ignoring ZOC? With csv and imported into excel, make a sort on this coloumn and off you go. You want to easily change 10 units to have ZOC, no problem. You want to know all flanking units? Again no problem. You want to see all sound-files.........whatever........

You want to quickly see, who can attack what?


It would be all in the same position, easy readable and changeable.

And about how to learn to use it:

I think everyone can learn in 2 minutes (even if via help) how to import/export a csv-file. So that sounds a bit off.

The buying 'reason':

CSV would not prevent people from being able to modify it with a text-editor. As you might have seen I left the descriptions in:

;DefaultIcon;ICON_UNIT_ABOLIT
IONIST;DefaultSprite;SPRITE_ABOLITIONIST

So the only difference for using a text-editor, you would be reading horizontal instead of vertical ...yeah..great deal........

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 18:33 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Inflate your Upload Space

quote:
Originally posted by Gilgamensch
The file by Fin Fahey is only partially 'useful'. Some files are covered some others aren't.

And Access is even less known as Excel or similar.


Yes, and it's for CtP1 too. But it can be modified and expanded if one would be interested in using it.

It is just an example of something that DOES work. There are many others I'm sure.

quote:
The reason why I suggested to move to csv is, that a lot of programs alow import/export of csv without any problem. CSV was/is a 'standard' transfer format, even for databases.


It's not standard for 90% of PC users. CSV is non-standard for normal PC users, and a pain to edit unless you have a database program, which again, a lot of people don't.

If you work in IT or related business you'll have no problems with it (assuming you're willing to use such software, which I for one am not, or only as an addition to curent system) but the strength of the CtP series is exactly that the majority of modmakers doesn't and is still capable of editing the game in amazing ways.

quote:
Yes you can, but that would ultimitvly restrict it only to excel.


Well, you're the one who's so keen on using Excel But if you want to make it useful for all programs, simply code it in PHP or some other external scripting language. But most database programs I've worked with (which granted aren't terribly large in number) can handle custom-formats fairly easily, so they wouldn't need it.

quote:
don't really agree, have you ever tried to find units with certain values/restrictions ? Like which units are ignoring ZOC?


That's really fairly easy, if you have a decent text editor and know how to use it. Doing that in Excel requires more extensive knowledge of the program than most Excel users I know have (and I'm not even counting the people who don't know Excel at all).

quote:
I think everyone can learn in 2 minutes (even if via help) how to import/export a csv-file. So that sounds a bit off.


It's not just the import, it's using a spreadsheet or database program. You're assuming everyone who uses PCs is as experienced as you are, which I can assure you is not the case. One simple example: my mom has worked with Excel every day for the past 3 years at least (probably longer) and followed several courses before she started to use it, but a simple thing such as sorting a row or column in alphabetical order I have to explain to her again and again every time she needs to do it. My dad and most of my mom's collegues are even worse. As simple as the tasks you describe are to you and me, for plenty of people they're pretty darn complicated...

Modmaking should have a low threshold, which non-standard file formats and complicated editors such as your CSV and Excel combo and also e.g. Civ3 formats don't offer. There's a good reason why CtP2 is superior to that game (more than one actually ) and I'd like to keep it that way.

quote:
CSV would not prevent people from being able to modify it with a text-editor.


I'm sorry, but THIS:

quote:
##_UNIT_0;UNIT_ABOLITIONIST;{;Description;D
ESCRIPT
ION_UNIT_ABOLITIONIST;DefaultIcon;ICON_UNIT_ABOLIT

IONIST;DefaultSprite;SPRITE_ABOLITIONIST;Category;

;UNIT_CATEGORY_SPECIAL;Attack;0;Defense;10;ZBRange

Attack;0;Firepower;1;Armor;1;MaxHP;10;ShieldCost;5

40;PowerPoints;250;ShieldHunger;5;FoodHunger;0;Max

MovePoints;300;VisionRange;1;EnableAdvance;ADVANCE

_CLASSICAL_EDUCATION;ActiveDefenseRange;0;LossMove

ToDmgNone;MaxFuel;0;IgnoreZOC;NoZoc;CanBeExpelled;

CantCaptureCity;NoSlaves;IsSpecialForces;Civilian;

SoundSelect1;SOUND_SELECT1_ABOLITIONIST;SoundSelec

t2;SOUND_SELECT2_ABOLITIONIST;SoundMove;SOUND_MOVE

_ABOLITIONIST;SoundAcknowledge;SOUND_ACKNOWLEDGE_A

BOLITIONIST;SoundCantMove;SOUND_CANTMOVE_ABOLITION

IST;SoundAttack;SOUND_ATTACK_ABOLITIONIST;SoundWor

k;SOUND_WORK_ABOLITIONIST;SoundVictory;SOUND_VICTO

RY_ABOLITIONIST;SoundDeath;SOUND_DEATH_ABOLITIONIS

T;CanSee:;Standard;CanSee:;Stealth;MovementType:;L

and;MovementType:;Mountain;Size:;Small;VisionClass

:;Stealth;SlaveUprising;{;;;;Sound;SOUND_ID_SLAVE_

UPRISING;;;;Effect;SPECEFFECT_SLAVE_UPRISING;};Und

ergroundRailway;{;;;;Chance;0.75;;;;DeathChance;0. 5;;;;Sound;SOUND_ID_UNDERGROUND_RAILWAY;;;;Effect;

SPECEFFECT_UNDERGROUND_RAILWAY;};};;


is NOT reasonably editable in a text file. Especially not if you multiply that by 200, for every unit in the game.


Don't get me wrong, I can certainly see the added value of a powerful database program to manage all that data and if the option was there, I would use it myself. But it should never be at the expense of more basic methods.

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 12-03-2004 18:57
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Tired of ads?

quote:

My dad and most of my mom's collegues are even worse.


This sounds scary!!!!!!!!!! Are we so advanced or ahm.........

quote:

CSV is non-standard for normal PC users, and a pain to edit unless you have a database program, which again, a lot of people don't.


Are we here really normal PC-users ?


quote:

but the strength of the CtP series is exactly that the majority of modmakers doesn't and is still capable of editing the game in amazing ways.


This wouldn't change.

quote:

That's really fairly easy, if you have a decent text editor and know how to use it

quote:

is NOT reasonably editable in a text file

Contradiction in it's own ? If you have a decent text editor it doesn't matter how the file is structured. So this is a point against your opinion.
Also the: if you know how to use it.

quote:

Especially not if you multiply that by 200

Why you think I thought of having it in csv. It wouldn't matter. If you want to modify 200 units to balance them better, it will be hell of a job to scroll all the time up and down to check & balance values. Like with the Armor values...............

The only difference I am kind of proposing is to change it from vertical to horizontal, so where is the difference for modders? Or you never learned how to read a LINE ?

OK, another thing what would be changed is that unused fields would be filled in (extra comma).

quote:

CSV and Excel combo

CSV not EXCEL. Excel is a tool to create CSV, like your favourite text-editor.......Jesus..............

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 19:26 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton or Terrorists Win

quote:
The only difference I am kind of proposing is to change it from vertical to horizontal, so where is the difference for modders? Or you never learned how to read a LINE ?


Okay, let's put it this way: if you don't have Excel or whatever, in which of these two sections is it easier to see what the movement types of these 5 units are (sorry, the first isn't exactly CSV because I couldn't be arsed to convert it fully, but it's close enough):

quote:
## UNIT 0,UNIT_ABOLITIONIST {, Description DESCRIPTION_UNIT_ABOLITIONIST, DefaultIcon ICON_UNIT_ABOLITIONIST, DefaultSprite SPRITE_ABOLITIONIST, Category UNIT_CATEGORY_SPECIAL, Attack 0, Defense 10, ZBRangeAttack 0, Firepower 1, Armor 1, MaxHP 10, ShieldCost 540, PowerPoints 250, ShieldHunger 5, FoodHunger 0, MaxMovePoints 300, VisionRange 1, EnableAdvance ADVANCE_CLASSICAL_EDUCATION, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, IgnoreZOC, NoZoc, CanBeExpelled, CantCaptureCity, NoSlaves, IsSpecialForces, Civilian, SoundSelect1 SOUND_SELECT1_ABOLITIONIST, SoundSelect2 SOUND_SELECT2_ABOLITIONIST, SoundMove SOUND_MOVE_ABOLITIONIST, SoundAcknowledge SOUND_ACKNOWLEDGE_ABOLITIONIST, SoundCantMove SOUND_CANTMOVE_ABOLITIONIST, SoundAttack SOUND_ATTACK_ABOLITIONIST, SoundWork SOUND_WORK_ABOLITIONIST, SoundVictory SOUND_VICTORY_ABOLITIONIST, SoundDeath SOUND_DEATH_ABOLITIONIST,, CanSee: Standard, CanSee: Stealth, MovementType: Land, MovementType: Mountain, Size: Small, VisionClass: Stealth,, SlaveUprising {, Sound SOUND_ID_SLAVE_UPRISING, Effect SPECEFFECT_SLAVE_UPRISING, },, UndergroundRailway {, Chance 0.75, DeathChance 0.5, Sound SOUND_ID_UNDERGROUND_RAILWAY, Effect SPECEFFECT_UNDERGROUND_RAILWAY, },},,#############################################
###############,,##
UNIT 1,UNIT_AIRCRAFT_CARRIER {, Description DESCRIPTION_UNIT_AIRCRAFT_CARRIER, DefaultIcon ICON_UNIT_AIRCRAFT_CARRIER, DefaultSprite SPRITE_AIRCRAFT_CARRIER, Category UNIT_CATEGORY_NAVAL, Attack 25, Defense 30, ZBRangeAttack 25, Firepower 1, Armor 1, MaxHP 10, ShieldCost 3000, PowerPoints 3000, ShieldHunger 30, FoodHunger 0, MaxMovePoints 400, VisionRange 3, EnableAdvance ADVANCE_NAVAL_AVIATION, BombRounds 10, BombardRange 1, ActiveDefenseRange 1, ActiveDefenseOnlyWhenCarryingEnablers, LossMoveToDmgNone, MaxFuel 0, CanExpel, CanPillage, CanPirate, CantCaptureCity, ExertsMartialLaw, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_AIRCRAFT_CARRIER, SoundSelect2 SOUND_SELECT2_AIRCRAFT_CARRIER, SoundMove SOUND_MOVE_AIRCRAFT_CARRIER, SoundAcknowledge SOUND_ACKNOWLEDGE_AIRCRAFT_CARRIER, SoundCantMove SOUND_CANTMOVE_AIRCRAFT_CARRIER, SoundAttack SOUND_ATTACK_AIRCRAFT_CARRIER, SoundWork SOUND_WORK_AIRCRAFT_CARRIER, SoundVictory SOUND_VICTORY_AIRCRAFT_CARRIER, SoundDeath SOUND_DEATH_AIRCRAFT_CARRIER,, CanAttack: Sea, CanAttack: ShallowWater, CanCarry: MedAir, CanCarry: SmallAir, CanSee: Standard, Defend: Air, MovementType: Sea, MovementType: ShallowWater, Size: Large, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },, CargoData {, MaxCargo 5, Load SOUND_ID_AIRCRAFT_CARRIER_LOAD, Unload SOUND_ID_AIRCRAFT_CARRIER_UNLOAD, },},,#############################################
###############,,##
UNIT 2,UNIT_ARCHER {, Description DESCRIPTION_UNIT_ARCHER, DefaultIcon ICON_UNIT_ARCHER, DefaultSprite SPRITE_ARCHER, Category UNIT_CATEGORY_RANGED, Attack 10, Defense 10, ZBRangeAttack 20, Firepower 1, Armor 1, MaxHP 10, ShieldCost 150, PowerPoints 100, ShieldHunger 1, FoodHunger 0, MaxMovePoints 100, VisionRange 2, EnableAdvance ADVANCE_BALLISTICS, ObsoleteAdvance ADVANCE_CANNON_MAKING, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, CanEntrench, CanExpel, CanPillage, CanPirate, ExertsMartialLaw, DeathEffectsHappy, SoundSelect1 SOUND_SELECT1_ARCHER, SoundSelect2 SOUND_SELECT2_ARCHER, SoundMove SOUND_MOVE_ARCHER, SoundAcknowledge SOUND_ACKNOWLEDGE_ARCHER, SoundCantMove SOUND_CANTMOVE_ARCHER, SoundAttack SOUND_ATTACK_ARCHER, SoundWork SOUND_WORK_ARCHER, SoundVictory SOUND_VICTORY_ARCHER, SoundDeath SOUND_DEATH_ARCHER,, CanAttack: Land, CanAttack: Mountain, CanSee: Standard, MovementType: Land, MovementType: Mountain, Size: Small, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },},,#############################################
###############,,##
UNIT 3,UNIT_ARTILLERY {, Description DESCRIPTION_UNIT_ARTILLERY, DefaultIcon ICON_UNIT_ARTILLERY, DefaultSprite SPRITE_ARTILLERY, Category UNIT_CATEGORY_RANGED, Attack 10, Defense 20, ZBRangeAttack 70, Firepower 3, Armor 2, MaxHP 10, ShieldCost 1500, PowerPoints 1200, ShieldHunger 15, FoodHunger 0, MaxMovePoints 200, VisionRange 2, EnableAdvance ADVANCE_EXPLOSIVES, BombRounds 5, BombardRange 1, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, CanEntrench, CanExpel, CanPillage, CanPirate, ExertsMartialLaw, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_ARTILLERY, SoundSelect2 SOUND_SELECT2_ARTILLERY, SoundMove SOUND_MOVE_ARTILLERY, SoundAcknowledge SOUND_ACKNOWLEDGE_ARTILLERY, SoundCantMove SOUND_CANTMOVE_ARTILLERY, SoundAttack SOUND_ATTACK_ARTILLERY, SoundWork SOUND_WORK_ARTILLERY, SoundVictory SOUND_VICTORY_ARTILLERY, SoundDeath SOUND_DEATH_ARTILLERY,, CanAttack: Air, CanAttack: Land, CanAttack: Mountain, CanBombard: Land, CanBombard: Mountain, CanBombard: Water, CanSee: Standard, MovementType: Land, MovementType: Mountain, Size: Medium, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },},,#############################################
###############,,##
UNIT 4,UNIT_BATTLESHIP {, Description DESCRIPTION_UNIT_BATTLESHIP, DefaultIcon ICON_UNIT_BATTLESHIP, DefaultSprite SPRITE_BATTLESHIP, Category UNIT_CATEGORY_NAVAL, Attack 60, Defense 50, ZBRangeAttack 60, Firepower 4, Armor 3, MaxHP 10, ShieldCost 3500, PowerPoints 2000, ShieldHunger 35, FoodHunger 0, MaxMovePoints 500, VisionRange 3, EnableAdvance ADVANCE_ADV_NAVAL_TACTICS, BombRounds 5, BombardRange 1, ActiveDefenseRange 0, LossMoveToDmgNone, MaxFuel 0, CanExpel, CanPillage, CanPirate, CantCaptureCity, ExertsMartialLaw, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_BATTLESHIP, SoundSelect2 SOUND_SELECT2_BATTLESHIP, SoundMove SOUND_MOVE_BATTLESHIP, SoundAcknowledge SOUND_ACKNOWLEDGE_BATTLESHIP, SoundCantMove SOUND_CANTMOVE_BATTLESHIP, SoundAttack SOUND_ATTACK_BATTLESHIP, SoundWork SOUND_WORK_BATTLESHIP, SoundVictory SOUND_VICTORY_BATTLESHIP, SoundDeath SOUND_DEATH_BATTLESHIP,, CanAttack: Sea, CanAttack: ShallowWater, CanBombard: Land, CanBombard: Mountain, CanBombard: Water, CanSee: Standard, MovementType: Sea, MovementType: ShallowWater, Size: Large, VisionClass: Standard,, CanReform {, Sound SOUND_ID_REFORM_CITY, Effect SPECEFFECT_REFORMCITY, },},,#############################################
###############,,##
UNIT 5,UNIT_BOMBER {, Description DESCRIPTION_UNIT_BOMBER, DefaultIcon ICON_UNIT_BOMBER, DefaultSprite SPRITE_BOMBER, Category UNIT_CATEGORY_AERIAL, Attack 30, Defense 30, ZBRangeAttack 60, Firepower 3, Armor 2, MaxHP 10, ShieldCost 2250, PowerPoints 3000, ShieldHunger 22, FoodHunger 0, MaxMovePoints 1000, VisionRange 2, EnableAdvance ADVANCE_JET_PROPULSION, ObsoleteAdvance ADVANCE_ADVANCED_COMPOSITES, BombRounds 5, BombardRange 1, ActiveDefenseRange 0, LossMoveToDmgNone, NoFuelThenCrash, MaxFuel 5000, IgnoreZOC, NoZoc, CantCaptureCity, DeathEffectsHappy, Explodes, SoundSelect1 SOUND_SELECT1_BOMBER, SoundSelect2 SOUND_SELECT2_BOMBER, SoundMove SOUND_MOVE_BOMBER, SoundAcknowledge SOUND_ACKNOWLEDGE_BOMBER, SoundCantMove SOUND_CANTMOVE_BOMBER, SoundAttack SOUND_ATTACK_BOMBER, SoundWork SOUND_WORK_BOMBER, SoundVictory SOUND_VICTORY_BOMBER, SoundDeath SOUND_DEATH_BOMBER,, CanAttack: Air, CanAttack: Land, CanAttack: Mountain, CanAttack: Sea, CanAttack: ShallowWater, CanBombard: Land, CanBombard: Mountain, CanBombard: Water, CanCarry: SmallAir, CanSee: Standard, MovementType: Air, Size: Medium, VisionClass: Standard,, CargoData {, MaxCargo 1, Load SOUND_ID_BOMBER_LOAD, Unload SOUND_ID_BOMBER_UNLOAD, },},


or

quote:
## UNIT 0
UNIT_ABOLITIONIST {
Description DESCRIPTION_UNIT_ABOLITIONIST
DefaultIcon ICON_UNIT_ABOLITIONIST
DefaultSprite SPRITE_ABOLITIONIST
Category UNIT_CATEGORY_SPECIAL
Attack 0
Defense 10
ZBRangeAttack 0
Firepower 1
Armor 1
MaxHP 10
ShieldCost 540
PowerPoints 250
ShieldHunger 5
FoodHunger 0
MaxMovePoints 300
VisionRange 1
EnableAdvance ADVANCE_CLASSICAL_EDUCATION
ActiveDefenseRange 0
LossMoveToDmgNone
MaxFuel 0
IgnoreZOC
NoZoc
CanBeExpelled
CantCaptureCity
NoSlaves
IsSpecialForces
Civilian
SoundSelect1 SOUND_SELECT1_ABOLITIONIST
SoundSelect2 SOUND_SELECT2_ABOLITIONIST
SoundMove SOUND_MOVE_ABOLITIONIST
SoundAcknowledge SOUND_ACKNOWLEDGE_ABOLITIONIST
SoundCantMove SOUND_CANTMOVE_ABOLITIONIST
SoundAttack SOUND_ATTACK_ABOLITIONIST
SoundWork SOUND_WORK_ABOLITIONIST
SoundVictory SOUND_VICTORY_ABOLITIONIST
SoundDeath SOUND_DEATH_ABOLITIONIST

CanSee: Standard
CanSee: Stealth
MovementType: Land
MovementType: Mountain
Size: Small
VisionClass: Stealth

SlaveUprising {
Sound SOUND_ID_SLAVE_UPRISING
Effect SPECEFFECT_SLAVE_UPRISING
}

UndergroundRailway {
Chance 0.75
DeathChance 0.5
Sound SOUND_ID_UNDERGROUND_RAILWAY
Effect SPECEFFECT_UNDERGROUND_RAILWAY
}
}

##################################################
##########

## UNIT 1
UNIT_AIRCRAFT_CARRIER {
Description DESCRIPTION_UNIT_AIRCRAFT_CARRIER
DefaultIcon ICON_UNIT_AIRCRAFT_CARRIER
DefaultSprite SPRITE_AIRCRAFT_CARRIER
Category UNIT_CATEGORY_NAVAL
Attack 25
Defense 30
ZBRangeAttack 25
Firepower 1
Armor 1
MaxHP 10
ShieldCost 3000
PowerPoints 3000
ShieldHunger 30
FoodHunger 0
MaxMovePoints 400
VisionRange 3
EnableAdvance ADVANCE_NAVAL_AVIATION
BombRounds 10
BombardRange 1
ActiveDefenseRange 1
ActiveDefenseOnlyWhenCarryingEnablers
LossMoveToDmgNone
MaxFuel 0
CanExpel
CanPillage
CanPirate
CantCaptureCity
ExertsMartialLaw
DeathEffectsHappy
Explodes
SoundSelect1 SOUND_SELECT1_AIRCRAFT_CARRIER
SoundSelect2 SOUND_SELECT2_AIRCRAFT_CARRIER
SoundMove SOUND_MOVE_AIRCRAFT_CARRIER
SoundAcknowledge SOUND_ACKNOWLEDGE_AIRCRAFT_CARRIER
SoundCantMove SOUND_CANTMOVE_AIRCRAFT_CARRIER
SoundAttack SOUND_ATTACK_AIRCRAFT_CARRIER
SoundWork SOUND_WORK_AIRCRAFT_CARRIER
SoundVictory SOUND_VICTORY_AIRCRAFT_CARRIER
SoundDeath SOUND_DEATH_AIRCRAFT_CARRIER

CanAttack: Sea
CanAttack: ShallowWater
CanCarry: MedAir
CanCarry: SmallAir
CanSee: Standard
Defend: Air
MovementType: Sea
MovementType: ShallowWater
Size: Large
VisionClass: Standard

CanReform {
Sound SOUND_ID_REFORM_CITY
Effect SPECEFFECT_REFORMCITY
}

CargoData {
MaxCargo 5
Load SOUND_ID_AIRCRAFT_CARRIER_LOAD
Unload SOUND_ID_AIRCRAFT_CARRIER_UNLOAD
}
}

##################################################
##########

## UNIT 2
UNIT_ARCHER {
Description DESCRIPTION_UNIT_ARCHER
DefaultIcon ICON_UNIT_ARCHER
DefaultSprite SPRITE_ARCHER
Category UNIT_CATEGORY_RANGED
Attack 10
Defense 10
ZBRangeAttack 20
Firepower 1
Armor 1
MaxHP 10
ShieldCost 150
PowerPoints 100
ShieldHunger 1
FoodHunger 0
MaxMovePoints 100
VisionRange 2
EnableAdvance ADVANCE_BALLISTICS
ObsoleteAdvance ADVANCE_CANNON_MAKING
ActiveDefenseRange 0
LossMoveToDmgNone
MaxFuel 0
CanEntrench
CanExpel
CanPillage
CanPirate
ExertsMartialLaw
DeathEffectsHappy
SoundSelect1 SOUND_SELECT1_ARCHER
SoundSelect2 SOUND_SELECT2_ARCHER
SoundMove SOUND_MOVE_ARCHER
SoundAcknowledge SOUND_ACKNOWLEDGE_ARCHER
SoundCantMove SOUND_CANTMOVE_ARCHER
SoundAttack SOUND_ATTACK_ARCHER
SoundWork SOUND_WORK_ARCHER
SoundVictory SOUND_VICTORY_ARCHER
SoundDeath SOUND_DEATH_ARCHER

CanAttack: Land
CanAttack: Mountain
CanSee: Standard
MovementType: Land
MovementType: Mountain
Size: Small
VisionClass: Standard

CanReform {
Sound SOUND_ID_REFORM_CITY
Effect SPECEFFECT_REFORMCITY
}
}

##################################################
##########

## UNIT 3
UNIT_ARTILLERY {
Description DESCRIPTION_UNIT_ARTILLERY
DefaultIcon ICON_UNIT_ARTILLERY
DefaultSprite SPRITE_ARTILLERY
Category UNIT_CATEGORY_RANGED
Attack 10
Defense 20
ZBRangeAttack 70
Firepower 3
Armor 2
MaxHP 10
ShieldCost 1500
PowerPoints 1200
ShieldHunger 15
FoodHunger 0
MaxMovePoints 200
VisionRange 2
EnableAdvance ADVANCE_EXPLOSIVES
BombRounds 5
BombardRange 1
ActiveDefenseRange 0
LossMoveToDmgNone
MaxFuel 0
CanEntrench
CanExpel
CanPillage
CanPirate
ExertsMartialLaw
DeathEffectsHappy
Explodes
SoundSelect1 SOUND_SELECT1_ARTILLERY
SoundSelect2 SOUND_SELECT2_ARTILLERY
SoundMove SOUND_MOVE_ARTILLERY
SoundAcknowledge SOUND_ACKNOWLEDGE_ARTILLERY
SoundCantMove SOUND_CANTMOVE_ARTILLERY
SoundAttack SOUND_ATTACK_ARTILLERY
SoundWork SOUND_WORK_ARTILLERY
SoundVictory SOUND_VICTORY_ARTILLERY
SoundDeath SOUND_DEATH_ARTILLERY

CanAttack: Air
CanAttack: Land
CanAttack: Mountain
CanBombard: Land
CanBombard: Mountain
CanBombard: Water
CanSee: Standard
MovementType: Land
MovementType: Mountain
Size: Medium
VisionClass: Standard

CanReform {
Sound SOUND_ID_REFORM_CITY
Effect SPECEFFECT_REFORMCITY
}
}

##################################################
##########

## UNIT 4
UNIT_BATTLESHIP {
Description DESCRIPTION_UNIT_BATTLESHIP
DefaultIcon ICON_UNIT_BATTLESHIP
DefaultSprite SPRITE_BATTLESHIP
Category UNIT_CATEGORY_NAVAL
Attack 60
Defense 50
ZBRangeAttack 60
Firepower 4
Armor 3
MaxHP 10
ShieldCost 3500
PowerPoints 2000
ShieldHunger 35
FoodHunger 0
MaxMovePoints 500
VisionRange 3
EnableAdvance ADVANCE_ADV_NAVAL_TACTICS
BombRounds 5
BombardRange 1
ActiveDefenseRange 0
LossMoveToDmgNone
MaxFuel 0
CanExpel
CanPillage
CanPirate
CantCaptureCity
ExertsMartialLaw
DeathEffectsHappy
Explodes
SoundSelect1 SOUND_SELECT1_BATTLESHIP
SoundSelect2 SOUND_SELECT2_BATTLESHIP
SoundMove SOUND_MOVE_BATTLESHIP
SoundAcknowledge SOUND_ACKNOWLEDGE_BATTLESHIP
SoundCantMove SOUND_CANTMOVE_BATTLESHIP
SoundAttack SOUND_ATTACK_BATTLESHIP
SoundWork SOUND_WORK_BATTLESHIP
SoundVictory SOUND_VICTORY_BATTLESHIP
SoundDeath SOUND_DEATH_BATTLESHIP

CanAttack: Sea
CanAttack: ShallowWater
CanBombard: Land
CanBombard: Mountain
CanBombard: Water
CanSee: Standard
MovementType: Sea
MovementType: ShallowWater
Size: Large
VisionClass: Standard

CanReform {
Sound SOUND_ID_REFORM_CITY
Effect SPECEFFECT_REFORMCITY
}
}

##################################################
##########

## UNIT 5
UNIT_BOMBER {
Description DESCRIPTION_UNIT_BOMBER
DefaultIcon ICON_UNIT_BOMBER
DefaultSprite SPRITE_BOMBER
Category UNIT_CATEGORY_AERIAL
Attack 30
Defense 30
ZBRangeAttack 60
Firepower 3
Armor 2
MaxHP 10
ShieldCost 2250
PowerPoints 3000
ShieldHunger 22
FoodHunger 0
MaxMovePoints 1000
VisionRange 2
EnableAdvance ADVANCE_JET_PROPULSION
ObsoleteAdvance ADVANCE_ADVANCED_COMPOSITES
BombRounds 5
BombardRange 1
ActiveDefenseRange 0
LossMoveToDmgNone
NoFuelThenCrash
MaxFuel 5000
IgnoreZOC
NoZoc
CantCaptureCity
DeathEffectsHappy
Explodes
SoundSelect1 SOUND_SELECT1_BOMBER
SoundSelect2 SOUND_SELECT2_BOMBER
SoundMove SOUND_MOVE_BOMBER
SoundAcknowledge SOUND_ACKNOWLEDGE_BOMBER
SoundCantMove SOUND_CANTMOVE_BOMBER
SoundAttack SOUND_ATTACK_BOMBER
SoundWork SOUND_WORK_BOMBER
SoundVictory SOUND_VICTORY_BOMBER
SoundDeath SOUND_DEATH_BOMBER

CanAttack: Air
CanAttack: Land
CanAttack: Mountain
CanAttack: Sea
CanAttack: ShallowWater
CanBombard: Land
CanBombard: Mountain
CanBombard: Water
CanCarry: SmallAir
CanSee: Standard
MovementType: Air
Size: Medium
VisionClass: Standard

CargoData {
MaxCargo 1
Load SOUND_ID_BOMBER_LOAD
Unload SOUND_ID_BOMBER_UNLOAD
}
}

##################################################
##########

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 12-03-2004 19:41
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Tired of ads?

Shugar...........wrong key pressed.........

OK, if you know your text-editor it doesn't really matter. For this somebody invented the search-function (Normally either F3 or CTRL-F) and you find it easily.

So what?

And taking your example:

Now compare 10 units at the same time, what is easier? Importing it into Excel (or whatever) or scrolling through?

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 12-03-2004 20:24
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Suffering from ads?

Scrolling through... particularly when you can search for what you're looking for in a text editor.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:34
  Old Post 12-03-2004 20:25 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Help yourself to an AD-FREE life

I'm not advocating such a change, but if you're going to change the text files into another format, then I would suggest that you use XML. That will be just as nice to look at - in fact I'm sure there are XML formatters around which can rearrange the content into your preffered scheme of indentation, etc. Also, XML should be well supported by just about anything you might want to import the data into (except possibly Excel...) and standard libraries are available for most programming languages (in particular we could use them in the CTP2 code itself).

From writing CTPEd, I know that the present scheme is rather harder to parse naively than you might at first assume, but with the aid of a lexer generator (and even more so with the aid of a parser generator) it would be much easier. The biggest problem I encountered, however, is that there are a few files which do not fit into the general format, and CTPEd still doesn't support them for that reason. Standardising the format of those would be a very useful change.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:34
  Old Post 12-03-2004 20:33 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Tired of ads?

Gilg,

Scrolling, no contest. I suspect you don't work with text files much...

John,
XML -- now that I could support

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 12-03-2004 20:35
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Help yourself to an AD-FREE life

J Bytheway,

Just checked
quote:

(except possibly Excel...)


No it does support it and it would be still readable for people like Locutus.

quote:

Standardising the format of those would be a very useful change.


That was another intention of mine as well.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:34
  Old Post 12-03-2004 23:18
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Get a bigger avatar today!

I'd take a lot of convincing that we need to switch away from the existing set-up. For one thing:

http://apolyton.net/forums/showthre...threadid=101296

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:34
Post  Old Post 13-03-2004 01:53 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Support Apolyton

quote:
Originally posted by Gilgamensch
OK, if you know your text-editor it doesn't really matter. For this somebody invented the search-function (Normally either F3 or CTRL-F) and you find it easily.


Year I have to use the search function to find something in the unit discription, instead of going through the entry and see oh that's there and finnally I added to my goods.txt comments and outcommented sections, so how do you preserve them with your format change?

quote:
Originally posted by Gilgamensch
Now compare 10 units at the same time, what is easier? Importing it into Excel (or whatever) or scrolling through?


And why you don't write a program that does the conversion forth and back for you?

And another thing you have to consider is that it is a lot of work to rewrite the existing parser then writing a program that does the forth and back conversion for.

And another note how do you convert something like this:

code:
## 42 ################################################## ######## TILEIMP_LAND_GOOD_TWO{ Icon ICON_GOOD_ARCTIC_MOUNTAIN_TWO Tooltip TOOLTIP_TILEIMP_SELECT_FARM1_BUTTON Statusbar STATUSBAR_TILEIMP_SELECT_TUNNEL_BUTTON Sound SOUND_ID_ROAD_3 Level 4 Class:OceanATM GLHidden ConstructionTiles 2 ConstructionTiles 2 ConstructionTiles 2 CantBuildOn TERRAIN_WATER_BEACH CantBuildOn TERRAIN_WATER_DEEP CantBuildOn TERRAIN_WATER_KELP CantBuildOn TERRAIN_WATER_REEF CantBuildOn TERRAIN_WATER_RIFT CantBuildOn TERRAIN_WATER_SHALLOW CantBuildOn TERRAIN_WATER_SHELF CantBuildOn TERRAIN_WATER_TRENCH CantBuildOn TERRAIN_WATER_VOLCANO CantBuildOn TERRAIN_TUNDRA #"????" CantBuildOn TERRAIN_DEAD TerrainEffect { Terrain TERRAIN_FOREST #"Bear" BonusFood 10 BonusGold 5 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_HILL #"Grapes" BonusFood 5 BonusGold 5 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_JUNGLE #"Jade" Terrain TERRAIN_GRASSLAND #"Tobacco" BonusGold 10 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_SWAMP #"Rice" BonusFood 15 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_DESERT #"Oil" BonusProduction 15 BonusGold 10 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_PLAINS #"Elephant" BonusFood 20 BonusGold 10 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_WHITE_HILL #"Emeralds" Terrain TERRAIN_MOUNTAIN #"Emeralds" BonusGold 15 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_WHITE_MOUNTAIN #"Diamonds" BonusGold 20 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_BROWN_HILL #"Silver" Terrain TERRAIN_BROWN_MOUNTAIN #"Silver" BonusProduction 10 BonusGold 5 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } TerrainEffect { Terrain TERRAIN_GLACIER #"Walrus" BonusFood 10 BonusProduction 5 EnableAdvance ADVANCE_SUBNEURAL_ADS ProductionCost 0 ProductionTime 10 TilesetIndex 2 } }


TerrainEffect is a free array you can have as much of them as terrains you have or even more, so how do you want to put it into your table?

Well finally a build in text file editor would be the solution, but that is rather near the bottom of our to do list.

-Martin

Flinx is offline Flinx
Prince
Toronto, ON CANADA
Nov 2001
time: 00:34
  Old Post 13-03-2004 07:57 Visit Flinx's homepage!
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Re: DESIGN: Changing the units.txt layout Suffering from ads?

quote:
Originally posted by Gilgamensch
Hi all,

I was just trying to 'import' the units.txt-file into an excel-file to be able to have an easier overview over the different values. I did it because of the discussion in DESIGN: Armor and HP's. I must admit I am still having a headache to finish it.

My idea, which I would like to propose (and I would be willing to create it) is instead of having the till now structure in the units.txt file changing it to a more moder and user-friendly version, based on Excel.

So instead of really changing it by hand, we could do it via Excel. The changes for this to implement (me thinks) shall be easy.

The file shall be saved as csv, all entries ,even if empty would have a comma-delimiter, so making it easier to check afterwards. This would also allow to re-import into Excel, although I would suggest to have just one master-template (as I said I would be willing to create it, so that you would just select (like: Yes/no, or a value).


Your reason for the suggestion is good; your solution however is not. Using a 'tab' character to separate the value from the variable however would import into EXCEL very nicely with the variables in column A and the values in B, probably would not even break the file for the out-of-the-box game and still be editable in NOTEPAD.

Flinx is offline Flinx
Prince
Toronto, ON CANADA
Nov 2001
time: 00:34
  Old Post 13-03-2004 08:29 Visit Flinx's homepage!
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Remove this text

Here are the excel formulas to get the result you want:

Import Units.txt into excel so that all the text from each line is in column A

put this formula in column B
=IF(ISERR(FIND(" ",TRIM(A1))),TRIM(A1),LEFT(TRIM(A1),FIND(" ",TRIM(A1))))

put this formula in column C
=IF(ISERR(FIND(" ",TRIM(A1))),"",MID(TRIM(A1),FIND(" ",TRIM(A1))+1,LEN(A1)))

QED.

Flinx is offline Flinx
Prince
Toronto, ON CANADA
Nov 2001
time: 00:34
  Old Post 13-03-2004 08:43 Visit Flinx's homepage!
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Support Apolyton buy from Amazon

Yup, the tab delimitated file works with the game with no problems, and imports into excel as two columns.

Attachment: units.txt
This has been downloaded 5 time(s).

kaan is offline kaan
Prince
Aarhus
Mar 2001
time: 05:34
  Old Post 13-03-2004 17:30
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

quote:
Originally posted by Flinx
Yup, the tab delimitated file works with the game with no problems, and imports into excel as two columns.


yup it works fine Flinx

Gilgamensch is offline Gilgamensch
King
France
Jun 2002
time: 06:34
  Old Post 13-03-2004 21:28
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

It is not what I was really looking for.

I wanted to go a step further, than this. So can you can quickly sort it or modify it on a large scale. Not just having the two entries seperated.

Reason: easier to have an overview, easier to modify a lot of entries easily, easier to add new units, easier to compare, easier to sort.

Included is an xml-version, which you could import into like excel as well and is still usuable with a text-editor.



And Flinx: I was only getting errors with your formula.

Attachment: unitsxls3.zip
This has been downloaded 2 time(s).

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:34.
Apolyton Time is 00:34.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0835 seconds (94.18% PHP - 5.82% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net