Miloch Posted February 3, 2007 Share Posted February 3, 2007 My only thought is that if the creature correction component is as robust as it appears, I would love it if we packaged a full stand-alone NCC utility. It looks like that wold provide a good deal of info, and a stronger way of rebuilding/correcting .cres.I would second that, if it works for finding/flagging/fixing things like THAC0s, saving throws, levels that are off on standard CREs - it would save me a lot of time. Plus be useful potentially for the fixpack. I saw some CRE correction code on the wiki but wasn't sure if that's good to go... Link to comment
cmorgan Posted February 3, 2007 Share Posted February 3, 2007 It is not, without some editing - and I am still learning how to read it! Nythrun explained some changes that needed to be made earlier in that thread, but I need some uninterrupted thinking time to get my head around the whole nesting PATCH_IF setup. Link to comment
Nythrun Posted February 3, 2007 Author Share Posted February 3, 2007 It occured to me that instead of yanking spells that are memorized at the wrong level, I could just assign them to the correct level, so that's being coded now I'd also like to use kit values that correspond to a corrected kit.ids, so some sort of thing like that will have to go in also, though that's introducing dependancy on another file (kit.ids, of course ) Class and level are assumed to be correct (level is adjusted if it's out of bounds, but is otherwise left alone). There's no way to tell if a class value is correct or not in an automated fashion, really, so I can't check that. Link to comment
Nythrun Posted February 4, 2007 Author Share Posted February 4, 2007 Done with the above; kit value fixing will require a corrected kit.ids to take place. The debugging feedback doesn't tell you which spell was memorized at the wrong level when it reassigns the memorized spell level, just that there was an error that's been repaired - is that sufficient, or would you prefer more detail? Link to comment
cmorgan Posted February 4, 2007 Share Posted February 4, 2007 From my perspective, the debug information gives more than enough detail (which I love!!!!) - if there is a change marked, the modder can go back and compare manually, but it is targeted right in on what has changed. This is more than enough, in my book - and on the class thing, (someone stop me if I am being stupid, please) it would be great to have the option of a "Fixed Creature Log" output, where the creature is summarized after fixing including currently assigned class, script, etc. (I am thinking for regular modding usage, but this could behelpful for L1 NPCs to... .cre, longname, DV, all related info, put out to a .log.) This would be useful both for changelog information retrieva, manual recheck of what is working within the mod, and most of all provide a file that is a nice portable check file for those of us who are having new more restrictive filters going into place at work... (By the way, I am significantly in your debt for the time and energy put in to this. Please let me know what I can do to reciprocate. It may be fun and useful, but it also has devouered your time!) Link to comment
Nythrun Posted February 4, 2007 Author Share Posted February 4, 2007 Sure, separate "summary only" log is not a problem. If this ends up being UsefulTo(Anyone) it's not wasted time Link to comment
Miloch Posted February 4, 2007 Share Posted February 4, 2007 If it's not asking too much (maybe it's already in), the ability to run something like the above in 'test' or 'dry run' mode would be very helpful too (so you know what'll be changed before changing it ). Link to comment
Nythrun Posted February 4, 2007 Author Share Posted February 4, 2007 It's just a macro, so COPY_EXISTING - ~somefile.cre~ ~override~ LAUNCH_PATCH_MACRO ought to be doing that already, unless I'm misunderstanding I'm not sure if you can COPY_EXISTING_REGEXP - GLOB or not though, should probably check. Link to comment
Nythrun Posted February 5, 2007 Author Share Posted February 5, 2007 This is BYO\(Wei\|Bigg\)DU so that it nearly vanishes when compressed, so just do the usual renaming dance Correction only, your files go in the your_treasures folder and end up in the things_ive_ruined folder, feel free to change the directories or do whatever. And problems or bugs or things it fixes that it shouldn't, please let me know Linked inthis thread as I can't post even teensy attachments here. Link to comment
Miloch Posted February 5, 2007 Share Posted February 5, 2007 Cool, I'll check it out. How exactly does this work? Since most CREs don't have their levels set correctly, does it look at HP, calculate ballpark hit dice then compare that to the THAC0 and saving throw tables, or is that just wishful thinking on my part ('cause this was what I'd planned on doing manually)? Link to comment
Nythrun Posted February 5, 2007 Author Share Posted February 5, 2007 Since most CREs don't have their levels set correctly, does it look at HP, calculate ballpark hit dice then compare that to the THAC0 and saving throw tables, or is that just wishful thinking on my part ('cause this was what I'd planned on doing manually)? Well, what's the correct level for a fighter to have ? I take the class and level values to be correct, and if it's a class from 1-20 then thac0 and saves et alis are set to whatever values the .2das would predict. If the level is zero it's upped to one, otherwise left alone. If we assume that the level may be wrong and recalculate it from the hitpoints, then we'll run into problems when the hitpoints are out of bounds, as opposed to this setup where you run into problems when the level is out of bounds. Monster classes are left alone - if someone wants to whip up a savetrol.2da for whatever the trollish pen and paper saving throw progression might be, then that's easy enough to include. But a mass "follow rules from obscure and rotting sourcebooks" it isn't - in order to do something like that you actually do have to hand pick creature and decide which values are possible and safe to alter, and change those. Link to comment
Miloch Posted February 5, 2007 Share Posted February 5, 2007 If we assume that the level may be wrong and recalculate it from the hitpoints, then we'll run into problems when the hitpoints are out of bounds, as opposed to this setup where you run into problems when the level is out of bounds.Hmm. Well maybe having an option to recalculate it either way? I guess you'd have to take any CON bonuses into account too... But like I said, the levels are often off. The HP are, well, what they are (one could argue they're 'off' in a number of cases but if you reset those, you're potentially messing with game balance, whereas adjusting the level would have less of a noticeable effect). I'm not sure, but I think by default in BG all monsters get max HP per die, so a 32 HP ogre with average CON should be level 4 (I guess).Monster classes are left alone - if someone wants to whip up a savetrol.2da for whatever the trollish pen and paper saving throw progression might be, then that's easy enough to include.This should be pretty simple - all monsters get the fighter saving throws of their level/hit dice, as far as I can tell (per 2e DMG). The THAC0 is roughly the same too, only it skips every other HD, so:Creature THAC0 (from DMG) HD 1/2 1 1+ 2+ 3+ 4+ 5+ 6+ 7+ 8+ 9+ 10+ 11+ 12+ 13+ 14+ 15+ 16+ 17+ 18+ TH 20 20 19 19 17 17 15 15 13 13 11 11 9 9 7 7 5 5 3 3 I guess I should add I'm thinking of using (or abusing) this to check standard CREs in the game, not just NPCs, for which it may have been intended. Link to comment
Nythrun Posted February 5, 2007 Author Share Posted February 5, 2007 Hee. Okay. Classes and hitpoints are often "off" too - there's no one metric you can select that will work in all cases, so user discretion is going to be manditory. I'll think about recalculating levels and see if I can come up with something. Quid pro quo, though - the various dragon classes are going to need their own quasi.2das, and things like Devas should probably have a table of their own rather than just being clerics-so-their-spells-don't-fail. If you've a list of exceptions and special cases, post it up Hit points in the .cre file are just base hit points, by the way, and don't include constitution boni, so that part is simple Link to comment
Miloch Posted February 5, 2007 Share Posted February 5, 2007 Quid pro quo, though - the various dragon classes are going to need their own quasi.2das, and things like Devas should probably have a table of their own rather than just being clerics-so-their-spells-don't-fail. If you've a list of exceptions and special cases, post it up I can't think of any offhand. Those things you mention don't occur too often (if at all) in Tutu, and I'm not familiar enough with BG2 to make any judgments. I don't mind handling the uncommon exceptions manually anyhow - it's just the bulk of the schmoes I'd like to avoid dealing with. Link to comment
cmorgan Posted February 5, 2007 Share Posted February 5, 2007 Current version seriously rocks, though: pulled all BG1 NPC .cres from a fresh install and placed them in treasures. The things you manually detected, Nythrun, were corrected and logged. For examples, see below In D:\BaldursGateTutu\SETUP-FJ_CRE_CHECK.DEBUG [fj_cre_check/things_ive_ruined/temp.log] loaded, 30 bytes Copied [fj_cre_check/things_ive_ruined/temp.log] to [fj_cre_check/things_ive_ruined/X#BLACK.log] Copying and patching 1 file ... [fj_cre_check/your_treasures/X#BLACK.cre] loaded, 1244 bytes [./override/blacks.bmp] loaded, 7014 bytes [./override/X#BLACK.bcs] loaded, 2075 bytes [./override/X#BLACK.dlg] loaded, 244 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR208.spl] loaded, 346 bytes [./override/SPPR208.spl] loaded, 346 bytes [./override/SPPR208.spl] loaded, 346 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR111.spl] loaded, 12434 bytes [./override/SPPR111.spl] loaded, 12434 bytes [./override/SPPR111.spl] loaded, 12434 bytes [./override/SPPR110.spl] loaded, 202 bytes [./override/SPPR110.spl] loaded, 202 bytes [./override/SPPR110.spl] loaded, 202 bytes [./override/SPPR110.spl] loaded, 202 bytes [./override/SPPR110.spl] loaded, 202 bytes [./override/SPPR111.spl] loaded, 12434 bytes [./override/SPPR111.spl] loaded, 12434 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR107.spl] loaded, 1018 bytes [./override/SPPR208.spl] loaded, 346 bytes [./override/SPPR208.spl] loaded, 346 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR206.spl] loaded, 202 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR204.spl] loaded, 442 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/SPPR302.spl] loaded, 522 bytes [./override/mxspldru.2da] loaded, 1483 bytes [./override/mxspldru.2da] loaded, 1483 bytes [./override/mxspldru.2da] loaded, 1483 bytes X#BLACK.cre's level 1 divine spells per day being corrected from 4 to 3 X#BLACK.cre's adjusted level 1 divine spells per day being corrected from 4 to 3 X#BLACK.cre's level 2 divine spells per day being corrected from 4 to 3 X#BLACK.cre's adjusted level 2 divine spells per day being corrected from 4 to 3 X#BLACK.cre's level 3 divine spells per day being corrected from 4 to 2 X#BLACK.cre's adjusted level 3 divine spells per day being corrected from 4 to 2 X#BLACK.cre's level 4 divine spells per day being corrected from 6 to 0 X#BLACK.cre's adjusted level 4 divine spells per day being corrected from 6 to 0 X#BLACK.cre's level 5 divine spells per day being corrected from 3 to 0 X#BLACK.cre's adjusted level 5 divine spells per day being corrected from 3 to 0 X#BLACK.cre's level 6 divine spells per day being corrected from 2 to 0 X#BLACK.cre's adjusted level 6 divine spells per day being corrected from 2 to 0 X#BLACK.cre's level 7 divine spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 7 divine spells per day being corrected from 1 to 0 X#BLACK.cre's level 1 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 1 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 2 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 2 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 3 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 3 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 4 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 4 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 5 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 5 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 6 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 6 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 7 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 7 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 8 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 8 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's level 9 arcane spells per day being corrected from 1 to 0 X#BLACK.cre's adjusted level 9 arcane spells per day being corrected from 1 to 0 Appending to files ... [fj_cre_check/things_ive_ruined/X#BLACK.log] loaded, 23 bytes Appended text to [fj_cre_check/things_ive_ruined/X#BLACK.log] Copied [fj_cre_check/your_treasures/X#BLACK.cre] to [fj_cre_check/things_ive_ruined/X#BLACK.cre] Copying and patching 1 file ... [fj_cre_check/things_ive_ruined/temp.log] loaded, 30 bytes Copied [fj_cre_check/things_ive_ruined/temp.log] to [fj_cre_check/things_ive_ruined/X#BHET.log] Copying and patching 1 file ... In D:\BaldursGateTutu\fj_cre_check\things_ive_ruined\X#BLACK.log X#BLACK.cre Log summary X#BLACK.cre log 0x0008 103699 Blackberry // strref for long name 0x000c 103699 Blackberry // strref for tooltip name 0x0010 0 // flags 0x0033 1 // effect version 0x0034 blacks // small portrait resref 0x003c None // large portrait resref 0x0052 18 // THAC0 0x0054 9 // saving throw versus death 0x0055 13 // saving throw versus wands 0x0056 12 // saving throw versus polymorph 0x0057 15 // saving throw versus breath weapon 0x0058 14 // saving throw versus spells 0x0066 0 // lore 0x0234 6 // level 0x0235 1 // 2nd field for level 0x0236 1 // 3rd field for level 0x0238 13 // strength 0x0239 0 // percentile/exceptional strength 0x023a 14 // intelligence 0x023b 16 // wisdom 0x023c 15 // dexterity 0x023d 9 // constitution 0x023e 13 // charisma 0x0244 0 // kit 0x0248 X#BLACK // override script 0x0250 DRUID6A // class script 0x0258 None // race script 0x0260 None // general script 0x0268 WTASIGHT // default script 0x0272 1 // race 0x0273 11 // class 0x0280 blackberry Doublechecking in NI (devSin's ramped up version) shows a perfectly ordered .cre, level 6/1/1 human male druid with no kit, having correct spells memorized and known, etc. It repaired 3 creatures with eff v1, one built in charbase order, and three with no spell tables/offsets. It did not wash the windows and get the coffee, but it did it's duties with humor, making sure the bovine herd was corralled and repaired (to get this, 1000 points to the folks who actually read .DEBUG and .LOG files, let alone tp2 ) This rocks! I can run a full evaluation for Miloch of a clean EasyTutu install, if it useful to see what is up... Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.