Jump to content

azayrahmad

Community Members
  • Posts

    270
  • Joined

  • Last visited

Posts posted by azayrahmad

  1. I'm not a historian, but gameplay-wise every 0 AD unit already has knife for slaughtering purpose.

    Xenophon said that Peltast (javelineers) use swords as secondary weapon. He also recommends kopis/makhaira for horsemen instead of xiphos.

    You probably have seen this Survival mod by @Angen , otherwise this might help you as it has secondary weapon concept:

     

     

    • Thanks 1
  2. I've been thinking a lot about this since I've seen the battalion proposal years ago. I think hard battalion (Total War style) is difficult to apply in 0 A.D. due to citizen-soldier concept and such (In vanilla/EA, at least. It should be easier to implement in DE). But we can still work on soft battalion (Cossacks style). However it's still a long way to get there. Looking at 0 AD code, my opinion is that many unit behaviors (UnitAI) needs to be worked on first before we are working on battalions.

    Units in formation should have different set of stances than individual units. Currently formation is just about positioning, but not task allocation. Sure they have different pose in each row, but they still do the same thing once enemy comes. I think units should behave differently considering other units in the same formation.

    Simplest example is healer in formation should prioritize healing soldiers in formation instead of any soldiers within range. Or archers in formation should be able to shoot continuously instead of all at once. Or a little more complicated, soldiers with low health moves to the back of formation, letting others with higher health to continue attacking. These are reducing micro and very useful as a base for battalions behavior.

    7 hours ago, wowgetoffyourcellphone said:

    Basically, allowing the training of mixed batches. For instance, you could have the option to train batches of 10 soldiers, 1 officer (2x health; attack aura), and 1 bannerman (speed and armor aura). Or maybe an officer and bannerman would be trained for free if you choose to train a batch of 20 or more soldiers. 

    This is also a great step towards battalion. Age of Empires III has Banner Army concept for Chinese civ that works similarly. At least this is a good step to reduce micro.

    I know this is a thread about Forge rework, but @wowgetoffyourcellphone's screenshot of battalions really pumped me up somehow. I really want this feature lol, but I admit I haven't yet to comprehend UnitAI.js entirely.

    • Like 1
  3. I have done a bit of research on the idea of secondary resources in my City Building mod, and yes, it would create micro that while make sense in city building games, quite distracting in RTS games.

    One way it could work like in Stronghold games is by making forge converts wood/metal into weapons using ResourceTrickle. Technologies can be used to switch/stop production. In this case, just like in Stronghold, soldiers can be instantly trained.

    The problem is that the GUI doesn't really made to accommodate so many resources. @Monder87's 0AD Economy Simulation mod has overhauled the UI for this reason, however I haven't yet able to fully comprehend the code to implement it in my mod, so I will postpone this idea for now.

  4. @Freagarach

    This works with Alpha 24, haven't tested it on SVN.

    I have tested the morale regeneration using Aura i.e. create aura that increase morale regeneration, and it works well, suggesting that the morale regeneration is not the issue. That's why I tried to copy some code from Auras.js to Morale.js, I don't know why the morale regeneration is not applied.

    I haven't traced the whole chain though, that is a good suggestion. I should have also check whether there's something wrong with ExecuteRegeneration. I will take a look at it in the weekend.

    Thanks!

  5. In previous alphas the models don't have those bases, so on uneven terrain sometimes the building seems to be floating, sometimes half the building gets buried underground. So the developers decided to add extra base for each model to avoid this. It's not like the artists created tall fortresses and the developers decided to bury half their height.

    As to why they are shorter than wall, I believe it's for historical purposes. Ancient fortresses were not medieval castles like in Age of Empires II, they are just oversized towers/standalone gatehouses here. Artists and historians here please CMIIW.

  6. Hi @Freagarach,

    Sorry I forgot to check that the repo was private, already made public now: https://github.com/azayrahmad/0AD-morale-system

    I did clean on ownership change, but I put it without checking for INVALID_PLAYER, as Auras.js done as well:

     
    Morale.prototype.OnOwnershipChanged = function(msg)
    {
    	this.CleanMoraleInfluence();
    	if (msg.to != INVALID_PLAYER)
    		...
    
    };

    I put Warn code inside ApplyMoraleInfluence & RemoveMoraleInfluence to debug and they are both triggered during the game. However, I don't know a way to see what entities morale influence applied to, and I see that my units are not impacted by the defined effect (They don't have increased morale).

    Please let me know if you notice something wrong, and thanks for your help!

  7. So I'd like to create a Morale system mod... My plan is to make it to be some kind of Aura of units that influences other units in range. However I need it to be more dynamic, i.e. the effect strength would change according to unit's own morale strength. 

    I decided to create separate component. Morale.js. There are two mechanisms in this component:

    (1) Morale level and how it affects unit performance. This is similar to how Health.js works.

    (2) Unit effect on other units in range based on its own morale level. This is intended to be similar to how Auras.js works.

    The first one already work, but the second one is not yet. I still don't understand why the effect is not applied yet. 

    This is the repository on GitHub: https://github.com/azayrahmad/morale-system

    The problematic part is in simulation/components/Morale.js.

    Here are the snippet of the relevant parts:

    Init:

    Morale.prototype.Init = function()
    {
        this.affectedPlayers = [];
    
    	...
        
        this.CleanMoraleInfluence();
        ...
    };

    The CleanMoraleInfluence(), intended to be similar to Clean() function from Aura.js. The target here is to apply morale influence to any allied units in 10m range. (GetAllies() also includes player's own units right?)

    Morale.prototype.CleanMoraleInfluence = function()
    {
        var cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
        
        //Remove Morale
        let targetUnitsClone = [];
        if (this.targetUnits)
        {
            targetUnitsClone = this.targetUnits.slice();
            this.RemoveMoraleInfluence(this.targetUnits);        
        }
        
        if (this.rangeQuery)
            cmpRangeManager.DestroyActiveQuery(this.rangeQuery);
    
        //Add Morale
    
        var cmpPlayer = Engine.QueryInterface(this.entity, IID_Player);
        if (!cmpPlayer)
            cmpPlayer = QueryOwnerInterface(this.entity);
    
        if (!cmpPlayer || cmpPlayer.GetState() == "defeated")
            return;
    
        this.targetUnits = [];
    
        let affectedPlayers = cmpPlayer.GetAllies();
        this.rangeQuery = cmpRangeManager.CreateActiveQuery(
            this.entity,
            0,
            10,
            affectedPlayers,
            IID_Identity,
            cmpRangeManager.GetEntityFlagMask("normal"),
            false
        );
        cmpRangeManager.EnableActiveQuery(this.rangeQuery);
    
    }

    Here is the apply and remove morale influence functions. The intention is to apply the effect (add Morale regenrate by 1 per second) and remove it if no longer in range).

    Morale.prototype.ApplyMoraleInfluence = function(ents)
    {
        var cmpModifiersManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModifiersManager);
        cmpModifiersManager.AddModifiers(
            "MoraleSupport", 
            {
                "Morale/RegenRate": [{ "affects": ["Unit"], "add": 1 }]
            },
            ents
        );
    }
    
    Morale.prototype.RemoveMoraleInfluence = function(ents)
    {
        if (!ents.length)
            return;
        var cmpModifiersManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModifiersManager);
        cmpModifiersManager.RemoveAllModifiers("MoraleSupport", ents);
    }

    And lastly OnRangeUpdate. This should run apply and remove functions when units are moving in/out of other units range right?

    Morale.prototype.OnRangeUpdate = function(msg)
    {
        if(this.rangeQuery)
        {
            this.ApplyMoraleInfluence(msg.added);
            this.RemoveMoraleInfluence(msg.removed);
        }
    }

    I have been looking at the code all day and still don't understand why does the effect not apply. In the repo I added template units that includes Morale which start at 50%. The intention is that every players unit within 10m range should have increased Morale, but they don't.

    If you want to test this with Aura and see how I intend this to work, you can put these snippet inside template_unit.xml:

      <Auras datatype="tokens">
        morale_friendly
      </Auras>

    Any help would be extremely appreciated.

    Thank you!

    • Like 1
  8. Historically ancient Greek women were forbidden to work, especially the kind of work depicted in-game (farming, lumbering, and mining), except the very poor who have no other option. Is it possible to reduce women percentage for Hellenes citizens? I see that in DE A23 the percentage can be set in actors (but then the women have men's voice lol), not sure how it should be done in A24.

  9. @Alfred Thanks for your suggestions! Some of your suggestions have also been in my mind recently.

    15 hours ago, Alfred said:

    - Dont make houses generate coins (until stage III).

    I decided to not make houses generate coins, as there's no record of ancient governments taxing households coins. But I am working on creating a food taxation system.

    15 hours ago, Alfred said:

    - Have what i call 'nobility buildings'. These include the apadana for the persians and prytaneion for athenians. These should generate gold, at a moderately high rate.

    I have in mind to create this as well, but a bit unsure about the historicity of this. Nobility taxing the lower class seems to be the truth in medieval era, but I'm not sure this is the case in antiquity. In Greek city-states, the wealthy are the ones who funded public/civic duties (liturgy). Someone with history expertise might want to share opinion?

    15 hours ago, Alfred said:

    - The market building doesnt generate coins itself, but each time a trader gets from one point to another, the trader 'pays' 1 coin. There should also be a minimum distance between two markets (or two dockyards, a market and a dockyard). This is true historically, as a country receives import taxes.

    Now this, I read that Athens' Piraeus harbor implemented this trade tax, not sure about land markets but let's assume they did as well. But it can be done. So the coin resource trickle would be 5% of Trader's capacity.

    15 hours ago, Alfred said:

    - The temples generate gold. The amount depending on how far away they are from the houses. For each house close to a temple, you could generate 1 gold/second. There should also be costs to running the temples. Therefore, you could have the rule that temples generate -2 coins/second, and therefore, to make them profitable, have to be build near houses. These cap at 1 coin/second. This is true historically.

    This is great idea. I just read an article that says Parthenon was used to deposit a large sum of coins, probably used for war effort.

    15 hours ago, Alfred said:

    - In the final (third) phase,  have taxation technologies that in each level you could get 0.1, 0.25, 0.5 gold per house. However, this would mean for the non-champion units, they would receive a -25%, -50%, and -75% loss to health and gather rates. Sure this is harsh on the workers, but eventually, this is would create the specialization we see in high tier nations/ societies. Also as you tax more the people, the lesser their living conditions (obviously). 

    This sounds like taxation system in Delenda Est.

    14 hours ago, Nescio said:

    houses increase your income, there is no limit on houses, therefore there is no limit on your income.

    Well this mod is city building mod, the coin was made to reward city planning after all. Besides all buildings consume money (coin negative trickle) as well, so it should be well spent and not infinite. I'm still balancing between trickles to prevent too much coins.

    11 hours ago, Lion.Kanzen said:

    I like the trading system with cities that are not in the map area.

    This is great idea but I'm not sure how it would implement in RTS like 0A.D. I tried to avoid the feature to feel like AoE3 Home City.

    Perhaps it could be simplified, like techonolgies researched at markets/docks. E.g in Rome's market: "Open Trade Route with Caesarea" cost: 700 coins, effect: markets trickle -1 food/sec, +1 wood/sec. Different civs could have different trickle effects based on their historical trade. Trade could also be stopped with another tech "Stop Trading with Caesaria" that stops the trickling.

    • Like 1
  10. @Alfred

    Silver resource is not in this mod, but in @Nescio's 0abc mod (another, more polished mod). In my mod I called it Coin, but yeah it works similarly with 0abc.

    As for your suggestion, yes that was what I aim for. Currently the coin seems to increase exponentially lategame, and I want to reduce the rate per second. However as I mentioned in previous comments, I'm afraid this concept i.e. governments taxing coins from households, is a bit ahistorical.

    I'm contemplating a way to a more realistic and historical currency usage. Probably simulating coin minting by converting metals to coins in civic centers/markets. I also want to limit coin usage for expensive soldiers only (champions and mercenaries). But I'm still thinking if this is too redundant for creating another resource (I also have in mind to create Knowledge resource for researching technologies).

  11. I agree that I think the best civ for tutorial is any of the Greek civs (Hellenes), in addition to them actually being colonists (If we already agreed on the story being the founding of a Greek colony), they are also make up almost the majority of civs currently available in 0 A.D.

    As for @Freagarach, I agree with your tutorial syllabus, but I suggest putting Basic Warfare before Advanced Economy. Basic Economy should be followed immediately by Basic Warfare, so we could see the connection between economy and combat immediately. I also agree with @wraitii that 0 A.D. Interaction can be put much later. I suggest putting this after Basic Warfare.

    My first RTS was StarCraft, and this game has only one official tutorial, basic economy (goal is to gather 100 resources). The rest of the mechanics are explained piecemeal across the entire campaign. And I enjoy it more in comparison to AoE2 style of tutorial campaign set.

    Some other tips I think would be useful:

    1. Beware of combining too many learning materials in one scenario. It's better to have only simple goal for each scenario (e.g. gather 100 food, train 10 citizen soldiers and build 1 barracks, etc). The rest of the time can be filled with explanation or history. This is where story/narrative plays a part, i.e to make simple tutorial less boring.

    2. Make the goal specific and the solution general. Do not rely on triggers to goad player into completing a goal in a specific way. I've seen a countless tutorials where I have to walk to certain spot before the next step, and then the next order never came. It was bugged. Tutorials relied on scripts so use it wisely as little as possible.

    3. Reveal the features slowly. It also means hide features that are not yet needed in the scenario. If the goal of the scenario is to build farmsteads only, then ensure all units can only build farmsteads, hide other buildings from UI.

    I'm really looking forward to 0AD tutorial campaign :)

  12. 10 hours ago, thankforpieOfficial said:

    make it possible for soldiers to marry women and make babies that later can level up and become heroes

    LOL this cracks me up.

    On a more serious note, in StarCraft series, Archons can be made by selecting two High Templars and with enough resources, essentially merged them into one Archon unit.

    If we have mechanism where builder can be deleted after building completed, we can implement this.

  13. I was surfing the web, trying to find some free 3D models for my mod when I found this site:

    https://www.smk.dk/article/digitale-afstoebninger/

    The site is in Danish, so I have to use Google Translate. So SMK (Gallery Museum of Denmark) 3D-scanned some of their collection and released the 3D models free of charge (CC0). We still need to reduce polygon and paint it, I guess (I'm not skilled in 3D modeling). It's okay to use Public Domain object for 0 A.D, right?

     

    • Like 1
    • Thanks 2
×
×
  • Create New...