View Full Version : Models with Weapons?
I swear I saw a thread about this somewhere in these long forgotten, dark, evil, endless archives... but for some reason I can't find it. Maybe I thought I'd found a thread about it but in fact I hadn't. :laugh4:
(probably the case, but still... . .)
Anyway, in the model's text files there's a category named weapons, I fiddled with them (well, just looked at them) but I can't seem to find a link between the weapon's number and the projectilestats.txt entry. Can anybody help me?
Thanks for any info. :2thumbsup:
macsen rufus
02-19-2008, 12:41
You won't find a link, as there isn't one ~D
The weapons.txt defines the coordinates of the weapons drawn on the texture BIF file (in the low-res version), and incidentally the shields.txt does the same for shield images.
If you have BIFReader, open up one of your low-res BIFs, and select the pointer tool (makes sure you don't do anything untoward by accidentally clicking anywhere :2thumbsup: ), and then point it at the image and read off the coordinates in the main box. Compare this to the weapons.txt. This will show you which weapon is which in the list, obviously numbered 1 to whatever from the top.
The format is:
x1,y1,x2,y2,w,z
where x1 is the left-hand end, y1 is the top, x2 is the right-hand end and y2 the bottom. This effectively describes the image rectangle that contains the weapon. The the unit's own file unit_name_W.txt will contain a number (or possibly two) which says which weapon from this list is to be used.
w and z define the proportioning of the weapon, so you will often see a pike and a spear both using the same image rectangle (ie a long stick with a sharp bit on the end), but the spear will have x1,y1,x2,y2,3,1, whereas the pike will read x1,y1,x2,y2,5,1 - this tells the game that the respective lengths are in a 3:5 ratio. The same process is used to define different sized axes for eg crossbowmen and militia sergeants etc. The weapon is then placed on the animation in battle according to the coordinates defined in the textures/men/items/weapon#/unit_name folder
The projectile stats just defines the properties of things flying through the air, so the projectile type is defined by name in the unit_prod "projectile type" column, and read off the list in the projectilestats.txt.
And yes there is a thread about this somewhere, but it has lost its images which illustrate it all.
EDIT: This one (https://forums.totalwar.org/vb/showthread.php?t=26415) :2thumbsup:
No, I know all that! :smug2:
I was talking about 3D models - towers, walls, gates, keeps, houses - those sort of models... Sorry if I didn't make myself clear in my first post.
macsen rufus
02-20-2008, 12:46
Ah... in that case I don't honestly know, all I know is that projectilestats includes entries for things like "arrow_from_model" which I always assumed to be those which fire out from walls and towers etc... but I've not delved there. There was a discussion about modding the models (walls etc) in the Samurai mod sub-forum, as I seem to remember a report of trees that started firing arrows during someone's experiments :laugh4:
Perhaps this post in the repository,
https://forums.totalwar.org/vb/showthread.php?t=64335
Are you interested in modding the 3d models or just the stats?
I've taken a quick look at the 3xx format and it seems sort-of straigtforward, consisting of
- two lists of vertices (count + n * x,y,z)
- a list of triangles (count + n * 3 * references to verices + texture positions)
All numbers are 32 bits, but there's something odd about them, I'll have do some more research.
Fenir wrote a nice guide about editing MTW, there are also chapters about weapons: https://forums.totalwar.org/?q=node/45
Edit: sorry for not reading better first, that's the same content from Wellington, but put together into one document by fenir.
Oh weapons to 3D models, Puzz3D for one should know a bit about that as he worked on castle walls.
Guess work:
0 longbow
1 shortbow
2 mountedlongbow
3 arquebus
4 handgun
5 ninjastar
6 javelin
7 grenade
8 crossbow
9 arbalest
10 ballista
11 catapult
12 trebuchet
13 mangonel
14 bombard
15 culverin
16 demi-culverin
17 siege-cannon
18 demi-cannon
19 mortar
20 serpentine
21 organ_gun
22 torch
23 arrow_from_model
24 bolt_from_model
25 bullet_from_model
26 flaming_arrow
27 flaming_rock
28 flaming_trebuchet
29 flaming_mangonel
30 boiling_oil
31 dart
32 heavy_spear
The gun tower.txt in Models\Western European\Gun Tower reads
Weapons 25 12 that would be bolt from model and (?) The second digit means amount of ammo? Is bullet from model, makes sense.
Castle wall has 23 18. 23 is arrow from model makes sense.
Balista tower is 11 12. 11 is catapult in the list. :(
Catapult tower is 12 12. 12 is trebuchet. :(
Gate is Weapons 24 18. 24 is bolt. The boiling oil is listed too, but not as nr. 30. Is the bolt the gate's primary weapon?
A search weapon* model* results:
https://forums.totalwar.org/vb/showthread.php?t=64335&highlight=weapon%2A+model%2A
https://forums.totalwar.org/vb/showthread.php?t=50328&highlight=weapon%2A+model%2A
https://forums.totalwar.org/vb/showthread.php?t=46546&highlight=weapon%2A+model%2A
0 longbow
1 shortbow
2 mountedlongbow
3 arquebus
4 handgun
5 ninjastar
6 javelin
7 grenade
8 crossbow
9 arbalest
10 ballista
11 catapult
12 trebuchet
13 mangonel
14 bombard
15 culverin
16 demi-culverin
17 siege-cannon
18 demi-cannon
19 mortar
20 serpentine
21 organ_gun
22 torch
23 arrow_from_model
24 bolt_from_model
25 bullet_from_model
26 flaming_arrow
27 flaming_rock
28 flaming_trebuchet
29 flaming_mangonel
30 boiling_oil
31 dart
32 heavy_spear
Bah! Of course, Tosa - you're a genius! You forgot the projectile none. Which is right up the top. If that were zero and heavy_spear were 33, it'd match up perfectly. Don't even ask why I didn't see this before. And the second number being ammo, it'd make complete sense. Well, I think, I'll have to check all of this. Also, I don't think castle walls fire arrows, they "fire" torches. That's why when you have infantry up next to a wall, you see torches flying all around.
If it is all correct - I've just made a fool of myself for posting this thread, if it isn't - I've made a fool of myself by posting this reply.
That probably makes no sense to you, don't worry. Kindly disregard these last few lines and continue as if nothing had happened. ~:joker:
Hang on, are you sure that the gun-tower has weapon 25? That means it'd fire (according to this new list) bolts. Hmm...
macsen rufus
02-21-2008, 10:11
Hang on, are you sure that the gun-tower has weapon 25? That means it'd fire (according to this new list) bolts. Hmm...
Well, consider that when you see a gun tower in action it seems to create those little puffs of dust just the same as ballista bolts hitting the ground :2cents:
Are you sure that couldn't just be your ballista towers firing at the same time as your gun towers? :laugh4:
It makes sense Raz, but no worry: we're just guessing to get the ball rolling. Being afraid to say something odd isn't going to help us.
I included none at first and made that zero, but then walls were firing torches. I recall only soldiers threw torches when they came up to a wall and walls fired bolts.
I guess we just have to try, you can probably exaggerate something in the projectile stat to prove it's using on or the other. But that's not bulletproof either.
In STW I increased the size of arrows a lot to see better how they actually fired. Bullets couldn't be increased in size. I'm not sure about the possibilities here.
When you think you found your projectile, you could increase its power a lot, increasing the blast radius may work too. You can make trebuchets that will kill everything (except the generals as they have 2 hitpoints) on a huge map using only one shot. Or just increase it's power a lot, also increase the armour of a target a lot and see whether it still kills at a good rate. There are catches there too: in STW the ninja star ignored the armourlevel of a unit, it seemed to perform equally well vs armour 1 monks and armour 10 nodachi.
You can deduce and guess a thing or two from reading TW files, but you have to check very well whether it also works that way (inactivated, not implemented, exceptions).
cegorach
03-04-2008, 13:57
Great topic !
It gives me more than one ide to use for my own project/-s - even shooting trees might have their uses....not to mention wagons.:yes:
Ahh, I see where you are getting at cegorach. What about some houses with hidden soldiers inside? :wink2:
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.