shay data edit (0-1b)

09/28/2010 05:24 patoringa#61
Quote:
Originally Posted by ProfNerwosol View Post
Because you don't need to know the icon and location of the item in database. Only client needs to know where to display it. Skip those two fields when inserting data to the table.
Thx Prof.
09/29/2010 01:17 AriezOMG#62
[Only registered and activated users can see links. Click Here To Register...]

Map breaking down, this should help a bit because I had issues with it, thanks goes to ProfNerwosol for telling me how to do it lol.
09/29/2010 10:46 ShaiyaUnited#63
You need to add number of the map in Map_csv.bat triest
Ex.
Quote:
@ECHO OFF
C:\Python26\Python.exe src\svmap.py 60
PAUSE
like that change ''60'' to whatever map you want.
09/29/2010 19:23 cosong#64
Im sorry but im not understand what is the problem?

Columns are auto entered in new line after extracted from Item_csv.bat , checked item.py and nothing find...Anyone know this problem guyz?
09/30/2010 22:05 ProfNerwosol#65
ZeroSignal, I am having problems with one of the files. I wanted to edit few things in NPCQuest.SData. It extracted nicely but when I tried to put it back together I got an error. I tried to find the problem but I don't understand your source code. I'm not a programmer. Could you help me with this one?

Here's a picture of the error:

[Only registered and activated users can see links. Click Here To Register...]
09/30/2010 23:01 [GM]Father#66
Quote:
Originally Posted by ProfNerwosol View Post
ZeroSignal, I am having problems with one of the files. I wanted to edit few things in NPCQuest.SData. It extracted nicely but when I tried to put it back together I got an error. I tried to find the problem but I don't understand your source code. I'm not a programmer. Could you help me with this one?

Here's a picture of the error:

[Only registered and activated users can see links. Click Here To Register...]
Without being home and just reading the output, it looks like it is complaining about a value being wrong, either blank or wrong type. Double check your changes.

