Jump to content
Age of History Games
Chairman Baad

Event Localization (and how to do it)

Recommended Posts

Posted (edited)

If you've seen or created an event before, you'd understand the various issues behind the event text. Why can I only see part of the text in the event creator? Why did the description I just wrote get deleted when I added a trigger? Why are all the events in a different language? For many mods, these issues are common in scenarios with events. Luckily, there's a better way to display event text: event localization! Inspired by the system in Hearts of Iron IV, and originally demonstrated in The Chairman Baad Collection (rest in lack of content and peace) before being used in Norrvägen and The Second Great War, event localization alleviates all of the issues present with the standard way of event writing.

So how do you use event localization?
Event localization is a process that's simple for even a first-time modder.

  1. Go into your AoH2 directory, go to game/languages/, and open Bundle.properties. (the English language file for AoH2)
  2. Write your event's title, description (if you plan to add one), and outcomes under a tag for each piece of text. Be careful not to use the same tag for more than one event.
    Here's an example with the Turkish defensive pact event from TCBC. In this example, _t corresponds to _title_d is for _description, and _o1 and _o2 are for _outcome1 and _outcome2 respectively. Replace each tag and description with your own, and make sure to save your changes!
tur_azeripactexp_t = Defensive Pact with Azerbaijan Expiring
tur_azeripactexp_d = Our agreement for mutual security with Azerbaijan is set to expire on the 16th of August. However, we have the option to renew the agreement and extend it until 2030. The only catch: both parties must agree to a renewal. What should we do?
tur_azeripactexp_o1 = Appeal for a renewal.
tur_azeripactexp_o2 = Let it expire.

       3. In the AoH2 event creator, instead of writing your event text like you normally would, write the tags corresponding to the ones you added in
           Bundle.properties.

And that's it! You've just set up an event using event localization! During gameplay, if your event pops up and you see the event tags instead of your text, go into the settings and reselect your game language. This reloads the Bundle files so that your text will appear the next time you see the event.

Now how does this solve the issues with normal event text?
Let's go over that, shall we?

Why can I only see part of the text in the event creator? By writing your event text in Bundle.properties, you are relieving yourself of this issue by using a text editor instead of the event creator. Unlike the event creator which doesn't let you scroll through your text, a text editor will let you see your text in full, allowing for longer descriptions and clear writing.

Why did the description I just wrote get deleted when I added a trigger? It is frustrating to spend a few minutes writing an event description only to lose it upon adding a new trigger. But with event localization, you don't have to spend another few minutes retyping your description from the beginning. The next time you lose your description, you can simply retype the description's tag rather than the description itself, saving you some precious time in the event creator.

Why are all the events in a different language? Ah yes, the classic "events only support one language" issue. This is probably the biggest advantage of using event localization: events can support multiple languages! Let's say that you want your event to support Turkish and English. By writing your English event text in Bundle.properties and your Turkish text in Bundle_tr.properties, players will see the event text in the correct language whether they're playing in English or Turkish. No more confusion or duplicate scenarios for each language!

Now that you know the steps and advantages of using event localization, I hope you consider using it the next time you add events to a mod or scenario!

