Leaderboard
Popular Content
Showing content with the highest reputation since 01/21/2026 in Posts
-
Hello Programmers, Comrades and Modders! For years, we have been creating scenarios and events restricted to static images. We add a picture of a war, and it just sits there. A picture of a nuclear explosion? Static. But not anymore. I have been digging into the source code and I realized something crucial: Age of History 2 runs on LibGDX. Why does this matter? Because LibGDX natively supports complex animations via TextureAtlas and Animation classes. The code was always there, sleeping inside the game engine, just waiting for someone to wake it up. I have successfully implemented fully animated, looping events without breaking the original game compatibility. 🚀 What I Achieved I modified the Menu_InGame_Event.java class. The logic is simple but powerful: When the game tries to load an event picture (e.g., war.png), my code first checks if a .atlas file exists with that name (e.g., war.atlas). If it exists: It ignores the static image and loads the SpriteSheet using the Atlas, creating a smooth loop animation. If it doesn't exist: It falls back to the default code, loading the static .png or .jpg just like the vanilla game. This means you can have animated events and static events in the same scenario without any bugs! // Logic inside Menu_InGame_Event Constructor String sEventRawName = CFG.eventsManager.getEvent(EVENT_ID).getEventPicture(); String sBaseName = sEventRawName; // remove extension logic... // Check if the .atlas exists if (Gdx.files.internal("UI/events/" + sBaseName + ".atlas").exists()) { // Load the Atlas and create the Animation this.modAtlas = new TextureAtlas(Gdx.files.internal("UI/events/" + sBaseName + ".atlas")); Array<AtlasRegion> regions = this.modAtlas.findRegions(sBaseName); this.modAnimation = new Animation(0.15f, regions, Animation.PlayMode.LOOP); this.isAnimatedEvent = true; } The Rendering (The Draw Method): We use stateTime (delta time) to calculate which frame to show: In the draw() method, instead of drawing the static Image object, you use the stateTime (delta time) to get the current frame from your Animation and draw it using the SpriteBatch. // Inside the draw() method if (this.isAnimatedEvent && this.modAnimation != null) { this.stateTime += Gdx.graphics.getDeltaTime(); TextureRegion currentFrame = this.modAnimation.getKeyFrame(this.stateTime, true); // Draw the current frame oSB.draw(currentFrame, x, y, width, height); // Force the game to keep rendering (otherwise it pauses on static screens) CFG.setRender_3(true); } 📂 How to make your own Animations You don't need to be a coder to use this once the code is in the game. You just need: A SpriteSheet: A PNG containing all frames of your animation. An .atlas file: This maps the frames. You can generate this using GDX Texture Packer (Use the Legacy settings/version, this is crucial!). Place both in UI/events/. I am attaching an example (SoldierRunning.atlas and SoldierRunning.png) so you can test it yourselves. 🌟 The Future Imagine the possibilities: Events with soldiers actually marching. Nuclear explosions that animate. Flags waving in the event wind. News tickers scrolling. The engine was always capable of this; we just had to write the lines to let it speak! Although I used it for events, it's more than that and can be used in any other contexts or images! I am not releasing my file, not because I wanna lock knowledge, it's because I think it's simple to people to do, and because my code is full of nonsense (like superevents, etc) I will send a .gif file showing the use of it (what I achieved!) Download the example files below! SoldierRunning.atlas (first and last line are blank.) file: SoldierRunning.png size: 2048, 2048 format: RGBA8888 filter: Nearest, Nearest repeat: none SoldierRunning rotate: false xy: 2, 1478 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 7 SoldierRunning rotate: false xy: 2, 1109 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 14 SoldierRunning rotate: false xy: 502, 1478 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 19 SoldierRunning rotate: false xy: 2, 740 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 4 SoldierRunning rotate: false xy: 502, 1109 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 11 SoldierRunning rotate: false xy: 1002, 1478 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 9 SoldierRunning rotate: false xy: 2, 371 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 16 SoldierRunning rotate: false xy: 502, 740 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 1 SoldierRunning rotate: false xy: 1002, 1109 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 6 SoldierRunning rotate: false xy: 1502, 1478 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 13 SoldierRunning rotate: false xy: 2, 2 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 18 SoldierRunning rotate: false xy: 502, 371 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 3 SoldierRunning rotate: false xy: 1002, 740 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 10 SoldierRunning rotate: false xy: 1502, 1109 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 8 SoldierRunning rotate: false xy: 502, 2 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 15 SoldierRunning rotate: false xy: 1002, 371 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 5 SoldierRunning rotate: false xy: 1502, 740 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 12 SoldierRunning rotate: false xy: 1002, 2 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 17 SoldierRunning rotate: false xy: 1502, 371 size: 498, 367 orig: 498, 367 offset: 0, 0 index: 2 Let's modernize Age of History 2!2 points
-
𝐓𝐡𝐞 𝐖𝐚𝐫 𝐨𝐟 𝐑𝐞𝐯𝐨𝐥𝐮𝐭𝐢𝐨𝐧𝐬 | Waiting the AoH2 Definitive Edition
YusufAliDE and one other reacted to Lim10 for a topic
2 points -
The War of Revolutions is more than just a simple history mod, it lets you experience AoH2 at an incredible quality with game code changes, launcher plugin and great designs... With our mod, you can rewrite history, witness the rise of revolutions, experience more realistic warfare, and taste the different experience of each country. Discord Server: https://discord.gg/limonya Versions: The War of Revolutions | v0.1: Ottoman Update... v0.1.1 - 25.11.2022 | Design and Map have been beautified. v0.1.2 - 26.11.2022 | Ottoman Cores and Portraits Done. v0.1.3 - 27.11.2022 | Ottoman Vassals Portraits Done. v0.1.4 - 28.11.2022 | 9 Bug Fix and some events added. v0.1.5 - 29.11.2022 | The Bankruptcy Events Added to Ottomans. v0.1.6 - 30.11.2022 | Images have been added to all of the events. v0.1.7 - 30.11.2022 | Added independence events for Ottoman vassals. v0.1.8 - 01.12.2022 | 30 New Music Added to game. v0.1.9 - 02.12.2022 | Game Opening Messages Changed. v0.1.10 - 02.12.2022 | Mod Logo is Finished. v0.1.11 - 02.12.2022 | 48 New Music Added to game. v0.1.12 - 02.12.2022 | Adjusted some Events to occur in Player Only. v0.1.13 - 03.12.2022 | Some Peace Events Added. v0.1.14 - 04.12.2022 | All icons completely changed. v0.1.15 - 05.12.2022 | 49 New Goverment Added. v0.1.16 - 06.12.2022 | All goverment icons and colors changed. v0.1.17 - 07.12.2022 | Last Changes Done. Alpha Version is Out! v0.1.18 - 10.12.2022 | Some Bug Fixes and Changes. The War of Revolutions | v0.2: Russia Update... v0.2.1 - 15.01.2023 | New Leaders and Portraits are done. v0.2.2 - 16.01.2023 | Dzungar Rebellion Events added to game. v0.2.3 - 16.01.2023 | Country and Flag changes mostly done. v0.2.4 - 16.01.2023 | All Events now have a special image. v0.2.5 - 16.01.2023 | 10 New Music added to game. v0.2.6 - 17.01.2023 | Russia Goverment Flags added to game. v0.2.7 - 17.01.2023 | Russia Opening Event added. v0.2.8 - 18.01.2023 | Spain Colonies Now Special Event for Independence. v0.2.9 - 19.01.2023 | Working on Android Version 🙂 v0.2.10 - 19.01.2023 | Android Version is Done! v0.2.11 - 20.01.2023 | Russian Volga Event is Added to game. v0.2.12 - 20.01.2023 | All Russian Empire Events now Multilingual. v0.2.13 - 21.01.2023 | Some Map Background Bugs Fixed. v0.2.14 - 21.01.2023 | Balance and some little changes done. v0.2.15 - 21.01.2023 | Main Menu > About is changed now. v0.2.16 - 21.01.2023 | First Partitions of Poland added to game. v0.2.17 - 22.01.2023 | Special HRE Austria Event Added. v0.2.18 - 22.01.2023 | Im Doing The Last Changes. The War of Revolutions | v0.3: Prussia Update... v0.3.1 - 24.01.2023 | Game Font is Changed Now. v0.3.2 - 25.01.2023 | Now all the User Scales Work. v0.3.3 - 25.01.2023 | Doing Bug Fix and Balance. v0.3.4 - 25.01.2023 | Goverments changed for better balance. v0.3.5 - 25.01.2023 | All of Events now translated to five language. v0.3.6 - 25.01.2023 | Old Portraits Changed, New Portraits added. v0.3.7 - 26.01.2023 | Population Ethnicity is now a different location. v0.3.8 - 26.01.2023 | Terrain Buffs and Terrain Photos changed. v0.3.9 - 03.02.2023 | Thanks to Arash, new background added to mod. v0.3.10 - 05.02.2023 | Starting Event and Debt Events Added to Prussia. v0.3.11 - 05.02.2023 | New Formables added to many countries. v0.3.12 - 13.02.2023 | Janissary Revolts Added To Ottomans! v0.3.13 - 14.02.2023 | Ottoman Event Pictures Reworked. v0.3.14 - 14.02.2023 | New Wonder Systems and Buffs Added To Game. v0.3.15 - 14.02.2023 | New Musics Added To our Mod v0.3.16 - 15.02.2023 | Translations on Goverments Changed. v0.3.17 - 16.02.2023 | Last Changes are done. Release is Near. v0.3.18 - 17.02.2023 | Everything is Done Links Are Changed with new ones. The War of Revolutions | v1.3: World Update... v1.3.1 - 27.02.2023 | Working On The War of Revolutions Launcher. v1.3.2 - 01.03.2023 | First version of TWoR Launcher is done. v1.3.3 - 03.03.2023 | 4 New Scenario added to our mod. v1.3.4 - 04.03.2023 | All the Sounds in the original game changed now. v1.3.5 - 23.03.2023 | State Connections For Islands Changed. v1.3.6 - 24.03.2023 | Assimilation now takes 100 turns. v1.3.7 - 25.03.2023 | 1000 soldiers are now required to attack. v1.3.8 - 26.03.2023 | Special leaders have been added to the mod. v1.3.9 - 26.03.2023 | The special terrains has been added to the mod. v1.3.10 - 26.03.2023 | Correction of some historical countries. v1.3.11 - 27.03.2023 | Island Terrain added to Game. v1.3.12 - 13.04.2023 | No more Trade -> Declare War Exploit. v1.3.13 - 14.04.2023 | Dice Roll Bonus Now 10% Each. v1.3.14 - 15.04.2023 | New Army Professionalism Tech added. v1.3.15 - 16.04.2023 | We are finished the TWoR Launcher v1. v1.3.16 - 01.05.2023 | All of The Event Pictures Changed. v1.3.17 - 13.07.2023 | Changing Country Names to Realistic. v1.3.18 - 14.07.2023 | Remastering Many Country Flags. v1.3.19 - 15.07.2023 | Remastering Old Events and Adding New Ones. v1.3.20 - 16.07.2023 | Remastering the Old Goverment Types. v1.3.21 - 01.08.2023 | Improving the TWoR Launcher. The War of Revolutions | v1.4: Unnamed Update... New Pc Download: You can get it from the Youtube: Video Link New Mobile Download : You can get if from the Youtube: Video Link1 point
-
1 point
-
I didn't want to use it without asking you. Aoh2 modding is dead, but I still hope someone will see it 🙂1 point
-
Thrones of Ice and Fire - Game of Thrones mod
Lim10 reacted to PeteFromPat for a topic
1 point -
[Cancelled]AoC II: The Kings of Dynasties Download available!!!
Lim10 reacted to krauser3ful for a topic
Hello, my dear AoH players, I bring you bad news, and that is, the mod will be canceled, I have had many problems lately, which have discouraged me a lot, and I do not want to work on this mod, at least for now, so I know It will cancel, I do not know if I will resume it in the future, but for now it will be a goodbye, the mod will continue to be available on its download page, but there will be no more updates. I wish you all the best, I hope you do super well, and bye !!! Tired of travelers in time? Tired of the leaders who only take the water of life? Well then, I have the solution! AoC II: The Kings of Dynasties!!! AOC II: The Kings of Dynasties: It is a mod based on the Middle Ages that tries to be an expansion for the Age of Civilization II game. Play as a county, kingdom, or empire and survive through time, expand your domains throughout the troubled Christian Europe, subdue Muslim Africa, fight against the different Indian kingdoms, and defend yourself against the mighty advancing Asian kingdoms and empires to the west. Play in several of the scenarios created by Ple2 and form powerful civilizations either diplomatically or by force. The mod contains: -Dynasties for each of the playable civilizations found on the stages -559 Different dynasties -1120 new playable civilizations -185 new formable civilizations -New scenarios based on the era of feudalism -New forms of governments for the different religions / Cultures of the time -New Soundtrack I want to say and make it clear, that the mod will probably have some historical error, and that is because of the scant information that is found about some dynasties, but if you know the kingdom, county or duchy that belonged to such a dynasty I would appreciate it Tell me. Frequent questions: What languages is the mod in? At the moment the mod is only in English and Spanish. Are there events in the mod? At the moment there is not, but I plan to add them in a future update. Do I need to install something to be able to play mod? No, all you have to do is download the mod and when you extract it you can start playing the mod. When I change the HUD scale the letters get smaller. What can I do? It is simple, to correct this, you just have to go to Options, and go down to the Fonts section, and then change the size to your liking. You can now download the mod here!!! Downloads - AOC II: The Kings of Dynasties mod for Age of Civilizations II - Mod DB Credits and Thanks: -Krauser3ful -MurphyLocke -PLe21 point