W tym procesie dodam nowy budynek - Royal Palace (Pałac Królewski) oto kod dla tego budynku:

Spoiler: 
building city_hall
{
levels town_hall council_chambers city_hall mayors_palace royal_palace
{
town_hall city requires factions { northern_european, middle_eastern,
eastern_european, greek, southern_european, }
{
capability
{
agent diplomat 0 requires factions { northern_european, }
agent diplomat 0 requires factions { middle_eastern, }
agent diplomat 0 requires factions { eastern_european, }
agent diplomat 0 requires factions { greek, }
agent diplomat 0 requires factions { southern_european, }
law_bonus bonus 1
population_health_bonus bonus 1
}
material wooden
construction 2
cost 600
settlement_min large_town
upgrades
{
council_chambers
}
}
council_chambers city requires factions { northern_european, middle_eastern,
eastern_european, greek, southern_european, }
{
capability
{
agent diplomat 0 requires factions { northern_european, }
agent diplomat 0 requires factions { middle_eastern, }
agent diplomat 0 requires factions { eastern_european, }
agent diplomat 0 requires factions { greek, }
agent diplomat 0 requires factions { southern_european, }
recruit_pool "Carroccio Standard M" 1 0.2 2 0 requires
factions { milan, }
recruit_pool "Carroccio Standard V" 1 0.2 2 0 requires
factions { venice, }
law_bonus bonus 2
population_health_bonus bonus 2
}
material wooden
construction 3
cost 1200
settlement_min city
upgrades
{
city_hall
}
}
city_hall city requires factions { northern_european, middle_eastern,
eastern_european, greek, southern_european, }
{
capability
{
agent diplomat 0 requires factions { northern_european, }
agent diplomat 0 requires factions { middle_eastern, }
agent diplomat 0 requires factions { eastern_european, }
agent diplomat 0 requires factions { greek, }
agent diplomat 0 requires factions { southern_european, }
recruit_pool "Carroccio Standard M" 1 0.2 2 0 requires
factions { milan, }
recruit_pool "Carroccio Standard V" 1 0.2 2 0 requires
factions { venice, }
recruit_pool "Janissary Heavy Inf" 1 0.4 3 0 requires
factions { turks, }
law_bonus bonus 3
population_health_bonus bonus 4
}
material wooden
construction 4
cost 2400
settlement_min large_city
upgrades
{
mayors_palace
}
}
mayors_palace city requires factions { northern_european, middle_eastern,
eastern_european, greek, southern_european, }
{
capability
{
agent diplomat 0 requires factions { northern_european, }
agent diplomat 0 requires factions { middle_eastern, }
agent diplomat 0 requires factions { eastern_european, }
agent diplomat 0 requires factions { greek, }
agent diplomat 0 requires factions { southern_european, }
recruit_pool "Forlorn Hope" 1 0.4 3 0 requires factions { hre, }
recruit_pool "Carroccio Standard M" 1 0.4 3 0 requires
factions { milan, }
recruit_pool "Carroccio Standard V" 1 0.4 3 0 requires
factions { venice, }
recruit_pool "Famiglia Ducale" 1 0.5 4 0 requires
factions { milan, }
recruit_pool "Janissary Heavy Inf" 1 0.5 4 0 requires
factions { turks, }
law_bonus bonus 4
population_health_bonus bonus 5
}
material wooden
construction 5
cost 4800
settlement_min huge_city
upgrades
{
royal_palace
}
}
royal_palace city requires factions { england, france, }
{
capability
{
agent diplomat 0 requires factions { northern_european, }
agent diplomat 0 requires factions { middle_eastern, }
agent diplomat 0 requires factions { eastern_european, }
agent diplomat 0 requires factions { greek, }
agent diplomat 0 requires factions { southern_european, }
recruit_pool "Forlorn Hope" 1 0.4 3 0 requires factions { hre, }
recruit_pool "Carroccio Standard M" 1 0.4 3 0 requires
factions { milan, }
recruit_pool "Carroccio Standard V" 1 0.4 3 0 requires
factions { venice, }
recruit_pool "Famiglia Ducale" 1 0.5 4 0 requires
factions { milan, }
recruit_pool "Janissary Heavy Inf" 1 0.5 4 0 requires
factions { turks, }
law_bonus bonus 6
population_health_bonus bonus 10
}
material wooden
construction 5
cost 4800
settlement_min huge_city
upgrades

{
}
}
}
plugins
{
}
}


