Cassidy bug, AI packets and adding new party NPC's

Darek

is currently unavailable
I may have found the reason why Cassidy resets his combat disposition. His first protofile is set to use "PARTY MARCUS CUSTOM" AI instead of"PARTY MACRAE CUSTOM". The game creates a save proto of this bugged proto in the save slot the first time you make a save. This somehow keeps messing things up throughout the game.

I "fixed" his proto file and put it into master.dat, since then he has been working as he should. I haven't tested it extensively but it looks promising.

Unfortunately Cassidy's first proto MUST be in master.dat, so it's hard to fix this with a patch. If it were only possible to use a master2.dat file...

I have also been trying to add new AI packets into AI.text for some new party NPC's, but I'm having trouble with the Mapper. If I add anything to that file, the mapper crashes when I try to set/change AI packets for a NPC. What's up with this? Is there any other way to to this besides hex editing?

The AI packets are defined in AIPACKET.H. I believe I need to add my new packets to that list, but how does this get registered into the game. By using the Mapper? If so, hex editing the AI number will be useless, since it means nothing to the game.

Some help please...
 
Why would the proto need to be in the master.dat?

Doesn't any instance of a proto outside the master.dat or critter.dat take precedence?
 
Yes, if it is in the data folder (or patch000.dat) it does take precedence. That is the problem... at least with the files in the data folder. It steps on the other proto files when Cassidy levels up (the reason why you get instances of 120/85 hit points, or something like that).
 
@MIB88
Got that - was just trying to figure out why the fix would need to be place into the master.dat, and it seems it doesn't.
 
Maybe I wasn't clear. When I said that it was stepping on the other proto files, I didn't mean the other proto files with the same number. I meant that it is keeping the other proto files (the later stages of a critter) from activating properly (thus the messed up hit points). We have always seen that when the first stage of a party NPC proto file is in the game folder, there are errors. In order to try to prevent that error, the first stage must be removed.
 
Yeah, what MIB88 wrote. Having the first stage of a party NPC in a patch file also interferes. Well, at least that's what keeps happening to me.
This is all new to me so I may be wrong, hell, I even hope I am.
But I simply can't get it to work within a patch file. It shouldn't be very hard/time consuming for someone else to try as well.
 
Nice job, thanks. Constucting the patch is a difficult task because of level up problems, but I edited Cassidy's proto in my savegame to cure the old man from sclerosis, and now he doesn't forget what I told him about combat.
 
Darek said:
I "fixed" his proto file and put it into master.dat, since then he has been working as he should. I haven't tested it extensively but it looks promising.
Could you upload somewhere the fixed proto file?
 
At the offset 27 replace 43 with 48 in a hex editor and here you have it. All values are given in hexadecimal.
 
Darek said:
His first protofile is set to use "PARTY MARCUS CUSTOM" AI instead of"PARTY MACRAE CUSTOM".

This is probably a stupid, n00bish question (I'm new to Fallout modding, though not modding in general), but...

Could this be overridden in his script? If so, wouldn't his saved data then accept the override value, and essentially ignore his first (bugged) proto henceforth?

That way you wouldn't need an altered proto in the data folders, which would thereby not mess with his level-ups.

Essentially, I was thinking you could merely add a line to map_enter_p_proc as follows:
Code:
   critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_AI_PACKET,PARTY_MACRAE_CUSTOM);

From everything I've read and done, I would think this should solve the problem, but then I freely admit I don't know that much (yet).

I don't have access to Killap's source script for Cassidy, but neither Seraph's version, nor the de-compiled script from Killap's fixes / restoration project assign him any AI packet whatsoever.

He was at one time assigned AI_TOUGH_CITIZENS, but this is commented out in Seraph's source (though it doesn't mention by whom or when it was disabled).

If anyone wants to do some testing, I can easily compile a version based on Seraph's code (or Killap's if anyone has source available for the script) and post it up so someone could run it through some paces. I'll eventually get around to it myself, but for the moment I'm busy with some testing of a project of my own. ;)

-Wraith
 
@ WraithUV,

I don't think that's gonna work, simply because of the proto files that are created in your saveslot right when you start a new game.

