Jump to content

How to make your Units run instead of walk?


Frederick_1
 Share

Recommended Posts

Hi,

after playing 0AD for a while, I still have not found out, how to make a unit run instead of walk? It is so annoying when your Base is under attack and you loose your entities, because attackers run, while your people move like on a sunday afternoon walk, and do not reach civic center fast enough.

Link to comment
Share on other sites

  • 3 months later...

I think it is true for woman. Watching their movents for a while I can confirm this.

For men it seems to me to be somewhat different, but it seems to me they respond with running to an attack. So they run fast in the fire area of an enemy tower, but leves only slow when I call them back. Putting them to passe seems not to make any difference.

Link to comment
Share on other sites

You're right about the women because those are units with a default passive stance. A passive stance unit only starts running once it is actually attacked and hit, but the exact behavior also depends on the command it is following at that time. The attacking unit also starts running when hitting and following a passive unit.

Other than women, healers are also passive by default. If you actually set soldiers to passive, they will act the same too. Anyway, you can still order a passive unit to attack an enemy unit (if it is capable of attacking), and the attack will take precedence over running away. When a unit is working on an economic task, it will try to run away when attacked but then return to that task.

  • Thanks 1
Link to comment
Share on other sites

Actually I noticed different behavior the other day. Four women were building a storehouse when attacked by a couple of lions. They did not run or fought the lions but continued building.  When I finally saw what was going on I ordered them to attack and they did. 

This was due to the passive stance I figured but it still seemed strange. Running would be the logical action because of the stance but why not fighting because they were attacked by Gaia, not a soldier? Citizen soldiers like cavalry fight animals when they are hunting. Don't know if this classifies as a bug but could be adjusted imo.

  • Thanks 1
Link to comment
Share on other sites

units run or walk faster when they are not carrying resources or when they are passive. You can hold ctrl + right-click to set to passive , in this case the units will discard any resources and start attacking anything nearby ( enemies precisely ). You can do the same thing when theres no enemies and they will run instead of walking even when they are holding resources. Hope this answers your question ::cheers:

Link to comment
Share on other sites

  On 09/07/2022 at 3:06 PM, rollieoo said:

Actually I noticed different behavior the other day.

Expand  

You didn't notice a different behavior. And no, it's not a bug when a unit with a passive stance doesn't automatically attack.

  On 09/07/2022 at 4:51 PM, rossenburg said:

units run or walk faster when they are not carrying resources or when they are passive. You can hold ctrl + right-click to set to passive , in this case the units will discard any resources and start attacking anything nearby ( enemies precisely ). You can do the same thing when theres no enemies and they will run instead of walking even when they are holding resources. Hope this answers your question ::cheers:

Expand  

It doesn't answer the question because you are making stuff up.

Link to comment
Share on other sites

  On 09/07/2022 at 4:51 PM, rossenburg said:

units run or walk faster when they are not carrying resources or when they are passive. You can hold ctrl + right-click to set to passive , in this case the units will discard any resources and start attacking anything nearby ( enemies precisely ). You can do the same thing when theres no enemies and they will run instead of walking even when they are holding resources. Hope this answers your question ::cheers:

Expand  

yeah that's not true

Link to comment
Share on other sites

  On 09/07/2022 at 6:27 PM, Boudica said:

You didn't notice a different behavior. And no, it's not a bug when a unit with a passive stance doesn't automatically attack.

It doesn't answer the question because you are making stuff up.

Expand  

no I'm not making things up, I don't know if I'm the only one this hotkey works for but holding control + right-clicking should discard whatever the units are holding ( metal , wood or anything ) that's making them walk instead of running. This hotkey actually makes the units attack anything that's closer to them. When there's no enemy nearby they should run as expected. Note: not all units run, slingers , archers etc mostly do the running, pikemen and women may walk a little faster than holding resources. In the video attached, units have resource yet still they could run when i hold control key + right-click. 

Edited by rossenburg
Link to comment
Share on other sites

  On 09/07/2022 at 6:54 PM, rossenburg said:

no I'm not making things up, I don't know if I'm the only one this hotkey works for but holding control + right-clicking should discard whatever the units are holding ( metal , wood or anything ) that's making them walk instead of running. This hotkey actually makes the units attack anything that's closer to them. When there's no enemy nearby they should run as expected. Note: not all units run, slingers , archers etc mostly do the running, pikemen and women may walk a little faster than holding resources. In the video attached, units have resource yet still they could run when i hold control key + right-click. 

 

Expand  

can't you see they move at the same speed, and also they don't actually drop the res, they just "hide" them, and take them out again when they stop. ranged infantry units always move faster than melee, irrespective of resources carried.

edit: by the way that hotkey works for everyone (I hope) as it's very important for high level play. it's called attack-move.

Edited by alre
  • Thanks 1
Link to comment
Share on other sites

