Knokke Posted March 9, 2010 Share Posted March 9, 2010 I have a question that Sneaksie might be able to answer: I have created a new unit for ToW2 based on an MG42. In fact it is not a machinegun, but I needed a crewable unit representing a detonator (a soldier can crew the detonator, fire a demolition charge ammo from it, and I can easily check in a mission trigger if the detonator is crewed or not, and if it is destroyed or not - that is, if the player is still able to operate the device or if it has been destroyed or captured by the ennemy) The unit appears in the encyclopedia with all its icons (magazine and ammo), I can add it in the mission editor, and it shows in game - so it seems it is working correctly. But I still have a problem with this parameter in the data/units/hmg/ger/detonator/part.ini : [WeaponStatic_detonator] Type WeaponStatic WeaponType Machine_Gun Variety Primary RatingType Machine_Gun Name 7_92mm_MG_42 //Name detonator IconName WeaponStatic\detonator.mat Gun Ger\demolition_charge SignNode Hook_detonator SignType Generic Hooks Hook_detonator What does the 7_92mm_MG_42 line refers to? My assumption was that it was the name of the unit folder in 3dobj, but when I replace this line with the following one (marked as a comment) Name detonator (the name of my unit 3dobj folder), the unit is no longer working in game, nor in the encyclopedia (when I try to look at it, the game crashes and quit to desktop) my understanding so far is that the line "Name 7_92mm_MG_42" seems to use the data in the MG42 hier.him while my line "MeshName 3dobj\hmg\ger\detonator\hier.him" in the data/units/hmg/ger/detonator/unit.ini loads the detonator model instead of the machinegun. Which leads to an other question: How is the position of an unit defined in the viewer of the encyclopedia? I was expecting my unit to be centered, but it is offset toward the bottom of the image. Could this be that the icon_info hook is used as a reference and that it is set a bit too high for my unit to display correctly? Or is the unit offset because it is using the machinegun MG42 hier.him instead of its own? What could be the reason of this error with the "Name detonator" line? Does this means that one of the new ressources needed is not found? I've added the following lines in the filesid.ini, but maybe I've something missing?: 2834 presets/sounds/weapons.detonator.prs 2835 data/units/hmg/ger/detonator 2836 3dobj/hmg/ger/detonator/detonator.mat 2837 data/ammo/ger/demolition_charge 2838 data/items/magazines/ger/demolition_charge 2839 data/gui/ingame/icons/weaponstatic/detonator.mat 2840 data/gui/ingame/icons/magazines/demolition_charge.mat Thanks for any hint you can provide. -Knokke Link to comment Share on other sites More sharing options...
Recommended Posts