text editor

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
User avatar
Bruno Rodolfo
Trained
Trained
Posts: 186
Joined: 12 Feb 2010, 15:08
Location: Brazil

text editor

Post by Bruno Rodolfo »

to create some mods, you need to edit text (usually found in STATS and WRF), but they appear like this(Using Notepad):

Code: Select all

A0ADemolishStructure,DEMOLISH,Level All,SOFT,0,1,1,Concrete,10,1,6,400,1,0,1,150,1,1,ZNULLECM,DefaultSensor1Mk1,1,icdozer.PIE,0,0,0A0BaBaBunker,DEFENSE,Level One Two,BUNKER,0,1,1,Concrete,10,1,12,600,1,100,1,150,255,1,ZNULLECM,DefaultSensor1Mk1,1,blbrbbnk.PIE,0,0,1A0BabaCornerWall,CORNER WALL,Level All,SOFT,0,1,1,Concrete,3,2,5,300,10,20,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,BLBRBCR1.PIE,0,0,0A0BaBaFactory,FACTORY,Level One,MEDIUM,2,2,1,Concrete,1,2,5,400,1,20,25,150,255,0,ZNULLECM,ZNULLSENSOR,0,BLBRBFAC.PIE,0,1,0A0BaBaFlameTower,DEFENSE,Level One,MEDIUM,0,1,1,Concrete,10,2,7,400,0,100,1,150,255,0,ZNULLECM,DefaultSensor1Mk1,1,Blbrtowf.pie,0,0,1
A0BaBaGunTower,DEFENSE,Level One-Two,MEDIUM,0,1,1,Concrete,10,2,7,400,0,100,1,150,255,0,ZNULLECM,DefaultSensor1Mk1,1,BLBRBTW1.PIE,0,0,1A0BaBaGunTowerEND,DEFENSE,Level One-Two,MEDIUM,0,1,1,Concrete,10,2,7,400,0,20,1,150,255,0,ZNULLECM,DefaultSensor1Mk1,1,Blbrbtw2.PIE,0,0,1A0BaBaHorizontalWall,WALL,Level All,SOFT,0,1,1,Concrete,10,2,7,300,0,10,1,0,255,0,ZNULLECM,BaBaSensor,0,BLBRBWLH.PIE,0,1,0
I need a text editor that looks like this:

Code: Select all

A0ADemolishStructure,DEMOLISH,Level All,SOFT,0,1,1,Concrete,10,1,6,400,1,0,1,150,1,1,ZNULLECM,DefaultSensor1Mk1,1,icdozer.PIE,0,0,0
A0BaBaBunker,DEFENSE,Level One-Two,BUNKER,0,1,1,Concrete,10,1,12,600,1,100,1,150,255,1,ZNULLECM,DefaultSensor1Mk1,1,blbrbbnk.PIE,0,0,1
A0BabaCornerWall,CORNER WALL,Level All,SOFT,0,1,1,Concrete,3,2,5,300,10,20,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,BLBRBCR1.PIE,0,0,0
A0BaBaFactory,FACTORY,Level One,MEDIUM,2,2,1,Concrete,1,2,5,400,1,20,25,150,255,0,ZNULLECM,ZNULLSENSOR,0,BLBRBFAC.PIE,0,1,0
A0BaBaFlameTower,DEFENSE,Level One,MEDIUM,0,1,1,Concrete,10,2,7,400,0,100,1,150,255,0,ZNULLECM,DefaultSensor1Mk1,1,Blbrtowf.pie,0,0,1
A0BaBaGunTower,DEFENSE,Level One-Two,MEDIUM,0,1,1,Concrete,10,2,7,400,0,100,1,150,255,0,ZNULLECM,DefaultSensor1Mk1,1,BLBRBTW1.PIE,0,0,1
A0BaBaGunTowerEND,DEFENSE,Level One-Two,MEDIUM,0,1,1,Concrete,10,2,7,400,0,20,1,150,255,0,ZNULLECM,DefaultSensor1Mk1,1,Blbrbtw2.PIE,0,0,1
A0BaBaHorizontalWall,WALL,Level All,SOFT,0,1,1,Concrete,10,2,7,300,0,10,1,0,255,0,ZNULLECM,BaBaSensor,0,BLBRBWLH.PIE,0,1,0
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: text editor

Post by stiv »

I would need more coffee to see the differences in your two examples, but one way to deal with the files is to suck them into a spreadsheet and have at it.

Personally, I am thinking the whole mess needs to be stuffed back into a database where it can be managed easily and the necessary text files for the game can be generated automagically.
User avatar
Bruno Rodolfo
Trained
Trained
Posts: 186
Joined: 12 Feb 2010, 15:08
Location: Brazil

Re: text editor

Post by Bruno Rodolfo »

stiv wrote:I would need more coffee to see the differences in your two examples, but one way to deal with the files is to suck them into a spreadsheet and have at it.

Personally, I am thinking the whole mess needs to be stuffed back into a database where it can be managed easily and the necessary text files for the game can be generated automagically.
as you said, are only examples, but every time when I see some version download of warzone, everything appears stuck!
and if it was coffee, I was already crazy!!
User avatar
Nick Morro
Greenhorn
Posts: 14
Joined: 30 Jan 2010, 22:35
Location: Massachusetts, USA