Edited by Chairman Baad

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.

  • Similar Content

    • By Xjento
      This is mine first mod up gonna publishe
       
       
       
       
    • By frenchball
      Hello, i want to make a french revolution scenario with events. I choose as departure date : 1789. But i need help for events. Please you can help me ? I would like to go until 1840 for the events
      I'm sorry if i have a bad english, i'm french. 🙂

    • By Chairman Baad
      AoH2 typically names a province after its city. But you can actually change the province name to whatever you want. And even without a city in the province, you can still give it a name other than "Fokus". This is done through a map's province_names folder. In the base game, this is how the sea provinces get their names.
      How to add a unique province name:
      Find the ID of the province you want to name by going into "Edit Connections And Provinces". In your AoH2 directory, go to map/<map name>/province_names. If you don't have a province_names folder, copy the one from the AoH1 map into your map. Open the names file in a text editor, preferably Notepad++. Add your province name on the line with a value one higher than the province ID. (ex. province ID 1821 = line 1822) Save your changes and reload the map. And now whenever you hover over the province in-game, you'll see the name you gave it regardless of how many cities are in it!
    • By Máximvs Magno
      Buenas días a la comunidad hispanoparlante de AoH2, si es que pueden haber días buenos todavía. Lo que traigo hoy es un escenario alternativo ambientado en el lejano oriente de comienzos del milenio 1000, justo antes de comenzar un período al que llamo las guerras civiles de la dinastía Song. Vea mi estimado lector que contiene algunas cosas de interés:
      Drive: https://drive.google.com/file/d/1WuYe98uq3WUg4cb9M0fhVCH6gubAWDMU/view
      DESOBEDIENCIA CIVIL.
      Este escenario del año 1085, sin embargo, cuenta con un ligero detalle que cambiará la experiencia del juego. Aquella fama que tiene el gran pueblo chino de disciplinado y sumiso ya no existe.
      La población sabe quién es el verdadero enemigo: TÚ. El campesinado estará menos dispuesto a aceptar ser oprimidos por un Estado imperialista, por lo que si te muestras incompetente para manejar la situación correrás el serio riesgo de caer en DESOBEDIENCIA CIVIL. 
       

       
      Dicen que el gobierno que gobierne menos buen gobierno será. Si cobras altos impuestos, eres negligente para mantener a tu población feliz y no eres capaz de entretenerla para que se no se alce, no sólo serás débil contra tus enemigos externos, sino contra tu pueblo.
      En caso de ocurrir el evento de la Desobediencia Civil habrás caído a un punto de no retorno, en el que la propia gente se volverá en contra tuya. Además de impopular, tu dinastía se volverá ilegítima a los ojos del populacho, comenzando así una infame guerra civil para derrocar tu gobierno e instaurar una república de campesinos.
       

       
      NUEVAS CIVILIZACIONES.
      Dentro Song Civil Wars he añadido algunos países necesarios para ambientar como se debe un escenario del siglo XI, principalmente vasallos y países secundarios. Serán menos de veinte, pues no quiero salirme de lo que es justo y necesario.
       

       
      EVENTOS PERSONALIZADOS.
      No sería merecedor publicar esto si no hubiesen eventos para los países protagonistas (y no tan protagonistas). He creado más de una docena de eventos personalizados, destinados a orientar la experiencia a algo más cercano a lo histórico, que al fin y al cabo era lo que quería lograr haciendo mi escenario. Los eventos personalizados están divididos en tres tipos: los de guerra, los civiles y los de gobierno.
      Por mencionar a algunos, existen eventos personalizados para la dinastía china de los Song, los rebeldes de Zhao, los vietnamitas de Viet, los camboyanos del Imperio Jemer y el reino Lavo, en Tailandia.
       

       
      DESCARGA (PC):
      Reemplaza únicamente los archivos, no las carpetas que las contienen. Las carpetas son de referencia.
      https://drive.google.com/file/d/1WuYe98uq3WUg4cb9M0fhVCH6gubAWDMU/view
    • By Chairman Baad
      When it comes to adding cities to a map, you have two methods for how to do it. The first method is to use the in-game city editor, and while this does work in adding new cities, it doesn't let you change existing cities. It also displays new cities at the incorrect level. The worst part is that it leaves a file for each city, therefore forcing Android modders to add these and bringing their mods closer to the 65,536 resource limit.
      The second method is by using the cities.json files in the map's cities folder. This method requires you to have the map editor open, but the process for adding cities is still quite easy. It also lets you change existing cities and displays cities correctly while only using 1-5 files. Let's go through the steps for using cities.json in a map.
      Go into your map's directory and go into the cities folder. If it does not exist, create it. Add a file for each level of city you plan to create: cities.json for capitals, cities_1.json for major cities, cities_2.json for towns, cities_3.json for villages, and cities_4.json for hamlets. For each new file you created, copy the below example into it. Replace City 1 with your city name, and copy the parts in bold for each city you plan to create on the same level. { cities: [ { Name: "City 1", x: 0, y: 0 }, ], name: Earth }        4. This is the part where you need the map editor: click the point on your map where you want each city to appear. For each point, you will get a
                 set of coordinates in the top-right corner. Replace the "zero coordinates" for each city with the corresponding set you got from the map editor.
      And now you're done! Unless you recreated some cities you made with the in-game city editor, in which case you'll need to delete the city editor versions. But now you can reload your map and see your new cities appear!
  • Popular Now

  • Our picks

  • Tell a friend

    Love Age of History Games? Tell a friend!

  • Posts

×
×
  • Create New...