Attack and defence levels

This script is a replica of a feature from an MMORPG game called Pwi (perfect
world international) called attack and defence levels.
This basically gives you two new stats called attack level and defence level.
For each 1 attack level you have above your opponents defence level you deal
1% more damage,
For each 1 defence level you have above your opponents attack level you receive
1% less damage,
If you have 100 defence level and opponent has no attack level NO damage will
be received.
NOTE: for now if you want to view your atl and dfl you will need my stat point system v1.7+ and status screen addon

Script Link

10 thoughts on “Attack and defence levels

    1. Dekita-RPG says:

      you need v1.7of my stat point distribution script and the addon for the status screen it should automatically show if you have both of those

      EDIT: I just realised i changed the name of the import in this script AFTER i had released v1.7 of the stat point script, which would cause it to not show.
      untill i release v1.8 you will have to change the following things (in the stat point distribution script)

      line 2219 – change to – return dy unless $imported[“DPB-ATLANDDFL”]
      line 2222 – change to – return dy unless $imported[“DPB-ATLANDDFL”]

      at the moment they both say – return dy unless $imported[“DPB-ATL-AND-DFL”]. this will cause them to not show up ^_^
      sorry about that

  1. Pheebes says:

    cool thank you well modified to allow all these stats to fit along with yanflys stuff pretty hard to do as not really enough room

  2. simplestchaos says:

    Is there a way to decrease atl/dtl? I’m thinking of applying a penalty system in various things around my game, based on player actions etc., and I want to be able to decrease these.
    Sorry if it’s obvious and I don’t see it, but I did look.

  3. Dekita-RPG says:

    Script Calls:
    inc_atl(actor_id, value)
    inc_dfl(actor_id, value)

    replace actor_id with the id number of the actor (found in the database)
    replace value with the amount you want the stat to increase(can be negative).

    inc_atl(1, 10) < This will increase actor 1's atl by 10
    inc_dfl(2, 15) < This will increase actor 2's dfl by 15


    those should work, let me know if you have any problems :p

    1. simplestchaos says:

      Oh duh, sorry. For some reason I was thinking it couldn’t be a negative value.
      Thank you~ I really like this script. I’m making them represent a sort of “Evil” and “Good” nature, and they’re both rewards for following particular deities and stuff. Hehe

  4. Dekita-RPG says:

    interesting, remember that it can have very diverse effects on end-game gameplay, things like bosses ect if they have defence level become VERY hard to defeat šŸ˜€

    you will have to make sure that it cannot go below a certain amount… or just make it like… only good bosses have defence level, evil bosses have attack level, final bosses have both šŸ˜€
    just an idea šŸ˜€

    1. simplestchaos says:

      Yep! That’s pretty much what I was thinking! XD The “good” enemies have defence levels, “evil” have attack levels. Makes the gains mean more since they’d counter out what the opposite side would have. Weak enemies would only have lower amounts of them, but the bosses would have a lot more. I just have to figure out what to do if the player never gets Attack Levels due to their choices. If they fight an enemy with high defence level, it’ll be a problem. One thing I’m thinking of is to always keep the levels below 80 at the most, but that’s mildly limiting in some ways.
      (Of course, “Evil” and “Good” are just points of view after all, so there’ll probably be times where someone trying to be as good as possible will still need to make a choice that’d gain “Evil”)
      But anyways, yeah, I’m figuring it out. :3

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s