Did you modify a line with an NPCType? (I would guess this was left blank or has the wrong data type, but sometimes it's hard to tell from this output)

Sometimes I open the files in notepad to verify that it is comma delimited correctly. Sometimes if you delete lines in Excel it will leave the last line as all commas, which you should delete.

To further debug you can add a "Print i" near line 335 under the CombineNPCRec to see which line it stops at. Look for a For loop either in CombineNPCRec(335) or FuncCombineRec(280) and add the print statement there.

From just looking at the stack here, it looks like FuncCombineRec is calling CombineNPCRec, it is passing in an "i" which is probably an interation integer from a For loop. (from looking at this I would guess the For loop is in CuncCombineRec). But it doesn't really matter, as long as you are printing "i", it should tell you which line the error is on. (It iterates through each line adding it to the combined file.)
10/01/2010 18:25 ProfNerwosol#67
Quote:
Originally Posted by EarthCrush View Post
Without being home and just reading the output, it looks like it is complaining about a value being wrong, either blank or wrong type. Double check your changes.

Did you modify a line with an NPCType? (I would guess this was left blank or has the wrong data type, but sometimes it's hard to tell from this output)

Sometimes I open the files in notepad to verify that it is comma delimited correctly. Sometimes if you delete lines in Excel it will leave the last line as all commas, which you should delete.

To further debug you can add a "Print i" near line 335 under the CombineNPCRec to see which line it stops at. Look for a For loop either in CombineNPCRec(335) or FuncCombineRec(280) and add the print statement there.

From just looking at the stack here, it looks like FuncCombineRec is calling CombineNPCRec, it is passing in an "i" which is probably an interation integer from a For loop. (from looking at this I would guess the For loop is in CuncCombineRec). But it doesn't really matter, as long as you are printing "i", it should tell you which line the error is on. (It iterates through each line adding it to the combined file.)
I followed your advice and uncommented a line in source listing NPC Name's. I found what the problem is. It doesn't read GateKeeper.csv properly. There are two rows of data for one Gate Keeper:

2,1,42,16,8000,1,Geneaa Irwen,May the goddess bless you in your travels. ,,,,,,,,,,,,,,,,,,
,,,19,586.25,11.3999996185,1902.14001465,Arktuis Vill,8600 | 28,1042.33996582,39.2599983215,1078.36999512,Huigr onn Stronghold,32700 | 35,597.799987793,27.0,224.36000061,Apulune,20


First is it's name and what it says, second is where it can send you. When I ran the script again it showed me the 2nd NPC name as 1902.14001465. This value is in the same column, but it is gate keepers configuration. Could this be an error in source?
10/01/2010 19:51 [GM]Father#68
Quote:
Originally Posted by ProfNerwosol View Post
I followed your advice and uncommented a line in source listing NPC Name's. I found what the problem is. It doesn't read GateKeeper.csv properly. There are two rows of data for one Gate Keeper:

2,1,42,16,8000,1,Geneaa Irwen,May the goddess bless you in your travels. ,,,,,,,,,,,,,,,,,,
,,,19,586.25,11.3999996185,1902.14001465,Arktuis Vill,8600 | 28,1042.33996582,39.2599983215,1078.36999512,Huigr onn Stronghold,32700 | 35,597.799987793,27.0,224.36000061,Apulune,20


First is it's name and what it says, second is where it can send you. When I ran the script again it showed me the 2nd NPC name as 1902.14001465. This value is in the same column, but it is gate keepers configuration. Could this be an error in source?
Possibly.
Did you try to extract the files then combine them with no edits? If this is the case it is likey that the edits are causing the issues, but it is not limited to that.

If this worked I would then try a small edit.

I can look into this further tonight or this weekend to see if I can successfully edit the same file. And debug the issue in more depth.
10/01/2010 20:37 ProfNerwosol#69
It was edit problem. I took a look at file size. The modified one is larger than the unmodified one. Must be a problem with my editor adding unnecessary data. I'll do the edits manually and see how it goes.

EDIT:
It definitely was the editor. I compared those two files and look what I found:

,,,,,,,,,,,,,,, <-- that's what the editor added to first line where column names are. No wonder the script panicked.
10/01/2010 20:56 [GM]Father#70
Quote:
Originally Posted by ProfNerwosol View Post
It was edit problem. I took a look at file size. The modified one is larger than the unmodified one. Must be a problem with my editor adding unnecessary data. I'll do the edits manually and see how it goes.

EDIT:
It definitely was the editor. I compared those two files and look what I found:

,,,,,,,,,,,,,,, <-- that's what the editor added to first line where column names are. No wonder the script panicked.
HaHa, awesome. Glad you got that figured out.
10/06/2010 04:28 [GM]Father#71
Files:
ITM_csv.bat
ITM_itm.bat
ITM.py

Place these in the appropriate location and update the bat files to match your configuration.

Execute these scripts in the same way you would the MLT scripts. If you have never edited the MLT files, I suggest you get experience doing that first.
ITM files are extracted from input\MLT and extracted to output\MLT. I know this might seem confusing, but it was better to not have architecture changes.

With this script you can unpack the ITM files under the Item folder in the saf. I’ve never coded Python so the code might not be as elegant as it would be with somebody more experienced. I also had to add some special cases to compensate for the differentiating item lengths. So, be warned if you want to work on the code.

I verified unpacking and repacking each ITM file maintains bit parity. I have not been able to add a new row to the Chain and have it work properly, so you might have to overwrite an existing chain. I believe there are unused ones that you can use. However, I have been able to add new rows to 3DO and DDS, meaning you can add new textures without overwriting old ones.

You should reference ProfNerwosol’s guide to edit the Chain file. Everything is in decimal so, no need to convert to hex, packing the file will do that for you.

Before repacking the ITM file, you should open the Chain file in notepad and remove and commas that delimit nothing, meaning “,,,,,,,,,,,,”. Also, if there is a blank line at the end, you should remove that as well.


Thanks goes to:

ZeroSignal for creating the framework and original MLT script (ITM script was heavily based on this)
ProfNerwosol for providing the ITM mapping, creating this script without that information would have been extremely difficult.
10/07/2010 02:32 signup_crap#72
I get nothing but "Press any key to continue..." :/

Edited the .bat files to use "C:\Python26\python.exe"
Placed ITM.py in the "src" folder.
Placed 01.ITM in the "\Input\MLT" folder.
Ran ITM_csv.bat

Any ideas? Do I need Python27 like your .bat files are already set to use, or does that not matter?
10/07/2010 02:34 [GM]Father#73
Quote:
Originally Posted by signup_crap View Post
I get nothing but "Press any key to continue..." :/

Edited the .bat files to use "C:\Python26\python.exe"
Placed ITM.py in the "src" folder.
Placed 01.ITM in the "\Input\MLT" folder.
Ran ITM_csv.bat

Any ideas? Do I need Python27 like your .bat files are already set to use, or does that not matter?
>ITM_csv.bat 01
10/07/2010 02:42 signup_crap#74
Ah ty. Forgot that Map and MLT files need command line parameters. >.<

Thanks :P
10/15/2010 02:27 ·Tyler·#75
Hello, first I'd like to say thank you for your release Zero, and thank you for everyone who has posted here, but I cannot seem to find the error that I am getting, and since I am a bit of a noobie with this kind of stuff, I have yet to figure it out. When I try to run "Item_csv.bat" I get the error:

Creating ./Output/SData/Item.complete.csv
Traceback (most recent call last):
File "C:\Python26\src\SData.py", line 113, in <module>
main(sys.argv[1:])
File "C:\Python26\src\SData.py", line 102, in main
result = SDataItems[SDataName](outFmt)
File "C:\Python26\src\Item.py", line 90, in MainItem
return ExtractItem(outFmt)
File "C:\Python26\src\Item.py", line 191, in ExtractItem
rec = unpack_fields(input, item_types, {})
File "C:\Python26\src\Utils.py", line 48, in unpack_fields
len = struct.unpack('I', input.read(4))[0]
struct.error: unpack requires a string argument of length 4

I've googled the error, but like I said, I am a bit of a noobie at programming and stuff, so after many hours of googling and trying to find this out on my own, I decided to post it here for you guys to see. If you can't help me, that's fine, but I figured that the community is so awesome here on Epvpers, that I could maybe get some help.

Thanks again for all of your releases Zero, they rock. :)

Tyler

Edit:
Nevermind, I got it working by just decrypting the Item.SData myself, the old one might have been corrupt. :P