-
spearmen with secondary CTD
ive been having a problem with spearmen who have a sword as a secondary weapon. if i dont give them the phalanx formation option then they cause a CTD once they ingage in close hand to hand combat. ive come to the comclusion that archers, legionary type units, mounted units, and phalanx units are the only unit types which the game will alow. anyone have any ideas.
-
Re: spearmen with secondary CTD
Yes it is it....you cannot give a spearmen ( primary weapon) a sword as secondary...they will CTD unless it's Phalanx,very stupid...but you can give a spear as "secondary weapon" to a Javelineer,instead of the sword,anyway you have to change the Cas,delete the sword,give a spear and remap it for the texture,otherwise it will be invisible... :bow:
-
Re: spearmen with secondary CTD
Hey!
Legionario, can you explain that better.
I am having some problem in transforming Carthaginian town militia in a javelin/spear unit.
What do you mean with “remap it for the texture”? Do you mean that the skin file doesn’t fit?
-
Re: spearmen with secondary CTD
I posted my new thread without reading this first and it sounds likee a very similar issue, so if anyone could explain furhter you have an audience of at least two... :)
https://forums.totalwar.org/vb/showthread.php?t=43481
-
Re: spearmen with secondary CTD
I don't know about javalin/spear combo, but what I have seen is if you give a spear unit a secondary melee weapon and that unit is not set to phalanx then you get CTD...
I personally have not tried giving a missile unit a spear as their secondary weapon, but is worth checking out my thread above for some CA dev advice (it really helped me!)...
-
Re: spearmen with secondary CTD
Quote:
Originally Posted by Legionario
Yes it is it... you cannot give a spearmen (primary weapon) a sword as secondary... they will CTD unless it's Phalanx, very stupid.
Ahum. You can give most units a secondary weapon, which you do by filling in a non-zero attack value in that unit's stats in export_descr_unit.txt, but you also have to make sure that the model (.cas files) used by that unit actually has a secondary weapon (not entirely sure what will happen if it doesn't - possibly the model will just display without a weapon when it's using secondary), and that the model type description in descr_model_battle.txt properly lists a second skeleton for the secondary weapon.
Units which cannot have a secondary weapon are those where the secondary weapon stats are already used for something else: dog handlers, siege artillery, elephants, chariots are all cases where this is true.
-
Re: spearmen with secondary CTD
Suggestion for Jerome to consider: Javelin/thrusting spear combos should be available. These seem to have been rather common historically, and could be used to fill out some of the unit cards for Gaul/Brittania/Spain/Numidia as low level infantry. Even the early principes probably used some sort of pila/spear combination based on some descriptions by Dionysius (quoting Pyrrhus) and Polybius/Livy. (I've wanted to do an interpretation of the pre-Polybian legion in game.) You can't make one now without doing a CAS edit, because when I have done so I end up with no weapon displayed in melee or a knife/sword depending on the base model I started with. I don't have the software to do CAS file edits myself. Legionaro did one with a CAS edit of scutarii and it looked quite good. Seems like I also tried it using a spearman as a base unit, but then he is throwing his spear backwards...funny to watch.
Too bad weapons can't be added more independently to the models (shields too.) The skeletons already dictate how the weapon is oriented and employed (granted shields are a lot more complicated.) The modularization CA used is good and works well for much of this, but it would be much more flexible from a new unit build standpoint if the weapons could be more independent...relying on the skeletons, and stat_pri for their employment, rather than the CAS. That could allow a given unit to employ virtually any weapon: falcata, falx, axe, gladius, long sword, short spear (short_pike), Iphicratid spear (spear), sarissa (long_pike), bows, javelins, pila, mace, etc.
-
Re: spearmen with secondary CTD
Sorry Jerome, it does not work,i tried all the ways but you'll never be able to make a Spearman use its secondary weapon,even givin' them a "solid" weapon in the Cas file and giving the right Skeletons "fs_spearman fs-swordsman" or any combination you like,I've been able instead to make a unit be Javelineer/ spearman , using the Scutarius Cas , exchangin' the sword with a spear,and givin' it the Javelin- spearman skeletons,it works quite perfectly,once they have depleted the javelins they switch to spear and fight with that,also they walk with spears in hand;
so it seems an issue that You CA should address,it must have to do with animation or whatever in the code,but you cannot have a spearman/swordsman workin' ,unless you give 'em Phalanx formation,wich is not the case unless you wanna go Greek style;
I would like if you could investigate about this thing deeply,it would add a lot
for us.... ~:cheers:
Red:
Quote:
Too bad weapons can't be added more independently to the models (shields too.) The skeletons already dictate how the weapon is oriented and employed (granted shields are a lot more complicated.) The modularization CA used is good and works well for much of this, but it would be much more flexible from a new unit build standpoint if the weapons could be more independent...relying on the skeletons, and stat_pri for their employment, rather than the CAS. That could allow a given unit to employ virtually any weapon: falcata, falx, axe, gladius, long sword, short spear (short_pike), Iphicratid spear (spear), sarissa (long_pike), bows, javelins, pila, mace, etc.
Well this is not entirely true,you can actually change the weapons as you wish,providing you have the ability to edit the Cas file with 3 D Studio Max or G Max,same for the shields,I do this almost for all my units, since I did not like many of them,but using waht is already provided with the default Cas, you have a ready "library" of hardware to use at your own will... ~:)
the only weapon wich has a bacward orientation,is the missile one ( javelins etc..etc..) if you respect this, can do whatever you like with them,shields are even easier to change,most of the times you only need to edit tha Alfa channel for it,whe that's not possible,you can use an existing one from another unit ,or build it up yourself,then it must be mapped ( textured) otherwise it will not show correctly,as it happens when you changed secondary and not seen it..it was because it had no Mappin' in the right spot of the Tga file.
I'll try to explain better:
the Scutarius has a primary weapon,a Javelin, and a secondary weapon, a sword,open the Cas, detach and delete the sword,then build from scratch or import a Spear,attach to the model, link it to the Bone it's going to be used from ( the right arm bone in this case) otherwise it won't move,export it;
then change the unit's stats in the proper Txt file for giving it the right skeletons and all,try it in the game and....it will walk with nothin' into his hands (they walk with the secondary weapon in hand) then when committed,they'll launch the Javelins OK..and then they'll try to switch to secondary ( the Spear we added) and again the'll have nothin' in hand....
that's because the spear IS into the Cas file OK,but...it has no texture,so you have to open the Cas again,select the spear, "unwrap UV" and then mapping it to the right place on the TGA file where the Spear texture lies...
that's it..... :bow:
So unless you can use 3 D Studio properly,it's a pain to do this things.... ~:cool:
cheers
-
Re: spearmen with secondary CTD
Quote:
Originally Posted by Legionario
even givin' them a "solid" weapon in the Cas file and giving the right Skeletons "fs_spearman fs-swordsman" or any combination you like
The skeleton names in descr_model_battle.txt have to be exactly correct, for example "fs_spearman, fs_swordsman" (the comma is important, and it's case sensitive); and there has to be a non-zero attack value in the unit stats in export_descr_unit.txt -- and voila, it works.
And it should be entirely possible to set up a javelin / thrusting-spear combination by modding the text files, although you're right in that someone will have to create the model for you. The reason why the weapons are not seperate is mainly for engine performance reasons, although it makes life easy for our artists, as well ~;)
-
Re: spearmen with secondary CTD
see my problem is that we have correct model with the appropriate weapons. and when i play a battle they switch to there secondary just fine. but in a melee it dosnt take long to CTD.
-
Re: spearmen with secondary CTD
Quote:
The skeleton names in descr_model_battle.txt have to be exactly correct, for example "fs_spearman, fs_swordsman" (the comma is important, and it's case sensitive); and there has to be a non-zero attack value in the unit stats in export_descr_unit.txt -- and voila, it works.
Sorry again Jerome,but it does not work,of course the spelling is "fundamental" in specifing the skeletons and all,I know, I was only summarizing in my reply, there's the comma and correct spacing and all,
also unit stats for secondary are well in place...but....
when they switch to the secondary weapon for meleè combat it's a CTD no way...I've tried this on many kind of units...there must be something into the code wich prevents this; ~:) ~:)
Quote:
And it should be entirely possible to set up a javelin / thrusting-spear combination by modding the text files, although you're right in that someone will have to create the model for you
yes it is, it's what I've done many times,I usually make changes into the Cas file,sometimes I use models that do not have weapons at all,but are better suited to depict what I have in mind,so I have to go through 3 D studio Max
and make all the changes that they need;
but again about the first issue,please have a try by yourself.....and let me know ,if you manage to solve this one, I'll buy you a beer ( or better else a bottle of Tuscany's red wine...)
~:cheers: ~:cheers:
-
Re: spearmen with secondary CTD
A simple method of replicating this... Take Pharoh's Guards and disable (remove) the phalanx ability from them.
Now try using them in a custom battle, get them into a fight and 9 time out of 10 you get a CTD just as the fight is starting...
-
Re: spearmen with secondary CTD
Quote:
Originally Posted by JeromeGrasdyke
The skeleton names in descr_model_battle.txt have to be exactly correct, for example "fs_spearman, fs_swordsman" (the comma is important, and it's case sensitive); and there has to be a non-zero attack value in the unit stats in export_descr_unit.txt -- and voila, it works.
Sorry, JeromeGrasdyke. Legionario is correct. Many experienced modders have tried it and it does NOT work unless with phalanx hability.
-
Re: spearmen with secondary CTD
Jerome, this has been a known problem for quite some time. Modders are very capable of adding secondary weapons to any unit EXCEPT those with spears. If the spear unit does not have phalanx, if it attempts to use its secondary weapon there is a CTD, without fail.
This appears to be a bug in the animation set. If a unit is given a javelin as a primary and a spear as secondary, no CTD. However, if the spear is primary and the unit is not a phalanx, it will crash, every time.
-
Re: spearmen with secondary CTD
Quote:
Originally Posted by Aymar de Bois Mauri
Sorry, JeromeGrasdyke. Legionario is correct. Many experienced modders have tried it and it does NOT work unless with phalanx hability.
Ok. I'll do some tests on the code and see if there is a work-around.
-
Re: spearmen with secondary CTD
Quote:
Originally Posted by JeromeGrasdyke
Ok. I'll do some tests on the code and see if there is a work-around.
Let's hope there is a way to solve the problem.
Thank you kindly for your concern... :bow:
-
Re: spearmen with secondary CTD
So, having tested it with the current code ... it works fine. What I did in detail: I added valid secondary weapon stats to the Triarii by copying and pasting the ones from the Legionary Cohort, and gave the Triarii model in descr_model_battle.txt a second skeleton of fs_swordsman.
There were some problems running with shadows, which I assume to be a temporary thing due to current Work In Progress (so had to turn them off), and then fought a couple of custom battles, one with the Triarii and one against. Both worked without any problems, although the AI choose to fight with the inferior primary weapon.
So, in essence it should work fine. If someone could replicate that with a vanilla 1.2 build, and if it crashes test without shadows, and post up the results that would be good. It is just remotely possible (though unlikely) that there was a crash but that it was fixed sometime between the release of 1.2 and now.
Correction: this was bs - "note that there is an aditional param which is not explicitly zero'ed in the standard blank secondary data" - my eyes playing tricks on me ;)
-
Re: spearmen with secondary CTD
First off..thanks for your committing.... ~:cheers:
second,can you be more specific about this?
Quote:
(note that there is an aditional param which is not explicitly zero'ed in the standard blank secondary data
Also as I see it now,unless we turn off shadows,this is not going to work is it?
Are these same issues for both patches?
I mean same thing with 1.1 and 1.2,or do they behave differently?
Thanks a lot.... ~;)
-
Re: spearmen with secondary CTD
And I'd like to know more about this:
Quote:
Originally Posted by JeromeGrasdyke
current Work In Progress
~D
-
Re: spearmen with secondary CTD
Jerome,
What is the parameter that should be adjusted? I tried what you suggested, but it CTD's and takes DX9 out of action in the process (requiring a reboot to run RTW again.)
The unit starts to melee with swords, it switched to them as it charged then got in about two or three strokes, then CTD with an invalid page fault. This happened both with and without any shadows enabled. So I must be missing some part or 1.2 exe can't handle it. Here are the stats I tried. I set the final timing value = 1 for both of them instead of the default 0.73 for the primary.
stat_pri 7, 7, no, 0, 0, melee, simple, piercing, spear, 25 ,1
stat_pri_attr no
stat_sec 9, 4, no, 0, 0, melee, simple, piercing, sword, 25 ,1
stat_sec_attr no
Added the fs_swordsman to descr_model_battle.txt of course.
Hope this helps.
-
Re: spearmen with secondary CTD
It seems that you guys have messed up when adding lines. I did a quick test with greek pikemen;
- I first edited out the the long_pike attribute. The game ran fine and I saw pikemen using their secondary weapons automatically and when alt-clicking.
- I then edited out the phalanx formation and again the game ran fine.
Since so many experienced modders have problems with it (:wink:), my advise is to just copy everything related to greek pikemen and then edit out the long_pike and phalanx values. You then have an unit with spears and a sword as secondary weapon.
Or am I making a fool out of myself and overlooking something? :uneasy:
Red Harvest
You forgot the spear attribute in primary weapon attributes.
My greek pikemen attributes were:
formation 1, 1, 2, 2, 8, square
stat_health 1, 0
stat_pri 8, 6, no, 0, 0, melee, blade, piercing, spear, 25 ,1
stat_pri_attr spear
stat_sec 5, 2, no, 0, 0, melee, simple, piercing, sword, 25 ,1
stat_sec_attr no
-
Re: spearmen with secondary CTD
I'll have to give that a try later. I didn't use it because it is supposed to be optional according to the text in the file. That will give it a large anti cav bonus so the mount effects should probably be eliminated to avoid "double dipping" I tested this sans secondary weapon a week or two ago and decided that triarii should not get the "spear" attribute and a mount effect at the same time.
-
Re: spearmen with secondary CTD
If you do not give the unit the spear attribute then the engine might CTD because it cannot decide which weapon to use. They are both equal in attributes and that might the only thing it looks for.
-
Re: spearmen with secondary CTD
Sorry Duke John,you must be the lucky one then,tested it on a plain vanilla Rome up to 1.2 ,no way,I gave the Triarii those same stats you proposed,tried with and without shadows,and as soon as they enter in melee combat,with swords in hand,it's a CTD...always! ~:confused:
this applies to all the spearmen i tried,just not to stick to Triarii only....
same old story....back to the code,I'm afraid this is a real issue to be fixed,
we can't play Merlin the Magician,turnin' things on or off to achieve this,there's something wrong that has to be fixed,if in 9 PCs out of 10 it does not work..... :furious3:
-
Re: spearmen with secondary CTD
Quote:
Originally Posted by Duke John
If you do not give the unit the spear attribute then the engine might CTD because it cannot decide which weapon to use. They are both equal in attributes and that might the only thing it looks for.
Good to see that someone else has reproduced a working case, although I'm pretty sure the game won't ctd for such a minor issue. Here are the stats for the unit and model as I have them:
type roman triarii
dictionary roman_triarii ; Triarii
category infantry
class spearmen
voice_type Medium_1
soldier roman_triarii, 40, 0, 1
officer roman_early_centurion
officer roman_early_standard
mount_effect horse +4, chariot +4, camel +4
attributes sea_faring, hide_forest, can_sap
formation 1, 1, 2, 2, 3, square
stat_health 1, 0
stat_pri 7, 7, no, 0, 0, melee, simple, piercing, spear, 25 ,0.73
stat_pri_attr no
stat_sec 9, 4, no, 0, 0, melee, simple, piercing, sword, 25 ,1
stat_sec_attr no
stat_pri_armour 7, 5, 5, metal
stat_sec_armour 0, 0, flesh
stat_heat 4
stat_ground 2, 0, 0, 0
stat_mental 10, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 500, 210, 50, 80, 500
ownership romans_julii,romans_brutii,romans_scipii,romans_senate
and
type roman_triarii
skeleton fs_spearman, fs_swordsman ; combat spear
indiv_range 40
texture romans_julii, data/models_unit/textures/unit_roman_triarii_julii.tga
texture romans_brutii, data/models_unit/textures/unit_roman_triarii_brutii.tga
texture romans_scipii, data/models_unit/textures/unit_roman_triarii_scipii.tga
texture romans_senate, data/models_unit/textures/unit_roman_triarii_senate.tga
model_flexi_m data/models_unit/unit_roman_triarii_high.cas, 15
model_flexi_m data/models_unit/unit_roman_triarii_med.cas, 30
model_flexi_m data/models_unit/unit_roman_triarii_low.cas, 40
model_flexi data/models_unit/unit_roman_triarii_lowest.cas, max
model_sprite romans_senate, 60.0, data/sprites/romans_senate_roman_triarii_sprite.spr
model_sprite romans_scipii, 60.0, data/sprites/romans_scipii_roman_triarii_sprite.spr
model_sprite romans_brutii, 60.0, data/sprites/romans_brutii_roman_triarii_sprite.spr
model_sprite romans_julii, 60.0, data/sprites/romans_julii_roman_triarii_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f
And that seems to work ok.
BTW, the spear attribute is purely an engine-stats modifier. The pike weapon attributes on the other hand are more complex as they tie into the display and animation, so it is possible you may have some trouble if you start adding it to units which did not have the attribute before, and also if you have a unit which has phalanx formation but not pike. Pike but no phalanx formation would probably be ok, although a little pointless ~;)
-
Re: spearmen with secondary CTD
Jerome,those are the standard stats for Triarii,what I use...and it does not work... ~:confused: never mind giving the spear attribute or not,it won't go...apart from Duke John,is there anybody else which managed to make it work?
As long as I know,all the people wich tried this ,got CTDs all over.....
I noted also that letting them wait to be attacked,they stay in place and fight with sword,as long as you give 'em order to attack or move, it.... CTD
so......
-
Re: spearmen with secondary CTD
Do the CTDs appear because of worksheet formating, space between data? ~:confused:
Edit: Forget it. Then the game would crash while loading the unit to the battlemap. :wall:
-
Re: spearmen with secondary CTD
No Aymar,I'm pretty concerned about formatting,so it's Ok ..... ~:)
I triple check it everytime....too many times I've gone mad for formatting errors... :furious3:
-
Re: spearmen with secondary CTD
Jerome and Duke John,
I've tried again. It still doesn't work, regardless of my vid settings, or what I put in the units file (excluding phalanx of course). I turned all my in game vid settings to minimum, added, spear, and even reduced secondary weapon stats to be lower than primary. Shadows and all other special items are off. When my now peg legged triarii started into melee I got a black screen and CTD same as usual. I pulled up the following details:
DDHELP caused an invalid page fault in
module <unknown> at 0084:baaba47e.
Registers:
EAX=baaba47e CS=0177 EIP=baaba47e EFLGS=00010286
EBX=00000020 SS=017f ESP=007dfd3c EBP=007dfd4c
ECX=00000000 DS=017f ESI=00008dc2 FS=3507
EDX=00008dde ES=017f EDI=007dfd54 GS=34ef
Bytes at CS:EIP:
And now, if I try to run RTW (before I reboot) it tells me that it can't find DX9.
I am puzzled as to how you are getting this to work DJ.
-
Re: spearmen with secondary CTD
I have most of my settings set to highest. I've got a ATI Radeon 9600.
I only deleted phalanx formation and the long_pike attribute in the greek phalanx entry. That is all. If you are doing exactly that and the games CTD than it is getting weird indeed.