Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Save File Editor
Anonymous

Date:
RE: Save File Editor
Permalink   


I forgot to mention that addresses 13, 17, 21, 25, 29, and 33 are all 4-byte, unsigned addresses referencing addresses within the rest of the file. Value 128 is the start of character data, and is constant in all files I've ever edited. I'd include it as part of the file header test if it wasn't 'possible' to change the address of the data. As always, all of the data I have can be found somewhere in the source code. Item weight and bulk has been programmed for in the WriteItem() routine of CastleFreeHand.frm(Use a text editor if you want the values)


This should be enough info for you to wade through for a while.



__________________
Anonymous

Date:
Permalink   

More missing data. (There's a lot of data to remember about the item format)


CChargesHours should be divisible by 4. It tells how many charges are in a wand, or how many hours between the effect's activation. 65532 = 16383 charges in the wand. 10 charges * 4 = CChargesHours = 40.


All the entries are String data so I can convert the numbers into the exact length of data I need. I use routines to convert the numbers into a compatible format. I also use routines to limit the maximum/minimum value that will be written. I took extra care to allow someone to enter a negative value into as many fields as I can allow, and still get the correct value input into the file. I really wish there hadn't been an error with the program.



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

Wow, I certainly have something to look through in the morning now. It's 5am here now. I'll test out those file size adresses first. I can't seem to figure it out right now, but I'm too sleepy to do so. Tommorow I'll test it. Everything you found seems to be in accordance with what I have so far, which is great, since it proves I'm right...

I've got a nasty error with a sword causing errors when moved, I'll test some things and if I can't figure it out I'll post it here.

I'll have to brush up on my VB skills too, since I never used anything close to Basic synthax. Can't be too hard, since I've got fair experience with pascal and C synthax...

One question before I finally go to bed. I noticed that the first effect slot of a weapon has the weapon's strength in the power value. I thought that the weapon's strength was decided by item class and subclass? Is that first effect slot useless, or can we create weapons which are stronger than they should?

edit: oh, and btw, 5 effects is not the maximum, I made a weapon with 7 effects, which worked perfectly, which means we can create monster weapons!

Oh, and Rick Saada said that the levels where partly hardcoded, making it near to impossible to do anything concrete concerning levels, he advised us to stay away from them.

I think I'm seeing some light in a sequel to CotW, which accepts the save files from finished Castle2 games...

-- Edited by Gil at 04:14, 2005-05-24

__________________
Anonymous

Date:
Permalink   

Well, I've gone through hell trying to get that program to either work without whining or give me the place the error is happening...specifically 'On Error Goto Hell'.


I also ran the thing through Roja's VB Code fixer, which should have made the whole program more readable(except Form5 and ErrorModule.bas)


I hope the potential errors that got fixed make this app finally stop spewing errors.


Version 1.14



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

I get the error "5 Invalid procedure call or argument in PutValue" now :)

anyway, just got on my comp, time to test those size bytes :D

Edit: tested, seems to work just fine, I love you now... Onto prices now...

-- Edited by Gil at 16:37, 2005-05-24

__________________
Anonymous

Date:
Permalink   

I tried to clean up the code in PutValue, and remove any reason at all for it to have an error. I hope this fixes the error. If not, I'm going to make it record the line of code that the error occurs on.

__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

The PutValue error doesn't appear, it's back to the old "runtime error 5: Invalid procedure call or argument"...

__________________
Anonymous

Date:
Permalink   

On another note, DO NOT edit items that are equipped to you, with the possible exception of packs. If you do that, then you'll LOSE whatever stats you put on the item when you edited it when you take that item out of the equipment slot. If it's an 'Enchanted Against' weapon, then you'll almost definately have a crash for removing it(because there's a few bytes that I'm fairly sure are reserved for your current weapon's 'Enchanted Against' status. Removing the weapon tries to take away a very specific set of bytes, and fails, crashing the prog. I don't have intimate knowledge of how much damage a weapon should take off of an enemy, and I don't know how enemy damage is stored in the save file).


This is why everything is 'Free Hand' for me, since any item can be put there, and it will never have any effect on a stat, other than weight and bulk. Then, when you equip the item, there won't be any errors.



__________________


King Lifthransir

Status: Offline
Posts: 27
Date:
Permalink   

I can't edit neither static stats nor free hand because of runtime error 5. I clicked on "save", the error popped. However, the file "x.cwg.new" was created and the game worked. (I found where to edit player's coordinates). This means my cheat is useable (and I used it) with stores after going to dungeon. I wonder what would happen if I insert a cursed/useless item to the shop (using the cheat) and then try to buy it? What would be the price??? Could anybody see it?


