Jump to content

Recommended Posts

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 by nani
  • Thanks 1
Link to comment
Share on other sites

On 19/08/2021 at 11:02 AM, Ceres said:

@nani
Thank you so much for this really cool mod! :thumbsup:

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

  • Like 1
Link to comment
Share on other sites

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 :happy: ty very much

tested in Athenians selecting Athenians Hoplite

 

 

Edited by seeh
Link to comment
Share on other sites

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 :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

  • Like 1
Link to comment
Share on other sites

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 by seeh
  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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#L1185

It remains to find how to merge it with https://github.com/nanihadesuka/autociv/commit/a1daba4d4e4b5ca5a1984dca231bce45d8f470f5

Снимок экрана от 2021-09-05 20-10-00.png

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

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 by captray
Typo
  • Like 1
Link to comment
Share on other sites

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#L1185

It remains to find how to merge it with https://github.com/nanihadesuka/autociv/commit/a1daba4d4e4b5ca5a1984dca231bce45d8f470f5

Снимок экрана от 2021-09-05 20-10-00.png

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)

  • Like 1
Link to comment
Share on other sites

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 helped

https://github.com/nwtour/mod-setdefaultstance
264724888_2021-09-1801-27-46.png.329bbd663ea48cfa07bd071384be3ac3.png

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...