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.
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.
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...
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.
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.
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.
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?
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...
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.
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
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.
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
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...
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:
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:
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.
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.
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.
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.
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.
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)