[CF-Devel] few things (Weapons stuff and PR)

Mark Wedel mwedel at scruz.net
Sun Dec 3 18:56:27 CST 2000


     dnh at hawthorn.csse.monash.edu.au
     
      wrote:
>
     
     
     >
     
      Firstly, I have been playing around with Mark's PR stuff and I am very
     
     >
     
      impressed. Everyones fears about balance are really misfounded, it is
     
     >
     
      actually harder to begin with (you need two items just to get what would
     
     >
     
      usually take 1). I agree weapon_magic shouldn't be there but other than
     
     >
     
      that I see no problems. It is really good for Vuns of characters as now we
     
     >
     
      can make characters start off with say -20 vun instead of -100 thus being
     
     >
     
      a minor annoyance but little more. With this power balancing the gods
     
     >
     
      should be alot simpler, thanks alot Mark, Great job.
     
     
 Just note that -100 equals double damage, but +50 would be half damage.

 But I agree - some races could very well get minor resistances (plus and minus)
.  However, if they are minor enough, there may not be a big point.

 As I said on IRC, for non damaging attacktypes, currently the protection value
you have just affects the saving through.  This could/should perhaps be modified
to reduce duration as well.

 The PR code should be checked in now.

>
     
     
     >
     
      I have greatly appreciated everyones comments on my proposals for the
     
     >
     
      general speed and weapon code. I have come up with a few ideas that might
     
     >
     
      make you feel abit better. Firstly, with multiple weapons, I have enlisted
     
     >
     
      the help of my brother (hopefully) and we aim to change the whole attack
     
     >
     
      code, so that a player can attack with more than one weapon seperately, at
     
     >
     
      the same time =). What this means is as Mark suggested, you have a dagger
     
     >
     
      and an axe, the dagger will hit fast, will the axe will only hit slowly.
     
     >
     
      What this will allow us to do is completely prevent the whole averaging
     
     >
     
      and adding rubbish that I thought I would have to do. Hopefully, we can do
     
     >
     
      things like give the Q a permenent extra weapon, "Tail Whip" that
     
     >
     
      constantly attacks and is permanently on when a Q fights. This also could
     
     >
     
      be employed for some special attack skills, fire touch, karate, punching.
     
     >
     
      Considering Kicking is different to Fire touch, a Fire born that knows
     
     >
     
      Karate (I know that sounds stupid =) will attack with that and firetouch
     
     >
     
      at the same time... What do you think? This will also apply to
     
     >
     
      attack_types, thus preventing getting two weapons and creating a massively
     
     >
     
      powerful combo. Also, the option may come that a player could wield two
     
     >
     
      shields. Crazy as this may sound, it may turn out to be fine, or a massive
     
     >
     
      spot for abuse (two good shields in combo might create some unforeseen
     
     >
     
      unbalances), should I ignore this possibility and write pure code, then
     
     >
     
      balance any items which may abuse the system. Or do I create a block so
     
     >
     
      only one shield can ever be equiped?
     
     
 Modifying the code to have 2 weapons is quite a bit of work.  Take this as
technical advice, and not to dissuade you:

1) hit player would need to be modified to pass the weapon that is doing the
attack.  This may not actually be bad - for things like spells, the spell effect
could be passed, with hitter being the owner of that.

2) The weapons themselves would need a weapon_speed_left of the like (or maybe
just use speed).  Then when the player attempts to attack something, you would
need to find all the weapons in the player inventory and pass them along.  But
to do this efficiently, you really need to have a pointer in the player
structure pointing to the characters active weapons - you do not want to have to
search the players inventory for the equipped weapon each time they attack. 
Presumably, only players could use two weapons, so this is not a big deal.

3) For the special attack skills, you have to be careful.  You certainly can't
use fire touch if you have weapons in both hands.  To go with the pointers to
ready weapons, you probably need an array then if you plan to support an
arbitirary number of weapons.

