Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 2014-03-27 in all areas

  1. I've commited in svn a new ai bot (Petra) which was developped starting from Aegis, but heavily modifying it with the goal to be more robust according to external conditions.This is only a first version, so still very WIP. Nonetheless, any tests and constructive comments are welcome.
    1 point
  2. Was in need to query the templates more often than acceptable and code got littered with ifs, switches and very long condition lines. So I've spend my bot a triple store and its own query language. This is how it loads: : reading 1188 templates : 65/1188 nodes for athen : 139/1188 nodes for gaia : ignored: Brit(1), brit(59), cart(84), celt(69), gaul(55), hele(93), ..... : loaded 0/0 nodes from Hannibal.Data.RootNodes : created 79/ 79 nodes for classes : created 41/ 41 nodes for technologies : created 14/ 14 nodes for resources : created 4/ 4 nodes for resourcetypes : created 613 edges on member (entities membering classes) : created 613 edges on contain (classes contain entities) : created 111 edges on provide (entities providing resources) : created 165 edges on gather (entities gathering resources) : created 274 edges on build (entities build entities) : created 26 edges on train (entities train entities) : created 46 edges on hold (entities holding class) : created 3 edges on heal (healer heal classes) : created 39 edges on research (entity researches technology) : created 57 edges on require (entities require technology) : created 57 edges on enable (technology enables entities) : created 12 edges on accept (entities accepting resourcetype (dropsites)) : created 156 edges on carry (entities carrying resourcetype (ships, trader, gatherer)) : have 2 civs, 13 verbs, 342 nodes, 2172 edges: : have [accept, build, carry, contain, enable, gather, heal, hold, member, provide, require, research, train]The database has nodes and edges, edges represent a verb and have a direction. Nodes have a unique name. So you start a query with some nodes. Here are a few sessions, 'i' denotes the query (a plain string), 'o:' the parse tree and R a result line: Parser: i 'healer, hero' : o: ["healer, hero"] Q: executed: msecs: 0, records: 2 R: node: healer R: node: heroQueries always return nodes and obviously two classes return two class nodes Parser: i 'healer, hero CONTAIN' : o: ["healer, hero",["CONTAIN"]] Q: executed: msecs: 0, records: 6 R: node: units.athen.support.healer.a R: node: units.athen.support.healer.b R: node: units.athen.support.healer.e R: node: units.athen.hero.iphicrates R: node: units.athen.hero.pericles R: node: units.athen.hero.themistoclesHere I added a verb after and now the query has a direction, it points from classes to entities. All verbs are keywords and uppercase. LIMIT, SORT, RAND, WITH are keywords too. Parser: i 'infantry, hero CONTAIN SORT > costs.metal' : o: ["infantry, hero",["CONTAIN"],["SORT","> costs.metal"]] Q: executed: msecs: 3, records: 21 R: node: units.athen.hero.pericles, metal: 200 R: node: units.athen.hero.themistocles, metal: 200 R: node: units.athen.hero.pericles, metal: 200 R: node: units.athen.hero.themistocles, metal: 200 R: node: units.athen.champion.infantry, metal: 80 R: node: units.athen.champion.marine, metal: 80 R: node: units.athen.champion.ranged, metal: 50 R: node: units.athen.infantry.archer.a, metal: 50 R: node: units.athen.infantry.archer.b, metal: 50 R: node: units.athen.infantry.archer.e, metal: 50 R: node: units.athen.infantry.javelinist.a, metal: 50 R: node: units.athen.infantry.javelinist.b, metal: 50 R: node: units.athen.infantry.javelinist.e, metal: 50 R: node: units.athen.hero.iphicrates, metal: 0 R: node: units.athen.infantry.slinger.a, metal: 0 R: node: units.athen.infantry.slinger.b, metal: 0 R: node: units.athen.infantry.slinger.e, metal: 0 R: node: units.athen.infantry.spearman.a, metal: 0 R: node: units.athen.infantry.spearman.b, metal: 0 R: node: units.athen.infantry.spearman.e, metal: 0 R: node: units.athen.hero.iphicrates, metal: 0The syntax is simple, it starts either with nodes or a verb clause. Then you may put one verb clause after another verb clause to traverse the mesh. [ nodes | VERB [prop [, prop, [...]]] [WITH prop op value [, prop op value, [...]]] [SORT op prop [, op prop, [...]]] [LIMIT value] [RAND value] [VERB [...]]]The idea is the DB represents the involved civilisations, it's a knowledge base of their capabilities. Who can do what, what does it cost and how long does it take. Next step is to retrieve not only templates but real game units, buildings, etc. and in the far future queries written in SPARQL. Currently the code is not optimized and I don't know what happens when 8 bots load their own triple store each with 8 civilisations. You start the whole thing like this: civs = new Hannibal.Civilisations(this, ["athen", "gaia"], this.settings.templates);HCQ = Hannibal.Civilisations.Queryquery = new HCQ(civs , "infantry, hero CONTAIN SORT > costs.metal");nodes = query.execute();Code (still hot, but working) is attached, comments welcome! querylanguage.zip
    1 point
  3. do not worry gameboy, nobody underestimates the importance of saved games.
    1 point
  4. I have a kinect at home. But before doing anything like this, you wanna make sure we will not try to fix skeletons.
    1 point
  5. What do you mean ? A tavern : this building is missing too. Should be added to the art Mod list. I'm also wanting to add props that only appears when units are garisonned. And to add a blacksmith to the forge. I'll try to make the animation in blender once everything is fixed therE. Could you elaborate on this ?
    1 point
  6. Philip is still around. So you can still ask him questions (though he's not very active on the forums, mostly on IRC). But as he has a different job now, his time is limited, and he can't do big features.
    1 point
  7. Yes, he is! What's my first order of business? Whatever happened to Atenmeses, by the way?
    1 point
  8. RedFox has put some efforts in, no doubt. Though the megapatch might not have been seen as a trouble first, but we learn. What really concerns me is if Philip is still around ... many rather difficult files I came across seem to be written by him .. even in the heart of the engine.
    1 point
  9. I am back again now with article reviews. Currently I intend to point out problems with the current articles to show the needs and hope to with time adjust them. For the moment I have looked into the Athenian articles. History Articles Still Needed Athens:Prodomos: Too generalTrireme: Too longLithobolos: Simply explains the mechanics. Compare to Oxybeles.Epibates Marine: No ArticleThemistocles: Alter "whom" to "who" in first sentence. Further alterations could be done to improve this.Pericles: Too short. An article was written by me that should fix that.Iphicrates: No articleOikos: Too general for Athenians.Agros: Olive growing is a form of agriculture.Apotheke: Too self explanatoryOutpost: Again too self-explanatory and not relevantPalisade: Self-explanatoryLimen: Focus more on AthensKhalkeion: Does not specifically inform about the metallurgy in AthensPyrgos: Self-explanatoryPylai: "pierced" is not a very good description in the first sentence. Perhaps "dotted?"Theatron: Refer to the theaters as Athenian, not Greek.Parthenon: No articleSilver Owls: Refer to the coin as "obol," the proper title.Iphicratean Reforms: No article
    1 point
  10. Improve your Chinese http://casperise.com:81/casper/cocosino/raw/8532c58fddd659e2dc4f757dd656ee704cd3fb67/cocos2dx/scripting/javascript/bindings/ScriptingCore.cpp
    1 point
  11. Ah, you sum up the ideas very good. I agree that in everything the team will make, it's better for all to be flexible rather than hard-coded. That way, people can modify these values as they see fit, when doing their own mod or just messing around with the variables. Let me add on the mercenaries - if a map will have infinite mercenaries, then in time, there should be a sort - of either an assimilation of cultures or total rebellion/ defeat of the culture who hired the mercenaries (something akin to what happened with the Late Western Roman Empire). On overreproduction, may I suggest though that the children spawning be tied up to a certain number of houses so that if like, 20 houses are reached with 20 children, no more children is spawned. Something like that.
    1 point
  12. Kimball will be happy if he sees it. Thanks for the details. This should give RoTE a boost.
    1 point
  13. Salute. Thanks. Enrique. Completed walk, run, death 01, death 02, idle 01, idle 02, attack 01. Some work left with attack 02. Do I need to post images for review before uploading daes? RoekeloosNL. I changed it a bit. WhiteTreePaladin. I'll upload .blend files for finished animations. Lapuente. No, it isn't. It's still work in progress.
    1 point
  14. There are some bug fixes, however: Collada Fix T38366: Export collada crash - if you set a keyframe (bb83bdf)Fix T32843: Collada Spotlight angle animation is in radians not degrees (d291d15)Fix T38847: Reject reuse of child bones as root bones. That doesn't make sense anyways (3111f08)
    1 point
  15. I've given a look at the code. Seems like you mostly took it where I wanted but never did and fixed quite a few of the style/redundancies. I'm liking where this is going. Now I should try this in-game, but I can't see why it'd be way less efficient.
    1 point
  16. An AI that trades! Got the same error as gameboy posted above. commands.txt attached (r14867). ERROR: FinishOrder called for entity 8028 (units/ptol_support_trader) when order queue is empty ()@simulation/components/UnitAI.js:3411 ()@simulation/components/UnitAI.js:5117 (7592,7840,"APPROACHINGSECONDMARKET")@simulation/components/UnitAI.js:5106 ([object Object])@simulation/components/UnitAI.js:2518 ([object Object],[object Object])@simulation/helpers/FSM.js:274 ([object Object])@simulation/components/UnitAI.js:3757commands.txt
    1 point
  17. Yes: https://github.com/cocos2d/cocos-docs/blob/master/manual/framework/native/scripting/javascript/js-remote-debugger/en.md
    1 point
  18. 1) yes, the goal is to remove all the time based events. But that's not finished yet. 2) for the time being, I think an alternative bot with a different logic should add more variety to the games. How that will evolve in the future, we will see : I believe the default bot should have a decent naval support, and we are not yet there for the moment.
    1 point
  19. I guess this can be done without much performance issues indeed. But before we'd need to have "knockdown" animations (and maybe even "fly" animations if units are to be thrown through the air) as well as a system to handle this (I still don't see why it would be that resource intensive). I think at least knockdown is planned (not sure). The animations would be still a lot of work.
    1 point
  20. In my opinion PBR is not very suitable for a RTS (in 0AD's case at least because the whole shading system would need to be rewritten too) where you play with a zoomed out camera and mostly small objects. It makes sense for FPS or 3rd person shooters where the point of view is much closer to objects and there's room for more detail in assets. You'll also need to create additional maps for each single texture (albedo map, cavity map, reflectivity map... etc) in order to the shader to work properly and show it as nice as the screenshots in the links you added. All this without mentioning the computer resources it would need to run. 0AD has room to improve with additions like atmospheric scattering, overall lighting improvements, proper horizon/sky, options to increase/decrease shadow resolution, and *hopefully* deferred lighting which would make possible things like moving cloud shadows, infinite lighting sources (torches, flaming arrows, fire emmiting light), wheather changes, day/night cycle... well, dreaming is free right?
    1 point
  21. Building: Archaic term for Han period buildings are hard to come by, so this is a WIP: House: Was classified into 'lǘ lǐ' (闾里) during Han Dynasty, which is 6-25 housing unit. The term for the building itself can be called 'Ming Zhai' (民宅). Market : 'Shi' (市). Corral: ‘Shou Quan’ (獸圈) is correct. Palace: 'Gong Dian' (宮殿). City Wall:'Yong' (墉) is correct but rarely used. "Cheng Qiang" (城牆) is a more common (modern) term. ”Cheng Yuan"(城垣)sounds more archaic. Watch Tower: 'Wang Lou' (望樓) Defense Tower:'Jian Lou' (箭樓 meaning arrow tower)
    1 point
  22. I've read the Team Design Document, the Scion really did a superb job in researching the history and culture of Han Dynasty. There's however some inaccuracy in the nomenclature of various Rise of the East unit. Some term are too 'modern' and did not exists back then. Dao Fu Shou (刀斧手): Could be Jian Dun Bing (劍盾兵)meaning sword-and-shield infantry. The 'Fu (斧)' means axe, which were rarely used by the Han soldier. Chang Mao Bing (長矛兵) is fine as it is, but Ji Halberd is more common in the records. So Chang Ji Bing(长戟兵). Common polearms of this period is Mao (矛, spear), Ji (戟, Halberd), Pi (铍), and Sha (铩). *Ge(戈) is no longer commonly used. Nu Shou: 'Nu (弩)’ means crossbow, so this unit shouldn't be using composite bow. I still think the bowmen and crossbowmen should be separated into two distinct units, which will be Nu Shou (弩手, crossbowman) and Gong Shou (弓手, bowman) respectively. OR it could be called Gong Nu Shou (弓弩手), which denotes archer but could use either bow or crossbow. *The Chinese were not great archer as they were from an agrarian culture. They employ lot and lots and LOTS of crossbow to make up for this, though. Tu Qi (突騎) is fine as it is. Note that there's an elite cavalry unit in the Han army called You Zhou Tu Qi (幽州突騎, which mean 'Cavalry from Youzhou'). Nu Qi (弩騎) is okay. The Han Dynasty certainly make use of Crossbow cavalry, but not as common as horse archer 'Gong Qi' (弓騎). Kinda difficult to reload a crossbow on a galloping horse. Shang Ren (商人): Is okay, but could be called 'Xing Shang' (行商) as well, meaning 'Roving Merchant'. Nv (女): Could be 'Nv Ren' (女人) or 'Nv Zi' (女子), meaning woman. Could also be called 'Ming Nv' (民女), meaning female civilian. Ru (儒): Should be 'Ru Sheng' (儒生) or 'Ru Shi' (儒士), meaning Confucian scholar. *The Chinese are always a secular culture, and their Confucian scholar does not generally perform miracles or healing. The 'mythical healing' shtick were performed by Fang Shi '方士' which is shaman, alchemist, doctor and Feng Shui rolled into one. Of course, only their medicine sort of worked. The Fang Shi gradually turned into the religious Taoist and the secular herbalist. Shang Chuan (商船) and Yu Chuan (漁船) is fine. Zhuang Chuan (撞船): No such thing existed, because it means 'Ship Accident'. The Chinese warship which use ramming attack is called ’Meng Chong‘ (艨艟). Lou Chuan (樓船) is good. Xiao Fang Chuan (消防船): Xiao Fang (消防) actually means 'Firefighting' , which is the complete opposite of what this warship is suppose to do. Correct term for a kamikaze fire ship is 'Huo Chuan' (火船). *Fire ship was first used during The Battle of Red Clift, which *MIGHT* be too late for the intended time-frame. **Other lesser conventional warship to consider are "Ge Chuan" (戈船)for Western Han or “Dou Jian” (鬥艦) for Eastern Han. Tan She Qi (彈射器): This term is modern and thus incorrect. A stone catapult is simply called 'Pao' (砲) or 'Pao Che' (砲車). A more specific term is 'Pi Li Che' (霹靂車, Thundering cart), which were developed during the Three Kingdoms period. *While Stone thrower were used before, the Han Dynasty army does not seems to use it at all, at least not until the Three Kingdoms period. Nu Pao (弩砲): Giant crossbow that shoots spear-sized bolt should be called 'Chuang Nu' (床弩). Mobile version mounted on cart is called 'Nu Che' (弩車). *Note that the Chinese also employ battering ram, which is called 'Chong Che' (衝車), as well as War Wagon ‘Wu Gang Che' (武剛車), and light chariot 'Qing Che' (輕車). **Also note that during the Han Dynasty, the main adversary of the Chinese were the nomadic Xiong Nu , which did not settle in one place nor build fortification. With enemies like this, there's no need for advanced siege engine. While siege engine existed before and during Han Dynasty, it did not see much use, and most textual records simply skim over the details such as construction, material, etc. My best guess for Han siege engine are simple traction trebuchet for their stone-thrower and giant crossbow for their arcuballista/bolt shooter. The giant crossbow is mounted on a three-wheel cart. (As mentioned in the writings of Mo Tzu). Hero character I would like to recommend are Huo Qu Bing (霍去病, cavalry-booster) and 'Li Ling' (李陵, archer-booster). I would also like to recommend the aforementioned Eastern Han 'You Zhou Tu Qi' (幽州突騎) and 'Ji Zhou Qiang Nu'(冀州强弩, Strong Crossbow from Ji Zhou), which were crossbowmen, as champion unit. There are also 'Jue Zhang Shi' (蹶张士), elite crossbowman which is heavily armored, and carries a sword and shield on top of his crossbow. The 'Jing Chu Yong Shi' (荆楚勇士, The Braves from Jing Chu), which were (probably) similarly armed as the Jue Zhang Shi,but also used Ji Halberd. Of course, Yu Ling Gu Er (羽林孤兒)the Qi Men (期门) and Yong Gan Shi (勇敢士), etc are good too. More on Chinese buildings later.
    1 point
  23. Hello, this is my first post here, so if I broke any forum rules, please bare with me. If I make any mistake, kindly point out to me and I will try to fix it. Some, uhh, suggestions on the Han army, I guess. Mostly historical stuff, which I think y'all already know. But I will voice it nontheless. 1) Han army, for the most part, still rely on leather armor for defense. The leather is lacquered, so it has a black appearance. Iron armor did exists, but generally reserved for high ranking officers. 2) Base on the evidence of the Han period terracotta, Han soldier can be divided into three class - light/unarmored infantry, medium infantry with only a sleeveless cuirass, and heavy infantry with sleeved armour and full helm. Greaves and other limb defense are uncommon. Same applies for cavalries. 3) The jian sword was commonly used by Chinese swordsmen during the early Han, but quickly superseded by the Huan Shou Dao (環首刀/环手刀) , a straight, single-edged dao with a ring-pommel. BTW, early Han still use some bronze weapon. 4) The ge (戈) dagger-axe were not really used by the Han Chinese anymore, being mostly replaced by the Ji (戟) halberd. Shorter, one handed version of the Ji also exists, used by the swordsman. 5) Chinese polearms include Ji halberd, mao (矛) spear, pi (铍) also spear, but with a longer blade for slashing attack, and sha (铩). 5) While Chinese are famous for their Chu Ko Nu or repeating crossbow, it is a niche weapon at best. Good ol' single shot crossbow are more commonplace. Single shot crossbow are called Qiang Nu (強弩). Stronger infantry variant was called Jue Zhang Nu (蹶张弩), which must be drawn with the aid of your leg. Cavalry use smaller hand crossbow (Shou Nu/ 手弩) instead. The Han archers were predominantly crossbowmen. In one of the Han Dynasty armament records (《武库永始四年兵车器集簿》), there were 520000 crossbows in the arsenal, but only 70000 bows. 6) Han Chinese still employ chariot in limited numbers. More common was the Wu Gang Che (武鋼車/武钢车) war wagon. The Wu Gang Che formed into wagon fort to defend against enemy cavalry. The wagon were brimmed with spears on all sides, as well as firing ports for crossbowmen. Something like a mobile arrow tower. 7) Han Chinese invented papermaking as well as blast furnace. Steel weapon were quite common but not enough to equip entire army with (Obviously). Roman also used steel in their armors so this isn't really something unique. 8) Han Chinese did not use horse armor until the very end of the Dynasty (Three Kingdoms Period). So no Chinese cataphract, sadly. 9) There are no intact Eastern Han armor survived through the ages. Plenty survived from the Western Han period, however. From what little info I could recall, Eastern Han armor improved from the Western Han armor with armored collar, groin guard and thigh guard components. 10) Han period Chinese used two different type of shields. Aside from the normal sized shield, they also used a metal buckler called Gou Xiang (钩镶). The Gou Xiang is too small to block arrows, but quite useful in parrying melee attack.
    1 point
  24. Salute. I tried to use the information provided by Wijitmaker to make a new run animation (by the way thanks for this information, Wijitmaker). I'm sorry that it looks a bit ugly, but it shows the idea: I would like to ask for advice. Should I work with this, or just make previous one smooth and less robotic?
    1 point
  25. Ah, I forgot ... this might be normal because of the not-fitting animation? We have a pipeline! That means if you remember how brilliantly you got to this .dae ,if we can repeat it for other animations (if we don't bore you of course),And if we get the prop points to exist in the .dae and to work.Or perhaps this is just an illusion?? A dude jumping in Atlas.
    1 point
  26. Well done Niek, this [pdf file] will be useful for creating the directory structure for standalone mods. Even though I plan to even support all files mixed and in one folder in a archive file (zip, tar.gz, ...). The files for standalone mods mostly can be put into the correct folders automatically. It's a bit unlucky in pyrogenesis that props are treated separately. In the Rogue Republic Mod they tested entity on entity and it worked to put any object as a prop on any other. Even the correct animations are played - but it's loosing its independence. It's tied too tightly to the main actor. Nevertheless it's a really nice gameengine, it's difficult enough to make it even that far as it currently is. I just mention it because I saw the prop folder in your nice pdf file. Cool, today we made two tutorials. Me the 0AD JavaScript Blizzard Start for UNIX and you the entity one. We will make things happen. It has already begun. Keep up the work, colleagues, I'm backing your efforts, ask if I can lend a hand. Edit: Missed a lot of posts. @niek: The AI was also talked about [in this thread]. Among other things. Really one big chunk. Also ideas that belong to several mods was talked about (mainly by me, my fault!). I think a subforum in a subforum is a not good. Let's keep Mod fora like they are, not? The Council is for organizing the mods and would indeed be cool as a parallel forum. Don't member skills go into the signatures? Should keep the data-spread as minimal as possible, yet all that is independent should be separate. @mod organizing: We now have GitHub strucuture for the dev.Each mod (Mod launcher, Collosseum, ...) could go into its own thread/topic, where we keep the 1st post up to date with a link to the latest release in github (so that we don't have to edit the post over and over again and don't have a version mess [remember: the version is still kept track of in the git! and it could go in the mod's json/xml file too.]).Bug reports go either as issues into github (as we the CoM can't use the official trac) or it shall be reported directly in the Mod manager, Campaigning, Colloseum, .. thread.At least this will keep the overhead at a min for the beginning. Agreed. It's superfluous currently as I'm occupied with more generic features/mods currently. For a more up to date version, see: -> CoM - Collection of Ideas <- Old list: (kept for readability and authenticity of this thread only) Legend : WIP JavaScript JavaScript&C++ C++ Low priority Upcoming HybridAI (purely additivie ontop of wraitii's tremendous efforts, introduces subdueing other civs and allow for civil wars or rebellion, among others, see below),Campaigning mod,Collosseum (gladiators, battle reenactments),Mod manager patch,Supply lines,Capturing mod (slaves, btw. you are right, this essentially is a selection change, can also change the model once captured, though continuing the old activity when captured will make trouble ... but that stop of activity is even desired for capturing),Coralling/herding mod,Mercenaries mod,Seasons patch,Night/day mod/patch,Units on walls workaround (if the 1x1 pathfinder finds its way, where is Philip, we need this guy back in 0AD).Moving from ship to ship,Battle on ship,Ships ramming each other causes damage,Weather (especially crucial in naval battles and in winter as your siege structures might get stuck in the snow while crossing the mountains),Allow construction of bridges (using entity on wall workaround too),Construction of eye-candy objects (e.g. fences, trees, ..),Animal reproduction (objects reproducing itself, at first simply following e.g. fibonacci),Units on/in trees,Entity on entity,Special units, like treasure guards or standard bearers whose standard may be captured by enemies,Unit variation (official 0AD team already working on this),Minimal unit scale/size variation (not easy to do),More friction between units/armies in battle,Constitution/stamina,Children (growing with time, has to be logarithm or at least saturating to prevent ever lasting growing - related to unit scale/size variation),School/teaching,Time (comes with Hybrid AI),Aging units,Uphill movement deccelerates, downhill makes entities accelerate,Introduction of Moral attribute mod,Loyalty attribute,Sympathy attribute,Cavalry rework to allow for more realism: moral effect, no deep penetration into enemy lines,Changing of weapons,Limited ammunition,Collecting of weapons/objects (inventar, related to entity on entity and prop system),Using objects as ammunition, e.g. allow slingers to collect stones from the ground, arrows from the battlefields, put it in the ox cart and send it somewhere to unload it ...Rework armour system [units get wounded quickly once the armour is damaged or did not withstand the force of the enemy thrust],Commander system (goes with the Hybrid semi-self-learning AI),Goods/resources represented as objects (low priority),Trigger mod (related to campaigning mod: a trigger on the map for building a storyline, this trigger needs to allow being registered within AIs/Players too. e.g. if you reach this fjord/bay, then this should trigger/dispatch a message to an AI to rais e alarm. Just as an example.).Unit will use resources (food). The more units, the more difficult to feed, making the population cap superfluous. The same is valid for animals.Reproduction but nothing to eat means famines and less births (can't be protected because parents have to search the whole day for food).Erosion of entities. => Houses that are closer less damage but units move slower.Paths, roads, and streets grow if units pass this way often or if the mayor/AI decides toconstruct roads.Aquaduct water transportation system.Digging through Mountains and Earth. You may build tunnels if you are besieged and have run out of food.History visualisation (like battle reenactment) and simulation.Long list, but I like it. Did I forget anything? What we see is that besides the Colloseum and the configuration/content files for The Tied to Roman Mod currently is only the standard bearers, Senate to configure the Hybrid AI for the ROME mod, almost all we're working on is not really currently. We will not start posting required unit lists too soon, won't we? If we do so, then a subforum for Rome might be useful, but I think we can leave the artists the freedom to create whatever they wish. I fully agree that the Council of Modders currently is much more important. So I back your opinion, Romulus. Good night. attribute
    1 point
  27. I think its looking better now...
    1 point
  28. Almost there... got distracted making new sail textures, but I'm not happy with them, no playercolor ptolemaic bird in them yet. Textures are very high-res, expect less quality in-game. Realtime screenshot, AO added in the texture.
    1 point
  29. @sander A culture DB on the native side would be great. Usually the result sets are not that huge, just a few records. Let me expand the example of grain picker above: units: [5, "food.grain GATHEREDBY WITH costs.metal = 0, costs.stone = 0, costs.wood = 0 SORT < costs.food"],From the point of the group it only cares whether the units CAN gather food.grain. It doesn't care if they are soldiers, females, slaves, what ever. It is up to the economy to find out what is currently cheapest. First it has to find out how to deliver what the group requested. So it runs the query and gets a list of templates, then it checks whether there are entities in the game not occupied by other groups matching these templates. Let's say the result is: "units.athen.support.female.citizen", checking in game is easy, just append verb + filter and run again: "units.athen.support.female.citizen INGAME WITH metadata.group = ''". If there are results, then the unit IDs are included and all left is assigning the units to the group. In the case of no in game units, the economy first has to check requirements (technology) the query is "units.athen.support.female.citizen REQUIRE". If that returns nothing next step is to find out how to produce the requested resource. The economy doesn't know a thing at this point whether these are units, technologies or structures. So it runs 3 queries: units.athen.support.female.citizen TRAINEDBY INGAMEunits.athen.support.female.citizen BUILDBY INGAMEunits.athen.support.female.citizen RESEARCHEDBY INGAMEto find out structures.athen.civil.centre is a candidate, is in the game and the engine command to produce them is "train". Basically the economy reads every tick its list of requests and checks what can be done using the query language and fires the according engine commands. It is an easy process and just requires to build proper queries using string operations. A query like : "units.athen.support.female.citizen TRAINEDBY INGAME" runs in virtually no time, because it starts with one node only and checks just a handful edges. If "TRAINEDBY" returns nothing, "INGAME" doesn't even need to run. So, yes there are probably are a lot of queries per tick. The crucial thing is whether they query in game objects or only the template space. Don't know how this could be done on native side. Also the query would need translation into SQL, which may open another can of worms because fast and simple triple store queries may lead to heavy SQL queries. More obstacles come to my mind, I think, I can make a better proposal once the bot knows a bit more than cropping.
    1 point
  30. My first question was what objects the bot might use, so here is 'global' the equivalent of 'window' in a browser environment.logObject(global); Accessibility: function Accessibility() {"use strict";} ... AssocArraytoArray: function AssocArraytoArray(assocArray) {"use strict";var end ... BaseAI: function BaseAI(settings) {"use strict";if (!settings) {retu ... Class: function Class(data) {"use strict";var ctor;if (data._init) ... DoesModificationApply: function DoesModificationApply(modification, classes) {"use ... Engine: OBJECT (ProfileStart, ProfileStop, IncludeModule, DumpHeap, ForceGC, ...)[8] Entity: (function (sharedAI, entity) {"use strict";this._super.call( ... EntityCollection: function EntityCollection(sharedAI, entities, filters) {"use ... EntityTemplate: (function (template, techModifications) {"use strict";this._ ... Filters: OBJECT (byType, byClass, byClassesAnd, byClassesOr, byMetadata, ...)[27] GameState: (function () {"use strict";this.ai = null;this.cellSize = 4; ... GetTechModifiedProperty: function GetTechModifiedProperty(currentTechModifications, e ... ManhattanDistance: function ManhattanDistance(a, {"use strict";var dx = a[0] ... Map: function Map(sharedScript, originalMap, actualCopy) {"use st ... Memoize: function Memoize(funcname, func) {"use strict";return functi ... MemoizeInit: function MemoizeInit(obj) {"use strict";obj._memoizeCache = ... PickRandom: function PickRandom(list) {"use strict";if (list.length === ... PlayerID: NUMBER (1) Resources: function Resources(amounts, population) {"use strict";if (am ... ShallowClone: function ShallowClone(obj) {"use strict";var ret = {};for (v ... SharedScript: function SharedScript(settings) {"use strict";if (!settings) ... SquareVectorDistance: function SquareVectorDistance(a, {"use strict";var dx = a ... TERRITORY_PLAYER_MASK: NUMBER (63) Technology: function Technology(allTemplates, templateName) {"use strict ... TerrainAnalysis: function TerrainAnalysis() {"use strict";this.cellSize = 4;} ... VectorDistance: function VectorDistance(a, {"use strict";var dx = a[0] - ... aStarPath: function aStarPath(gameState, onWater, disregardEntities, ta ... copyPrototype: function copyPrototype(descendant, parent) {"use strict";var ... deepcopy: function deepcopy() {[native code]} ... error: function error() {[native code]} ... g_FoundationForbiddenComponents: OBJECT (ProductionQueue, ResourceSupply, ResourceDropsite, GarrisonHolder, ...)[4] g_ResourceForbiddenComponents: OBJECT (Cost, Decay, Health, UnitAI, UnitMotion, ...)[6] global: OBJECT (global, Engine, print, log, warn, ...)[49] inRange: function inRange(a, b, range) {"use strict";if (a === undefi ... log: function log() {[native code]} ... print: function print() {[native code]} ... warn: function warn() {[native code]} ...That already gives a hint on the rich API 0 A.D. provides. Engine looks interesting: logObject(Engine): DumpHeap: function DumpHeap() {[native code]} ... DumpImage: function DumpImage() {[native code]} ... ForceGC: function ForceGC() {[native code]} ... IncludeModule: function IncludeModule() {[native code]} ... PostCommand: function PostCommand() {[native code]} ... ProfileStart: function ProfileStart() {[native code]} ... ProfileStop: function ProfileStop() {[native code]} ... RegisterSerializablePrototype: function RegisterSerializablePrototype() {[native code]} ...It turns out the API functions and objects are either provided by the host environment/SpiderMonkey [warn, log, etc.] or by 0 A.D. itself written in C++ [PostCommand, etc] or by code written in JavaScript. Next part will extend XBot and get in touch with settings, gameState, sharedScript and BaseAI. To be continued. PS. if you can't wait, explore this folder: D:\Games\0 A.D. alpha\binaries\data\mods\public\simulation\ai\common-api-v3 or inspect the other example bots.
    1 point
  31. There is a browser based JS debugger allowing breakpoints and variable inspection, but I got it running only once or twice, so dbgView from SysInternals is my debugging tool of choice. A bot has 3 possibilities to talk to you while running, 1) chatting, 2) the in game console and 3) logging to std, in this case dbgView. The console is of little use since it runs in another context. However, the Aegis Bot uses it quite well to explain its actions once debug is set in its config. I decided to use dbgView only and keep the chat function to entertain the human opponent. SpiderMonkey is very picky and demands properly written code. I use Sublime Text as editor and a JSLint plugin to make sure SpiderMonkey is happy before 0 A.D. fails to load the code. JSLint is even more picky, but there is nothing wrong with using a good coding style restricted to the good parts of JavaScript. In terms of style I tend to prefer Google's JavaScript Style Guide. You probably want to start developing with a simple map. Get used to the map editor Atlas and create a map with two Civil Centers one for your bot (Player 1) and one for Aegis (Player 2). It's actually quite simple. Since maps are XML files, direct editing is possible too. Atlas saves maps in a special windows folder, mine is: C:\Daten\My Games\0ad\mods\user\maps\scenarios My first map is attached. You start it with this command line:"D:\Games\0 A.D. alpha\binaries\system\pyrogenesis.exe" -quickstart -autostart=xbotmap01 -autostart-ai=1:xbot -autostart-ai=2:aegisAt this point you have an Bot which is functional, but as clever as a stone. It is a good idea to learn the hotkeys, triple clicks give you some advantages, also there is an useful developer overlay. xbotmap01.xml
    1 point
  32. First I'll describe how to set up your system and show the basic layout of an 0 A.D. bot. It starts with downloading and installing the game, on my system that's the path d:\games\0.A.D\. Check out this guide for other systems and other paths mentioned below. A bit deeper is a huge zip file called public.zip, extract that into its folder keeping the folder structure intact. Now you'll find a folder called d:\Games\0 A.D. alpha\binaries\data\mods\public\simulation\ai Here the fun starts. Think of a good name, let's say XBot, and create a xbot sub folder as a sibling to qbot, testbot, aegis, etc, then two files are needed: data.json and _xbot.js.{ "name": "XBot", "description": "XBot - example", "constructor": "XBot", "useShared": true }Engine.IncludeModule("common-api-v3");function xbot(settings) { BaseAI.call(this, settings);}xbot.constructor = xbot;xbot.prototype = new BaseAI();xbot.prototype.CustomInit = function(gameState, sharedScript) {};xbot.prototype.OnUpdate = function(sharedScript) {};The files in your bot folder are loaded alphabetically, so the underscore makes sure the api is included first. I use a local.cfg file C:\Documents and Settings\Owner\Application Data\0ad\config in to ease development: windowed = truesplashscreenenable = falsepauseonfocusloss = truexres = 1024yres = 768jsdebugger.enable = false
    1 point
  33. > seriously what is needed to make 0AD run Aegis vs. Aegis? Solved that with: "D:\Games\0 A.D. alpha\binaries\system\pyrogenesis.exe" -autostart=Aitest01 -autostart-ai=1:aegis -autostart-ai=2:aegisand a simple map: The confrontation was short, four units died, two females got stuck after building a storehouse. I think I invest some weekends to see what is needed to watch an epic battle on a map like this (without stone and metal). A genetic AI would require a complete abstraction. Every available action needs to be referable as a string, so new generations could be mixed and mutations have a data structure to work on. That's probably the far end of the road. Also two good gen sets do not necessarily have clever offspring. Somehow a fit function has to decide off game whether there is progress at all. On the other hand eventually very optimized AIs would be generated - kinda AI mining, though.
    1 point
×
×
  • Create New...