Log in

View Full Version : How to add smoke to a projectile?



Duke John
03-14-2005, 17:42
I added smoke to a projectile with version 1.1. But with 1.2 I can no longer use the same edits. I did add smoke to artillery by adding an effect (note not a end_effect) in descr_projectile_new.txt:

projectile boulder

effect boulder_explosion_set
end_effect boulder_explosion_set
damage 70
damage_to_troops 8
radius 0.3
mass 0.1
area 2.0
accuracy_vs_units 0.09
accuracy_vs_buildings 0.0625
min_angle 0
max_angle 70
velocity 60
bounce 0.5 0.6 0.5 0.4
display aimed
effect_only
In descr_arrow_trail_effect I changed the boulder_explosion_set so that it contained only 1 effect:

effect_set boulder_explosion_set
{
lod 1000
{
;boulder_explosion_01
;boulder_explosion_02
;boulder_dust_explosion
boulder_dust_explosion2
}
}

Then the effect itself. I edited so it only contained one debris model. And the parameters are changed so that the effect does not last long.

effect boulder_dust_explosion2
{
type explosion
{
; dust explode
model models_effects/explosion_dust2.cas
anim_time 0.5
max_scale 0.1
max_particle_scale 4
scale_time_bias .9
alpha_time_bias 0.6

; debris
debris_model models_effects/explosion_dust2.cas
debris_num_particles 1
debris_lifetime_range 2.2, 15
debris_emit_angle 80 ; degrees
debris_time_bias 0.9
debris_velocity_range 1.01, 1.05
debris_scale_range 6.4, 7.6
}
}
The above works for artillery, but when applied to infantry it shows the smoke for a fraction of a second before the game CTDs. This wasn't the case in 1.1, so I guess the code was changed concerning projectiles (something to do with the flaming arrows?).

So does anyone know how to add smoke to infantry, or could someone from CA shed a light on this?

It would be perfect if we could add a smoke that stays floating in the air around the model before disappearing. But the first part of the effect (dust explode) is attached to the projectile so it moves forward very fast, while the second effect is affected by gravity so it comes down, while it should slowly drift upwards. Jerome? :wink:

Thanks,
Rob

Lord Zimoa of Flanders
03-18-2005, 10:19
We ask the community for some help here, as RTW logically lacks a firearm unit it has to be created from scratch.
We are working on a firing animation, try to get the smoke working, and would love to have rotating firing ranks and the possibility to volley-charge.
Some of these will probably be sorted but it will take time, a lot of time, and some, like the rotating firing ranks, are hard-coded.
My point and request toward the community and especially CA and Activision is, could you give us a hand here.
It would make the RTW engine the perfect platform for a wide variety of modifications, and many current and future projects would benefit from it.
The Japanese, Medieval, and all mods covering from the 15th to 19th century need a firearm unit.
This means the RTW game will, like its predecessors, have a prolonged life on the strategy gaming market.
First the quality and ingenuity of the Total War series is responsible for it's success, but the wide variety and quality of the modifications made by this community for the Total War platform has definitely contributed to the ongoing interest.
Even today people buy one of the older versions, just to be able to play one of the many good modifications.The same will over time happen to the RTW platform.
So again we ask the modding community and especially CA and Activision to give a helping hand and make our lives a little bit easier.
Please give us some help to create a good firearms unit, it will benefit us all.

Kind regards,

LZoF

Uesugi Kenshin
03-19-2005, 03:11
Godspetmonkey has managed it. Check out this https://forums.totalwar.org/vb/showthread.php?p=721063#post721063 thread for some screenies.

GodsPetMonkey
03-19-2005, 11:38
Easily fixed!

set debris_num_particles to 0!

Thats it, loves to crash when you start spitting out a large number of debris (as happens when 60 men fire at once).

Lord Zimoa of Flanders
03-19-2005, 11:42
Many thanks you're a true Gentleman, did you already try using the phalanx formation as suggested by someone on the Citadel TW forum?

LZoF

GodsPetMonkey
03-19-2005, 11:49
Many thanks you're a true Gentleman, did you already try using the phalanx formation as suggested by someone on the Citadel TW forum?

LZoF

No problems, I don't check these parts of the forums enough, nor my email it seems.

Well, setting it to use phalanx would arm them with spears (not very useful), so unless I overhauled the animations and models which the phalanx units are given via that attribute, its not much use.

But I am guessing (and this is a very educated one) that even if I got them to shoot the firearms properly in phalanx mode, the effect would mean be the same as setting them to hold thier ground, they just keep their tight formation, as soon as unit X is in range, it will attempt to fire at it (juts like in phalanx when unit X is in range of the spear/pike it will attempt to stab it).

Lord Zimoa of Flanders
03-19-2005, 12:06
Another one now that we are at it, it seems that rotating ranks are impossible to implement without some code changes(we hope CA will help the community with this one), what are your thoughts on this one, is there another way?
And what are your thoughts on volley fire?

LZoF

GodsPetMonkey
03-19-2005, 12:36
Another one now that we are at it, it seems that rotating ranks are impossible to implement without some code changes(we hope CA will help the community with this one), what are your thoughts on this one, is there another way?
And what are your thoughts on volley fire?

LZoF

I think both need some code changes by CA.

I believe that RTW just uses some random delay generator to prevent ranged units from all firing at one instant, giving us the 3 second window of shooting we have now, all we really need is for them to give us a weapon attribute which overrides it (or sets it to 0) and problem sovled... even better, let is set the max delay (so rather then 3 seconds, 0.5 seconds).

Rotating ranks though, there is no chance of that working short of CA giving a major helping hand... and unfortunately I don't see it happening, unless someone feels pitty for us whilst working on the expansion. There is nothing even remotely close in the game, that we know of atleast, so we cant do what we did with gunsmoke, and cheat our way to a solution.

Lord Zimoa of Flanders
03-19-2005, 12:44
Well it seems we came to the same conlcusion, let us hope and pray CA will give us a hand in this matter.
Thank you to share your thoughts here with us, we deeply appreciate your input.

Kind regards,

LZoF

GodsPetMonkey
03-19-2005, 12:50
Always glad to help. Us modders need to work together, regardless of what mods we are working on ~;)

Lord Zimoa of Flanders
03-19-2005, 12:53
Exactly our thoughts.~;)

LZoF

Lord Adherbal
03-19-2005, 13:21
well even tho it would look cool, that rank rotation thing is only a visual matter. It doesnt have an influence on the gameplay if you balance the units right.

I've tried to get smoke working myself a couple of weeks ago and ended up with the samee conclusions as JD. The "dust" effect caused by marching troops would be ideal for the gunsmoke effect, but I haven't found a way to link it to shooting projectiles.

Sundjata Keita
03-19-2005, 13:37
Can someone write a simple guide for how to do this. I have been trying myself before but have not got it to work yet. Thanks.