4) As for two shields - unfortunately, there is no size listing for shield.  I
think for 'realism' and balance, only let them use one shield at a time.


 
>
     
     
     >
     
      On the speed stuff, Mark is absolutely right, you can't really give speed
     
     >
     
      in metres per second. My main issue was with weapon speed anyway, and that
     
     >
     
      was with the numbers used (0 to 20) or whatever. I think it should be from
     
     >
     
      0 to 100 (or greater) which is % of the max speed you fight with your
     
     >
     
      hands. Really I couldn't care what the units are, but the current system
     
     >
     
      for designating weapon speed is very limited. I would like to know how the
     
     >
     
      weapon speed actually affects the final speed, I can't seem to find to
     
     >
     
      code that handles it =|. My feeling is that the weapon should affect the
     
     >
     
      speed of the weapon only by the Dex, Str and level of the player. It
     
     >
     
      should not be a matter of maximum speed because I think that is too
     
     >
     
      restrictive (A player who has extremely good weapon skills will still only
     
     >
     
      be able to swing a certain weapon as fast as a player of a much lower
     
     >
     
      skill and str as long as they are both at max).
     
     
 The formula for weapon speed (common/living.c, around line 1220 with the PR
code):
    M=(max_carry[op->stats.Str]-121)/121.0;
    M2=max_carry[op->stats.Str]/100.0;
    W=weapon_weight/20000.0;
    s=2-weapon_speed/10.0;
    D=(op->stats.Dex-14)/14.0;
    K=1 + M/3.0 - W/(3*M2) + op->speed/5.0 + D/2.0;
    K*=(4+op->level)/(float)(6+op->level)*1.2;
    if(K<=0) K=0.01;
      S=op->speed/(K*s);
    op->contr->weapon_sp=S;

 weapon_speed is set a bit above like:
        weapon_speed=((int)WEAPON_SPEED(tmp)*2-tmp->magic)/2;

 So strength and dex are important, but as well as the weapon_speed of the
object.

 Note that weapon speed as displayed has a very simple meaning:  When you
attempt to move into a space to attack something, that is how many attack
attempts you make.  So if your weapon speed is 3, you get three attacks.

 Unfortunately, the way it does it right now isn't that good - basically, it
sets the players speed_left to the weapon speed -1 I believe.  So if for example
your weapon speed is 3, attack a wall and switch directions, you can use that to
move much faster than just moving that directions.  I plan to fix that soon - it
should be pretty simple.  The two weapon code would also fix that I imagine.


>
     
     
     >
     
      For the unlimited quivers, I wouldn't mind that at all. My thoughts would
     
     >
     
      be you would want the quiver to act as the arrow, and everytime it is
     
     >
     
      fired it replicates in your inventory (Although the player wont see this).
     
     >
     
      Then you could try and define how fast a player can fire out these magical
     
     >
     
      arrows by setting a cooldown period on the quiver (arrow). So the player
     
     >
     
      will still be limited by the fact that while the arrows are infinite, they
     
     >
     
      can't be fired as fast as normal arrows... if of course the quiver had a
     
     >
     
      magic value of say +5 I would think it would fire alot faster. I leave
     
     >
     
      this project open to anyone, but I think it would greatly improve the
     
     >
     
      'FUN' rating of archery no end. Crossfire is one of the few games that
     
     >
     
      actually keeps track of arrows, I personally think that detracts from
     
     >
     
      archery (even if it is much more realistic). Adding this quiver as a
     
     >
     
      normal item that is rare, and giving a special one in some quest would be
     
     >
     
      appropriate I think.
     
     
 I don't like the idea of limited rate - the current problem is that bows are
considered useless, and its too much a pain to haul around 500 arrows.

 I personally don't see any problem with unlimited ability to pull out arrows at
whatever speed is needed.  But I think the arrows should just be normal arrows,
so you may still have use to pick up those magical arrows, arrows of slaying,
and so forth.

 Something like this could be useful starting equipment for a archer type class.

    
    


More information about the crossfire mailing list