-
Posts
1.125 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Freagarach
-
(D1961)
-
I understand that you did not mean that code should hacky, my choice of words was off, sorry about that. I meant that if something is expandable, the dev's usually want that done as well (D1960)
-
That is not fully true, I learnt. When changing stuff, one can better be thorough in the first run, that is the lesson I learnt over the last few weeks The team won't (and they're right!) accept partial, quick and dirty solutions. When I've got the time later today I can create a diff, but rest assured, it will take some time to be implemented.
-
Improper coding on my side. It does *not* trigger a leave when returning early.
-
Yes, they can go very wild. I always loved in Rome TW the Germanic Berserkers rage through the battlefield. In 0AD however, there is a problem: if I would let units attack anything it triggers leaving the berserk state to get in the combat.approaching-state (thus reacting to orders again). So I either have to copy the code from the approaching-state to berserk.approaching (which would increase duplicity) or pospone that for now
-
Yes (well, not *all*), but that is on the order-side of things. That would already trigger a "leave" in the state.
-
Regarding 59.: I discarded the idea to make a unit unselectable, but I now let it ignore all orders. However, for this I need to set (in UnitAI.js) // Ignore orders. "Order.Attack": function(){ }, "Order.Move": function(){ }, for every order that can be given and for every stance that needs it (e.g. broken, amok, berserk), which is bad in my opinion. Is there, to anyones knowledge, a more general way of ignoring all orders? And if there is, could one point me in that direction?
-
Running, charging, stamina and stances (with a bit of formations)
Freagarach replied to Karamel's topic in General Discussion
I changed the "ComputeMotionParameters" function to include a check whether "run" is called, to remove duplication But that is not on SVN, so I probably need to use your code in the future -
Running, charging, stamina and stances (with a bit of formations)
Freagarach replied to Karamel's topic in General Discussion
Well it does not really matter, as I just saw that in Formation.js "ComputeMotionParameters" only uses the walking speed. So I'll need to tinker with that -
Running, charging, stamina and stances (with a bit of formations)
Freagarach replied to Karamel's topic in General Discussion
Is says that the speed bonus is removed, is that what you are referring to? Because I tried to let units actually run in the formations (visualise an awesome cavalry charge) but, strangely, they only slow down when I try to use the run speed. Well, I don't *need* anything, but I'm just curious I wanted to see what code they used for the different steps, but if it is basically the same it is okay. -
Running, charging, stamina and stances (with a bit of formations)
Freagarach replied to Karamel's topic in General Discussion
My fault @ServoI've got charging, but without proper pushing the code is ugly and there are some unintended side effects. @asterix Is the code of Hyrule Conquest available somewhere? I saw there is a git for it, but that is empty Furthermore, I can't seem to let formations run, is that intended? -
[Updated 2022] List of Buttons[Commands] for GUI session
Freagarach replied to Lion.Kanzen's topic in General Discussion
Okay, I fixed the above by changing "CVector2D" to "CFixedVector2D"; I do not know whether that makes it a completely different function, but I'll see I now get the following error during make: Could you help me out here @Angen? Edit: I've updated D1851 so perhaps you can help me there? Would keep this topic kindof clean -
[Updated 2022] List of Buttons[Commands] for GUI session
Freagarach replied to Lion.Kanzen's topic in General Discussion
Thank you for your help @Angen! However, it fails to build if I add that to the CCmpRangeManager. It gives an error during "make": CCmpAIManager.cpp In file included from ../../../source/simulation2/components/CCmpAIManager.cpp:38:0: ../../../source/simulation2/components/ICmpRangeManager.h:425:30: error: ‘CVector2D’ has not been declared virtual bool IsTileExplored(CVector2D pos, player_id_t player) const = 0; ^~~~~~~~~ simulation2.make:243: recipe for target 'obj/simulation2_Release/CCmpAIManager.o' failed make[1]: *** [obj/simulation2_Release/CCmpAIManager.o] Error 1 Makefile:98: recipe for target 'simulation2' failed make: *** [simulation2] Error 2 Do you have any ideas what I'm doing incorrect? I've tried to include "maths/CVector2D.h" in the .h, but that does not exist, as well as changing "CVector2D" in the .h to something similar as I saw in other functions, but all to no avail. -
[Updated 2022] List of Buttons[Commands] for GUI session
Freagarach replied to Lion.Kanzen's topic in General Discussion
Sort of. #1851 . Still ugly hack however. I have not found how to check whether coordinates are unexplored, yet. -
Running, charging, stamina and stances (with a bit of formations)
Freagarach replied to Karamel's topic in General Discussion
I will not be discouraged quickly, if I think of (or find) a nice feature I try to implement that, purely for myself (how selfish). If I think it might be of use for more people than just me, I upload it on Phab. A physics manager would do a much better job indeed Would be cool to have that. That is so much cooler! I'll check it out next week. Makes me aware again that I have started programming almost exactly two months ago -
Running, charging, stamina and stances (with a bit of formations)
Freagarach replied to Karamel's topic in General Discussion
I'm sorry to revive a really old thread, but I am experimenting with charging and I think it is good to keep information together. I currently have a system in place (thanks @Angen (batalion mod) and Councel of Modders (Mythology mod) ) where a unit starts charging at a fixed distance (set in its template) and, if it has enough mass over the enemy, it pushes the enemy backwards. But I would like some feedback on where to store some variables. Currently I have: Min/Max charge distances in UnitAI.js (because they are called there). ThrowbackResistance in Armour (function of Mass and whether a unit can brace itself (i.e. is idle; which in turn comes from UnitAI again) ). Mass in Identity. Any (other) feedback and/or places where I can find comparative code is appreciated! My intention is to submit this as a patch for #994. -
Is it happening only with the horses? Because I can't reproduce the bug with deer. I only noticed that while moving they keep throwing their heads down to graze.
-
Wouldn't it be neat if the player had to make a choice: some precious quick foodsupply or a tad quicker cavalry training? Glad to be of service Well, it seems strange to give orders to animals. Although one can indeed already order domestic animals, so that does not have to be an argument. Hmm, I did not percieve that bug, but I have to admit I was not using SVN. It might have something to do with the recent move speed change. How much higher is the animationspeed? Nigh invisible? Or significantly higher?
-
True, to make sure animals are not controllable, but that they are controllable is exactly what is asked here It might be possible to use D1838 for this? But then there is no bias to the owning player. Or just see what @(-_-) comes up with I tried it and now I'm curius as to how you accomplished the capturing in the first place. Because you stated that you can already capture an animal, but did you only change the fauna's unit template for that (i.e. add the capturable-code) or did you need to change more? For when I try to capture an animal with a unit that can gather from it, it tries to gather resources from it (logically, because in gui/session/unit_actions.js gathering is preferred over capturing). True. I just tested it and it ensures that every animal under my control can be given orders. Thus addressing your question, I guess. Have you tried it yourself yet? I hope this is clear and works for you!
-
I will try it this afternoon. I don't know why, but I sense problems with that approach. It is quite easy to modify though. But you do need to go in the UnitAI.js, at the order commands there are some if's. If you remove the if's which have this.IsAnimal() && !this.IsDomestic() it should be fine. If you don't feel comfortable I could state every line which needs to be changed and into what it needs to be changed, but I can do that only in the afternoon.
-
I'm sorry to tell you, it *is* the class "domestic". For a temporary solution, you could try to move // Always slaughter domestic animals instead of using a normal attack if (isTargetClass("Domestic") && this.template.Slaughter) return "Slaughter"; to after // check if the target is capturable let captureIndex = types.indexOf("Capture"); if (captureIndex != -1) { ... } in the Attack.js. Which should enable you to capture an unowned animal, but slaughter it when it is yours. If this is not what you want or if it doesn't work, let me know and I'll dig further. I think that if this works it should be the default.
-
Things you only learn from 0 AD
Freagarach replied to Thorfinn the Shallow Minded's topic in General Discussion
You mean? -
Things you only learn from 0 AD
Freagarach replied to Thorfinn the Shallow Minded's topic in General Discussion
If Leonidas would have been breakdancing to and fro, the Spartans would have won at Thermopylae. -
Okay, I have uploaded the patch (which worked fine on my system; D1846) but it gives a build failure now, how can I see what exactly is causing that? Jenkins says something about cxxtest_debug.xml, so I reckon it has to do anything with a test or something, but I've got no clue where to start looking.
-
I'm sorry, ignorant me, there is a ticket already! (#4370) I'll try to finish my code during lunch today, no promises.