Important MessageYou are browsing the archived Lancers Reactor forums. You cannot register or login. |
**Tutorial** - Creating new dynamic weapons
Here you find the different tutorials on editing and MODing Freelancer
58 posts
• Page 4 of 4 • 1, 2, 3, 4
got a strange question here...I've finally got my ship made, tex'd and .mat file made and saved, I made this ship with INTERNALLY mounted guns, (i.e. barrels just sticking out the nose) Seems to me, that I could just copy/rename an existing gun, delete any ref to a .cmp (I think) and then "mount it on the proper Hp..am I missing something here or could it actually be that simple? Also,,,to have this (these) specific guns as "standard" equipment via the "package .ini"??any assist here would be a great help. Thanks
Howardtm2,
Removing the .cmp of a gun would give the gun no hardpoints to mount on (via the HpMount attached to the gun .cmp, which attaches it to the ship .cmp), also it wouldn't have a .cmp to define where the firing occurs from. To make an invisible gun, you can use the following as your model and cmp:
DA_archetype = equipment\models\turret\li_cruiser_gun01.cmp
material_library = equipment\models\li_turret.mat
Do not use the invisible Nomad cmp. You will have an invisible gun, but you will get errors about missing Nomad textures.
To get the gun to be part of the package, you need to edit goods.ini. The following is a code snippet from our mod (Epsilon):
[Good
nickname = f_cyclone_package
category = ship
hull = cyclone_hull
addon = cypher, HpWeapon01, 1
addon = cypher, HpWeapon02, 1
addon = tesla, HpWeapon03, 1
addon = tesla, HpWeapon04, 1
addon = cyclone_engine, internal, 1
addon = cyclone_power, internal, 1
addon = ge_s_scanner_01, internal, 1
addon = ge_s_tractor_01, internal, 1
addon = cyclone_shield, HpShield01, 1
addon = LargeWhiteSpecial, HpHeadlight, 1
addon = SlowSmallBlue, HpRunningLight01, 1
addon = SlowSmallBlue, HpRunningLight02, 1
addon = SlowSmallBlue, HpRunningLight03, 1
addon = contrail01, HpContrail01, 1
addon = contrail01, HpContrail02, 1
addon = DockingLightRedSmall, HpDockLight01, 1
addon = DockingLightRedSmall, HpDockLight02, 1
addon = DockingLightRedSmall, HpDockLight03, 1
The cypher and tesla are the nicknames of the guns in weapon_equip.ini. You use those nicknames to attach the guns as an addon to the ship. Make sure the code is as follows.
addon = gun_nickname, hardpoint, 1
the hardpoint will generally be HpWeapon##. The 1 after it signifies that there is only 1 gun attached. You can attach multiple guns to one hardpoint, but that is just begging to cause problems.
Hope this helps
Edited by - parabolix on 3/20/2006 5:30:14 PM
Removing the .cmp of a gun would give the gun no hardpoints to mount on (via the HpMount attached to the gun .cmp, which attaches it to the ship .cmp), also it wouldn't have a .cmp to define where the firing occurs from. To make an invisible gun, you can use the following as your model and cmp:
DA_archetype = equipment\models\turret\li_cruiser_gun01.cmp
material_library = equipment\models\li_turret.mat
Do not use the invisible Nomad cmp. You will have an invisible gun, but you will get errors about missing Nomad textures.
To get the gun to be part of the package, you need to edit goods.ini. The following is a code snippet from our mod (Epsilon):
[Good
nickname = f_cyclone_package
category = ship
hull = cyclone_hull
addon = cypher, HpWeapon01, 1
addon = cypher, HpWeapon02, 1
addon = tesla, HpWeapon03, 1
addon = tesla, HpWeapon04, 1
addon = cyclone_engine, internal, 1
addon = cyclone_power, internal, 1
addon = ge_s_scanner_01, internal, 1
addon = ge_s_tractor_01, internal, 1
addon = cyclone_shield, HpShield01, 1
addon = LargeWhiteSpecial, HpHeadlight, 1
addon = SlowSmallBlue, HpRunningLight01, 1
addon = SlowSmallBlue, HpRunningLight02, 1
addon = SlowSmallBlue, HpRunningLight03, 1
addon = contrail01, HpContrail01, 1
addon = contrail01, HpContrail02, 1
addon = DockingLightRedSmall, HpDockLight01, 1
addon = DockingLightRedSmall, HpDockLight02, 1
addon = DockingLightRedSmall, HpDockLight03, 1
The cypher and tesla are the nicknames of the guns in weapon_equip.ini. You use those nicknames to attach the guns as an addon to the ship. Make sure the code is as follows.
addon = gun_nickname, hardpoint, 1
the hardpoint will generally be HpWeapon##. The 1 after it signifies that there is only 1 gun attached. You can attach multiple guns to one hardpoint, but that is just begging to cause problems.
Hope this helps
Edited by - parabolix on 3/20/2006 5:30:14 PM
I'm working on a few custom things, and was wondering... how do you make a weapon that doesn't move at all? As in, the gun stays pointed forward at all times, and only shoots straight ahead.
I tried setting the "force orientation" thing, and all that did was make it so that the shots fired would only go where the gun would point. Editing the hardpoints directly caused a reduction in movement, but for some reason the weapons would still rotate in the Y plane, and therefore the shots could go up or down as well.
I know it's been done, because the Swordfish's main gun does it... but looking at its hardpoints, the main gun has default gun settings and going just by that it should be able to move. But it doesn't and I can't figure out why.
Help?
I tried setting the "force orientation" thing, and all that did was make it so that the shots fired would only go where the gun would point. Editing the hardpoints directly caused a reduction in movement, but for some reason the weapons would still rotate in the Y plane, and therefore the shots could go up or down as well.
I know it's been done, because the Swordfish's main gun does it... but looking at its hardpoints, the main gun has default gun settings and going just by that it should be able to move. But it doesn't and I can't figure out why.
Help?
Just a guess, but it may be the hardpoint that it is mounted to. I have created a few ships a while back, and I noted that when you had gun hardpoints they were labeled "revolute" or something at the begining, while some of the others were labeled "fixed". So it may be the hardpoint that causes it not to move. Somebody correct me if I am wrong.
There are two ways to "lock" a gun down. It depends on if you want to lock down a certain type of gun or if you want to lock down all guns on one ship.
To lock down one gun:
1. Open weapon_equip.ini and find the gun you want to edit. Look in the [Gun heading until you find the line force_gun_ori = false. Change false to true, and save the file.
To lock down all guns on one ship.
1. Open the ship .cmp file using the UTF Editor. You can download the Editor here if you need it.
2. Navigate through the ship structure until you find the weapon hardpoint you want. The hardpoint MUST be of the revolute type.
3. Expand the node of that hardpoint and look for the Min and Max leaflets. Select one at a time, and use the edit feature. Set both values listed to 0, and click ok, then repeat for the other. Do this for as many hardpoints as you need to.
4. Note that using a Fixed hardpoint will just result in the gun being able to fire completely behind the ship. Avoid using Fixed hardpoints for guns as it will just create an odd effect.
Hope it helps
To lock down one gun:
1. Open weapon_equip.ini and find the gun you want to edit. Look in the [Gun heading until you find the line force_gun_ori = false. Change false to true, and save the file.
To lock down all guns on one ship.
1. Open the ship .cmp file using the UTF Editor. You can download the Editor here if you need it.
2. Navigate through the ship structure until you find the weapon hardpoint you want. The hardpoint MUST be of the revolute type.
3. Expand the node of that hardpoint and look for the Min and Max leaflets. Select one at a time, and use the edit feature. Set both values listed to 0, and click ok, then repeat for the other. Do this for as many hardpoints as you need to.
4. Note that using a Fixed hardpoint will just result in the gun being able to fire completely behind the ship. Avoid using Fixed hardpoints for guns as it will just create an odd effect.
Hope it helps
I must be doing something wrong.
I've tried in both HardCMP and UTF Editor to get the damn hardpoints locked and they continue to be able to move up and down. They won't go left or right, that's true--but they still move up and down. And likewise, changing the weapon properties while in this state merely causes the guns to only fire where the barrels are pointed--the effect I want, except that the barrels still move.
EDIT: Correction, they only move down, not up. These are guns mounted under the wings and frame. They will point straight forward, or they'll point under the path of travel.
Edited by - Nomake Wan on 3/21/2006 12:46:58 PM
I've tried in both HardCMP and UTF Editor to get the damn hardpoints locked and they continue to be able to move up and down. They won't go left or right, that's true--but they still move up and down. And likewise, changing the weapon properties while in this state merely causes the guns to only fire where the barrels are pointed--the effect I want, except that the barrels still move.
EDIT: Correction, they only move down, not up. These are guns mounted under the wings and frame. They will point straight forward, or they'll point under the path of travel.
Edited by - Nomake Wan on 3/21/2006 12:46:58 PM
parabolix...seems like an awwfully complicated solution, when turn_rate controls how fast the gun swivels in both axis and setting it to 0 locks the gun...
edit:just wanted to add that mistaking force_gun_ori for the rate/lock is an easy mistake for any modder to make; and that the rest of parabolix's info was good
Edited by - Cold_Void on 3/21/2006 7:11:04 PM
edit:just wanted to add that mistaking force_gun_ori for the rate/lock is an easy mistake for any modder to make; and that the rest of parabolix's info was good
Edited by - Cold_Void on 3/21/2006 7:11:04 PM
Nomake, I forgot to mention that using hardpoint Min and Max arrays, the only axis you can lock is the X axis, not Y, my mistake.
Cold_Void, I didn't make a mistake suggesting that he edit force_gun_ori. What you say about turn_rate is true, but they work differently. Force_gun_ori tells the gun not to move, and turn_rate restricts movement. I'm sure it wouldn't cause any real differences, but I don't see why it's "awfully complicated" to just change false to true.
Cold_Void, I didn't make a mistake suggesting that he edit force_gun_ori. What you say about turn_rate is true, but they work differently. Force_gun_ori tells the gun not to move, and turn_rate restricts movement. I'm sure it wouldn't cause any real differences, but I don't see why it's "awfully complicated" to just change false to true.
58 posts
• Page 4 of 4 • 1, 2, 3, 4
Return to Freelancer Editing Tutorial Forum