nani Posted August 20, 2021 Author Report Share Posted August 20, 2021 (edited) 8 hours ago, Ceres said: @nani Is this something for your mod? It will probably involve simulation code changes (UnitAI) and has some pretty hard edge cases so I say it would be better to be done as an official 0ad feature Edited August 20, 2021 by nani 1 Quote Link to comment Share on other sites More sharing options...
nani Posted August 20, 2021 Author Report Share Posted August 20, 2021 On 19/08/2021 at 11:02 AM, Ceres said: @nani Thank you so much for this really cool mod! Is it possible to add a feature to set a stance for all newly created units of a type? E.g. I would like to have all priests coming newly trained out of a temple (or even already trained and garrisoned priests from any building) automatically set to "aggressive" (because else, they usually flee from the enemy when attacked, leaving their comrades alone, which for me does not make so much sense). If your mod is maybe not the right tool for this, I could ask in another thread of it could be implemented directly in the game. Looks like a nice to have, will look at it 1 Quote Link to comment Share on other sites More sharing options...
nani Posted August 22, 2021 Author Report Share Posted August 22, 2021 version 25.1.2 Added: option to spawn healers with aggressive stance (default off) Fix: Some minor problem with game countdown 2 Quote Link to comment Share on other sites More sharing options...
Ceres Posted August 24, 2021 Report Share Posted August 24, 2021 On 23/08/2021 at 12:22 AM, nani said: version 25.1.2 Added: option to spawn healers with aggressive stance (default off) Fix: Some minor problem with game countdown @Gurken Khan Have you seen this already? Thanks a lot @nani Quote Link to comment Share on other sites More sharing options...
Gurken Khan Posted August 24, 2021 Report Share Posted August 24, 2021 @Ceres Thank you, yes I saw it. My problem is not with setting the stance of healers, but that they still friggin flee on aggressive. Quote Link to comment Share on other sites More sharing options...
Ceres Posted August 24, 2021 Report Share Posted August 24, 2021 Oh, then I misunderstood your report, sorry. But why do they flee when being "aggressive"? @Stan` Quote Link to comment Share on other sites More sharing options...
seeh Posted August 26, 2021 Report Share Posted August 26, 2021 (edited) i tried to select Hoplite with a shortcut. used different selection keyNames (Spearman|Malee|Infantry|Hoplite). @nani could you please look. will make me happy ty very much tested in Athenians selecting Athenians Hoplite Edited August 26, 2021 by seeh Quote Link to comment Share on other sites More sharing options...
seeh Posted August 26, 2021 Report Share Posted August 26, 2021 12 minutes ago, seeh said: i tried to select Hoplite with a shortcut. used different selection keyNames (Spearman|Malee|Infantry|Hoplite). @nani could you please look. will make me happy ty very much tested in Athenians selecting Athenians Hoplite my problem. i just tried to select maybe too much. now i could select them. there is maybe a max number for selecteing 1 Quote Link to comment Share on other sites More sharing options...
nani Posted August 26, 2021 Author Report Share Posted August 26, 2021 On 24/08/2021 at 10:00 PM, Ceres said: Oh, then I misunderstood your report, sorry. But why do they flee when being "aggressive"? @Stan` Probably because is defined in the templates that they always flee (as they can't attack) 1 Quote Link to comment Share on other sites More sharing options...
seeh Posted August 26, 2021 Report Share Posted August 26, 2021 (edited) i try to select a Siege Tower by editing the user.cfg file. i saw inside that hotkey.autociv.session.entity.by.class.select.Siege = "Alt+V" and this is working to select all Siege. My modification also selects all Siege but should select only Tower. hotkey.autociv.session.entity.by.class.select.(Siege&!Ram&!Catapult) = "Alt+T" (my first try was: hotkey.autociv.session.entity.by.class.select.(Siege&Tower) = "Alt+T" Edited August 26, 2021 by seeh 1 Quote Link to comment Share on other sites More sharing options...
Ceres Posted August 26, 2021 Report Share Posted August 26, 2021 2 hours ago, nani said: Probably because is defined in the templates that they always flee (as they can't attack) @Stan` 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 26, 2021 Report Share Posted August 26, 2021 @Freagarach @wraitii @Angen know better than me. I suspect it's this code https://github1s.com/0ad/0ad/blob/HEAD/binaries/data/mods/public/simulation/components/UnitAI.js#L2668-L2669 2 Quote Link to comment Share on other sites More sharing options...
Freagarach Posted August 26, 2021 Report Share Posted August 26, 2021 Yep, that seems to be off. 1 Quote Link to comment Share on other sites More sharing options...
Gurken Khan Posted August 26, 2021 Report Share Posted August 26, 2021 19 minutes ago, Freagarach said: Yep, that seems to be off. Now please don't change it so they also flee on standground. Quote Link to comment Share on other sites More sharing options...
Freagarach Posted August 26, 2021 Report Share Posted August 26, 2021 Just now, Gurken Khan said: Now please don't change it so they also flee on standground. I thought _you_ were going to make the diff? 2 Quote Link to comment Share on other sites More sharing options...
Ceres Posted August 26, 2021 Report Share Posted August 26, 2021 4 hours ago, Stan` said: @Freagarach @wraitii @Angen know better than me. I suspect it's this code https://github1s.com/0ad/0ad/blob/HEAD/binaries/data/mods/public/simulation/components/UnitAI.js#L2668-L2669 Why github1s.com? This is not the official GitHub, right? Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 26, 2021 Report Share Posted August 26, 2021 That's just a vscode browser online. It's convenient to me Point was just showing the line. 1 Quote Link to comment Share on other sites More sharing options...
Ceres Posted August 26, 2021 Report Share Posted August 26, 2021 Again, I have learnt something new and useful here. Thank you so much! WRT to creating a diff, I would like to but lack the knowledge. I have the build and test environment, so I believe I could manually tweak that line and see the results, could I? Quote Link to comment Share on other sites More sharing options...
Ceres Posted August 26, 2021 Report Share Posted August 26, 2021 5 hours ago, Freagarach said: Yep, that seems to be off. That's really all it takes? Quote Link to comment Share on other sites More sharing options...
Freagarach Posted August 26, 2021 Report Share Posted August 26, 2021 2 minutes ago, Ceres said: I have the build and test environment, so I believe I could manually tweak that line and see the results, could I? Yes. If you need more help with using Phabricator or tips for messing with UnitAI, you can come online on IRC. 5 minutes ago, Ceres said: That's really all it takes? From a cursory look: yes. 1 Quote Link to comment Share on other sites More sharing options...
nwtour Posted September 5, 2021 Report Share Posted September 5, 2021 The default stance is a requested feature. I have to click on each type of unit: ram aggressive, archers defend, medics passive. It would be great to implement setting default stance for each type of unit. IMHO best place in unit type tooltip (Available in-game and in Structure tree) Stance buttons:https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/gui/session/selection_panels.js#L927 Place in tooltip: https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/gui/common/tooltips.js#L1185It remains to find how to merge it with https://github.com/nanihadesuka/autociv/commit/a1daba4d4e4b5ca5a1984dca231bce45d8f470f5 3 Quote Link to comment Share on other sites More sharing options...
captray Posted September 16, 2021 Report Share Posted September 16, 2021 (edited) F4 doesn't open anything but I can everything is installed correctly. No other mods. Shift+F4 works but nothing happens when I press F4 please do help. Latest 0ad. and latest Autociv from github. Especially created an account to ask for help. Edited September 16, 2021 by captray Typo 1 Quote Link to comment Share on other sites More sharing options...
nani Posted September 17, 2021 Author Report Share Posted September 17, 2021 On 05/09/2021 at 7:26 PM, nwtour said: The default stance is a requested feature. I have to click on each type of unit: ram aggressive, archers defend, medics passive. It would be great to implement setting default stance for each type of unit. IMHO best place in unit type tooltip (Available in-game and in Structure tree) Stance buttons:https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/gui/session/selection_panels.js#L927 Place in tooltip: https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/gui/common/tooltips.js#L1185It remains to find how to merge it with https://github.com/nanihadesuka/autociv/commit/a1daba4d4e4b5ca5a1984dca231bce45d8f470f5 That was one time hardcoded feature, for a general case I not sure I could pull it off as a mod and seem too much work/reward ratio. Better ask official team. On 16/09/2021 at 3:14 PM, captray said: F4 doesn't open anything but I can everything is installed correctly. No other mods. Shift+F4 works but nothing happens when I press F4 please do help. Latest 0ad. and latest Autociv from github. Especially created an account to ask for help. F4 does nothing in the latest version (also told in github) 1 Quote Link to comment Share on other sites More sharing options...
nwtour Posted September 17, 2021 Report Share Posted September 17, 2021 2 hours ago, nani said: That was one time hardcoded feature, for a general case I not sure I could pull it off as a mod and seem too much work/reward ratio Ok. If you suddenly change your mind, I threw in the code that was trying to implement this function (though it is not working - It turns out that Engine::ConfigDB cannot be accessed at the time of loading). I will be once if something from my code helpedhttps://github.com/nwtour/mod-setdefaultstance 1 Quote Link to comment Share on other sites More sharing options...
Freagarach Posted September 18, 2021 Report Share Posted September 18, 2021 5 hours ago, nwtour said: It turns out that Engine::ConfigDB cannot be accessed at the time of loading How would it look when you have a default stance passive at unit creation time, but your adversary had violent? That is why we don't access user settings in the simulation. One could pass the default stance as metadata to the training of the entity. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.