Easygoing Eyebeast Dintiradan Posted July 25, 2009 Share Posted July 25, 2009 So I manage to find some time to work on the upcoming tutorial scenario (this is still alive, right?). At the moment, I'm trying to find how high a Beggar's HP (among other stats) needs to be to consistently defeat an Elite Soldier. For starters, I use this definition: Code: begindefinecreature 179; import = 3; // Beggar cr_name = "Dennis"; cr_default_courage = 100; cr_default_script = "dennis"; cr_level = 50; To check the HP, I had this in the dialog: Code: begintalknode 100; state = 1; nextstate = -1; question = "KILL! DESTROY!"; text1 = "OK"; action = END_TALK; code = print_num(get_stat(8, 35)); set_flag(2, 11, 1); erase_char(8); activate_hidden_group(2); break; However, when I played the scenario, I got this error: Quote: Error: File corruption caused too-high skill. Skill being reset to 0. Can correct it manually with editor. What? I only set the level to 50. So I remove the cr_level line and try again. Same problem. Huh. Wait, the error didn't come when I loaded the scenario, it came when I talked to the Beggar. So I remove the print_num line. Bam, that does the trick. See, this is what completely turns me off from Blades design. You can't even read a value and print it without corrupting it. I should count myself lucky that it didn't fail silently, or I'd be bashing my head against the wall all night. Likely, the real Blades designers have known about this bug for a while, and there's a workaround. It's not a big thing, but still. Arghhhhhhhhh. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted July 25, 2009 Share Posted July 25, 2009 Sorry to disappoint you, but I'm pretty sure the Blades designers still don't really know what the heck is up with that error or how to fix it. The good news is that it seems to be mostly cosmetic: stats aren't actually being reset to 0, at least most of the time. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted July 25, 2009 Share Posted July 25, 2009 It's not that you're corrupting the value by reading it, I think, as that your act of reading it causes the game to notice that it is 'corrupt'. The game has a hair trigger for this particular alleged error, and as Thuryl says, it doesn't seem to mean business about resetting anything to 0. EDIT: And the project lives, if slowly! I, for one, am still working. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted July 25, 2009 Author Share Posted July 25, 2009 Well, now I'm unable to increase HP itself. I'm using the cr_what_stat_adjust and cr_amount_stat_adjust. I'm doing it as the docs tell me, and I'm not editing more than six stats. Pretty sad when the writer of the tutorial can't get things to work. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted July 25, 2009 Share Posted July 25, 2009 Yeah, I don't think HP works the same way as other stats. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted July 25, 2009 Share Posted July 25, 2009 Originally Posted By: Dintiradan At the moment, I'm trying to find how high a Beggar's HP (among other stats) needs to be to consistently defeat an Elite Soldier. For starters, I use this definition: Code: begindefinecreature 179; import = 3; // Beggar cr_name = "Dennis"; cr_default_courage = 100; cr_default_script = "dennis"; cr_level = 50; To check the HP, I had this in the dialog: Code: begintalknode 100; state = 1; nextstate = -1; question = "KILL! DESTROY!"; text1 = "OK"; action = END_TALK; code = print_num(get_stat(8, 35)); set_flag(2, 11, 1); erase_char(8); activate_hidden_group(2); break; However, when I played the scenario, I got this error: Quote: Error: File corruption caused too-high skill. Skill being reset to 0. Can correct it manually with editor. Originally Posted By: Dintiradan Well, now I'm unable to increase HP itself. I'm using the cr_what_stat_adjust and cr_amount_stat_adjust. I'm doing it as the docs tell me, and I'm not editing more than six stats.Pretty sad when the writer of the tutorial can't get things to work. First off, for checking health, try using the calls specifically designed for this task. I've never hit problems reading health using the get_health() and get_max_health() calls, and I've used it for creatures up to level 100 with boosted HP. Strictly speaking, you can still do it your way, but this way is simpler and less likely to make Blades and the universe implode.Secondly, your method of boosting HP is wrong. You can cr_what_stat_adjust all you like, you're still not going to adjust any secondary stat (like health, willpower, spell energy, etc.). Those are determined entirely by the creature's primary stats. Instead, try using cr_hp_bonus, which does pretty much what the name suggests.Also, checking the health of non-existent creatures is a sure way to get some funky results. I'm not sure if that's an issue here, but make sure any health-checking calls are made after the creature exists. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted July 25, 2009 Author Share Posted July 25, 2009 Ah, okay, that makes sense. I didn't realize that there were calls that specifically deal with health. I just came to the stat_adjust calls and assumed that they worked for secondary stats as well as primary ones. So.. RTEFM? RTWFM? (And the creature definitely existed when I made the call.) I suppose that's the reason why get_stat fails when checking health. Since HP can be much higher than a skill level, the game assumes that the value must be wrong. It makes sense, once you know all the calls, but I wish the docs were a little bit clearer for people like me. Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted July 25, 2009 Share Posted July 25, 2009 Originally Posted By: Dintiradan RTEFA? FYT Oh, and the tutorial thing... Maybe I should work on the part I committed to, if I can even remember what it was. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted July 26, 2009 Author Share Posted July 26, 2009 No, it's clearly a Manual, not an Article (I realize that M canonically stands for man page, but the times they are a'changing). Oh, and: Quote: Stage 1: The Wilderness (Lazarus) Your master, the wizard, has called you into town to do a job. He is the narrator. Painting terrains, floors and heights. draw a bidge to cross a river add heights to a set of stairs to get to the top of a cliff turn off auto hills! use a fill drawing option to replace dangerous swamps with something safer Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted July 26, 2009 Share Posted July 26, 2009 It's an appendix man, an appendix. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted July 26, 2009 Author Share Posted July 26, 2009 Well, if we really want to be pedantic, I was reading the WikiBook, not the appendix. :-P Also, where are my manners? Thanks everyone for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.