shay data edit (0-1b)

08/28/2010 16:49 jamessimpler#16
Quote:
Originally Posted by EarthCrush View Post
Before extracting create an empty folder named "NpcQuest", then try extracting.
Wow that work! Thanks EarthCrush! Silly me, why did i think of that! hahah Thank you
08/30/2010 15:29 ZeroSignal#17
EarthCrush:
Thanks for your solution good to someone reading the source code instead of leeching and just complaining when something is not working with one-click or command. ;)

The source code fix for it is here:

open:
.\src\NpcQuest.py

find line 153:
Code:
def MainQuest(outFmt):
	global work_dir
	work_dir += 'NPCQuest/'
After it add the following two lines:
Code:
	if not os.path.exists(work_dir):
		os.makedirs(work_dir)
so it will be:
Code:
def MainQuest(outFmt):
	global work_dir
	work_dir += 'NPCQuest/'
	[b]if not os.path.exists(work_dir):
		os.makedirs(work_dir)[/b]
		
	# ... rest of function ...
When enough bugs have been found I'll increment and release new version.


shinru2004:
I deliberately did not answer your question as it was structured as a hostile statement and was not researched properly. If you had read the Python installation you would find that on a Windows platform the Python installation instruction say to add the Python executable path to your Windows PATH Environment variable so the executable can be called directly in command prompt.

reference:
[Only registered and activated users can see links. Click Here To Register...]


Quote:
Originally Posted by ProfNerwosol View Post
ZeroSignal ... please PM me. I am curious as to what kind of problems you are having with ReqStr - Reqluc fields. I might be able to assist.
I dunno if there is an issue or not. When converted to be used in database data the values seem to be ok at least from what we tested. Try it and see if the values are ok or if there is something wrong with them and if so look at the binary data structure part of the source code.
08/30/2010 20:06 shinru2004#18
lol im not a nub dude i have it added as a sytem variable... and it still didnt work, atleast not on windows XP
08/31/2010 09:22 ShaiyaNemesis#19
I am having a problem with NpcQuest.SData
[Only registered and activated users can see links. Click Here To Register...]

Errors then doesn't complete the job i have redownloaded the scripts and tried multiple versions of NpcQuest.SData all with the same result

[Only registered and activated users can see links. Click Here To Register...]

I Have Tried Multiple NpcQuest.SData files on multiple computers same error no matter.
08/31/2010 16:16 nXu#20
Quote:
Originally Posted by shinru2004 View Post
lol im not a nub dude i have it added as a sytem variable... and it still didnt work, atleast not on windows XP
I dont want to flame, beacuse i love your work, but i added python to environment variables... and it works (XP SP3)
08/31/2010 19:05 jamessimpler#21
Sorry but what do you mean? Would you elaborate just a little? pretty pls?

Quote:
Originally Posted by huntoxic View Post
I dont want to flame, beacuse i love your work, but i added python to environment variables... and it works (XP SP3)
09/01/2010 07:13 ZeroSignal#22
Quote:
Originally Posted by ShaiyaNemesis View Post
I am having a problem with NpcQuest.SData
[Only registered and activated users can see links. Click Here To Register...]

Errors then doesn't complete the job i have redownloaded the scripts and tried multiple versions of NpcQuest.SData all with the same result

[Only registered and activated users can see links. Click Here To Register...]

I Have Tried Multiple NpcQuest.SData files on multiple computers same error no matter.
.\src\NpcQuest.py

Function extractQuestChain is incomplete.

Code:
def extractQuestChain(input, fileOut):
	# Open File for output.
	print("Creating " + fileOut)
	try:
		fout = open(fileOut, mode='wb')
	except IOError:
		return False

	fout.write("\n");
	record_total = 0
	while True:
		record_total = struct.unpack('i', input.read(4))[0]
		[b]if (record_total == 1531):
			input.seek(-4, 1)
			break[/b]
		data = struct.unpack(str(record_total) + 'H', input.read(record_total * 2))
		csv_data = ','.join( map( str, data ) )
		if (csv_data == ''):
			csv_data = '0';
		fout.write(csv_data + "\n");
	return
