Jump to content

man_s_our

Community Members
  • Posts

    20
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

man_s_our's Achievements

Discens

Discens (2/14)

8

Reputation

  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)
×
×
  • Create New...