A handy little tool I made

Dec 17, 2008 at 11:18 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
This tool allows you to edit the "npc.tbl" file. When you run the program, start by finding the "npc.tbl" file that you want to edit. Then, you can edit the file by entering the number of the NPC that you wish to edit into the textbox at the top and pressing "save". This will save all the data in the window into that NPC. You can load the data for any NPC in the file by typing the NPC number into the textbox and pressing "load"

Here's the program


This was programmed in Liberty BASIC. For those of you who know that language, or are just interested in seeing the source code, here it is. Feel free to edit/distribute the source code as much as you like.
 
Dec 18, 2008 at 2:44 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
General NPC hacking problem ensues:

Upon changing a value to an amount too large or small (or something), I think it shifts the tables, causing other npcs beyond the edited one to act weird and/or broken. For example, critters gain infinite HP, and bats drop 100 experience. additionally, death sounds are mixed up.

It's possible to fix all of them after the change, but mind you it's either a loop of editing that effects all npcs if the value is too large or small (and it'd effect vice-versa too), or just a common game error that can be fixed. I dunno.

So generally speaking, experience, health, and death sounds either break, or are erased. After initially editing, you'll have to fix them...

Death sounds start at 70;

70 - small enemy death (bat)
71 - medium enemy death (critter, and... I guess most enemies in the game)


But of course, there's also other bugs such as balrog jittering around like he's on some profound drug. Obviously the game reads the npc table only one way, and any major edits to values completely breaks the game. bah.

Other interesting points are HP values, which are set to specific numbers like 100, to which the sprite's health is hardly that much. For example are hell enemies.



I suppose overall it's a good tool, but in general; The game doesn't WANT to be edited... Heh.

EDIT: additionally, after closing the program, and replacing npc.tbl; the program refuses to open under some error. even after deleting the program and replacing it, it refuses to work any more. hmm...
 
Dec 18, 2008 at 4:57 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
Um, ok, this is odd because I have used this tool many times to edit the npc.tbl of my Wrath of Revorshkenahl mod and haven't experienced any of the problems you listed. Are you entering strange values like negatives, fractions, or numbers greater than 2 to the n where n is the number of bits?
 
Dec 18, 2008 at 6:11 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: No homie
Darn, you have no data types according to your source, that makes the whole thing alot of harder.
It may be easier to store every value into an own array.
Look out for buffer overflows, there maybe was a buffer overflow.
Do you verify the health value, meaning in a way of:

IF Health > MaxHealth THEN
Health = MaxHealth
END IF
 
Dec 18, 2008 at 6:29 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
wedge of cheese said:
numbers greater than 2 to the n where n is the number of bits?
...You mean numbers greater than 2^n-1 !
 
Dec 18, 2008 at 7:02 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
Well, in any case; I can't get it to run again, as I said before, even after replacing both the npc table and the program.





Error log timestamp Thursday 18/12/08 02:06:26 PM

Runtime error: "isEmpty" not understood

MessageNotUnderstood>>defaultAction
MessageNotUnderstood(Exception)>>activateHandler: <anUndefinedObject>
MessageNotUnderstood(Exception)>>handle
MessageNotUnderstood(Exception)>>signal
MessageNotUnderstood class>>message: <aMessage>
UndefinedObject(Object)>>doesNotUnderstand: <aMessage>
BasicRunProgram(BasicProgram)>>terminateRun: <aFileSystemAccessDenied>
[] in BasicProgram>>errorHandlerBlock
ExceptionHandler>>evaluateResponseBlock: <aBlockClosure> for: <aFileSystemAccessDenied>
[] in ExceptionHandler>>handle:
ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure>
BlockClosure>>invisibleEnsure: <aBlockClosure>
ExceptionHandler>>handle: <aFileSystemAccessDenied>
ExceptionHandler>>findHandler: <aFileSystemAccessDenied>
FileSystemAccessDenied(Exception)>>activateHandler: <anExceptionHandler>
FileSystemAccessDenied(Exception)>>handle
FileSystemAccessDenied(Exception)>>signal
FileSystemAccessDenied class(Exception class)>>signal
HostFileSystemError>>defaultAction
ExceptionHandler>>findHandler: <aHostFileSystemError>
HostFileSystemError(Exception)>>activateHandler: <anExceptionHandler>
HostFileSystemError(Exception)>>handle
HostFileSystemError(Exception)>>signal
HostFileSystemError class>>signalWith: <5>
FileHandle class>>osError: <5>
FileHandle class(Object)>>osError
[] in FileHandle class>>open:access:share:create:attributes:
ExceptionHandler>>evaluateProtectedBlock: <aBlockClosure>
[] in ExceptionHandler>>activateDuring:
ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure>
BlockClosure>>invisibleEnsure: <aBlockClosure>
ExceptionHandler>>activateDuring: <aBlockClosure>
ExceptionHandler class>>handle: <anExceptionSet> with: <aBlockClosure> during: <aBlockClosure>
BlockClosure>>on: <anExceptionSet> do: <aBlockClosure>
FileHandle class>>open: <'C:\Users\zach\Edges ...'> access: <3221225472> share: <3> create: <4> attributes: <128>
FileHandle class>>open: <'npc.tbl'> in: <aDirectory> access: <3221225472> share: <3> create: <4> attributes: <128>
FileHandle class>>open: <'npc.tbl'> in: <aDirectory>
File>>open
File class>>open: <'npc.tbl'> in: <aDirectory>
Directory>>file: <'npc.tbl'>
BasicRandomFile(BasicFile)>>from: <'C:\Users\zach\Edges ...'> mode: <'BINARY'> handle: <'#2'>
BasicRandomFile class(BasicFile class)>>from: <'C:\Users\zach\Edges ...'> mode: <'BINARY'> handle: <'#2'> owner: <aBasicRunProgram> length: <128>
[] in OpenCommand>>using:
[] in BasicRunProgram>>begin
ExceptionHandler>>evaluateProtectedBlock: <aBlockClosure>
[] in ExceptionHandler>>activateDuring:
ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure>
BlockClosure>>invisibleEnsure: <aBlockClosure>
ExceptionHandler>>activateDuring: <aBlockClosure>
ExceptionHandler class>>handle: <anError class> with: <aBlockClosure> during: <aBlockClosure>
 
Dec 18, 2008 at 7:16 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
Oh, no, not the dreaded "isEmpty not understood" error! I think that error message is due to a bug in the programming language.

@SP: I don't have anything like that, I should probably add that.
 
Dec 18, 2008 at 7:20 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: No homie
wedge of cheese said:
@SP: I don't have anything like that, I should probably add that.

Then I can understand why it's buggy if you enter a too high value. It just gets a buffer overflow.
 
Dec 18, 2008 at 9:10 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
http://i137.photobucket.com/albums/q235/dragonboots/error1.jpg
http://i137.photobucket.com/albums/q235/dragonboots/error2.jpg


So, I got those two, and having little understanding of programming, figure that those would be useful with this for debugging. This is a very useful tool in concept, and I'd like to see it perfected. Also, what I did was change npc 1 (weapon energy) so it was shootable, showed damage numbers and dropped hp/missiles. And I got that. >.> Did I ask too much?

Code:
Error log timestamp Thursday 18/12/08 03:00:21 PM
Runtime error: Attempt to seek beyond end of file: #2
Error(Exception)>>defaultAction
Error(Exception)>>activateHandler: <anUndefinedObject> 
Error(Exception)>>handle
Error(Exception)>>signal
Error class(Exception class)>>signal: <'Attempt to seek beyo...'> 
BasicRunProgram(Object)>>error: <'Attempt to seek beyo...'> 
BasicRunProgram(BasicProgram)>>terminateRun: <anError> 
[] in BasicProgram>>errorHandlerBlock
ExceptionHandler>>evaluateResponseBlock: <aBlockClosure> for: <anError> 
[] in ExceptionHandler>>handle:
ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure> 
BlockClosure>>invisibleEnsure: <aBlockClosure> 
ExceptionHandler>>handle: <anError> 
ExceptionHandler>>findHandler: <anError> 
Error(Exception)>>activateHandler: <anExceptionHandler> 
Error(Exception)>>handle
Error(Exception)>>signal
Error class(Exception class)>>signal: <'Attempt to seek beyo...'> 
BasicRunProgram(Object)>>error: <'Attempt to seek beyo...'> 
BasicRunProgram(BasicProgram)>>runError: <'Attempt to seek beyo...'> 
BasicRunProgram(BasicProgram)>>seekFile: <2> handle: <'#2'> 
[] in SeekCommand>>using:
[] in BasicRunProgram>>begin
ExceptionHandler>>evaluateProtectedBlock: <aBlockClosure> 
[] in ExceptionHandler>>activateDuring:
ProtectedFrameMarker(BlockClosure)>>setUnwind: <aBlockClosure> 
BlockClosure>>invisibleEnsure: <aBlockClosure> 
ExceptionHandler>>activateDuring: <aBlockClosure> 
ExceptionHandler class>>handle: <anError class> with: <aBlockClosure> during: <aBlockClosure> 
BlockClosure>>on: <anError class> do: <aBlockClosure> 
BasicRunProgram>>begin
BasicRunProgram(BasicProgram)>>gotoAndIfStoppedBegin: <'[save]'> 
BasicRunProgram(BasicProgram)>>handlerName: <'[save]'> evaluate: <aBlockClosure> callParameters: <anOrderedCollection> 
BasicRunProgram>>handlerName: <'[save]'> evaluate: <aBlockClosure> callParameters: <anOrderedCollection> 
BasicRunProgram(BasicProgram)>>submitHandlerName: <'[save]'> evaluate: <aBlockClosure> callParameters: <anOrderedCollection> 
BasicRunProgram(BasicProgram)>>submitHandlerName: <'[save]'> callParameters: <anOrderedCollection> 
LibButton>>click
BasicWindow>>click: <aLibButton> 
LibButton(Button)>>click: <aLibButton> 
Message>>perform
Message>>evaluate
LibButton(Object)>>triggerEvent: <#clicked> 
LibButton(Button)>>triggerClickedEvent
LibButton(Button)>>notifyClicked: <788452> 
LibButton(ControlPane)>>asyncControlEvent: <0> with: <788452> 
Message>>perform
NotificationManager>>empty
NotificationManager>>runPendingEvents
NotificationManager>>runEventLoop
Message>>perform
 
Dec 18, 2008 at 10:28 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
I tried doing exactly what you mentioned and I didn't get any errors. I even re-downloaded it using the download link I posted and did what you tried doing using the downloaded program (to make sure I didn't accidently post a corrupt or incorrect file) and still no errors. Are you sure you selected the right file when the program first ran? Are you sure you entered the correct entity number into the textbox?
 
