Jump to content

azayrahmad

Community Members
  • Posts

    270
  • Joined

  • Last visited

Everything posted by azayrahmad

  1. Lol yes. In general making Civic Center as a dropsite doesn't make sense logically, especially in the game where player has enough starting resources to build a separate dropsite closer to said resources. I mean, civic center is an administrative building, we recruit worker here, not dropping raw meat. I believe this is only a leftover from AoEII where 0 A.D got a lot of inspirations from. Although yes I also would like to know pro player opinions about this.
  2. So the trick is to build more houses in advance as close to Civic Center as possible as investment, and build market first thing after town upgrade. It is intended for village phase to take a little longer though, because I planned to make more things to do in village phase. Let me know if you have new ideas. Oh and if you haven't, check out Hyrule Conquest mod, as it pushed 0 A.D. engine to its limit with very advanced territory mechanics.
  3. My mod has similar implementation on auras. Although I spread different auras into different buildings, with many of your mentioned effects are assigned to houses, and also some negative effects to build house beside dropsite and military buildings. The result of this is quite closer to your vision, with ideal city have Civic Center surrounded by houses and civilian buildings, with economy buildings like farms and military buildings spread on territory borders. Another planned modification in my mod that might be of interest is that Civic Center should change name and functions on phase upgrade as in village center to town and city center later. After upgrading to Town Phase forward you should not be able to use Civic Centers as dropsite anymore, as at this point you should already have all dropsite buildings to use instead. The caveat of this is that one aura assigned to a building can only have a set of effects that affect a set of entities. Every aura is also listed in building description, with its range displayed and every affected entity have floating icon if aura source is selected. As @wowgetoffyourcellphone and @sphyrth have said, if you put various auras to a building, this will cause a clutter of aura range visualizations, floating icons, and building description. In my mod I tried to make all aura mod visual as subtle as possible by thinning range lines and smaller icons, but overall they are still look cluttered.
  4. A belated update. City Building Mod has been updated with Coin resources from Phase II. Not all of Phase II plans are completed, hopefully can be finished soon. Coin resource and how it works might sound familiar for those who played great mods like Delenda Est or especially 0abc where this mod takes a lot of inspirations from. I promised I would give it a different spin so here they are, Update 0.2.0: Coin resource added. It is meant to be a measure of prosperity of your city. All buildings consume Coin (negative trickle), except houses and markets/tavern. This is to simulate salary. Houses and markets generate Coin instead, to simulate taxation. Houses pay different amount of taxes depending on location desirability. House beside a barrack pay less tax than house beside a wonder. Units consume Food. Cavalry consume twice as much, and Elephants consume five times human food portions. Stable and kennels consume food as well Building consume Wood to simulate maintenance, as wood is degradable. Bigger building consume more wood. Some technologies also cost Coins where it makes sense. Phasing up always use coins. Mercenaries, Champions, and Heroes cost significant amount of coins, and mercenaries also consume Coins periodically. All resources can only be reduced to zero, but Coins can go negative to simulate government debts. etc. As usual, if you're interested to try the mod it is available on Mod.io and GitHub. Challenges faced on Phase II are these: Resource Cap: It's still a mystery to me. I thought I could just mimic Population Cap behaviour, but turns out it's very difficult. Not only Cost.js and Player.js has to be modified, it seems GuiInterface.js should also be changed, and I still don't understand this file. Victory Condition: Still figuring out how to trigger based on amount resources collected. My dream would be an option in Game Type before battle that says "Economic Victory" and the goal is to be the first to reach 50,000 Coins. Secondary resources: This should be implemented alongside resource cap. Also my concern is that this is going to make unnecessary microes. Therefore I shall postpone this until later. I'd probably dabble around Phase III meanwhile. Phase III is overhaul for Citizens to make it more interesting. Some of the main ideas I'd like to explore in this phase is to introduce a unit called Leader. A hero type unit that will be available since the beginning, replacing current cavalry. Leader is meant to be player avatar thus bestowed with advanced capabilities and aura which could be upgraded like in RPG games. I also would like to explore the possibilities of militia as starting units, which can be promoted to regular soldiers later. Thanks for reading!
  5. This is a great idea! Although in my opinion the unit icon picture should have already conveyed its type. I think weapon type is the one that is often hard to infer from unit icon only.
  6. Yeah that might work even better! Although what happen when the attack strength reaches zero? Would they still be able to attack but causing zero damage? Of course it's possible to put a cap on minimum attack strength somewhere in Component code.
  7. Of course lol, I just want to show the efficiency of weapon icon there for inspiration.
  8. About the icons, my absolute favorite is unit cards from Rome II Total War: It has 'ancient pottery' aesthetic I like and the mini icons on top can tell much about the unit in so little space. Although in 0 A.D unit icons are half Total War's size, so hopefully you can still make them visible in such little space.
  9. I personally find 'slowly losing health' is a weird abstraction. AoE3 does this to simulate the temporary nature of militia. But since we have XP, what about slowly losing XP? Militias train fast but with lower attack and defense, and also decreasing XP over time. So if they constantly fighting they would be promoted to regular soldiers. Otherwise they can keep their low health and useful only for defending or put in garrison. Heck, how about making all citizen soldiers like this too? Not sure about game performance issue or overall gameplay mechanic change though. I'll probably put this in my future mods.
  10. One should also account for how trees will affect building layout. Walls like any other buildings cannot be placed on trees, but units can pass through trees (unlike AoE where you can use forest as your walls). Sometimes you might play in a random map, and somehow the starting position is in the middle of forest. How quick can you clear the land to place houses and barracks? This should be put into consideration.
  11. Overseer. Since this aura seems like the policemen overseeing gathering activities (like foremen). Oh, or Foremen!
  12. I don't play multiplayer often, but while this probably work on teams vs teams, I imagine if I play Macedonian 1v1 I'm pretty sure the opponent would choose Roman, and then I'd change it to other faction that counters Roman... Shouldn't there be any other buff to balance it? Like -5% attack but +5% defense or something? This sounds like a cheap way to balance factions.
  13. A little update about Phase II As I have finished patching the Phase I for both Alpha 23 and Alpha 24 (available on Mod.io) it's time for me to continue to Phase II: Economy. In this phase I attempt to make extensive change to the way economy is handled in 0 A.D. to make it more resemble city builder games, namely Impression city builders like Caesar, Pharaoh, and Zeus, and also taking some inspiration from castle builder games like Stronghold. I'm still in the research part of the process, and really overwhelmed by the code, as I'm not too familiar with Javascript. So any programmer who wishes to help is very much appreciated. So here's a list of things I want to accomplish in this mod, and the status of their progression: Money resource: A new resource that cannot be gathered, but instead trickled. House and Markets will trickle money over time, which can be used to train units and construct buildings. There are many mod projects that are already implemented this modification, some of my favorites are 0abc and also Delenda Est, so I plan to add some of my own twist to it. Trickle rate is based on location desirability of each house, with ruleset already established in Phase I to make city planning has a more tangible reward. Status: Largely finished, still tweaking the trickle rate. Also have to merge with Phase I completely before adding other changes. Adding features from other mods like tax adjustment etc (if permitted). Secondary Resources: New secondary resources that can be produced using primary resources. Like Weapon made from wood and metal, Horses from food, etc. In city building games they usually have different building for making different weapon and there will be automated NPCs bringing wood to the fletcher and another to bring the finished bows to armory. The way to do it is probably by trickling Weapon periodically while also negative trickle on wood and metal. And also having citizens tasked to 'gather' weapon from blacksmith and drop it at barracks. Status: Not sure if it's going to be enjoyable. Perhaps a refinement of the idea could help. I'm also not sure how to stop trickling if the primary resources goes to zero. Victory Condition: As with city-building tradition, several new victory conditions are planned to be added as options. Population Victory (first faction to reach 500 population), Economic Victory (reach 10000 money), etc. Status: Still an idea, but peeking through code seems like it could be done. Resource Cap: Just like population, I'd like to make resources have limit too. Every dropsite will increase the resource cap just like house to population. For example a Farmstead could only accept 500 food, so if it reaches 500 then all available food dropsite will stop functioning until a new one is built. Status: Learning the code. It seems very complex as there seems to be many files that have to be changed. Hopefully I can do it. Any programmer out there that have experience in handling resource and population Javascript, I need your help. So the most realistic part of this plan is probably the money resource and victory condition. I hope I have enough time to learn while my day job is not too hectic recently (it might change soon though). Thanks for reading!
  14. Hi @Alexandermb! I 've just updated the mod to have AI know how to use this mod along with several other updates. Download it here at GitHub. Let me know whether the AI match is challenging enough. Thank you.
  15. Hi @Trinketos! After studying the code and consulted with @Freagarach on this thread I finally found out the reason why field is always built near the civic center and not houses. It's indeed in queueplanBuilding.js, specifically lines 220-227. To ensure AI do not clear area near Civ Center and plot Field change line 221 to if (struct.resourceDropsiteTypes() && struct.resourceDropsiteTypes().indexOf("food") != -1 && !ent.hasClass("Civic")) It will clear plot surrounding Farmstead but not Civ Center. Also a couple of lines below that you'll want to ensure Farmstead can be built on territory border, because currently AI prevents this. Remove line 249-258. I applied these changes to my mod and now farms are always built by AI in countryside.
  16. This is a great idea and I hope it could be implemented soon! By assigning citizen to the market vendors do you mean the citizen would be a customer or seller? If seller I imagine it would work with garrisonable market? Every garrisoned unit would be visible, like this visible garrisoned units in 0abc but on market stalls instead, and for every garrisoned unit in the market, resource trickle is increased. It's similar to how University work in Rise of Nations, but instead of Scholars and Knowledge resource, it's Seller and Coin. Since these assigned units would spend their time below vendor tents, I think existing idle animation is enough. If the citizen acts as customer and gathering coins by interacting with the vendor then yeah perhaps new animation is needed. Although if it is possible to make the citizen walk inside the tent then we can assume she's gathering coins without having to actually make new animation.
  17. Hi there! Have you been playing other RTS games before? Or any similar games? 0 A.D. has an AI that can be a bit tricky. But if you are interested in how the AI works, try to set up a match with both AIs, pitting them against each other. Watch what they do with starting units. Note what they build and train and when, when do they upgrade things, when do they attack. You can see that the AI does not cheat (unless on higher than Medium, they received extra resource I think). They are not very fast, but they are consistent. They never stop exploring. The units are never idle, always working on something, always building or gathering something. The buildings never stop pumping out units, but they research only when they have extra resources. They build markets and trade, exchanging resources when they low on something. You can see later that these are an obvious thing to do, but hard to do right. If you feel even the Very Easy AI is still hard for you, just use Sandbox mode. This is the easiest one, since the AI enemy don't attack and expand, so you can play in peace. This is the chance to practice what you've learned before. Try to set targets like create 50 soldiers, or reach City phase. Then try to do it quick. After that, if you already feel confident, try the Very Easy enemy again. I admit that I'm not a competitive player, just a fellow RTS game enthusiast that loves building things up and imagining what it feels like to be an ancient general. I know the shock of being steamrolled by AI on my first 0 A.D. game a decade ago. It sucked, but it piqued my interest. How could this lowly robot destroyed me. That's how I learned to be better and enjoy the game more. So, keep practicing and good luck on defeating the AI!
  18. So that's what those mean. I somehow thought addInfluence will add some kind of influence score, so the higher XX is the closer they are, but turns out I was wrong. Anyway, I found out why the first house is never placed near to civ center. It's placed just a couple of lines away (line 220-227): let struct = m.getBuiltEntity(gameState, ent); if (struct.resourceDropsiteTypes() && struct.resourceDropsiteTypes().indexOf("food") != -1) { if (template.hasClass("Field") || template.hasClass("Corral")) placement.addInfluence(x, z, 80/cellSize, 50); else // If this is not a field add a negative influence because we want to leave this area for fields placement.addInfluence(x, z, 80/cellSize, -20); } Petra deliberately emptying the area around any food dropsite (including Civ Center) to make fields later. Excluding civ center for this condition will ensure that the area near Civ Center can be occupied by any building. Thanks for helping! Now that's a good work ethic. I myself rather focus on problem solving and let the computer to do spellcheck for me lol. I just found out in trac wiki that Eclipse IDE is recommended, so I'm going to try using it. But if you have any other recommendation let me know. Thank you.
  19. OMG I'm sorry I mean left side, it should have been on the left side. Here's the Civ Emblem in your mod on the right side Here's the Civ emblem when you click the button, on the left side I suggested moving it to the left side for consistency sake. But I admit this was nitpicking. Also there's heroes icons on that corner. I mean the Build icons, the icons that shows what kind of buildings can be built when you select a unit, or what kind of unit/technology can be trained if you select a building. Here is a comparison of original vs 0abc Gauls Civ Center Perhaps it's only my 1366x768 monitor, but I have a hard time distinguishing unit icons without tooltip. I can make out the swordsman because of the shield, but the other four is indistinguishable. This is my impression too. As I am always too slow for Petra bot and thus get rushed when unprepared all the time, I feel this mod is more in tune with my pace. You are correct. But tax is still raised from people. What I was trying to say is that tax revenue is based on population and not territory, which is why i asked about your decision to trickle money from civic center. But then I realized that in 0abc building a new civic center require certain amount of houses so it's the same purpose but different approach. Yes but the unique thing about money is that it can also be counted, because each coin is supposed to have the same weight. Although I imagine as a city governor counting an entire city's tax is a hassle and it's easier to put in on a scale. I have played another game since I posted so it was replaced with newer log, because there's another bug that triggered error message after I destroy an enemy building of a Roman faction. I attached the interestinglog here, it's quite big. The gist is that there's this error simulation/ai/petra/garrisonManager.js line 199 TypeError: this.numberOfGarrisonedUnits is not a function and this WARNING: PlayerID 2 | Petra error in incrementBuilderCounters for structures/rome/xxxx with count < 0 is repeated numerous times with xxxx being structure names (centre, house, field, etc). I mean that in 0abc on negative food the citizen cannot build anything, including farmstead and field. But they are still able to gather food, even from a location far from base. So I made a funny interpretation about this event that the citizens refuse to build things out of pettiness, and in the end they have to walk longer because they still need food. On the other topic, in my Ptolemy play I found out that Stable can be built in Village phase, but all the cavalry units are only available in either Town or City phase. All technologies are also still disabled, except one that upgrade cavalry, which will benefit exactly one starting cavalry guy. I wonder if this is intentional for some reason. Thank you. interestinglog.html
  20. Hi, sorry to bother you again. Do you mean to remove this line (213)? if (!HQ.requireHouses || !template.hasClass("House")) I tried that and still the code won't pass the code block I posted previously. And how do you mean by increasing radius can prevent AI to build first house too far away? I'm not sure I understand how addInfluence and findBestTile work. On a different topic, how do you usually do scripting on 0 AD? Do you use text editor or an IDE? Thank you.
  21. Hi @Nescio! This is a great mod. It feels like a whole new game. Some features like garrisonable units on wall should be in the core game. I'm working on a mod that tries to emulate city building mechanics in 0 A.D, and a lot of my ideas turned out already implemented by you. I think I'm going to learn much from your code. Anyway here's my two cents: GUI is amazing, now when I open vanilla 0 A.D. it feels cluttered. However may I suggest to move the Civ emblem to the right side? When you click the emblem it will open Structure Tree, where the emblem is placed on the right side. I always find 0 A.D build icons are too big. And I like the new size you set. But since you made changes to the icons using full bodied picture instead of half bodied icons like vanilla, they seem too small in my laptop that I have to rely on tooltips. I see that in the beginning the only source of silver is Civic Center, while all units cost silver to train. What's the design decision behind this? I guess this is either to prevent early rush, or to force player to sell other resource to get silver. In my mod I'm implementing similar change with money resource, although I make houses and markets trickle money, since in real life taxes are paid by citizens and business. This ends up making money abundant and AI started buying everything with money since they are too lazy to gather. Oh and also I still getting error when selecting Gaia Mercenary Camp. I don't know why. One anecdote: In one of my games I forgot to find more food, causing food to be negative. Then my scout found an apple tree at the edge of my territory border. I asked them to build farmstead near the tree so they can eat fast. but turns out these guys would rather walk all the way to Civ Center just to piss me off than build something for their own good. It's funny how petty some citizen can be.
  22. Hi @Freagarach! Thanks for answering. I believe you refer to this particular part of code: else if (template.hasClass("House")) { if (ent.hasClass("House")) { placement.addInfluence(x, z, 60/cellSize, 40); // houses are close to other houses alreadyHasHouses = true; } else if (!ent.hasClass("StoneWall") || ent.hasClass("Gates")) placement.addInfluence(x, z, 60/cellSize, -40); // and further away from other stuffs } I assume this code means that when AI want to build a house, if it sees existing house it will move closer but if it sees walls and gates it will back off. This is my first suspicion too. I tried to change it to make AI build near Civ Center as well. else if (template.hasClass("House")) { if (ent.hasClass("House") || ent.hasClass("CivCentre")) { placement.addInfluence(x, z, 60/cellSize, 40); // houses are close to other houses alreadyHasHouses = true; } else if (!ent.hasClass("StoneWall") || ent.hasClass("Gates")) placement.addInfluence(x, z, 60/cellSize, -40); // and further away from other stuffs } It presumably makes AI build a house near Civ Center, but during testing, the first house is always far away, sometimes in Acropolis it will build house on the foot of the hill. I also modified addInfluence value from 40 to 200 to even 1000 and nothing's changed. I'm at my wits end on this particular code. Hopefully you can enlighten me. Thank you.
  23. So there is no choice but to destroy walls? Wouldn't this makes the enemy can't be defeated unless you destroy all walls?
  24. Hi, I'd like to modify Petra bot to make the first AI house to be built within Civic Center range. I think the code to manage it is in this part in queueplanBuilding, but it seems to have no impact on the game. Here's the code: if (template.hasClass("House") && !alreadyHasHouses) { // try to get some space to place several houses first bestTile = placement.findBestTile(3*radius, obstructions); if (!bestTile.val) bestTile = undefined; } I tried modifying the radius multiplier to 6, 2, even 0.5 but it seems that they always end up building it outside of CC's perimeter, sometimes even at the edge of territory. I tried to find findBestTile code but to no avail. I believe findBestTile prevents any building to be built inside CC's range. Does anyone might know about this findBestTile script? Thank you.
×
×
  • Create New...