Re: text editor

Post by Nick Morro »

Bruno Rodolfo wrote:to create some mods, you need to edit text (usually found in STATS and WRF), but they appear like this(Using Notepad):
...
I need a text editor that looks like this:
...
.
Windows Notepad is the only known text editor that does not support LF-style linebreaks, at least according to this Wikipedia article: http://en.wikipedia.org/wiki/Comparison ... ne_support
.
You can fix your problem by using literally any other text editor or operating system. Notepad++ is a popular one: http://notepad-plus-plus.org/
.
I would additionally advise to simply stop using text editors, and rather simply rename structures.txt to structures.csv and edit them using a CSV editor such as Excel.
.
stiv wrote:Personally, I am thinking the whole mess needs to be stuffed back into a database where it can be managed easily and the necessary text files for the game can be generated automagically.
.
Forgive me for my ignorance, but is there anything we need a database to do that cannot be done using a spreadsheet editor?
.
.
"Most men complacently accept 'knowledge' as truth". They are sheep, ruled by fear and yet, appeased by ignorance. - Sydney Losstarot
.
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: text editor

Post by lav_coyote25 »

and in backing up nick morro - notepad++ is awesome... also - if i remember correctly there was / is an excel file with all that information form the original... some one had thought of using excel for this a long time ago. :lecture:
User avatar
milo christiansen
Regular
Regular
Posts: 749
Joined: 02 Jun 2009, 21:23
Location: Perrinton Michigan

Re: text editor

Post by milo christiansen »

Comments in the code make it look like a DB was used by the original devs.

I use Notepad++ for everything almost. :) In the scripting forum there is a udl file for wzscript that you may find helpful.
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
User avatar
Bruno Rodolfo
Trained
Trained
Posts: 186
Joined: 12 Feb 2010, 15:08
Location: Brazil

Re: text editor

Post by Bruno Rodolfo »

Nick Morro wrote:
Bruno Rodolfo wrote:to create some mods, you need to edit text (usually found in STATS and WRF), but they appear like this(Using Notepad):
...
I need a text editor that looks like this:
...
.
Windows Notepad is the only known text editor that does not support LF-style linebreaks, at least according to this Wikipedia article: http://en.wikipedia.org/wiki/Comparison ... ne_support
.
You can fix your problem by using literally any other text editor or operating system. Notepad++ is a popular one: http://notepad-plus-plus.org/
.
I would additionally advise to simply stop using text editors, and rather simply rename structures.txt to structures.csv and edit them using a CSV editor such as Excel.
Nick Morro, thanks for the info on the notepad, it is helping me a lot! :D
User avatar
Nick Morro
Greenhorn
Posts: 14
Joined: 30 Jan 2010, 22:35
Location: Massachusetts, USA

Re: text editor

Post by Nick Morro »

lav_coyote25 wrote:and in backing up nick morro - notepad++ is awesome... also - if i remember correctly there was / is an excel file with all that information form the original... some one had thought of using excel for this a long time ago. :lecture:
.
I am confused. The game's text files are currently in a format Excel can recognize; that has not changed. Again, simply rename structures.txt to structures.csv and open it with Excel.
.
.
"Most men complacently accept 'knowledge' as truth". They are sheep, ruled by fear and yet, appeased by ignorance. - Sydney Losstarot
.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: text editor

Post by stiv »

Forgive me for my ignorance, but is there anything we need a database to do that cannot be done using a spreadsheet editor?
A reasonable question. It is a question of convenience and ease of use. Once you start messing with text files, you will notice certain pieces of information, like a body name, will be repeated in multiple places. In order to modify or add something, you need to make edits to multiple files and woe unto you if you miss one or the names doe not match exactly. Putting the information in a database would make maintenance and modification easier.

This is not an original idea. As I understand, Pumpkin did it originally. The information was originally stored in an Access database and the text files were generated from that.

As a side note, OpenOffice Calc will open the text files in a spreadsheet (they are in Comma Separated Value format or CSV) without renaming them.
User avatar
Rman Virgil
Professional
Professional
Posts: 3812
Joined: 25 Sep 2006, 01:06
Location: USA

Re: text editor

Post by Rman Virgil »

stiv wrote:................ It is a question of convenience and ease of use. Once you start messing with text files, you will notice certain pieces of information, like a body name, will be repeated in multiple places. In order to modify or add something, you need to make edits to multiple files and woe unto you if you miss one or the names doe not match exactly. Putting the information in a database would make maintenance and modification easier.

This is not an original idea. As I understand, Pumpkin did it originally. The information was originally stored in an Access database and the text files were generated from that.
.......
That is so. Pumpkin gave us a copy of the Access db for Halloween '99 (among other dev goodies.). A fitting gesture. :3

The same guiding principle was used in building the best WZ Mod Editor yet to be created - WZCK aka Warzone Customizer Kit (Development initiated by Troman and brought to fruition by Stratadrake who also created PIE Slicer). Making complex mods with WZCK was piece of cake joy - a far cry from what it is now.

- Rman :ninja:

.
.

Impact = C x (R + E + A + T + E)

Contrast
Reach
Exposure
Articulation
Trust
Echo
.