Saturday 21 March 2015

Lag spikes, packet loss, ping etc

I was playing last night running a few advanced solos in an attempt to get some more ferrins. I started to get quite a few lag spikes, some of them lasting anything up to 2 seconds which was quite annoying. I did a little scouring of the internet and found some explanation. I have planted it here so you don't need to search any further or skim through the noise looking the for relevant parts.

How do I use the Connection Stats window?


By default, the F11 key will toggle the window opened and closed. If this key doesn't work for you, check your settings under Options to be sure that a key is assigned to this window. If you're using a custom UI and still cannot get the window to show, you might have to contact the author of the UI for help.

The window has the ability to display a 30 second history for each of the 4 statistics. If you don't wish to see this graph, you can click the arrow icon on the right side of the window to close the graph. To re-open the graph, click any of the 4 statistic labels.

What do the statistics mean?



Ping
- The ping value is the total amount of time in milliseconds that it takes for a packet to be sent to the server, and an acknowledgment received by your client. So in essence this is a round-trip value, not a one-way value. With ping, the lower the better. Your ping value will be different depending on where you are located in relationship to the server you play on. The further away the server, the higher your ping will be. The ping value may also go up during times of lag, either server or client lag, because more time is taken to process an incoming packet.

PING is coloured CYAN

Sometimes you may also notice that your ping actually goes up when you're standing still, not doing anything, and then drops when you begin moving. This is because we update the ping value whenever a new packet of data is sent. During times of inactivity, your ping value is not being updated as often, and won't be as accurate.

Packet Loss - The term packet loss refers to a packet of data that was not received by either the client or server within a specified frame of time. It could be that the packet is not lost, maybe its just late. In any case, if the packet isn't received within a specific amount of time, we count it as lost and resend it. You should not be worried about an occasional lost packet, this could be normal. However, if you see constant lost packets, this could indicate a problem with the connection between you and the server. When there is a break in the network connection, you will see the packet loss number grow steadily as no packets are making it through. When the network connection is restored, the number should drop back down to zero.

PACKETLOSS is coloured RED

If you're experiencing packet loss, it could be for a number of reasons. First you should try eliminating issues in your home. Try connecting your PC directly to your internet connection and eliminate your routers or firewalls. If this fixes the problem, you have a hardware issue. If you have multiple computers and only one of them is experiencing the packet loss, it could be a problem with the computer hardware. Of all computers are experiencing the same packet loss, and you've eliminated local hardware, it could be a problem with your service provider and one of the pieces of hardware between you and the SOE data center. In this case, hopefully the problem is corrected within a few days. If not, you may need to contact your service provider for support.

Bytes per second - Bytes per second or BPS is the amount of data both sent and received by your computer during the previous second. During times of inactivity this will generally be a very low number, maybe even zero. During combat or running through densely populated zones, this number will spike very high. There are no published numbers on what this value should be. If you are on a broadband connection, you should be able to handle much more data than is ever sent by EQ2. If you are on a modem connection, this number might indicate the reason for lag if you are currently sending/receiving lots of data.

BYTES PER SECOND is coloured YELLOW


Frames per second - FPS indicates the number of 'frames' processed by your client per second. A frame is a complete loop through the game cycle. This includes receiving/sending network messages, processing game data and drawing what you see on the screen. The higher the number the better. Your FPS is affected mostly by your graphic quality settings and the speed of your computer hardware. Setting the graphics to lower settings should improve your frame rate. Specifically, the settings that seem to have the biggest affect on frame rate are shadows, and particle effects. EQ2 is a very cpu-intensive game, more so than the graphics card. So if you're looking for ideas to improve your hardware, upgrading your CPU will probably give you the biggest increase in performance over purchasing a very expensive video card.




FPS is coloured GREEN

Enjoy!

Thursday 19 March 2015

Adding something useful

Our custom UI is now looking much better, but we can still improve it more. One of the problems when doing Heroics or Raids is knowing what the various NPCs are casting so you tell when to joust away, or interrupt. There is a version on EQ2Interface, but this has a number of problems. There can be 2 casting bars that you will be interested in. One is your target, but often you will be targeting via the tank, so the second is the implied target. The version that was created has both, however they both occupy the same screen space and will overwrite each other. Not useful if the tank casts something and the NPC also casts something. The one that you end up seeing is the cast that happened last as this overlays the previous cast, meaning you can miss what the NPC is doing.

I have adapted the code and tidied it up a lot so now there is a single resizable frame with 2 progress bars on it. Now you can see everything that is happening and react accordingly.




Trying to catch both casts from the NPC as well as the targeted group member together is difficult, however Ive shown a what both types of spells look like. The casting window is just like an other normal window in the UI. You can change the opacity, locking, etc. The window is resizable, but unfortionatly there is no option to restrict the resize to just the width. Adjusting the height of the frame will simply make it bigger, but the the casting bars will stay the same height and will also remain in the vertical position. The frame though can be stretched and be as long as you like.

You can download the files from this site here : https://sites.google.com/site/eq2mcloud/home which is a small site maintained by myself purely for file storage for this blog. There are currently 2 files in the Tutorial folder. They are basically the same but you have the option to download the xml if you don't want to risk opening up zip files on your PC.

The first step will be to download one of the files and place the xml file eq2ui_custom_castingactivity.xml into the custom UI folder that was created in the last stage. If you remember, mine was called AndreaUI.

We will now need to reference it so that EQ2 will pick it up and start using it. To do this we will need to create a file called eq2ui_custom.xml and it will need to be placed in custom UI folder. The contents will need to be as follows:

