User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: [2.50.3] Something Strange with SetComboSolid

  1. #1
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%

    Sick Bug [2.50.3] Something Strange with SetComboSolid

    Reported by @Mitsukara ... I hope that she will clarify the issue. What follows is a transcript from Skype. It concerns this quest:
    http://www.purezc.net/forums/index.p...a#entry1009767

    AFAIK, the extremely hardcoded scripts are all in the buffer, if you want to look at them.

    Message Transcript

    Mitsukara: also,Zoria
    Mitsukara: it changed the solidity of the wrong combos
    Mitsukara: for some reason combo 278 stopped being solid
    Mitsukara: here's the screen that's supposed to get changed (it doesn't have combo 278 on it at all)



    Mitsukara: here's the original solidity before changes


    Mitsukara: here's what the changes are supposed to be


    Mitsukara: here's what it would do, though


    Mitsukara: and the same thing changed combo 278, which is some mountains



    ZoriaRPG: @Mitsukara , do you know by how much it's offsetting?'

    Mitsukara: No, because all those water combos it's supposed to change and aren't are in a pretty wide range of positions
    Mitsukara: the earliest one is combo 8 and the latest one is 694
    Mitsukara: if the player has item 126 in their inventory, it checks if the water combos on that screen (aside from the sideview water, over on the left) are solid, and if they are, it makest hem all non-solid (0000b)

    ZoriaRPG: this was without re-saving, right?
    ZoriaRPG : FWIW f you recompilke and save, the solidity bug may go away
    ZoriaRPG : but we want to fix stuff like that, not advise makin a new quest'

    Mitsukara: Yes, it was a version I'd saved in 2.50.2
    Mitsukara: as I start to type this report I realize that I can't document it very well without spending the better part of an hour on the report,
    Mitsukara: and I'm very tirede and have a bunch of stuff to go out and do tomorrow in less than 12 hours
    Mitsukara: so I think I should save my draft on this report, and do it right tomorrow night, instead of an incomplete report tonight

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,451
    Level
    24
    vBActivity - Bars
    Lv. Percent
    73.19%
    I see what the problem is, but it's actually a bug in older versions. Game->SetComboSolid() treated maps as being numbered from 0 instead of 1. Every other function got it right.
    This will probably be handled with an extra rule, meaning it will depend on the version the quest was saved in.

  3. #3
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    Quote Originally Posted by Saffith View Post
    I see what the problem is, but it's actually a bug in older versions. Game->SetComboSolid() treated maps as being numbered from 0 instead of 1. Every other function got it right.
    This will probably be handled with an extra rule, meaning it will depend on the version the quest was saved in.
    I should have looked at the 2.50.1 source...

    Code:
    case COMBOSDM:
        {
            int pos = (ri->d[0])/10000;
            long scr = (ri->d[1]/10000)*MAPSCRS+(ri->d[2]/10000);
            
            if(pos < 0 || pos >= 176 || scr < 0) break;
            
            combobuf[TheMaps[scr].data[pos]].walk=(value/10000)&15;
        }
        break;
    whereas we have

    Code:
    case COMBOSDM:
        {
            int pos = (ri->d[0])/10000;
            int sc = (ri->d[2]/10000);
            int m = (ri->d[1]/10000)-1;
            
            if(pos<0 || pos>=176 ||
              sc<0 || sc>=MAPSCRS ||
              m<0 || m>=map_count)
                break;
            
            long scr = m*MAPSCRS+sc;
            combobuf[TheMaps[scr].data[pos]].walk=(value/10000)&15;
        }
        break;
    For whatever reason, the handler is completely different to the rest of the set. Must have been revised somewhen along the history of this, missing the setter for COMBOSDM.

    I wasn't aware that you had rewritten the ZScript handlers between versions, and I didn't check that far back; but it seems that you further refined them from the 2.50.1 incarnations.

    Whatever way you want to do it sounds good to me as I should think it would be fairly easy to reconcile, although there aren't any quests being made yet in 2.50.3, whether it is worth changing how it worked in the past to justify adding the version change baggage elsewhere is probably debatable.

    I seem to recall there being a ZSCRIPT_VERSION definition, so perhaps just updating that and writing the rule around it would be the best way. Just keep me informed please on what you decide to do, and how you do it so that I stay synchronised.

    I suppose if you have a specific implementation in mind, please post a diff to the boards, so that I can merge them and make everyone happy; as if that'll ever happen. If you put it on Git, just mark the change in the git comments and drop a link to me. I haven't checked in lately to see if the other recent bugfixes are live up there, but I need to integrate those, too.

  4. #4
    Ara? Mitsukara's Avatar
    Join Date
    Jul 2000
    Location
    -15 penalty to all intuit direction checks
    Age
    35
    Posts
    3,920
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,641
    Level
    19
    vBActivity - Bars
    Lv. Percent
    30.32%
    Sorry for not getting back to report this sooner; stuff I had to do yesterday wound up being more complicated and exhausting than I expected, so I didn't get anything at all done on the computer when I got back (mostly I hid under a blanket and fell asleep).

    but it's actually a bug in older versions. Game->SetComboSolid() treated maps as being numbered from 0 instead of 1. Every other function got it right.
    I vaguely recall thinking that was weird! ...multiple years ago when I made the original version of the water boots, that is. That perfectly explains why the cliffs are getting changed.

    I think the order of my quotes to the screenshots is mismatched (the one with the cliffs and leevers is showing the combo that got changed unintentionally) but it sounds like this mystery is already solved.

    This will probably be handled with an extra rule, meaning it will depend on the version the quest was saved in.
    That sounds like a good backwards compatibility fix.

    Do you still want a copy of my quest for anything related to this? If so, I can send you my current prerelease (which is still the one I was testing this stuff in). The actual release version will also be out in a few days, and I have no intention of passwording it.

  5. #5
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,451
    Level
    24
    vBActivity - Bars
    Lv. Percent
    73.19%
    ZScript version would work, too... That's determined when the quest is saved rather than when scripts are compiled, and that should probably change. But neither would stop older versions from opening new quests and running them incorrectly, so ultimately, it doesn't seem to matter much. If no one feels strongly about it, I'll just do whatever.

    Quote Originally Posted by Mitsukara View Post
    Do you still want a copy of my quest for anything related to this?
    Nah, I think we're good.

  6. #6
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    Quote Originally Posted by Saffith View Post
    ZScript version would work, too... That's determined when the quest is saved rather than when scripts are compiled, and that should probably change. But neither would stop older versions from opening new quests and running them incorrectly, so ultimately, it doesn't seem to matter much. If no one feels strongly about it, I'll just do whatever.


    Nah, I think we're good.
    @Mitsukara & @Saffith : Was it mandatory when using SetComboSolid() to make an adjustment at the script level to compensate for the issue?

    I didn't think that was mandatory, but now I remember that there was an issue with LayerMap in 2.50.2 and earlier that I had reported, which is probably what resulted n this change.
    @Saffith : I think that ZScript_Version would be best, as that ensures that if there are any other issues, we can do e same, and bump the version. The only way to preserve forward-compatibility for playing 2.50.3 quests in older versions is to revert the change entirely. Forward-compatibility is just flipping impossible anyway. There are already 2.50.2 quests that don't play properly in 2.50.1/0, 2.50.1 quests that don't play properly in 2.50.2 or 2.50.0, but will in 2.50.3; 2.50 quests that don't play properly in 2.50.1, but do in later versions, and so forth.

    As long as quests from 2.50.0 through 2.50.2 play properly in the latest version, that is all that you can ultimately do. Trying to make older players able to handle the newer formats will just drive you mad. It might be good insert some functions to check version differences for this sort of thing into the programme as a utility set for the future though, into one of the headers, as a generic compatibility set.

  7. #7
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%
    The problem with checking the quest version is that it fixes old quests, but breaks quests that are loaded into ZQuest and then re-saved, without recompiling the scripts. And it's a silent failure, without any warning to the author that they are about to corrupt their quest.

    If by "Zscript version number" you mean V_FFSCRIPT and CV_FFSCRIPT, this is not especially useful, since it also is set at the time the quest is saved, and does not necessarily match the version of ZScript at the last time the scripts were compiled (and moreover, the scripts might have been compiled at different times using different version of ZQ, due to the behavior of preserving missing scripts that are not found anymore on the hard drive).

    A quest rule is one option, as Saffith suggests. We could also modify ZASM to store more metadata with each script, including a version number, which could be used for these kinds of changes in behavior.

  8. #8
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%
    What is the "LayerMap issue" and how is it related to ComboSolid?

  9. #9
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,781
    Level
    21
    vBActivity - Bars
    Lv. Percent
    73.04%
    Quote Originally Posted by DarkDragon View Post
    The problem with checking the quest version is that it fixes old quests, but breaks quests that are loaded into ZQuest and then re-saved, without recompiling the scripts. And it's a silent failure, without any warning to the author that they are about to corrupt their quest.

    If by "Zscript version number" you mean V_FFSCRIPT and CV_FFSCRIPT, this is not especially useful, since it also is set at the time the quest is saved, and does not necessarily match the version of ZScript at the last time the scripts were compiled (and moreover, the scripts might have been compiled at different times using different version of ZQ, due to the behavior of preserving missing scripts that are not found anymore on the hard drive).

    A quest rule is one option, as Saffith suggests. We could also modify ZASM to store more metadata with each script, including a version number, which could be used for these kinds of changes in behavior.
    Good point. I'll write a quest rule and rewrite the function in the near future. I used the quest header's ZC_VERSION, which is what Saffith originally advised, because I had issues with V_FFSCRIPT. This instead, caused problems when the quest author, @Mitsukara recompiled the scripts withotu changing the input values.

    The issue with LayerMap, and SetComboSolid, was that it was targeting invalid map IDs with its old calcs. A quest rule seems the best solution to that for the present, although given the state of flux of ZC< I hesitate to add them--we have far too many as is, for things that should be handled by the object editors... I would be in favour of storing that kind of datum, and on consideration, it's probably the best option.

    You need to chat with @Grayswandir and ensure that you both keep on the same page with the parser though. I don't want to see you two working on things that are mutually-exclusive, given that the script parser, at the least, should be maintained as directly compatible between main and 2.future; so that exporting between versions is always possible. (We already do this, for 2.50.x compatibility exporting.)

  10. #10
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,047
    Level
    31
    vBActivity - Bars
    Lv. Percent
    10.69%
    I believe I've said this before, but I strongly urge y'all to send in pull request, and as soon as possible, for features you want incorporated into the main fork.

    I'm happy to discuss how best to harmonize changes to the scripting engine, and I don't want to intentionally cause trouble for you or grayswandir, but fixing bugs that corrupt quests has a certain amount of urgency to it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social