I must say I actually appreciate trying to support your point with a video. That shows you don't intend to spread misinformation. I briefly tested what you initially claimed, even though I was pretty sure I know what the game does. Well, alre already explains what is happening there. Perhaps the walking animation is a bit confusing specifically with these Iberian soldiers, but this really seems to be the walking speed. I also tried to test if there is a speed difference between units with and without resources, and I noticed no difference.

So like alre said, the animation with a sword belongs to the attack move (when the unit pauses it's movement to first attack any nearby units or structures). And the carried resources are still seen in the bottom pannel and they even reappear when you order a normal move. The only time the resources get dropped is when you start gathering a resource of a different type.

 

  • Like 1
Link to comment
Share on other sites

  On 09/07/2022 at 7:29 PM, Boudica said:

I must say I actually appreciate trying to support your point with a video. That shows you don't intend to spread misinformation. I briefly tested what you initially claimed, even though I was pretty sure I know what the game does. Well, alre already explains what is happening there. Perhaps the walking animation is a bit confusing specifically with these Iberian soldiers, but this really seems to be the walking speed. I also tried to test if there is a speed difference between units with and without resources, and I noticed no difference.

So like alre said, the animation with a sword belongs to the attack move (when the unit pauses it's movement to first attack any nearby units or structures). And the carried resources are still seen in the bottom pannel and they even reappear when you order a normal move. The only time the resources get dropped is when you start gathering a resource of a different type.

 

Expand  

y, i understand now

Link to comment
Share on other sites

  On 09/07/2022 at 8:43 PM, m7600 said:

The best way to settle debates such as this one is to just look at the code (or the script, in this case). Just saying.

Attack-move can be found in the file unit_actions.js, specifically in the lines 97-148. If you look at those lines, there is nothing there that indicates that attack-move changes the speed of the unit, in any way.

Expand  

Nice tip, but not a good wording. As if you prove right there that it wasn't the best way to settle the debate. First of all, it requires both parties to understand the code. Second, you can't just take one snippet like this and post it as a proof. The specific values for speed etc. are composed from templates from various places. This snippet doesn't even define what the individual commands do.

Link to comment
Share on other sites

  On 09/07/2022 at 9:45 PM, m7600 said:

I take it that you're the quality control guy 'round these parts?

Expand  

Do you like labels a lot? If the fact that you make a false statement and I correct makes me a "quality control guy", then yes, I probably am a quality control guy.

I was talking about the XML files (but also the code that works with them). And what is your point now? That we have to go through the entire codebase to make sure there is nothing that changes the unit speed in our case? And you are trying to push this idea as the best way to settle a debate?

I was treating you nicely when I called that "bad wording" instead of just a bad idea introduced by a wrong statement. And I see you are now trying to make this about myself, while it was your suggestion that was just bad. Yes, insert some irrelevant quotes instead of any reflection.

 

  • Like 1
Link to comment
Share on other sites

I guess I'm one of the "quality control" guys here, so I'll put in my dime.

Units start running when they start fleeing, as described here: https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js#L2003. They also run when chasing an enemy that flees (https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js#L2310), but only after they've been attacking them before (legacy, don't ask me why; okay, since you do ask me, it is because running immediately would allow you to run accross the whole map to get somewhere quickly).

Searching that file for "this.SetSpeedMultiplier(this.GetRunMultiplier());" reveals those are the _only_ occurances (of something that should be called "this.Run()"; I feel a patch boiling up). I do have to note that there are "cheats" to allow units to run besides this, but I'll leave that to the interested reader.

  • Like 2
Link to comment
Share on other sites

  On 09/07/2022 at 10:50 PM, m7600 said:

Lol. Let me rephrase that: I take it that you're the humorless guy 'round these parts?

I guess I'll just have to explain the obvious. What I said before was to your point. In other words, you were right, attack move doesn't increase the movement speed of the units. I find it odd that someone like you who fancies themselves as a master debater couldn't see that.

And yes, looking at the code (or script) is the best way to settle a debate about number crunching. What's the alternative? To look at the game and just try to see if the units move faster or not? Sounds less exact than just looking at the actual functions and numbers, IMHO.

Expand  

So now you're trying to rephrase your condescending post as a joke? Now that might be something that needs explaining.

Anyway, the obvious didn't really need to be explained. One reason is that we had already easily and conveniently tested what we needed before you entered the discussion. But the main reason is that your contribution didn't really show more than that you weren't able to find anything related in the code. That is not the better or more exact way because... there could be something somewhere else in the code, right? How about instead of explaining the obvious you just focus on understanding the explicitly stated first?

See how Freagarach contributed information about the code. Noticed any difference? Focus on how he introduced his post. That is a fun introduction, but doesn't call other people names and he only makes fun of himself. Then he references specific code parts to support his written point. Isn't it the opposite of just randomly linking the first file that had attack-move in it and acting smart about it? Take notes.

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