This paper describes simulation methods of HVAC systems using self-adjusting templates, which are implemented in the Building Energy Simulation Tool (hereafter "the tool"). To achieve extensibility and maintainability, the modular structure has been introduced. Each device is modeled as a module class that has common functions. These functions are formatted. One of the new features of the tool is the "template" structure, which enables us to drastically reduce input data. A template is a partial system implemented, which is to be prepared in advance with several parts connected with each other. For example, an AHU template is provided including several modules such as supply air fans, return air fans, heating and cooling coils, humidifiers, and control systems so that the connecting media, such as air, water, and signals can work as air conditioners. There are several types of the templates, and each template shell (common interface with external connection nodes) is defined by type. A template can easily be replaced with another if they are of the same type. Template functions can reduce errors in the connection between modules during the system building. As "AHU/FCU" template shell types, various templates such as "VAV (2 coils, HEX)" template, "VAV (1 coil, HEX)" template, "CAV (1 coil, HEX)" template, "FCU (1 coil or 2 coils)" template and so on are implemented. It is possible for users to replace a template with another because these templates have the same interface. Therefore, without considering each module such as "a coil" and "a fan", we can replace an air-conditioning unit of "AHU" equipment with "FCU", keeping the external connection. In addition, the template systems such as "Zone", "Heat Source", "Heat Source Group", "Pump", "Ventilation", "Elevator", "Hot Water", "Plumbing", "Thermal Storage", and "Cogeneration" are provided. We define a group of these templates as "The whole building".