I have absolutely no idea about how ti implement a new unit so my best try is to wait from an answer from him. Thanks anyway.
Printable View
I have absolutely no idea about how ti implement a new unit so my best try is to wait from an answer from him. Thanks anyway.
I added the grape_shot in TATW.
TATW already uses all files from the last version of kingdoms so all I had to do was follow this adding the missing entries, added the grape.cas file, and added the following lines to the dwarven catapult in TATW export_descr_unit.txt:
so the EDU section of dwarven catapult now has a third stat section, like the NE bombard.Code:stat_ter 65, 3, grape_shot, 320, 10, siege_missile, artillery_gunpowder, blunt, none, 26, 1
;stat_ter_ex 0, 0, 0
stat_ter_attr ap, launching
I also changed the descr_area_effects.xml file, the entry was:
and I changed it toCode:<projectile_number>60</projectile_number>
So now the attack is devastating and can kill 3 or 4 trolls with a single shot. This numbers correspond exactly to what the name says, its the amount of rocks thrown. Actually, with 260, the grape shot now really makes sense as it is really advantageous and not just a aesthetic feature. Finally catapults will have a proper usage against units in med2 engine.Code:<projectile_number>260</projectile_number>
Everything works absolutelly fine. Wish all modding stuff would be simple like that. :thumbsup2
Modding has it's moments :yes:
Ive added really cool stuff to my sub-mod. grape shot, a new custom made mortar shot, like vanilla but flaming and with proper models and effects, an Isengard bomb fired by a catapult.
I also made nice things with the catapult abilities, so the dwarf catapults has now 3 fire types, normal, the mortar one and the grape shot one, each one with its own button. :D
Take a look on my sub-mod, on my signature.
I was writing a tutorial about it but got so tired that I gave up.
Anyway after my files are released people can simple take a look and see how I did, its actually quite simple.
Does anyone know if there's a way to get 3 (or more) different projectile types on non-siege units? For example a bow with different types of arrows you can cycle through.
Non siege units need at least one melee setting, which leaves two projectile settings, usually regular and flaming.
Why the grape shot has no effect against buildings? The projectiles just pass through it causing no damage.
How can I make the grape shot to actually causa damage to towers and gates?
Have a look at your projectile's setting in descr_projectiles (Figure 1) - very likely the value for building damage is set pretty low. I am no expert on the projectile setting itself but I think the moment you define troop damage the regular damage is either diminished or you need to define building damage.
There is no damage_to_buildings line, only damage_to_troops.
If you mean the damage line. Its not it, I tried increasing it and got no results.Code:damage 120
damage_to_troops 10
Been trying with the descr_projectile file for a while but got nothing.
My guess is that it has something to do with the projectile model/animation.
Disable\remove the troop damage line and then test again. The area effect (dispersal of projectiles) might also reduce the damage.
Hmmh.....
How about the values of the projectile used in the area effect, eg musket_bullet in Figure 2? Come to think of it would be more logical that those values are used - but then I have seen weirder things :tongue:
In your tutorial in the first post of this thread you used grapeshot as a stat_ter. Do you know if the AI ever uses ter attacks? I have grape shot in my sub mod in a unit and it is also ter but I actually never checked if the AI uses it.
OK thats confusing.
In descr_projectiles there is grape_shot and there is grape_bullet.
grape_shot is the Missile type fired, you use it in export_descr_unit stat line. It seems to be liked to its entry in descr_area_effects.xml file.Code:projectile grape_shot
;effect bombard_set
end_effect ground_impact_bombard_set
end_man_effect man_impact_catapult_set
end_package_effect wall_impact_medium_set
end_shatter_effect ground_impact_bombard_set
end_shatter_man_effect man_impact_catapult_set
end_shatter_package_effect wall_impact_medium_set
damage 120
damage_to_troops 10
radius 0.3
mass 1.0
area 2.0
accuracy_vs_units 0.0725
accuracy_vs_buildings 0.0455
accuracy_vs_towers 0.025
min_angle -15
max_angle 25
velocity 20 50
bounce 0.01 0.01 0.93 0.5
grapeshot
; self_explode <prob> <min sec> <max sec> [<area effect>]
self_explode 1.0 0.1 0.1 grape_shot
display aimed
;effect_only
; Stuck model not used at the mo, shatter effect is better, but adding some shatter debris for ground impact would be good?
;stuck
effect_only
projectile grape_bullet
effect grape_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 30 85
grapeshot
display aimed
effect_only
grape_bullet is inside the grape_hot entry in descr_area_effects.xml file.
I've replaced the values of this grape_shot area effect in descr_area_effects.xml (which includes the grape_bullet line) with the ones from ordinary catapult shot and finally got the grape shot stones to actually hit buildings. You can see them colliding against the walls, with proper dust effects and sound.
BUT STILL NO DAMAGE IS CAUSED!
stat_ter = that's the third projectile selection (regular, fiery, exploding\dead cow\this one)
Just looking at the last line of the grape_bullet: 'effect_only' - that could mean that the grape_bullet damage entries are being ignored and the values from grape_shot are being used.