My version of msvbvm60.dll (from File-Properities-Version): 6.0.92.37


Gil, what version of Windows are you using? (Me XP - almost plain with only Borland C++Builder installed)


Does the .exe file has a reference to VBA6.DLL? (I found it from DOS edit /70) I haven't got one in windows\system. Could it be the reason?


In my case the MS-VB-DLL updates didn't help too. Maybe You should have it compiled under XP?



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

I know, it's especially funny with "resistant to". I was trying stuff out for the first time ever and attached resistant to fire to an existent weapon. I was very dissapointed to see it didn't work. Then I removed the weapon and saw I became vulnerable to fire, which was really scary

I'm currently noting down prices of all weapons btw. I started with normal ones, and I was planning on playing the game again anyway, so I'll note down prices of objects I encounter until I find the logic behind it...

edit: I use Xp, it's a clean install, since my comp died on me this week...

-- Edited by Gil at 21:31, 2005-05-24

__________________
Anonymous

Date:
Permalink   

This problem is getting close to being a headache to deal with.


I updated the program again, so it'll show the line number that the error occurs on. I'll kill this stupid problem if I keep hacking away at it like a crazed gorilla with a machette.



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

The error changed to:

"App: castlefreehand
error: 5 invalid... (you know what)
routine: getASCII"

edit: from the error log:

Data...: dinsdag, 24-mei-2005 23:12:29 PM
App....: CastleFreeHand CastleFreeHand
Error..: 5 Invalid procedure call or argument
Routine: GetASCII
Video..: D:\Documents and Settings\Gilberreke\Bureaublad\CastleFreeHand\ERROR_SCREENSHOT20050524 231229.BMP
CurDir.: D:\abandonware\Castles of the winds\Saved

-- Edited by Gil at 22:14, 2005-05-24

__________________
Anonymous

Date:
Permalink   

I put up a new version


...please let my assumption of what the problem is be right...



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

Nope, still the same error.

I'm pretty bored with noting down all the prices, etc, but I keep going! Giving an item a cost of 00 makes it worthless btw. Try to sell a dagger with price 00 to a shop and it says that it's a useless item. Cursed items seem to be the same. In other words, when you identify an object in the sage shop, the sage just checks the price tag on the bottom to see if it's cursed

__________________
Anonymous

Date:
Permalink   

Actually, Unidentified items have their basic price hardcoded, and the item will already have 0 for the price if it's cursed. What the 'Sage' really checks is if the 'Is Cursed' value is enabled in the Item Status. You can give a cursed item a non-zero price and sell it I suspect. Whether it will remain in store inventory is another matter.


I have also just completed a serious reprogramming of how things get written to the file and stored in the program. There IS no more truncate function, so that won't ever be a problem, and I understand how to write all the normal types of data to a binary file now. I can't imagine there being an error now that I'm playing by the rules so strictly, and not using weird ways of making things work.



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

It works!

Great! Now what has to be done to it, so it's complete? I guess prices, but we're already taking care of that.

__________________
Anonymous

Date:
Permalink   

Optionally, all the defaults for potions, scrolls and such can be setup.


If it works without any issues, then it would be entirely possible for anyone to implement things that I haven't done at that point.


Things like adding items to a pack(not a belt), or reading/writing names to to items is still not possible, but it shouldn't take a great deal of time.


Considering that it's a Severe no-no to edit equipment that you're wearing, I'm thinking of basically leaving it a free hand item editor. I could try to make it possible to edit packs, edit your purse, edit items within packs, add/remove stuff from a pack of any type...


but this is all a bit difficult to do in terms of having to recalculate so much stuff and rewrite it to the file. It's not that it would be difficult in the sense of hard to comprehend, just difficult in the sense that it would be a tedious manuever.


I also have failed in every attempt to make an item with more than 5 effects on it. I don't know what value you used in StatusB, but it must have been quite less usual than 0x66 or 0x56



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

quote:
Originally posted by: Anonymous

"I also have failed in every attempt to make an item with more than 5 effects on it. I don't know what value you used in StatusB, but it must have been quite less usual than 0x66 or 0x56"


I'll post the save file if I can find it, so you can check the object...

-- Edited by Gil at 01:39, 2005-05-25

__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

http://www.faktor-g.com/cotw/SAVE.CWG

There you go...

It's the only item in the inventory, should be easy to find...

__________________
Anonymous

