SharePoint: Issues with creating list definitions using Visual Studio wizard.

The List Definition creation becomes very easy by using the Visual Studio wizard. However, today I faced an interesting issue with lists of type Calendar, Document Library and Announcements present in our project. 
For example, the "Add" link was not appearing when hovering over the calendar in the calendar view.
Add link not present
Also the ribbon was showing Items tab instead of Event tab.

Events tab not present.
Similarly, in the announcements list, it was showing new item instead of new announcement:
new announcement not present
And in document library it showed new item instead of new file.
new file not present
If we open the Elements.xml file of the list definition and list instance we find that random numbers usually starting from 10000 are applied to Type attribute in ListTemplate and TemplateType of ListInstance.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List project item, an error will occur when the project is run. -->
    <ListTemplate
        Name="CalendarListDef"
        Type="10000"
        BaseType="0"
        OnQuickLaunch="TRUE"
        FolderCreation="FALSE"
        SecurityBits="11"
        Sequence="340"
        DisplayName="CalendarListDef"
        Description="My List Definition"
        Image="/_layouts/15/images/itevent.png"/>
</Elements>
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="Calendar List" 
                OnQuickLaunch="TRUE" 
                TemplateType="10000" 
                Url="Lists/CalendarListDef" 
                Description="My List Instance"></ListInstance>
</Elements>
All these issues can be resolved by using the actual Server Template IDs of these out of the box lists. For example, the Server Template ID of Calendar List (Events list) is 106. For document library it is 101 and for announcements list it is 104. So, for the calendar list the Type attribute in ListTemplate should be equal to 106 and TemplateType attribute in ListInstance should also be 106.
Here is the list of all server template IDs.
profile for Nadeem Yousuf at SharePoint Stack Exchange, Q&A for SharePoint enthusiasts

+