- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
All Stories
Jun 10 2019
Jun 9 2019
In D1955#81644, @Stan wrote:The advantage of the C++ cmp is it can be used by the engine while if it's only js you can't :) Usually though it only requires a small subset of the code so it can be fine with a little subset of functions like it is the case here. I think the other function in the interface is not even needed.
What I meant was to alter the C-cmp to look in a "VisualActor.js" sim-cmp rather than in "Identity.js" so that the replacing of the tag could be done in the former. It seems more logical to look for code related to a VisualActor in "VisualActor.js" and not in "Identity.js". The "VisualActor.js" can then use information from the Identity.js" to use and replace the tag.
Successful build - Chance fights ever on the side of the prudent.
check in update move is not needed as ATTACKING.enter does the decision what to do if cannot reach or can reach or go to idle
Successful build - Chance fights ever on the side of the prudent.
In rP22345#33872, @Angen wrote:@Freagarach see D1964, some bugs may be resolved
Yeah, I just saw that when I posted this ;)
I directly tested it. The attacking is good again, so the last bug is solved indeed. And the second one partially. Indeed the attacker now keeps moving towards the chased unit. However both the unit (being chased and chasing) still randomly stop moving whilst keeping the running animation.
Thanks for the reports @Freagarach , very helpful. The animation thing will fix itself upstream (latest by D1901, possibly earlier) but the rest are likely legitimate issues that will need to be fixed, as Angen did there.
This is the type of changes one needs to do to fix the unitAI code correctly, however you have un-necessary {} and I think you should add the same range check to MovementUpdate (or possibly just make MovementUpdate call the Timer, but that's a bit ugly... I fixed that originally in D442 but it was kind of ugly.
@Freagarach see D1964, some bugs may be resolved
- Grazing animals turn often and strangly. Steps to recreate bug:
- Start map.
- Look at gaia animals.
- On the fleeing: both the chasing and the fleeing are off. They seem to stop randomly.
- Steps to recreate bug:
- Take two units of opposing teams, set one or both to flee-behaviour.
- Attack (with A) the unit (B) with flee-behaviour.
- Witnessed behaviour:
- Unit B starts fleeing
- After about a second unit B stays in running animation but stops moving.
- Shortly therafter unit A stops moving but keeps running animation.
- Then Unit B starts moving again and quickly therafter unit A starts moving also.
- When the units have stopped moving at the same time they stay in running animation at the same position forever (at least a minute).
- Unit A stops moving and goes to Idle properly when target dies.
- Manually moving unit B sends unit A into moving again.
- When A catches up with B they gently walk side by side.
- When B stops because targetpos (or is halted by player) is reached, unit A stays in walking animation but doesn't move.
- Sending unit B to another location continues infinitely as above. Unless the unit B is tasked to the direction unit A is, when unit B is then close enough unit A starts attacking but above behaviour sets in therafter.
- Manually moving unit A from the nonmoving stalemate sets unit B loose from invisible rope and unit B starts routing.
- When unit B has routen far enoug it stops moving but still uses walking animation.
- When unit A reenters LOS of unit B unit B starts moving again (fleeing with run animation) but this is rather inconsistent behaviour.
- Steps to recreate bug:
- An animal moved from foundation stays in "WALKING"-state with order "LeaveFoundation".
- Steps to recreate bug:
- Build a building over an animal.
- Display selection state.
- When trying to build a building over the animal again it will not move. (It does respond to attacks, though.)
- Steps to recreate bug:
- When unit B is attacked by a ranged unit A and the unit B moves out of range the unit A will not move into attack-range but goes to walk next to the attacked unit B. (Like in the earlier bug.)
- Steps to recreate bug:
- Let ranged unit A attack unit B.
- Move unit B out of attack range.
- Witnessed behaviour:
- Unit A does not stops to attack when in range but rather keeps walking towards unit B.
- When arrived unit A stays in walking animation but does not move.
- Unit A does not care at all if unit B stops and turns to attack and will just stop moving but stay in walking animIation.
- Unit A stops moving and goes to Idle properly when target dies.
- Steps to recreate bug:
I hope this helps.
Build failure - The Moirai have given mortals hearts that can endure.
Successful build - Chance fights ever on the side of the prudent.
Rebased for committing
Successful build - Chance fights ever on the side of the prudent.
Rebased for committing.
Rebased for committing.
Successful build - Chance fights ever on the side of the prudent.
In rP22345#33855, @Freagarach wrote:@wraitii, do you want us to continue summing up situations in which movement fails (either here on in a different centralised location)? Or leave it untill you've commited the rest?
In D1962#81662, @Freagarach wrote:It appears that "MovementUpdate" is not called when the attacker comes near the unit that garrisons. While it *is* called when the targetted unit dies. Therein lies the problem I guess, this is now just treating symptoms.
I'm going to stop checking it now, because it seems many movement-related bugs have been introduced.
@wraitii My friend, my army can't board the warships. Can you let them board the warships?
@wraitii, do you want us to continue summing up situations in which movement fails (either here on in a different centralised location)? Or leave it untill you've commited the rest?
Maybe you could chase the wall instead ? Like stop at vision range of the wall ?
It appears that "MovementUpdate" is not called when the attacker comes near the unit that garrisons. While it *is* called when the targetted unit dies. Therein lies the problem I guess, this is now just treating symptoms.
I'm going to stop checking it now, because it seems many movement-related bugs have been introduced.
Successful build - Chance fights ever on the side of the prudent.
I just realised that this might happen more often, e.g. when a unit dies or is otherwise moved out of world.
Understandable, it was my dilemma as well ;)
I must warn that when explicitly giving the attack order and the unit garrisons it will look really weird. By the way is there something left to chase when the unit garrisons?
Kind of the unitAI dilemma here. Should we abandon the order? Do we do something else? Can we abandon if the order is forced?
In rP22345#33844, @Freagarach wrote:In rP22345#33842, @Angen wrote:I am not sure if it was this but some commit with unitmotion and range check.
When any unit is tasked to attack animal which flee (or anything which will flee) it follows it but does not stop to attack when target is in range but keeps following until target does not stop and then attacks.Ah yeah, I saw that behaviour as well this morning! It was strange to have a ranged unit run towards a melee unit when chasing,,,
The advantage of the C++ cmp is it can be used by the engine while if it's only js you can't :) Usually though it only requires a small subset of the code so it can be fine with a little subset of functions like it is the case here. I think the other function in the interface is not even needed.
In D1955#81585, @Stan wrote:Sorry I meant it could be done and it was actually done before. One could also change a unit into another one.
Yes, but that requires an extra template. When loading a game all templates get read by the AI, so with many templates it can take a long time to load (cf. this post). That seems unnecessary when the only thing you want to change is the VisualActor?
Animals not playing walk animation when moving (randomly).
I think i encountered the latter when playing with turrets.
next:
animals walking on place after feeling
ranged units not responding on attack commands
In rP22345#33842, @Angen wrote:I am not sure if it was this but some commit with unitmotion and range check.
When any unit is tasked to attack animal which flee (or anything which will flee) it follows it but does not stop to attack when target is in range but keeps following until target does not stop and then attacks.
Ah yeah, I saw that behaviour as well this morning! It was strange to have a ranged unit run towards a melee unit when chasing,,,
I am not sure if it was this but some commit with unitmotion and range check.
When any unit is tasked to attack animal which flee (or anything which will flee) it follows it but does not stop to attack when target is in range but keeps following until target does not stop and then attacks.
Successful build - Chance fights ever on the side of the prudent.
Forgot about turrets.
Successful build - Chance fights ever on the side of the prudent.
Should only units with a "Scout"-class be able to use this? (Also prevents cluttering of the already full actions bar at the bottom.)
Successful build - Chance fights ever on the side of the prudent.
Fixes notes.
The patch looks very good to me.
Jun 8 2019
Successful build - Chance fights ever on the side of the prudent.
Successful build - Chance fights ever on the side of the prudent.
Sorry I meant it could be done and it was actually done before. One could also change a unit into another one.
Successful build - Chance fights ever on the side of the prudent.
Successful build - Chance fights ever on the side of the prudent.
Adds usage of setChangePerspective.
- Support for a list of possible genders.
- Changed C-code to phenotype.
Saving and loading works fine.
In D1955#81570, @Stan wrote:The template stats are different :)
Nope ;) There are usually three things changed in the templates/units from "_b" to "_a": Rank, Promotion, VisualActor. I found no Attack/Armour upgrades. The actual stat change is tech-based.
The template stats are different :)
In D1955#81568, @Stan wrote:You could but currently we just delete the entity and create a new one for promotion. Usually you want to change the template as well
Is that because of performance? Because the only thing why it is currently necessary to change the template is the visualActor ;)
You could but currently we just delete the entity and create a new one for promotion. Usually you want to change the template as well
In D1955#81565, @Stan wrote:You can already do so :) you need to Query the IID_Visual component :)
I know I can, but there is no(t yet a) function to change the VisualActor. So I thought I might be nicer to mimic Sound, in which the CCmp gets the sound from "Sound.js"-component. That way it would be easier to add different tags to the visualActor without having to change the C-code.
You can already do so :) you need to Query the IID_Visual component :)
In D1955#81559, @Stan wrote:Oh sorry :)
No problem, I just thought it was ironic in the light of part of the discussion ;)
Successful build - Chance fights ever on the side of the prudent.
Successful build - Chance fights ever on the side of the prudent.
In D1955#81558, @Freagarach wrote:In D1955#81537, @Stan wrote:Fair enough :) But he will have to fix all the voices as well ?
Or will he have to add a get phentotype function that does the same thing as get gender until this is sorted out ?
It would seem logical to me to add a "phenotype"-function now and prepare the C-file for a "phenotype".
< Kindly ignoring the gender being imposed on me. >
In D1955#81537, @Stan wrote:Fair enough :) But he will have to fix all the voices as well ?
Or will he have to add a get phentotype function that does the same thing as get gender until this is sorted out ?
It would seem logical to me to add a "phenotype"-function now and prepare the C-file for a "phenotype".
< Kindly ignoring the gender being imposed on me. >
Rebased for committing.
Use MovementUpdate instead of hint and don't split errors from not-errors since that didn't make much sense.
In D1958#81457, @Angen wrote:attack animation does not play and sometimes will not attack ( if player commands )
Successful build - Chance fights ever on the side of the prudent.
Should run this time.
Fair enough :) But he will have to fix all the voices as well ?
In D1955#81528, @Stan wrote:I meant if gender was to be replaced by phenotype.
Successful build - Chance fights ever on the side of the prudent.
- Let #iterations depend on map size.
Did some testing, it takes approximately 10 minutes to explore a "Medium"-sized map and ~40 minutes to fully explore a "Giant"-sized map.
I meant if gender was to be replaced by phenotype.
In D1955#81519, @Stan wrote:Gender is used in every template... That should be renamed in another patch