Dec 18, 2008 at 11:51 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
I entered a 1. highest I've entered is 68. Both worked; and now it doesn't at all work. I think I deleted the file while it was open, though...
 
Dec 19, 2008 at 12:12 AM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
Well, if you deleted the file while it was open, that's probably why it doesn't work. Does it work if you restart it and select a new file?

EDIT: Oh, snap! I just realized that was my 100th post! BAM! :D
 
Dec 19, 2008 at 2:39 AM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
wedge of cheese said:
Well, if you deleted the file while it was open, that's probably why it doesn't work. Does it work if you restart it and select a new file?

did I not say that 80 bajillion times? ALL the files I've tried are NEW files, because the ORIGINAL file NO LONGER EXISTS.

The program won't open the file name in general anymore, and I keep getting that error. I've tried replacing EVERYTHING, and I keep getting that error.

FIXITFIXITFIXITFIXITFIXIT

FIXITFIXIT
 
Dec 19, 2008 at 5:41 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
Wait, so you're actually creating a new, blank file called "npc.tbl" and attempting to open that file using the program? The way I designed the program, it will only edit existing "npc.tbl" files, it won't actually create new ones. Maybe I should change that.
 
Dec 19, 2008 at 5:59 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
I thought he meant he was replacing the npc.tbl with an unaltered copy...
 
Dec 19, 2008 at 10:21 PM
Been here way too long...
"What're YOU lookin' at?"
Join Date: Jan 21, 2007
Location:
Posts: 1111
Celtic Minstrel said:
he meant he was replacing the npc.tbl with an unaltered copy...


qwertyuiop
asdfghjkl
zxcvbnm
 
Dec 20, 2008 at 12:18 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
would you like some cheese with that spam?
 
Dec 20, 2008 at 1:03 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: No homie
Dec 22, 2008 at 12:48 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
ZarroTsu said:
qwertyuiop
asdfghjkl
zxcvbnm

Well, sorry, I don't know what to tell you. I guess you're just cursed :eek:
 
Dec 23, 2008 at 3:05 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Oh, one more note.

I opened Windows Task Manager because it was running a little slugish, and I found that I had several instances of this running. Perhaps you missed a line that terminates the program? Iunno.

 
Back
Top