Dual-Mode Turreted Weapons?

(Sastrei) #1

Anyone have success making a turret fire two different kinds of weapons? When I hook up two weapons to the same weapon joint, only one weapon will articulate the turrets, though both weapons do technically work.

(ajlsunrise) #2

The weapons can’t share the same families to attack.

Well, you can, but it makes for funky results.

1 Like
(Sastrei) #3

Via “setAccuracy” ? They don’t. One’s a flak cannon targeting missiles and the other is a heavy turret targeting capital ships.


You sure? Because I used to experiment with having two ions in one cruiser turret (both the blue and the red) for a purple effect, and it worked just fine. Also, I had a ‘dummy’ ion as a laser tracker (just for cool visuals), then missiles would fire.

(ajlsunrise) #5

Like I said, funky results. In your case, those results were intentional.

(GOLIATH Mod) #6

Do you guys have a mod that I can check out where you did this?

I’m trying to do the same thing, but I get an exception error if I attach two weapons to the same node on a turret. Maybe they changed it with the update, because there’s one example in the game like this, the Heavy Corvette has the flak gun attached to the same turret as it’s main cannon (at a seperate model node), but I can’t get it to accept any commands or something. Like if I want the first gun to be Normal Only, or the second gun to get activated by a research item, it doesn’t respond.

I’m trying to make some weapon upgrades, where the original turreted weapon stops firing, and the second turreted weapon starts firing after a research item has been completed. Not having any luck so far. Thought about making an lua file to do it, but I’m a little bit afraid of those things becaseu I don’t want the game to get slowed down, and as far as I know you can grant a subsystem, but I don’t think you can take a subsystem away.

Anybody have any ideas?


(Taiidan Republic Mod) #7

Why not have 2 turrets on top of each other, one being invisible (no mesh)?

(GOLIATH Mod) #8


That might be a good idea.

Let me try the ‘Normal Only’ weapon again, maybe I made a mistake, but I’m pretty sure the weapons didn’t accept any commands if they were in a turret. The way they were set up at the game start was the was it stayed. I think the problem is that the weapon is in the subsystem file instead of the ship file. So the command from the research item goes to the ship, but doesn’t make it to the subsystem file of the turret to turn it on or off…

(ajlsunrise) #9

are you getting any errors in the log? or is it just not functioning the way you want?

look at how the Attack Bomber weapons are setup (plus the research item)

adding an invisible mesh isnt going to solve your problem

you actually can take a subs away

(GOLIATH Mod) #10

BEHOLD! …the Ion-Cannon-Turret-Pulsar-Super-Duper-Gunship!! =D

So, you can attach two turrets to the same node, but the geometry hits each other, so I think you’re onto something with the turret with no geometry. The weapons seem to be accepting the command to turn off for the Normal Only weapon, but the Special Attack weapon is either not getting the message to turn on (which would be bad) or the turret is just stuck against the primary one. Gotta figure out how to make a turret with no model, and I’ll let you guys know how it goes.

(GOLIATH Mod) #11

It works!
here’s the unchanged pulsar turret:

this one is the upgraded turret for targeting little stuff:

this is the upgraded turret for targeting frigates and larger where the beam just stays on to give you a warm fuzzy feeling as their hulls depressurize:

But as you can see, this is at least 2 turrets on top of each other. You can only see 2, but I’m pretty sure it’s 3 on top of each other, and 2 are always pointed at the target at the same time. Anyway, I’m back to Dom’s no-mesh-turret idea. Unfortunately, I’m on a new computer and I can’t get HODOR to work again. ugh. Can you guys please have a look at my .hodor script file? I guess there’s a dumb mistake in it:

= -$HWRM_BASE=C:\Program Files (x86)\Steam\steamapps
= -$SHIP_NAME=New_Ship
= -$HOD_SAVE_OPTS=ForceScars FilterScars=thruster,bay
= -$CONVERT_IN=D:\HWRM_modding_stuff\Modeling_2019_04_29\PG_turret_1\hgn_pulsar2.dae
= -$CONVERT_OUT=D:\HWRM_modding_stuff\Modeling_2019_04_29\PG_turret_1\hgn_pulsar2.HOD
= -do=convert
= -action=null

thanks in advance!!

(GOLIATH Mod) #12

hmm, took the old computer out of mothballs to try it there, and HODOR runs there, but not on the new one. Is there something you have to watch out for with windows 10 because of that powershell thing instead of the dos window?

Anyway, can somebody take a look at the structure of this no-mesh turret to see what’s wrong with it? I got it into a .hod, but the game crashes. I tried to copy the structure from the hw2 classic turret because as far as I know we can’t open the remastered files, right?

This is the blender file tree:

and i tried to copy it from here:


(Taiidan Republic Mod) #13

Have a look at the blender tutorials. You need the “ROOT_INFO” joint and it’s two children.

(GOLIATH Mod) #14

I think I deleted the crap out of those two things when I got rid of the cube - oops. Thanks!

Are you using hodor on windows 10 by any chance? I have this script working on widows 7 but not on windows 10 with the standard HW installation:

## My HODOR Params - by Timmy
= -$HWRM_BASE=C:\Program Files (x86)\Steam\steamapps\common\Homeworld
= -$SHIP_NAME=hgn_pulsar2
= -$HOD_SAVE_OPTS=ForceScars FilterScars=thruster,bay
= -do=convert
= -action=null
= -wait

weird, right? I’m thinking there’s something that every computer guy would know, that I don’t, that I’m doing wrong.

(Taiidan Republic Mod) #15

I use it on Windows 10, it works fine. Are you sure the path for HWRM_BASE is the same between the two machines?

(GOLIATH Mod) #16

My windows is in German, but I tried the German path out, and that’s not the problem. I think that’s just an overlay and the real paths are normal anyway. Might be some kind of access thing, because hodor at least returns its default help line if the script isn’t entered:

edit: changed the folder accesses to allow everything, but that wasn’t it - get the same error.

What would the command line look like if I didn’t use the script file? I tried just putting it one after the other in the command line, but that didn’t work. (probably obviously, I guess)

(Taiidan Republic Mod) #17

I think I use ./hodor.exe also, I use the absolute path to the hodor file. Not sure if either of those are essential, but worth a try.

(How much time do we have?) #18

It’s probably worth noting that Windows 10 does sometimes do things to be “helpful” which may be interfering. This includes deciding to map things to OneDrive instead of the local hard drive, imposing anti-ransomware and antivirus restrictions via application-specific permissions, etc. So it’s possible to have all the paths set up correctly but still have things fail as soon as the try to write anything - worth checking the permissions for the relevant scripts, folders, and executables, anyway.

(GOLIATH Mod) #19

Yeah, I think Windows 10 is helping me right in the main thruster. I’ll just do the HOD conversions on the old computer.

Still can’t get the invisible turret to work though. I tried it with and without the untextured square, but it still crashes every time:

Any ideas? This is the first ship I’m making from scratch. I got a variant of the multi-gun corvette example in the game once, but there might be something obvious that I’m missing or didn’t set right.


(Taiidan Republic Mod) #20

Post the dae file and I’ll have a look.