Jump to content

Vehicle weapon data


Robin_Hood
 Share

Recommended Posts

Hi all, I am trying to fiddle a bit with ground units and their weapons, and I am slightly stuck on a few different things. I'm hoping some of you might help. Somewhat surprisingly, there seems to be much more information here on how to make aircraft mods than ground unit mods, although the latter is probably much easier. Also, I have found very few mods that actually add ground combat units, and all I found use existing weapons.

 

 

First of all, does the function declare_weapon work for tech, or ground unit weapons? I have read conflicting thoughts about that.

 

 

The second thing is this: I have made a tech mod, using (for the moment) various existing things in the game, and trying to fiddle around with the weapons. The purpose is, ultimately, to add a little variety in weapons, such as Mistral or Redeye MANPADS, but mostly to understand better how it works, possibly for future addons. I have been able to define a GT.WS[ws] in the .lua, and using a GT_t.LN_t data from the missile.lua, but the thing is, every time I try to define the LN data outside of the missile.lua file, DCS won't start. I have tried the exact same code inside the missile.lua and in a .lua file called by the mod's entry.lua, and the latter doesn't work.

Is there another way than using the missile.lua?

 

 

My third problem has to do with going a bit further. I gathered that the LN data specifies the next level of definitions (and actual projectile) by the .type_ammunition and/or .name_ammunition, but I haven't been able to find where these are defined. I know they are tied with an ID number given in wsTypes.lua, but that's about it.

I have also tried declaring a new weapon with declare_weapon, but the thing is, sure it can give me a name to use in missile.lua, but it doesn't give me an ID number for type_ammunition. I tried giving the name and omitting the ID, but DCS crashed on mission load this time (vs. on startup for everything else).

 

 

EDIT: Okay, I have managed to make it work, I think, by attributing an unused ID for type_ammunition and in the weapon declaration (8 for R-23). I am still wondering if there is a better way.


Edited by Robin_Hood
Link to comment
Share on other sites

Alright, so apparently, it was the barrels_reload_type copied from the stinger that makes DCS crash at startup, unless it is directly in the missile.lua. Without the line (jsut as in your mod), the LN definition works in the external file. Thanks a lot for the mod and the help!

 

 

BTW I noticed you used a wsType that seems to be already attributed to the R-4R ? Well, if it works, that's good. I wonder if it breaks the other weapon using the same ID. And, may we define new IDs ? I think I'll try.


Edited by Robin_Hood
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...