It has an explicit constant as we did not figure out how the quest chain data structure lengths are. When someone works it out let me know or submit the changes for next release.

Quote:
Originally Posted by jamessimpler View Post
Sorry but what do you mean? Would you elaborate just a little? pretty pls?
For more info on Environment Variables please read the following and make sure you read the PATH Environment Variable Reference as that is the one you should modify.

reference:
[Only registered and activated users can see links. Click Here To Register...]
09/01/2010 08:05 ZeroSignal#23
Regarding the Quest Chain Error:

Open .\src\NpcQuest.py

Find:
Code:
if (record_total == 1531):
erase the line and put instead:
Code:
if (record_total > 100):
so the code section will be:
Code:
def extractQuestChain(input, fileOut):
	# Open File for output.
	print("Creating " + fileOut)
	try:
		fout = open(fileOut, mode='wb')
	except IOError:
		return False

	fout.write("\n");
	record_total = 0
	while True:
		record_total = struct.unpack('i', input.read(4))[0]
		[b]if (record_total > 100):[/b]
			input.seek(-4, 1)
			break
		data = struct.unpack(str(record_total) + 'H', input.read(record_total * 2))
		csv_data = ','.join( map( str, data ) )
		if (csv_data == ''):
			csv_data = '0';
		fout.write(csv_data + "\n");
	return
It's an extremely dirty fix but it seems to do the job as long as the total amount of quests is greater than 100.
09/01/2010 11:40 U97#24
how fix?
Monster.SData - EP 5.2
tnx
09/01/2010 11:53 jamessimpler#25
Quote:
Originally Posted by U97 View Post
how fix?
Monster.SData - EP 5.2
tnx
I have the same problem as well
09/01/2010 12:39 ShaiyaUnited#26
Quote:
Originally Posted by jamessimpler View Post
I have the same problem as well
Decrypt the Monster.Sdata and try again.


Zero:

I need help with svamp files can u explain better?
Thx alot

Best Regards
-UG
09/01/2010 13:31 jamessimpler#27
Still doesnt work. The error is the same as above

Quote:
Originally Posted by ShaiyaUnited View Post
Decrypt the Monster.Sdata and try again....
09/01/2010 14:30 shinru2004#28
I know what i idid wrong now lol

C:\python26;C:\python26\DLLs;C:\python26\lib;C:\py thon26\Lib\lib-tk

I added that under python instead of PATH.......
09/04/2010 20:56 ShaiyaUnited#29
Okay zero its worked fine before now i get erros with Monster.Sdata

''Creating ./Output/SData/Monster.complete.csv
Traceback (most recent call last):
File "src\SData.py", line 113, in <module>
main(sys.argv[1:])
File "src\SData.py", line 102, in main
result = SDataItems[SDataName](outFmt)
File "C:\ShaiyaDataEdit\Monster\src\Monster.py", line 52, in MainMonster
return ExtractMonster(outFmt)
File "C:\ShaiyaDataEdit\Monster\src\Monster.py", line 114, in ExtractMonster
for i in range(record_total):
MemoryError
Press any key to continue . . .''
09/04/2010 21:00 jamessimpler#30
Quote:
Originally Posted by ShaiyaUnited View Post
Okay zero its worked fine before now i get erros with Monster.Sdata

''Creating ./Output/SData/Monster.complete.csv
Traceback (most recent call last):
File "src\SData.py", line 113, in <module>
main(sys.argv[1:])
File "src\SData.py", line 102, in main
result = SDataItems[SDataName](outFmt)
File "C:\ShaiyaDataEdit\Monster\src\Monster.py", line 52, in MainMonster
return ExtractMonster(outFmt)
File "C:\ShaiyaDataEdit\Monster\src\Monster.py", line 114, in ExtractMonster
for i in range(record_total):
MemoryError
Press any key to continue . . .''
I am having the same problem... But still its amazing work by ZeroSignal and friends to be honest.