Firearms pre-loaded ammo

Users who are viewing this thread


Forgive me for any grammatical mistakes, but English is not my native language.

I have created a small mod (based on Floris 2.55, WB 1.15:cool: for my personal use, which basically contains customized equipment for my companions.

Here the question: why my repeating crossbows will works fine without any bag of ammo, while semi-automatic firearms do not?

Specifically, I created some semi-automatic weapons, pre-loaded with 50 rounds each. When equipped on my character these work well. My companions, however, do not make use of any of these weapons, unless I give them also a pack of cartridges.

On the wiki, i have found that crossbows are the only ranged weapons that, originally, could fire at least one time, even with no ammo carried. Is this the difference?

Is there a way to edit weapons archetipes?
Or anyone know a script that can be attached to these weapons in their respective entries in Itemkind.txt, so the internal ammo can be checked correctly?

One extra question: is there a way to make crossbows use an extra mesh for carriyng purposes, like any other weapons?

I've planned to release my custom items as an OSP, or even create my own mod, but in the while I have found that this game has many hard-coded/meaningless limitations. Why?

thanks in advance.

I had the problem With guns not firing, You need to add |max_ammo(number)| in the item stats section in, I don't know how you would add that to compiled text files however.

To make it so your guy carries the gun add an item capability like carry crossbow back, or carry dagger/revolver for pistols.
ScreamingCommie said:
I had the problem With guns not firing, You need to add |max_ammo(number)| in the item stats section in, I don't know how you would add that to compiled text files however.
I got the impression etkratos has access to the sources. Anyway, item quantity in item_kinds1.txt is here:

 itm_meat_dried Dried_Meat Dried_Meat 1  smoked_meat 0  33619979 0 1 1088 15.000000 100 0 0 0 0 0 0 0 0 [color=red][b]50[/b][/color] 0 0

Or you could just use the Morgh's editor.
To be clear:

I have made a reapeating crossbows, with a "max_ammo" of 50 bolt.

I have made a semi-automatic rifle, with a "max_ammo" of 50 round.

I have a squad of 10 NPCs. Half equipped with the crossbow, and the other half equipped with the rifle. NONE of them carry any extra ammo.

When in battle, if I give the order to use only ranged weapons, the guys with the crossbow start to shoot like a charm, where the other guys simply continue to use the weapon they were wielding.

The situation change if I give the guys with rifles some cartridges (the standard/basic ones). Then everything works perfectly.

So, is there a way to modify weapons ARCHETYPES? To make rifle scripting similar to the crossbows one?

Or, is there a way to modify the IA scripting, to make a simple change in the checking mechanic for ammunitions?

Regarding the last question: if I give an item the "type_crossbow" flag, and i have, since the item IS a crossbow, the game seems to not recognize the  addittional "ixmesh_carry" that i set for this specific item.

Example: if i want a rifle to be carried like a "sword_left_hip", i can have two separate meshes, one for the wielding and another one, even animated if the rifle have a scabbard, for carriyng purposes. Instead, If the item is a crossbow, only the basic mesh is recognized, and yes, i can chose the point where the xbow is carried, but I can't tune the alignment without change the position of the crossbow when wielded, since the mesh is the same.

In my experience, only the "item_crossbow" flag give this type of limitation, so I am optimistic that the problem can be circumvented. Any ideas?

For reference. i have the following editing tools: Morghs MB-WFAS editor, Python 2.77, Module sistem for the current version of Floris, Wings3d/3dStudioMax.

Anyway, thank for the quick replies.

Here's the thing - most ranged weapons and ammo are stripped from agents if you give them more than one ranged item or the wrong type they can't use, and you can't have one without listing the other (except throwing weapons) on regular troops. Do not assume that just because you add them in equal proportions in the troop's item entries that they will be spawned with the same ratio. You probably need to add a trigger to ensure an equal ratio are added to the agents after they spawn.
I'm not sure I have understanded Somebody reply, but there's no spawn involved. My squad of ten is composed only by NPCs (Alayed, Artmenner, Deeshavi ect...) and the items are added directly into the game via the use of a savegame editor, for quick testing purpose. Then each item is manually equipped on each companion. No troops editing is involved in these tests, and i have no troops in my party either.

I have also set the requirement for each item to 0, set the firearms variable in module.ini to 1, and increased the stat and skill of the NPCs near the maximum, just to be sure. Still no luck with these damned weapons.

I can understand that these are, somewhat, trivial questions, but for me, at this point, it is a matter of principle.
Top Bottom