Jak widać, Pałac Królewski jest po prostu ostatni w linii struktur administracyjnych. Gdy kod zostanie dodany do pliku export_descr_buildings, następnym krokiem jest upewnienie się czy w grze pojawiają się prawidłowe nazwy. Aby to zrobić, należy przejść do folderu data\text. Poszukaj pliku o nazwie export_buildings.txt.strings.bin. Zauważ, że wszystkie pliki w danym folderze są w formacie .strings.bin . Nie mogą być modyfikowane, ale jest na to sposób. Konieczne jest zainstalowanie aplikacji Python na komuterze( https://www.python.org/downloads/ ) a następnie pobranie strings_bin_converter 0.72 (http://www.twcenter.net/forums/downl...o=file&id=1006 ) i wklejenie go do folderu data\text. Po uruchomieniu konwertera, można otworzyć nowo wygenerowany plik export_buildings.txt. Oto, co trzeba dodać do Pałacu Królewskiego:

{royal_palace}Royal Palace

To jest oficjalna nazwa budynku.

{royal_palace_desc}The Royal Palace represents the final frontier in terms of ensuring that the people of a great city don't forget just who is in charge. This palace was commissioned and built under the watchful eye of the King himself, and will serve as home and office to whoever is appointed to govern the city.

To jest długi opis budynku, używanego podczas otwierania zwoju informacji o budynku.

{royal_palace_desc_short}A Royal Palace does wonders to help maintain law and order, and also reduces squalor considerably.

To jest krótki opis budynku, używany do skróconej wersji raportu zwoju budowy.

Pamiętaj że można dodać dla każdej frakcji lub kultury specyficzne nazwy dla budynków dodając do wpisu nazwę Frakcji lub kultury. Na przykład:

{royal_palace_england}Tower of London
{royal_palace_england_desc}The Tower of London represents the final frontier in terms of ensuring that the people of a great city don't forget just who is in charge. This tower was commissioned and built under the watchful eye of the King himself and will serve as home and office to whoever is appointed to govern the city.
{royal_palace_england_desc_short}The Tower of London does wonders to help maintain law and order, and also reduces squalor considerably.


Po wprowadzeniu zmian w pliku tekstowym można rozpocząć pracę na elementach interfejsu użytkownika - na zdjęciach budynku, które pojawiają się w grze. Przejdź do folderu data\ui\southern_european\buildings. To tutaj przechowywane są obrazy dla wszystkich rodzajów budynku. Zasadniczo, istnieje sześć kultur w Medieval II: Total War. Jeśli gram powiedzmy Anglią i otworzę zwój informacji o budynku dla opactwa, gra wyszukuje zdjęcia opactwa w folderze data\ui\northern_european\buildings ponieważ Anglia należy do grupy kulturowej nazywanej northern_european. Jednakże jeśli gra nie może znaleźć obrazu opactwa w folderze northern_european, będzie go szukać w folderze southern_european ponieważ ten folder jest domyślnym folderem dla obrazów przedstawiających budowle. To samo odnosi się do wszystkich "elementów interfejsu użytkownika" lub obrazów, z wyjątkiem kart jednostek. Tak więc z punktu widzenia Moddera, wszystko co musisz zrobić, to umieścić swoje zdjęcie w folderze southern_european. Aby uzyskać inny wygląd dla budynków północnoeuropejskich wystarczy podmienić zdjęcia w folderze northern_european. W każdym razie, przejdź do folderu data\ui\southern_european\buildings. Umieścić w folderze zdjęcia dla Pałacu Królewskiego i podmień w nich nazwy:

#southern_european_royal_palace.tga

Ten obraz to mała ikonka która pojawia się na dole ekranu podczas wyboru miasta.

#southern_european_royal_palace_constructed.tga

Ten obraz pojawia się w zwoju informacji o budynku.

Następnie przejdź do podkatalogu budowy i umieścić w nim obraz o takiej nazwie:

#southern_european_royal_palace.tga

Ten obraz to mała ikonka, która pojawia się w zwoju budowy.

Gratulacje! Twój budynek jest teraz w pełni funkcjonalny!

Poradnik przetłumaczony z strony http://medieval2.heavengames.com/m2t...gs/index.shtml

Pozdrawiam Dymitr