My Thoughts on 4.2

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • DavidMedley
    replied
    Perhaps a | which can mean "or"?

    Leave a comment:


  • sanedragon
    replied
    From what I understand, the dice expression "m$M" sets the m_bonus to the M expression, and doesn't have to do with concatenation or multiplication.

    Leave a comment:


  • Pete Mack
    replied
    One thing is very confusing: m$M can be read in two ways: as concatenation and as multiplication. I recommend requiring '*' here so it is easuer to read--'m' really needs to stand out in that expression.

    Leave a comment:


  • DavidMedley
    replied
    Originally posted by Nick
    I really like the way this thread is getting more airtime for the details of game mechanics.
    Hey, Nick, it's all thanks to you!! ...not updating the documentation. LOL

    Seriously, tho, I'm a fan of your work. Keep it up!

    Leave a comment:


  • Nick
    replied
    Originally posted by DavidMedley
    Ooh, good catch. I thought it was a percentage of *max* HP.

    From effects.c:
    num = ((player->mhp - player->chp) * context->value.m_bonus) / 100;
    Wow, I guess I must have known that at some point. That makes the percentage less useful unless you really need it, I guess.

    I'd just like to say, too, I really like the way this thread is getting more airtime for the details of game mechanics. There's been a lot of work gone into this over a long time (some of it mine, but mostly other people's), and it's good to see that get recognition - as well as healthy for the codebase to be exposed to the light.

    Leave a comment:


  • DavidMedley
    replied
    Originally posted by sanedragon
    m_bonus as a percentage of missing HP
    Ooh, good catch. I thought it was a percentage of *max* HP.

    From effects.c:
    num = ((player->mhp - player->chp) * context->value.m_bonus) / 100;

    Leave a comment:


  • sanedragon
    replied
    Ok, I think I get this now.

    The dice expression sets the base to PLAYER_LEVEL + 10 and the m_bonus to PLAYER_LEVEL / 4. (z-dice.c)

    HEAL_HP interprets the base as a number of hit points and the m_bonus as a percentage of missing HP, and chooses the greater of those as the healing power. (effects.c)

    The challenge in interpreting these dice expressions is that the code for different effects can interpret the meaning of the 4 parts of the dice struct in different ways, or ignore them entirely. HEAL_HP appears to ignore the number and sides of dice, for example.

    Leave a comment:


  • Nick
    replied
    Originally posted by Pete Mack
    But both expressions are in terms of PLAYER_LEVEL, not PLAYER_MHP (or whatever.) So i am still confused
    That's because the amounts restored (whether flat or percentage) increase as the player levels up. So, for example, a CL20 character gets 5% of their max HP restored - the player level tells you it's 5%, and then you go away, find their max HP, and restore 5% of that. When they get to CL40, it's 10% and you do the same thing.

    Leave a comment:


  • DavidMedley
    replied
    Originally posted by Pete Mack
    But both expressions are in terms of PLAYER_LEVEL, not PLAYER_MHP (or whatever.) So i am still confused
    The first is in terms of HP (1 = 1 HP) the second is in terms of % of max HP (1 = 1% of max HP).

    Leave a comment:


  • Pete Mack
    replied
    But both expressions are in terms of PLAYER_LEVEL, not PLAYER_MHP (or whatever.) So i am still confused

    Leave a comment:


  • Nick
    replied
    Originally posted by sanedragon
    I feel like I'm missing something here, because PLAYER_LEVEL+10 will always be greater than PLAYER_LEVEL/4.
    The trick is that the B line is used to calculate a number of HP, and the M line is used to calculate a percentage, and then the spell restores whichever of those is greater. So for a CL20 character with 200 HP, it would restore 30HP (as 5% of 200 is 10, which is less); for a CL40 character with 600HP it would restore 60 as 10% of 600, because 40+10 is less.

    Leave a comment:


  • sanedragon
    replied
    Originally posted by DavidMedley
    The construction (PLAYER_LEVEL+10)+m(PLAYER_LEVEL/4) doesn't look like it does (to a noob like me) what the help says it does. It looks like it adds, like other similar uses of the + symbol. But it actually unpacks to say "if whatever follows this m is greater than the previous expression, use this percentage of player max HP instead." That is to say, it's a minimum.
    I feel like I'm missing something here, because PLAYER_LEVEL+10 will always be greater than PLAYER_LEVEL/4.

    Leave a comment:


  • Nick
    replied
    Originally posted by DavidMedley
    The construction (PLAYER_LEVEL+10)+m(PLAYER_LEVEL/4) doesn't look like it does (to a noob like me) what the help says it does. It looks like it adds, like other similar uses of the + symbol. But it actually unpacks to say "if whatever follows this m is greater than the previous expression, use this percentage of player max HP instead." That is to say, it's a minimum.

    Is that right? Using + here seems like a bad choice, presumably made in the long long ago.
    Yes, that's right.

    The choice of '+' was made a while ago, but then also remade when I moved this stuff to data files. It is in some respects a bad choice, because of exactly the confusion you've highlighted. The alternative would have been to add an extra parameter into the dice expression code just to deal with the percentage case which only turns up in healing potions. I was very unwilling to do that - the dice and expression code was written (in much better C than I write) entirely by Molybdenum just after I took over as maintainer; it's incredibly useful; and frankly I struggle to understand it enough to make the odd tweak.

    In summary: yes, my fault, I regret nothing

    Leave a comment:


  • Nick
    replied
    Originally posted by Tibarius
    Yeah, i just came to the same conclusion Gwarl. The things i consider moving into a wrong direction are meanwhile to a vast majority configured with the gamedata .txt files. THAT is by the way, GREAT work from Nick. And i will just create my own variant modifying those files to my needs.
    I had been planning to encourage you to make your own variant, I'm glad you have chosen to do that yourself. Good luck with it!

    DavidMedley: Sorry, I'll talk about you next

    Leave a comment:


  • Ingwe Ingweron
    replied
    Originally posted by Tibarius
    In my eyes you just reveal, that you are unable (or unwilling) to handle different opinions that do not match your own view of the world.
    +1 to everything Derakon has been saying to you, and that you have failed to listen to. I will be a little more blunt, given your diatribes, I find you to be a bit of an a-hole.

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