Jump to content

Vantha

Community Members
  • Posts

    286
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Vantha

  1. PR for the Lighthouse of Alexandria:https://github.com/TheShadowOfHassen/0-ad-history-encyclopedia-mod/pull/128

    Quote

    The Lighthouse of Alexandria was located on a small island called Pharos, just off the coast of Alexandria. Construction was commissioned by Ptolemy I Soter, the founder of the Ptolemaic kingdom, and lasted multiple decades, costing 800 talents (equivalent to some tens of millions of modern-day US dollars) in total.

    The building itself had a 90-by-90-foot (30-meter) base and was divided into three parts. The bottom block was square- the middle block octagonal- and the top part circularly shaped. Including an alleged statue at the top, the lighthouse was said to measure over 300 feet (100 meters) in height, making it the second-tallest man-made structure at the time—only behind the pyramids of Giza.

    Not only in terms of size but also architecture and engineering, the lighthouse marked an impressive achievement and it became a famed landmark for the metropolis of Alexandria. It is not without reason counted towards the Seven Wonders of the Ancient World.

    And the structure proved very resilient: The Lighthouse of Alexandria survived over 1600 years before, damaged by multiple earthquakes, collapsing, or being taken down.

     

    • Like 2
  2. 1 hour ago, hyperion said:

    The code needs to generate an endless list of names, could be bot1, bot2 and so on. The improved names here are only for role-playing purpose. If you don't provide an endless list you might break mods or add another thing that breaks should you increase max players. Tweaking the generator is an option but discussing this I consider off-topic (like most in this thread) so I stop here.

    Should I open a designated thread?

    • Like 1
  3. Regarding the AI Names, in my local files each civ actually has at least 8 AINames (only the Iberians for some reason have a double entry of Viriato, so there'd be a single one missing for the Iberians).

    I suggest to remove the system of counting names that are chosen multiple times with Roman numbers. Especially if it's this simple to change.

    Currently, in a 4v4 of AIs with everyone playing Persians, on average 2 to 3 players will get a 'problematic' name because many of the their names include a Roman numeral themselves and an additional one is added if a name is picked multiple times.

    • Like 1
  4. On 07/03/2024 at 12:13 AM, Lion.Kanzen said:

    The idea is to use units that are multifunctional those units that it is very questionable what weapon they used.

    I remember that in his time the units peltasts era multi task we can called multi role.

    Consider the following:

    "Peltasts became the main type of Greek mercenary infantry in the 4th century BC. Their equipment was less expensive than that of traditional hoplites and would have been more readily available to poorer members of society. The Athenian general Iphicrates destroyed a Spartan phalanx in the Battle of Lechaeum in 390 BC, using mostly peltasts. In the account of Diodorus Siculus, Iphicrates is credited with re-arming his men with long spears, perhaps in around 374 BC. This reform may have produced a type of "peltast" armed with a small shield, a sword, and a spear instead of javelins.

    We could have Athenian peltasats as double function. 

     

    Another perfect example are the Thyreophoroi.

    https://en.m.wikipedia.org/wiki/Thyreophoroi

     

    The role of peltasts should indeed be rethought.

    According to my knowledge it is still debated whether it actually were peltasts who Ihpicrates reformed. Iphicratean pikemen could be added separately from peltasts, maybe replacing the hoplite champions.

    About the peltasts themselves, I suggest to either: increase their armor and balance it with reducing speed, firing speed or damage. Or: enable them to switch from javelins to swords.

  5. Library of Alexandria

    https://github.com/TheShadowOfHassen/0-ad-history-encyclopedia-mod/pull/124

    Quote

    The Library of Alexandria is without a doubt the most famous library of classical antiquity, and not without reason. It was meant as a universal library to collect and conserve all books in the world. The library was constructed in the early decades of the Ptolemaic kingdom as part of the Alexandrian Mouseion, an institution for research and scholarship.

     

    Under Ptolemaic rule, the entire city of Alexandria grew into a famed metropole renown for knowledge and learning. Many of the most significant scholars at the time worked at or visited its library. According to modern estimations, the library, at its peak, stored several hundreds of thousands of works on papyrus scrolls—a gigantic amount. The building complex surrounding the library functioned as an academic university. There were living quarters, classrooms where lectures were held, meeting and dining rooms, laboratories, and gardens.

    The library's prestige and significance slowly declined from the second half of the 2nd century onwards due to a lack of maintenance and funding. It, unfortunately, fell victim to military conflicts and was likely destroyed at the latest in the 3rd century BC.

     

     

    • Like 2
  6. I have some more texts in the works, but in the meantime here's an update on the UI work:

    A quick showcase:

    I have done some layouting, moving everything to a place where it fits. It already looks a lot better than before, but I will probably still change some sprites, fonts or colors. How do you like the new arrangement? The right is still pretty empty, this is where the related articles section would be, they have to be added manually to each file and I havent done that (the Athenian civic center is the only article where I added some for testing).

    Here are the new features (mainly improving navigation between different pages and menus):

    - Because everything is structured like (and in) folders I added the current "path" at the top, by clicking on different parts of the path you can switch to the respective page. There also is an "UpButton" (with the arrow pointing up) to the left of the path that will alway open the current page's "parent" (like the "up" button found in most file managers)

    - Every action you take/ every menu or text you open will (temporarily) be saved. With the back and forward button you can move back and forth through your history (like the back and forward button in browsers)

    - the button "suprise me!" opens a random article (I am aware that it currently chooses "general" and "environment" more often than "civilisations". That happens because folders inside "civilisations" are only partially filled with files/articles (yet!))

     

    I've also put together a quick mod:

    encyclopedia.zip

     

    Try it out! Let me know any errrors or unwanted behaviour you encounter or any suggestion you have! Keep in mind that it is still in progress, I have cleaned up the code, but it's not very well commented yet. I'm quite new to programming, so don't be suprised if something's done in a confusing way. Tell me if you think I should change something to bring it into line with 0ad's code.

     

    And regarding the sprites, @wowgetoffyourcellphone You've done a great job with the mockups. What textures did you use? Are they in the game files? I couldn't find them. I'm specifically talking about the beige/white background and the golden frame around the image. Was the background texture just a brigther and hueshifted version of 0ad's black background?

     

     

    • Like 4
  7. I'm in parallel also writing some texts to keep the progress going. Here's the Ptolemaic, Seleucid, and Macedonian civic centers:

    https://github.com/TheShadowOfHassen/0-ad-history-encyclopedia-mod/pull/123/

    Quote

    The Ptolemaic Kingdom was, just as Macedon, ruled by a monarchy. The royal bloodline descended from Ptolemy I Soter, the founder. Monarchs held both the Egyptian title of pharaoh as well as the Greek of “Basileus” (king). 

    Below the king, there was pyramidic administration and bureaucracy system in place adopted from Greece: from a central government at the top to regional ministers to local village chiefs at the bottom. Most political offices were carried out by Greeks. 

    This is because, from a legal perspective society was split into two classes, with the upper class being the Greeks and the lower the native Egyptians. There were also, for example, different courts for the two classes.

    Quote

    The Seleucid Empire was a monarchy and ruled a king with the Greek title of “Basileus”. 

    He was not only an absolute ruler but also a self-proclaimed god. Besides, many kings were also military commanders, leading campaigns against external or internal enemies.

    The Seleucids largely adopted the administrative structure of the predecessing Achaemenid (Persian) kingdom. Many officials and nobles were allowed to keep their positions. The geographical division was left unchanged too: the huge territory continued to be divided into around 20 satrapies, each governed by a satrap personally appointed by the king. The satraps, mostly Greeks, ran their satrapies fully themselves, but were subordinate to the laws and regulations of the centralized royal government. Each satrapy was subdivided further into smaller eparchies run by an eparch, those into even smaller political units, and so on. Maintaining strong royal authority across the vast territory still turned out to be almost impossible. Many cities and regions became self-governed and gained high levels of autonomy.

    Quote

    In contrast to many Greek city-states, Macedon was governed by a monarchy. The king, holding the title of “Basileus”, was the head of executive, legislation, and jurisdiction. He also represented the kingdom in foreign affairs and, of course, held supreme command over the military; it was common for him to personally lead troops into battle.

    The king was supported by a companionate of personally appointed companions. In its essence, it functioned as what we today would call a court. Most kings gathered various other advisors and bodyguards around themselves as well, often comprised of members of noble families. There was also an assembly of citizen soldiers who could elect or depose a king. It is uncertain, though, how much power these groups actually held.

     

     

    • Like 2
  8. I just finished two more Han texts that I had started some time ago. With that we've now entirely finished the Han, our third civ. @ShadowOfHassen and I decided to get back to the Greek civs, we will do the Macedonians next and then maybe the Ptolemies and Seleucids in parallel.

    Here is the PR: https://github.com/TheShadowOfHassen/0-ad-history-encyclopedia-mod/pull/121

     

    The Battle of Mobei:

    Quote

    The Battle of Mobei took place in 119 BC in the Northern Gobi Desert. It was fought between the Han and Xiognu, who at this point had been in a century-long conflict and fought a decade-long war. The Han army commanded by Wei Qing was much smaller and consisted of comparably inexperienced soldiers because another much more powerful Han army had been sent to invade Xiognu territory as well. And the plan was for only this other army to engage with the main Xiognu forces.

    After over 500 miles of exhausting marching, however, Wei Qing's weaker army suddenly stumped into a Xiognu army. It was 80,000 elite cavalry, commanded by the Shanyu, the Xiognu supreme ruler, the entire empire's military pride, well-rested and battle-ready. Upon sighting the Han, they immediately sent cavalry to charge at the disorganized and totally unprepared Han. The surprised and shocked Wei Qing acted fast, ordering his men to form a ring formation with their chariots, wagons, and carts. These functioned as fortifications to stop the Xiognu cavalry charge. Behind stood the dangerous Han ranged units, archers, and crossbowmen, continuously firing at the enemy.

    And this tactic worked well: the Xiognu were unable to breach the defensive Han line. A stalemate ensued, and fighting continued until night. In the midst of the night, a sandstorm approached. Wei Qing sent his own cavalry to flank the enemy on both sides. Because of the low visibility due to the night and sandstorm, Han cavalry was able to sneak around the two clashing armies and attack from behind. The Xiognu, unable to coordinate a reaction, panicked. Many of their soldiers were slaughtered, and even though the Shanyu himself managed to get away, the Xiognu army was decisively defeated and, with that, had lost the war.

     

     And the entire Han Xiognu war: (it's the longest text I've ever written, maybe I should split it up into multiple texts)

    Quote

    The Han dynasty was founded in 206 BC, after centuries of close to continuous fighting. However, only three years prior, the nomadic horse tribes of the Northern Steppes had united in the Xiognu confederacy under the title of Shanyu, the supreme ruler. These tribes had, over the centuries, frequently invaded border regions. At the time, a Xiognu army led by the Shanyu himself had captured several Han bases.  

    Wanting to clear away this threat to the Han people, Liu Bang, the founder of the Han dynasty, led an army to attack the Xiognu.  The Xiognu at first gave the impression of retreating, which, however, turned out to be a feint: the Xiognu suddenly turned around and ambushed the Han—at the Battle of Baideng. The Han, having fallen for the trap, suffered a devastating defeat. Han Emperor Liu Bang barely managed to escape to a nearby fortress, which was in turn besieged by the Xiognu. The newly founded empire was on the brink of collapse.

    But the Han were able to bribe the Shanyu's own wife into convincing the latter to break off the siege and sign a peace treaty instead. This peace treaty obligated the Han to send yearly tribute payments to the Xiognu in order to keep the peace alive.  Although these payments were very high, the Han, traumatized by the overwhelming defeat, resorted to doing them for the next several decades. And that in spite of the Xiognu still frequently plundering Han territory. 

      It was only Emperor Wu who dared to officially break the peace. He raised a giant army and planned an ambush at the city of Mayi. A trader was sent to lure the Xiognu into the trap by claiming he had killed the city's ruler and the Shanyu could take it. However, meeting hardly any resistance, the Xiognu got suspicious and eventually caught wind of the plan by questioning a captured Han soldier. The Xiognu turned around and, even though the Han tried to pursue, were able to withdraw without losing a single man.   

    The two were now officially at war. At first, the Han seemed to stand no chance, as their infantry and chariots proved to be too slow compared to the Xiognu cavalry. And the Chinese had no experience in fighting a nomadic enemy. Over the next few years, the Xiognu would conduct large-scale raids, and the Han were trying to defend themselves as well as possible: They extended and upgraded the Great Wall to counter the Xiognu's hit-and-run tactics. The Han military also shifted focus towards cavalry, raising a cavalry force of hundreds of thousands. For that, general Li Guangli even conducted a whole separate war against a distant kingdom—the War of the Heavenly Horses.

    And slowly the tides began turning: Xiognu raids were defended well, and Han commanders like Wei Qing and Huo Qubing were celebrated as heroes (among the Han, of course) for conducting successful counter-raids. They managed to take over the Hexi Corridor, a long, narrow passage leading through an otherwise ungracious and hostile terrain. Controlling it meant being able to trade or tax trade with the Western parts of the world. The Xiognu had lost a crucial support pillar for their economy. Eventually, they retreated northwards behind the Gobi desert. And the Han, they got back to doing what they did best: building more walls. Extending the existing wall structure along the Hexi Corridor enabled them to open direct trade with the West.

    They, however, had not had enough and sought to end this conflict once and for all. Commander Huo Qubing prepared an army and marched as deep into enemy territory as never before, seeking to engage with the Shanyu's army one last time. He marched an arc of over a staggering 1,000 miles, defeating one Xiognu army and capturing many Xiognu nobles on the way. His army reached as far as Lake Baikal. The Shanyu and his army, however, was somewhere else. And not anywhere else. Wei Qing was sent with a smaller army of leftover troops for a smaller expedition further to the west. Against plan, his army encountered the Shanyu's superior elite cavalry, who had been waiting for them, at the Battle of Mobei. Surprisingly, the Han emerged as winners, even annihilating large parts of the Xiognu army. Although the Shanyu escaped this battle, the Xiognu confederacy was ultimately defeated and broke apart.

    This war, however, had also proven very costly for the Han. Many horses and men had died, the state treasury was drained, and the economy at an long-time low. But all in all, it paid off; the Han profited massively from the new trade routes and were able to maintain peace. And were left alone by the Xiognu (at least for the next century).  

    As for the nomadic horse tribes, they would go on to migrate westward and remain historically impactful. Those were the ancestors of the Huns, who invaded Europe and, centuries later, caused the downfall of the once-mighty Roman Empire.

     

     

    I'm also still working on the new encyclopedia page UI, adding some more features. I think I'm close to finishing a good-looking prototype.

    • Like 3
  9. Hi!

    I've dug a lot in 0ad's files lately and I've noticed two small things regarding the naming of files:

    1. There are two 'standing_stone' templates. One in the treasures folder and one in the ruins folder. They are almost identical, use the same actor. Why not just remove one of them? Or at least rename them to avoid to different objects being called the exact same?

     

    2. All civ emblems are called 'emblem_' + civ name. For example 'emblem_macedonians' and 'emblem_kushites'. But for some reason, the Gaul one is called 'emblem_celts'. I don't really see a reason to call them Celts here because in all other files (and in-game) they're called Gauls. I would suggest to rename it to 'emblem_gauls' to keep a uniform way of naming civilisations in the game files.

  10. So, progress has sadly been going a bit slow lately. I haven't done the UI design of the page itself. But I have restructured the entire page. Now it has every text we've ever written that I'm aware of. This includes all templates, mixins, animals, trees, and more.

    Here is a short showcase, clicking through what I have done so far:

     

     

     

    There are seven categories chosen by the buttons on the right, every category has its own overview text, displayed where later the article will be shown. We never wrote such texts which is why  I use placeholders right now ("Here is..." at the top). The categories also have subcategories that are chosen by the buttons appearing on the right. My idea was to have the overview text and then something like "Learn more about ..." below it. After selecting a subcategory, there is the list of articles in the specific subcategory, and here one can open the individual articles. In addition to all that, the civilisations tab also has a dropdown for choosing civ. The civs' overview texts are of course the ones in the game.

    The categories 'historical background' 'maps' and 'gameplay' are currently empty.

    If you're curious, here is the file with the folder structure in it that I use for my external setup script:

    folders.json

    I also added a related articles section on the right. The related articles need to be manually added to the files (which is why in the showcase only one article actually has related articles showing up). And there are back buttons to more easily navigate all the menus.

     

    I am aware that that some name choices aren't very good or fitting, I am definelty open for any sugggestions, especially regarding adding, removing, or renaming categories. What do you think of the 'category-subcategory-selection' system in general? Does anyone have ideas on how to arrange all the buttons in the middle panel?

     

    P.S.: I will upload a mod with the current version soon for people to try out. I have to clean up my messy code first.

     

     

    • Like 7
  11. I have a dropdown in an XML for a GUI page like this:

    <object name="dropdown" type="dropdown"/>

    I know I can add items like this:

    <item>name of the first item</item>
    <item>name of the second item</item>

    The problem is that I want to have more than ten items in the dropdown, and preferably add them from a JavaScript script instead of listing all of them in the XML. How can I do that?

    I found list functions here: https://trac.wildfiregames.com/wiki/Exposed_GUI_Functions#List_functions. But I'm not sure how to use them. And from a quick search not a single instance of 'addItem' or 'pushItem' was found in 0ad's code.

    • Like 1
  12. Do you know this captcha?

    Record_2024-02-11-22-29-45_exported_0.jpg.97603f4a41b7d8e29a96e0fc607235e7.jpg

    https://youtube.com/watch?v=4Ks-C4YJGnc

    Seems to be a newly developed system. And I assume it's made in such a way that bots using most recent technology can't pass.

    I have to say though, they can get very annoying. When you get one wrong you have to start all over. And the amount increases. I once had to do twenty or so. But it depends on the implementation.

    What about having to solve a captcha like this when registering a forum account?

    • Like 1
  13. On 08/02/2024 at 1:22 AM, Stan&#x60; said:

    What didn't work ?

    There has been some work to put more back in the templates from json files, I believe in A27 the civ history tags are now in the templates. And that would basically undo that which isn't great.

    I believe @Freagarach wanted to get rid of the jsons eventually but I don't know more.

    Sorry for the delayed response.

    I couldn't figure out how to work with the current XML templates because I'm not a very experienced programmer to be honest and not very familiar with 0ad's code (yet).
    I believe we should store the articles separate from the templates to keep them clear, easy to read, and everything in them related to gameplay.
    Kind of like the text in the credits popup is stored in JSONs too.

    But if you insist and think it's better the other way, I can of course change it to read the texts directly from the XMLs. I'm sure I'll figure everything out, it can't be that hard. And I was planning on pulling other information from the XML anyway, the portraits and some stats.

     

    2 hours ago, ShadowOfHassen said:

    @Vantha is there a way to add the tags to the XML history tag, something similar to HTML files?

    Not entirely sure what you mean. But yes, it's possible to add tags inside the history tag. We could also rename the 'History' tag to 'Encyclopedia' and then put 'Title' 'RelevantArticles' and 'Content' and 'Quote' in it for example.

×
×
  • Create New...