PDA

View Full Version : Double Velocity



FactionHeir
12-30-2007, 16:33
Asking a question for a change after the forum search wasn't quite successful:

descr_projectile gives 2 velocity values for some projectiles.
Other projectiles have only 1 value.

What does the first and second value mean and how does it compare to those projectiles with only 1 value?

And also, does the velocity have any impact on damage calculation at all?

Thanks

alpaca
12-30-2007, 22:50
Could be a range, couldn't it?

FactionHeir
12-30-2007, 22:59
Hmmm that would make some sense actually. But when during projectile flight would the velocity be lower and when higher? And why do only some projectiles have it?

Thinking about it, I suppose you could say that those weapons that can be fired into the sky and eventually drop down should have the two velocity values, but it didn't quite look that way during observation. Of course the difference might be so small (or the speed already so fast) that this is difficult to witness.

Then again, it seems the value for mortars is somewhat different.

Arrows are shown as: 20 48
Mortar is shown as: 55, 30

Does the comma have any significance there?

Also, the gunpowder infantry all have the two velocity values, but the gunpowder cavalry does not. That wouldn't make a lot of sense though since missile cavalry (non gunpowder) does have two values....

:dizzy:

Red Spot
12-31-2007, 09:39
Afaik they show a sort of lower and upper value, try giving like Musketeers a value of say "2 [max they have now]"

from;

projectile musket_bullet

effect bullet_model_set
end_effect bullet_impact_ground_set
end_man_effect man_impact_tiny_set
end_package_effect bullet_impact_wall_set
end_shatter_effect bullet_impact_ground_set
end_shatter_man_effect man_impact_tiny_set
end_shatter_package_effect bullet_impact_wall_set

damage 0
radius 0
mass 0.05
accuracy_vs_units 0.001
min_angle -60
max_angle 70
velocity 60 85
display aimed
effect_only

to;

projectile musket_bullet

effect bullet_model_set
end_effect bullet_impact_ground_set
end_man_effect man_impact_tiny_set
end_package_effect bullet_impact_wall_set
end_shatter_effect bullet_impact_ground_set
end_shatter_man_effect man_impact_tiny_set
end_shatter_package_effect bullet_impact_wall_set

damage 0
radius 0
mass 0.05
accuracy_vs_units 0.001
min_angle -60
max_angle 70
velocity 2 85
display aimed
effect_only

If the guys fire like they are trowing stones when the enemy is near you know what it means ... ;)


G

FactionHeir
01-01-2008, 01:29
I did a few tests so far.

First with range 2 and 80 for arrow but it didn't seem to have any effect (I only seem to notice the 80) neither for direct nor for falling shot. Also not difference with weather (rain/snow)

Then did 30 2 and they shot just as if it were 30, kind of ignoring the 2.

Then I changed it to 2 8 and got this error (m2tw refuses to load)


00:25:40.437 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 3401, column 31
missile range of 6 is impossible with projectile arrow (max range 6)
00:25:40.437 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 3403, column 21
missile range is less than the absolute minimum of 20m
00:25:40.437 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 3403, column 21
failed to read statistic for unit type 'Lithuanian Cavalry'
00:25:40.437 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file data/export_descr_unit.txt.

That's interesting, because that's the very first entry in the EDU using the arrow projectile. The range of velocity I put into projectile was 2 8, meaning 6 difference.
So this suggests that this is some kind of range variable.

Continuing to test.
OK I set the values to 2 20 (which is an 18 range unless I'm wrong) and noticed my archers weren't able to shoot their full range.
Errorlog gave massive output of duplicates:


00:30:10.484 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 3401, column 31
missile range of 40 is impossible with projectile arrow (max range 40)


I suppose this goes back to the formula at the top of the projectile file that incorporates velocity to determine distance. Hmmmm but still this doesn't tell why there are two values...

Did some more tests including letting the enemy end up right in front of the unit as Red Spot suggested (used enemy as voulgier for that). Didn't see any visible difference in arrow speed.
Also don't seem to notice any acceleration difference between 1 75 and 75 75 when the arrow leaves the unit.

AHA! I think I finally found it.
This range is actually important for weapons that can shoot high and low volleys. What I missed in the first few tests was not measuring that particular scenario where both values are the same AND i have a unit standing in front of my archers.

At either example of 30 30 or 75 75, the archers that are blocked by the unit in front of them refuse to shoot at the target but the ones at the flank not blocked will shoot. This means that the lower velocity (and it seems it doesn't matter in which order you put the numbers) will be used to shoot high volleys and if there is no significant range difference between the two values, then the unit will not shoot into the sky at all.
That gun units still have that seems to be a relic from 1.0 days it seems.

pike master
01-01-2008, 06:40
so in other words if this is tweaked right it would fix the skyshot bug?

CannonBall
01-01-2008, 09:40
AHA! I think I finally found it.
This range is actually important for weapons that can shoot high and low volleys. What I missed in the first few tests was not measuring that particular scenario where both values are the same AND i have a unit standing in front of my archers.




Yeah, that's it, and if you test this w/ longbowmen, have them stake their front and no skirmish, if an unit stop in front of bowmen, they will shoot a short parabola just over the stakes at a really low velocity. For mortars, they prefer the higher vel and if you mod the velocity too high, it will not fire at units inside the range that's too close for the given velocity. hope that made sense, writing this drunk. you still need a low enough min vel for units to hit enemy that are close or closing in on unit.

FactionHeir
01-01-2008, 12:47
so in other words if this is tweaked right it would fix the skyshot bug?

Yep.
Just have two same velocity values (or very similar) that would allow the unit to still fire at their max range (and further as sometimes you stand on elevantion) and it will not fire at all if its sight or flight path is blocked.

alpaca
01-01-2008, 22:07
You guys solved this one quickly :bow:

FactionHeir
01-01-2008, 22:13
Figure this might be useful when moved to the wiki section?

Lusted
01-01-2008, 22:45
so in other words if this is tweaked right it would fix the skyshot bug?

You need archers to be able to do that if you want them to be useful on walls. I modded the max angle down for archers in early versions of LTC, but put it back to normal when i realised how useless archers became in sieges.

FactionHeir
01-01-2008, 22:50
You need archers to be able to do that if you want them to be useful on walls. I modded the max angle down for archers in early versions of LTC, but put it back to normal when i realised how useless archers became in sieges.

Angle and Velocity are somewhat different though, although they both contribute to whether and at what rate projectiles can be fired into the sky.

Tweaked correctly, they could shoot into the sky only at certain rates, thus conserving ammunition.
Also, archers can shoot straight down at attackers from the walls if put in a deeper formation I found leaning towards the towers.

Lusted
01-01-2008, 23:07
Tweaked correctly, they could shoot into the sky only at certain rates, thus conserving ammunition.
Also, archers can shoot straight down at attackers from the walls if put in a deeper formation I found leaning towards the towers.

Yes, but those in the back rows and behind the crenellations will not fire at all when the enemy gets within a certain range seriously reducing the amount of archers firing at a time.