Author Topic: XML <speed value="xxx"/> dosnt affect unit attack speed.  (Read 5780 times)

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Title say's it all,

ive tryed changeing theese, but nothing happes, that damn converted archer just keep shooting slow
i got a model of a marine i want to shoot gatling style. could anyone inform me of the correct values/xml syntaxs'es for this?
 
<speed value="9999"/>
<anim-speed value="50"/>
<attack-start-time value="0.0"/>

in advance thanks.
WiP Game developer.
I do danish translations.
"i break stuff"

Mark

  • Guest
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #1 on: 14 August 2009, 02:11:27 »
You have to change the '<anim-speed>' to the same as the speed.  I think that this is a bug. 

Just so you know the game will probably crash or run slow if you have that high attack speed.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #2 on: 14 August 2009, 05:22:08 »
I've done some tests that seem to indicate the the attack speed DOES do something. Forexample, if your attack speed is half the anim speed, you'll attack twice per turn (if the attack costs ep, you'll get two attacks for the price of one). However, this would mean that if your attack speed is higher than your anim speed, you'll attack slower.

And that's your problem. Try having an anim speed three or four times higher than your attack speed.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #3 on: 14 August 2009, 11:04:07 »
Oh, thanks its good that im not the only one who thinks this is wird im gonna test it out :D. and report back here :D thanks guys :D
WiP Game developer.
I do danish translations.
"i break stuff"

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #4 on: 14 August 2009, 11:48:46 »
It isn't necessarily 'weird', but it's concept of how it works isn't well known, and thus it seems alien. Do be sure to tell us how it your test goes.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #5 on: 14 August 2009, 21:41:40 »
yeah, well, as long as i keep the animation the same speed as the attack speed it look fine,(altho the arrow DO dissapear but i think thats a animation problem)
WiP Game developer.
I do danish translations.
"i break stuff"

modman

  • Guest
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #6 on: 14 August 2009, 22:00:24 »
I always thought that attack speed was how rapidly the unit attacked.  Like a machine gun would attack in rapid succession; it would have a high attack speed.

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #7 on: 15 August 2009, 18:00:17 »
Omega, that sounds a little strange imo, wich is also why i have thought bout doing a doc about the xml's :/ since i cant find any documentaion on the XML values, some says it self others certainly not.
WiP Game developer.
I do danish translations.
"i break stuff"

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #8 on: 16 August 2009, 09:38:26 »
Well, to be 100% truthful, I don't completely understand the attack speed. However, based on my observations through various tests, the attack speed can be used with the anim speed to signify the speed of attacks compared to one attack unit (an attack unit being the actual command where it will use EP if needed). However, it still plays the animation once per attack, not per attack unit. So if we have 100 attack speed, 50 anim speed, we may have some trouble. Because 100 goes into 50 0.5 times, yet glest defies math and continues regardless, which leads me to believe that higher attack speed than anim speed is completely useless. However, if attack speed is less than anim speed, it is divided, and it becomes possible to fit in multiple attacks per attack unit. For example, at 100 anim speed and 50 attack speed, we can hit 2 times (100/50) per attack unit. However, this knowledge is pretty useless since it is more practical to use the same anim and attack speed and then adjust both at the same time to modify so.

Bear in mind that other elements affect the physical speed of the attack, such as 'start-time'. IMPORTANT: for reasons unknown, high start time values will cause the attack to be skipped. The limit is at least 1.0, but may be lower.

Also, it may be worthwhile to mention that every attack unit will only use the start-time value once, so if we have the anim speed to 3 times the attack speed (hitting 3 times per attack unit), we will only use the start-time on the first one, and the others are dependant on the attack/anim speed).

I will try to look at the source to figure this out a bit better, though someone with more coding experience would most likely be better at explaining this. Hailstone or Silnarm?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #9 on: 16 August 2009, 13:20:42 »
it fits perfectly in with that im expriceing :D, i think you got it right :D
WiP Game developer.
I do danish translations.
"i break stuff"

modman

  • Guest
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #10 on: 16 August 2009, 23:56:21 »
The start time value is like the amount of time of delay, of reaction time.  So a higher start time means more time for the reaction (slow reaction speed); basically more time before the attack.  I reckon that if there is more time before the attack than between the attack strokes, the attack would be skipped.

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #11 on: 17 August 2009, 02:23:49 »
I've had a peek at this one. It is as Omega's tests suggest. The start-time effectively indicates when the attack will be started, and it is tied to anim speed, not skill speed. These speeds are however completely independent of each other, anim progress is not reset when skill progress is.  So if you had anim speed of 2x and skill speed x, you only get one attack per every two skill cycles. If you have anim speed x, skill speed 2x, you two attacks per skill cycle.

This could lead to all sorts of minor graphical glitches and possible gameplay issues. Having the skill speed an exact multiple of the anim speed will prevent them, but I would recommend just locking the two speeds (same value), and adjusting that to your needs.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #12 on: 17 August 2009, 08:19:18 »
Ah, just as I suspected.

In a related issue silnarm, do you have any idea how glest's speed units work? There seems to be a few types of speed units. For example, time units for how long it takes to produce a unit or upgrade, and speed units on skills such as attack. The two are not related, as time units have bigger numbers mean more wait time, while speed units seem to mean bigger units mean faster speed. I don't suppose you understand how the speed works, or how it compares to real time.

ie: how fast is '100' anim speed? Is this standardized throughout the engine? Ditto, how long is '100' time units?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #13 on: 17 August 2009, 11:10:45 »
I can't tell you anything about the units of measurement.  Production time is indeed a unit of time, though I'm not sure what it's supposed to be (that is, how long one unit is).  'speed' for a skill is a modifier, and indeed makes the skill execute faster or slower... I haven't looked into it that much yet, I'm busy refactoring commands atm, but skills are next on the list... so I may know more soon.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: XML <speed value="xxx"/> dosnt affect unit attack speed.
« Reply #14 on: 18 August 2009, 08:45:03 »
Hmm, I must try some in game tests if I get the time. Might be worth it to know how long a unit is (of course, since it appears to be less than 1s, math will have to be used). Finding it out would be very simple. Just have a  build unit need 100 time, and time how long it takes to build, then divide by 100. However, the difficulty is if the build speed of the worker has any effect. For this purpose, I guess it would need to be biased around a standard, such as the tech worker.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

 

anything