Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 16.08.2005, 12:51   #1
Osito2Dancer
Архивный участник
 
Join Date: Mar 2005
Posts: 442
Default ¿Program for NPCData Management?

Hi. I need an NPCData.txt manager program, that can import that data to an excel file (or such) and back, for easier debugging of the last mentioned file. I've failed to find such program, and i recurr to your knowledge.

If someone has one, please share it .

Oso
Osito2Dancer is offline  
Old 16.08.2005, 13:02   #2
nepsquare
Архивный участник
 
Join Date: Apr 2005
Posts: 256
Default

You can open it in Excell already, if you got your "tabs" right... Save it as ANSI for easier access...
nepsquare is offline  
Old 16.08.2005, 13:22   #3
Osito2Dancer
Архивный участник
 
Join Date: Mar 2005
Posts: 442
Default

Ok, my 2º question then: how do i tabularize a TXT? I have it kinda mixed up (tabs and spaces), and want it to make it "all tabs", for excel reading . I tried using the "spaces to tabs" of UltraEdit32, but it didnt affect all spaces (kinda left it "half with tabs, half with spaces" xD). And doing it by hand isnt something that appeals to me either.

Oso
Osito2Dancer is offline  
Old 16.08.2005, 13:44   #4
nepsquare
Архивный участник
 
Join Date: Apr 2005
Posts: 256
Default

Now here''s something interesting... You can save it tab delimited, if you got your spaces right.

You can also do a find and replace, check the web on that...
(me thinks, find: " {2,}" and replace: "^t")

Note: there's a <space> between the " and {...
nepsquare is offline  
Old 16.08.2005, 13:48   #5
Osito2Dancer
Архивный участник
 
Join Date: Mar 2005
Posts: 442
Default

Other problem: When i save from tabs to spaces, it counts the tab not as 1 space, but rather like 2-3 spaces (depends). So i end up with a file separated by spaces, but not "uniform spacing" xD.

Well, ill work something around. If someone knows, im here all week xD.

Oso
Osito2Dancer is offline  
Old 16.08.2005, 14:27   #6
nepsquare
Архивный участник
 
Join Date: Apr 2005
Posts: 256
Default

Yeah, you can use the texteditor (ex: C++ sdk) to replace tabs to spaces and the other way around in the advanced menu from find/replace...

Or.. Someone can figure it out in php...
nepsquare is offline  
Old 16.08.2005, 15:44   #7
Osito2Dancer
Архивный участник
 
Join Date: Mar 2005
Posts: 442
Default

Quote:
Originally Posted by nepsquare
Yeah, you can use the texteditor (ex: C++ sdk) to replace tabs to spaces and the other way around in the advanced menu from find/replace...

Or.. Someone can figure it out in php...
Nice one: ill just use find/replace from notepad xD. Easyes up my work xD.

Oso
Osito2Dancer is offline  
Old 16.08.2005, 21:37   #8
Fulminus
Архивный участник
 
Join Date: Jul 2005
Posts: 23
Default

Generally speaking, trying to use a TAB key in the replace dialog simply makes your cursor go onto the next field (or button) of the dialog. So you can't just type in a tab...however, you can copy and paste a tab in there
It's simple to use notepad or wordpad (wordpad is a little faster when dealing with large files) and do a replace, type in a space on the find field and paste a tab in the replace field. It should work I do it all the time.
However, if you had manually typed more than one space and now you wish to merge consecutive spaces in 1 tab, you have to do something a bit differently. Here is what I suggest:

Run MS Excel
Choose File->Open and open the npcdata.txt file
in the text import wizard that will open, check the following boxes:
1) space delimited
2) tab delimited
3) Treat consecutive delimiters as one.

Now you will be able to view things nicely
Once done, you can save it as a tab delimited text-file (I'd recommend you make a backup of the original first...just in case).
The game server will still be able to read the resulting file and you will have automatically fixed all your spacing problems for your fields

BTW, I plan to make an import program to pput this file into SQL server and back. SQL server is great for searching and quickly finding info (if you know some SQL), and it provides a table-like interface for the results, similar to excel, but with filtering Personally, I find editting the SQL much easier than editting the txt files! I will do the same for some of the other files, but for none of the patch-files. I'm quite busy nowadays, but I'll let you know when I have it ready
Fulminus is offline  
 


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 Off

Forum Jump


All times are GMT. The time now is 20:33.