• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Dizzy_XC

Second Lieutenant
May 23, 2018
132
0
Modtek gave me this error:

Add to DB failed for Weapon_New_Testgun_Model-X_0_Stock.json, exception caught:
The requested value 'NewAmmo1' was not found.

NewAmmo1 is the ammo category.

I defined a new Ammunition type and set the new AmmunitionBox and then made sure the ID names were ok and the mod.json had the proper file paths. But Modtek cant find my ammo type and wont load it.

I cant find another mod that has a new ammo type. Is it possible to even create one? Wracking my brain trying to my the mistake...
 
Digging up some info in one of the RogueTech articles on NexusGames, there's this...

Thunderbolt Missiles
Unlike it's counterpart the LRM the thunderbolt fires a single big missile, that trades damage to a single location for reduced range and more size
(uses ac ammo, because ammo is hardcoded and nobody found a workaround)

You may also want to ask this question in the modding help channel on discord. Lots of smart folks hang out there.
 
I had played around with adding a new Ammo type a while back. IIRC, I had to edit the MDD and added a new Ammo Category. I'm not at home, but I can look at what I was doing later.
 
Im looking at RogueTech now. He has all sorts of cool ammo that affects the weapons rather than making weapons that have the effect. But I still cant figure out how to make my ammo work. I'm about ready to pull out my hair.

My problem is there are two folders at play, the ammunition folder and the ammunitionBox folder. Both have quite different templates. Roguetech apparently uses only one from what I can tell, but I've been up all night trying to figure it out. So maybe some sleep and a set of fresh eyes will illuminate the answer... Or some more hair pulling...
 
Did RogueTech figure out how to switch different ammo types feeding the same weapon during combat?
 
@Max, no, dont think so.

Update, I got my weapons mod working, but I had to revert to known ammo categories. Seems I cant figure out how to create a new ammo category. If anyone knows how, please share!
 
Did you add it to the database file already? I screwed around with this a while ago and think you will need to add this to the database in the MDD folder as well as the individual files added to ammunition the folders

adding a new entry to the ammunition table may be what you are after.
 
Did you add it to the database file already? I screwed around with this a while ago and think you will need to add this to the database in the MDD folder as well as the individual files added to ammunition the folders

adding a new entry to the ammunition table may be what you are after.

What ammunition Table?
 
What ammunition Table?

the one in the database file located in the streaming assets/data/MDD folder. In that MDD folder there is only one database file(cant remember what its called but its .db extension, open with any SQLite editor/viewer).

You can do whatever you want with alot of the json files but if you do not also update the database file to match then the database file will take priority over the json files if they do not match and the game will ignore anything within the jsons that do not match the db file. Some things require editing the db file some dont but i think new ammo type will require db editing

There is an ammunition table in that database file, i would imagine to make a new ammo type you will need to add an entry into that table to reflect the new ammo type.
 
That was the Ammo Category table I was referring to in the MetadataDatabase.db 3 posts into this conversation ;)
 
Editing of AmmoCategory table in MetadataDatabase.db will not change anything. AmmoCategory is enum and it's hardcoded.
But using some sort of street magic(harmony exactly), l've manage to create few completely new ammo categories. For example - light gauss rifle uses different ammo box then used by regular gauss rifle.
Here some proof-of-concept
 
if someone interested, i can release mod.

I'm sure many people - myself included - would love to see how you did it! So please, go ahead and release it. :)
 
Dll is somewhat experimental. I'll remove debug code and make release till end of week. And i'm certainly sure, i can implement ammoBox swiching mechanic. At first for SRM (Inferno/Normal missiles).
 
I approve of this thread-o-mancy wholeheartedly :D

Bring on the mod!
 
I'm making a note here: huge success ;) I've implemented ammo boxes swiching mechanic. Switching is triggered by enabling/disabling weapon. Weapon damage/heatdamage depends on ammo in bunker.
Further plan:
1. Implement ammo box automatic switching on ammunition depletion.
2. Investigate impact on save/load/campagin start.
3. Release mod beta for Battletech 1.3.2 beta localization (cause i'm using this version) (patched ModTek will be included)
4. Release mod beta for Battletech 1.3.2 stable.
 
I'm making a note here: huge success ;) I've implemented ammo boxes swiching mechanic. Switching is triggered by enabling/disabling weapon. Weapon damage/heatdamage depends on ammo in bunker.
Further plan:
1. Implement ammo box automatic switching on ammunition depletion.
2. Investigate impact on save/load/campagin start.
3. Release mod beta for Battletech 1.3.2 beta localization (cause i'm using this version) (patched ModTek will be included)
4. Release mod beta for Battletech 1.3.2 stable.

This is one of the most impressive BattleTech modding achievements I have seen. Keep up the great work!