Date:
Permalink   

I uploaded a new version with minor fixes, cleaned up code, and 8 editable effect slots(adding more had them just never show up)


1.16



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

Fucking great man, great tool to play around with :)

__________________
Anonymous

Date:
Permalink   

Hi I am the guy that made the money offset searching program. I don't know if you guys still can use this but here is a copy of my old web page with a lot of save game info:

http://web.archive.org/web/20001005051616/http://www.csonline.net/pagint/cowsvg.htm

I am waiting for my user name to kick in for this forum

-Rey morta



__________________


King Lifthransir

Status: Offline
Posts: 54
Date:
Permalink   


Anonymous wrote:

Hi I am the guy that made the money offset searching program. I don't know if you guys still can use this but here is a copy of my old web page with a lot of save game info:

http://web.archive.org/web/20001005051616/http://www.csonline.net/pagint/cowsvg.htm

I am waiting for my user name to kick in for this forum

-Rey morta





Hey, welcome to the forum, despite the inactivity, most of us still come around to see if anything new shows up. Anyways, do you still have the code for that program? I'd love to take it and create a money changer program. I'll use C++ for the ability to read and write large numbers even though I somewhat know the language, but it'll give me a chance to increase my C++ knowledge. my email is nova10@hotmail.com

As for your site, it has quite a bit of stuff that used to be out on the net, but got lost over time. However, the bit on the money is still known.

- nova10

__________________


Newbie

Status: Offline
Posts: 1
Date:
Permalink   

I dont think I have that source code anymore. I am not even sure I saved it when I made it. If I remember right I made it search out the Ox1201, Ox1202, Ox1203, Ox1204 after it found an item marker(FFFF FFFF FFFF FFFF). As far as I have checked the first time it appears in the file is the players funds.

__________________


COTW Beginner

Status: Offline
Posts: 20
Date:
Permalink   

Purse funds appear first because player equipment comes before non-player equipment. If you have another purse equipped somewhere on the player, that purse could be edited instead.



__________________
Gil


King Lifthransir

Status: Offline
Posts: 90
Date:
Permalink   

Yeah, the correct method would be to search for the equipped purse, the hex codes for what to look for exist in the documentation written in the other threads. Then it's easy to change it all, shouldn't be too hard to figure out.

__________________


COTW Beginner

Status: Offline
Posts: 20
Date:
Permalink   


I finally decided to do some more with this program, because I'm quite tired of the theft and poor representation in another project I've been doing...and I didn't feel like doing nothing at all while taking a break from it.


Fixed Droughts of Gain * and Potions of Lose *, Boots of Speed/Slowness, and useless items, like Distillation of Water.


http://www.angelfire.com/nc/ugetab/castle12.html


Also, was trying to figure this out...


Item Activation
Bit 01 = Status Modifiers?
Bit 02 = Unlimited Activations?
Bit 04 = Activated Effects? (Summon Monster)
Bit 08 = ?
Bit 16 = 1 Activation, Gets used up
Bit 32 = Limited Activation, Doesn't Get Used Up
Bit 64 = Item Messages?
Bit 128 = Unlimited Use? (Used by Ring of Adornment, Broken Boots, enchanted weapons, etc)


16 + 04 = 1 activation
32 + 04 = limited activation


Bit 128:
Ring of Adornment
Necklace of Adornment
Ripped Cloak
Broken Boots
Rusty Bracers
Rusty Gauntlets


Bit 64:
Dead Staff
Dead Wand


Bit 01 + 02 (Defense/Offense info not used?):
Broken Helmet


Useless Potion/Scroll:
Blank Scroll
Distillation of Water


Status Modifiers Only:
Broken Sword
Rusty Armor
Broken Shield


Money, No Activation/Status = 0(00)
Broken Helmet Only = 3 (03)
Parchment, 1 Activation = 20 (14)
Portal, Limited Activation = 36 (24)
Useless Wand/Staff = 64 (40)
Useless Potion/Scroll = 80 (50)
Potion/Scroll, 1 Activation = 84 (54)
Wand/Staff, Limited Activations = 100 (64)
Worthless Equipment = 128 (80)
Status Modifiers Only = 131 (83)
Unlimited Activations = 134 (86)
Unlimited Act. & Status = 135 (87)


Bit 16 + 64 = Item Can Be Activated, gets used up



__________________


COTW Beginner

Status: Offline
Posts: 20
Date:
Permalink   

New version. This one lets you equip your new purses with some cash before they're created.

__________________
«First  <  1 2 | Page of 2  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard