User Tag List

Results 1 to 10 of 14

Thread: Script Counters Roll Over to Max Int When Going Below Zero

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,566
    Level
    30
    vBActivity - Bars
    Lv. Percent
    52.44%
    Quote Originally Posted by ZoriaRPG View Post
    (Emphasis, mine.)
    ...then it can cause rollover. It's illogical for a counter to roll over anyway. That's my real point. That, and the behaviour doesn't match internal counter ref behaviour from items, IIRC.
    Quote Originally Posted by Gleeok View Post
    Rpgs have this problem. A base value is always expected to be in range 0:N, but modifiers are valid if < 0 or > N. Finally, final derived values are again expected to be within range of 0 to N when the dust settles. (This is not the case with statistical values but ZC doesn't have those. ) I would assume that setting a counter (with implicit positive range) to -1 would set it to 0 and not 65535.

    What are all the counters affected by this?
    I would expect setting the counter directly through script for it to behave like the variable it is. I would expect that letting the game handle adjusting the counter to behave as it should.

    That's what we have drain counters, right?
    Last edited by SUCCESSOR; 01-20-2017 at 12:58 AM.

  2. #2
    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,766
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.92%
    Quote Originally Posted by SUCCESSOR View Post
    I would expect setting the counter directly through script for it to behave like the variable it is. I would expect that letting the game handle adjusting the counter to behave as it should.

    That's what we have drain counters, right?
    THat's true. I wish that people used them, but one reason they do not, is that say, you want to write Game->DCounter[CR_RIUPEES] -= 10000;

    Who long do you want to head that sound and watch the counter go down? Writing to Game->counter instantly applies the change.

    Let me try this: Who can make a case for rollover being useful, or beneficial, in the context of counters?
    @DarkDragon , @Grayswandir , and I all seem to agree that rollover in the counters is irrational.

    We can always make it a rule or setting. I could put it in ffrules[], or add a global bit for it. I just don;t see the point of doing that, unless there is a very good reason for it.

    Likewise, I would like to see cases against both longs as counters, and signed values; as I do not see an issue with any of these, based on what we now have. We already trim bits off of the word to make counters work with DCounter, which is signed.

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