-
Posts
1.126 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Freagarach
-
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.
-
Aye, it can be done. But it needs quite some files to be changed, so I'm not sure this is the right place to post that? If anyone wants to make a ticket for it I'm happy to upload my code there. The only part I see some challenges ahead is the bartering, because there are both a selling row and a buying row and a modder might want to be able to sell food for wood, but not food for coin or something. Hmm
-
I've also got a few questions. I took the liberty of continuing your numbering Nescio. 58. Is it possible to change an actor's look (i.e. VisualActor) using a tech (explicitly not via upgrading to another template)? Preferably just part of the entity, like when one upgrades the shields of pikemen in the Blacksmith the shields actually change. The reason why I'm asking is because I've introduced a more fluent experience system, like in the Batalion-mod, but now the only way to see the difference between a basic and an elite soldier is by looking at its rank icon (which is not too bad I guess). If it is possible, could one point me in the right direction? The only VisualActor (c-)component I could find was in simulation2/components where I did find a MT_ValueModification listener, so I tried: let newActorName = []; newActorName.push("units/athenians/infantry_spearman_a.xml"); warn(uneval(newActorName)); Engine.BroadcastMessage(MT_ValueModification, { "entities": [this.entity], "component": "VisualActor", "valueNames": newActorName}); as a test using an Athenian Hoplite, but it does not work. No error, but also no change in appearance. Any help would be appreciated. 59. Another "is it possible" I want to change the ability to select a single entity, e.g. when a unit goes berserk, it should not be selectable for a while. I found out that one can do that by using an upgrade, so the template changes, but any ideas how I can do it without the template-changing? (To make it reversible.)
-
If you want this (that all resources can only be bartered into coin and vice versa, that is wat you want right?) you need to change barterButton.Buy.hidden in the menu.js in gui/session to if (g_BarterSell == "coin"){ barterButton.Buy.hidden = isSelected;} else {barterButton.Buy.hidden = resourceCode != "coin";} provided that you want coin to be bartered. I could also write some code to do this more cleanly, if anyone wants that? More cleanly: setting up a barterable parameter in the resource. But since I'm not going to use this I stop here for now.
-
Oh yeah, sorry. I was too enthousiastically trying to fix it: menu.js in gui/session (not very suprising and I've looked in that folder more often trying to fix this but not in this particular file).
-
Yep, and grep was my friend here again. I managed to exclude all other resources (except coin) from the trade menu. I'll now try to make sure one can only pay for resources with coin, as I've noticed that some people would like that (I don't but hey I'm almost there I guess). Thanks once again!
-
Sadly not. It does a good job in preventing the error message, but I can still click the arrow there. If I do that it gives the error that sumProba != 100, which is logical because I get 5% off the coin, but it can't add it anywhere FYI, I've changed the error message so I could discriminate between them. Thank you!
-
That is indeed what I did not do. But I thought it was strange that the warning was posted only once every time the Resource.js was processed, because I only added the tradable-data to the coin resource. But that is of no concern anymore That would indeed get rid of the error message, but I don't think the error is bad at the moment, because I have yet to find a way to prevent a player from pressing the arrow-button. Now a player is visually warned that the changes (s)he makes won't be saved That's right, it is only stored on my hard-drive. It is a submod of DE, with elements from e.g. 0abc (like entities costing resources steadily) and Batalion-mod (like morale and fatigue systems) together with many of my own thoughts on how to make the game more realistic. It is probably totally unbalanced and I use it only to code features and test fun stuff, like: When hitting delete a unit converts to GAIA, because it is strange for a unit to kill itself on the lightly taken decision of some girl/guy behind a computer screen
-
WARNING: JavaScript warning: globalscripts/Resources.js line 33 reference to undefined property data.tradable And for this to make sense you need my Resources.js so you can find it attached. The strange part is that it all works as advertised, yet it does give the warning. This is the warning sent on initialisation. The (second) error: ERROR: Invalid trading goods: ({coin:95, food:5, wood:0, stone:0, metal:0}) comes from the Player.js component, the SetTradingGoods-function and comes from the fact that the arrow button is clickable, so SetTradingGoods is called trying to get the percentage of food up, but I have coded earlier that only coin is tradable. So I would very much like to have an option to disable the arrow if the resource is not tradable, but I haven't found it yet Resources.js
-
So there is a trickle of coin I guess? Then it would seem logical that mercenaries and champions would have a negative trickle of coin, as their salary? Or is it just a one-time payment to recruit them? Looking at his code he didn't, although I'm happy to be proven wrong! I've fiddled around in the resource code and I have succeeded in ensuring that traders can only trade coin, but it is not finished yet. There is a JS-warning of which I cannot get rid of during initialisation and one can still press the arrows on the trade menu (although that just throws an error and coin is set to 100% again). So it basically works All resources can still be bartered and send to allies though. If you (or someone else) are (is) interested in the code I can upload it here?