The Cassidy that are on the Vault City map does have the correct AI assigned to him already, but it still don't work because his base proto is wrong. I'm no expert on this, but it seems to me that you have his base proto, then when he was placed on the map, he was tweaked, but this does not affect the base proto that the game uses for your saves. Using a script would be doing just the same thing, tweaking the guy on the map, but not alter the base in any way.


Since I kind of forgot about this thread I should probably mention that the Mapper can handle new AI packets just fine, as long as you know what you are doing. :roll:

As for Cassidy's fixed base proto, it will be patched into the master.dat file in the upcoming unofficial patch and the Restoration project.
 
Darek said:
I don't think that's gonna work, simply because of the proto files that are created in your saveslot right when you start a new game.
Ah, no. See, I wasn't aware the game would add his data to your saves before you even encounter him (or at least enter a map where he exists). If that's the case, then doing it through scripting won't help.

Darek said:
As for Cassidy's fixed base proto, it will be patched into the master.dat file in the upcoming unofficial patch and the Restoration project.
Which I guess really makes the whole thing kinda a moot issue. At least for people using Killap's patch anyway.

I could probably write a (very sloppy, DOS-based) applet to go and re-write the values in the .dat file, but since that's not exactly my forte (and others could probably do it much easier and much cleaner than I), I doubt I'll mess with it unless there's a significant number of people who want it and aren't already planning to use Killap's update.

-Wraith
 
Could anyone, just for convenience, tell me what his proto number is exactly, and how the file can be included in master.dat?
 
Magnus,

You can use datman to extract all files in master.dat and then use dat2frame to compress files into a new master.dat, both can be downloaded in the files center.

All critter numbers can be found here, the wrong one of cassidy is 89
http://www.fanmadefallout.com/procrit/

I like your weapon redone, it is really good.
 
Thanks a lot. I've taken a hex-look at the proto in the SAVEGAME folder, but all the hex values look totally bogus, it doesn't look like a proto file at all. So I extracted the one in master.dat (which thankfully had the normal format), fixed it and put it back in there, but now I'm wondering: will my savegame proto get updated? Can I delete it and then the game will make a new one, can I edit it somehow or do I have to start a new game?
 
Magnus said:
Thanks a lot. I've taken a hex-look at the proto in the SAVEGAME folder, but all the hex values look totally bogus, it doesn't look like a proto file at all. So I extracted the one in master.dat (which thankfully had the normal format), fixed it and put it back in there, but now I'm wondering: will my savegame proto get updated? Can I delete it and then the game will make a new one, can I edit it somehow or do I have to start a new game?
Yeah I never did figure out exactly what is in this proto either, since it looks completely different from normal protos. If you are up for it you can always compare the original proto with the fixed one and see if you can find the difference (the ones that are in your save folder).

You may be able to start a new game and then switch the proto from your old save with the new one, though I'm not sure what will happen if you already have Cassidy in your party.
Also, if you remove Cassidy's proto you won't be able to load your save, but what you can try is to remove it while the game is running and then make a new save. It will add a new proto, though I'm not sure if it will be a good one or if it's the same old one it has in memory.
 
Those proto files in save are compressed in gzip format, you can rename the extension to .zip and decompress/compress using gzip window version.

The AI packet_num also exists in the save.dat file in slotXX folder. The structure can be found in the fallout wikia
http://falloutmods.wikia.com/wiki/SAVE.DAT_File_Format#Party_member_AI_record_format

It is not enough to change the packet_num, you have to change all B4 bytes data, what I do is to start a new game with the correct AI and save, copy the B4 bytes correct data from the new save to the old one. There is an very good save editor in teamX website.
 
Thanks crazycc.
I knew the map saves where in gzip, but that the protos are too never even entered my mind. They are so damned small as it is, I don't see the point. Strange. :o
 
Well, I saved a new game with the correct proto and copied Cassidy's file to an old savegame. Turns out this wasn't such a good idea, as none of my party members will level up at all now! Well, they actually do, but when I save the game and reload, their stats are reset to the default ones. I'm just assuming that if I start a new game with the correct master.dat and don't muck about with the save files, everything will go back to normal.
 
B-2Admirer said:
At the offset 27 replace 43 with 48 in a hex editor and here you have it. All values are given in hexadecimal.

Is this for the savegame edit? If so, which proto is it? Because if it's proto #89 in the proto/critters directory, offset 27 is not 43.
 
Back
Top