Modding: How to restrain dual turret weapon mounts?!

Share your mods and tricks of the trade here.
Post Reply
Alpha Centauri
Posts: 806
Joined: Fri Apr 06, 2012 5:30 pm

Modding: How to restrain dual turret weapon mounts?!

Post by Alpha Centauri » Mon May 01, 2017 1:48 am

Okay - so it turns out I can allow dual weapons to not be allowed in strafe sections (which is my goal) if I set their turretclass to missile instead of standard.

However, then they don't fire when mounted in standard mounts. At all. :'(

It could be because missile mounts have such slow tracking speed and restricted azimuth in the _turrets.txt file:

small small missile 500 30 1.00 0.25 "turret_pd.x"
medium small missile 500 30 1.00 0.25 "turret_pd.x"
large small missile 500 30 1.00 0.25 "turret_pd.x"
medium medium missile 1000 15 1.00 0.25 "turret_m1missile.x"
large medium missile 2900 15 1.00 0.25 "turret_m1missile.x"
large large missile 3000 5 1.00 0.25 "turret_l1missile.x"

Or it could be something else? Like - lasers with mountclass missile just won't fire - some restriction of mars.exe?

Does anyone have another idea as to how I can restrict such that no dual weapons can be placed in a strafe mount?! :googly:

Luke Skywalker
Posts: 8
Joined: Wed Nov 18, 2015 9:31 pm

Re: Modding: How to restrain dual turret weapon mounts?!

Post by Luke Skywalker » Mon May 15, 2017 11:11 pm

Alpha Centauri wrote:
It could be because missile mounts have such slow tracking speed and restricted azimuth in the _turrets.txt file:

small small missile 500 30 1.00 0.25 "turret_pd.x"
medium small missile 500 30 1.00 0.25 "turret_pd.x"
large small missile 500 30 1.00 0.25 "turret_pd.x"
medium medium missile 1000 15 1.00 0.25 "turret_m1missile.x"
large medium missile 2900 15 1.00 0.25 "turret_m1missile.x"
large large missile 3000 5 1.00 0.25 "turret_l1missile.x"

Have you tried to just copy&paste the values of the standard turrets to them?
When they still dont work really, it is probably something hardcoded.

Btw in the vanilla game, there is annother "turret" weapon you cannot place in strafe mounts: DF Missiles (they dont have the missile turretclass!).
So if you copy some of their codelines in the dual turret weapons, you could achieve maybe the same thing with them.
Some cool developers wrote:from mis_dfire.weapon:

name @WEAPON_DFMSL
weaponclass dumbfiremissile
weaponfamily gauss
model1 Barrel_M1_RackMissile.X
model2 Barrel_L2_RackMissile.X
turretmodel1 Turret_M1RackMissile.X
turretmodel2 Turret_L2RackMissile.X
requires WEP_DFMsl

hpbonus -20
cost 3000
turretsize medium
turretclass standard


I hope this helps!

Warcat
Posts: 1106
Joined: Sun Apr 30, 2006 4:32 pm

Re: Modding: How to restrain dual turret weapon mounts?!

Post by Warcat » Tue May 16, 2017 12:28 pm

I could be wrong - it's been a long time I played SotS - but IIRC even stormers couldn't be fit in a strafe mount.

Another way is to set dual weapons as large (or tiny) weapons (none of them are allowed in strafe section). Of course theiy need adjustment (tracking speed, pd targeting...) and they cannot fit in a small/medium (or medium/large) mounts.

Alpha Centauri
Posts: 806
Joined: Fri Apr 06, 2012 5:30 pm

Re: Modding: How to restrain dual turret weapon mounts?!

Post by Alpha Centauri » Tue May 16, 2017 5:32 pm

Thanks for the ideas, Warcat. :D

I think I need to keep the missile turret values as-is because when you place missile weapons in standard mounts - they use those turrets and associated values. That's still necessary for them to look right / behave right.

Many of the dual weapons cannot change their class or family - or they won't have the right effect in game (correct behavior). So that's a non-starter, I"m afraid.

I've given up on this. I like the idea of disallowing duals in strafes - but I literally have no mechanism that would allow it properly.

Sigh - I need the source code to SOTS prime to make this sort of fix / extension.

Luke Skywalker
Posts: 8
Joined: Wed Nov 18, 2015 9:31 pm

Re: Modding: How to restrain dual turret weapon mounts?!

Post by Luke Skywalker » Wed May 17, 2017 1:41 pm

Alpha Centauri wrote:Thanks for the ideas, Warcat. :D

No problem... ;p

In the case you are still interested in a way to hinder the AI or special players :googly: to place dual turret weapons in strafe mounts:
I think I need to keep the missile turret values as-is because when you place missile weapons in standard mounts - they use those turrets and associated values. That's still necessary for them to look right / behave right.


I tried it out with modded values, they still behave right (keep shooting on ships), but with the increased agility of their turrets the missiles can launch nearly point-blank to their targets.
I find it looks somehow cooler than the vanilla -semi vertical- style but this is of course a matter of opinion.

Other weapons fire as they normally do (tested plasma cannons and phaser), but you have to add their default turret model in the corresponding .weapon files.
If you do not, they will have weird turrets in game.
For example:
name @WEAPON_PHS
weaponclass beam
weaponfamily conventionalbeam
model1 barrel_m1_Phasers.x
model2 barrel_l2_Phasers.x
turretmodel1 turret_m1standard.x
turretmodel2 turret_l2standard.x

requires WEP_Phas
hpbonus 100
cost 5000
turretsize medium
turretclass missile

Alpha Centauri
Posts: 806
Joined: Fri Apr 06, 2012 5:30 pm

Re: Modding: How to restrain dual turret weapon mounts?!

Post by Alpha Centauri » Wed May 17, 2017 2:08 pm

Very cool!

That may be worth doing, then!

I love the strafe section - but I think it's just wrong to allow dual turret weapons in those slots. They're already a sort of dual turrets - or extra turrets - it's the whole damn point of the strafe section.

But it gives turreted sections some raison d'être. Such as the hammerhead, or even a tactically valid reason to choose a standard bridge section.

Perhaps I'll do this 2.5b or whatever comes next. 2.6. :)

Post Reply

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 3 guests