DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 18, 2013, 05:51:21 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Discussion: Advanced Weaponry & Armor  (Read 506 times)
0 Members and 1 Guest are viewing this topic.
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« on: August 11, 2012, 01:03:36 AM »

Name: Advanced Weaponry v1.03
Category: Equipment
Compatibility: 1.1.2, otherwise untested
Description: This module adds a neat little function to the game: weapon durability. Originally, this was supposed to actually allow advanced weapons, but every large project needs to start somewhere small, right? This can easily be applied to armor, so if you want me to do it, just ask. Smiley I do have plans for updates on this, but right now, this is it.

Name: Armor Durability v1.03
Category: Equipment
Compatibility: 1.1.2, otherwise untested
Description: Just like Advanced Weaponry, only for armor. Enjoy.

v1.0 - both
- Initial release
v1.01 - both
- Fixed cost not deducting
- Added a check in the if statement so the Fix nav won't show for Fists or T-Shirt
- Removed some commented code that was no longer necessary
v1.02 - both
- Changed checks for "Fists" and "T-Shirt" to check if weapon damage or armor defense is 0 or not.
- Fixed a bug where 1 DK players would have all of their equipment have half of the base durability.
- translate_inline()'d "Fists" and "T-Shirt" when player armor or weapon breaks.
v1.03 - both
- Added a check in the forest so weapons/armor given out by other modules will still get durability instead of breaking.
- Added a notification text when weapons/armor break at the end of a battle.
- Added support for weapons/armor with more than 15 damage level.
« Last Edit: August 16, 2012, 05:35:17 AM by KaosKaizer » Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« Reply #1 on: August 11, 2012, 06:50:36 PM »

--- Armor Durability moved to the post just above this one. --
Name: Equipment Locker v1.0
Category: Equipment
Compatibility: 1.1.2, otherwise untested

Description: Adds an equipment locker in the village. Admin settings to change cost and daily cost. Will store 1 weapon and 1 armor. Either can be disabled in the settings. If Advanced Weaponry or Armor Durability are installed, then durability settings will be included in the storage. Smiley Enjoy.
ZIP attached as equiplocker.zip.
« Last Edit: August 14, 2012, 05:09:48 AM by KaosKaizer » Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #2 on: August 11, 2012, 10:17:23 PM »

What exactly does an Equipment Locker DO..? o.o
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« Reply #3 on: August 11, 2012, 10:38:50 PM »

Quote
Will store 1 weapon and 1 armor.
You can store 1 weapon and 1 armor in there. I think there's a mod like this out already, but I'm not sure. If there is, I know it doesn't support durability stats like this one. They do not stick over dragonkills, but they are handy if you're using the durability mods and one of your weapons or armor breaks.
« Last Edit: August 11, 2012, 10:42:41 PM by KaosKaizer » Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #4 on: August 13, 2012, 07:24:19 AM »

You need to add:

Code:
$session['user']['gold'] -= $cost;

In both of your modules.. A player reported in, wondering why he was getting free fixes. xD
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« Reply #5 on: August 13, 2012, 07:52:38 AM »

Oh bloody -- >.< I can't believe I forget that. Updated to 1.01, fixed that problem and another that I noticed(it was offering to fix Fists and T-Shirt).
Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Afkamm
Mod God
*****
Offline Offline

Posts: 1563

MarcTheSlayer


View Profile WWW
« Reply #6 on: August 14, 2012, 04:28:23 AM »

Instead of using
Code:
<?php
$session
['user']['armor'] != "T-Shirt"
which wont work for all as people will rename in the editor and translate to other languages.

Go with
Code:
<?php
$session
['user']['armordef'] != 0
as you don't want to fix anything that doesn't have a value to begin with. Smiley

During battle victory when the weapon/armour breaks, you may want to pull the first from the database table or at the very least stick "T-Shirt" inside translate_inline() so it can be translated. Smiley
Logged

KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« Reply #7 on: August 14, 2012, 05:16:15 AM »

D'oh! >.< Completely forgot about translations. Fixed, along with a bug where players with only 1 DK would end up with weapons and amro that had only half of the base durability.
Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #8 on: August 16, 2012, 04:51:14 AM »

I got a petition from one of my players today about this module.. It goes at thus:

Quote
With the durability module, I forged a weapon in the clan forge and it always comes out with "0/0" durability all of the time and cannot be repaired or fixed, and I don't get to use it since it disappears immediately upon entering combat...

I've tried forging it a few times and it always has 0/0 durability

Any idea?
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« Reply #9 on: August 16, 2012, 05:09:17 AM »

Yeah, this module is incompatible with the forge (I honestly didn't think about incompatibilities). The reason it does this is because the module checks if weapondmg in the session array is greater than 0. If it is, then it check if current damage to the weapon is 0 and breaks it. Since this didn't hook into the clan forge, it never set the initial durability. Thus, the weapon was broken before the player ever got to the forest with it, according to the module.

However, a simple fix to Adv Weaps should fix this. I'll have it up momentarily.
Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Aeo
Mod God
*****
Offline Offline

Posts: 1077


Doctor.. Who?


View Profile WWW
« Reply #10 on: August 16, 2012, 05:14:39 AM »

Yeah, this module is incompatible with the forge (I honestly didn't think about incompatibilities). The reason it does this is because the module checks if weapondmg in the session array is greater than 0. If it is, then it check if current damage to the weapon is 0 and breaks it. Since this didn't hook into the clan forge, it never set the initial durability. Thus, the weapon was broken before the player ever got to the forest with it, according to the module.

However, a simple fix to Adv Weaps should fix this. I'll have it up momentarily.

Ahh, I didn't think of it that way. o.o My thanks! ^^
Logged


Time Lords Online - A Doctor Who RPG! Open Now!
~ My Modules: PM me if you'd like me to code something! Smiley ~
KaosKaizer
Mod God
*****
Offline Offline

Posts: 1000


Love bites, but so do I!


View Profile
« Reply #11 on: August 16, 2012, 05:35:24 AM »

v1.03 - both
- Added a check in the forest so weapons/armor given out by other modules will still get durability instead of breaking.
- Added a notification text when weapons/armor break at the end of a battle.
- Added support for weapons/armor with more than 15 damage level.

Done.
Logged

My Mods
Like to read? "Like" my page. Smiley
For reasons I'd prefer not to explain, I will not be active until further notice. I will not make any posts and I will ignore all PMs.
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
19 Guests, 1 User
Lana
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search