CombatLib questions

So, I've tried to understand it, but I'm being stumped. Does anyone know:

  1. How Defence works in CombatLib?
  2. How Protection works?

Not sure about CombatLib, but based on the Zombie tutorial The Pix made, it's the same functions.

My game does something like HP + Atk - Def - Armr


The attacker rolls d20. The defence is subtracted from that. If it is a bit, the protection is deducted from the damage.


Is there something special I have to do to make sure Protection is "implemented"? Since it says "If implemented" on all of the boxes that let me give it a Protection value. I gave my test character a set of armor with protection on all of it, but it didn't seem to have any effect at all.


The Wearable tab says "If implemented", but CombatLib does implement it.

When playing, click on "Debugger", and look at the "armour10" attrribute of the player object and see if it changes when you put armour on and off (you will need to look at a different object and then come back to the player to get the debugger to update attribute values).


the armour10 attribute is 0 even after I put on armor.


Also, on a related question, can monsters wear armor? If so, how would I give them armor?


Okay, so something is wrong. What locations are set up on the Wearables tab for the armour? You need to use the specific ones, and they are case sensitive.


That was the first thing I checked. I used the same ones it says to use, made sure they were lowercase, nothing.

Here's the code, it has a test room where you can see what's going on right after character creation (and the walkthrough skips through character creation for easy fast repeating tests). Maybe you can see what it's doing :/


Why would the armour inherit editor room instead of object?


I haven't messed with any of that stuff. I just made new objects, went to combat, and set that stuff up. If there are other steps that were necessary, they weren't mentioned in the instructions I was following.


From a quick glance it looks like it is set up right. The editor room will not affect. I will look more later.


K.V.

I'm not familiar with CombatLib (yet), but should there be items nested in the armor object?

  <object name="armor">
    <inherit name="editor_room" />
    <object name="Cloth">
      <inherit name="editor_object" />
      <inherit name="armortype" />
    </object>
    <object name="Leather">
      <inherit name="editor_object" />
      <inherit name="armortype" />
    </object>
    <object name="Chainmail">
      <inherit name="editor_object" />
      <inherit name="armortype" />
    </object>
  </object>

I notice that the only type the armor inherits is editor_room. Everything else is armortype, but not the armor itself.

(NOTE: The editor_room type being inherited doesn't matter because that type doesn't exist once you've compiled your game.)


I'm going to play with research CombatLib now.


That isn't the actual armor. That was made from following an online tutorial. The actual armor is the Leather armor set in the Setup room.


I should delete those 3 anyway, since it was made before I added CombatLib anyway, and was always meant to be placeholder.


K.V.

I ended up deciding that was the armor room, which the player never sees. It just holds the objects which have the armor type.

...but oh.

I see.

(I have all sorts of leftover stuff in my code, too. Welcome to the club!)


It will be the armor room that the player never sees, I just haven't gotten to the point I need it yet XD


Delete ClothingLib from your game. As of Quest 5.7, wearables are part of the core code, and that does some stuff behind the scenes. Looks like I forgot to update the tutorial, so sorry about that!


... the library was the problem XD okay, it works now.


Now that I got my armor working, is there any way to equip armor to enemies? Cause some of these guys are humans that would logically wear armor.


I realised I missed that from the editor tab. If you go to the Attributes tab, you will see they already have an armour attribute, currently in grey. You can set it there (suggest 1 to 5).

It does not work as it does for the player; it is a simple number, not calculated from what the monster is wearing.

I am working on an update that will add armour to the proper tab and tidy up a couple of other issues; it will be available just after Quest 5.7.2 is released, hopefully in a couple of weeks.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums