woensdag 27 oktober 2010

[Tutorial]Troubleshooting

Welcome to a new, and hopefully more detailed blog entry!

Today I will teach you about what is maybe the most important task of a developer, troubleshooting.

What is troubleshooting?

I'm glad you asked. Troubleshooting is finding/locating and repairing the cause of a bug or error. While alot of this guide will probably speak for itself, it is véry important for you to know all this.


Table of contents:
1. The problem
2. The cause
3. The solution
4. Correcting the mistake



1. The problem

Lets say we just released a húge patch, with over 40 new armors, and 20 weapons! Players are enjoying the patch, but suddenly a player comes up to you, and tell you his item is invisible. How is this possible!?



2. The cause

This is where we start. At this moment, it is important to know the following:
1. What item is invisible according to the player?
2. Where can the player get the item?
3. Is there anyone else with this problem?

According to the player, the item is invisible. But what item is invisible? Ask the player what item is invisible according to him/her, and where the player got it.

Now that we know this, our next step is to find out if it is actually invisible.

The average player is quick to overlook something. this can range from simply having missclicked the item, so it didn't equip, to having a completely different client. The best thing to start with, is asking the player to give you the item, or by getting the item using a command.

If the item is indeed invisible when you equip it, that's when we can actually start finding the source of the problem. If the item is visible on your screen, ask the player if he/she has the right client, and if the player updated the client to the latest version.

Now, assuming the item is invisible, go to the place where you can get the item as a player. In this example I will assume it is a shop in Junon. Go to the shop in Junon, and see if the item in the shop actually is the item you wanted to add.



3. The solution

When adding an item to a shop, you are bound to make a mistake from time to time. And on rare occasions you will overlook this mistake while testing your new patch. If the item in the shop is not the one you wanted to add, open up LIST_SELL.STB, and find the item. Check if the ID is correct.

The rest speaks for itself. If it's incorrect, correct it, and patch the server again like I showed you in my previous guide. If it's the right ID, we are going to have check the ZSC file.

Open up the right ZSC file. In this guide I will assume we are fixing a weapon, so I open up LIST_WEAPON.ZSC. Using the ZSC editor, I will go to the ID of the item you added to the shop, and check the settings.


While an invisible weapon can have many causes for being invisible, it is generally not hard to find the cause.

The most probable cause of an item being invisible, is that it's missing a ZMS (model) or DDS (skin) file.

How do you know if it's missing? Easy, if it's missing, there wont be a ZMS or DDS file selected in the ZMS/DDS list. By now you should know how to add an item because of my first guide. So if you cant remember how it works, go to that guide first to refresh your memory.



4. Correcting the mistake

Oh man! Now everyone has got that invisible weapon. Well, in this case, it's not a problem. You just patch the server again, with the corrected ZSC file.

But what if the ID in the shop was completely different from the item you wanted to add? -everyone now has a useless item, and it might even start bugging everyone.

You can solve this in 3 ways, depending on the current situation and skills:
1. If you are not the host, but a developer. Ask your host/administrator to run these query's:
UPDATE items SET itemnum='1', itemtype='2' WHERE itemnum='3', itemtype='4';
UPDATE storage SET itemnum='1', itemtype='2' WHERE itemnum='3', itemtype='4';

Where it says 1, you put the id of the item it is supposed to have.
Where it says 2, you put the itemtype it is supposed to have.

Where it says 3, you put the id the bugged item currently has.
Where it says 4, you put the itemtype the bugged item currently has.

For example:
UPDATE items SET itemnum='103', itemtype='12' WHERE itemnum='104', itemtype='12';
UPDATE storage SET itemnum='103', itemtype='12' WHERE itemnum='104', itemtype='12';

Run it, and it's all good again. Everyone's bugged items changed into the right item!

2. If you are the administrator, do step 1 yourself, hehe.

3. If you do not know anyone that can help you with the query, and you don't know how it works, you will have to tell the players to give you the bugged item, and that they will recieve the right item in return.


Alright, that's it for today. I hope you understand that it is very important for a developer to have good troubleshooting skills. You are bound to make mistakes, no matter how good you are.

The real question is, will your other developers, assuming you are not developing alone, notice your mistake in time?

It is really important, that if you are not working alone, you let other developers look at your patch. Other people will notice your mistakes much faster than you will at that time. (Working solo is generally speaking a bad idea)

I hope that helps, good luck with everything!


PS: I am still taking requests for guides!

0 reacties:

Een reactie posten