Hiding weapons from player?
-
Ah, so you wanted something that follows the cursor …
Removing the turret HP from the shiparch should prevent mounting anything there.
Define it as something other than a turret - or don’t make it a turret entry in weapon equip…make it something else in st_equip but without a good entry (this will probably prevent it from rotating I assume).Honestly, I’ve no clue.
-
Here you go. This hides weaponry (or probably any equipment) from your inventory and weapons list (but they can still be fired, for anyone else wanting to use this) that has a price of 0 (so you will need a good); Freelancer itself hides these goods from the dealer.
-
Adoxa, you’re wonderful. That should come in handy for Broken Bonds. Hiding things that shouldn’t be unmounted, like forward guns on caps or mining lasers on mining ships, will really be useful.
-
Well, the plugin works as advertised. The only problem I’m running into is that you can’t group, or activate/deactivate hidden weapons, making this a bit less useful than I initally hoped. It’ll still have uses, though.
If I might make a suggestion, could you extend it to only hide stuff from the inventory, in addition to the complete hiding that it does now? Perhaps by setting the price to 1, it would hide it from your inventory so you can’t unmount or sell it, but it would still appear in the list as with any other weapon. That would leave the original function where it hides it completely with the price set to 0, giving the modder more options with equipment.
-
Great stuff.
TY 4 sharing.
-
Capt.Morgan:
Seems I recall you can hide weapons from inventory without any further DLL’s. The first time I ran across this is on a pretty popular ship called the Ragnarok. Its main cannon is hidden from inventory, but selectable from the weapons menu. I don’t think the last mod I played has it the way I first encountered (tekagis).But… if I remember correctly, you just need to remove its entry from shiparch.ini, yet still mount it via goods.ini “addon=”
Keep in mind there still needs to be a physical HardPoint on the model itself before you can mount a weapon there.So lets say we want it on HpWeapon01, this is the normal way we layout what classes of weapon will mount on a HardPoint:
hp_type = hp_gun_special_10, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04
Hiding a weapon will look like this, for all classes (no mention of the HpWeapon01 at all):
hp_type = hp_gun_special_10, HpWeapon02, HpWeapon03, HpWeapon04
But in goods.ini you will still have this:
addon = ragnarokmain_gun, HpWeapon01, 1
It’s been a while, as I keep saying since I played a mod that did this, but am fairly sure that is how it’s done.
EDIT: Properly addressed reply to the Capt. (thx Chips )
I’m a visual person, so seeing it in code somehow helps me work through and cement things into the cranium. -
If I remember well SW tides of war made that, I use it all the time when I make a new ship, to test it, and it works well!
-
Mini_Me wrote:
Seems I recall you can hide weapons from inventory without any further DLL’s. The first time I ran across this is on a pretty popular ship called the Ragnarok. Its main cannon is hidden from inventory, but selectable from the weapons menu. I don’t think the last mod I played has it the way I first encountered (tekagis).But… if I remember correctly, you just need to remove its entry from shiparch.ini, yet still mount it via goods.ini “addon=”
Keep in mind there still needs to be a physical HardPoint on the model itself before you can mount a weapon there.So lets say we want it on HpWeapon01, this is the normal way we layout what classes of weapon will mount on a HardPoint:
hp_type = hp_gun_special_10, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04
Hiding a weapon will look like this, for all classes (no mention of the HpWeapon01 at all):
hp_type = hp_gun_special_10, HpWeapon02, HpWeapon03, HpWeapon04
But in goods.ini you will still have this:
addon = ragnarokmain_gun, HpWeapon01, 1
It’s been a while, as I keep saying since I played a mod that did this, but am fairly sure that is how it’s done.
Confused the heck out of me as that’s what I said earlier… until I realised it is in reply to Capt. Morgan
-
Typical, I should have waited till after FLMM. Still, the OP really wanted to hide from the Weapons List, so there’s that.
I’ve just uploaded Fixed Mounts, which should satisfy Capt.Morgan and be more generally useful (hence being on my site instead of an attachment). Note this will not work with Hide Weapons - they both use a price of 0 as an indicator and Hide will take precedence (I think, didn’t actually try both together). If you want both, I’ll just have to take that extra step… (I was going to combine them using negative prices, but that actually decreases your worth and the dealer makes it $1, so I lazed out.)
-
That should work perfectly for our needs. Thanks, Adoxa!
EDIT: Yep, that works just fine for our needs. I tried it out with a mining ship, and it’s mining laser is now stuck to the ship permanantly. Should be useful to keep people from mixing and matching guns that are supposed to be fixed, without relying on a server rule to enforce it.