Jump to content

How can I make new stances?


wowgetoffyourcellphone
 Share

Recommended Posts

The game only need 3 stance to select for players:

Stand Ground

  • Only respond to melee attacks directed at them. They will not respond to ranged attack
  • Does not automatically attack anything within vision range, unless being attacked by melee enemy
  • Does not chase enemies at all, unless player targets the unit to chase (then the unit switch to defensive)

Defensive

  • Automatically attack enemy who come within 25% of vision range
  • Only chase enemy target to outside of 50% vision range, then stop chase

Aggressive

  • Attack all enemy who comewithin 75% of vision range
  • Only Chase enemy target to 100% (edge) of vision range, then stop chase

All other behavior and stance can be hidden (like Avoid, etc., which are default behavior of some unit).

The current behaviors of Defensive and Aggressive cause bad gameplay behavior. It is also useless to choose btween Violent and Aggressive, so I want to get rid of Violent. Passicve is useless when you can choose Stand Ground instead. Defensive just act weird, and Aggressive is too aggressive by attacking and chasing enemy within 100% of vision. I think my changes will make unit easier to control in a battle or in generral.

So, does anyone know the step to take to make this reality?

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

I know most of the behaviour is defined in UnitAI, so that would be my first step to check out (unless things have changed over the past year or so). The other change would relate to the GUI, so only three options are shown. I guess it suffices to simply omit two of the current five stances.

Finally, there may be changes necessary to unit templates as those templates may set a default. If the name/string doesn't match, that may cause trouble of course.

Link to comment
Share on other sites

The rules you propose with different distances will be very computation intensive. It means instead of one distance, the range manager will have to test for 4 distances. So effectively causing 4 times as many calculations. Of course it would be possible to optimise this in some ways (as the circle distances are concentric, so if it's in the innermost distance, it's in all distances), but this would need code changes to the engine (which can't be done by mods).

Changing the stance GUI, up to setting the stances in UnitAI indeed isn't that hard. but then stances are used all-over in UnitAI, which means you'd have to modify a lot of functions if you really want to change how stance work.

Link to comment
Share on other sites

I am sorry Sanders, yout first post make me seem like you say it was difficult or the optimizations would still make it expensive.

I think such ranges can be optimize further if game have battalion since whole battalion (multiple soldiers) can have 1 range, but maybe there are other range calculation I am not thinking of as well that battaltions would not help optimize.

Edited by wowgetoffyourcellphone
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...