Jump to content


Community Members
  • Posts

  • Joined

  • Last visited

Everything posted by man_s_our

  1. I already planned to do it when I complete the TODO list. the same with the hunger script when finishing the last bug.
  2. this attack.js patch has the increased spread for archers when the horse is moving. Attack.js
  3. @Freagarach changelog: riders' orientation is now the same with the horse most the time when the horse is walking (turretable.js) the horse will automatically go to the targeted unit so that the rider attack it instead of having to make 2 seperate orders. the cavalry units are automatically using hit-run tactics (can be disabled by replacing "range.max / 2" in the line 5087 by range.min) TODO: fix the bugs related to gathering (when gather order issued you can't stop it) UnitAI.js Turretable.js
  4. is there any tutorial about modding GUI such as unit's buttons? I would like also to have a list of hardcoded functions like unit motion and position functions.
  5. I would like to see the ability of recruiting commanders that has their own formations, you can assign units for them and having the ability of making them controlled by AI to minimize micros.
  6. @Freagarach this is what I reached till the moment. couldn't find the reason why melee units can't attack while turretting horses. UnitAI.js
  7. I suggest that this only happens when AI is ran out of resources and soldiers. because he can't do anything else to resist enemies. except if there is still potential allies.
  8. till now the problems I got is: when order the unit to gather while it's riding a horse (propably will be solved after editing more UnitAI functions) if I order a melee unit to ride a horse and send it to fight it doesn't attack the enemies. I don't know which function that will return the current movement speed (instead of max speed) to use it for archer's spread. (solved)
  9. I fond the problem was in the need to turn the args into dictionary first. this code solves the problem: UnitAI.prototype.Walk = function(x, z, queued, pushFront) { let mov = 1; let cmpTurretable = Engine.QueryInterface(this.entity, IID_Turretable); if (cmpTurretable) { mov = 0; let tur = cmpTurretable.HolderID(); if (tur) { let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); if (cmpTimer) { var data = { "x": x, "z": z, "queued": queued, "pushFront": pushFront }; cmpTimer.SetTimeout(tur, IID_UnitAI, "Walkt", 100, data); } } else mov = 1; } if (mov) { if (!pushFront && this.expectedRoute && queued) this.expectedRoute.push({ "x": x, "z": z }); else this.AddOrder("Walk", { "x": x, "z": z, "force": true }, queued, pushFront); } }; UnitAI.prototype.Walkt = function(data, lateness) { let x = data.x; let z = data.z; let queued = data.queued; let pushFront = data.pushFront; if (!pushFront && this.expectedRoute && queued) this.expectedRoute.push({ "x": x, "z": z }); else this.AddOrder("Walk", { "x": x, "z": z, "force": true }, queued, pushFront); };
  10. I was trying to implement the feature of seperate entities for horse riders but I got a problem and didn't knew what the thing that keeps changing coordinates. the logs gave me: the horse 7079 got the order from 7085, x = 608.2567138671875 z = 852.1669311523438 7079 ordered to Walk to x = 841.0175601990993, z = 100 the function is: UnitAI.prototype.Walk = function(x, z, queued, pushFront) { let mov = 1; log(this.entity + " ordered to Walk to x = " + x + ", z = " + z); let cmpTurretable = Engine.QueryInterface(this.entity, IID_Turretable); if (cmpTurretable) { mov = 0; log(this.entity + " Turretable"); let tur = cmpTurretable.HolderID(); log(tur + " is Turret"); if (tur) { let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); if (cmpTimer) { log("the horse " + tur + " got the order from " + this.entity + ", x = " + x + " z = " + z); cmpTimer.SetTimeout(tur, IID_UnitAI, "Walk", 100, x, z, queued, pushFront); } } else mov = 1; } if (mov) { if (!pushFront && this.expectedRoute && queued) this.expectedRoute.push({ "x": x, "z": z }); else this.AddOrder("Walk", { "x": x, "z": z, "force": true }, queued, pushFront); } }; any ideas?
  11. so, I added some features in my mod (WIP) that included units being hungry/thirsty and supplying units. the hungry units needs gathering food or otherwise they start losing their health. the same (but higher rate) goes for thirsty units. this requires that units automatically go gather their needed supplies but I wonder whether there is predefined functions for this or I need to define a new function that looks for the near supply units and start gathering it.
  12. the idea is not about having many players. but about being able to divide leadership between multiple commanders instead of having only one leader for the entire army.
  13. this Idea is good for increasing players without slowing down the game since max units related to civs number and not players number
  14. they play as different sides, right? what I meant is being able to play as commanders in one nation (not just allies) and share the resources and such things. but I think it can be edited through JS (by editing deplomacy and gui and such)
  15. I think all of that can be achived through a mod (needs modding JS tho)
  16. programmatically, is it enough to edit the javascript files or it needs to rewrite the engine to implement: civs limit per map stays the same. but players number can be increased, where many players can play as one civilization against other players/AIs to do multitasking like one gather resources and one explore and one build or they co-op to do things like flanking enemies or other tactics.
  17. what are the values to add to XML files to add regeneration or decay? edit: I've found it here: https://code.wildfiregames.com/D3868
  18. in my computer I added a mod where: there is water resource, you get it from wells or water treasures. and food is splitted into meat food and vegan food wells have unlimited water. you can order your workers to plant a tree (consumes water and some wood). you can plant a field using some vegies and water but it has limited vegan resources. from coral you can spend water and vegies to get meat. this way you can afford realistic resource regeneration except for stone and metal. it has a problem with AI tho, because it rely on harvesting the fruit bushes.
  19. if you ask for my opinion, I think that resources system should be changed to: there is no resources shown (or showing the sum) in the upper bar, every resource is stored where it was putted. when you order the workers to build they get the materials from the storehouses or harvest it by themselves. you can transfer the resources from a storehouse to anywhere else. this is how you trade, support allies, supply your units. barracks need to have the resources near it to recruit units.
  • Create New...