<?xml version="1.0" encoding="utf-8"?>
<Page IgnoreTab="false" ismodule="true" Name="Custom" PackSize="1,1" ScrollExtent="1024,768" Size="1024,768" Visible="false" >
  <include>eq2ui_custom_castingactivity.xml</include>
</Page>


You can download this xml from the same place as before. When EQ2 looks in our custom UI folder it will look for the file eq2ui_custom.xml and if it exists, it will process it. The third line containing the include literally means just that. Include our custom casting xml file with the processing. Its that simple.

Now you have the necessary parts to keep adding more mods to your UI as you see fit. It will just be a case of adding more include lines into eq2ui_custom.xml as the various mods require.

Fire up EQ2 and load your favourite character. You should now see the casting bar, which you can change and move to your liking.

Any problems? Give me a shout in guild chat, or find me in game.











Tuesday 17 March 2015

Useful Tools

Over the years I have collected and used a number of tools for software development, most of them free, so if you really want to play around with the EQ2 XML stuff then don't use notepad, it is pretty much useless and you can get much better for free.




For editing XML directly and other general files, a very useful a free tool is the Microsoft Visual Studio Express 2013 for Web. It can take a while getting used to and is superb for making .NET web pages and sites with all of the new fangled page widgets etc. but that is too deep to go into here. I am recommending it to simply use to view and exit the EQ2 XML files rather than notepad.


Windows notepad.... Ugh
Using notepad can be quite a strain on the eyes and as the xml lines are so long it can be quite hard picking stuff out that you may need to tweak manually.


Notepad++ is available and this has some syntax highlighting capability. As with Visual Studio it can be quite a steep learning curve to get to know from scratch, but both notepad++ and Visual Studio can display the xml and allow you to edit without having to learn the editors.




Below is a dump of one of the xml files using Visual Studio 2013. It is much easier on the eye and the various tags and element colours can be configured easily. The default colour scheme is not too shabby though.




Visual Studio 2013 for Web Development and great for editing XML files.


Visual Studio 2013 can be downloaded from http://www.asp.net/vwd


Notepad++ can be downloaded from http://notepad-plus-plus.org/




You may also like to look at the UI Builder tool that the developers have used to create all of the interfaces. I wont be uploading anything about using this tool until I have discovered more about it, but a word document does exist within the download that contains some useful information. The UI Builder can be downloaded from http://www.eq2interface.com/downloads/info3418-UIBuilder.html



Creating your own Custom UI

I have been using the default UI since I started EQ2. It does get a bit boring after a while and over the years it has improved so from my perspective it works OK, but it could be a lot better. EQ2 comes with a nice skin using dark cyan colours and even as a basic change this is quite appealing. To see this change in effect, use /loadUI in the chat window. This will bring up a dialog displaying what UIs are currently available. You could also use /loadUI Default to change back again once you had the blue loaded. If you loose the chat window, simply hit the return key and it will display again.

This is not good enough for what we want though, so a good start would be to look at use EQ2Maps. This can be downloaded from here: http://maps.eq2interface.com/index.php?action=download It pretty much installs itself and is highly useful, especially for looking for named NPCs and running around dungeons. You can get the map to show up by using /loadUI again and selecting EQ2Map. Great! a good start but can we have the blue skin and EQ2Maps together? Nope, sadly it is either one or the other.

As a first exercise Ill explain how to merge the Blue skin and EQ2Maps together so that we get the best of both worlds. You will need to traverse to your Everquest2 directory using Windows Explorer. For Steam users this would be something like C:\Program Files (x86)\Steam\SteamApps\common\EverQuest 2 Locate the UI directory and open it up. You should now see something like the picture below.

Right click and create a new folder and call it something useful. Mine happens to be called AndreaUI, but you can use your own name of course. Now copy and paste the Default_Blue and EQ2Map folders and dump them into your new directory.

OK, so far so good, but you don't want to keep using the /loadUI command to load it in, so we will make EQ2 load it in automatically when you enter the game. Traverse back to the main Everquest 2 directory and look for a file called eq2.ini Open this up using your favourite text editor and add the following 2 lines:

cl_ui_subdir UI/
cl_ui_skinname AndreaUI

Remember to use your own directory and not AndreaUI. Whilst you are in here have a look at the other various options that you enable by removing the # (hash) in front of the relavant lines. Assuming you want to keep those options at their default settings your file should now look like the following:

cl_ui_subdir UI/
cl_ui_skinname AndreaUI

# Below you find some additional options that cannot be set via the ingame menu.
# Just add or remove a "#" in front of the setting which you want to activate/deactivate

# Enable Anti-Aliasing support (enable here, then set via your graphics card driver)
#r_aa_blit 1

# Allow the possibility to have chat channels in more than one tab/window
chat_allowduplicatechannels 1

#To force EQ2 to listen to your custom cl_screenwidth and cl_screenheight parameters
#cl_validate_resolution false

#EQ2 automatically reduces texture quality if your system's memory is used up, resulting in washed out icons and character graphics, for example. With this command you can disable that behaviour. Would be better to just get more memory though, it's cheap these days.
#disable_auto_low_mem_mode 1

# Disable the intro movie
#cl_movie_enabled 0

# Force the options window to open in advanced mode
#cl_options_advanced 1

# Make the merc quieter
#cl_ignore_merc_chatter true


Load up EQ2 and see your new combined interface - Default using the nice blue and EQ2Maps active at the same time.